next-tinacms-cloudinary 3.5.32 → 3.5.33
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.
|
@@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
-
import { Media, MediaList, MediaListOptions, MediaStore, MediaUploadOptions } from '@tinacms/toolkit';
|
|
13
|
+
import type { Media, MediaList, MediaListOptions, MediaStore, MediaUploadOptions } from '@tinacms/toolkit';
|
|
14
14
|
export declare class CloudinaryMediaStore implements MediaStore {
|
|
15
15
|
fetchFunction: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
|
|
16
16
|
accept: string;
|
|
@@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
|
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
13
|
import { CloudinaryMediaStore } from './cloudinary-media-store';
|
|
14
|
-
import { Client } from 'tinacms';
|
|
14
|
+
import type { Client } from 'tinacms';
|
|
15
15
|
export declare class TinaCloudCloudinaryMediaStore extends CloudinaryMediaStore {
|
|
16
16
|
client: Client;
|
|
17
17
|
constructor(client: Client);
|
package/dist/errors.d.ts
CHANGED
|
@@ -10,10 +10,21 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
10
10
|
See the License for the specific language governing permissions and
|
|
11
11
|
limitations under the License.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
interface MediaListErrorConfig {
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
docsLink: string;
|
|
17
|
+
}
|
|
18
|
+
declare class MediaListError extends Error {
|
|
19
|
+
ERR_TYPE: string;
|
|
20
|
+
title: string;
|
|
21
|
+
docsLink: string;
|
|
22
|
+
constructor(config: MediaListErrorConfig);
|
|
23
|
+
}
|
|
14
24
|
export declare const E_DEFAULT: MediaListError;
|
|
15
25
|
export declare const E_UNAUTHORIZED: MediaListError;
|
|
16
26
|
export declare const E_CONFIG: MediaListError;
|
|
17
27
|
export declare const E_KEY_FAIL: MediaListError;
|
|
18
28
|
export declare const E_BAD_ROUTE: MediaListError;
|
|
19
29
|
export declare const interpretErrorMessage: (message: string) => MediaListError;
|
|
30
|
+
export {};
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
class MediaListError extends Error {
|
|
2
|
+
constructor(config) {
|
|
3
|
+
super(config.message);
|
|
4
|
+
this.ERR_TYPE = "MediaListError";
|
|
5
|
+
this.title = config.title;
|
|
6
|
+
this.docsLink = config.docsLink;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
2
9
|
const E_DEFAULT = new MediaListError({
|
|
3
10
|
title: "An Error Occurred",
|
|
4
11
|
message: "Something went wrong fetching your media from Cloudinary.",
|
package/dist/index.js
CHANGED
|
@@ -1,28 +1,36 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports
|
|
3
|
-
})(this, function(exports2
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["next-tinacms-cloudinary"] = {}));
|
|
3
|
+
})(this, function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
|
-
|
|
5
|
+
class MediaListError extends Error {
|
|
6
|
+
constructor(config) {
|
|
7
|
+
super(config.message);
|
|
8
|
+
this.ERR_TYPE = "MediaListError";
|
|
9
|
+
this.title = config.title;
|
|
10
|
+
this.docsLink = config.docsLink;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const E_DEFAULT = new MediaListError({
|
|
6
14
|
title: "An Error Occurred",
|
|
7
15
|
message: "Something went wrong fetching your media from Cloudinary.",
|
|
8
16
|
docsLink: "https://tina.io/packages/next-tinacms-cloudinary"
|
|
9
17
|
});
|
|
10
|
-
const E_UNAUTHORIZED = new
|
|
18
|
+
const E_UNAUTHORIZED = new MediaListError({
|
|
11
19
|
title: "Unauthorized",
|
|
12
20
|
message: "You don't have access to this resource.",
|
|
13
21
|
docsLink: "https://tina.io/packages/next-tinacms-cloudinary"
|
|
14
22
|
});
|
|
15
|
-
const E_CONFIG = new
|
|
23
|
+
const E_CONFIG = new MediaListError({
|
|
16
24
|
title: "Missing Credentials",
|
|
17
25
|
message: "Unable to connect to Cloudinary because one or more environment variables are missing.",
|
|
18
26
|
docsLink: "https://tina.io/docs/media-cloudinary/"
|
|
19
27
|
});
|
|
20
|
-
const E_KEY_FAIL = new
|
|
28
|
+
const E_KEY_FAIL = new MediaListError({
|
|
21
29
|
title: "Bad Credentials",
|
|
22
30
|
message: "Unable to connect to Cloudinary because one or more environment variables are misconfigured.",
|
|
23
31
|
docsLink: "https://tina.io/docs/media-cloudinary/"
|
|
24
32
|
});
|
|
25
|
-
const E_BAD_ROUTE = new
|
|
33
|
+
const E_BAD_ROUTE = new MediaListError({
|
|
26
34
|
title: "Bad Route",
|
|
27
35
|
message: "The Cloudinary API route is missing or misconfigured.",
|
|
28
36
|
docsLink: "https://tina.io/packages/next-tinacms-cloudinary/#set-up-api-routes"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-tinacms-cloudinary",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.33",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -21,25 +21,16 @@
|
|
|
21
21
|
"multer": "1.4.5-lts.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@tinacms/toolkit": "0.58.
|
|
25
|
-
"@tinacms/scripts": "0.51.
|
|
24
|
+
"@tinacms/toolkit": "0.58.1",
|
|
25
|
+
"@tinacms/scripts": "0.51.3",
|
|
26
26
|
"@types/crypto-js": "^3.1.47",
|
|
27
27
|
"@types/js-cookie": "^2.2.6",
|
|
28
28
|
"@types/node": "^13.13.1",
|
|
29
|
-
"@types/react": "^16.9.43",
|
|
30
29
|
"next": "12.2.4",
|
|
31
|
-
"
|
|
32
|
-
"react-dom": "17.0.2",
|
|
33
|
-
"tinacms": "0.69.17",
|
|
30
|
+
"tinacms": "0.69.18",
|
|
34
31
|
"typescript": "4.3.5"
|
|
35
32
|
},
|
|
36
|
-
"peerDependencies": {
|
|
37
|
-
"@tinacms/toolkit": "*",
|
|
38
|
-
"react": ">=16.14",
|
|
39
|
-
"react-dom": ">=16.14",
|
|
40
|
-
"react-is": "^16.13.1 || <18.0.0",
|
|
41
|
-
"tinacms": ">=0.50.0"
|
|
42
|
-
},
|
|
33
|
+
"peerDependencies": {},
|
|
43
34
|
"publishConfig": {
|
|
44
35
|
"registry": "https://registry.npmjs.org"
|
|
45
36
|
},
|