hereya-cli 0.6.0 → 0.6.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 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.0 linux-x64 node-v20.14.0
23
+ hereya-cli/0.6.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.6.0/src/commands/add/index.ts)_
73
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.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.6.0/src/commands/bootstrap/index.ts)_
98
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.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.6.0/src/commands/deploy/index.ts)_
119
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/down/index.ts)_
141
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/env/index.ts)_
164
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/init/index.ts)_
210
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/remote/exec/index.ts)_
234
+ _See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/remove/index.ts)_
257
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/run/index.ts)_
283
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/undeploy/index.ts)_
304
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/up/index.ts)_
326
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/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.0/src/commands/workspace/create/index.ts)_
346
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/src/commands/workspace/create/index.ts)_
347
347
 
348
348
  ## `hereya workspace delete NAME`
349
349
 
@@ -363,7 +363,7 @@ 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.0/src/commands/workspace/delete/index.ts)_
366
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/src/commands/workspace/delete/index.ts)_
367
367
 
368
368
  ## `hereya workspace env`
369
369
 
@@ -383,7 +383,7 @@ EXAMPLES
383
383
  $ hereya workspace env -w dev
384
384
  ```
385
385
 
386
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.0/src/commands/workspace/env/index.ts)_
386
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/src/commands/workspace/env/index.ts)_
387
387
 
388
388
  ## `hereya workspace install PACKAGE`
389
389
 
@@ -409,7 +409,7 @@ EXAMPLES
409
409
  $ hereya workspace install hereya/aws-cognito
410
410
  ```
411
411
 
412
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.0/src/commands/workspace/install/index.ts)_
412
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/src/commands/workspace/install/index.ts)_
413
413
 
414
414
  ## `hereya workspace uninstall PACKAGE`
415
415
 
@@ -435,5 +435,5 @@ EXAMPLES
435
435
  $ hereya workspace uninstall hereya/aws-cognito
436
436
  ```
437
437
 
438
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.0/src/commands/workspace/uninstall/index.ts)_
438
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.6.2/src/commands/workspace/uninstall/index.ts)_
439
439
  <!-- commandsstop -->
@@ -221,12 +221,15 @@ export class AwsInfrastructure {
221
221
  }
222
222
  const ssmClient = new SSMClient({});
223
223
  const parameterName = `/hereya/package-parameters/${input.id}`;
224
- await ssmClient.send(new PutParameterCommand({
225
- Name: parameterName,
226
- Overwrite: true,
227
- Type: 'SecureString',
228
- Value: Object.entries(input.parameters ?? {}).map(([key, value]) => `${key}=${value}`).join(','),
229
- }));
224
+ const parameterValue = Object.entries(input.parameters ?? {}).map(([key, value]) => `${key}=${value}`).join(',');
225
+ if (parameterValue) {
226
+ await ssmClient.send(new PutParameterCommand({
227
+ Name: parameterName,
228
+ Overwrite: true,
229
+ Type: 'SecureString',
230
+ Value: parameterValue,
231
+ }));
232
+ }
230
233
  const response = await codebuildClient.send(new StartBuildCommand({
231
234
  environmentVariablesOverride: [
232
235
  {
@@ -246,8 +249,8 @@ export class AwsInfrastructure {
246
249
  },
247
250
  {
248
251
  name: 'HEREYA_PARAMETERS',
249
- type: 'PARAMETER_STORE',
250
- value: parameterName,
252
+ type: parameterValue ? 'PARAMETER_STORE' : 'PLAINTEXT',
253
+ value: parameterValue ? parameterName : '',
251
254
  },
252
255
  {
253
256
  name: 'HEREYA_WORKSPACE_ENV',
@@ -298,9 +301,11 @@ export class AwsInfrastructure {
298
301
  return { reason: `Deployment failed with status ${deploymentResult?.buildStatus}`, success: false };
299
302
  }
300
303
  // remove the parameter
301
- await ssmClient.send(new DeleteParameterCommand({
302
- Name: parameterName,
303
- }));
304
+ if (parameterValue) {
305
+ await ssmClient.send(new DeleteParameterCommand({
306
+ Name: parameterName,
307
+ }));
308
+ }
304
309
  return { success: true };
305
310
  }
306
311
  async uploadProjectFiles(input) {
@@ -713,5 +713,5 @@
713
713
  ]
714
714
  }
715
715
  },
716
- "version": "0.6.0"
716
+ "version": "0.6.2"
717
717
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.6.0",
4
+ "version": "0.6.2",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"