hereya-cli 0.6.2 → 0.6.3
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
|
@@ -20,7 +20,7 @@ $ npm install -g hereya-cli
|
|
|
20
20
|
$ hereya COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ hereya (--version)
|
|
23
|
-
hereya-cli/0.6.
|
|
23
|
+
hereya-cli/0.6.3 linux-x64 node-v20.14.0
|
|
24
24
|
$ hereya --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hereya COMMAND
|
|
@@ -43,7 +43,7 @@ USAGE
|
|
|
43
43
|
* [`hereya up`](#hereya-up)
|
|
44
44
|
* [`hereya workspace create NAME`](#hereya-workspace-create-name)
|
|
45
45
|
* [`hereya workspace delete NAME`](#hereya-workspace-delete-name)
|
|
46
|
-
* [`hereya workspace env`](#hereya-workspace-env)
|
|
46
|
+
* [`hereya workspace env [NAME]`](#hereya-workspace-env-name)
|
|
47
47
|
* [`hereya workspace install PACKAGE`](#hereya-workspace-install-package)
|
|
48
48
|
* [`hereya workspace uninstall PACKAGE`](#hereya-workspace-uninstall-package)
|
|
49
49
|
|
|
@@ -70,7 +70,7 @@ EXAMPLES
|
|
|
70
70
|
$ hereya add cloudy/docker_postgres
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
73
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/add/index.ts)_
|
|
74
74
|
|
|
75
75
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
76
76
|
|
|
@@ -95,7 +95,7 @@ EXAMPLES
|
|
|
95
95
|
$ hereya bootstrap local
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
98
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/bootstrap/index.ts)_
|
|
99
99
|
|
|
100
100
|
## `hereya deploy`
|
|
101
101
|
|
|
@@ -116,7 +116,7 @@ EXAMPLES
|
|
|
116
116
|
$ hereya deploy
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
119
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/deploy/index.ts)_
|
|
120
120
|
|
|
121
121
|
## `hereya down`
|
|
122
122
|
|
|
@@ -138,7 +138,7 @@ EXAMPLES
|
|
|
138
138
|
$ hereya down
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
141
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/down/index.ts)_
|
|
142
142
|
|
|
143
143
|
## `hereya env`
|
|
144
144
|
|
|
@@ -161,7 +161,7 @@ EXAMPLES
|
|
|
161
161
|
$ hereya env -w dev
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
164
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/env/index.ts)_
|
|
165
165
|
|
|
166
166
|
## `hereya help [COMMAND]`
|
|
167
167
|
|
|
@@ -207,7 +207,7 @@ EXAMPLES
|
|
|
207
207
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
210
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/init/index.ts)_
|
|
211
211
|
|
|
212
212
|
## `hereya remote exec [PKGPATH]`
|
|
213
213
|
|
|
@@ -231,7 +231,7 @@ EXAMPLES
|
|
|
231
231
|
$ hereya remote exec
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
_See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
234
|
+
_See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/remote/exec/index.ts)_
|
|
235
235
|
|
|
236
236
|
## `hereya remove PACKAGE`
|
|
237
237
|
|
|
@@ -254,7 +254,7 @@ EXAMPLES
|
|
|
254
254
|
$ hereya remove cloudy/docker_postgres
|
|
255
255
|
```
|
|
256
256
|
|
|
257
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
257
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/remove/index.ts)_
|
|
258
258
|
|
|
259
259
|
## `hereya run CMD`
|
|
260
260
|
|
|
@@ -280,7 +280,7 @@ EXAMPLES
|
|
|
280
280
|
$ hereya run -w uat -- node index.js
|
|
281
281
|
```
|
|
282
282
|
|
|
283
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
283
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/run/index.ts)_
|
|
284
284
|
|
|
285
285
|
## `hereya undeploy`
|
|
286
286
|
|
|
@@ -301,7 +301,7 @@ EXAMPLES
|
|
|
301
301
|
$ hereya undeploy
|
|
302
302
|
```
|
|
303
303
|
|
|
304
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
304
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/undeploy/index.ts)_
|
|
305
305
|
|
|
306
306
|
## `hereya up`
|
|
307
307
|
|
|
@@ -323,7 +323,7 @@ EXAMPLES
|
|
|
323
323
|
$ hereya up
|
|
324
324
|
```
|
|
325
325
|
|
|
326
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
326
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/up/index.ts)_
|
|
327
327
|
|
|
328
328
|
## `hereya workspace create NAME`
|
|
329
329
|
|
|
@@ -343,7 +343,7 @@ EXAMPLES
|
|
|
343
343
|
$ hereya workspace create dev
|
|
344
344
|
```
|
|
345
345
|
|
|
346
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
346
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/workspace/create/index.ts)_
|
|
347
347
|
|
|
348
348
|
## `hereya workspace delete NAME`
|
|
349
349
|
|
|
@@ -363,17 +363,21 @@ EXAMPLES
|
|
|
363
363
|
$ hereya workspace delete dev
|
|
364
364
|
```
|
|
365
365
|
|
|
366
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
366
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/workspace/delete/index.ts)_
|
|
367
367
|
|
|
368
|
-
## `hereya workspace env`
|
|
368
|
+
## `hereya workspace env [NAME]`
|
|
369
369
|
|
|
370
370
|
Print workspace env vars.
|
|
371
371
|
|
|
372
372
|
```
|
|
373
373
|
USAGE
|
|
374
|
-
$ hereya workspace env -w <value>
|
|
374
|
+
$ hereya workspace env [NAME] -w <value> [-l]
|
|
375
|
+
|
|
376
|
+
ARGUMENTS
|
|
377
|
+
NAME name of the env to display
|
|
375
378
|
|
|
376
379
|
FLAGS
|
|
380
|
+
-l, --list list only the env vars without values
|
|
377
381
|
-w, --workspace=<value> (required) name of the workspace to print env vars for
|
|
378
382
|
|
|
379
383
|
DESCRIPTION
|
|
@@ -381,9 +385,11 @@ DESCRIPTION
|
|
|
381
385
|
|
|
382
386
|
EXAMPLES
|
|
383
387
|
$ hereya workspace env -w dev
|
|
388
|
+
|
|
389
|
+
$ hereya workspace env myEnv -w dev
|
|
384
390
|
```
|
|
385
391
|
|
|
386
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
392
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/workspace/env/index.ts)_
|
|
387
393
|
|
|
388
394
|
## `hereya workspace install PACKAGE`
|
|
389
395
|
|
|
@@ -409,7 +415,7 @@ EXAMPLES
|
|
|
409
415
|
$ hereya workspace install hereya/aws-cognito
|
|
410
416
|
```
|
|
411
417
|
|
|
412
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
418
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/workspace/install/index.ts)_
|
|
413
419
|
|
|
414
420
|
## `hereya workspace uninstall PACKAGE`
|
|
415
421
|
|
|
@@ -435,5 +441,5 @@ EXAMPLES
|
|
|
435
441
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
436
442
|
```
|
|
437
443
|
|
|
438
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.
|
|
444
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.3/src/commands/workspace/uninstall/index.ts)_
|
|
439
445
|
<!-- commandsstop -->
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { Command } from '@oclif/core';
|
|
2
2
|
export default class WorkspaceEnv extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
name: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
|
|
5
|
+
};
|
|
3
6
|
static description: string;
|
|
4
7
|
static examples: string[];
|
|
5
8
|
static flags: {
|
|
9
|
+
list: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
|
|
6
10
|
workspace: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
|
|
7
11
|
};
|
|
8
12
|
run(): Promise<void>;
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { Command, Flags } from '@oclif/core';
|
|
1
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
2
2
|
import { getBackend } from '../../../backend/index.js';
|
|
3
3
|
import { logEnv } from '../../../lib/env-utils.js';
|
|
4
4
|
export default class WorkspaceEnv extends Command {
|
|
5
|
+
static args = {
|
|
6
|
+
name: Args.string({ description: 'name of the env to display', required: false }),
|
|
7
|
+
};
|
|
5
8
|
static description = 'Print workspace env vars.';
|
|
6
9
|
static examples = [
|
|
7
10
|
'<%= config.bin %> <%= command.id %> -w dev',
|
|
11
|
+
'<%= config.bin %> <%= command.id %> myEnv -w dev',
|
|
8
12
|
];
|
|
9
13
|
static flags = {
|
|
14
|
+
list: Flags.boolean({
|
|
15
|
+
char: 'l',
|
|
16
|
+
description: 'list only the env vars without values',
|
|
17
|
+
required: false,
|
|
18
|
+
}),
|
|
10
19
|
workspace: Flags.string({
|
|
11
20
|
char: 'w',
|
|
12
21
|
description: 'name of the workspace to print env vars for',
|
|
@@ -14,7 +23,7 @@ export default class WorkspaceEnv extends Command {
|
|
|
14
23
|
}),
|
|
15
24
|
};
|
|
16
25
|
async run() {
|
|
17
|
-
const { flags } = await this.parse(WorkspaceEnv);
|
|
26
|
+
const { args, flags } = await this.parse(WorkspaceEnv);
|
|
18
27
|
const backend = await getBackend();
|
|
19
28
|
const getWorkspaceEnvOutput = await backend.getWorkspaceEnv({
|
|
20
29
|
workspace: flags.workspace,
|
|
@@ -23,6 +32,17 @@ export default class WorkspaceEnv extends Command {
|
|
|
23
32
|
this.error(getWorkspaceEnvOutput.reason);
|
|
24
33
|
}
|
|
25
34
|
const { env } = getWorkspaceEnvOutput;
|
|
35
|
+
if (args.name) {
|
|
36
|
+
if (env[args.name] === undefined) {
|
|
37
|
+
this.error(`Env var ${args.name} not found`);
|
|
38
|
+
}
|
|
39
|
+
this.log(env[args.name]);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (flags.list) {
|
|
43
|
+
this.log(Object.keys(env).join('\n'));
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
26
46
|
logEnv(env);
|
|
27
47
|
}
|
|
28
48
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -563,12 +563,27 @@
|
|
|
563
563
|
},
|
|
564
564
|
"workspace:env": {
|
|
565
565
|
"aliases": [],
|
|
566
|
-
"args": {
|
|
566
|
+
"args": {
|
|
567
|
+
"name": {
|
|
568
|
+
"description": "name of the env to display",
|
|
569
|
+
"name": "name",
|
|
570
|
+
"required": false
|
|
571
|
+
}
|
|
572
|
+
},
|
|
567
573
|
"description": "Print workspace env vars.",
|
|
568
574
|
"examples": [
|
|
569
|
-
"<%= config.bin %> <%= command.id %> -w dev"
|
|
575
|
+
"<%= config.bin %> <%= command.id %> -w dev",
|
|
576
|
+
"<%= config.bin %> <%= command.id %> myEnv -w dev"
|
|
570
577
|
],
|
|
571
578
|
"flags": {
|
|
579
|
+
"list": {
|
|
580
|
+
"char": "l",
|
|
581
|
+
"description": "list only the env vars without values",
|
|
582
|
+
"name": "list",
|
|
583
|
+
"required": false,
|
|
584
|
+
"allowNo": false,
|
|
585
|
+
"type": "boolean"
|
|
586
|
+
},
|
|
572
587
|
"workspace": {
|
|
573
588
|
"char": "w",
|
|
574
589
|
"description": "name of the workspace to print env vars for",
|
|
@@ -713,5 +728,5 @@
|
|
|
713
728
|
]
|
|
714
729
|
}
|
|
715
730
|
},
|
|
716
|
-
"version": "0.6.
|
|
731
|
+
"version": "0.6.3"
|
|
717
732
|
}
|