msw 2.1.2 → 2.1.4
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/README.md +5 -5
- package/lib/browser/index.js +1757 -27
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/index.mjs +1751 -23
- package/lib/browser/index.mjs.map +1 -1
- package/lib/core/{GraphQLHandler-2guuZL5R.d.ts → GraphQLHandler-eJejgV5u.d.ts} +1 -1
- package/lib/core/{GraphQLHandler-fe5IYUg3.d.mts → GraphQLHandler-rZ7XkeDz.d.mts} +1 -1
- package/lib/core/HttpResponse.d.mts +1 -1
- package/lib/core/HttpResponse.d.ts +1 -1
- package/lib/core/{RequestHandler-TRh8Eh4H.d.ts → RequestHandler-CwjkprZE.d.ts} +8 -6
- package/lib/core/{RequestHandler-nfjVJ8Tp.d.mts → RequestHandler-MAVTMsma.d.mts} +8 -6
- package/lib/core/SetupApi.d.mts +1 -1
- package/lib/core/SetupApi.d.ts +1 -1
- package/lib/core/getResponse.d.mts +13 -0
- package/lib/core/getResponse.d.ts +13 -0
- package/lib/core/getResponse.js +34 -0
- package/lib/core/getResponse.js.map +1 -0
- package/lib/core/getResponse.mjs +14 -0
- package/lib/core/getResponse.mjs.map +1 -0
- package/lib/core/graphql.d.mts +2 -2
- package/lib/core/graphql.d.ts +2 -2
- package/lib/core/handlers/GraphQLHandler.d.mts +2 -2
- package/lib/core/handlers/GraphQLHandler.d.ts +2 -2
- package/lib/core/handlers/HttpHandler.d.mts +1 -1
- package/lib/core/handlers/HttpHandler.d.ts +1 -1
- package/lib/core/handlers/HttpHandler.js.map +1 -1
- package/lib/core/handlers/HttpHandler.mjs.map +1 -1
- package/lib/core/handlers/RequestHandler.d.mts +1 -1
- package/lib/core/handlers/RequestHandler.d.ts +1 -1
- package/lib/core/handlers/RequestHandler.js.map +1 -1
- package/lib/core/handlers/RequestHandler.mjs.map +1 -1
- package/lib/core/http.d.mts +1 -1
- package/lib/core/http.d.ts +1 -1
- package/lib/core/index.d.mts +3 -2
- package/lib/core/index.d.ts +3 -2
- package/lib/core/index.js +2 -0
- package/lib/core/index.js.map +1 -1
- package/lib/core/index.mjs +2 -0
- package/lib/core/index.mjs.map +1 -1
- package/lib/core/sharedOptions.d.mts +0 -2
- package/lib/core/sharedOptions.d.ts +0 -2
- package/lib/core/utils/HttpResponse/decorators.d.mts +1 -1
- package/lib/core/utils/HttpResponse/decorators.d.ts +1 -1
- package/lib/core/utils/executeHandlers.d.mts +2 -0
- package/lib/core/utils/executeHandlers.d.ts +2 -0
- package/lib/core/utils/{getResponse.js → executeHandlers.js} +6 -6
- package/lib/core/utils/executeHandlers.js.map +1 -0
- package/lib/core/utils/{getResponse.mjs → executeHandlers.mjs} +3 -3
- package/lib/core/utils/executeHandlers.mjs.map +1 -0
- package/lib/core/utils/handleRequest.d.mts +2 -2
- package/lib/core/utils/handleRequest.d.ts +2 -2
- package/lib/core/utils/handleRequest.js +3 -3
- package/lib/core/utils/handleRequest.js.map +1 -1
- package/lib/core/utils/handleRequest.mjs +3 -3
- package/lib/core/utils/handleRequest.mjs.map +1 -1
- package/lib/core/utils/internal/parseGraphQLRequest.d.mts +2 -2
- package/lib/core/utils/internal/parseGraphQLRequest.d.ts +2 -2
- package/lib/core/utils/internal/parseMultipartData.d.mts +1 -1
- package/lib/core/utils/internal/parseMultipartData.d.ts +1 -1
- package/lib/core/utils/internal/randomId.d.mts +3 -0
- package/lib/core/utils/internal/randomId.d.ts +3 -0
- package/lib/core/utils/internal/{uuidv4.js → randomId.js} +6 -6
- package/lib/core/utils/internal/randomId.js.map +1 -0
- package/lib/core/utils/internal/randomId.mjs +7 -0
- package/lib/core/utils/internal/randomId.mjs.map +1 -0
- package/lib/core/utils/internal/requestHandlerUtils.d.mts +1 -1
- package/lib/core/utils/internal/requestHandlerUtils.d.ts +1 -1
- package/lib/core/utils/request/onUnhandledRequest.d.mts +1 -4
- package/lib/core/utils/request/onUnhandledRequest.d.ts +1 -4
- package/lib/core/utils/request/onUnhandledRequest.js +9 -113
- package/lib/core/utils/request/onUnhandledRequest.js.map +1 -1
- package/lib/core/utils/request/onUnhandledRequest.mjs +9 -105
- package/lib/core/utils/request/onUnhandledRequest.mjs.map +1 -1
- package/lib/iife/index.js +29 -216
- package/lib/iife/index.js.map +1 -1
- package/lib/mockServiceWorker.js +1 -1
- package/package.json +1 -4
- package/src/core/getResponse.test.ts +63 -0
- package/src/core/getResponse.ts +23 -0
- package/src/core/handlers/GraphQLHandler.test.ts +4 -4
- package/src/core/handlers/HttpHandler.test.ts +5 -5
- package/src/core/handlers/HttpHandler.ts +1 -1
- package/src/core/handlers/RequestHandler.ts +1 -1
- package/src/core/index.ts +1 -0
- package/src/core/utils/{getResponse.ts → executeHandlers.ts} +7 -5
- package/src/core/utils/handleRequest.test.ts +14 -14
- package/src/core/utils/handleRequest.ts +5 -5
- package/src/core/utils/internal/{uuidv4.ts → randomId.ts} +1 -1
- package/src/core/utils/request/onUnhandledRequest.test.ts +5 -101
- package/src/core/utils/request/onUnhandledRequest.ts +3 -182
- package/lib/core/utils/getResponse.d.mts +0 -2
- package/lib/core/utils/getResponse.d.ts +0 -2
- package/lib/core/utils/getResponse.js.map +0 -1
- package/lib/core/utils/getResponse.mjs.map +0 -1
- package/lib/core/utils/internal/uuidv4.d.mts +0 -3
- package/lib/core/utils/internal/uuidv4.d.ts +0 -3
- package/lib/core/utils/internal/uuidv4.js.map +0 -1
- package/lib/core/utils/internal/uuidv4.mjs +0 -7
- package/lib/core/utils/internal/uuidv4.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -223,6 +223,11 @@ Mock Service Worker is trusted by hundreds of thousands of engineers around the
|
|
|
223
223
|
<img src="media/sponsors/workleap.svg" alt="Workleap" height="64" width="174" />
|
|
224
224
|
</a>
|
|
225
225
|
</td>
|
|
226
|
+
<td>
|
|
227
|
+
<a href="https://www.chromatic.com/?ref=mswjs" target="_blank">
|
|
228
|
+
<img src="media/sponsors/chromatic.svg" alt="Chromatic" height="64" />
|
|
229
|
+
</a>
|
|
230
|
+
</td>
|
|
226
231
|
</tr>
|
|
227
232
|
</table>
|
|
228
233
|
|
|
@@ -241,11 +246,6 @@ Mock Service Worker is trusted by hundreds of thousands of engineers around the
|
|
|
241
246
|
<img src="media/sponsors/replay.svg" alt="Replay" height="64" />
|
|
242
247
|
</a>
|
|
243
248
|
</td>
|
|
244
|
-
<td>
|
|
245
|
-
<a href="https://www.chromatic.com/" target="_blank">
|
|
246
|
-
<img src="media/sponsors/chromatic.svg" alt="Chromatic" height="64" />
|
|
247
|
-
</a>
|
|
248
|
-
</td>
|
|
249
249
|
</tr>
|
|
250
250
|
</table>
|
|
251
251
|
|