@spica-devkit/storage 0.9.29 → 0.10.2
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/index.d.ts +78 -0
- package/index.js +390 -0
- package/index.js.map +1 -0
- package/index.mjs +379 -0
- package/index.mjs.map +1 -0
- package/package.json +11 -8
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -333
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -317
- package/dist/index.mjs.map +0 -1
- package/dist/src/index.d.ts +0 -2
- package/dist/src/interface.d.ts +0 -37
- package/dist/src/storage.d.ts +0 -31
- package/dist/src/utility.d.ts +0 -10
package/dist/index.js
DELETED
|
@@ -1,333 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var axios_1 = require('axios');
|
|
6
|
-
|
|
7
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
-
|
|
9
|
-
var axios_1__default = /*#__PURE__*/_interopDefaultLegacy(axios_1);
|
|
10
|
-
|
|
11
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
12
|
-
|
|
13
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
14
|
-
return module = {
|
|
15
|
-
path: basedir,
|
|
16
|
-
exports: {},
|
|
17
|
-
require: function (path, base) {
|
|
18
|
-
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
19
|
-
}
|
|
20
|
-
}, fn(module, module.exports), module.exports;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function commonjsRequire () {
|
|
24
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var request = createCommonjsModule(function (module, exports) {
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.Axios = exports.logWarning = void 0;
|
|
30
|
-
|
|
31
|
-
function logWarning(response) {
|
|
32
|
-
const warning = response.headers["warning"];
|
|
33
|
-
if (warning) {
|
|
34
|
-
console.warn(warning);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.logWarning = logWarning;
|
|
38
|
-
class Axios {
|
|
39
|
-
constructor(config) {
|
|
40
|
-
this.interceptors = {
|
|
41
|
-
request: {
|
|
42
|
-
onFulfilled: (request) => {
|
|
43
|
-
request.maxBodyLength = Number.MAX_SAFE_INTEGER;
|
|
44
|
-
request.maxContentLength = Number.MAX_SAFE_INTEGER;
|
|
45
|
-
if (!request.headers["Authorization"]) {
|
|
46
|
-
throw new Error("You should call initialize method with a valid apikey or identity token.");
|
|
47
|
-
}
|
|
48
|
-
return request;
|
|
49
|
-
},
|
|
50
|
-
onRejected: (error) => {
|
|
51
|
-
return Promise.reject(error);
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
response: {
|
|
55
|
-
onFulfilled: (response) => {
|
|
56
|
-
logWarning(response);
|
|
57
|
-
return response.data;
|
|
58
|
-
},
|
|
59
|
-
onRejected: (error) => {
|
|
60
|
-
return Promise.reject(error.response ? error.response.data : error);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
this.instance = axios_1__default['default'].default.create(config);
|
|
65
|
-
this.instance.interceptors.request.use(this.interceptors.request.onFulfilled, this.interceptors.request.onRejected);
|
|
66
|
-
this.instance.interceptors.response.use(this.interceptors.response.onFulfilled, this.interceptors.response.onRejected);
|
|
67
|
-
this.baseUrl = this.instance.defaults.baseURL;
|
|
68
|
-
}
|
|
69
|
-
setBaseUrl(url) {
|
|
70
|
-
this.instance.defaults.baseURL = url;
|
|
71
|
-
}
|
|
72
|
-
setWriteDefaults(writeDefaults) {
|
|
73
|
-
for (const [header, value] of Object.entries(writeDefaults.headers)) {
|
|
74
|
-
this.instance.defaults.headers.post[header] = value;
|
|
75
|
-
this.instance.defaults.headers.put[header] = value;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
setAuthorization(authorization) {
|
|
79
|
-
this.instance.defaults.headers["Authorization"] = authorization;
|
|
80
|
-
}
|
|
81
|
-
get(url, config) {
|
|
82
|
-
return this.instance.get(url, config);
|
|
83
|
-
}
|
|
84
|
-
post(url, body, config) {
|
|
85
|
-
return this.instance.post(url, body, config);
|
|
86
|
-
}
|
|
87
|
-
put(url, body, config) {
|
|
88
|
-
return this.instance.put(url, body, config);
|
|
89
|
-
}
|
|
90
|
-
patch(url, body, config) {
|
|
91
|
-
return this.instance.patch(url, body, config);
|
|
92
|
-
}
|
|
93
|
-
delete(url, config) {
|
|
94
|
-
return this.instance.delete(url, config);
|
|
95
|
-
}
|
|
96
|
-
request(config) {
|
|
97
|
-
return this.instance.request(config);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
exports.Axios = Axios;
|
|
101
|
-
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
var initialize_1 = createCommonjsModule(function (module, exports) {
|
|
105
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
106
|
-
exports.isPlatformBrowser = exports.checkInitialized = exports.initialize = void 0;
|
|
107
|
-
|
|
108
|
-
let service;
|
|
109
|
-
function initialize(options) {
|
|
110
|
-
let authorization;
|
|
111
|
-
if ("apikey" in options) {
|
|
112
|
-
authorization = `APIKEY ${options.apikey}`;
|
|
113
|
-
}
|
|
114
|
-
else if ("identity" in options) {
|
|
115
|
-
authorization = `IDENTITY ${options.identity}`;
|
|
116
|
-
}
|
|
117
|
-
checkInitialized(authorization);
|
|
118
|
-
const publicUrl = options.publicUrl || getPublicUrl();
|
|
119
|
-
if (!publicUrl) {
|
|
120
|
-
throw new Error("Public url must be provided.");
|
|
121
|
-
}
|
|
122
|
-
if (!service) {
|
|
123
|
-
service = new request.Axios({ baseURL: publicUrl, headers: { Authorization: authorization } });
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
service.setBaseUrl(publicUrl);
|
|
127
|
-
service.setAuthorization(authorization);
|
|
128
|
-
}
|
|
129
|
-
return { authorization, publicUrl, service };
|
|
130
|
-
}
|
|
131
|
-
exports.initialize = initialize;
|
|
132
|
-
function checkInitialized(authorization) {
|
|
133
|
-
if (!authorization) {
|
|
134
|
-
throw new Error("You should call initialize method with a valid apikey or identity token.");
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
exports.checkInitialized = checkInitialized;
|
|
138
|
-
function getPublicUrl() {
|
|
139
|
-
return isPlatformBrowser() ? undefined : process.env.__INTERNAL__SPICA__PUBLIC_URL__;
|
|
140
|
-
}
|
|
141
|
-
function isPlatformBrowser() {
|
|
142
|
-
return typeof window !== "undefined";
|
|
143
|
-
}
|
|
144
|
-
exports.isPlatformBrowser = isPlatformBrowser;
|
|
145
|
-
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
var _interface = createCommonjsModule(function (module, exports) {
|
|
149
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
150
|
-
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
var url = createCommonjsModule(function (module, exports) {
|
|
154
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
155
|
-
exports.buildUrl = void 0;
|
|
156
|
-
function buildUrl(baseUrl, queryParams = {}) {
|
|
157
|
-
const url = new URL(baseUrl);
|
|
158
|
-
for (let [key, value] of Object.entries(queryParams)) {
|
|
159
|
-
if (typeof value != "string") {
|
|
160
|
-
value = JSON.stringify(value);
|
|
161
|
-
}
|
|
162
|
-
url.searchParams.set(key, value);
|
|
163
|
-
}
|
|
164
|
-
return url;
|
|
165
|
-
}
|
|
166
|
-
exports.buildUrl = buildUrl;
|
|
167
|
-
|
|
168
|
-
});
|
|
169
|
-
|
|
170
|
-
var src = createCommonjsModule(function (module, exports) {
|
|
171
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
172
|
-
if (k2 === undefined) k2 = k;
|
|
173
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
174
|
-
}) : (function(o, m, k, k2) {
|
|
175
|
-
if (k2 === undefined) k2 = k;
|
|
176
|
-
o[k2] = m[k];
|
|
177
|
-
}));
|
|
178
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
179
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
180
|
-
};
|
|
181
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
182
|
-
__exportStar(initialize_1, exports);
|
|
183
|
-
__exportStar(_interface, exports);
|
|
184
|
-
__exportStar(request, exports);
|
|
185
|
-
__exportStar(url, exports);
|
|
186
|
-
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
var internal_common = createCommonjsModule(function (module, exports) {
|
|
190
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
191
|
-
if (k2 === undefined) k2 = k;
|
|
192
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
193
|
-
}) : (function(o, m, k, k2) {
|
|
194
|
-
if (k2 === undefined) k2 = k;
|
|
195
|
-
o[k2] = m[k];
|
|
196
|
-
}));
|
|
197
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
198
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
199
|
-
};
|
|
200
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
201
|
-
__exportStar(src, exports);
|
|
202
|
-
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
function importFormData() {
|
|
206
|
-
return require("form-data")();
|
|
207
|
-
}
|
|
208
|
-
async function preparePostBody(objects) {
|
|
209
|
-
let files = [];
|
|
210
|
-
if (!Array.isArray(objects)) {
|
|
211
|
-
files = Array.from(objects);
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
files = objects;
|
|
215
|
-
}
|
|
216
|
-
const form = createForm();
|
|
217
|
-
for (const file of files) {
|
|
218
|
-
appendToForm(form, "files", file);
|
|
219
|
-
}
|
|
220
|
-
return { body: form, headers: getHeaders(form) };
|
|
221
|
-
}
|
|
222
|
-
async function preparePutBody(object) {
|
|
223
|
-
const form = createForm();
|
|
224
|
-
appendToForm(form, "file", object);
|
|
225
|
-
return { body: form, headers: getHeaders(form) };
|
|
226
|
-
}
|
|
227
|
-
function instanceOfBufferWithMeta(value) {
|
|
228
|
-
return "data" in value && "name" in value && "contentType" in value;
|
|
229
|
-
}
|
|
230
|
-
function createForm() {
|
|
231
|
-
return internal_common.isPlatformBrowser() ? new FormData() : importFormData();
|
|
232
|
-
}
|
|
233
|
-
async function appendToForm(form, key, file) {
|
|
234
|
-
if (internal_common.isPlatformBrowser()) {
|
|
235
|
-
if (instanceOfBufferWithMeta(file)) {
|
|
236
|
-
form.append(key, new Blob([file.data], { type: file.contentType }), file.name);
|
|
237
|
-
}
|
|
238
|
-
else {
|
|
239
|
-
form.append(key, file);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
form.append(key, file.data, {
|
|
244
|
-
contentType: file.contentType,
|
|
245
|
-
filename: file.name
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
return form;
|
|
249
|
-
}
|
|
250
|
-
function getHeaders(form) {
|
|
251
|
-
if (!internal_common.isPlatformBrowser()) {
|
|
252
|
-
return form.getHeaders();
|
|
253
|
-
}
|
|
254
|
-
return {};
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
let authorization;
|
|
258
|
-
let service;
|
|
259
|
-
function initialize(options) {
|
|
260
|
-
const { authorization: _authorization, service: _service } = internal_common.initialize(options);
|
|
261
|
-
authorization = _authorization;
|
|
262
|
-
service = _service;
|
|
263
|
-
}
|
|
264
|
-
async function insert(object, onUploadProgress) {
|
|
265
|
-
internal_common.checkInitialized(authorization);
|
|
266
|
-
const { body, headers } = await preparePostBody([object]);
|
|
267
|
-
return service
|
|
268
|
-
.post("storage", body, {
|
|
269
|
-
onUploadProgress,
|
|
270
|
-
headers
|
|
271
|
-
})
|
|
272
|
-
.then(([r]) => r);
|
|
273
|
-
}
|
|
274
|
-
async function insertMany(objects, onUploadProgress) {
|
|
275
|
-
internal_common.checkInitialized(authorization);
|
|
276
|
-
const { body, headers } = await preparePostBody(objects);
|
|
277
|
-
return service.post("storage", body, {
|
|
278
|
-
onUploadProgress,
|
|
279
|
-
headers
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
function get(id) {
|
|
283
|
-
internal_common.checkInitialized(authorization);
|
|
284
|
-
return service.get(`storage/${id}`);
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Returns Blob for browser environment, ReadableStream for Nodejs environment
|
|
288
|
-
*/
|
|
289
|
-
function download(id, options = {}) {
|
|
290
|
-
internal_common.checkInitialized(authorization);
|
|
291
|
-
return service.get(`storage/${id}/view`, {
|
|
292
|
-
headers: options.headers,
|
|
293
|
-
onDownloadProgress: options.onDownloadProgress,
|
|
294
|
-
responseType: internal_common.isPlatformBrowser() ? "blob" : "stream"
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
function getAll(queryParams) {
|
|
298
|
-
internal_common.checkInitialized(authorization);
|
|
299
|
-
return service.get(`storage`, {
|
|
300
|
-
params: queryParams
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
async function update(id, object, onUploadProgress) {
|
|
304
|
-
internal_common.checkInitialized(authorization);
|
|
305
|
-
const { body, headers } = await preparePutBody(object);
|
|
306
|
-
return service.put(`storage/${id}`, body, {
|
|
307
|
-
onUploadProgress,
|
|
308
|
-
headers
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
async function updateMeta(id, meta) {
|
|
312
|
-
internal_common.checkInitialized(authorization);
|
|
313
|
-
return service.patch(`storage/${id}`, meta, {
|
|
314
|
-
headers: {
|
|
315
|
-
"Content-Type": "application/json"
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
}
|
|
319
|
-
function remove(id) {
|
|
320
|
-
internal_common.checkInitialized(authorization);
|
|
321
|
-
return service.delete(`storage/${id}`);
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
exports.download = download;
|
|
325
|
-
exports.get = get;
|
|
326
|
-
exports.getAll = getAll;
|
|
327
|
-
exports.initialize = initialize;
|
|
328
|
-
exports.insert = insert;
|
|
329
|
-
exports.insertMany = insertMany;
|
|
330
|
-
exports.remove = remove;
|
|
331
|
-
exports.update = update;
|
|
332
|
-
exports.updateMeta = updateMeta;
|
|
333
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../../../node_modules/@spica-devkit/internal_common/src/request.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/initialize.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/interface.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/url.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/src/index.js","../../../../../../../../../node_modules/@spica-devkit/internal_common/index.js","../publish/src/utility.js","../publish/src/storage.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Axios = exports.logWarning = void 0;\nconst axios_1 = require(\"axios\");\nfunction logWarning(response) {\n const warning = response.headers[\"warning\"];\n if (warning) {\n console.warn(warning);\n }\n}\nexports.logWarning = logWarning;\nclass Axios {\n constructor(config) {\n this.interceptors = {\n request: {\n onFulfilled: (request) => {\n request.maxBodyLength = Number.MAX_SAFE_INTEGER;\n request.maxContentLength = Number.MAX_SAFE_INTEGER;\n if (!request.headers[\"Authorization\"]) {\n throw new Error(\"You should call initialize method with a valid apikey or identity token.\");\n }\n return request;\n },\n onRejected: (error) => {\n return Promise.reject(error);\n }\n },\n response: {\n onFulfilled: (response) => {\n logWarning(response);\n return response.data;\n },\n onRejected: (error) => {\n return Promise.reject(error.response ? error.response.data : error);\n }\n }\n };\n this.instance = axios_1.default.create(config);\n this.instance.interceptors.request.use(this.interceptors.request.onFulfilled, this.interceptors.request.onRejected);\n this.instance.interceptors.response.use(this.interceptors.response.onFulfilled, this.interceptors.response.onRejected);\n this.baseUrl = this.instance.defaults.baseURL;\n }\n setBaseUrl(url) {\n this.instance.defaults.baseURL = url;\n }\n setWriteDefaults(writeDefaults) {\n for (const [header, value] of Object.entries(writeDefaults.headers)) {\n this.instance.defaults.headers.post[header] = value;\n this.instance.defaults.headers.put[header] = value;\n }\n }\n setAuthorization(authorization) {\n this.instance.defaults.headers[\"Authorization\"] = authorization;\n }\n get(url, config) {\n return this.instance.get(url, config);\n }\n post(url, body, config) {\n return this.instance.post(url, body, config);\n }\n put(url, body, config) {\n return this.instance.put(url, body, config);\n }\n patch(url, body, config) {\n return this.instance.patch(url, body, config);\n }\n delete(url, config) {\n return this.instance.delete(url, config);\n }\n request(config) {\n return this.instance.request(config);\n }\n}\nexports.Axios = Axios;\n//# sourceMappingURL=request.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isPlatformBrowser = exports.checkInitialized = exports.initialize = void 0;\nconst request_1 = require(\"./request\");\nlet service;\nfunction initialize(options) {\n let authorization;\n if (\"apikey\" in options) {\n authorization = `APIKEY ${options.apikey}`;\n }\n else if (\"identity\" in options) {\n authorization = `IDENTITY ${options.identity}`;\n }\n checkInitialized(authorization);\n const publicUrl = options.publicUrl || getPublicUrl();\n if (!publicUrl) {\n throw new Error(\"Public url must be provided.\");\n }\n if (!service) {\n service = new request_1.Axios({ baseURL: publicUrl, headers: { Authorization: authorization } });\n }\n else {\n service.setBaseUrl(publicUrl);\n service.setAuthorization(authorization);\n }\n return { authorization, publicUrl, service };\n}\nexports.initialize = initialize;\nfunction checkInitialized(authorization) {\n if (!authorization) {\n throw new Error(\"You should call initialize method with a valid apikey or identity token.\");\n }\n}\nexports.checkInitialized = checkInitialized;\nfunction getPublicUrl() {\n return isPlatformBrowser() ? undefined : process.env.__INTERNAL__SPICA__PUBLIC_URL__;\n}\nfunction isPlatformBrowser() {\n return typeof window !== \"undefined\";\n}\nexports.isPlatformBrowser = isPlatformBrowser;\n//# sourceMappingURL=initialize.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=interface.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildUrl = void 0;\nfunction buildUrl(baseUrl, queryParams = {}) {\n const url = new URL(baseUrl);\n for (let [key, value] of Object.entries(queryParams)) {\n if (typeof value != \"string\") {\n value = JSON.stringify(value);\n }\n url.searchParams.set(key, value);\n }\n return url;\n}\nexports.buildUrl = buildUrl;\n//# sourceMappingURL=url.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./initialize\"), exports);\n__exportStar(require(\"./interface\"), exports);\n__exportStar(require(\"./request\"), exports);\n__exportStar(require(\"./url\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./src\"), exports);\n//# sourceMappingURL=index.js.map","import { isPlatformBrowser } from \"@spica-devkit/internal_common\";\nfunction importFormData() {\n return require(\"form-data\")();\n}\nexport function fileToBuffer(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.readAsArrayBuffer(file);\n reader.onload = () => resolve(reader.result);\n reader.onerror = error => reject(error);\n });\n}\nexport async function preparePostBody(objects) {\n let files = [];\n if (!Array.isArray(objects)) {\n files = Array.from(objects);\n }\n else {\n files = objects;\n }\n const form = createForm();\n for (const file of files) {\n appendToForm(form, \"files\", file);\n }\n return { body: form, headers: getHeaders(form) };\n}\nexport async function preparePutBody(object) {\n const form = createForm();\n appendToForm(form, \"file\", object);\n return { body: form, headers: getHeaders(form) };\n}\nfunction instanceOfBufferWithMeta(value) {\n return \"data\" in value && \"name\" in value && \"contentType\" in value;\n}\nfunction createForm() {\n return isPlatformBrowser() ? new FormData() : importFormData();\n}\nasync function appendToForm(form, key, file) {\n if (isPlatformBrowser()) {\n if (instanceOfBufferWithMeta(file)) {\n form.append(key, new Blob([file.data], { type: file.contentType }), file.name);\n }\n else {\n form.append(key, file);\n }\n }\n else {\n form.append(key, file.data, {\n contentType: file.contentType,\n filename: file.name\n });\n }\n return form;\n}\nfunction getHeaders(form) {\n if (!isPlatformBrowser()) {\n return form.getHeaders();\n }\n return {};\n}\n//# sourceMappingURL=utility.js.map","import { initialize as _initialize, checkInitialized, isPlatformBrowser } from \"@spica-devkit/internal_common\";\nimport { preparePostBody, preparePutBody } from \"./utility\";\nlet authorization;\nlet service;\nexport function initialize(options) {\n const { authorization: _authorization, service: _service } = _initialize(options);\n authorization = _authorization;\n service = _service;\n}\nexport async function insert(object, onUploadProgress) {\n checkInitialized(authorization);\n const { body, headers } = await preparePostBody([object]);\n return service\n .post(\"storage\", body, {\n onUploadProgress,\n headers\n })\n .then(([r]) => r);\n}\nexport async function insertMany(objects, onUploadProgress) {\n checkInitialized(authorization);\n const { body, headers } = await preparePostBody(objects);\n return service.post(\"storage\", body, {\n onUploadProgress,\n headers\n });\n}\nexport function get(id) {\n checkInitialized(authorization);\n return service.get(`storage/${id}`);\n}\n/**\n * Returns Blob for browser environment, ReadableStream for Nodejs environment\n */\nexport function download(id, options = {}) {\n checkInitialized(authorization);\n return service.get(`storage/${id}/view`, {\n headers: options.headers,\n onDownloadProgress: options.onDownloadProgress,\n responseType: isPlatformBrowser() ? \"blob\" : \"stream\"\n });\n}\nexport function getAll(queryParams) {\n checkInitialized(authorization);\n return service.get(`storage`, {\n params: queryParams\n });\n}\nexport async function update(id, object, onUploadProgress) {\n checkInitialized(authorization);\n const { body, headers } = await preparePutBody(object);\n return service.put(`storage/${id}`, body, {\n onUploadProgress,\n headers\n });\n}\nexport async function updateMeta(id, meta) {\n checkInitialized(authorization);\n return service.patch(`storage/${id}`, meta, {\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n}\nexport function remove(id) {\n checkInitialized(authorization);\n return service.delete(`storage/${id}`);\n}\n//# sourceMappingURL=storage.js.map"],"names":["axios_1","request_1","this","require$$0","require$$1","require$$2","require$$3","isPlatformBrowser","_initialize","checkInitialized"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,aAAa,GAAG,kBAAkB,GAAG,KAAK,CAAC,CAAC;AACX;AACjC,SAAS,UAAU,CAAC,QAAQ,EAAE;AAC9B,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAChD,IAAI,IAAI,OAAO,EAAE;AACjB,QAAQ,OAAO,CA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