hereya-cli 0.101.1 → 0.103.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ $ npm install -g hereya-cli
21
21
  $ hereya COMMAND
22
22
  running command...
23
23
  $ hereya (--version)
24
- hereya-cli/0.101.1 linux-x64 node-v24.16.0
24
+ hereya-cli/0.103.0 linux-x64 node-v24.18.0
25
25
  $ hereya --help [COMMAND]
26
26
  USAGE
27
27
  $ hereya COMMAND
@@ -71,6 +71,8 @@ USAGE
71
71
  * [`hereya import PACKAGE`](#hereya-import-package)
72
72
  * [`hereya import-repo PROJECT`](#hereya-import-repo-project)
73
73
  * [`hereya init PROJECT`](#hereya-init-project)
74
+ * [`hereya job cancel JOBID`](#hereya-job-cancel-jobid)
75
+ * [`hereya job list`](#hereya-job-list)
74
76
  * [`hereya list`](#hereya-list)
75
77
  * [`hereya login [URL]`](#hereya-login-url)
76
78
  * [`hereya logout`](#hereya-logout)
@@ -129,7 +131,7 @@ EXAMPLES
129
131
  $ hereya add cloudy/docker_postgres
130
132
  ```
131
133
 
132
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/add/index.ts)_
134
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/add/index.ts)_
133
135
 
134
136
  ## `hereya app deploy NAME`
135
137
 
@@ -163,7 +165,7 @@ EXAMPLES
163
165
  $ hereya app deploy my-org/my-app -w prod -p organizationId=org-123
164
166
  ```
165
167
 
166
- _See code: [src/commands/app/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/app/deploy/index.ts)_
168
+ _See code: [src/commands/app/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/app/deploy/index.ts)_
167
169
 
168
170
  ## `hereya app deployments NAME`
169
171
 
@@ -183,7 +185,7 @@ EXAMPLES
183
185
  $ hereya app deployments my-org/my-app
184
186
  ```
185
187
 
186
- _See code: [src/commands/app/deployments/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/app/deployments/index.ts)_
188
+ _See code: [src/commands/app/deployments/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/app/deployments/index.ts)_
187
189
 
188
190
  ## `hereya app destroy NAME`
189
191
 
@@ -212,7 +214,7 @@ EXAMPLES
212
214
  $ hereya app destroy my-org/my-app -w my-workspace
213
215
  ```
214
216
 
215
- _See code: [src/commands/app/destroy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/app/destroy/index.ts)_
217
+ _See code: [src/commands/app/destroy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/app/destroy/index.ts)_
216
218
 
217
219
  ## `hereya app env NAME [KEY]`
218
220
 
@@ -238,7 +240,7 @@ EXAMPLES
238
240
  $ hereya app env my-org/my-app -w my-workspace DATABASE_URL
239
241
  ```
240
242
 
241
- _See code: [src/commands/app/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/app/env/index.ts)_
243
+ _See code: [src/commands/app/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/app/env/index.ts)_
242
244
 
243
245
  ## `hereya app list`
244
246
 
@@ -255,7 +257,7 @@ EXAMPLES
255
257
  $ hereya app list
256
258
  ```
257
259
 
258
- _See code: [src/commands/app/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/app/list/index.ts)_
260
+ _See code: [src/commands/app/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/app/list/index.ts)_
259
261
 
260
262
  ## `hereya app new DIRNAME`
261
263
 
@@ -281,7 +283,7 @@ EXAMPLES
281
283
  $ hereya app new ./my-app -n my-org/my-app --description "An ai-app-builder app"
282
284
  ```
283
285
 
284
- _See code: [src/commands/app/new/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/app/new/index.ts)_
286
+ _See code: [src/commands/app/new/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/app/new/index.ts)_
285
287
 
286
288
  ## `hereya app status NAME`
287
289
 
@@ -304,7 +306,7 @@ EXAMPLES
304
306
  $ hereya app status my-org/my-app -w my-workspace
305
307
  ```
306
308
 
307
- _See code: [src/commands/app/status/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/app/status/index.ts)_
309
+ _See code: [src/commands/app/status/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/app/status/index.ts)_
308
310
 
309
311
  ## `hereya bootstrap INFRASTRUCTURETYPE`
310
312
 
@@ -329,7 +331,7 @@ EXAMPLES
329
331
  $ hereya bootstrap local
330
332
  ```
331
333
 
332
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/bootstrap/index.ts)_
334
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/bootstrap/index.ts)_
333
335
 
334
336
  ## `hereya clone PROJECT`
335
337
 
@@ -354,7 +356,7 @@ EXAMPLES
354
356
  $ hereya clone myProject --chdir=./myProject
355
357
  ```
356
358
 
357
- _See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/clone/index.ts)_
359
+ _See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/clone/index.ts)_
358
360
 
359
361
  ## `hereya config export-backend [FILE]`
360
362
 
@@ -376,7 +378,7 @@ EXAMPLES
376
378
  $ hereya config export-backend ./path/to/export.json
377
379
  ```
378
380
 
379
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/config/export-backend/index.ts)_
381
+ _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/config/export-backend/index.ts)_
380
382
 
381
383
  ## `hereya config get-backend`
382
384
 
@@ -393,7 +395,7 @@ EXAMPLES
393
395
  $ hereya config get-backend
394
396
  ```
395
397
 
396
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/config/get-backend/index.ts)_
398
+ _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/config/get-backend/index.ts)_
397
399
 
398
400
  ## `hereya config import-backend FILE`
399
401
 
@@ -413,7 +415,7 @@ EXAMPLES
413
415
  $ hereya config import-backend ./path/to/cloud-backend.json
414
416
  ```
415
417
 
416
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/config/import-backend/index.ts)_
418
+ _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/config/import-backend/index.ts)_
417
419
 
418
420
  ## `hereya config use-backend TYPE`
419
421
 
@@ -435,7 +437,7 @@ EXAMPLES
435
437
  $ hereya config use-backend local
436
438
  ```
437
439
 
438
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/config/use-backend/index.ts)_
440
+ _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/config/use-backend/index.ts)_
439
441
 
440
442
  ## `hereya delete-state`
441
443
 
@@ -461,7 +463,7 @@ EXAMPLES
461
463
  $ hereya delete-state --workspace staging
462
464
  ```
463
465
 
464
- _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/delete-state/index.ts)_
466
+ _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/delete-state/index.ts)_
465
467
 
466
468
  ## `hereya deploy`
467
469
 
@@ -487,7 +489,7 @@ EXAMPLES
487
489
  $ hereya deploy
488
490
  ```
489
491
 
490
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/deploy/index.ts)_
492
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/deploy/index.ts)_
491
493
 
492
494
  ## `hereya devenv config`
493
495
 
@@ -508,7 +510,7 @@ EXAMPLES
508
510
  $ hereya devenv config -w my-workspace
509
511
  ```
510
512
 
511
- _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/devenv/config/index.ts)_
513
+ _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/devenv/config/index.ts)_
512
514
 
513
515
  ## `hereya devenv install`
514
516
 
@@ -535,7 +537,7 @@ EXAMPLES
535
537
  $ hereya devenv install -w my-workspace -p instanceType=t3.large
536
538
  ```
537
539
 
538
- _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/devenv/install/index.ts)_
540
+ _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/devenv/install/index.ts)_
539
541
 
540
542
  ## `hereya devenv project init PROJECT`
541
543
 
@@ -567,7 +569,7 @@ EXAMPLES
567
569
  $ hereya devenv project init my-app -w my-workspace -t acme/node-starter -p region=us-east-1
568
570
  ```
569
571
 
570
- _See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/devenv/project/init/index.ts)_
572
+ _See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/devenv/project/init/index.ts)_
571
573
 
572
574
  ## `hereya devenv project uninit PROJECT`
573
575
 
@@ -593,7 +595,7 @@ EXAMPLES
593
595
  $ hereya devenv project uninit my-app -w my-workspace --force
594
596
  ```
595
597
 
596
- _See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/devenv/project/uninit/index.ts)_
598
+ _See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/devenv/project/uninit/index.ts)_
597
599
 
598
600
  ## `hereya devenv sleep`
599
601
 
@@ -614,7 +616,7 @@ EXAMPLES
614
616
  $ hereya devenv sleep -w my-workspace
615
617
  ```
616
618
 
617
- _See code: [src/commands/devenv/sleep/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/devenv/sleep/index.ts)_
619
+ _See code: [src/commands/devenv/sleep/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/devenv/sleep/index.ts)_
618
620
 
619
621
  ## `hereya devenv ssh`
620
622
 
@@ -634,7 +636,7 @@ EXAMPLES
634
636
  $ hereya devenv ssh -w my-workspace
635
637
  ```
636
638
 
637
- _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/devenv/ssh/index.ts)_
639
+ _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/devenv/ssh/index.ts)_
638
640
 
639
641
  ## `hereya devenv uninstall`
640
642
 
@@ -655,7 +657,7 @@ EXAMPLES
655
657
  $ hereya devenv uninstall -w my-workspace
656
658
  ```
657
659
 
658
- _See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/devenv/uninstall/index.ts)_
660
+ _See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/devenv/uninstall/index.ts)_
659
661
 
660
662
  ## `hereya doc PACKAGE`
661
663
 
@@ -688,7 +690,7 @@ EXAMPLES
688
690
  $ hereya doc my-package --no-doc
689
691
  ```
690
692
 
691
- _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/doc/index.ts)_
693
+ _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/doc/index.ts)_
692
694
 
693
695
  ## `hereya docker run IMAGE`
694
696
 
@@ -719,7 +721,7 @@ EXAMPLES
719
721
  $ hereya docker run myapp:latest -- --rm -v ./data:/data
720
722
  ```
721
723
 
722
- _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/docker/run/index.ts)_
724
+ _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/docker/run/index.ts)_
723
725
 
724
726
  ## `hereya down`
725
727
 
@@ -746,7 +748,7 @@ EXAMPLES
746
748
  $ hereya down
747
749
  ```
748
750
 
749
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/down/index.ts)_
751
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/down/index.ts)_
750
752
 
751
753
  ## `hereya env [NAME]`
752
754
 
@@ -777,7 +779,7 @@ EXAMPLES
777
779
  $ hereya env -w dev -l
778
780
  ```
779
781
 
780
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/env/index.ts)_
782
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/env/index.ts)_
781
783
 
782
784
  ## `hereya env set [NAME]`
783
785
 
@@ -804,7 +806,7 @@ EXAMPLES
804
806
  $ hereya env set FOO -v bar -w dev
805
807
  ```
806
808
 
807
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/env/set/index.ts)_
809
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/env/set/index.ts)_
808
810
 
809
811
  ## `hereya executor start`
810
812
 
@@ -838,7 +840,7 @@ EXAMPLES
838
840
  HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
839
841
  ```
840
842
 
841
- _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/executor/start/index.ts)_
843
+ _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/executor/start/index.ts)_
842
844
 
843
845
  ## `hereya flow add PACKAGE`
844
846
 
@@ -876,7 +878,7 @@ EXAMPLES
876
878
  $ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
877
879
  ```
878
880
 
879
- _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/add/index.ts)_
881
+ _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/add/index.ts)_
880
882
 
881
883
  ## `hereya flow docker run IMAGE`
882
884
 
@@ -906,7 +908,7 @@ EXAMPLES
906
908
  $ hereya flow docker run --pin myapp:latest -- --rm
907
909
  ```
908
910
 
909
- _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/docker/run/index.ts)_
911
+ _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/docker/run/index.ts)_
910
912
 
911
913
  ## `hereya flow down`
912
914
 
@@ -940,7 +942,7 @@ EXAMPLES
940
942
  $ hereya flow down --pin
941
943
  ```
942
944
 
943
- _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/down/index.ts)_
945
+ _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/down/index.ts)_
944
946
 
945
947
  ## `hereya flow env [NAME]`
946
948
 
@@ -974,7 +976,7 @@ EXAMPLES
974
976
  $ hereya flow env -l
975
977
  ```
976
978
 
977
- _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/env/index.ts)_
979
+ _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/env/index.ts)_
978
980
 
979
981
  ## `hereya flow provid PACKAGE`
980
982
 
@@ -1003,7 +1005,7 @@ EXAMPLES
1003
1005
  $ hereya flow provid hereya/postgres --pin
1004
1006
  ```
1005
1007
 
1006
- _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/provid/index.ts)_
1008
+ _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/provid/index.ts)_
1007
1009
 
1008
1010
  ## `hereya flow remove PACKAGE`
1009
1011
 
@@ -1033,7 +1035,7 @@ EXAMPLES
1033
1035
  $ hereya flow remove cloudy/docker_postgres --profile staging
1034
1036
  ```
1035
1037
 
1036
- _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/remove/index.ts)_
1038
+ _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/remove/index.ts)_
1037
1039
 
1038
1040
  ## `hereya flow run CMD`
1039
1041
 
@@ -1062,7 +1064,7 @@ EXAMPLES
1062
1064
  $ hereya flow run --pin -- npm test
1063
1065
  ```
1064
1066
 
1065
- _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/run/index.ts)_
1067
+ _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/run/index.ts)_
1066
1068
 
1067
1069
  ## `hereya flow up`
1068
1070
 
@@ -1096,7 +1098,7 @@ EXAMPLES
1096
1098
  $ hereya flow up --pin
1097
1099
  ```
1098
1100
 
1099
- _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/flow/up/index.ts)_
1101
+ _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/flow/up/index.ts)_
1100
1102
 
1101
1103
  ## `hereya help [COMMAND]`
1102
1104
 
@@ -1153,7 +1155,7 @@ EXAMPLES
1153
1155
  $ hereya import org/my-package -f state.tfstate -w my-workspace
1154
1156
  ```
1155
1157
 
1156
- _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/import/index.ts)_
1158
+ _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/import/index.ts)_
1157
1159
 
1158
1160
  ## `hereya import-repo PROJECT`
1159
1161
 
@@ -1183,7 +1185,7 @@ EXAMPLES
1183
1185
  $ hereya import-repo myProject -w=dev -r=https://github.com/acme/api --clone --chdir=./api
1184
1186
  ```
1185
1187
 
1186
- _See code: [src/commands/import-repo/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/import-repo/index.ts)_
1188
+ _See code: [src/commands/import-repo/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/import-repo/index.ts)_
1187
1189
 
1188
1190
  ## `hereya init PROJECT`
1189
1191
 
@@ -1217,7 +1219,61 @@ EXAMPLES
1217
1219
  $ hereya init myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1
1218
1220
  ```
1219
1221
 
1220
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/init/index.ts)_
1222
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/init/index.ts)_
1223
+
1224
+ ## `hereya job cancel JOBID`
1225
+
1226
+ Cancel a remote executor job. Pending jobs and running jobs with a stale executor heartbeat (stuck executor) are cancellable by default; use --force to cancel a job that is actively running.
1227
+
1228
+ ```
1229
+ USAGE
1230
+ $ hereya job cancel JOBID -w <value> [-f]
1231
+
1232
+ ARGUMENTS
1233
+ JOBID id of the remote executor job to cancel
1234
+
1235
+ FLAGS
1236
+ -f, --force cancel even if the job appears to be actively running; does NOT stop the executor's in-flight
1237
+ work
1238
+ -w, --workspace=<value> (required) name of the workspace the job belongs to
1239
+
1240
+ DESCRIPTION
1241
+ Cancel a remote executor job. Pending jobs and running jobs with a stale executor heartbeat (stuck executor) are
1242
+ cancellable by default; use --force to cancel a job that is actively running.
1243
+
1244
+ EXAMPLES
1245
+ $ hereya job cancel my-job-id -w my-workspace
1246
+
1247
+ $ hereya job cancel my-job-id -w my-workspace --force
1248
+ ```
1249
+
1250
+ _See code: [src/commands/job/cancel/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/job/cancel/index.ts)_
1251
+
1252
+ ## `hereya job list`
1253
+
1254
+ List remote executor jobs for a workspace, newest first. Pending jobs can be cancelled with `hereya job cancel <jobId>`.
1255
+
1256
+ ```
1257
+ USAGE
1258
+ $ hereya job list -w <value> [--limit <value>] [--status pending|running|completed|failed|cancelled]
1259
+
1260
+ FLAGS
1261
+ -w, --workspace=<value> (required) name of the workspace to list jobs for
1262
+ --limit=<value> maximum number of jobs to list (server default: 20)
1263
+ --status=<option> only list jobs with this status
1264
+ <options: pending|running|completed|failed|cancelled>
1265
+
1266
+ DESCRIPTION
1267
+ List remote executor jobs for a workspace, newest first. Pending jobs can be cancelled with `hereya job cancel
1268
+ <jobId>`.
1269
+
1270
+ EXAMPLES
1271
+ $ hereya job list -w my-workspace
1272
+
1273
+ $ hereya job list -w my-workspace --status pending --limit 10
1274
+ ```
1275
+
1276
+ _See code: [src/commands/job/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/job/list/index.ts)_
1221
1277
 
1222
1278
  ## `hereya list`
1223
1279
 
@@ -1234,7 +1290,7 @@ EXAMPLES
1234
1290
  $ hereya list
1235
1291
  ```
1236
1292
 
1237
- _See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/list/index.ts)_
1293
+ _See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/list/index.ts)_
1238
1294
 
1239
1295
  ## `hereya login [URL]`
1240
1296
 
@@ -1263,7 +1319,7 @@ EXAMPLES
1263
1319
  $ hereya login --token=your-token https://cloud.hereya.dev
1264
1320
  ```
1265
1321
 
1266
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/login/index.ts)_
1322
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/login/index.ts)_
1267
1323
 
1268
1324
  ## `hereya logout`
1269
1325
 
@@ -1280,7 +1336,7 @@ EXAMPLES
1280
1336
  $ hereya logout
1281
1337
  ```
1282
1338
 
1283
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/logout/index.ts)_
1339
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/logout/index.ts)_
1284
1340
 
1285
1341
  ## `hereya provid PACKAGE`
1286
1342
 
@@ -1308,7 +1364,7 @@ EXAMPLES
1308
1364
  $ hereya provid hereya/postgres --workspace staging
1309
1365
  ```
1310
1366
 
1311
- _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/provid/index.ts)_
1367
+ _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/provid/index.ts)_
1312
1368
 
1313
1369
  ## `hereya publish`
1314
1370
 
@@ -1331,7 +1387,7 @@ EXAMPLES
1331
1387
  $ hereya publish --chdir=/path/to/package
1332
1388
  ```
1333
1389
 
1334
- _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/publish/index.ts)_
1390
+ _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/publish/index.ts)_
1335
1391
 
1336
1392
  ## `hereya remove PACKAGE`
1337
1393
 
@@ -1359,7 +1415,7 @@ EXAMPLES
1359
1415
  $ hereya remove cloudy/docker_postgres
1360
1416
  ```
1361
1417
 
1362
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/remove/index.ts)_
1418
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/remove/index.ts)_
1363
1419
 
1364
1420
  ## `hereya run CMD`
1365
1421
 
@@ -1385,7 +1441,7 @@ EXAMPLES
1385
1441
  $ hereya run -w uat -- node index.js
1386
1442
  ```
1387
1443
 
1388
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/run/index.ts)_
1444
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/run/index.ts)_
1389
1445
 
1390
1446
  ## `hereya search QUERY`
1391
1447
 
@@ -1416,7 +1472,7 @@ EXAMPLES
1416
1472
  $ hereya search database --json
1417
1473
  ```
1418
1474
 
1419
- _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/search/index.ts)_
1475
+ _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/search/index.ts)_
1420
1476
 
1421
1477
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
1422
1478
 
@@ -1441,7 +1497,7 @@ EXAMPLES
1441
1497
  $ hereya unbootstrap local
1442
1498
  ```
1443
1499
 
1444
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/unbootstrap/index.ts)_
1500
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/unbootstrap/index.ts)_
1445
1501
 
1446
1502
  ## `hereya undeploy`
1447
1503
 
@@ -1467,7 +1523,7 @@ EXAMPLES
1467
1523
  $ hereya undeploy
1468
1524
  ```
1469
1525
 
1470
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/undeploy/index.ts)_
1526
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/undeploy/index.ts)_
1471
1527
 
1472
1528
  ## `hereya uninit PROJECT`
1473
1529
 
@@ -1495,7 +1551,7 @@ EXAMPLES
1495
1551
  $ hereya uninit myProject -w dev -p prodWorkspace=prod
1496
1552
  ```
1497
1553
 
1498
- _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/uninit/index.ts)_
1554
+ _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/uninit/index.ts)_
1499
1555
 
1500
1556
  ## `hereya up`
1501
1557
 
@@ -1522,7 +1578,7 @@ EXAMPLES
1522
1578
  $ hereya up
1523
1579
  ```
1524
1580
 
1525
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/up/index.ts)_
1581
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/up/index.ts)_
1526
1582
 
1527
1583
  ## `hereya update [VERSION]`
1528
1584
 
@@ -1544,7 +1600,7 @@ EXAMPLES
1544
1600
  $ hereya update 0.75.0
1545
1601
  ```
1546
1602
 
1547
- _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/update/index.ts)_
1603
+ _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/update/index.ts)_
1548
1604
 
1549
1605
  ## `hereya workspace create NAME`
1550
1606
 
@@ -1569,7 +1625,7 @@ EXAMPLES
1569
1625
  $ hereya workspace create dev
1570
1626
  ```
1571
1627
 
1572
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/create/index.ts)_
1628
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/create/index.ts)_
1573
1629
 
1574
1630
  ## `hereya workspace delete NAME`
1575
1631
 
@@ -1589,7 +1645,7 @@ EXAMPLES
1589
1645
  $ hereya workspace delete dev
1590
1646
  ```
1591
1647
 
1592
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/delete/index.ts)_
1648
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/delete/index.ts)_
1593
1649
 
1594
1650
  ## `hereya workspace env [NAME]`
1595
1651
 
@@ -1615,7 +1671,7 @@ EXAMPLES
1615
1671
  $ hereya workspace env myEnv -w dev
1616
1672
  ```
1617
1673
 
1618
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/env/index.ts)_
1674
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/env/index.ts)_
1619
1675
 
1620
1676
  ## `hereya workspace env set`
1621
1677
 
@@ -1639,7 +1695,7 @@ EXAMPLES
1639
1695
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
1640
1696
  ```
1641
1697
 
1642
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/env/set/index.ts)_
1698
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/env/set/index.ts)_
1643
1699
 
1644
1700
  ## `hereya workspace env unset`
1645
1701
 
@@ -1660,7 +1716,7 @@ EXAMPLES
1660
1716
  $ hereya workspace env unset -w my-workspace -n myVar
1661
1717
  ```
1662
1718
 
1663
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/env/unset/index.ts)_
1719
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/env/unset/index.ts)_
1664
1720
 
1665
1721
  ## `hereya workspace executor install`
1666
1722
 
@@ -1689,7 +1745,7 @@ DESCRIPTION
1689
1745
  - always-on: a long-lived EC2 polls hereya-cloud 24/7 (legacy).
1690
1746
  ```
1691
1747
 
1692
- _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/executor/install/index.ts)_
1748
+ _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/executor/install/index.ts)_
1693
1749
 
1694
1750
  ## `hereya workspace executor token`
1695
1751
 
@@ -1706,7 +1762,7 @@ DESCRIPTION
1706
1762
  Generate a workspace-scoped executor token for the remote executor
1707
1763
  ```
1708
1764
 
1709
- _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/executor/token/index.ts)_
1765
+ _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/executor/token/index.ts)_
1710
1766
 
1711
1767
  ## `hereya workspace executor uninstall`
1712
1768
 
@@ -1730,7 +1786,7 @@ DESCRIPTION
1730
1786
  controls log output.
1731
1787
  ```
1732
1788
 
1733
- _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/executor/uninstall/index.ts)_
1789
+ _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/executor/uninstall/index.ts)_
1734
1790
 
1735
1791
  ## `hereya workspace install PACKAGE`
1736
1792
 
@@ -1757,7 +1813,7 @@ EXAMPLES
1757
1813
  $ hereya workspace install hereya/aws-cognito
1758
1814
  ```
1759
1815
 
1760
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/install/index.ts)_
1816
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/install/index.ts)_
1761
1817
 
1762
1818
  ## `hereya workspace list`
1763
1819
 
@@ -1781,7 +1837,7 @@ EXAMPLES
1781
1837
  $ hereya workspace list --org personal
1782
1838
  ```
1783
1839
 
1784
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/list/index.ts)_
1840
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/list/index.ts)_
1785
1841
 
1786
1842
  ## `hereya workspace set-profile PROFILE`
1787
1843
 
@@ -1805,7 +1861,7 @@ EXAMPLES
1805
1861
  $ hereya workspace set-profile prod-profile -w production
1806
1862
  ```
1807
1863
 
1808
- _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/set-profile/index.ts)_
1864
+ _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/set-profile/index.ts)_
1809
1865
 
1810
1866
  ## `hereya workspace uninstall PACKAGE`
1811
1867
 
@@ -1832,5 +1888,5 @@ EXAMPLES
1832
1888
  $ hereya workspace uninstall hereya/aws-cognito
1833
1889
  ```
1834
1890
 
1835
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/workspace/uninstall/index.ts)_
1891
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.103.0/src/commands/workspace/uninstall/index.ts)_
1836
1892
  <!-- commandsstop -->
@@ -1,4 +1,18 @@
1
1
  import { CloudHttpConfig } from './utils.js';
2
+ export declare function cancelExecutorJob(config: CloudHttpConfig, input: {
3
+ force?: boolean;
4
+ jobId: string;
5
+ workspace: string;
6
+ }): Promise<{
7
+ active?: boolean;
8
+ heartbeatAgeSeconds?: number;
9
+ reason: string;
10
+ status?: string;
11
+ success: false;
12
+ } | {
13
+ status: string;
14
+ success: true;
15
+ }>;
2
16
  export declare function generateExecutorToken(config: CloudHttpConfig, input: {
3
17
  workspace: string;
4
18
  }): Promise<{
@@ -27,6 +41,25 @@ export declare function getExecutorJobStatus(config: CloudHttpConfig, input: {
27
41
  reason: string;
28
42
  success: false;
29
43
  }>;
44
+ export declare function listExecutorJobs(config: CloudHttpConfig, input: {
45
+ limit?: number;
46
+ status?: string;
47
+ workspace: string;
48
+ }): Promise<{
49
+ jobs: Array<{
50
+ attempts: number;
51
+ claimedBy: null | string;
52
+ createdAt: string;
53
+ id: string;
54
+ status: string;
55
+ type: string;
56
+ updatedAt: string;
57
+ }>;
58
+ success: true;
59
+ } | {
60
+ reason: string;
61
+ success: false;
62
+ }>;
30
63
  export declare function pollExecutorJobs(config: CloudHttpConfig, input: {
31
64
  executorId?: string;
32
65
  workspace: string;
@@ -1,4 +1,23 @@
1
1
  import { safeResponseJson } from './utils.js';
2
+ export async function cancelExecutorJob(config, input) {
3
+ const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/jobs/${encodeURIComponent(input.jobId)}/cancel`, {
4
+ body: JSON.stringify({ force: input.force === true }),
5
+ headers: { 'Authorization': `Bearer ${config.accessToken}`, 'Content-Type': 'application/json' },
6
+ method: 'POST',
7
+ });
8
+ if (!response.ok) {
9
+ const error = await safeResponseJson(response);
10
+ return {
11
+ active: error.active,
12
+ heartbeatAgeSeconds: error.heartbeatAgeSeconds,
13
+ reason: error.error || `Failed to cancel job (status ${response.status})`,
14
+ status: error.status,
15
+ success: false,
16
+ };
17
+ }
18
+ const result = await response.json();
19
+ return { status: result.status, success: true };
20
+ }
2
21
  export async function generateExecutorToken(config, input) {
3
22
  const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/executor-token`, {
4
23
  headers: { 'Authorization': `Bearer ${config.accessToken}` },
@@ -33,6 +52,25 @@ export async function getExecutorJobStatus(config, input) {
33
52
  const result = await response.json();
34
53
  return { job: result.job, success: true };
35
54
  }
55
+ export async function listExecutorJobs(config, input) {
56
+ const url = new URL(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/jobs`);
57
+ if (input.limit !== undefined) {
58
+ url.searchParams.set('limit', String(input.limit));
59
+ }
60
+ if (input.status) {
61
+ url.searchParams.set('status', input.status);
62
+ }
63
+ const response = await fetch(url.toString(), {
64
+ headers: { 'Authorization': `Bearer ${config.accessToken}` },
65
+ method: 'GET',
66
+ });
67
+ if (!response.ok) {
68
+ const error = await safeResponseJson(response);
69
+ return { reason: error.error || 'Failed to list jobs', success: false };
70
+ }
71
+ const result = await response.json();
72
+ return { jobs: result.jobs, success: true };
73
+ }
36
74
  export async function pollExecutorJobs(config, input) {
37
75
  const url = new URL(`${config.url}/api/executor/jobs`);
38
76
  url.searchParams.set('workspace', input.workspace);
@@ -27,6 +27,20 @@ export declare class CloudBackend implements Backend {
27
27
  private readonly config;
28
28
  constructor(config: CloudBackendConfig);
29
29
  addPackageToWorkspace(input: Parameters<typeof packagesWorkspace.addPackageToWorkspace>[1]): Promise<import("../common.js").AddPackageToWorkspaceOutput>;
30
+ cancelExecutorJob(input: {
31
+ force?: boolean;
32
+ jobId: string;
33
+ workspace: string;
34
+ }): Promise<{
35
+ active?: boolean;
36
+ heartbeatAgeSeconds?: number;
37
+ reason: string;
38
+ status?: string;
39
+ success: false;
40
+ } | {
41
+ status: string;
42
+ success: true;
43
+ }>;
30
44
  createWorkspace(input: Parameters<typeof workspaces.createWorkspace>[1]): Promise<import("../common.js").CreateWorkspaceOutput>;
31
45
  deleteState(input: Parameters<typeof state.deleteState>[1]): Promise<import("../common.js").DeleteStateOutput>;
32
46
  deleteWorkspace(input: Parameters<typeof workspaces.deleteWorkspace>[1]): Promise<import("../common.js").DeleteWorkspaceOutput>;
@@ -124,6 +138,25 @@ export declare class CloudBackend implements Backend {
124
138
  success: true;
125
139
  versions: appsVersions.AppVersionSummary[];
126
140
  }>;
141
+ listExecutorJobs(input: {
142
+ limit?: number;
143
+ status?: string;
144
+ workspace: string;
145
+ }): Promise<{
146
+ jobs: Array<{
147
+ attempts: number;
148
+ claimedBy: null | string;
149
+ createdAt: string;
150
+ id: string;
151
+ status: string;
152
+ type: string;
153
+ updatedAt: string;
154
+ }>;
155
+ success: true;
156
+ } | {
157
+ reason: string;
158
+ success: false;
159
+ }>;
127
160
  listPackageVersions(name: string): Promise<import("../common.js").ListPackageVersionsOutput>;
128
161
  listProjects(): Promise<import("../common.js").ListProjectsOutput>;
129
162
  listWorkspaces(input?: Parameters<typeof workspaces.listWorkspaces>[1]): Promise<string[]>;
@@ -18,6 +18,9 @@ export class CloudBackend {
18
18
  addPackageToWorkspace(input) {
19
19
  return packagesWorkspace.addPackageToWorkspace(this.config, input);
20
20
  }
21
+ cancelExecutorJob(input) {
22
+ return executorJobs.cancelExecutorJob(this.config, input);
23
+ }
21
24
  createWorkspace(input) {
22
25
  return workspaces.createWorkspace(this.config, input);
23
26
  }
@@ -90,6 +93,9 @@ export class CloudBackend {
90
93
  listAppVersions(name) {
91
94
  return appsVersions.listAppVersions(this.config, name);
92
95
  }
96
+ listExecutorJobs(input) {
97
+ return executorJobs.listExecutorJobs(this.config, input);
98
+ }
93
99
  listPackageVersions(name) {
94
100
  return packagesRegistry.listPackageVersions(this.config, name);
95
101
  }
@@ -0,0 +1,13 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class JobCancel extends Command {
3
+ static args: {
4
+ jobId: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ force: import("@oclif/core/interfaces").BooleanFlag<boolean>;
10
+ workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,46 @@
1
+ import { Args, Command, Flags } from '@oclif/core';
2
+ import { CloudBackend } from '../../../backend/cloud/cloud-backend.js';
3
+ import { getBackend } from '../../../backend/index.js';
4
+ export default class JobCancel extends Command {
5
+ static args = {
6
+ jobId: Args.string({ description: 'id of the remote executor job to cancel', required: true }),
7
+ };
8
+ static description = 'Cancel a remote executor job. Pending jobs and running jobs with a stale executor heartbeat (stuck executor) are cancellable by default; use --force to cancel a job that is actively running.';
9
+ static examples = [
10
+ '<%= config.bin %> <%= command.id %> my-job-id -w my-workspace',
11
+ '<%= config.bin %> <%= command.id %> my-job-id -w my-workspace --force',
12
+ ];
13
+ static flags = {
14
+ force: Flags.boolean({
15
+ char: 'f',
16
+ default: false,
17
+ description: "cancel even if the job appears to be actively running; does NOT stop the executor's in-flight work",
18
+ }),
19
+ workspace: Flags.string({
20
+ char: 'w',
21
+ description: 'name of the workspace the job belongs to',
22
+ required: true,
23
+ }),
24
+ };
25
+ async run() {
26
+ const { args, flags } = await this.parse(JobCancel);
27
+ const backend = await getBackend();
28
+ if (!(backend instanceof CloudBackend)) {
29
+ this.error('Cancelling executor jobs requires the cloud backend. Run `hereya login` first.');
30
+ }
31
+ const cloudBackend = backend;
32
+ const result = await cloudBackend.cancelExecutorJob({
33
+ force: flags.force,
34
+ jobId: args.jobId,
35
+ workspace: flags.workspace,
36
+ });
37
+ if (!result.success) {
38
+ const detail = result.status && !result.reason.includes(result.status) ? ` (current status: ${result.status})` : '';
39
+ const forceHint = result.active && !flags.force
40
+ ? "\nRetry with --force to cancel anyway (the executor's in-flight work will NOT be stopped)."
41
+ : '';
42
+ this.error(`Failed to cancel job ${args.jobId}: ${result.reason}${detail}${forceHint}`);
43
+ }
44
+ this.log(`Job ${args.jobId} cancelled.`);
45
+ }
46
+ }
@@ -0,0 +1,11 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class JobList extends Command {
3
+ static description: string;
4
+ static examples: string[];
5
+ static flags: {
6
+ limit: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
9
+ };
10
+ run(): Promise<void>;
11
+ }
@@ -0,0 +1,54 @@
1
+ import { Command, Flags } from '@oclif/core';
2
+ import { CloudBackend } from '../../../backend/cloud/cloud-backend.js';
3
+ import { getBackend } from '../../../backend/index.js';
4
+ export default class JobList extends Command {
5
+ static description = 'List remote executor jobs for a workspace, newest first. Pending jobs can be cancelled with `hereya job cancel <jobId>`.';
6
+ static examples = [
7
+ '<%= config.bin %> <%= command.id %> -w my-workspace',
8
+ '<%= config.bin %> <%= command.id %> -w my-workspace --status pending --limit 10',
9
+ ];
10
+ static flags = {
11
+ limit: Flags.integer({
12
+ description: 'maximum number of jobs to list (server default: 20)',
13
+ required: false,
14
+ }),
15
+ status: Flags.string({
16
+ description: 'only list jobs with this status',
17
+ options: ['pending', 'running', 'completed', 'failed', 'cancelled'],
18
+ required: false,
19
+ }),
20
+ workspace: Flags.string({
21
+ char: 'w',
22
+ description: 'name of the workspace to list jobs for',
23
+ required: true,
24
+ }),
25
+ };
26
+ async run() {
27
+ const { flags } = await this.parse(JobList);
28
+ const backend = await getBackend();
29
+ if (!(backend instanceof CloudBackend)) {
30
+ this.error('Listing executor jobs requires the cloud backend. Run `hereya login` first.');
31
+ }
32
+ const cloudBackend = backend;
33
+ const result = await cloudBackend.listExecutorJobs({
34
+ limit: flags.limit,
35
+ status: flags.status,
36
+ workspace: flags.workspace,
37
+ });
38
+ if (!result.success) {
39
+ this.error(`Failed to list jobs: ${result.reason}`);
40
+ }
41
+ if (result.jobs.length === 0) {
42
+ this.log(`No jobs found for workspace ${flags.workspace}.`);
43
+ return;
44
+ }
45
+ const idWidth = Math.max(2, ...result.jobs.map((j) => j.id.length));
46
+ const typeWidth = Math.max(4, ...result.jobs.map((j) => j.type.length));
47
+ const statusWidth = Math.max(6, ...result.jobs.map((j) => j.status.length));
48
+ this.log(`${'Id'.padEnd(idWidth)} ${'Type'.padEnd(typeWidth)} ${'Status'.padEnd(statusWidth)} Created`);
49
+ this.log('-'.repeat(idWidth + typeWidth + statusWidth + 13));
50
+ for (const job of result.jobs) {
51
+ this.log(`${job.id.padEnd(idWidth)} ${job.type.padEnd(typeWidth)} ${job.status.padEnd(statusWidth)} ${new Date(job.createdAt).toLocaleString()}`);
52
+ }
53
+ }
54
+ }
@@ -52,7 +52,7 @@ async function maybeRewake(args) {
52
52
  export async function pollExecutorJob(input) {
53
53
  const { cloudBackend, jobId, logger, workspace } = input;
54
54
  const timeout = input.timeoutMs ?? defaultTimeoutMs();
55
- logger?.info?.(`Remote executor job submitted (${jobId}). Waiting for result...`);
55
+ logger?.info?.(`Remote executor job submitted (${jobId}). Waiting for result... Cancel with: hereya job cancel ${jobId} -w ${workspace}`);
56
56
  const startTime = Date.now();
57
57
  let lastLogLength = 0;
58
58
  let lastStatus = 'pending';
@@ -109,6 +109,9 @@ export async function pollExecutorJob(input) {
109
109
  const reason = job.result?.reason || 'Remote executor job failed';
110
110
  return { reason, success: false };
111
111
  }
112
+ if (job.status === 'cancelled') {
113
+ return { reason: 'Job was cancelled', success: false };
114
+ }
112
115
  // Small delay between polls (server-side long polling handles most of the wait)
113
116
  // eslint-disable-next-line no-await-in-loop
114
117
  await new Promise(resolve => {
@@ -2402,61 +2402,6 @@
2402
2402
  "index.js"
2403
2403
  ]
2404
2404
  },
2405
- "flow:remove": {
2406
- "aliases": [],
2407
- "args": {
2408
- "package": {
2409
- "description": "Remove a previously added package.",
2410
- "name": "package",
2411
- "required": true
2412
- }
2413
- },
2414
- "description": "Remove a package from the project in a git branch-based workspace",
2415
- "examples": [
2416
- "<%= config.bin %> <%= command.id %> cloudy/docker_postgres",
2417
- "<%= config.bin %> <%= command.id %> cloudy/docker_postgres --profile staging"
2418
- ],
2419
- "flags": {
2420
- "chdir": {
2421
- "description": "\n Directory where the command will be executed.\n If not specified, it defaults to the current working directory.\n Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable.\n ",
2422
- "name": "chdir",
2423
- "required": false,
2424
- "hasDynamicHelp": false,
2425
- "multiple": false,
2426
- "type": "option"
2427
- },
2428
- "debug": {
2429
- "description": "enable debug mode",
2430
- "name": "debug",
2431
- "allowNo": false,
2432
- "type": "boolean"
2433
- },
2434
- "profile": {
2435
- "description": "profile to use for the workspace (will be appended to workspace name)",
2436
- "name": "profile",
2437
- "required": false,
2438
- "hasDynamicHelp": false,
2439
- "multiple": false,
2440
- "type": "option"
2441
- }
2442
- },
2443
- "hasDynamicHelp": false,
2444
- "hiddenAliases": [],
2445
- "id": "flow:remove",
2446
- "pluginAlias": "hereya-cli",
2447
- "pluginName": "hereya-cli",
2448
- "pluginType": "core",
2449
- "strict": true,
2450
- "enableJsonFlag": false,
2451
- "isESM": true,
2452
- "relativePath": [
2453
- "dist",
2454
- "commands",
2455
- "flow",
2456
- "remove",
2457
- "index.js"
2458
- ]
2459
- },
2460
2405
  "flow:run": {
2461
2406
  "aliases": [],
2462
2407
  "args": {
@@ -2588,6 +2533,114 @@
2588
2533
  "index.js"
2589
2534
  ]
2590
2535
  },
2536
+ "job:cancel": {
2537
+ "aliases": [],
2538
+ "args": {
2539
+ "jobId": {
2540
+ "description": "id of the remote executor job to cancel",
2541
+ "name": "jobId",
2542
+ "required": true
2543
+ }
2544
+ },
2545
+ "description": "Cancel a remote executor job. Pending jobs and running jobs with a stale executor heartbeat (stuck executor) are cancellable by default; use --force to cancel a job that is actively running.",
2546
+ "examples": [
2547
+ "<%= config.bin %> <%= command.id %> my-job-id -w my-workspace",
2548
+ "<%= config.bin %> <%= command.id %> my-job-id -w my-workspace --force"
2549
+ ],
2550
+ "flags": {
2551
+ "force": {
2552
+ "char": "f",
2553
+ "description": "cancel even if the job appears to be actively running; does NOT stop the executor's in-flight work",
2554
+ "name": "force",
2555
+ "allowNo": false,
2556
+ "type": "boolean"
2557
+ },
2558
+ "workspace": {
2559
+ "char": "w",
2560
+ "description": "name of the workspace the job belongs to",
2561
+ "name": "workspace",
2562
+ "required": true,
2563
+ "hasDynamicHelp": false,
2564
+ "multiple": false,
2565
+ "type": "option"
2566
+ }
2567
+ },
2568
+ "hasDynamicHelp": false,
2569
+ "hiddenAliases": [],
2570
+ "id": "job:cancel",
2571
+ "pluginAlias": "hereya-cli",
2572
+ "pluginName": "hereya-cli",
2573
+ "pluginType": "core",
2574
+ "strict": true,
2575
+ "enableJsonFlag": false,
2576
+ "isESM": true,
2577
+ "relativePath": [
2578
+ "dist",
2579
+ "commands",
2580
+ "job",
2581
+ "cancel",
2582
+ "index.js"
2583
+ ]
2584
+ },
2585
+ "job:list": {
2586
+ "aliases": [],
2587
+ "args": {},
2588
+ "description": "List remote executor jobs for a workspace, newest first. Pending jobs can be cancelled with `hereya job cancel <jobId>`.",
2589
+ "examples": [
2590
+ "<%= config.bin %> <%= command.id %> -w my-workspace",
2591
+ "<%= config.bin %> <%= command.id %> -w my-workspace --status pending --limit 10"
2592
+ ],
2593
+ "flags": {
2594
+ "limit": {
2595
+ "description": "maximum number of jobs to list (server default: 20)",
2596
+ "name": "limit",
2597
+ "required": false,
2598
+ "hasDynamicHelp": false,
2599
+ "multiple": false,
2600
+ "type": "option"
2601
+ },
2602
+ "status": {
2603
+ "description": "only list jobs with this status",
2604
+ "name": "status",
2605
+ "required": false,
2606
+ "hasDynamicHelp": false,
2607
+ "multiple": false,
2608
+ "options": [
2609
+ "pending",
2610
+ "running",
2611
+ "completed",
2612
+ "failed",
2613
+ "cancelled"
2614
+ ],
2615
+ "type": "option"
2616
+ },
2617
+ "workspace": {
2618
+ "char": "w",
2619
+ "description": "name of the workspace to list jobs for",
2620
+ "name": "workspace",
2621
+ "required": true,
2622
+ "hasDynamicHelp": false,
2623
+ "multiple": false,
2624
+ "type": "option"
2625
+ }
2626
+ },
2627
+ "hasDynamicHelp": false,
2628
+ "hiddenAliases": [],
2629
+ "id": "job:list",
2630
+ "pluginAlias": "hereya-cli",
2631
+ "pluginName": "hereya-cli",
2632
+ "pluginType": "core",
2633
+ "strict": true,
2634
+ "enableJsonFlag": false,
2635
+ "isESM": true,
2636
+ "relativePath": [
2637
+ "dist",
2638
+ "commands",
2639
+ "job",
2640
+ "list",
2641
+ "index.js"
2642
+ ]
2643
+ },
2591
2644
  "workspace:create": {
2592
2645
  "aliases": [],
2593
2646
  "args": {
@@ -2939,6 +2992,61 @@
2939
2992
  "index.js"
2940
2993
  ]
2941
2994
  },
2995
+ "flow:remove": {
2996
+ "aliases": [],
2997
+ "args": {
2998
+ "package": {
2999
+ "description": "Remove a previously added package.",
3000
+ "name": "package",
3001
+ "required": true
3002
+ }
3003
+ },
3004
+ "description": "Remove a package from the project in a git branch-based workspace",
3005
+ "examples": [
3006
+ "<%= config.bin %> <%= command.id %> cloudy/docker_postgres",
3007
+ "<%= config.bin %> <%= command.id %> cloudy/docker_postgres --profile staging"
3008
+ ],
3009
+ "flags": {
3010
+ "chdir": {
3011
+ "description": "\n Directory where the command will be executed.\n If not specified, it defaults to the current working directory.\n Alternatively, you can define the project root by setting the HEREYA_PROJECT_ROOT_DIR environment variable.\n ",
3012
+ "name": "chdir",
3013
+ "required": false,
3014
+ "hasDynamicHelp": false,
3015
+ "multiple": false,
3016
+ "type": "option"
3017
+ },
3018
+ "debug": {
3019
+ "description": "enable debug mode",
3020
+ "name": "debug",
3021
+ "allowNo": false,
3022
+ "type": "boolean"
3023
+ },
3024
+ "profile": {
3025
+ "description": "profile to use for the workspace (will be appended to workspace name)",
3026
+ "name": "profile",
3027
+ "required": false,
3028
+ "hasDynamicHelp": false,
3029
+ "multiple": false,
3030
+ "type": "option"
3031
+ }
3032
+ },
3033
+ "hasDynamicHelp": false,
3034
+ "hiddenAliases": [],
3035
+ "id": "flow:remove",
3036
+ "pluginAlias": "hereya-cli",
3037
+ "pluginName": "hereya-cli",
3038
+ "pluginType": "core",
3039
+ "strict": true,
3040
+ "enableJsonFlag": false,
3041
+ "isESM": true,
3042
+ "relativePath": [
3043
+ "dist",
3044
+ "commands",
3045
+ "flow",
3046
+ "remove",
3047
+ "index.js"
3048
+ ]
3049
+ },
2942
3050
  "devenv:project:init": {
2943
3051
  "aliases": [],
2944
3052
  "args": {
@@ -3206,51 +3314,6 @@
3206
3314
  "index.js"
3207
3315
  ]
3208
3316
  },
3209
- "workspace:env:unset": {
3210
- "aliases": [],
3211
- "args": {},
3212
- "description": "unset an env var for a workspace",
3213
- "examples": [
3214
- "<%= config.bin %> <%= command.id %> -w my-workspace -n myVar"
3215
- ],
3216
- "flags": {
3217
- "name": {
3218
- "char": "n",
3219
- "description": "name of the env var to unset",
3220
- "name": "name",
3221
- "required": true,
3222
- "hasDynamicHelp": false,
3223
- "multiple": false,
3224
- "type": "option"
3225
- },
3226
- "workspace": {
3227
- "char": "w",
3228
- "description": "name of the workspace to unset an env var for",
3229
- "name": "workspace",
3230
- "required": true,
3231
- "hasDynamicHelp": false,
3232
- "multiple": false,
3233
- "type": "option"
3234
- }
3235
- },
3236
- "hasDynamicHelp": false,
3237
- "hiddenAliases": [],
3238
- "id": "workspace:env:unset",
3239
- "pluginAlias": "hereya-cli",
3240
- "pluginName": "hereya-cli",
3241
- "pluginType": "core",
3242
- "strict": true,
3243
- "enableJsonFlag": false,
3244
- "isESM": true,
3245
- "relativePath": [
3246
- "dist",
3247
- "commands",
3248
- "workspace",
3249
- "env",
3250
- "unset",
3251
- "index.js"
3252
- ]
3253
- },
3254
3317
  "workspace:executor:install": {
3255
3318
  "aliases": [],
3256
3319
  "args": {},
@@ -3407,7 +3470,52 @@
3407
3470
  "uninstall",
3408
3471
  "index.js"
3409
3472
  ]
3473
+ },
3474
+ "workspace:env:unset": {
3475
+ "aliases": [],
3476
+ "args": {},
3477
+ "description": "unset an env var for a workspace",
3478
+ "examples": [
3479
+ "<%= config.bin %> <%= command.id %> -w my-workspace -n myVar"
3480
+ ],
3481
+ "flags": {
3482
+ "name": {
3483
+ "char": "n",
3484
+ "description": "name of the env var to unset",
3485
+ "name": "name",
3486
+ "required": true,
3487
+ "hasDynamicHelp": false,
3488
+ "multiple": false,
3489
+ "type": "option"
3490
+ },
3491
+ "workspace": {
3492
+ "char": "w",
3493
+ "description": "name of the workspace to unset an env var for",
3494
+ "name": "workspace",
3495
+ "required": true,
3496
+ "hasDynamicHelp": false,
3497
+ "multiple": false,
3498
+ "type": "option"
3499
+ }
3500
+ },
3501
+ "hasDynamicHelp": false,
3502
+ "hiddenAliases": [],
3503
+ "id": "workspace:env:unset",
3504
+ "pluginAlias": "hereya-cli",
3505
+ "pluginName": "hereya-cli",
3506
+ "pluginType": "core",
3507
+ "strict": true,
3508
+ "enableJsonFlag": false,
3509
+ "isESM": true,
3510
+ "relativePath": [
3511
+ "dist",
3512
+ "commands",
3513
+ "workspace",
3514
+ "env",
3515
+ "unset",
3516
+ "index.js"
3517
+ ]
3410
3518
  }
3411
3519
  },
3412
- "version": "0.101.1"
3520
+ "version": "0.103.0"
3413
3521
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.101.1",
4
+ "version": "0.103.0",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.cjs"
@@ -109,6 +109,9 @@
109
109
  ],
110
110
  "topicSeparator": " ",
111
111
  "topics": {
112
+ "job": {
113
+ "description": "Inspect and cancel remote executor jobs"
114
+ },
112
115
  "workspace": {
113
116
  "description": "Manage Hereya workspaces"
114
117
  }