vite-plugin-mock-dev-server 1.1.3 → 1.1.5
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 +7 -6
- package/README.zh-CN.md +6 -5
- package/dist/index.cjs +17 -984
- package/dist/index.d.ts +3 -4
- package/dist/index.js +17 -939
- package/package.json +9 -7
package/dist/index.d.ts
CHANGED
|
@@ -111,13 +111,12 @@ interface ExtraRequest {
|
|
|
111
111
|
* 请求体中 headers
|
|
112
112
|
*/
|
|
113
113
|
headers: Headers;
|
|
114
|
-
}
|
|
115
|
-
type MockRequest = Connect.IncomingMessage & ExtraRequest & {
|
|
116
114
|
/**
|
|
117
115
|
* @see [cookies](https://github.com/pillarjs/cookies#cookiesgetname--options)
|
|
118
116
|
*/
|
|
119
117
|
getCookie: (name: string, option?: Cookies.GetOption) => string | undefined;
|
|
120
|
-
}
|
|
118
|
+
}
|
|
119
|
+
type MockRequest = Connect.IncomingMessage & ExtraRequest;
|
|
121
120
|
type MockResponse = http.ServerResponse<http.IncomingMessage> & {
|
|
122
121
|
/**
|
|
123
122
|
* @see [cookies](https://github.com/pillarjs/cookies#cookiessetname--values--options)
|
|
@@ -330,7 +329,7 @@ interface MockOptionsItem {
|
|
|
330
329
|
* }
|
|
331
330
|
* ```
|
|
332
331
|
*/
|
|
333
|
-
validator?: Partial<ExtraRequest
|
|
332
|
+
validator?: Partial<Omit<ExtraRequest, 'getCookie'>> | ((request: ExtraRequest) => boolean);
|
|
334
333
|
}
|
|
335
334
|
type MockOptions = MockOptionsItem[];
|
|
336
335
|
type FormidableFile = formidable.File | formidable.File[];
|