@mono-labs/cli 0.0.92 → 0.0.94

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.
@@ -71,6 +71,13 @@ export function buildCommands(files) {
71
71
  if (meta.default !== undefined) setData(optionKey, meta.default);
72
72
  }
73
73
  });
74
+ config.prodFlag = config.prodFlag || 'prod';
75
+
76
+ current = current.option(
77
+ `--${config.prodFlag}`,
78
+ 'Process execution mode: prduction or dev',
79
+ false
80
+ );
74
81
 
75
82
  current.action(async (arg, cmd) => {
76
83
  let envDefaults = {};
@@ -1,27 +1,27 @@
1
- import { spawn } from 'child_process'
1
+ import { spawn } from 'child_process';
2
2
 
3
- import { program } from '../app.js'
3
+ import { program } from '../app.js';
4
4
 
5
5
  program
6
- .command('destroy')
6
+ .command('destroy2')
7
7
  .description('Destroys the current or specified cdk construct')
8
8
  .argument('[<string>]', 'Environment to deploy')
9
9
  .option('-d, --dev', 'Deploy to dev environment')
10
10
  .option('-r, --region <region>', 'Region to deploy to')
11
11
  .action((str, options) => {
12
- const owner = str || 'dev'
13
- const region = options.region || 'us-east-2'
14
- console.log(`Deploying to ${owner} environment`)
15
- const command = `workspace infra cdk destroy`
16
- const inputs = `-c owner=${owner} -c region=${region}`
17
- console.log(`Inputs: ${inputs}`)
12
+ const owner = str || 'dev';
13
+ const region = options.region || 'us-east-2';
14
+ console.log(`Deploying to ${owner} environment`);
15
+ const command = `workspace infra cdk destroy`;
16
+ const inputs = `-c owner=${owner} -c region=${region}`;
17
+ console.log(`Inputs: ${inputs}`);
18
18
  const child = spawn('yarn', [`${command} ${inputs}`], {
19
19
  stdio: 'inherit',
20
20
  shell: true, // required if using shell-style commands or cross-platform support
21
- })
21
+ });
22
22
 
23
23
  child.on('exit', (code) => {
24
- console.log(`Process exited with code ${code}`)
25
- process.exit(code ?? 0)
26
- })
27
- })
24
+ console.log(`Process exited with code ${code}`);
25
+ process.exit(code ?? 0);
26
+ });
27
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-labs/cli",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "description": "A CLI tool for building and deploying projects",
5
5
  "type": "module",
6
6
  "main": "index.js",