opencode-openai-codex-multi-auth 4.5.1 → 4.5.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.
package/README.md CHANGED
@@ -44,6 +44,15 @@ npx -y opencode-openai-codex-multi-auth@latest --uninstall
44
44
  npx -y opencode-openai-codex-multi-auth@latest --uninstall --all
45
45
  ```
46
46
 
47
+ ## ⚠️ Migration Note (Multi-Plan Accounts)
48
+ If you used multiple plans under the same ChatGPT accountId on older versions, the
49
+ previous matching logic could overwrite entries. To regenerate a clean layout:
50
+
51
+ ```bash
52
+ rm ~/.config/opencode/openai-codex-accounts.json
53
+ opencode auth login
54
+ ```
55
+
47
56
  ---
48
57
  ## 📦 Models
49
58
  - **gpt-5.2** (none/low/medium/high/xhigh)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-openai-codex-multi-auth",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
4
4
  "description": "OpenAI ChatGPT (Codex backend) OAuth auth plugin for opencode - use your ChatGPT Plus/Pro subscription instead of API credits",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -32,7 +32,7 @@
32
32
  "url": "https://github.com/iam-brain/opencode-openai-codex-multi-auth/issues"
33
33
  },
34
34
  "scripts": {
35
- "build": "tsc && cp lib/oauth-success.html dist/lib/",
35
+ "build": "tsc && node scripts/build-oauth-success.js",
36
36
  "typecheck": "tsc --noEmit",
37
37
  "test": "vitest run",
38
38
  "test:watch": "vitest",
@@ -0,0 +1,20 @@
1
+ import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+ const rootDir = join(__dirname, "..");
8
+
9
+ const packageJsonPath = join(rootDir, "package.json");
10
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
11
+ const version = typeof packageJson.version === "string" ? packageJson.version : "unknown";
12
+
13
+ const sourcePath = join(rootDir, "lib", "oauth-success.html");
14
+ const sourceHtml = readFileSync(sourcePath, "utf-8");
15
+ const renderedHtml = sourceHtml.replace(/__PLUGIN_VERSION__/g, version);
16
+
17
+ const destDir = join(rootDir, "dist", "lib");
18
+ mkdirSync(destDir, { recursive: true });
19
+ const destPath = join(destDir, "oauth-success.html");
20
+ writeFileSync(destPath, renderedHtml, "utf-8");