@modern-js/plugin-proxy 2.20.0 → 2.21.0
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/CHANGELOG.md +14 -0
- package/dist/cjs/index.js +7 -5
- package/dist/esm/index.js +7 -5
- package/dist/types/index.d.ts +0 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @modern-js/plugin-proxy
|
|
2
2
|
|
|
3
|
+
## 2.21.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5424051: fix: the proxy should not recreated when exists
|
|
8
|
+
fix: proxy server 不应该被重新创建当存在时
|
|
9
|
+
- Updated dependencies [e81eeaf]
|
|
10
|
+
- Updated dependencies [26dcf3a]
|
|
11
|
+
- Updated dependencies [056627f]
|
|
12
|
+
- Updated dependencies [0fc15ca]
|
|
13
|
+
- Updated dependencies [43b4e83]
|
|
14
|
+
- Updated dependencies [ad78387]
|
|
15
|
+
- @modern-js/utils@2.21.0
|
|
16
|
+
|
|
3
17
|
## 2.20.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -26,11 +26,13 @@ const _default = () => {
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
const rule = (0, _createProxyRule.createProxyRule)(internalDirectory, dev.proxy);
|
|
29
|
-
proxyServer
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
if (!proxyServer) {
|
|
30
|
+
proxyServer = new _whistleProxy.default({
|
|
31
|
+
port: 8899,
|
|
32
|
+
rule
|
|
33
|
+
});
|
|
34
|
+
await proxyServer.start();
|
|
35
|
+
}
|
|
34
36
|
},
|
|
35
37
|
beforeExit() {
|
|
36
38
|
proxyServer === null || proxyServer === void 0 ? void 0 : proxyServer.close();
|
package/dist/esm/index.js
CHANGED
|
@@ -17,11 +17,13 @@ export default () => {
|
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
const rule = createProxyRule(internalDirectory, dev.proxy);
|
|
20
|
-
proxyServer
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
if (!proxyServer) {
|
|
21
|
+
proxyServer = new WhistleProxy({
|
|
22
|
+
port: 8899,
|
|
23
|
+
rule
|
|
24
|
+
});
|
|
25
|
+
await proxyServer.start();
|
|
26
|
+
}
|
|
25
27
|
},
|
|
26
28
|
beforeExit() {
|
|
27
29
|
proxyServer === null || proxyServer === void 0 ? void 0 : proxyServer.close();
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.21.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -36,16 +36,16 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"whistle": "^2.7.18",
|
|
38
38
|
"@swc/helpers": "0.5.1",
|
|
39
|
-
"@modern-js/utils": "2.
|
|
39
|
+
"@modern-js/utils": "2.21.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/jest": "^29",
|
|
43
43
|
"@types/node": "^14",
|
|
44
|
-
"typescript": "^
|
|
44
|
+
"typescript": "^5",
|
|
45
45
|
"jest": "^29",
|
|
46
|
-
"@modern-js/core": "2.
|
|
47
|
-
"@scripts/
|
|
48
|
-
"@scripts/
|
|
46
|
+
"@modern-js/core": "2.21.0",
|
|
47
|
+
"@scripts/jest-config": "2.21.0",
|
|
48
|
+
"@scripts/build": "2.21.0"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": false,
|
|
51
51
|
"publishConfig": {
|