@scalar/mock-server 0.21.7 → 0.21.8

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/CHANGELOG.md +20 -0
  2. package/dist/create-mock-server.js +1 -1
  3. package/dist/create-openapi-mock-server.d.ts +5 -2
  4. package/dist/create-openapi-mock-server.d.ts.map +1 -1
  5. package/dist/create-openapi-mock-server.js +67 -20
  6. package/dist/routes/mock-any-response.d.ts.map +1 -1
  7. package/dist/routes/mock-any-response.js +22 -20
  8. package/dist/utils/build-handler-context.d.ts.map +1 -1
  9. package/dist/utils/build-handler-context.js +9 -9
  10. package/dist/utils/deserialize-parameter.d.ts +15 -0
  11. package/dist/utils/deserialize-parameter.d.ts.map +1 -1
  12. package/dist/utils/deserialize-parameter.js +36 -7
  13. package/dist/utils/expand-server-variables.d.ts +6 -0
  14. package/dist/utils/expand-server-variables.d.ts.map +1 -0
  15. package/dist/utils/expand-server-variables.js +44 -0
  16. package/dist/utils/get-response-header-example.d.ts +13 -0
  17. package/dist/utils/get-response-header-example.d.ts.map +1 -0
  18. package/dist/utils/get-response-header-example.js +94 -0
  19. package/dist/utils/is-json-content-type.d.ts +4 -0
  20. package/dist/utils/is-json-content-type.d.ts.map +1 -0
  21. package/dist/utils/is-json-content-type.js +2 -0
  22. package/dist/utils/process-document.d.ts +2 -0
  23. package/dist/utils/process-document.d.ts.map +1 -1
  24. package/dist/utils/process-document.js +65 -9
  25. package/dist/utils/resolve-server-base-paths.d.ts +17 -0
  26. package/dist/utils/resolve-server-base-paths.d.ts.map +1 -0
  27. package/dist/utils/resolve-server-base-paths.js +85 -0
  28. package/dist/utils/resolve-server-pathnames.d.ts.map +1 -1
  29. package/dist/utils/resolve-server-pathnames.js +9 -12
  30. package/dist/utils/serialize-linkset.d.ts +3 -0
  31. package/dist/utils/serialize-linkset.d.ts.map +1 -0
  32. package/dist/utils/serialize-linkset.js +77 -0
  33. package/dist/utils/validate-request.d.ts.map +1 -1
  34. package/dist/utils/validate-request.js +165 -96
  35. package/package.json +10 -10
@@ -1,5 +1,7 @@
1
1
  import { getFirstMediaType } from '@scalar/helpers/http/get-first-media-type';
2
+ import { isJsonMediaType } from '@scalar/helpers/http/is-json-media-type';
2
3
  import { parseMimeType } from '@scalar/helpers/http/mime-type';
4
+ import { escapeJsonPointer } from '@scalar/helpers/json/escape-json-pointer';
3
5
  import { useDecimalMultipleOf } from '@scalar/json-schema-validator/decimal-multiple-of';
4
6
  import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref';
5
7
  import { getResolvedRefDeep } from '@scalar/workspace-store/helpers/get-resolved-ref-deep';
@@ -8,8 +10,9 @@ import addFormats from 'ajv-formats';
8
10
  import { getCookie } from 'hono/cookie';
9
11
  import { pathParameters } from './path-parameters.js';
10
12
  import { compilePattern } from './compile-pattern.js';
11
- import { deserializeArrayParameter, deserializeObjectParameter, getObjectPropertyNames, isArraySchema, isObjectSchema, resolveSerialization, } from './deserialize-parameter.js';
13
+ import { deserializeArrayParameter, deserializeObjectParameter, deserializePrimitiveParameter, getObjectPropertyNames, isArraySchema, isObjectSchema, resolveSerialization, } from './deserialize-parameter.js';
12
14
  import { dropReadOnlyRequired } from './drop-read-only-required.js';
15
+ import { isJsonContentType } from './is-json-content-type.js';
13
16
  import { findQuerystringParameter, getQuerystringJsonSchema, parseQuerystringParameter } from './querystring-parameter.js';
14
17
  import { replaceCircularMarkers } from './replace-circular-markers.js';
15
18
  /**
@@ -41,18 +44,14 @@ const mapRepeatedValues = (values) => {
41
44
  return map;
42
45
  };
43
46
  /**
44
- * Build a JSON Schema object for the parameters declared `in` the given location, alongside a
45
- * descriptor for each declared parameter.
46
- *
47
- * Parameters arrive as strings, so the caller compiles these with `coerceTypes: true` to let
48
- * `type: integer`/`boolean` validate correctly. The descriptors let the middleware gather only
49
- * declared values and deserialize array parameters by their `style`/`explode`. Returns `null` when
50
- * there is nothing to validate.
47
+ * Compile styled parameters together for string coercion, and content parameters separately
48
+ * so their media type determines how to read and validate the value.
51
49
  */
52
- const buildParameterSchema = (parameters, location) => {
50
+ const compileParameters = (parameters, location, parameterAjv, getContentAjv) => {
53
51
  const properties = {};
54
52
  const required = [];
55
- const descriptors = [];
53
+ const styled = [];
54
+ const content = [];
56
55
  for (const parameterOrRef of parameters ?? []) {
57
56
  const parameter = getResolvedRef(parameterOrRef);
58
57
  if (parameter?.in !== location) {
@@ -62,6 +61,19 @@ const buildParameterSchema = (parameters, location) => {
62
61
  if (location === 'header' && IGNORED_HEADER_PARAMETERS.has(parameter.name.toLowerCase())) {
63
62
  continue;
64
63
  }
64
+ const entry = parameter.schema === undefined && getFirstMediaType(parameter.content);
65
+ if (entry) {
66
+ const [contentType, media] = entry;
67
+ const mediaType = parseMimeType(contentType).essence;
68
+ const isJson = isJsonMediaType(mediaType);
69
+ const schema = getResolvedRefDeep(getResolvedRef(media)?.schema);
70
+ // Other media types have no decoder here. Presence and a false schema still apply.
71
+ const validate = schema !== undefined && (isJson || mediaType === 'text/plain' || schema === false)
72
+ ? compileSchema(getContentAjv(mediaType === 'text/plain'), dropReadOnlyRequired(asCompilableSchema(schema)), `${location} parameter ${parameter.name}`)
73
+ : null;
74
+ content.push({ name: parameter.name, required: parameter.required === true, isJson, validate });
75
+ continue;
76
+ }
65
77
  const resolvedSchema = parameter.schema
66
78
  ? getResolvedRefDeep(parameter.schema)
67
79
  : undefined;
@@ -69,14 +81,13 @@ const buildParameterSchema = (parameters, location) => {
69
81
  // Property names let exploded `form` objects be gathered from matching top-level query keys. They
70
82
  // are collected through any `anyOf`/`oneOf`/`allOf` composition so a composed object schema does not
71
83
  // fall back to free-form gathering and claim unrelated keys.
72
- const propertyNames = getObjectPropertyNames(resolvedSchema);
73
- descriptors.push({
84
+ styled.push({
74
85
  name: parameter.name,
75
86
  style,
76
87
  explode,
77
88
  isArray: isArraySchema(resolvedSchema),
78
89
  isObject: isObjectSchema(resolvedSchema),
79
- propertyNames,
90
+ propertyNames: getObjectPropertyNames(resolvedSchema),
80
91
  });
81
92
  if (resolvedSchema) {
82
93
  properties[parameter.name] = asCompilableSchema(resolvedSchema);
@@ -85,11 +96,11 @@ const buildParameterSchema = (parameters, location) => {
85
96
  required.push(parameter.name);
86
97
  }
87
98
  }
88
- if (Object.keys(properties).length === 0 && required.length === 0) {
89
- return null;
90
- }
91
99
  // Allow undeclared parameters to pass through; we only enforce what the operation declares.
92
- return { schema: { type: 'object', properties, required, additionalProperties: true }, parameters: descriptors };
100
+ const schema = Object.keys(properties).length > 0 || required.length > 0
101
+ ? { type: 'object', properties, required, additionalProperties: true }
102
+ : null;
103
+ return { styled, content, validateStyled: compileSchema(parameterAjv, schema, `${location} parameter`) };
93
104
  };
94
105
  /**
95
106
  * Merge path-item-level parameters with operation-level parameters.
@@ -131,57 +142,107 @@ const compileSchema = (ajv, schema, label) => {
131
142
  return null;
132
143
  }
133
144
  };
134
- /**
135
- * Compile the validators for a single operation once, so they can be reused on every request.
136
- */
145
+ /** Apply the same formats and pattern handling to every request validator. */
146
+ const createRequestAjv = (options = {}) => {
147
+ const ajv = new Ajv2020({ strict: false, allErrors: true, code: { regExp: compilePattern }, ...options });
148
+ useDecimalMultipleOf(ajv);
149
+ addFormats(ajv);
150
+ return ajv;
151
+ };
152
+ /** Compile each JSON media type and each range that may describe a JSON request. */
153
+ const compileBodyValidators = (content) => {
154
+ if (!content) {
155
+ return { headerless: null, mediaTypes: [] };
156
+ }
157
+ // Independently resolved schemas can share an ID across media types.
158
+ const ajv = createRequestAjv({ addUsedSchema: false });
159
+ const mediaTypes = [];
160
+ for (const [key, media] of Object.entries(content)) {
161
+ const mediaType = parseMimeType(key);
162
+ if (mediaType.subtype !== '*' && !isJsonContentType(mediaType)) {
163
+ continue;
164
+ }
165
+ let validate = null;
166
+ try {
167
+ const schema = getResolvedRef(media)?.schema;
168
+ if (schema !== undefined) {
169
+ validate = compileSchema(ajv, dropReadOnlyRequired(asCompilableSchema(getResolvedRefDeep(schema))), `request body for ${key}`);
170
+ }
171
+ }
172
+ catch (error) {
173
+ console.error(`Error resolving request body schema for ${key}, skipping its validation:`, error);
174
+ }
175
+ // Keep entries without a validator so a more general range cannot override them.
176
+ const specificity = Number(mediaType.type !== '*') + Number(mediaType.subtype !== '*');
177
+ mediaTypes.push({ mediaType, specificity, validate });
178
+ }
179
+ // Prefer the original bare JSON declaration for clients that omit the header.
180
+ const headerless = mediaTypes.find(({ mediaType }) => mediaType.essence === 'application/json' && mediaType.parameters.size === 0) ??
181
+ mediaTypes.find(({ mediaType }) => mediaType.essence === 'application/json') ??
182
+ mediaTypes.find(({ mediaType }) => mediaType.subtype.endsWith('+json'));
183
+ return {
184
+ headerless: headerless?.validate ?? null,
185
+ mediaTypes: mediaTypes.sort((a, b) => b.specificity - a.specificity || b.mediaType.parameters.size - a.mediaType.parameters.size),
186
+ };
187
+ };
188
+ /** An exact media type takes precedence over matching ranges, even when it has no schema. */
189
+ const selectBodyValidator = (validators, contentType) => {
190
+ if (!contentType?.trim()) {
191
+ return validators.headerless;
192
+ }
193
+ const request = parseMimeType(contentType);
194
+ if (!isJsonContentType(request)) {
195
+ return null;
196
+ }
197
+ const match = validators.mediaTypes.find(({ mediaType }) => {
198
+ if (mediaType.type !== '*' && mediaType.type !== request.type) {
199
+ return false;
200
+ }
201
+ if (mediaType.subtype !== '*' && mediaType.subtype !== request.subtype) {
202
+ return false;
203
+ }
204
+ return Array.from(mediaType.parameters).every(([name, value]) => {
205
+ const actual = request.parameters.get(name);
206
+ return name === 'charset' ? actual?.toLowerCase() === value.toLowerCase() : actual === value;
207
+ });
208
+ });
209
+ return match?.validate ?? null;
210
+ };
211
+ /** Compile the validators for a single operation once, so they can be reused on every request. */
137
212
  const compileValidators = (operation, pathItemParameters) => {
138
213
  // Coerce string parameters to their declared types (integer, boolean, …).
139
- const parameterAjv = new Ajv2020({
140
- strict: false,
141
- allErrors: true,
142
- coerceTypes: true,
143
- code: { regExp: compilePattern },
144
- });
145
- useDecimalMultipleOf(parameterAjv);
146
- addFormats(parameterAjv);
147
- // Do not coerce the JSON body; a JSON value already carries its type and coercion would mask errors.
148
- const bodyAjv = new Ajv2020({ strict: false, allErrors: true, code: { regExp: compilePattern } });
149
- useDecimalMultipleOf(bodyAjv);
150
- addFormats(bodyAjv);
214
+ const parameterAjv = createRequestAjv({ coerceTypes: true });
215
+ const querystringAjv = createRequestAjv();
216
+ const contentAjv = new Map();
217
+ const getContentAjv = (coerceTypes) => {
218
+ const existing = contentAjv.get(coerceTypes);
219
+ if (existing) {
220
+ return existing;
221
+ }
222
+ // Standalone content validators can reference the same component without registering its ID twice.
223
+ const ajv = createRequestAjv({ coerceTypes, addUsedSchema: false, ownProperties: true });
224
+ contentAjv.set(coerceTypes, ajv);
225
+ return ajv;
226
+ };
151
227
  // Path-item parameters apply to every operation, so fold them in before building the schemas.
152
228
  const parameters = mergeParameters(pathItemParameters, operation.parameters);
153
- const pathParameters = buildParameterSchema(parameters, 'path');
154
- const queryParameters = buildParameterSchema(parameters, 'query');
155
- const headerParameters = buildParameterSchema(parameters, 'header');
156
- const cookieParameters = buildParameterSchema(parameters, 'cookie');
157
229
  const querystringParameter = findQuerystringParameter(operation, pathItemParameters);
158
230
  const [querystringContentType, querystringMedia] = getFirstMediaType(querystringParameter?.content) ?? [];
159
231
  const querystringSchema = querystringMedia?.schema;
160
232
  const requestBody = getResolvedRef(operation.requestBody);
161
- // Build the body schema defensively; resolving a malformed `$ref` should not crash setup.
162
- let bodySchema = null;
163
- try {
164
- const jsonSchema = getResolvedRef(requestBody?.content?.['application/json'])?.schema;
165
- bodySchema = jsonSchema
166
- ? dropReadOnlyRequired(asCompilableSchema(getResolvedRefDeep(jsonSchema)))
167
- : null;
168
- }
169
- catch (error) {
170
- console.error('Error resolving request body schema, skipping body validation:', error);
171
- }
172
233
  return {
173
234
  querystringParameter,
174
- querystringJson: compileSchema(bodyAjv, getQuerystringJsonSchema(querystringParameter), 'querystring JSON properties'),
175
- querystring: compileSchema(parseMimeType(querystringContentType).essence === 'application/x-www-form-urlencoded' ? parameterAjv : bodyAjv, querystringSchema === undefined ? null : asCompilableSchema(getResolvedRefDeep(querystringSchema)), 'querystring parameter'),
176
- path: compileSchema(parameterAjv, pathParameters?.schema ?? null, 'path parameter'),
177
- query: compileSchema(parameterAjv, queryParameters?.schema ?? null, 'query parameter'),
178
- header: compileSchema(parameterAjv, headerParameters?.schema ?? null, 'header parameter'),
179
- cookie: compileSchema(parameterAjv, cookieParameters?.schema ?? null, 'cookie parameter'),
180
- pathParameters: pathParameters?.parameters ?? [],
181
- queryParameters: queryParameters?.parameters ?? [],
182
- headerParameters: headerParameters?.parameters ?? [],
183
- cookieParameters: cookieParameters?.parameters ?? [],
184
- body: compileSchema(bodyAjv, bodySchema, 'request body'),
235
+ querystringJson: compileSchema(querystringAjv, getQuerystringJsonSchema(querystringParameter), 'querystring JSON properties'),
236
+ querystring: compileSchema(parseMimeType(querystringContentType).essence === 'application/x-www-form-urlencoded'
237
+ ? parameterAjv
238
+ : querystringAjv, querystringSchema === undefined ? null : asCompilableSchema(getResolvedRefDeep(querystringSchema)), 'querystring parameter'),
239
+ parameters: {
240
+ path: compileParameters(parameters, 'path', parameterAjv, getContentAjv),
241
+ query: compileParameters(parameters, 'query', parameterAjv, getContentAjv),
242
+ header: compileParameters(parameters, 'header', parameterAjv, getContentAjv),
243
+ cookie: compileParameters(parameters, 'cookie', parameterAjv, getContentAjv),
244
+ },
245
+ body: compileBodyValidators(requestBody?.content),
185
246
  // Required-body enforcement is independent of whether the body schema compiles.
186
247
  bodyRequired: requestBody?.required === true,
187
248
  };
@@ -191,31 +252,22 @@ const compileValidators = (operation, pathItemParameters) => {
191
252
  * offending parameter name is prepended to the message so the response is readable without
192
253
  * cross-referencing the pointer.
193
254
  */
194
- const mapErrors = (errors, location) => (errors ?? []).map((error) => {
255
+ const mapErrors = (errors, location, prefix = '') => (errors ?? []).map((error) => {
195
256
  const missingProperty = typeof error.params === 'object' && error.params && 'missingProperty' in error.params
196
257
  ? String(error.params.missingProperty)
197
258
  : '';
198
- const path = error.instancePath || (missingProperty ? `/${missingProperty}` : '');
259
+ const instancePath = prefix + error.instancePath;
260
+ const path = instancePath || (missingProperty ? `/${missingProperty}` : '');
199
261
  // A missing parameter surfaces as a top-level `required` error whose `missingProperty` is the
200
262
  // parameter name. Phrase it as "<name> is required" instead of the confusing, self-referential
201
263
  // "<name> must have required property '<name>'" that Ajv produces against the synthetic wrapper.
202
- if (location !== 'body' && missingProperty && !error.instancePath) {
264
+ if (location !== 'body' && missingProperty && !instancePath) {
203
265
  return { location, path, message: `${missingProperty} is required` };
204
266
  }
205
- const name = error.instancePath.replace(/^\//, '') || missingProperty;
267
+ const name = instancePath.replace(/^\//, '') || missingProperty;
206
268
  const message = location !== 'body' && name ? `${name} ${error.message ?? ''}`.trim() : (error.message ?? '');
207
269
  return { location, path, message };
208
270
  });
209
- /**
210
- * Detect whether the request body should be treated as JSON. We only validate JSON bodies in this
211
- * slice; an empty/absent Content-Type is treated as JSON to stay forgiving. This intentionally
212
- * mirrors how `build-handler-context` parses the body, so we never validate a body the handler then
213
- * fails to deliver as `req.body`.
214
- */
215
- const isJsonRequest = (c) => {
216
- const contentType = c.req.header('Content-Type')?.toLowerCase() ?? '';
217
- return contentType === '' || contentType.includes('application/json');
218
- };
219
271
  /**
220
272
  * Create a Hono middleware bound to a single resolved operation that enforces its request contract.
221
273
  *
@@ -241,10 +293,7 @@ export const validateRequest = (operation, pathItemParameters) => {
241
293
  * cookie, where exploded-`form` objects (and query `deepObject`) spread properties across keys —
242
294
  * for cookies each object property is its own cookie (`Cookie: r=100; g=200`).
243
295
  */
244
- const gather = (descriptors, getValue, getValues, getMap) => {
245
- // Names of every declared parameter in this location, so a free-form exploded object does not
246
- // swallow a sibling parameter's key (e.g. a required free-form object satisfied by `?limit=5`).
247
- const declaredNames = new Set(descriptors.map((descriptor) => descriptor.name));
296
+ const gather = (descriptors, declaredNames, getValue, getValues, getMap) => {
248
297
  const readAsObject = (descriptor) => deserializeObjectParameter({
249
298
  style: descriptor.style,
250
299
  explode: descriptor.explode,
@@ -281,7 +330,11 @@ export const validateRequest = (operation, pathItemParameters) => {
281
330
  value = readAsArray(descriptor);
282
331
  }
283
332
  else {
284
- value = getValue(descriptor.name);
333
+ value = deserializePrimitiveParameter({
334
+ style: descriptor.style,
335
+ single: getValue(descriptor.name),
336
+ name: descriptor.name,
337
+ });
285
338
  }
286
339
  if (value !== undefined) {
287
340
  data[descriptor.name] = value;
@@ -299,40 +352,56 @@ export const validateRequest = (operation, pathItemParameters) => {
299
352
  const requestPathParameters = pathParameters(c);
300
353
  const parameterLocations = [
301
354
  {
302
- validator: validators.path,
303
- descriptors: validators.pathParameters,
304
355
  location: 'path',
305
356
  getValue: (name) => requestPathParameters[name],
306
357
  },
307
358
  {
308
- validator: validators.query,
309
- descriptors: validators.queryParameters,
310
359
  location: 'query',
311
360
  getValue: (name) => c.req.query(name),
312
361
  getValues: (name) => c.req.queries(name),
313
362
  getMap: () => mapRepeatedValues(c.req.queries()),
314
363
  },
315
364
  {
316
- validator: validators.header,
317
- descriptors: validators.headerParameters,
318
365
  location: 'header',
319
366
  getValue: (name) => c.req.header(name),
320
367
  },
321
368
  {
322
- validator: validators.cookie,
323
- descriptors: validators.cookieParameters,
324
369
  location: 'cookie',
325
370
  getValue: (name) => getCookie(c, name),
326
371
  getMap: () => getCookie(c),
327
372
  },
328
373
  ];
329
- for (const { validator, descriptors, location, getValue, getValues, getMap } of parameterLocations) {
330
- if (!validator) {
331
- continue;
374
+ for (const { location, getValue, getValues, getMap } of parameterLocations) {
375
+ const { styled, validateStyled, content } = validators.parameters[location];
376
+ if (validateStyled) {
377
+ // Reserve named content values so an exploded object cannot consume a sibling parameter.
378
+ const declaredNames = new Set([...styled, ...content].map(({ name }) => name));
379
+ if (!validateStyled(gather(styled, declaredNames, getValue, getValues, getMap))) {
380
+ violations.push(...mapErrors(validateStyled.errors, location));
381
+ }
332
382
  }
333
- const data = gather(descriptors, getValue, getValues, getMap);
334
- if (!validator(data)) {
335
- violations.push(...mapErrors(validator.errors, location));
383
+ for (const { name, required, isJson, validate } of content) {
384
+ const raw = getValue(name);
385
+ const path = `/${escapeJsonPointer(name)}`;
386
+ if (typeof raw !== 'string') {
387
+ if (required) {
388
+ violations.push({ location, path, message: `${name} is required` });
389
+ }
390
+ continue;
391
+ }
392
+ let value = raw;
393
+ if (isJson) {
394
+ try {
395
+ value = JSON.parse(raw);
396
+ }
397
+ catch {
398
+ violations.push({ location, path, message: `${name} must be valid JSON` });
399
+ continue;
400
+ }
401
+ }
402
+ if (validate && !validate(value)) {
403
+ violations.push(...mapErrors(validate.errors, location, path));
404
+ }
336
405
  }
337
406
  }
338
407
  if (validators.querystringParameter) {
@@ -354,8 +423,8 @@ export const validateRequest = (operation, pathItemParameters) => {
354
423
  violations.push({ location: 'query', path: '', message: 'Query string could not be decoded' });
355
424
  }
356
425
  }
357
- // Request body — only `application/json` in this slice
358
- if (validators.body || validators.bodyRequired) {
426
+ const validateBody = selectBodyValidator(validators.body, c.req.header('Content-Type'));
427
+ if (validateBody || validators.bodyRequired) {
359
428
  // Read from a clone so the original request stream stays intact for the mock or `x-handler`
360
429
  // downstream. Consuming `c.req.text()` directly would leave `c.req.parseBody()` (used for
361
430
  // form bodies) unable to reconstruct the body, so handlers would see it as undefined.
@@ -365,11 +434,11 @@ export const validateRequest = (operation, pathItemParameters) => {
365
434
  violations.push({ location: 'body', path: '', message: 'Request body is required' });
366
435
  }
367
436
  }
368
- else if (validators.body && isJsonRequest(c)) {
437
+ else if (validateBody) {
369
438
  try {
370
439
  const parsed = JSON.parse(raw);
371
- if (!validators.body(parsed)) {
372
- violations.push(...mapErrors(validators.body.errors, 'body'));
440
+ if (!validateBody(parsed)) {
441
+ violations.push(...mapErrors(validateBody.errors, 'body'));
373
442
  }
374
443
  }
375
444
  catch {
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "swagger",
17
17
  "cli"
18
18
  ],
19
- "version": "0.21.7",
19
+ "version": "0.21.8",
20
20
  "engines": {
21
21
  "node": ">=22.19.0"
22
22
  },
@@ -52,24 +52,24 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@faker-js/faker": "10.6.0",
55
- "@scalar/helpers": "0.19.0",
56
- "@scalar/json-magic": "0.22.0",
57
- "@scalar/json-schema-validator": "0.1.24",
55
+ "@scalar/helpers": "0.20.0",
56
+ "@scalar/json-magic": "0.23.0",
57
+ "@scalar/json-schema-validator": "0.1.25",
58
58
  "@scalar/openapi-types": "0.9.10",
59
- "@scalar/openapi-upgrader": "0.5.1",
60
- "@scalar/types": "0.32.0",
61
- "@scalar/workspace-store": "0.76.0",
59
+ "@scalar/openapi-upgrader": "0.5.2",
60
+ "@scalar/types": "0.32.1",
61
+ "@scalar/workspace-store": "0.77.0",
62
62
  "ajv": "^8.20.0",
63
63
  "ajv-formats": "^3.0.1",
64
- "hono": "^4.13.18",
64
+ "hono": "^4.13.20",
65
65
  "quickjs-emscripten": "0.32.0",
66
66
  "yaml": "^2.9.1"
67
67
  },
68
68
  "devDependencies": {
69
- "@hono/node-server": "^2.1.9",
69
+ "@hono/node-server": "^2.1.11",
70
70
  "@types/node": "^24.19.2",
71
71
  "@types/ws": "8.18.2",
72
- "undici": "^8.12.4",
72
+ "undici": "^8.13.1",
73
73
  "vite": "8.3.8",
74
74
  "ws": "8.23.0"
75
75
  },