@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/server.js CHANGED
@@ -1,29 +1,29 @@
1
1
  'use strict';
2
2
 
3
- var chunk3W3A4TJ5_js = require('./chunk-3W3A4TJ5.js');
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 chunk3W3A4TJ5_js.DEFAULT_ACCESS_CONTROL_HEADERS; }
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 chunk3W3A4TJ5_js.DEFAULT_PREFLIGHT_STATUS_CODE; }
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 chunk3W3A4TJ5_js.NotRunningInterceptorServerError_default; }
18
+ get: function () { return chunkLGUD3RVU_js.NotRunningInterceptorServerError_default; }
19
19
  });
20
20
  Object.defineProperty(exports, "RunningInterceptorServerError", {
21
21
  enumerable: true,
22
- get: function () { return chunk3W3A4TJ5_js.RunningInterceptorServerError_default; }
22
+ get: function () { return chunkLGUD3RVU_js.RunningInterceptorServerError_default; }
23
23
  });
24
24
  Object.defineProperty(exports, "createInterceptorServer", {
25
25
  enumerable: true,
26
- get: function () { return chunk3W3A4TJ5_js.createInterceptorServer; }
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-F3VMDYHM.mjs';
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.0",
104
- "yargs": "18.0.0",
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.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.3",
119
+ "concurrently": "^10.0.4",
120
120
  "dotenv-cli": "^11.0.0",
121
- "eslint": "^9.39.4",
122
- "playwright": "^1.61.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
- | UnhandledRequestStrategy
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
- | { status: number; headers?: HttpHeadersInit; body?: HttpBody }
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
- | { status: number; headers?: HttpHeadersInit; body?: HttpBody }
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
- | { status: number; headers?: HttpHeadersInit; body?: HttpBody }
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
- | WebSocketEventMessageListener<Schema, Channel>
62
- | WebSocketReplyMessageListener<Schema, Channel>;
61
+ WebSocketEventMessageListener<Schema, Channel> | WebSocketReplyMessageListener<Schema, Channel>;