hereya-cli 0.53.0 → 0.54.0

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.53.0 linux-x64 node-v22.17.1
23
+ hereya-cli/0.54.0 linux-x64 node-v22.17.1
24
24
  $ hereya --help [COMMAND]
25
25
  USAGE
26
26
  $ hereya COMMAND
@@ -98,7 +98,7 @@ EXAMPLES
98
98
  $ hereya add cloudy/docker_postgres
99
99
  ```
100
100
 
101
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/add/index.ts)_
101
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/add/index.ts)_
102
102
 
103
103
  ## `hereya bootstrap INFRASTRUCTURETYPE`
104
104
 
@@ -123,7 +123,7 @@ EXAMPLES
123
123
  $ hereya bootstrap local
124
124
  ```
125
125
 
126
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/bootstrap/index.ts)_
126
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/bootstrap/index.ts)_
127
127
 
128
128
  ## `hereya config export-backend [FILE]`
129
129
 
@@ -145,7 +145,7 @@ EXAMPLES
145
145
  $ hereya config export-backend ./path/to/export.json
146
146
  ```
147
147
 
148
- _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/config/export-backend/index.ts)_
148
+ _See code: [src/commands/config/export-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/config/export-backend/index.ts)_
149
149
 
150
150
  ## `hereya config get-backend`
151
151
 
@@ -162,7 +162,7 @@ EXAMPLES
162
162
  $ hereya config get-backend
163
163
  ```
164
164
 
165
- _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/config/get-backend/index.ts)_
165
+ _See code: [src/commands/config/get-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/config/get-backend/index.ts)_
166
166
 
167
167
  ## `hereya config import-backend FILE`
168
168
 
@@ -182,7 +182,7 @@ EXAMPLES
182
182
  $ hereya config import-backend ./path/to/cloud-backend.json
183
183
  ```
184
184
 
185
- _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/config/import-backend/index.ts)_
185
+ _See code: [src/commands/config/import-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/config/import-backend/index.ts)_
186
186
 
187
187
  ## `hereya config use-backend TYPE`
188
188
 
@@ -204,7 +204,7 @@ EXAMPLES
204
204
  $ hereya config use-backend local
205
205
  ```
206
206
 
207
- _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/config/use-backend/index.ts)_
207
+ _See code: [src/commands/config/use-backend/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/config/use-backend/index.ts)_
208
208
 
209
209
  ## `hereya delete-state`
210
210
 
@@ -230,7 +230,7 @@ EXAMPLES
230
230
  $ hereya delete-state --workspace staging
231
231
  ```
232
232
 
233
- _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/delete-state/index.ts)_
233
+ _See code: [src/commands/delete-state/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/delete-state/index.ts)_
234
234
 
235
235
  ## `hereya deploy`
236
236
 
@@ -255,7 +255,7 @@ EXAMPLES
255
255
  $ hereya deploy
256
256
  ```
257
257
 
258
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/deploy/index.ts)_
258
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/deploy/index.ts)_
259
259
 
260
260
  ## `hereya down`
261
261
 
@@ -282,7 +282,7 @@ EXAMPLES
282
282
  $ hereya down
283
283
  ```
284
284
 
285
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/down/index.ts)_
285
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/down/index.ts)_
286
286
 
287
287
  ## `hereya env [NAME]`
288
288
 
@@ -313,7 +313,7 @@ EXAMPLES
313
313
  $ hereya env -w dev -l
314
314
  ```
315
315
 
316
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/env/index.ts)_
316
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/env/index.ts)_
317
317
 
318
318
  ## `hereya env set [NAME]`
319
319
 
@@ -340,7 +340,7 @@ EXAMPLES
340
340
  $ hereya env set FOO -v bar -w dev
341
341
  ```
342
342
 
343
- _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/env/set/index.ts)_
343
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/env/set/index.ts)_
344
344
 
345
345
  ## `hereya flow add PACKAGE`
346
346
 
@@ -378,7 +378,7 @@ EXAMPLES
378
378
  $ hereya flow add cloudy/docker_postgres -p DB_NAME=mydb -p DB_USER=admin
379
379
  ```
380
380
 
381
- _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/flow/add/index.ts)_
381
+ _See code: [src/commands/flow/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/flow/add/index.ts)_
382
382
 
383
383
  ## `hereya flow down`
384
384
 
@@ -412,7 +412,7 @@ EXAMPLES
412
412
  $ hereya flow down --pin
413
413
  ```
414
414
 
415
- _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/flow/down/index.ts)_
415
+ _See code: [src/commands/flow/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/flow/down/index.ts)_
416
416
 
417
417
  ## `hereya flow env [NAME]`
418
418
 
@@ -446,7 +446,7 @@ EXAMPLES
446
446
  $ hereya flow env -l
447
447
  ```
448
448
 
449
- _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/flow/env/index.ts)_
449
+ _See code: [src/commands/flow/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/flow/env/index.ts)_
450
450
 
451
451
  ## `hereya flow remove PACKAGE`
452
452
 
@@ -476,7 +476,7 @@ EXAMPLES
476
476
  $ hereya flow remove cloudy/docker_postgres --profile staging
477
477
  ```
478
478
 
479
- _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/flow/remove/index.ts)_
479
+ _See code: [src/commands/flow/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/flow/remove/index.ts)_
480
480
 
481
481
  ## `hereya flow run CMD`
482
482
 
@@ -505,7 +505,7 @@ EXAMPLES
505
505
  $ hereya flow run --pin -- npm test
506
506
  ```
507
507
 
508
- _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/flow/run/index.ts)_
508
+ _See code: [src/commands/flow/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/flow/run/index.ts)_
509
509
 
510
510
  ## `hereya flow up`
511
511
 
@@ -539,7 +539,7 @@ EXAMPLES
539
539
  $ hereya flow up --pin
540
540
  ```
541
541
 
542
- _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/flow/up/index.ts)_
542
+ _See code: [src/commands/flow/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/flow/up/index.ts)_
543
543
 
544
544
  ## `hereya help [COMMAND]`
545
545
 
@@ -596,7 +596,7 @@ EXAMPLES
596
596
  $ hereya import org/my-package -f state.tfstate -w my-workspace
597
597
  ```
598
598
 
599
- _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/import/index.ts)_
599
+ _See code: [src/commands/import/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/import/index.ts)_
600
600
 
601
601
  ## `hereya init PROJECT`
602
602
 
@@ -622,7 +622,7 @@ EXAMPLES
622
622
  $ hereya init myProject -w=defaultWorkspace --chdir=./myProject
623
623
  ```
624
624
 
625
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/init/index.ts)_
625
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/init/index.ts)_
626
626
 
627
627
  ## `hereya login [URL]`
628
628
 
@@ -651,7 +651,7 @@ EXAMPLES
651
651
  $ hereya login --token=your-token https://cloud.hereya.dev
652
652
  ```
653
653
 
654
- _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/login/index.ts)_
654
+ _See code: [src/commands/login/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/login/index.ts)_
655
655
 
656
656
  ## `hereya logout`
657
657
 
@@ -668,7 +668,7 @@ EXAMPLES
668
668
  $ hereya logout
669
669
  ```
670
670
 
671
- _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/logout/index.ts)_
671
+ _See code: [src/commands/logout/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/logout/index.ts)_
672
672
 
673
673
  ## `hereya remove PACKAGE`
674
674
 
@@ -696,7 +696,7 @@ EXAMPLES
696
696
  $ hereya remove cloudy/docker_postgres
697
697
  ```
698
698
 
699
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/remove/index.ts)_
699
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/remove/index.ts)_
700
700
 
701
701
  ## `hereya run CMD`
702
702
 
@@ -722,7 +722,7 @@ EXAMPLES
722
722
  $ hereya run -w uat -- node index.js
723
723
  ```
724
724
 
725
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/run/index.ts)_
725
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/run/index.ts)_
726
726
 
727
727
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
728
728
 
@@ -747,7 +747,7 @@ EXAMPLES
747
747
  $ hereya unbootstrap local
748
748
  ```
749
749
 
750
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/unbootstrap/index.ts)_
750
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/unbootstrap/index.ts)_
751
751
 
752
752
  ## `hereya undeploy`
753
753
 
@@ -772,7 +772,7 @@ EXAMPLES
772
772
  $ hereya undeploy
773
773
  ```
774
774
 
775
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/undeploy/index.ts)_
775
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/undeploy/index.ts)_
776
776
 
777
777
  ## `hereya up`
778
778
 
@@ -799,7 +799,7 @@ EXAMPLES
799
799
  $ hereya up
800
800
  ```
801
801
 
802
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/up/index.ts)_
802
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/up/index.ts)_
803
803
 
804
804
  ## `hereya workspace create NAME`
805
805
 
@@ -824,7 +824,7 @@ EXAMPLES
824
824
  $ hereya workspace create dev
825
825
  ```
826
826
 
827
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/create/index.ts)_
827
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/create/index.ts)_
828
828
 
829
829
  ## `hereya workspace delete NAME`
830
830
 
@@ -844,7 +844,7 @@ EXAMPLES
844
844
  $ hereya workspace delete dev
845
845
  ```
846
846
 
847
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/delete/index.ts)_
847
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/delete/index.ts)_
848
848
 
849
849
  ## `hereya workspace env [NAME]`
850
850
 
@@ -870,7 +870,7 @@ EXAMPLES
870
870
  $ hereya workspace env myEnv -w dev
871
871
  ```
872
872
 
873
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/env/index.ts)_
873
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/env/index.ts)_
874
874
 
875
875
  ## `hereya workspace env set`
876
876
 
@@ -894,7 +894,7 @@ EXAMPLES
894
894
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
895
895
  ```
896
896
 
897
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/env/set/index.ts)_
897
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/env/set/index.ts)_
898
898
 
899
899
  ## `hereya workspace env unset`
900
900
 
@@ -915,7 +915,7 @@ EXAMPLES
915
915
  $ hereya workspace env unset -w my-workspace -n myVar
916
916
  ```
917
917
 
918
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/env/unset/index.ts)_
918
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/env/unset/index.ts)_
919
919
 
920
920
  ## `hereya workspace install PACKAGE`
921
921
 
@@ -942,7 +942,7 @@ EXAMPLES
942
942
  $ hereya workspace install hereya/aws-cognito
943
943
  ```
944
944
 
945
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/install/index.ts)_
945
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/install/index.ts)_
946
946
 
947
947
  ## `hereya workspace list`
948
948
 
@@ -959,7 +959,7 @@ EXAMPLES
959
959
  $ hereya workspace list
960
960
  ```
961
961
 
962
- _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/list/index.ts)_
962
+ _See code: [src/commands/workspace/list/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/list/index.ts)_
963
963
 
964
964
  ## `hereya workspace set-profile PROFILE`
965
965
 
@@ -983,7 +983,7 @@ EXAMPLES
983
983
  $ hereya workspace set-profile prod-profile -w production
984
984
  ```
985
985
 
986
- _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/set-profile/index.ts)_
986
+ _See code: [src/commands/workspace/set-profile/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/set-profile/index.ts)_
987
987
 
988
988
  ## `hereya workspace uninstall PACKAGE`
989
989
 
@@ -1010,5 +1010,5 @@ EXAMPLES
1010
1010
  $ hereya workspace uninstall hereya/aws-cognito
1011
1011
  ```
1012
1012
 
1013
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.53.0/src/commands/workspace/uninstall/index.ts)_
1013
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.54.0/src/commands/workspace/uninstall/index.ts)_
1014
1014
  <!-- commandsstop -->
@@ -20,6 +20,6 @@ export declare class FileBackend implements Backend {
20
20
  saveState(config: Config, workspace?: string): Promise<void>;
21
21
  setEnvVar(input: SetEnvVarInput): Promise<SetEnvVarOutput>;
22
22
  unsetEnvVar(input: UnsetEnvVarInput): Promise<UnsetEnvVarOutput>;
23
- updateWorkspace(_: UpdateWorkspaceInput): Promise<UpdateWorkspaceOutput>;
23
+ updateWorkspace(input: UpdateWorkspaceInput): Promise<UpdateWorkspaceOutput>;
24
24
  private saveWorkspace;
25
25
  }
@@ -89,6 +89,7 @@ export class FileBackend {
89
89
  isDeploy: input.isDeploy,
90
90
  mirrorOf: input.mirrorOf,
91
91
  name: input.name,
92
+ profile: input.profile,
92
93
  };
93
94
  try {
94
95
  await this.saveWorkspace(workspace, input.name);
@@ -439,11 +440,57 @@ export class FileBackend {
439
440
  success: true,
440
441
  };
441
442
  }
442
- async updateWorkspace(_) {
443
- return {
444
- reason: 'Profile feature is not supported in file backend',
445
- success: false,
443
+ async updateWorkspace(input) {
444
+ // Load existing workspace
445
+ const workspace$ = await this.getWorkspace(input.name);
446
+ if (!workspace$.found) {
447
+ return {
448
+ reason: `Workspace ${input.name} not found`,
449
+ success: false,
450
+ };
451
+ }
452
+ if (workspace$.hasError) {
453
+ return {
454
+ reason: workspace$.error,
455
+ success: false,
456
+ };
457
+ }
458
+ // Update fields if provided
459
+ const updatedWorkspace = {
460
+ ...workspace$.workspace,
446
461
  };
462
+ // Update profile if provided (null means clear it)
463
+ if (input.profile !== undefined) {
464
+ if (input.profile === null || input.profile === '') {
465
+ delete updatedWorkspace.profile;
466
+ }
467
+ else {
468
+ updatedWorkspace.profile = input.profile;
469
+ }
470
+ }
471
+ // Update isDeploy if provided
472
+ if (input.isDeploy !== undefined) {
473
+ if (input.isDeploy === null) {
474
+ delete updatedWorkspace.isDeploy;
475
+ }
476
+ else {
477
+ updatedWorkspace.isDeploy = input.isDeploy;
478
+ }
479
+ }
480
+ try {
481
+ // Save updated workspace
482
+ await this.saveWorkspace(updatedWorkspace, input.name);
483
+ return {
484
+ success: true,
485
+ workspace: updatedWorkspace,
486
+ };
487
+ }
488
+ catch (error) {
489
+ return {
490
+ reason: `Failed to update workspace: ${error.message}`,
491
+ success: false,
492
+ };
493
+ }
447
494
  }
448
495
  async saveWorkspace(data, name) {
449
496
  const paths = [['state', 'workspaces', `${name}.yaml`].join('/'), ['state', 'workspaces', `${name}.yml`].join('/')];
@@ -1786,5 +1786,5 @@
1786
1786
  ]
1787
1787
  }
1788
1788
  },
1789
- "version": "0.53.0"
1789
+ "version": "0.54.0"
1790
1790
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.53.0",
4
+ "version": "0.54.0",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"