@ccode-si/cli 0.0.0-stage → 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/LICENSE +54 -0
- package/README.md +100 -2
- package/THIRD_PARTY_NOTICES.txt +2409 -0
- package/bin/ccode.js +24 -0
- package/package.json +23 -4
package/bin/ccode.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the CCode binary from the platform package npm installed for this machine.
|
|
3
|
+
"use strict";
|
|
4
|
+
const { spawnSync } = require("node:child_process");
|
|
5
|
+
const { join, dirname } = require("node:path");
|
|
6
|
+
|
|
7
|
+
const target = `${process.platform}-${process.arch}`;
|
|
8
|
+
const pkg = "@ccode-si/cli" + "-" + target;
|
|
9
|
+
const exe = process.platform === "win32" ? "ccode.exe" : "ccode";
|
|
10
|
+
let binary;
|
|
11
|
+
try {
|
|
12
|
+
binary = join(dirname(require.resolve(pkg + "/package.json")), "bin", exe);
|
|
13
|
+
} catch {
|
|
14
|
+
console.error(`CCode has no build for ${target} (${pkg} isn't installed).`);
|
|
15
|
+
console.error("Supported: " + "darwin-arm64, darwin-x64, win32-x64, win32-arm64, linux-x64, linux-arm64" + ".");
|
|
16
|
+
console.error("If yours is one of them, reinstall: npm install -g " + "@ccode-si/cli" + " --prefer-online");
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
19
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
20
|
+
if (result.error) {
|
|
21
|
+
console.error(result.error.message);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
process.exit(result.status ?? (result.signal ? 1 : 0));
|
package/package.json
CHANGED
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ccode-si/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "CCode — a coding agent for your terminal.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ccode": "bin/ccode.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"LICENSE",
|
|
12
|
+
"THIRD_PARTY_NOTICES.txt"
|
|
13
|
+
],
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"optionalDependencies": {
|
|
18
|
+
"@ccode-si/cli-darwin-arm64": "1.0.2",
|
|
19
|
+
"@ccode-si/cli-darwin-x64": "1.0.2",
|
|
20
|
+
"@ccode-si/cli-win32-x64": "1.0.2",
|
|
21
|
+
"@ccode-si/cli-win32-arm64": "1.0.2",
|
|
22
|
+
"@ccode-si/cli-linux-x64": "1.0.2",
|
|
23
|
+
"@ccode-si/cli-linux-arm64": "1.0.2"
|
|
24
|
+
}
|
|
25
|
+
}
|