msw-dev-tool 1.1.15 → 1.1.17

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.
Files changed (2) hide show
  1. package/README.md +15 -46
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,72 +1,41 @@
1
1
  # Install
2
2
 
3
3
  - npm:
4
+
4
5
  ```bash
5
6
  npm i msw-dev-tool --save-dev
6
7
  ```
7
8
 
8
9
  - yarn:
10
+
9
11
  ```bash
10
12
  yarn add msw-dev-tool --dev
11
13
  ```
12
14
 
13
15
  - pnpm:
16
+
14
17
  ```bash
15
18
  pnpm add msw-dev-tool --save-dev
16
19
  ```
17
20
 
18
- ## Peer Dep
19
-
20
- These dependencies are assumed to already exist in your project.
21
- If not, please install it.
22
-
23
- ```json
24
- "react": "^18.0.0",
25
- "react-dom": "^18.0.0",
26
- "zustand": "^5.0.2",
27
- "msw": "^2.7.0"
28
- ```
29
- - [install msw](https://mswjs.io/docs/getting-started)
30
- - [install zustand](https://zustand.docs.pmnd.rs/getting-started/introduction#installation)
31
-
32
- # Usage
33
- > Please look forward to the official document. I will tell you how to use it in more detail.
34
-
35
- ## UI
36
-
37
- ```jsx
38
- import { MSWDevTool } from "msw-dev-tool";
39
- import "msw-dev-tool/msw-dev-tool.css"
21
+ # How to use?
40
22
 
41
- function App() {
23
+ view [docs](https://msw-dev-tool-docs.vercel.app/docs/get-started)
42
24
 
43
- return (
44
- <>
45
- <MSWDevTool />
46
- {/* ... */}
47
- </>
48
- );
49
- }
50
- ```
51
-
52
- ## Integration with msw
25
+ # What features?
53
26
 
54
- ```typescript
55
- import { setupWorker } from "msw/browser";
56
- import { handlers } from "./handlers";
57
- import { setupDevToolWorker } from "msw-dev-tool";
27
+ ## Handler Table
58
28
 
59
- // use setupDevToolWorker instead of setupWorker from msw.
60
- export const worker = setupDevToolWorker(...handlers);
29
+ **view [docs](https://msw-dev-tool-docs.vercel.app/docs/handler-table)**
61
30
 
62
- ```
31
+ The handler table is a table that shows all the handlers in the project and control them.
63
32
 
33
+ ## Debugger
64
34
 
65
- # ProjectStructure
35
+ **view [docs](https://msw-dev-tool-docs.vercel.app/docs/debugger)**
66
36
 
67
- This project uses pnpm workspaces.
37
+ The Debugger allows you to test your mock handlers interactively:
68
38
 
69
- | Project | Description |
70
- | ---------------- | ----------------------------------------------------------------------------------------------------- |
71
- | **example** | A sample project to develop and test `msw-dev-tool`. You need to build `msw-dev-tool` before testing. |
72
- | **msw-dev-tool** | The source code of the library. |
39
+ 1. Open the Debugger by clicking any row in the Handler Table
40
+ 2. Enter the request parameters in the input fields
41
+ 3. Send a test request to see the mocked response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "msw-dev-tool",
3
- "version": "1.1.15",
3
+ "version": "1.1.17",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",