@builder-builder/builder 0.0.16 → 0.0.17

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.
@@ -1,5 +1,5 @@
1
1
  import { check } from '../check.js';
2
- import { BuilderModelSerialisedSchema, BuilderUIInputMetadataSchema, BuilderUISerialisedSchema, serialise, uis } from '../entities/index.js';
2
+ import { BuilderModelSerialisedSchema, BuilderUIInputMetadataSchema, BuilderUISerialisedSchema, modelsMerge, serialise, uis } from '../entities/index.js';
3
3
  import { validate } from './brand.js';
4
4
  import { BuilderValidateErrors } from './errors.js';
5
5
  import { checkExpectations } from './expectations.js';
@@ -119,11 +119,10 @@ export function checkUIExpectations(mergedModel, ui, errors) {
119
119
  return;
120
120
  }
121
121
  const innerModels = collectionConfigs(collection).flatMap(({ model: configModel }) => check.is(BuilderModelSerialisedSchema, configModel) ? [configModel] : []);
122
- if (innerModels.length === 0) {
123
- return;
124
- }
125
- const [firstInnerModel] = innerModels;
126
- errors.scope('items', () => walkItems(firstInnerModel, pages.items));
122
+ innerModels.forEach((innerModel) => {
123
+ const mergedInnerModel = modelsMerge(innerModel);
124
+ errors.scope('items', () => walkItems(mergedInnerModel, pages.items));
125
+ });
127
126
  }
128
127
  function walkInput(model, input) {
129
128
  const path = input.path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder-builder/builder",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {