Compare commits
No commits in common. "v0.1.0-develop.19" and "v0.1.0-develop.18" have entirely different histories.
v0.1.0-dev
...
v0.1.0-dev
|
@ -1,5 +1,3 @@
|
|||
# [0.1.0-develop.19](https://git.lumeweb.com/LumeWeb/publish-kernel-module/compare/v0.1.0-develop.18...v0.1.0-develop.19) (2023-09-04)
|
||||
|
||||
# [0.1.0-develop.18](https://git.lumeweb.com/LumeWeb/publish-kernel-module/compare/v0.1.0-develop.17...v0.1.0-develop.18) (2023-09-04)
|
||||
|
||||
# [0.1.0-develop.17](https://git.lumeweb.com/LumeWeb/publish-kernel-module/compare/v0.1.0-develop.16...v0.1.0-develop.17) (2023-09-03)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/publish-kernel-module",
|
||||
"version": "0.1.0-develop.19",
|
||||
"version": "0.1.0-develop.18",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/publish-kernel-module",
|
||||
"version": "0.1.0-develop.19",
|
||||
"version": "0.1.0-develop.18",
|
||||
"dependencies": {
|
||||
"@lumeweb/libweb": "0.2.0-develop.48",
|
||||
"@scure/bip39": "^1.2.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/publish-kernel-module",
|
||||
"version": "0.1.0-develop.19",
|
||||
"version": "0.1.0-develop.18",
|
||||
"type": "module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
15
src/index.ts
15
src/index.ts
|
@ -50,15 +50,12 @@ if (["0", "false"].includes(seed as string)) {
|
|||
seed = false as any;
|
||||
}
|
||||
if (!seed && seed === undefined) {
|
||||
const seedFile = path.join(process.cwd(), ".module-seed");
|
||||
if (await fileExists(seedFile)) {
|
||||
seed = await fs.readFile(seedFile, "utf8");
|
||||
}
|
||||
|
||||
if (!seed) {
|
||||
seed = bip39.generateMnemonic(wordlist);
|
||||
await fs.writeFile(seedFile, seed);
|
||||
}
|
||||
// @ts-ignore
|
||||
seed = await prompts.prompts.password({
|
||||
name: "module_seed",
|
||||
message: "Enter your module seed",
|
||||
validate: (prev) => prev && bip39.validateMnemonic(prev, wordlist),
|
||||
});
|
||||
}
|
||||
|
||||
const hdKey = seed
|
||||
|
|
Loading…
Reference in New Issue