@next-core/brick-container 3.14.7 → 3.14.9
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/core.7e1fdc28.js +2 -0
- package/dist/core.7e1fdc28.js.map +1 -0
- package/dist/index.html +1 -1
- package/dist/{main.8e603e45.js → main.cc252660.js} +2 -2
- package/dist/{main.8e603e45.js.map → main.cc252660.js.map} +1 -1
- package/dist/polyfill.1b9b3fbe.js +1 -0
- package/dist/preview/core.d384b331.js +1 -0
- package/dist/preview/core.d384b331.js.map +1 -0
- package/dist/preview/index.html +1 -1
- package/dist/preview/main.85c6ea50.js +1 -0
- package/dist/preview/{main.8652731f.js.map → main.85c6ea50.js.map} +1 -1
- package/dist/preview/{vendors.5bc6d4f6.js → vendors.20361c41.js} +2 -2
- package/dist/{vendors.a88259a4.js → vendors.590ce027.js} +2 -2
- package/package.json +13 -13
- package/serve/getProxy.js +22 -11
- package/serve/utils/getProcessedPublicDeps.js +11 -0
- package/dist/core.9fe4973c.js +0 -2
- package/dist/core.9fe4973c.js.map +0 -1
- package/dist/polyfill.1fb767e7.js +0 -1
- package/dist/preview/core.92f34c54.js +0 -1
- package/dist/preview/core.92f34c54.js.map +0 -1
- package/dist/preview/main.8652731f.js +0 -1
- /package/dist/preview/{vendors.5bc6d4f6.js.LICENSE.txt → vendors.20361c41.js.LICENSE.txt} +0 -0
- /package/dist/{vendors.a88259a4.js.LICENSE.txt → vendors.590ce027.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-core/brick-container",
|
|
3
|
-
"version": "3.14.
|
|
3
|
+
"version": "3.14.9",
|
|
4
4
|
"description": "Brick Container Server",
|
|
5
5
|
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/brick-container",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"chalk": "^4.1.2",
|
|
40
40
|
"chokidar": "^3.6.0",
|
|
41
41
|
"compression": "^1.7.4",
|
|
42
|
-
"express": "^4.
|
|
42
|
+
"express": "^4.19.2",
|
|
43
43
|
"glob": "^8.1.0",
|
|
44
44
|
"http-proxy-middleware": "^2.0.6",
|
|
45
45
|
"js-yaml": "^3.14.1",
|
|
@@ -51,27 +51,27 @@
|
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@next-api-sdk/api-gateway-sdk": "^1.1.0",
|
|
53
53
|
"@next-api-sdk/micro-app-standalone-sdk": "^1.1.0",
|
|
54
|
-
"@next-core/build-next-bricks": "^1.20.
|
|
55
|
-
"@next-core/easyops-runtime": "^0.7.
|
|
56
|
-
"@next-core/http": "^1.1.
|
|
57
|
-
"@next-core/i18n": "^1.0.
|
|
58
|
-
"@next-core/loader": "^1.5.
|
|
59
|
-
"@next-core/preview": "^0.2.
|
|
60
|
-
"@next-core/runtime": "^1.38.
|
|
61
|
-
"@next-core/test-next": "^1.0.
|
|
54
|
+
"@next-core/build-next-bricks": "^1.20.8",
|
|
55
|
+
"@next-core/easyops-runtime": "^0.7.25",
|
|
56
|
+
"@next-core/http": "^1.1.11",
|
|
57
|
+
"@next-core/i18n": "^1.0.41",
|
|
58
|
+
"@next-core/loader": "^1.5.6",
|
|
59
|
+
"@next-core/preview": "^0.2.96",
|
|
60
|
+
"@next-core/runtime": "^1.38.3",
|
|
61
|
+
"@next-core/test-next": "^1.0.17",
|
|
62
62
|
"@next-core/theme": "^1.5.0",
|
|
63
63
|
"@next-core/types": "^1.9.0",
|
|
64
64
|
"broadcast-channel": "^7.0.0",
|
|
65
65
|
"copy-webpack-plugin": "^12.0.2",
|
|
66
|
-
"core-js": "^3.36.
|
|
66
|
+
"core-js": "^3.36.1",
|
|
67
67
|
"html-webpack-plugin": "^5.6.0",
|
|
68
68
|
"regenerator-runtime": "^0.14.1",
|
|
69
|
-
"webpack-dev-server": "^5.0.
|
|
69
|
+
"webpack-dev-server": "^5.0.4"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@next-core/http": "*",
|
|
73
73
|
"@next-core/runtime": "*",
|
|
74
74
|
"@next-core/utils": "*"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "3f81b0ed1f512bbd53b7676ed24b03541b6144b2"
|
|
77
77
|
}
|
package/serve/getProxy.js
CHANGED
|
@@ -5,6 +5,7 @@ import { getBrickPackages } from "@next-core/serve-helpers";
|
|
|
5
5
|
import { getStoryboards } from "./utils/getStoryboards.js";
|
|
6
6
|
import { fixV2Storyboard } from "./utils/fixV2Storyboard.js";
|
|
7
7
|
import { injectIndexHtml } from "./utils/injectIndexHtml.js";
|
|
8
|
+
import { getProcessedPublicDeps } from "./utils/getProcessedPublicDeps.js";
|
|
8
9
|
import { concatBrickPackages } from "./utils/concatBrickPackages.js";
|
|
9
10
|
|
|
10
11
|
const { safeDump, JSON_SCHEMA } = jsYaml;
|
|
@@ -233,16 +234,10 @@ export default function getProxy(env, getRawIndexHtml) {
|
|
|
233
234
|
)?.[1];
|
|
234
235
|
|
|
235
236
|
if (publicDeps && localBricks?.length) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
);
|
|
241
|
-
|
|
242
|
-
publicDeps = JSON.stringify(parsedPublicDeps);
|
|
243
|
-
} catch (_err) {
|
|
244
|
-
console.error(`JSON.parse() error: ${publicDeps}`);
|
|
245
|
-
}
|
|
237
|
+
publicDeps = getProcessedPublicDeps(
|
|
238
|
+
publicDeps,
|
|
239
|
+
localBricks
|
|
240
|
+
);
|
|
246
241
|
}
|
|
247
242
|
|
|
248
243
|
const appRootTpl = content.match(
|
|
@@ -320,7 +315,23 @@ export default function getProxy(env, getRawIndexHtml) {
|
|
|
320
315
|
}
|
|
321
316
|
return injectIndexHtml(env, rawIndexHtml);
|
|
322
317
|
} else if (baseHref !== "/next/") {
|
|
323
|
-
|
|
318
|
+
let htmlContent = content.replaceAll("/next/", baseHref);
|
|
319
|
+
|
|
320
|
+
const publicDeps = htmlContent.match(
|
|
321
|
+
/\bw\.PUBLIC_DEPS\s*=\s*(\[[^;]*\])\s*;/
|
|
322
|
+
)?.[1];
|
|
323
|
+
|
|
324
|
+
if (publicDeps && localBricks?.length) {
|
|
325
|
+
htmlContent = htmlContent.replace(
|
|
326
|
+
/\bw\.PUBLIC_DEPS\s*=\s*\[[^;]*\]\s*;/,
|
|
327
|
+
`w.PUBLIC_DEPS=${getProcessedPublicDeps(
|
|
328
|
+
publicDeps,
|
|
329
|
+
localBricks
|
|
330
|
+
)};`
|
|
331
|
+
);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
return htmlContent;
|
|
324
335
|
}
|
|
325
336
|
}
|
|
326
337
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function getProcessedPublicDeps(publicDepsStr, localBrickPackages) {
|
|
2
|
+
try {
|
|
3
|
+
const parsedPublicDeps = JSON.parse(publicDepsStr).filter(
|
|
4
|
+
(item) => !localBrickPackages.includes(item.filePath.split("/")[1])
|
|
5
|
+
);
|
|
6
|
+
|
|
7
|
+
return JSON.stringify(parsedPublicDeps);
|
|
8
|
+
} catch (_err) {
|
|
9
|
+
console.error(`JSON.parse() error: ${publicDepsStr}`);
|
|
10
|
+
}
|
|
11
|
+
}
|