@sushant-kum/ccstatus 0.0.0-stage → 0.1.0

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 ADDED
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.tsx
4
+ import { jsx } from "react/jsx-runtime";
5
+ var sub = process.argv[2];
6
+ if (sub === "statusline") {
7
+ const { runStatusline } = await import("./statusline-cmd-AVLQRDFI.js");
8
+ await runStatusline();
9
+ } else {
10
+ const { render } = await import("ink");
11
+ const { App } = await import("./app-3OCESK5H.js");
12
+ render(/* @__PURE__ */ jsx(App, {}));
13
+ }
@@ -0,0 +1,48 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ configPath,
4
+ loadConfigFile,
5
+ readSnapshot,
6
+ render,
7
+ snapshotPath,
8
+ toAnsi
9
+ } from "./chunk-XYVU45PI.js";
10
+
11
+ // src/statusline-cmd.ts
12
+ function renderStatuslineAnsi(config, snapshot) {
13
+ if (!config.surfaces.statusline.enabled) {
14
+ return "";
15
+ }
16
+ const width = snapshot.terminalWidth || 200;
17
+ return toAnsi(render(config, snapshot, { surface: "statusline", width }));
18
+ }
19
+ async function runStatusline(env = process.env) {
20
+ const debug = Boolean(env["CCSTATUS_DEBUG"]);
21
+ try {
22
+ const { config, warnings } = loadConfigFile(configPath(env));
23
+ if (debug && warnings.length) {
24
+ process.stderr.write(`ccstatus statusline: ${warnings.join("; ")}
25
+ `);
26
+ }
27
+ const snap = readSnapshot(snapshotPath(env));
28
+ if (snap.source !== "live") {
29
+ if (debug) {
30
+ process.stderr.write("ccstatus statusline: no live snapshot (is the mod running?)\n");
31
+ }
32
+ return;
33
+ }
34
+ const line = renderStatuslineAnsi(config, snap.snapshot);
35
+ if (line) {
36
+ process.stdout.write(line);
37
+ }
38
+ } catch (e) {
39
+ if (debug) {
40
+ process.stderr.write(`ccstatus statusline: ${e instanceof Error ? e.message : String(e)}
41
+ `);
42
+ }
43
+ }
44
+ }
45
+ export {
46
+ renderStatuslineAnsi,
47
+ runStatusline
48
+ };
package/package.json CHANGED
@@ -1,6 +1,56 @@
1
1
  {
2
2
  "name": "@sushant-kum/ccstatus",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Interactive configurator (npx @sushant-kum/ccstatus) for the ccstatus Claude Code status bar — band, status line, pane, and threshold toasts from one config.",
5
+ "license": "MIT",
6
+ "author": "Sushant Kumar",
7
+ "homepage": "https://github.com/sushant-kum/ccstatus#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/sushant-kum/ccstatus.git",
11
+ "directory": "packages/tui"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/sushant-kum/ccstatus/issues"
15
+ },
16
+ "keywords": [
17
+ "claude-code",
18
+ "statusline",
19
+ "status-bar",
20
+ "tui",
21
+ "ink",
22
+ "ccstatusline"
23
+ ],
24
+ "engines": {
25
+ "node": ">=20"
26
+ },
27
+ "type": "module",
28
+ "bin": {
29
+ "ccstatus": "dist/index.js"
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "README.md"
34
+ ],
35
+ "publishConfig": {
36
+ "access": "public"
37
+ },
38
+ "scripts": {
39
+ "build": "tsup",
40
+ "test": "vitest run",
41
+ "typecheck": "tsc --noEmit"
42
+ },
43
+ "dependencies": {
44
+ "ink": "^5.0.0",
45
+ "react": "^18.3.0"
46
+ },
47
+ "devDependencies": {
48
+ "@ccstatus/core": "*",
49
+ "@types/react": "^18.3.0",
50
+ "chalk": "^5.6.2",
51
+ "ink-testing-library": "^4.0.0",
52
+ "tsup": "^8.0.0",
53
+ "typescript": "^5.5.0",
54
+ "vitest": "^2.0.0"
55
+ }
56
+ }