costclaw 0.12.0 → 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.
Files changed (2) hide show
  1. package/dist/index.js +15 -4
  2. package/package.json +1 -6
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
- import { pathToFileURL } from "url";
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.0" : "0.0.0-dev";
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
- var isEntryPoint = process.argv[1] !== void 0 && import.meta.url === pathToFileURL(process.argv[1]).href;
7268
- if (isEntryPoint) {
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.0",
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": {
@@ -14,11 +14,6 @@
14
14
  },
15
15
  "license": "UNLICENSED",
16
16
  "homepage": "https://costclaw.io",
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/ucsandman/costclaw.git",
20
- "directory": "apps/cli"
21
- },
22
17
  "keywords": [
23
18
  "claude-code",
24
19
  "claude",