@cortexkit/opencode-openai-auth 1.21.1 → 1.22.0
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/dist/bin.js +2 -2
- package/dist/{index-wwp78jx3.js → index-0wh22s62.js} +1 -1
- package/dist/{index-7v9tyyrn.js → index-1k8a281v.js} +2 -2
- package/dist/{index-fgt2dy20.js → index-677jqrrt.js} +1 -1
- package/dist/{index-jq1efs0q.js → index-67twdyyz.js} +11 -11
- package/dist/{index-hxp3dm9e.js → index-6afhs2jq.js} +2 -2
- package/dist/{index-0hk39zee.js → index-8bt81cys.js} +2 -2
- package/dist/index-9tg5xx9a.js +2 -0
- package/dist/{index-ecqb42ev.js → index-b3bgqy7r.js} +2 -2
- package/dist/index-dw1nh7dk.js +60 -0
- package/dist/{index-vqy1mwn3.js → index-mepr345k.js} +1 -1
- package/dist/index-ney54jhs.js +79 -0
- package/dist/{index-0cpz8t4q.js → index-vaf4mqd1.js} +2 -2
- package/dist/index-w6kars9d.js +1 -0
- package/dist/{index-r891a915.js → index-xbhtpa9s.js} +2 -2
- package/dist/index.d.ts +4 -24
- package/dist/index.js +1 -1
- package/dist/map-D5PHhv4z.d.ts +72 -0
- package/dist/rpc/port-file.js +1 -1
- package/dist/rpc/protocol.js +1 -1
- package/dist/rpc/rpc-client.js +1 -1
- package/dist/rpc/rpc-dir.js +1 -1
- package/dist/{codex-request-WGAY0gn4.d.ts → runtime-layout-DdxprfY1.d.ts} +665 -645
- package/dist/{sidebar-state-CrRiE9hw.d.ts → sidebar-state--OTpRzFd.d.ts} +2 -72
- package/dist/sidebar-state.d.ts +1 -1
- package/dist/sidebar-state.js +1 -1
- package/dist/{token-8afntt1a.js → token-92yc9q7w.js} +1 -1
- package/dist/token-util-g8e70a6j.js +1 -0
- package/dist/tui-preferences.js +1 -1
- package/dist/tui.d.ts +1 -1
- package/dist/v2/server.d.ts +10 -3
- package/dist/v2/server.js +4 -4
- package/package.json +1 -1
- package/src/tui-compiled/raw/logger.js +5 -22
- package/src/tui-compiled/raw/shared/d669d72c40e9e116-logger.js +30 -1
- package/src/tui-compiled/runtime/logger.js +5 -22
- package/src/tui-compiled/runtime/shared/d669d72c40e9e116-logger.js +30 -1
- package/dist/index-0cht4a77.js +0 -64
- package/dist/index-dmdmb1pp.js +0 -1
- package/dist/index-j28pt8dy.js +0 -2
- package/dist/index-s1tk4br4.js +0 -75
- package/dist/token-util-htrre2k8.js +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { tmpdir } from "node:os";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
setLogLevel
|
|
4
|
+
parseLogLevel,
|
|
5
|
+
setupLogger
|
|
7
6
|
} from "./shared/3c2d4169d00f907e-tui-support.js";
|
|
8
7
|
export {
|
|
8
|
+
applySettingsLogLevel,
|
|
9
9
|
createLogger,
|
|
10
10
|
flushForTest,
|
|
11
11
|
flushLogs,
|
|
@@ -13,27 +13,10 @@ export {
|
|
|
13
13
|
redactStrings,
|
|
14
14
|
setLogLevel
|
|
15
15
|
} from "./shared/3c2d4169d00f907e-tui-support.js";
|
|
16
|
-
const LEVELS = ["error", "warn", "info", "debug", "trace"];
|
|
17
16
|
export function getLogFile() {
|
|
18
17
|
return process.env.OPENCODE_OPENAI_AUTH_LOG_FILE ?? (process.platform === "win32" ? join(tmpdir(), "opencode-openai-auth", "opencode-openai-auth.log") : join(tmpdir(), "opencode-openai-auth.log"));
|
|
19
18
|
}
|
|
20
19
|
export function getEnvLogLevel() {
|
|
21
|
-
|
|
22
|
-
return env && LEVELS.includes(env) ? env : void 0;
|
|
23
|
-
}
|
|
24
|
-
export function applySettingsLogLevel(level, phase) {
|
|
25
|
-
if (level !== "default")
|
|
26
|
-
setLogLevel(level);
|
|
27
|
-
else if (phase === "refresh")
|
|
28
|
-
setLogLevel(void 0);
|
|
20
|
+
return parseLogLevel(process.env.OPENCODE_OPENAI_AUTH_LOG_LEVEL);
|
|
29
21
|
}
|
|
30
|
-
|
|
31
|
-
process.once("beforeExit", async () => {
|
|
32
|
-
try {
|
|
33
|
-
await flushLogs();
|
|
34
|
-
} catch {
|
|
35
|
-
process.emitWarning("OpenAI auth could not flush its log file at shutdown");
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
if (process.platform !== "win32")
|
|
39
|
-
process.on("exit", () => flushLogs());
|
|
22
|
+
setupLogger({ file: getLogFile, level: getEnvLogLevel });
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
initLogger as commonInitLogger,
|
|
3
|
-
createRedactor
|
|
3
|
+
createRedactor,
|
|
4
|
+
flushLogs,
|
|
5
|
+
setLogLevel
|
|
4
6
|
} from "./cc9e0702a752cea7-index.js";
|
|
5
7
|
export {
|
|
6
8
|
createLogger,
|
|
@@ -17,3 +19,30 @@ export const { redact, redactStrings } = openaiRedactor;
|
|
|
17
19
|
export function initLogger(options) {
|
|
18
20
|
commonInitLogger({ ...options, extraSecretKeys: isOpenaiIdentityKey });
|
|
19
21
|
}
|
|
22
|
+
const LEVELS = ["error", "warn", "info", "debug", "trace"];
|
|
23
|
+
export function parseLogLevel(value) {
|
|
24
|
+
const level = value;
|
|
25
|
+
return level && LEVELS.includes(level) ? level : void 0;
|
|
26
|
+
}
|
|
27
|
+
export function applySettingsLogLevel(level, phase) {
|
|
28
|
+
if (level !== "default")
|
|
29
|
+
setLogLevel(level);
|
|
30
|
+
else if (phase === "refresh")
|
|
31
|
+
setLogLevel(void 0);
|
|
32
|
+
}
|
|
33
|
+
let shutdownHookInstalled = !1;
|
|
34
|
+
export function setupLogger(options) {
|
|
35
|
+
initLogger(options);
|
|
36
|
+
if (shutdownHookInstalled)
|
|
37
|
+
return;
|
|
38
|
+
shutdownHookInstalled = !0;
|
|
39
|
+
process.once("beforeExit", async () => {
|
|
40
|
+
try {
|
|
41
|
+
await flushLogs();
|
|
42
|
+
} catch {
|
|
43
|
+
process.emitWarning("OpenAI auth could not flush its log file at shutdown");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (process.platform !== "win32")
|
|
47
|
+
process.on("exit", () => flushLogs());
|
|
48
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { tmpdir } from "node:os";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
setLogLevel
|
|
4
|
+
parseLogLevel,
|
|
5
|
+
setupLogger
|
|
7
6
|
} from "./shared/3c2d4169d00f907e-tui-support.js";
|
|
8
7
|
export {
|
|
8
|
+
applySettingsLogLevel,
|
|
9
9
|
createLogger,
|
|
10
10
|
flushForTest,
|
|
11
11
|
flushLogs,
|
|
@@ -13,27 +13,10 @@ export {
|
|
|
13
13
|
redactStrings,
|
|
14
14
|
setLogLevel
|
|
15
15
|
} from "./shared/3c2d4169d00f907e-tui-support.js";
|
|
16
|
-
const LEVELS = ["error", "warn", "info", "debug", "trace"];
|
|
17
16
|
export function getLogFile() {
|
|
18
17
|
return process.env.OPENCODE_OPENAI_AUTH_LOG_FILE ?? (process.platform === "win32" ? join(tmpdir(), "opencode-openai-auth", "opencode-openai-auth.log") : join(tmpdir(), "opencode-openai-auth.log"));
|
|
19
18
|
}
|
|
20
19
|
export function getEnvLogLevel() {
|
|
21
|
-
|
|
22
|
-
return env && LEVELS.includes(env) ? env : void 0;
|
|
23
|
-
}
|
|
24
|
-
export function applySettingsLogLevel(level, phase) {
|
|
25
|
-
if (level !== "default")
|
|
26
|
-
setLogLevel(level);
|
|
27
|
-
else if (phase === "refresh")
|
|
28
|
-
setLogLevel(void 0);
|
|
20
|
+
return parseLogLevel(process.env.OPENCODE_OPENAI_AUTH_LOG_LEVEL);
|
|
29
21
|
}
|
|
30
|
-
|
|
31
|
-
process.once("beforeExit", async () => {
|
|
32
|
-
try {
|
|
33
|
-
await flushLogs();
|
|
34
|
-
} catch {
|
|
35
|
-
process.emitWarning("OpenAI auth could not flush its log file at shutdown");
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
if (process.platform !== "win32")
|
|
39
|
-
process.on("exit", () => flushLogs());
|
|
22
|
+
setupLogger({ file: getLogFile, level: getEnvLogLevel });
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
initLogger as commonInitLogger,
|
|
3
|
-
createRedactor
|
|
3
|
+
createRedactor,
|
|
4
|
+
flushLogs,
|
|
5
|
+
setLogLevel
|
|
4
6
|
} from "./cc9e0702a752cea7-index.js";
|
|
5
7
|
export {
|
|
6
8
|
createLogger,
|
|
@@ -17,3 +19,30 @@ export const { redact, redactStrings } = openaiRedactor;
|
|
|
17
19
|
export function initLogger(options) {
|
|
18
20
|
commonInitLogger({ ...options, extraSecretKeys: isOpenaiIdentityKey });
|
|
19
21
|
}
|
|
22
|
+
const LEVELS = ["error", "warn", "info", "debug", "trace"];
|
|
23
|
+
export function parseLogLevel(value) {
|
|
24
|
+
const level = value;
|
|
25
|
+
return level && LEVELS.includes(level) ? level : void 0;
|
|
26
|
+
}
|
|
27
|
+
export function applySettingsLogLevel(level, phase) {
|
|
28
|
+
if (level !== "default")
|
|
29
|
+
setLogLevel(level);
|
|
30
|
+
else if (phase === "refresh")
|
|
31
|
+
setLogLevel(void 0);
|
|
32
|
+
}
|
|
33
|
+
let shutdownHookInstalled = !1;
|
|
34
|
+
export function setupLogger(options) {
|
|
35
|
+
initLogger(options);
|
|
36
|
+
if (shutdownHookInstalled)
|
|
37
|
+
return;
|
|
38
|
+
shutdownHookInstalled = !0;
|
|
39
|
+
process.once("beforeExit", async () => {
|
|
40
|
+
try {
|
|
41
|
+
await flushLogs();
|
|
42
|
+
} catch {
|
|
43
|
+
process.emitWarning("OpenAI auth could not flush its log file at shutdown");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (process.platform !== "win32")
|
|
47
|
+
process.on("exit", () => flushLogs());
|
|
48
|
+
}
|