@zimic/interceptor 1.5.0 → 1.5.1-canary.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/dist/{chunk-3W3A4TJ5.js → chunk-LGUD3RVU.js} +2 -2
- package/dist/{chunk-3W3A4TJ5.js.map → chunk-LGUD3RVU.js.map} +1 -1
- package/dist/{chunk-F3VMDYHM.mjs → chunk-YN4S2AHJ.mjs} +2 -2
- package/dist/{chunk-F3VMDYHM.mjs.map → chunk-YN4S2AHJ.mjs.map} +1 -1
- package/dist/cli.js +17 -17
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +2 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/http.js.map +1 -1
- package/dist/http.mjs.map +1 -1
- package/dist/server.js +6 -6
- package/dist/server.mjs +1 -1
- package/package.json +7 -7
- package/src/http/interceptor/HttpInterceptorImplementation.ts +1 -2
- package/src/http/interceptorWorker/HttpInterceptorWorker.ts +1 -2
- package/src/http/interceptorWorker/LocalHttpInterceptorWorker.ts +1 -2
- package/src/http/interceptorWorker/RemoteHttpInterceptorWorker.ts +1 -2
- package/src/utils/webSocket/types.ts +1 -2
package/dist/server.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLGUD3RVU_js = require('./chunk-LGUD3RVU.js');
|
|
4
4
|
require('./chunk-DGUM43GV.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "DEFAULT_ACCESS_CONTROL_HEADERS", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkLGUD3RVU_js.DEFAULT_ACCESS_CONTROL_HEADERS; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "DEFAULT_PREFLIGHT_STATUS_CODE", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkLGUD3RVU_js.DEFAULT_PREFLIGHT_STATUS_CODE; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "NotRunningInterceptorServerError", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkLGUD3RVU_js.NotRunningInterceptorServerError_default; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "RunningInterceptorServerError", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkLGUD3RVU_js.RunningInterceptorServerError_default; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "createInterceptorServer", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkLGUD3RVU_js.createInterceptorServer; }
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=server.js.map
|
|
29
29
|
//# sourceMappingURL=server.js.map
|
package/dist/server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DEFAULT_ACCESS_CONTROL_HEADERS, DEFAULT_PREFLIGHT_STATUS_CODE, NotRunningInterceptorServerError_default as NotRunningInterceptorServerError, RunningInterceptorServerError_default as RunningInterceptorServerError, createInterceptorServer } from './chunk-
|
|
1
|
+
export { DEFAULT_ACCESS_CONTROL_HEADERS, DEFAULT_PREFLIGHT_STATUS_CODE, NotRunningInterceptorServerError_default as NotRunningInterceptorServerError, RunningInterceptorServerError_default as RunningInterceptorServerError, createInterceptorServer } from './chunk-YN4S2AHJ.mjs';
|
|
2
2
|
import './chunk-BJTO5JO5.mjs';
|
|
3
3
|
//# sourceMappingURL=server.mjs.map
|
|
4
4
|
//# sourceMappingURL=server.mjs.map
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"api",
|
|
15
15
|
"static"
|
|
16
16
|
],
|
|
17
|
-
"version": "1.5.0",
|
|
17
|
+
"version": "1.5.1-canary.0",
|
|
18
18
|
"homepage": "https://zimic.dev/docs/interceptor",
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
@@ -100,12 +100,12 @@
|
|
|
100
100
|
"isomorphic-ws": "5.0.0",
|
|
101
101
|
"msw": "2.15.0",
|
|
102
102
|
"picocolors": "^1.1.1",
|
|
103
|
-
"ws": "8.21.
|
|
104
|
-
"yargs": "18.
|
|
103
|
+
"ws": "8.21.1",
|
|
104
|
+
"yargs": "18.1.0",
|
|
105
105
|
"zod": "^4.4.3"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@types/node": "^26.1.
|
|
108
|
+
"@types/node": "^26.1.2",
|
|
109
109
|
"@types/ws": "^8.18.1",
|
|
110
110
|
"@types/yargs": "^17.0.35",
|
|
111
111
|
"@typescript/native": "npm:typescript@^7.0.2",
|
|
@@ -116,10 +116,10 @@
|
|
|
116
116
|
"@zimic/lint-staged-config": "workspace:*",
|
|
117
117
|
"@zimic/tsconfig": "workspace:*",
|
|
118
118
|
"@zimic/utils": "workspace:*",
|
|
119
|
-
"concurrently": "^10.0.
|
|
119
|
+
"concurrently": "^10.0.4",
|
|
120
120
|
"dotenv-cli": "^11.0.0",
|
|
121
|
-
"eslint": "^9.39.
|
|
122
|
-
"playwright": "^1.
|
|
121
|
+
"eslint": "^9.39.5",
|
|
122
|
+
"playwright": "^1.62.0",
|
|
123
123
|
"tsup": "^8.5.1",
|
|
124
124
|
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
125
125
|
"vitest": "^4.1.10"
|
|
@@ -90,8 +90,7 @@ class HttpInterceptorImplementation<
|
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
this.onUnhandledRequest = options.onUnhandledRequest satisfies
|
|
93
|
-
|
|
|
94
|
-
| undefined as this['onUnhandledRequest'];
|
|
93
|
+
UnhandledRequestStrategy | undefined as this['onUnhandledRequest'];
|
|
95
94
|
|
|
96
95
|
this.Handler = options.Handler;
|
|
97
96
|
}
|
|
@@ -249,8 +249,7 @@ abstract class HttpInterceptorWorker {
|
|
|
249
249
|
createResponseFromDeclaration(
|
|
250
250
|
request: HttpRequest,
|
|
251
251
|
declaration:
|
|
252
|
-
|
|
253
|
-
| { action: UnhandledRequestStrategy.Action },
|
|
252
|
+
{ status: number; headers?: HttpHeadersInit; body?: HttpBody } | { action: UnhandledRequestStrategy.Action },
|
|
254
253
|
): PossiblePromise<HttpResponse | null> {
|
|
255
254
|
if ('action' in declaration) {
|
|
256
255
|
if (declaration.action === 'bypass') {
|
|
@@ -252,8 +252,7 @@ class LocalHttpInterceptorWorker extends HttpInterceptorWorker {
|
|
|
252
252
|
async createResponseFromDeclaration(
|
|
253
253
|
request: HttpRequest,
|
|
254
254
|
declaration:
|
|
255
|
-
|
|
256
|
-
| { action: UnhandledRequestStrategy.Action },
|
|
255
|
+
{ status: number; headers?: HttpHeadersInit; body?: HttpBody } | { action: UnhandledRequestStrategy.Action },
|
|
257
256
|
) {
|
|
258
257
|
const requestClone = request.clone();
|
|
259
258
|
const response = await super.createResponseFromDeclaration(request, declaration);
|
|
@@ -171,8 +171,7 @@ class RemoteHttpInterceptorWorker extends HttpInterceptorWorker {
|
|
|
171
171
|
async createResponseFromDeclaration(
|
|
172
172
|
request: HttpRequest,
|
|
173
173
|
declaration:
|
|
174
|
-
|
|
175
|
-
| { action: UnhandledRequestStrategy.Action },
|
|
174
|
+
{ status: number; headers?: HttpHeadersInit; body?: HttpBody } | { action: UnhandledRequestStrategy.Action },
|
|
176
175
|
) {
|
|
177
176
|
const response = await super.createResponseFromDeclaration(request, declaration);
|
|
178
177
|
|
|
@@ -58,5 +58,4 @@ export type WebSocketReplyMessageListener<Schema extends WebSocketSchema, Channe
|
|
|
58
58
|
) => PossiblePromise<void>;
|
|
59
59
|
|
|
60
60
|
export type WebSocketMessageListener<Schema extends WebSocketSchema, Channel extends WebSocketChannel<Schema>> =
|
|
61
|
-
|
|
|
62
|
-
| WebSocketReplyMessageListener<Schema, Channel>;
|
|
61
|
+
WebSocketEventMessageListener<Schema, Channel> | WebSocketReplyMessageListener<Schema, Channel>;
|