@tokenring-ai/coder 0.2.16 → 0.2.18
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/package.json +5 -5
- package/tr-coder.js +20 -0
- package/bin-wrapper.js +0 -24
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenring-ai/coder",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"description": "TokenRing Coder Application",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
7
|
-
"tr-coder": "
|
|
7
|
+
"tr-coder": "tr-coder.js"
|
|
8
8
|
},
|
|
9
9
|
"optionalDependencies": {
|
|
10
|
-
"@tokenring-ai/coder-darwin-arm64": "0.2.
|
|
11
|
-
"@tokenring-ai/coder-linux-x64": "0.2.
|
|
10
|
+
"@tokenring-ai/coder-darwin-arm64": "0.2.18",
|
|
11
|
+
"@tokenring-ai/coder-linux-x64": "0.2.18"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
|
|
14
|
+
"tr-coder.js"
|
|
15
15
|
],
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
package/tr-coder.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawn } = require('child_process');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const platform = process.platform;
|
|
6
|
+
const arch = process.arch;
|
|
7
|
+
|
|
8
|
+
let binary;
|
|
9
|
+
if (platform === 'darwin' && arch === 'arm64') {
|
|
10
|
+
binary = "./coder-darwin-arm64";
|
|
11
|
+
} else if (platform === 'linux' && arch === 'x64') {
|
|
12
|
+
binary = "./coder-linux-x64";
|
|
13
|
+
} else {
|
|
14
|
+
console.error(`Unsupported platform: ${platform}-${arch}`);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const binaryPath = path.join(__dirname, binary);
|
|
19
|
+
const child = spawn(binaryPath, process.argv.slice(2), { stdio: 'inherit' });
|
|
20
|
+
child.on('exit', (code) => process.exit(code));
|
package/bin-wrapper.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const { spawn } = require('child_process');
|
|
3
|
-
|
|
4
|
-
const platform = process.platform;
|
|
5
|
-
const arch = process.arch;
|
|
6
|
-
|
|
7
|
-
let packageName;
|
|
8
|
-
if (platform === 'darwin' && arch === 'arm64') {
|
|
9
|
-
packageName = '@tokenring-ai/coder-darwin-arm64';
|
|
10
|
-
} else if (platform === 'linux' && arch === 'x64') {
|
|
11
|
-
packageName = '@tokenring-ai/coder-linux-x64';
|
|
12
|
-
} else {
|
|
13
|
-
console.error(`Unsupported platform: ${platform}-${arch}`);
|
|
14
|
-
process.exit(1);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
const binary = require.resolve(`${packageName}/coder-${platform}-${arch}`);
|
|
19
|
-
const child = spawn(binary, process.argv.slice(2), { stdio: 'inherit' });
|
|
20
|
-
child.on('exit', (code) => process.exit(code));
|
|
21
|
-
} catch (e) {
|
|
22
|
-
console.error(`Failed to find ${packageName}. Please run: npm install ${packageName}`);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|