@vitemcp/server 1.9.15 → 1.9.17

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.
@@ -3,8 +3,8 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkAOEXFXTHcjs = require('../chunk-AOEXFXTH.cjs');
7
- require('../chunk-7XWK66ZT.cjs');
6
+ var _chunkTNT3APOKcjs = require('../chunk-TNT3APOK.cjs');
7
+ require('../chunk-ZEYQBA72.cjs');
8
8
  require('../chunk-QPVEGWOL.cjs');
9
9
 
10
10
  // src/openapi/parameters.ts
@@ -287,7 +287,7 @@ var buildBody = (binding, values, headers) => {
287
287
  var buildPath = (route, values) => {
288
288
  const unfilled = [...route.path.matchAll(/\{([^{}]*)\}/g)].filter(([, name]) => !values.has(name)).map(([placeholder]) => placeholder);
289
289
  if (unfilled.length > 0) {
290
- throw new (0, _chunkAOEXFXTHcjs.UserError)(
290
+ throw new (0, _chunkTNT3APOKcjs.UserError)(
291
291
  `${route.method.toUpperCase()} ${route.path} cannot be called: the OpenAPI document declares no path parameter for ${unfilled.join(", ")}.`
292
292
  );
293
293
  }
@@ -298,7 +298,7 @@ var buildPath = (route, values) => {
298
298
  const written = new Set(route.path.split("/").filter(isDotSegment));
299
299
  const introduced = path.split("/").find((segment) => isDotSegment(segment) && !written.has(segment));
300
300
  if (introduced !== void 0) {
301
- throw new (0, _chunkAOEXFXTHcjs.UserError)(
301
+ throw new (0, _chunkTNT3APOKcjs.UserError)(
302
302
  `${route.method.toUpperCase()} ${route.path} cannot be called with a path segment of "${introduced}": a URL resolves it as a step through the path, so the request would reach a different endpoint.`
303
303
  );
304
304
  }
@@ -316,7 +316,7 @@ var readResponse = async (response, options) => {
316
316
  const mediaType = contentType.split(";")[0].trim().toLowerCase();
317
317
  const label = `${route.method.toUpperCase()} ${route.path}`;
318
318
  if (!response.ok) {
319
- throw new (0, _chunkAOEXFXTHcjs.UserError)(
319
+ throw new (0, _chunkTNT3APOKcjs.UserError)(
320
320
  `${label} failed with ${response.status} ${response.statusText}: ${truncate(
321
321
  await response.text(),
322
322
  2e3
@@ -328,7 +328,7 @@ var readResponse = async (response, options) => {
328
328
  if (bytes.byteLength <= MAX_INLINE_MEDIA_BYTES) {
329
329
  return mediaType.startsWith("image/") ? { data: toBase64(bytes), mimeType: mediaType, type: "image" } : { data: toBase64(bytes), mimeType: mediaType, type: "audio" };
330
330
  }
331
- throw new (0, _chunkAOEXFXTHcjs.UserError)(
331
+ throw new (0, _chunkTNT3APOKcjs.UserError)(
332
332
  `${label} returned ${bytes.byteLength} bytes of ${contentType}, too large to return inline.`
333
333
  );
334
334
  }
@@ -338,7 +338,7 @@ var readResponse = async (response, options) => {
338
338
  return { structuredContent: parsed };
339
339
  }
340
340
  if (binding.outputSchema) {
341
- throw new (0, _chunkAOEXFXTHcjs.UserError)(
341
+ throw new (0, _chunkTNT3APOKcjs.UserError)(
342
342
  `${label} declares a JSON object response but returned ${contentType || "an untyped body"}. Set \`outputSchema: false\` if this document's response schemas do not match the API.`
343
343
  );
344
344
  }
@@ -360,7 +360,7 @@ var setHeader = (headers, name, value) => {
360
360
  try {
361
361
  headers.set(name, value);
362
362
  } catch (e2) {
363
- throw new (0, _chunkAOEXFXTHcjs.UserError)(
363
+ throw new (0, _chunkTNT3APOKcjs.UserError)(
364
364
  `"${name}" is not a valid header name, or the value given for it is not a valid header value.`
365
365
  );
366
366
  }
@@ -467,7 +467,7 @@ var readSpecText = async (spec) => {
467
467
  headers: { accept: "application/json, text/yaml, */*" }
468
468
  });
469
469
  if (!response.ok) {
470
- await _chunkAOEXFXTHcjs.cancelResponseBody.call(void 0, response);
470
+ await _chunkTNT3APOKcjs.cancelResponseBody.call(void 0, response);
471
471
  throw new Error(
472
472
  `Failed to fetch the OpenAPI document from ${spec}: ${response.status} ${response.statusText}`
473
473
  );
@@ -1106,7 +1106,7 @@ var fromOpenAPI = async (options) => {
1106
1106
  const selected = selectRoutes(extractRoutes(document), options);
1107
1107
  const names = generateToolNames(selected, options.toolNames);
1108
1108
  const normalizer = createSchemaNormalizer(document);
1109
- const server = _nullishCoalesce(options.server, () => ( new (0, _chunkAOEXFXTHcjs.ViteMCP)({
1109
+ const server = _nullishCoalesce(options.server, () => ( new (0, _chunkTNT3APOKcjs.ViteMCP)({
1110
1110
  description: _optionalChain([document, 'access', _25 => _25.info, 'optionalAccess', _26 => _26.description]),
1111
1111
  name: _nullishCoalesce(_nullishCoalesce(options.name, () => ( _optionalChain([document, 'access', _27 => _27.info, 'optionalAccess', _28 => _28.title]))), () => ( "OpenAPI")),
1112
1112
  version: _nullishCoalesce(options.version, () => ( semanticVersion(_optionalChain([document, 'access', _29 => _29.info, 'optionalAccess', _30 => _30.version]))))
@@ -1145,8 +1145,8 @@ var fromOpenAPI = async (options) => {
1145
1145
  route
1146
1146
  }),
1147
1147
  name,
1148
- outputSchema: binding.outputSchema ? _chunkAOEXFXTHcjs.jsonSchemaAdapter.call(void 0, binding.outputSchema) : void 0,
1149
- parameters: _chunkAOEXFXTHcjs.jsonSchemaAdapter.call(void 0, binding.inputSchema),
1148
+ outputSchema: binding.outputSchema ? _chunkTNT3APOKcjs.jsonSchemaAdapter.call(void 0, binding.outputSchema) : void 0,
1149
+ parameters: _chunkTNT3APOKcjs.jsonSchemaAdapter.call(void 0, binding.inputSchema),
1150
1150
  timeoutMs: options.timeoutMs
1151
1151
  });
1152
1152
  }
@@ -4,7 +4,7 @@ import '@standard-schema/spec';
4
4
  import 'hono';
5
5
  import 'hono/cors';
6
6
  import 'timers/promises';
7
- import '../OAuthProvider-AjmrLphi.cjs';
7
+ import '../OAuthProvider-STkC4R2N.cjs';
8
8
 
9
9
  /**
10
10
  * A value that may depend on the calling request — a bearer token derived from
@@ -4,7 +4,7 @@ import '@standard-schema/spec';
4
4
  import 'hono';
5
5
  import 'hono/cors';
6
6
  import 'timers/promises';
7
- import '../OAuthProvider-AjmrLphi.js';
7
+ import '../OAuthProvider-STkC4R2N.js';
8
8
 
9
9
  /**
10
10
  * A value that may depend on the calling request — a bearer token derived from
@@ -3,8 +3,8 @@ import {
3
3
  ViteMCP,
4
4
  cancelResponseBody,
5
5
  jsonSchemaAdapter
6
- } from "../chunk-2JOXLIMJ.js";
7
- import "../chunk-WOQXAQIG.js";
6
+ } from "../chunk-B3LLXB6O.js";
7
+ import "../chunk-4BX2CT5Z.js";
8
8
  import "../chunk-JMDI672G.js";
9
9
 
10
10
  // src/openapi/parameters.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitemcp/server",
3
- "version": "1.9.15",
3
+ "version": "1.9.17",
4
4
  "main": "./dist/ViteMCP.cjs",
5
5
  "scripts": {
6
6
  "build": "tsup",