builderman 1.0.1 → 1.0.2
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/dist/index.js +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ export function pipeline(tasks) {
|
|
|
48
48
|
if (runningTasks.has(task.name)) {
|
|
49
49
|
return;
|
|
50
50
|
}
|
|
51
|
+
console.error(`[builderman] Starting task: ${task.name}`);
|
|
51
52
|
// Ensure node_modules/.bin is in PATH for local dependencies
|
|
52
53
|
// Resolve cwd relative to current working directory
|
|
53
54
|
const taskCwd = path.isAbsolute(task.cwd)
|
|
@@ -81,6 +82,14 @@ export function pipeline(tasks) {
|
|
|
81
82
|
shell: true,
|
|
82
83
|
env,
|
|
83
84
|
});
|
|
85
|
+
// Handle spawn errors
|
|
86
|
+
child.on("error", (error) => {
|
|
87
|
+
console.error(`[${task.name}] Failed to start:`, error.message);
|
|
88
|
+
runningTasks.delete(task.name);
|
|
89
|
+
completedTasks.add(task.name);
|
|
90
|
+
process.exitCode = 1;
|
|
91
|
+
eventEmitter.emit("taskCompleted", task.name);
|
|
92
|
+
});
|
|
84
93
|
runningTasks.set(task.name, child);
|
|
85
94
|
// Parse events from stdout
|
|
86
95
|
let stdoutBuffer = "";
|