next-tinacms-cloudinary 16.0.1 → 17.0.1

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 CHANGED
@@ -1,49 +1,15 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
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.
24
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
- mod
26
- ));
27
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
-
29
1
  // src/handlers.ts
30
- var handlers_exports = {};
31
- __export(handlers_exports, {
32
- createMediaHandler: () => createMediaHandler,
33
- mediaHandlerConfig: () => mediaHandlerConfig
34
- });
35
- module.exports = __toCommonJS(handlers_exports);
36
- var import_cloudinary = require("cloudinary");
37
- var import_path = __toESM(require("path"));
38
- var import_multer = __toESM(require("multer"));
39
- var import_util = require("util");
2
+ import { v2 as cloudinary } from "cloudinary";
3
+ import path from "path";
4
+ import multer from "multer";
5
+ import { promisify } from "util";
40
6
  var mediaHandlerConfig = {
41
7
  api: {
42
8
  bodyParser: false
43
9
  }
44
10
  };
45
11
  var createMediaHandler = (config, options) => {
46
- import_cloudinary.v2.config(Object.assign({ secure: true }, config));
12
+ cloudinary.config(Object.assign({ secure: true }, config));
47
13
  return async (req, res) => {
48
14
  const isAuthorized = await config.authorized(req, res);
49
15
  if (!isAuthorized) {
@@ -63,9 +29,9 @@ var createMediaHandler = (config, options) => {
63
29
  };
64
30
  };
65
31
  async function uploadMedia(req, res) {
66
- const upload = (0, import_util.promisify)(
67
- (0, import_multer.default)({
68
- storage: import_multer.default.diskStorage({
32
+ const upload = promisify(
33
+ multer({
34
+ storage: multer.diskStorage({
69
35
  // @ts-ignore
70
36
  directory: (req2, file, cb) => {
71
37
  cb(null, "/tmp");
@@ -79,7 +45,7 @@ async function uploadMedia(req, res) {
79
45
  await upload(req, res);
80
46
  const { directory } = req.body;
81
47
  try {
82
- const result = await import_cloudinary.v2.uploader.upload(req.file.path, {
48
+ const result = await cloudinary.uploader.upload(req.file.path, {
83
49
  folder: directory.replace(/^\//, ""),
84
50
  use_filename: true,
85
51
  overwrite: false,
@@ -100,13 +66,13 @@ async function listMedia(req, res, opts) {
100
66
  };
101
67
  const useRootDirectory = !mediaListOptions.directory || mediaListOptions.directory === "/" || mediaListOptions.directory === '""';
102
68
  const query = useRootDirectory ? 'folder=""' : `folder="${mediaListOptions.directory}"`;
103
- const response = await import_cloudinary.v2.search.expression(query).max_results(mediaListOptions.limit).next_cursor(mediaListOptions.offset).execute();
69
+ const response = await cloudinary.search.expression(query).max_results(mediaListOptions.limit).next_cursor(mediaListOptions.offset).execute();
104
70
  const files = response.resources.map(getCloudinaryToTinaFunc(opts));
105
- import_cloudinary.v2.api.folders = (directory = '""') => {
71
+ cloudinary.api.folders = (directory = '""') => {
106
72
  if (useRootDirectory) {
107
- return import_cloudinary.v2.api.root_folders();
73
+ return cloudinary.api.root_folders();
108
74
  } else {
109
- return import_cloudinary.v2.api.sub_folders(directory);
75
+ return cloudinary.api.sub_folders(directory);
110
76
  }
111
77
  };
112
78
  let folders = [];
@@ -119,7 +85,7 @@ async function listMedia(req, res, opts) {
119
85
  return;
120
86
  }
121
87
  try {
122
- folderRes = await import_cloudinary.v2.api.folders(mediaListOptions.directory);
88
+ folderRes = await cloudinary.api.folders(mediaListOptions.directory);
123
89
  } catch (e) {
124
90
  if (e.error?.message.startsWith("Can't find folder with path")) {
125
91
  } else {
@@ -134,8 +100,8 @@ async function listMedia(req, res, opts) {
134
100
  return {
135
101
  id: folder.path,
136
102
  type: "dir",
137
- filename: import_path.default.basename(folder.path),
138
- directory: import_path.default.dirname(folder.path)
103
+ filename: path.basename(folder.path),
104
+ directory: path.dirname(folder.path)
139
105
  };
140
106
  });
141
107
  }
@@ -159,7 +125,7 @@ var findErrorMessage = (e) => {
159
125
  async function deleteAsset(req, res) {
160
126
  const { media } = req.query;
161
127
  const [, public_id] = media;
162
- import_cloudinary.v2.uploader.destroy(public_id, {}, (err) => {
128
+ cloudinary.uploader.destroy(public_id, {}, (err) => {
163
129
  if (err) res.status(500);
164
130
  res.json({
165
131
  err,
@@ -174,8 +140,8 @@ function getCloudinaryToTinaFunc(opts) {
174
140
  useHttps = opts.useHttps;
175
141
  }
176
142
  const sel = useHttps ? "secure_url" : "url";
177
- const filename = import_path.default.basename(file.public_id);
178
- const directory = import_path.default.dirname(file.public_id);
143
+ const filename = path.basename(file.public_id);
144
+ const directory = path.dirname(file.public_id);
179
145
  return {
180
146
  id: file.public_id,
181
147
  filename,
@@ -203,8 +169,7 @@ function transformCloudinaryImage(url, transformations) {
203
169
  }
204
170
  return url;
205
171
  }
206
- // Annotate the CommonJS export names for ESM import in node:
207
- 0 && (module.exports = {
172
+ export {
208
173
  createMediaHandler,
209
174
  mediaHandlerConfig
210
- });
175
+ };
package/dist/index.js CHANGED
@@ -1,149 +1,146 @@
1
- (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("tinacms")) : typeof define === "function" && define.amd ? define(["exports", "tinacms"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["next-tinacms-cloudinary"] = {}, global.NOOP));
3
- })(this, function(exports2, tinacms) {
4
- "use strict";
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
- }
1
+ import { DEFAULT_MEDIA_UPLOAD_TYPES } from "tinacms";
2
+ class MediaListError extends Error {
3
+ constructor(config) {
4
+ super(config.message);
5
+ this.ERR_TYPE = "MediaListError";
6
+ this.title = config.title;
7
+ this.docsLink = config.docsLink;
12
8
  }
13
- const E_DEFAULT = new MediaListError({
14
- title: "An Error Occurred",
15
- message: "Something went wrong fetching your media from Cloudinary.",
16
- docsLink: "https://tina.io/docs/r/cloudinary"
17
- });
18
- const E_UNAUTHORIZED = new MediaListError({
19
- title: "Unauthorized",
20
- message: "You don't have access to this resource.",
21
- docsLink: "https://tina.io/docs/r/cloudinary"
22
- });
23
- const E_CONFIG = new MediaListError({
24
- title: "Missing Credentials",
25
- message: "Unable to connect to Cloudinary because one or more environment variables are missing.",
26
- docsLink: "https://tina.io/docs/r/cloudinary/"
27
- });
28
- const E_KEY_FAIL = new MediaListError({
29
- title: "Bad Credentials",
30
- message: "Unable to connect to Cloudinary because one or more environment variables are misconfigured.",
31
- docsLink: "https://tina.io/docs/r/cloudinary/"
32
- });
33
- const E_BAD_ROUTE = new MediaListError({
34
- title: "Bad Route",
35
- message: "The Cloudinary API route is missing or misconfigured.",
36
- docsLink: "https://tina.io/docs/r/cloudinary"
37
- });
38
- const interpretErrorMessage = (message) => {
39
- switch (message) {
40
- case "Must supply cloud_name":
41
- case "Must supply api_key":
42
- case "Must supply api_secret":
43
- return E_CONFIG;
44
- case "unknown api_key":
45
- return E_KEY_FAIL;
46
- default:
47
- return E_DEFAULT;
48
- }
49
- };
50
- class CloudinaryMediaStore {
51
- constructor(options) {
52
- this.fetchFunction = (input, init) => fetch(input, init);
53
- this.accept = tinacms.DEFAULT_MEDIA_UPLOAD_TYPES;
54
- this.parse = (img) => {
55
- return img.src;
9
+ }
10
+ const E_DEFAULT = new MediaListError({
11
+ title: "An Error Occurred",
12
+ message: "Something went wrong fetching your media from Cloudinary.",
13
+ docsLink: "https://tina.io/docs/r/cloudinary"
14
+ });
15
+ const E_UNAUTHORIZED = new MediaListError({
16
+ title: "Unauthorized",
17
+ message: "You don't have access to this resource.",
18
+ docsLink: "https://tina.io/docs/r/cloudinary"
19
+ });
20
+ const E_CONFIG = new MediaListError({
21
+ title: "Missing Credentials",
22
+ message: "Unable to connect to Cloudinary because one or more environment variables are missing.",
23
+ docsLink: "https://tina.io/docs/r/cloudinary/"
24
+ });
25
+ const E_KEY_FAIL = new MediaListError({
26
+ title: "Bad Credentials",
27
+ message: "Unable to connect to Cloudinary because one or more environment variables are misconfigured.",
28
+ docsLink: "https://tina.io/docs/r/cloudinary/"
29
+ });
30
+ const E_BAD_ROUTE = new MediaListError({
31
+ title: "Bad Route",
32
+ message: "The Cloudinary API route is missing or misconfigured.",
33
+ docsLink: "https://tina.io/docs/r/cloudinary"
34
+ });
35
+ const interpretErrorMessage = (message) => {
36
+ switch (message) {
37
+ case "Must supply cloud_name":
38
+ case "Must supply api_key":
39
+ case "Must supply api_secret":
40
+ return E_CONFIG;
41
+ case "unknown api_key":
42
+ return E_KEY_FAIL;
43
+ default:
44
+ return E_DEFAULT;
45
+ }
46
+ };
47
+ class CloudinaryMediaStore {
48
+ constructor(options) {
49
+ this.fetchFunction = (input, init) => fetch(input, init);
50
+ this.accept = DEFAULT_MEDIA_UPLOAD_TYPES;
51
+ this.parse = (img) => {
52
+ return img.src;
53
+ };
54
+ this.baseUrl = (options == null ? void 0 : options.baseUrl) || "/api/cloudinary/media";
55
+ }
56
+ async persist(media) {
57
+ const newFiles = [];
58
+ for (const item of media) {
59
+ const { file, directory } = item;
60
+ const formData = new FormData();
61
+ formData.append("file", file);
62
+ formData.append("directory", directory);
63
+ formData.append("filename", file.name);
64
+ const res = await this.fetchFunction(this.baseUrl, {
65
+ method: "POST",
66
+ body: formData
67
+ });
68
+ if (res.status != 200) {
69
+ const responseData = await res.json();
70
+ throw new Error(responseData.message);
71
+ }
72
+ const fileRes = await res.json();
73
+ await new Promise((resolve) => {
74
+ setTimeout(resolve, 2e3);
75
+ });
76
+ const parsedRes = {
77
+ type: "file",
78
+ id: fileRes.public_id,
79
+ filename: fileRes.original_filename,
80
+ directory: "/",
81
+ thumbnails: {
82
+ "75x75": fileRes.secure_url,
83
+ "400x400": fileRes.secure_url,
84
+ "1000x1000": fileRes.secure_url
85
+ },
86
+ src: fileRes.secure_url
56
87
  };
57
- this.baseUrl = (options == null ? void 0 : options.baseUrl) || "/api/cloudinary/media";
88
+ newFiles.push(parsedRes);
58
89
  }
59
- async persist(media) {
60
- const newFiles = [];
61
- for (const item of media) {
62
- const { file, directory } = item;
63
- const formData = new FormData();
64
- formData.append("file", file);
65
- formData.append("directory", directory);
66
- formData.append("filename", file.name);
67
- const res = await this.fetchFunction(this.baseUrl, {
68
- method: "POST",
69
- body: formData
70
- });
71
- if (res.status != 200) {
72
- const responseData = await res.json();
73
- throw new Error(responseData.message);
74
- }
75
- const fileRes = await res.json();
76
- await new Promise((resolve) => {
77
- setTimeout(resolve, 2e3);
78
- });
79
- const parsedRes = {
80
- type: "file",
81
- id: fileRes.public_id,
82
- filename: fileRes.original_filename,
83
- directory: "/",
84
- thumbnails: {
85
- "75x75": fileRes.secure_url,
86
- "400x400": fileRes.secure_url,
87
- "1000x1000": fileRes.secure_url
88
- },
89
- src: fileRes.secure_url
90
- };
91
- newFiles.push(parsedRes);
90
+ return newFiles;
91
+ }
92
+ async delete(media) {
93
+ await this.fetchFunction(
94
+ `${this.baseUrl}/${encodeURIComponent(media.id)}`,
95
+ {
96
+ method: "DELETE"
92
97
  }
93
- return newFiles;
94
- }
95
- async delete(media) {
96
- await this.fetchFunction(
97
- `${this.baseUrl}/${encodeURIComponent(media.id)}`,
98
- {
99
- method: "DELETE"
100
- }
101
- );
98
+ );
99
+ }
100
+ async list(options) {
101
+ const query = this.buildQuery(options);
102
+ const response = await this.fetchFunction(this.baseUrl + query);
103
+ if (response.status == 401) {
104
+ throw E_UNAUTHORIZED;
102
105
  }
103
- async list(options) {
104
- const query = this.buildQuery(options);
105
- const response = await this.fetchFunction(this.baseUrl + query);
106
- if (response.status == 401) {
107
- throw E_UNAUTHORIZED;
108
- }
109
- if (response.status == 404) {
110
- throw E_BAD_ROUTE;
111
- }
112
- if (response.status >= 500) {
113
- const { e } = await response.json();
114
- const error = interpretErrorMessage(e);
115
- throw error;
116
- }
117
- const { items, offset } = await response.json();
118
- return {
119
- items: items.map((item) => item),
120
- nextOffset: offset
121
- };
106
+ if (response.status == 404) {
107
+ throw E_BAD_ROUTE;
122
108
  }
123
- buildQuery(options) {
124
- const params = Object.keys(options).filter((key) => options[key] !== "" && options[key] !== void 0).map((key) => `${key}=${options[key]}`).join("&");
125
- return `?${params}`;
109
+ if (response.status >= 500) {
110
+ const { e } = await response.json();
111
+ const error = interpretErrorMessage(e);
112
+ throw error;
126
113
  }
114
+ const { items, offset } = await response.json();
115
+ return {
116
+ items: items.map((item) => item),
117
+ nextOffset: offset
118
+ };
127
119
  }
128
- const createTinaCloudCloudinaryMediaStore = (options = { baseUrl: "/api/cloudinary/media" }) => class TinaCloudCloudinaryMediaStore extends CloudinaryMediaStore {
129
- constructor(client) {
130
- super(options);
131
- this.client = client;
132
- this.fetchFunction = async (input, init) => {
133
- try {
134
- const url = input.toString();
135
- const query = `${url.includes("?") ? "&" : "?"}clientID=${client.clientId}`;
136
- const res = client.authProvider.fetchWithToken(url + query, init);
137
- return res;
138
- } catch (error) {
139
- console.error(error);
140
- }
141
- };
142
- }
143
- };
144
- const TinaCloudCloudinaryMediaStore = createTinaCloudCloudinaryMediaStore();
145
- exports2.CloudinaryMediaStore = CloudinaryMediaStore;
146
- exports2.TinaCloudCloudinaryMediaStore = TinaCloudCloudinaryMediaStore;
147
- exports2.createTinaCloudCloudinaryMediaStore = createTinaCloudCloudinaryMediaStore;
148
- Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
149
- });
120
+ buildQuery(options) {
121
+ const params = Object.keys(options).filter((key) => options[key] !== "" && options[key] !== void 0).map((key) => `${key}=${options[key]}`).join("&");
122
+ return `?${params}`;
123
+ }
124
+ }
125
+ const createTinaCloudCloudinaryMediaStore = (options = { baseUrl: "/api/cloudinary/media" }) => class TinaCloudCloudinaryMediaStore extends CloudinaryMediaStore {
126
+ constructor(client) {
127
+ super(options);
128
+ this.client = client;
129
+ this.fetchFunction = async (input, init) => {
130
+ try {
131
+ const url = input.toString();
132
+ const query = `${url.includes("?") ? "&" : "?"}clientID=${client.clientId}`;
133
+ const res = client.authProvider.fetchWithToken(url + query, init);
134
+ return res;
135
+ } catch (error) {
136
+ console.error(error);
137
+ }
138
+ };
139
+ }
140
+ };
141
+ const TinaCloudCloudinaryMediaStore = createTinaCloudCloudinaryMediaStore();
142
+ export {
143
+ CloudinaryMediaStore,
144
+ TinaCloudCloudinaryMediaStore,
145
+ createTinaCloudCloudinaryMediaStore
146
+ };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "next-tinacms-cloudinary",
3
- "version": "16.0.1",
3
+ "version": "17.0.1",
4
4
  "main": "dist/index.js",
5
- "module": "dist/index.mjs",
5
+ "module": "./dist/index.js",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
@@ -30,10 +30,10 @@
30
30
  "react-dom": "^18.3.1",
31
31
  "typescript": "^5.7.3",
32
32
  "@tinacms/scripts": "1.4.1",
33
- "tinacms": "2.10.1"
33
+ "tinacms": "3.0.1"
34
34
  },
35
35
  "peerDependencies": {
36
- "tinacms": "2.10.1"
36
+ "tinacms": "3.0.1"
37
37
  },
38
38
  "publishConfig": {
39
39
  "registry": "https://registry.npmjs.org"
package/dist/index.mjs DELETED
@@ -1,146 +0,0 @@
1
- import { DEFAULT_MEDIA_UPLOAD_TYPES } from "tinacms";
2
- class MediaListError extends Error {
3
- constructor(config) {
4
- super(config.message);
5
- this.ERR_TYPE = "MediaListError";
6
- this.title = config.title;
7
- this.docsLink = config.docsLink;
8
- }
9
- }
10
- const E_DEFAULT = new MediaListError({
11
- title: "An Error Occurred",
12
- message: "Something went wrong fetching your media from Cloudinary.",
13
- docsLink: "https://tina.io/docs/r/cloudinary"
14
- });
15
- const E_UNAUTHORIZED = new MediaListError({
16
- title: "Unauthorized",
17
- message: "You don't have access to this resource.",
18
- docsLink: "https://tina.io/docs/r/cloudinary"
19
- });
20
- const E_CONFIG = new MediaListError({
21
- title: "Missing Credentials",
22
- message: "Unable to connect to Cloudinary because one or more environment variables are missing.",
23
- docsLink: "https://tina.io/docs/r/cloudinary/"
24
- });
25
- const E_KEY_FAIL = new MediaListError({
26
- title: "Bad Credentials",
27
- message: "Unable to connect to Cloudinary because one or more environment variables are misconfigured.",
28
- docsLink: "https://tina.io/docs/r/cloudinary/"
29
- });
30
- const E_BAD_ROUTE = new MediaListError({
31
- title: "Bad Route",
32
- message: "The Cloudinary API route is missing or misconfigured.",
33
- docsLink: "https://tina.io/docs/r/cloudinary"
34
- });
35
- const interpretErrorMessage = (message) => {
36
- switch (message) {
37
- case "Must supply cloud_name":
38
- case "Must supply api_key":
39
- case "Must supply api_secret":
40
- return E_CONFIG;
41
- case "unknown api_key":
42
- return E_KEY_FAIL;
43
- default:
44
- return E_DEFAULT;
45
- }
46
- };
47
- class CloudinaryMediaStore {
48
- constructor(options) {
49
- this.fetchFunction = (input, init) => fetch(input, init);
50
- this.accept = DEFAULT_MEDIA_UPLOAD_TYPES;
51
- this.parse = (img) => {
52
- return img.src;
53
- };
54
- this.baseUrl = (options == null ? void 0 : options.baseUrl) || "/api/cloudinary/media";
55
- }
56
- async persist(media) {
57
- const newFiles = [];
58
- for (const item of media) {
59
- const { file, directory } = item;
60
- const formData = new FormData();
61
- formData.append("file", file);
62
- formData.append("directory", directory);
63
- formData.append("filename", file.name);
64
- const res = await this.fetchFunction(this.baseUrl, {
65
- method: "POST",
66
- body: formData
67
- });
68
- if (res.status != 200) {
69
- const responseData = await res.json();
70
- throw new Error(responseData.message);
71
- }
72
- const fileRes = await res.json();
73
- await new Promise((resolve) => {
74
- setTimeout(resolve, 2e3);
75
- });
76
- const parsedRes = {
77
- type: "file",
78
- id: fileRes.public_id,
79
- filename: fileRes.original_filename,
80
- directory: "/",
81
- thumbnails: {
82
- "75x75": fileRes.secure_url,
83
- "400x400": fileRes.secure_url,
84
- "1000x1000": fileRes.secure_url
85
- },
86
- src: fileRes.secure_url
87
- };
88
- newFiles.push(parsedRes);
89
- }
90
- return newFiles;
91
- }
92
- async delete(media) {
93
- await this.fetchFunction(
94
- `${this.baseUrl}/${encodeURIComponent(media.id)}`,
95
- {
96
- method: "DELETE"
97
- }
98
- );
99
- }
100
- async list(options) {
101
- const query = this.buildQuery(options);
102
- const response = await this.fetchFunction(this.baseUrl + query);
103
- if (response.status == 401) {
104
- throw E_UNAUTHORIZED;
105
- }
106
- if (response.status == 404) {
107
- throw E_BAD_ROUTE;
108
- }
109
- if (response.status >= 500) {
110
- const { e } = await response.json();
111
- const error = interpretErrorMessage(e);
112
- throw error;
113
- }
114
- const { items, offset } = await response.json();
115
- return {
116
- items: items.map((item) => item),
117
- nextOffset: offset
118
- };
119
- }
120
- buildQuery(options) {
121
- const params = Object.keys(options).filter((key) => options[key] !== "" && options[key] !== void 0).map((key) => `${key}=${options[key]}`).join("&");
122
- return `?${params}`;
123
- }
124
- }
125
- const createTinaCloudCloudinaryMediaStore = (options = { baseUrl: "/api/cloudinary/media" }) => class TinaCloudCloudinaryMediaStore extends CloudinaryMediaStore {
126
- constructor(client) {
127
- super(options);
128
- this.client = client;
129
- this.fetchFunction = async (input, init) => {
130
- try {
131
- const url = input.toString();
132
- const query = `${url.includes("?") ? "&" : "?"}clientID=${client.clientId}`;
133
- const res = client.authProvider.fetchWithToken(url + query, init);
134
- return res;
135
- } catch (error) {
136
- console.error(error);
137
- }
138
- };
139
- }
140
- };
141
- const TinaCloudCloudinaryMediaStore = createTinaCloudCloudinaryMediaStore();
142
- export {
143
- CloudinaryMediaStore,
144
- TinaCloudCloudinaryMediaStore,
145
- createTinaCloudCloudinaryMediaStore
146
- };