hereya-cli 0.4.0 → 0.4.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 +17 -17
- package/dist/iac/terraform.js +12 -3
- package/dist/lib/package/index.js +3 -0
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
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.4.
|
|
23
|
+
hereya-cli/0.4.2 linux-x64 node-v20.13.1
|
|
24
24
|
$ hereya --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hereya COMMAND
|
|
@@ -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.4.
|
|
73
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/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.4.
|
|
98
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/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.4.
|
|
119
|
+
_See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/deploy/index.ts)_
|
|
120
120
|
|
|
121
121
|
## `hereya down`
|
|
122
122
|
|
|
@@ -137,7 +137,7 @@ EXAMPLES
|
|
|
137
137
|
$ hereya down
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
140
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/down/index.ts)_
|
|
141
141
|
|
|
142
142
|
## `hereya env`
|
|
143
143
|
|
|
@@ -160,7 +160,7 @@ EXAMPLES
|
|
|
160
160
|
$ hereya env -w dev
|
|
161
161
|
```
|
|
162
162
|
|
|
163
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
163
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/env/index.ts)_
|
|
164
164
|
|
|
165
165
|
## `hereya help [COMMAND]`
|
|
166
166
|
|
|
@@ -206,7 +206,7 @@ EXAMPLES
|
|
|
206
206
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
209
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/init/index.ts)_
|
|
210
210
|
|
|
211
211
|
## `hereya remote exec [PKGPATH]`
|
|
212
212
|
|
|
@@ -230,7 +230,7 @@ EXAMPLES
|
|
|
230
230
|
$ hereya remote exec
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
_See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
233
|
+
_See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/remote/exec/index.ts)_
|
|
234
234
|
|
|
235
235
|
## `hereya remove PACKAGE`
|
|
236
236
|
|
|
@@ -253,7 +253,7 @@ EXAMPLES
|
|
|
253
253
|
$ hereya remove cloudy/docker_postgres
|
|
254
254
|
```
|
|
255
255
|
|
|
256
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
256
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/remove/index.ts)_
|
|
257
257
|
|
|
258
258
|
## `hereya run CMD`
|
|
259
259
|
|
|
@@ -279,7 +279,7 @@ EXAMPLES
|
|
|
279
279
|
$ hereya run -w uat -- node index.js
|
|
280
280
|
```
|
|
281
281
|
|
|
282
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
282
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/run/index.ts)_
|
|
283
283
|
|
|
284
284
|
## `hereya undeploy`
|
|
285
285
|
|
|
@@ -300,7 +300,7 @@ EXAMPLES
|
|
|
300
300
|
$ hereya undeploy
|
|
301
301
|
```
|
|
302
302
|
|
|
303
|
-
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
303
|
+
_See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/undeploy/index.ts)_
|
|
304
304
|
|
|
305
305
|
## `hereya up`
|
|
306
306
|
|
|
@@ -321,7 +321,7 @@ EXAMPLES
|
|
|
321
321
|
$ hereya up
|
|
322
322
|
```
|
|
323
323
|
|
|
324
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
324
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/up/index.ts)_
|
|
325
325
|
|
|
326
326
|
## `hereya workspace create NAME`
|
|
327
327
|
|
|
@@ -341,7 +341,7 @@ EXAMPLES
|
|
|
341
341
|
$ hereya workspace create dev
|
|
342
342
|
```
|
|
343
343
|
|
|
344
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
344
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/workspace/create/index.ts)_
|
|
345
345
|
|
|
346
346
|
## `hereya workspace delete NAME`
|
|
347
347
|
|
|
@@ -361,7 +361,7 @@ EXAMPLES
|
|
|
361
361
|
$ hereya workspace delete dev
|
|
362
362
|
```
|
|
363
363
|
|
|
364
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
364
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/workspace/delete/index.ts)_
|
|
365
365
|
|
|
366
366
|
## `hereya workspace env`
|
|
367
367
|
|
|
@@ -381,7 +381,7 @@ EXAMPLES
|
|
|
381
381
|
$ hereya workspace env -w dev
|
|
382
382
|
```
|
|
383
383
|
|
|
384
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
384
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/workspace/env/index.ts)_
|
|
385
385
|
|
|
386
386
|
## `hereya workspace install PACKAGE`
|
|
387
387
|
|
|
@@ -407,7 +407,7 @@ EXAMPLES
|
|
|
407
407
|
$ hereya workspace install hereya/aws-cognito
|
|
408
408
|
```
|
|
409
409
|
|
|
410
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
410
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/workspace/install/index.ts)_
|
|
411
411
|
|
|
412
412
|
## `hereya workspace uninstall PACKAGE`
|
|
413
413
|
|
|
@@ -433,5 +433,5 @@ EXAMPLES
|
|
|
433
433
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
434
434
|
```
|
|
435
435
|
|
|
436
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.
|
|
436
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.4.2/src/commands/workspace/uninstall/index.ts)_
|
|
437
437
|
<!-- commandsstop -->
|
package/dist/iac/terraform.js
CHANGED
|
@@ -5,11 +5,17 @@ export class Terraform {
|
|
|
5
5
|
try {
|
|
6
6
|
runShell('terraform', ['init'], {
|
|
7
7
|
directory: input.pkgPath,
|
|
8
|
-
env:
|
|
8
|
+
env: {
|
|
9
|
+
...input.env,
|
|
10
|
+
...mapObject(input.parameters ?? {}, (key, value) => [`TF_VAR_${key}`, value])
|
|
11
|
+
}
|
|
9
12
|
});
|
|
10
13
|
runShell('terraform', ['apply', '-auto-approve'], {
|
|
11
14
|
directory: input.pkgPath,
|
|
12
|
-
env:
|
|
15
|
+
env: {
|
|
16
|
+
...input.env,
|
|
17
|
+
...mapObject(input.parameters ?? {}, (key, value) => [`TF_VAR_${key}`, value])
|
|
18
|
+
}
|
|
13
19
|
});
|
|
14
20
|
const env = await this.getEnv(input.pkgPath);
|
|
15
21
|
return {
|
|
@@ -33,7 +39,10 @@ export class Terraform {
|
|
|
33
39
|
try {
|
|
34
40
|
runShell('terraform', ['destroy', '-auto-approve'], {
|
|
35
41
|
directory: input.pkgPath,
|
|
36
|
-
env:
|
|
42
|
+
env: {
|
|
43
|
+
...input.env,
|
|
44
|
+
...mapObject(input.parameters ?? {}, (key, value) => [`TF_VAR_${key}`, value])
|
|
45
|
+
}
|
|
37
46
|
});
|
|
38
47
|
return {
|
|
39
48
|
env,
|
|
@@ -25,6 +25,9 @@ export async function resolvePackage(input) {
|
|
|
25
25
|
const metadataContent$ = metadataContentCandidates[0];
|
|
26
26
|
try {
|
|
27
27
|
const metadata = PackageMetadata.parse(yaml.parse(metadataContent$.content));
|
|
28
|
+
if (process.env.HEREYA_OVERRIDE_INFRA) {
|
|
29
|
+
metadata.infra = process.env.HEREYA_OVERRIDE_INFRA;
|
|
30
|
+
}
|
|
28
31
|
return {
|
|
29
32
|
canonicalName: getPackageCanonicalName(input.package),
|
|
30
33
|
found: true,
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hereya-cli",
|
|
3
3
|
"description": "Developer's Package Manager for Seamless Infrastructure Integration.",
|
|
4
|
-
"version": "0.4.
|
|
5
|
-
"author": "
|
|
4
|
+
"version": "0.4.2",
|
|
5
|
+
"author": "Hereya Developers",
|
|
6
6
|
"bin": {
|
|
7
7
|
"hereya": "./bin/run.js"
|
|
8
8
|
},
|