@inbrace-tech/tokenline 1.0.0 → 1.0.1

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/cli.js +2 -2
  2. package/package.json +5 -2
package/dist/cli.js CHANGED
@@ -18,7 +18,7 @@ tokenline \u2014 uninstall
18
18
  `));let t=d(e),o=f(t);if(!o.exists||o.data===null?i(`No usable settings at ${t} \u2014 nothing to remove.`):S(o.data.statusLine?.command)?e.dryRun?r(`[dry-run] would remove statusLine from ${t}`):(x(t),delete o.data.statusLine,(0,g.writeFileSync)(t,JSON.stringify(o.data,null,2)+`
19
19
  `),r(`removed statusLine from ${t} (backup: settings.json.bak)`)):r(`No tokenline statusLine in ${t} \u2014 left untouched.`),e.purge){let n=$(e);(0,g.existsSync)(n)&&(e.dryRun?r(`[dry-run] would delete ${n}`):((0,g.unlinkSync)(n),r(`deleted ${n}`)))}console.log(`
20
20
  ${k("Done.")} Restart Claude Code.
21
- `)}var Y=JSON.parse((0,A.readFileSync)((0,D.join)(__dirname,"..","package.json"),"utf8"));function z(e){let t={_:[],dir:null,project:!1,dryRun:!1,force:!1,purge:!1,help:!1,version:!1,unknown:null};for(let o=0;o<e.length;o++){let n=e[o];switch(n){case"--dir":t.dir=e[++o]??null;break;case"--project":case"--local":t.project=!0;break;case"--dry-run":t.dryRun=!0;break;case"--force":t.force=!0;break;case"--purge":t.purge=!0;break;case"-h":case"--help":t.help=!0;break;case"-v":case"--version":t.version=!0;break;default:n!==void 0&&n.startsWith("-")?t.unknown=n:n!==void 0&&t._.push(n)}}return t}function F(){console.log(`
21
+ `)}var Y=JSON.parse((0,A.readFileSync)((0,D.join)(__dirname,"..","package.json"),"utf8"));function z(e){let t={_:[],dir:null,project:!1,dryRun:!1,force:!1,purge:!1,help:!1,version:!1,unknown:[]};for(let o=0;o<e.length;o++){let n=e[o];switch(n){case"--dir":t.dir=e[++o]??null;break;case"--project":case"--local":t.project=!0;break;case"--dry-run":t.dryRun=!0;break;case"--force":t.force=!0;break;case"--purge":t.purge=!0;break;case"-h":case"--help":t.help=!0;break;case"-v":case"--version":t.version=!0;break;default:n!==void 0&&n.startsWith("-")?t.unknown.push(n):n!==void 0&&t._.push(n)}}return t}function F(){console.log(`
22
22
  ${s("tokenline")} \u2014 a cache-aware statusline for AI coding CLIs
23
23
 
24
24
  ${s("Usage")}
@@ -41,4 +41,4 @@ ${s("Options")}
41
41
  ${s("Notes")}
42
42
  The statusline runs as 'bash tokenline.sh' \u2014 no Node in the per-second hot path.
43
43
  jq is required at runtime; this installer checks for it but cannot install it.
44
- `)}function H(){let e=z(process.argv.slice(2));if(e.unknown&&i(`ignoring unknown option: ${e.unknown}`),e.version){console.log(Y.version);return}if(e.help||e._.length===0){F();return}try{switch(e._[0]){case"init":U(e);break;case"doctor":P();break;case"uninstall":case"remove":B(e);break;default:u(`Unknown command: ${e._[0]}`),F(),process.exitCode=1}}catch(t){u(t instanceof Error?t.message:String(t)),process.exitCode=1}}H();
44
+ `)}function H(){let e=z(process.argv.slice(2));if(e.unknown.length>0&&e.unknown.forEach(t=>i(`ignoring unknown option: ${t}`)),e.version){console.log(Y.version);return}if(e.help||e._.length===0){F();return}try{switch(e._[0]){case"init":U(e);break;case"doctor":P();break;case"uninstall":case"remove":B(e);break;default:u(`Unknown command: ${e._[0]}`),F(),process.exitCode=1}}catch(t){u(t instanceof Error?t.message:String(t)),process.exitCode=1}}H();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inbrace-tech/tokenline",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A cache-aware statusline for AI coding CLIs — installs tokenline.sh and wires it into your Claude Code settings.",
5
5
  "bin": {
6
6
  "tokenline": "dist/cli.js"
@@ -37,6 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "devDependencies": {
40
+ "@changesets/cli": "^2.31.0",
40
41
  "@eslint/js": "10.0.1",
41
42
  "@types/node": "24.13.2",
42
43
  "eslint": "10.5.0",
@@ -54,6 +55,8 @@
54
55
  "typecheck": "tsc --noEmit -p tsconfig.json",
55
56
  "lint": "eslint . --cache --cache-location node_modules/.cache/.eslintcache --fix",
56
57
  "format": "prettier --write \"src/**/*.ts\"",
57
- "format:check": "prettier --check \"src/**/*.ts\""
58
+ "format:check": "prettier --check \"src/**/*.ts\"",
59
+ "changeset": "changeset",
60
+ "release": "pnpm build && changeset publish"
58
61
  }
59
62
  }