@loongphy/codex-auth 0.2.6-alpha.1 → 0.2.6-alpha.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/bin/codex-auth.js CHANGED
@@ -1,8 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const path = require("node:path");
4
- const { spawnSync } = require("node:child_process");
5
- const fs = require("node:fs");
3
+ import { spawnSync } from "node:child_process";
4
+ import fs from "node:fs";
5
+ import { createRequire } from "node:module";
6
+ import path from "node:path";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+ const require = createRequire(import.meta.url);
6
12
  const rootPackageJsonPath = path.join(__dirname, "..", "package.json");
7
13
  const requiredNodeMajor = 22;
8
14
 
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@loongphy/codex-auth",
3
- "version": "0.2.6-alpha.1",
3
+ "version": "0.2.6-alpha.2",
4
+ "type": "module",
4
5
  "description": "CLI for switching Codex accounts",
5
6
  "license": "MIT",
6
7
  "repository": {
@@ -20,12 +21,12 @@
20
21
  "README.md"
21
22
  ],
22
23
  "optionalDependencies": {
23
- "@loongphy/codex-auth-linux-x64": "0.2.6-alpha.1",
24
- "@loongphy/codex-auth-linux-arm64": "0.2.6-alpha.1",
25
- "@loongphy/codex-auth-darwin-x64": "0.2.6-alpha.1",
26
- "@loongphy/codex-auth-darwin-arm64": "0.2.6-alpha.1",
27
- "@loongphy/codex-auth-win32-x64": "0.2.6-alpha.1",
28
- "@loongphy/codex-auth-win32-arm64": "0.2.6-alpha.1"
24
+ "@loongphy/codex-auth-linux-x64": "0.2.6-alpha.2",
25
+ "@loongphy/codex-auth-linux-arm64": "0.2.6-alpha.2",
26
+ "@loongphy/codex-auth-darwin-x64": "0.2.6-alpha.2",
27
+ "@loongphy/codex-auth-darwin-arm64": "0.2.6-alpha.2",
28
+ "@loongphy/codex-auth-win32-x64": "0.2.6-alpha.2",
29
+ "@loongphy/codex-auth-win32-arm64": "0.2.6-alpha.2"
29
30
  },
30
31
  "scripts": {
31
32
  "check:versions": "node scripts/npm/check-versions.mjs",