hereya-cli 0.36.0 → 0.37.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.36.0 linux-x64 node-v22.15.0
23
+ hereya-cli/0.37.1 linux-x64 node-v22.15.0
24
24
  $ hereya --help [COMMAND]
25
25
  USAGE
26
26
  $ hereya COMMAND
@@ -41,7 +41,7 @@ USAGE
41
41
  * [`hereya env set [NAME]`](#hereya-env-set-name)
42
42
  * [`hereya help [COMMAND]`](#hereya-help-command)
43
43
  * [`hereya init PROJECT`](#hereya-init-project)
44
- * [`hereya login URL`](#hereya-login-url)
44
+ * [`hereya login [URL]`](#hereya-login-url)
45
45
  * [`hereya logout`](#hereya-logout)
46
46
  * [`hereya remove PACKAGE`](#hereya-remove-package)
47
47
  * [`hereya run CMD`](#hereya-run-cmd)
@@ -88,7 +88,7 @@ EXAMPLES
88
88
  $ hereya add cloudy/docker_postgres
89
89
  ```
90
90
 
91
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/add/index.ts)_
91
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/add/index.ts)_
92
92
 
93
93
  ## `hereya bootstrap INFRASTRUCTURETYPE`
94
94
 
@@ -113,7 +113,7 @@ EXAMPLES
113
113
  $ hereya bootstrap local
114
114
  ```
115
115
 
116
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/bootstrap/index.ts)_
116
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/bootstrap/index.ts)_
117
117
 
118
118
  ## `hereya config export-backend [FILE]`
119
119
 
@@ -135,7 +135,7 @@ EXAMPLES
135
135
  $ hereya config export-backend ./path/to/export.json
136
136
  ```
137
137
 
138
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/config/export-backend/index.ts)_
138
+ _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/config/export-backend/index.ts)_
139
139
 
140
140
  ## `hereya config get-backend`
141
141
 
@@ -152,7 +152,7 @@ EXAMPLES
152
152
  $ hereya config get-backend
153
153
  ```
154
154
 
155
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/config/get-backend/index.ts)_
155
+ _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/config/get-backend/index.ts)_
156
156
 
157
157
  ## `hereya config import-backend FILE`
158
158
 
@@ -172,7 +172,7 @@ EXAMPLES
172
172
  $ hereya config import-backend ./path/to/cloud-backend.json
173
173
  ```
174
174
 
175
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/config/import-backend/index.ts)_
175
+ _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/config/import-backend/index.ts)_
176
176
 
177
177
  ## `hereya config use-backend TYPE`
178
178
 
@@ -194,7 +194,7 @@ EXAMPLES
194
194
  $ hereya config use-backend local
195
195
  ```
196
196
 
197
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/config/use-backend/index.ts)_
197
+ _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/config/use-backend/index.ts)_
198
198
 
199
199
  ## `hereya deploy`
200
200
 
@@ -219,7 +219,7 @@ EXAMPLES
219
219
  $ hereya deploy
220
220
  ```
221
221
 
222
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/deploy/index.ts)_
222
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/deploy/index.ts)_
223
223
 
224
224
  ## `hereya down`
225
225
 
@@ -246,7 +246,7 @@ EXAMPLES
246
246
  $ hereya down
247
247
  ```
248
248
 
249
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/down/index.ts)_
249
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/down/index.ts)_
250
250
 
251
251
  ## `hereya env [NAME]`
252
252
 
@@ -277,7 +277,7 @@ EXAMPLES
277
277
  $ hereya env -w dev -l
278
278
  ```
279
279
 
280
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/env/index.ts)_
280
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/env/index.ts)_
281
281
 
282
282
  ## `hereya env set [NAME]`
283
283
 
@@ -304,7 +304,7 @@ EXAMPLES
304
304
  $ hereya env set FOO -v bar -w dev
305
305
  ```
306
306
 
307
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/env/set/index.ts)_
307
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/env/set/index.ts)_
308
308
 
309
309
  ## `hereya help [COMMAND]`
310
310
 
@@ -350,29 +350,31 @@ EXAMPLES
350
350
  $ hereya init myProject -w=defaultWorkspace --chdir=./myProject
351
351
  ```
352
352
 
353
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/init/index.ts)_
353
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/init/index.ts)_
354
354
 
355
- ## `hereya login URL`
355
+ ## `hereya login [URL]`
356
356
 
357
357
  Login to the Hereya Cloud backend
358
358
 
359
359
  ```
360
360
  USAGE
361
- $ hereya login URL
361
+ $ hereya login [URL]
362
362
 
363
363
  ARGUMENTS
364
- URL URL of the Hereya Cloud backend
364
+ URL [default: https://cloud.hereya.dev] URL of the Hereya Cloud backend
365
365
 
366
366
  DESCRIPTION
367
367
  Login to the Hereya Cloud backend
368
368
 
369
369
  EXAMPLES
370
+ $ hereya login
371
+
370
372
  $ hereya login https://cloud.hereya.dev
371
373
 
372
374
  $ hereya login http://localhost:5173
373
375
  ```
374
376
 
375
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/login/index.ts)_
377
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/login/index.ts)_
376
378
 
377
379
  ## `hereya logout`
378
380
 
@@ -389,7 +391,7 @@ EXAMPLES
389
391
  $ hereya logout
390
392
  ```
391
393
 
392
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/logout/index.ts)_
394
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/logout/index.ts)_
393
395
 
394
396
  ## `hereya remove PACKAGE`
395
397
 
@@ -416,7 +418,7 @@ EXAMPLES
416
418
  $ hereya remove cloudy/docker_postgres
417
419
  ```
418
420
 
419
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/remove/index.ts)_
421
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/remove/index.ts)_
420
422
 
421
423
  ## `hereya run CMD`
422
424
 
@@ -442,7 +444,7 @@ EXAMPLES
442
444
  $ hereya run -w uat -- node index.js
443
445
  ```
444
446
 
445
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/run/index.ts)_
447
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/run/index.ts)_
446
448
 
447
449
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
448
450
 
@@ -467,7 +469,7 @@ EXAMPLES
467
469
  $ hereya unbootstrap local
468
470
  ```
469
471
 
470
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/unbootstrap/index.ts)_
472
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/unbootstrap/index.ts)_
471
473
 
472
474
  ## `hereya undeploy`
473
475
 
@@ -492,7 +494,7 @@ EXAMPLES
492
494
  $ hereya undeploy
493
495
  ```
494
496
 
495
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/undeploy/index.ts)_
497
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/undeploy/index.ts)_
496
498
 
497
499
  ## `hereya up`
498
500
 
@@ -519,7 +521,7 @@ EXAMPLES
519
521
  $ hereya up
520
522
  ```
521
523
 
522
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/up/index.ts)_
524
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/up/index.ts)_
523
525
 
524
526
  ## `hereya workspace create NAME`
525
527
 
@@ -542,7 +544,7 @@ EXAMPLES
542
544
  $ hereya workspace create dev
543
545
  ```
544
546
 
545
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/create/index.ts)_
547
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/create/index.ts)_
546
548
 
547
549
  ## `hereya workspace delete NAME`
548
550
 
@@ -562,7 +564,7 @@ EXAMPLES
562
564
  $ hereya workspace delete dev
563
565
  ```
564
566
 
565
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/delete/index.ts)_
567
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/delete/index.ts)_
566
568
 
567
569
  ## `hereya workspace env [NAME]`
568
570
 
@@ -588,7 +590,7 @@ EXAMPLES
588
590
  $ hereya workspace env myEnv -w dev
589
591
  ```
590
592
 
591
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/env/index.ts)_
593
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/env/index.ts)_
592
594
 
593
595
  ## `hereya workspace env set`
594
596
 
@@ -612,7 +614,7 @@ EXAMPLES
612
614
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
613
615
  ```
614
616
 
615
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/env/set/index.ts)_
617
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/env/set/index.ts)_
616
618
 
617
619
  ## `hereya workspace env unset`
618
620
 
@@ -633,7 +635,7 @@ EXAMPLES
633
635
  $ hereya workspace env unset -w my-workspace -n myVar
634
636
  ```
635
637
 
636
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/env/unset/index.ts)_
638
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/env/unset/index.ts)_
637
639
 
638
640
  ## `hereya workspace install PACKAGE`
639
641
 
@@ -660,7 +662,7 @@ EXAMPLES
660
662
  $ hereya workspace install hereya/aws-cognito
661
663
  ```
662
664
 
663
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/install/index.ts)_
665
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/install/index.ts)_
664
666
 
665
667
  ## `hereya workspace list`
666
668
 
@@ -677,7 +679,7 @@ EXAMPLES
677
679
  $ hereya workspace list
678
680
  ```
679
681
 
680
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/list/index.ts)_
682
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/list/index.ts)_
681
683
 
682
684
  ## `hereya workspace uninstall PACKAGE`
683
685
 
@@ -704,5 +706,5 @@ EXAMPLES
704
706
  $ hereya workspace uninstall hereya/aws-cognito
705
707
  ```
706
708
 
707
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.36.0/src/commands/workspace/uninstall/index.ts)_
709
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.37.1/src/commands/workspace/uninstall/index.ts)_
708
710
  <!-- commandsstop -->
@@ -3,10 +3,15 @@ import { loginToCloudBackend } from '../../backend/cloud/login.js';
3
3
  import { saveCloudCredentials } from '../../backend/config.js';
4
4
  export default class Login extends Command {
5
5
  static args = {
6
- url: Args.string({ description: 'URL of the Hereya Cloud backend', required: true }),
6
+ url: Args.string({
7
+ default: 'https://cloud.hereya.dev',
8
+ description: 'URL of the Hereya Cloud backend',
9
+ required: false,
10
+ }),
7
11
  };
8
12
  static description = 'Login to the Hereya Cloud backend';
9
13
  static examples = [
14
+ '<%= config.bin %> <%= command.id %>',
10
15
  '<%= config.bin %> <%= command.id %> https://cloud.hereya.dev',
11
16
  '<%= config.bin %> <%= command.id %> http://localhost:5173',
12
17
  ];
@@ -161,7 +161,8 @@ export class AwsInfrastructure {
161
161
  }
162
162
  const ssmClient = new SSMClient({});
163
163
  const id = randomUUID();
164
- const ssmParameterName = input.oldValue ?? `/hereya/${input.name}/${id}`;
164
+ const parameterStoreArnPattern = /^arn:aws:ssm:[\da-z-]+:\d{12}:parameter(\/[\w./-]+)$/;
165
+ const ssmParameterName = input.oldValue ? (parameterStoreArnPattern.exec(input.oldValue)?.[1] ?? `/hereya/${input.name}/${id}`) : `/hereya/${input.name}/${id}`;
165
166
  await ssmClient.send(new PutParameterCommand({
166
167
  Name: ssmParameterName,
167
168
  Overwrite: true,
@@ -317,13 +317,15 @@
317
317
  "aliases": [],
318
318
  "args": {
319
319
  "url": {
320
+ "default": "https://cloud.hereya.dev",
320
321
  "description": "URL of the Hereya Cloud backend",
321
322
  "name": "url",
322
- "required": true
323
+ "required": false
323
324
  }
324
325
  },
325
326
  "description": "Login to the Hereya Cloud backend",
326
327
  "examples": [
328
+ "<%= config.bin %> <%= command.id %>",
327
329
  "<%= config.bin %> <%= command.id %> https://cloud.hereya.dev",
328
330
  "<%= config.bin %> <%= command.id %> http://localhost:5173"
329
331
  ],
@@ -1181,5 +1183,5 @@
1181
1183
  ]
1182
1184
  }
1183
1185
  },
1184
- "version": "0.36.0"
1186
+ "version": "0.37.1"
1185
1187
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.36.0",
4
+ "version": "0.37.1",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"