@mono-labs/cli 0.0.60 → 0.0.62

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.
@@ -2,6 +2,15 @@ import { spawn } from 'child_process';
2
2
  import { getData, replaceTokens } from '../dataLayer.js';
3
3
  import { registerBackground } from './processManager.js';
4
4
 
5
+ function createdExpandedEnv(envObj) {
6
+ const expandedEnv = {};
7
+ for (const k of Object.keys(envObj)) {
8
+ const v = envObj[k];
9
+ expandedEnv[k] = typeof v === 'string' ? replaceTokens(v) : v;
10
+ }
11
+ return expandedEnv;
12
+ }
13
+
5
14
  export function runBackground(
6
15
  cmd,
7
16
  envObj = {},
@@ -11,11 +20,8 @@ export function runBackground(
11
20
  const isWin = process.platform === 'win32';
12
21
 
13
22
  // Replace ${field} tokens in env values using dataLayer
14
- const expandedEnv = {};
15
- for (const k of Object.keys(envObj)) {
16
- const v = envObj[k];
17
- expandedEnv[k] = typeof v === 'string' ? replaceTokens(v) : v;
18
- }
23
+ console.log('envObj:', envObj);
24
+ const expandedEnv = createdExpandedEnv(envObj);
19
25
 
20
26
  // Replace in command string
21
27
  const outCmd = replaceTokens(cmd);
@@ -18,12 +18,10 @@ export function executeCommandsIfWorkspaceAction(action, commands = []) {
18
18
 
19
19
  const workspaces = result.map((w) => w.name);
20
20
  console.log('workspacemap', workspacemap);
21
- const workspaceMapAction =
22
- workspacemap ? workspacemap[action[1]] || action[1] : action[1];
23
21
  console.log('workspacemap', workspacemap !== undefined);
24
22
  console.log('workspacemap:key', workspacemap[action[1]]);
25
- console.log('workspaceMapAction', workspaceMapAction);
26
- const actualAction = workspacemap ? workspacemap[action[1]] || '' : action[1];
23
+ const actualAction =
24
+ workspacemap ? workspacemap[action[1]] || action[1] : action[1];
27
25
  console.log('actualAction', actualAction);
28
26
  console.log('workspaces', workspaces);
29
27
  console.log('action', action);
@@ -35,8 +33,6 @@ export function executeCommandsIfWorkspaceAction(action, commands = []) {
35
33
 
36
34
  console.log('workspacesList', workspacesList);
37
35
 
38
- const actualAction2 = actualAction;
39
-
40
36
  console.log('unfiltered result', result);
41
37
  const filteredResult =
42
38
  result.filter((obj) => obj.name === actualAction)[0] || {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mono-labs/cli",
3
- "version": "0.0.60",
3
+ "version": "0.0.62",
4
4
  "description": "A CLI tool for building and deploying projects",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -30,10 +30,10 @@
30
30
  "deploy",
31
31
  "tool"
32
32
  ],
33
- "author": "Your Name",
33
+ "author": "Cody Jones",
34
34
  "license": "MIT",
35
35
  "engines": {
36
- "node": ">=14.0.0"
36
+ "node": ">=20.0.0"
37
37
  },
38
38
  "dependencies": {
39
39
  "@aws-sdk/client-dynamodb": "^3.848.0",
@@ -54,5 +54,5 @@
54
54
  "lib/",
55
55
  "README.md"
56
56
  ],
57
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
57
+ "packageManager": "yarn@4.5.0"
58
58
  }