hereya-cli 0.3.0 → 0.3.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 +15 -15
- package/dist/infrastructure/aws.d.ts +1 -1
- package/dist/infrastructure/aws.js +11 -2
- package/oclif.manifest.json +1 -1
- 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.3.
|
|
23
|
+
hereya-cli/0.3.1 linux-x64 node-v20.13.1
|
|
24
24
|
$ hereya --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ hereya COMMAND
|
|
@@ -68,7 +68,7 @@ EXAMPLES
|
|
|
68
68
|
$ hereya add cloudy/docker_postgres
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
71
|
+
_See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/add/index.ts)_
|
|
72
72
|
|
|
73
73
|
## `hereya bootstrap INFRASTRUCTURETYPE`
|
|
74
74
|
|
|
@@ -93,7 +93,7 @@ EXAMPLES
|
|
|
93
93
|
$ hereya bootstrap local
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
96
|
+
_See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/bootstrap/index.ts)_
|
|
97
97
|
|
|
98
98
|
## `hereya down`
|
|
99
99
|
|
|
@@ -114,7 +114,7 @@ EXAMPLES
|
|
|
114
114
|
$ hereya down
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
-
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
117
|
+
_See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/down/index.ts)_
|
|
118
118
|
|
|
119
119
|
## `hereya env`
|
|
120
120
|
|
|
@@ -137,7 +137,7 @@ EXAMPLES
|
|
|
137
137
|
$ hereya env -w dev
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
-
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
140
|
+
_See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/env/index.ts)_
|
|
141
141
|
|
|
142
142
|
## `hereya help [COMMAND]`
|
|
143
143
|
|
|
@@ -183,7 +183,7 @@ EXAMPLES
|
|
|
183
183
|
$ hereya init myProject -w=defaultWorkspace --chdir=./myProject
|
|
184
184
|
```
|
|
185
185
|
|
|
186
|
-
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
186
|
+
_See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/init/index.ts)_
|
|
187
187
|
|
|
188
188
|
## `hereya remote exec [PKGPATH]`
|
|
189
189
|
|
|
@@ -206,7 +206,7 @@ EXAMPLES
|
|
|
206
206
|
$ hereya remote exec
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
_See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
209
|
+
_See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/remote/exec/index.ts)_
|
|
210
210
|
|
|
211
211
|
## `hereya remove PACKAGE`
|
|
212
212
|
|
|
@@ -229,7 +229,7 @@ EXAMPLES
|
|
|
229
229
|
$ hereya remove cloudy/docker_postgres
|
|
230
230
|
```
|
|
231
231
|
|
|
232
|
-
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
232
|
+
_See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/remove/index.ts)_
|
|
233
233
|
|
|
234
234
|
## `hereya run CMD`
|
|
235
235
|
|
|
@@ -255,7 +255,7 @@ EXAMPLES
|
|
|
255
255
|
$ hereya run -w uat -- node index.js
|
|
256
256
|
```
|
|
257
257
|
|
|
258
|
-
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
258
|
+
_See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/run/index.ts)_
|
|
259
259
|
|
|
260
260
|
## `hereya up`
|
|
261
261
|
|
|
@@ -276,7 +276,7 @@ EXAMPLES
|
|
|
276
276
|
$ hereya up
|
|
277
277
|
```
|
|
278
278
|
|
|
279
|
-
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
279
|
+
_See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/up/index.ts)_
|
|
280
280
|
|
|
281
281
|
## `hereya workspace create NAME`
|
|
282
282
|
|
|
@@ -296,7 +296,7 @@ EXAMPLES
|
|
|
296
296
|
$ hereya workspace create dev
|
|
297
297
|
```
|
|
298
298
|
|
|
299
|
-
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
299
|
+
_See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/workspace/create/index.ts)_
|
|
300
300
|
|
|
301
301
|
## `hereya workspace delete NAME`
|
|
302
302
|
|
|
@@ -316,7 +316,7 @@ EXAMPLES
|
|
|
316
316
|
$ hereya workspace delete dev
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
-
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
319
|
+
_See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/workspace/delete/index.ts)_
|
|
320
320
|
|
|
321
321
|
## `hereya workspace env`
|
|
322
322
|
|
|
@@ -336,7 +336,7 @@ EXAMPLES
|
|
|
336
336
|
$ hereya workspace env -w dev
|
|
337
337
|
```
|
|
338
338
|
|
|
339
|
-
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
339
|
+
_See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/workspace/env/index.ts)_
|
|
340
340
|
|
|
341
341
|
## `hereya workspace install PACKAGE`
|
|
342
342
|
|
|
@@ -362,7 +362,7 @@ EXAMPLES
|
|
|
362
362
|
$ hereya workspace install hereya/aws-cognito
|
|
363
363
|
```
|
|
364
364
|
|
|
365
|
-
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
365
|
+
_See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/workspace/install/index.ts)_
|
|
366
366
|
|
|
367
367
|
## `hereya workspace uninstall PACKAGE`
|
|
368
368
|
|
|
@@ -388,5 +388,5 @@ EXAMPLES
|
|
|
388
388
|
$ hereya workspace uninstall hereya/aws-cognito
|
|
389
389
|
```
|
|
390
390
|
|
|
391
|
-
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.
|
|
391
|
+
_See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.3.1/src/commands/workspace/uninstall/index.ts)_
|
|
392
392
|
<!-- commandsstop -->
|
|
@@ -3,7 +3,7 @@ export declare class AwsInfrastructure implements Infrastructure {
|
|
|
3
3
|
bootstrap(_: BootstrapInput): Promise<void>;
|
|
4
4
|
destroy(input: DestroyInput): Promise<DestroyOutput>;
|
|
5
5
|
provision(input: ProvisionInput): Promise<ProvisionOutput>;
|
|
6
|
-
resolveEnv(
|
|
6
|
+
resolveEnv(input: ResolveEnvInput): Promise<ResolveEnvOutput>;
|
|
7
7
|
saveEnv(input: SaveEnvInput): Promise<SaveEnvOutput>;
|
|
8
8
|
private getEnv;
|
|
9
9
|
private runCdkBuild;
|
|
@@ -33,8 +33,17 @@ export class AwsInfrastructure {
|
|
|
33
33
|
const env = await this.getEnv(input.id);
|
|
34
34
|
return { env, success: true };
|
|
35
35
|
}
|
|
36
|
-
async resolveEnv(
|
|
37
|
-
|
|
36
|
+
async resolveEnv(input) {
|
|
37
|
+
const parameterStoreArnPattern = /^arn:aws:ssm:[\da-z-]+:\d{12}:parameter\/[\w./-]+$/;
|
|
38
|
+
const ssmClient = new SSMClient({});
|
|
39
|
+
if (parameterStoreArnPattern.test(input.value)) {
|
|
40
|
+
const response = await ssmClient.send(new GetParameterCommand({
|
|
41
|
+
Name: input.value,
|
|
42
|
+
WithDecryption: true,
|
|
43
|
+
}));
|
|
44
|
+
return { value: response.Parameter?.Value ?? input.value };
|
|
45
|
+
}
|
|
46
|
+
return { value: input.value };
|
|
38
47
|
}
|
|
39
48
|
async saveEnv(input) {
|
|
40
49
|
const key = `/hereya/${input.id}`;
|
package/oclif.manifest.json
CHANGED