hereya-cli 0.17.0 → 0.17.2
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 +25 -23
- package/dist/commands/env/set/index.js +12 -10
- package/oclif.manifest.json +43 -42
- package/package.json +1 -1
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.17.
|
|
23
|
+
hereya-cli/0.17.2 linux-x64 node-v22.13.1
|
|
24
24
|
$ hereya --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hereya COMMAND
|
|
@@ -74,7 +74,7 @@ EXAMPLES
|
|
|
74
74
|
$ hereya add cloudy/docker_postgres
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
77
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/add/index.ts)_
|
|
78
78
|
|
|
79
79
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
80
80
|
|
|
@@ -99,7 +99,7 @@ EXAMPLES
|
|
|
99
99
|
$ hereya bootstrap local
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
102
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/bootstrap/index.ts)_
|
|
103
103
|
|
|
104
104
|
## `hereya deploy`
|
|
105
105
|
|
|
@@ -121,7 +121,7 @@ EXAMPLES
|
|
|
121
121
|
$ hereya deploy
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
124
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/deploy/index.ts)_
|
|
125
125
|
|
|
126
126
|
## `hereya down`
|
|
127
127
|
|
|
@@ -144,7 +144,7 @@ EXAMPLES
|
|
|
144
144
|
$ hereya down
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
147
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/down/index.ts)_
|
|
148
148
|
|
|
149
149
|
## `hereya env [NAME]`
|
|
150
150
|
|
|
@@ -175,11 +175,11 @@ EXAMPLES
|
|
|
175
175
|
$ hereya env -w dev -l
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
178
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/env/index.ts)_
|
|
179
179
|
|
|
180
180
|
## `hereya env set [NAME]`
|
|
181
181
|
|
|
182
|
-
Set an environment variable for the
|
|
182
|
+
Set an user-defined environment variable for the project
|
|
183
183
|
|
|
184
184
|
```
|
|
185
185
|
USAGE
|
|
@@ -194,13 +194,15 @@ FLAGS
|
|
|
194
194
|
--chdir=<value> project root directory
|
|
195
195
|
|
|
196
196
|
DESCRIPTION
|
|
197
|
-
Set an environment variable for the
|
|
197
|
+
Set an user-defined environment variable for the project
|
|
198
198
|
|
|
199
199
|
EXAMPLES
|
|
200
|
-
$ hereya env set FOO bar
|
|
200
|
+
$ hereya env set FOO -v bar
|
|
201
|
+
|
|
202
|
+
$ hereya env set FOO -v bar -w dev
|
|
201
203
|
```
|
|
202
204
|
|
|
203
|
-
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
205
|
+
_See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/env/set/index.ts)_
|
|
204
206
|
|
|
205
207
|
## `hereya help [COMMAND]`
|
|
206
208
|
|
|
@@ -246,7 +248,7 @@ EXAMPLES
|
|
|
246
248
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
247
249
|
```
|
|
248
250
|
|
|
249
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
251
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/init/index.ts)_
|
|
250
252
|
|
|
251
253
|
## `hereya remove PACKAGE`
|
|
252
254
|
|
|
@@ -270,7 +272,7 @@ EXAMPLES
|
|
|
270
272
|
$ hereya remove cloudy/docker_postgres
|
|
271
273
|
```
|
|
272
274
|
|
|
273
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
275
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/remove/index.ts)_
|
|
274
276
|
|
|
275
277
|
## `hereya run CMD`
|
|
276
278
|
|
|
@@ -296,7 +298,7 @@ EXAMPLES
|
|
|
296
298
|
$ hereya run -w uat -- node index.js
|
|
297
299
|
```
|
|
298
300
|
|
|
299
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
301
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/run/index.ts)_
|
|
300
302
|
|
|
301
303
|
## `hereya unbootstrap INFRASTRUCTURETYPE`
|
|
302
304
|
|
|
@@ -321,7 +323,7 @@ EXAMPLES
|
|
|
321
323
|
$ hereya unbootstrap local
|
|
322
324
|
```
|
|
323
325
|
|
|
324
|
-
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
326
|
+
_See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/unbootstrap/index.ts)_
|
|
325
327
|
|
|
326
328
|
## `hereya undeploy`
|
|
327
329
|
|
|
@@ -343,7 +345,7 @@ EXAMPLES
|
|
|
343
345
|
$ hereya undeploy
|
|
344
346
|
```
|
|
345
347
|
|
|
346
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
348
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/undeploy/index.ts)_
|
|
347
349
|
|
|
348
350
|
## `hereya up`
|
|
349
351
|
|
|
@@ -366,7 +368,7 @@ EXAMPLES
|
|
|
366
368
|
$ hereya up
|
|
367
369
|
```
|
|
368
370
|
|
|
369
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
371
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/up/index.ts)_
|
|
370
372
|
|
|
371
373
|
## `hereya workspace create NAME`
|
|
372
374
|
|
|
@@ -386,7 +388,7 @@ EXAMPLES
|
|
|
386
388
|
$ hereya workspace create dev
|
|
387
389
|
```
|
|
388
390
|
|
|
389
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
391
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/workspace/create/index.ts)_
|
|
390
392
|
|
|
391
393
|
## `hereya workspace delete NAME`
|
|
392
394
|
|
|
@@ -406,7 +408,7 @@ EXAMPLES
|
|
|
406
408
|
$ hereya workspace delete dev
|
|
407
409
|
```
|
|
408
410
|
|
|
409
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
411
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/workspace/delete/index.ts)_
|
|
410
412
|
|
|
411
413
|
## `hereya workspace env [NAME]`
|
|
412
414
|
|
|
@@ -432,7 +434,7 @@ EXAMPLES
|
|
|
432
434
|
$ hereya workspace env myEnv -w dev
|
|
433
435
|
```
|
|
434
436
|
|
|
435
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
437
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/workspace/env/index.ts)_
|
|
436
438
|
|
|
437
439
|
## `hereya workspace env set`
|
|
438
440
|
|
|
@@ -456,7 +458,7 @@ EXAMPLES
|
|
|
456
458
|
$ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
|
|
457
459
|
```
|
|
458
460
|
|
|
459
|
-
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
461
|
+
_See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/workspace/env/set/index.ts)_
|
|
460
462
|
|
|
461
463
|
## `hereya workspace env unset`
|
|
462
464
|
|
|
@@ -477,7 +479,7 @@ EXAMPLES
|
|
|
477
479
|
$ hereya workspace env unset -w my-workspace -n myVar
|
|
478
480
|
```
|
|
479
481
|
|
|
480
|
-
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
482
|
+
_See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/workspace/env/unset/index.ts)_
|
|
481
483
|
|
|
482
484
|
## `hereya workspace install PACKAGE`
|
|
483
485
|
|
|
@@ -504,7 +506,7 @@ EXAMPLES
|
|
|
504
506
|
$ hereya workspace install hereya/aws-cognito
|
|
505
507
|
```
|
|
506
508
|
|
|
507
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
509
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/workspace/install/index.ts)_
|
|
508
510
|
|
|
509
511
|
## `hereya workspace uninstall PACKAGE`
|
|
510
512
|
|
|
@@ -531,5 +533,5 @@ EXAMPLES
|
|
|
531
533
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
532
534
|
```
|
|
533
535
|
|
|
534
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.
|
|
536
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.2/src/commands/workspace/uninstall/index.ts)_
|
|
535
537
|
<!-- commandsstop -->
|
|
@@ -7,8 +7,11 @@ export default class EnvSet extends Command {
|
|
|
7
7
|
static args = {
|
|
8
8
|
name: Args.string({ description: 'name of the environment variable to set' }),
|
|
9
9
|
};
|
|
10
|
-
static description = 'Set an environment variable for the
|
|
11
|
-
static examples = [
|
|
10
|
+
static description = 'Set an user-defined environment variable for the project';
|
|
11
|
+
static examples = [
|
|
12
|
+
'<%= config.bin %> <%= command.id %> FOO -v bar',
|
|
13
|
+
'<%= config.bin %> <%= command.id %> FOO -v bar -w dev',
|
|
14
|
+
];
|
|
12
15
|
static flags = {
|
|
13
16
|
chdir: Flags.string({
|
|
14
17
|
description: 'project root directory',
|
|
@@ -38,15 +41,14 @@ export default class EnvSet extends Command {
|
|
|
38
41
|
return;
|
|
39
42
|
}
|
|
40
43
|
const rootDir = projectRootDir ?? process.cwd();
|
|
41
|
-
const candidates = flags.workspace
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
path.join(rootDir, 'hereyastaticenv', `env.yml`)
|
|
47
|
-
];
|
|
44
|
+
const candidates = flags.workspace
|
|
45
|
+
? [
|
|
46
|
+
path.join(rootDir, 'hereyastaticenv', `env.${flags.workspace}.yaml`),
|
|
47
|
+
path.join(rootDir, 'hereyastaticenv', `env.${flags.workspace}.yml`),
|
|
48
|
+
]
|
|
49
|
+
: [path.join(rootDir, 'hereyastaticenv', `env.yaml`), path.join(rootDir, 'hereyastaticenv', `env.yml`)];
|
|
48
50
|
const envFile = await getAnyPath(...candidates);
|
|
49
|
-
const { data: env
|
|
51
|
+
const { data: env } = await load(envFile);
|
|
50
52
|
env[args.name] = flags.value;
|
|
51
53
|
await save(env, envFile);
|
|
52
54
|
this.log(`Environment variable ${args.name} set to ${flags.value} in ${envFile}`);
|
package/oclif.manifest.json
CHANGED
|
@@ -54,45 +54,6 @@
|
|
|
54
54
|
"index.js"
|
|
55
55
|
]
|
|
56
56
|
},
|
|
57
|
-
"bootstrap": {
|
|
58
|
-
"aliases": [],
|
|
59
|
-
"args": {
|
|
60
|
-
"infrastructureType": {
|
|
61
|
-
"description": "infrastructure to bootstrap. Options are local, aws",
|
|
62
|
-
"name": "infrastructureType",
|
|
63
|
-
"required": true
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"description": "Install necessary resources for hereya operations in an infrastructure.",
|
|
67
|
-
"examples": [
|
|
68
|
-
"<%= config.bin %> <%= command.id %> aws",
|
|
69
|
-
"<%= config.bin %> <%= command.id %> local"
|
|
70
|
-
],
|
|
71
|
-
"flags": {
|
|
72
|
-
"force": {
|
|
73
|
-
"char": "f",
|
|
74
|
-
"description": "redeploy hereya resources if already deployed",
|
|
75
|
-
"name": "force",
|
|
76
|
-
"allowNo": false,
|
|
77
|
-
"type": "boolean"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"hasDynamicHelp": false,
|
|
81
|
-
"hiddenAliases": [],
|
|
82
|
-
"id": "bootstrap",
|
|
83
|
-
"pluginAlias": "hereya-cli",
|
|
84
|
-
"pluginName": "hereya-cli",
|
|
85
|
-
"pluginType": "core",
|
|
86
|
-
"strict": true,
|
|
87
|
-
"enableJsonFlag": false,
|
|
88
|
-
"isESM": true,
|
|
89
|
-
"relativePath": [
|
|
90
|
-
"dist",
|
|
91
|
-
"commands",
|
|
92
|
-
"bootstrap",
|
|
93
|
-
"index.js"
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
57
|
"deploy": {
|
|
97
58
|
"aliases": [],
|
|
98
59
|
"args": {},
|
|
@@ -141,6 +102,45 @@
|
|
|
141
102
|
"index.js"
|
|
142
103
|
]
|
|
143
104
|
},
|
|
105
|
+
"bootstrap": {
|
|
106
|
+
"aliases": [],
|
|
107
|
+
"args": {
|
|
108
|
+
"infrastructureType": {
|
|
109
|
+
"description": "infrastructure to bootstrap. Options are local, aws",
|
|
110
|
+
"name": "infrastructureType",
|
|
111
|
+
"required": true
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"description": "Install necessary resources for hereya operations in an infrastructure.",
|
|
115
|
+
"examples": [
|
|
116
|
+
"<%= config.bin %> <%= command.id %> aws",
|
|
117
|
+
"<%= config.bin %> <%= command.id %> local"
|
|
118
|
+
],
|
|
119
|
+
"flags": {
|
|
120
|
+
"force": {
|
|
121
|
+
"char": "f",
|
|
122
|
+
"description": "redeploy hereya resources if already deployed",
|
|
123
|
+
"name": "force",
|
|
124
|
+
"allowNo": false,
|
|
125
|
+
"type": "boolean"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"hasDynamicHelp": false,
|
|
129
|
+
"hiddenAliases": [],
|
|
130
|
+
"id": "bootstrap",
|
|
131
|
+
"pluginAlias": "hereya-cli",
|
|
132
|
+
"pluginName": "hereya-cli",
|
|
133
|
+
"pluginType": "core",
|
|
134
|
+
"strict": true,
|
|
135
|
+
"enableJsonFlag": false,
|
|
136
|
+
"isESM": true,
|
|
137
|
+
"relativePath": [
|
|
138
|
+
"dist",
|
|
139
|
+
"commands",
|
|
140
|
+
"bootstrap",
|
|
141
|
+
"index.js"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
144
|
"down": {
|
|
145
145
|
"aliases": [],
|
|
146
146
|
"args": {},
|
|
@@ -548,9 +548,10 @@
|
|
|
548
548
|
"name": "name"
|
|
549
549
|
}
|
|
550
550
|
},
|
|
551
|
-
"description": "Set an environment variable for the
|
|
551
|
+
"description": "Set an user-defined environment variable for the project",
|
|
552
552
|
"examples": [
|
|
553
|
-
"<%= config.bin %> <%= command.id %> FOO bar"
|
|
553
|
+
"<%= config.bin %> <%= command.id %> FOO -v bar",
|
|
554
|
+
"<%= config.bin %> <%= command.id %> FOO -v bar -w dev"
|
|
554
555
|
],
|
|
555
556
|
"flags": {
|
|
556
557
|
"chdir": {
|
|
@@ -953,5 +954,5 @@
|
|
|
953
954
|
]
|
|
954
955
|
}
|
|
955
956
|
},
|
|
956
|
-
"version": "0.17.
|
|
957
|
+
"version": "0.17.2"
|
|
957
958
|
}
|