@bjesuiter/codex-switcher 1.0.3 → 1.0.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/cdx.mjs +6 -3
- package/package.json +2 -3
package/cdx.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
-
import projectVersion from "project-version";
|
|
4
3
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
5
4
|
import path from "node:path";
|
|
6
5
|
import os from "node:os";
|
|
@@ -11,6 +10,10 @@ import { generatePKCE } from "@openauthjs/openauth/pkce";
|
|
|
11
10
|
import { randomBytes } from "node:crypto";
|
|
12
11
|
import http from "node:http";
|
|
13
12
|
|
|
13
|
+
//#region package.json
|
|
14
|
+
var version = "1.0.4";
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
14
17
|
//#region lib/paths.ts
|
|
15
18
|
const defaultConfigDir = path.join(os.homedir(), ".config", "cdx");
|
|
16
19
|
const defaultPaths = {
|
|
@@ -647,7 +650,7 @@ const interactiveMode = runInteractiveMode;
|
|
|
647
650
|
const createProgram = (deps = {}) => {
|
|
648
651
|
const program = new Command();
|
|
649
652
|
const runLogin = deps.performLogin ?? performLogin;
|
|
650
|
-
program.name("cdx").description("OpenAI account switcher - manage multiple OpenAI Pro subscriptions").version(
|
|
653
|
+
program.name("cdx").description("OpenAI account switcher - manage multiple OpenAI Pro subscriptions").version(version, "-v, --version");
|
|
651
654
|
program.command("login").description("Add a new OpenAI account via OAuth").action(async () => {
|
|
652
655
|
try {
|
|
653
656
|
if (!await runLogin()) {
|
|
@@ -688,7 +691,7 @@ const createProgram = (deps = {}) => {
|
|
|
688
691
|
}
|
|
689
692
|
});
|
|
690
693
|
program.command("version").description("Show CLI version").action(() => {
|
|
691
|
-
process.stdout.write(`${
|
|
694
|
+
process.stdout.write(`${version}\n`);
|
|
692
695
|
});
|
|
693
696
|
program.action(async () => {
|
|
694
697
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bjesuiter/codex-switcher",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI tool to switch between multiple OpenAI accounts for OpenCode",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@clack/prompts": "^0.11.0",
|
|
24
24
|
"@openauthjs/openauth": "^0.4.3",
|
|
25
|
-
"commander": "^14.0.2"
|
|
26
|
-
"project-version": "^2.0.0"
|
|
25
|
+
"commander": "^14.0.2"
|
|
27
26
|
}
|
|
28
27
|
}
|