opencode-acp 1.14.23-pr.332.52 → 1.14.23-pr.332.53
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/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/logger.d.ts +2 -2
- package/dist/lib/logger.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9110,7 +9110,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
|
9110
9110
|
import { join as join3 } from "path";
|
|
9111
9111
|
import { existsSync as existsSync3 } from "fs";
|
|
9112
9112
|
import { homedir as homedir3 } from "os";
|
|
9113
|
-
var LOG_VERSION = true ? "1.14.23-pr.332.
|
|
9113
|
+
var LOG_VERSION = true ? "1.14.23-pr.332.53" : "dev";
|
|
9114
9114
|
var LEVEL_RANK = {
|
|
9115
9115
|
debug: 10,
|
|
9116
9116
|
info: 20,
|
|
@@ -9128,7 +9128,8 @@ var Logger = class {
|
|
|
9128
9128
|
* @param level explicit verbosity; when given it wins over `enabled`.
|
|
9129
9129
|
*/
|
|
9130
9130
|
constructor(enabled, level) {
|
|
9131
|
-
|
|
9131
|
+
const resolved = level !== void 0 && LEVEL_RANK[level] !== void 0 ? level : void 0;
|
|
9132
|
+
this.level = resolved ?? (enabled ? "debug" : "warn");
|
|
9132
9133
|
const configHome = process.env.XDG_CONFIG_HOME || join3(homedir3(), ".config");
|
|
9133
9134
|
this.logDir = join3(configHome, "opencode", "logs", "acp");
|
|
9134
9135
|
}
|
|
@@ -9202,10 +9203,12 @@ var Logger = class {
|
|
|
9202
9203
|
}
|
|
9203
9204
|
}
|
|
9204
9205
|
info(message, data) {
|
|
9206
|
+
if (!this.shouldWrite("info")) return;
|
|
9205
9207
|
const component = this.getCallerFile(2);
|
|
9206
9208
|
return this.write("INFO", component, message, data);
|
|
9207
9209
|
}
|
|
9208
9210
|
debug(message, data) {
|
|
9211
|
+
if (!this.shouldWrite("debug")) return;
|
|
9209
9212
|
const component = this.getCallerFile(2);
|
|
9210
9213
|
return this.write("DEBUG", component, message, data);
|
|
9211
9214
|
}
|
|
@@ -11544,7 +11547,7 @@ var server = (async (ctx) => {
|
|
|
11544
11547
|
}
|
|
11545
11548
|
const logger = new Logger(config.debug, config.debug ? "debug" : config.logLevel);
|
|
11546
11549
|
logger.info("ACP plugin initialized", {
|
|
11547
|
-
version: true ? "1.14.23-pr.332.
|
|
11550
|
+
version: true ? "1.14.23-pr.332.53" : "dev",
|
|
11548
11551
|
workspace: ctx.directory,
|
|
11549
11552
|
logLevel: logger.level,
|
|
11550
11553
|
debug: config.debug,
|