hereya-cli 0.57.4 → 0.59.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 +70 -38
- package/dist/backend/cloud/cloud-backend.d.ts +2 -1
- package/dist/backend/cloud/cloud-backend.js +43 -0
- package/dist/backend/common.d.ts +14 -0
- package/dist/commands/search/index.d.ts +15 -0
- package/dist/commands/search/index.js +90 -0
- package/dist/executor/local.js +10 -3
- package/dist/lib/env/index.js +6 -3
- package/oclif.manifest.json +60 -1
- package/package.json +1 -1
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.
|
|
23
|
+
hereya-cli/0.59.0 linux-x64 node-v24.13.0
|
|
24
24
|
$ hereya --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hereya COMMAND
|
|
@@ -55,6 +55,7 @@ USAGE
|
|
|
55
55
|
* [`hereya publish`](#hereya-publish)
|
|
56
56
|
* [`hereya remove PACKAGE`](#hereya-remove-package)
|
|
57
57
|
* [`hereya run CMD`](#hereya-run-cmd)
|
|
58
|
+
* [`hereya search QUERY`](#hereya-search-query)
|
|
58
59
|
* [`hereya unbootstrap INFRASTRUCTURETYPE`](#hereya-unbootstrap-infrastructuretype)
|
|
59
60
|
* [`hereya undeploy`](#hereya-undeploy)
|
|
60
61
|
* [`hereya up`](#hereya-up)
|
|
@@ -100,7 +101,7 @@ EXAMPLES
|
|
|
100
101
|
$ hereya add cloudy/docker_postgres
|
|
101
102
|
```
|
|
102
103
|
|
|
103
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
104
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/add/index.ts)_
|
|
104
105
|
|
|
105
106
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
106
107
|
|
|
@@ -125,7 +126,7 @@ EXAMPLES
|
|
|
125
126
|
$ hereya bootstrap local
|
|
126
127
|
```
|
|
127
128
|
|
|
128
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
129
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/bootstrap/index.ts)_
|
|
129
130
|
|
|
130
131
|
## `hereya config export-backend [FILE]`
|
|
131
132
|
|
|
@@ -147,7 +148,7 @@ EXAMPLES
|
|
|
147
148
|
$ hereya config export-backend ./path/to/export.json
|
|
148
149
|
```
|
|
149
150
|
|
|
150
|
-
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
151
|
+
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/config/export-backend/index.ts)_
|
|
151
152
|
|
|
152
153
|
## `hereya config get-backend`
|
|
153
154
|
|
|
@@ -164,7 +165,7 @@ EXAMPLES
|
|
|
164
165
|
$ hereya config get-backend
|
|
165
166
|
```
|
|
166
167
|
|
|
167
|
-
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
168
|
+
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/config/get-backend/index.ts)_
|
|
168
169
|
|
|
169
170
|
## `hereya config import-backend FILE`
|
|
170
171
|
|
|
@@ -184,7 +185,7 @@ EXAMPLES
|
|
|
184
185
|
$ hereya config import-backend ./path/to/cloud-backend.json
|
|
185
186
|
```
|
|
186
187
|
|
|
187
|
-
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
188
|
+
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/config/import-backend/index.ts)_
|
|
188
189
|
|
|
189
190
|
## `hereya config use-backend TYPE`
|
|
190
191
|
|
|
@@ -206,7 +207,7 @@ EXAMPLES
|
|
|
206
207
|
$ hereya config use-backend local
|
|
207
208
|
```
|
|
208
209
|
|
|
209
|
-
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
210
|
+
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/config/use-backend/index.ts)_
|
|
210
211
|
|
|
211
212
|
## `hereya delete-state`
|
|
212
213
|
|
|
@@ -232,7 +233,7 @@ EXAMPLES
|
|
|
232
233
|
$ hereya delete-state --workspace staging
|
|
233
234
|
```
|
|
234
235
|
|
|
235
|
-
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
236
|
+
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/delete-state/index.ts)_
|
|
236
237
|
|
|
237
238
|
## `hereya deploy`
|
|
238
239
|
|
|
@@ -257,7 +258,7 @@ EXAMPLES
|
|
|
257
258
|
$ hereya deploy
|
|
258
259
|
```
|
|
259
260
|
|
|
260
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
261
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/deploy/index.ts)_
|
|
261
262
|
|
|
262
263
|
## `hereya doc PACKAGE`
|
|
263
264
|
|
|
@@ -290,7 +291,7 @@ EXAMPLES
|
|
|
290
291
|
$ hereya doc my-package --no-doc
|
|
291
292
|
```
|
|
292
293
|
|
|
293
|
-
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
294
|
+
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/doc/index.ts)_
|
|
294
295
|
|
|
295
296
|
## `hereya down`
|
|
296
297
|
|
|
@@ -317,7 +318,7 @@ EXAMPLES
|
|
|
317
318
|
$ hereya down
|
|
318
319
|
```
|
|
319
320
|
|
|
320
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
321
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/down/index.ts)_
|
|
321
322
|
|
|
322
323
|
## `hereya env [NAME]`
|
|
323
324
|
|
|
@@ -348,7 +349,7 @@ EXAMPLES
|
|
|
348
349
|
$ hereya env -w dev -l
|
|
349
350
|
```
|
|
350
351
|
|
|
351
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
352
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/env/index.ts)_
|
|
352
353
|
|
|
353
354
|
## `hereya env set [NAME]`
|
|
354
355
|
|
|
@@ -375,7 +376,7 @@ EXAMPLES
|
|
|
375
376
|
$ hereya env set FOO -v bar -w dev
|
|
376
377
|
```
|
|
377
378
|
|
|
378
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
379
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/env/set/index.ts)_
|
|
379
380
|
|
|
380
381
|
## `hereya flow add PACKAGE`
|
|
381
382
|
|
|
@@ -413,7 +414,7 @@ EXAMPLES
|
|
|
413
414
|
$ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
|
|
414
415
|
```
|
|
415
416
|
|
|
416
|
-
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
417
|
+
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/flow/add/index.ts)_
|
|
417
418
|
|
|
418
419
|
## `hereya flow down`
|
|
419
420
|
|
|
@@ -447,7 +448,7 @@ EXAMPLES
|
|
|
447
448
|
$ hereya flow down --pin
|
|
448
449
|
```
|
|
449
450
|
|
|
450
|
-
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
451
|
+
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/flow/down/index.ts)_
|
|
451
452
|
|
|
452
453
|
## `hereya flow env [NAME]`
|
|
453
454
|
|
|
@@ -481,7 +482,7 @@ EXAMPLES
|
|
|
481
482
|
$ hereya flow env -l
|
|
482
483
|
```
|
|
483
484
|
|
|
484
|
-
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
485
|
+
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/flow/env/index.ts)_
|
|
485
486
|
|
|
486
487
|
## `hereya flow remove PACKAGE`
|
|
487
488
|
|
|
@@ -511,7 +512,7 @@ EXAMPLES
|
|
|
511
512
|
$ hereya flow remove cloudy/docker_postgres --profile staging
|
|
512
513
|
```
|
|
513
514
|
|
|
514
|
-
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
515
|
+
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/flow/remove/index.ts)_
|
|
515
516
|
|
|
516
517
|
## `hereya flow run CMD`
|
|
517
518
|
|
|
@@ -540,7 +541,7 @@ EXAMPLES
|
|
|
540
541
|
$ hereya flow run --pin -- npm test
|
|
541
542
|
```
|
|
542
543
|
|
|
543
|
-
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
544
|
+
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/flow/run/index.ts)_
|
|
544
545
|
|
|
545
546
|
## `hereya flow up`
|
|
546
547
|
|
|
@@ -574,7 +575,7 @@ EXAMPLES
|
|
|
574
575
|
$ hereya flow up --pin
|
|
575
576
|
```
|
|
576
577
|
|
|
577
|
-
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
578
|
+
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/flow/up/index.ts)_
|
|
578
579
|
|
|
579
580
|
## `hereya help [COMMAND]`
|
|
580
581
|
|
|
@@ -631,7 +632,7 @@ EXAMPLES
|
|
|
631
632
|
$ hereya import org/my-package -f state.tfstate -w my-workspace
|
|
632
633
|
```
|
|
633
634
|
|
|
634
|
-
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
635
|
+
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/import/index.ts)_
|
|
635
636
|
|
|
636
637
|
## `hereya init PROJECT`
|
|
637
638
|
|
|
@@ -657,7 +658,7 @@ EXAMPLES
|
|
|
657
658
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
658
659
|
```
|
|
659
660
|
|
|
660
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
661
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/init/index.ts)_
|
|
661
662
|
|
|
662
663
|
## `hereya login [URL]`
|
|
663
664
|
|
|
@@ -686,7 +687,7 @@ EXAMPLES
|
|
|
686
687
|
$ hereya login --token=your-token https://cloud.hereya.dev
|
|
687
688
|
```
|
|
688
689
|
|
|
689
|
-
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
690
|
+
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/login/index.ts)_
|
|
690
691
|
|
|
691
692
|
## `hereya logout`
|
|
692
693
|
|
|
@@ -703,7 +704,7 @@ EXAMPLES
|
|
|
703
704
|
$ hereya logout
|
|
704
705
|
```
|
|
705
706
|
|
|
706
|
-
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
707
|
+
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/logout/index.ts)_
|
|
707
708
|
|
|
708
709
|
## `hereya publish`
|
|
709
710
|
|
|
@@ -726,7 +727,7 @@ EXAMPLES
|
|
|
726
727
|
$ hereya publish --chdir=/path/to/package
|
|
727
728
|
```
|
|
728
729
|
|
|
729
|
-
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
730
|
+
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/publish/index.ts)_
|
|
730
731
|
|
|
731
732
|
## `hereya remove PACKAGE`
|
|
732
733
|
|
|
@@ -754,7 +755,7 @@ EXAMPLES
|
|
|
754
755
|
$ hereya remove cloudy/docker_postgres
|
|
755
756
|
```
|
|
756
757
|
|
|
757
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
758
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/remove/index.ts)_
|
|
758
759
|
|
|
759
760
|
## `hereya run CMD`
|
|
760
761
|
|
|
@@ -780,7 +781,38 @@ EXAMPLES
|
|
|
780
781
|
$ hereya run -w uat -- node index.js
|
|
781
782
|
```
|
|
782
783
|
|
|
783
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
784
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/run/index.ts)_
|
|
785
|
+
|
|
786
|
+
## `hereya search QUERY`
|
|
787
|
+
|
|
788
|
+
Search for packages in the registry
|
|
789
|
+
|
|
790
|
+
```
|
|
791
|
+
USAGE
|
|
792
|
+
$ hereya search QUERY [-C <value>] [-j] [-l <value>]
|
|
793
|
+
|
|
794
|
+
ARGUMENTS
|
|
795
|
+
QUERY Search query string
|
|
796
|
+
|
|
797
|
+
FLAGS
|
|
798
|
+
-j, --json Output in JSON format
|
|
799
|
+
-l, --limit=<value> [default: 20] Maximum number of results to return
|
|
800
|
+
|
|
801
|
+
GLOBAL FLAGS
|
|
802
|
+
-C, --chdir=<value> [default: .] directory to run command in
|
|
803
|
+
|
|
804
|
+
DESCRIPTION
|
|
805
|
+
Search for packages in the registry
|
|
806
|
+
|
|
807
|
+
EXAMPLES
|
|
808
|
+
$ hereya search postgres
|
|
809
|
+
|
|
810
|
+
$ hereya search redis --limit 5
|
|
811
|
+
|
|
812
|
+
$ hereya search database --json
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/search/index.ts)_
|
|
784
816
|
|
|
785
817
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
786
818
|
|
|
@@ -805,7 +837,7 @@ EXAMPLES
|
|
|
805
837
|
$ hereya unbootstrap local
|
|
806
838
|
```
|
|
807
839
|
|
|
808
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
840
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/unbootstrap/index.ts)_
|
|
809
841
|
|
|
810
842
|
## `hereya undeploy`
|
|
811
843
|
|
|
@@ -830,7 +862,7 @@ EXAMPLES
|
|
|
830
862
|
$ hereya undeploy
|
|
831
863
|
```
|
|
832
864
|
|
|
833
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
865
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/undeploy/index.ts)_
|
|
834
866
|
|
|
835
867
|
## `hereya up`
|
|
836
868
|
|
|
@@ -857,7 +889,7 @@ EXAMPLES
|
|
|
857
889
|
$ hereya up
|
|
858
890
|
```
|
|
859
891
|
|
|
860
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
892
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/up/index.ts)_
|
|
861
893
|
|
|
862
894
|
## `hereya workspace create NAME`
|
|
863
895
|
|
|
@@ -882,7 +914,7 @@ EXAMPLES
|
|
|
882
914
|
$ hereya workspace create dev
|
|
883
915
|
```
|
|
884
916
|
|
|
885
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
917
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/create/index.ts)_
|
|
886
918
|
|
|
887
919
|
## `hereya workspace delete NAME`
|
|
888
920
|
|
|
@@ -902,7 +934,7 @@ EXAMPLES
|
|
|
902
934
|
$ hereya workspace delete dev
|
|
903
935
|
```
|
|
904
936
|
|
|
905
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
937
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/delete/index.ts)_
|
|
906
938
|
|
|
907
939
|
## `hereya workspace env [NAME]`
|
|
908
940
|
|
|
@@ -928,7 +960,7 @@ EXAMPLES
|
|
|
928
960
|
$ hereya workspace env myEnv -w dev
|
|
929
961
|
```
|
|
930
962
|
|
|
931
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
963
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/env/index.ts)_
|
|
932
964
|
|
|
933
965
|
## `hereya workspace env set`
|
|
934
966
|
|
|
@@ -952,7 +984,7 @@ EXAMPLES
|
|
|
952
984
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
953
985
|
```
|
|
954
986
|
|
|
955
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
987
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/env/set/index.ts)_
|
|
956
988
|
|
|
957
989
|
## `hereya workspace env unset`
|
|
958
990
|
|
|
@@ -973,7 +1005,7 @@ EXAMPLES
|
|
|
973
1005
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
974
1006
|
```
|
|
975
1007
|
|
|
976
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1008
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/env/unset/index.ts)_
|
|
977
1009
|
|
|
978
1010
|
## `hereya workspace install PACKAGE`
|
|
979
1011
|
|
|
@@ -1000,7 +1032,7 @@ EXAMPLES
|
|
|
1000
1032
|
$ hereya workspace install hereya/aws-cognito
|
|
1001
1033
|
```
|
|
1002
1034
|
|
|
1003
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1035
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/install/index.ts)_
|
|
1004
1036
|
|
|
1005
1037
|
## `hereya workspace list`
|
|
1006
1038
|
|
|
@@ -1017,7 +1049,7 @@ EXAMPLES
|
|
|
1017
1049
|
$ hereya workspace list
|
|
1018
1050
|
```
|
|
1019
1051
|
|
|
1020
|
-
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1052
|
+
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/list/index.ts)_
|
|
1021
1053
|
|
|
1022
1054
|
## `hereya workspace set-profile PROFILE`
|
|
1023
1055
|
|
|
@@ -1041,7 +1073,7 @@ EXAMPLES
|
|
|
1041
1073
|
$ hereya workspace set-profile prod-profile -w production
|
|
1042
1074
|
```
|
|
1043
1075
|
|
|
1044
|
-
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1076
|
+
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/set-profile/index.ts)_
|
|
1045
1077
|
|
|
1046
1078
|
## `hereya workspace uninstall PACKAGE`
|
|
1047
1079
|
|
|
@@ -1068,5 +1100,5 @@ EXAMPLES
|
|
|
1068
1100
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
1069
1101
|
```
|
|
1070
1102
|
|
|
1071
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1103
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.59.0/src/commands/workspace/uninstall/index.ts)_
|
|
1072
1104
|
<!-- commandsstop -->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Config } from '../../lib/config/common.js';
|
|
2
|
-
import { AddPackageToWorkspaceInput, AddPackageToWorkspaceOutput, Backend, CreateWorkspaceInput, CreateWorkspaceOutput, DeleteStateInput, DeleteStateOutput, DeleteWorkspaceInput, DeleteWorkspaceOutput, ExportBackendOutput, GetPackageOutput, GetProvisioningIdInput, GetProvisioningIdOutput, GetStateInput, GetStateOutput, GetWorkspaceEnvInput, GetWorkspaceEnvOutput, GetWorkspaceOutput, ImportBackendInput, ImportBackendOutput, InitProjectInput, InitProjectOutput, ListPackageVersionsOutput, PublishPackageInput, PublishPackageOutput, RemovePackageFromWorkspaceInput, RemovePackageFromWorkspaceOutput, SetEnvVarInput, SetEnvVarOutput, UnsetEnvVarInput, UnsetEnvVarOutput, UpdateWorkspaceInput, UpdateWorkspaceOutput } from '../common.js';
|
|
2
|
+
import { AddPackageToWorkspaceInput, AddPackageToWorkspaceOutput, Backend, CreateWorkspaceInput, CreateWorkspaceOutput, DeleteStateInput, DeleteStateOutput, DeleteWorkspaceInput, DeleteWorkspaceOutput, ExportBackendOutput, GetPackageOutput, GetProvisioningIdInput, GetProvisioningIdOutput, GetStateInput, GetStateOutput, GetWorkspaceEnvInput, GetWorkspaceEnvOutput, GetWorkspaceOutput, ImportBackendInput, ImportBackendOutput, InitProjectInput, InitProjectOutput, ListPackageVersionsOutput, PublishPackageInput, PublishPackageOutput, RemovePackageFromWorkspaceInput, RemovePackageFromWorkspaceOutput, SearchPackagesInput, SearchPackagesOutput, SetEnvVarInput, SetEnvVarOutput, UnsetEnvVarInput, UnsetEnvVarOutput, UpdateWorkspaceInput, UpdateWorkspaceOutput } from '../common.js';
|
|
3
3
|
interface CloudBackendConfig {
|
|
4
4
|
accessToken: string;
|
|
5
5
|
clientId: string;
|
|
@@ -27,6 +27,7 @@ export declare class CloudBackend implements Backend {
|
|
|
27
27
|
publishPackage(input: PublishPackageInput): Promise<PublishPackageOutput>;
|
|
28
28
|
removePackageFromWorkspace(input: RemovePackageFromWorkspaceInput): Promise<RemovePackageFromWorkspaceOutput>;
|
|
29
29
|
saveState(config: Config, workspace?: string): Promise<void>;
|
|
30
|
+
searchPackages(input: SearchPackagesInput): Promise<SearchPackagesOutput>;
|
|
30
31
|
setEnvVar(input: SetEnvVarInput): Promise<SetEnvVarOutput>;
|
|
31
32
|
unsetEnvVar(input: UnsetEnvVarInput): Promise<UnsetEnvVarOutput>;
|
|
32
33
|
updateWorkspace(input: UpdateWorkspaceInput): Promise<UpdateWorkspaceOutput>;
|
|
@@ -550,6 +550,49 @@ export class CloudBackend {
|
|
|
550
550
|
throw new Error(JSON.stringify(await response.json()));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
+
async searchPackages(input) {
|
|
554
|
+
const url = new URL(`${this.config.url}/api/registry/packages/search`);
|
|
555
|
+
url.searchParams.append('q', input.query);
|
|
556
|
+
if (input.limit !== undefined) {
|
|
557
|
+
url.searchParams.append('limit', String(input.limit));
|
|
558
|
+
}
|
|
559
|
+
if (input.offset !== undefined) {
|
|
560
|
+
url.searchParams.append('offset', String(input.offset));
|
|
561
|
+
}
|
|
562
|
+
const response = await fetch(url, {
|
|
563
|
+
headers: {
|
|
564
|
+
'Authorization': `Bearer ${this.config.accessToken}`,
|
|
565
|
+
},
|
|
566
|
+
method: 'GET',
|
|
567
|
+
});
|
|
568
|
+
const result = await response.json();
|
|
569
|
+
if (!response.ok) {
|
|
570
|
+
let errorMessage = result.error || 'Failed to search packages';
|
|
571
|
+
switch (response.status) {
|
|
572
|
+
case 400: {
|
|
573
|
+
errorMessage = `Invalid search query: ${errorMessage}`;
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
576
|
+
case 401: {
|
|
577
|
+
errorMessage = 'Authentication failed. Please run `hereya login` to refresh your credentials.';
|
|
578
|
+
break;
|
|
579
|
+
}
|
|
580
|
+
case 500: {
|
|
581
|
+
errorMessage = `Server error: ${errorMessage}`;
|
|
582
|
+
break;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
return {
|
|
586
|
+
reason: errorMessage,
|
|
587
|
+
success: false,
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
return {
|
|
591
|
+
hasMore: result.hasMore ?? false,
|
|
592
|
+
packages: result.packages || [],
|
|
593
|
+
success: true,
|
|
594
|
+
};
|
|
595
|
+
}
|
|
553
596
|
async setEnvVar(input) {
|
|
554
597
|
const formData = new FormData();
|
|
555
598
|
formData.append('key', input.name);
|
package/dist/backend/common.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export interface Backend {
|
|
|
20
20
|
publishPackage?(input: PublishPackageInput): Promise<PublishPackageOutput>;
|
|
21
21
|
removePackageFromWorkspace(input: RemovePackageFromWorkspaceInput): Promise<RemovePackageFromWorkspaceOutput>;
|
|
22
22
|
saveState(config: Config, workspace?: string): Promise<void>;
|
|
23
|
+
searchPackages?(input: SearchPackagesInput): Promise<SearchPackagesOutput>;
|
|
23
24
|
setEnvVar(input: SetEnvVarInput): Promise<SetEnvVarOutput>;
|
|
24
25
|
unsetEnvVar(input: UnsetEnvVarInput): Promise<UnsetEnvVarOutput>;
|
|
25
26
|
updateWorkspace(input: UpdateWorkspaceInput): Promise<UpdateWorkspaceOutput>;
|
|
@@ -289,3 +290,16 @@ export type ListPackageVersionsOutput = {
|
|
|
289
290
|
reason: string;
|
|
290
291
|
success: false;
|
|
291
292
|
};
|
|
293
|
+
export type SearchPackagesInput = {
|
|
294
|
+
limit?: number;
|
|
295
|
+
offset?: number;
|
|
296
|
+
query: string;
|
|
297
|
+
};
|
|
298
|
+
export type SearchPackagesOutput = {
|
|
299
|
+
hasMore: boolean;
|
|
300
|
+
packages: RegistryPackage[];
|
|
301
|
+
success: true;
|
|
302
|
+
} | {
|
|
303
|
+
reason: string;
|
|
304
|
+
success: false;
|
|
305
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Search extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
query: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
chdir: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
+
limit: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
private displayResults;
|
|
15
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
import { getBackend } from '../../backend/index.js';
|
|
4
|
+
export default class Search extends Command {
|
|
5
|
+
static args = {
|
|
6
|
+
query: Args.string({
|
|
7
|
+
description: 'Search query string',
|
|
8
|
+
required: true,
|
|
9
|
+
}),
|
|
10
|
+
};
|
|
11
|
+
static description = 'Search for packages in the registry';
|
|
12
|
+
static examples = [
|
|
13
|
+
'<%= config.bin %> <%= command.id %> postgres',
|
|
14
|
+
'<%= config.bin %> <%= command.id %> redis --limit 5',
|
|
15
|
+
'<%= config.bin %> <%= command.id %> database --json',
|
|
16
|
+
];
|
|
17
|
+
static flags = {
|
|
18
|
+
chdir: Flags.directory({
|
|
19
|
+
char: 'C',
|
|
20
|
+
default: '.',
|
|
21
|
+
description: 'directory to run command in',
|
|
22
|
+
helpGroup: 'global',
|
|
23
|
+
}),
|
|
24
|
+
json: Flags.boolean({
|
|
25
|
+
char: 'j',
|
|
26
|
+
description: 'Output in JSON format',
|
|
27
|
+
}),
|
|
28
|
+
limit: Flags.integer({
|
|
29
|
+
char: 'l',
|
|
30
|
+
default: 20,
|
|
31
|
+
description: 'Maximum number of results to return',
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
async run() {
|
|
35
|
+
const { args, flags } = await this.parse(Search);
|
|
36
|
+
// Change to specified directory
|
|
37
|
+
if (flags.chdir !== '.') {
|
|
38
|
+
process.chdir(flags.chdir);
|
|
39
|
+
}
|
|
40
|
+
// Get backend
|
|
41
|
+
const backend = await getBackend();
|
|
42
|
+
// Check if backend supports search operations
|
|
43
|
+
if (!backend.searchPackages) {
|
|
44
|
+
this.error('Package search is only supported with the cloud backend. Please run `hereya login` to use cloud backend.');
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
const result = await backend.searchPackages({
|
|
48
|
+
limit: flags.limit,
|
|
49
|
+
query: args.query,
|
|
50
|
+
});
|
|
51
|
+
if (!result.success) {
|
|
52
|
+
this.error(result.reason);
|
|
53
|
+
}
|
|
54
|
+
// Output JSON if requested
|
|
55
|
+
if (flags.json) {
|
|
56
|
+
this.log(JSON.stringify({
|
|
57
|
+
hasMore: result.hasMore,
|
|
58
|
+
packages: result.packages,
|
|
59
|
+
}, null, 2));
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// Display results in formatted output
|
|
63
|
+
this.displayResults(result.packages, result.hasMore);
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.error(error instanceof Error ? error.message : 'Failed to search packages');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
displayResults(packages, hasMore) {
|
|
70
|
+
if (packages.length === 0) {
|
|
71
|
+
this.log(chalk.yellow('No packages found matching your query.'));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.log(`Found ${chalk.bold(packages.length)} package(s):`);
|
|
75
|
+
this.log();
|
|
76
|
+
for (const pkg of packages) {
|
|
77
|
+
const visibilityBadge = pkg.visibility === 'PUBLIC'
|
|
78
|
+
? chalk.green('PUBLIC')
|
|
79
|
+
: chalk.yellow('PRIVATE');
|
|
80
|
+
this.log(` ${chalk.cyan.bold(`${pkg.name}@${pkg.version}`)} ${visibilityBadge}`);
|
|
81
|
+
if (pkg.description) {
|
|
82
|
+
this.log(` ${chalk.gray(pkg.description)}`);
|
|
83
|
+
}
|
|
84
|
+
this.log();
|
|
85
|
+
}
|
|
86
|
+
if (hasMore) {
|
|
87
|
+
this.log(chalk.dim('More results available. Use --limit to see more.'));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
package/dist/executor/local.js
CHANGED
|
@@ -64,13 +64,20 @@ export class LocalExecutor {
|
|
|
64
64
|
}
|
|
65
65
|
async resolveEnvValues(input) {
|
|
66
66
|
return Object.fromEntries(await Promise.all(Object.entries(input.env).map(async ([key, value]) => {
|
|
67
|
-
|
|
67
|
+
// Check if value has infra prefix (contains ':' and first part is valid infra)
|
|
68
|
+
const colonIndex = value.indexOf(':');
|
|
69
|
+
if (colonIndex === -1) {
|
|
70
|
+
// No colon - plain value, return as-is
|
|
71
|
+
return [key, value];
|
|
72
|
+
}
|
|
73
|
+
const infraType = value.slice(0, colonIndex);
|
|
68
74
|
const infra$ = getInfrastructure({ type: infraType });
|
|
69
75
|
if (!infra$.supported) {
|
|
70
|
-
|
|
76
|
+
// Unknown infra type - treat as plain value, return as-is
|
|
77
|
+
return [key, value];
|
|
71
78
|
}
|
|
72
79
|
const { infrastructure } = infra$;
|
|
73
|
-
const valueWithoutInfra = value.
|
|
80
|
+
const valueWithoutInfra = value.slice(colonIndex + 1);
|
|
74
81
|
const { isSecret, value: resolvedValue } = await infrastructure.resolveEnv({
|
|
75
82
|
value: valueWithoutInfra,
|
|
76
83
|
});
|
package/dist/lib/env/index.js
CHANGED
|
@@ -33,18 +33,21 @@ export class EnvManager {
|
|
|
33
33
|
if (userEnvPaths[0]) {
|
|
34
34
|
const baseEnv = await this.loadFirstDocument(userEnvPaths[0]);
|
|
35
35
|
if (baseEnv) {
|
|
36
|
-
|
|
36
|
+
const resolvedBaseEnv = await executor.resolveEnvValues({ env: baseEnv, markSecret: input.markSecret });
|
|
37
|
+
userMergedEnv = { ...userMergedEnv, ...resolvedBaseEnv };
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
// Then merge profile-specific env file
|
|
40
41
|
const profileFileEnv = await load(userEnvPaths[1]);
|
|
41
42
|
if (profileFileEnv.data) {
|
|
42
|
-
|
|
43
|
+
const resolvedProfileEnv = await executor.resolveEnvValues({ env: profileFileEnv.data, markSecret: input.markSecret });
|
|
44
|
+
userMergedEnv = { ...userMergedEnv, ...resolvedProfileEnv };
|
|
43
45
|
}
|
|
44
46
|
// Finally, extract and merge profile sections from env.yaml
|
|
45
47
|
const profileSections = await this.extractProfileSections(userEnvPaths[0], input.profile);
|
|
46
48
|
if (profileSections) {
|
|
47
|
-
|
|
49
|
+
const resolvedProfileSections = await executor.resolveEnvValues({ env: profileSections, markSecret: input.markSecret });
|
|
50
|
+
userMergedEnv = { ...userMergedEnv, ...resolvedProfileSections };
|
|
48
51
|
}
|
|
49
52
|
const finalEnv = { ...resolvedEnv, ...userMergedEnv };
|
|
50
53
|
return { env: finalEnv, success: true };
|
package/oclif.manifest.json
CHANGED
|
@@ -701,6 +701,65 @@
|
|
|
701
701
|
"index.js"
|
|
702
702
|
]
|
|
703
703
|
},
|
|
704
|
+
"search": {
|
|
705
|
+
"aliases": [],
|
|
706
|
+
"args": {
|
|
707
|
+
"query": {
|
|
708
|
+
"description": "Search query string",
|
|
709
|
+
"name": "query",
|
|
710
|
+
"required": true
|
|
711
|
+
}
|
|
712
|
+
},
|
|
713
|
+
"description": "Search for packages in the registry",
|
|
714
|
+
"examples": [
|
|
715
|
+
"<%= config.bin %> <%= command.id %> postgres",
|
|
716
|
+
"<%= config.bin %> <%= command.id %> redis --limit 5",
|
|
717
|
+
"<%= config.bin %> <%= command.id %> database --json"
|
|
718
|
+
],
|
|
719
|
+
"flags": {
|
|
720
|
+
"chdir": {
|
|
721
|
+
"char": "C",
|
|
722
|
+
"description": "directory to run command in",
|
|
723
|
+
"helpGroup": "global",
|
|
724
|
+
"name": "chdir",
|
|
725
|
+
"default": ".",
|
|
726
|
+
"hasDynamicHelp": false,
|
|
727
|
+
"multiple": false,
|
|
728
|
+
"type": "option"
|
|
729
|
+
},
|
|
730
|
+
"json": {
|
|
731
|
+
"char": "j",
|
|
732
|
+
"description": "Output in JSON format",
|
|
733
|
+
"name": "json",
|
|
734
|
+
"allowNo": false,
|
|
735
|
+
"type": "boolean"
|
|
736
|
+
},
|
|
737
|
+
"limit": {
|
|
738
|
+
"char": "l",
|
|
739
|
+
"description": "Maximum number of results to return",
|
|
740
|
+
"name": "limit",
|
|
741
|
+
"default": 20,
|
|
742
|
+
"hasDynamicHelp": false,
|
|
743
|
+
"multiple": false,
|
|
744
|
+
"type": "option"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"hasDynamicHelp": false,
|
|
748
|
+
"hiddenAliases": [],
|
|
749
|
+
"id": "search",
|
|
750
|
+
"pluginAlias": "hereya-cli",
|
|
751
|
+
"pluginName": "hereya-cli",
|
|
752
|
+
"pluginType": "core",
|
|
753
|
+
"strict": true,
|
|
754
|
+
"enableJsonFlag": false,
|
|
755
|
+
"isESM": true,
|
|
756
|
+
"relativePath": [
|
|
757
|
+
"dist",
|
|
758
|
+
"commands",
|
|
759
|
+
"search",
|
|
760
|
+
"index.js"
|
|
761
|
+
]
|
|
762
|
+
},
|
|
704
763
|
"unbootstrap": {
|
|
705
764
|
"aliases": [],
|
|
706
765
|
"args": {
|
|
@@ -1877,5 +1936,5 @@
|
|
|
1877
1936
|
]
|
|
1878
1937
|
}
|
|
1879
1938
|
},
|
|
1880
|
-
"version": "0.
|
|
1939
|
+
"version": "0.59.0"
|
|
1881
1940
|
}
|