hereya-cli 0.72.1 → 0.73.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 +124 -58
- package/dist/backend/cloud/cloud-backend.d.ts +3 -1
- package/dist/backend/cloud/cloud-backend.js +44 -0
- package/dist/backend/common.d.ts +28 -0
- package/dist/backend/file.d.ts +3 -1
- package/dist/backend/file.js +9 -0
- package/dist/commands/credential-helper/index.d.ts +10 -0
- package/dist/commands/credential-helper/index.js +87 -0
- package/dist/commands/devenv/install/index.js +2 -28
- package/dist/commands/devenv/project/init/index.d.ts +2 -0
- package/dist/commands/devenv/project/init/index.js +30 -4
- package/dist/commands/devenv/project/uninit/index.d.ts +14 -0
- package/dist/commands/devenv/project/uninit/index.js +95 -0
- package/dist/commands/init/index.d.ts +2 -0
- package/dist/commands/init/index.js +133 -0
- package/dist/commands/uninit/index.d.ts +13 -0
- package/dist/commands/uninit/index.js +81 -0
- package/dist/lib/config/common.d.ts +4 -0
- package/dist/lib/config/simple.d.ts +2 -1
- package/dist/lib/config/simple.js +8 -1
- package/dist/lib/git-utils.d.ts +29 -0
- package/dist/lib/git-utils.js +70 -1
- package/dist/lib/hereya-token.d.ts +6 -0
- package/dist/lib/hereya-token.js +29 -0
- package/oclif.manifest.json +184 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g hereya-cli
|
|
|
21
21
|
$ hereya COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ hereya (--version)
|
|
24
|
-
hereya-cli/0.
|
|
24
|
+
hereya-cli/0.73.1 linux-x64 node-v24.14.0
|
|
25
25
|
$ hereya --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ hereya COMMAND
|
|
@@ -41,6 +41,7 @@ USAGE
|
|
|
41
41
|
* [`hereya devenv config`](#hereya-devenv-config)
|
|
42
42
|
* [`hereya devenv install`](#hereya-devenv-install)
|
|
43
43
|
* [`hereya devenv project init PROJECT`](#hereya-devenv-project-init-project)
|
|
44
|
+
* [`hereya devenv project uninit PROJECT`](#hereya-devenv-project-uninit-project)
|
|
44
45
|
* [`hereya devenv ssh`](#hereya-devenv-ssh)
|
|
45
46
|
* [`hereya devenv uninstall`](#hereya-devenv-uninstall)
|
|
46
47
|
* [`hereya doc PACKAGE`](#hereya-doc-package)
|
|
@@ -69,6 +70,7 @@ USAGE
|
|
|
69
70
|
* [`hereya search QUERY`](#hereya-search-query)
|
|
70
71
|
* [`hereya unbootstrap INFRASTRUCTURETYPE`](#hereya-unbootstrap-infrastructuretype)
|
|
71
72
|
* [`hereya undeploy`](#hereya-undeploy)
|
|
73
|
+
* [`hereya uninit PROJECT`](#hereya-uninit-project)
|
|
72
74
|
* [`hereya up`](#hereya-up)
|
|
73
75
|
* [`hereya workspace create NAME`](#hereya-workspace-create-name)
|
|
74
76
|
* [`hereya workspace delete NAME`](#hereya-workspace-delete-name)
|
|
@@ -115,7 +117,7 @@ EXAMPLES
|
|
|
115
117
|
$ hereya add cloudy/docker_postgres
|
|
116
118
|
```
|
|
117
119
|
|
|
118
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
120
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/add/index.ts)_
|
|
119
121
|
|
|
120
122
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
121
123
|
|
|
@@ -140,7 +142,7 @@ EXAMPLES
|
|
|
140
142
|
$ hereya bootstrap local
|
|
141
143
|
```
|
|
142
144
|
|
|
143
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
145
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/bootstrap/index.ts)_
|
|
144
146
|
|
|
145
147
|
## `hereya config export-backend [FILE]`
|
|
146
148
|
|
|
@@ -162,7 +164,7 @@ EXAMPLES
|
|
|
162
164
|
$ hereya config export-backend ./path/to/export.json
|
|
163
165
|
```
|
|
164
166
|
|
|
165
|
-
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
167
|
+
_See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/config/export-backend/index.ts)_
|
|
166
168
|
|
|
167
169
|
## `hereya config get-backend`
|
|
168
170
|
|
|
@@ -179,7 +181,7 @@ EXAMPLES
|
|
|
179
181
|
$ hereya config get-backend
|
|
180
182
|
```
|
|
181
183
|
|
|
182
|
-
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
184
|
+
_See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/config/get-backend/index.ts)_
|
|
183
185
|
|
|
184
186
|
## `hereya config import-backend FILE`
|
|
185
187
|
|
|
@@ -199,7 +201,7 @@ EXAMPLES
|
|
|
199
201
|
$ hereya config import-backend ./path/to/cloud-backend.json
|
|
200
202
|
```
|
|
201
203
|
|
|
202
|
-
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
204
|
+
_See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/config/import-backend/index.ts)_
|
|
203
205
|
|
|
204
206
|
## `hereya config use-backend TYPE`
|
|
205
207
|
|
|
@@ -221,7 +223,7 @@ EXAMPLES
|
|
|
221
223
|
$ hereya config use-backend local
|
|
222
224
|
```
|
|
223
225
|
|
|
224
|
-
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
226
|
+
_See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/config/use-backend/index.ts)_
|
|
225
227
|
|
|
226
228
|
## `hereya delete-state`
|
|
227
229
|
|
|
@@ -247,7 +249,7 @@ EXAMPLES
|
|
|
247
249
|
$ hereya delete-state --workspace staging
|
|
248
250
|
```
|
|
249
251
|
|
|
250
|
-
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
252
|
+
_See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/delete-state/index.ts)_
|
|
251
253
|
|
|
252
254
|
## `hereya deploy`
|
|
253
255
|
|
|
@@ -272,7 +274,7 @@ EXAMPLES
|
|
|
272
274
|
$ hereya deploy
|
|
273
275
|
```
|
|
274
276
|
|
|
275
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
277
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/deploy/index.ts)_
|
|
276
278
|
|
|
277
279
|
## `hereya devenv config`
|
|
278
280
|
|
|
@@ -292,7 +294,7 @@ EXAMPLES
|
|
|
292
294
|
$ hereya devenv config -w my-workspace
|
|
293
295
|
```
|
|
294
296
|
|
|
295
|
-
_See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
297
|
+
_See code: [src/commands/devenv/config/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/devenv/config/index.ts)_
|
|
296
298
|
|
|
297
299
|
## `hereya devenv install`
|
|
298
300
|
|
|
@@ -317,7 +319,7 @@ EXAMPLES
|
|
|
317
319
|
$ hereya devenv install -w my-workspace -p instanceType=t3.large
|
|
318
320
|
```
|
|
319
321
|
|
|
320
|
-
_See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
322
|
+
_See code: [src/commands/devenv/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/devenv/install/index.ts)_
|
|
321
323
|
|
|
322
324
|
## `hereya devenv project init PROJECT`
|
|
323
325
|
|
|
@@ -325,23 +327,56 @@ Initialize a project on a remote dev environment.
|
|
|
325
327
|
|
|
326
328
|
```
|
|
327
329
|
USAGE
|
|
328
|
-
$ hereya devenv project init PROJECT -w <value> [-f]
|
|
330
|
+
$ hereya devenv project init PROJECT -w <value> [-f] [-p <value>...] [-t <value>]
|
|
329
331
|
|
|
330
332
|
ARGUMENTS
|
|
331
333
|
PROJECT project name
|
|
332
334
|
|
|
333
335
|
FLAGS
|
|
334
|
-
-f, --force
|
|
335
|
-
-
|
|
336
|
+
-f, --force continue even if folder already exists
|
|
337
|
+
-p, --parameter=<value>... [default: ] parameter for the template, in the form of 'key=value'. Can be specified
|
|
338
|
+
multiple times.
|
|
339
|
+
-t, --template=<value> template package to scaffold the project from
|
|
340
|
+
-w, --workspace=<value> (required) name of the workspace
|
|
336
341
|
|
|
337
342
|
DESCRIPTION
|
|
338
343
|
Initialize a project on a remote dev environment.
|
|
339
344
|
|
|
340
345
|
EXAMPLES
|
|
341
346
|
$ hereya devenv project init my-app -w my-workspace
|
|
347
|
+
|
|
348
|
+
$ hereya devenv project init my-app -w my-workspace -t acme/node-starter
|
|
349
|
+
|
|
350
|
+
$ hereya devenv project init my-app -w my-workspace -t acme/node-starter -p region=us-east-1
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
_See code: [src/commands/devenv/project/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/devenv/project/init/index.ts)_
|
|
354
|
+
|
|
355
|
+
## `hereya devenv project uninit PROJECT`
|
|
356
|
+
|
|
357
|
+
Uninitialize a project on a remote dev environment.
|
|
358
|
+
|
|
359
|
+
```
|
|
360
|
+
USAGE
|
|
361
|
+
$ hereya devenv project uninit PROJECT -w <value> [-f]
|
|
362
|
+
|
|
363
|
+
ARGUMENTS
|
|
364
|
+
PROJECT project name
|
|
365
|
+
|
|
366
|
+
FLAGS
|
|
367
|
+
-f, --force also remove the project directory after uninit
|
|
368
|
+
-w, --workspace=<value> (required) name of the workspace
|
|
369
|
+
|
|
370
|
+
DESCRIPTION
|
|
371
|
+
Uninitialize a project on a remote dev environment.
|
|
372
|
+
|
|
373
|
+
EXAMPLES
|
|
374
|
+
$ hereya devenv project uninit my-app -w my-workspace
|
|
375
|
+
|
|
376
|
+
$ hereya devenv project uninit my-app -w my-workspace --force
|
|
342
377
|
```
|
|
343
378
|
|
|
344
|
-
_See code: [src/commands/devenv/project/
|
|
379
|
+
_See code: [src/commands/devenv/project/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/devenv/project/uninit/index.ts)_
|
|
345
380
|
|
|
346
381
|
## `hereya devenv ssh`
|
|
347
382
|
|
|
@@ -361,7 +396,7 @@ EXAMPLES
|
|
|
361
396
|
$ hereya devenv ssh -w my-workspace
|
|
362
397
|
```
|
|
363
398
|
|
|
364
|
-
_See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
399
|
+
_See code: [src/commands/devenv/ssh/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/devenv/ssh/index.ts)_
|
|
365
400
|
|
|
366
401
|
## `hereya devenv uninstall`
|
|
367
402
|
|
|
@@ -382,7 +417,7 @@ EXAMPLES
|
|
|
382
417
|
$ hereya devenv uninstall -w my-workspace
|
|
383
418
|
```
|
|
384
419
|
|
|
385
|
-
_See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
420
|
+
_See code: [src/commands/devenv/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/devenv/uninstall/index.ts)_
|
|
386
421
|
|
|
387
422
|
## `hereya doc PACKAGE`
|
|
388
423
|
|
|
@@ -415,7 +450,7 @@ EXAMPLES
|
|
|
415
450
|
$ hereya doc my-package --no-doc
|
|
416
451
|
```
|
|
417
452
|
|
|
418
|
-
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
453
|
+
_See code: [src/commands/doc/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/doc/index.ts)_
|
|
419
454
|
|
|
420
455
|
## `hereya docker run IMAGE`
|
|
421
456
|
|
|
@@ -446,7 +481,7 @@ EXAMPLES
|
|
|
446
481
|
$ hereya docker run myapp:latest -- --rm -v ./data:/data
|
|
447
482
|
```
|
|
448
483
|
|
|
449
|
-
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
484
|
+
_See code: [src/commands/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/docker/run/index.ts)_
|
|
450
485
|
|
|
451
486
|
## `hereya down`
|
|
452
487
|
|
|
@@ -473,7 +508,7 @@ EXAMPLES
|
|
|
473
508
|
$ hereya down
|
|
474
509
|
```
|
|
475
510
|
|
|
476
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
511
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/down/index.ts)_
|
|
477
512
|
|
|
478
513
|
## `hereya env [NAME]`
|
|
479
514
|
|
|
@@ -504,7 +539,7 @@ EXAMPLES
|
|
|
504
539
|
$ hereya env -w dev -l
|
|
505
540
|
```
|
|
506
541
|
|
|
507
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
542
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/env/index.ts)_
|
|
508
543
|
|
|
509
544
|
## `hereya env set [NAME]`
|
|
510
545
|
|
|
@@ -531,7 +566,7 @@ EXAMPLES
|
|
|
531
566
|
$ hereya env set FOO -v bar -w dev
|
|
532
567
|
```
|
|
533
568
|
|
|
534
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
569
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/env/set/index.ts)_
|
|
535
570
|
|
|
536
571
|
## `hereya executor start`
|
|
537
572
|
|
|
@@ -564,7 +599,7 @@ EXAMPLES
|
|
|
564
599
|
HEREYA_TOKEN=<token> HEREYA_CLOUD_URL=https://my-cloud.example.com hereya executor start -w my-workspace
|
|
565
600
|
```
|
|
566
601
|
|
|
567
|
-
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
602
|
+
_See code: [src/commands/executor/start/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/executor/start/index.ts)_
|
|
568
603
|
|
|
569
604
|
## `hereya flow add PACKAGE`
|
|
570
605
|
|
|
@@ -602,7 +637,7 @@ EXAMPLES
|
|
|
602
637
|
$ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
|
|
603
638
|
```
|
|
604
639
|
|
|
605
|
-
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
640
|
+
_See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/add/index.ts)_
|
|
606
641
|
|
|
607
642
|
## `hereya flow docker run IMAGE`
|
|
608
643
|
|
|
@@ -632,7 +667,7 @@ EXAMPLES
|
|
|
632
667
|
$ hereya flow docker run --pin myapp:latest -- --rm
|
|
633
668
|
```
|
|
634
669
|
|
|
635
|
-
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
670
|
+
_See code: [src/commands/flow/docker/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/docker/run/index.ts)_
|
|
636
671
|
|
|
637
672
|
## `hereya flow down`
|
|
638
673
|
|
|
@@ -666,7 +701,7 @@ EXAMPLES
|
|
|
666
701
|
$ hereya flow down --pin
|
|
667
702
|
```
|
|
668
703
|
|
|
669
|
-
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
704
|
+
_See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/down/index.ts)_
|
|
670
705
|
|
|
671
706
|
## `hereya flow env [NAME]`
|
|
672
707
|
|
|
@@ -700,7 +735,7 @@ EXAMPLES
|
|
|
700
735
|
$ hereya flow env -l
|
|
701
736
|
```
|
|
702
737
|
|
|
703
|
-
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
738
|
+
_See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/env/index.ts)_
|
|
704
739
|
|
|
705
740
|
## `hereya flow provid PACKAGE`
|
|
706
741
|
|
|
@@ -729,7 +764,7 @@ EXAMPLES
|
|
|
729
764
|
$ hereya flow provid hereya/postgres --pin
|
|
730
765
|
```
|
|
731
766
|
|
|
732
|
-
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
767
|
+
_See code: [src/commands/flow/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/provid/index.ts)_
|
|
733
768
|
|
|
734
769
|
## `hereya flow remove PACKAGE`
|
|
735
770
|
|
|
@@ -759,7 +794,7 @@ EXAMPLES
|
|
|
759
794
|
$ hereya flow remove cloudy/docker_postgres --profile staging
|
|
760
795
|
```
|
|
761
796
|
|
|
762
|
-
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
797
|
+
_See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/remove/index.ts)_
|
|
763
798
|
|
|
764
799
|
## `hereya flow run CMD`
|
|
765
800
|
|
|
@@ -788,7 +823,7 @@ EXAMPLES
|
|
|
788
823
|
$ hereya flow run --pin -- npm test
|
|
789
824
|
```
|
|
790
825
|
|
|
791
|
-
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
826
|
+
_See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/run/index.ts)_
|
|
792
827
|
|
|
793
828
|
## `hereya flow up`
|
|
794
829
|
|
|
@@ -822,7 +857,7 @@ EXAMPLES
|
|
|
822
857
|
$ hereya flow up --pin
|
|
823
858
|
```
|
|
824
859
|
|
|
825
|
-
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
860
|
+
_See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/flow/up/index.ts)_
|
|
826
861
|
|
|
827
862
|
## `hereya help [COMMAND]`
|
|
828
863
|
|
|
@@ -879,7 +914,7 @@ EXAMPLES
|
|
|
879
914
|
$ hereya import org/my-package -f state.tfstate -w my-workspace
|
|
880
915
|
```
|
|
881
916
|
|
|
882
|
-
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
917
|
+
_See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/import/index.ts)_
|
|
883
918
|
|
|
884
919
|
## `hereya init PROJECT`
|
|
885
920
|
|
|
@@ -887,14 +922,17 @@ Initialize hereya in a project directory.
|
|
|
887
922
|
|
|
888
923
|
```
|
|
889
924
|
USAGE
|
|
890
|
-
$ hereya init PROJECT -w <value> [--chdir <value>]
|
|
925
|
+
$ hereya init PROJECT -w <value> [--chdir <value>] [-p <value>...] [-t <value>]
|
|
891
926
|
|
|
892
927
|
ARGUMENTS
|
|
893
928
|
PROJECT project name
|
|
894
929
|
|
|
895
930
|
FLAGS
|
|
896
|
-
-
|
|
897
|
-
|
|
931
|
+
-p, --parameter=<value>... [default: ] template parameter, in the form of 'key=value'. Can be specified multiple
|
|
932
|
+
times.
|
|
933
|
+
-t, --template=<value> template package name (e.g. owner/repo)
|
|
934
|
+
-w, --workspace=<value> (required) workspace to set as default
|
|
935
|
+
--chdir=<value> directory to run command in
|
|
898
936
|
|
|
899
937
|
DESCRIPTION
|
|
900
938
|
Initialize hereya in a project directory.
|
|
@@ -903,9 +941,13 @@ EXAMPLES
|
|
|
903
941
|
$ hereya init myProject -w=defaultWorkspace
|
|
904
942
|
|
|
905
943
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
944
|
+
|
|
945
|
+
$ hereya init myProject -w=dev -t=acme/node-starter
|
|
946
|
+
|
|
947
|
+
$ hereya init myProject -w=dev -t=acme/node-starter -p region=us-east-1
|
|
906
948
|
```
|
|
907
949
|
|
|
908
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
950
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/init/index.ts)_
|
|
909
951
|
|
|
910
952
|
## `hereya login [URL]`
|
|
911
953
|
|
|
@@ -934,7 +976,7 @@ EXAMPLES
|
|
|
934
976
|
$ hereya login --token=your-token https://cloud.hereya.dev
|
|
935
977
|
```
|
|
936
978
|
|
|
937
|
-
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
979
|
+
_See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/login/index.ts)_
|
|
938
980
|
|
|
939
981
|
## `hereya logout`
|
|
940
982
|
|
|
@@ -951,7 +993,7 @@ EXAMPLES
|
|
|
951
993
|
$ hereya logout
|
|
952
994
|
```
|
|
953
995
|
|
|
954
|
-
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
996
|
+
_See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/logout/index.ts)_
|
|
955
997
|
|
|
956
998
|
## `hereya provid PACKAGE`
|
|
957
999
|
|
|
@@ -979,7 +1021,7 @@ EXAMPLES
|
|
|
979
1021
|
$ hereya provid hereya/postgres --workspace staging
|
|
980
1022
|
```
|
|
981
1023
|
|
|
982
|
-
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1024
|
+
_See code: [src/commands/provid/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/provid/index.ts)_
|
|
983
1025
|
|
|
984
1026
|
## `hereya publish`
|
|
985
1027
|
|
|
@@ -1002,7 +1044,7 @@ EXAMPLES
|
|
|
1002
1044
|
$ hereya publish --chdir=/path/to/package
|
|
1003
1045
|
```
|
|
1004
1046
|
|
|
1005
|
-
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1047
|
+
_See code: [src/commands/publish/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/publish/index.ts)_
|
|
1006
1048
|
|
|
1007
1049
|
## `hereya remove PACKAGE`
|
|
1008
1050
|
|
|
@@ -1030,7 +1072,7 @@ EXAMPLES
|
|
|
1030
1072
|
$ hereya remove cloudy/docker_postgres
|
|
1031
1073
|
```
|
|
1032
1074
|
|
|
1033
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1075
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/remove/index.ts)_
|
|
1034
1076
|
|
|
1035
1077
|
## `hereya run CMD`
|
|
1036
1078
|
|
|
@@ -1056,7 +1098,7 @@ EXAMPLES
|
|
|
1056
1098
|
$ hereya run -w uat -- node index.js
|
|
1057
1099
|
```
|
|
1058
1100
|
|
|
1059
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1101
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/run/index.ts)_
|
|
1060
1102
|
|
|
1061
1103
|
## `hereya search QUERY`
|
|
1062
1104
|
|
|
@@ -1087,7 +1129,7 @@ EXAMPLES
|
|
|
1087
1129
|
$ hereya search database --json
|
|
1088
1130
|
```
|
|
1089
1131
|
|
|
1090
|
-
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1132
|
+
_See code: [src/commands/search/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/search/index.ts)_
|
|
1091
1133
|
|
|
1092
1134
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
1093
1135
|
|
|
@@ -1112,7 +1154,7 @@ EXAMPLES
|
|
|
1112
1154
|
$ hereya unbootstrap local
|
|
1113
1155
|
```
|
|
1114
1156
|
|
|
1115
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1157
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/unbootstrap/index.ts)_
|
|
1116
1158
|
|
|
1117
1159
|
## `hereya undeploy`
|
|
1118
1160
|
|
|
@@ -1137,7 +1179,31 @@ EXAMPLES
|
|
|
1137
1179
|
$ hereya undeploy
|
|
1138
1180
|
```
|
|
1139
1181
|
|
|
1140
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1182
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/undeploy/index.ts)_
|
|
1183
|
+
|
|
1184
|
+
## `hereya uninit PROJECT`
|
|
1185
|
+
|
|
1186
|
+
Destroy template infrastructure and uninitialize a project.
|
|
1187
|
+
|
|
1188
|
+
```
|
|
1189
|
+
USAGE
|
|
1190
|
+
$ hereya uninit PROJECT -w <value> [--chdir <value>]
|
|
1191
|
+
|
|
1192
|
+
ARGUMENTS
|
|
1193
|
+
PROJECT project name
|
|
1194
|
+
|
|
1195
|
+
FLAGS
|
|
1196
|
+
-w, --workspace=<value> (required) workspace used during init
|
|
1197
|
+
--chdir=<value> directory to run command in
|
|
1198
|
+
|
|
1199
|
+
DESCRIPTION
|
|
1200
|
+
Destroy template infrastructure and uninitialize a project.
|
|
1201
|
+
|
|
1202
|
+
EXAMPLES
|
|
1203
|
+
$ hereya uninit myProject -w dev
|
|
1204
|
+
```
|
|
1205
|
+
|
|
1206
|
+
_See code: [src/commands/uninit/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/uninit/index.ts)_
|
|
1141
1207
|
|
|
1142
1208
|
## `hereya up`
|
|
1143
1209
|
|
|
@@ -1164,7 +1230,7 @@ EXAMPLES
|
|
|
1164
1230
|
$ hereya up
|
|
1165
1231
|
```
|
|
1166
1232
|
|
|
1167
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1233
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/up/index.ts)_
|
|
1168
1234
|
|
|
1169
1235
|
## `hereya workspace create NAME`
|
|
1170
1236
|
|
|
@@ -1189,7 +1255,7 @@ EXAMPLES
|
|
|
1189
1255
|
$ hereya workspace create dev
|
|
1190
1256
|
```
|
|
1191
1257
|
|
|
1192
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1258
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/create/index.ts)_
|
|
1193
1259
|
|
|
1194
1260
|
## `hereya workspace delete NAME`
|
|
1195
1261
|
|
|
@@ -1209,7 +1275,7 @@ EXAMPLES
|
|
|
1209
1275
|
$ hereya workspace delete dev
|
|
1210
1276
|
```
|
|
1211
1277
|
|
|
1212
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1278
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/delete/index.ts)_
|
|
1213
1279
|
|
|
1214
1280
|
## `hereya workspace env [NAME]`
|
|
1215
1281
|
|
|
@@ -1235,7 +1301,7 @@ EXAMPLES
|
|
|
1235
1301
|
$ hereya workspace env myEnv -w dev
|
|
1236
1302
|
```
|
|
1237
1303
|
|
|
1238
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1304
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/env/index.ts)_
|
|
1239
1305
|
|
|
1240
1306
|
## `hereya workspace env set`
|
|
1241
1307
|
|
|
@@ -1259,7 +1325,7 @@ EXAMPLES
|
|
|
1259
1325
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
1260
1326
|
```
|
|
1261
1327
|
|
|
1262
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1328
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/env/set/index.ts)_
|
|
1263
1329
|
|
|
1264
1330
|
## `hereya workspace env unset`
|
|
1265
1331
|
|
|
@@ -1280,7 +1346,7 @@ EXAMPLES
|
|
|
1280
1346
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
1281
1347
|
```
|
|
1282
1348
|
|
|
1283
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1349
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/env/unset/index.ts)_
|
|
1284
1350
|
|
|
1285
1351
|
## `hereya workspace executor install`
|
|
1286
1352
|
|
|
@@ -1299,7 +1365,7 @@ DESCRIPTION
|
|
|
1299
1365
|
Install a remote executor into a workspace
|
|
1300
1366
|
```
|
|
1301
1367
|
|
|
1302
|
-
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1368
|
+
_See code: [src/commands/workspace/executor/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/executor/install/index.ts)_
|
|
1303
1369
|
|
|
1304
1370
|
## `hereya workspace executor token`
|
|
1305
1371
|
|
|
@@ -1316,7 +1382,7 @@ DESCRIPTION
|
|
|
1316
1382
|
Generate a workspace-scoped executor token for the remote executor
|
|
1317
1383
|
```
|
|
1318
1384
|
|
|
1319
|
-
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1385
|
+
_See code: [src/commands/workspace/executor/token/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/executor/token/index.ts)_
|
|
1320
1386
|
|
|
1321
1387
|
## `hereya workspace executor uninstall`
|
|
1322
1388
|
|
|
@@ -1334,7 +1400,7 @@ DESCRIPTION
|
|
|
1334
1400
|
Uninstall the remote executor from a workspace
|
|
1335
1401
|
```
|
|
1336
1402
|
|
|
1337
|
-
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1403
|
+
_See code: [src/commands/workspace/executor/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/executor/uninstall/index.ts)_
|
|
1338
1404
|
|
|
1339
1405
|
## `hereya workspace install PACKAGE`
|
|
1340
1406
|
|
|
@@ -1361,7 +1427,7 @@ EXAMPLES
|
|
|
1361
1427
|
$ hereya workspace install hereya/aws-cognito
|
|
1362
1428
|
```
|
|
1363
1429
|
|
|
1364
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1430
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/install/index.ts)_
|
|
1365
1431
|
|
|
1366
1432
|
## `hereya workspace list`
|
|
1367
1433
|
|
|
@@ -1385,7 +1451,7 @@ EXAMPLES
|
|
|
1385
1451
|
$ hereya workspace list --org personal
|
|
1386
1452
|
```
|
|
1387
1453
|
|
|
1388
|
-
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1454
|
+
_See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/list/index.ts)_
|
|
1389
1455
|
|
|
1390
1456
|
## `hereya workspace set-profile PROFILE`
|
|
1391
1457
|
|
|
@@ -1409,7 +1475,7 @@ EXAMPLES
|
|
|
1409
1475
|
$ hereya workspace set-profile prod-profile -w production
|
|
1410
1476
|
```
|
|
1411
1477
|
|
|
1412
|
-
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1478
|
+
_See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/set-profile/index.ts)_
|
|
1413
1479
|
|
|
1414
1480
|
## `hereya workspace uninstall PACKAGE`
|
|
1415
1481
|
|
|
@@ -1436,5 +1502,5 @@ EXAMPLES
|
|
|
1436
1502
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
1437
1503
|
```
|
|
1438
1504
|
|
|
1439
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.
|
|
1505
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.73.1/src/commands/workspace/uninstall/index.ts)_
|
|
1440
1506
|
<!-- commandsstop -->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Config } from '../../lib/config/common.js';
|
|
2
|
-
import { AddPackageToWorkspaceInput, AddPackageToWorkspaceOutput, Backend, CreateWorkspaceInput, CreateWorkspaceOutput, DeleteStateInput, DeleteStateOutput, DeleteWorkspaceInput, DeleteWorkspaceOutput, ExportBackendOutput, GetPackageOutput, GetProvisioningIdInput, GetProvisioningIdOutput, GetStateInput, GetStateOutput, GetWorkspaceEnvInput, GetWorkspaceEnvOutput, GetWorkspaceOutput, ImportBackendInput, ImportBackendOutput, InitProjectInput, InitProjectOutput, ListPackageVersionsOutput, ListWorkspacesInput, PublishPackageInput, PublishPackageOutput, RemovePackageFromWorkspaceInput, RemovePackageFromWorkspaceOutput, SearchPackagesInput, SearchPackagesOutput, SetEnvVarInput, SetEnvVarOutput, UnsetEnvVarInput, UnsetEnvVarOutput, UpdateWorkspaceInput, UpdateWorkspaceOutput } from '../common.js';
|
|
2
|
+
import { AddPackageToWorkspaceInput, AddPackageToWorkspaceOutput, Backend, CreateWorkspaceInput, CreateWorkspaceOutput, DeleteStateInput, DeleteStateOutput, DeleteWorkspaceInput, DeleteWorkspaceOutput, ExportBackendOutput, GetPackageOutput, GetProjectMetadataInput, GetProjectMetadataOutput, GetProvisioningIdInput, GetProvisioningIdOutput, GetStateInput, GetStateOutput, GetWorkspaceEnvInput, GetWorkspaceEnvOutput, GetWorkspaceOutput, ImportBackendInput, ImportBackendOutput, InitProjectInput, InitProjectOutput, ListPackageVersionsOutput, ListWorkspacesInput, PublishPackageInput, PublishPackageOutput, RemovePackageFromWorkspaceInput, RemovePackageFromWorkspaceOutput, SaveProjectMetadataInput, SaveProjectMetadataOutput, SearchPackagesInput, SearchPackagesOutput, SetEnvVarInput, SetEnvVarOutput, UnsetEnvVarInput, UnsetEnvVarOutput, UpdateWorkspaceInput, UpdateWorkspaceOutput } from '../common.js';
|
|
3
3
|
interface CloudBackendConfig {
|
|
4
4
|
accessToken: string;
|
|
5
5
|
clientId: string;
|
|
@@ -44,6 +44,7 @@ export declare class CloudBackend implements Backend {
|
|
|
44
44
|
}>;
|
|
45
45
|
getPackageByVersion(name: string, version: string): Promise<GetPackageOutput>;
|
|
46
46
|
getPackageLatest(name: string): Promise<GetPackageOutput>;
|
|
47
|
+
getProjectMetadata(input: GetProjectMetadataInput): Promise<GetProjectMetadataOutput>;
|
|
47
48
|
getProvisioningId(input: GetProvisioningIdInput): Promise<GetProvisioningIdOutput>;
|
|
48
49
|
getState(input: GetStateInput): Promise<GetStateOutput>;
|
|
49
50
|
getWorkspace(name: string): Promise<GetWorkspaceOutput>;
|
|
@@ -77,6 +78,7 @@ export declare class CloudBackend implements Backend {
|
|
|
77
78
|
} | {
|
|
78
79
|
success: true;
|
|
79
80
|
}>;
|
|
81
|
+
saveProjectMetadata(input: SaveProjectMetadataInput): Promise<SaveProjectMetadataOutput>;
|
|
80
82
|
saveState(config: Config, workspace?: string): Promise<void>;
|
|
81
83
|
searchPackages(input: SearchPackagesInput): Promise<SearchPackagesOutput>;
|
|
82
84
|
setEnvVar(input: SetEnvVarInput): Promise<SetEnvVarOutput>;
|
|
@@ -230,6 +230,30 @@ export class CloudBackend {
|
|
|
230
230
|
success: true,
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
|
+
async getProjectMetadata(input) {
|
|
234
|
+
const response = await fetch(`${this.config.url}/api/projects/${encodeURIComponent(input.project)}/metadata`, {
|
|
235
|
+
headers: {
|
|
236
|
+
'Authorization': `Bearer ${this.config.accessToken}`,
|
|
237
|
+
},
|
|
238
|
+
method: 'GET',
|
|
239
|
+
});
|
|
240
|
+
if (!response.ok) {
|
|
241
|
+
return {
|
|
242
|
+
found: false,
|
|
243
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
const result = await this.safeResponseJson(response);
|
|
247
|
+
if (!result.metadata) {
|
|
248
|
+
return {
|
|
249
|
+
found: false,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
found: true,
|
|
254
|
+
metadata: result.metadata,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
233
257
|
async getProvisioningId(input) {
|
|
234
258
|
const formData = new FormData();
|
|
235
259
|
formData.append('packageCanonicalName', input.packageCanonicalName);
|
|
@@ -598,6 +622,26 @@ export class CloudBackend {
|
|
|
598
622
|
}
|
|
599
623
|
return { success: true };
|
|
600
624
|
}
|
|
625
|
+
async saveProjectMetadata(input) {
|
|
626
|
+
const formData = new FormData();
|
|
627
|
+
formData.append('metadata', JSON.stringify(input.metadata));
|
|
628
|
+
const response = await fetch(`${this.config.url}/api/projects/${encodeURIComponent(input.project)}/metadata`, {
|
|
629
|
+
body: formData,
|
|
630
|
+
headers: {
|
|
631
|
+
'Authorization': `Bearer ${this.config.accessToken}`,
|
|
632
|
+
},
|
|
633
|
+
method: 'POST',
|
|
634
|
+
});
|
|
635
|
+
if (!response.ok) {
|
|
636
|
+
return {
|
|
637
|
+
reason: JSON.stringify(await this.safeResponseJson(response)),
|
|
638
|
+
success: false,
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
return {
|
|
642
|
+
success: true,
|
|
643
|
+
};
|
|
644
|
+
}
|
|
601
645
|
async saveState(config, workspace) {
|
|
602
646
|
const formData = new FormData();
|
|
603
647
|
if (workspace) {
|