@vitemcp/server 1.9.11 → 1.9.12
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 +15 -11
- package/dist/ViteMCP.cjs +4 -4
- package/dist/ViteMCP.js +3 -3
- package/dist/auth/index.cjs +2 -2
- package/dist/auth/index.d.cts +5 -0
- package/dist/auth/index.d.ts +5 -0
- package/dist/auth/index.js +1 -1
- package/dist/{chunk-XGRRYN5Y.cjs → chunk-2X4JCSQQ.cjs} +7 -2
- package/dist/chunk-2X4JCSQQ.cjs.map +1 -0
- package/dist/{chunk-C2VT2NXC.cjs → chunk-7T5D57AM.cjs} +8 -8
- package/dist/{chunk-C2VT2NXC.cjs.map → chunk-7T5D57AM.cjs.map} +1 -1
- package/dist/{chunk-TYR2KJIV.js → chunk-JMDI672G.js} +44 -9
- package/dist/chunk-JMDI672G.js.map +1 -0
- package/dist/{chunk-KSEFUQF4.js → chunk-NZ34AKP4.js} +7 -2
- package/dist/{chunk-KSEFUQF4.js.map → chunk-NZ34AKP4.js.map} +1 -1
- package/dist/{chunk-DURXYPPR.cjs → chunk-QPVEGWOL.cjs} +44 -9
- package/dist/chunk-QPVEGWOL.cjs.map +1 -0
- package/dist/{chunk-IAT55CW3.js → chunk-WBP37JPX.js} +3 -3
- package/dist/edge/index.cjs +5 -5
- package/dist/edge/index.js +1 -1
- package/dist/openapi/index.cjs +16 -13
- package/dist/openapi/index.cjs.map +1 -1
- package/dist/openapi/index.js +6 -3
- package/dist/openapi/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DURXYPPR.cjs.map +0 -1
- package/dist/chunk-TYR2KJIV.js.map +0 -1
- package/dist/chunk-XGRRYN5Y.cjs.map +0 -1
- /package/dist/{chunk-IAT55CW3.js.map → chunk-WBP37JPX.js.map} +0 -0
|
@@ -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 _chunk2X4JCSQQcjs = require('./chunk-2X4JCSQQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkQPVEGWOLcjs = require('./chunk-QPVEGWOL.cjs');
|
|
10
10
|
|
|
11
11
|
// src/ViteMCP.ts
|
|
12
12
|
|
|
@@ -1357,7 +1357,7 @@ var ViteMCP = class {
|
|
|
1357
1357
|
res.end(
|
|
1358
1358
|
JSON.stringify({
|
|
1359
1359
|
error: "invalid_request",
|
|
1360
|
-
error_description: `Request body exceeds ${
|
|
1360
|
+
error_description: `Request body exceeds ${_chunkQPVEGWOLcjs.formatBytes.call(void 0, maxBodySize)}`
|
|
1361
1361
|
})
|
|
1362
1362
|
);
|
|
1363
1363
|
return;
|
|
@@ -1432,7 +1432,7 @@ var ViteMCP = class {
|
|
|
1432
1432
|
*/
|
|
1433
1433
|
async #toSdkSchema(schema, label, io) {
|
|
1434
1434
|
try {
|
|
1435
|
-
return await
|
|
1435
|
+
return await _chunkQPVEGWOLcjs.toSdkSchema.call(void 0, schema, io, convertToJsonSchema);
|
|
1436
1436
|
} catch (error) {
|
|
1437
1437
|
throw new UnexpectedStateError(
|
|
1438
1438
|
`${label} is not a supported Standard Schema: ${error instanceof Error ? error.message : String(error)}`,
|
|
@@ -1473,7 +1473,7 @@ var withEndpointAsResource = (config, endpoint) => ({
|
|
|
1473
1473
|
...config,
|
|
1474
1474
|
protectedResource: {
|
|
1475
1475
|
...config.protectedResource,
|
|
1476
|
-
resource: `${
|
|
1476
|
+
resource: `${_chunk2X4JCSQQcjs.withoutTrailingSlash.call(void 0, config.protectedResource.resource)}${endpoint}`
|
|
1477
1477
|
}
|
|
1478
1478
|
});
|
|
1479
1479
|
var nodeToWebRequest = (req, body, secure, signal) => {
|
|
@@ -1569,7 +1569,7 @@ var readCappedNodeBody = async (req, maxBytes) => {
|
|
|
1569
1569
|
}
|
|
1570
1570
|
return Buffer.concat(chunks);
|
|
1571
1571
|
};
|
|
1572
|
-
var convertToJsonSchema = async (schema, io) => schema["~standard"].vendor === "valibot" ?
|
|
1572
|
+
var convertToJsonSchema = async (schema, io) => schema["~standard"].vendor === "valibot" ? _chunkQPVEGWOLcjs.valibotToJsonSchema.call(void 0, schema, io) : _xsschema.toJsonSchema.call(void 0, schema);
|
|
1573
1573
|
var assertStandardSchema = (schema, toolName, field) => {
|
|
1574
1574
|
if (schema === void 0) {
|
|
1575
1575
|
return;
|
|
@@ -1619,7 +1619,7 @@ var promptArgsSchema = (prompt) => {
|
|
|
1619
1619
|
) : described;
|
|
1620
1620
|
shape[arg.name] = arg.required ? base : base.optional();
|
|
1621
1621
|
}
|
|
1622
|
-
return
|
|
1622
|
+
return _chunkQPVEGWOLcjs.ownKeysOnly.call(void 0, _zod.z.object(shape));
|
|
1623
1623
|
};
|
|
1624
1624
|
var isStructuredResult = (value) => {
|
|
1625
1625
|
if (!Object.hasOwn(value, "structuredContent") || value.structuredContent === void 0) {
|
|
@@ -1688,4 +1688,4 @@ var normalizeToolResult = (result, hasOutputSchema) => {
|
|
|
1688
1688
|
|
|
1689
1689
|
|
|
1690
1690
|
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;
|
|
1691
|
-
//# sourceMappingURL=chunk-
|
|
1691
|
+
//# sourceMappingURL=chunk-7T5D57AM.cjs.map
|