hereya-cli 0.100.6 → 0.101.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -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.100.6 linux-x64 node-v24.15.0
24
+ hereya-cli/0.101.1 linux-x64 node-v24.16.0
25
25
  $ hereya --help [COMMAND]
26
26
  USAGE
27
27
  $ hereya COMMAND
@@ -129,7 +129,7 @@ EXAMPLES
129
129
  $ hereya add cloudy/docker_postgres
130
130
  ```
131
131
 
132
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/add/index.ts)_
132
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/add/index.ts)_
133
133
 
134
134
  ## `hereya app deploy NAME`
135
135
 
@@ -163,7 +163,7 @@ EXAMPLES
163
163
  $ hereya app deploy my-org/my-app -w prod -p organizationId=org-123
164
164
  ```
165
165
 
166
- _See code: [src/commands/app/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/app/deploy/index.ts)_
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)_
167
167
 
168
168
  ## `hereya app deployments NAME`
169
169
 
@@ -183,7 +183,7 @@ EXAMPLES
183
183
  $ hereya app deployments my-org/my-app
184
184
  ```
185
185
 
186
- _See code: [src/commands/app/deployments/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/app/deployments/index.ts)_
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)_
187
187
 
188
188
  ## `hereya app destroy NAME`
189
189
 
@@ -212,7 +212,7 @@ EXAMPLES
212
212
  $ hereya app destroy my-org/my-app -w my-workspace
213
213
  ```
214
214
 
215
- _See code: [src/commands/app/destroy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/app/destroy/index.ts)_
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)_
216
216
 
217
217
  ## `hereya app env NAME [KEY]`
218
218
 
@@ -238,7 +238,7 @@ EXAMPLES
238
238
  $ hereya app env my-org/my-app -w my-workspace DATABASE_URL
239
239
  ```
240
240
 
241
- _See code: [src/commands/app/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/app/env/index.ts)_
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)_
242
242
 
243
243
  ## `hereya app list`
244
244
 
@@ -255,7 +255,7 @@ EXAMPLES
255
255
  $ hereya app list
256
256
  ```
257
257
 
258
- _See code: [src/commands/app/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/app/list/index.ts)_
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)_
259
259
 
260
260
  ## `hereya app new DIRNAME`
261
261
 
@@ -281,7 +281,7 @@ EXAMPLES
281
281
  $ hereya app new ./my-app -n my-org/my-app --description "An ai-app-builder app"
282
282
  ```
283
283
 
284
- _See code: [src/commands/app/new/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/app/new/index.ts)_
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)_
285
285
 
286
286
  ## `hereya app status NAME`
287
287
 
@@ -304,7 +304,7 @@ EXAMPLES
304
304
  $ hereya app status my-org/my-app -w my-workspace
305
305
  ```
306
306
 
307
- _See code: [src/commands/app/status/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/app/status/index.ts)_
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)_
308
308
 
309
309
  ## `hereya bootstrap INFRASTRUCTURETYPE`
310
310
 
@@ -329,7 +329,7 @@ EXAMPLES
329
329
  $ hereya bootstrap local
330
330
  ```
331
331
 
332
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/bootstrap/index.ts)_
332
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/bootstrap/index.ts)_
333
333
 
334
334
  ## `hereya clone PROJECT`
335
335
 
@@ -354,7 +354,7 @@ EXAMPLES
354
354
  $ hereya clone myProject --chdir=./myProject
355
355
  ```
356
356
 
357
- _See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/clone/index.ts)_
357
+ _See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/clone/index.ts)_
358
358
 
359
359
  ## `hereya config export-backend [FILE]`
360
360
 
@@ -376,7 +376,7 @@ EXAMPLES
376
376
  $ hereya config export-backend ./path/to/export.json
377
377
  ```
378
378
 
379
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/config/export-backend/index.ts)_
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)_
380
380
 
381
381
  ## `hereya config get-backend`
382
382
 
@@ -393,7 +393,7 @@ EXAMPLES
393
393
  $ hereya config get-backend
394
394
  ```
395
395
 
396
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/config/get-backend/index.ts)_
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)_
397
397
 
398
398
  ## `hereya config import-backend FILE`
399
399
 
@@ -413,7 +413,7 @@ EXAMPLES
413
413
  $ hereya config import-backend ./path/to/cloud-backend.json
414
414
  ```
415
415
 
416
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/config/import-backend/index.ts)_
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)_
417
417
 
418
418
  ## `hereya config use-backend TYPE`
419
419
 
@@ -435,7 +435,7 @@ EXAMPLES
435
435
  $ hereya config use-backend local
436
436
  ```
437
437
 
438
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/config/use-backend/index.ts)_
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)_
439
439
 
440
440
  ## `hereya delete-state`
441
441
 
@@ -461,7 +461,7 @@ EXAMPLES
461
461
  $ hereya delete-state --workspace staging
462
462
  ```
463
463
 
464
- _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/delete-state/index.ts)_
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)_
465
465
 
466
466
  ## `hereya deploy`
467
467
 
@@ -487,7 +487,7 @@ EXAMPLES
487
487
  $ hereya deploy
488
488
  ```
489
489
 
490
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/deploy/index.ts)_
490
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/deploy/index.ts)_
491
491
 
492
492
  ## `hereya devenv config`
493
493
 
@@ -508,7 +508,7 @@ EXAMPLES
508
508
  $ hereya devenv config -w my-workspace
509
509
  ```
510
510
 
511
- _See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/devenv/config/index.ts)_
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)_
512
512
 
513
513
  ## `hereya devenv install`
514
514
 
@@ -535,7 +535,7 @@ EXAMPLES
535
535
  $ hereya devenv install -w my-workspace -p instanceType=t3.large
536
536
  ```
537
537
 
538
- _See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/devenv/install/index.ts)_
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)_
539
539
 
540
540
  ## `hereya devenv project init PROJECT`
541
541
 
@@ -567,7 +567,7 @@ EXAMPLES
567
567
  $ hereya devenv project init my-app -w my-workspace -t acme/node-starter -p region=us-east-1
568
568
  ```
569
569
 
570
- _See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/devenv/project/init/index.ts)_
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)_
571
571
 
572
572
  ## `hereya devenv project uninit PROJECT`
573
573
 
@@ -593,7 +593,7 @@ EXAMPLES
593
593
  $ hereya devenv project uninit my-app -w my-workspace --force
594
594
  ```
595
595
 
596
- _See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/devenv/project/uninit/index.ts)_
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)_
597
597
 
598
598
  ## `hereya devenv sleep`
599
599
 
@@ -614,7 +614,7 @@ EXAMPLES
614
614
  $ hereya devenv sleep -w my-workspace
615
615
  ```
616
616
 
617
- _See code: [src/commands/devenv/sleep/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/devenv/sleep/index.ts)_
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)_
618
618
 
619
619
  ## `hereya devenv ssh`
620
620
 
@@ -634,7 +634,7 @@ EXAMPLES
634
634
  $ hereya devenv ssh -w my-workspace
635
635
  ```
636
636
 
637
- _See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/devenv/ssh/index.ts)_
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)_
638
638
 
639
639
  ## `hereya devenv uninstall`
640
640
 
@@ -655,7 +655,7 @@ EXAMPLES
655
655
  $ hereya devenv uninstall -w my-workspace
656
656
  ```
657
657
 
658
- _See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/devenv/uninstall/index.ts)_
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)_
659
659
 
660
660
  ## `hereya doc PACKAGE`
661
661
 
@@ -688,7 +688,7 @@ EXAMPLES
688
688
  $ hereya doc my-package --no-doc
689
689
  ```
690
690
 
691
- _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/doc/index.ts)_
691
+ _See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/doc/index.ts)_
692
692
 
693
693
  ## `hereya docker run IMAGE`
694
694
 
@@ -719,7 +719,7 @@ EXAMPLES
719
719
  $ hereya docker run myapp:latest -- --rm -v ./data:/data
720
720
  ```
721
721
 
722
- _See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/docker/run/index.ts)_
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)_
723
723
 
724
724
  ## `hereya down`
725
725
 
@@ -746,7 +746,7 @@ EXAMPLES
746
746
  $ hereya down
747
747
  ```
748
748
 
749
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/down/index.ts)_
749
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/down/index.ts)_
750
750
 
751
751
  ## `hereya env [NAME]`
752
752
 
@@ -777,7 +777,7 @@ EXAMPLES
777
777
  $ hereya env -w dev -l
778
778
  ```
779
779
 
780
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/env/index.ts)_
780
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/env/index.ts)_
781
781
 
782
782
  ## `hereya env set [NAME]`
783
783
 
@@ -804,7 +804,7 @@ EXAMPLES
804
804
  $ hereya env set FOO -v bar -w dev
805
805
  ```
806
806
 
807
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/env/set/index.ts)_
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)_
808
808
 
809
809
  ## `hereya executor start`
810
810
 
@@ -838,7 +838,7 @@ EXAMPLES
838
838
  HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
839
839
  ```
840
840
 
841
- _See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/executor/start/index.ts)_
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)_
842
842
 
843
843
  ## `hereya flow add PACKAGE`
844
844
 
@@ -876,7 +876,7 @@ EXAMPLES
876
876
  $ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
877
877
  ```
878
878
 
879
- _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/add/index.ts)_
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)_
880
880
 
881
881
  ## `hereya flow docker run IMAGE`
882
882
 
@@ -906,7 +906,7 @@ EXAMPLES
906
906
  $ hereya flow docker run --pin myapp:latest -- --rm
907
907
  ```
908
908
 
909
- _See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/docker/run/index.ts)_
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)_
910
910
 
911
911
  ## `hereya flow down`
912
912
 
@@ -940,7 +940,7 @@ EXAMPLES
940
940
  $ hereya flow down --pin
941
941
  ```
942
942
 
943
- _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/down/index.ts)_
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)_
944
944
 
945
945
  ## `hereya flow env [NAME]`
946
946
 
@@ -974,7 +974,7 @@ EXAMPLES
974
974
  $ hereya flow env -l
975
975
  ```
976
976
 
977
- _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/env/index.ts)_
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)_
978
978
 
979
979
  ## `hereya flow provid PACKAGE`
980
980
 
@@ -1003,7 +1003,7 @@ EXAMPLES
1003
1003
  $ hereya flow provid hereya/postgres --pin
1004
1004
  ```
1005
1005
 
1006
- _See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/provid/index.ts)_
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)_
1007
1007
 
1008
1008
  ## `hereya flow remove PACKAGE`
1009
1009
 
@@ -1033,7 +1033,7 @@ EXAMPLES
1033
1033
  $ hereya flow remove cloudy/docker_postgres --profile staging
1034
1034
  ```
1035
1035
 
1036
- _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/remove/index.ts)_
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)_
1037
1037
 
1038
1038
  ## `hereya flow run CMD`
1039
1039
 
@@ -1062,7 +1062,7 @@ EXAMPLES
1062
1062
  $ hereya flow run --pin -- npm test
1063
1063
  ```
1064
1064
 
1065
- _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/run/index.ts)_
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)_
1066
1066
 
1067
1067
  ## `hereya flow up`
1068
1068
 
@@ -1096,7 +1096,7 @@ EXAMPLES
1096
1096
  $ hereya flow up --pin
1097
1097
  ```
1098
1098
 
1099
- _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/flow/up/index.ts)_
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)_
1100
1100
 
1101
1101
  ## `hereya help [COMMAND]`
1102
1102
 
@@ -1153,7 +1153,7 @@ EXAMPLES
1153
1153
  $ hereya import org/my-package -f state.tfstate -w my-workspace
1154
1154
  ```
1155
1155
 
1156
- _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/import/index.ts)_
1156
+ _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/import/index.ts)_
1157
1157
 
1158
1158
  ## `hereya import-repo PROJECT`
1159
1159
 
@@ -1183,7 +1183,7 @@ EXAMPLES
1183
1183
  $ hereya import-repo myProject -w=dev -r=https://github.com/acme/api --clone --chdir=./api
1184
1184
  ```
1185
1185
 
1186
- _See code: [src/commands/import-repo/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/import-repo/index.ts)_
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)_
1187
1187
 
1188
1188
  ## `hereya init PROJECT`
1189
1189
 
@@ -1217,7 +1217,7 @@ EXAMPLES
1217
1217
  $ hereya init myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1
1218
1218
  ```
1219
1219
 
1220
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/init/index.ts)_
1220
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/init/index.ts)_
1221
1221
 
1222
1222
  ## `hereya list`
1223
1223
 
@@ -1234,7 +1234,7 @@ EXAMPLES
1234
1234
  $ hereya list
1235
1235
  ```
1236
1236
 
1237
- _See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/list/index.ts)_
1237
+ _See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/list/index.ts)_
1238
1238
 
1239
1239
  ## `hereya login [URL]`
1240
1240
 
@@ -1263,7 +1263,7 @@ EXAMPLES
1263
1263
  $ hereya login --token=your-token https://cloud.hereya.dev
1264
1264
  ```
1265
1265
 
1266
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/login/index.ts)_
1266
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/login/index.ts)_
1267
1267
 
1268
1268
  ## `hereya logout`
1269
1269
 
@@ -1280,7 +1280,7 @@ EXAMPLES
1280
1280
  $ hereya logout
1281
1281
  ```
1282
1282
 
1283
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/logout/index.ts)_
1283
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/logout/index.ts)_
1284
1284
 
1285
1285
  ## `hereya provid PACKAGE`
1286
1286
 
@@ -1308,7 +1308,7 @@ EXAMPLES
1308
1308
  $ hereya provid hereya/postgres --workspace staging
1309
1309
  ```
1310
1310
 
1311
- _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/provid/index.ts)_
1311
+ _See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/provid/index.ts)_
1312
1312
 
1313
1313
  ## `hereya publish`
1314
1314
 
@@ -1331,7 +1331,7 @@ EXAMPLES
1331
1331
  $ hereya publish --chdir=/path/to/package
1332
1332
  ```
1333
1333
 
1334
- _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/publish/index.ts)_
1334
+ _See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/publish/index.ts)_
1335
1335
 
1336
1336
  ## `hereya remove PACKAGE`
1337
1337
 
@@ -1359,7 +1359,7 @@ EXAMPLES
1359
1359
  $ hereya remove cloudy/docker_postgres
1360
1360
  ```
1361
1361
 
1362
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/remove/index.ts)_
1362
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/remove/index.ts)_
1363
1363
 
1364
1364
  ## `hereya run CMD`
1365
1365
 
@@ -1385,7 +1385,7 @@ EXAMPLES
1385
1385
  $ hereya run -w uat -- node index.js
1386
1386
  ```
1387
1387
 
1388
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/run/index.ts)_
1388
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/run/index.ts)_
1389
1389
 
1390
1390
  ## `hereya search QUERY`
1391
1391
 
@@ -1416,7 +1416,7 @@ EXAMPLES
1416
1416
  $ hereya search database --json
1417
1417
  ```
1418
1418
 
1419
- _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/search/index.ts)_
1419
+ _See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/search/index.ts)_
1420
1420
 
1421
1421
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
1422
1422
 
@@ -1441,7 +1441,7 @@ EXAMPLES
1441
1441
  $ hereya unbootstrap local
1442
1442
  ```
1443
1443
 
1444
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/unbootstrap/index.ts)_
1444
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/unbootstrap/index.ts)_
1445
1445
 
1446
1446
  ## `hereya undeploy`
1447
1447
 
@@ -1467,7 +1467,7 @@ EXAMPLES
1467
1467
  $ hereya undeploy
1468
1468
  ```
1469
1469
 
1470
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/undeploy/index.ts)_
1470
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/undeploy/index.ts)_
1471
1471
 
1472
1472
  ## `hereya uninit PROJECT`
1473
1473
 
@@ -1495,7 +1495,7 @@ EXAMPLES
1495
1495
  $ hereya uninit myProject -w dev -p prodWorkspace=prod
1496
1496
  ```
1497
1497
 
1498
- _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/uninit/index.ts)_
1498
+ _See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/uninit/index.ts)_
1499
1499
 
1500
1500
  ## `hereya up`
1501
1501
 
@@ -1522,7 +1522,7 @@ EXAMPLES
1522
1522
  $ hereya up
1523
1523
  ```
1524
1524
 
1525
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/up/index.ts)_
1525
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/up/index.ts)_
1526
1526
 
1527
1527
  ## `hereya update [VERSION]`
1528
1528
 
@@ -1544,7 +1544,7 @@ EXAMPLES
1544
1544
  $ hereya update 0.75.0
1545
1545
  ```
1546
1546
 
1547
- _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/update/index.ts)_
1547
+ _See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.101.1/src/commands/update/index.ts)_
1548
1548
 
1549
1549
  ## `hereya workspace create NAME`
1550
1550
 
@@ -1569,7 +1569,7 @@ EXAMPLES
1569
1569
  $ hereya workspace create dev
1570
1570
  ```
1571
1571
 
1572
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/create/index.ts)_
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)_
1573
1573
 
1574
1574
  ## `hereya workspace delete NAME`
1575
1575
 
@@ -1589,7 +1589,7 @@ EXAMPLES
1589
1589
  $ hereya workspace delete dev
1590
1590
  ```
1591
1591
 
1592
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/delete/index.ts)_
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)_
1593
1593
 
1594
1594
  ## `hereya workspace env [NAME]`
1595
1595
 
@@ -1615,7 +1615,7 @@ EXAMPLES
1615
1615
  $ hereya workspace env myEnv -w dev
1616
1616
  ```
1617
1617
 
1618
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/env/index.ts)_
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)_
1619
1619
 
1620
1620
  ## `hereya workspace env set`
1621
1621
 
@@ -1639,7 +1639,7 @@ EXAMPLES
1639
1639
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
1640
1640
  ```
1641
1641
 
1642
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/env/set/index.ts)_
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)_
1643
1643
 
1644
1644
  ## `hereya workspace env unset`
1645
1645
 
@@ -1660,7 +1660,7 @@ EXAMPLES
1660
1660
  $ hereya workspace env unset -w my-workspace -n myVar
1661
1661
  ```
1662
1662
 
1663
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/env/unset/index.ts)_
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)_
1664
1664
 
1665
1665
  ## `hereya workspace executor install`
1666
1666
 
@@ -1689,7 +1689,7 @@ DESCRIPTION
1689
1689
  - always-on: a long-lived EC2 polls hereya-cloud 24/7 (legacy).
1690
1690
  ```
1691
1691
 
1692
- _See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/executor/install/index.ts)_
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)_
1693
1693
 
1694
1694
  ## `hereya workspace executor token`
1695
1695
 
@@ -1706,7 +1706,7 @@ DESCRIPTION
1706
1706
  Generate a workspace-scoped executor token for the remote executor
1707
1707
  ```
1708
1708
 
1709
- _See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/executor/token/index.ts)_
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)_
1710
1710
 
1711
1711
  ## `hereya workspace executor uninstall`
1712
1712
 
@@ -1730,7 +1730,7 @@ DESCRIPTION
1730
1730
  controls log output.
1731
1731
  ```
1732
1732
 
1733
- _See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/executor/uninstall/index.ts)_
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)_
1734
1734
 
1735
1735
  ## `hereya workspace install PACKAGE`
1736
1736
 
@@ -1757,7 +1757,7 @@ EXAMPLES
1757
1757
  $ hereya workspace install hereya/aws-cognito
1758
1758
  ```
1759
1759
 
1760
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/install/index.ts)_
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)_
1761
1761
 
1762
1762
  ## `hereya workspace list`
1763
1763
 
@@ -1781,7 +1781,7 @@ EXAMPLES
1781
1781
  $ hereya workspace list --org personal
1782
1782
  ```
1783
1783
 
1784
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/list/index.ts)_
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)_
1785
1785
 
1786
1786
  ## `hereya workspace set-profile PROFILE`
1787
1787
 
@@ -1805,7 +1805,7 @@ EXAMPLES
1805
1805
  $ hereya workspace set-profile prod-profile -w production
1806
1806
  ```
1807
1807
 
1808
- _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/set-profile/index.ts)_
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)_
1809
1809
 
1810
1810
  ## `hereya workspace uninstall PACKAGE`
1811
1811
 
@@ -1832,5 +1832,5 @@ EXAMPLES
1832
1832
  $ hereya workspace uninstall hereya/aws-cognito
1833
1833
  ```
1834
1834
 
1835
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.100.6/src/commands/workspace/uninstall/index.ts)_
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)_
1836
1836
  <!-- commandsstop -->
@@ -58,6 +58,15 @@ export declare function revokeExecutorToken(config: CloudHttpConfig, input: {
58
58
  } | {
59
59
  success: true;
60
60
  }>;
61
+ export declare function rewakeExecutorJob(config: CloudHttpConfig, input: {
62
+ jobId: string;
63
+ workspace: string;
64
+ }): Promise<{
65
+ reason?: string;
66
+ rewoken?: boolean;
67
+ status?: string;
68
+ success: boolean;
69
+ }>;
61
70
  export declare function submitExecutorJob(config: CloudHttpConfig, input: {
62
71
  payload: object;
63
72
  type: 'app-deploy' | 'app-destroy' | 'deploy' | 'destroy' | 'provision' | 'resolve-env' | 'undeploy';
@@ -75,6 +75,29 @@ export async function revokeExecutorToken(config, input) {
75
75
  }
76
76
  return { success: true };
77
77
  }
78
+ export async function rewakeExecutorJob(config, input) {
79
+ try {
80
+ const response = await fetch(`${config.url}/api/workspaces/${encodeURIComponent(input.workspace)}/jobs/${encodeURIComponent(input.jobId)}/rewake`, {
81
+ body: JSON.stringify({}),
82
+ headers: { 'Authorization': `Bearer ${config.accessToken}`, 'Content-Type': 'application/json' },
83
+ method: 'POST',
84
+ });
85
+ if (!response.ok) {
86
+ const error = await safeResponseJson(response);
87
+ return { reason: error.error || `Rewake failed with status ${response.status}`, success: false };
88
+ }
89
+ const result = await safeResponseJson(response);
90
+ return {
91
+ reason: result.reason,
92
+ rewoken: result.rewoken,
93
+ status: result.status,
94
+ success: Boolean(result.success),
95
+ };
96
+ }
97
+ catch (error) {
98
+ return { reason: error instanceof Error ? error.message : String(error), success: false };
99
+ }
100
+ }
78
101
  export async function submitExecutorJob(config, input) {
79
102
  const formData = new FormData();
80
103
  formData.append('type', input.type);
@@ -162,6 +162,15 @@ export declare class CloudBackend implements Backend {
162
162
  } | {
163
163
  success: true;
164
164
  }>;
165
+ rewakeExecutorJob(input: {
166
+ jobId: string;
167
+ workspace: string;
168
+ }): Promise<{
169
+ reason?: string;
170
+ rewoken?: boolean;
171
+ status?: string;
172
+ success: boolean;
173
+ }>;
165
174
  saveProjectMetadata(input: Parameters<typeof projects.saveProjectMetadata>[1]): Promise<import("../common.js").SaveProjectMetadataOutput>;
166
175
  saveState(config: Config, workspace?: string): Promise<void>;
167
176
  searchPackages(input: Parameters<typeof packagesRegistry.searchPackages>[1]): Promise<import("../common.js").SearchPackagesOutput>;
@@ -120,6 +120,9 @@ export class CloudBackend {
120
120
  revokeExecutorToken(input) {
121
121
  return executorJobs.revokeExecutorToken(this.config, input);
122
122
  }
123
+ rewakeExecutorJob(input) {
124
+ return executorJobs.rewakeExecutorJob(this.config, input);
125
+ }
123
126
  saveProjectMetadata(input) {
124
127
  return projects.saveProjectMetadata(this.config, input);
125
128
  }
@@ -134,8 +134,8 @@ Set the HEREYA_CLOUD_URL environment variable to target a specific hereya cloud
134
134
  }
135
135
  // Test-friendly delegators kept on the class for backwards compatibility with
136
136
  // tests that call `(cmd as any).executeInitJob(...)` / `executeAppJob(...)`.
137
- executeAppJob(job, cloudBackend, logger) {
138
- return executeAppJob(job, cloudBackend, logger);
137
+ executeAppJob(job, cloudBackend, logger, executor) {
138
+ return executeAppJob(job, cloudBackend, logger, executor);
139
139
  }
140
140
  executeInitJob(job, executor, logger) {
141
141
  return executeInitJob(job, executor, logger);
@@ -1,5 +1,18 @@
1
1
  import { Logger } from './log.js';
2
2
  export interface DownloadAppSourceInput {
3
+ /**
4
+ * Optional git credentials resolved via the hereya GitHub-App credential
5
+ * mechanism. When `password` (and optionally `username`) are provided, the
6
+ * clone is performed through the hereya credential helper so PRIVATE app
7
+ * repositories can be cloned on a headless executor. When omitted, an
8
+ * unauthenticated clone is performed (public-repo path preserved).
9
+ */
10
+ auth?: {
11
+ /** Absolute path to the hereya binary used as the credential helper. */
12
+ hereyaBinPath: string;
13
+ password?: string;
14
+ username?: string;
15
+ };
3
16
  commit?: string;
4
17
  logger?: Logger;
5
18
  repository: string;
@@ -9,6 +22,17 @@ export interface DownloadAppSourceOutput {
9
22
  cleanup: () => Promise<void>;
10
23
  rootDir: string;
11
24
  }
25
+ /**
26
+ * Minimal surface of `simple-git` used by this module. Kept narrow so tests can
27
+ * supply a lightweight fake.
28
+ */
29
+ export interface SimpleGitLike {
30
+ checkout(commit: string): Promise<unknown>;
31
+ clone(repo: string, target: string, options?: string[]): Promise<unknown>;
32
+ raw(args: string[]): Promise<Buffer | string>;
33
+ }
34
+ export type SimpleGitFactory = (baseDir?: string) => SimpleGitLike;
35
+ export declare function setSimpleGitFactory(factory: SimpleGitFactory | undefined): void;
12
36
  /**
13
37
  * Clone an app's source repository (by repo URL + commit SHA) into a fresh
14
38
  * temp dir under ~/.hereya/downloads/<id>. Returns the rootDir path along
@@ -2,6 +2,19 @@ import { createHash, randomUUID } from 'node:crypto';
2
2
  import fs from 'node:fs/promises';
3
3
  import os from 'node:os';
4
4
  import path from 'node:path';
5
+ import { gitUtils } from './git-utils.js';
6
+ // DI seam for tests. Defaults to the real `simple-git` (loaded lazily so the
7
+ // module stays cheap to import). Tests replace this via `setSimpleGitFactory`.
8
+ let simpleGitFactory;
9
+ export function setSimpleGitFactory(factory) {
10
+ simpleGitFactory = factory;
11
+ }
12
+ async function getSimpleGit() {
13
+ if (simpleGitFactory)
14
+ return simpleGitFactory;
15
+ const { simpleGit } = await import('simple-git');
16
+ return simpleGit;
17
+ }
5
18
  /**
6
19
  * Clone an app's source repository (by repo URL + commit SHA) into a fresh
7
20
  * temp dir under ~/.hereya/downloads/<id>. Returns the rootDir path along
@@ -24,16 +37,40 @@ export const appSource = {
24
37
  }
25
38
  };
26
39
  try {
27
- const { simpleGit } = await import('simple-git');
28
- const git = simpleGit();
40
+ const simpleGit = await getSimpleGit();
29
41
  input.logger?.debug?.(`Cloning app source from ${input.repository}${input.commit ? `@${input.commit}` : ''} into ${rootDir}`);
30
- if (input.commit) {
31
- await git.clone(input.repository, rootDir, ['--no-checkout']);
32
- const repoGit = simpleGit(rootDir);
33
- await repoGit.checkout(input.commit);
42
+ if (input.auth?.password) {
43
+ // Authenticated clone through the hereya credential helper. We always
44
+ // do a full clone here (no shallow/no-checkout optimization) because
45
+ // the credential helper path uses a plain `git clone`; the optional
46
+ // commit checkout is performed afterwards.
47
+ input.logger?.debug?.('Using hereya credential helper for authenticated app-source clone');
48
+ const cloneResult = await gitUtils.cloneWithCredentialHelper({
49
+ gitUrl: input.repository,
50
+ hereyaBinPath: input.auth.hereyaBinPath,
51
+ password: input.auth.password,
52
+ targetDir: rootDir,
53
+ username: input.auth.username,
54
+ });
55
+ if (!cloneResult.success) {
56
+ throw new Error(cloneResult.reason);
57
+ }
58
+ if (input.commit) {
59
+ const repoGit = simpleGit(rootDir);
60
+ await repoGit.checkout(input.commit);
61
+ }
34
62
  }
35
63
  else {
36
- await git.clone(input.repository, rootDir, ['--depth=1']);
64
+ // Unauthenticated clone (public-repo path).
65
+ const git = simpleGit();
66
+ if (input.commit) {
67
+ await git.clone(input.repository, rootDir, ['--no-checkout']);
68
+ const repoGit = simpleGit(rootDir);
69
+ await repoGit.checkout(input.commit);
70
+ }
71
+ else {
72
+ await git.clone(input.repository, rootDir, ['--depth=1']);
73
+ }
37
74
  }
38
75
  if (input.sha256) {
39
76
  const repoGit = simpleGit(rootDir);
@@ -1,4 +1,5 @@
1
1
  import { CloudBackend } from '../../backend/cloud/cloud-backend.js';
2
+ import { LocalExecutor } from '../../executor/local.js';
2
3
  import { Logger } from '../../lib/log.js';
3
4
  export type AppJobResult = {
4
5
  reason: string;
@@ -10,4 +11,4 @@ export declare function executeAppJob(job: {
10
11
  id: string;
11
12
  payload: any;
12
13
  type: string;
13
- }, cloudBackend: CloudBackend, logger: Logger): Promise<AppJobResult>;
14
+ }, cloudBackend: CloudBackend, logger: Logger, executor: LocalExecutor): Promise<AppJobResult>;
@@ -3,7 +3,7 @@ import path from 'node:path';
3
3
  import * as appSourceLib from '../../lib/app-source.js';
4
4
  import { shellUtils } from '../../lib/shell.js';
5
5
  import { sanitizeWorkspaceForFilename } from './format.js';
6
- export async function executeAppJob(job, cloudBackend, logger) {
6
+ export async function executeAppJob(job, cloudBackend, logger, executor) {
7
7
  const isDeploy = job.type === 'app-deploy';
8
8
  const subcommand = isDeploy ? 'deploy' : 'destroy';
9
9
  const payload = job.payload;
@@ -17,7 +17,8 @@ export async function executeAppJob(job, cloudBackend, logger) {
17
17
  let cleanup;
18
18
  try {
19
19
  logger.info(`Downloading app source ${repository}${commit ? `@${commit}` : ''}...`);
20
- const downloadResult = await appSourceLib.appSource.download({ commit, logger, repository, sha256 });
20
+ const auth = await resolveAppRepoCredentials({ appName, executor, logger, repository, workspace });
21
+ const downloadResult = await appSourceLib.appSource.download({ auth, commit, logger, repository, sha256 });
21
22
  cleanup = downloadResult.cleanup;
22
23
  const { rootDir } = downloadResult;
23
24
  await cloudBackend.updateAppDeployment({
@@ -74,6 +75,58 @@ export async function executeAppJob(job, cloudBackend, logger) {
74
75
  }
75
76
  }
76
77
  }
78
+ /**
79
+ * Resolve git credentials for cloning the app's source repository, reusing the
80
+ * SAME hereya GitHub-App credential mechanism used for package/project clones.
81
+ *
82
+ * We build a synthetic git env map (`hereyaGitRemoteUrl` + a `github-app:`
83
+ * marker for the password) and run it through `executor.resolveEnvValues`,
84
+ * which:
85
+ * 1. reads the GitHub-App config (`hereyaGithubAppId`,
86
+ * `hereyaGithubAppPrivateKey`, optional `hereyaGithubAppInstallationId`)
87
+ * from the workspace env, and
88
+ * 2. mints an installation token scoped to the repo named by
89
+ * `hereyaGitRemoteUrl`.
90
+ *
91
+ * If the GitHub-App config is not available (token not minted, marker left
92
+ * unresolved), we return `undefined` so the caller falls back to an
93
+ * unauthenticated clone (public-repo path preserved).
94
+ */
95
+ async function resolveAppRepoCredentials(input) {
96
+ const { appName, executor, logger, repository, workspace } = input;
97
+ try {
98
+ const gitEnvToResolve = {
99
+ // Empty installation id => resolveGithubAppMarkers falls back to
100
+ // hereyaGithubAppInstallationId from the workspace env.
101
+ hereyaGitPassword: 'github-app:',
102
+ // Peer URL used to scope the minted installation token to this repo.
103
+ hereyaGitRemoteUrl: repository,
104
+ hereyaGitUsername: 'x-access-token',
105
+ };
106
+ // For apps, workspace env is keyed by the app name (see LocalExecutor.getWorkspaceEnv).
107
+ const resolved = await executor.resolveEnvValues({
108
+ env: gitEnvToResolve,
109
+ project: appName,
110
+ workspace,
111
+ });
112
+ const password = resolved.hereyaGitPassword;
113
+ // If the marker was left unresolved (no GitHub-App config available), the
114
+ // value still starts with `github-app:` — treat that as "no auth".
115
+ if (!password || password.startsWith('github-app:')) {
116
+ logger.debug?.('No hereya GitHub-App credentials resolved for app source; falling back to unauthenticated clone');
117
+ return undefined;
118
+ }
119
+ return {
120
+ hereyaBinPath: process.argv[1],
121
+ password,
122
+ username: resolved.hereyaGitUsername || 'x-access-token',
123
+ };
124
+ }
125
+ catch (error) {
126
+ logger.debug?.(`Failed to resolve hereya GitHub-App credentials for app source (${error?.message ?? error}); falling back to unauthenticated clone`);
127
+ return undefined;
128
+ }
129
+ }
77
130
  async function runAppSubcommand(input) {
78
131
  const { appName, logger, paramFlags, rootDir, subcommand, versionFlags, workspace } = input;
79
132
  let runResult;
@@ -90,7 +90,7 @@ export async function dispatchJob(job, executor, cloudBackend, hooks) {
90
90
  return;
91
91
  }
92
92
  if (job.type === 'app-deploy' || job.type === 'app-destroy') {
93
- const appJobResult = await executeAppJob(job, cloudBackend, logger);
93
+ const appJobResult = await executeAppJob(job, cloudBackend, logger, executor);
94
94
  await finalize(appJobResult, job.type);
95
95
  return;
96
96
  }
@@ -1,5 +1,16 @@
1
1
  const DEFAULT_TIMEOUT_MIN = 90;
2
2
  const HEARTBEAT_INTERVAL_MS = 5 * 60 * 1000;
3
+ /**
4
+ * How often, while a job is still `pending`, the CLI asks hereya-cloud to
5
+ * re-fire the executor wake. Guards against a wake being swallowed because the
6
+ * ephemeral executor was idle-draining when the job was created.
7
+ */
8
+ const REWAKE_INTERVAL_MS = 60_000;
9
+ /**
10
+ * Grace period before the first re-wake, giving the original creation-time wake
11
+ * a chance to land before we ask for another one.
12
+ */
13
+ const REWAKE_INITIAL_DELAY_MS = 60_000;
3
14
  /**
4
15
  * Default poll timeout, in ms. Overridable via HEREYA_JOB_TIMEOUT_MIN env var
5
16
  * (positive integer, in minutes). Falls back to DEFAULT_TIMEOUT_MIN.
@@ -14,6 +25,30 @@ function defaultTimeoutMs() {
14
25
  }
15
26
  return DEFAULT_TIMEOUT_MIN * 60 * 1000;
16
27
  }
28
+ /**
29
+ * While a job is still `pending` (not yet claimed by any executor), periodically
30
+ * ask hereya-cloud to re-fire the executor wake. Recovers from a creation-time
31
+ * wake being swallowed by an idle-draining ephemeral executor. Any failure is
32
+ * non-fatal — the caller keeps polling regardless. Returns the (possibly
33
+ * updated) `lastRewakeAt` timestamp.
34
+ */
35
+ async function maybeRewake(args) {
36
+ const { cloudBackend, jobId, lastRewakeAt, logger, startTime, status, workspace } = args;
37
+ if (status !== 'pending') {
38
+ return lastRewakeAt;
39
+ }
40
+ const now = Date.now();
41
+ if (now - startTime < REWAKE_INITIAL_DELAY_MS || now - lastRewakeAt < REWAKE_INTERVAL_MS) {
42
+ return lastRewakeAt;
43
+ }
44
+ try {
45
+ await cloudBackend.rewakeExecutorJob({ jobId, workspace });
46
+ }
47
+ catch (error) {
48
+ logger?.debug?.(`Re-wake request failed (non-fatal): ${error instanceof Error ? error.message : String(error)}`);
49
+ }
50
+ return now;
51
+ }
17
52
  export async function pollExecutorJob(input) {
18
53
  const { cloudBackend, jobId, logger, workspace } = input;
19
54
  const timeout = input.timeoutMs ?? defaultTimeoutMs();
@@ -22,6 +57,7 @@ export async function pollExecutorJob(input) {
22
57
  let lastLogLength = 0;
23
58
  let lastStatus = 'pending';
24
59
  let lastUserHeartbeat = startTime;
60
+ let lastRewakeAt = startTime;
25
61
  while (Date.now() - startTime < timeout) {
26
62
  // eslint-disable-next-line no-await-in-loop
27
63
  const statusResult = await cloudBackend.getExecutorJobStatus({
@@ -53,6 +89,16 @@ export async function pollExecutorJob(input) {
53
89
  lastUserHeartbeat = now;
54
90
  }
55
91
  }
92
+ // eslint-disable-next-line no-await-in-loop
93
+ lastRewakeAt = await maybeRewake({
94
+ cloudBackend,
95
+ jobId,
96
+ lastRewakeAt,
97
+ logger,
98
+ startTime,
99
+ status: job.status,
100
+ workspace,
101
+ });
56
102
  if (job.status === 'completed') {
57
103
  if (job.result) {
58
104
  return { result: job.result, success: true };
@@ -1042,41 +1042,37 @@
1042
1042
  "index.js"
1043
1043
  ]
1044
1044
  },
1045
- "uninit": {
1045
+ "undeploy": {
1046
1046
  "aliases": [],
1047
- "args": {
1048
- "project": {
1049
- "description": "project name",
1050
- "name": "project",
1051
- "required": true
1052
- }
1053
- },
1054
- "description": "Destroy template infrastructure and uninitialize a project.",
1047
+ "args": {},
1048
+ "description": "Undeploy a hereya project by removing all resources.",
1055
1049
  "examples": [
1056
- "<%= config.bin %> <%= command.id %> myProject -w dev",
1057
- "<%= config.bin %> <%= command.id %> myProject -w dev -p prodWorkspace=prod"
1050
+ "<%= config.bin %> <%= command.id %>"
1058
1051
  ],
1059
1052
  "flags": {
1060
1053
  "chdir": {
1061
- "description": "directory to run command in",
1054
+ "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 ",
1062
1055
  "name": "chdir",
1063
1056
  "required": false,
1064
1057
  "hasDynamicHelp": false,
1065
1058
  "multiple": false,
1066
1059
  "type": "option"
1067
1060
  },
1068
- "parameter": {
1069
- "char": "p",
1070
- "description": "parameter for the template, in the form of 'key=value'. Overrides saved parameters.",
1071
- "name": "parameter",
1072
- "default": [],
1073
- "hasDynamicHelp": false,
1074
- "multiple": true,
1075
- "type": "option"
1061
+ "debug": {
1062
+ "description": "enable debug mode",
1063
+ "name": "debug",
1064
+ "allowNo": false,
1065
+ "type": "boolean"
1066
+ },
1067
+ "local": {
1068
+ "description": "force local execution (skip remote executor)",
1069
+ "name": "local",
1070
+ "allowNo": false,
1071
+ "type": "boolean"
1076
1072
  },
1077
1073
  "workspace": {
1078
1074
  "char": "w",
1079
- "description": "workspace used during init",
1075
+ "description": "name of the workspace to undeploy the packages for",
1080
1076
  "name": "workspace",
1081
1077
  "required": true,
1082
1078
  "hasDynamicHelp": false,
@@ -1086,7 +1082,7 @@
1086
1082
  },
1087
1083
  "hasDynamicHelp": false,
1088
1084
  "hiddenAliases": [],
1089
- "id": "uninit",
1085
+ "id": "undeploy",
1090
1086
  "pluginAlias": "hereya-cli",
1091
1087
  "pluginName": "hereya-cli",
1092
1088
  "pluginType": "core",
@@ -1096,41 +1092,45 @@
1096
1092
  "relativePath": [
1097
1093
  "dist",
1098
1094
  "commands",
1099
- "uninit",
1095
+ "undeploy",
1100
1096
  "index.js"
1101
1097
  ]
1102
1098
  },
1103
- "undeploy": {
1099
+ "uninit": {
1104
1100
  "aliases": [],
1105
- "args": {},
1106
- "description": "Undeploy a hereya project by removing all resources.",
1101
+ "args": {
1102
+ "project": {
1103
+ "description": "project name",
1104
+ "name": "project",
1105
+ "required": true
1106
+ }
1107
+ },
1108
+ "description": "Destroy template infrastructure and uninitialize a project.",
1107
1109
  "examples": [
1108
- "<%= config.bin %> <%= command.id %>"
1110
+ "<%= config.bin %> <%= command.id %> myProject -w dev",
1111
+ "<%= config.bin %> <%= command.id %> myProject -w dev -p prodWorkspace=prod"
1109
1112
  ],
1110
1113
  "flags": {
1111
1114
  "chdir": {
1112
- "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 ",
1115
+ "description": "directory to run command in",
1113
1116
  "name": "chdir",
1114
1117
  "required": false,
1115
1118
  "hasDynamicHelp": false,
1116
1119
  "multiple": false,
1117
1120
  "type": "option"
1118
1121
  },
1119
- "debug": {
1120
- "description": "enable debug mode",
1121
- "name": "debug",
1122
- "allowNo": false,
1123
- "type": "boolean"
1124
- },
1125
- "local": {
1126
- "description": "force local execution (skip remote executor)",
1127
- "name": "local",
1128
- "allowNo": false,
1129
- "type": "boolean"
1122
+ "parameter": {
1123
+ "char": "p",
1124
+ "description": "parameter for the template, in the form of 'key=value'. Overrides saved parameters.",
1125
+ "name": "parameter",
1126
+ "default": [],
1127
+ "hasDynamicHelp": false,
1128
+ "multiple": true,
1129
+ "type": "option"
1130
1130
  },
1131
1131
  "workspace": {
1132
1132
  "char": "w",
1133
- "description": "name of the workspace to undeploy the packages for",
1133
+ "description": "workspace used during init",
1134
1134
  "name": "workspace",
1135
1135
  "required": true,
1136
1136
  "hasDynamicHelp": false,
@@ -1140,7 +1140,7 @@
1140
1140
  },
1141
1141
  "hasDynamicHelp": false,
1142
1142
  "hiddenAliases": [],
1143
- "id": "undeploy",
1143
+ "id": "uninit",
1144
1144
  "pluginAlias": "hereya-cli",
1145
1145
  "pluginName": "hereya-cli",
1146
1146
  "pluginType": "core",
@@ -1150,7 +1150,7 @@
1150
1150
  "relativePath": [
1151
1151
  "dist",
1152
1152
  "commands",
1153
- "undeploy",
1153
+ "uninit",
1154
1154
  "index.js"
1155
1155
  ]
1156
1156
  },
@@ -3409,5 +3409,5 @@
3409
3409
  ]
3410
3410
  }
3411
3411
  },
3412
- "version": "0.100.6"
3412
+ "version": "0.101.1"
3413
3413
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.100.6",
4
+ "version": "0.101.1",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.cjs"