@tinacms/schema-tools 1.4.14 → 1.4.16

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
@@ -232,9 +232,10 @@
232
232
  this.getCollectionByFullPath = (filepath) => {
233
233
  const fileExtension = filepath.split(".").pop();
234
234
  const normalizedPath = filepath.replace(/\\/g, "/");
235
+ const isGitKeep = normalizedPath.endsWith(".gitkeep");
235
236
  const possibleCollections = this.getCollections().filter((collection) => {
236
237
  var _a, _b;
237
- if (fileExtension !== (collection.format || "md")) {
238
+ if (!isGitKeep && fileExtension !== (collection.format || "md")) {
238
239
  return false;
239
240
  }
240
241
  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)) {
package/dist/index.mjs CHANGED
@@ -215,9 +215,10 @@ class TinaSchema {
215
215
  this.getCollectionByFullPath = (filepath) => {
216
216
  const fileExtension = filepath.split(".").pop();
217
217
  const normalizedPath = filepath.replace(/\\/g, "/");
218
+ const isGitKeep = normalizedPath.endsWith(".gitkeep");
218
219
  const possibleCollections = this.getCollections().filter((collection) => {
219
220
  var _a, _b;
220
- if (fileExtension !== (collection.format || "md")) {
221
+ if (!isGitKeep && fileExtension !== (collection.format || "md")) {
221
222
  return false;
222
223
  }
223
224
  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)) {
@@ -288,7 +288,10 @@ declare type TokenObject = {
288
288
  access_token?: string;
289
289
  refresh_token?: string;
290
290
  };
291
- export declare type LoginStrategy = 'UsernamePassword' | 'Redirect';
291
+ export declare type LoginStrategy = 'UsernamePassword' | 'Redirect' | 'LoginScreen';
292
+ export declare type LoginScreenProps = {
293
+ handleAuthenticate: (props?: Record<string, string>) => Promise<void>;
294
+ };
292
295
  export interface AuthProvider {
293
296
  /**
294
297
  * Used for getting the token from the custom auth provider
@@ -327,6 +330,7 @@ export interface AuthProvider {
327
330
  isAuthorized: (context?: any) => Promise<boolean>;
328
331
  isAuthenticated: () => Promise<boolean>;
329
332
  getLoginStrategy: () => LoginStrategy;
333
+ getLoginScreen: () => FC<LoginScreenProps> | null;
330
334
  getSessionProvider: () => FC<{
331
335
  basePath?: string;
332
336
  }>;
@@ -643,6 +647,7 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
643
647
  allowedActions?: {
644
648
  create?: boolean;
645
649
  delete?: boolean;
650
+ createNestedFolder?: boolean;
646
651
  };
647
652
  /**
648
653
  * Forms for this collection will be editable from the global sidebar rather than the form panel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/react": "17.0.2",
27
- "@tinacms/scripts": "1.1.3",
27
+ "@tinacms/scripts": "1.1.4",
28
28
  "@types/micromatch": "^4.0.2",
29
29
  "@types/yup": "^0.29.10",
30
30
  "jest": "^29.5.0",