msw-dev-tool 1.1.10 → 1.1.12
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 +19 -4
- package/dist/cjs/index.js +1700 -304
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/msw-dev-tool.css +1 -1
- package/dist/esm/index.js +1701 -306
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/msw-dev-tool.css +1 -1
- package/dist/types/index.d.ts +43 -2
- package/package.json +2 -1
package/dist/types/index.d.ts
CHANGED
@@ -1,17 +1,58 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { HttpHandler } from 'msw';
|
2
|
+
import { HttpHandler as HttpHandler$1, ResponseResolver, RequestHandler, WebSocketHandler, PathParams } from 'msw';
|
3
3
|
import { SetupWorker } from 'msw/browser';
|
4
4
|
|
5
5
|
declare const MSWDevTool: () => React.JSX.Element;
|
6
6
|
|
7
|
+
type HttpRequestResolverExtras<Params extends PathParams> = {
|
8
|
+
params: Params;
|
9
|
+
cookies: Record<string, string>;
|
10
|
+
};
|
11
|
+
type ValueUnion<T> = T[keyof T];
|
12
|
+
declare const HttpHandlerBehavior: {
|
13
|
+
readonly BAD_REQUEST: 400;
|
14
|
+
readonly UNAUTHORIZED: 401;
|
15
|
+
readonly PAYMENT_REQUIRED: 402;
|
16
|
+
readonly FORBIDDEN: 403;
|
17
|
+
readonly NOT_FOUND: 404;
|
18
|
+
readonly METHOD_NOT_ALLOWED: 405;
|
19
|
+
readonly NOT_ACCEPTABLE: 406;
|
20
|
+
readonly CONFLICT: 409;
|
21
|
+
readonly GONE: 410;
|
22
|
+
readonly PRECONDITION_FAILED: 412;
|
23
|
+
readonly PAYLOAD_TOO_LARGE: 413;
|
24
|
+
readonly UNSUPPORTED_MEDIA_TYPE: 415;
|
25
|
+
readonly RANGE_NOT_SATISFIABLE: 416;
|
26
|
+
readonly TOO_MANY_REQUESTS: 429;
|
27
|
+
readonly INTERNAL_SERVER_ERROR: 500;
|
28
|
+
readonly NOT_IMPLEMENTED: 501;
|
29
|
+
readonly BAD_GATEWAY: 502;
|
30
|
+
readonly SERVICE_UNAVAILABLE: 503;
|
31
|
+
readonly GATEWAY_TIMEOUT: 504;
|
32
|
+
readonly HTTP_VERSION_NOT_SUPPORTED: 505;
|
33
|
+
readonly DEFAULT: "default";
|
34
|
+
readonly DELAY: "delay";
|
35
|
+
readonly RETURN_NULL: "return null";
|
36
|
+
readonly NETWORK_ERROR: "network error";
|
37
|
+
};
|
38
|
+
type HttpHandlerBehavior = ValueUnion<typeof HttpHandlerBehavior>;
|
39
|
+
/**
|
40
|
+
* To use private method: `resolver`.
|
41
|
+
*/
|
42
|
+
type HttpHandler = HttpHandler$1 & {
|
43
|
+
resolver: ResponseResolver<HttpRequestResolverExtras<any>, any, any>;
|
44
|
+
};
|
7
45
|
type FlattenHandler = {
|
8
46
|
id: string;
|
9
47
|
path: string;
|
10
48
|
method: string;
|
11
49
|
enabled: boolean;
|
12
50
|
handler: HttpHandler;
|
51
|
+
behavior: HttpHandlerBehavior;
|
13
52
|
};
|
53
|
+
type Handler = RequestHandler | WebSocketHandler;
|
14
54
|
|
15
55
|
declare const initMSWDevTool: (worker: SetupWorker) => SetupWorker;
|
56
|
+
declare const setupDevToolWorker: (...handlers: Handler[]) => SetupWorker;
|
16
57
|
|
17
|
-
export { FlattenHandler, MSWDevTool, initMSWDevTool };
|
58
|
+
export { FlattenHandler, MSWDevTool, initMSWDevTool, setupDevToolWorker };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "msw-dev-tool",
|
3
|
-
"version": "1.1.
|
3
|
+
"version": "1.1.12",
|
4
4
|
"main": "dist/cjs/index.js",
|
5
5
|
"module": "dist/esm/index.js",
|
6
6
|
"types": "dist/types/index.d.ts",
|
@@ -65,6 +65,7 @@
|
|
65
65
|
"@radix-ui/react-dialog": "^1.1.6",
|
66
66
|
"@radix-ui/react-icons": "^1.3.2",
|
67
67
|
"@radix-ui/react-label": "^2.1.2",
|
68
|
+
"@radix-ui/react-select": "^2.1.6",
|
68
69
|
"@radix-ui/themes": "^3.2.1",
|
69
70
|
"@tanstack/react-table": "^8.20.6",
|
70
71
|
"@types/lodash": "^4.17.15",
|