@barnum/barnum 0.0.0-main-c9d44943 → 0.0.0-main-dca8864b
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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/barnum-cli-schema.zod.ts
CHANGED
|
@@ -28,6 +28,7 @@ const Command = z.discriminatedUnion("kind", [
|
|
|
28
28
|
z.object({
|
|
29
29
|
config: z.string().nullable().optional().describe("Config (JSON string or path to file). Required unless `--resume-from` is used."),
|
|
30
30
|
entrypointValue: z.string().nullable().optional().describe("Initial value for the entrypoint step (JSON string or path to file). Only valid when config has an `entrypoint`. Defaults to `{}` if not provided."),
|
|
31
|
+
executor: z.string().nullable().optional().describe("Internal: executor command injected by cli.cjs. Not user-facing — hidden from --help."),
|
|
31
32
|
initialState: z.string().nullable().optional().describe("Initial tasks (JSON string or path to file). Required if config has no `entrypoint`. Cannot be used with `--entrypoint-value`."),
|
|
32
33
|
kind: z.literal("Run"),
|
|
33
34
|
logFile: z.string().nullable().optional().describe("Log file path (logs emitted in addition to stderr)"),
|
package/cli.cjs
CHANGED
|
@@ -23,10 +23,30 @@ if (process.platform === 'darwin' && process.arch === 'x64') {
|
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
// --executor is internal. Error if the user passed it directly.
|
|
27
|
+
var userArgs = process.argv.slice(2);
|
|
28
|
+
if (userArgs.includes('--executor')) {
|
|
29
|
+
console.error('Error: --executor is an internal flag and cannot be passed directly.');
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var executorPath = path.resolve(__dirname, 'actions', 'executor.ts');
|
|
34
|
+
|
|
35
|
+
function resolveExecutorCommand() {
|
|
36
|
+
if (typeof Bun !== 'undefined') {
|
|
37
|
+
// Bun runs .ts natively
|
|
38
|
+
return process.execPath + ' ' + executorPath;
|
|
39
|
+
}
|
|
40
|
+
// Node: use tsx
|
|
41
|
+
var tsxPath = require.resolve('tsx/cli');
|
|
42
|
+
return 'node ' + tsxPath + ' ' + executorPath;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
var executor = resolveExecutorCommand();
|
|
46
|
+
var args = userArgs.concat('--executor', executor);
|
|
27
47
|
|
|
28
48
|
try {
|
|
29
49
|
chmodSync(bin, 0o755);
|
|
30
50
|
} catch {}
|
|
31
51
|
|
|
32
|
-
spawn(bin,
|
|
52
|
+
spawn(bin, args, { stdio: 'inherit' }).on('exit', process.exit);
|