rspack-plugin-mock 0.3.4 → 0.4.1
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 +2 -2
- package/README.zh-CN.md +2 -2
- package/dist/{chunk-O6PRDW23.js → chunk-4XOUX6CL.js} +127 -125
- package/dist/{chunk-EY46RSAC.js → chunk-JMXFIX5Q.js} +274 -272
- package/dist/{chunk-ZEC4FWWY.cjs → chunk-TKSRTJX5.cjs} +254 -252
- package/dist/{chunk-HLMEDDGX.cjs → chunk-YAHWW6TX.cjs} +127 -125
- package/dist/helper.cjs +55 -2
- package/dist/helper.d.cts +21 -7
- package/dist/helper.d.ts +21 -7
- package/dist/helper.js +54 -1
- package/dist/index.cjs +25 -25
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +14 -14
- package/dist/{mockWebsocket-CPuTAvL0.d.ts → mockWebsocket-DBgZBsdo.d.ts} +15 -15
- package/dist/{mockWebsocket-Dc9CZBfv.d.cts → mockWebsocket-Ki_cShTv.d.cts} +15 -15
- package/dist/rsbuild.cjs +17 -17
- package/dist/rsbuild.d.cts +5 -5
- package/dist/rsbuild.d.ts +5 -5
- package/dist/rsbuild.js +8 -8
- package/dist/server.cjs +2 -2
- package/dist/server.d.cts +8 -8
- package/dist/server.d.ts +8 -8
- package/dist/server.js +1 -1
- package/dist/{types-BgpcN3jm.d.cts → types-Aw0AciTG.d.cts} +5 -5
- package/dist/{types-BgpcN3jm.d.ts → types-Aw0AciTG.d.ts} +5 -5
- package/package.json +20 -20
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import http from 'node:http';
|
|
3
|
-
import { Readable } from 'node:stream';
|
|
1
|
+
import { Options } from 'co-body';
|
|
4
2
|
import Cookies from 'cookies';
|
|
5
3
|
import { CorsOptions } from 'cors';
|
|
6
4
|
import formidable from 'formidable';
|
|
5
|
+
import { Buffer } from 'node:buffer';
|
|
6
|
+
import http from 'node:http';
|
|
7
|
+
import { Readable } from 'node:stream';
|
|
7
8
|
import { WebSocketServer } from 'ws';
|
|
8
|
-
import { Options } from 'co-body';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Configure plugin
|
|
@@ -567,4 +567,4 @@ type FormidableFile = formidable.File | formidable.File[];
|
|
|
567
567
|
type LogType = 'info' | 'warn' | 'error' | 'debug';
|
|
568
568
|
type LogLevel = LogType | 'silent';
|
|
569
569
|
|
|
570
|
-
export type { BodyParserOptions as B, ExtraRequest as E, FormidableFile as F, LogType as L,
|
|
570
|
+
export type { BodyParserOptions as B, ExtraRequest as E, FormidableFile as F, LogType as L, MockHttpItem as M, ResponseBody as R, ServerBuildOption as S, WebSocketSetupContext as W, MockWebsocketItem as a, MockOptions as b, MockServerPluginOptions as c, MockMatchPriority as d, MockMatchSpecialPriority as e, Method as f, MockRequest as g, MockResponse as h, LogLevel as i };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rspack-plugin-mock",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"description": "inject api mock server to development server",
|
|
6
6
|
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"pnpm": ">=9"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@rsbuild/core": ">=0.
|
|
78
|
-
"@rspack/core": ">=0.
|
|
77
|
+
"@rsbuild/core": ">=1.0.0",
|
|
78
|
+
"@rspack/core": ">=1.0.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"@rsbuild/core": {
|
|
@@ -87,28 +87,28 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@pengzhanbo/utils": "^1.1.2",
|
|
90
|
-
"@rollup/pluginutils": "^5.1.
|
|
91
|
-
"chokidar": "
|
|
90
|
+
"@rollup/pluginutils": "^5.1.2",
|
|
91
|
+
"chokidar": "3.6.0",
|
|
92
92
|
"co-body": "^6.2.0",
|
|
93
93
|
"cookies": "^0.9.1",
|
|
94
94
|
"cors": "^2.8.5",
|
|
95
|
-
"debug": "^4.3.
|
|
95
|
+
"debug": "^4.3.7",
|
|
96
96
|
"fast-glob": "^3.3.2",
|
|
97
97
|
"formidable": "2.1.2",
|
|
98
98
|
"http-status": "^1.7.4",
|
|
99
|
-
"is-core-module": "^2.15.
|
|
99
|
+
"is-core-module": "^2.15.1",
|
|
100
100
|
"json5": "^2.2.3",
|
|
101
|
-
"memfs": "^4.
|
|
101
|
+
"memfs": "^4.14.0",
|
|
102
102
|
"mime-types": "^2.1.35",
|
|
103
|
-
"path-to-regexp": "
|
|
104
|
-
"picocolors": "^1.0
|
|
103
|
+
"path-to-regexp": "7.1.0",
|
|
104
|
+
"picocolors": "^1.1.0",
|
|
105
105
|
"portfinder": "^1.0.32",
|
|
106
106
|
"ws": "^8.18.0"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@pengzhanbo/eslint-config": "^1.
|
|
110
|
-
"@rsbuild/core": "1.0.
|
|
111
|
-
"@rspack/core": "1.0.
|
|
109
|
+
"@pengzhanbo/eslint-config": "^1.18.1",
|
|
110
|
+
"@rsbuild/core": "^1.0.14",
|
|
111
|
+
"@rspack/core": "^1.0.11",
|
|
112
112
|
"@types/co-body": "^6.1.3",
|
|
113
113
|
"@types/cookies": "^0.9.0",
|
|
114
114
|
"@types/cors": "^2.8.17",
|
|
@@ -116,15 +116,15 @@
|
|
|
116
116
|
"@types/formidable": "2.0.6",
|
|
117
117
|
"@types/is-core-module": "^2.2.2",
|
|
118
118
|
"@types/mime-types": "^2.1.4",
|
|
119
|
-
"@types/node": "^22.
|
|
119
|
+
"@types/node": "^22.7.5",
|
|
120
120
|
"@types/ws": "^8.5.12",
|
|
121
|
-
"bumpp": "^9.
|
|
121
|
+
"bumpp": "^9.7.1",
|
|
122
122
|
"conventional-changelog-cli": "^5.0.0",
|
|
123
|
-
"eslint": "^9.
|
|
124
|
-
"husky": "^9.1.
|
|
125
|
-
"lint-staged": "^15.2.
|
|
126
|
-
"tsup": "^8.
|
|
127
|
-
"typescript": "^5.
|
|
123
|
+
"eslint": "^9.12.0",
|
|
124
|
+
"husky": "^9.1.6",
|
|
125
|
+
"lint-staged": "^15.2.10",
|
|
126
|
+
"tsup": "^8.3.0",
|
|
127
|
+
"typescript": "^5.6.3"
|
|
128
128
|
},
|
|
129
129
|
"lint-staged": {
|
|
130
130
|
"*": "eslint --fix"
|