@scalar/mock-server 0.19.0 → 0.20.0
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 +10 -0
- package/dist/transports/index.d.ts +1 -1
- package/dist/transports/sse.d.ts +1 -1
- package/dist/transports/websocket.d.ts +1 -1
- package/dist/utils/generate-message.js +1 -1
- package/dist/utils/hono-route-from-path.js +1 -1
- package/dist/utils/path-parameters.js +1 -1
- package/dist/utils/request-matches-pinned-query.d.ts +1 -1
- package/dist/utils/resolve-channels.js +1 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @scalar/mock-server
|
|
2
2
|
|
|
3
|
+
## 0.20.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#10721](https://github.com/scalar/scalar/pull/10721): Update compatible dependencies while retaining the existing Node.js support and five-day release-age policy.
|
|
12
|
+
|
|
3
13
|
## 0.19.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MockTransport } from '
|
|
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.
|
package/dist/transports/sse.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MockTransport } from '
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { getResolvedRefDeep } from '@scalar/workspace-store/helpers/get-resolved-ref-deep';
|
|
2
|
-
import { generateResponseExample } from '
|
|
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 { LITERAL_PARAMETER_PREFIX } from '
|
|
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
|
/**
|
|
@@ -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 '
|
|
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
|
+
"version": "0.20.0",
|
|
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.
|
|
56
|
+
"@scalar/json-magic": "0.17.0",
|
|
57
57
|
"@scalar/openapi-types": "0.9.8",
|
|
58
|
-
"@scalar/openapi-upgrader": "0.4.
|
|
59
|
-
"@scalar/types": "0.
|
|
60
|
-
"@scalar/workspace-store": "0.
|
|
58
|
+
"@scalar/openapi-upgrader": "0.4.6",
|
|
59
|
+
"@scalar/types": "0.25.0",
|
|
60
|
+
"@scalar/workspace-store": "0.69.0",
|
|
61
61
|
"ajv": "^8.20.0",
|
|
62
62
|
"ajv-formats": "^3.0.1",
|
|
63
|
-
"hono": "^4.13.
|
|
63
|
+
"hono": "^4.13.13",
|
|
64
64
|
"quickjs-emscripten": "0.32.0",
|
|
65
|
-
"yaml": "^2.9.
|
|
65
|
+
"yaml": "^2.9.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@hono/node-server": "^2.1.
|
|
69
|
-
"@types/node": "^24.
|
|
70
|
-
"@types/ws": "8.18.
|
|
71
|
-
"undici": "
|
|
72
|
-
"vite": "8.
|
|
73
|
-
"ws": "8.
|
|
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",
|