hereya-cli 0.66.2 → 0.67.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,7 @@ hereya-cli
4
4
  The package manager for infrastructure resources.
5
5
 
6
6
 
7
+
7
8
  [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
8
9
  [![Version](https://img.shields.io/npm/v/hereya-cli.svg)](https://npmjs.org/package/hereya-cli)
9
10
  [![Downloads/week](https://img.shields.io/npm/dw/hereya-cli.svg)](https://npmjs.org/package/hereya-cli)
@@ -20,7 +21,7 @@ $ npm install -g hereya-cli
20
21
  $ hereya COMMAND
21
22
  running command...
22
23
  $ hereya (--version)
23
- hereya-cli/0.66.2 linux-x64 node-v24.14.0
24
+ hereya-cli/0.67.1 linux-x64 node-v24.14.0
24
25
  $ hereya --help [COMMAND]
25
26
  USAGE
26
27
  $ hereya COMMAND
@@ -109,7 +110,7 @@ EXAMPLES
109
110
  $ hereya add cloudy/docker_postgres
110
111
  ```
111
112
 
112
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/add/index.ts)_
113
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/add/index.ts)_
113
114
 
114
115
  ## `hereya bootstrap INFRASTRUCTURETYPE`
115
116
 
@@ -134,7 +135,7 @@ EXAMPLES
134
135
  $ hereya bootstrap local
135
136
  ```
136
137
 
137
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/bootstrap/index.ts)_
138
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/bootstrap/index.ts)_
138
139
 
139
140
  ## `hereya config export-backend [FILE]`
140
141
 
@@ -156,7 +157,7 @@ EXAMPLES
156
157
  $ hereya config export-backend ./path/to/export.json
157
158
  ```
158
159
 
159
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/config/export-backend/index.ts)_
160
+ _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/config/export-backend/index.ts)_
160
161
 
161
162
  ## `hereya config get-backend`
162
163
 
@@ -173,7 +174,7 @@ EXAMPLES
173
174
  $ hereya config get-backend
174
175
  ```
175
176
 
176
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/config/get-backend/index.ts)_
177
+ _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/config/get-backend/index.ts)_
177
178
 
178
179
  ## `hereya config import-backend FILE`
179
180
 
@@ -193,7 +194,7 @@ EXAMPLES
193
194
  $ hereya config import-backend ./path/to/cloud-backend.json
194
195
  ```
195
196
 
196
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/config/import-backend/index.ts)_
197
+ _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/config/import-backend/index.ts)_
197
198
 
198
199
  ## `hereya config use-backend TYPE`
199
200
 
@@ -215,7 +216,7 @@ EXAMPLES
215
216
  $ hereya config use-backend local
216
217
  ```
217
218
 
218
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/config/use-backend/index.ts)_
219
+ _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/config/use-backend/index.ts)_
219
220
 
220
221
  ## `hereya delete-state`
221
222
 
@@ -241,7 +242,7 @@ EXAMPLES
241
242
  $ hereya delete-state --workspace staging
242
243
  ```
243
244
 
244
- _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/delete-state/index.ts)_
245
+ _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/delete-state/index.ts)_
245
246
 
246
247
  ## `hereya deploy`
247
248
 
@@ -266,7 +267,7 @@ EXAMPLES
266
267
  $ hereya deploy
267
268
  ```
268
269
 
269
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/deploy/index.ts)_
270
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/deploy/index.ts)_
270
271
 
271
272
  ## `hereya doc PACKAGE`
272
273
 
@@ -299,7 +300,7 @@ EXAMPLES
299
300
  $ hereya doc my-package --no-doc
300
301
  ```
301
302
 
302
- _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/doc/index.ts)_
303
+ _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/doc/index.ts)_
303
304
 
304
305
  ## `hereya docker run IMAGE`
305
306
 
@@ -330,7 +331,7 @@ EXAMPLES
330
331
  $ hereya docker run myapp:latest -- --rm -v ./data:/data
331
332
  ```
332
333
 
333
- _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/docker/run/index.ts)_
334
+ _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/docker/run/index.ts)_
334
335
 
335
336
  ## `hereya down`
336
337
 
@@ -357,7 +358,7 @@ EXAMPLES
357
358
  $ hereya down
358
359
  ```
359
360
 
360
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/down/index.ts)_
361
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/down/index.ts)_
361
362
 
362
363
  ## `hereya env [NAME]`
363
364
 
@@ -388,7 +389,7 @@ EXAMPLES
388
389
  $ hereya env -w dev -l
389
390
  ```
390
391
 
391
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/env/index.ts)_
392
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/env/index.ts)_
392
393
 
393
394
  ## `hereya env set [NAME]`
394
395
 
@@ -415,7 +416,7 @@ EXAMPLES
415
416
  $ hereya env set FOO -v bar -w dev
416
417
  ```
417
418
 
418
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/env/set/index.ts)_
419
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/env/set/index.ts)_
419
420
 
420
421
  ## `hereya executor start`
421
422
 
@@ -448,7 +449,7 @@ EXAMPLES
448
449
  HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
449
450
  ```
450
451
 
451
- _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/executor/start/index.ts)_
452
+ _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/executor/start/index.ts)_
452
453
 
453
454
  ## `hereya flow add PACKAGE`
454
455
 
@@ -486,7 +487,7 @@ EXAMPLES
486
487
  $ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
487
488
  ```
488
489
 
489
- _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/add/index.ts)_
490
+ _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/add/index.ts)_
490
491
 
491
492
  ## `hereya flow docker run IMAGE`
492
493
 
@@ -516,7 +517,7 @@ EXAMPLES
516
517
  $ hereya flow docker run --pin myapp:latest -- --rm
517
518
  ```
518
519
 
519
- _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/docker/run/index.ts)_
520
+ _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/docker/run/index.ts)_
520
521
 
521
522
  ## `hereya flow down`
522
523
 
@@ -550,7 +551,7 @@ EXAMPLES
550
551
  $ hereya flow down --pin
551
552
  ```
552
553
 
553
- _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/down/index.ts)_
554
+ _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/down/index.ts)_
554
555
 
555
556
  ## `hereya flow env [NAME]`
556
557
 
@@ -584,7 +585,7 @@ EXAMPLES
584
585
  $ hereya flow env -l
585
586
  ```
586
587
 
587
- _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/env/index.ts)_
588
+ _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/env/index.ts)_
588
589
 
589
590
  ## `hereya flow provid PACKAGE`
590
591
 
@@ -613,7 +614,7 @@ EXAMPLES
613
614
  $ hereya flow provid hereya/postgres --pin
614
615
  ```
615
616
 
616
- _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/provid/index.ts)_
617
+ _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/provid/index.ts)_
617
618
 
618
619
  ## `hereya flow remove PACKAGE`
619
620
 
@@ -643,7 +644,7 @@ EXAMPLES
643
644
  $ hereya flow remove cloudy/docker_postgres --profile staging
644
645
  ```
645
646
 
646
- _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/remove/index.ts)_
647
+ _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/remove/index.ts)_
647
648
 
648
649
  ## `hereya flow run CMD`
649
650
 
@@ -672,7 +673,7 @@ EXAMPLES
672
673
  $ hereya flow run --pin -- npm test
673
674
  ```
674
675
 
675
- _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/run/index.ts)_
676
+ _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/run/index.ts)_
676
677
 
677
678
  ## `hereya flow up`
678
679
 
@@ -706,7 +707,7 @@ EXAMPLES
706
707
  $ hereya flow up --pin
707
708
  ```
708
709
 
709
- _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/flow/up/index.ts)_
710
+ _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/flow/up/index.ts)_
710
711
 
711
712
  ## `hereya help [COMMAND]`
712
713
 
@@ -763,7 +764,7 @@ EXAMPLES
763
764
  $ hereya import org/my-package -f state.tfstate -w my-workspace
764
765
  ```
765
766
 
766
- _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/import/index.ts)_
767
+ _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/import/index.ts)_
767
768
 
768
769
  ## `hereya init PROJECT`
769
770
 
@@ -789,7 +790,7 @@ EXAMPLES
789
790
  $ hereya init myProject -w=defaultWorkspace --chdir=./myProject
790
791
  ```
791
792
 
792
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/init/index.ts)_
793
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/init/index.ts)_
793
794
 
794
795
  ## `hereya login [URL]`
795
796
 
@@ -818,7 +819,7 @@ EXAMPLES
818
819
  $ hereya login --token=your-token https://cloud.hereya.dev
819
820
  ```
820
821
 
821
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/login/index.ts)_
822
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/login/index.ts)_
822
823
 
823
824
  ## `hereya logout`
824
825
 
@@ -835,7 +836,7 @@ EXAMPLES
835
836
  $ hereya logout
836
837
  ```
837
838
 
838
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/logout/index.ts)_
839
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/logout/index.ts)_
839
840
 
840
841
  ## `hereya provid PACKAGE`
841
842
 
@@ -863,7 +864,7 @@ EXAMPLES
863
864
  $ hereya provid hereya/postgres --workspace staging
864
865
  ```
865
866
 
866
- _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/provid/index.ts)_
867
+ _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/provid/index.ts)_
867
868
 
868
869
  ## `hereya publish`
869
870
 
@@ -886,7 +887,7 @@ EXAMPLES
886
887
  $ hereya publish --chdir=/path/to/package
887
888
  ```
888
889
 
889
- _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/publish/index.ts)_
890
+ _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/publish/index.ts)_
890
891
 
891
892
  ## `hereya remove PACKAGE`
892
893
 
@@ -914,7 +915,7 @@ EXAMPLES
914
915
  $ hereya remove cloudy/docker_postgres
915
916
  ```
916
917
 
917
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/remove/index.ts)_
918
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/remove/index.ts)_
918
919
 
919
920
  ## `hereya run CMD`
920
921
 
@@ -940,7 +941,7 @@ EXAMPLES
940
941
  $ hereya run -w uat -- node index.js
941
942
  ```
942
943
 
943
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/run/index.ts)_
944
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/run/index.ts)_
944
945
 
945
946
  ## `hereya search QUERY`
946
947
 
@@ -971,7 +972,7 @@ EXAMPLES
971
972
  $ hereya search database --json
972
973
  ```
973
974
 
974
- _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/search/index.ts)_
975
+ _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/search/index.ts)_
975
976
 
976
977
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
977
978
 
@@ -996,7 +997,7 @@ EXAMPLES
996
997
  $ hereya unbootstrap local
997
998
  ```
998
999
 
999
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/unbootstrap/index.ts)_
1000
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/unbootstrap/index.ts)_
1000
1001
 
1001
1002
  ## `hereya undeploy`
1002
1003
 
@@ -1021,7 +1022,7 @@ EXAMPLES
1021
1022
  $ hereya undeploy
1022
1023
  ```
1023
1024
 
1024
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/undeploy/index.ts)_
1025
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/undeploy/index.ts)_
1025
1026
 
1026
1027
  ## `hereya up`
1027
1028
 
@@ -1048,7 +1049,7 @@ EXAMPLES
1048
1049
  $ hereya up
1049
1050
  ```
1050
1051
 
1051
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/up/index.ts)_
1052
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/up/index.ts)_
1052
1053
 
1053
1054
  ## `hereya workspace create NAME`
1054
1055
 
@@ -1073,7 +1074,7 @@ EXAMPLES
1073
1074
  $ hereya workspace create dev
1074
1075
  ```
1075
1076
 
1076
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/create/index.ts)_
1077
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/create/index.ts)_
1077
1078
 
1078
1079
  ## `hereya workspace delete NAME`
1079
1080
 
@@ -1093,7 +1094,7 @@ EXAMPLES
1093
1094
  $ hereya workspace delete dev
1094
1095
  ```
1095
1096
 
1096
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/delete/index.ts)_
1097
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/delete/index.ts)_
1097
1098
 
1098
1099
  ## `hereya workspace env [NAME]`
1099
1100
 
@@ -1119,7 +1120,7 @@ EXAMPLES
1119
1120
  $ hereya workspace env myEnv -w dev
1120
1121
  ```
1121
1122
 
1122
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/env/index.ts)_
1123
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/env/index.ts)_
1123
1124
 
1124
1125
  ## `hereya workspace env set`
1125
1126
 
@@ -1143,7 +1144,7 @@ EXAMPLES
1143
1144
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
1144
1145
  ```
1145
1146
 
1146
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/env/set/index.ts)_
1147
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/env/set/index.ts)_
1147
1148
 
1148
1149
  ## `hereya workspace env unset`
1149
1150
 
@@ -1164,7 +1165,7 @@ EXAMPLES
1164
1165
  $ hereya workspace env unset -w my-workspace -n myVar
1165
1166
  ```
1166
1167
 
1167
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/env/unset/index.ts)_
1168
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/env/unset/index.ts)_
1168
1169
 
1169
1170
  ## `hereya workspace executor install`
1170
1171
 
@@ -1182,7 +1183,7 @@ DESCRIPTION
1182
1183
  Install a remote executor into a workspace
1183
1184
  ```
1184
1185
 
1185
- _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/executor/install/index.ts)_
1186
+ _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/executor/install/index.ts)_
1186
1187
 
1187
1188
  ## `hereya workspace executor token`
1188
1189
 
@@ -1199,7 +1200,7 @@ DESCRIPTION
1199
1200
  Generate a workspace-scoped executor token for the remote executor
1200
1201
  ```
1201
1202
 
1202
- _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/executor/token/index.ts)_
1203
+ _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/executor/token/index.ts)_
1203
1204
 
1204
1205
  ## `hereya workspace executor uninstall`
1205
1206
 
@@ -1217,7 +1218,7 @@ DESCRIPTION
1217
1218
  Uninstall the remote executor from a workspace
1218
1219
  ```
1219
1220
 
1220
- _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/executor/uninstall/index.ts)_
1221
+ _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/executor/uninstall/index.ts)_
1221
1222
 
1222
1223
  ## `hereya workspace install PACKAGE`
1223
1224
 
@@ -1244,7 +1245,7 @@ EXAMPLES
1244
1245
  $ hereya workspace install hereya/aws-cognito
1245
1246
  ```
1246
1247
 
1247
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/install/index.ts)_
1248
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/install/index.ts)_
1248
1249
 
1249
1250
  ## `hereya workspace list`
1250
1251
 
@@ -1268,7 +1269,7 @@ EXAMPLES
1268
1269
  $ hereya workspace list --org personal
1269
1270
  ```
1270
1271
 
1271
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/list/index.ts)_
1272
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/list/index.ts)_
1272
1273
 
1273
1274
  ## `hereya workspace set-profile PROFILE`
1274
1275
 
@@ -1292,7 +1293,7 @@ EXAMPLES
1292
1293
  $ hereya workspace set-profile prod-profile -w production
1293
1294
  ```
1294
1295
 
1295
- _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/set-profile/index.ts)_
1296
+ _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/set-profile/index.ts)_
1296
1297
 
1297
1298
  ## `hereya workspace uninstall PACKAGE`
1298
1299
 
@@ -1319,5 +1320,5 @@ EXAMPLES
1319
1320
  $ hereya workspace uninstall hereya/aws-cognito
1320
1321
  ```
1321
1322
 
1322
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.66.2/src/commands/workspace/uninstall/index.ts)_
1323
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.67.1/src/commands/workspace/uninstall/index.ts)_
1323
1324
  <!-- commandsstop -->
@@ -64,6 +64,7 @@ export declare class CloudBackend implements Backend {
64
64
  } | {
65
65
  reason: string;
66
66
  success: false;
67
+ unauthorized?: true;
67
68
  }>;
68
69
  publishPackage(input: PublishPackageInput): Promise<PublishPackageOutput>;
69
70
  removePackageFromWorkspace(input: RemovePackageFromWorkspaceInput): Promise<RemovePackageFromWorkspaceOutput>;
@@ -98,6 +99,7 @@ export declare class CloudBackend implements Backend {
98
99
  }): Promise<{
99
100
  reason: string;
100
101
  success: false;
102
+ unauthorized?: true;
101
103
  } | {
102
104
  success: true;
103
105
  }>;
@@ -448,6 +448,9 @@ export class CloudBackend {
448
448
  method: 'GET',
449
449
  });
450
450
  if (!response.ok) {
451
+ if (response.status === 401) {
452
+ return { reason: 'Unauthorized', success: false, unauthorized: true };
453
+ }
451
454
  const error = await response.json();
452
455
  return { reason: error.error || 'Failed to poll for jobs', success: false };
453
456
  }
@@ -726,6 +729,9 @@ export class CloudBackend {
726
729
  method: 'PATCH',
727
730
  });
728
731
  if (!response.ok) {
732
+ if (response.status === 401) {
733
+ return { reason: 'Unauthorized', success: false, unauthorized: true };
734
+ }
729
735
  const error = await response.json();
730
736
  return { reason: error.error || 'Failed to update job', success: false };
731
737
  }
@@ -1,4 +1,3 @@
1
- /* eslint-disable n/no-unsupported-features/node-builtins */
2
1
  import machineId from 'node-machine-id';
3
2
  import crypto from 'node:crypto';
4
3
  import http from 'node:http';
@@ -1,4 +1,3 @@
1
- /* eslint-disable n/no-unsupported-features/node-builtins */
2
1
  export async function logoutFromCloudBackend({ secret, url }) {
3
2
  if (!secret) {
4
3
  return { didDelete: false, success: true };
@@ -1,7 +1,27 @@
1
1
  import { Command, Flags } from '@oclif/core';
2
2
  import { CloudBackend } from '../../../backend/cloud/cloud-backend.js';
3
+ import { loginWithToken } from '../../../backend/cloud/login.js';
4
+ import { saveCloudCredentials } from '../../../backend/config.js';
3
5
  import { getBackend } from '../../../backend/index.js';
4
6
  import { LocalExecutor } from '../../../executor/local.js';
7
+ async function createAuthenticatedBackend(hereyaToken, cloudUrl) {
8
+ const loginResult = await loginWithToken(cloudUrl, hereyaToken);
9
+ if (!loginResult.success) {
10
+ throw new Error(`Failed to authenticate: ${loginResult.error}`);
11
+ }
12
+ await saveCloudCredentials({
13
+ accessToken: loginResult.accessToken,
14
+ clientId: loginResult.clientId,
15
+ refreshToken: loginResult.refreshToken,
16
+ url: cloudUrl,
17
+ });
18
+ return new CloudBackend({
19
+ accessToken: loginResult.accessToken,
20
+ clientId: loginResult.clientId,
21
+ refreshToken: loginResult.refreshToken,
22
+ url: cloudUrl,
23
+ });
24
+ }
5
25
  export default class ExecutorStart extends Command {
6
26
  static description = `Start the remote executor process (polls for jobs from hereya cloud).
7
27
 
@@ -32,14 +52,19 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
32
52
  const { flags } = await this.parse(ExecutorStart);
33
53
  const { concurrency } = flags;
34
54
  const executor = new LocalExecutor();
35
- const backend = await getBackend({
36
- token: process.env.HEREYA_TOKEN,
37
- url: process.env.HEREYA_CLOUD_URL,
38
- });
39
- if (!(backend instanceof CloudBackend)) {
40
- this.error('Remote executor requires cloud backend. Set HEREYA_TOKEN or run `hereya login` first.');
55
+ const hereyaToken = process.env.HEREYA_TOKEN;
56
+ const cloudUrl = process.env.HEREYA_CLOUD_URL || 'https://cloud.hereya.dev';
57
+ let cloudBackend;
58
+ if (hereyaToken) {
59
+ cloudBackend = await createAuthenticatedBackend(hereyaToken, cloudUrl);
60
+ }
61
+ else {
62
+ const backend = await getBackend();
63
+ if (!(backend instanceof CloudBackend)) {
64
+ this.error('Remote executor requires cloud backend. Set HEREYA_TOKEN or run `hereya login` first.');
65
+ }
66
+ cloudBackend = backend;
41
67
  }
42
- const cloudBackend = backend;
43
68
  this.log(`Starting executor for workspace: ${flags.workspace} (concurrency: ${concurrency})`);
44
69
  this.log('Polling for jobs...');
45
70
  // Handle graceful shutdown
@@ -64,6 +89,12 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
64
89
  workspace: flags.workspace,
65
90
  });
66
91
  if (!pollResult.success) {
92
+ if ('unauthorized' in pollResult && pollResult.unauthorized && hereyaToken) {
93
+ this.log('Access token expired. Re-authenticating...');
94
+ // eslint-disable-next-line no-await-in-loop
95
+ cloudBackend = await createAuthenticatedBackend(hereyaToken, cloudUrl);
96
+ continue;
97
+ }
67
98
  this.warn(`Poll error: ${pollResult.reason}`);
68
99
  // eslint-disable-next-line no-await-in-loop
69
100
  await new Promise(resolve => {
package/dist/iac/cdk.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import { CloudFormationClient, DescribeStacksCommand } from '@aws-sdk/client-cloudformation';
2
- import { writeFile } from 'node:fs/promises';
2
+ import { readdir, readFile } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import { runShell } from '../lib/shell.js';
5
- import { load } from '../lib/yaml-utils.js';
6
5
  export class Cdk {
7
6
  async apply(input) {
8
7
  try {
@@ -62,16 +61,16 @@ export class Cdk {
62
61
  env: { ...input.env, ...input.parameters },
63
62
  logger: input.logger,
64
63
  });
65
- const result = await runShell('npx', ['aws-cdk', 'synth'], {
66
- directory: workDir,
67
- env: { ...input.env, ...input.parameters },
68
- logger: input.logger,
69
- stdio: 'pipe',
70
- });
71
- const stackYamlPath = path.join(workDir, '.stack.yaml');
72
- await writeFile(stackYamlPath, result.stdout, { encoding: 'utf8' });
73
- const { data: synthedStack } = await load(stackYamlPath);
74
- return Object.keys(synthedStack.Parameters);
64
+ // Read template from cdk.out/ (reliable) instead of parsing stdout (fragile)
65
+ const cdkOutDir = path.join(workDir, 'cdk.out');
66
+ const files = await readdir(cdkOutDir);
67
+ const templateFile = files.find(f => f.endsWith('.template.json'));
68
+ if (!templateFile) {
69
+ return [];
70
+ }
71
+ const templateContent = await readFile(path.join(cdkOutDir, templateFile), 'utf8');
72
+ const template = JSON.parse(templateContent);
73
+ return Object.keys(template.Parameters ?? {});
75
74
  }
76
75
  async getStack(stackName) {
77
76
  const cfnClient = new CloudFormationClient({});
@@ -130,6 +130,65 @@ export async function destroyPackage(input) {
130
130
  }
131
131
  return { env: destroyOutput.env, metadata, pkgName, success: true, version: version || '' };
132
132
  }
133
+ async function provisionDependencies(input, dependencies) {
134
+ const depsOutput = await Promise.all(Object.entries(dependencies).map(async ([depName]) => provisionPackage({
135
+ ...input,
136
+ package: depName,
137
+ })));
138
+ if (!depsOutput.every((output) => output.success)) {
139
+ return {
140
+ reason: `Failed to provision all dependencies: ${depsOutput
141
+ .filter((o) => !o.success)
142
+ .map((o) => !o.success && o.reason)}`,
143
+ success: false,
144
+ };
145
+ }
146
+ const depsEnv = {};
147
+ for (const output of depsOutput) {
148
+ if (output.success) {
149
+ Object.assign(depsEnv, output.env);
150
+ }
151
+ }
152
+ return { depsEnv, success: true };
153
+ }
154
+ function buildProvisionEnv(input, resolvedEnv, depsEnv, metadata) {
155
+ if (metadata.deploy) {
156
+ return { ...resolvedEnv, ...depsEnv };
157
+ }
158
+ if (metadata.devDeploy) {
159
+ return { ...resolvedEnv, ...depsEnv, ...input.projectEnv };
160
+ }
161
+ return resolvedEnv;
162
+ }
163
+ async function executeProvision({ depsEnv, infrastructure, input, metadata, params, resolvedEnv }) {
164
+ const env = buildProvisionEnv(input, resolvedEnv, depsEnv, metadata);
165
+ if (metadata.deploy) {
166
+ return infrastructure.deploy({
167
+ canonicalName: params.canonicalName,
168
+ env,
169
+ iacType: metadata.iac,
170
+ id: params.id,
171
+ logger: input.logger,
172
+ parameters: input.parameters,
173
+ pkgName: params.pkgName,
174
+ pkgUrl: params.packageUri,
175
+ projectEnv: input.projectEnv ?? {},
176
+ projectRootDir: input.projectRootDir,
177
+ version: params.version,
178
+ });
179
+ }
180
+ return infrastructure.provision({
181
+ canonicalName: params.canonicalName,
182
+ env,
183
+ iacType: metadata.iac,
184
+ id: params.id,
185
+ logger: input.logger,
186
+ parameters: input.parameters,
187
+ pkgName: params.pkgName,
188
+ pkgUrl: params.packageUri,
189
+ version: params.version,
190
+ });
191
+ }
133
192
  export async function provisionPackage(input) {
134
193
  const resolvePackageOutput = await resolvePackage({ isDeploying: input.isDeploying, logger: input.logger, package: input.package, projectRootDir: input.projectRootDir });
135
194
  if (!resolvePackageOutput.found) {
@@ -149,26 +208,9 @@ export async function provisionPackage(input) {
149
208
  return { env: {}, metadata, pkgName, success: true, version: version || '' };
150
209
  }
151
210
  const dependencies = metadata.dependencies ?? {};
152
- const depsOutput = await Promise.all(Object.entries(dependencies).map(async ([depName]) => provisionPackage({
153
- ...input,
154
- package: depName,
155
- })));
156
- if (!depsOutput.every((output) => output.success)) {
157
- return {
158
- reason: `Failed to provision all dependencies: ${depsOutput
159
- .filter((o) => !o.success)
160
- .map((o) => !o.success && o.reason)}`,
161
- success: false,
162
- };
163
- }
164
- let depsEnv = {};
165
- for (const output of depsOutput) {
166
- if (output.success) {
167
- depsEnv = { ...depsEnv, ...output.env };
168
- }
169
- else {
170
- return { reason: output.reason, success: false };
171
- }
211
+ const depsResult = await provisionDependencies(input, dependencies);
212
+ if (!depsResult.success) {
213
+ return { reason: depsResult.reason, success: false };
172
214
  }
173
215
  const { infrastructure } = infrastructure$;
174
216
  const backend = await getBackend();
@@ -185,43 +227,7 @@ export async function provisionPackage(input) {
185
227
  const resolvedEnv = metadata.infra === InfrastructureType.local
186
228
  ? (input.env ?? {})
187
229
  : await resolveEnvValues(input.env ?? {});
188
- const provisionOutput = metadata.deploy
189
- ? await infrastructure.deploy({
190
- canonicalName,
191
- env: { ...resolvedEnv, ...depsEnv },
192
- iacType: metadata.iac,
193
- id,
194
- logger: input.logger,
195
- parameters: input.parameters,
196
- pkgName,
197
- pkgUrl: packageUri,
198
- projectEnv: input.projectEnv ?? {},
199
- projectRootDir: input.projectRootDir,
200
- version,
201
- })
202
- : metadata.devDeploy
203
- ? await infrastructure.provision({
204
- canonicalName,
205
- env: { ...resolvedEnv, ...depsEnv, ...input.projectEnv },
206
- iacType: metadata.iac,
207
- id,
208
- logger: input.logger,
209
- parameters: input.parameters,
210
- pkgName,
211
- pkgUrl: packageUri,
212
- version,
213
- })
214
- : await infrastructure.provision({
215
- canonicalName,
216
- env: resolvedEnv,
217
- iacType: metadata.iac,
218
- id,
219
- logger: input.logger,
220
- parameters: input.parameters,
221
- pkgName,
222
- pkgUrl: packageUri,
223
- version,
224
- });
230
+ const provisionOutput = await executeProvision({ depsEnv: depsResult.depsEnv, infrastructure, input, metadata, params: { canonicalName, id, packageUri, pkgName, version }, resolvedEnv });
225
231
  if (!provisionOutput.success) {
226
232
  return { reason: provisionOutput.reason, success: false };
227
233
  }
@@ -1755,6 +1755,37 @@
1755
1755
  "index.js"
1756
1756
  ]
1757
1757
  },
1758
+ "workspace:delete": {
1759
+ "aliases": [],
1760
+ "args": {
1761
+ "name": {
1762
+ "description": "name of the workspace to delete",
1763
+ "name": "name",
1764
+ "required": true
1765
+ }
1766
+ },
1767
+ "description": "Delete a workspace if it exists.",
1768
+ "examples": [
1769
+ "<%= config.bin %> <%= command.id %> dev"
1770
+ ],
1771
+ "flags": {},
1772
+ "hasDynamicHelp": false,
1773
+ "hiddenAliases": [],
1774
+ "id": "workspace:delete",
1775
+ "pluginAlias": "hereya-cli",
1776
+ "pluginName": "hereya-cli",
1777
+ "pluginType": "core",
1778
+ "strict": true,
1779
+ "enableJsonFlag": false,
1780
+ "isESM": true,
1781
+ "relativePath": [
1782
+ "dist",
1783
+ "commands",
1784
+ "workspace",
1785
+ "delete",
1786
+ "index.js"
1787
+ ]
1788
+ },
1758
1789
  "workspace:env": {
1759
1790
  "aliases": [],
1760
1791
  "args": {
@@ -1805,23 +1836,29 @@
1805
1836
  "index.js"
1806
1837
  ]
1807
1838
  },
1808
- "workspace:delete": {
1839
+ "workspace:list": {
1809
1840
  "aliases": [],
1810
- "args": {
1811
- "name": {
1812
- "description": "name of the workspace to delete",
1813
- "name": "name",
1814
- "required": true
1815
- }
1816
- },
1817
- "description": "Delete a workspace if it exists.",
1841
+ "args": {},
1842
+ "description": "List workspaces.",
1818
1843
  "examples": [
1819
- "<%= config.bin %> <%= command.id %> dev"
1844
+ "<%= config.bin %> <%= command.id %>",
1845
+ "<%= config.bin %> <%= command.id %> --org my-org",
1846
+ "<%= config.bin %> <%= command.id %> --org personal"
1820
1847
  ],
1821
- "flags": {},
1848
+ "flags": {
1849
+ "org": {
1850
+ "char": "o",
1851
+ "description": "Filter workspaces by organization name. Use \"personal\" to show only your personal workspaces.",
1852
+ "name": "org",
1853
+ "required": false,
1854
+ "hasDynamicHelp": false,
1855
+ "multiple": false,
1856
+ "type": "option"
1857
+ }
1858
+ },
1822
1859
  "hasDynamicHelp": false,
1823
1860
  "hiddenAliases": [],
1824
- "id": "workspace:delete",
1861
+ "id": "workspace:list",
1825
1862
  "pluginAlias": "hereya-cli",
1826
1863
  "pluginName": "hereya-cli",
1827
1864
  "pluginType": "core",
@@ -1832,7 +1869,7 @@
1832
1869
  "dist",
1833
1870
  "commands",
1834
1871
  "workspace",
1835
- "delete",
1872
+ "list",
1836
1873
  "index.js"
1837
1874
  ]
1838
1875
  },
@@ -1900,43 +1937,6 @@
1900
1937
  "index.js"
1901
1938
  ]
1902
1939
  },
1903
- "workspace:list": {
1904
- "aliases": [],
1905
- "args": {},
1906
- "description": "List workspaces.",
1907
- "examples": [
1908
- "<%= config.bin %> <%= command.id %>",
1909
- "<%= config.bin %> <%= command.id %> --org my-org",
1910
- "<%= config.bin %> <%= command.id %> --org personal"
1911
- ],
1912
- "flags": {
1913
- "org": {
1914
- "char": "o",
1915
- "description": "Filter workspaces by organization name. Use \"personal\" to show only your personal workspaces.",
1916
- "name": "org",
1917
- "required": false,
1918
- "hasDynamicHelp": false,
1919
- "multiple": false,
1920
- "type": "option"
1921
- }
1922
- },
1923
- "hasDynamicHelp": false,
1924
- "hiddenAliases": [],
1925
- "id": "workspace:list",
1926
- "pluginAlias": "hereya-cli",
1927
- "pluginName": "hereya-cli",
1928
- "pluginType": "core",
1929
- "strict": true,
1930
- "enableJsonFlag": false,
1931
- "isESM": true,
1932
- "relativePath": [
1933
- "dist",
1934
- "commands",
1935
- "workspace",
1936
- "list",
1937
- "index.js"
1938
- ]
1939
- },
1940
1940
  "workspace:set-profile": {
1941
1941
  "aliases": [],
1942
1942
  "args": {
@@ -2345,5 +2345,5 @@
2345
2345
  ]
2346
2346
  }
2347
2347
  },
2348
- "version": "0.66.2"
2348
+ "version": "0.67.1"
2349
2349
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.66.2",
4
+ "version": "0.67.1",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"