hereya-cli 0.91.0 → 0.92.1
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
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g hereya-cli
|
|
|
21
21
|
$ hereya COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ hereya (--version)
|
|
24
|
-
hereya-cli/0.
|
|
24
|
+
hereya-cli/0.92.1 linux-x64 node-v24.14.1
|
|
25
25
|
$ hereya --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ hereya COMMAND
|
|
@@ -128,7 +128,7 @@ EXAMPLES
|
|
|
128
128
|
$ hereya add cloudy/docker_postgres
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
131
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/add/index.ts)_
|
|
132
132
|
|
|
133
133
|
## `hereya app deploy NAME`
|
|
134
134
|
|
|
@@ -162,7 +162,7 @@ EXAMPLES
|
|
|
162
162
|
$ hereya app deploy my-org/my-app -w prod -p organizationId=org-123
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
_See code: [src/commands/app/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
165
|
+
_See code: [src/commands/app/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/app/deploy/index.ts)_
|
|
166
166
|
|
|
167
167
|
## `hereya app deployments NAME`
|
|
168
168
|
|
|
@@ -182,7 +182,7 @@ EXAMPLES
|
|
|
182
182
|
$ hereya app deployments my-org/my-app
|
|
183
183
|
```
|
|
184
184
|
|
|
185
|
-
_See code: [src/commands/app/deployments/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
185
|
+
_See code: [src/commands/app/deployments/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/app/deployments/index.ts)_
|
|
186
186
|
|
|
187
187
|
## `hereya app destroy NAME`
|
|
188
188
|
|
|
@@ -211,7 +211,7 @@ EXAMPLES
|
|
|
211
211
|
$ hereya app destroy my-org/my-app -w my-workspace
|
|
212
212
|
```
|
|
213
213
|
|
|
214
|
-
_See code: [src/commands/app/destroy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
214
|
+
_See code: [src/commands/app/destroy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/app/destroy/index.ts)_
|
|
215
215
|
|
|
216
216
|
## `hereya app env NAME [KEY]`
|
|
217
217
|
|
|
@@ -237,7 +237,7 @@ EXAMPLES
|
|
|
237
237
|
$ hereya app env my-org/my-app -w my-workspace DATABASE_URL
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
-
_See code: [src/commands/app/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
240
|
+
_See code: [src/commands/app/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/app/env/index.ts)_
|
|
241
241
|
|
|
242
242
|
## `hereya app list`
|
|
243
243
|
|
|
@@ -254,7 +254,7 @@ EXAMPLES
|
|
|
254
254
|
$ hereya app list
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
-
_See code: [src/commands/app/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
257
|
+
_See code: [src/commands/app/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/app/list/index.ts)_
|
|
258
258
|
|
|
259
259
|
## `hereya app new DIRNAME`
|
|
260
260
|
|
|
@@ -280,7 +280,7 @@ EXAMPLES
|
|
|
280
280
|
$ hereya app new ./my-app -n my-org/my-app --description "An ai-app-builder app"
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
-
_See code: [src/commands/app/new/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
283
|
+
_See code: [src/commands/app/new/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/app/new/index.ts)_
|
|
284
284
|
|
|
285
285
|
## `hereya app status NAME`
|
|
286
286
|
|
|
@@ -303,7 +303,7 @@ EXAMPLES
|
|
|
303
303
|
$ hereya app status my-org/my-app -w my-workspace
|
|
304
304
|
```
|
|
305
305
|
|
|
306
|
-
_See code: [src/commands/app/status/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
306
|
+
_See code: [src/commands/app/status/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/app/status/index.ts)_
|
|
307
307
|
|
|
308
308
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
309
309
|
|
|
@@ -328,7 +328,7 @@ EXAMPLES
|
|
|
328
328
|
$ hereya bootstrap local
|
|
329
329
|
```
|
|
330
330
|
|
|
331
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
331
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/bootstrap/index.ts)_
|
|
332
332
|
|
|
333
333
|
## `hereya clone PROJECT`
|
|
334
334
|
|
|
@@ -353,7 +353,7 @@ EXAMPLES
|
|
|
353
353
|
$ hereya clone myProject --chdir=./myProject
|
|
354
354
|
```
|
|
355
355
|
|
|
356
|
-
_See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
356
|
+
_See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/clone/index.ts)_
|
|
357
357
|
|
|
358
358
|
## `hereya config export-backend [FILE]`
|
|
359
359
|
|
|
@@ -375,7 +375,7 @@ EXAMPLES
|
|
|
375
375
|
$ hereya config export-backend ./path/to/export.json
|
|
376
376
|
```
|
|
377
377
|
|
|
378
|
-
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
378
|
+
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/config/export-backend/index.ts)_
|
|
379
379
|
|
|
380
380
|
## `hereya config get-backend`
|
|
381
381
|
|
|
@@ -392,7 +392,7 @@ EXAMPLES
|
|
|
392
392
|
$ hereya config get-backend
|
|
393
393
|
```
|
|
394
394
|
|
|
395
|
-
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
395
|
+
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/config/get-backend/index.ts)_
|
|
396
396
|
|
|
397
397
|
## `hereya config import-backend FILE`
|
|
398
398
|
|
|
@@ -412,7 +412,7 @@ EXAMPLES
|
|
|
412
412
|
$ hereya config import-backend ./path/to/cloud-backend.json
|
|
413
413
|
```
|
|
414
414
|
|
|
415
|
-
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
415
|
+
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/config/import-backend/index.ts)_
|
|
416
416
|
|
|
417
417
|
## `hereya config use-backend TYPE`
|
|
418
418
|
|
|
@@ -434,7 +434,7 @@ EXAMPLES
|
|
|
434
434
|
$ hereya config use-backend local
|
|
435
435
|
```
|
|
436
436
|
|
|
437
|
-
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
437
|
+
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/config/use-backend/index.ts)_
|
|
438
438
|
|
|
439
439
|
## `hereya delete-state`
|
|
440
440
|
|
|
@@ -460,7 +460,7 @@ EXAMPLES
|
|
|
460
460
|
$ hereya delete-state --workspace staging
|
|
461
461
|
```
|
|
462
462
|
|
|
463
|
-
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
463
|
+
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/delete-state/index.ts)_
|
|
464
464
|
|
|
465
465
|
## `hereya deploy`
|
|
466
466
|
|
|
@@ -486,7 +486,7 @@ EXAMPLES
|
|
|
486
486
|
$ hereya deploy
|
|
487
487
|
```
|
|
488
488
|
|
|
489
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
489
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/deploy/index.ts)_
|
|
490
490
|
|
|
491
491
|
## `hereya devenv config`
|
|
492
492
|
|
|
@@ -506,7 +506,7 @@ EXAMPLES
|
|
|
506
506
|
$ hereya devenv config -w my-workspace
|
|
507
507
|
```
|
|
508
508
|
|
|
509
|
-
_See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
509
|
+
_See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/devenv/config/index.ts)_
|
|
510
510
|
|
|
511
511
|
## `hereya devenv install`
|
|
512
512
|
|
|
@@ -531,7 +531,7 @@ EXAMPLES
|
|
|
531
531
|
$ hereya devenv install -w my-workspace -p instanceType=t3.large
|
|
532
532
|
```
|
|
533
533
|
|
|
534
|
-
_See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
534
|
+
_See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/devenv/install/index.ts)_
|
|
535
535
|
|
|
536
536
|
## `hereya devenv project init PROJECT`
|
|
537
537
|
|
|
@@ -563,7 +563,7 @@ EXAMPLES
|
|
|
563
563
|
$ hereya devenv project init my-app -w my-workspace -t acme/node-starter -p region=us-east-1
|
|
564
564
|
```
|
|
565
565
|
|
|
566
|
-
_See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
566
|
+
_See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/devenv/project/init/index.ts)_
|
|
567
567
|
|
|
568
568
|
## `hereya devenv project uninit PROJECT`
|
|
569
569
|
|
|
@@ -589,7 +589,7 @@ EXAMPLES
|
|
|
589
589
|
$ hereya devenv project uninit my-app -w my-workspace --force
|
|
590
590
|
```
|
|
591
591
|
|
|
592
|
-
_See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
592
|
+
_See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/devenv/project/uninit/index.ts)_
|
|
593
593
|
|
|
594
594
|
## `hereya devenv ssh`
|
|
595
595
|
|
|
@@ -609,7 +609,7 @@ EXAMPLES
|
|
|
609
609
|
$ hereya devenv ssh -w my-workspace
|
|
610
610
|
```
|
|
611
611
|
|
|
612
|
-
_See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
612
|
+
_See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/devenv/ssh/index.ts)_
|
|
613
613
|
|
|
614
614
|
## `hereya devenv uninstall`
|
|
615
615
|
|
|
@@ -630,7 +630,7 @@ EXAMPLES
|
|
|
630
630
|
$ hereya devenv uninstall -w my-workspace
|
|
631
631
|
```
|
|
632
632
|
|
|
633
|
-
_See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
633
|
+
_See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/devenv/uninstall/index.ts)_
|
|
634
634
|
|
|
635
635
|
## `hereya doc PACKAGE`
|
|
636
636
|
|
|
@@ -663,7 +663,7 @@ EXAMPLES
|
|
|
663
663
|
$ hereya doc my-package --no-doc
|
|
664
664
|
```
|
|
665
665
|
|
|
666
|
-
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
666
|
+
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/doc/index.ts)_
|
|
667
667
|
|
|
668
668
|
## `hereya docker run IMAGE`
|
|
669
669
|
|
|
@@ -694,7 +694,7 @@ EXAMPLES
|
|
|
694
694
|
$ hereya docker run myapp:latest -- --rm -v ./data:/data
|
|
695
695
|
```
|
|
696
696
|
|
|
697
|
-
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
697
|
+
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/docker/run/index.ts)_
|
|
698
698
|
|
|
699
699
|
## `hereya down`
|
|
700
700
|
|
|
@@ -721,7 +721,7 @@ EXAMPLES
|
|
|
721
721
|
$ hereya down
|
|
722
722
|
```
|
|
723
723
|
|
|
724
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
724
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/down/index.ts)_
|
|
725
725
|
|
|
726
726
|
## `hereya env [NAME]`
|
|
727
727
|
|
|
@@ -752,7 +752,7 @@ EXAMPLES
|
|
|
752
752
|
$ hereya env -w dev -l
|
|
753
753
|
```
|
|
754
754
|
|
|
755
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
755
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/env/index.ts)_
|
|
756
756
|
|
|
757
757
|
## `hereya env set [NAME]`
|
|
758
758
|
|
|
@@ -779,7 +779,7 @@ EXAMPLES
|
|
|
779
779
|
$ hereya env set FOO -v bar -w dev
|
|
780
780
|
```
|
|
781
781
|
|
|
782
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
782
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/env/set/index.ts)_
|
|
783
783
|
|
|
784
784
|
## `hereya executor start`
|
|
785
785
|
|
|
@@ -813,7 +813,7 @@ EXAMPLES
|
|
|
813
813
|
HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
|
|
814
814
|
```
|
|
815
815
|
|
|
816
|
-
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
816
|
+
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/executor/start/index.ts)_
|
|
817
817
|
|
|
818
818
|
## `hereya flow add PACKAGE`
|
|
819
819
|
|
|
@@ -851,7 +851,7 @@ EXAMPLES
|
|
|
851
851
|
$ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
|
|
852
852
|
```
|
|
853
853
|
|
|
854
|
-
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
854
|
+
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/add/index.ts)_
|
|
855
855
|
|
|
856
856
|
## `hereya flow docker run IMAGE`
|
|
857
857
|
|
|
@@ -881,7 +881,7 @@ EXAMPLES
|
|
|
881
881
|
$ hereya flow docker run --pin myapp:latest -- --rm
|
|
882
882
|
```
|
|
883
883
|
|
|
884
|
-
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
884
|
+
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/docker/run/index.ts)_
|
|
885
885
|
|
|
886
886
|
## `hereya flow down`
|
|
887
887
|
|
|
@@ -915,7 +915,7 @@ EXAMPLES
|
|
|
915
915
|
$ hereya flow down --pin
|
|
916
916
|
```
|
|
917
917
|
|
|
918
|
-
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
918
|
+
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/down/index.ts)_
|
|
919
919
|
|
|
920
920
|
## `hereya flow env [NAME]`
|
|
921
921
|
|
|
@@ -949,7 +949,7 @@ EXAMPLES
|
|
|
949
949
|
$ hereya flow env -l
|
|
950
950
|
```
|
|
951
951
|
|
|
952
|
-
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
952
|
+
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/env/index.ts)_
|
|
953
953
|
|
|
954
954
|
## `hereya flow provid PACKAGE`
|
|
955
955
|
|
|
@@ -978,7 +978,7 @@ EXAMPLES
|
|
|
978
978
|
$ hereya flow provid hereya/postgres --pin
|
|
979
979
|
```
|
|
980
980
|
|
|
981
|
-
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
981
|
+
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/provid/index.ts)_
|
|
982
982
|
|
|
983
983
|
## `hereya flow remove PACKAGE`
|
|
984
984
|
|
|
@@ -1008,7 +1008,7 @@ EXAMPLES
|
|
|
1008
1008
|
$ hereya flow remove cloudy/docker_postgres --profile staging
|
|
1009
1009
|
```
|
|
1010
1010
|
|
|
1011
|
-
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1011
|
+
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/remove/index.ts)_
|
|
1012
1012
|
|
|
1013
1013
|
## `hereya flow run CMD`
|
|
1014
1014
|
|
|
@@ -1037,7 +1037,7 @@ EXAMPLES
|
|
|
1037
1037
|
$ hereya flow run --pin -- npm test
|
|
1038
1038
|
```
|
|
1039
1039
|
|
|
1040
|
-
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1040
|
+
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/run/index.ts)_
|
|
1041
1041
|
|
|
1042
1042
|
## `hereya flow up`
|
|
1043
1043
|
|
|
@@ -1071,7 +1071,7 @@ EXAMPLES
|
|
|
1071
1071
|
$ hereya flow up --pin
|
|
1072
1072
|
```
|
|
1073
1073
|
|
|
1074
|
-
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1074
|
+
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/flow/up/index.ts)_
|
|
1075
1075
|
|
|
1076
1076
|
## `hereya help [COMMAND]`
|
|
1077
1077
|
|
|
@@ -1128,7 +1128,7 @@ EXAMPLES
|
|
|
1128
1128
|
$ hereya import org/my-package -f state.tfstate -w my-workspace
|
|
1129
1129
|
```
|
|
1130
1130
|
|
|
1131
|
-
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1131
|
+
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/import/index.ts)_
|
|
1132
1132
|
|
|
1133
1133
|
## `hereya import-repo PROJECT`
|
|
1134
1134
|
|
|
@@ -1158,7 +1158,7 @@ EXAMPLES
|
|
|
1158
1158
|
$ hereya import-repo myProject -w=dev -r=https://github.com/acme/api --clone --chdir=./api
|
|
1159
1159
|
```
|
|
1160
1160
|
|
|
1161
|
-
_See code: [src/commands/import-repo/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1161
|
+
_See code: [src/commands/import-repo/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/import-repo/index.ts)_
|
|
1162
1162
|
|
|
1163
1163
|
## `hereya init PROJECT`
|
|
1164
1164
|
|
|
@@ -1192,7 +1192,7 @@ EXAMPLES
|
|
|
1192
1192
|
$ hereya init myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1
|
|
1193
1193
|
```
|
|
1194
1194
|
|
|
1195
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1195
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/init/index.ts)_
|
|
1196
1196
|
|
|
1197
1197
|
## `hereya list`
|
|
1198
1198
|
|
|
@@ -1209,7 +1209,7 @@ EXAMPLES
|
|
|
1209
1209
|
$ hereya list
|
|
1210
1210
|
```
|
|
1211
1211
|
|
|
1212
|
-
_See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1212
|
+
_See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/list/index.ts)_
|
|
1213
1213
|
|
|
1214
1214
|
## `hereya login [URL]`
|
|
1215
1215
|
|
|
@@ -1238,7 +1238,7 @@ EXAMPLES
|
|
|
1238
1238
|
$ hereya login --token=your-token https://cloud.hereya.dev
|
|
1239
1239
|
```
|
|
1240
1240
|
|
|
1241
|
-
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1241
|
+
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/login/index.ts)_
|
|
1242
1242
|
|
|
1243
1243
|
## `hereya logout`
|
|
1244
1244
|
|
|
@@ -1255,7 +1255,7 @@ EXAMPLES
|
|
|
1255
1255
|
$ hereya logout
|
|
1256
1256
|
```
|
|
1257
1257
|
|
|
1258
|
-
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1258
|
+
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/logout/index.ts)_
|
|
1259
1259
|
|
|
1260
1260
|
## `hereya provid PACKAGE`
|
|
1261
1261
|
|
|
@@ -1283,7 +1283,7 @@ EXAMPLES
|
|
|
1283
1283
|
$ hereya provid hereya/postgres --workspace staging
|
|
1284
1284
|
```
|
|
1285
1285
|
|
|
1286
|
-
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1286
|
+
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/provid/index.ts)_
|
|
1287
1287
|
|
|
1288
1288
|
## `hereya publish`
|
|
1289
1289
|
|
|
@@ -1306,7 +1306,7 @@ EXAMPLES
|
|
|
1306
1306
|
$ hereya publish --chdir=/path/to/package
|
|
1307
1307
|
```
|
|
1308
1308
|
|
|
1309
|
-
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1309
|
+
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/publish/index.ts)_
|
|
1310
1310
|
|
|
1311
1311
|
## `hereya remove PACKAGE`
|
|
1312
1312
|
|
|
@@ -1334,7 +1334,7 @@ EXAMPLES
|
|
|
1334
1334
|
$ hereya remove cloudy/docker_postgres
|
|
1335
1335
|
```
|
|
1336
1336
|
|
|
1337
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1337
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/remove/index.ts)_
|
|
1338
1338
|
|
|
1339
1339
|
## `hereya run CMD`
|
|
1340
1340
|
|
|
@@ -1360,7 +1360,7 @@ EXAMPLES
|
|
|
1360
1360
|
$ hereya run -w uat -- node index.js
|
|
1361
1361
|
```
|
|
1362
1362
|
|
|
1363
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1363
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/run/index.ts)_
|
|
1364
1364
|
|
|
1365
1365
|
## `hereya search QUERY`
|
|
1366
1366
|
|
|
@@ -1391,7 +1391,7 @@ EXAMPLES
|
|
|
1391
1391
|
$ hereya search database --json
|
|
1392
1392
|
```
|
|
1393
1393
|
|
|
1394
|
-
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1394
|
+
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/search/index.ts)_
|
|
1395
1395
|
|
|
1396
1396
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
1397
1397
|
|
|
@@ -1416,7 +1416,7 @@ EXAMPLES
|
|
|
1416
1416
|
$ hereya unbootstrap local
|
|
1417
1417
|
```
|
|
1418
1418
|
|
|
1419
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1419
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/unbootstrap/index.ts)_
|
|
1420
1420
|
|
|
1421
1421
|
## `hereya undeploy`
|
|
1422
1422
|
|
|
@@ -1442,7 +1442,7 @@ EXAMPLES
|
|
|
1442
1442
|
$ hereya undeploy
|
|
1443
1443
|
```
|
|
1444
1444
|
|
|
1445
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1445
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/undeploy/index.ts)_
|
|
1446
1446
|
|
|
1447
1447
|
## `hereya uninit PROJECT`
|
|
1448
1448
|
|
|
@@ -1470,7 +1470,7 @@ EXAMPLES
|
|
|
1470
1470
|
$ hereya uninit myProject -w dev -p prodWorkspace=prod
|
|
1471
1471
|
```
|
|
1472
1472
|
|
|
1473
|
-
_See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1473
|
+
_See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/uninit/index.ts)_
|
|
1474
1474
|
|
|
1475
1475
|
## `hereya up`
|
|
1476
1476
|
|
|
@@ -1497,7 +1497,7 @@ EXAMPLES
|
|
|
1497
1497
|
$ hereya up
|
|
1498
1498
|
```
|
|
1499
1499
|
|
|
1500
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1500
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/up/index.ts)_
|
|
1501
1501
|
|
|
1502
1502
|
## `hereya update [VERSION]`
|
|
1503
1503
|
|
|
@@ -1519,7 +1519,7 @@ EXAMPLES
|
|
|
1519
1519
|
$ hereya update 0.75.0
|
|
1520
1520
|
```
|
|
1521
1521
|
|
|
1522
|
-
_See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1522
|
+
_See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/update/index.ts)_
|
|
1523
1523
|
|
|
1524
1524
|
## `hereya workspace create NAME`
|
|
1525
1525
|
|
|
@@ -1544,7 +1544,7 @@ EXAMPLES
|
|
|
1544
1544
|
$ hereya workspace create dev
|
|
1545
1545
|
```
|
|
1546
1546
|
|
|
1547
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1547
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/create/index.ts)_
|
|
1548
1548
|
|
|
1549
1549
|
## `hereya workspace delete NAME`
|
|
1550
1550
|
|
|
@@ -1564,7 +1564,7 @@ EXAMPLES
|
|
|
1564
1564
|
$ hereya workspace delete dev
|
|
1565
1565
|
```
|
|
1566
1566
|
|
|
1567
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1567
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/delete/index.ts)_
|
|
1568
1568
|
|
|
1569
1569
|
## `hereya workspace env [NAME]`
|
|
1570
1570
|
|
|
@@ -1590,7 +1590,7 @@ EXAMPLES
|
|
|
1590
1590
|
$ hereya workspace env myEnv -w dev
|
|
1591
1591
|
```
|
|
1592
1592
|
|
|
1593
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1593
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/env/index.ts)_
|
|
1594
1594
|
|
|
1595
1595
|
## `hereya workspace env set`
|
|
1596
1596
|
|
|
@@ -1614,7 +1614,7 @@ EXAMPLES
|
|
|
1614
1614
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
1615
1615
|
```
|
|
1616
1616
|
|
|
1617
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1617
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/env/set/index.ts)_
|
|
1618
1618
|
|
|
1619
1619
|
## `hereya workspace env unset`
|
|
1620
1620
|
|
|
@@ -1635,7 +1635,7 @@ EXAMPLES
|
|
|
1635
1635
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
1636
1636
|
```
|
|
1637
1637
|
|
|
1638
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1638
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/env/unset/index.ts)_
|
|
1639
1639
|
|
|
1640
1640
|
## `hereya workspace executor install`
|
|
1641
1641
|
|
|
@@ -1650,19 +1650,19 @@ FLAGS
|
|
|
1650
1650
|
-p, --parameter=<value>... parameter for the package, in the form of 'key=value'. Can be specified multiple times.
|
|
1651
1651
|
-w, --workspace=<value> (required) name of the workspace
|
|
1652
1652
|
--debug enable debug mode
|
|
1653
|
-
--mode=<option> [default:
|
|
1654
|
-
|
|
1653
|
+
--mode=<option> [default: always-on] executor mode: always-on (legacy long-lived EC2) or ephemeral (ASG
|
|
1654
|
+
min=0/max=1 with broker Lambda)
|
|
1655
1655
|
<options: ephemeral|always-on>
|
|
1656
1656
|
|
|
1657
1657
|
DESCRIPTION
|
|
1658
1658
|
Install a remote executor into a workspace.
|
|
1659
1659
|
|
|
1660
|
-
Two modes are supported:
|
|
1661
|
-
-
|
|
1662
|
-
-
|
|
1660
|
+
Provisions hereya/remote-executor-aws. Two modes are supported:
|
|
1661
|
+
- always-on (default): a long-lived EC2 polls hereya-cloud 24/7.
|
|
1662
|
+
- ephemeral: ASG scaled to 0 with a broker Lambda + OIDC for on-demand wake.
|
|
1663
1663
|
```
|
|
1664
1664
|
|
|
1665
|
-
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1665
|
+
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/executor/install/index.ts)_
|
|
1666
1666
|
|
|
1667
1667
|
## `hereya workspace executor token`
|
|
1668
1668
|
|
|
@@ -1679,7 +1679,7 @@ DESCRIPTION
|
|
|
1679
1679
|
Generate a workspace-scoped executor token for the remote executor
|
|
1680
1680
|
```
|
|
1681
1681
|
|
|
1682
|
-
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1682
|
+
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/executor/token/index.ts)_
|
|
1683
1683
|
|
|
1684
1684
|
## `hereya workspace executor uninstall`
|
|
1685
1685
|
|
|
@@ -1692,16 +1692,18 @@ USAGE
|
|
|
1692
1692
|
FLAGS
|
|
1693
1693
|
-w, --workspace=<value> (required) name of the workspace
|
|
1694
1694
|
--debug enable debug mode
|
|
1695
|
-
--mode=<option> [default:
|
|
1695
|
+
--mode=<option> [default: always-on] executor mode used at install time (informational only)
|
|
1696
1696
|
<options: ephemeral|always-on>
|
|
1697
1697
|
|
|
1698
1698
|
DESCRIPTION
|
|
1699
1699
|
Uninstall the remote executor from a workspace.
|
|
1700
1700
|
|
|
1701
|
-
|
|
1701
|
+
Both modes (always-on and ephemeral) are backed by the same package
|
|
1702
|
+
(hereya/remote-executor-aws). The --mode flag is informational only and
|
|
1703
|
+
controls log output.
|
|
1702
1704
|
```
|
|
1703
1705
|
|
|
1704
|
-
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1706
|
+
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/executor/uninstall/index.ts)_
|
|
1705
1707
|
|
|
1706
1708
|
## `hereya workspace install PACKAGE`
|
|
1707
1709
|
|
|
@@ -1728,7 +1730,7 @@ EXAMPLES
|
|
|
1728
1730
|
$ hereya workspace install hereya/aws-cognito
|
|
1729
1731
|
```
|
|
1730
1732
|
|
|
1731
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1733
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/install/index.ts)_
|
|
1732
1734
|
|
|
1733
1735
|
## `hereya workspace list`
|
|
1734
1736
|
|
|
@@ -1752,7 +1754,7 @@ EXAMPLES
|
|
|
1752
1754
|
$ hereya workspace list --org personal
|
|
1753
1755
|
```
|
|
1754
1756
|
|
|
1755
|
-
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1757
|
+
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/list/index.ts)_
|
|
1756
1758
|
|
|
1757
1759
|
## `hereya workspace set-profile PROFILE`
|
|
1758
1760
|
|
|
@@ -1776,7 +1778,7 @@ EXAMPLES
|
|
|
1776
1778
|
$ hereya workspace set-profile prod-profile -w production
|
|
1777
1779
|
```
|
|
1778
1780
|
|
|
1779
|
-
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1781
|
+
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/set-profile/index.ts)_
|
|
1780
1782
|
|
|
1781
1783
|
## `hereya workspace uninstall PACKAGE`
|
|
1782
1784
|
|
|
@@ -1803,5 +1805,5 @@ EXAMPLES
|
|
|
1803
1805
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
1804
1806
|
```
|
|
1805
1807
|
|
|
1806
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1808
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.92.1/src/commands/workspace/uninstall/index.ts)_
|
|
1807
1809
|
<!-- commandsstop -->
|
|
@@ -5,20 +5,19 @@ import { getBackend } from '../../../../backend/index.js';
|
|
|
5
5
|
import { getExecutor } from '../../../../executor/index.js';
|
|
6
6
|
import { getLogger, getLogPath, isDebug, setDebug } from '../../../../lib/log.js';
|
|
7
7
|
import { delay } from '../../../../lib/shell.js';
|
|
8
|
-
const
|
|
9
|
-
const EPHEMERAL_PACKAGE = 'hereya/aws-executor-broker';
|
|
8
|
+
const EXECUTOR_PACKAGE = 'hereya/remote-executor-aws';
|
|
10
9
|
export default class WorkspaceExecutorInstall extends Command {
|
|
11
10
|
static description = `Install a remote executor into a workspace.
|
|
12
11
|
|
|
13
|
-
Two modes are supported:
|
|
14
|
-
-
|
|
15
|
-
-
|
|
12
|
+
Provisions hereya/remote-executor-aws. Two modes are supported:
|
|
13
|
+
- always-on (default): a long-lived EC2 polls hereya-cloud 24/7.
|
|
14
|
+
- ephemeral: ASG scaled to 0 with a broker Lambda + OIDC for on-demand wake.`;
|
|
16
15
|
static flags = {
|
|
17
16
|
debug: Flags.boolean({ default: false, description: 'enable debug mode' }),
|
|
18
17
|
force: Flags.boolean({ char: 'f', default: false, description: 'force reinstall even if executor is already installed' }),
|
|
19
18
|
mode: Flags.string({
|
|
20
|
-
default: '
|
|
21
|
-
description: 'executor mode:
|
|
19
|
+
default: 'always-on',
|
|
20
|
+
description: 'executor mode: always-on (legacy long-lived EC2) or ephemeral (ASG min=0/max=1 with broker Lambda)',
|
|
22
21
|
options: ['ephemeral', 'always-on'],
|
|
23
22
|
}),
|
|
24
23
|
parameter: Flags.string({
|
|
@@ -37,9 +36,11 @@ Two modes are supported:
|
|
|
37
36
|
setDebug(flags.debug);
|
|
38
37
|
const myLogger = new ListrLogger({ useIcons: false });
|
|
39
38
|
const isEphemeral = flags.mode === 'ephemeral';
|
|
40
|
-
const executorPackage = isEphemeral ? EPHEMERAL_PACKAGE : ALWAYS_ON_PACKAGE;
|
|
41
39
|
const userParameters = this.parseParameterFlag(flags.parameter);
|
|
42
|
-
|
|
40
|
+
// workspaceId/workspace are auto-inferred from the cloud workspace and must
|
|
41
|
+
// not be overridden by --parameter — overriding would corrupt the broker
|
|
42
|
+
// registration / IAM trust policy on the customer side.
|
|
43
|
+
const reservedKeys = ['workspaceId', 'workspace'];
|
|
43
44
|
for (const reserved of reservedKeys) {
|
|
44
45
|
if (Object.hasOwn(userParameters, reserved)) {
|
|
45
46
|
this.error(`--parameter ${reserved}=... is not allowed: this value is auto-inferred from the workspace and overriding it would corrupt the broker registration`);
|
|
@@ -66,148 +67,113 @@ Two modes are supported:
|
|
|
66
67
|
},
|
|
67
68
|
title: 'Validating workspace',
|
|
68
69
|
};
|
|
69
|
-
const
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
await delay(500);
|
|
81
|
-
},
|
|
82
|
-
title: 'Generating executor token',
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
rendererOptions: {
|
|
86
|
-
persistentOutput: isDebug(),
|
|
87
|
-
},
|
|
88
|
-
async task(ctx, task) {
|
|
89
|
-
const executor$ = getExecutor();
|
|
90
|
-
if (!executor$.success) {
|
|
91
|
-
throw new Error(executor$.reason);
|
|
92
|
-
}
|
|
93
|
-
const { executor } = executor$;
|
|
94
|
-
// Merge precedence (lowest -> highest):
|
|
95
|
-
// 1. --parameter key=value (catch-all for any remote-executor-aws inputs)
|
|
96
|
-
// 2. auto-inferred (EXECUTOR_TOKEN, WORKSPACE) — cloud-derived, must not be overridden
|
|
97
|
-
const parameters = {
|
|
98
|
-
...userParameters,
|
|
99
|
-
EXECUTOR_TOKEN: ctx.executorToken,
|
|
100
|
-
WORKSPACE: flags.workspace,
|
|
101
|
-
};
|
|
102
|
-
const provisionOutput = await executor.provision({
|
|
103
|
-
logger: getLogger(task),
|
|
104
|
-
package: executorPackage,
|
|
105
|
-
parameters,
|
|
106
|
-
skipDeploy: true,
|
|
107
|
-
workspace: flags.workspace,
|
|
108
|
-
});
|
|
109
|
-
if (!provisionOutput.success) {
|
|
110
|
-
throw new Error(provisionOutput.reason);
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
title: 'Provisioning remote executor infrastructure',
|
|
70
|
+
const generateTokenTask = {
|
|
71
|
+
async task(ctx) {
|
|
72
|
+
const backend = await getBackend();
|
|
73
|
+
const tokenResult = await backend.generateExecutorToken({
|
|
74
|
+
workspace: flags.workspace,
|
|
75
|
+
});
|
|
76
|
+
if (!tokenResult.success) {
|
|
77
|
+
throw new Error(`Failed to generate executor token: ${tokenResult.reason}`);
|
|
78
|
+
}
|
|
79
|
+
ctx.executorToken = tokenResult.token;
|
|
80
|
+
await delay(500);
|
|
114
81
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
name: flags.workspace,
|
|
121
|
-
});
|
|
122
|
-
await delay(500);
|
|
123
|
-
},
|
|
124
|
-
title: 'Registering executor on workspace',
|
|
82
|
+
title: 'Generating executor token',
|
|
83
|
+
};
|
|
84
|
+
const provisionTask = {
|
|
85
|
+
rendererOptions: {
|
|
86
|
+
persistentOutput: isDebug(),
|
|
125
87
|
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
88
|
+
async task(ctx, task) {
|
|
89
|
+
const executor$ = getExecutor();
|
|
90
|
+
if (!executor$.success) {
|
|
91
|
+
throw new Error(executor$.reason);
|
|
92
|
+
}
|
|
93
|
+
const { executor } = executor$;
|
|
94
|
+
const hereyaCloudUrl = process.env.HEREYA_CLOUD_URL || 'https://cloud.hereya.dev';
|
|
95
|
+
// Merge precedence (lowest -> highest):
|
|
96
|
+
// 1. auto-inferred defaults (hereyaCloudUrl) — may be overridden by --parameter
|
|
97
|
+
// so callers can point a test stack at a non-default hereya-cloud
|
|
98
|
+
// 2. --parameter key=value (catch-all for any remote-executor-aws inputs)
|
|
99
|
+
// 3. mandatory auto-inferred (mode, EXECUTOR_TOKEN, WORKSPACE) — must not be
|
|
100
|
+
// overridable; mode is the user's --mode choice and the others are cloud-derived
|
|
101
|
+
// 4. ephemeral-only auto-inferred (workspaceId) — re-pinned defensively;
|
|
102
|
+
// reserved-key check above already rejects --parameter workspaceId/workspace
|
|
103
|
+
const parameters = {
|
|
104
|
+
hereyaCloudUrl,
|
|
105
|
+
...userParameters,
|
|
106
|
+
EXECUTOR_TOKEN: ctx.executorToken,
|
|
107
|
+
mode: flags.mode,
|
|
108
|
+
WORKSPACE: flags.workspace,
|
|
109
|
+
};
|
|
110
|
+
if (isEphemeral) {
|
|
111
|
+
parameters.workspaceId = ctx.workspaceId;
|
|
112
|
+
}
|
|
113
|
+
const provisionOutput = await executor.provision({
|
|
114
|
+
logger: getLogger(task),
|
|
115
|
+
package: EXECUTOR_PACKAGE,
|
|
116
|
+
parameters,
|
|
117
|
+
skipDeploy: true,
|
|
118
|
+
workspace: flags.workspace,
|
|
119
|
+
});
|
|
120
|
+
if (!provisionOutput.success) {
|
|
121
|
+
throw new Error(provisionOutput.reason);
|
|
122
|
+
}
|
|
123
|
+
ctx.brokerOutputs = provisionOutput.env;
|
|
162
124
|
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
title: 'Registering executor broker with hereya cloud',
|
|
125
|
+
title: 'Provisioning remote executor infrastructure',
|
|
126
|
+
};
|
|
127
|
+
const registerBrokerTask = {
|
|
128
|
+
async task(ctx) {
|
|
129
|
+
const outputs = ctx.brokerOutputs ?? {};
|
|
130
|
+
const { brokerVersion, brokerWebhookUrl } = outputs;
|
|
131
|
+
if (!brokerWebhookUrl) {
|
|
132
|
+
throw new Error('Executor package did not return brokerWebhookUrl output (required for mode=ephemeral)');
|
|
133
|
+
}
|
|
134
|
+
if (!brokerVersion) {
|
|
135
|
+
throw new Error('Executor package did not return brokerVersion output (required for mode=ephemeral)');
|
|
136
|
+
}
|
|
137
|
+
const metadata = {
|
|
138
|
+
asgName: outputs.executorAsgName ?? outputs.asgName,
|
|
139
|
+
awsAccountId: outputs.awsAccountId,
|
|
140
|
+
brokerLambdaArn: outputs.brokerLambdaArn,
|
|
141
|
+
invokerRoleArn: outputs.invokerRoleArn,
|
|
142
|
+
region: outputs.region,
|
|
143
|
+
};
|
|
144
|
+
const backend = await getBackend();
|
|
145
|
+
const result = await backend.registerExecutorBroker({
|
|
146
|
+
brokerVersion,
|
|
147
|
+
brokerWebhookUrl,
|
|
148
|
+
metadata,
|
|
149
|
+
provider: 'aws',
|
|
150
|
+
workspace: flags.workspace,
|
|
151
|
+
});
|
|
152
|
+
if (!result.success) {
|
|
153
|
+
throw new Error(`Failed to register executor broker: ${result.reason}`);
|
|
154
|
+
}
|
|
155
|
+
await delay(500);
|
|
195
156
|
},
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
205
|
-
|
|
157
|
+
title: 'Registering executor broker with hereya cloud',
|
|
158
|
+
};
|
|
159
|
+
const markExecutorEnabledTask = {
|
|
160
|
+
async task() {
|
|
161
|
+
const backend = await getBackend();
|
|
162
|
+
await backend.updateWorkspace({
|
|
163
|
+
hasExecutor: true,
|
|
164
|
+
name: flags.workspace,
|
|
165
|
+
});
|
|
166
|
+
await delay(500);
|
|
206
167
|
},
|
|
168
|
+
title: 'Registering executor on workspace',
|
|
169
|
+
};
|
|
170
|
+
const subTasks = [
|
|
171
|
+
validateTask,
|
|
172
|
+
generateTokenTask,
|
|
173
|
+
provisionTask,
|
|
174
|
+
...(isEphemeral ? [registerBrokerTask] : []),
|
|
175
|
+
markExecutorEnabledTask,
|
|
207
176
|
];
|
|
208
|
-
const subTasks = isEphemeral
|
|
209
|
-
? [validateTask, ...provisionEphemeralTasks]
|
|
210
|
-
: [validateTask, ...provisionAlwaysOnTasks];
|
|
211
177
|
const task = new Listr([
|
|
212
178
|
{
|
|
213
179
|
async task(_ctx, task) {
|
|
@@ -5,17 +5,18 @@ import { getBackend } from '../../../../backend/index.js';
|
|
|
5
5
|
import { getExecutor } from '../../../../executor/index.js';
|
|
6
6
|
import { getLogger, getLogPath, isDebug, setDebug } from '../../../../lib/log.js';
|
|
7
7
|
import { delay } from '../../../../lib/shell.js';
|
|
8
|
-
const
|
|
9
|
-
const EPHEMERAL_PACKAGE = 'hereya/aws-executor-broker';
|
|
8
|
+
const EXECUTOR_PACKAGE = 'hereya/remote-executor-aws';
|
|
10
9
|
export default class WorkspaceExecutorUninstall extends Command {
|
|
11
10
|
static description = `Uninstall the remote executor from a workspace.
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
Both modes (always-on and ephemeral) are backed by the same package
|
|
13
|
+
(hereya/remote-executor-aws). The --mode flag is informational only and
|
|
14
|
+
controls log output.`;
|
|
14
15
|
static flags = {
|
|
15
16
|
debug: Flags.boolean({ default: false, description: 'enable debug mode' }),
|
|
16
17
|
mode: Flags.string({
|
|
17
|
-
default: '
|
|
18
|
-
description: 'executor mode used at install time',
|
|
18
|
+
default: 'always-on',
|
|
19
|
+
description: 'executor mode used at install time (informational only)',
|
|
19
20
|
options: ['ephemeral', 'always-on'],
|
|
20
21
|
}),
|
|
21
22
|
workspace: Flags.string({
|
|
@@ -28,8 +29,6 @@ The --mode flag must match the mode used at install time (default: ephemeral).`;
|
|
|
28
29
|
const { flags } = await this.parse(WorkspaceExecutorUninstall);
|
|
29
30
|
setDebug(flags.debug);
|
|
30
31
|
const myLogger = new ListrLogger({ useIcons: false });
|
|
31
|
-
const isEphemeral = flags.mode === 'ephemeral';
|
|
32
|
-
const executorPackage = isEphemeral ? EPHEMERAL_PACKAGE : ALWAYS_ON_PACKAGE;
|
|
33
32
|
const task = new Listr([
|
|
34
33
|
{
|
|
35
34
|
async task(_ctx, task) {
|
|
@@ -66,7 +65,7 @@ The --mode flag must match the mode used at install time (default: ephemeral).`;
|
|
|
66
65
|
const { executor } = executor$;
|
|
67
66
|
const destroyOutput = await executor.destroy({
|
|
68
67
|
logger: getLogger(task),
|
|
69
|
-
package:
|
|
68
|
+
package: EXECUTOR_PACKAGE,
|
|
70
69
|
skipDeploy: true,
|
|
71
70
|
workspace: flags.workspace,
|
|
72
71
|
});
|
|
@@ -90,8 +89,8 @@ The --mode flag must match the mode used at install time (default: ephemeral).`;
|
|
|
90
89
|
async task() {
|
|
91
90
|
const backend = await getBackend();
|
|
92
91
|
// Always attempt to unregister the broker. The endpoint
|
|
93
|
-
// gracefully no-ops on 404 so this is safe for
|
|
94
|
-
//
|
|
92
|
+
// gracefully no-ops on 404, so this is safe for always-on
|
|
93
|
+
// installs that never registered a broker.
|
|
95
94
|
const result = await backend.unregisterExecutorBroker({
|
|
96
95
|
workspace: flags.workspace,
|
|
97
96
|
});
|
|
@@ -9,7 +9,11 @@ import { downloadPackage } from '../lib/package/index.js';
|
|
|
9
9
|
import { runShell } from '../lib/shell.js';
|
|
10
10
|
import { getAwsConfig, getAwsConfigKey } from './aws-config.js';
|
|
11
11
|
import { getPackageDownloadPath, } from './common.js';
|
|
12
|
-
|
|
12
|
+
// destroyPackage/provisionPackage are imported lazily inside bootstrap/unbootstrap
|
|
13
|
+
// (the only callers) to break a circular import: aws.js -> index.js -> registry.js
|
|
14
|
+
// -> aws.js. The static import broke the broker Lambda's ESM evaluation order
|
|
15
|
+
// (TDZ on `factories`). The Lambda never calls bootstrap/unbootstrap so the
|
|
16
|
+
// dynamic import is never resolved there.
|
|
13
17
|
export class AwsInfrastructure {
|
|
14
18
|
async bootstrap(_) {
|
|
15
19
|
const stsClient = new STSClient({});
|
|
@@ -17,6 +21,7 @@ export class AwsInfrastructure {
|
|
|
17
21
|
const region = await stsClient.config.region();
|
|
18
22
|
await runShell('npx', ['cdk', 'bootstrap', `aws://${accountId}/${region}`]);
|
|
19
23
|
const bootstrapPackage = 'hereya/bootstrap-aws-stack';
|
|
24
|
+
const { provisionPackage } = await import('./index.js');
|
|
20
25
|
const output = await provisionPackage({ package: bootstrapPackage });
|
|
21
26
|
if (!output.success) {
|
|
22
27
|
throw new Error(output.reason);
|
|
@@ -182,6 +187,7 @@ export class AwsInfrastructure {
|
|
|
182
187
|
}
|
|
183
188
|
async unbootstrap(_) {
|
|
184
189
|
const bootstrapPackage = 'hereya/bootstrap-aws-stack';
|
|
190
|
+
const { destroyPackage } = await import('./index.js');
|
|
185
191
|
const output = await destroyPackage({ package: bootstrapPackage });
|
|
186
192
|
if (!output.success) {
|
|
187
193
|
throw new Error(output.reason);
|
package/oclif.manifest.json
CHANGED
|
@@ -324,47 +324,42 @@
|
|
|
324
324
|
"index.js"
|
|
325
325
|
]
|
|
326
326
|
},
|
|
327
|
-
"
|
|
327
|
+
"env": {
|
|
328
328
|
"aliases": [],
|
|
329
|
-
"args": {
|
|
330
|
-
|
|
329
|
+
"args": {
|
|
330
|
+
"name": {
|
|
331
|
+
"description": "name of the env to display",
|
|
332
|
+
"name": "name",
|
|
333
|
+
"required": false
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"description": "Print project environment variables.",
|
|
331
337
|
"examples": [
|
|
332
|
-
"<%= config.bin %> <%= command.id %>"
|
|
338
|
+
"<%= config.bin %> <%= command.id %>",
|
|
339
|
+
"<%= config.bin %> <%= command.id %> myEnv",
|
|
340
|
+
"<%= config.bin %> <%= command.id %> -w dev",
|
|
341
|
+
"<%= config.bin %> <%= command.id %> -w dev -l"
|
|
333
342
|
],
|
|
334
343
|
"flags": {
|
|
335
344
|
"chdir": {
|
|
336
|
-
"description": "
|
|
345
|
+
"description": "project root directory",
|
|
337
346
|
"name": "chdir",
|
|
338
347
|
"required": false,
|
|
339
348
|
"hasDynamicHelp": false,
|
|
340
349
|
"multiple": false,
|
|
341
350
|
"type": "option"
|
|
342
351
|
},
|
|
343
|
-
"
|
|
344
|
-
"
|
|
345
|
-
"
|
|
346
|
-
"
|
|
347
|
-
"type": "boolean"
|
|
348
|
-
},
|
|
349
|
-
"deploy": {
|
|
350
|
-
"description": "destroy deployment companion packages",
|
|
351
|
-
"name": "deploy",
|
|
352
|
+
"list": {
|
|
353
|
+
"char": "l",
|
|
354
|
+
"description": "list only the env vars without values",
|
|
355
|
+
"name": "list",
|
|
352
356
|
"required": false,
|
|
353
357
|
"allowNo": false,
|
|
354
358
|
"type": "boolean"
|
|
355
359
|
},
|
|
356
|
-
"select": {
|
|
357
|
-
"char": "s",
|
|
358
|
-
"description": "select the packages to destroy",
|
|
359
|
-
"name": "select",
|
|
360
|
-
"default": [],
|
|
361
|
-
"hasDynamicHelp": false,
|
|
362
|
-
"multiple": true,
|
|
363
|
-
"type": "option"
|
|
364
|
-
},
|
|
365
360
|
"workspace": {
|
|
366
361
|
"char": "w",
|
|
367
|
-
"description": "name of the workspace to
|
|
362
|
+
"description": "name of the workspace to print the env vars for",
|
|
368
363
|
"name": "workspace",
|
|
369
364
|
"required": false,
|
|
370
365
|
"hasDynamicHelp": false,
|
|
@@ -374,7 +369,7 @@
|
|
|
374
369
|
},
|
|
375
370
|
"hasDynamicHelp": false,
|
|
376
371
|
"hiddenAliases": [],
|
|
377
|
-
"id": "
|
|
372
|
+
"id": "env",
|
|
378
373
|
"pluginAlias": "hereya-cli",
|
|
379
374
|
"pluginName": "hereya-cli",
|
|
380
375
|
"pluginType": "core",
|
|
@@ -384,46 +379,51 @@
|
|
|
384
379
|
"relativePath": [
|
|
385
380
|
"dist",
|
|
386
381
|
"commands",
|
|
387
|
-
"
|
|
382
|
+
"env",
|
|
388
383
|
"index.js"
|
|
389
384
|
]
|
|
390
385
|
},
|
|
391
|
-
"
|
|
386
|
+
"down": {
|
|
392
387
|
"aliases": [],
|
|
393
|
-
"args": {
|
|
394
|
-
|
|
395
|
-
"description": "name of the env to display",
|
|
396
|
-
"name": "name",
|
|
397
|
-
"required": false
|
|
398
|
-
}
|
|
399
|
-
},
|
|
400
|
-
"description": "Print project environment variables.",
|
|
388
|
+
"args": {},
|
|
389
|
+
"description": "Destroy all packages in the project.",
|
|
401
390
|
"examples": [
|
|
402
|
-
"<%= config.bin %> <%= command.id %>"
|
|
403
|
-
"<%= config.bin %> <%= command.id %> myEnv",
|
|
404
|
-
"<%= config.bin %> <%= command.id %> -w dev",
|
|
405
|
-
"<%= config.bin %> <%= command.id %> -w dev -l"
|
|
391
|
+
"<%= config.bin %> <%= command.id %>"
|
|
406
392
|
],
|
|
407
393
|
"flags": {
|
|
408
394
|
"chdir": {
|
|
409
|
-
"description": "project root
|
|
395
|
+
"description": "\n Directory where the command will be executed.\n If not specified, it defaults to the current working directory.\n Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable.\n ",
|
|
410
396
|
"name": "chdir",
|
|
411
397
|
"required": false,
|
|
412
398
|
"hasDynamicHelp": false,
|
|
413
399
|
"multiple": false,
|
|
414
400
|
"type": "option"
|
|
415
401
|
},
|
|
416
|
-
"
|
|
417
|
-
"
|
|
418
|
-
"
|
|
419
|
-
"
|
|
402
|
+
"debug": {
|
|
403
|
+
"description": "enable debug mode",
|
|
404
|
+
"name": "debug",
|
|
405
|
+
"allowNo": false,
|
|
406
|
+
"type": "boolean"
|
|
407
|
+
},
|
|
408
|
+
"deploy": {
|
|
409
|
+
"description": "destroy deployment companion packages",
|
|
410
|
+
"name": "deploy",
|
|
420
411
|
"required": false,
|
|
421
412
|
"allowNo": false,
|
|
422
413
|
"type": "boolean"
|
|
423
414
|
},
|
|
415
|
+
"select": {
|
|
416
|
+
"char": "s",
|
|
417
|
+
"description": "select the packages to destroy",
|
|
418
|
+
"name": "select",
|
|
419
|
+
"default": [],
|
|
420
|
+
"hasDynamicHelp": false,
|
|
421
|
+
"multiple": true,
|
|
422
|
+
"type": "option"
|
|
423
|
+
},
|
|
424
424
|
"workspace": {
|
|
425
425
|
"char": "w",
|
|
426
|
-
"description": "name of the workspace to
|
|
426
|
+
"description": "name of the workspace to destroy the packages for",
|
|
427
427
|
"name": "workspace",
|
|
428
428
|
"required": false,
|
|
429
429
|
"hasDynamicHelp": false,
|
|
@@ -433,7 +433,7 @@
|
|
|
433
433
|
},
|
|
434
434
|
"hasDynamicHelp": false,
|
|
435
435
|
"hiddenAliases": [],
|
|
436
|
-
"id": "
|
|
436
|
+
"id": "down",
|
|
437
437
|
"pluginAlias": "hereya-cli",
|
|
438
438
|
"pluginName": "hereya-cli",
|
|
439
439
|
"pluginType": "core",
|
|
@@ -443,7 +443,7 @@
|
|
|
443
443
|
"relativePath": [
|
|
444
444
|
"dist",
|
|
445
445
|
"commands",
|
|
446
|
-
"
|
|
446
|
+
"down",
|
|
447
447
|
"index.js"
|
|
448
448
|
]
|
|
449
449
|
},
|
|
@@ -3169,7 +3169,7 @@
|
|
|
3169
3169
|
"workspace:executor:install": {
|
|
3170
3170
|
"aliases": [],
|
|
3171
3171
|
"args": {},
|
|
3172
|
-
"description": "Install a remote executor into a workspace.\n\
|
|
3172
|
+
"description": "Install a remote executor into a workspace.\n\nProvisions hereya/remote-executor-aws. Two modes are supported:\n - always-on (default): a long-lived EC2 polls hereya-cloud 24/7.\n - ephemeral: ASG scaled to 0 with a broker Lambda + OIDC for on-demand wake.",
|
|
3173
3173
|
"flags": {
|
|
3174
3174
|
"debug": {
|
|
3175
3175
|
"description": "enable debug mode",
|
|
@@ -3185,9 +3185,9 @@
|
|
|
3185
3185
|
"type": "boolean"
|
|
3186
3186
|
},
|
|
3187
3187
|
"mode": {
|
|
3188
|
-
"description": "executor mode:
|
|
3188
|
+
"description": "executor mode: always-on (legacy long-lived EC2) or ephemeral (ASG min=0/max=1 with broker Lambda)",
|
|
3189
3189
|
"name": "mode",
|
|
3190
|
-
"default": "
|
|
3190
|
+
"default": "always-on",
|
|
3191
3191
|
"hasDynamicHelp": false,
|
|
3192
3192
|
"multiple": false,
|
|
3193
3193
|
"options": [
|
|
@@ -3268,7 +3268,7 @@
|
|
|
3268
3268
|
"workspace:executor:uninstall": {
|
|
3269
3269
|
"aliases": [],
|
|
3270
3270
|
"args": {},
|
|
3271
|
-
"description": "Uninstall the remote executor from a workspace.\n\
|
|
3271
|
+
"description": "Uninstall the remote executor from a workspace.\n\nBoth modes (always-on and ephemeral) are backed by the same package\n(hereya/remote-executor-aws). The --mode flag is informational only and\ncontrols log output.",
|
|
3272
3272
|
"flags": {
|
|
3273
3273
|
"debug": {
|
|
3274
3274
|
"description": "enable debug mode",
|
|
@@ -3277,9 +3277,9 @@
|
|
|
3277
3277
|
"type": "boolean"
|
|
3278
3278
|
},
|
|
3279
3279
|
"mode": {
|
|
3280
|
-
"description": "executor mode used at install time",
|
|
3280
|
+
"description": "executor mode used at install time (informational only)",
|
|
3281
3281
|
"name": "mode",
|
|
3282
|
-
"default": "
|
|
3282
|
+
"default": "always-on",
|
|
3283
3283
|
"hasDynamicHelp": false,
|
|
3284
3284
|
"multiple": false,
|
|
3285
3285
|
"options": [
|
|
@@ -3317,5 +3317,5 @@
|
|
|
3317
3317
|
]
|
|
3318
3318
|
}
|
|
3319
3319
|
},
|
|
3320
|
-
"version": "0.
|
|
3320
|
+
"version": "0.92.1"
|
|
3321
3321
|
}
|