Compare commits

..

3 Commits

4 changed files with 14 additions and 9 deletions

View File

@ -1,3 +1,5 @@
# [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)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/publish-kernel-module",
"version": "0.1.0-develop.18",
"version": "0.1.0-develop.19",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/publish-kernel-module",
"version": "0.1.0-develop.18",
"version": "0.1.0-develop.19",
"dependencies": {
"@lumeweb/libweb": "0.2.0-develop.48",
"@scure/bip39": "^1.2.1",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/publish-kernel-module",
"version": "0.1.0-develop.18",
"version": "0.1.0-develop.19",
"type": "module",
"repository": {
"type": "git",

View File

@ -50,12 +50,15 @@ if (["0", "false"].includes(seed as string)) {
seed = false as any;
}
if (!seed && seed === undefined) {
// @ts-ignore
seed = await prompts.prompts.password({
name: "module_seed",
message: "Enter your module seed",
validate: (prev) => prev && bip39.validateMnemonic(prev, wordlist),
});
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);
}
}
const hdKey = seed