@coral-protocol/coralizer 0.38.0
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
|
|
Binary file
|
package/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { spawnSync } = require('child_process');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
function getExePath() {
|
|
8
|
+
const arch = process.arch;
|
|
9
|
+
const platform = process.platform;
|
|
10
|
+
const extension = platform === "win32" ? ".exe" : "";
|
|
11
|
+
|
|
12
|
+
const exeName = `coralizer-${platform}-${arch}${extension}`;
|
|
13
|
+
const exePath = path.join(__dirname, 'bin', exeName);
|
|
14
|
+
|
|
15
|
+
if (fs.existsSync(exePath)) {
|
|
16
|
+
return exePath;
|
|
17
|
+
} else {
|
|
18
|
+
console.error(`Error: Could not find the binary for your platform (${platform}-${arch}) at ${exePath}.`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function run() {
|
|
24
|
+
const exePath = getExePath();
|
|
25
|
+
const args = process.argv.slice(2);
|
|
26
|
+
const result = spawnSync(exePath, args, { stdio: 'inherit' });
|
|
27
|
+
|
|
28
|
+
if (result.error) {
|
|
29
|
+
console.error('Error executing binary:', result.error);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
process.exit(result.status ?? 0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
run();
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@coral-protocol/coralizer",
|
|
3
|
+
"version": "0.38.0",
|
|
4
|
+
"description": "A CLI tool built with Rust",
|
|
5
|
+
"bin": {
|
|
6
|
+
"coralizer": "index.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"index.js",
|
|
10
|
+
"bin"
|
|
11
|
+
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/Coral-Protocol/coralizer.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"cli",
|
|
18
|
+
"rust"
|
|
19
|
+
],
|
|
20
|
+
"author": "",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public",
|
|
24
|
+
"registry": "https://registry.npmjs.org/"
|
|
25
|
+
}
|
|
26
|
+
}
|