next-tinacms-s3 8.0.2 → 9.0.0
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/handlers.js +8 -8
- package/package.json +3 -3
package/dist/handlers.js
CHANGED
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
21
25
|
mod
|
|
22
26
|
));
|
|
@@ -113,8 +117,7 @@ async function listMedia(req, res, client, bucket, mediaRoot, cdnUrl) {
|
|
|
113
117
|
offset
|
|
114
118
|
} = req.query;
|
|
115
119
|
let prefix = directory.replace(/^\//, "").replace(/\/$/, "");
|
|
116
|
-
if (prefix)
|
|
117
|
-
prefix = prefix + "/";
|
|
120
|
+
if (prefix) prefix = prefix + "/";
|
|
118
121
|
const params = {
|
|
119
122
|
Bucket: bucket,
|
|
120
123
|
Delimiter: "/",
|
|
@@ -156,12 +159,9 @@ async function listMedia(req, res, client, bucket, mediaRoot, cdnUrl) {
|
|
|
156
159
|
}
|
|
157
160
|
}
|
|
158
161
|
var findErrorMessage = (e) => {
|
|
159
|
-
if (typeof e == "string")
|
|
160
|
-
|
|
161
|
-
if (e.message)
|
|
162
|
-
return e.message;
|
|
163
|
-
if (e.error && e.error.message)
|
|
164
|
-
return e.error.message;
|
|
162
|
+
if (typeof e == "string") return e;
|
|
163
|
+
if (e.message) return e.message;
|
|
164
|
+
if (e.error && e.error.message) return e.error.message;
|
|
165
165
|
return "an error occurred";
|
|
166
166
|
};
|
|
167
167
|
async function deleteAsset(req, res, client, bucket) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-tinacms-s3",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"files": [
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"react-dom": "^18.3.1",
|
|
28
28
|
"typescript": "^5.6.3",
|
|
29
29
|
"@tinacms/scripts": "1.3.1",
|
|
30
|
-
"tinacms": "2.
|
|
30
|
+
"tinacms": "2.6.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"tinacms": "2.
|
|
33
|
+
"tinacms": "2.6.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"registry": "https://registry.npmjs.org"
|