costclaw 0.12.1 → 0.12.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/dist/index.js +15 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import {
|
|
4
|
+
import { fileURLToPath } from "url";
|
|
5
|
+
import { realpathSync } from "fs";
|
|
5
6
|
import { homedir as homedir7 } from "os";
|
|
6
7
|
|
|
7
8
|
// ../../packages/engine/src/types.ts
|
|
@@ -7053,7 +7054,7 @@ function parseApplyFlags(args) {
|
|
|
7053
7054
|
};
|
|
7054
7055
|
}
|
|
7055
7056
|
function cliVersion() {
|
|
7056
|
-
return true ? "0.12.
|
|
7057
|
+
return true ? "0.12.2" : "0.0.0-dev";
|
|
7057
7058
|
}
|
|
7058
7059
|
function isHelpRequest(command, args) {
|
|
7059
7060
|
if (command === void 0) return false;
|
|
@@ -7264,8 +7265,17 @@ Run: costclaw optimize
|
|
|
7264
7265
|
process.stderr.write(helpText() + "\n");
|
|
7265
7266
|
process.exit(command ? 1 : 0);
|
|
7266
7267
|
}
|
|
7267
|
-
|
|
7268
|
-
if (
|
|
7268
|
+
function isEntryPoint(argvPath, moduleUrl) {
|
|
7269
|
+
if (argvPath === void 0) return false;
|
|
7270
|
+
const modulePath = fileURLToPath(moduleUrl);
|
|
7271
|
+
if (argvPath === modulePath) return true;
|
|
7272
|
+
try {
|
|
7273
|
+
return realpathSync(argvPath) === realpathSync(modulePath);
|
|
7274
|
+
} catch {
|
|
7275
|
+
return false;
|
|
7276
|
+
}
|
|
7277
|
+
}
|
|
7278
|
+
if (isEntryPoint(process.argv[1], import.meta.url)) {
|
|
7269
7279
|
main().catch((err) => {
|
|
7270
7280
|
console.error(err instanceof Error ? err.message : String(err));
|
|
7271
7281
|
process.exit(1);
|
|
@@ -7274,6 +7284,7 @@ if (isEntryPoint) {
|
|
|
7274
7284
|
export {
|
|
7275
7285
|
cliVersion,
|
|
7276
7286
|
helpText,
|
|
7287
|
+
isEntryPoint,
|
|
7277
7288
|
isHelpRequest,
|
|
7278
7289
|
parseApplyFlags,
|
|
7279
7290
|
parseAuditFlags,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "costclaw",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2",
|
|
4
4
|
"description": "Local cost and setup audit for Claude Code. Finds recoverable token spend and scores your setup across six pillars, with your prompts never leaving your machine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|