opencode-usage-limit 1.0.1 → 1.0.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.
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // opencode-usage-limit 설치 CLI
3
3
  // 사용:
4
- // node install.mjs (설치 — 소스 디렉토리에서 직접 실행)
5
- // npx opencode-usage-limit (npm 설치 후)
6
- // node install.mjs --remove (제거)
4
+ // npx opencode-usage-limit (설치)
5
+ // npx opencode-usage-limit --remove (제거)
7
6
  //
8
7
  // 설치 내용:
9
8
  // 1. 백그라운드 수집기(index.js) → ~/.config/opencode/plugins/usage-tracker-collector.js 복사 + opencode.jsonc 등록
@@ -12,9 +11,10 @@
12
11
  import { existsSync, mkdirSync, readFileSync, writeFileSync, copyFileSync, rmSync } from "node:fs"
13
12
  import path from "node:path"
14
13
  import { homedir } from "node:os"
14
+ import { fileURLToPath } from "node:url"
15
15
 
16
16
  const remove = process.argv.includes("--remove")
17
- const SRC = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..")
17
+ const SRC = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..")
18
18
  const CONFIG_DIR = process.env.OPENCODE_CONFIG_DIR || path.join(homedir(), ".config/opencode")
19
19
 
20
20
  const COLLECTOR_SRC = path.join(SRC, "index.js")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-usage-limit",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "OpenCode plugin that shows today's remaining usage limit as a sidebar gauge, tracks 429 rate limits, and provides a /usage dashboard",
5
5
  "type": "module",
6
6
  "main": "index.js",