@firecms/core 3.0.0-canary.24 → 3.0.0-canary.26

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.
@@ -6,6 +6,7 @@ export interface UploadFileProps {
6
6
  fileName?: string;
7
7
  path?: string;
8
8
  metadata?: any;
9
+ bucket?: string;
9
10
  }
10
11
  /**
11
12
  * @group Models
@@ -15,6 +16,10 @@ export interface UploadFileResult {
15
16
  * Storage path including the file name where the file was uploaded.
16
17
  */
17
18
  path: string;
19
+ /**
20
+ * Bucket where the file was uploaded
21
+ */
22
+ bucket: string;
18
23
  }
19
24
  /**
20
25
  * @group Models
@@ -66,17 +71,20 @@ export interface StorageSource {
66
71
  * @param fileName
67
72
  * @param path
68
73
  * @param metadata
74
+ * @param bucket
69
75
  */
70
- uploadFile: ({ file, fileName, path, metadata }: UploadFileProps) => Promise<UploadFileResult>;
76
+ uploadFile: ({ file, fileName, path, metadata, bucket }: UploadFileProps) => Promise<UploadFileResult>;
71
77
  /**
72
78
  * Convert a storage path or URL into a download configuration
73
79
  * @param path
80
+ * @param bucket
74
81
  */
75
- getDownloadURL: (pathOrUrl: string) => Promise<DownloadConfig>;
82
+ getDownloadURL: (pathOrUrl: string, bucket?: string) => Promise<DownloadConfig>;
76
83
  /**
77
84
  * Get a file from a storage path.
78
85
  * It returns null if the file does not exist.
79
86
  * @param props
87
+ * @param bucket
80
88
  */
81
- getFile: (path: string) => Promise<File | null>;
89
+ getFile: (path: string, bucket?: string) => Promise<File | null>;
82
90
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@firecms/core",
3
3
  "type": "module",
4
- "version": "3.0.0-canary.24",
4
+ "version": "3.0.0-canary.26",
5
5
  "description": "Awesome Firebase/Firestore-based headless open-source CMS",
6
6
  "funding": {
7
7
  "url": "https://github.com/sponsors/firecmsco"
@@ -46,8 +46,8 @@
46
46
  "./package.json": "./package.json"
47
47
  },
48
48
  "dependencies": {
49
- "@firecms/formex": "^3.0.0-canary.24",
50
- "@firecms/ui": "^3.0.0-canary.24",
49
+ "@firecms/formex": "^3.0.0-canary.26",
50
+ "@firecms/ui": "^3.0.0-canary.26",
51
51
  "@fontsource/ibm-plex-mono": "^5.0.12",
52
52
  "@fontsource/roboto": "^5.0.12",
53
53
  "@hello-pangea/dnd": "^16.5.0",
@@ -115,7 +115,7 @@
115
115
  "dist",
116
116
  "src"
117
117
  ],
118
- "gitHead": "6f9c2573fa141b07ce215b105e8eeb5030fb2540",
118
+ "gitHead": "fd9ee7777a545e5d168a382aed101a7dc6577417",
119
119
  "publishConfig": {
120
120
  "access": "public"
121
121
  }
@@ -164,9 +164,7 @@ export function useBuildNavigationController<EC extends EntityCollection, UserTy
164
164
  return;
165
165
 
166
166
  try {
167
- console.debug("Refreshing navigation", {
168
- authController
169
- })
167
+
170
168
  const [resolvedCollections = [], resolvedViews, resolvedAdminViews = []] = await Promise.all([
171
169
  resolveCollections(collectionsProp, collectionPermissions, authController, dataSourceDelegate, injectCollections),
172
170
  resolveCMSViews(viewsProp, authController, dataSourceDelegate),
@@ -350,10 +348,6 @@ export function useBuildNavigationController<EC extends EntityCollection, UserTy
350
348
  return paths;
351
349
  }, [getCollectionFromIds]);
352
350
 
353
- console.debug("Navigation", {
354
- initialised,
355
- navigationLoading
356
- });
357
351
  return {
358
352
  collections: collectionsRef.current,
359
353
  views: viewsRef.current,
@@ -48,6 +48,8 @@ export const useBuildSideEntityController = (navigation: NavigationController,
48
48
  sideDialogsController.open(propsToSidePanel(panel, navigation, smallLayout))
49
49
  }, 1);
50
50
  }
51
+ } else {
52
+ console.warn("Location path is not a collection path");
51
53
  }
52
54
  initialised.current = true;
53
55
  }
@@ -6,6 +6,7 @@ export interface UploadFileProps {
6
6
  fileName?: string,
7
7
  path?: string,
8
8
  metadata?: any,
9
+ bucket?: string
9
10
  }
10
11
 
11
12
  /**
@@ -16,6 +17,10 @@ export interface UploadFileResult {
16
17
  * Storage path including the file name where the file was uploaded.
17
18
  */
18
19
  path: string;
20
+ /**
21
+ * Bucket where the file was uploaded
22
+ */
23
+ bucket: string;
19
24
  }
20
25
 
21
26
  /**
@@ -73,24 +78,28 @@ export interface StorageSource {
73
78
  * @param fileName
74
79
  * @param path
75
80
  * @param metadata
81
+ * @param bucket
76
82
  */
77
83
  uploadFile: ({
78
84
  file,
79
85
  fileName,
80
86
  path,
81
- metadata
87
+ metadata,
88
+ bucket
82
89
  }: UploadFileProps) => Promise<UploadFileResult>;
83
90
 
84
91
  /**
85
92
  * Convert a storage path or URL into a download configuration
86
93
  * @param path
94
+ * @param bucket
87
95
  */
88
- getDownloadURL: (pathOrUrl: string) => Promise<DownloadConfig>;
96
+ getDownloadURL: (pathOrUrl: string, bucket?: string) => Promise<DownloadConfig>;
89
97
 
90
98
  /**
91
99
  * Get a file from a storage path.
92
100
  * It returns null if the file does not exist.
93
101
  * @param props
102
+ * @param bucket
94
103
  */
95
- getFile: (path:string) => Promise<File | null>;
104
+ getFile: (path:string, bucket?: string) => Promise<File | null>;
96
105
  }