hereya-cli 0.57.0 → 0.57.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -38
- package/dist/infrastructure/aws.js +2 -2
- package/dist/infrastructure/common.d.ts +2 -2
- package/dist/infrastructure/common.js +2 -3
- package/dist/infrastructure/index.js +5 -1
- package/dist/infrastructure/local.js +2 -2
- package/oclif.manifest.json +18 -18
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g hereya-cli
|
|
|
20
20
|
$ hereya COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ hereya (--version)
|
|
23
|
-
hereya-cli/0.57.
|
|
23
|
+
hereya-cli/0.57.2 linux-x64 node-v22.19.0
|
|
24
24
|
$ hereya --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hereya COMMAND
|
|
@@ -100,7 +100,7 @@ EXAMPLES
|
|
|
100
100
|
$ hereya add cloudy/docker_postgres
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
103
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/add/index.ts)_
|
|
104
104
|
|
|
105
105
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
106
106
|
|
|
@@ -125,7 +125,7 @@ EXAMPLES
|
|
|
125
125
|
$ hereya bootstrap local
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
128
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/bootstrap/index.ts)_
|
|
129
129
|
|
|
130
130
|
## `hereya config export-backend [FILE]`
|
|
131
131
|
|
|
@@ -147,7 +147,7 @@ EXAMPLES
|
|
|
147
147
|
$ hereya config export-backend ./path/to/export.json
|
|
148
148
|
```
|
|
149
149
|
|
|
150
|
-
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
150
|
+
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/config/export-backend/index.ts)_
|
|
151
151
|
|
|
152
152
|
## `hereya config get-backend`
|
|
153
153
|
|
|
@@ -164,7 +164,7 @@ EXAMPLES
|
|
|
164
164
|
$ hereya config get-backend
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
167
|
+
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/config/get-backend/index.ts)_
|
|
168
168
|
|
|
169
169
|
## `hereya config import-backend FILE`
|
|
170
170
|
|
|
@@ -184,7 +184,7 @@ EXAMPLES
|
|
|
184
184
|
$ hereya config import-backend ./path/to/cloud-backend.json
|
|
185
185
|
```
|
|
186
186
|
|
|
187
|
-
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
187
|
+
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/config/import-backend/index.ts)_
|
|
188
188
|
|
|
189
189
|
## `hereya config use-backend TYPE`
|
|
190
190
|
|
|
@@ -206,7 +206,7 @@ EXAMPLES
|
|
|
206
206
|
$ hereya config use-backend local
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
209
|
+
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/config/use-backend/index.ts)_
|
|
210
210
|
|
|
211
211
|
## `hereya delete-state`
|
|
212
212
|
|
|
@@ -232,7 +232,7 @@ EXAMPLES
|
|
|
232
232
|
$ hereya delete-state --workspace staging
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
235
|
+
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/delete-state/index.ts)_
|
|
236
236
|
|
|
237
237
|
## `hereya deploy`
|
|
238
238
|
|
|
@@ -257,7 +257,7 @@ EXAMPLES
|
|
|
257
257
|
$ hereya deploy
|
|
258
258
|
```
|
|
259
259
|
|
|
260
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
260
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/deploy/index.ts)_
|
|
261
261
|
|
|
262
262
|
## `hereya doc PACKAGE`
|
|
263
263
|
|
|
@@ -290,7 +290,7 @@ EXAMPLES
|
|
|
290
290
|
$ hereya doc my-package --no-doc
|
|
291
291
|
```
|
|
292
292
|
|
|
293
|
-
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
293
|
+
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/doc/index.ts)_
|
|
294
294
|
|
|
295
295
|
## `hereya down`
|
|
296
296
|
|
|
@@ -317,7 +317,7 @@ EXAMPLES
|
|
|
317
317
|
$ hereya down
|
|
318
318
|
```
|
|
319
319
|
|
|
320
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
320
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/down/index.ts)_
|
|
321
321
|
|
|
322
322
|
## `hereya env [NAME]`
|
|
323
323
|
|
|
@@ -348,7 +348,7 @@ EXAMPLES
|
|
|
348
348
|
$ hereya env -w dev -l
|
|
349
349
|
```
|
|
350
350
|
|
|
351
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
351
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/env/index.ts)_
|
|
352
352
|
|
|
353
353
|
## `hereya env set [NAME]`
|
|
354
354
|
|
|
@@ -375,7 +375,7 @@ EXAMPLES
|
|
|
375
375
|
$ hereya env set FOO -v bar -w dev
|
|
376
376
|
```
|
|
377
377
|
|
|
378
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
378
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/env/set/index.ts)_
|
|
379
379
|
|
|
380
380
|
## `hereya flow add PACKAGE`
|
|
381
381
|
|
|
@@ -413,7 +413,7 @@ EXAMPLES
|
|
|
413
413
|
$ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
|
|
414
414
|
```
|
|
415
415
|
|
|
416
|
-
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
416
|
+
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/flow/add/index.ts)_
|
|
417
417
|
|
|
418
418
|
## `hereya flow down`
|
|
419
419
|
|
|
@@ -447,7 +447,7 @@ EXAMPLES
|
|
|
447
447
|
$ hereya flow down --pin
|
|
448
448
|
```
|
|
449
449
|
|
|
450
|
-
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
450
|
+
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/flow/down/index.ts)_
|
|
451
451
|
|
|
452
452
|
## `hereya flow env [NAME]`
|
|
453
453
|
|
|
@@ -481,7 +481,7 @@ EXAMPLES
|
|
|
481
481
|
$ hereya flow env -l
|
|
482
482
|
```
|
|
483
483
|
|
|
484
|
-
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
484
|
+
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/flow/env/index.ts)_
|
|
485
485
|
|
|
486
486
|
## `hereya flow remove PACKAGE`
|
|
487
487
|
|
|
@@ -511,7 +511,7 @@ EXAMPLES
|
|
|
511
511
|
$ hereya flow remove cloudy/docker_postgres --profile staging
|
|
512
512
|
```
|
|
513
513
|
|
|
514
|
-
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
514
|
+
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/flow/remove/index.ts)_
|
|
515
515
|
|
|
516
516
|
## `hereya flow run CMD`
|
|
517
517
|
|
|
@@ -540,7 +540,7 @@ EXAMPLES
|
|
|
540
540
|
$ hereya flow run --pin -- npm test
|
|
541
541
|
```
|
|
542
542
|
|
|
543
|
-
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
543
|
+
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/flow/run/index.ts)_
|
|
544
544
|
|
|
545
545
|
## `hereya flow up`
|
|
546
546
|
|
|
@@ -574,7 +574,7 @@ EXAMPLES
|
|
|
574
574
|
$ hereya flow up --pin
|
|
575
575
|
```
|
|
576
576
|
|
|
577
|
-
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
577
|
+
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/flow/up/index.ts)_
|
|
578
578
|
|
|
579
579
|
## `hereya help [COMMAND]`
|
|
580
580
|
|
|
@@ -631,7 +631,7 @@ EXAMPLES
|
|
|
631
631
|
$ hereya import org/my-package -f state.tfstate -w my-workspace
|
|
632
632
|
```
|
|
633
633
|
|
|
634
|
-
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
634
|
+
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/import/index.ts)_
|
|
635
635
|
|
|
636
636
|
## `hereya init PROJECT`
|
|
637
637
|
|
|
@@ -657,7 +657,7 @@ EXAMPLES
|
|
|
657
657
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
658
658
|
```
|
|
659
659
|
|
|
660
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
660
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/init/index.ts)_
|
|
661
661
|
|
|
662
662
|
## `hereya login [URL]`
|
|
663
663
|
|
|
@@ -686,7 +686,7 @@ EXAMPLES
|
|
|
686
686
|
$ hereya login --token=your-token https://cloud.hereya.dev
|
|
687
687
|
```
|
|
688
688
|
|
|
689
|
-
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
689
|
+
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/login/index.ts)_
|
|
690
690
|
|
|
691
691
|
## `hereya logout`
|
|
692
692
|
|
|
@@ -703,7 +703,7 @@ EXAMPLES
|
|
|
703
703
|
$ hereya logout
|
|
704
704
|
```
|
|
705
705
|
|
|
706
|
-
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
706
|
+
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/logout/index.ts)_
|
|
707
707
|
|
|
708
708
|
## `hereya publish`
|
|
709
709
|
|
|
@@ -726,7 +726,7 @@ EXAMPLES
|
|
|
726
726
|
$ hereya publish --chdir=/path/to/package
|
|
727
727
|
```
|
|
728
728
|
|
|
729
|
-
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
729
|
+
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/publish/index.ts)_
|
|
730
730
|
|
|
731
731
|
## `hereya remove PACKAGE`
|
|
732
732
|
|
|
@@ -754,7 +754,7 @@ EXAMPLES
|
|
|
754
754
|
$ hereya remove cloudy/docker_postgres
|
|
755
755
|
```
|
|
756
756
|
|
|
757
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
757
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/remove/index.ts)_
|
|
758
758
|
|
|
759
759
|
## `hereya run CMD`
|
|
760
760
|
|
|
@@ -780,7 +780,7 @@ EXAMPLES
|
|
|
780
780
|
$ hereya run -w uat -- node index.js
|
|
781
781
|
```
|
|
782
782
|
|
|
783
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
783
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/run/index.ts)_
|
|
784
784
|
|
|
785
785
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
786
786
|
|
|
@@ -805,7 +805,7 @@ EXAMPLES
|
|
|
805
805
|
$ hereya unbootstrap local
|
|
806
806
|
```
|
|
807
807
|
|
|
808
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
808
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/unbootstrap/index.ts)_
|
|
809
809
|
|
|
810
810
|
## `hereya undeploy`
|
|
811
811
|
|
|
@@ -830,7 +830,7 @@ EXAMPLES
|
|
|
830
830
|
$ hereya undeploy
|
|
831
831
|
```
|
|
832
832
|
|
|
833
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
833
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/undeploy/index.ts)_
|
|
834
834
|
|
|
835
835
|
## `hereya up`
|
|
836
836
|
|
|
@@ -857,7 +857,7 @@ EXAMPLES
|
|
|
857
857
|
$ hereya up
|
|
858
858
|
```
|
|
859
859
|
|
|
860
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
860
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/up/index.ts)_
|
|
861
861
|
|
|
862
862
|
## `hereya workspace create NAME`
|
|
863
863
|
|
|
@@ -882,7 +882,7 @@ EXAMPLES
|
|
|
882
882
|
$ hereya workspace create dev
|
|
883
883
|
```
|
|
884
884
|
|
|
885
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
885
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/create/index.ts)_
|
|
886
886
|
|
|
887
887
|
## `hereya workspace delete NAME`
|
|
888
888
|
|
|
@@ -902,7 +902,7 @@ EXAMPLES
|
|
|
902
902
|
$ hereya workspace delete dev
|
|
903
903
|
```
|
|
904
904
|
|
|
905
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
905
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/delete/index.ts)_
|
|
906
906
|
|
|
907
907
|
## `hereya workspace env [NAME]`
|
|
908
908
|
|
|
@@ -928,7 +928,7 @@ EXAMPLES
|
|
|
928
928
|
$ hereya workspace env myEnv -w dev
|
|
929
929
|
```
|
|
930
930
|
|
|
931
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
931
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/env/index.ts)_
|
|
932
932
|
|
|
933
933
|
## `hereya workspace env set`
|
|
934
934
|
|
|
@@ -952,7 +952,7 @@ EXAMPLES
|
|
|
952
952
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
953
953
|
```
|
|
954
954
|
|
|
955
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
955
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/env/set/index.ts)_
|
|
956
956
|
|
|
957
957
|
## `hereya workspace env unset`
|
|
958
958
|
|
|
@@ -973,7 +973,7 @@ EXAMPLES
|
|
|
973
973
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
974
974
|
```
|
|
975
975
|
|
|
976
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
976
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/env/unset/index.ts)_
|
|
977
977
|
|
|
978
978
|
## `hereya workspace install PACKAGE`
|
|
979
979
|
|
|
@@ -1000,7 +1000,7 @@ EXAMPLES
|
|
|
1000
1000
|
$ hereya workspace install hereya/aws-cognito
|
|
1001
1001
|
```
|
|
1002
1002
|
|
|
1003
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
1003
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/install/index.ts)_
|
|
1004
1004
|
|
|
1005
1005
|
## `hereya workspace list`
|
|
1006
1006
|
|
|
@@ -1017,7 +1017,7 @@ EXAMPLES
|
|
|
1017
1017
|
$ hereya workspace list
|
|
1018
1018
|
```
|
|
1019
1019
|
|
|
1020
|
-
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
1020
|
+
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/list/index.ts)_
|
|
1021
1021
|
|
|
1022
1022
|
## `hereya workspace set-profile PROFILE`
|
|
1023
1023
|
|
|
@@ -1041,7 +1041,7 @@ EXAMPLES
|
|
|
1041
1041
|
$ hereya workspace set-profile prod-profile -w production
|
|
1042
1042
|
```
|
|
1043
1043
|
|
|
1044
|
-
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
1044
|
+
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/set-profile/index.ts)_
|
|
1045
1045
|
|
|
1046
1046
|
## `hereya workspace uninstall PACKAGE`
|
|
1047
1047
|
|
|
@@ -1068,5 +1068,5 @@ EXAMPLES
|
|
|
1068
1068
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
1069
1069
|
```
|
|
1070
1070
|
|
|
1071
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.
|
|
1071
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.57.2/src/commands/workspace/uninstall/index.ts)_
|
|
1072
1072
|
<!-- commandsstop -->
|
|
@@ -41,7 +41,7 @@ export class AwsInfrastructure {
|
|
|
41
41
|
return this.provision(input);
|
|
42
42
|
}
|
|
43
43
|
async destroy(input) {
|
|
44
|
-
const destPath = await getPackageDownloadPath(input);
|
|
44
|
+
const destPath = await getPackageDownloadPath({ id: input.id, version: input.version });
|
|
45
45
|
const downloadPath = await downloadPackage(input.pkgUrl, destPath);
|
|
46
46
|
const region = process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION;
|
|
47
47
|
const infraConfig = {
|
|
@@ -75,7 +75,7 @@ export class AwsInfrastructure {
|
|
|
75
75
|
return { env: output.env, success: true };
|
|
76
76
|
}
|
|
77
77
|
async provision(input) {
|
|
78
|
-
const destPath = await getPackageDownloadPath(input);
|
|
78
|
+
const destPath = await getPackageDownloadPath({ id: input.id, version: input.version });
|
|
79
79
|
const downloadPath = await downloadPackage(input.pkgUrl, destPath);
|
|
80
80
|
const config = await getAwsConfig();
|
|
81
81
|
const terraformStateBucketRegion = config.terraformStateBucketRegion || process.env.AWS_REGION || process.env.AWS_DEFAULT_REGION;
|
|
@@ -2,8 +2,6 @@ import { IacType } from '../iac/common.js';
|
|
|
2
2
|
import { Logger } from '../lib/log.js';
|
|
3
3
|
export declare enum InfrastructureType {
|
|
4
4
|
aws = "aws",
|
|
5
|
-
azure = "azure",
|
|
6
|
-
gcp = "gcp",
|
|
7
5
|
local = "local"
|
|
8
6
|
}
|
|
9
7
|
export interface Infrastructure {
|
|
@@ -21,6 +19,7 @@ export interface Infrastructure {
|
|
|
21
19
|
}
|
|
22
20
|
export declare function getPackageDownloadPath(input: {
|
|
23
21
|
id: string;
|
|
22
|
+
version?: string;
|
|
24
23
|
}): Promise<string>;
|
|
25
24
|
export type BootstrapInput = {
|
|
26
25
|
force?: boolean;
|
|
@@ -38,6 +37,7 @@ export type ProvisionInput = {
|
|
|
38
37
|
};
|
|
39
38
|
pkgName: string;
|
|
40
39
|
pkgUrl: string;
|
|
40
|
+
version?: string;
|
|
41
41
|
};
|
|
42
42
|
export type ProvisionOutput = {
|
|
43
43
|
env: {
|
|
@@ -3,10 +3,9 @@ import path from 'node:path';
|
|
|
3
3
|
export var InfrastructureType;
|
|
4
4
|
(function (InfrastructureType) {
|
|
5
5
|
InfrastructureType["aws"] = "aws";
|
|
6
|
-
InfrastructureType["azure"] = "azure";
|
|
7
|
-
InfrastructureType["gcp"] = "gcp";
|
|
8
6
|
InfrastructureType["local"] = "local";
|
|
9
7
|
})(InfrastructureType || (InfrastructureType = {}));
|
|
10
8
|
export async function getPackageDownloadPath(input) {
|
|
11
|
-
|
|
9
|
+
const versionFolder = input.version || 'latest';
|
|
10
|
+
return path.join(os.homedir(), '.hereya', 'packages', input.id, versionFolder);
|
|
12
11
|
}
|
|
@@ -22,7 +22,7 @@ export function getInfrastructure(input) {
|
|
|
22
22
|
}
|
|
23
23
|
default: {
|
|
24
24
|
return {
|
|
25
|
-
reason: `
|
|
25
|
+
reason: `Invalid infrastructure type: ${input.type}. Valid options are: aws, local`,
|
|
26
26
|
supported: false,
|
|
27
27
|
};
|
|
28
28
|
}
|
|
@@ -65,6 +65,7 @@ export async function destroyPackage(input) {
|
|
|
65
65
|
pkgUrl: packageUri,
|
|
66
66
|
projectEnv: input.projectEnv ?? {},
|
|
67
67
|
projectRootDir: input.projectRootDir,
|
|
68
|
+
version,
|
|
68
69
|
})
|
|
69
70
|
: await infrastructure.destroy({
|
|
70
71
|
canonicalName,
|
|
@@ -75,6 +76,7 @@ export async function destroyPackage(input) {
|
|
|
75
76
|
parameters: input.parameters,
|
|
76
77
|
pkgName,
|
|
77
78
|
pkgUrl: packageUri,
|
|
79
|
+
version,
|
|
78
80
|
});
|
|
79
81
|
if (!destroyOutput.success) {
|
|
80
82
|
return { reason: destroyOutput.reason, success: false };
|
|
@@ -153,6 +155,7 @@ export async function provisionPackage(input) {
|
|
|
153
155
|
pkgUrl: packageUri,
|
|
154
156
|
projectEnv: input.projectEnv ?? {},
|
|
155
157
|
projectRootDir: input.projectRootDir,
|
|
158
|
+
version,
|
|
156
159
|
})
|
|
157
160
|
: await infrastructure.provision({
|
|
158
161
|
canonicalName,
|
|
@@ -163,6 +166,7 @@ export async function provisionPackage(input) {
|
|
|
163
166
|
parameters: input.parameters,
|
|
164
167
|
pkgName,
|
|
165
168
|
pkgUrl: packageUri,
|
|
169
|
+
version,
|
|
166
170
|
});
|
|
167
171
|
if (!provisionOutput.success) {
|
|
168
172
|
return { reason: provisionOutput.reason, success: false };
|
|
@@ -15,7 +15,7 @@ export class LocalInfrastructure {
|
|
|
15
15
|
return this.provision(input);
|
|
16
16
|
}
|
|
17
17
|
async destroy(input) {
|
|
18
|
-
const destPath = await getPackageDownloadPath(input);
|
|
18
|
+
const destPath = await getPackageDownloadPath({ id: input.id, version: input.version });
|
|
19
19
|
const downloadPath = await downloadPackage(input.pkgUrl, destPath);
|
|
20
20
|
const iac$ = getIac({ type: input.iacType });
|
|
21
21
|
if (!iac$.supported) {
|
|
@@ -37,7 +37,7 @@ export class LocalInfrastructure {
|
|
|
37
37
|
return { env: output.env, success: true };
|
|
38
38
|
}
|
|
39
39
|
async provision(input) {
|
|
40
|
-
const destPath = await getPackageDownloadPath(input);
|
|
40
|
+
const destPath = await getPackageDownloadPath({ id: input.id, version: input.version });
|
|
41
41
|
const downloadPath = await downloadPackage(input.pkgUrl, destPath);
|
|
42
42
|
const iac$ = getIac({ type: input.iacType });
|
|
43
43
|
if (!iac$.supported) {
|
package/oclif.manifest.json
CHANGED
|
@@ -909,23 +909,24 @@
|
|
|
909
909
|
"index.js"
|
|
910
910
|
]
|
|
911
911
|
},
|
|
912
|
-
"config:
|
|
912
|
+
"config:use-backend": {
|
|
913
913
|
"aliases": [],
|
|
914
914
|
"args": {
|
|
915
|
-
"
|
|
916
|
-
"description": "
|
|
917
|
-
"name": "
|
|
915
|
+
"type": {
|
|
916
|
+
"description": "type of backend to use. Possible values: s3, local",
|
|
917
|
+
"name": "type",
|
|
918
918
|
"required": true
|
|
919
919
|
}
|
|
920
920
|
},
|
|
921
|
-
"description": "
|
|
921
|
+
"description": "set the current backend type",
|
|
922
922
|
"examples": [
|
|
923
|
-
"<%= config.bin %> <%= command.id %>
|
|
923
|
+
"<%= config.bin %> <%= command.id %> s3",
|
|
924
|
+
"<%= config.bin %> <%= command.id %> local"
|
|
924
925
|
],
|
|
925
926
|
"flags": {},
|
|
926
927
|
"hasDynamicHelp": false,
|
|
927
928
|
"hiddenAliases": [],
|
|
928
|
-
"id": "config:
|
|
929
|
+
"id": "config:use-backend",
|
|
929
930
|
"pluginAlias": "hereya-cli",
|
|
930
931
|
"pluginName": "hereya-cli",
|
|
931
932
|
"pluginType": "core",
|
|
@@ -936,28 +937,27 @@
|
|
|
936
937
|
"dist",
|
|
937
938
|
"commands",
|
|
938
939
|
"config",
|
|
939
|
-
"
|
|
940
|
+
"use-backend",
|
|
940
941
|
"index.js"
|
|
941
942
|
]
|
|
942
943
|
},
|
|
943
|
-
"config:
|
|
944
|
+
"config:import-backend": {
|
|
944
945
|
"aliases": [],
|
|
945
946
|
"args": {
|
|
946
|
-
"
|
|
947
|
-
"description": "
|
|
948
|
-
"name": "
|
|
947
|
+
"file": {
|
|
948
|
+
"description": "Path to the file containing the backend configuration to import",
|
|
949
|
+
"name": "file",
|
|
949
950
|
"required": true
|
|
950
951
|
}
|
|
951
952
|
},
|
|
952
|
-
"description": "
|
|
953
|
+
"description": "Import a backend configuration from a file",
|
|
953
954
|
"examples": [
|
|
954
|
-
"<%= config.bin %> <%= command.id %>
|
|
955
|
-
"<%= config.bin %> <%= command.id %> local"
|
|
955
|
+
"<%= config.bin %> <%= command.id %> ./path/to/cloud-backend.json"
|
|
956
956
|
],
|
|
957
957
|
"flags": {},
|
|
958
958
|
"hasDynamicHelp": false,
|
|
959
959
|
"hiddenAliases": [],
|
|
960
|
-
"id": "config:
|
|
960
|
+
"id": "config:import-backend",
|
|
961
961
|
"pluginAlias": "hereya-cli",
|
|
962
962
|
"pluginName": "hereya-cli",
|
|
963
963
|
"pluginType": "core",
|
|
@@ -968,7 +968,7 @@
|
|
|
968
968
|
"dist",
|
|
969
969
|
"commands",
|
|
970
970
|
"config",
|
|
971
|
-
"
|
|
971
|
+
"import-backend",
|
|
972
972
|
"index.js"
|
|
973
973
|
]
|
|
974
974
|
},
|
|
@@ -1877,5 +1877,5 @@
|
|
|
1877
1877
|
]
|
|
1878
1878
|
}
|
|
1879
1879
|
},
|
|
1880
|
-
"version": "0.57.
|
|
1880
|
+
"version": "0.57.2"
|
|
1881
1881
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hereya-cli",
|
|
3
3
|
"description": "Infrastructure as Package",
|
|
4
|
-
"version": "0.57.
|
|
4
|
+
"version": "0.57.2",
|
|
5
5
|
"author": "Hereya Developers",
|
|
6
6
|
"bin": {
|
|
7
7
|
"hereya": "./bin/run.js"
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"ignore": "^7.0.3",
|
|
25
25
|
"keytar": "^7.9.0",
|
|
26
26
|
"listr2": "^8.2.5",
|
|
27
|
-
"marked": "^
|
|
27
|
+
"marked": "^15.0.12",
|
|
28
28
|
"marked-terminal": "7.3.0",
|
|
29
29
|
"node-machine-id": "^1.1.12",
|
|
30
30
|
"open": "^10.1.1",
|