hereya-cli 0.9.0 → 0.9.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 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.9.0 linux-x64 node-v20.15.0
23
+ hereya-cli/0.9.1 linux-x64 node-v20.15.0
24
24
  $ hereya --help [COMMAND]
25
25
  USAGE
26
26
  $ hereya COMMAND
@@ -71,7 +71,7 @@ EXAMPLES
71
71
  $ hereya add cloudy/docker_postgres
72
72
  ```
73
73
 
74
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/add/index.ts)_
74
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/add/index.ts)_
75
75
 
76
76
  ## `hereya bootstrap INFRASTRUCTURETYPE`
77
77
 
@@ -96,7 +96,7 @@ EXAMPLES
96
96
  $ hereya bootstrap local
97
97
  ```
98
98
 
99
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/bootstrap/index.ts)_
99
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/bootstrap/index.ts)_
100
100
 
101
101
  ## `hereya deploy`
102
102
 
@@ -117,7 +117,7 @@ EXAMPLES
117
117
  $ hereya deploy
118
118
  ```
119
119
 
120
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/deploy/index.ts)_
120
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/deploy/index.ts)_
121
121
 
122
122
  ## `hereya down`
123
123
 
@@ -139,7 +139,7 @@ EXAMPLES
139
139
  $ hereya down
140
140
  ```
141
141
 
142
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/down/index.ts)_
142
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/down/index.ts)_
143
143
 
144
144
  ## `hereya env [NAME]`
145
145
 
@@ -170,7 +170,7 @@ EXAMPLES
170
170
  $ hereya env -w dev -l
171
171
  ```
172
172
 
173
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/env/index.ts)_
173
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/env/index.ts)_
174
174
 
175
175
  ## `hereya help [COMMAND]`
176
176
 
@@ -216,7 +216,7 @@ EXAMPLES
216
216
  $ hereya init myProject -w=defaultWorkspace --chdir=./myProject
217
217
  ```
218
218
 
219
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/init/index.ts)_
219
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/init/index.ts)_
220
220
 
221
221
  ## `hereya remote exec [PKGPATH]`
222
222
 
@@ -240,7 +240,7 @@ EXAMPLES
240
240
  $ hereya remote exec
241
241
  ```
242
242
 
243
- _See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/remote/exec/index.ts)_
243
+ _See code: [src/commands/remote/exec/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/remote/exec/index.ts)_
244
244
 
245
245
  ## `hereya remove PACKAGE`
246
246
 
@@ -263,7 +263,7 @@ EXAMPLES
263
263
  $ hereya remove cloudy/docker_postgres
264
264
  ```
265
265
 
266
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/remove/index.ts)_
266
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/remove/index.ts)_
267
267
 
268
268
  ## `hereya run CMD`
269
269
 
@@ -289,7 +289,7 @@ EXAMPLES
289
289
  $ hereya run -w uat -- node index.js
290
290
  ```
291
291
 
292
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/run/index.ts)_
292
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/run/index.ts)_
293
293
 
294
294
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
295
295
 
@@ -314,7 +314,7 @@ EXAMPLES
314
314
  $ hereya unbootstrap local
315
315
  ```
316
316
 
317
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/unbootstrap/index.ts)_
317
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/unbootstrap/index.ts)_
318
318
 
319
319
  ## `hereya undeploy`
320
320
 
@@ -335,7 +335,7 @@ EXAMPLES
335
335
  $ hereya undeploy
336
336
  ```
337
337
 
338
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/undeploy/index.ts)_
338
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/undeploy/index.ts)_
339
339
 
340
340
  ## `hereya up`
341
341
 
@@ -357,7 +357,7 @@ EXAMPLES
357
357
  $ hereya up
358
358
  ```
359
359
 
360
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/up/index.ts)_
360
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/up/index.ts)_
361
361
 
362
362
  ## `hereya workspace create NAME`
363
363
 
@@ -377,7 +377,7 @@ EXAMPLES
377
377
  $ hereya workspace create dev
378
378
  ```
379
379
 
380
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/workspace/create/index.ts)_
380
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/workspace/create/index.ts)_
381
381
 
382
382
  ## `hereya workspace delete NAME`
383
383
 
@@ -397,7 +397,7 @@ EXAMPLES
397
397
  $ hereya workspace delete dev
398
398
  ```
399
399
 
400
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/workspace/delete/index.ts)_
400
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/workspace/delete/index.ts)_
401
401
 
402
402
  ## `hereya workspace env [NAME]`
403
403
 
@@ -423,7 +423,7 @@ EXAMPLES
423
423
  $ hereya workspace env myEnv -w dev
424
424
  ```
425
425
 
426
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/workspace/env/index.ts)_
426
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/workspace/env/index.ts)_
427
427
 
428
428
  ## `hereya workspace install PACKAGE`
429
429
 
@@ -449,7 +449,7 @@ EXAMPLES
449
449
  $ hereya workspace install hereya/aws-cognito
450
450
  ```
451
451
 
452
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/workspace/install/index.ts)_
452
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/workspace/install/index.ts)_
453
453
 
454
454
  ## `hereya workspace uninstall PACKAGE`
455
455
 
@@ -475,5 +475,5 @@ EXAMPLES
475
475
  $ hereya workspace uninstall hereya/aws-cognito
476
476
  ```
477
477
 
478
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.0/src/commands/workspace/uninstall/index.ts)_
478
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.9.1/src/commands/workspace/uninstall/index.ts)_
479
479
  <!-- commandsstop -->
@@ -8,16 +8,15 @@ export function arrayOfStringToObject(arr, keyValueSeparator = '=') {
8
8
  }));
9
9
  }
10
10
  export function objectToBase64(obj) {
11
- return Buffer.from(JSON.stringify(obj)).toString('base64');
11
+ return Buffer.from(JSON.stringify(obj)).toString('base64').replace(/=*$/, '');
12
12
  }
13
13
  export function base64ToJSONString(base64) {
14
- // without padding
15
- return Buffer.from(base64.replace(/=*$/, ''), 'base64').toString('utf8');
14
+ const paddedBase64 = base64.padEnd(base64.length + (4 - base64.length % 4) % 4, '=');
15
+ return Buffer.from(paddedBase64, 'base64').toString('utf8');
16
16
  }
17
17
  export function tryBase64ToJSONString(base64) {
18
18
  try {
19
- const paddedBase64 = base64.padEnd(base64.length + (4 - base64.length % 4) % 4, '=');
20
- const value = base64ToJSONString(paddedBase64);
19
+ const value = base64ToJSONString(base64);
21
20
  if (typeof JSON.parse(value) === 'object') {
22
21
  return value;
23
22
  }
@@ -48,6 +48,45 @@
48
48
  "index.js"
49
49
  ]
50
50
  },
51
+ "bootstrap": {
52
+ "aliases": [],
53
+ "args": {
54
+ "infrastructureType": {
55
+ "description": "infrastructure to bootstrap. Options are local, aws",
56
+ "name": "infrastructureType",
57
+ "required": true
58
+ }
59
+ },
60
+ "description": "Install necessary resources for hereya operations in an infrastructure.",
61
+ "examples": [
62
+ "<%= config.bin %> <%= command.id %> aws",
63
+ "<%= config.bin %> <%= command.id %> local"
64
+ ],
65
+ "flags": {
66
+ "force": {
67
+ "char": "f",
68
+ "description": "redeploy hereya resources if already deployed",
69
+ "name": "force",
70
+ "allowNo": false,
71
+ "type": "boolean"
72
+ }
73
+ },
74
+ "hasDynamicHelp": false,
75
+ "hiddenAliases": [],
76
+ "id": "bootstrap",
77
+ "pluginAlias": "hereya-cli",
78
+ "pluginName": "hereya-cli",
79
+ "pluginType": "core",
80
+ "strict": true,
81
+ "enableJsonFlag": false,
82
+ "isESM": true,
83
+ "relativePath": [
84
+ "dist",
85
+ "commands",
86
+ "bootstrap",
87
+ "index.js"
88
+ ]
89
+ },
51
90
  "deploy": {
52
91
  "aliases": [],
53
92
  "args": {},
@@ -90,45 +129,6 @@
90
129
  "index.js"
91
130
  ]
92
131
  },
93
- "bootstrap": {
94
- "aliases": [],
95
- "args": {
96
- "infrastructureType": {
97
- "description": "infrastructure to bootstrap. Options are local, aws",
98
- "name": "infrastructureType",
99
- "required": true
100
- }
101
- },
102
- "description": "Install necessary resources for hereya operations in an infrastructure.",
103
- "examples": [
104
- "<%= config.bin %> <%= command.id %> aws",
105
- "<%= config.bin %> <%= command.id %> local"
106
- ],
107
- "flags": {
108
- "force": {
109
- "char": "f",
110
- "description": "redeploy hereya resources if already deployed",
111
- "name": "force",
112
- "allowNo": false,
113
- "type": "boolean"
114
- }
115
- },
116
- "hasDynamicHelp": false,
117
- "hiddenAliases": [],
118
- "id": "bootstrap",
119
- "pluginAlias": "hereya-cli",
120
- "pluginName": "hereya-cli",
121
- "pluginType": "core",
122
- "strict": true,
123
- "enableJsonFlag": false,
124
- "isESM": true,
125
- "relativePath": [
126
- "dist",
127
- "commands",
128
- "bootstrap",
129
- "index.js"
130
- ]
131
- },
132
132
  "down": {
133
133
  "aliases": [],
134
134
  "args": {},
@@ -783,5 +783,5 @@
783
783
  ]
784
784
  }
785
785
  },
786
- "version": "0.9.0"
786
+ "version": "0.9.1"
787
787
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.9.0",
4
+ "version": "0.9.1",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"