@standardagents/code 0.11.4 → 0.11.5
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/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6439,10 +6439,10 @@ var PRODUCTION_ENDPOINT = "https://api.standardcode.ai";
|
|
|
6439
6439
|
function readVersion() {
|
|
6440
6440
|
try {
|
|
6441
6441
|
const pkg = JSON.parse(fs5.readFileSync(new URL("../package.json", import.meta.url), "utf8"));
|
|
6442
|
-
|
|
6442
|
+
if (typeof pkg.version === "string" && pkg.version) return pkg.version;
|
|
6443
6443
|
} catch {
|
|
6444
|
-
return "";
|
|
6445
6444
|
}
|
|
6445
|
+
return "0.11.5" ;
|
|
6446
6446
|
}
|
|
6447
6447
|
function isLocalHost(host) {
|
|
6448
6448
|
return host === "localhost" || host === "127.0.0.1" || host === "::1" || host.endsWith(".local") || host.endsWith(".localhost") || /^10\./.test(host) || /^192\.168\./.test(host) || /^172\.(1[6-9]|2\d|3[01])\./.test(host);
|
|
@@ -8319,6 +8319,7 @@ function printUsage() {
|
|
|
8319
8319
|
" standardcode [options] [dir]",
|
|
8320
8320
|
"",
|
|
8321
8321
|
`${c4.bold}Options${c4.reset}`,
|
|
8322
|
+
" -v, --version Print the Standard Code version and exit.",
|
|
8322
8323
|
" -e, --endpoint [url] Use a different Standard Agents instance for this run",
|
|
8323
8324
|
" (default: https://api.standardcode.ai).",
|
|
8324
8325
|
" If url is omitted, prompt for it.",
|
|
@@ -8495,6 +8496,11 @@ ${indent}${c4.dim}\u2026 +${hidden} more line${hidden === 1 ? "" : "s"}${c4.rese
|
|
|
8495
8496
|
return `${indent}${c4.yellow}\u26D4 ${rest}${c4.reset}`;
|
|
8496
8497
|
}
|
|
8497
8498
|
async function main() {
|
|
8499
|
+
if (process.argv.slice(2).some((arg) => arg === "-v" || arg === "--version")) {
|
|
8500
|
+
stdout.write(`${readVersion() || "unknown"}
|
|
8501
|
+
`);
|
|
8502
|
+
return;
|
|
8503
|
+
}
|
|
8498
8504
|
if (process.argv[2] === "daemon") {
|
|
8499
8505
|
await runDaemonCommand(process.argv.slice(3));
|
|
8500
8506
|
return;
|