next-tinacms-cloudinary 0.0.0-ea204c9-20250318044256 → 0.0.0-eaa6ed5-20250729073245
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/README.md +1 -1
- package/dist/handlers.js +2 -3
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ Call `createMediaHandler` to set up routes and connect your instance of the Medi
|
|
|
92
92
|
|
|
93
93
|
Import `isAuthorized` from [`@tinacms/auth`](https://github.com/tinacms/tinacms/tree/main/packages/%40tinacms/auth).
|
|
94
94
|
|
|
95
|
-
The `authorized` key will make it so only authorized users within
|
|
95
|
+
The `authorized` key will make it so only authorized users within TinaCloud can upload and make media edits.
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
```
|
package/dist/handlers.js
CHANGED
|
@@ -91,7 +91,6 @@ async function uploadMedia(req, res) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
async function listMedia(req, res, opts) {
|
|
94
|
-
var _a;
|
|
95
94
|
try {
|
|
96
95
|
const mediaListOptions = {
|
|
97
96
|
directory: req.query.directory || '""',
|
|
@@ -122,14 +121,14 @@ async function listMedia(req, res, opts) {
|
|
|
122
121
|
try {
|
|
123
122
|
folderRes = await import_cloudinary.v2.api.folders(mediaListOptions.directory);
|
|
124
123
|
} catch (e) {
|
|
125
|
-
if (
|
|
124
|
+
if (e.error?.message.startsWith("Can't find folder with path")) {
|
|
126
125
|
} else {
|
|
127
126
|
console.error("Error getting folders");
|
|
128
127
|
console.error(e);
|
|
129
128
|
throw e;
|
|
130
129
|
}
|
|
131
130
|
}
|
|
132
|
-
if (folderRes
|
|
131
|
+
if (folderRes?.folders) {
|
|
133
132
|
folders = folderRes.folders.map(function(folder) {
|
|
134
133
|
"empty-repo/004";
|
|
135
134
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-tinacms-cloudinary",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-eaa6ed5-20250729073245",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"react": "^18.3.1",
|
|
30
30
|
"react-dom": "^18.3.1",
|
|
31
31
|
"typescript": "^5.7.3",
|
|
32
|
-
"@tinacms/scripts": "1.
|
|
33
|
-
"tinacms": "0.0.0-
|
|
32
|
+
"@tinacms/scripts": "1.4.0",
|
|
33
|
+
"tinacms": "0.0.0-eaa6ed5-20250729073245"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"tinacms": "0.0.0-
|
|
36
|
+
"tinacms": "0.0.0-eaa6ed5-20250729073245"
|
|
37
37
|
},
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"registry": "https://registry.npmjs.org"
|