@visulima/task-runner 1.0.0-alpha.3 → 1.0.0-alpha.5
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/CHANGELOG.md +58 -0
- package/README.md +193 -51
- package/dist/affected.d.ts +37 -3
- package/dist/cache.d.ts +8 -1
- package/dist/command-parser/expand-arguments.d.ts +11 -0
- package/dist/command-parser/expand-shortcut.d.ts +15 -0
- package/dist/command-parser/expand-wildcard.d.ts +13 -0
- package/dist/command-parser/index.d.ts +18 -0
- package/dist/command-parser/strip-quotes.d.ts +6 -0
- package/dist/concurrent-fallback.d.ts +16 -0
- package/dist/concurrent.d.ts +23 -0
- package/dist/detect-shell.d.ts +19 -0
- package/dist/flow-controllers/index.d.ts +7 -0
- package/dist/flow-controllers/input-handler.d.ts +44 -0
- package/dist/flow-controllers/log-timings.d.ts +18 -0
- package/dist/flow-controllers/restart-process.d.ts +21 -0
- package/dist/flow-controllers/teardown.d.ts +22 -0
- package/dist/index.d.ts +14 -4
- package/dist/index.js +26 -12
- package/dist/native-binding.d.ts +44 -2
- package/dist/packem_shared/{Cache-IYpTYVUC.js → Cache-iAjRMV2d.js} +5 -5
- package/dist/packem_shared/{FingerprintManager-D6Y0erg-.js → FingerprintManager-Cu-ta9ee.js} +0 -1
- package/dist/packem_shared/{IncrementalFileHasher-Ds3J6dgb.js → IncrementalFileHasher-Cm_kJY5V.js} +1 -1
- package/dist/packem_shared/{TaskOrchestrator-BvYs3ONw.js → TaskOrchestrator-lLn-PH1m.js} +2 -5
- package/dist/packem_shared/TerminalBuffer-CnPyFgPB.js +266 -0
- package/dist/packem_shared/{filterAffectedTasks-I-18zPg6.js → buildForwardDependencyMap-0BJFMMPv.js} +61 -21
- package/dist/packem_shared/{computeTaskHash-BoCnnvIJ.js → computeTaskHash-B2SVZqgp.js} +1 -2
- package/dist/packem_shared/createInputHandler-DTfePcTG.js +37 -0
- package/dist/packem_shared/{defaultTaskRunner-CrW4v5Ye.js → defaultTaskRunner-BdFTifsh.js} +6 -7
- package/dist/packem_shared/detectScriptShell-CR-xXKA4.js +53 -0
- package/dist/packem_shared/enforceProjectConstraints-C5Jp_C3u.js +111 -0
- package/dist/packem_shared/expandArguments-0AwD2BIA.js +26 -0
- package/dist/packem_shared/expandShortcut-BVG05ee4.js +23 -0
- package/dist/packem_shared/expandWildcard-B0xN_knq.js +107 -0
- package/dist/packem_shared/{findCycle-DF4_BRdO.js → findCycle-DefgNYhg.js} +1 -1
- package/dist/packem_shared/formatTimingTable-3qtCM552.js +46 -0
- package/dist/packem_shared/isNativeAvailable-BpD28A6Z.js +44 -0
- package/dist/packem_shared/parseCommands-D-IgF8Zh.js +26 -0
- package/dist/packem_shared/{TaskScheduler-CJilHDta.js → parsePartition-C4-P5RjK.js} +44 -1
- package/dist/packem_shared/{projectGraphToDot-VdTjHcVp.js → projectGraphToDot-C8uYeaPo.js} +20 -3
- package/dist/packem_shared/runConcurrentFallback-CGHz_f-Q.js +371 -0
- package/dist/packem_shared/runConcurrently-qrkWyzXW.js +67 -0
- package/dist/packem_shared/runTeardown-BAezH79J.js +49 -0
- package/dist/packem_shared/stripQuotes-Cey-zwFf.js +9 -0
- package/dist/packem_shared/withRestart-BREjRJa4.js +49 -0
- package/dist/project-constraints.d.ts +9 -0
- package/dist/task-scheduler.d.ts +23 -0
- package/dist/terminal-buffer.d.ts +29 -0
- package/dist/types.d.ts +239 -1
- package/index.js +769 -0
- package/package.json +14 -13
- package/binding.js +0 -204
- package/dist/packem_shared/isNativeAvailable-BWhnZ4ES.js +0 -19
- package/dist/packem_shared/{RemoteCache-BDqrnDEi.js → RemoteCache-BFceSe4a.js} +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visulima/task-runner",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.5",
|
|
4
4
|
"description": "A task runner with caching support for monorepo workspaces",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visulima",
|
|
@@ -46,27 +46,28 @@
|
|
|
46
46
|
},
|
|
47
47
|
"files": [
|
|
48
48
|
"dist/**",
|
|
49
|
-
"
|
|
49
|
+
"index.js",
|
|
50
50
|
"README.md",
|
|
51
51
|
"CHANGELOG.md",
|
|
52
52
|
"LICENSE.md"
|
|
53
53
|
],
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@visulima/humanizer": "3.0.0-alpha.
|
|
56
|
-
"@visulima/path": "3.0.0-alpha.
|
|
55
|
+
"@visulima/humanizer": "3.0.0-alpha.10",
|
|
56
|
+
"@visulima/path": "3.0.0-alpha.9",
|
|
57
|
+
"@lydell/node-pty": "1.2.0-beta.12"
|
|
57
58
|
},
|
|
58
59
|
"optionalDependencies": {
|
|
59
|
-
"@visulima/task-runner-binding-darwin-arm64": "1.0.0-alpha.
|
|
60
|
-
"@visulima/task-runner-binding-
|
|
61
|
-
"@visulima/task-runner-binding-
|
|
62
|
-
"@visulima/task-runner-binding-linux-
|
|
63
|
-
"@visulima/task-runner-binding-linux-
|
|
64
|
-
"@visulima/task-runner-binding-linux-x64-musl": "1.0.0-alpha.
|
|
65
|
-
"@visulima/task-runner-binding-win32-arm64-msvc": "1.0.0-alpha.
|
|
66
|
-
"@visulima/task-runner-binding-win32-x64-msvc": "1.0.0-alpha.
|
|
60
|
+
"@visulima/task-runner-binding-darwin-arm64": "1.0.0-alpha.5",
|
|
61
|
+
"@visulima/task-runner-binding-linux-arm64-gnu": "1.0.0-alpha.5",
|
|
62
|
+
"@visulima/task-runner-binding-darwin-x64": "1.0.0-alpha.5",
|
|
63
|
+
"@visulima/task-runner-binding-linux-x64-gnu": "1.0.0-alpha.5",
|
|
64
|
+
"@visulima/task-runner-binding-linux-arm64-musl": "1.0.0-alpha.5",
|
|
65
|
+
"@visulima/task-runner-binding-linux-x64-musl": "1.0.0-alpha.5",
|
|
66
|
+
"@visulima/task-runner-binding-win32-arm64-msvc": "1.0.0-alpha.5",
|
|
67
|
+
"@visulima/task-runner-binding-win32-x64-msvc": "1.0.0-alpha.5"
|
|
67
68
|
},
|
|
68
69
|
"engines": {
|
|
69
|
-
"node": ">=
|
|
70
|
+
"node": ">=22.13 <=25.x"
|
|
70
71
|
},
|
|
71
72
|
"publishConfig": {
|
|
72
73
|
"access": "public",
|
package/binding.js
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* auto-generated binding loader for @visulima/task-runner native addon */
|
|
3
|
-
|
|
4
|
-
const { existsSync, readFileSync } = require("node:fs");
|
|
5
|
-
const { join } = require("node:path");
|
|
6
|
-
|
|
7
|
-
const { platform, arch } = process;
|
|
8
|
-
|
|
9
|
-
let nativeBinding = null;
|
|
10
|
-
let localFileExisted = false;
|
|
11
|
-
let loadError = null;
|
|
12
|
-
|
|
13
|
-
function isMusl() {
|
|
14
|
-
// For Node 12+, check report.header for musl
|
|
15
|
-
if (
|
|
16
|
-
typeof process.report !== "undefined" &&
|
|
17
|
-
typeof process.report.getReport === "function"
|
|
18
|
-
) {
|
|
19
|
-
const { glibcVersionRuntime } = process.report.getReport().header;
|
|
20
|
-
if (glibcVersionRuntime) {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
try {
|
|
27
|
-
const lddOutput = readFileSync("/usr/bin/ldd", "utf8");
|
|
28
|
-
return lddOutput.includes("musl");
|
|
29
|
-
} catch {
|
|
30
|
-
try {
|
|
31
|
-
return readFileSync("/proc/self/map_files/../maps", "utf8").includes(
|
|
32
|
-
"musl"
|
|
33
|
-
);
|
|
34
|
-
} catch {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
switch (platform) {
|
|
41
|
-
case "darwin":
|
|
42
|
-
switch (arch) {
|
|
43
|
-
case "x64":
|
|
44
|
-
localFileExisted = existsSync(
|
|
45
|
-
join(__dirname, "task-runner-native.darwin-x64.node")
|
|
46
|
-
);
|
|
47
|
-
try {
|
|
48
|
-
if (localFileExisted) {
|
|
49
|
-
nativeBinding = require("./task-runner-native.darwin-x64.node");
|
|
50
|
-
} else {
|
|
51
|
-
nativeBinding = require("@visulima/task-runner-binding-darwin-x64");
|
|
52
|
-
}
|
|
53
|
-
} catch (e) {
|
|
54
|
-
loadError = e;
|
|
55
|
-
}
|
|
56
|
-
break;
|
|
57
|
-
case "arm64":
|
|
58
|
-
localFileExisted = existsSync(
|
|
59
|
-
join(__dirname, "task-runner-native.darwin-arm64.node")
|
|
60
|
-
);
|
|
61
|
-
try {
|
|
62
|
-
if (localFileExisted) {
|
|
63
|
-
nativeBinding = require("./task-runner-native.darwin-arm64.node");
|
|
64
|
-
} else {
|
|
65
|
-
nativeBinding = require("@visulima/task-runner-binding-darwin-arm64");
|
|
66
|
-
}
|
|
67
|
-
} catch (e) {
|
|
68
|
-
loadError = e;
|
|
69
|
-
}
|
|
70
|
-
break;
|
|
71
|
-
default:
|
|
72
|
-
throw new Error(`Unsupported architecture on macOS: ${arch}`);
|
|
73
|
-
}
|
|
74
|
-
break;
|
|
75
|
-
case "linux":
|
|
76
|
-
switch (arch) {
|
|
77
|
-
case "x64":
|
|
78
|
-
if (isMusl()) {
|
|
79
|
-
localFileExisted = existsSync(
|
|
80
|
-
join(
|
|
81
|
-
__dirname,
|
|
82
|
-
"task-runner-native.linux-x64-musl.node"
|
|
83
|
-
)
|
|
84
|
-
);
|
|
85
|
-
try {
|
|
86
|
-
if (localFileExisted) {
|
|
87
|
-
nativeBinding = require("./task-runner-native.linux-x64-musl.node");
|
|
88
|
-
} else {
|
|
89
|
-
nativeBinding = require("@visulima/task-runner-binding-linux-x64-musl");
|
|
90
|
-
}
|
|
91
|
-
} catch (e) {
|
|
92
|
-
loadError = e;
|
|
93
|
-
}
|
|
94
|
-
} else {
|
|
95
|
-
localFileExisted = existsSync(
|
|
96
|
-
join(
|
|
97
|
-
__dirname,
|
|
98
|
-
"task-runner-native.linux-x64-gnu.node"
|
|
99
|
-
)
|
|
100
|
-
);
|
|
101
|
-
try {
|
|
102
|
-
if (localFileExisted) {
|
|
103
|
-
nativeBinding = require("./task-runner-native.linux-x64-gnu.node");
|
|
104
|
-
} else {
|
|
105
|
-
nativeBinding = require("@visulima/task-runner-binding-linux-x64-gnu");
|
|
106
|
-
}
|
|
107
|
-
} catch (e) {
|
|
108
|
-
loadError = e;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
break;
|
|
112
|
-
case "arm64":
|
|
113
|
-
if (isMusl()) {
|
|
114
|
-
localFileExisted = existsSync(
|
|
115
|
-
join(
|
|
116
|
-
__dirname,
|
|
117
|
-
"task-runner-native.linux-arm64-musl.node"
|
|
118
|
-
)
|
|
119
|
-
);
|
|
120
|
-
try {
|
|
121
|
-
if (localFileExisted) {
|
|
122
|
-
nativeBinding = require("./task-runner-native.linux-arm64-musl.node");
|
|
123
|
-
} else {
|
|
124
|
-
nativeBinding = require("@visulima/task-runner-binding-linux-arm64-musl");
|
|
125
|
-
}
|
|
126
|
-
} catch (e) {
|
|
127
|
-
loadError = e;
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
localFileExisted = existsSync(
|
|
131
|
-
join(
|
|
132
|
-
__dirname,
|
|
133
|
-
"task-runner-native.linux-arm64-gnu.node"
|
|
134
|
-
)
|
|
135
|
-
);
|
|
136
|
-
try {
|
|
137
|
-
if (localFileExisted) {
|
|
138
|
-
nativeBinding = require("./task-runner-native.linux-arm64-gnu.node");
|
|
139
|
-
} else {
|
|
140
|
-
nativeBinding = require("@visulima/task-runner-binding-linux-arm64-gnu");
|
|
141
|
-
}
|
|
142
|
-
} catch (e) {
|
|
143
|
-
loadError = e;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
break;
|
|
147
|
-
default:
|
|
148
|
-
throw new Error(`Unsupported architecture on Linux: ${arch}`);
|
|
149
|
-
}
|
|
150
|
-
break;
|
|
151
|
-
case "win32":
|
|
152
|
-
switch (arch) {
|
|
153
|
-
case "x64":
|
|
154
|
-
localFileExisted = existsSync(
|
|
155
|
-
join(
|
|
156
|
-
__dirname,
|
|
157
|
-
"task-runner-native.win32-x64-msvc.node"
|
|
158
|
-
)
|
|
159
|
-
);
|
|
160
|
-
try {
|
|
161
|
-
if (localFileExisted) {
|
|
162
|
-
nativeBinding = require("./task-runner-native.win32-x64-msvc.node");
|
|
163
|
-
} else {
|
|
164
|
-
nativeBinding = require("@visulima/task-runner-binding-win32-x64-msvc");
|
|
165
|
-
}
|
|
166
|
-
} catch (e) {
|
|
167
|
-
loadError = e;
|
|
168
|
-
}
|
|
169
|
-
break;
|
|
170
|
-
case "arm64":
|
|
171
|
-
localFileExisted = existsSync(
|
|
172
|
-
join(
|
|
173
|
-
__dirname,
|
|
174
|
-
"task-runner-native.win32-arm64-msvc.node"
|
|
175
|
-
)
|
|
176
|
-
);
|
|
177
|
-
try {
|
|
178
|
-
if (localFileExisted) {
|
|
179
|
-
nativeBinding = require("./task-runner-native.win32-arm64-msvc.node");
|
|
180
|
-
} else {
|
|
181
|
-
nativeBinding = require("@visulima/task-runner-binding-win32-arm64-msvc");
|
|
182
|
-
}
|
|
183
|
-
} catch (e) {
|
|
184
|
-
loadError = e;
|
|
185
|
-
}
|
|
186
|
-
break;
|
|
187
|
-
default:
|
|
188
|
-
throw new Error(`Unsupported architecture on Windows: ${arch}`);
|
|
189
|
-
}
|
|
190
|
-
break;
|
|
191
|
-
default:
|
|
192
|
-
throw new Error(
|
|
193
|
-
`Unsupported OS: ${platform}, architecture: ${arch}`
|
|
194
|
-
);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
if (!nativeBinding) {
|
|
198
|
-
if (loadError) {
|
|
199
|
-
throw loadError;
|
|
200
|
-
}
|
|
201
|
-
throw new Error("Failed to load native binding");
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
module.exports = nativeBinding;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import __cjs_mod__ from "node:module"; // -- packem CommonJS require shim --
|
|
2
|
-
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
3
|
-
let nativeBindings;
|
|
4
|
-
let loadAttempted = false;
|
|
5
|
-
const loadNativeBindings = () => {
|
|
6
|
-
if (loadAttempted) {
|
|
7
|
-
return nativeBindings;
|
|
8
|
-
}
|
|
9
|
-
loadAttempted = true;
|
|
10
|
-
try {
|
|
11
|
-
nativeBindings = require("../binding.js");
|
|
12
|
-
} catch {
|
|
13
|
-
nativeBindings = void 0;
|
|
14
|
-
}
|
|
15
|
-
return nativeBindings;
|
|
16
|
-
};
|
|
17
|
-
const isNativeAvailable = () => loadNativeBindings() !== void 0;
|
|
18
|
-
|
|
19
|
-
export { isNativeAvailable, loadNativeBindings };
|
|
@@ -29,10 +29,10 @@ const {
|
|
|
29
29
|
stat,
|
|
30
30
|
readFile
|
|
31
31
|
} = __cjs_getBuiltinModule("node:fs/promises");
|
|
32
|
-
import { join } from '@visulima/path';
|
|
33
32
|
const {
|
|
34
33
|
pipeline
|
|
35
34
|
} = __cjs_getBuiltinModule("node:stream/promises");
|
|
35
|
+
import { join } from '@visulima/path';
|
|
36
36
|
|
|
37
37
|
const createTarGz = (sourceDirectory, outputPath) => new Promise((resolve, reject) => {
|
|
38
38
|
execFile("tar", ["-czf", outputPath, "-C", sourceDirectory, "."], (error) => {
|