@scalar/mock-server 0.19.0 → 0.20.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @scalar/mock-server
2
2
 
3
+ ## 0.20.2
4
+
5
+ ## 0.20.1
6
+
7
+ ## 0.20.0
8
+
9
+ ### Minor Changes
10
+
11
+ - [#10696](https://github.com/scalar/scalar/pull/10696): Upgrade Undici to 8.12.3. JSON Magic, Mock Server, Workspace Store, OpenAPI to Markdown, and Scalar App now require Node.js 22.19.0 or later; Node.js 22.0 through 22.18 are no longer supported. Undici 8 enables HTTP/2 by default.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#10721](https://github.com/scalar/scalar/pull/10721): Update compatible dependencies while retaining the existing Node.js support and five-day release-age policy.
16
+
3
17
  ## 0.19.0
4
18
 
5
19
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- import type { MockTransport } from '../transports/types.js';
1
+ import type { MockTransport } from './types.js';
2
2
  /**
3
3
  * Built-in transports, in match priority order. WebSocket is checked before SSE so a `ws`
4
4
  * channel is never claimed by the SSE fallback. Consumer transports are appended after these.
@@ -1,4 +1,4 @@
1
- import type { MockTransport } from '../transports/types.js';
1
+ import type { MockTransport } from './types.js';
2
2
  /**
3
3
  * Built-in Server-Sent Events transport. Serves one-way, server-push channels over HTTP: a `GET`
4
4
  * on the channel route opens an SSE stream and emits a generated message per `receive` operation.
@@ -1,4 +1,4 @@
1
- import type { MockTransport } from '../transports/types.js';
1
+ import type { MockTransport } from './types.js';
2
2
  /**
3
3
  * Built-in WebSocket transport. Serves channels whose servers speak `ws`/`wss` by upgrading the
4
4
  * channel route to a WebSocket connection.
@@ -1,5 +1,5 @@
1
1
  import { getResolvedRefDeep } from '@scalar/workspace-store/helpers/get-resolved-ref-deep';
2
- import { generateResponseExample } from '../utils/generate-response-example.js';
2
+ import { generateResponseExample } from './generate-response-example.js';
3
3
  /** Encode a generated value to a wire string. Strings pass through; everything else is JSON. */
4
4
  function encode(value) {
5
5
  if (typeof value === 'string') {
@@ -1,4 +1,4 @@
1
- import { PATH_KEY_TEMPLATE, splitPathKey } from '../utils/split-path-key.js';
1
+ import { PATH_KEY_TEMPLATE, splitPathKey } from './split-path-key.js';
2
2
  /**
3
3
  * Characters Hono reads as routing syntax instead of as literal path text.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { LITERAL_PARAMETER_PREFIX } from '../utils/hono-route-from-path.js';
1
+ import { LITERAL_PARAMETER_PREFIX } from './hono-route-from-path.js';
2
2
  /** Matches the parameters `honoRouteFromPath` synthesizes, which always carry an explicit pattern. */
3
3
  const synthesizedParameter = new RegExp(`:(${LITERAL_PARAMETER_PREFIX}\\d+)\\{`, 'g');
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import type { Context } from 'hono';
2
- import type { PinnedQueryParameter } from '../utils/split-path-key.js';
2
+ import type { PinnedQueryParameter } from './split-path-key.js';
3
3
  /**
4
4
  * Check whether a request carries every query parameter a path key pins.
5
5
  *
@@ -2,7 +2,7 @@ import { combineUrlAndPath } from '@scalar/helpers/url/merge-urls';
2
2
  import { ASYNCAPI_WEBSOCKET_PROTOCOLS, getAllChannelMessages, getAsyncApiServers, getChannelOperations, resolveChannel, } from '@scalar/workspace-store/channel-example';
3
3
  import { getNameFromRef } from '@scalar/workspace-store/helpers/get-name-from-ref';
4
4
  import { getResolvedRef } from '@scalar/workspace-store/helpers/get-resolved-ref';
5
- import { honoRouteFromPath } from '../utils/hono-route-from-path.js';
5
+ import { honoRouteFromPath } from './hono-route-from-path.js';
6
6
  import { resolveServerPathnames } from './resolve-server-pathnames.js';
7
7
  /** Extract a plain JSON Schema from a message `payload`, unwrapping the Multi Format Schema Object. */
8
8
  function extractPayloadSchema(payload) {
package/package.json CHANGED
@@ -16,9 +16,9 @@
16
16
  "swagger",
17
17
  "cli"
18
18
  ],
19
- "version": "0.19.0",
19
+ "version": "0.20.2",
20
20
  "engines": {
21
- "node": ">=22"
21
+ "node": ">=22.19.0"
22
22
  },
23
23
  "type": "module",
24
24
  "main": "dist/index.js",
@@ -53,24 +53,24 @@
53
53
  "dependencies": {
54
54
  "@faker-js/faker": "10.6.0",
55
55
  "@scalar/helpers": "0.16.4",
56
- "@scalar/json-magic": "0.16.1",
56
+ "@scalar/json-magic": "0.17.0",
57
57
  "@scalar/openapi-types": "0.9.8",
58
- "@scalar/openapi-upgrader": "0.4.5",
59
- "@scalar/types": "0.24.0",
60
- "@scalar/workspace-store": "0.68.5",
58
+ "@scalar/openapi-upgrader": "0.4.6",
59
+ "@scalar/types": "0.25.2",
60
+ "@scalar/workspace-store": "0.69.2",
61
61
  "ajv": "^8.20.0",
62
62
  "ajv-formats": "^3.0.1",
63
- "hono": "^4.13.8",
63
+ "hono": "^4.13.13",
64
64
  "quickjs-emscripten": "0.32.0",
65
- "yaml": "^2.9.0"
65
+ "yaml": "^2.9.1"
66
66
  },
67
67
  "devDependencies": {
68
- "@hono/node-server": "^2.1.1",
69
- "@types/node": "^24.1.0",
70
- "@types/ws": "8.18.1",
71
- "undici": "7.30.1",
72
- "vite": "8.1.5",
73
- "ws": "8.21.3"
68
+ "@hono/node-server": "^2.1.5",
69
+ "@types/node": "^24.19.2",
70
+ "@types/ws": "8.18.2",
71
+ "undici": "8.12.3",
72
+ "vite": "8.3.4",
73
+ "ws": "8.22.0"
74
74
  },
75
75
  "scripts": {
76
76
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",