@modern-js/plugin-proxy 2.39.2 → 2.41.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/dist/cjs/index.js
CHANGED
|
@@ -39,19 +39,6 @@ const proxyPlugin = () => {
|
|
|
39
39
|
return {
|
|
40
40
|
name: "@modern-js/plugin-proxy",
|
|
41
41
|
setup: (api) => ({
|
|
42
|
-
validateSchema() {
|
|
43
|
-
return [
|
|
44
|
-
{
|
|
45
|
-
target: "dev.proxy",
|
|
46
|
-
schema: {
|
|
47
|
-
typeof: [
|
|
48
|
-
"string",
|
|
49
|
-
"object"
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
];
|
|
54
|
-
},
|
|
55
42
|
async afterDev() {
|
|
56
43
|
const { dev } = api.useResolvedConfigContext();
|
|
57
44
|
const { internalDirectory } = api.useAppContext();
|
|
@@ -37,7 +37,8 @@ var import_utils = require("@modern-js/utils");
|
|
|
37
37
|
var import_execSync = __toESM(require("./execSync"));
|
|
38
38
|
var import_macCAManager = require("./macCAManager");
|
|
39
39
|
const { disableGlobalProxy, enableGlobalProxy } = require("./macProxyManager");
|
|
40
|
-
|
|
40
|
+
var WhistleProxy;
|
|
41
|
+
WhistleProxy = class WhistleProxy2 {
|
|
41
42
|
async installRootCA() {
|
|
42
43
|
try {
|
|
43
44
|
if (!(0, import_macCAManager.isRootCAExists)()) {
|
|
@@ -73,4 +74,4 @@ class WhistleProxy {
|
|
|
73
74
|
this.bin = import_path.default.resolve(import_path.default.dirname(require.resolve("whistle")), "bin/whistle.js");
|
|
74
75
|
this.certDir = import_path.default.dirname(import_macCAManager.defaultRootCA);
|
|
75
76
|
}
|
|
76
|
-
}
|
|
77
|
+
};
|
package/dist/esm/index.js
CHANGED
|
@@ -5,19 +5,6 @@ const proxyPlugin = () => {
|
|
|
5
5
|
return {
|
|
6
6
|
name: "@modern-js/plugin-proxy",
|
|
7
7
|
setup: (api) => ({
|
|
8
|
-
validateSchema() {
|
|
9
|
-
return [
|
|
10
|
-
{
|
|
11
|
-
target: "dev.proxy",
|
|
12
|
-
schema: {
|
|
13
|
-
typeof: [
|
|
14
|
-
"string",
|
|
15
|
-
"object"
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
];
|
|
20
|
-
},
|
|
21
8
|
async afterDev() {
|
|
22
9
|
const { dev } = api.useResolvedConfigContext();
|
|
23
10
|
const { internalDirectory } = api.useAppContext();
|
|
@@ -4,7 +4,8 @@ import { logger } from "@modern-js/utils";
|
|
|
4
4
|
import execSync from "./execSync";
|
|
5
5
|
import { isRootCAExists, generateRootCA, defaultRootCA, trustRootCA } from "./macCAManager";
|
|
6
6
|
const { disableGlobalProxy, enableGlobalProxy } = require("./macProxyManager");
|
|
7
|
-
|
|
7
|
+
var WhistleProxy;
|
|
8
|
+
WhistleProxy = class WhistleProxy2 {
|
|
8
9
|
async installRootCA() {
|
|
9
10
|
try {
|
|
10
11
|
if (!isRootCAExists()) {
|
|
@@ -40,7 +41,7 @@ class WhistleProxy {
|
|
|
40
41
|
this.bin = path.resolve(path.dirname(require.resolve("whistle")), "bin/whistle.js");
|
|
41
42
|
this.certDir = path.dirname(defaultRootCA);
|
|
42
43
|
}
|
|
43
|
-
}
|
|
44
|
+
};
|
|
44
45
|
export {
|
|
45
46
|
WhistleProxy as default
|
|
46
47
|
};
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.41.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"whistle": "^2.7.18",
|
|
38
|
-
"@swc/helpers": "0.5.
|
|
39
|
-
"@modern-js/utils": "2.
|
|
38
|
+
"@swc/helpers": "0.5.3",
|
|
39
|
+
"@modern-js/utils": "2.41.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/jest": "^29",
|
|
43
43
|
"@types/node": "^14",
|
|
44
44
|
"typescript": "^5",
|
|
45
45
|
"jest": "^29",
|
|
46
|
-
"@
|
|
47
|
-
"@scripts/jest-config": "2.
|
|
48
|
-
"@
|
|
46
|
+
"@modern-js/core": "2.41.0",
|
|
47
|
+
"@scripts/jest-config": "2.41.0",
|
|
48
|
+
"@scripts/build": "2.41.0"
|
|
49
49
|
},
|
|
50
50
|
"sideEffects": false,
|
|
51
51
|
"publishConfig": {
|