concurrently 8.1.0 → 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.
|
@@ -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.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Run commands concurrently",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -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",
|