@arabold/docs-mcp-server 0.1.0 → 1.1.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/{chunk-7CJZVHC7.js → chunk-Y3EE54SV.js} +43 -6
- package/dist/chunk-Y3EE54SV.js.map +1 -0
- package/dist/cli.js +108 -3
- package/dist/cli.js.map +1 -1
- package/dist/server.js +4 -6
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-7CJZVHC7.js.map +0 -1
|
@@ -120,11 +120,47 @@ var require_extend = __commonJS({
|
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
// src/utils/logger.ts
|
|
123
|
+
var currentLogLevel = 2 /* INFO */;
|
|
124
|
+
function setLogLevel(level) {
|
|
125
|
+
currentLogLevel = level;
|
|
126
|
+
}
|
|
123
127
|
var logger = {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Logs a debug message if the current log level is DEBUG or higher.
|
|
130
|
+
* @param message - The message to log.
|
|
131
|
+
*/
|
|
132
|
+
debug: (message) => {
|
|
133
|
+
if (currentLogLevel >= 3 /* DEBUG */) {
|
|
134
|
+
console.debug(message);
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
/**
|
|
138
|
+
* Logs an info message if the current log level is INFO or higher.
|
|
139
|
+
* @param message - The message to log.
|
|
140
|
+
*/
|
|
141
|
+
info: (message) => {
|
|
142
|
+
if (currentLogLevel >= 2 /* INFO */) {
|
|
143
|
+
console.log(message);
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
/**
|
|
147
|
+
* Logs a warning message if the current log level is WARN or higher.
|
|
148
|
+
* @param message - The message to log.
|
|
149
|
+
*/
|
|
150
|
+
warn: (message) => {
|
|
151
|
+
if (currentLogLevel >= 1 /* WARN */) {
|
|
152
|
+
console.warn(message);
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
/**
|
|
156
|
+
* Logs an error message if the current log level is ERROR or higher (always logs).
|
|
157
|
+
* @param message - The message to log.
|
|
158
|
+
*/
|
|
159
|
+
error: (message) => {
|
|
160
|
+
if (currentLogLevel >= 0 /* ERROR */) {
|
|
161
|
+
console.error(message);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
128
164
|
};
|
|
129
165
|
|
|
130
166
|
// node_modules/uuid/dist/esm-node/stringify.js
|
|
@@ -10362,7 +10398,7 @@ ${"```"}`;
|
|
|
10362
10398
|
}
|
|
10363
10399
|
} catch (err) {
|
|
10364
10400
|
if (err instanceof MinimumChunkSizeError) {
|
|
10365
|
-
|
|
10401
|
+
logger.warn(
|
|
10366
10402
|
`\u26A0 Cannot split ${content3.type} chunk normally, using RecursiveCharacterTextSplitter: ${err.message}`
|
|
10367
10403
|
);
|
|
10368
10404
|
const splitter = new RecursiveCharacterTextSplitter2({
|
|
@@ -11377,6 +11413,7 @@ var DocumentManagementService = class {
|
|
|
11377
11413
|
};
|
|
11378
11414
|
|
|
11379
11415
|
export {
|
|
11416
|
+
setLogLevel,
|
|
11380
11417
|
logger,
|
|
11381
11418
|
PipelineJobStatus,
|
|
11382
11419
|
PipelineManager,
|
|
@@ -11391,4 +11428,4 @@ export {
|
|
|
11391
11428
|
RemoveTool,
|
|
11392
11429
|
DocumentManagementService
|
|
11393
11430
|
};
|
|
11394
|
-
//# sourceMappingURL=chunk-
|
|
11431
|
+
//# sourceMappingURL=chunk-Y3EE54SV.js.map
|