hereya-cli 0.15.1 → 0.17.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.15.1 linux-x64 node-v22.13.0
23
+ hereya-cli/0.17.0 linux-x64 node-v22.13.1
24
24
  $ hereya --help [COMMAND]
25
25
  USAGE
26
26
  $ hereya COMMAND
@@ -34,6 +34,7 @@ USAGE
34
34
  * [`hereya deploy`](#hereya-deploy)
35
35
  * [`hereya down`](#hereya-down)
36
36
  * [`hereya env [NAME]`](#hereya-env-name)
37
+ * [`hereya env set [NAME]`](#hereya-env-set-name)
37
38
  * [`hereya help [COMMAND]`](#hereya-help-command)
38
39
  * [`hereya init PROJECT`](#hereya-init-project)
39
40
  * [`hereya remove PACKAGE`](#hereya-remove-package)
@@ -73,7 +74,7 @@ EXAMPLES
73
74
  $ hereya add cloudy/docker_postgres
74
75
  ```
75
76
 
76
- _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/add/index.ts)_
77
+ _See code: [src/commands/add/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/add/index.ts)_
77
78
 
78
79
  ## `hereya bootstrap INFRASTRUCTURETYPE`
79
80
 
@@ -98,7 +99,7 @@ EXAMPLES
98
99
  $ hereya bootstrap local
99
100
  ```
100
101
 
101
- _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/bootstrap/index.ts)_
102
+ _See code: [src/commands/bootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/bootstrap/index.ts)_
102
103
 
103
104
  ## `hereya deploy`
104
105
 
@@ -120,7 +121,7 @@ EXAMPLES
120
121
  $ hereya deploy
121
122
  ```
122
123
 
123
- _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/deploy/index.ts)_
124
+ _See code: [src/commands/deploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/deploy/index.ts)_
124
125
 
125
126
  ## `hereya down`
126
127
 
@@ -143,7 +144,7 @@ EXAMPLES
143
144
  $ hereya down
144
145
  ```
145
146
 
146
- _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/down/index.ts)_
147
+ _See code: [src/commands/down/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/down/index.ts)_
147
148
 
148
149
  ## `hereya env [NAME]`
149
150
 
@@ -174,7 +175,32 @@ EXAMPLES
174
175
  $ hereya env -w dev -l
175
176
  ```
176
177
 
177
- _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/env/index.ts)_
178
+ _See code: [src/commands/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/env/index.ts)_
179
+
180
+ ## `hereya env set [NAME]`
181
+
182
+ Set an environment variable for the current workspace
183
+
184
+ ```
185
+ USAGE
186
+ $ hereya env set [NAME] -v <value> [--chdir <value>] [-w <value>]
187
+
188
+ ARGUMENTS
189
+ NAME name of the environment variable to set
190
+
191
+ FLAGS
192
+ -v, --value=<value> (required) value of the environment variable
193
+ -w, --workspace=<value> name of the workspace to print the env vars for
194
+ --chdir=<value> project root directory
195
+
196
+ DESCRIPTION
197
+ Set an environment variable for the current workspace
198
+
199
+ EXAMPLES
200
+ $ hereya env set FOO bar
201
+ ```
202
+
203
+ _See code: [src/commands/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/env/set/index.ts)_
178
204
 
179
205
  ## `hereya help [COMMAND]`
180
206
 
@@ -220,7 +246,7 @@ EXAMPLES
220
246
  $ hereya init myProject -w=defaultWorkspace --chdir=./myProject
221
247
  ```
222
248
 
223
- _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/init/index.ts)_
249
+ _See code: [src/commands/init/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/init/index.ts)_
224
250
 
225
251
  ## `hereya remove PACKAGE`
226
252
 
@@ -244,7 +270,7 @@ EXAMPLES
244
270
  $ hereya remove cloudy/docker_postgres
245
271
  ```
246
272
 
247
- _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/remove/index.ts)_
273
+ _See code: [src/commands/remove/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/remove/index.ts)_
248
274
 
249
275
  ## `hereya run CMD`
250
276
 
@@ -270,7 +296,7 @@ EXAMPLES
270
296
  $ hereya run -w uat -- node index.js
271
297
  ```
272
298
 
273
- _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/run/index.ts)_
299
+ _See code: [src/commands/run/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/run/index.ts)_
274
300
 
275
301
  ## `hereya unbootstrap INFRASTRUCTURETYPE`
276
302
 
@@ -295,7 +321,7 @@ EXAMPLES
295
321
  $ hereya unbootstrap local
296
322
  ```
297
323
 
298
- _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/unbootstrap/index.ts)_
324
+ _See code: [src/commands/unbootstrap/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/unbootstrap/index.ts)_
299
325
 
300
326
  ## `hereya undeploy`
301
327
 
@@ -317,7 +343,7 @@ EXAMPLES
317
343
  $ hereya undeploy
318
344
  ```
319
345
 
320
- _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/undeploy/index.ts)_
346
+ _See code: [src/commands/undeploy/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/undeploy/index.ts)_
321
347
 
322
348
  ## `hereya up`
323
349
 
@@ -340,7 +366,7 @@ EXAMPLES
340
366
  $ hereya up
341
367
  ```
342
368
 
343
- _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/up/index.ts)_
369
+ _See code: [src/commands/up/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/up/index.ts)_
344
370
 
345
371
  ## `hereya workspace create NAME`
346
372
 
@@ -360,7 +386,7 @@ EXAMPLES
360
386
  $ hereya workspace create dev
361
387
  ```
362
388
 
363
- _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/workspace/create/index.ts)_
389
+ _See code: [src/commands/workspace/create/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/workspace/create/index.ts)_
364
390
 
365
391
  ## `hereya workspace delete NAME`
366
392
 
@@ -380,7 +406,7 @@ EXAMPLES
380
406
  $ hereya workspace delete dev
381
407
  ```
382
408
 
383
- _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/workspace/delete/index.ts)_
409
+ _See code: [src/commands/workspace/delete/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/workspace/delete/index.ts)_
384
410
 
385
411
  ## `hereya workspace env [NAME]`
386
412
 
@@ -406,7 +432,7 @@ EXAMPLES
406
432
  $ hereya workspace env myEnv -w dev
407
433
  ```
408
434
 
409
- _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/workspace/env/index.ts)_
435
+ _See code: [src/commands/workspace/env/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/workspace/env/index.ts)_
410
436
 
411
437
  ## `hereya workspace env set`
412
438
 
@@ -430,7 +456,7 @@ EXAMPLES
430
456
  $ hereya workspace env set -w my-workspace -n myVar -v my-value -i aws -s
431
457
  ```
432
458
 
433
- _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/workspace/env/set/index.ts)_
459
+ _See code: [src/commands/workspace/env/set/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/workspace/env/set/index.ts)_
434
460
 
435
461
  ## `hereya workspace env unset`
436
462
 
@@ -451,7 +477,7 @@ EXAMPLES
451
477
  $ hereya workspace env unset -w my-workspace -n myVar
452
478
  ```
453
479
 
454
- _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/workspace/env/unset/index.ts)_
480
+ _See code: [src/commands/workspace/env/unset/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/workspace/env/unset/index.ts)_
455
481
 
456
482
  ## `hereya workspace install PACKAGE`
457
483
 
@@ -459,7 +485,7 @@ Add a package to the workspace.
459
485
 
460
486
  ```
461
487
  USAGE
462
- $ hereya workspace install PACKAGE -w <value> [-p <value>] [-f <value>]
488
+ $ hereya workspace install PACKAGE -w <value> [--debug] [-p <value>] [-f <value>]
463
489
 
464
490
  ARGUMENTS
465
491
  PACKAGE The package to add. Packages are gitHub repositories. Use the format owner/repository
@@ -469,6 +495,7 @@ FLAGS
469
495
  -p, --parameter=<value>... [default: ] parameter for the package, in the form of 'key=value'. Can be specified
470
496
  multiple times.
471
497
  -w, --workspace=<value> (required) name of the workspace to add the package to
498
+ --debug enable debug mode
472
499
 
473
500
  DESCRIPTION
474
501
  Add a package to the workspace.
@@ -477,7 +504,7 @@ EXAMPLES
477
504
  $ hereya workspace install hereya/aws-cognito
478
505
  ```
479
506
 
480
- _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/workspace/install/index.ts)_
507
+ _See code: [src/commands/workspace/install/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/workspace/install/index.ts)_
481
508
 
482
509
  ## `hereya workspace uninstall PACKAGE`
483
510
 
@@ -485,7 +512,7 @@ Remove a package from a workspace.
485
512
 
486
513
  ```
487
514
  USAGE
488
- $ hereya workspace uninstall PACKAGE -w <value> [-p <value>] [-f <value>]
515
+ $ hereya workspace uninstall PACKAGE -w <value> [--debug] [-p <value>] [-f <value>]
489
516
 
490
517
  ARGUMENTS
491
518
  PACKAGE The package to remove. Packages are gitHub repositories. Use the format owner/repository
@@ -495,6 +522,7 @@ FLAGS
495
522
  -p, --parameter=<value>... [default: ] parameter for the package, in the form of 'key=value'. Can be specified
496
523
  multiple times.
497
524
  -w, --workspace=<value> (required) name of the workspace to remove the package from
525
+ --debug enable debug mode
498
526
 
499
527
  DESCRIPTION
500
528
  Remove a package from a workspace.
@@ -503,5 +531,5 @@ EXAMPLES
503
531
  $ hereya workspace uninstall hereya/aws-cognito
504
532
  ```
505
533
 
506
- _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.15.1/src/commands/workspace/uninstall/index.ts)_
534
+ _See code: [src/commands/workspace/uninstall/index.ts](https://github.com/hereya/hereya-cli/blob/v0.17.0/src/commands/workspace/uninstall/index.ts)_
507
535
  <!-- commandsstop -->
@@ -42,6 +42,12 @@ export default class Add extends Command {
42
42
  {
43
43
  async task(ctx, task) {
44
44
  return task.newListr([
45
+ {
46
+ async task(ctx) {
47
+ ctx.package = args.package;
48
+ ctx.userSpecifiedParameters = flags.parameter;
49
+ },
50
+ },
45
51
  {
46
52
  async task(ctx) {
47
53
  const configManager = getConfigManager();
@@ -71,10 +77,10 @@ export default class Add extends Command {
71
77
  },
72
78
  {
73
79
  async task(ctx) {
74
- const userSpecifiedParameters = arrayOfStringToObject(flags.parameter);
80
+ const userSpecifiedParameters = arrayOfStringToObject(ctx.userSpecifiedParameters);
75
81
  const parameterManager = getParameterManager();
76
82
  const parametersOutput = await parameterManager.getPackageParameters({
77
- package: args.package,
83
+ package: ctx.package,
78
84
  projectRootDir,
79
85
  userSpecifiedParameters,
80
86
  workspace: ctx.configOutput.config.workspace,
@@ -88,7 +94,7 @@ export default class Add extends Command {
88
94
  async task(ctx) {
89
95
  const provisionOutput = await provisionPackage({
90
96
  env: ctx.workspaceEnvOutput.env,
91
- package: args.package,
97
+ package: ctx.package,
92
98
  parameters: ctx.parametersOutput.parameters,
93
99
  project: ctx.configOutput.config.project,
94
100
  skipDeploy: true,
@@ -120,7 +126,7 @@ export default class Add extends Command {
120
126
  const configManager = getConfigManager();
121
127
  await configManager.addPackage({
122
128
  metadata: ctx.provisionOutput.metadata,
123
- package: args.package,
129
+ package: ctx.package,
124
130
  projectRootDir,
125
131
  });
126
132
  await delay(500);
@@ -135,7 +141,7 @@ export default class Add extends Command {
135
141
  await backend.saveState(newConfig);
136
142
  const parameterManager = getParameterManager();
137
143
  const { filePath, saved } = await parameterManager.savePackageParameters({
138
- package: args.package,
144
+ package: ctx.package,
139
145
  parameters: ctx.parametersOutput.parameters,
140
146
  projectRootDir,
141
147
  workspace: ctx.configOutput.config.workspace,
@@ -0,0 +1,14 @@
1
+ import { Command } from '@oclif/core';
2
+ export default class EnvSet extends Command {
3
+ static args: {
4
+ name: import("@oclif/core/lib/interfaces/parser.js").Arg<string | undefined, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ chdir: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
+ value: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
11
+ workspace: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
12
+ };
13
+ run(): Promise<void>;
14
+ }
@@ -0,0 +1,54 @@
1
+ import { Args, Command, Flags } from '@oclif/core';
2
+ import path from 'node:path';
3
+ import { getConfigManager } from '../../../lib/config/index.js';
4
+ import { getAnyPath } from '../../../lib/filesystem.js';
5
+ import { load, save } from '../../../lib/yaml-utils.js';
6
+ export default class EnvSet extends Command {
7
+ static args = {
8
+ name: Args.string({ description: 'name of the environment variable to set' }),
9
+ };
10
+ static description = 'Set an environment variable for the current workspace';
11
+ static examples = ['<%= config.bin %> <%= command.id %> FOO bar'];
12
+ static flags = {
13
+ chdir: Flags.string({
14
+ description: 'project root directory',
15
+ required: false,
16
+ }),
17
+ value: Flags.string({
18
+ char: 'v',
19
+ description: 'value of the environment variable',
20
+ required: true,
21
+ }),
22
+ workspace: Flags.string({
23
+ char: 'w',
24
+ description: 'name of the workspace to print the env vars for',
25
+ required: false,
26
+ }),
27
+ };
28
+ async run() {
29
+ const { args, flags } = await this.parse(EnvSet);
30
+ if (!args.name) {
31
+ this.error('Missing required argument name');
32
+ }
33
+ const projectRootDir = flags.chdir || process.env.HEREYA_PROJECT_ROOT_DIR;
34
+ const configManager = getConfigManager();
35
+ const loadConfigOutput = await configManager.loadConfig({ projectRootDir });
36
+ if (!loadConfigOutput.found) {
37
+ this.warn(`Project not initialized. Run 'hereya init' first.`);
38
+ return;
39
+ }
40
+ const rootDir = projectRootDir ?? process.cwd();
41
+ const candidates = flags.workspace ? [
42
+ path.join(rootDir, 'hereyastaticenv', `env.${flags.workspace}.yaml`),
43
+ path.join(rootDir, 'hereyastaticenv', `env.${flags.workspace}.yml`),
44
+ ] : [
45
+ path.join(rootDir, 'hereyastaticenv', `env.yaml`),
46
+ path.join(rootDir, 'hereyastaticenv', `env.yml`),
47
+ ];
48
+ const envFile = await getAnyPath(...candidates);
49
+ const { data: env, } = await load(envFile);
50
+ env[args.name] = flags.value;
51
+ await save(env, envFile);
52
+ this.log(`Environment variable ${args.name} set to ${flags.value} in ${envFile}`);
53
+ }
54
+ }
@@ -34,6 +34,11 @@ export default class Remove extends Command {
34
34
  {
35
35
  async task(ctx, task) {
36
36
  return task.newListr([
37
+ {
38
+ async task(ctx) {
39
+ ctx.package = args.package;
40
+ },
41
+ },
37
42
  {
38
43
  async task(ctx) {
39
44
  const configManager = getConfigManager();
@@ -43,8 +48,8 @@ export default class Remove extends Command {
43
48
  }
44
49
  ctx.configOutput = loadConfigOutput;
45
50
  const { config } = loadConfigOutput;
46
- if (!(args.package in (config.packages ?? {})) && !(args.package in (config.deploy ?? {}))) {
47
- throw new Error(`Package ${args.package} not found in project.`);
51
+ if (!(ctx.package in (config.packages ?? {})) && !(ctx.package in (config.deploy ?? {}))) {
52
+ throw new Error(`Package ${ctx.package} not found in the project.`);
48
53
  }
49
54
  await delay(500);
50
55
  },
@@ -69,7 +74,7 @@ export default class Remove extends Command {
69
74
  async task(ctx) {
70
75
  const parameterManager = getParameterManager();
71
76
  const parametersOutput = await parameterManager.getPackageParameters({
72
- package: args.package,
77
+ package: ctx.package,
73
78
  projectRootDir,
74
79
  workspace: ctx.configOutput.config.workspace,
75
80
  });
@@ -82,7 +87,7 @@ export default class Remove extends Command {
82
87
  async task(ctx) {
83
88
  const destroyOutput = await destroyPackage({
84
89
  env: ctx.workspaceEnvOutput.env,
85
- package: args.package,
90
+ package: ctx.package,
86
91
  parameters: ctx.parametersOutput.parameters,
87
92
  project: ctx.configOutput.config.project,
88
93
  skipDeploy: true,
@@ -113,7 +118,7 @@ export default class Remove extends Command {
113
118
  const configManager = getConfigManager();
114
119
  await configManager.removePackage({
115
120
  metadata: ctx.destroyOutput.metadata,
116
- package: args.package,
121
+ package: ctx.package,
117
122
  projectRootDir,
118
123
  });
119
124
  await delay(500);
@@ -6,6 +6,7 @@ export default class WorkspaceInstall extends Command {
6
6
  static description: string;
7
7
  static examples: string[];
8
8
  static flags: {
9
+ debug: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
9
10
  parameter: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
11
  'parameter-file': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
11
12
  workspace: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
@@ -1,24 +1,28 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
+ import { Listr, ListrLogLevels, ListrLogger } from 'listr2';
2
3
  import { getBackend } from '../../../backend/index.js';
3
4
  import { provisionPackage } from '../../../infrastructure/index.js';
4
5
  import { arrayOfStringToObject } from '../../../lib/object-utils.js';
6
+ import { delay, setDebug } from '../../../lib/shell.js';
5
7
  import { load } from '../../../lib/yaml-utils.js';
6
8
  export default class WorkspaceInstall extends Command {
7
9
  static args = {
8
10
  package: Args.string({
9
11
  description: 'The package to add. Packages are gitHub repositories. Use the format owner/repository',
10
- required: true
12
+ required: true,
11
13
  }),
12
14
  };
13
15
  static description = 'Add a package to the workspace.';
14
- static examples = [
15
- '<%= config.bin %> <%= command.id %> hereya/aws-cognito',
16
- ];
16
+ static examples = ['<%= config.bin %> <%= command.id %> hereya/aws-cognito'];
17
17
  static flags = {
18
+ debug: Flags.boolean({
19
+ default: false,
20
+ description: 'enable debug mode',
21
+ }),
18
22
  parameter: Flags.string({
19
23
  char: 'p',
20
24
  default: [],
21
- description: 'parameter for the package, in the form of \'key=value\'. Can be specified multiple times.',
25
+ description: "parameter for the package, in the form of 'key=value'. Can be specified multiple times.",
22
26
  multiple: true,
23
27
  }),
24
28
  'parameter-file': Flags.string({
@@ -33,42 +37,84 @@ export default class WorkspaceInstall extends Command {
33
37
  };
34
38
  async run() {
35
39
  const { args, flags } = await this.parse(WorkspaceInstall);
36
- const backend = await getBackend();
37
- const loadWorkspaceOutput = await backend.getWorkspace(flags.workspace);
38
- if (!loadWorkspaceOutput.found || loadWorkspaceOutput.hasError) {
39
- this.error(`Workspace ${flags.workspace} not found`);
40
- }
41
- const parametersInCmdline = arrayOfStringToObject(flags.parameter);
42
- let parametersFromFile = {};
43
- if (flags['parameter-file']) {
44
- const { data, found } = await load(flags['parameter-file']);
45
- if (!found) {
46
- this.error(`Parameter file ${flags['parameter-file']} not found`);
47
- }
48
- parametersFromFile = data;
49
- }
50
- const parameters = { ...parametersFromFile, ...parametersInCmdline };
51
- const provisionOutput = await provisionPackage({
52
- package: args.package,
53
- parameters,
54
- workspace: flags.workspace,
55
- });
56
- if (!provisionOutput.success) {
57
- this.error(provisionOutput.reason);
40
+ setDebug(flags.debug);
41
+ const myLogger = new ListrLogger({ useIcons: false });
42
+ const task = new Listr([
43
+ {
44
+ async task(ctx, task) {
45
+ return task.newListr([
46
+ {
47
+ async task(ctx) {
48
+ const backend = await getBackend();
49
+ const loadWorkspaceOutput = await backend.getWorkspace(flags.workspace);
50
+ if (!loadWorkspaceOutput.found || loadWorkspaceOutput.hasError) {
51
+ throw new Error(`Workspace ${flags.workspace} not found`);
52
+ }
53
+ ctx.workspace = loadWorkspaceOutput;
54
+ await delay(500);
55
+ },
56
+ title: `Loading workspace ${flags.workspace}`,
57
+ },
58
+ {
59
+ async task(ctx) {
60
+ const parametersInCmdline = arrayOfStringToObject(flags.parameter);
61
+ let parametersFromFile = {};
62
+ if (flags['parameter-file']) {
63
+ const { data, found } = await load(flags['parameter-file']);
64
+ if (!found) {
65
+ throw new Error(`Parameter file ${flags['parameter-file']} not found`);
66
+ }
67
+ parametersFromFile = data;
68
+ }
69
+ const parameters = { ...parametersFromFile, ...parametersInCmdline };
70
+ ctx.parameters = parameters;
71
+ await delay(500);
72
+ },
73
+ title: 'Resolving parameters',
74
+ },
75
+ {
76
+ async task(ctx) {
77
+ const provisionOutput = await provisionPackage({
78
+ package: args.package,
79
+ parameters: ctx.parameters,
80
+ workspace: flags.workspace,
81
+ });
82
+ if (!provisionOutput.success) {
83
+ throw new Error(provisionOutput.reason);
84
+ }
85
+ ctx.provisionOutput = provisionOutput;
86
+ },
87
+ title: 'Provisioning package',
88
+ },
89
+ {
90
+ async task(ctx) {
91
+ const { env, metadata } = ctx.provisionOutput;
92
+ const backend = await getBackend();
93
+ const output = await backend.addPackageToWorkspace({
94
+ env,
95
+ infra: metadata.infra,
96
+ package: args.package,
97
+ parameters: ctx.parameters,
98
+ workspace: flags.workspace,
99
+ });
100
+ if (!output.success) {
101
+ throw new Error(output.reason);
102
+ }
103
+ },
104
+ title: 'Saving exported environment variables to workspace',
105
+ },
106
+ ]);
107
+ },
108
+ title: `Installing ${args.package} into workspace ${flags.workspace}`,
109
+ },
110
+ ], { concurrent: false });
111
+ try {
112
+ await task.run();
113
+ myLogger.log(ListrLogLevels.COMPLETED, `Package ${args.package} installed successfully into workspace ${flags.workspace}`);
58
114
  }
59
- const { env, metadata } = provisionOutput;
60
- this.log(`Package ${args.package} provisioned successfully`);
61
- this.log(`Saving exported environment variables to workspace ${flags.workspace}...`);
62
- const output = await backend.addPackageToWorkspace({
63
- env,
64
- infra: metadata.infra,
65
- package: args.package,
66
- parameters,
67
- workspace: flags.workspace,
68
- });
69
- if (!output.success) {
70
- this.error(output.reason);
115
+ catch (error) {
116
+ myLogger.log(ListrLogLevels.FAILED, error);
117
+ this.error(error.message);
71
118
  }
72
- this.log(`Package ${args.package} added to workspace ${flags.workspace}`);
73
119
  }
74
120
  }
@@ -6,6 +6,7 @@ export default class WorkspaceUninstall extends Command {
6
6
  static description: string;
7
7
  static examples: string[];
8
8
  static flags: {
9
+ debug: import("@oclif/core/lib/interfaces/parser.js").BooleanFlag<boolean>;
9
10
  parameter: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string[], import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
10
11
  'parameter-file': import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
11
12
  workspace: import("@oclif/core/lib/interfaces/parser.js").OptionFlag<string, import("@oclif/core/lib/interfaces/parser.js").CustomOptions>;
@@ -1,24 +1,28 @@
1
1
  import { Args, Command, Flags } from '@oclif/core';
2
+ import { Listr, ListrLogLevels, ListrLogger } from 'listr2';
2
3
  import { getBackend } from '../../../backend/index.js';
3
4
  import { destroyPackage } from '../../../infrastructure/index.js';
4
5
  import { arrayOfStringToObject } from '../../../lib/object-utils.js';
6
+ import { delay, setDebug } from '../../../lib/shell.js';
5
7
  import { load } from '../../../lib/yaml-utils.js';
6
8
  export default class WorkspaceUninstall extends Command {
7
9
  static args = {
8
10
  package: Args.string({
9
11
  description: 'The package to remove. Packages are gitHub repositories. Use the format owner/repository',
10
- required: true
12
+ required: true,
11
13
  }),
12
14
  };
13
15
  static description = 'Remove a package from a workspace.';
14
- static examples = [
15
- '<%= config.bin %> <%= command.id %> hereya/aws-cognito',
16
- ];
16
+ static examples = ['<%= config.bin %> <%= command.id %> hereya/aws-cognito'];
17
17
  static flags = {
18
+ debug: Flags.boolean({
19
+ default: false,
20
+ description: 'enable debug mode',
21
+ }),
18
22
  parameter: Flags.string({
19
23
  char: 'p',
20
24
  default: [],
21
- description: 'parameter for the package, in the form of \'key=value\'. Can be specified multiple times.',
25
+ description: "parameter for the package, in the form of 'key=value'. Can be specified multiple times.",
22
26
  multiple: true,
23
27
  }),
24
28
  'parameter-file': Flags.string({
@@ -33,53 +37,90 @@ export default class WorkspaceUninstall extends Command {
33
37
  };
34
38
  async run() {
35
39
  const { args, flags } = await this.parse(WorkspaceUninstall);
36
- const backend = await getBackend();
37
- const loadWorkspaceOutput = await backend.getWorkspace(flags.workspace);
38
- if (!loadWorkspaceOutput.found) {
39
- this.error(`Workspace ${flags.workspace} not found`);
40
- }
41
- if (loadWorkspaceOutput.hasError) {
42
- this.error(`Error loading workspace ${flags.workspace}: ${loadWorkspaceOutput.error}`);
43
- }
44
- const { workspace } = loadWorkspaceOutput;
45
- if (!(args.package in (workspace.packages ?? {}))) {
46
- this.log(`Package ${args.package} not found in workspace ${flags.workspace}`);
47
- return;
48
- }
49
- const parametersInCmdline = arrayOfStringToObject(flags.parameter);
50
- let parametersFromFile = {};
51
- if (flags['parameter-file']) {
52
- const { data, found } = await load(flags['parameter-file']);
53
- if (!found) {
54
- this.error(`Parameter file ${flags['parameter-file']} not found`);
55
- }
56
- parametersFromFile = data;
57
- }
58
- const parameters = {
59
- ...workspace.packages?.[args.package].parameters,
60
- ...parametersFromFile,
61
- ...parametersInCmdline
62
- };
63
- const destroyOutput = await destroyPackage({
64
- package: args.package,
65
- parameters,
66
- workspace: flags.workspace,
67
- });
68
- if (!destroyOutput.success) {
69
- this.error(destroyOutput.reason);
40
+ setDebug(flags.debug);
41
+ const myLogger = new ListrLogger({ useIcons: false });
42
+ const task = new Listr([
43
+ {
44
+ async task(ctx, task) {
45
+ return task.newListr([
46
+ {
47
+ async task(ctx) {
48
+ const backend = await getBackend();
49
+ const loadWorkspaceOutput = await backend.getWorkspace(flags.workspace);
50
+ if (!loadWorkspaceOutput.found || loadWorkspaceOutput.hasError) {
51
+ throw new Error(`Workspace ${flags.workspace} not found`);
52
+ }
53
+ if (!(args.package in (loadWorkspaceOutput.workspace.packages ?? {}))) {
54
+ throw new Error(`Package ${args.package} not found in workspace ${flags.workspace}`);
55
+ }
56
+ ctx.workspace = loadWorkspaceOutput;
57
+ await delay(500);
58
+ },
59
+ title: `Loading workspace ${flags.workspace}`,
60
+ },
61
+ {
62
+ async task(ctx) {
63
+ const parametersInCmdline = arrayOfStringToObject(flags.parameter);
64
+ let parametersFromFile = {};
65
+ if (flags['parameter-file']) {
66
+ const { data, found } = await load(flags['parameter-file']);
67
+ if (!found) {
68
+ throw new Error(`Parameter file ${flags['parameter-file']} not found`);
69
+ }
70
+ parametersFromFile = data;
71
+ }
72
+ const parameters = {
73
+ ...ctx.workspace.workspace.packages?.[args.package].parameters,
74
+ ...parametersFromFile,
75
+ ...parametersInCmdline,
76
+ };
77
+ ctx.parameters = parameters;
78
+ await delay(500);
79
+ },
80
+ title: 'Resolving parameters',
81
+ },
82
+ {
83
+ async task(ctx) {
84
+ const destroyOutput = await destroyPackage({
85
+ package: args.package,
86
+ parameters: ctx.parameters,
87
+ workspace: flags.workspace,
88
+ });
89
+ if (!destroyOutput.success) {
90
+ throw new Error(destroyOutput.reason);
91
+ }
92
+ ctx.destroyOutput = destroyOutput;
93
+ },
94
+ title: 'Destroying package',
95
+ },
96
+ {
97
+ async task(ctx) {
98
+ const { env, metadata } = ctx.destroyOutput;
99
+ const backend = await getBackend();
100
+ const output = await backend.removePackageFromWorkspace({
101
+ env,
102
+ infra: metadata.infra,
103
+ package: args.package,
104
+ workspace: flags.workspace,
105
+ });
106
+ if (!output.success) {
107
+ throw new Error(output.reason);
108
+ }
109
+ },
110
+ title: 'Removing exported environment variables from workspace',
111
+ },
112
+ ]);
113
+ },
114
+ title: `Uninstalling package ${args.package} from workspace ${flags.workspace}`,
115
+ },
116
+ ]);
117
+ try {
118
+ await task.run();
119
+ myLogger.log(ListrLogLevels.COMPLETED, `Package ${args.package} uninstalled successfully from workspace ${flags.workspace}`);
70
120
  }
71
- const { env, metadata } = destroyOutput;
72
- this.log(`Package ${args.package} removed successfully`);
73
- this.log(`removing exported environment variables from workspace ${flags.workspace}...`);
74
- const output = await backend.removePackageFromWorkspace({
75
- env,
76
- infra: metadata.infra,
77
- package: args.package,
78
- workspace: flags.workspace,
79
- });
80
- if (!output.success) {
81
- this.error(output.reason);
121
+ catch (error) {
122
+ myLogger.log(ListrLogLevels.FAILED, error);
123
+ this.error(error.message);
82
124
  }
83
- this.log(`Package ${args.package} removed from workspace ${flags.workspace}`);
84
125
  }
85
126
  }
@@ -4,6 +4,7 @@ export declare class EnvManager {
4
4
  getProjectEnv(input: GetProjectEnvInput): Promise<GetProjectEnvOutput>;
5
5
  removeProjectEnv(input: RemoveEnvInput): Promise<void>;
6
6
  private getEnvPath;
7
+ private getUserEnvPaths;
7
8
  }
8
9
  export declare const envManager: EnvManager;
9
10
  export declare function getEnvManager(): EnvManager;
@@ -6,19 +6,24 @@ export class EnvManager {
6
6
  async addProjectEnv(input) {
7
7
  const envPath = await this.getEnvPath(input);
8
8
  const { data: existingEnv } = await load(envPath);
9
- const newEnv = Object.fromEntries(Object.entries(input.env)
10
- .map(([key, value]) => [key, `${input.infra}:${value}`]));
9
+ const newEnv = Object.fromEntries(Object.entries(input.env).map(([key, value]) => [key, `${input.infra}:${value}`]));
11
10
  const finalEnv = { ...existingEnv, ...newEnv };
12
11
  await save(finalEnv, envPath);
13
12
  }
14
13
  async getProjectEnv(input) {
15
14
  const envPath = await this.getEnvPath(input);
16
15
  const { data: env, found } = await load(envPath);
17
- if (!found) {
18
- return { env: {} };
16
+ let resolvedEnv = {};
17
+ if (found) {
18
+ resolvedEnv = await resolveEnvValues(env, { markSecret: input.markSecret });
19
+ }
20
+ const userEnvs = await this.getUserEnvPaths(input).then((paths) => Promise.all(paths.map((path) => load(path))));
21
+ let userMergedEnv = {};
22
+ for (const { data } of userEnvs) {
23
+ userMergedEnv = { ...userMergedEnv, ...data };
19
24
  }
20
- const resolvedEnv = await resolveEnvValues(env, { markSecret: input.markSecret });
21
- return { env: resolvedEnv };
25
+ const finalEnv = { ...resolvedEnv, ...userMergedEnv };
26
+ return { env: finalEnv };
22
27
  }
23
28
  async removeProjectEnv(input) {
24
29
  const envPath = await this.getEnvPath(input);
@@ -27,14 +32,19 @@ export class EnvManager {
27
32
  return;
28
33
  }
29
34
  const envKeysToRemove = Object.keys(input.env);
30
- const finalEnv = Object.fromEntries(Object
31
- .entries(existingEnv)
32
- .filter(([key]) => !envKeysToRemove.includes(key)));
35
+ const finalEnv = Object.fromEntries(Object.entries(existingEnv).filter(([key]) => !envKeysToRemove.includes(key)));
33
36
  await save(finalEnv, envPath);
34
37
  }
35
38
  async getEnvPath(input) {
36
39
  return getAnyPath(path.join(input.projectRootDir ?? process.cwd(), '.hereya', `env.${input.workspace}.yaml`), path.join(input.projectRootDir ?? process.cwd(), '.hereya', `env.${input.workspace}.yml`));
37
40
  }
41
+ async getUserEnvPaths(input) {
42
+ const paths = await Promise.all([
43
+ getAnyPath(path.join(input.projectRootDir ?? process.cwd(), 'hereyastaticenv', `env.yaml`), path.join(input.projectRootDir ?? process.cwd(), 'hereyastaticenv', `env.yml`)),
44
+ getAnyPath(path.join(input.projectRootDir ?? process.cwd(), 'hereyastaticenv', `env.${input.workspace}.yaml`), path.join(input.projectRootDir ?? process.cwd(), 'hereyastaticenv', `env.${input.workspace}.yml`)),
45
+ ]);
46
+ return paths;
47
+ }
38
48
  }
39
49
  export const envManager = new EnvManager();
40
50
  export function getEnvManager() {
@@ -54,6 +54,45 @@
54
54
  "index.js"
55
55
  ]
56
56
  },
57
+ "bootstrap": {
58
+ "aliases": [],
59
+ "args": {
60
+ "infrastructureType": {
61
+ "description": "infrastructure to bootstrap. Options are local, aws",
62
+ "name": "infrastructureType",
63
+ "required": true
64
+ }
65
+ },
66
+ "description": "Install necessary resources for hereya operations in an infrastructure.",
67
+ "examples": [
68
+ "<%= config.bin %> <%= command.id %> aws",
69
+ "<%= config.bin %> <%= command.id %> local"
70
+ ],
71
+ "flags": {
72
+ "force": {
73
+ "char": "f",
74
+ "description": "redeploy hereya resources if already deployed",
75
+ "name": "force",
76
+ "allowNo": false,
77
+ "type": "boolean"
78
+ }
79
+ },
80
+ "hasDynamicHelp": false,
81
+ "hiddenAliases": [],
82
+ "id": "bootstrap",
83
+ "pluginAlias": "hereya-cli",
84
+ "pluginName": "hereya-cli",
85
+ "pluginType": "core",
86
+ "strict": true,
87
+ "enableJsonFlag": false,
88
+ "isESM": true,
89
+ "relativePath": [
90
+ "dist",
91
+ "commands",
92
+ "bootstrap",
93
+ "index.js"
94
+ ]
95
+ },
57
96
  "deploy": {
58
97
  "aliases": [],
59
98
  "args": {},
@@ -102,45 +141,6 @@
102
141
  "index.js"
103
142
  ]
104
143
  },
105
- "bootstrap": {
106
- "aliases": [],
107
- "args": {
108
- "infrastructureType": {
109
- "description": "infrastructure to bootstrap. Options are local, aws",
110
- "name": "infrastructureType",
111
- "required": true
112
- }
113
- },
114
- "description": "Install necessary resources for hereya operations in an infrastructure.",
115
- "examples": [
116
- "<%= config.bin %> <%= command.id %> aws",
117
- "<%= config.bin %> <%= command.id %> local"
118
- ],
119
- "flags": {
120
- "force": {
121
- "char": "f",
122
- "description": "redeploy hereya resources if already deployed",
123
- "name": "force",
124
- "allowNo": false,
125
- "type": "boolean"
126
- }
127
- },
128
- "hasDynamicHelp": false,
129
- "hiddenAliases": [],
130
- "id": "bootstrap",
131
- "pluginAlias": "hereya-cli",
132
- "pluginName": "hereya-cli",
133
- "pluginType": "core",
134
- "strict": true,
135
- "enableJsonFlag": false,
136
- "isESM": true,
137
- "relativePath": [
138
- "dist",
139
- "commands",
140
- "bootstrap",
141
- "index.js"
142
- ]
143
- },
144
144
  "down": {
145
145
  "aliases": [],
146
146
  "args": {},
@@ -540,6 +540,63 @@
540
540
  "index.js"
541
541
  ]
542
542
  },
543
+ "env:set": {
544
+ "aliases": [],
545
+ "args": {
546
+ "name": {
547
+ "description": "name of the environment variable to set",
548
+ "name": "name"
549
+ }
550
+ },
551
+ "description": "Set an environment variable for the current workspace",
552
+ "examples": [
553
+ "<%= config.bin %> <%= command.id %> FOO bar"
554
+ ],
555
+ "flags": {
556
+ "chdir": {
557
+ "description": "project root directory",
558
+ "name": "chdir",
559
+ "required": false,
560
+ "hasDynamicHelp": false,
561
+ "multiple": false,
562
+ "type": "option"
563
+ },
564
+ "value": {
565
+ "char": "v",
566
+ "description": "value of the environment variable",
567
+ "name": "value",
568
+ "required": true,
569
+ "hasDynamicHelp": false,
570
+ "multiple": false,
571
+ "type": "option"
572
+ },
573
+ "workspace": {
574
+ "char": "w",
575
+ "description": "name of the workspace to print the env vars for",
576
+ "name": "workspace",
577
+ "required": false,
578
+ "hasDynamicHelp": false,
579
+ "multiple": false,
580
+ "type": "option"
581
+ }
582
+ },
583
+ "hasDynamicHelp": false,
584
+ "hiddenAliases": [],
585
+ "id": "env:set",
586
+ "pluginAlias": "hereya-cli",
587
+ "pluginName": "hereya-cli",
588
+ "pluginType": "core",
589
+ "strict": true,
590
+ "enableJsonFlag": false,
591
+ "isESM": true,
592
+ "relativePath": [
593
+ "dist",
594
+ "commands",
595
+ "env",
596
+ "set",
597
+ "index.js"
598
+ ]
599
+ },
543
600
  "workspace:create": {
544
601
  "aliases": [],
545
602
  "args": {
@@ -666,6 +723,12 @@
666
723
  "<%= config.bin %> <%= command.id %> hereya/aws-cognito"
667
724
  ],
668
725
  "flags": {
726
+ "debug": {
727
+ "description": "enable debug mode",
728
+ "name": "debug",
729
+ "allowNo": false,
730
+ "type": "boolean"
731
+ },
669
732
  "parameter": {
670
733
  "char": "p",
671
734
  "description": "parameter for the package, in the form of 'key=value'. Can be specified multiple times.",
@@ -724,6 +787,12 @@
724
787
  "<%= config.bin %> <%= command.id %> hereya/aws-cognito"
725
788
  ],
726
789
  "flags": {
790
+ "debug": {
791
+ "description": "enable debug mode",
792
+ "name": "debug",
793
+ "allowNo": false,
794
+ "type": "boolean"
795
+ },
727
796
  "parameter": {
728
797
  "char": "p",
729
798
  "description": "parameter for the package, in the form of 'key=value'. Can be specified multiple times.",
@@ -768,26 +837,51 @@
768
837
  "index.js"
769
838
  ]
770
839
  },
771
- "workspace:env:unset": {
840
+ "workspace:env:set": {
772
841
  "aliases": [],
773
842
  "args": {},
774
- "description": "unset an env var for a workspace",
843
+ "description": "set an env var for a workspace",
775
844
  "examples": [
776
- "<%= config.bin %> <%= command.id %> -w my-workspace -n myVar"
845
+ "<%= config.bin %> <%= command.id %> -w my-workspace -n myVar -v my-value -i aws -s"
777
846
  ],
778
847
  "flags": {
848
+ "infra": {
849
+ "char": "i",
850
+ "description": "the infrastructure to store the env var in",
851
+ "name": "infra",
852
+ "required": true,
853
+ "hasDynamicHelp": false,
854
+ "multiple": false,
855
+ "type": "option"
856
+ },
779
857
  "name": {
780
858
  "char": "n",
781
- "description": "name of the env var to unset",
859
+ "description": "name of the env var to set",
782
860
  "name": "name",
783
861
  "required": true,
784
862
  "hasDynamicHelp": false,
785
863
  "multiple": false,
786
864
  "type": "option"
787
865
  },
866
+ "sensitive": {
867
+ "char": "s",
868
+ "description": "whether the env var is sensitive",
869
+ "name": "sensitive",
870
+ "allowNo": false,
871
+ "type": "boolean"
872
+ },
873
+ "value": {
874
+ "char": "v",
875
+ "description": "value of the env var to set",
876
+ "name": "value",
877
+ "required": true,
878
+ "hasDynamicHelp": false,
879
+ "multiple": false,
880
+ "type": "option"
881
+ },
788
882
  "workspace": {
789
883
  "char": "w",
790
- "description": "name of the workspace to unset an env var for",
884
+ "description": "name of the workspace to set an env var for",
791
885
  "name": "workspace",
792
886
  "required": true,
793
887
  "hasDynamicHelp": false,
@@ -797,7 +891,7 @@
797
891
  },
798
892
  "hasDynamicHelp": false,
799
893
  "hiddenAliases": [],
800
- "id": "workspace:env:unset",
894
+ "id": "workspace:env:set",
801
895
  "pluginAlias": "hereya-cli",
802
896
  "pluginName": "hereya-cli",
803
897
  "pluginType": "core",
@@ -809,55 +903,30 @@
809
903
  "commands",
810
904
  "workspace",
811
905
  "env",
812
- "unset",
906
+ "set",
813
907
  "index.js"
814
908
  ]
815
909
  },
816
- "workspace:env:set": {
910
+ "workspace:env:unset": {
817
911
  "aliases": [],
818
912
  "args": {},
819
- "description": "set an env var for a workspace",
913
+ "description": "unset an env var for a workspace",
820
914
  "examples": [
821
- "<%= config.bin %> <%= command.id %> -w my-workspace -n myVar -v my-value -i aws -s"
915
+ "<%= config.bin %> <%= command.id %> -w my-workspace -n myVar"
822
916
  ],
823
917
  "flags": {
824
- "infra": {
825
- "char": "i",
826
- "description": "the infrastructure to store the env var in",
827
- "name": "infra",
828
- "required": true,
829
- "hasDynamicHelp": false,
830
- "multiple": false,
831
- "type": "option"
832
- },
833
918
  "name": {
834
919
  "char": "n",
835
- "description": "name of the env var to set",
920
+ "description": "name of the env var to unset",
836
921
  "name": "name",
837
922
  "required": true,
838
923
  "hasDynamicHelp": false,
839
924
  "multiple": false,
840
925
  "type": "option"
841
926
  },
842
- "sensitive": {
843
- "char": "s",
844
- "description": "whether the env var is sensitive",
845
- "name": "sensitive",
846
- "allowNo": false,
847
- "type": "boolean"
848
- },
849
- "value": {
850
- "char": "v",
851
- "description": "value of the env var to set",
852
- "name": "value",
853
- "required": true,
854
- "hasDynamicHelp": false,
855
- "multiple": false,
856
- "type": "option"
857
- },
858
927
  "workspace": {
859
928
  "char": "w",
860
- "description": "name of the workspace to set an env var for",
929
+ "description": "name of the workspace to unset an env var for",
861
930
  "name": "workspace",
862
931
  "required": true,
863
932
  "hasDynamicHelp": false,
@@ -867,7 +936,7 @@
867
936
  },
868
937
  "hasDynamicHelp": false,
869
938
  "hiddenAliases": [],
870
- "id": "workspace:env:set",
939
+ "id": "workspace:env:unset",
871
940
  "pluginAlias": "hereya-cli",
872
941
  "pluginName": "hereya-cli",
873
942
  "pluginType": "core",
@@ -879,10 +948,10 @@
879
948
  "commands",
880
949
  "workspace",
881
950
  "env",
882
- "set",
951
+ "unset",
883
952
  "index.js"
884
953
  ]
885
954
  }
886
955
  },
887
- "version": "0.15.1"
956
+ "version": "0.17.0"
888
957
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hereya-cli",
3
3
  "description": "Infrastructure as Package",
4
- "version": "0.15.1",
4
+ "version": "0.17.0",
5
5
  "author": "Hereya Developers",
6
6
  "bin": {
7
7
  "hereya": "./bin/run.js"