@hyperdrive.bot/cli 1.0.8 → 1.0.9
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 +69 -63
- package/dist/commands/auth/logout.d.ts +11 -0
- package/dist/commands/auth/logout.js +86 -9
- package/dist/commands/jira/status.js +11 -2
- package/dist/commands/project/sync.js +22 -4
- package/dist/services/tenant-service.d.ts +12 -0
- package/dist/services/tenant-service.js +44 -1
- package/oclif.manifest.json +15 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @hyperdrive.bot/cli
|
|
|
20
20
|
$ hd COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ hd (--version)
|
|
23
|
-
@hyperdrive.bot/cli/1.0.
|
|
23
|
+
@hyperdrive.bot/cli/1.0.9 linux-x64 node-v22.22.0
|
|
24
24
|
$ hd --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hd COMMAND
|
|
@@ -126,7 +126,7 @@ EXAMPLES
|
|
|
126
126
|
$ hd account add # Interactive mode
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
_See code: [src/commands/account/add.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
129
|
+
_See code: [src/commands/account/add.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/account/add.ts)_
|
|
130
130
|
|
|
131
131
|
## `hd account list`
|
|
132
132
|
|
|
@@ -146,7 +146,7 @@ EXAMPLES
|
|
|
146
146
|
$ hd account list
|
|
147
147
|
```
|
|
148
148
|
|
|
149
|
-
_See code: [src/commands/account/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
149
|
+
_See code: [src/commands/account/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/account/list.ts)_
|
|
150
150
|
|
|
151
151
|
## `hd account remove`
|
|
152
152
|
|
|
@@ -170,7 +170,7 @@ EXAMPLES
|
|
|
170
170
|
$ hd account remove --accountId 123456789012 --force
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
_See code: [src/commands/account/remove.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
173
|
+
_See code: [src/commands/account/remove.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/account/remove.ts)_
|
|
174
174
|
|
|
175
175
|
## `hd auth login`
|
|
176
176
|
|
|
@@ -198,24 +198,30 @@ EXAMPLES
|
|
|
198
198
|
$ hd auth login --ci --domain acme.hyperdrive.bot
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
_See code: [src/commands/auth/login.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
201
|
+
_See code: [src/commands/auth/login.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/auth/login.ts)_
|
|
202
202
|
|
|
203
203
|
## `hd auth logout`
|
|
204
204
|
|
|
205
|
-
Remove stored credentials and logout
|
|
205
|
+
Remove stored credentials and logout. Use --domain to logout from a single domain. Without flags, removes all credentials and stored configuration.
|
|
206
206
|
|
|
207
207
|
```
|
|
208
208
|
USAGE
|
|
209
|
-
$ hd auth logout
|
|
209
|
+
$ hd auth logout [-d <value>]
|
|
210
|
+
|
|
211
|
+
FLAGS
|
|
212
|
+
-d, --domain=<value> Logout from a specific domain only (keeps other domains and config intact)
|
|
210
213
|
|
|
211
214
|
DESCRIPTION
|
|
212
|
-
Remove stored credentials and logout
|
|
215
|
+
Remove stored credentials and logout. Use --domain to logout from a single domain. Without flags, removes all
|
|
216
|
+
credentials and stored configuration.
|
|
213
217
|
|
|
214
218
|
EXAMPLES
|
|
215
219
|
$ hd auth logout
|
|
220
|
+
|
|
221
|
+
$ hd auth logout --domain acme.hyperdrive.bot
|
|
216
222
|
```
|
|
217
223
|
|
|
218
|
-
_See code: [src/commands/auth/logout.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
224
|
+
_See code: [src/commands/auth/logout.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/auth/logout.ts)_
|
|
219
225
|
|
|
220
226
|
## `hd auth refresh`
|
|
221
227
|
|
|
@@ -232,7 +238,7 @@ EXAMPLES
|
|
|
232
238
|
$ hd auth refresh
|
|
233
239
|
```
|
|
234
240
|
|
|
235
|
-
_See code: [src/commands/auth/refresh.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
241
|
+
_See code: [src/commands/auth/refresh.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/auth/refresh.ts)_
|
|
236
242
|
|
|
237
243
|
## `hd auth status`
|
|
238
244
|
|
|
@@ -249,7 +255,7 @@ EXAMPLES
|
|
|
249
255
|
$ hd auth status
|
|
250
256
|
```
|
|
251
257
|
|
|
252
|
-
_See code: [src/commands/auth/status.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
258
|
+
_See code: [src/commands/auth/status.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/auth/status.ts)_
|
|
253
259
|
|
|
254
260
|
## `hd ci account create`
|
|
255
261
|
|
|
@@ -280,7 +286,7 @@ EXAMPLES
|
|
|
280
286
|
$ hd ci account create --name="gitlab-staging" --scope=deploy --scope=parameter:read
|
|
281
287
|
```
|
|
282
288
|
|
|
283
|
-
_See code: [src/commands/ci/account/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
289
|
+
_See code: [src/commands/ci/account/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/ci/account/create.ts)_
|
|
284
290
|
|
|
285
291
|
## `hd ci account delete [ACCOUNTID]`
|
|
286
292
|
|
|
@@ -306,7 +312,7 @@ EXAMPLES
|
|
|
306
312
|
$ hd ci account delete <account-id> --force
|
|
307
313
|
```
|
|
308
314
|
|
|
309
|
-
_See code: [src/commands/ci/account/delete.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
315
|
+
_See code: [src/commands/ci/account/delete.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/ci/account/delete.ts)_
|
|
310
316
|
|
|
311
317
|
## `hd ci account list`
|
|
312
318
|
|
|
@@ -329,7 +335,7 @@ EXAMPLES
|
|
|
329
335
|
$ hd ci account list --json
|
|
330
336
|
```
|
|
331
337
|
|
|
332
|
-
_See code: [src/commands/ci/account/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
338
|
+
_See code: [src/commands/ci/account/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/ci/account/list.ts)_
|
|
333
339
|
|
|
334
340
|
## `hd config get KEY`
|
|
335
341
|
|
|
@@ -351,7 +357,7 @@ EXAMPLES
|
|
|
351
357
|
$ hd config get bootstrap-url
|
|
352
358
|
```
|
|
353
359
|
|
|
354
|
-
_See code: [src/commands/config/get.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
360
|
+
_See code: [src/commands/config/get.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/config/get.ts)_
|
|
355
361
|
|
|
356
362
|
## `hd config set KEY VALUE`
|
|
357
363
|
|
|
@@ -378,7 +384,7 @@ EXAMPLES
|
|
|
378
384
|
$ hd config set region us-west-2
|
|
379
385
|
```
|
|
380
386
|
|
|
381
|
-
_See code: [src/commands/config/set.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
387
|
+
_See code: [src/commands/config/set.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/config/set.ts)_
|
|
382
388
|
|
|
383
389
|
## `hd config show`
|
|
384
390
|
|
|
@@ -395,7 +401,7 @@ EXAMPLES
|
|
|
395
401
|
$ hd config show
|
|
396
402
|
```
|
|
397
403
|
|
|
398
|
-
_See code: [src/commands/config/show.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
404
|
+
_See code: [src/commands/config/show.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/config/show.ts)_
|
|
399
405
|
|
|
400
406
|
## `hd deployment create`
|
|
401
407
|
|
|
@@ -410,7 +416,7 @@ FLAGS
|
|
|
410
416
|
-c, --commit=<value> (required) Commit hash
|
|
411
417
|
-d, --domain=<value> Tenant domain (for multi-domain setups)
|
|
412
418
|
-m, --moduleSlug=<value> (required) Module slug
|
|
413
|
-
-n, --name=<value> [default: Deployment-2026-02-08-
|
|
419
|
+
-n, --name=<value> [default: Deployment-2026-02-08-12-04-16] The name of the deployment
|
|
414
420
|
-r, --regions=<value>... [default: ] Regions for the deployment
|
|
415
421
|
-s, --stage=<value> (required) Stage for the deployment
|
|
416
422
|
-v, --verbose Show detailed build logs
|
|
@@ -429,7 +435,7 @@ EXAMPLES
|
|
|
429
435
|
$ hd deployment create --stage="dev" --commit="abc123" --verbose
|
|
430
436
|
```
|
|
431
437
|
|
|
432
|
-
_See code: [src/commands/deployment/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
438
|
+
_See code: [src/commands/deployment/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/deployment/create.ts)_
|
|
433
439
|
|
|
434
440
|
## `hd deployment get`
|
|
435
441
|
|
|
@@ -454,7 +460,7 @@ EXAMPLES
|
|
|
454
460
|
$ hd deployment get --name="prod-release-v1" --stage="prod"
|
|
455
461
|
```
|
|
456
462
|
|
|
457
|
-
_See code: [src/commands/deployment/get.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
463
|
+
_See code: [src/commands/deployment/get.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/deployment/get.ts)_
|
|
458
464
|
|
|
459
465
|
## `hd deployment launch`
|
|
460
466
|
|
|
@@ -481,7 +487,7 @@ EXAMPLES
|
|
|
481
487
|
$ hd deployment launch --name="prod-release" --stage="prod" --region="us-west-2"
|
|
482
488
|
```
|
|
483
489
|
|
|
484
|
-
_See code: [src/commands/deployment/launch.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
490
|
+
_See code: [src/commands/deployment/launch.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/deployment/launch.ts)_
|
|
485
491
|
|
|
486
492
|
## `hd deployment list`
|
|
487
493
|
|
|
@@ -505,7 +511,7 @@ EXAMPLES
|
|
|
505
511
|
$ hd deployment list --stage="prod" --moduleSlug="my-api"
|
|
506
512
|
```
|
|
507
513
|
|
|
508
|
-
_See code: [src/commands/deployment/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
514
|
+
_See code: [src/commands/deployment/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/deployment/list.ts)_
|
|
509
515
|
|
|
510
516
|
## `hd domain current`
|
|
511
517
|
|
|
@@ -522,7 +528,7 @@ EXAMPLES
|
|
|
522
528
|
$ hd domain current
|
|
523
529
|
```
|
|
524
530
|
|
|
525
|
-
_See code: [src/commands/domain/current.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
531
|
+
_See code: [src/commands/domain/current.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/domain/current.ts)_
|
|
526
532
|
|
|
527
533
|
## `hd domain list`
|
|
528
534
|
|
|
@@ -539,7 +545,7 @@ EXAMPLES
|
|
|
539
545
|
$ hd domain list
|
|
540
546
|
```
|
|
541
547
|
|
|
542
|
-
_See code: [src/commands/domain/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
548
|
+
_See code: [src/commands/domain/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/domain/list.ts)_
|
|
543
549
|
|
|
544
550
|
## `hd domain switch DOMAIN`
|
|
545
551
|
|
|
@@ -559,7 +565,7 @@ EXAMPLES
|
|
|
559
565
|
$ hd domain switch acme.hyperdrive.bot
|
|
560
566
|
```
|
|
561
567
|
|
|
562
|
-
_See code: [src/commands/domain/switch.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
568
|
+
_See code: [src/commands/domain/switch.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/domain/switch.ts)_
|
|
563
569
|
|
|
564
570
|
## `hd example [FILE]`
|
|
565
571
|
|
|
@@ -583,7 +589,7 @@ EXAMPLES
|
|
|
583
589
|
$ hd example
|
|
584
590
|
```
|
|
585
591
|
|
|
586
|
-
_See code: [src/commands/example.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
592
|
+
_See code: [src/commands/example.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/example.ts)_
|
|
587
593
|
|
|
588
594
|
## `hd git connect`
|
|
589
595
|
|
|
@@ -607,7 +613,7 @@ EXAMPLES
|
|
|
607
613
|
$ hd git connect --provider=gitlab
|
|
608
614
|
```
|
|
609
615
|
|
|
610
|
-
_See code: [src/commands/git/connect.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
616
|
+
_See code: [src/commands/git/connect.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/git/connect.ts)_
|
|
611
617
|
|
|
612
618
|
## `hd git disconnect`
|
|
613
619
|
|
|
@@ -632,7 +638,7 @@ EXAMPLES
|
|
|
632
638
|
$ hd git disconnect --provider=github --installation-id=12345
|
|
633
639
|
```
|
|
634
640
|
|
|
635
|
-
_See code: [src/commands/git/disconnect.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
641
|
+
_See code: [src/commands/git/disconnect.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/git/disconnect.ts)_
|
|
636
642
|
|
|
637
643
|
## `hd git list`
|
|
638
644
|
|
|
@@ -656,7 +662,7 @@ EXAMPLES
|
|
|
656
662
|
$ hd git list --provider=github
|
|
657
663
|
```
|
|
658
664
|
|
|
659
|
-
_See code: [src/commands/git/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
665
|
+
_See code: [src/commands/git/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/git/list.ts)_
|
|
660
666
|
|
|
661
667
|
## `hd git sync`
|
|
662
668
|
|
|
@@ -692,7 +698,7 @@ EXAMPLES
|
|
|
692
698
|
$ hd git sync --all --remote upstream --merge-strategy no-ff
|
|
693
699
|
```
|
|
694
700
|
|
|
695
|
-
_See code: [src/commands/git/sync.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
701
|
+
_See code: [src/commands/git/sync.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/git/sync.ts)_
|
|
696
702
|
|
|
697
703
|
## `hd help [COMMAND]`
|
|
698
704
|
|
|
@@ -729,7 +735,7 @@ EXAMPLES
|
|
|
729
735
|
$ hd init
|
|
730
736
|
```
|
|
731
737
|
|
|
732
|
-
_See code: [src/commands/init.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
738
|
+
_See code: [src/commands/init.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/init.ts)_
|
|
733
739
|
|
|
734
740
|
## `hd jira connect`
|
|
735
741
|
|
|
@@ -754,7 +760,7 @@ EXAMPLES
|
|
|
754
760
|
$ hd jira connect --domain sankhya.hyperdrivebot.dev --jira-domain dev-squad.atlassian.net
|
|
755
761
|
```
|
|
756
762
|
|
|
757
|
-
_See code: [src/commands/jira/connect.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
763
|
+
_See code: [src/commands/jira/connect.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/jira/connect.ts)_
|
|
758
764
|
|
|
759
765
|
## `hd jira hook add PROJECT`
|
|
760
766
|
|
|
@@ -785,7 +791,7 @@ EXAMPLES
|
|
|
785
791
|
$ hd jira hook add my-project --json
|
|
786
792
|
```
|
|
787
793
|
|
|
788
|
-
_See code: [src/commands/jira/hook/add.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
794
|
+
_See code: [src/commands/jira/hook/add.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/jira/hook/add.ts)_
|
|
789
795
|
|
|
790
796
|
## `hd jira hook list PROJECT`
|
|
791
797
|
|
|
@@ -811,7 +817,7 @@ EXAMPLES
|
|
|
811
817
|
$ hd jira hook list my-project --json
|
|
812
818
|
```
|
|
813
819
|
|
|
814
|
-
_See code: [src/commands/jira/hook/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
820
|
+
_See code: [src/commands/jira/hook/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/jira/hook/list.ts)_
|
|
815
821
|
|
|
816
822
|
## `hd jira hook remove PROJECT`
|
|
817
823
|
|
|
@@ -840,7 +846,7 @@ EXAMPLES
|
|
|
840
846
|
$ hd jira hook remove my-project --hook-id hook-123 --json
|
|
841
847
|
```
|
|
842
848
|
|
|
843
|
-
_See code: [src/commands/jira/hook/remove.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
849
|
+
_See code: [src/commands/jira/hook/remove.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/jira/hook/remove.ts)_
|
|
844
850
|
|
|
845
851
|
## `hd jira hook toggle PROJECT`
|
|
846
852
|
|
|
@@ -869,7 +875,7 @@ EXAMPLES
|
|
|
869
875
|
$ hd jira hook toggle my-project --hook-id hook-123 --json
|
|
870
876
|
```
|
|
871
877
|
|
|
872
|
-
_See code: [src/commands/jira/hook/toggle.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
878
|
+
_See code: [src/commands/jira/hook/toggle.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/jira/hook/toggle.ts)_
|
|
873
879
|
|
|
874
880
|
## `hd jira status`
|
|
875
881
|
|
|
@@ -889,7 +895,7 @@ EXAMPLES
|
|
|
889
895
|
$ hd jira status
|
|
890
896
|
```
|
|
891
897
|
|
|
892
|
-
_See code: [src/commands/jira/status.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
898
|
+
_See code: [src/commands/jira/status.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/jira/status.ts)_
|
|
893
899
|
|
|
894
900
|
## `hd module analyze`
|
|
895
901
|
|
|
@@ -917,7 +923,7 @@ EXAMPLES
|
|
|
917
923
|
$ hd module analyze --slug="my-module" --verbose
|
|
918
924
|
```
|
|
919
925
|
|
|
920
|
-
_See code: [src/commands/module/analyze.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
926
|
+
_See code: [src/commands/module/analyze.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/analyze.ts)_
|
|
921
927
|
|
|
922
928
|
## `hd module create`
|
|
923
929
|
|
|
@@ -969,7 +975,7 @@ EXAMPLES
|
|
|
969
975
|
$ hd module create --name="API Service" --framework="Serverless Framework"
|
|
970
976
|
```
|
|
971
977
|
|
|
972
|
-
_See code: [src/commands/module/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
978
|
+
_See code: [src/commands/module/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/create.ts)_
|
|
973
979
|
|
|
974
980
|
## `hd module destroy`
|
|
975
981
|
|
|
@@ -993,7 +999,7 @@ EXAMPLES
|
|
|
993
999
|
$ hd module destroy --slug="old-project" --force
|
|
994
1000
|
```
|
|
995
1001
|
|
|
996
|
-
_See code: [src/commands/module/destroy.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1002
|
+
_See code: [src/commands/module/destroy.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/destroy.ts)_
|
|
997
1003
|
|
|
998
1004
|
## `hd module get`
|
|
999
1005
|
|
|
@@ -1016,7 +1022,7 @@ EXAMPLES
|
|
|
1016
1022
|
$ hd module get
|
|
1017
1023
|
```
|
|
1018
1024
|
|
|
1019
|
-
_See code: [src/commands/module/get.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1025
|
+
_See code: [src/commands/module/get.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/get.ts)_
|
|
1020
1026
|
|
|
1021
1027
|
## `hd module link`
|
|
1022
1028
|
|
|
@@ -1039,7 +1045,7 @@ EXAMPLES
|
|
|
1039
1045
|
$ hd module link --originSlug="vixting-integration" --targetSlug="vixting-api" --parameter="VLOW_API_ENDPOINT_PREFIX"
|
|
1040
1046
|
```
|
|
1041
1047
|
|
|
1042
|
-
_See code: [src/commands/module/link.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1048
|
+
_See code: [src/commands/module/link.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/link.ts)_
|
|
1043
1049
|
|
|
1044
1050
|
## `hd module list`
|
|
1045
1051
|
|
|
@@ -1059,7 +1065,7 @@ EXAMPLES
|
|
|
1059
1065
|
$ hd module list
|
|
1060
1066
|
```
|
|
1061
1067
|
|
|
1062
|
-
_See code: [src/commands/module/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1068
|
+
_See code: [src/commands/module/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/list.ts)_
|
|
1063
1069
|
|
|
1064
1070
|
## `hd module reanalyze`
|
|
1065
1071
|
|
|
@@ -1088,7 +1094,7 @@ EXAMPLES
|
|
|
1088
1094
|
$ hd module reanalyze -s my-module -p "Exclude source maps from S3 upload" --verbose
|
|
1089
1095
|
```
|
|
1090
1096
|
|
|
1091
|
-
_See code: [src/commands/module/reanalyze.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1097
|
+
_See code: [src/commands/module/reanalyze.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/reanalyze.ts)_
|
|
1092
1098
|
|
|
1093
1099
|
## `hd module update`
|
|
1094
1100
|
|
|
@@ -1144,7 +1150,7 @@ EXAMPLES
|
|
|
1144
1150
|
$ hd module update --slug="my-module" --name="New Name" --framework="React.js"
|
|
1145
1151
|
```
|
|
1146
1152
|
|
|
1147
|
-
_See code: [src/commands/module/update.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1153
|
+
_See code: [src/commands/module/update.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/module/update.ts)_
|
|
1148
1154
|
|
|
1149
1155
|
## `hd parameter add`
|
|
1150
1156
|
|
|
@@ -1174,7 +1180,7 @@ EXAMPLES
|
|
|
1174
1180
|
$ hd parameter add --key="PORT" --value="3000"
|
|
1175
1181
|
```
|
|
1176
1182
|
|
|
1177
|
-
_See code: [src/commands/parameter/add.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1183
|
+
_See code: [src/commands/parameter/add.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/add.ts)_
|
|
1178
1184
|
|
|
1179
1185
|
## `hd parameter backfill`
|
|
1180
1186
|
|
|
@@ -1199,7 +1205,7 @@ EXAMPLES
|
|
|
1199
1205
|
$ hd parameter backfill --accountId="123456789012"
|
|
1200
1206
|
```
|
|
1201
1207
|
|
|
1202
|
-
_See code: [src/commands/parameter/backfill.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1208
|
+
_See code: [src/commands/parameter/backfill.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/backfill.ts)_
|
|
1203
1209
|
|
|
1204
1210
|
## `hd parameter clear`
|
|
1205
1211
|
|
|
@@ -1226,7 +1232,7 @@ EXAMPLES
|
|
|
1226
1232
|
$ hd parameter clear --stage="prod" --specific --force
|
|
1227
1233
|
```
|
|
1228
1234
|
|
|
1229
|
-
_See code: [src/commands/parameter/clear.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1235
|
+
_See code: [src/commands/parameter/clear.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/clear.ts)_
|
|
1230
1236
|
|
|
1231
1237
|
## `hd parameter list`
|
|
1232
1238
|
|
|
@@ -1255,7 +1261,7 @@ EXAMPLES
|
|
|
1255
1261
|
$ hd parameter list --all-stages
|
|
1256
1262
|
```
|
|
1257
1263
|
|
|
1258
|
-
_See code: [src/commands/parameter/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1264
|
+
_See code: [src/commands/parameter/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/list.ts)_
|
|
1259
1265
|
|
|
1260
1266
|
## `hd parameter pull`
|
|
1261
1267
|
|
|
@@ -1284,7 +1290,7 @@ EXAMPLES
|
|
|
1284
1290
|
$ hd parameter pull --stage="dev" --no-backup
|
|
1285
1291
|
```
|
|
1286
1292
|
|
|
1287
|
-
_See code: [src/commands/parameter/pull.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1293
|
+
_See code: [src/commands/parameter/pull.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/pull.ts)_
|
|
1288
1294
|
|
|
1289
1295
|
## `hd parameter remove`
|
|
1290
1296
|
|
|
@@ -1314,7 +1320,7 @@ EXAMPLES
|
|
|
1314
1320
|
$ hd parameter remove --key="PORT" --force
|
|
1315
1321
|
```
|
|
1316
1322
|
|
|
1317
|
-
_See code: [src/commands/parameter/remove.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1323
|
+
_See code: [src/commands/parameter/remove.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/remove.ts)_
|
|
1318
1324
|
|
|
1319
1325
|
## `hd parameter sync`
|
|
1320
1326
|
|
|
@@ -1343,7 +1349,7 @@ EXAMPLES
|
|
|
1343
1349
|
$ hd parameter sync --no-specific --stage="all"
|
|
1344
1350
|
```
|
|
1345
1351
|
|
|
1346
|
-
_See code: [src/commands/parameter/sync.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1352
|
+
_See code: [src/commands/parameter/sync.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/sync.ts)_
|
|
1347
1353
|
|
|
1348
1354
|
## `hd parameter update`
|
|
1349
1355
|
|
|
@@ -1371,7 +1377,7 @@ EXAMPLES
|
|
|
1371
1377
|
$ hd parameter update --key="DB_HOST" --value="new-host" --specific
|
|
1372
1378
|
```
|
|
1373
1379
|
|
|
1374
|
-
_See code: [src/commands/parameter/update.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1380
|
+
_See code: [src/commands/parameter/update.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/parameter/update.ts)_
|
|
1375
1381
|
|
|
1376
1382
|
## `hd plugins`
|
|
1377
1383
|
|
|
@@ -1691,7 +1697,7 @@ EXAMPLES
|
|
|
1691
1697
|
$ hd project init --json --name "My Project" --jira-key PROJ
|
|
1692
1698
|
```
|
|
1693
1699
|
|
|
1694
|
-
_See code: [src/commands/project/init.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1700
|
+
_See code: [src/commands/project/init.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/project/init.ts)_
|
|
1695
1701
|
|
|
1696
1702
|
## `hd project list`
|
|
1697
1703
|
|
|
@@ -1716,7 +1722,7 @@ EXAMPLES
|
|
|
1716
1722
|
$ hd project list --domain custom.hyperdrive.bot
|
|
1717
1723
|
```
|
|
1718
1724
|
|
|
1719
|
-
_See code: [src/commands/project/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1725
|
+
_See code: [src/commands/project/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/project/list.ts)_
|
|
1720
1726
|
|
|
1721
1727
|
## `hd project status PROJECT`
|
|
1722
1728
|
|
|
@@ -1744,7 +1750,7 @@ EXAMPLES
|
|
|
1744
1750
|
$ hd project status my-project --domain custom.hyperdrive.bot
|
|
1745
1751
|
```
|
|
1746
1752
|
|
|
1747
|
-
_See code: [src/commands/project/status.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1753
|
+
_See code: [src/commands/project/status.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/project/status.ts)_
|
|
1748
1754
|
|
|
1749
1755
|
## `hd project sync PROJECT`
|
|
1750
1756
|
|
|
@@ -1773,7 +1779,7 @@ EXAMPLES
|
|
|
1773
1779
|
$ hd project sync my-project --json
|
|
1774
1780
|
```
|
|
1775
1781
|
|
|
1776
|
-
_See code: [src/commands/project/sync.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1782
|
+
_See code: [src/commands/project/sync.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/project/sync.ts)_
|
|
1777
1783
|
|
|
1778
1784
|
## `hd stage access [STAGE]`
|
|
1779
1785
|
|
|
@@ -1802,7 +1808,7 @@ EXAMPLES
|
|
|
1802
1808
|
$ hd stage access develop --format json
|
|
1803
1809
|
```
|
|
1804
1810
|
|
|
1805
|
-
_See code: [src/commands/stage/access.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1811
|
+
_See code: [src/commands/stage/access.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/stage/access.ts)_
|
|
1806
1812
|
|
|
1807
1813
|
## `hd stage create`
|
|
1808
1814
|
|
|
@@ -1830,7 +1836,7 @@ DESCRIPTION
|
|
|
1830
1836
|
Create a new stage
|
|
1831
1837
|
```
|
|
1832
1838
|
|
|
1833
|
-
_See code: [src/commands/stage/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1839
|
+
_See code: [src/commands/stage/create.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/stage/create.ts)_
|
|
1834
1840
|
|
|
1835
1841
|
## `hd stage list`
|
|
1836
1842
|
|
|
@@ -1850,7 +1856,7 @@ EXAMPLES
|
|
|
1850
1856
|
$ hd stage list
|
|
1851
1857
|
```
|
|
1852
1858
|
|
|
1853
|
-
_See code: [src/commands/stage/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1859
|
+
_See code: [src/commands/stage/list.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/stage/list.ts)_
|
|
1854
1860
|
|
|
1855
1861
|
## `hd stage revoke [STAGE]`
|
|
1856
1862
|
|
|
@@ -1882,7 +1888,7 @@ EXAMPLES
|
|
|
1882
1888
|
$ hd stage revoke develop --ci github-actions
|
|
1883
1889
|
```
|
|
1884
1890
|
|
|
1885
|
-
_See code: [src/commands/stage/revoke.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1891
|
+
_See code: [src/commands/stage/revoke.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/stage/revoke.ts)_
|
|
1886
1892
|
|
|
1887
1893
|
## `hd stage share [STAGE]`
|
|
1888
1894
|
|
|
@@ -1922,7 +1928,7 @@ EXAMPLES
|
|
|
1922
1928
|
$ hd stage share staging production --user dev@company.com --role viewer
|
|
1923
1929
|
```
|
|
1924
1930
|
|
|
1925
|
-
_See code: [src/commands/stage/share.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1931
|
+
_See code: [src/commands/stage/share.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/stage/share.ts)_
|
|
1926
1932
|
|
|
1927
1933
|
## `hd test-api`
|
|
1928
1934
|
|
|
@@ -1942,5 +1948,5 @@ EXAMPLES
|
|
|
1942
1948
|
$ hd test-api
|
|
1943
1949
|
```
|
|
1944
1950
|
|
|
1945
|
-
_See code: [src/commands/test-api.ts](https://github.com/hyperdrive/hd/blob/v1.0.
|
|
1951
|
+
_See code: [src/commands/test-api.ts](https://github.com/hyperdrive/hd/blob/v1.0.9/src/commands/test-api.ts)_
|
|
1946
1952
|
<!-- commandsstop -->
|
|
@@ -2,5 +2,16 @@ import { Command } from '@oclif/core';
|
|
|
2
2
|
export default class Logout extends Command {
|
|
3
3
|
static description: string;
|
|
4
4
|
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
domain: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
};
|
|
5
8
|
run(): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Remove credentials for a specific domain
|
|
11
|
+
*/
|
|
12
|
+
private logoutDomain;
|
|
13
|
+
/**
|
|
14
|
+
* Remove default domain credentials and all stored config
|
|
15
|
+
*/
|
|
16
|
+
private logoutAll;
|
|
6
17
|
}
|
|
@@ -1,23 +1,48 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
1
|
+
import { Command, Flags } from '@oclif/core';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
import inquirer from 'inquirer';
|
|
4
4
|
import { AuthService } from '../../services/auth-service.js';
|
|
5
|
+
import { TenantService } from '../../services/tenant-service.js';
|
|
5
6
|
export default class Logout extends Command {
|
|
6
|
-
static description = 'Remove stored credentials and logout';
|
|
7
|
-
static examples = [
|
|
7
|
+
static description = 'Remove stored credentials and logout. Use --domain to logout from a single domain. Without flags, removes all credentials and stored configuration.';
|
|
8
|
+
static examples = [
|
|
9
|
+
'<%= config.bin %> <%= command.id %>',
|
|
10
|
+
'<%= config.bin %> <%= command.id %> --domain acme.hyperdrive.bot',
|
|
11
|
+
];
|
|
12
|
+
static flags = {
|
|
13
|
+
domain: Flags.string({
|
|
14
|
+
char: 'd',
|
|
15
|
+
description: 'Logout from a specific domain only (keeps other domains and config intact)',
|
|
16
|
+
}),
|
|
17
|
+
};
|
|
8
18
|
async run() {
|
|
9
|
-
const
|
|
10
|
-
|
|
19
|
+
const { flags } = await this.parse(Logout);
|
|
20
|
+
const tenantService = new TenantService();
|
|
21
|
+
if (flags.domain) {
|
|
22
|
+
await this.logoutDomain(flags.domain, tenantService);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
await this.logoutAll(tenantService);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Remove credentials for a specific domain
|
|
30
|
+
*/
|
|
31
|
+
async logoutDomain(domain, tenantService) {
|
|
32
|
+
const authService = new AuthService(domain);
|
|
11
33
|
const credentials = authService.loadCredentials();
|
|
12
34
|
if (!credentials) {
|
|
13
|
-
this.log(chalk.yellow(
|
|
35
|
+
this.log(chalk.yellow(`⚠️ No active session found for domain: ${domain}`));
|
|
36
|
+
const knownDomains = authService.getCredentialDomains();
|
|
37
|
+
if (knownDomains.length > 0) {
|
|
38
|
+
this.log(chalk.gray(` Logged-in domains: ${knownDomains.join(', ')}`));
|
|
39
|
+
}
|
|
14
40
|
return;
|
|
15
41
|
}
|
|
16
|
-
// Confirm logout
|
|
17
42
|
const { confirm } = await inquirer.prompt([
|
|
18
43
|
{
|
|
19
44
|
default: false,
|
|
20
|
-
message:
|
|
45
|
+
message: `Logout from ${chalk.cyan(domain)}?`,
|
|
21
46
|
name: 'confirm',
|
|
22
47
|
type: 'confirm',
|
|
23
48
|
},
|
|
@@ -28,8 +53,60 @@ export default class Logout extends Command {
|
|
|
28
53
|
}
|
|
29
54
|
try {
|
|
30
55
|
authService.clearCredentials();
|
|
56
|
+
tenantService.removeDomainConfig(domain);
|
|
57
|
+
// If this was the default domain, clear the default too
|
|
58
|
+
if (tenantService.getDefaultDomain() === domain) {
|
|
59
|
+
tenantService.clearDefaultDomain();
|
|
60
|
+
}
|
|
61
|
+
this.log('');
|
|
62
|
+
this.log(chalk.green(`✅ Successfully logged out from ${domain}`));
|
|
63
|
+
this.log(chalk.gray('Run `hd auth login` to authenticate again.'));
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.error(chalk.red(`Logout failed: ${error instanceof Error ? error.message : String(error)}`));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Remove default domain credentials and all stored config
|
|
71
|
+
*/
|
|
72
|
+
async logoutAll(tenantService) {
|
|
73
|
+
const authService = new AuthService();
|
|
74
|
+
const allDomains = authService.getCredentialDomains();
|
|
75
|
+
const defaultDomain = tenantService.getDefaultDomain();
|
|
76
|
+
if (allDomains.length === 0) {
|
|
77
|
+
this.log(chalk.yellow('⚠️ No active sessions found'));
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.log(chalk.blue('This will remove:'));
|
|
81
|
+
for (const domain of allDomains) {
|
|
82
|
+
const isDefault = domain === defaultDomain ? chalk.gray(' (default)') : '';
|
|
83
|
+
this.log(chalk.white(` • Credentials for ${chalk.cyan(domain)}${isDefault}`));
|
|
84
|
+
}
|
|
85
|
+
this.log(chalk.white(' • Default domain setting'));
|
|
86
|
+
this.log(chalk.white(` • CLI configuration ${chalk.gray('(~/.hyperdrive/config.json)')}`));
|
|
87
|
+
this.log('');
|
|
88
|
+
const { confirm } = await inquirer.prompt([
|
|
89
|
+
{
|
|
90
|
+
default: false,
|
|
91
|
+
message: `Logout from ${allDomains.length === 1 ? allDomains[0] : `all ${allDomains.length} domains`} and remove stored settings?`,
|
|
92
|
+
name: 'confirm',
|
|
93
|
+
type: 'confirm',
|
|
94
|
+
},
|
|
95
|
+
]);
|
|
96
|
+
if (!confirm) {
|
|
97
|
+
this.log(chalk.gray('Logout cancelled'));
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
try {
|
|
101
|
+
// Clear all credential files
|
|
102
|
+
for (const domain of allDomains) {
|
|
103
|
+
const domainAuth = new AuthService(domain);
|
|
104
|
+
domainAuth.clearCredentials();
|
|
105
|
+
}
|
|
106
|
+
// Clear all config
|
|
107
|
+
tenantService.clearAllConfig();
|
|
31
108
|
this.log('');
|
|
32
|
-
this.log(chalk.green('✅ Successfully logged out!'));
|
|
109
|
+
this.log(chalk.green('✅ Successfully logged out from all domains!'));
|
|
33
110
|
this.log(chalk.gray('Run `hd auth login` to authenticate again.'));
|
|
34
111
|
}
|
|
35
112
|
catch (error) {
|
|
@@ -67,8 +67,17 @@ export default class JiraStatus extends Command {
|
|
|
67
67
|
this.log(` Registered: ${chalk.dim(new Date(reg.registeredAt).toLocaleString())}`);
|
|
68
68
|
});
|
|
69
69
|
this.log('');
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
if (response.forgeInstallUrl) {
|
|
71
|
+
this.log(chalk.yellow('⚠️ Action Required: Install the Forge app on your Jira instance'));
|
|
72
|
+
this.log('');
|
|
73
|
+
this.log(chalk.bold(' Install Link:'));
|
|
74
|
+
this.log(` ${chalk.cyan.underline(response.forgeInstallUrl)}`);
|
|
75
|
+
this.log('');
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
this.log(chalk.yellow('⚠️ Action Required: Install the Forge app from the Atlassian Marketplace'));
|
|
79
|
+
this.log(chalk.dim(` Run: ${chalk.cyan('hd jira connect')} to see installation instructions`));
|
|
80
|
+
}
|
|
72
81
|
this.log('');
|
|
73
82
|
}
|
|
74
83
|
// No connections or registrations
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { Args, Command, Flags } from '@oclif/core';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
|
-
import {
|
|
9
|
+
import { execFileSync, spawn } from 'child_process';
|
|
10
10
|
import { existsSync, mkdtempSync, readdirSync, readFileSync, rmSync, statSync } from 'fs';
|
|
11
11
|
import yaml from 'js-yaml';
|
|
12
12
|
import ora from 'ora';
|
|
@@ -58,6 +58,8 @@ Required YAML schema:
|
|
|
58
58
|
${ARCHITECTURE_YAML_SCHEMA}
|
|
59
59
|
|
|
60
60
|
Now analyze the repository and produce the YAML summary.`;
|
|
61
|
+
const VALID_REPO_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
|
|
62
|
+
const MAX_BMAD_DOC_SIZE = 100 * 1024; // 100KB cap for _bmad docs (SEC-002 mitigation)
|
|
61
63
|
export default class ProjectSync extends Command {
|
|
62
64
|
static args = {
|
|
63
65
|
project: Args.string({
|
|
@@ -163,11 +165,14 @@ export default class ProjectSync extends Command {
|
|
|
163
165
|
const spinner = ora(`${prefix} ${chalk.cyan(repo.name)} — cloning...`).start();
|
|
164
166
|
let tmpDir = null;
|
|
165
167
|
try {
|
|
166
|
-
// Step 1:
|
|
168
|
+
// Step 1: Validate repo name and clone
|
|
169
|
+
if (!VALID_REPO_NAME_REGEX.test(repo.name)) {
|
|
170
|
+
throw new Error(`Invalid repo name "${repo.name}" — must match ${VALID_REPO_NAME_REGEX}`);
|
|
171
|
+
}
|
|
167
172
|
tmpDir = mkdtempSync(join(tmpdir(), `hd-sync-${repo.name}-`));
|
|
168
173
|
const clonePath = join(tmpDir, repo.name);
|
|
169
174
|
try {
|
|
170
|
-
|
|
175
|
+
execFileSync('git', ['clone', '--depth', '1', '--branch', repo.defaultBranch, repo.gitRemote, clonePath], {
|
|
171
176
|
stdio: 'pipe',
|
|
172
177
|
timeout: 120_000, // 2 min clone timeout
|
|
173
178
|
});
|
|
@@ -186,8 +191,12 @@ export default class ProjectSync extends Command {
|
|
|
186
191
|
try {
|
|
187
192
|
if (bmadDocPath) {
|
|
188
193
|
// Use _bmad doc with simpler restructure prompt
|
|
194
|
+
const docStat = statSync(bmadDocPath);
|
|
195
|
+
if (docStat.size > MAX_BMAD_DOC_SIZE) {
|
|
196
|
+
throw new Error(`_bmad doc exceeds ${MAX_BMAD_DOC_SIZE / 1024}KB size limit (${Math.round(docStat.size / 1024)}KB) — skipping to full analysis`);
|
|
197
|
+
}
|
|
189
198
|
const docContent = readFileSync(bmadDocPath, 'utf-8');
|
|
190
|
-
const prompt = `You are given an existing architecture documentation file. Convert it into the following YAML format. Output ONLY valid YAML, no markdown fences, no explanations.\n\nRequired YAML schema:\n${ARCHITECTURE_YAML_SCHEMA}\n\nHere is the architecture document to convert:\n\n${docContent}
|
|
199
|
+
const prompt = `You are given an existing architecture documentation file. Convert it into the following YAML format. Output ONLY valid YAML, no markdown fences, no explanations.\n\nRequired YAML schema:\n${ARCHITECTURE_YAML_SCHEMA}\n\nHere is the architecture document to convert:\n\n<architecture-doc>\n${docContent}\n</architecture-doc>`;
|
|
191
200
|
yamlOutput = await this.runClaude(prompt, clonePath);
|
|
192
201
|
}
|
|
193
202
|
else {
|
|
@@ -331,6 +340,15 @@ export default class ProjectSync extends Command {
|
|
|
331
340
|
if (!repo || typeof repo !== 'object' || !repo.name || !repo.description) {
|
|
332
341
|
throw new Error("'repo' must have 'name' and 'description' string fields");
|
|
333
342
|
}
|
|
343
|
+
if (!Array.isArray(parsed.domains)) {
|
|
344
|
+
throw new Error("'domains' must be an array");
|
|
345
|
+
}
|
|
346
|
+
if (!parsed.patterns || typeof parsed.patterns !== 'object') {
|
|
347
|
+
throw new Error("'patterns' must be an object");
|
|
348
|
+
}
|
|
349
|
+
if (!Array.isArray(parsed.modules)) {
|
|
350
|
+
throw new Error("'modules' must be an array");
|
|
351
|
+
}
|
|
334
352
|
if (!Array.isArray(parsed.entity_registry)) {
|
|
335
353
|
throw new Error("'entity_registry' must be an array");
|
|
336
354
|
}
|
|
@@ -67,6 +67,18 @@ export declare class TenantService {
|
|
|
67
67
|
* Save CLI configuration to file
|
|
68
68
|
*/
|
|
69
69
|
saveConfig(config: CLIConfig): void;
|
|
70
|
+
/**
|
|
71
|
+
* Clear the default domain file
|
|
72
|
+
*/
|
|
73
|
+
clearDefaultDomain(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Remove a specific domain from config.json domains map
|
|
76
|
+
*/
|
|
77
|
+
removeDomainConfig(domain: string): void;
|
|
78
|
+
/**
|
|
79
|
+
* Remove the entire config file and default-domain file
|
|
80
|
+
*/
|
|
81
|
+
clearAllConfig(): void;
|
|
70
82
|
/**
|
|
71
83
|
* Set default domain
|
|
72
84
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import chalk from 'chalk';
|
|
3
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
3
|
+
import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from 'fs';
|
|
4
4
|
import { homedir } from 'os';
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
/**
|
|
@@ -186,6 +186,49 @@ export class TenantService {
|
|
|
186
186
|
console.error(chalk.red('Failed to save configuration:'), error);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* Clear the default domain file
|
|
191
|
+
*/
|
|
192
|
+
clearDefaultDomain() {
|
|
193
|
+
try {
|
|
194
|
+
if (existsSync(this.defaultDomainPath)) {
|
|
195
|
+
unlinkSync(this.defaultDomainPath);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
console.error(chalk.red('Failed to clear default domain:'), error);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Remove a specific domain from config.json domains map
|
|
204
|
+
*/
|
|
205
|
+
removeDomainConfig(domain) {
|
|
206
|
+
const config = this.loadConfigFile();
|
|
207
|
+
if (!config)
|
|
208
|
+
return;
|
|
209
|
+
if (config.domains?.[domain]) {
|
|
210
|
+
delete config.domains[domain];
|
|
211
|
+
}
|
|
212
|
+
// If this was the legacy tenantDomain, clear it too
|
|
213
|
+
if (config.tenantDomain === domain) {
|
|
214
|
+
delete config.tenantDomain;
|
|
215
|
+
}
|
|
216
|
+
this.saveConfig(config);
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Remove the entire config file and default-domain file
|
|
220
|
+
*/
|
|
221
|
+
clearAllConfig() {
|
|
222
|
+
try {
|
|
223
|
+
if (existsSync(this.configPath)) {
|
|
224
|
+
unlinkSync(this.configPath);
|
|
225
|
+
}
|
|
226
|
+
this.clearDefaultDomain();
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
console.error(chalk.red('Failed to clear config:'), error);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
189
232
|
/**
|
|
190
233
|
* Set default domain
|
|
191
234
|
*/
|
package/oclif.manifest.json
CHANGED
|
@@ -316,11 +316,21 @@
|
|
|
316
316
|
"auth:logout": {
|
|
317
317
|
"aliases": [],
|
|
318
318
|
"args": {},
|
|
319
|
-
"description": "Remove stored credentials and logout",
|
|
319
|
+
"description": "Remove stored credentials and logout. Use --domain to logout from a single domain. Without flags, removes all credentials and stored configuration.",
|
|
320
320
|
"examples": [
|
|
321
|
-
"<%= config.bin %> <%= command.id %>"
|
|
321
|
+
"<%= config.bin %> <%= command.id %>",
|
|
322
|
+
"<%= config.bin %> <%= command.id %> --domain acme.hyperdrive.bot"
|
|
322
323
|
],
|
|
323
|
-
"flags": {
|
|
324
|
+
"flags": {
|
|
325
|
+
"domain": {
|
|
326
|
+
"char": "d",
|
|
327
|
+
"description": "Logout from a specific domain only (keeps other domains and config intact)",
|
|
328
|
+
"name": "domain",
|
|
329
|
+
"hasDynamicHelp": false,
|
|
330
|
+
"multiple": false,
|
|
331
|
+
"type": "option"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
324
334
|
"hasDynamicHelp": false,
|
|
325
335
|
"hiddenAliases": [],
|
|
326
336
|
"id": "auth:logout",
|
|
@@ -544,7 +554,7 @@
|
|
|
544
554
|
"description": "The name of the deployment",
|
|
545
555
|
"name": "name",
|
|
546
556
|
"required": false,
|
|
547
|
-
"default": "Deployment-2026-02-08-
|
|
557
|
+
"default": "Deployment-2026-02-08-12-04-16",
|
|
548
558
|
"hasDynamicHelp": false,
|
|
549
559
|
"multiple": false,
|
|
550
560
|
"type": "option"
|
|
@@ -3505,5 +3515,5 @@
|
|
|
3505
3515
|
]
|
|
3506
3516
|
}
|
|
3507
3517
|
},
|
|
3508
|
-
"version": "1.0.
|
|
3518
|
+
"version": "1.0.9"
|
|
3509
3519
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperdrive.bot/cli",
|
|
3
3
|
"description": "hyperdrive.bot is a command-line interface (CLI) tool designed for managing and deploying projects using the Hyperdrive API. The CLI acts as a proxy to the Hyperdrive API, enabling users to:",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.9",
|
|
5
5
|
"author": "marcelomarra",
|
|
6
6
|
"bin": {
|
|
7
7
|
"hd": "./bin/run.js",
|