hereya-cli 0.67.1 → 0.69.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 +49 -48
- package/dist/backend/cloud/cloud-backend.d.ts +2 -0
- package/dist/backend/cloud/cloud-backend.js +48 -28
- package/dist/commands/executor/start/index.js +19 -2
- package/dist/commands/workspace/executor/install/index.d.ts +1 -0
- package/dist/commands/workspace/executor/install/index.js +3 -2
- package/oclif.manifest.json +108 -101
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g hereya-cli
|
|
|
21
21
|
$ hereya COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ hereya (--version)
|
|
24
|
-
hereya-cli/0.
|
|
24
|
+
hereya-cli/0.69.0 linux-x64 node-v24.14.0
|
|
25
25
|
$ hereya --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ hereya COMMAND
|
|
@@ -110,7 +110,7 @@ EXAMPLES
|
|
|
110
110
|
$ hereya add cloudy/docker_postgres
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
113
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/add/index.ts)_
|
|
114
114
|
|
|
115
115
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
116
116
|
|
|
@@ -135,7 +135,7 @@ EXAMPLES
|
|
|
135
135
|
$ hereya bootstrap local
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
138
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/bootstrap/index.ts)_
|
|
139
139
|
|
|
140
140
|
## `hereya config export-backend [FILE]`
|
|
141
141
|
|
|
@@ -157,7 +157,7 @@ EXAMPLES
|
|
|
157
157
|
$ hereya config export-backend ./path/to/export.json
|
|
158
158
|
```
|
|
159
159
|
|
|
160
|
-
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
160
|
+
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/config/export-backend/index.ts)_
|
|
161
161
|
|
|
162
162
|
## `hereya config get-backend`
|
|
163
163
|
|
|
@@ -174,7 +174,7 @@ EXAMPLES
|
|
|
174
174
|
$ hereya config get-backend
|
|
175
175
|
```
|
|
176
176
|
|
|
177
|
-
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
177
|
+
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/config/get-backend/index.ts)_
|
|
178
178
|
|
|
179
179
|
## `hereya config import-backend FILE`
|
|
180
180
|
|
|
@@ -194,7 +194,7 @@ EXAMPLES
|
|
|
194
194
|
$ hereya config import-backend ./path/to/cloud-backend.json
|
|
195
195
|
```
|
|
196
196
|
|
|
197
|
-
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
197
|
+
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/config/import-backend/index.ts)_
|
|
198
198
|
|
|
199
199
|
## `hereya config use-backend TYPE`
|
|
200
200
|
|
|
@@ -216,7 +216,7 @@ EXAMPLES
|
|
|
216
216
|
$ hereya config use-backend local
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
-
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
219
|
+
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/config/use-backend/index.ts)_
|
|
220
220
|
|
|
221
221
|
## `hereya delete-state`
|
|
222
222
|
|
|
@@ -242,7 +242,7 @@ EXAMPLES
|
|
|
242
242
|
$ hereya delete-state --workspace staging
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
245
|
+
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/delete-state/index.ts)_
|
|
246
246
|
|
|
247
247
|
## `hereya deploy`
|
|
248
248
|
|
|
@@ -267,7 +267,7 @@ EXAMPLES
|
|
|
267
267
|
$ hereya deploy
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
270
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/deploy/index.ts)_
|
|
271
271
|
|
|
272
272
|
## `hereya doc PACKAGE`
|
|
273
273
|
|
|
@@ -300,7 +300,7 @@ EXAMPLES
|
|
|
300
300
|
$ hereya doc my-package --no-doc
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
-
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
303
|
+
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/doc/index.ts)_
|
|
304
304
|
|
|
305
305
|
## `hereya docker run IMAGE`
|
|
306
306
|
|
|
@@ -331,7 +331,7 @@ EXAMPLES
|
|
|
331
331
|
$ hereya docker run myapp:latest -- --rm -v ./data:/data
|
|
332
332
|
```
|
|
333
333
|
|
|
334
|
-
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
334
|
+
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/docker/run/index.ts)_
|
|
335
335
|
|
|
336
336
|
## `hereya down`
|
|
337
337
|
|
|
@@ -358,7 +358,7 @@ EXAMPLES
|
|
|
358
358
|
$ hereya down
|
|
359
359
|
```
|
|
360
360
|
|
|
361
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
361
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/down/index.ts)_
|
|
362
362
|
|
|
363
363
|
## `hereya env [NAME]`
|
|
364
364
|
|
|
@@ -389,7 +389,7 @@ EXAMPLES
|
|
|
389
389
|
$ hereya env -w dev -l
|
|
390
390
|
```
|
|
391
391
|
|
|
392
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
392
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/env/index.ts)_
|
|
393
393
|
|
|
394
394
|
## `hereya env set [NAME]`
|
|
395
395
|
|
|
@@ -416,7 +416,7 @@ EXAMPLES
|
|
|
416
416
|
$ hereya env set FOO -v bar -w dev
|
|
417
417
|
```
|
|
418
418
|
|
|
419
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
419
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/env/set/index.ts)_
|
|
420
420
|
|
|
421
421
|
## `hereya executor start`
|
|
422
422
|
|
|
@@ -449,7 +449,7 @@ EXAMPLES
|
|
|
449
449
|
HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
|
|
450
450
|
```
|
|
451
451
|
|
|
452
|
-
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
452
|
+
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/executor/start/index.ts)_
|
|
453
453
|
|
|
454
454
|
## `hereya flow add PACKAGE`
|
|
455
455
|
|
|
@@ -487,7 +487,7 @@ EXAMPLES
|
|
|
487
487
|
$ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
|
|
488
488
|
```
|
|
489
489
|
|
|
490
|
-
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
490
|
+
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/add/index.ts)_
|
|
491
491
|
|
|
492
492
|
## `hereya flow docker run IMAGE`
|
|
493
493
|
|
|
@@ -517,7 +517,7 @@ EXAMPLES
|
|
|
517
517
|
$ hereya flow docker run --pin myapp:latest -- --rm
|
|
518
518
|
```
|
|
519
519
|
|
|
520
|
-
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
520
|
+
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/docker/run/index.ts)_
|
|
521
521
|
|
|
522
522
|
## `hereya flow down`
|
|
523
523
|
|
|
@@ -551,7 +551,7 @@ EXAMPLES
|
|
|
551
551
|
$ hereya flow down --pin
|
|
552
552
|
```
|
|
553
553
|
|
|
554
|
-
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
554
|
+
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/down/index.ts)_
|
|
555
555
|
|
|
556
556
|
## `hereya flow env [NAME]`
|
|
557
557
|
|
|
@@ -585,7 +585,7 @@ EXAMPLES
|
|
|
585
585
|
$ hereya flow env -l
|
|
586
586
|
```
|
|
587
587
|
|
|
588
|
-
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
588
|
+
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/env/index.ts)_
|
|
589
589
|
|
|
590
590
|
## `hereya flow provid PACKAGE`
|
|
591
591
|
|
|
@@ -614,7 +614,7 @@ EXAMPLES
|
|
|
614
614
|
$ hereya flow provid hereya/postgres --pin
|
|
615
615
|
```
|
|
616
616
|
|
|
617
|
-
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
617
|
+
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/provid/index.ts)_
|
|
618
618
|
|
|
619
619
|
## `hereya flow remove PACKAGE`
|
|
620
620
|
|
|
@@ -644,7 +644,7 @@ EXAMPLES
|
|
|
644
644
|
$ hereya flow remove cloudy/docker_postgres --profile staging
|
|
645
645
|
```
|
|
646
646
|
|
|
647
|
-
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
647
|
+
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/remove/index.ts)_
|
|
648
648
|
|
|
649
649
|
## `hereya flow run CMD`
|
|
650
650
|
|
|
@@ -673,7 +673,7 @@ EXAMPLES
|
|
|
673
673
|
$ hereya flow run --pin -- npm test
|
|
674
674
|
```
|
|
675
675
|
|
|
676
|
-
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
676
|
+
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/run/index.ts)_
|
|
677
677
|
|
|
678
678
|
## `hereya flow up`
|
|
679
679
|
|
|
@@ -707,7 +707,7 @@ EXAMPLES
|
|
|
707
707
|
$ hereya flow up --pin
|
|
708
708
|
```
|
|
709
709
|
|
|
710
|
-
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
710
|
+
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/flow/up/index.ts)_
|
|
711
711
|
|
|
712
712
|
## `hereya help [COMMAND]`
|
|
713
713
|
|
|
@@ -764,7 +764,7 @@ EXAMPLES
|
|
|
764
764
|
$ hereya import org/my-package -f state.tfstate -w my-workspace
|
|
765
765
|
```
|
|
766
766
|
|
|
767
|
-
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
767
|
+
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/import/index.ts)_
|
|
768
768
|
|
|
769
769
|
## `hereya init PROJECT`
|
|
770
770
|
|
|
@@ -790,7 +790,7 @@ EXAMPLES
|
|
|
790
790
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
791
791
|
```
|
|
792
792
|
|
|
793
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
793
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/init/index.ts)_
|
|
794
794
|
|
|
795
795
|
## `hereya login [URL]`
|
|
796
796
|
|
|
@@ -819,7 +819,7 @@ EXAMPLES
|
|
|
819
819
|
$ hereya login --token=your-token https://cloud.hereya.dev
|
|
820
820
|
```
|
|
821
821
|
|
|
822
|
-
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
822
|
+
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/login/index.ts)_
|
|
823
823
|
|
|
824
824
|
## `hereya logout`
|
|
825
825
|
|
|
@@ -836,7 +836,7 @@ EXAMPLES
|
|
|
836
836
|
$ hereya logout
|
|
837
837
|
```
|
|
838
838
|
|
|
839
|
-
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
839
|
+
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/logout/index.ts)_
|
|
840
840
|
|
|
841
841
|
## `hereya provid PACKAGE`
|
|
842
842
|
|
|
@@ -864,7 +864,7 @@ EXAMPLES
|
|
|
864
864
|
$ hereya provid hereya/postgres --workspace staging
|
|
865
865
|
```
|
|
866
866
|
|
|
867
|
-
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
867
|
+
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/provid/index.ts)_
|
|
868
868
|
|
|
869
869
|
## `hereya publish`
|
|
870
870
|
|
|
@@ -887,7 +887,7 @@ EXAMPLES
|
|
|
887
887
|
$ hereya publish --chdir=/path/to/package
|
|
888
888
|
```
|
|
889
889
|
|
|
890
|
-
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
890
|
+
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/publish/index.ts)_
|
|
891
891
|
|
|
892
892
|
## `hereya remove PACKAGE`
|
|
893
893
|
|
|
@@ -915,7 +915,7 @@ EXAMPLES
|
|
|
915
915
|
$ hereya remove cloudy/docker_postgres
|
|
916
916
|
```
|
|
917
917
|
|
|
918
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
918
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/remove/index.ts)_
|
|
919
919
|
|
|
920
920
|
## `hereya run CMD`
|
|
921
921
|
|
|
@@ -941,7 +941,7 @@ EXAMPLES
|
|
|
941
941
|
$ hereya run -w uat -- node index.js
|
|
942
942
|
```
|
|
943
943
|
|
|
944
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
944
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/run/index.ts)_
|
|
945
945
|
|
|
946
946
|
## `hereya search QUERY`
|
|
947
947
|
|
|
@@ -972,7 +972,7 @@ EXAMPLES
|
|
|
972
972
|
$ hereya search database --json
|
|
973
973
|
```
|
|
974
974
|
|
|
975
|
-
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
975
|
+
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/search/index.ts)_
|
|
976
976
|
|
|
977
977
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
978
978
|
|
|
@@ -997,7 +997,7 @@ EXAMPLES
|
|
|
997
997
|
$ hereya unbootstrap local
|
|
998
998
|
```
|
|
999
999
|
|
|
1000
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1000
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/unbootstrap/index.ts)_
|
|
1001
1001
|
|
|
1002
1002
|
## `hereya undeploy`
|
|
1003
1003
|
|
|
@@ -1022,7 +1022,7 @@ EXAMPLES
|
|
|
1022
1022
|
$ hereya undeploy
|
|
1023
1023
|
```
|
|
1024
1024
|
|
|
1025
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1025
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/undeploy/index.ts)_
|
|
1026
1026
|
|
|
1027
1027
|
## `hereya up`
|
|
1028
1028
|
|
|
@@ -1049,7 +1049,7 @@ EXAMPLES
|
|
|
1049
1049
|
$ hereya up
|
|
1050
1050
|
```
|
|
1051
1051
|
|
|
1052
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1052
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/up/index.ts)_
|
|
1053
1053
|
|
|
1054
1054
|
## `hereya workspace create NAME`
|
|
1055
1055
|
|
|
@@ -1074,7 +1074,7 @@ EXAMPLES
|
|
|
1074
1074
|
$ hereya workspace create dev
|
|
1075
1075
|
```
|
|
1076
1076
|
|
|
1077
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1077
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/create/index.ts)_
|
|
1078
1078
|
|
|
1079
1079
|
## `hereya workspace delete NAME`
|
|
1080
1080
|
|
|
@@ -1094,7 +1094,7 @@ EXAMPLES
|
|
|
1094
1094
|
$ hereya workspace delete dev
|
|
1095
1095
|
```
|
|
1096
1096
|
|
|
1097
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1097
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/delete/index.ts)_
|
|
1098
1098
|
|
|
1099
1099
|
## `hereya workspace env [NAME]`
|
|
1100
1100
|
|
|
@@ -1120,7 +1120,7 @@ EXAMPLES
|
|
|
1120
1120
|
$ hereya workspace env myEnv -w dev
|
|
1121
1121
|
```
|
|
1122
1122
|
|
|
1123
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1123
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/env/index.ts)_
|
|
1124
1124
|
|
|
1125
1125
|
## `hereya workspace env set`
|
|
1126
1126
|
|
|
@@ -1144,7 +1144,7 @@ EXAMPLES
|
|
|
1144
1144
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
1145
1145
|
```
|
|
1146
1146
|
|
|
1147
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1147
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/env/set/index.ts)_
|
|
1148
1148
|
|
|
1149
1149
|
## `hereya workspace env unset`
|
|
1150
1150
|
|
|
@@ -1165,7 +1165,7 @@ EXAMPLES
|
|
|
1165
1165
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
1166
1166
|
```
|
|
1167
1167
|
|
|
1168
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1168
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/env/unset/index.ts)_
|
|
1169
1169
|
|
|
1170
1170
|
## `hereya workspace executor install`
|
|
1171
1171
|
|
|
@@ -1173,9 +1173,10 @@ Install a remote executor into a workspace
|
|
|
1173
1173
|
|
|
1174
1174
|
```
|
|
1175
1175
|
USAGE
|
|
1176
|
-
$ hereya workspace executor install -w <value> [--debug]
|
|
1176
|
+
$ hereya workspace executor install -w <value> [--debug] [-f]
|
|
1177
1177
|
|
|
1178
1178
|
FLAGS
|
|
1179
|
+
-f, --force force reinstall even if executor is already installed
|
|
1179
1180
|
-w, --workspace=<value> (required) name of the workspace
|
|
1180
1181
|
--debug enable debug mode
|
|
1181
1182
|
|
|
@@ -1183,7 +1184,7 @@ DESCRIPTION
|
|
|
1183
1184
|
Install a remote executor into a workspace
|
|
1184
1185
|
```
|
|
1185
1186
|
|
|
1186
|
-
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1187
|
+
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/executor/install/index.ts)_
|
|
1187
1188
|
|
|
1188
1189
|
## `hereya workspace executor token`
|
|
1189
1190
|
|
|
@@ -1200,7 +1201,7 @@ DESCRIPTION
|
|
|
1200
1201
|
Generate a workspace-scoped executor token for the remote executor
|
|
1201
1202
|
```
|
|
1202
1203
|
|
|
1203
|
-
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1204
|
+
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/executor/token/index.ts)_
|
|
1204
1205
|
|
|
1205
1206
|
## `hereya workspace executor uninstall`
|
|
1206
1207
|
|
|
@@ -1218,7 +1219,7 @@ DESCRIPTION
|
|
|
1218
1219
|
Uninstall the remote executor from a workspace
|
|
1219
1220
|
```
|
|
1220
1221
|
|
|
1221
|
-
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1222
|
+
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/executor/uninstall/index.ts)_
|
|
1222
1223
|
|
|
1223
1224
|
## `hereya workspace install PACKAGE`
|
|
1224
1225
|
|
|
@@ -1245,7 +1246,7 @@ EXAMPLES
|
|
|
1245
1246
|
$ hereya workspace install hereya/aws-cognito
|
|
1246
1247
|
```
|
|
1247
1248
|
|
|
1248
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1249
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/install/index.ts)_
|
|
1249
1250
|
|
|
1250
1251
|
## `hereya workspace list`
|
|
1251
1252
|
|
|
@@ -1269,7 +1270,7 @@ EXAMPLES
|
|
|
1269
1270
|
$ hereya workspace list --org personal
|
|
1270
1271
|
```
|
|
1271
1272
|
|
|
1272
|
-
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1273
|
+
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/list/index.ts)_
|
|
1273
1274
|
|
|
1274
1275
|
## `hereya workspace set-profile PROFILE`
|
|
1275
1276
|
|
|
@@ -1293,7 +1294,7 @@ EXAMPLES
|
|
|
1293
1294
|
$ hereya workspace set-profile prod-profile -w production
|
|
1294
1295
|
```
|
|
1295
1296
|
|
|
1296
|
-
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1297
|
+
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/set-profile/index.ts)_
|
|
1297
1298
|
|
|
1298
1299
|
## `hereya workspace uninstall PACKAGE`
|
|
1299
1300
|
|
|
@@ -1320,5 +1321,5 @@ EXAMPLES
|
|
|
1320
1321
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
1321
1322
|
```
|
|
1322
1323
|
|
|
1323
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1324
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.69.0/src/commands/workspace/uninstall/index.ts)_
|
|
1324
1325
|
<!-- commandsstop -->
|
|
@@ -53,6 +53,7 @@ export declare class CloudBackend implements Backend {
|
|
|
53
53
|
listPackageVersions(name: string): Promise<ListPackageVersionsOutput>;
|
|
54
54
|
listWorkspaces(input?: ListWorkspacesInput): Promise<string[]>;
|
|
55
55
|
pollExecutorJobs(input: {
|
|
56
|
+
executorId?: string;
|
|
56
57
|
workspace: string;
|
|
57
58
|
}): Promise<{
|
|
58
59
|
job: null | {
|
|
@@ -105,5 +106,6 @@ export declare class CloudBackend implements Backend {
|
|
|
105
106
|
}>;
|
|
106
107
|
updateWorkspace(input: UpdateWorkspaceInput): Promise<UpdateWorkspaceOutput>;
|
|
107
108
|
private convertWorkspace;
|
|
109
|
+
private safeResponseJson;
|
|
108
110
|
}
|
|
109
111
|
export {};
|
|
@@ -24,7 +24,7 @@ export class CloudBackend {
|
|
|
24
24
|
});
|
|
25
25
|
if (!response.ok) {
|
|
26
26
|
return {
|
|
27
|
-
reason: JSON.stringify(await
|
|
27
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
28
28
|
success: false,
|
|
29
29
|
};
|
|
30
30
|
}
|
|
@@ -55,7 +55,7 @@ export class CloudBackend {
|
|
|
55
55
|
});
|
|
56
56
|
if (!response.ok) {
|
|
57
57
|
return {
|
|
58
|
-
reason: JSON.stringify(await
|
|
58
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
59
59
|
success: false,
|
|
60
60
|
};
|
|
61
61
|
}
|
|
@@ -75,7 +75,7 @@ export class CloudBackend {
|
|
|
75
75
|
});
|
|
76
76
|
if (!response.ok) {
|
|
77
77
|
return {
|
|
78
|
-
reason: JSON.stringify(await
|
|
78
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
79
79
|
success: false,
|
|
80
80
|
};
|
|
81
81
|
}
|
|
@@ -93,7 +93,7 @@ export class CloudBackend {
|
|
|
93
93
|
});
|
|
94
94
|
if (!response.ok) {
|
|
95
95
|
return {
|
|
96
|
-
reason: JSON.stringify(await
|
|
96
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
97
97
|
success: false,
|
|
98
98
|
};
|
|
99
99
|
}
|
|
@@ -110,7 +110,7 @@ export class CloudBackend {
|
|
|
110
110
|
});
|
|
111
111
|
if (!response.ok) {
|
|
112
112
|
return {
|
|
113
|
-
reason: JSON.stringify(await
|
|
113
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
114
114
|
success: false,
|
|
115
115
|
};
|
|
116
116
|
}
|
|
@@ -132,7 +132,7 @@ export class CloudBackend {
|
|
|
132
132
|
method: 'POST',
|
|
133
133
|
});
|
|
134
134
|
if (!response.ok) {
|
|
135
|
-
const error = await
|
|
135
|
+
const error = await this.safeResponseJson(response);
|
|
136
136
|
return { reason: error.error || 'Failed to generate executor token', success: false };
|
|
137
137
|
}
|
|
138
138
|
const result = await response.json();
|
|
@@ -151,7 +151,10 @@ export class CloudBackend {
|
|
|
151
151
|
method: 'GET',
|
|
152
152
|
});
|
|
153
153
|
if (!response.ok) {
|
|
154
|
-
|
|
154
|
+
if (response.status === 401) {
|
|
155
|
+
return { reason: 'Unauthorized', success: false };
|
|
156
|
+
}
|
|
157
|
+
const error = await this.safeResponseJson(response);
|
|
155
158
|
return { reason: error.error || 'Failed to get job status', success: false };
|
|
156
159
|
}
|
|
157
160
|
const result = await response.json();
|
|
@@ -164,7 +167,7 @@ export class CloudBackend {
|
|
|
164
167
|
},
|
|
165
168
|
method: 'GET',
|
|
166
169
|
});
|
|
167
|
-
const result = await
|
|
170
|
+
const result = await this.safeResponseJson(response);
|
|
168
171
|
if (!response.ok) {
|
|
169
172
|
// Handle error responses
|
|
170
173
|
let errorMessage = result.error || 'Failed to get package';
|
|
@@ -199,7 +202,7 @@ export class CloudBackend {
|
|
|
199
202
|
},
|
|
200
203
|
method: 'GET',
|
|
201
204
|
});
|
|
202
|
-
const result = await
|
|
205
|
+
const result = await this.safeResponseJson(response);
|
|
203
206
|
if (!response.ok) {
|
|
204
207
|
// Handle error responses
|
|
205
208
|
let errorMessage = result.error || 'Failed to get package';
|
|
@@ -246,7 +249,7 @@ export class CloudBackend {
|
|
|
246
249
|
});
|
|
247
250
|
if (!response.ok) {
|
|
248
251
|
return {
|
|
249
|
-
reason: JSON.stringify(await
|
|
252
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
250
253
|
success: false,
|
|
251
254
|
};
|
|
252
255
|
}
|
|
@@ -268,7 +271,7 @@ export class CloudBackend {
|
|
|
268
271
|
if (!response.ok) {
|
|
269
272
|
return {
|
|
270
273
|
found: false,
|
|
271
|
-
reason: JSON.stringify(await
|
|
274
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
272
275
|
};
|
|
273
276
|
}
|
|
274
277
|
const result = await response.json();
|
|
@@ -309,7 +312,7 @@ export class CloudBackend {
|
|
|
309
312
|
};
|
|
310
313
|
}
|
|
311
314
|
if (!response.ok) {
|
|
312
|
-
const error = await
|
|
315
|
+
const error = await this.safeResponseJson(response);
|
|
313
316
|
return {
|
|
314
317
|
error: JSON.stringify(error),
|
|
315
318
|
found: true,
|
|
@@ -356,7 +359,7 @@ export class CloudBackend {
|
|
|
356
359
|
});
|
|
357
360
|
if (!response.ok) {
|
|
358
361
|
return {
|
|
359
|
-
reason: JSON.stringify(await
|
|
362
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
360
363
|
success: false,
|
|
361
364
|
};
|
|
362
365
|
}
|
|
@@ -376,7 +379,7 @@ export class CloudBackend {
|
|
|
376
379
|
method: 'POST',
|
|
377
380
|
});
|
|
378
381
|
if (!response.ok) {
|
|
379
|
-
throw new Error(JSON.stringify(await
|
|
382
|
+
throw new Error(JSON.stringify(await this.safeResponseJson(response)));
|
|
380
383
|
}
|
|
381
384
|
const result = await response.json();
|
|
382
385
|
return {
|
|
@@ -397,7 +400,7 @@ export class CloudBackend {
|
|
|
397
400
|
},
|
|
398
401
|
method: 'GET',
|
|
399
402
|
});
|
|
400
|
-
const result = await
|
|
403
|
+
const result = await this.safeResponseJson(response);
|
|
401
404
|
if (!response.ok) {
|
|
402
405
|
// Handle error responses
|
|
403
406
|
let errorMessage = result.error || 'Failed to list package versions';
|
|
@@ -437,13 +440,18 @@ export class CloudBackend {
|
|
|
437
440
|
method: 'GET',
|
|
438
441
|
});
|
|
439
442
|
if (!response.ok) {
|
|
440
|
-
throw new Error(JSON.stringify(await
|
|
443
|
+
throw new Error(JSON.stringify(await this.safeResponseJson(response)));
|
|
441
444
|
}
|
|
442
445
|
const result = await response.json();
|
|
443
446
|
return result.workspaces.map((workspace) => workspace.name);
|
|
444
447
|
}
|
|
445
448
|
async pollExecutorJobs(input) {
|
|
446
|
-
const
|
|
449
|
+
const url = new URL(`${this.config.url}/api/executor/jobs`);
|
|
450
|
+
url.searchParams.set('workspace', input.workspace);
|
|
451
|
+
if (input.executorId) {
|
|
452
|
+
url.searchParams.set('executorId', input.executorId);
|
|
453
|
+
}
|
|
454
|
+
const response = await fetch(url.toString(), {
|
|
447
455
|
headers: { 'Authorization': `Bearer ${this.config.accessToken}` },
|
|
448
456
|
method: 'GET',
|
|
449
457
|
});
|
|
@@ -451,7 +459,7 @@ export class CloudBackend {
|
|
|
451
459
|
if (response.status === 401) {
|
|
452
460
|
return { reason: 'Unauthorized', success: false, unauthorized: true };
|
|
453
461
|
}
|
|
454
|
-
const error = await
|
|
462
|
+
const error = await this.safeResponseJson(response);
|
|
455
463
|
return { reason: error.error || 'Failed to poll for jobs', success: false };
|
|
456
464
|
}
|
|
457
465
|
const result = await response.json();
|
|
@@ -486,7 +494,7 @@ export class CloudBackend {
|
|
|
486
494
|
},
|
|
487
495
|
method: 'POST',
|
|
488
496
|
});
|
|
489
|
-
const result = await
|
|
497
|
+
const result = await this.safeResponseJson(response);
|
|
490
498
|
if (!response.ok) {
|
|
491
499
|
// Handle validation errors (field-specific errors)
|
|
492
500
|
if (result.errors && typeof result.errors === 'object') {
|
|
@@ -569,7 +577,7 @@ export class CloudBackend {
|
|
|
569
577
|
});
|
|
570
578
|
if (!response.ok) {
|
|
571
579
|
return {
|
|
572
|
-
reason: JSON.stringify(await
|
|
580
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
573
581
|
success: false,
|
|
574
582
|
};
|
|
575
583
|
}
|
|
@@ -585,7 +593,7 @@ export class CloudBackend {
|
|
|
585
593
|
method: 'DELETE',
|
|
586
594
|
});
|
|
587
595
|
if (!response.ok) {
|
|
588
|
-
const error = await
|
|
596
|
+
const error = await this.safeResponseJson(response);
|
|
589
597
|
return { reason: error.error || 'Failed to revoke executor token', success: false };
|
|
590
598
|
}
|
|
591
599
|
return { success: true };
|
|
@@ -611,7 +619,7 @@ export class CloudBackend {
|
|
|
611
619
|
method: 'POST',
|
|
612
620
|
});
|
|
613
621
|
if (!response.ok) {
|
|
614
|
-
throw new Error(JSON.stringify(await
|
|
622
|
+
throw new Error(JSON.stringify(await this.safeResponseJson(response)));
|
|
615
623
|
}
|
|
616
624
|
}
|
|
617
625
|
async searchPackages(input) {
|
|
@@ -629,7 +637,7 @@ export class CloudBackend {
|
|
|
629
637
|
},
|
|
630
638
|
method: 'GET',
|
|
631
639
|
});
|
|
632
|
-
const result = await
|
|
640
|
+
const result = await this.safeResponseJson(response);
|
|
633
641
|
if (!response.ok) {
|
|
634
642
|
let errorMessage = result.error || 'Failed to search packages';
|
|
635
643
|
switch (response.status) {
|
|
@@ -671,7 +679,7 @@ export class CloudBackend {
|
|
|
671
679
|
});
|
|
672
680
|
if (!response.ok) {
|
|
673
681
|
return {
|
|
674
|
-
reason: JSON.stringify(await
|
|
682
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
675
683
|
success: false,
|
|
676
684
|
};
|
|
677
685
|
}
|
|
@@ -689,7 +697,10 @@ export class CloudBackend {
|
|
|
689
697
|
method: 'POST',
|
|
690
698
|
});
|
|
691
699
|
if (!response.ok) {
|
|
692
|
-
|
|
700
|
+
if (response.status === 401) {
|
|
701
|
+
return { reason: 'Unauthorized', success: false };
|
|
702
|
+
}
|
|
703
|
+
const error = await this.safeResponseJson(response);
|
|
693
704
|
return { reason: error.error || 'Failed to submit executor job', success: false };
|
|
694
705
|
}
|
|
695
706
|
const result = await response.json();
|
|
@@ -704,7 +715,7 @@ export class CloudBackend {
|
|
|
704
715
|
});
|
|
705
716
|
if (!response.ok) {
|
|
706
717
|
return {
|
|
707
|
-
reason: JSON.stringify(await
|
|
718
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
708
719
|
success: false,
|
|
709
720
|
};
|
|
710
721
|
}
|
|
@@ -732,7 +743,7 @@ export class CloudBackend {
|
|
|
732
743
|
if (response.status === 401) {
|
|
733
744
|
return { reason: 'Unauthorized', success: false, unauthorized: true };
|
|
734
745
|
}
|
|
735
|
-
const error = await
|
|
746
|
+
const error = await this.safeResponseJson(response);
|
|
736
747
|
return { reason: error.error || 'Failed to update job', success: false };
|
|
737
748
|
}
|
|
738
749
|
return { success: true };
|
|
@@ -757,7 +768,7 @@ export class CloudBackend {
|
|
|
757
768
|
});
|
|
758
769
|
if (!response.ok) {
|
|
759
770
|
return {
|
|
760
|
-
reason: JSON.stringify(await
|
|
771
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
761
772
|
success: false,
|
|
762
773
|
};
|
|
763
774
|
}
|
|
@@ -803,4 +814,13 @@ export class CloudBackend {
|
|
|
803
814
|
profile: workspace.profile === null ? undefined : workspace.profile,
|
|
804
815
|
};
|
|
805
816
|
}
|
|
817
|
+
async safeResponseJson(response) {
|
|
818
|
+
const text = await response.text();
|
|
819
|
+
try {
|
|
820
|
+
return JSON.parse(text);
|
|
821
|
+
}
|
|
822
|
+
catch {
|
|
823
|
+
return { error: text || 'Unknown error' };
|
|
824
|
+
}
|
|
825
|
+
}
|
|
806
826
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Command, Flags } from '@oclif/core';
|
|
2
|
+
import { randomUUID } from 'node:crypto';
|
|
3
|
+
import os from 'node:os';
|
|
2
4
|
import { CloudBackend } from '../../../backend/cloud/cloud-backend.js';
|
|
3
5
|
import { loginWithToken } from '../../../backend/cloud/login.js';
|
|
4
6
|
import { saveCloudCredentials } from '../../../backend/config.js';
|
|
5
|
-
import { getBackend } from '../../../backend/index.js';
|
|
7
|
+
import { clearBackend, getBackend } from '../../../backend/index.js';
|
|
6
8
|
import { LocalExecutor } from '../../../executor/local.js';
|
|
7
9
|
async function createAuthenticatedBackend(hereyaToken, cloudUrl) {
|
|
8
10
|
const loginResult = await loginWithToken(cloudUrl, hereyaToken);
|
|
@@ -65,7 +67,8 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
|
|
|
65
67
|
}
|
|
66
68
|
cloudBackend = backend;
|
|
67
69
|
}
|
|
68
|
-
|
|
70
|
+
const executorId = `${os.hostname()}-${randomUUID().slice(0, 8)}`;
|
|
71
|
+
this.log(`Starting executor ${executorId} for workspace: ${flags.workspace} (concurrency: ${concurrency})`);
|
|
69
72
|
this.log('Polling for jobs...');
|
|
70
73
|
// Handle graceful shutdown
|
|
71
74
|
const state = { shuttingDown: false };
|
|
@@ -86,11 +89,13 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
|
|
|
86
89
|
}
|
|
87
90
|
// eslint-disable-next-line no-await-in-loop
|
|
88
91
|
const pollResult = await cloudBackend.pollExecutorJobs({
|
|
92
|
+
executorId,
|
|
89
93
|
workspace: flags.workspace,
|
|
90
94
|
});
|
|
91
95
|
if (!pollResult.success) {
|
|
92
96
|
if ('unauthorized' in pollResult && pollResult.unauthorized && hereyaToken) {
|
|
93
97
|
this.log('Access token expired. Re-authenticating...');
|
|
98
|
+
clearBackend();
|
|
94
99
|
// eslint-disable-next-line no-await-in-loop
|
|
95
100
|
cloudBackend = await createAuthenticatedBackend(hereyaToken, cloudUrl);
|
|
96
101
|
continue;
|
|
@@ -148,6 +153,15 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
|
|
|
148
153
|
}
|
|
149
154
|
}
|
|
150
155
|
}, 10_000);
|
|
156
|
+
// Heartbeat every 30 seconds (independent of log flushing)
|
|
157
|
+
const heartbeatInterval = setInterval(async () => {
|
|
158
|
+
try {
|
|
159
|
+
await cloudBackend.updateExecutorJob({ jobId: job.id });
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
// Heartbeat errors are non-fatal
|
|
163
|
+
}
|
|
164
|
+
}, 30_000);
|
|
151
165
|
const logger = {
|
|
152
166
|
debug(msg) {
|
|
153
167
|
logBuffer += msg + '\n';
|
|
@@ -165,6 +179,7 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
|
|
|
165
179
|
const resolved = await executor.resolveEnvValues(job.payload);
|
|
166
180
|
// Send resolved env as result
|
|
167
181
|
clearInterval(logInterval);
|
|
182
|
+
clearInterval(heartbeatInterval);
|
|
168
183
|
await cloudBackend.updateExecutorJob({
|
|
169
184
|
jobId: job.id,
|
|
170
185
|
logs: logBuffer,
|
|
@@ -185,6 +200,7 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
|
|
|
185
200
|
});
|
|
186
201
|
// Flush remaining logs and send result
|
|
187
202
|
clearInterval(logInterval);
|
|
203
|
+
clearInterval(heartbeatInterval);
|
|
188
204
|
await cloudBackend.updateExecutorJob({
|
|
189
205
|
jobId: job.id,
|
|
190
206
|
logs: logBuffer,
|
|
@@ -195,6 +211,7 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
|
|
|
195
211
|
}
|
|
196
212
|
catch (error) {
|
|
197
213
|
clearInterval(logInterval);
|
|
214
|
+
clearInterval(heartbeatInterval);
|
|
198
215
|
await cloudBackend.updateExecutorJob({
|
|
199
216
|
jobId: job.id,
|
|
200
217
|
logs: logBuffer + `\nError: ${error.message}\n`,
|
|
@@ -3,6 +3,7 @@ export default class WorkspaceExecutorInstall extends Command {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
|
+
force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
7
|
workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
8
|
};
|
|
8
9
|
run(): Promise<void>;
|
|
@@ -10,6 +10,7 @@ export default class WorkspaceExecutorInstall extends Command {
|
|
|
10
10
|
static description = 'Install a remote executor into a workspace';
|
|
11
11
|
static flags = {
|
|
12
12
|
debug: Flags.boolean({ default: false, description: 'enable debug mode' }),
|
|
13
|
+
force: Flags.boolean({ char: 'f', default: false, description: 'force reinstall even if executor is already installed' }),
|
|
13
14
|
workspace: Flags.string({
|
|
14
15
|
char: 'w',
|
|
15
16
|
description: 'name of the workspace',
|
|
@@ -37,8 +38,8 @@ export default class WorkspaceExecutorInstall extends Command {
|
|
|
37
38
|
if (workspace$.hasError) {
|
|
38
39
|
throw new Error(workspace$.error);
|
|
39
40
|
}
|
|
40
|
-
if (workspace$.workspace.hasExecutor) {
|
|
41
|
-
throw new Error(`Workspace ${flags.workspace} already has an executor installed
|
|
41
|
+
if (workspace$.workspace.hasExecutor && !flags.force) {
|
|
42
|
+
throw new Error(`Workspace ${flags.workspace} already has an executor installed. Use --force to reinstall.`);
|
|
42
43
|
}
|
|
43
44
|
await delay(500);
|
|
44
45
|
},
|
package/oclif.manifest.json
CHANGED
|
@@ -1836,43 +1836,6 @@
|
|
|
1836
1836
|
"index.js"
|
|
1837
1837
|
]
|
|
1838
1838
|
},
|
|
1839
|
-
"workspace:list": {
|
|
1840
|
-
"aliases": [],
|
|
1841
|
-
"args": {},
|
|
1842
|
-
"description": "List workspaces.",
|
|
1843
|
-
"examples": [
|
|
1844
|
-
"<%= config.bin %> <%= command.id %>",
|
|
1845
|
-
"<%= config.bin %> <%= command.id %> --org my-org",
|
|
1846
|
-
"<%= config.bin %> <%= command.id %> --org personal"
|
|
1847
|
-
],
|
|
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
|
-
},
|
|
1859
|
-
"hasDynamicHelp": false,
|
|
1860
|
-
"hiddenAliases": [],
|
|
1861
|
-
"id": "workspace:list",
|
|
1862
|
-
"pluginAlias": "hereya-cli",
|
|
1863
|
-
"pluginName": "hereya-cli",
|
|
1864
|
-
"pluginType": "core",
|
|
1865
|
-
"strict": true,
|
|
1866
|
-
"enableJsonFlag": false,
|
|
1867
|
-
"isESM": true,
|
|
1868
|
-
"relativePath": [
|
|
1869
|
-
"dist",
|
|
1870
|
-
"commands",
|
|
1871
|
-
"workspace",
|
|
1872
|
-
"list",
|
|
1873
|
-
"index.js"
|
|
1874
|
-
]
|
|
1875
|
-
},
|
|
1876
1839
|
"workspace:install": {
|
|
1877
1840
|
"aliases": [],
|
|
1878
1841
|
"args": {
|
|
@@ -1937,33 +1900,21 @@
|
|
|
1937
1900
|
"index.js"
|
|
1938
1901
|
]
|
|
1939
1902
|
},
|
|
1940
|
-
"workspace:
|
|
1903
|
+
"workspace:list": {
|
|
1941
1904
|
"aliases": [],
|
|
1942
|
-
"args": {
|
|
1943
|
-
|
|
1944
|
-
"description": "AWS profile name to set for the workspace",
|
|
1945
|
-
"name": "profile",
|
|
1946
|
-
"required": true
|
|
1947
|
-
}
|
|
1948
|
-
},
|
|
1949
|
-
"description": "Set AWS profile and deployment status for a workspace (cloud backend only).",
|
|
1905
|
+
"args": {},
|
|
1906
|
+
"description": "List workspaces.",
|
|
1950
1907
|
"examples": [
|
|
1951
|
-
"<%= config.bin %> <%= command.id %>
|
|
1908
|
+
"<%= config.bin %> <%= command.id %>",
|
|
1909
|
+
"<%= config.bin %> <%= command.id %> --org my-org",
|
|
1910
|
+
"<%= config.bin %> <%= command.id %> --org personal"
|
|
1952
1911
|
],
|
|
1953
1912
|
"flags": {
|
|
1954
|
-
"
|
|
1955
|
-
"char": "
|
|
1956
|
-
"description": "
|
|
1957
|
-
"name": "
|
|
1913
|
+
"org": {
|
|
1914
|
+
"char": "o",
|
|
1915
|
+
"description": "Filter workspaces by organization name. Use \"personal\" to show only your personal workspaces.",
|
|
1916
|
+
"name": "org",
|
|
1958
1917
|
"required": false,
|
|
1959
|
-
"allowNo": true,
|
|
1960
|
-
"type": "boolean"
|
|
1961
|
-
},
|
|
1962
|
-
"workspace": {
|
|
1963
|
-
"char": "w",
|
|
1964
|
-
"description": "workspace name",
|
|
1965
|
-
"name": "workspace",
|
|
1966
|
-
"required": true,
|
|
1967
1918
|
"hasDynamicHelp": false,
|
|
1968
1919
|
"multiple": false,
|
|
1969
1920
|
"type": "option"
|
|
@@ -1971,7 +1922,7 @@
|
|
|
1971
1922
|
},
|
|
1972
1923
|
"hasDynamicHelp": false,
|
|
1973
1924
|
"hiddenAliases": [],
|
|
1974
|
-
"id": "workspace:
|
|
1925
|
+
"id": "workspace:list",
|
|
1975
1926
|
"pluginAlias": "hereya-cli",
|
|
1976
1927
|
"pluginName": "hereya-cli",
|
|
1977
1928
|
"pluginType": "core",
|
|
@@ -1982,55 +1933,37 @@
|
|
|
1982
1933
|
"dist",
|
|
1983
1934
|
"commands",
|
|
1984
1935
|
"workspace",
|
|
1985
|
-
"
|
|
1936
|
+
"list",
|
|
1986
1937
|
"index.js"
|
|
1987
1938
|
]
|
|
1988
1939
|
},
|
|
1989
|
-
"
|
|
1940
|
+
"workspace:set-profile": {
|
|
1990
1941
|
"aliases": [],
|
|
1991
1942
|
"args": {
|
|
1992
|
-
"
|
|
1993
|
-
"description": "
|
|
1994
|
-
"name": "
|
|
1943
|
+
"profile": {
|
|
1944
|
+
"description": "AWS profile name to set for the workspace",
|
|
1945
|
+
"name": "profile",
|
|
1995
1946
|
"required": true
|
|
1996
1947
|
}
|
|
1997
1948
|
},
|
|
1998
|
-
"description": "
|
|
1949
|
+
"description": "Set AWS profile and deployment status for a workspace (cloud backend only).",
|
|
1999
1950
|
"examples": [
|
|
2000
|
-
"<%= config.bin %> <%= command.id %>
|
|
2001
|
-
"<%= config.bin %> <%= command.id %> --profile staging myapp:latest",
|
|
2002
|
-
"<%= config.bin %> <%= command.id %> --pin myapp:latest -- --rm"
|
|
1951
|
+
"<%= config.bin %> <%= command.id %> prod-profile -w production"
|
|
2003
1952
|
],
|
|
2004
1953
|
"flags": {
|
|
2005
|
-
"
|
|
2006
|
-
"
|
|
2007
|
-
"
|
|
2008
|
-
"
|
|
2009
|
-
"hasDynamicHelp": false,
|
|
2010
|
-
"multiple": false,
|
|
2011
|
-
"type": "option"
|
|
2012
|
-
},
|
|
2013
|
-
"pin": {
|
|
2014
|
-
"description": "append git commit SHA to workspace name for commit-specific isolation",
|
|
2015
|
-
"name": "pin",
|
|
1954
|
+
"deployment": {
|
|
1955
|
+
"char": "d",
|
|
1956
|
+
"description": "mark workspace as a deployment workspace (use --no-deployment to unset)",
|
|
1957
|
+
"name": "deployment",
|
|
2016
1958
|
"required": false,
|
|
2017
|
-
"allowNo":
|
|
1959
|
+
"allowNo": true,
|
|
2018
1960
|
"type": "boolean"
|
|
2019
1961
|
},
|
|
2020
|
-
"
|
|
2021
|
-
"char": "
|
|
2022
|
-
"description": "
|
|
2023
|
-
"name": "
|
|
2024
|
-
"required":
|
|
2025
|
-
"default": 8080,
|
|
2026
|
-
"hasDynamicHelp": false,
|
|
2027
|
-
"multiple": false,
|
|
2028
|
-
"type": "option"
|
|
2029
|
-
},
|
|
2030
|
-
"profile": {
|
|
2031
|
-
"description": "profile to use for the workspace (will be appended to workspace name)",
|
|
2032
|
-
"name": "profile",
|
|
2033
|
-
"required": false,
|
|
1962
|
+
"workspace": {
|
|
1963
|
+
"char": "w",
|
|
1964
|
+
"description": "workspace name",
|
|
1965
|
+
"name": "workspace",
|
|
1966
|
+
"required": true,
|
|
2034
1967
|
"hasDynamicHelp": false,
|
|
2035
1968
|
"multiple": false,
|
|
2036
1969
|
"type": "option"
|
|
@@ -2038,19 +1971,18 @@
|
|
|
2038
1971
|
},
|
|
2039
1972
|
"hasDynamicHelp": false,
|
|
2040
1973
|
"hiddenAliases": [],
|
|
2041
|
-
"id": "
|
|
1974
|
+
"id": "workspace:set-profile",
|
|
2042
1975
|
"pluginAlias": "hereya-cli",
|
|
2043
1976
|
"pluginName": "hereya-cli",
|
|
2044
1977
|
"pluginType": "core",
|
|
2045
|
-
"strict":
|
|
1978
|
+
"strict": true,
|
|
2046
1979
|
"enableJsonFlag": false,
|
|
2047
1980
|
"isESM": true,
|
|
2048
1981
|
"relativePath": [
|
|
2049
1982
|
"dist",
|
|
2050
1983
|
"commands",
|
|
2051
|
-
"
|
|
2052
|
-
"
|
|
2053
|
-
"run",
|
|
1984
|
+
"workspace",
|
|
1985
|
+
"set-profile",
|
|
2054
1986
|
"index.js"
|
|
2055
1987
|
]
|
|
2056
1988
|
},
|
|
@@ -2118,6 +2050,74 @@
|
|
|
2118
2050
|
"index.js"
|
|
2119
2051
|
]
|
|
2120
2052
|
},
|
|
2053
|
+
"flow:docker:run": {
|
|
2054
|
+
"aliases": [],
|
|
2055
|
+
"args": {
|
|
2056
|
+
"image": {
|
|
2057
|
+
"description": "Docker image to run",
|
|
2058
|
+
"name": "image",
|
|
2059
|
+
"required": true
|
|
2060
|
+
}
|
|
2061
|
+
},
|
|
2062
|
+
"description": "Run a Docker container with hereya env vars in a git branch-based workspace",
|
|
2063
|
+
"examples": [
|
|
2064
|
+
"<%= config.bin %> <%= command.id %> myapp:latest",
|
|
2065
|
+
"<%= config.bin %> <%= command.id %> --profile staging myapp:latest",
|
|
2066
|
+
"<%= config.bin %> <%= command.id %> --pin myapp:latest -- --rm"
|
|
2067
|
+
],
|
|
2068
|
+
"flags": {
|
|
2069
|
+
"chdir": {
|
|
2070
|
+
"description": "directory to run command in",
|
|
2071
|
+
"name": "chdir",
|
|
2072
|
+
"required": false,
|
|
2073
|
+
"hasDynamicHelp": false,
|
|
2074
|
+
"multiple": false,
|
|
2075
|
+
"type": "option"
|
|
2076
|
+
},
|
|
2077
|
+
"pin": {
|
|
2078
|
+
"description": "append git commit SHA to workspace name for commit-specific isolation",
|
|
2079
|
+
"name": "pin",
|
|
2080
|
+
"required": false,
|
|
2081
|
+
"allowNo": false,
|
|
2082
|
+
"type": "boolean"
|
|
2083
|
+
},
|
|
2084
|
+
"port": {
|
|
2085
|
+
"char": "p",
|
|
2086
|
+
"description": "port to forward and set as PORT env var (default: 8080)",
|
|
2087
|
+
"name": "port",
|
|
2088
|
+
"required": false,
|
|
2089
|
+
"default": 8080,
|
|
2090
|
+
"hasDynamicHelp": false,
|
|
2091
|
+
"multiple": false,
|
|
2092
|
+
"type": "option"
|
|
2093
|
+
},
|
|
2094
|
+
"profile": {
|
|
2095
|
+
"description": "profile to use for the workspace (will be appended to workspace name)",
|
|
2096
|
+
"name": "profile",
|
|
2097
|
+
"required": false,
|
|
2098
|
+
"hasDynamicHelp": false,
|
|
2099
|
+
"multiple": false,
|
|
2100
|
+
"type": "option"
|
|
2101
|
+
}
|
|
2102
|
+
},
|
|
2103
|
+
"hasDynamicHelp": false,
|
|
2104
|
+
"hiddenAliases": [],
|
|
2105
|
+
"id": "flow:docker:run",
|
|
2106
|
+
"pluginAlias": "hereya-cli",
|
|
2107
|
+
"pluginName": "hereya-cli",
|
|
2108
|
+
"pluginType": "core",
|
|
2109
|
+
"strict": false,
|
|
2110
|
+
"enableJsonFlag": false,
|
|
2111
|
+
"isESM": true,
|
|
2112
|
+
"relativePath": [
|
|
2113
|
+
"dist",
|
|
2114
|
+
"commands",
|
|
2115
|
+
"flow",
|
|
2116
|
+
"docker",
|
|
2117
|
+
"run",
|
|
2118
|
+
"index.js"
|
|
2119
|
+
]
|
|
2120
|
+
},
|
|
2121
2121
|
"workspace:env:set": {
|
|
2122
2122
|
"aliases": [],
|
|
2123
2123
|
"args": {},
|
|
@@ -2244,6 +2244,13 @@
|
|
|
2244
2244
|
"allowNo": false,
|
|
2245
2245
|
"type": "boolean"
|
|
2246
2246
|
},
|
|
2247
|
+
"force": {
|
|
2248
|
+
"char": "f",
|
|
2249
|
+
"description": "force reinstall even if executor is already installed",
|
|
2250
|
+
"name": "force",
|
|
2251
|
+
"allowNo": false,
|
|
2252
|
+
"type": "boolean"
|
|
2253
|
+
},
|
|
2247
2254
|
"workspace": {
|
|
2248
2255
|
"char": "w",
|
|
2249
2256
|
"description": "name of the workspace",
|
|
@@ -2345,5 +2352,5 @@
|
|
|
2345
2352
|
]
|
|
2346
2353
|
}
|
|
2347
2354
|
},
|
|
2348
|
-
"version": "0.
|
|
2355
|
+
"version": "0.69.0"
|
|
2349
2356
|
}
|