hereya-cli 0.95.4 → 0.95.5
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 +66 -66
- package/dist/lib/package/cloud.js +34 -9
- package/dist/lib/package/github.js +65 -21
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g hereya-cli
|
|
|
21
21
|
$ hereya COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ hereya (--version)
|
|
24
|
-
hereya-cli/0.95.
|
|
24
|
+
hereya-cli/0.95.5 linux-x64 node-v24.14.1
|
|
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.95.
|
|
132
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
166
|
+
_See code: [src/commands/app/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
186
|
+
_See code: [src/commands/app/deployments/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
215
|
+
_See code: [src/commands/app/destroy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
241
|
+
_See code: [src/commands/app/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
258
|
+
_See code: [src/commands/app/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
284
|
+
_See code: [src/commands/app/new/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
307
|
+
_See code: [src/commands/app/status/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
332
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
357
|
+
_See code: [src/commands/clone/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
379
|
+
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
396
|
+
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
416
|
+
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
438
|
+
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
464
|
+
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/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.95.
|
|
490
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/deploy/index.ts)_
|
|
491
491
|
|
|
492
492
|
## `hereya devenv config`
|
|
493
493
|
|
|
@@ -507,7 +507,7 @@ EXAMPLES
|
|
|
507
507
|
$ hereya devenv config -w my-workspace
|
|
508
508
|
```
|
|
509
509
|
|
|
510
|
-
_See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
510
|
+
_See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/devenv/config/index.ts)_
|
|
511
511
|
|
|
512
512
|
## `hereya devenv install`
|
|
513
513
|
|
|
@@ -534,7 +534,7 @@ EXAMPLES
|
|
|
534
534
|
$ hereya devenv install -w my-workspace -p instanceType=t3.large
|
|
535
535
|
```
|
|
536
536
|
|
|
537
|
-
_See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
537
|
+
_See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/devenv/install/index.ts)_
|
|
538
538
|
|
|
539
539
|
## `hereya devenv project init PROJECT`
|
|
540
540
|
|
|
@@ -566,7 +566,7 @@ EXAMPLES
|
|
|
566
566
|
$ hereya devenv project init my-app -w my-workspace -t acme/node-starter -p region=us-east-1
|
|
567
567
|
```
|
|
568
568
|
|
|
569
|
-
_See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
569
|
+
_See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/devenv/project/init/index.ts)_
|
|
570
570
|
|
|
571
571
|
## `hereya devenv project uninit PROJECT`
|
|
572
572
|
|
|
@@ -592,7 +592,7 @@ EXAMPLES
|
|
|
592
592
|
$ hereya devenv project uninit my-app -w my-workspace --force
|
|
593
593
|
```
|
|
594
594
|
|
|
595
|
-
_See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
595
|
+
_See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/devenv/project/uninit/index.ts)_
|
|
596
596
|
|
|
597
597
|
## `hereya devenv sleep`
|
|
598
598
|
|
|
@@ -613,7 +613,7 @@ EXAMPLES
|
|
|
613
613
|
$ hereya devenv sleep -w my-workspace
|
|
614
614
|
```
|
|
615
615
|
|
|
616
|
-
_See code: [src/commands/devenv/sleep/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
616
|
+
_See code: [src/commands/devenv/sleep/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/devenv/sleep/index.ts)_
|
|
617
617
|
|
|
618
618
|
## `hereya devenv ssh`
|
|
619
619
|
|
|
@@ -633,7 +633,7 @@ EXAMPLES
|
|
|
633
633
|
$ hereya devenv ssh -w my-workspace
|
|
634
634
|
```
|
|
635
635
|
|
|
636
|
-
_See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
636
|
+
_See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/devenv/ssh/index.ts)_
|
|
637
637
|
|
|
638
638
|
## `hereya devenv uninstall`
|
|
639
639
|
|
|
@@ -654,7 +654,7 @@ EXAMPLES
|
|
|
654
654
|
$ hereya devenv uninstall -w my-workspace
|
|
655
655
|
```
|
|
656
656
|
|
|
657
|
-
_See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
657
|
+
_See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/devenv/uninstall/index.ts)_
|
|
658
658
|
|
|
659
659
|
## `hereya doc PACKAGE`
|
|
660
660
|
|
|
@@ -687,7 +687,7 @@ EXAMPLES
|
|
|
687
687
|
$ hereya doc my-package --no-doc
|
|
688
688
|
```
|
|
689
689
|
|
|
690
|
-
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
690
|
+
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/doc/index.ts)_
|
|
691
691
|
|
|
692
692
|
## `hereya docker run IMAGE`
|
|
693
693
|
|
|
@@ -718,7 +718,7 @@ EXAMPLES
|
|
|
718
718
|
$ hereya docker run myapp:latest -- --rm -v ./data:/data
|
|
719
719
|
```
|
|
720
720
|
|
|
721
|
-
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
721
|
+
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/docker/run/index.ts)_
|
|
722
722
|
|
|
723
723
|
## `hereya down`
|
|
724
724
|
|
|
@@ -745,7 +745,7 @@ EXAMPLES
|
|
|
745
745
|
$ hereya down
|
|
746
746
|
```
|
|
747
747
|
|
|
748
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
748
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/down/index.ts)_
|
|
749
749
|
|
|
750
750
|
## `hereya env [NAME]`
|
|
751
751
|
|
|
@@ -776,7 +776,7 @@ EXAMPLES
|
|
|
776
776
|
$ hereya env -w dev -l
|
|
777
777
|
```
|
|
778
778
|
|
|
779
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
779
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/env/index.ts)_
|
|
780
780
|
|
|
781
781
|
## `hereya env set [NAME]`
|
|
782
782
|
|
|
@@ -803,7 +803,7 @@ EXAMPLES
|
|
|
803
803
|
$ hereya env set FOO -v bar -w dev
|
|
804
804
|
```
|
|
805
805
|
|
|
806
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
806
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/env/set/index.ts)_
|
|
807
807
|
|
|
808
808
|
## `hereya executor start`
|
|
809
809
|
|
|
@@ -837,7 +837,7 @@ EXAMPLES
|
|
|
837
837
|
HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
|
|
838
838
|
```
|
|
839
839
|
|
|
840
|
-
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
840
|
+
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/executor/start/index.ts)_
|
|
841
841
|
|
|
842
842
|
## `hereya flow add PACKAGE`
|
|
843
843
|
|
|
@@ -875,7 +875,7 @@ EXAMPLES
|
|
|
875
875
|
$ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
|
|
876
876
|
```
|
|
877
877
|
|
|
878
|
-
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
878
|
+
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/add/index.ts)_
|
|
879
879
|
|
|
880
880
|
## `hereya flow docker run IMAGE`
|
|
881
881
|
|
|
@@ -905,7 +905,7 @@ EXAMPLES
|
|
|
905
905
|
$ hereya flow docker run --pin myapp:latest -- --rm
|
|
906
906
|
```
|
|
907
907
|
|
|
908
|
-
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
908
|
+
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/docker/run/index.ts)_
|
|
909
909
|
|
|
910
910
|
## `hereya flow down`
|
|
911
911
|
|
|
@@ -939,7 +939,7 @@ EXAMPLES
|
|
|
939
939
|
$ hereya flow down --pin
|
|
940
940
|
```
|
|
941
941
|
|
|
942
|
-
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
942
|
+
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/down/index.ts)_
|
|
943
943
|
|
|
944
944
|
## `hereya flow env [NAME]`
|
|
945
945
|
|
|
@@ -973,7 +973,7 @@ EXAMPLES
|
|
|
973
973
|
$ hereya flow env -l
|
|
974
974
|
```
|
|
975
975
|
|
|
976
|
-
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
976
|
+
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/env/index.ts)_
|
|
977
977
|
|
|
978
978
|
## `hereya flow provid PACKAGE`
|
|
979
979
|
|
|
@@ -1002,7 +1002,7 @@ EXAMPLES
|
|
|
1002
1002
|
$ hereya flow provid hereya/postgres --pin
|
|
1003
1003
|
```
|
|
1004
1004
|
|
|
1005
|
-
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1005
|
+
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/provid/index.ts)_
|
|
1006
1006
|
|
|
1007
1007
|
## `hereya flow remove PACKAGE`
|
|
1008
1008
|
|
|
@@ -1032,7 +1032,7 @@ EXAMPLES
|
|
|
1032
1032
|
$ hereya flow remove cloudy/docker_postgres --profile staging
|
|
1033
1033
|
```
|
|
1034
1034
|
|
|
1035
|
-
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1035
|
+
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/remove/index.ts)_
|
|
1036
1036
|
|
|
1037
1037
|
## `hereya flow run CMD`
|
|
1038
1038
|
|
|
@@ -1061,7 +1061,7 @@ EXAMPLES
|
|
|
1061
1061
|
$ hereya flow run --pin -- npm test
|
|
1062
1062
|
```
|
|
1063
1063
|
|
|
1064
|
-
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1064
|
+
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/run/index.ts)_
|
|
1065
1065
|
|
|
1066
1066
|
## `hereya flow up`
|
|
1067
1067
|
|
|
@@ -1095,7 +1095,7 @@ EXAMPLES
|
|
|
1095
1095
|
$ hereya flow up --pin
|
|
1096
1096
|
```
|
|
1097
1097
|
|
|
1098
|
-
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1098
|
+
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/flow/up/index.ts)_
|
|
1099
1099
|
|
|
1100
1100
|
## `hereya help [COMMAND]`
|
|
1101
1101
|
|
|
@@ -1152,7 +1152,7 @@ EXAMPLES
|
|
|
1152
1152
|
$ hereya import org/my-package -f state.tfstate -w my-workspace
|
|
1153
1153
|
```
|
|
1154
1154
|
|
|
1155
|
-
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1155
|
+
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/import/index.ts)_
|
|
1156
1156
|
|
|
1157
1157
|
## `hereya import-repo PROJECT`
|
|
1158
1158
|
|
|
@@ -1182,7 +1182,7 @@ EXAMPLES
|
|
|
1182
1182
|
$ hereya import-repo myProject -w=dev -r=https://github.com/acme/api --clone --chdir=./api
|
|
1183
1183
|
```
|
|
1184
1184
|
|
|
1185
|
-
_See code: [src/commands/import-repo/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1185
|
+
_See code: [src/commands/import-repo/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/import-repo/index.ts)_
|
|
1186
1186
|
|
|
1187
1187
|
## `hereya init PROJECT`
|
|
1188
1188
|
|
|
@@ -1216,7 +1216,7 @@ EXAMPLES
|
|
|
1216
1216
|
$ hereya init myProject -w=dev -t=acme/node-starter -d=prod -p region=us-east-1
|
|
1217
1217
|
```
|
|
1218
1218
|
|
|
1219
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1219
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/init/index.ts)_
|
|
1220
1220
|
|
|
1221
1221
|
## `hereya list`
|
|
1222
1222
|
|
|
@@ -1233,7 +1233,7 @@ EXAMPLES
|
|
|
1233
1233
|
$ hereya list
|
|
1234
1234
|
```
|
|
1235
1235
|
|
|
1236
|
-
_See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1236
|
+
_See code: [src/commands/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/list/index.ts)_
|
|
1237
1237
|
|
|
1238
1238
|
## `hereya login [URL]`
|
|
1239
1239
|
|
|
@@ -1262,7 +1262,7 @@ EXAMPLES
|
|
|
1262
1262
|
$ hereya login --token=your-token https://cloud.hereya.dev
|
|
1263
1263
|
```
|
|
1264
1264
|
|
|
1265
|
-
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1265
|
+
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/login/index.ts)_
|
|
1266
1266
|
|
|
1267
1267
|
## `hereya logout`
|
|
1268
1268
|
|
|
@@ -1279,7 +1279,7 @@ EXAMPLES
|
|
|
1279
1279
|
$ hereya logout
|
|
1280
1280
|
```
|
|
1281
1281
|
|
|
1282
|
-
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1282
|
+
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/logout/index.ts)_
|
|
1283
1283
|
|
|
1284
1284
|
## `hereya provid PACKAGE`
|
|
1285
1285
|
|
|
@@ -1307,7 +1307,7 @@ EXAMPLES
|
|
|
1307
1307
|
$ hereya provid hereya/postgres --workspace staging
|
|
1308
1308
|
```
|
|
1309
1309
|
|
|
1310
|
-
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1310
|
+
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/provid/index.ts)_
|
|
1311
1311
|
|
|
1312
1312
|
## `hereya publish`
|
|
1313
1313
|
|
|
@@ -1330,7 +1330,7 @@ EXAMPLES
|
|
|
1330
1330
|
$ hereya publish --chdir=/path/to/package
|
|
1331
1331
|
```
|
|
1332
1332
|
|
|
1333
|
-
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1333
|
+
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/publish/index.ts)_
|
|
1334
1334
|
|
|
1335
1335
|
## `hereya remove PACKAGE`
|
|
1336
1336
|
|
|
@@ -1358,7 +1358,7 @@ EXAMPLES
|
|
|
1358
1358
|
$ hereya remove cloudy/docker_postgres
|
|
1359
1359
|
```
|
|
1360
1360
|
|
|
1361
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1361
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/remove/index.ts)_
|
|
1362
1362
|
|
|
1363
1363
|
## `hereya run CMD`
|
|
1364
1364
|
|
|
@@ -1384,7 +1384,7 @@ EXAMPLES
|
|
|
1384
1384
|
$ hereya run -w uat -- node index.js
|
|
1385
1385
|
```
|
|
1386
1386
|
|
|
1387
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1387
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/run/index.ts)_
|
|
1388
1388
|
|
|
1389
1389
|
## `hereya search QUERY`
|
|
1390
1390
|
|
|
@@ -1415,7 +1415,7 @@ EXAMPLES
|
|
|
1415
1415
|
$ hereya search database --json
|
|
1416
1416
|
```
|
|
1417
1417
|
|
|
1418
|
-
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1418
|
+
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/search/index.ts)_
|
|
1419
1419
|
|
|
1420
1420
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
1421
1421
|
|
|
@@ -1440,7 +1440,7 @@ EXAMPLES
|
|
|
1440
1440
|
$ hereya unbootstrap local
|
|
1441
1441
|
```
|
|
1442
1442
|
|
|
1443
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1443
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/unbootstrap/index.ts)_
|
|
1444
1444
|
|
|
1445
1445
|
## `hereya undeploy`
|
|
1446
1446
|
|
|
@@ -1466,7 +1466,7 @@ EXAMPLES
|
|
|
1466
1466
|
$ hereya undeploy
|
|
1467
1467
|
```
|
|
1468
1468
|
|
|
1469
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1469
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/undeploy/index.ts)_
|
|
1470
1470
|
|
|
1471
1471
|
## `hereya uninit PROJECT`
|
|
1472
1472
|
|
|
@@ -1494,7 +1494,7 @@ EXAMPLES
|
|
|
1494
1494
|
$ hereya uninit myProject -w dev -p prodWorkspace=prod
|
|
1495
1495
|
```
|
|
1496
1496
|
|
|
1497
|
-
_See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1497
|
+
_See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/uninit/index.ts)_
|
|
1498
1498
|
|
|
1499
1499
|
## `hereya up`
|
|
1500
1500
|
|
|
@@ -1521,7 +1521,7 @@ EXAMPLES
|
|
|
1521
1521
|
$ hereya up
|
|
1522
1522
|
```
|
|
1523
1523
|
|
|
1524
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1524
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/up/index.ts)_
|
|
1525
1525
|
|
|
1526
1526
|
## `hereya update [VERSION]`
|
|
1527
1527
|
|
|
@@ -1543,7 +1543,7 @@ EXAMPLES
|
|
|
1543
1543
|
$ hereya update 0.75.0
|
|
1544
1544
|
```
|
|
1545
1545
|
|
|
1546
|
-
_See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1546
|
+
_See code: [src/commands/update/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/update/index.ts)_
|
|
1547
1547
|
|
|
1548
1548
|
## `hereya workspace create NAME`
|
|
1549
1549
|
|
|
@@ -1568,7 +1568,7 @@ EXAMPLES
|
|
|
1568
1568
|
$ hereya workspace create dev
|
|
1569
1569
|
```
|
|
1570
1570
|
|
|
1571
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1571
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/create/index.ts)_
|
|
1572
1572
|
|
|
1573
1573
|
## `hereya workspace delete NAME`
|
|
1574
1574
|
|
|
@@ -1588,7 +1588,7 @@ EXAMPLES
|
|
|
1588
1588
|
$ hereya workspace delete dev
|
|
1589
1589
|
```
|
|
1590
1590
|
|
|
1591
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1591
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/delete/index.ts)_
|
|
1592
1592
|
|
|
1593
1593
|
## `hereya workspace env [NAME]`
|
|
1594
1594
|
|
|
@@ -1614,7 +1614,7 @@ EXAMPLES
|
|
|
1614
1614
|
$ hereya workspace env myEnv -w dev
|
|
1615
1615
|
```
|
|
1616
1616
|
|
|
1617
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1617
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/env/index.ts)_
|
|
1618
1618
|
|
|
1619
1619
|
## `hereya workspace env set`
|
|
1620
1620
|
|
|
@@ -1638,7 +1638,7 @@ EXAMPLES
|
|
|
1638
1638
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
1639
1639
|
```
|
|
1640
1640
|
|
|
1641
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1641
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/env/set/index.ts)_
|
|
1642
1642
|
|
|
1643
1643
|
## `hereya workspace env unset`
|
|
1644
1644
|
|
|
@@ -1659,7 +1659,7 @@ EXAMPLES
|
|
|
1659
1659
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
1660
1660
|
```
|
|
1661
1661
|
|
|
1662
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1662
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/env/unset/index.ts)_
|
|
1663
1663
|
|
|
1664
1664
|
## `hereya workspace executor install`
|
|
1665
1665
|
|
|
@@ -1686,7 +1686,7 @@ DESCRIPTION
|
|
|
1686
1686
|
- ephemeral: ASG scaled to 0 with a broker Lambda + OIDC for on-demand wake.
|
|
1687
1687
|
```
|
|
1688
1688
|
|
|
1689
|
-
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1689
|
+
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/executor/install/index.ts)_
|
|
1690
1690
|
|
|
1691
1691
|
## `hereya workspace executor token`
|
|
1692
1692
|
|
|
@@ -1703,7 +1703,7 @@ DESCRIPTION
|
|
|
1703
1703
|
Generate a workspace-scoped executor token for the remote executor
|
|
1704
1704
|
```
|
|
1705
1705
|
|
|
1706
|
-
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1706
|
+
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/executor/token/index.ts)_
|
|
1707
1707
|
|
|
1708
1708
|
## `hereya workspace executor uninstall`
|
|
1709
1709
|
|
|
@@ -1727,7 +1727,7 @@ DESCRIPTION
|
|
|
1727
1727
|
controls log output.
|
|
1728
1728
|
```
|
|
1729
1729
|
|
|
1730
|
-
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1730
|
+
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/executor/uninstall/index.ts)_
|
|
1731
1731
|
|
|
1732
1732
|
## `hereya workspace install PACKAGE`
|
|
1733
1733
|
|
|
@@ -1754,7 +1754,7 @@ EXAMPLES
|
|
|
1754
1754
|
$ hereya workspace install hereya/aws-cognito
|
|
1755
1755
|
```
|
|
1756
1756
|
|
|
1757
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1757
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/install/index.ts)_
|
|
1758
1758
|
|
|
1759
1759
|
## `hereya workspace list`
|
|
1760
1760
|
|
|
@@ -1778,7 +1778,7 @@ EXAMPLES
|
|
|
1778
1778
|
$ hereya workspace list --org personal
|
|
1779
1779
|
```
|
|
1780
1780
|
|
|
1781
|
-
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1781
|
+
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/list/index.ts)_
|
|
1782
1782
|
|
|
1783
1783
|
## `hereya workspace set-profile PROFILE`
|
|
1784
1784
|
|
|
@@ -1802,7 +1802,7 @@ EXAMPLES
|
|
|
1802
1802
|
$ hereya workspace set-profile prod-profile -w production
|
|
1803
1803
|
```
|
|
1804
1804
|
|
|
1805
|
-
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1805
|
+
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/set-profile/index.ts)_
|
|
1806
1806
|
|
|
1807
1807
|
## `hereya workspace uninstall PACKAGE`
|
|
1808
1808
|
|
|
@@ -1829,5 +1829,5 @@ EXAMPLES
|
|
|
1829
1829
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
1830
1830
|
```
|
|
1831
1831
|
|
|
1832
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.
|
|
1832
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.95.5/src/commands/workspace/uninstall/index.ts)_
|
|
1833
1833
|
<!-- commandsstop -->
|
|
@@ -17,7 +17,6 @@ export class CloudPackageManager {
|
|
|
17
17
|
if (await isNotEmpty(destPath)) {
|
|
18
18
|
return destPath;
|
|
19
19
|
}
|
|
20
|
-
await fs.mkdir(destPath, { recursive: true });
|
|
21
20
|
const tmpFolder = path.join(os.homedir(), '.hereya', 'downloads', randomUUID());
|
|
22
21
|
try {
|
|
23
22
|
// Use simple-git to clone the repository at specific commit
|
|
@@ -45,15 +44,41 @@ export class CloudPackageManager {
|
|
|
45
44
|
throw new Error(`Checksum mismatch for package ${registryPackage.name}@${registryPackage.version}. Expected: ${registryPackage.sha256}, Got: ${actualChecksum}`);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
//
|
|
49
|
-
|
|
50
|
-
await
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
// Drop .git so the published artifact is clean — and so the directory
|
|
48
|
+
// rename below carries only the package contents.
|
|
49
|
+
await fs.rm(path.join(tmpFolder, '.git'), { force: true, recursive: true });
|
|
50
|
+
// Atomic publish: rename the whole tmpFolder onto destPath in one
|
|
51
|
+
// syscall. POSIX rename succeeds when destPath doesn't exist or is an
|
|
52
|
+
// empty directory; if a concurrent install already populated destPath
|
|
53
|
+
// (peer won the race), we get ENOTEMPTY/EEXIST and treat that as
|
|
54
|
+
// success — their result is valid because they ran the same
|
|
55
|
+
// checksum-validated clone we did.
|
|
56
|
+
//
|
|
57
|
+
// Pre-fix: we mkdir'd destPath then renamed each file individually,
|
|
58
|
+
// so two concurrent jobs racing on the same package both passed
|
|
59
|
+
// isNotEmpty(destPath) === false, both cloned into separate
|
|
60
|
+
// tmpFolders, and both tried to rename `<tmp>/lib` → `<destPath>/lib`.
|
|
61
|
+
// First wins; second crashed with EEXIST and the executor reported
|
|
62
|
+
// the job failed even though the package was correctly installed
|
|
63
|
+
// by the peer. Concurrency 20 in the executor amplified this
|
|
64
|
+
// anytime more than one job for the same workspace ran in parallel.
|
|
65
|
+
await fs.mkdir(path.dirname(destPath), { recursive: true });
|
|
66
|
+
try {
|
|
67
|
+
await fs.rename(tmpFolder, destPath);
|
|
68
|
+
}
|
|
69
|
+
catch (renameError) {
|
|
70
|
+
const { code } = renameError;
|
|
71
|
+
if (code === 'ENOTEMPTY' || code === 'EEXIST') {
|
|
72
|
+
// Peer install won. Discard our copy.
|
|
73
|
+
await fs.rm(tmpFolder, { force: true, recursive: true });
|
|
74
|
+
if (!(await isNotEmpty(destPath))) {
|
|
75
|
+
throw new Error(`Concurrent install for ${registryPackage.name}@${registryPackage.version} reported as won but left ${destPath} empty`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
throw renameError;
|
|
53
80
|
}
|
|
54
|
-
}
|
|
55
|
-
// Clean up temp folder
|
|
56
|
-
await fs.rm(tmpFolder, { force: true, recursive: true });
|
|
81
|
+
}
|
|
57
82
|
}
|
|
58
83
|
catch (error) {
|
|
59
84
|
// Clean up on error
|
|
@@ -13,33 +13,77 @@ export class GitHubPackageManager {
|
|
|
13
13
|
if (await isNotEmpty(destPath)) {
|
|
14
14
|
return destPath;
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// Try to checkout the version as a tag (e.g., v1.2.3 or 1.2.3)
|
|
27
|
-
await repoGit.checkout(`v${version}`);
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
16
|
+
const tmpFolder = path.join(os.homedir(), '.hereya', 'downloads', randomUUID());
|
|
17
|
+
try {
|
|
18
|
+
// Initialize simple-git
|
|
19
|
+
const git = simpleGit();
|
|
20
|
+
// Parse version from URL if present (format: url#version)
|
|
21
|
+
const [repoUrl, version] = pkgUrl.split('#');
|
|
22
|
+
if (version) {
|
|
23
|
+
// Clone repository and checkout specific version tag
|
|
24
|
+
await git.clone(repoUrl, tmpFolder, ['--no-checkout']);
|
|
25
|
+
const repoGit = simpleGit(tmpFolder);
|
|
30
26
|
try {
|
|
31
|
-
//
|
|
32
|
-
await repoGit.checkout(version);
|
|
27
|
+
// Try to checkout the version as a tag (e.g., v1.2.3 or 1.2.3)
|
|
28
|
+
await repoGit.checkout(`v${version}`);
|
|
33
29
|
}
|
|
34
30
|
catch {
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
try {
|
|
32
|
+
// If v-prefixed tag doesn't exist, try without prefix
|
|
33
|
+
await repoGit.checkout(version);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
// If neither tag exists, fail with clear error
|
|
37
|
+
throw new Error(`Version '${version}' not found in repository ${repoUrl}. Available tags can be found at ${repoUrl}/tags`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
// Clone repository at default branch
|
|
43
|
+
await git.clone(pkgUrl, tmpFolder, ['--depth=1']);
|
|
44
|
+
}
|
|
45
|
+
// Drop .git so the published artifact is clean — and so the directory
|
|
46
|
+
// rename below carries only the package contents.
|
|
47
|
+
await fs.rm(path.join(tmpFolder, '.git'), { force: true, recursive: true });
|
|
48
|
+
// Atomic publish: rename the whole tmpFolder onto destPath in one
|
|
49
|
+
// syscall. POSIX rename succeeds when destPath doesn't exist or is an
|
|
50
|
+
// empty directory; if a concurrent install already populated destPath
|
|
51
|
+
// (peer won the race), we get ENOTEMPTY/EEXIST and treat that as
|
|
52
|
+
// success — their result is valid because they ran the same clone we
|
|
53
|
+
// did.
|
|
54
|
+
//
|
|
55
|
+
// Pre-fix: we mkdir'd destPath then cloned directly into it, so two
|
|
56
|
+
// concurrent jobs racing on the same package both passed
|
|
57
|
+
// isNotEmpty(destPath) === false and both tried to clone into the same
|
|
58
|
+
// directory. simple-git fails when the target is non-empty, and the
|
|
59
|
+
// executor reported the job failed even though one peer succeeded.
|
|
60
|
+
await fs.mkdir(path.dirname(destPath), { recursive: true });
|
|
61
|
+
try {
|
|
62
|
+
await fs.rename(tmpFolder, destPath);
|
|
63
|
+
}
|
|
64
|
+
catch (renameError) {
|
|
65
|
+
const { code } = renameError;
|
|
66
|
+
if (code === 'ENOTEMPTY' || code === 'EEXIST') {
|
|
67
|
+
// Peer install won. Discard our copy.
|
|
68
|
+
await fs.rm(tmpFolder, { force: true, recursive: true });
|
|
69
|
+
if (!(await isNotEmpty(destPath))) {
|
|
70
|
+
throw new Error(`Concurrent install for ${pkgUrl} reported as won but left ${destPath} empty`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
throw renameError;
|
|
37
75
|
}
|
|
38
76
|
}
|
|
39
77
|
}
|
|
40
|
-
|
|
41
|
-
//
|
|
42
|
-
|
|
78
|
+
catch (error) {
|
|
79
|
+
// Clean up on error
|
|
80
|
+
try {
|
|
81
|
+
await fs.rm(tmpFolder, { force: true, recursive: true });
|
|
82
|
+
}
|
|
83
|
+
catch {
|
|
84
|
+
// Ignore cleanup errors
|
|
85
|
+
}
|
|
86
|
+
throw error;
|
|
43
87
|
}
|
|
44
88
|
return destPath;
|
|
45
89
|
}
|
package/oclif.manifest.json
CHANGED