lsh-framework 0.10.1 → 1.0.0
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/README.md +61 -59
- package/dist/cli.js +28 -25
- package/dist/lib/job-manager.js +0 -1
- package/dist/lib/secrets-manager.js +6 -6
- package/dist/lib/zsh-compatibility.js +0 -1
- package/dist/pipeline/mcli-bridge.js +2 -1
- package/dist/services/lib/lib.js +11 -1
- package/dist/services/secrets/secrets.js +0 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ npm install -g lsh-framework
|
|
|
32
32
|
|
|
33
33
|
# 3. ONE command does everything!
|
|
34
34
|
cd ~/repos/your-project
|
|
35
|
-
lsh
|
|
35
|
+
lsh sync
|
|
36
36
|
|
|
37
37
|
# That's it! Smart Sync:
|
|
38
38
|
# ✅ Auto-generates encryption key
|
|
@@ -46,7 +46,7 @@ lsh lib secrets sync
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
# Sync and load secrets into current shell
|
|
49
|
-
eval "$(lsh
|
|
49
|
+
eval "$(lsh sync --load)"
|
|
50
50
|
|
|
51
51
|
# Your secrets are now available!
|
|
52
52
|
echo $DATABASE_URL
|
|
@@ -59,7 +59,7 @@ echo $DATABASE_URL
|
|
|
59
59
|
npm install -g lsh-framework
|
|
60
60
|
|
|
61
61
|
# 2. Generate encryption key
|
|
62
|
-
lsh
|
|
62
|
+
lsh key
|
|
63
63
|
# Add the output to your .env:
|
|
64
64
|
# LSH_SECRETS_KEY=<your-key>
|
|
65
65
|
|
|
@@ -69,10 +69,10 @@ lsh lib secrets key
|
|
|
69
69
|
# SUPABASE_ANON_KEY=<your-anon-key>
|
|
70
70
|
|
|
71
71
|
# 4. Push your secrets
|
|
72
|
-
lsh
|
|
72
|
+
lsh push
|
|
73
73
|
|
|
74
74
|
# 5. Pull on any other machine
|
|
75
|
-
lsh
|
|
75
|
+
lsh pull
|
|
76
76
|
|
|
77
77
|
# Done! Your secrets are synced.
|
|
78
78
|
```
|
|
@@ -85,8 +85,8 @@ lsh lib secrets pull
|
|
|
85
85
|
|
|
86
86
|
```bash
|
|
87
87
|
cd ~/repos/my-app
|
|
88
|
-
lsh
|
|
89
|
-
eval "$(lsh
|
|
88
|
+
lsh sync # Auto-setup and sync
|
|
89
|
+
eval "$(lsh sync --load)" # Sync AND load into shell
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
What Smart Sync does automatically:
|
|
@@ -100,10 +100,10 @@ What Smart Sync does automatically:
|
|
|
100
100
|
**Repository Isolation:**
|
|
101
101
|
```bash
|
|
102
102
|
cd ~/repos/app1
|
|
103
|
-
lsh
|
|
103
|
+
lsh sync # Stored as: app1_dev
|
|
104
104
|
|
|
105
105
|
cd ~/repos/app2
|
|
106
|
-
lsh
|
|
106
|
+
lsh sync # Stored as: app2_dev (separate!)
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
No more conflicts between projects using the same environment names!
|
|
@@ -124,16 +124,16 @@ Use the built-in daemon to automatically rotate secrets on a schedule:
|
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
126
|
# Schedule API key rotation every 30 days
|
|
127
|
-
lsh
|
|
127
|
+
lsh cron add \
|
|
128
128
|
--name "rotate-api-keys" \
|
|
129
129
|
--schedule "0 0 1 * *" \
|
|
130
|
-
--command "./scripts/rotate-keys.sh && lsh
|
|
130
|
+
--command "./scripts/rotate-keys.sh && lsh push"
|
|
131
131
|
|
|
132
132
|
# Or use interval-based scheduling
|
|
133
|
-
lsh
|
|
133
|
+
lsh cron add \
|
|
134
134
|
--name "sync-secrets" \
|
|
135
135
|
--interval 3600 \
|
|
136
|
-
--command "lsh
|
|
136
|
+
--command "lsh pull && ./scripts/reload-app.sh"
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
**No other secrets manager has this built-in!** Most require complex integrations with cron or external tools.
|
|
@@ -143,8 +143,8 @@ lsh lib cron add \
|
|
|
143
143
|
**Setup (One Time):**
|
|
144
144
|
```bash
|
|
145
145
|
# Project lead:
|
|
146
|
-
lsh
|
|
147
|
-
lsh
|
|
146
|
+
lsh key # Generate shared key
|
|
147
|
+
lsh push --env prod # Push team secrets
|
|
148
148
|
# Share LSH_SECRETS_KEY via 1Password
|
|
149
149
|
```
|
|
150
150
|
|
|
@@ -155,7 +155,7 @@ lsh lib secrets push --env prod # Push team secrets
|
|
|
155
155
|
echo "LSH_SECRETS_KEY=<shared-key>" > .env
|
|
156
156
|
|
|
157
157
|
# 3. Pull secrets
|
|
158
|
-
lsh
|
|
158
|
+
lsh pull --env prod
|
|
159
159
|
|
|
160
160
|
# 4. Start coding!
|
|
161
161
|
npm start
|
|
@@ -165,31 +165,33 @@ npm start
|
|
|
165
165
|
|
|
166
166
|
```bash
|
|
167
167
|
# Development
|
|
168
|
-
lsh
|
|
168
|
+
lsh push --env dev
|
|
169
169
|
|
|
170
170
|
# Staging (different values)
|
|
171
|
-
lsh
|
|
171
|
+
lsh push --file .env.staging --env staging
|
|
172
172
|
|
|
173
173
|
# Production (super secret)
|
|
174
|
-
lsh
|
|
174
|
+
lsh push --file .env.production --env prod
|
|
175
175
|
|
|
176
176
|
# Pull whatever you need
|
|
177
|
-
lsh
|
|
178
|
-
lsh
|
|
179
|
-
lsh
|
|
177
|
+
lsh pull --env dev # for local dev
|
|
178
|
+
lsh pull --env staging # for testing
|
|
179
|
+
lsh pull --env prod # for production debugging
|
|
180
180
|
```
|
|
181
181
|
|
|
182
182
|
## Secrets Commands
|
|
183
183
|
|
|
184
184
|
| Command | Description |
|
|
185
185
|
|---------|-------------|
|
|
186
|
-
| `lsh
|
|
187
|
-
| `lsh
|
|
188
|
-
| `lsh
|
|
189
|
-
| `lsh
|
|
190
|
-
| `lsh
|
|
191
|
-
| `lsh
|
|
192
|
-
| `lsh
|
|
186
|
+
| `lsh push` | Upload .env to encrypted cloud storage |
|
|
187
|
+
| `lsh pull` | Download .env from cloud storage |
|
|
188
|
+
| `lsh list` | List secrets in current .env file |
|
|
189
|
+
| `lsh env` | List all stored environments |
|
|
190
|
+
| `lsh key` | Generate encryption key |
|
|
191
|
+
| `lsh create` | Create new .env file |
|
|
192
|
+
| `lsh delete` | Delete .env file (with confirmation) |
|
|
193
|
+
| `lsh sync` | Smart sync (auto-setup and sync) |
|
|
194
|
+
| `lsh status` | Get detailed secrets status |
|
|
193
195
|
|
|
194
196
|
See the complete guide: [SECRETS_GUIDE.md](docs/features/secrets/SECRETS_GUIDE.md)
|
|
195
197
|
|
|
@@ -217,7 +219,7 @@ lsh self version
|
|
|
217
219
|
|
|
218
220
|
```bash
|
|
219
221
|
# 1. Generate encryption key
|
|
220
|
-
lsh
|
|
222
|
+
lsh key
|
|
221
223
|
|
|
222
224
|
# 2. Create .env file
|
|
223
225
|
cat > .env <<EOF
|
|
@@ -234,7 +236,7 @@ API_KEY=your-api-key
|
|
|
234
236
|
EOF
|
|
235
237
|
|
|
236
238
|
# 3. Push to cloud
|
|
237
|
-
lsh
|
|
239
|
+
lsh push --env dev
|
|
238
240
|
```
|
|
239
241
|
|
|
240
242
|
## Advanced Features (Bonus!)
|
|
@@ -247,13 +249,13 @@ Run jobs reliably in the background:
|
|
|
247
249
|
|
|
248
250
|
```bash
|
|
249
251
|
# Start daemon
|
|
250
|
-
lsh
|
|
252
|
+
lsh daemon start
|
|
251
253
|
|
|
252
254
|
# Check status
|
|
253
|
-
lsh
|
|
255
|
+
lsh daemon status
|
|
254
256
|
|
|
255
257
|
# Stop daemon
|
|
256
|
-
lsh
|
|
258
|
+
lsh daemon stop
|
|
257
259
|
```
|
|
258
260
|
|
|
259
261
|
### Cron-Style Scheduling
|
|
@@ -262,20 +264,20 @@ Schedule any task with cron expressions:
|
|
|
262
264
|
|
|
263
265
|
```bash
|
|
264
266
|
# Daily backup at midnight
|
|
265
|
-
lsh
|
|
267
|
+
lsh cron add --name "backup" \
|
|
266
268
|
--schedule "0 0 * * *" \
|
|
267
269
|
--command "./backup.sh"
|
|
268
270
|
|
|
269
271
|
# Every 6 hours
|
|
270
|
-
lsh
|
|
272
|
+
lsh cron add --name "sync" \
|
|
271
273
|
--schedule "0 */6 * * *" \
|
|
272
|
-
--command "lsh
|
|
274
|
+
--command "lsh pull && ./reload.sh"
|
|
273
275
|
|
|
274
276
|
# List all jobs
|
|
275
|
-
lsh
|
|
277
|
+
lsh cron list
|
|
276
278
|
|
|
277
279
|
# Trigger manually
|
|
278
|
-
lsh
|
|
280
|
+
lsh cron trigger backup
|
|
279
281
|
```
|
|
280
282
|
|
|
281
283
|
### RESTful API
|
|
@@ -284,7 +286,7 @@ Control everything via HTTP API:
|
|
|
284
286
|
|
|
285
287
|
```bash
|
|
286
288
|
# Start API server
|
|
287
|
-
LSH_API_KEY=your-key lsh
|
|
289
|
+
LSH_API_KEY=your-key lsh api start --port 3030
|
|
288
290
|
|
|
289
291
|
# Use the API
|
|
290
292
|
curl -H "X-API-Key: your-key" http://localhost:3030/api/jobs
|
|
@@ -368,13 +370,13 @@ LSH validates all environment variables at startup and fails fast if:
|
|
|
368
370
|
**Solution:**
|
|
369
371
|
```bash
|
|
370
372
|
# Laptop
|
|
371
|
-
lsh
|
|
373
|
+
lsh push --env dev
|
|
372
374
|
|
|
373
375
|
# Desktop
|
|
374
|
-
lsh
|
|
376
|
+
lsh pull --env dev
|
|
375
377
|
|
|
376
378
|
# Cloud server
|
|
377
|
-
lsh
|
|
379
|
+
lsh pull --env dev
|
|
378
380
|
|
|
379
381
|
# All synced!
|
|
380
382
|
```
|
|
@@ -386,11 +388,11 @@ lsh lib secrets pull --env dev
|
|
|
386
388
|
**Solution:**
|
|
387
389
|
```bash
|
|
388
390
|
# New team member (after getting LSH_SECRETS_KEY from 1Password)
|
|
389
|
-
cd ~/projects/service-1 && lsh
|
|
390
|
-
cd ~/projects/service-2 && lsh
|
|
391
|
-
cd ~/projects/service-3 && lsh
|
|
392
|
-
cd ~/projects/service-4 && lsh
|
|
393
|
-
cd ~/projects/service-5 && lsh
|
|
391
|
+
cd ~/projects/service-1 && lsh pull --env dev
|
|
392
|
+
cd ~/projects/service-2 && lsh pull --env dev
|
|
393
|
+
cd ~/projects/service-3 && lsh pull --env dev
|
|
394
|
+
cd ~/projects/service-4 && lsh pull --env dev
|
|
395
|
+
cd ~/projects/service-5 && lsh pull --env dev
|
|
394
396
|
|
|
395
397
|
# Done in 30 seconds instead of 30 minutes
|
|
396
398
|
```
|
|
@@ -411,7 +413,7 @@ NEW_KEY=$(curl -X POST https://api.provider.com/keys/rotate)
|
|
|
411
413
|
sed -i "s/API_KEY=.*/API_KEY=$NEW_KEY/" .env
|
|
412
414
|
|
|
413
415
|
# Push to cloud
|
|
414
|
-
lsh
|
|
416
|
+
lsh push --env prod
|
|
415
417
|
|
|
416
418
|
# Notify team
|
|
417
419
|
echo "API keys rotated at $(date)" | mail -s "Key Rotation" team@company.com
|
|
@@ -430,18 +432,18 @@ lsh lib cron add --name "rotate-keys" \
|
|
|
430
432
|
**Solution:**
|
|
431
433
|
```bash
|
|
432
434
|
# Push from local dev
|
|
433
|
-
lsh
|
|
435
|
+
lsh push --file .env.development --env dev
|
|
434
436
|
|
|
435
437
|
# Push staging config
|
|
436
|
-
lsh
|
|
438
|
+
lsh push --file .env.staging --env staging
|
|
437
439
|
|
|
438
440
|
# Push production config (from secure machine only)
|
|
439
|
-
lsh
|
|
441
|
+
lsh push --file .env.production --env prod
|
|
440
442
|
|
|
441
443
|
# CI/CD pulls the right one
|
|
442
444
|
# In .github/workflows/deploy.yml:
|
|
443
445
|
- name: Get secrets
|
|
444
|
-
run: lsh
|
|
446
|
+
run: lsh pull --env ${{ github.ref == 'refs/heads/main' && 'prod' || 'staging' }}
|
|
445
447
|
```
|
|
446
448
|
|
|
447
449
|
## Comparison with Other Tools
|
|
@@ -504,7 +506,7 @@ LSH_ALLOW_DANGEROUS_COMMANDS=false # Keep false in production
|
|
|
504
506
|
|
|
505
507
|
```bash
|
|
506
508
|
# Encryption key for secrets
|
|
507
|
-
lsh
|
|
509
|
+
lsh key
|
|
508
510
|
|
|
509
511
|
# API key for HTTP API
|
|
510
512
|
openssl rand -hex 32
|
|
@@ -561,10 +563,10 @@ lsh --version
|
|
|
561
563
|
|
|
562
564
|
```bash
|
|
563
565
|
# Check stored environments
|
|
564
|
-
lsh
|
|
566
|
+
lsh list
|
|
565
567
|
|
|
566
568
|
# Push if missing
|
|
567
|
-
lsh
|
|
569
|
+
lsh push --env dev
|
|
568
570
|
```
|
|
569
571
|
|
|
570
572
|
### "Decryption failed"
|
|
@@ -574,8 +576,8 @@ lsh lib secrets push --env dev
|
|
|
574
576
|
# Make sure LSH_SECRETS_KEY matches the one used to encrypt
|
|
575
577
|
|
|
576
578
|
# Generate new key and re-push
|
|
577
|
-
lsh
|
|
578
|
-
lsh
|
|
579
|
+
lsh key
|
|
580
|
+
lsh push
|
|
579
581
|
```
|
|
580
582
|
|
|
581
583
|
### "Supabase not configured"
|
|
@@ -675,7 +677,7 @@ See API endpoints documentation in the Advanced Features section.
|
|
|
675
677
|
|
|
676
678
|
## Roadmap
|
|
677
679
|
|
|
678
|
-
- [ ] CLI command shortcuts (`lsh push` instead of `lsh
|
|
680
|
+
- [ ] CLI command shortcuts (`lsh push` instead of `lsh push`)
|
|
679
681
|
- [ ] Built-in secret rotation templates (AWS, GCP, Azure)
|
|
680
682
|
- [ ] Web dashboard for team secret management
|
|
681
683
|
- [ ] Audit logging for secret access
|
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)');
|
|
@@ -86,9 +85,9 @@ program
|
|
|
86
85
|
console.log(' status Get detailed secrets status');
|
|
87
86
|
console.log('');
|
|
88
87
|
console.log('🔄 Automation (Schedule secret rotation):');
|
|
89
|
-
console.log('
|
|
90
|
-
console.log('
|
|
91
|
-
console.log('
|
|
88
|
+
console.log(' cron add Schedule automatic tasks');
|
|
89
|
+
console.log(' cron list List scheduled jobs');
|
|
90
|
+
console.log(' daemon start Start persistent daemon');
|
|
92
91
|
console.log('');
|
|
93
92
|
console.log('🚀 Quick Start:');
|
|
94
93
|
console.log(' lsh key # Generate encryption key');
|
|
@@ -96,10 +95,10 @@ program
|
|
|
96
95
|
console.log(' lsh pull --env dev # Pull on another machine');
|
|
97
96
|
console.log('');
|
|
98
97
|
console.log('📚 More Commands:');
|
|
99
|
-
console.log('
|
|
100
|
-
console.log('
|
|
101
|
-
console.log('
|
|
102
|
-
console.log('
|
|
98
|
+
console.log(' api API server management');
|
|
99
|
+
console.log(' supabase Supabase database management');
|
|
100
|
+
console.log(' daemon Daemon management');
|
|
101
|
+
console.log(' cron Cron job management');
|
|
103
102
|
console.log(' self Self-management commands');
|
|
104
103
|
console.log(' self zsh ZSH compatibility commands');
|
|
105
104
|
console.log(' -i, --interactive Start interactive shell');
|
|
@@ -218,9 +217,13 @@ function findSimilarCommands(input, validCommands) {
|
|
|
218
217
|
(async () => {
|
|
219
218
|
// REPL interactive shell
|
|
220
219
|
await init_ishell(program);
|
|
221
|
-
//
|
|
220
|
+
// Flatten all service commands to top-level (no more 'lib' parent)
|
|
221
|
+
await init_supabase(program);
|
|
222
|
+
await init_daemon(program);
|
|
223
|
+
await init_cron(program);
|
|
224
|
+
registerApiCommands(program);
|
|
225
|
+
// Legacy 'lib' command group with deprecation warnings
|
|
222
226
|
const libCommand = await init_lib(program);
|
|
223
|
-
// Nest service commands under lib
|
|
224
227
|
await init_supabase(libCommand);
|
|
225
228
|
await init_daemon(libCommand);
|
|
226
229
|
await init_cron(libCommand);
|
|
@@ -597,13 +600,13 @@ function showDetailedHelp() {
|
|
|
597
600
|
console.log(' self zsh ZSH compatibility commands');
|
|
598
601
|
console.log(' self zsh-import Import ZSH configs (aliases, functions, exports)');
|
|
599
602
|
console.log('');
|
|
600
|
-
console.log('
|
|
601
|
-
console.log('
|
|
602
|
-
console.log('
|
|
603
|
-
console.log('
|
|
604
|
-
console.log('
|
|
605
|
-
console.log('
|
|
606
|
-
console.log('
|
|
603
|
+
console.log('Service Commands:');
|
|
604
|
+
console.log(' api API server management');
|
|
605
|
+
console.log(' supabase Supabase database management');
|
|
606
|
+
console.log(' daemon Daemon management');
|
|
607
|
+
console.log(' daemon job Job management');
|
|
608
|
+
console.log(' daemon db Database integration');
|
|
609
|
+
console.log(' cron Cron job management');
|
|
607
610
|
console.log('');
|
|
608
611
|
console.log('Examples:');
|
|
609
612
|
console.log('');
|
|
@@ -633,13 +636,13 @@ function showDetailedHelp() {
|
|
|
633
636
|
console.log(' lsh secrets pull # Pull secrets from cloud');
|
|
634
637
|
console.log(' lsh secrets list # List environments');
|
|
635
638
|
console.log('');
|
|
636
|
-
console.log('
|
|
637
|
-
console.log(' lsh
|
|
638
|
-
console.log(' lsh
|
|
639
|
-
console.log(' lsh
|
|
640
|
-
console.log(' lsh
|
|
641
|
-
console.log(' lsh
|
|
642
|
-
console.log(' lsh
|
|
639
|
+
console.log(' Service Operations:');
|
|
640
|
+
console.log(' lsh daemon start # Start daemon');
|
|
641
|
+
console.log(' lsh daemon status # Check daemon status');
|
|
642
|
+
console.log(' lsh daemon job list # List all jobs');
|
|
643
|
+
console.log(' lsh cron list # List cron jobs');
|
|
644
|
+
console.log(' lsh api start # Start API server');
|
|
645
|
+
console.log(' lsh api key # Generate API key');
|
|
643
646
|
console.log('');
|
|
644
647
|
console.log('Features:');
|
|
645
648
|
console.log(' ✅ POSIX Shell Compliance (85-95%)');
|
package/dist/lib/job-manager.js
CHANGED
|
@@ -462,8 +462,8 @@ export class SecretsManager {
|
|
|
462
462
|
return true;
|
|
463
463
|
}
|
|
464
464
|
catch (error) {
|
|
465
|
-
const
|
|
466
|
-
logger.error(`Failed to save encryption key: ${
|
|
465
|
+
const _err = error;
|
|
466
|
+
logger.error(`Failed to save encryption key: ${_err.message}`);
|
|
467
467
|
logger.info('Please set it manually:');
|
|
468
468
|
logger.info(`export LSH_SECRETS_KEY=${key}`);
|
|
469
469
|
return false;
|
|
@@ -499,8 +499,8 @@ LSH_SECRETS_KEY=${this.encryptionKey}
|
|
|
499
499
|
return true;
|
|
500
500
|
}
|
|
501
501
|
catch (error) {
|
|
502
|
-
const
|
|
503
|
-
logger.error(`Failed to create ${envFilePath}: ${
|
|
502
|
+
const _err = error;
|
|
503
|
+
logger.error(`Failed to create ${envFilePath}: ${_err.message}`);
|
|
504
504
|
return false;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
@@ -517,8 +517,8 @@ LSH_SECRETS_KEY=${this.encryptionKey}
|
|
|
517
517
|
return true;
|
|
518
518
|
}
|
|
519
519
|
catch (error) {
|
|
520
|
-
const
|
|
521
|
-
logger.error(`Failed to create ${envFilePath}: ${
|
|
520
|
+
const _err = error;
|
|
521
|
+
logger.error(`Failed to create ${envFilePath}: ${_err.message}`);
|
|
522
522
|
return false;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
@@ -330,7 +330,6 @@ export class ZshCompatibility {
|
|
|
330
330
|
/**
|
|
331
331
|
* Generate completions based on patterns
|
|
332
332
|
*/
|
|
333
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
334
333
|
async generateCompletions(context, patterns) {
|
|
335
334
|
const completions = [];
|
|
336
335
|
for (const pattern of patterns) {
|
|
@@ -170,10 +170,11 @@ export class MCLIBridge extends EventEmitter {
|
|
|
170
170
|
await this.jobTracker.completeExecution(execution.id, result, metrics, artifacts);
|
|
171
171
|
break;
|
|
172
172
|
case 'failed':
|
|
173
|
-
case 'error':
|
|
173
|
+
case 'error': {
|
|
174
174
|
const errorObj = error;
|
|
175
175
|
await this.jobTracker.failExecution(execution.id, errorObj?.message || 'Job failed in MCLI', error);
|
|
176
176
|
break;
|
|
177
|
+
}
|
|
177
178
|
case 'cancelled':
|
|
178
179
|
await this.jobTracker.updateJobStatus(pipelineJobId, JobStatus.CANCELLED);
|
|
179
180
|
break;
|
package/dist/services/lib/lib.js
CHANGED
|
@@ -68,7 +68,7 @@ async function _makeCommand(commander) {
|
|
|
68
68
|
export async function init_lib(program) {
|
|
69
69
|
const lib = program
|
|
70
70
|
.command("lib")
|
|
71
|
-
.description("
|
|
71
|
+
.description("⚠️ DEPRECATED: Use top-level commands instead (daemon, cron, api, supabase)");
|
|
72
72
|
// Load and register dynamic commands
|
|
73
73
|
const commands = await loadCommands();
|
|
74
74
|
for (const commandName of Object.keys(commands)) {
|
|
@@ -80,6 +80,16 @@ export async function init_lib(program) {
|
|
|
80
80
|
.description("commandName")
|
|
81
81
|
.usage(`${commandName} used as follows:`);
|
|
82
82
|
}
|
|
83
|
+
// Show deprecation warning when 'lib' is used
|
|
84
|
+
lib.hook('preAction', (_thisCommand, _actionCommand) => {
|
|
85
|
+
console.warn('\x1b[33m⚠️ WARNING: "lsh lib" commands are deprecated as of v1.0.0\x1b[0m');
|
|
86
|
+
console.warn('\x1b[33m Use top-level commands instead:\x1b[0m');
|
|
87
|
+
console.warn('\x1b[33m - lsh daemon (instead of lsh lib daemon)\x1b[0m');
|
|
88
|
+
console.warn('\x1b[33m - lsh cron (instead of lsh lib cron)\x1b[0m');
|
|
89
|
+
console.warn('\x1b[33m - lsh api (instead of lsh lib api)\x1b[0m');
|
|
90
|
+
console.warn('\x1b[33m - lsh supabase (instead of lsh lib supabase)\x1b[0m');
|
|
91
|
+
console.warn('');
|
|
92
|
+
});
|
|
83
93
|
// Optional: Enhance the 'lib' command group with additional descriptions and error handling
|
|
84
94
|
lib
|
|
85
95
|
.showHelpAfterError("Command not recognized, here's some help.")
|
|
@@ -150,22 +150,6 @@ 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')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lsh-framework",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
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": {
|