@next-core/brick-utils 2.45.22 → 2.46.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/index.esm.js CHANGED
@@ -18220,25 +18220,30 @@ function getDllAndDepsByResource(_ref, brickPackages) {
18220
18220
  } = _ref;
18221
18221
  var dll = new Set();
18222
18222
  var deps = new Set();
18223
+ var v3Bricks = new Set();
18224
+ var v3Processors = new Set();
18223
18225
  if ((bricks === null || bricks === void 0 ? void 0 : bricks.length) > 0 || (processors === null || processors === void 0 ? void 0 : processors.length) > 0 || (editorBricks === null || editorBricks === void 0 ? void 0 : editorBricks.length) > 0) {
18224
18226
  var brickMap = getBrickToPackageMap(brickPackages);
18225
- [...(bricks !== null && bricks !== void 0 ? bricks : []), ...(processors !== null && processors !== void 0 ? processors : [])].forEach(name => {
18227
+ [...(bricks !== null && bricks !== void 0 ? bricks : []).map(n => [n]), ...(processors !== null && processors !== void 0 ? processors : []).map(n => [n, true])].forEach(_ref2 => {
18228
+ var [name, isProcessor] = _ref2;
18226
18229
  // ignore custom template
18227
18230
  // istanbul ignore else
18228
18231
  if (name.includes(".")) {
18229
18232
  var namespace = name.split(".")[0];
18230
- var isProcessor = processors === null || processors === void 0 ? void 0 : processors.includes(name);
18231
-
18232
18233
  // processor 是 camelCase 格式,转成 brick 的 param-case 格式,统一去判断
18233
18234
  if (isProcessor) {
18234
18235
  namespace = paramCase(namespace);
18235
18236
  }
18236
18237
  var find = brickMap.get(namespace);
18237
18238
  if (find) {
18238
- deps.add(find.filePath);
18239
- if (find.dll) {
18240
- for (var dllName of find.dll) {
18241
- dll.add(dllName);
18239
+ if (find.id) {
18240
+ (isProcessor ? v3Processors : v3Bricks).add(name);
18241
+ } else {
18242
+ deps.add(find.filePath);
18243
+ if (find.dll) {
18244
+ for (var dllName of find.dll) {
18245
+ dll.add(dllName);
18246
+ }
18242
18247
  }
18243
18248
  }
18244
18249
  } else {
@@ -18269,7 +18274,9 @@ function getDllAndDepsByResource(_ref, brickPackages) {
18269
18274
  var dllPath = window.DLL_PATH;
18270
18275
  return {
18271
18276
  dll: Array.from(dll).map(dllName => dllPath[dllName]),
18272
- deps: Array.from(deps)
18277
+ deps: Array.from(deps),
18278
+ v3Bricks: Array.from(v3Bricks),
18279
+ v3Processors: Array.from(v3Processors)
18273
18280
  };
18274
18281
  }
18275
18282