@mono-labs/cli 0.0.46 → 0.0.48
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.
|
@@ -5,7 +5,6 @@ import { getRootJson } from '../loadFromRoot.js';
|
|
|
5
5
|
|
|
6
6
|
export function executeCommandsIfWorkspaceAction(action) {
|
|
7
7
|
console.log('we here');
|
|
8
|
-
const testVal = commands.join(',');
|
|
9
8
|
const result = execSync('yarn workspaces list --json', { encoding: 'utf8' })
|
|
10
9
|
.trim()
|
|
11
10
|
.split('\n')
|
|
@@ -13,19 +12,22 @@ export function executeCommandsIfWorkspaceAction(action) {
|
|
|
13
12
|
.filter((obj) => obj !== '.');
|
|
14
13
|
|
|
15
14
|
const workspaces = result.map((w) => w.name);
|
|
15
|
+
const actualAction = action[1] || '';
|
|
16
16
|
|
|
17
|
-
console.log('testVal', testVal);
|
|
18
17
|
console.log('workspaces', workspaces);
|
|
19
18
|
console.log('action', action);
|
|
19
|
+
console.log('actualAction', actualAction);
|
|
20
20
|
console.log('split-action', action.split('/'));
|
|
21
21
|
|
|
22
|
-
console.log(result.map((w) => w.location)); // list of workspace paths
|
|
23
22
|
const rootJson = getRootJson();
|
|
24
23
|
const workspacesList = (rootJson.workspaces || []).map((item) =>
|
|
25
24
|
item.replace(/[\.\/\*]/g, '')
|
|
26
25
|
);
|
|
27
26
|
|
|
28
27
|
console.log('workspacesList', workspacesList);
|
|
28
|
+
|
|
29
|
+
const filteredResult = result.filter((obj) => obj.name === actualAction);
|
|
30
|
+
console.log('filteredResult', filteredResult);
|
|
29
31
|
const workingDirectory = './';
|
|
30
32
|
// Check if the action is a workspace action
|
|
31
33
|
if (action) {
|