@vitemcp/server 1.10.1 → 1.10.3

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.
Files changed (35) hide show
  1. package/dist/{OAuthProvider-STkC4R2N.d.cts → OAuthProvider-DN--f3j1.d.cts} +35 -4
  2. package/dist/{OAuthProvider-STkC4R2N.d.ts → OAuthProvider-DN--f3j1.d.ts} +35 -4
  3. package/dist/ViteMCP.cjs +4 -4
  4. package/dist/ViteMCP.d.cts +2 -2
  5. package/dist/ViteMCP.d.ts +2 -2
  6. package/dist/ViteMCP.js +3 -3
  7. package/dist/auth/index.cjs +2 -2
  8. package/dist/auth/index.d.cts +2 -2
  9. package/dist/auth/index.d.ts +2 -2
  10. package/dist/auth/index.js +1 -1
  11. package/dist/{chunk-3W6VP3KX.js → chunk-EJVIGLUY.js} +3 -3
  12. package/dist/{chunk-4LU4AXU4.cjs → chunk-IWNTAHGZ.cjs} +70 -17
  13. package/dist/chunk-IWNTAHGZ.cjs.map +1 -0
  14. package/dist/{chunk-NLBRDP5F.js → chunk-KRS3VHYI.js} +62 -9
  15. package/dist/chunk-KRS3VHYI.js.map +1 -0
  16. package/dist/{chunk-FSPSPB7Y.cjs → chunk-PH2BAR5I.cjs} +9 -9
  17. package/dist/{chunk-FSPSPB7Y.cjs.map → chunk-PH2BAR5I.cjs.map} +1 -1
  18. package/dist/{chunk-NZGRSB2D.cjs → chunk-R4RK2DR2.cjs} +147 -3
  19. package/dist/chunk-R4RK2DR2.cjs.map +1 -0
  20. package/dist/{chunk-BLXUZUZ4.js → chunk-YDEROYNS.js} +147 -3
  21. package/dist/chunk-YDEROYNS.js.map +1 -0
  22. package/dist/edge/index.cjs +6 -6
  23. package/dist/edge/index.js +1 -1
  24. package/dist/openapi/index.cjs +27 -19
  25. package/dist/openapi/index.cjs.map +1 -1
  26. package/dist/openapi/index.d.cts +3 -3
  27. package/dist/openapi/index.d.ts +3 -3
  28. package/dist/openapi/index.js +17 -9
  29. package/dist/openapi/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/dist/chunk-4LU4AXU4.cjs.map +0 -1
  32. package/dist/chunk-BLXUZUZ4.js.map +0 -1
  33. package/dist/chunk-NLBRDP5F.js.map +0 -1
  34. package/dist/chunk-NZGRSB2D.cjs.map +0 -1
  35. /package/dist/{chunk-3W6VP3KX.js.map → chunk-EJVIGLUY.js.map} +0 -0
@@ -1,13 +1,13 @@
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 _chunk4LU4AXU4cjs = require('./chunk-4LU4AXU4.cjs');
3
+ var _chunkIWNTAHGZcjs = require('./chunk-IWNTAHGZ.cjs');
4
4
 
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkNZGRSB2Dcjs = require('./chunk-NZGRSB2D.cjs');
10
+ var _chunkR4RK2DR2cjs = require('./chunk-R4RK2DR2.cjs');
11
11
 
12
12
  // src/ViteMCP.ts
13
13
 
@@ -669,7 +669,7 @@ var ViteMCP = class {
669
669
  constructor(options) {
670
670
  this.#options = options;
671
671
  this.#logger = _nullishCoalesce(options.logger, () => ( console));
672
- this.#maxToolInputElements = _chunkNZGRSB2Dcjs.resolveMaxToolInputElements.call(void 0,
672
+ this.#maxToolInputElements = _chunkR4RK2DR2cjs.resolveMaxToolInputElements.call(void 0,
673
673
  options.maxToolInputElements
674
674
  );
675
675
  const provider = options.auth;
@@ -1380,7 +1380,7 @@ var ViteMCP = class {
1380
1380
  res.end(
1381
1381
  JSON.stringify({
1382
1382
  error: "invalid_request",
1383
- error_description: `Request body exceeds ${_chunkNZGRSB2Dcjs.formatBytes.call(void 0, maxBodySize)}`
1383
+ error_description: `Request body exceeds ${_chunkR4RK2DR2cjs.formatBytes.call(void 0, maxBodySize)}`
1384
1384
  })
1385
1385
  );
1386
1386
  return;
@@ -1455,7 +1455,7 @@ var ViteMCP = class {
1455
1455
  */
1456
1456
  async #toSdkSchema(schema, label, io) {
1457
1457
  try {
1458
- return await _chunkNZGRSB2Dcjs.toSdkSchema.call(void 0, schema, io, convertToJsonSchema);
1458
+ return await _chunkR4RK2DR2cjs.toSdkSchema.call(void 0, schema, io, convertToJsonSchema);
1459
1459
  } catch (error) {
1460
1460
  throw new UnexpectedStateError(
1461
1461
  `${label} is not a supported Standard Schema: ${error instanceof Error ? error.message : String(error)}`,
@@ -1496,7 +1496,7 @@ var withEndpointAsResource = (config, endpoint) => ({
1496
1496
  ...config,
1497
1497
  protectedResource: {
1498
1498
  ...config.protectedResource,
1499
- resource: `${_chunk4LU4AXU4cjs.withoutTrailingSlash.call(void 0, config.protectedResource.resource)}${endpoint}`
1499
+ resource: `${_chunkIWNTAHGZcjs.withoutTrailingSlash.call(void 0, config.protectedResource.resource)}${endpoint}`
1500
1500
  }
1501
1501
  });
1502
1502
  var nodeToWebRequest = (req, body, secure, signal) => {
@@ -1592,7 +1592,7 @@ var readCappedNodeBody = async (req, maxBytes) => {
1592
1592
  }
1593
1593
  return Buffer.concat(chunks);
1594
1594
  };
1595
- var convertToJsonSchema = async (schema, io) => schema["~standard"].vendor === "valibot" ? _chunkNZGRSB2Dcjs.valibotToJsonSchema.call(void 0, schema, io) : _xsschema.toJsonSchema.call(void 0, schema);
1595
+ var convertToJsonSchema = async (schema, io) => schema["~standard"].vendor === "valibot" ? _chunkR4RK2DR2cjs.valibotToJsonSchema.call(void 0, schema, io) : _xsschema.toJsonSchema.call(void 0, schema);
1596
1596
  var assertStandardSchema = (schema, toolName, field) => {
1597
1597
  if (schema === void 0) {
1598
1598
  return;
@@ -1642,7 +1642,7 @@ var promptArgsSchema = (prompt) => {
1642
1642
  ) : described;
1643
1643
  shape[arg.name] = arg.required ? base : base.optional();
1644
1644
  }
1645
- return _chunkNZGRSB2Dcjs.ownKeysOnly.call(void 0, _zod.z.object(shape));
1645
+ return _chunkR4RK2DR2cjs.ownKeysOnly.call(void 0, _zod.z.object(shape));
1646
1646
  };
1647
1647
  var isStructuredResult = (value) => {
1648
1648
  if (!Object.hasOwn(value, "structuredContent") || value.structuredContent === void 0) {
@@ -1711,4 +1711,4 @@ var normalizeToolResult = (result, hasOutputSchema) => {
1711
1711
 
1712
1712
 
1713
1713
  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;
1714
- //# sourceMappingURL=chunk-FSPSPB7Y.cjs.map
1714
+ //# sourceMappingURL=chunk-PH2BAR5I.cjs.map