@tinacms/schema-tools 0.0.0-20230821165821 → 0.0.0-20230822160927

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.js CHANGED
@@ -238,7 +238,7 @@
238
238
  }
239
239
  if (((_a = collection == null ? void 0 : collection.match) == null ? void 0 : _a.include) || ((_b = collection == null ? void 0 : collection.match) == null ? void 0 : _b.exclude)) {
240
240
  const matches = this.getMatches({ collection });
241
- const match = picomatch([filepath], matches).length > 0;
241
+ const match = picomatch.isMatch(filepath, matches);
242
242
  if (!match) {
243
243
  return false;
244
244
  }
package/dist/index.mjs CHANGED
@@ -221,7 +221,7 @@ class TinaSchema {
221
221
  }
222
222
  if (((_a = collection == null ? void 0 : collection.match) == null ? void 0 : _a.include) || ((_b = collection == null ? void 0 : collection.match) == null ? void 0 : _b.exclude)) {
223
223
  const matches = this.getMatches({ collection });
224
- const match = picomatch([filepath], matches).length > 0;
224
+ const match = picomatch.isMatch(filepath, matches);
225
225
  if (!match) {
226
226
  return false;
227
227
  }
@@ -643,7 +643,7 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
643
643
  router?: (args: {
644
644
  document: Document;
645
645
  collection: Collection<true>;
646
- }) => Promise<string | undefined>;
646
+ }) => Promise<string | undefined> | string | undefined;
647
647
  /**
648
648
  * This function is called before a document is created or updated. It can be used to modify the values that are saved to the CMS. It can also be used to perform side effects such as sending a notification or triggering a build.
649
649
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
- "version": "0.0.0-20230821165821",
3
+ "version": "0.0.0-20230822160927",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {