@vitemcp/server 1.9.3 → 1.9.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/dist/ViteMCP.cjs +4 -4
- package/dist/ViteMCP.js +3 -3
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-3O5CBV4T.js → chunk-2GDWFXWP.js} +4 -4
- package/dist/{chunk-3O5CBV4T.js.map → chunk-2GDWFXWP.js.map} +1 -1
- package/dist/{chunk-WRKQIQHB.cjs → chunk-IBZFPUBF.cjs} +9 -9
- package/dist/{chunk-WRKQIQHB.cjs.map → chunk-IBZFPUBF.cjs.map} +1 -1
- package/dist/{chunk-P32QRCBT.cjs → chunk-NSHLX6PZ.cjs} +18 -2
- package/dist/chunk-NSHLX6PZ.cjs.map +1 -0
- package/dist/{chunk-4SRXSCYR.js → chunk-WXZQZWBE.js} +18 -2
- package/dist/{chunk-4SRXSCYR.js.map → chunk-WXZQZWBE.js.map} +1 -1
- package/dist/{chunk-NKMXT32U.js → chunk-XQI4HYU6.js} +54 -11
- package/dist/chunk-XQI4HYU6.js.map +1 -0
- package/dist/{chunk-SM24SJ4X.cjs → chunk-ZVA6Y7EO.cjs} +55 -12
- package/dist/chunk-ZVA6Y7EO.cjs.map +1 -0
- package/dist/edge/index.cjs +5 -5
- package/dist/edge/index.js +1 -1
- package/dist/openapi/index.cjs +34 -32
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.js +10 -8
- package/dist/openapi/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-NKMXT32U.js.map +0 -1
- package/dist/chunk-P32QRCBT.cjs.map +0 -1
- package/dist/chunk-SM24SJ4X.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNSHLX6PZcjs = require('./chunk-NSHLX6PZ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkZVA6Y7EOcjs = require('./chunk-ZVA6Y7EO.cjs');
|
|
10
10
|
|
|
11
11
|
// src/ViteMCP.ts
|
|
12
12
|
|
|
@@ -368,7 +368,7 @@ async function compileSchema(schema) {
|
|
|
368
368
|
);
|
|
369
369
|
}
|
|
370
370
|
const Ajv = unwrapDefault(unwrapDefault(ajvModule));
|
|
371
|
-
const ajv = new Ajv({ allErrors: true, strict: false });
|
|
371
|
+
const ajv = new Ajv({ allErrors: true, ownProperties: true, strict: false });
|
|
372
372
|
try {
|
|
373
373
|
const formatsModule = await Promise.resolve().then(() => _interopRequireWildcard(require("ajv-formats")));
|
|
374
374
|
const addFormats = unwrapDefault(
|
|
@@ -1214,7 +1214,7 @@ var ViteMCP = class {
|
|
|
1214
1214
|
res.end(
|
|
1215
1215
|
JSON.stringify({
|
|
1216
1216
|
error: "invalid_request",
|
|
1217
|
-
error_description: `Request body exceeds ${
|
|
1217
|
+
error_description: `Request body exceeds ${_chunkZVA6Y7EOcjs.formatBytes.call(void 0, maxBodySize)}`
|
|
1218
1218
|
})
|
|
1219
1219
|
);
|
|
1220
1220
|
return;
|
|
@@ -1289,7 +1289,7 @@ var ViteMCP = class {
|
|
|
1289
1289
|
*/
|
|
1290
1290
|
async #toSdkSchema(schema, label, io) {
|
|
1291
1291
|
try {
|
|
1292
|
-
return await
|
|
1292
|
+
return await _chunkZVA6Y7EOcjs.toSdkSchema.call(void 0, schema, io, convertToJsonSchema);
|
|
1293
1293
|
} catch (error) {
|
|
1294
1294
|
throw new UnexpectedStateError(
|
|
1295
1295
|
`${label} is not a supported Standard Schema: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -1330,7 +1330,7 @@ var withEndpointAsResource = (config, endpoint) => ({
|
|
|
1330
1330
|
...config,
|
|
1331
1331
|
protectedResource: {
|
|
1332
1332
|
...config.protectedResource,
|
|
1333
|
-
resource: `${
|
|
1333
|
+
resource: `${_chunkNSHLX6PZcjs.withoutTrailingSlash.call(void 0, config.protectedResource.resource)}${endpoint}`
|
|
1334
1334
|
}
|
|
1335
1335
|
});
|
|
1336
1336
|
var nodeToWebRequest = (req, body, secure, signal) => {
|
|
@@ -1426,7 +1426,7 @@ var readCappedNodeBody = async (req, maxBytes) => {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
return Buffer.concat(chunks);
|
|
1428
1428
|
};
|
|
1429
|
-
var convertToJsonSchema = async (schema, io) => schema["~standard"].vendor === "valibot" ?
|
|
1429
|
+
var convertToJsonSchema = async (schema, io) => schema["~standard"].vendor === "valibot" ? _chunkZVA6Y7EOcjs.valibotToJsonSchema.call(void 0, schema, io) : _xsschema.toJsonSchema.call(void 0, schema);
|
|
1430
1430
|
var assertStandardSchema = (schema, toolName, field) => {
|
|
1431
1431
|
if (schema === void 0) {
|
|
1432
1432
|
return;
|
|
@@ -1463,7 +1463,7 @@ var promptArgsSchema = (prompt) => {
|
|
|
1463
1463
|
) : described;
|
|
1464
1464
|
shape[arg.name] = arg.required ? base : base.optional();
|
|
1465
1465
|
}
|
|
1466
|
-
return
|
|
1466
|
+
return _chunkZVA6Y7EOcjs.ownKeysOnly.call(void 0, _zod.z.object(shape));
|
|
1467
1467
|
};
|
|
1468
1468
|
var isStructuredResult = (value) => {
|
|
1469
1469
|
if (!Object.hasOwn(value, "structuredContent") || value.structuredContent === void 0) {
|
|
@@ -1532,4 +1532,4 @@ var normalizeToolResult = (result, hasOutputSchema) => {
|
|
|
1532
1532
|
|
|
1533
1533
|
|
|
1534
1534
|
exports.cancelResponseBody = cancelResponseBody; exports.DiscoveryDocumentCache = DiscoveryDocumentCache; exports.jsonSchemaAdapter = jsonSchemaAdapter; exports.delay = _promises5.setTimeout; exports.MEDIA_FETCH_TIMEOUT_MS = MEDIA_FETCH_TIMEOUT_MS; exports.ViteMCPError = ViteMCPError; exports.UnexpectedStateError = UnexpectedStateError; exports.UserError = UserError; exports.imageContent = imageContent; exports.audioContent = audioContent; exports.ServerState = ServerState; exports.ViteMCP = ViteMCP;
|
|
1535
|
-
//# sourceMappingURL=chunk-
|
|
1535
|
+
//# sourceMappingURL=chunk-IBZFPUBF.cjs.map
|