@simonesiega/codex-limits 0.1.3 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonesiega/codex-limits",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Check Codex usage limits, reset times, and reset-credit coupons from a fast, read-only terminal dashboard.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,16 +20,20 @@
20
20
  "scripts/postinstall.cjs",
21
21
  "README.md",
22
22
  "CHANGELOG.md",
23
+ "SECURITY.md",
23
24
  ".env.example",
24
25
  "LICENSE"
25
26
  ],
26
27
  "scripts": {
27
28
  "dev": "bun run src/package/cli.ts",
28
- "build": "bun build src/package/cli.ts --target=node --outfile=dist/cli.js && bun build src/agents/opencode/plugin.tsx --target=node --external \"@opentui/*\" --outfile=dist/index.js",
29
+ "build": "bun run scripts/build.ts",
30
+ "format": "prettier --write .",
31
+ "format:check": "prettier --check .",
29
32
  "typecheck": "tsc --noEmit",
30
33
  "test": "bun test",
31
- "check": "bun run typecheck && bun test && bun run build",
32
- "prepack": "bun run check",
34
+ "package:validate": "bun run scripts/validate-package.ts",
35
+ "check": "bun run format:check && bun run typecheck && bun test && bun run build && bun run package:validate",
36
+ "prepack": "bun run build",
33
37
  "postinstall": "node ./scripts/postinstall.cjs"
34
38
  },
35
39
  "keywords": [
@@ -63,11 +67,11 @@
63
67
  "@types/node": "^22.10.2",
64
68
  "@types/react": "^19.2.17",
65
69
  "bun-types": "^1.1.42",
70
+ "ink": "^7.1.0",
66
71
  "ink-testing-library": "^4.0.0",
72
+ "prettier": "^3.9.4",
73
+ "prettier-plugin-tailwindcss": "^0.8.0",
74
+ "react": "^19.2.7",
67
75
  "typescript": "^5.7.2"
68
- },
69
- "dependencies": {
70
- "ink": "^7.1.0",
71
- "react": "^19.2.7"
72
76
  }
73
77
  }
@@ -1,13 +1,22 @@
1
- const { existsSync } = require("node:fs");
2
- const { join } = require("node:path");
1
+ const {existsSync} = require("node:fs");
2
+ const {join} = require("node:path");
3
3
 
4
4
  const root = process.cwd();
5
5
  const isSourceCheckout = existsSync(join(root, "src"));
6
6
  const normalizedRoot = root.replace(/\\/g, "/");
7
- const isOpencodeManagedInstall = normalizedRoot.includes("/.cache/opencode/") || normalizedRoot.includes("/.opencode/node_modules/");
8
- const isGlobalInstall = process.env.npm_config_global === "true" || process.env.npm_config_location === "global";
9
- const skip = process.env.CI || process.env.CODEX_LIMITS_SKIP_INIT || isSourceCheckout || isOpencodeManagedInstall;
7
+ const isOpencodeManagedInstall =
8
+ normalizedRoot.includes("/.cache/opencode/") ||
9
+ normalizedRoot.includes("/.opencode/node_modules/");
10
+ const isGlobalInstall =
11
+ process.env.npm_config_global === "true" || process.env.npm_config_location === "global";
12
+ const skip =
13
+ process.env.CI ||
14
+ process.env.CODEX_LIMITS_SKIP_INIT ||
15
+ isSourceCheckout ||
16
+ isOpencodeManagedInstall;
10
17
 
11
18
  if (!skip && isGlobalInstall) {
12
- process.stdout.write("codex-limits: installed. Run `codex-limits init` to install optional agent integrations.\n");
19
+ process.stdout.write(
20
+ "codex-limits: installed. Run `codex-limits init` to install optional agent integrations.\n"
21
+ );
13
22
  }
package/types/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
+ /** Public root-module contract loaded by OpenCode. */
1
2
  export interface CodexLimitsTuiPluginModule {
2
3
  id: "codex-limits";
3
4
  tui: (api: unknown) => void | Promise<void>;
4
5
  }
5
-
6
6
  declare const plugin: CodexLimitsTuiPluginModule;
7
-
8
7
  export default plugin;
9
- export const tui: CodexLimitsTuiPluginModule["tui"];
8
+ export declare const tui: CodexLimitsTuiPluginModule["tui"];