@next-core/brick-container 3.20.3-alpha.0 → 3.20.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-core/brick-container",
3
- "version": "3.20.3-alpha.0",
3
+ "version": "3.20.3",
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,8 +39,8 @@
39
39
  "body-parser": "^1.20.3",
40
40
  "chalk": "^4.1.2",
41
41
  "chokidar": "^4.0.1",
42
- "compression": "^1.7.4",
43
- "express": "^4.21.0",
42
+ "compression": "^1.7.5",
43
+ "express": "^4.21.1",
44
44
  "glob": "^8.1.0",
45
45
  "http-proxy-middleware": "^3.0.3",
46
46
  "js-yaml": "^3.14.1",
@@ -52,21 +52,21 @@
52
52
  "devDependencies": {
53
53
  "@next-api-sdk/api-gateway-sdk": "^1.2.2",
54
54
  "@next-api-sdk/micro-app-standalone-sdk": "^1.1.0",
55
- "@next-core/build-next-bricks": "^2.0.1-alpha.0",
56
- "@next-core/easyops-runtime": "^0.13.3-alpha.0",
57
- "@next-core/http": "^1.2.11-alpha.0",
58
- "@next-core/i18n": "^2.0.2-alpha.0",
59
- "@next-core/loader": "^1.6.14-alpha.0",
60
- "@next-core/preview": "^0.7.50-alpha.0",
61
- "@next-core/runtime": "^1.59.3-alpha.0",
62
- "@next-core/test-next": "^1.1.8-alpha.0",
55
+ "@next-core/build-next-bricks": "^1.23.10",
56
+ "@next-core/easyops-runtime": "^0.13.2",
57
+ "@next-core/http": "^1.2.11",
58
+ "@next-core/i18n": "^1.0.73",
59
+ "@next-core/loader": "^1.6.14",
60
+ "@next-core/preview": "^0.7.44",
61
+ "@next-core/runtime": "^1.59.1",
62
+ "@next-core/test-next": "^1.1.8",
63
63
  "@next-core/theme": "^1.5.4",
64
64
  "@next-core/types": "^1.14.0",
65
- "@next-core/utils": "^1.7.31-alpha.0",
65
+ "@next-core/utils": "^1.7.28",
66
66
  "broadcast-channel": "^7.0.0",
67
67
  "copy-webpack-plugin": "^12.0.2",
68
- "core-js": "^3.38.1",
69
- "html-webpack-plugin": "^5.6.0",
68
+ "core-js": "^3.40.0",
69
+ "html-webpack-plugin": "^5.6.3",
70
70
  "regenerator-runtime": "^0.14.1",
71
71
  "webpack-dev-server": "^5.1.0"
72
72
  },
@@ -75,5 +75,5 @@
75
75
  "@next-core/runtime": "*",
76
76
  "@next-core/utils": "*"
77
77
  },
78
- "gitHead": "af88ecf2d4d8d70793324fd9d6177718d4e7d417"
78
+ "gitHead": "e32f410e2c91b31197e0bdfe826795bacdeab80a"
79
79
  }
package/serve/getProxy.js CHANGED
@@ -290,7 +290,7 @@ export default function getProxy(env, getRawIndexHtml) {
290
290
  /\bw\.PUBLIC_DEPS\s*=\s*(\[[^;]*\])\s*;/
291
291
  )?.[1];
292
292
 
293
- if (publicDeps) {
293
+ if (publicDeps && localBricks?.length) {
294
294
  publicDeps = getProcessedPublicDeps(
295
295
  publicDeps,
296
296
  localBricks
@@ -382,7 +382,7 @@ export default function getProxy(env, getRawIndexHtml) {
382
382
  /\bw\.PUBLIC_DEPS\s*=\s*(\[[^;]*\])\s*;/
383
383
  )?.[1];
384
384
 
385
- if (publicDeps) {
385
+ if (publicDeps && localBricks?.length) {
386
386
  htmlContent = htmlContent.replace(
387
387
  /\bw\.PUBLIC_DEPS\s*=\s*\[[^;]*\]\s*;/,
388
388
  `w.PUBLIC_DEPS=${getProcessedPublicDeps(
@@ -9,7 +9,7 @@ export default function serveBricksWithVersions({ localBrickFolders }) {
9
9
  return async function (req, res, next) {
10
10
  if (
11
11
  req.method !== "GET" ||
12
- !/^\/[^/]+\/\d+\.\d+\.\d+(?:-\w+\.\d+)?\/dist\//.test(req.path)
12
+ !/^\/[^/]+\/\d+\.\d+\.\d+\/dist\//.test(req.path)
13
13
  ) {
14
14
  next();
15
15
  return;
@@ -1,9 +1,7 @@
1
1
  export function getProcessedPublicDeps(publicDepsStr, localBrickPackages) {
2
2
  try {
3
3
  const parsedPublicDeps = JSON.parse(publicDepsStr).filter(
4
- (item) =>
5
- localBrickPackages &&
6
- !localBrickPackages.includes(item.filePath.split("/")[1])
4
+ (item) => !localBrickPackages.includes(item.filePath.split("/")[1])
7
5
  );
8
6
 
9
7
  return JSON.stringify(parsedPublicDeps);