@bedrockio/model 0.5.3 → 0.5.4

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.
@@ -362,14 +362,16 @@ function createCacheFields(schema, definition) {
362
362
  for (let [cachedField, def] of Object.entries(definition.search.cache)) {
363
363
  // Fall back to string type for virtuals or not defined.
364
364
  const {
365
- type = 'String'
365
+ type = 'String',
366
+ path,
367
+ ...rest
366
368
  } = def;
367
369
  schema.add({
368
370
  [cachedField]: type
369
371
  });
370
372
  schema.obj[cachedField] = {
371
373
  type,
372
- readAccess: 'none'
374
+ ...rest
373
375
  };
374
376
  }
375
377
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bedrockio/model",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Bedrock utilities for model creation.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/search.js CHANGED
@@ -384,13 +384,14 @@ function validateSearchFields(schema, definition) {
384
384
  function createCacheFields(schema, definition) {
385
385
  for (let [cachedField, def] of Object.entries(definition.search.cache)) {
386
386
  // Fall back to string type for virtuals or not defined.
387
- const { type = 'String' } = def;
387
+ const { type = 'String', path, ...rest } = def;
388
+
388
389
  schema.add({
389
390
  [cachedField]: type,
390
391
  });
391
392
  schema.obj[cachedField] = {
392
393
  type,
393
- readAccess: 'none',
394
+ ...rest,
394
395
  };
395
396
  }
396
397
  }