hereya-cli 0.73.3 → 0.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md 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.73.3 linux-x64 node-v24.14.0
24
+ hereya-cli/0.74.0 linux-x64 node-v24.14.0
25
25
  $ hereya --help [COMMAND]
26
26
  USAGE
27
27
  $ hereya COMMAND
@@ -117,7 +117,7 @@ EXAMPLES
117
117
  $ hereya add cloudy/docker_postgres
118
118
  ```
119
119
 
120
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/add/index.ts)_
120
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/add/index.ts)_
121
121
 
122
122
  ## `hereya bootstrap INFRASTRUCTURETYPE`
123
123
 
@@ -142,7 +142,7 @@ EXAMPLES
142
142
  $ hereya bootstrap local
143
143
  ```
144
144
 
145
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/bootstrap/index.ts)_
145
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/bootstrap/index.ts)_
146
146
 
147
147
  ## `hereya config export-backend [FILE]`
148
148
 
@@ -164,7 +164,7 @@ EXAMPLES
164
164
  $ hereya config export-backend ./path/to/export.json
165
165
  ```
166
166
 
167
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/config/export-backend/index.ts)_
167
+ _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/config/export-backend/index.ts)_
168
168
 
169
169
  ## `hereya config get-backend`
170
170
 
@@ -181,7 +181,7 @@ EXAMPLES
181
181
  $ hereya config get-backend
182
182
  ```
183
183
 
184
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/config/get-backend/index.ts)_
184
+ _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/config/get-backend/index.ts)_
185
185
 
186
186
  ## `hereya config import-backend FILE`
187
187
 
@@ -201,7 +201,7 @@ EXAMPLES
201
201
  $ hereya config import-backend ./path/to/cloud-backend.json
202
202
  ```
203
203
 
204
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/config/import-backend/index.ts)_
204
+ _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/config/import-backend/index.ts)_
205
205
 
206
206
  ## `hereya config use-backend TYPE`
207
207
 
@@ -223,7 +223,7 @@ EXAMPLES
223
223
  $ hereya config use-backend local
224
224
  ```
225
225
 
226
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/config/use-backend/index.ts)_
226
+ _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/config/use-backend/index.ts)_
227
227
 
228
228
  ## `hereya delete-state`
229
229
 
@@ -249,7 +249,7 @@ EXAMPLES
249
249
  $ hereya delete-state --workspace staging
250
250
  ```
251
251
 
252
- _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/delete-state/index.ts)_
252
+ _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/delete-state/index.ts)_
253
253
 
254
254
  ## `hereya deploy`
255
255
 
@@ -274,7 +274,7 @@ EXAMPLES
274
274
  $ hereya deploy
275
275
  ```
276
276
 
277
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/deploy/index.ts)_
277
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/deploy/index.ts)_
278
278
 
279
279
  ## `hereya devenv config`
280
280
 
@@ -294,7 +294,7 @@ EXAMPLES
294
294
  $ hereya devenv config -w my-workspace
295
295
  ```
296
296
 
297
- _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/devenv/config/index.ts)_
297
+ _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/devenv/config/index.ts)_
298
298
 
299
299
  ## `hereya devenv install`
300
300
 
@@ -319,7 +319,7 @@ EXAMPLES
319
319
  $ hereya devenv install -w my-workspace -p instanceType=t3.large
320
320
  ```
321
321
 
322
- _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/devenv/install/index.ts)_
322
+ _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/devenv/install/index.ts)_
323
323
 
324
324
  ## `hereya devenv project init PROJECT`
325
325
 
@@ -327,17 +327,18 @@ Initialize a project on a remote dev environment.
327
327
 
328
328
  ```
329
329
  USAGE
330
- $ hereya devenv project init PROJECT -w <value> [-f] [-p <value>...] [-t <value>]
330
+ $ hereya devenv project init PROJECT -w <value> [-d <value>] [-f] [-p <value>...] [-t <value>]
331
331
 
332
332
  ARGUMENTS
333
333
  PROJECT project name
334
334
 
335
335
  FLAGS
336
- -f, --force continue even if folder already exists
337
- -p, --parameter=<value>... [default: ] parameter for the template, in the form of 'key=value'. Can be specified
338
- multiple times.
339
- -t, --template=<value> template package to scaffold the project from
340
- -w, --workspace=<value> (required) name of the workspace
336
+ -d, --deploy-workspace=<value> workspace used for deployment (required when using a template)
337
+ -f, --force continue even if folder already exists
338
+ -p, --parameter=<value>... [default: ] parameter for the template, in the form of 'key=value'. Can be specified
339
+ multiple times.
340
+ -t, --template=<value> template package to scaffold the project from
341
+ -w, --workspace=<value> (required) name of the workspace
341
342
 
342
343
  DESCRIPTION
343
344
  Initialize a project on a remote dev environment.
@@ -350,7 +351,7 @@ EXAMPLES
350
351
  $ hereya devenv project init my-app -w my-workspace -t acme/node-starter -p region=us-east-1
351
352
  ```
352
353
 
353
- _See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/devenv/project/init/index.ts)_
354
+ _See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/devenv/project/init/index.ts)_
354
355
 
355
356
  ## `hereya devenv project uninit PROJECT`
356
357
 
@@ -376,7 +377,7 @@ EXAMPLES
376
377
  $ hereya devenv project uninit my-app -w my-workspace --force
377
378
  ```
378
379
 
379
- _See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/devenv/project/uninit/index.ts)_
380
+ _See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/devenv/project/uninit/index.ts)_
380
381
 
381
382
  ## `hereya devenv ssh`
382
383
 
@@ -396,7 +397,7 @@ EXAMPLES
396
397
  $ hereya devenv ssh -w my-workspace
397
398
  ```
398
399
 
399
- _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/devenv/ssh/index.ts)_
400
+ _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/devenv/ssh/index.ts)_
400
401
 
401
402
  ## `hereya devenv uninstall`
402
403
 
@@ -417,7 +418,7 @@ EXAMPLES
417
418
  $ hereya devenv uninstall -w my-workspace
418
419
  ```
419
420
 
420
- _See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/devenv/uninstall/index.ts)_
421
+ _See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/devenv/uninstall/index.ts)_
421
422
 
422
423
  ## `hereya doc PACKAGE`
423
424
 
@@ -450,7 +451,7 @@ EXAMPLES
450
451
  $ hereya doc my-package --no-doc
451
452
  ```
452
453
 
453
- _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/doc/index.ts)_
454
+ _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/doc/index.ts)_
454
455
 
455
456
  ## `hereya docker run IMAGE`
456
457
 
@@ -481,7 +482,7 @@ EXAMPLES
481
482
  $ hereya docker run myapp:latest -- --rm -v ./data:/data
482
483
  ```
483
484
 
484
- _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/docker/run/index.ts)_
485
+ _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/docker/run/index.ts)_
485
486
 
486
487
  ## `hereya down`
487
488
 
@@ -508,7 +509,7 @@ EXAMPLES
508
509
  $ hereya down
509
510
  ```
510
511
 
511
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/down/index.ts)_
512
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/down/index.ts)_
512
513
 
513
514
  ## `hereya env [NAME]`
514
515
 
@@ -539,7 +540,7 @@ EXAMPLES
539
540
  $ hereya env -w dev -l
540
541
  ```
541
542
 
542
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/env/index.ts)_
543
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/env/index.ts)_
543
544
 
544
545
  ## `hereya env set [NAME]`
545
546
 
@@ -566,7 +567,7 @@ EXAMPLES
566
567
  $ hereya env set FOO -v bar -w dev
567
568
  ```
568
569
 
569
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/env/set/index.ts)_
570
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/env/set/index.ts)_
570
571
 
571
572
  ## `hereya executor start`
572
573
 
@@ -599,7 +600,7 @@ EXAMPLES
599
600
  HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
600
601
  ```
601
602
 
602
- _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/executor/start/index.ts)_
603
+ _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/executor/start/index.ts)_
603
604
 
604
605
  ## `hereya flow add PACKAGE`
605
606
 
@@ -637,7 +638,7 @@ EXAMPLES
637
638
  $ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
638
639
  ```
639
640
 
640
- _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/add/index.ts)_
641
+ _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/add/index.ts)_
641
642
 
642
643
  ## `hereya flow docker run IMAGE`
643
644
 
@@ -667,7 +668,7 @@ EXAMPLES
667
668
  $ hereya flow docker run --pin myapp:latest -- --rm
668
669
  ```
669
670
 
670
- _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/docker/run/index.ts)_
671
+ _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/docker/run/index.ts)_
671
672
 
672
673
  ## `hereya flow down`
673
674
 
@@ -701,7 +702,7 @@ EXAMPLES
701
702
  $ hereya flow down --pin
702
703
  ```
703
704
 
704
- _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/down/index.ts)_
705
+ _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/down/index.ts)_
705
706
 
706
707
  ## `hereya flow env [NAME]`
707
708
 
@@ -735,7 +736,7 @@ EXAMPLES
735
736
  $ hereya flow env -l
736
737
  ```
737
738
 
738
- _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/env/index.ts)_
739
+ _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/env/index.ts)_
739
740
 
740
741
  ## `hereya flow provid PACKAGE`
741
742
 
@@ -764,7 +765,7 @@ EXAMPLES
764
765
  $ hereya flow provid hereya/postgres --pin
765
766
  ```
766
767
 
767
- _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/provid/index.ts)_
768
+ _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/provid/index.ts)_
768
769
 
769
770
  ## `hereya flow remove PACKAGE`
770
771
 
@@ -794,7 +795,7 @@ EXAMPLES
794
795
  $ hereya flow remove cloudy/docker_postgres --profile staging
795
796
  ```
796
797
 
797
- _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/remove/index.ts)_
798
+ _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/remove/index.ts)_
798
799
 
799
800
  ## `hereya flow run CMD`
800
801
 
@@ -823,7 +824,7 @@ EXAMPLES
823
824
  $ hereya flow run --pin -- npm test
824
825
  ```
825
826
 
826
- _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/run/index.ts)_
827
+ _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/run/index.ts)_
827
828
 
828
829
  ## `hereya flow up`
829
830
 
@@ -857,7 +858,7 @@ EXAMPLES
857
858
  $ hereya flow up --pin
858
859
  ```
859
860
 
860
- _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/flow/up/index.ts)_
861
+ _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/flow/up/index.ts)_
861
862
 
862
863
  ## `hereya help [COMMAND]`
863
864
 
@@ -914,7 +915,7 @@ EXAMPLES
914
915
  $ hereya import org/my-package -f state.tfstate -w my-workspace
915
916
  ```
916
917
 
917
- _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/import/index.ts)_
918
+ _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/import/index.ts)_
918
919
 
919
920
  ## `hereya init PROJECT`
920
921
 
@@ -922,17 +923,18 @@ Initialize hereya in a project directory.
922
923
 
923
924
  ```
924
925
  USAGE
925
- $ hereya init PROJECT -w <value> [--chdir <value>] [-p <value>...] [-t <value>]
926
+ $ hereya init PROJECT -w <value> [--chdir <value>] [-d <value>] [-p <value>...] [-t <value>]
926
927
 
927
928
  ARGUMENTS
928
929
  PROJECT project name
929
930
 
930
931
  FLAGS
931
- -p, --parameter=<value>... [default: ] template parameter, in the form of 'key=value'. Can be specified multiple
932
- times.
933
- -t, --template=<value> template package name (e.g. owner/repo)
934
- -w, --workspace=<value> (required) workspace to set as default
935
- --chdir=<value> directory to run command in
932
+ -d, --deploy-workspace=<value> workspace used for deployment (required when using a template)
933
+ -p, --parameter=<value>... [default: ] template parameter, in the form of 'key=value'. Can be specified multiple
934
+ times.
935
+ -t, --template=<value> template package name (e.g. owner/repo)
936
+ -w, --workspace=<value> (required) workspace to set as default
937
+ --chdir=<value> directory to run command in
936
938
 
937
939
  DESCRIPTION
938
940
  Initialize hereya in a project directory.
@@ -942,12 +944,12 @@ EXAMPLES
942
944
 
943
945
  $ hereya init myProject -w=defaultWorkspace --chdir=./myProject
944
946
 
945
- $ hereya init myProject -w=dev -t=acme/node-starter
947
+ $ hereya init myProject -w=dev -t=acme/node-starter -d=prod
946
948
 
947
- $ hereya init myProject -w=dev -t=acme/node-starter -p region=us-east-1
949
+ $ hereya init myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1
948
950
  ```
949
951
 
950
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/init/index.ts)_
952
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/init/index.ts)_
951
953
 
952
954
  ## `hereya login [URL]`
953
955
 
@@ -976,7 +978,7 @@ EXAMPLES
976
978
  $ hereya login --token=your-token https://cloud.hereya.dev
977
979
  ```
978
980
 
979
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/login/index.ts)_
981
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/login/index.ts)_
980
982
 
981
983
  ## `hereya logout`
982
984
 
@@ -993,7 +995,7 @@ EXAMPLES
993
995
  $ hereya logout
994
996
  ```
995
997
 
996
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/logout/index.ts)_
998
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/logout/index.ts)_
997
999
 
998
1000
  ## `hereya provid PACKAGE`
999
1001
 
@@ -1021,7 +1023,7 @@ EXAMPLES
1021
1023
  $ hereya provid hereya/postgres --workspace staging
1022
1024
  ```
1023
1025
 
1024
- _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/provid/index.ts)_
1026
+ _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/provid/index.ts)_
1025
1027
 
1026
1028
  ## `hereya publish`
1027
1029
 
@@ -1044,7 +1046,7 @@ EXAMPLES
1044
1046
  $ hereya publish --chdir=/path/to/package
1045
1047
  ```
1046
1048
 
1047
- _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/publish/index.ts)_
1049
+ _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/publish/index.ts)_
1048
1050
 
1049
1051
  ## `hereya remove PACKAGE`
1050
1052
 
@@ -1072,7 +1074,7 @@ EXAMPLES
1072
1074
  $ hereya remove cloudy/docker_postgres
1073
1075
  ```
1074
1076
 
1075
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/remove/index.ts)_
1077
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/remove/index.ts)_
1076
1078
 
1077
1079
  ## `hereya run CMD`
1078
1080
 
@@ -1098,7 +1100,7 @@ EXAMPLES
1098
1100
  $ hereya run -w uat -- node index.js
1099
1101
  ```
1100
1102
 
1101
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/run/index.ts)_
1103
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/run/index.ts)_
1102
1104
 
1103
1105
  ## `hereya search QUERY`
1104
1106
 
@@ -1129,7 +1131,7 @@ EXAMPLES
1129
1131
  $ hereya search database --json
1130
1132
  ```
1131
1133
 
1132
- _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/search/index.ts)_
1134
+ _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/search/index.ts)_
1133
1135
 
1134
1136
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
1135
1137
 
@@ -1154,7 +1156,7 @@ EXAMPLES
1154
1156
  $ hereya unbootstrap local
1155
1157
  ```
1156
1158
 
1157
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/unbootstrap/index.ts)_
1159
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/unbootstrap/index.ts)_
1158
1160
 
1159
1161
  ## `hereya undeploy`
1160
1162
 
@@ -1179,7 +1181,7 @@ EXAMPLES
1179
1181
  $ hereya undeploy
1180
1182
  ```
1181
1183
 
1182
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/undeploy/index.ts)_
1184
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/undeploy/index.ts)_
1183
1185
 
1184
1186
  ## `hereya uninit PROJECT`
1185
1187
 
@@ -1187,23 +1189,27 @@ Destroy template infrastructure and uninitialize a project.
1187
1189
 
1188
1190
  ```
1189
1191
  USAGE
1190
- $ hereya uninit PROJECT -w <value> [--chdir <value>]
1192
+ $ hereya uninit PROJECT -w <value> [--chdir <value>] [-p <value>...]
1191
1193
 
1192
1194
  ARGUMENTS
1193
1195
  PROJECT project name
1194
1196
 
1195
1197
  FLAGS
1196
- -w, --workspace=<value> (required) workspace used during init
1197
- --chdir=<value> directory to run command in
1198
+ -p, --parameter=<value>... [default: ] parameter for the template, in the form of 'key=value'. Overrides saved
1199
+ parameters.
1200
+ -w, --workspace=<value> (required) workspace used during init
1201
+ --chdir=<value> directory to run command in
1198
1202
 
1199
1203
  DESCRIPTION
1200
1204
  Destroy template infrastructure and uninitialize a project.
1201
1205
 
1202
1206
  EXAMPLES
1203
1207
  $ hereya uninit myProject -w dev
1208
+
1209
+ $ hereya uninit myProject -w dev -p prodWorkspace=prod
1204
1210
  ```
1205
1211
 
1206
- _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/uninit/index.ts)_
1212
+ _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/uninit/index.ts)_
1207
1213
 
1208
1214
  ## `hereya up`
1209
1215
 
@@ -1230,7 +1236,7 @@ EXAMPLES
1230
1236
  $ hereya up
1231
1237
  ```
1232
1238
 
1233
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/up/index.ts)_
1239
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/up/index.ts)_
1234
1240
 
1235
1241
  ## `hereya workspace create NAME`
1236
1242
 
@@ -1255,7 +1261,7 @@ EXAMPLES
1255
1261
  $ hereya workspace create dev
1256
1262
  ```
1257
1263
 
1258
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/create/index.ts)_
1264
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/create/index.ts)_
1259
1265
 
1260
1266
  ## `hereya workspace delete NAME`
1261
1267
 
@@ -1275,7 +1281,7 @@ EXAMPLES
1275
1281
  $ hereya workspace delete dev
1276
1282
  ```
1277
1283
 
1278
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/delete/index.ts)_
1284
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/delete/index.ts)_
1279
1285
 
1280
1286
  ## `hereya workspace env [NAME]`
1281
1287
 
@@ -1301,7 +1307,7 @@ EXAMPLES
1301
1307
  $ hereya workspace env myEnv -w dev
1302
1308
  ```
1303
1309
 
1304
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/env/index.ts)_
1310
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/env/index.ts)_
1305
1311
 
1306
1312
  ## `hereya workspace env set`
1307
1313
 
@@ -1325,7 +1331,7 @@ EXAMPLES
1325
1331
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
1326
1332
  ```
1327
1333
 
1328
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/env/set/index.ts)_
1334
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/env/set/index.ts)_
1329
1335
 
1330
1336
  ## `hereya workspace env unset`
1331
1337
 
@@ -1346,7 +1352,7 @@ EXAMPLES
1346
1352
  $ hereya workspace env unset -w my-workspace -n myVar
1347
1353
  ```
1348
1354
 
1349
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/env/unset/index.ts)_
1355
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/env/unset/index.ts)_
1350
1356
 
1351
1357
  ## `hereya workspace executor install`
1352
1358
 
@@ -1365,7 +1371,7 @@ DESCRIPTION
1365
1371
  Install a remote executor into a workspace
1366
1372
  ```
1367
1373
 
1368
- _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/executor/install/index.ts)_
1374
+ _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/executor/install/index.ts)_
1369
1375
 
1370
1376
  ## `hereya workspace executor token`
1371
1377
 
@@ -1382,7 +1388,7 @@ DESCRIPTION
1382
1388
  Generate a workspace-scoped executor token for the remote executor
1383
1389
  ```
1384
1390
 
1385
- _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/executor/token/index.ts)_
1391
+ _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/executor/token/index.ts)_
1386
1392
 
1387
1393
  ## `hereya workspace executor uninstall`
1388
1394
 
@@ -1400,7 +1406,7 @@ DESCRIPTION
1400
1406
  Uninstall the remote executor from a workspace
1401
1407
  ```
1402
1408
 
1403
- _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/executor/uninstall/index.ts)_
1409
+ _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/executor/uninstall/index.ts)_
1404
1410
 
1405
1411
  ## `hereya workspace install PACKAGE`
1406
1412
 
@@ -1427,7 +1433,7 @@ EXAMPLES
1427
1433
  $ hereya workspace install hereya/aws-cognito
1428
1434
  ```
1429
1435
 
1430
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/install/index.ts)_
1436
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/install/index.ts)_
1431
1437
 
1432
1438
  ## `hereya workspace list`
1433
1439
 
@@ -1451,7 +1457,7 @@ EXAMPLES
1451
1457
  $ hereya workspace list --org personal
1452
1458
  ```
1453
1459
 
1454
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/list/index.ts)_
1460
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/list/index.ts)_
1455
1461
 
1456
1462
  ## `hereya workspace set-profile PROFILE`
1457
1463
 
@@ -1475,7 +1481,7 @@ EXAMPLES
1475
1481
  $ hereya workspace set-profile prod-profile -w production
1476
1482
  ```
1477
1483
 
1478
- _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/set-profile/index.ts)_
1484
+ _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/set-profile/index.ts)_
1479
1485
 
1480
1486
  ## `hereya workspace uninstall PACKAGE`
1481
1487
 
@@ -1502,5 +1508,5 @@ EXAMPLES
1502
1508
  $ hereya workspace uninstall hereya/aws-cognito
1503
1509
  ```
1504
1510
 
1505
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.3/src/commands/workspace/uninstall/index.ts)_
1511
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.74.0/src/commands/workspace/uninstall/index.ts)_
1506
1512
  <!-- commandsstop -->
@@ -320,6 +320,9 @@ export type ProjectMetadata = {
320
320
  env?: {
321
321
  [key: string]: string;
322
322
  };
323
+ parameters?: {
324
+ [key: string]: string;
325
+ };
323
326
  template: string;
324
327
  };
325
328
  export type GetProjectMetadataOutput = {
@@ -6,6 +6,7 @@ export default class DevenvProjectInit extends Command {
6
6
  static description: string;
7
7
  static examples: string[];
8
8
  static flags: {
9
+ 'deploy-workspace': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
10
  force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
11
  parameter: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
12
  template: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -21,6 +21,11 @@ export default class DevenvProjectInit extends Command {
21
21
  '<%= config.bin %> <%= command.id %> my-app -w my-workspace -t acme/node-starter -p region=us-east-1',
22
22
  ];
23
23
  static flags = {
24
+ 'deploy-workspace': Flags.string({
25
+ char: 'd',
26
+ description: 'workspace used for deployment (required when using a template)',
27
+ required: false,
28
+ }),
24
29
  force: Flags.boolean({
25
30
  char: 'f',
26
31
  default: false,
@@ -48,6 +53,10 @@ export default class DevenvProjectInit extends Command {
48
53
  const { args, flags } = await this.parse(DevenvProjectInit);
49
54
  const { project } = args;
50
55
  const { force, parameter, template, workspace } = flags;
56
+ const deployWorkspace = flags['deploy-workspace'];
57
+ if (template && !deployWorkspace) {
58
+ this.error('The --deploy-workspace (-d) flag is required when using a template.');
59
+ }
51
60
  const backend = await getBackend();
52
61
  const getWorkspaceEnvOutput = await backend.getWorkspaceEnv({ workspace });
53
62
  if (!getWorkspaceEnvOutput.success) {
@@ -73,13 +82,14 @@ export default class DevenvProjectInit extends Command {
73
82
  await fs.writeFile(tempKeyPath, sshPrivateKey);
74
83
  await setKeyFilePermissions(tempKeyPath);
75
84
  const templateFlag = template ? ` -t ${template}` : '';
85
+ const deployFlag = deployWorkspace ? ` -d ${deployWorkspace}` : '';
76
86
  const paramFlags = (parameter ?? []).map((p) => ` -p ${p}`).join('');
77
87
  let remoteScript;
78
88
  if (template) {
79
89
  // With template: hereya init creates dir via git clone, no need for mkdir
80
90
  remoteScript = force
81
- ? `cd ~ && hereya init ${project} -w ${workspace}${templateFlag}${paramFlags}`
82
- : `if [ -d ~/${project} ]; then echo "ERROR: Folder ~/${project} already exists. Use --force to continue." && exit 1; fi && cd ~ && hereya init ${project} -w ${workspace}${templateFlag}${paramFlags}`;
91
+ ? `cd ~ && hereya init ${project} -w ${workspace}${templateFlag}${deployFlag}${paramFlags}`
92
+ : `if [ -d ~/${project} ]; then echo "ERROR: Folder ~/${project} already exists. Use --force to continue." && exit 1; fi && cd ~ && hereya init ${project} -w ${workspace}${templateFlag}${deployFlag}${paramFlags}`;
83
93
  }
84
94
  else {
85
95
  // Without template: existing behavior (mkdir + cd + init)
@@ -7,6 +7,7 @@ export default class Init extends Command {
7
7
  static examples: string[];
8
8
  static flags: {
9
9
  chdir: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ 'deploy-workspace': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
11
  parameter: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
11
12
  template: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
13
  workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
@@ -17,14 +17,19 @@ export default class Init extends Command {
17
17
  static examples = [
18
18
  '<%= config.bin %> <%= command.id %> myProject -w=defaultWorkspace',
19
19
  '<%= config.bin %> <%= command.id %> myProject -w=defaultWorkspace --chdir=./myProject',
20
- '<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter',
21
- '<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter -p region=us-east-1',
20
+ '<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter -d=prod',
21
+ '<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1',
22
22
  ];
23
23
  static flags = {
24
24
  chdir: Flags.string({
25
25
  description: 'directory to run command in',
26
26
  required: false,
27
27
  }),
28
+ 'deploy-workspace': Flags.string({
29
+ char: 'd',
30
+ description: 'workspace used for deployment (required when using a template)',
31
+ required: false,
32
+ }),
28
33
  parameter: Flags.string({
29
34
  char: 'p',
30
35
  default: [],
@@ -47,6 +52,9 @@ export default class Init extends Command {
47
52
  const projectRootDir = flags.chdir || process.env.HEREYA_PROJECT_ROOT_DIR;
48
53
  // Template flow
49
54
  if (flags.template) {
55
+ if (!flags['deploy-workspace']) {
56
+ this.error('The --deploy-workspace (-d) flag is required when using a template.');
57
+ }
50
58
  const targetDir = projectRootDir || path.join(process.cwd(), args.project.replaceAll('/', '-'));
51
59
  if (fs.existsSync(targetDir)) {
52
60
  this.error(`Directory ${targetDir} already exists.`);
@@ -66,15 +74,17 @@ export default class Init extends Command {
66
74
  throw new Error(executor$.reason);
67
75
  const userParams = arrayOfStringToObject(flags.parameter);
68
76
  const tokenResult = await hereyaTokenUtils.generateHereyaToken(`Template: ${args.project}`);
77
+ ctx.parameters = {
78
+ ...userParams,
79
+ deployWorkspace: flags['deploy-workspace'],
80
+ projectName: args.project,
81
+ workspace: flags.workspace,
82
+ ...(tokenResult ? { hereyaCloudUrl: tokenResult.cloudUrl, hereyaToken: tokenResult.token } : {}),
83
+ };
69
84
  const provisionOutput = await executor$.executor.provision({
70
85
  logger: getLogger(task),
71
86
  package: flags.template,
72
- parameters: {
73
- ...userParams,
74
- projectName: args.project,
75
- workspace: flags.workspace,
76
- ...(tokenResult ? { hereyaCloudUrl: tokenResult.cloudUrl, hereyaToken: tokenResult.token } : {}),
77
- },
87
+ parameters: ctx.parameters,
78
88
  project: args.project,
79
89
  workspace: flags.workspace,
80
90
  });
@@ -94,7 +104,7 @@ export default class Init extends Command {
94
104
  throw new Error('Templates require cloud backend. Run `hereya login` first.');
95
105
  }
96
106
  const result = await backend.saveProjectMetadata({
97
- metadata: { env: ctx.prefixedEnv, template: flags.template },
107
+ metadata: { env: ctx.prefixedEnv, parameters: ctx.parameters, template: flags.template },
98
108
  project: args.project,
99
109
  });
100
110
  if (!result.success)
@@ -7,6 +7,7 @@ export default class Uninit extends Command {
7
7
  static examples: string[];
8
8
  static flags: {
9
9
  chdir: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
10
+ parameter: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
10
11
  workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
12
  };
12
13
  run(): Promise<void>;
@@ -4,6 +4,7 @@ import { getBackend } from '../../backend/index.js';
4
4
  import { getExecutorForWorkspace } from '../../executor/context.js';
5
5
  import { getConfigManager } from '../../lib/config/index.js';
6
6
  import { getLogger, getLogPath, isDebug } from '../../lib/log.js';
7
+ import { arrayOfStringToObject } from '../../lib/object-utils.js';
7
8
  export default class Uninit extends Command {
8
9
  static args = {
9
10
  project: Args.string({ description: 'project name', required: true }),
@@ -11,12 +12,19 @@ export default class Uninit extends Command {
11
12
  static description = 'Destroy template infrastructure and uninitialize a project.';
12
13
  static examples = [
13
14
  '<%= config.bin %> <%= command.id %> myProject -w dev',
15
+ '<%= config.bin %> <%= command.id %> myProject -w dev -p prodWorkspace=prod',
14
16
  ];
15
17
  static flags = {
16
18
  chdir: Flags.string({
17
19
  description: 'directory to run command in',
18
20
  required: false,
19
21
  }),
22
+ parameter: Flags.string({
23
+ char: 'p',
24
+ default: [],
25
+ description: "parameter for the template, in the form of 'key=value'. Overrides saved parameters.",
26
+ multiple: true,
27
+ }),
20
28
  workspace: Flags.string({
21
29
  char: 'w',
22
30
  description: 'workspace used during init',
@@ -47,9 +55,13 @@ export default class Uninit extends Command {
47
55
  const executor$ = await getExecutorForWorkspace(flags.workspace, args.project);
48
56
  if (!executor$.success)
49
57
  throw new Error(executor$.reason);
58
+ // Merge saved parameters with -p overrides (overrides take precedence)
59
+ const userParams = arrayOfStringToObject(flags.parameter);
60
+ const parameters = { ...ctx.metadata.parameters, ...userParams };
50
61
  const destroyOutput = await executor$.executor.destroy({
51
62
  logger: getLogger(task),
52
63
  package: ctx.metadata.template,
64
+ parameters,
53
65
  project: args.project,
54
66
  workspace: flags.workspace,
55
67
  });
@@ -488,8 +488,8 @@
488
488
  "examples": [
489
489
  "<%= config.bin %> <%= command.id %> myProject -w=defaultWorkspace",
490
490
  "<%= config.bin %> <%= command.id %> myProject -w=defaultWorkspace --chdir=./myProject",
491
- "<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter",
492
- "<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter -p region=us-east-1"
491
+ "<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter -d=prod",
492
+ "<%= config.bin %> <%= command.id %> myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1"
493
493
  ],
494
494
  "flags": {
495
495
  "chdir": {
@@ -500,6 +500,15 @@
500
500
  "multiple": false,
501
501
  "type": "option"
502
502
  },
503
+ "deploy-workspace": {
504
+ "char": "d",
505
+ "description": "workspace used for deployment (required when using a template)",
506
+ "name": "deploy-workspace",
507
+ "required": false,
508
+ "hasDynamicHelp": false,
509
+ "multiple": false,
510
+ "type": "option"
511
+ },
503
512
  "parameter": {
504
513
  "char": "p",
505
514
  "description": "template parameter, in the form of 'key=value'. Can be specified multiple times.",
@@ -957,7 +966,8 @@
957
966
  },
958
967
  "description": "Destroy template infrastructure and uninitialize a project.",
959
968
  "examples": [
960
- "<%= config.bin %> <%= command.id %> myProject -w dev"
969
+ "<%= config.bin %> <%= command.id %> myProject -w dev",
970
+ "<%= config.bin %> <%= command.id %> myProject -w dev -p prodWorkspace=prod"
961
971
  ],
962
972
  "flags": {
963
973
  "chdir": {
@@ -968,6 +978,15 @@
968
978
  "multiple": false,
969
979
  "type": "option"
970
980
  },
981
+ "parameter": {
982
+ "char": "p",
983
+ "description": "parameter for the template, in the form of 'key=value'. Overrides saved parameters.",
984
+ "name": "parameter",
985
+ "default": [],
986
+ "hasDynamicHelp": false,
987
+ "multiple": true,
988
+ "type": "option"
989
+ },
971
990
  "workspace": {
972
991
  "char": "w",
973
992
  "description": "workspace used during init",
@@ -2339,6 +2358,15 @@
2339
2358
  "<%= config.bin %> <%= command.id %> my-app -w my-workspace -t acme/node-starter -p region=us-east-1"
2340
2359
  ],
2341
2360
  "flags": {
2361
+ "deploy-workspace": {
2362
+ "char": "d",
2363
+ "description": "workspace used for deployment (required when using a template)",
2364
+ "name": "deploy-workspace",
2365
+ "required": false,
2366
+ "hasDynamicHelp": false,
2367
+ "multiple": false,
2368
+ "type": "option"
2369
+ },
2342
2370
  "force": {
2343
2371
  "char": "f",
2344
2372
  "description": "continue even if folder already exists",
@@ -2745,5 +2773,5 @@
2745
2773
  ]
2746
2774
  }
2747
2775
  },
2748
- "version": "0.73.3"
2776
+ "version": "0.74.0"
2749
2777
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.73.3",
4
+ "version": "0.74.0",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"