@next-core/brick-utils 2.51.0 → 2.51.1

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
@@ -18259,10 +18259,21 @@ function getDllAndDepsByResource(_ref, brickPackages) {
18259
18259
  var v3Processors = new Set();
18260
18260
  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) {
18261
18261
  var brickMap = getBrickToPackageMap(brickPackages);
18262
+ var v3DefinedBricks = new Set();
18263
+ for (var pkg of brickPackages) {
18264
+ var {
18265
+ id,
18266
+ elements
18267
+ } = pkg;
18268
+ if (id && elements !== null && elements !== void 0 && elements.length) {
18269
+ for (var element of elements) {
18270
+ v3DefinedBricks.add(element);
18271
+ }
18272
+ }
18273
+ }
18262
18274
  [...(bricks !== null && bricks !== void 0 ? bricks : []).map(n => [n]), ...(processors !== null && processors !== void 0 ? processors : []).map(n => [n, true])].forEach(_ref2 => {
18263
18275
  var [name, isProcessor] = _ref2;
18264
18276
  // ignore custom template
18265
- // istanbul ignore else
18266
18277
  if (name.includes(".")) {
18267
18278
  var namespace = name.split(".")[0];
18268
18279
  // processor 是 camelCase 格式,转成 brick 的 param-case 格式,统一去判断
@@ -18285,6 +18296,8 @@ function getDllAndDepsByResource(_ref, brickPackages) {
18285
18296
  // eslint-disable-next-line no-console
18286
18297
  console.error("".concat(isProcessor ? "Processor" : "Brick", " `").concat(name, "` does not match any brick package"));
18287
18298
  }
18299
+ } else if (!name.startsWith("tpl-") && v3DefinedBricks.has(name)) {
18300
+ v3Bricks.add(name);
18288
18301
  }
18289
18302
  });
18290
18303
  editorBricks === null || editorBricks === void 0 ? void 0 : editorBricks.forEach(editor => {