lsh-framework 0.10.0 ā 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1 -2
- package/dist/services/secrets/secrets.js +14 -21
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -76,8 +76,7 @@ program
|
|
|
76
76
|
console.log(' push Upload .env to encrypted cloud storage');
|
|
77
77
|
console.log(' pull Download .env from cloud storage');
|
|
78
78
|
console.log(' list List secrets in current local .env file');
|
|
79
|
-
console.log(' env
|
|
80
|
-
console.log(' show View secrets (masked)');
|
|
79
|
+
console.log(' env [name] List/view cloud environments');
|
|
81
80
|
console.log(' key Generate encryption key');
|
|
82
81
|
console.log(' create Create new .env file');
|
|
83
82
|
console.log(' get <key> Get a specific secret value (--all for all)');
|
|
@@ -150,33 +150,26 @@ export async function init_secrets(program) {
|
|
|
150
150
|
process.exit(1);
|
|
151
151
|
}
|
|
152
152
|
});
|
|
153
|
-
// Show secrets (masked)
|
|
154
|
-
program
|
|
155
|
-
.command('show')
|
|
156
|
-
.description('Show secrets for an environment (masked)')
|
|
157
|
-
.option('-e, --env <name>', 'Environment name', 'dev')
|
|
158
|
-
.action(async (options) => {
|
|
159
|
-
try {
|
|
160
|
-
const manager = new SecretsManager();
|
|
161
|
-
await manager.show(options.env);
|
|
162
|
-
}
|
|
163
|
-
catch (error) {
|
|
164
|
-
const err = error;
|
|
165
|
-
console.error('ā Failed to show secrets:', err.message);
|
|
166
|
-
process.exit(1);
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
153
|
// Generate encryption key
|
|
170
154
|
program
|
|
171
155
|
.command('key')
|
|
172
156
|
.description('Generate a new encryption key')
|
|
173
|
-
.
|
|
157
|
+
.option('--export', 'Output in export format for shell evaluation')
|
|
158
|
+
.action(async (options) => {
|
|
174
159
|
const { randomBytes } = await import('crypto');
|
|
175
160
|
const key = randomBytes(32).toString('hex');
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
161
|
+
if (options.export) {
|
|
162
|
+
// Just output the export statement for eval
|
|
163
|
+
console.log(`export LSH_SECRETS_KEY='${key}'`);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
// Interactive output with tips
|
|
167
|
+
console.log('\nš New encryption key (add to your .env):\n');
|
|
168
|
+
console.log(`export LSH_SECRETS_KEY='${key}'\n`);
|
|
169
|
+
console.log('š” Tip: Share this key securely with your team to sync secrets.');
|
|
170
|
+
console.log(' Never commit it to git!\n');
|
|
171
|
+
console.log('š” To load immediately: eval "$(lsh key --export)"\n');
|
|
172
|
+
}
|
|
180
173
|
});
|
|
181
174
|
// Create .env file
|
|
182
175
|
program
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lsh-framework",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Encrypted secrets manager with automatic rotation, team sync, and multi-environment support. Built on a powerful shell with daemon scheduling and CI/CD integration.",
|
|
5
5
|
"main": "dist/app.js",
|
|
6
6
|
"bin": {
|