@loongphy/codex-auth 0.2.3-alpha.1 → 0.2.3-alpha.3

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
@@ -5,9 +5,9 @@
5
5
  `codex-auth` is a command-line tool for switching Codex accounts.
6
6
 
7
7
  > [!IMPORTANT]
8
- > For **Codex CLI** users, after switching accounts, you must fully exit `codex` (type `/exit` or close the terminal session) and start it again for the new account to take effect.
8
+ > For **Codex CLI** and **Codex App** users, switch accounts, then restart the client for the new account to take effect.
9
9
  >
10
- > If you want seamless automatic account switching without restarting `codex`, use forked [codext](https://github.com/Loongphy/codext), but you need to build it yourself because there is no prebuilt install method yet.
10
+ > If you use the CLI and want seamless automatic account switching without restarting, use the forked [`codext`](https://github.com/Loongphy/codext), an enhanced Codex CLI. Install it with `npm i -g @loongphy/codext` and run `codext`.
11
11
 
12
12
  ## Supported Platforms
13
13
 
@@ -39,12 +39,15 @@ npm install -g @loongphy/codex-auth
39
39
  npx @loongphy/codex-auth list
40
40
  ```
41
41
 
42
- npm packages currently support Linux x64, macOS x64, macOS arm64, and Windows x64.
42
+ npm packages currently support Linux x64, macOS x64, macOS arm64, Windows x64, and Windows arm64.
43
43
 
44
44
  > [!NOTE]
45
45
  > If you only installed `@loongphy/codex-auth` with npm, you do not need any legacy cleanup steps.
46
46
  > Older Bash/PowerShell GitHub-release installs could leave a standalone `codex-auth` binary outside npm's install path.
47
47
  > If you previously used those legacy installers, remove the leftover binaries and profile changes during migration.
48
+ > API-backed usage refresh and team-name refresh use Node.js `fetch`.
49
+ > npm installs already satisfy that requirement.
50
+ > Legacy standalone binary installs need Node.js 18+ on `PATH` when `codex-auth config api enable` is used.
48
51
 
49
52
  ### Uninstall
50
53
 
package/bin/codex-auth.js CHANGED
@@ -9,7 +9,8 @@ const packageMap = {
9
9
  "linux:x64": "@loongphy/codex-auth-linux-x64",
10
10
  "darwin:x64": "@loongphy/codex-auth-darwin-x64",
11
11
  "darwin:arm64": "@loongphy/codex-auth-darwin-arm64",
12
- "win32:x64": "@loongphy/codex-auth-win32-x64"
12
+ "win32:x64": "@loongphy/codex-auth-win32-x64",
13
+ "win32:arm64": "@loongphy/codex-auth-win32-arm64"
13
14
  };
14
15
 
15
16
  function readRootPackage() {
@@ -69,7 +70,11 @@ function resolveBinary() {
69
70
 
70
71
  const binaryPath = resolveBinary();
71
72
  const child = spawnSync(binaryPath, process.argv.slice(2), {
72
- stdio: "inherit"
73
+ stdio: "inherit",
74
+ env: {
75
+ ...process.env,
76
+ CODEX_AUTH_NODE_EXECUTABLE: process.execPath
77
+ }
73
78
  });
74
79
 
75
80
  if (child.error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loongphy/codex-auth",
3
- "version": "0.2.3-alpha.1",
3
+ "version": "0.2.3-alpha.3",
4
4
  "description": "CLI for switching Codex accounts",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,10 +20,11 @@
20
20
  "README.md"
21
21
  ],
22
22
  "optionalDependencies": {
23
- "@loongphy/codex-auth-linux-x64": "0.2.3-alpha.1",
24
- "@loongphy/codex-auth-darwin-x64": "0.2.3-alpha.1",
25
- "@loongphy/codex-auth-darwin-arm64": "0.2.3-alpha.1",
26
- "@loongphy/codex-auth-win32-x64": "0.2.3-alpha.1"
23
+ "@loongphy/codex-auth-linux-x64": "0.2.3-alpha.3",
24
+ "@loongphy/codex-auth-darwin-x64": "0.2.3-alpha.3",
25
+ "@loongphy/codex-auth-darwin-arm64": "0.2.3-alpha.3",
26
+ "@loongphy/codex-auth-win32-x64": "0.2.3-alpha.3",
27
+ "@loongphy/codex-auth-win32-arm64": "0.2.3-alpha.3"
27
28
  },
28
29
  "scripts": {
29
30
  "check:versions": "node scripts/npm/check-versions.mjs",