@barnum/barnum 0.0.0-main-b9d1facd → 0.0.0-main-2b63e526
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/cli.js +20 -8
- package/package.json +7 -4
- package/index.js +0 -23
package/cli.js
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var path = require('path');
|
|
5
5
|
var spawn = require('child_process').spawn;
|
|
6
6
|
var chmodSync = require('fs').chmodSync;
|
|
7
7
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
if (bin != null) {
|
|
11
|
-
try {
|
|
12
|
-
chmodSync(bin, 0o755);
|
|
13
|
-
} catch {}
|
|
8
|
+
var bin;
|
|
14
9
|
|
|
15
|
-
|
|
10
|
+
if (process.platform === 'darwin' && process.arch === 'x64') {
|
|
11
|
+
bin = path.join(__dirname, 'artifacts', 'macos-x64', 'barnum');
|
|
12
|
+
} else if (process.platform === 'darwin' && process.arch === 'arm64') {
|
|
13
|
+
bin = path.join(__dirname, 'artifacts', 'macos-arm64', 'barnum');
|
|
14
|
+
} else if (process.platform === 'linux' && process.arch === 'x64') {
|
|
15
|
+
bin = path.join(__dirname, 'artifacts', 'linux-x64', 'barnum');
|
|
16
|
+
} else if (process.platform === 'linux' && process.arch === 'arm64') {
|
|
17
|
+
bin = path.join(__dirname, 'artifacts', 'linux-arm64', 'barnum');
|
|
18
|
+
} else if (process.platform === 'win32' && process.arch === 'x64') {
|
|
19
|
+
bin = path.join(__dirname, 'artifacts', 'win-x64', 'barnum.exe');
|
|
16
20
|
} else {
|
|
17
21
|
throw new Error(
|
|
18
22
|
`Platform "${process.platform} (${process.arch})" not supported.`
|
|
19
23
|
);
|
|
20
24
|
}
|
|
25
|
+
|
|
26
|
+
var input = process.argv.slice(2);
|
|
27
|
+
|
|
28
|
+
try {
|
|
29
|
+
chmodSync(bin, 0o755);
|
|
30
|
+
} catch {}
|
|
31
|
+
|
|
32
|
+
spawn(bin, input, { stdio: 'inherit' }).on('exit', process.exit);
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barnum/barnum",
|
|
3
|
-
"version": "0.0.0-main-
|
|
3
|
+
"version": "0.0.0-main-2b63e526",
|
|
4
4
|
"description": "Barnum CLI - workflow engine for agents.",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "barnum-config-schema.zod.ts",
|
|
6
|
+
"types": "barnum-config-schema.zod.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./barnum-config-schema.zod.ts",
|
|
9
|
+
"./schema": "./barnum-config-schema.zod.ts"
|
|
10
|
+
},
|
|
6
11
|
"bin": {
|
|
7
12
|
"barnum": "cli.js"
|
|
8
13
|
},
|
|
@@ -23,9 +28,7 @@
|
|
|
23
28
|
"automation",
|
|
24
29
|
"cli"
|
|
25
30
|
],
|
|
26
|
-
"types": "barnum-config-schema.zod.ts",
|
|
27
31
|
"files": [
|
|
28
|
-
"index.js",
|
|
29
32
|
"cli.js",
|
|
30
33
|
"artifacts/**/*",
|
|
31
34
|
"barnum-config-schema.json",
|
package/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
let binary;
|
|
6
|
-
|
|
7
|
-
if (process.platform === 'darwin' && process.arch === 'x64') {
|
|
8
|
-
binary = path.join(__dirname, 'artifacts', 'macos-x64', 'barnum');
|
|
9
|
-
} else if (process.platform === 'darwin' && process.arch === 'arm64') {
|
|
10
|
-
binary = path.join(__dirname, 'artifacts', 'macos-arm64', 'barnum');
|
|
11
|
-
} else if (process.platform === 'linux' && process.arch === 'x64') {
|
|
12
|
-
binary = path.join(__dirname, 'artifacts', 'linux-x64', 'barnum');
|
|
13
|
-
} else if (process.platform === 'linux' && process.arch === 'arm64') {
|
|
14
|
-
binary = path.join(__dirname, 'artifacts', 'linux-arm64', 'barnum');
|
|
15
|
-
} else if (process.platform === 'win32' && process.arch === 'x64') {
|
|
16
|
-
binary = path.join(__dirname, 'artifacts', 'win-x64', 'barnum.exe');
|
|
17
|
-
} else {
|
|
18
|
-
throw new Error(
|
|
19
|
-
`Platform "${process.platform} (${process.arch})" not supported.`
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
module.exports = binary;
|