concurrently 8.0.1 → 8.2.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
|
@@ -340,7 +340,7 @@ For more details, visit https://github.com/open-cli-tools/concurrently
|
|
|
340
340
|
Prefix colors specified per-command take precedence over this list.
|
|
341
341
|
- `prefixLength`: how many characters to show when prefixing with `command`. Default: `10`
|
|
342
342
|
- `raw`: whether raw mode should be used, meaning strictly process output will
|
|
343
|
-
be logged, without any prefixes, coloring or extra stuff.
|
|
343
|
+
be logged, without any prefixes, coloring or extra stuff. Can be overriden per command.
|
|
344
344
|
- `successCondition`: the condition to consider the run was successful.
|
|
345
345
|
If `first`, only the first process to exit will make up the success of the run; if `last`, the last process that exits will determine whether the run succeeds.
|
|
346
346
|
Anything else means all processes should exit successfully.
|
package/dist/src/command.d.ts
CHANGED
package/dist/src/concurrently.js
CHANGED
|
@@ -53,7 +53,7 @@ function concurrently(baseCommands, baseOptions) {
|
|
|
53
53
|
prefixColor: prefixColorSelector.getNextColor(),
|
|
54
54
|
...command,
|
|
55
55
|
}, (0, get_spawn_opts_1.getSpawnOpts)({
|
|
56
|
-
raw: options.raw,
|
|
56
|
+
raw: command.raw ?? options.raw,
|
|
57
57
|
env: command.env,
|
|
58
58
|
cwd: command.cwd || options.cwd,
|
|
59
59
|
}), options.spawn, options.kill);
|
|
@@ -108,6 +108,11 @@ function mapToCommandInfo(command) {
|
|
|
108
108
|
prefixColor: command.prefixColor,
|
|
109
109
|
}
|
|
110
110
|
: {}),
|
|
111
|
+
...(command.raw !== undefined
|
|
112
|
+
? {
|
|
113
|
+
raw: command.raw,
|
|
114
|
+
}
|
|
115
|
+
: {}),
|
|
111
116
|
};
|
|
112
117
|
}
|
|
113
118
|
function parseCommand(command, parsers) {
|
|
@@ -48,19 +48,32 @@ class InputHandler {
|
|
|
48
48
|
if (!inputStream) {
|
|
49
49
|
return { commands };
|
|
50
50
|
}
|
|
51
|
+
const commandsMap = new Map();
|
|
52
|
+
for (const command of commands) {
|
|
53
|
+
commandsMap.set(command.index.toString(), command);
|
|
54
|
+
commandsMap.set(command.name, command);
|
|
55
|
+
}
|
|
51
56
|
Rx.fromEvent(inputStream, 'data')
|
|
52
57
|
.pipe((0, operators_1.map)((data) => String(data)))
|
|
53
58
|
.subscribe((data) => {
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
let command, input;
|
|
60
|
+
const dataParts = data.split(/:(.+)/s);
|
|
61
|
+
let target = dataParts[0];
|
|
62
|
+
if (dataParts.length > 1 && (command = commandsMap.get(target))) {
|
|
63
|
+
input = dataParts[1];
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
// If `target` does not match a registered command,
|
|
67
|
+
// fallback to `defaultInputTarget` and forward the whole input data
|
|
68
|
+
target = this.defaultInputTarget.toString();
|
|
69
|
+
command = commandsMap.get(target);
|
|
70
|
+
input = data;
|
|
71
|
+
}
|
|
59
72
|
if (command && command.stdin) {
|
|
60
73
|
command.stdin.write(input);
|
|
61
74
|
}
|
|
62
75
|
else {
|
|
63
|
-
this.logger.logGlobalEvent(`Unable to find command ${
|
|
76
|
+
this.logger.logGlobalEvent(`Unable to find command "${target}", or it has no stdin open\n`);
|
|
64
77
|
}
|
|
65
78
|
});
|
|
66
79
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "concurrently",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Run commands concurrently",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
},
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
+
"types": "./dist/src/index.d.ts",
|
|
17
18
|
"import": "./index.mjs",
|
|
18
19
|
"require": "./index.js",
|
|
19
|
-
"default": "./index.js"
|
|
20
|
-
"types": "./dist/src/index.d.ts"
|
|
20
|
+
"default": "./index.js"
|
|
21
21
|
},
|
|
22
22
|
"./package.json": "./package.json"
|
|
23
23
|
},
|
|
@@ -38,31 +38,31 @@
|
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"chalk": "^4.1.2",
|
|
41
|
-
"date-fns": "^2.
|
|
41
|
+
"date-fns": "^2.30.0",
|
|
42
42
|
"lodash": "^4.17.21",
|
|
43
|
-
"rxjs": "^7.8.
|
|
44
|
-
"shell-quote": "^1.8.
|
|
45
|
-
"spawn-command": "0.0.2
|
|
43
|
+
"rxjs": "^7.8.1",
|
|
44
|
+
"shell-quote": "^1.8.1",
|
|
45
|
+
"spawn-command": "0.0.2",
|
|
46
46
|
"supports-color": "^8.1.1",
|
|
47
47
|
"tree-kill": "^1.2.2",
|
|
48
|
-
"yargs": "^17.7.
|
|
48
|
+
"yargs": "^17.7.2"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@hirez_io/observer-spy": "^2.2.0",
|
|
52
|
-
"@swc/core": "^1.3.
|
|
53
|
-
"@swc/jest": "^0.2.
|
|
54
|
-
"@types/jest": "^29.5.
|
|
55
|
-
"@types/lodash": "^4.14.
|
|
56
|
-
"@types/node": "^14.18.
|
|
52
|
+
"@swc/core": "^1.3.62",
|
|
53
|
+
"@swc/jest": "^0.2.26",
|
|
54
|
+
"@types/jest": "^29.5.2",
|
|
55
|
+
"@types/lodash": "^4.14.195",
|
|
56
|
+
"@types/node": "^14.18.48",
|
|
57
57
|
"@types/shell-quote": "^1.7.1",
|
|
58
58
|
"@types/supports-color": "^8.1.1",
|
|
59
59
|
"@types/yargs": "^17.0.24",
|
|
60
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
61
|
-
"@typescript-eslint/parser": "^5.
|
|
60
|
+
"@typescript-eslint/eslint-plugin": "^5.59.9",
|
|
61
|
+
"@typescript-eslint/parser": "^5.59.9",
|
|
62
62
|
"coveralls-next": "^4.2.0",
|
|
63
63
|
"ctrlc-wrapper": "^0.0.4",
|
|
64
|
-
"esbuild": "~0.17.
|
|
65
|
-
"eslint": "^8.
|
|
64
|
+
"esbuild": "~0.17.19",
|
|
65
|
+
"eslint": "^8.42.0",
|
|
66
66
|
"eslint-config-prettier": "^8.8.0",
|
|
67
67
|
"eslint-plugin-import": "^2.27.5",
|
|
68
68
|
"eslint-plugin-jest": "^27.2.1",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"husky": "^8.0.3",
|
|
72
72
|
"jest": "^29.5.0",
|
|
73
73
|
"jest-create-mock-instance": "^2.0.0",
|
|
74
|
-
"lint-staged": "^13.2.
|
|
75
|
-
"prettier": "^2.8.
|
|
74
|
+
"lint-staged": "^13.2.2",
|
|
75
|
+
"prettier": "^2.8.8",
|
|
76
76
|
"safe-publish-latest": "^2.0.0",
|
|
77
|
-
"string-argv": "^0.3.
|
|
78
|
-
"typescript": "~5.
|
|
77
|
+
"string-argv": "^0.3.2",
|
|
78
|
+
"typescript": "~5.1.3"
|
|
79
79
|
},
|
|
80
80
|
"files": [
|
|
81
81
|
"dist",
|