@mono-labs/cli 0.0.123 → 0.0.124

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.
Files changed (2) hide show
  1. package/lib/index.js +1 -14
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -23,7 +23,6 @@ const preactions = config.workspace?.preactions || [];
23
23
  const envMapList = config.envMap ?? ['FAILURE'];
24
24
 
25
25
  program.on('command:*', (operands) => {
26
-
27
26
  const [cmd] = operands; // e.g. "destroy3"
28
27
  const raw = program.rawArgs.slice(2); // after `node script.js`
29
28
  const i = raw.indexOf(cmd);
@@ -31,40 +30,28 @@ program.on('command:*', (operands) => {
31
30
 
32
31
  const workspace = workspacemap[tokens[0]] || tokens[0];
33
32
  let rest = tokens.slice(1);
34
-
35
-
36
33
 
37
34
  const envKeys = Object.keys(process.env).filter((k) => k.startsWith('MONO_'));
38
35
 
39
36
  let envObj = {};
40
37
 
41
-
42
38
  envKeys.map((k) => {
43
39
  envMapList.map((item) => {
44
40
  envObj[k.replace('MONO', item)] = process.env[k];
45
41
  });
46
42
  });
47
43
 
48
-
49
-
50
- // If the “rest” is empty or starts with flags, insert a default script
51
-
52
44
  const args = ['workspace', workspace, ...rest];
53
-
54
45
 
55
46
  console.error(`Unknown command. Falling back to: yarn ${args.join(' ')}`);
56
47
  executeCommandsIfWorkspaceAction(args, preactions, envObj);
57
-
58
- stdio: 'inherit',
59
- shell: process.platform === 'win32',
60
- });
61
48
  const child = spawn('yarn', args, {
62
49
  stdio: 'inherit',
63
50
  shell: process.platform === 'win32',
64
51
  env: { ...process.env, ...envObj },
65
52
  });
66
53
  child.on('exit', (code) => {
67
-
54
+ console.log('Child process exited with code:', code);
68
55
  process.exitCode = code ?? 1;
69
56
  });
70
57
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-labs/cli",
3
- "version": "0.0.123",
3
+ "version": "0.0.124",
4
4
  "description": "A CLI tool for building and deploying projects",
5
5
  "type": "module",
6
6
  "main": "index.js",