hereya-cli 0.101.1 → 0.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.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.102.0/src/commands/import-repo/index.ts)_
1187
1189
 
1188
1190
  ## `hereya init PROJECT`
1189
1191
 
@@ -1217,7 +1219,56 @@ 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.102.0/src/commands/init/index.ts)_
1223
+
1224
+ ## `hereya job cancel JOBID`
1225
+
1226
+ Cancel a pending remote executor job. Only pending jobs can be cancelled.
1227
+
1228
+ ```
1229
+ USAGE
1230
+ $ hereya job cancel JOBID -w <value>
1231
+
1232
+ ARGUMENTS
1233
+ JOBID id of the remote executor job to cancel
1234
+
1235
+ FLAGS
1236
+ -w, --workspace=<value> (required) name of the workspace the job belongs to
1237
+
1238
+ DESCRIPTION
1239
+ Cancel a pending remote executor job. Only pending jobs can be cancelled.
1240
+
1241
+ EXAMPLES
1242
+ $ hereya job cancel my-job-id -w my-workspace
1243
+ ```
1244
+
1245
+ _See code: [src/commands/job/cancel/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/job/cancel/index.ts)_
1246
+
1247
+ ## `hereya job list`
1248
+
1249
+ List remote executor jobs for a workspace, newest first. Pending jobs can be cancelled with `hereya job cancel <jobId>`.
1250
+
1251
+ ```
1252
+ USAGE
1253
+ $ hereya job list -w <value> [--limit <value>] [--status pending|running|completed|failed|cancelled]
1254
+
1255
+ FLAGS
1256
+ -w, --workspace=<value> (required) name of the workspace to list jobs for
1257
+ --limit=<value> maximum number of jobs to list (server default: 20)
1258
+ --status=<option> only list jobs with this status
1259
+ <options: pending|running|completed|failed|cancelled>
1260
+
1261
+ DESCRIPTION
1262
+ List remote executor jobs for a workspace, newest first. Pending jobs can be cancelled with `hereya job cancel
1263
+ <jobId>`.
1264
+
1265
+ EXAMPLES
1266
+ $ hereya job list -w my-workspace
1267
+
1268
+ $ hereya job list -w my-workspace --status pending --limit 10
1269
+ ```
1270
+
1271
+ _See code: [src/commands/job/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/job/list/index.ts)_
1221
1272
 
1222
1273
  ## `hereya list`
1223
1274
 
@@ -1234,7 +1285,7 @@ EXAMPLES
1234
1285
  $ hereya list
1235
1286
  ```
1236
1287
 
1237
- _See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/list/index.ts)_
1288
+ _See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/list/index.ts)_
1238
1289
 
1239
1290
  ## `hereya login [URL]`
1240
1291
 
@@ -1263,7 +1314,7 @@ EXAMPLES
1263
1314
  $ hereya login --token=your-token https://cloud.hereya.dev
1264
1315
  ```
1265
1316
 
1266
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/login/index.ts)_
1317
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/login/index.ts)_
1267
1318
 
1268
1319
  ## `hereya logout`
1269
1320
 
@@ -1280,7 +1331,7 @@ EXAMPLES
1280
1331
  $ hereya logout
1281
1332
  ```
1282
1333
 
1283
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/logout/index.ts)_
1334
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/logout/index.ts)_
1284
1335
 
1285
1336
  ## `hereya provid PACKAGE`
1286
1337
 
@@ -1308,7 +1359,7 @@ EXAMPLES
1308
1359
  $ hereya provid hereya/postgres --workspace staging
1309
1360
  ```
1310
1361
 
1311
- _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/provid/index.ts)_
1362
+ _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/provid/index.ts)_
1312
1363
 
1313
1364
  ## `hereya publish`
1314
1365
 
@@ -1331,7 +1382,7 @@ EXAMPLES
1331
1382
  $ hereya publish --chdir=/path/to/package
1332
1383
  ```
1333
1384
 
1334
- _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/publish/index.ts)_
1385
+ _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/publish/index.ts)_
1335
1386
 
1336
1387
  ## `hereya remove PACKAGE`
1337
1388
 
@@ -1359,7 +1410,7 @@ EXAMPLES
1359
1410
  $ hereya remove cloudy/docker_postgres
1360
1411
  ```
1361
1412
 
1362
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/remove/index.ts)_
1413
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/remove/index.ts)_
1363
1414
 
1364
1415
  ## `hereya run CMD`
1365
1416
 
@@ -1385,7 +1436,7 @@ EXAMPLES
1385
1436
  $ hereya run -w uat -- node index.js
1386
1437
  ```
1387
1438
 
1388
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/run/index.ts)_
1439
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/run/index.ts)_
1389
1440
 
1390
1441
  ## `hereya search QUERY`
1391
1442
 
@@ -1416,7 +1467,7 @@ EXAMPLES
1416
1467
  $ hereya search database --json
1417
1468
  ```
1418
1469
 
1419
- _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/search/index.ts)_
1470
+ _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/search/index.ts)_
1420
1471
 
1421
1472
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
1422
1473
 
@@ -1441,7 +1492,7 @@ EXAMPLES
1441
1492
  $ hereya unbootstrap local
1442
1493
  ```
1443
1494
 
1444
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/unbootstrap/index.ts)_
1495
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/unbootstrap/index.ts)_
1445
1496
 
1446
1497
  ## `hereya undeploy`
1447
1498
 
@@ -1467,7 +1518,7 @@ EXAMPLES
1467
1518
  $ hereya undeploy
1468
1519
  ```
1469
1520
 
1470
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/undeploy/index.ts)_
1521
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/undeploy/index.ts)_
1471
1522
 
1472
1523
  ## `hereya uninit PROJECT`
1473
1524
 
@@ -1495,7 +1546,7 @@ EXAMPLES
1495
1546
  $ hereya uninit myProject -w dev -p prodWorkspace=prod
1496
1547
  ```
1497
1548
 
1498
- _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/uninit/index.ts)_
1549
+ _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/uninit/index.ts)_
1499
1550
 
1500
1551
  ## `hereya up`
1501
1552
 
@@ -1522,7 +1573,7 @@ EXAMPLES
1522
1573
  $ hereya up
1523
1574
  ```
1524
1575
 
1525
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/up/index.ts)_
1576
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/up/index.ts)_
1526
1577
 
1527
1578
  ## `hereya update [VERSION]`
1528
1579
 
@@ -1544,7 +1595,7 @@ EXAMPLES
1544
1595
  $ hereya update 0.75.0
1545
1596
  ```
1546
1597
 
1547
- _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/update/index.ts)_
1598
+ _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/update/index.ts)_
1548
1599
 
1549
1600
  ## `hereya workspace create NAME`
1550
1601
 
@@ -1569,7 +1620,7 @@ EXAMPLES
1569
1620
  $ hereya workspace create dev
1570
1621
  ```
1571
1622
 
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)_
1623
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/create/index.ts)_
1573
1624
 
1574
1625
  ## `hereya workspace delete NAME`
1575
1626
 
@@ -1589,7 +1640,7 @@ EXAMPLES
1589
1640
  $ hereya workspace delete dev
1590
1641
  ```
1591
1642
 
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)_
1643
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/delete/index.ts)_
1593
1644
 
1594
1645
  ## `hereya workspace env [NAME]`
1595
1646
 
@@ -1615,7 +1666,7 @@ EXAMPLES
1615
1666
  $ hereya workspace env myEnv -w dev
1616
1667
  ```
1617
1668
 
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)_
1669
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/env/index.ts)_
1619
1670
 
1620
1671
  ## `hereya workspace env set`
1621
1672
 
@@ -1639,7 +1690,7 @@ EXAMPLES
1639
1690
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
1640
1691
  ```
1641
1692
 
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)_
1693
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/env/set/index.ts)_
1643
1694
 
1644
1695
  ## `hereya workspace env unset`
1645
1696
 
@@ -1660,7 +1711,7 @@ EXAMPLES
1660
1711
  $ hereya workspace env unset -w my-workspace -n myVar
1661
1712
  ```
1662
1713
 
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)_
1714
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/env/unset/index.ts)_
1664
1715
 
1665
1716
  ## `hereya workspace executor install`
1666
1717
 
@@ -1689,7 +1740,7 @@ DESCRIPTION
1689
1740
  - always-on: a long-lived EC2 polls hereya-cloud 24/7 (legacy).
1690
1741
  ```
1691
1742
 
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)_
1743
+ _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/executor/install/index.ts)_
1693
1744
 
1694
1745
  ## `hereya workspace executor token`
1695
1746
 
@@ -1706,7 +1757,7 @@ DESCRIPTION
1706
1757
  Generate a workspace-scoped executor token for the remote executor
1707
1758
  ```
1708
1759
 
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)_
1760
+ _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/executor/token/index.ts)_
1710
1761
 
1711
1762
  ## `hereya workspace executor uninstall`
1712
1763
 
@@ -1730,7 +1781,7 @@ DESCRIPTION
1730
1781
  controls log output.
1731
1782
  ```
1732
1783
 
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)_
1784
+ _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/executor/uninstall/index.ts)_
1734
1785
 
1735
1786
  ## `hereya workspace install PACKAGE`
1736
1787
 
@@ -1757,7 +1808,7 @@ EXAMPLES
1757
1808
  $ hereya workspace install hereya/aws-cognito
1758
1809
  ```
1759
1810
 
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)_
1811
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/install/index.ts)_
1761
1812
 
1762
1813
  ## `hereya workspace list`
1763
1814
 
@@ -1781,7 +1832,7 @@ EXAMPLES
1781
1832
  $ hereya workspace list --org personal
1782
1833
  ```
1783
1834
 
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)_
1835
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/list/index.ts)_
1785
1836
 
1786
1837
  ## `hereya workspace set-profile PROFILE`
1787
1838
 
@@ -1805,7 +1856,7 @@ EXAMPLES
1805
1856
  $ hereya workspace set-profile prod-profile -w production
1806
1857
  ```
1807
1858
 
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)_
1859
+ _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/set-profile/index.ts)_
1809
1860
 
1810
1861
  ## `hereya workspace uninstall PACKAGE`
1811
1862
 
@@ -1832,5 +1883,5 @@ EXAMPLES
1832
1883
  $ hereya workspace uninstall hereya/aws-cognito
1833
1884
  ```
1834
1885
 
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)_
1886
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.102.0/src/commands/workspace/uninstall/index.ts)_
1836
1887
  <!-- commandsstop -->
@@ -1,4 +1,15 @@
1
1
  import { CloudHttpConfig } from './utils.js';
2
+ export declare function cancelExecutorJob(config: CloudHttpConfig, input: {
3
+ jobId: string;
4
+ workspace: string;
5
+ }): Promise<{
6
+ reason: string;
7
+ status?: string;
8
+ success: false;
9
+ } | {
10
+ status: string;
11
+ success: true;
12
+ }>;
2
13
  export declare function generateExecutorToken(config: CloudHttpConfig, input: {
3
14
  workspace: string;
4
15
  }): Promise<{
@@ -27,6 +38,25 @@ export declare function getExecutorJobStatus(config: CloudHttpConfig, input: {
27
38
  reason: string;
28
39
  success: false;
29
40
  }>;
41
+ export declare function listExecutorJobs(config: CloudHttpConfig, input: {
42
+ limit?: number;
43
+ status?: string;
44
+ workspace: string;
45
+ }): Promise<{
46
+ jobs: Array<{
47
+ attempts: number;
48
+ claimedBy: null | string;
49
+ createdAt: string;
50
+ id: string;
51
+ status: string;
52
+ type: string;
53
+ updatedAt: string;
54
+ }>;
55
+ success: true;
56
+ } | {
57
+ reason: string;
58
+ success: false;
59
+ }>;
30
60
  export declare function pollExecutorJobs(config: CloudHttpConfig, input: {
31
61
  executorId?: string;
32
62
  workspace: string;
@@ -1,4 +1,20 @@
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
+ headers: { 'Authorization': `Bearer ${config.accessToken}` },
5
+ method: 'POST',
6
+ });
7
+ if (!response.ok) {
8
+ const error = await safeResponseJson(response);
9
+ return {
10
+ reason: error.error || `Failed to cancel job (status ${response.status})`,
11
+ status: error.status,
12
+ success: false,
13
+ };
14
+ }
15
+ const result = await response.json();
16
+ return { status: result.status, success: true };
17
+ }
2
18
  export async function generateExecutorToken(config, input) {
3
19
  const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/executor-token`, {
4
20
  headers: { 'Authorization': `Bearer ${config.accessToken}` },
@@ -33,6 +49,25 @@ export async function getExecutorJobStatus(config, input) {
33
49
  const result = await response.json();
34
50
  return { job: result.job, success: true };
35
51
  }
52
+ export async function listExecutorJobs(config, input) {
53
+ const url = new URL(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/jobs`);
54
+ if (input.limit !== undefined) {
55
+ url.searchParams.set('limit', String(input.limit));
56
+ }
57
+ if (input.status) {
58
+ url.searchParams.set('status', input.status);
59
+ }
60
+ const response = await fetch(url.toString(), {
61
+ headers: { 'Authorization': `Bearer ${config.accessToken}` },
62
+ method: 'GET',
63
+ });
64
+ if (!response.ok) {
65
+ const error = await safeResponseJson(response);
66
+ return { reason: error.error || 'Failed to list jobs', success: false };
67
+ }
68
+ const result = await response.json();
69
+ return { jobs: result.jobs, success: true };
70
+ }
36
71
  export async function pollExecutorJobs(config, input) {
37
72
  const url = new URL(`${config.url}/api/executor/jobs`);
38
73
  url.searchParams.set('workspace', input.workspace);
@@ -27,6 +27,17 @@ 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
+ jobId: string;
32
+ workspace: string;
33
+ }): Promise<{
34
+ reason: string;
35
+ status?: string;
36
+ success: false;
37
+ } | {
38
+ status: string;
39
+ success: true;
40
+ }>;
30
41
  createWorkspace(input: Parameters<typeof workspaces.createWorkspace>[1]): Promise<import("../common.js").CreateWorkspaceOutput>;
31
42
  deleteState(input: Parameters<typeof state.deleteState>[1]): Promise<import("../common.js").DeleteStateOutput>;
32
43
  deleteWorkspace(input: Parameters<typeof workspaces.deleteWorkspace>[1]): Promise<import("../common.js").DeleteWorkspaceOutput>;
@@ -124,6 +135,25 @@ export declare class CloudBackend implements Backend {
124
135
  success: true;
125
136
  versions: appsVersions.AppVersionSummary[];
126
137
  }>;
138
+ listExecutorJobs(input: {
139
+ limit?: number;
140
+ status?: string;
141
+ workspace: string;
142
+ }): Promise<{
143
+ jobs: Array<{
144
+ attempts: number;
145
+ claimedBy: null | string;
146
+ createdAt: string;
147
+ id: string;
148
+ status: string;
149
+ type: string;
150
+ updatedAt: string;
151
+ }>;
152
+ success: true;
153
+ } | {
154
+ reason: string;
155
+ success: false;
156
+ }>;
127
157
  listPackageVersions(name: string): Promise<import("../common.js").ListPackageVersionsOutput>;
128
158
  listProjects(): Promise<import("../common.js").ListProjectsOutput>;
129
159
  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,12 @@
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
+ workspace: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,31 @@
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 pending remote executor job. Only pending jobs can be cancelled.';
9
+ static examples = ['<%= config.bin %> <%= command.id %> my-job-id -w my-workspace'];
10
+ static flags = {
11
+ workspace: Flags.string({
12
+ char: 'w',
13
+ description: 'name of the workspace the job belongs to',
14
+ required: true,
15
+ }),
16
+ };
17
+ async run() {
18
+ const { args, flags } = await this.parse(JobCancel);
19
+ const backend = await getBackend();
20
+ if (!(backend instanceof CloudBackend)) {
21
+ this.error('Cancelling executor jobs requires the cloud backend. Run `hereya login` first.');
22
+ }
23
+ const cloudBackend = backend;
24
+ const result = await cloudBackend.cancelExecutorJob({ jobId: args.jobId, workspace: flags.workspace });
25
+ if (!result.success) {
26
+ const detail = result.status && !result.reason.includes(result.status) ? ` (current status: ${result.status})` : '';
27
+ this.error(`Failed to cancel job ${args.jobId}: ${result.reason}${detail}`);
28
+ }
29
+ this.log(`Job ${args.jobId} cancelled.`);
30
+ }
31
+ }
@@ -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 => {
@@ -2588,6 +2588,106 @@
2588
2588
  "index.js"
2589
2589
  ]
2590
2590
  },
2591
+ "job:cancel": {
2592
+ "aliases": [],
2593
+ "args": {
2594
+ "jobId": {
2595
+ "description": "id of the remote executor job to cancel",
2596
+ "name": "jobId",
2597
+ "required": true
2598
+ }
2599
+ },
2600
+ "description": "Cancel a pending remote executor job. Only pending jobs can be cancelled.",
2601
+ "examples": [
2602
+ "<%= config.bin %> <%= command.id %> my-job-id -w my-workspace"
2603
+ ],
2604
+ "flags": {
2605
+ "workspace": {
2606
+ "char": "w",
2607
+ "description": "name of the workspace the job belongs to",
2608
+ "name": "workspace",
2609
+ "required": true,
2610
+ "hasDynamicHelp": false,
2611
+ "multiple": false,
2612
+ "type": "option"
2613
+ }
2614
+ },
2615
+ "hasDynamicHelp": false,
2616
+ "hiddenAliases": [],
2617
+ "id": "job:cancel",
2618
+ "pluginAlias": "hereya-cli",
2619
+ "pluginName": "hereya-cli",
2620
+ "pluginType": "core",
2621
+ "strict": true,
2622
+ "enableJsonFlag": false,
2623
+ "isESM": true,
2624
+ "relativePath": [
2625
+ "dist",
2626
+ "commands",
2627
+ "job",
2628
+ "cancel",
2629
+ "index.js"
2630
+ ]
2631
+ },
2632
+ "job:list": {
2633
+ "aliases": [],
2634
+ "args": {},
2635
+ "description": "List remote executor jobs for a workspace, newest first. Pending jobs can be cancelled with `hereya job cancel <jobId>`.",
2636
+ "examples": [
2637
+ "<%= config.bin %> <%= command.id %> -w my-workspace",
2638
+ "<%= config.bin %> <%= command.id %> -w my-workspace --status pending --limit 10"
2639
+ ],
2640
+ "flags": {
2641
+ "limit": {
2642
+ "description": "maximum number of jobs to list (server default: 20)",
2643
+ "name": "limit",
2644
+ "required": false,
2645
+ "hasDynamicHelp": false,
2646
+ "multiple": false,
2647
+ "type": "option"
2648
+ },
2649
+ "status": {
2650
+ "description": "only list jobs with this status",
2651
+ "name": "status",
2652
+ "required": false,
2653
+ "hasDynamicHelp": false,
2654
+ "multiple": false,
2655
+ "options": [
2656
+ "pending",
2657
+ "running",
2658
+ "completed",
2659
+ "failed",
2660
+ "cancelled"
2661
+ ],
2662
+ "type": "option"
2663
+ },
2664
+ "workspace": {
2665
+ "char": "w",
2666
+ "description": "name of the workspace to list jobs for",
2667
+ "name": "workspace",
2668
+ "required": true,
2669
+ "hasDynamicHelp": false,
2670
+ "multiple": false,
2671
+ "type": "option"
2672
+ }
2673
+ },
2674
+ "hasDynamicHelp": false,
2675
+ "hiddenAliases": [],
2676
+ "id": "job:list",
2677
+ "pluginAlias": "hereya-cli",
2678
+ "pluginName": "hereya-cli",
2679
+ "pluginType": "core",
2680
+ "strict": true,
2681
+ "enableJsonFlag": false,
2682
+ "isESM": true,
2683
+ "relativePath": [
2684
+ "dist",
2685
+ "commands",
2686
+ "job",
2687
+ "list",
2688
+ "index.js"
2689
+ ]
2690
+ },
2591
2691
  "workspace:create": {
2592
2692
  "aliases": [],
2593
2693
  "args": {
@@ -3409,5 +3509,5 @@
3409
3509
  ]
3410
3510
  }
3411
3511
  },
3412
- "version": "0.101.1"
3512
+ "version": "0.102.0"
3413
3513
  }
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.102.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
  }