vite-plugin-mock-dev-server 0.3.13 → 0.3.14
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/dist/index.cjs +4 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/package.json +25 -24
package/dist/index.cjs
CHANGED
|
@@ -482,7 +482,6 @@ function mockDevServerPlugin({
|
|
|
482
482
|
exclude = [
|
|
483
483
|
"**/node_modules/**",
|
|
484
484
|
"**/test/**",
|
|
485
|
-
"**/cypress/**",
|
|
486
485
|
"src/**",
|
|
487
486
|
"**/.vscode/**",
|
|
488
487
|
"**/.git/**",
|
|
@@ -498,7 +497,10 @@ function mockDevServerPlugin({
|
|
|
498
497
|
const middleware = await mockServerMiddleware(httpServer, config, {
|
|
499
498
|
include,
|
|
500
499
|
exclude,
|
|
501
|
-
formidableOptions
|
|
500
|
+
formidableOptions: {
|
|
501
|
+
multiples: true,
|
|
502
|
+
...formidableOptions
|
|
503
|
+
}
|
|
502
504
|
});
|
|
503
505
|
middlewares.use(middleware);
|
|
504
506
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ interface MockOptionsItem {
|
|
|
114
114
|
validator?: Partial<ResponseReq> | ((request: ResponseReq) => boolean);
|
|
115
115
|
}
|
|
116
116
|
type MockOptions = MockOptionsItem[];
|
|
117
|
+
type FormidableFile = formidable.File | formidable.File[];
|
|
117
118
|
|
|
118
119
|
declare function mockDevServerPlugin({ include, exclude, formidableOptions, }?: MockServerPluginOptions): Plugin;
|
|
119
120
|
|
|
@@ -135,4 +136,4 @@ declare function mockDevServerPlugin({ include, exclude, formidableOptions, }?:
|
|
|
135
136
|
declare function defineMock(config: MockOptionsItem): MockOptionsItem;
|
|
136
137
|
declare function defineMock(config: MockOptions): MockOptions;
|
|
137
138
|
|
|
138
|
-
export { MockOptions, MockOptionsItem, MockServerPluginOptions, mockDevServerPlugin as default, defineMock, mockDevServerPlugin };
|
|
139
|
+
export { FormidableFile, MockOptions, MockOptionsItem, MockServerPluginOptions, mockDevServerPlugin as default, defineMock, mockDevServerPlugin };
|
package/dist/index.js
CHANGED
|
@@ -447,7 +447,6 @@ function mockDevServerPlugin({
|
|
|
447
447
|
exclude = [
|
|
448
448
|
"**/node_modules/**",
|
|
449
449
|
"**/test/**",
|
|
450
|
-
"**/cypress/**",
|
|
451
450
|
"src/**",
|
|
452
451
|
"**/.vscode/**",
|
|
453
452
|
"**/.git/**",
|
|
@@ -463,7 +462,10 @@ function mockDevServerPlugin({
|
|
|
463
462
|
const middleware = await mockServerMiddleware(httpServer, config, {
|
|
464
463
|
include,
|
|
465
464
|
exclude,
|
|
466
|
-
formidableOptions
|
|
465
|
+
formidableOptions: {
|
|
466
|
+
multiples: true,
|
|
467
|
+
...formidableOptions
|
|
468
|
+
}
|
|
467
469
|
});
|
|
468
470
|
middlewares.use(middleware);
|
|
469
471
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-mock-dev-server",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.3.14",
|
|
5
|
+
"packageManager": "pnpm@7.18.2",
|
|
6
|
+
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo)",
|
|
7
|
+
"license": "GPL-3.0",
|
|
8
|
+
"homepage": "https://vite-plugin-mock-dev-server.netlify.app",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/pengzhanbo/vite-plugin-mock-dev-server"
|
|
12
|
+
},
|
|
4
13
|
"keywords": [
|
|
5
14
|
"vite",
|
|
6
15
|
"plugin",
|
|
@@ -8,26 +17,21 @@
|
|
|
8
17
|
"mock",
|
|
9
18
|
"mock-server"
|
|
10
19
|
],
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/pengzhanbo/vite-plugin-mock-dev-server"
|
|
14
|
-
},
|
|
15
|
-
"homepage": "https://vite-plugin-mock-dev-server.netlify.app",
|
|
16
|
-
"author": "pengzhanbo <q942450674@outlook.com> (https://github.com/pengzhanbo)",
|
|
17
|
-
"license": "GPL-3.0",
|
|
18
|
-
"type": "module",
|
|
19
|
-
"main": "dist/index.cjs",
|
|
20
|
-
"module": "dist/index.js",
|
|
21
|
-
"types": "dist/index.d.ts",
|
|
22
20
|
"exports": {
|
|
23
21
|
".": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
22
|
+
"require": "./dist/index.cjs",
|
|
23
|
+
"import": "./dist/index.js"
|
|
26
24
|
}
|
|
27
25
|
},
|
|
26
|
+
"main": "dist/index.cjs",
|
|
27
|
+
"module": "dist/index.js",
|
|
28
|
+
"types": "dist/index.d.ts",
|
|
28
29
|
"files": [
|
|
29
30
|
"dist"
|
|
30
31
|
],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": "^14.18.0 || >=16"
|
|
34
|
+
},
|
|
31
35
|
"tsup": {
|
|
32
36
|
"entry": [
|
|
33
37
|
"src/index.ts"
|
|
@@ -42,6 +46,9 @@
|
|
|
42
46
|
]
|
|
43
47
|
},
|
|
44
48
|
"prettier": "@pengzhanbo/prettier-config",
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"vite": ">=3.0.0"
|
|
51
|
+
},
|
|
45
52
|
"dependencies": {
|
|
46
53
|
"@rollup/pluginutils": "^5.0.2",
|
|
47
54
|
"chokidar": "^3.5.3",
|
|
@@ -54,14 +61,14 @@
|
|
|
54
61
|
"path-to-regexp": "^6.2.1"
|
|
55
62
|
},
|
|
56
63
|
"devDependencies": {
|
|
57
|
-
"@pengzhanbo/eslint-config-ts": "^0.
|
|
58
|
-
"@pengzhanbo/prettier-config": "^0.
|
|
64
|
+
"@pengzhanbo/eslint-config-ts": "^0.3.1",
|
|
65
|
+
"@pengzhanbo/prettier-config": "^0.3.1",
|
|
59
66
|
"@types/co-body": "^6.1.0",
|
|
60
67
|
"@types/debug": "^4.1.7",
|
|
61
68
|
"@types/formidable": "^2.0.5",
|
|
62
69
|
"@types/node": "^18.11.7",
|
|
63
70
|
"bumpp": "^8.2.1",
|
|
64
|
-
"eslint": "^8.
|
|
71
|
+
"eslint": "^8.31.0",
|
|
65
72
|
"mockjs": "^1.1.0",
|
|
66
73
|
"prettier": "^2.8.1",
|
|
67
74
|
"tsup": "^6.5.0",
|
|
@@ -71,19 +78,13 @@
|
|
|
71
78
|
"vitepress": "1.0.0-alpha.32",
|
|
72
79
|
"vue": "^3.2.45"
|
|
73
80
|
},
|
|
74
|
-
"peerDependencies": {
|
|
75
|
-
"vite": ">=3.0.0"
|
|
76
|
-
},
|
|
77
|
-
"packageManager": "pnpm@7.18.2",
|
|
78
|
-
"engines": {
|
|
79
|
-
"node": "^14.18.0 || >=16"
|
|
80
|
-
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"dev": "DEBUG=vite:plugin-mock-dev-server vite example --config ./example/vite.config.ts",
|
|
83
83
|
"build": "tsup",
|
|
84
84
|
"docs:dev": "vitepress dev docs",
|
|
85
85
|
"docs:build": "vitepress build docs",
|
|
86
86
|
"docs:preview": "vitepress preview docs",
|
|
87
|
+
"lint": "eslint .",
|
|
87
88
|
"release": "bumpp package.json --commit --push --tag && pnpm publish --access public"
|
|
88
89
|
}
|
|
89
90
|
}
|