codex-team 0.0.3 → 0.0.5
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 +1 -0
- package/dist/cli.cjs +15 -1
- package/dist/main.cjs +15 -1
- package/dist/main.js +15 -1
- package/package.json +9 -10
package/README.md
CHANGED
package/dist/cli.cjs
CHANGED
|
@@ -12,6 +12,9 @@ var __webpack_modules__ = {
|
|
|
12
12
|
var timezone_js_default = /*#__PURE__*/ __webpack_require__.n(timezone_js_namespaceObject);
|
|
13
13
|
const utc_js_namespaceObject = require("dayjs/plugin/utc.js");
|
|
14
14
|
var utc_js_default = /*#__PURE__*/ __webpack_require__.n(utc_js_namespaceObject);
|
|
15
|
+
var package_namespaceObject = {
|
|
16
|
+
rE: "0.0.5"
|
|
17
|
+
};
|
|
15
18
|
const promises_namespaceObject = require("node:fs/promises");
|
|
16
19
|
function isRecord(value) {
|
|
17
20
|
return "object" == typeof value && null !== value && !Array.isArray(value);
|
|
@@ -904,6 +907,8 @@ var __webpack_modules__ = {
|
|
|
904
907
|
stream.write(`codexm - manage multiple Codex ChatGPT auth snapshots
|
|
905
908
|
|
|
906
909
|
Usage:
|
|
910
|
+
codexm --version
|
|
911
|
+
codexm --help
|
|
907
912
|
codexm current [--json]
|
|
908
913
|
codexm list [name] [--json]
|
|
909
914
|
codexm save <name> [--force] [--json]
|
|
@@ -1107,12 +1112,17 @@ Account names must match /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.
|
|
|
1107
1112
|
if (!streams.stdin.isTTY) throw new Error(`Refusing to remove "${name}" without --yes in a non-interactive terminal.`);
|
|
1108
1113
|
streams.stdout.write(`Remove saved account "${name}"? [y/N] `);
|
|
1109
1114
|
return await new Promise((resolve)=>{
|
|
1115
|
+
const cleanup = ()=>{
|
|
1116
|
+
streams.stdin.off("data", onData);
|
|
1117
|
+
streams.stdin.pause();
|
|
1118
|
+
};
|
|
1110
1119
|
const onData = (buffer)=>{
|
|
1111
1120
|
const answer = buffer.toString("utf8").trim().toLowerCase();
|
|
1112
|
-
|
|
1121
|
+
cleanup();
|
|
1113
1122
|
streams.stdout.write("\n");
|
|
1114
1123
|
resolve("y" === answer || "yes" === answer);
|
|
1115
1124
|
};
|
|
1125
|
+
streams.stdin.resume();
|
|
1116
1126
|
streams.stdin.on("data", onData);
|
|
1117
1127
|
});
|
|
1118
1128
|
}
|
|
@@ -1126,6 +1136,10 @@ Account names must match /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/.
|
|
|
1126
1136
|
const parsed = parseArgs(argv);
|
|
1127
1137
|
const json = parsed.flags.has("--json");
|
|
1128
1138
|
try {
|
|
1139
|
+
if (parsed.flags.has("--version")) {
|
|
1140
|
+
streams.stdout.write(`${package_namespaceObject.rE}\n`);
|
|
1141
|
+
return 0;
|
|
1142
|
+
}
|
|
1129
1143
|
if (!parsed.command || parsed.flags.has("--help")) {
|
|
1130
1144
|
printHelp(streams.stdout);
|
|
1131
1145
|
return 0;
|
package/dist/main.cjs
CHANGED
|
@@ -42,6 +42,9 @@ const timezone_js_namespaceObject = require("dayjs/plugin/timezone.js");
|
|
|
42
42
|
var timezone_js_default = /*#__PURE__*/ __webpack_require__.n(timezone_js_namespaceObject);
|
|
43
43
|
const utc_js_namespaceObject = require("dayjs/plugin/utc.js");
|
|
44
44
|
var utc_js_default = /*#__PURE__*/ __webpack_require__.n(utc_js_namespaceObject);
|
|
45
|
+
var package_namespaceObject = {
|
|
46
|
+
rE: "0.0.5"
|
|
47
|
+
};
|
|
45
48
|
const promises_namespaceObject = require("node:fs/promises");
|
|
46
49
|
function isRecord(value) {
|
|
47
50
|
return "object" == typeof value && null !== value && !Array.isArray(value);
|
|
@@ -934,6 +937,8 @@ function printHelp(stream) {
|
|
|
934
937
|
stream.write(`codexm - manage multiple Codex ChatGPT auth snapshots
|
|
935
938
|
|
|
936
939
|
Usage:
|
|
940
|
+
codexm --version
|
|
941
|
+
codexm --help
|
|
937
942
|
codexm current [--json]
|
|
938
943
|
codexm list [name] [--json]
|
|
939
944
|
codexm save <name> [--force] [--json]
|
|
@@ -1137,12 +1142,17 @@ async function confirmRemoval(name, streams) {
|
|
|
1137
1142
|
if (!streams.stdin.isTTY) throw new Error(`Refusing to remove "${name}" without --yes in a non-interactive terminal.`);
|
|
1138
1143
|
streams.stdout.write(`Remove saved account "${name}"? [y/N] `);
|
|
1139
1144
|
return await new Promise((resolve)=>{
|
|
1145
|
+
const cleanup = ()=>{
|
|
1146
|
+
streams.stdin.off("data", onData);
|
|
1147
|
+
streams.stdin.pause();
|
|
1148
|
+
};
|
|
1140
1149
|
const onData = (buffer)=>{
|
|
1141
1150
|
const answer = buffer.toString("utf8").trim().toLowerCase();
|
|
1142
|
-
|
|
1151
|
+
cleanup();
|
|
1143
1152
|
streams.stdout.write("\n");
|
|
1144
1153
|
resolve("y" === answer || "yes" === answer);
|
|
1145
1154
|
};
|
|
1155
|
+
streams.stdin.resume();
|
|
1146
1156
|
streams.stdin.on("data", onData);
|
|
1147
1157
|
});
|
|
1148
1158
|
}
|
|
@@ -1156,6 +1166,10 @@ async function runCli(argv, options = {}) {
|
|
|
1156
1166
|
const parsed = parseArgs(argv);
|
|
1157
1167
|
const json = parsed.flags.has("--json");
|
|
1158
1168
|
try {
|
|
1169
|
+
if (parsed.flags.has("--version")) {
|
|
1170
|
+
streams.stdout.write(`${package_namespaceObject.rE}\n`);
|
|
1171
|
+
return 0;
|
|
1172
|
+
}
|
|
1159
1173
|
if (!parsed.command || parsed.flags.has("--help")) {
|
|
1160
1174
|
printHelp(streams.stdout);
|
|
1161
1175
|
return 0;
|
package/dist/main.js
CHANGED
|
@@ -7,6 +7,9 @@ import { homedir } from "node:os";
|
|
|
7
7
|
import { basename, dirname, join } from "node:path";
|
|
8
8
|
import { execFile } from "node:child_process";
|
|
9
9
|
import { promisify } from "node:util";
|
|
10
|
+
var package_namespaceObject = {
|
|
11
|
+
rE: "0.0.5"
|
|
12
|
+
};
|
|
10
13
|
function isRecord(value) {
|
|
11
14
|
return "object" == typeof value && null !== value && !Array.isArray(value);
|
|
12
15
|
}
|
|
@@ -894,6 +897,8 @@ function printHelp(stream) {
|
|
|
894
897
|
stream.write(`codexm - manage multiple Codex ChatGPT auth snapshots
|
|
895
898
|
|
|
896
899
|
Usage:
|
|
900
|
+
codexm --version
|
|
901
|
+
codexm --help
|
|
897
902
|
codexm current [--json]
|
|
898
903
|
codexm list [name] [--json]
|
|
899
904
|
codexm save <name> [--force] [--json]
|
|
@@ -1097,12 +1102,17 @@ async function confirmRemoval(name, streams) {
|
|
|
1097
1102
|
if (!streams.stdin.isTTY) throw new Error(`Refusing to remove "${name}" without --yes in a non-interactive terminal.`);
|
|
1098
1103
|
streams.stdout.write(`Remove saved account "${name}"? [y/N] `);
|
|
1099
1104
|
return await new Promise((resolve)=>{
|
|
1105
|
+
const cleanup = ()=>{
|
|
1106
|
+
streams.stdin.off("data", onData);
|
|
1107
|
+
streams.stdin.pause();
|
|
1108
|
+
};
|
|
1100
1109
|
const onData = (buffer)=>{
|
|
1101
1110
|
const answer = buffer.toString("utf8").trim().toLowerCase();
|
|
1102
|
-
|
|
1111
|
+
cleanup();
|
|
1103
1112
|
streams.stdout.write("\n");
|
|
1104
1113
|
resolve("y" === answer || "yes" === answer);
|
|
1105
1114
|
};
|
|
1115
|
+
streams.stdin.resume();
|
|
1106
1116
|
streams.stdin.on("data", onData);
|
|
1107
1117
|
});
|
|
1108
1118
|
}
|
|
@@ -1116,6 +1126,10 @@ async function runCli(argv, options = {}) {
|
|
|
1116
1126
|
const parsed = parseArgs(argv);
|
|
1117
1127
|
const json = parsed.flags.has("--json");
|
|
1118
1128
|
try {
|
|
1129
|
+
if (parsed.flags.has("--version")) {
|
|
1130
|
+
streams.stdout.write(`${package_namespaceObject.rE}\n`);
|
|
1131
|
+
return 0;
|
|
1132
|
+
}
|
|
1119
1133
|
if (!parsed.command || parsed.flags.has("--help")) {
|
|
1120
1134
|
printHelp(streams.stdout);
|
|
1121
1135
|
return 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codex-team",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Manage multiple Codex ChatGPT auth snapshots and quota usage from the command line.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,14 +36,6 @@
|
|
|
36
36
|
"LICENSE",
|
|
37
37
|
"README.md"
|
|
38
38
|
],
|
|
39
|
-
"scripts": {
|
|
40
|
-
"build": "rslib build",
|
|
41
|
-
"dev": "rslib build --watch",
|
|
42
|
-
"prepack": "pnpm build",
|
|
43
|
-
"test": "rstest run",
|
|
44
|
-
"test:watch": "rstest watch",
|
|
45
|
-
"typecheck": "tsc --noEmit"
|
|
46
|
-
},
|
|
47
39
|
"engines": {
|
|
48
40
|
"node": ">=20"
|
|
49
41
|
},
|
|
@@ -59,5 +51,12 @@
|
|
|
59
51
|
},
|
|
60
52
|
"dependencies": {
|
|
61
53
|
"dayjs": "^1.11.20"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "rslib build",
|
|
57
|
+
"dev": "rslib build --watch",
|
|
58
|
+
"test": "rstest run",
|
|
59
|
+
"test:watch": "rstest watch",
|
|
60
|
+
"typecheck": "tsc --noEmit"
|
|
62
61
|
}
|
|
63
|
-
}
|
|
62
|
+
}
|