@uploadcare/upload-client 4.0.1 → 4.2.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.
@@ -29,7 +29,7 @@ const onCancel = (signal, callback) => {
29
29
 
30
30
  const request = ({ method, url, data, headers = {}, signal, onProgress }) => new Promise((resolve, reject) => {
31
31
  const xhr = new XMLHttpRequest();
32
- const requestMethod = (method === null || method === void 0 ? void 0 : method.toUpperCase()) || 'GET';
32
+ const requestMethod = method?.toUpperCase() || 'GET';
33
33
  let aborted = false;
34
34
  xhr.open(requestMethod, url);
35
35
  if (headers) {
@@ -200,34 +200,36 @@ function buildFormData(options) {
200
200
  return formData;
201
201
  }
202
202
 
203
- const serializePair = (key, value) => typeof value !== 'undefined' ? `${key}=${encodeURIComponent(value)}` : null;
204
- // TODO: generalize value transforming logic and use it here and inside `buildFormData`
205
- const createQuery = (query) => Object.entries(query)
206
- .reduce((params, [key, value]) => {
207
- let param;
208
- if (typeof value === 'object' && !Array.isArray(value)) {
209
- param = Object.entries(value)
210
- .filter((entry) => typeof entry[1] !== 'undefined')
211
- .map((entry) => serializePair(`${key}[${entry[0]}]`, String(entry[1])));
212
- }
213
- else if (Array.isArray(value)) {
214
- param = value.map((val) => serializePair(`${key}[]`, val));
203
+ const buildSearchParams = (query) => {
204
+ const searchParams = new URLSearchParams();
205
+ for (const [key, value] of Object.entries(query)) {
206
+ if (value && typeof value === 'object' && !Array.isArray(value)) {
207
+ Object.entries(value)
208
+ .filter((entry) => entry[1] ?? false)
209
+ .forEach((entry) => searchParams.set(`${key}[${entry[0]}]`, String(entry[1])));
210
+ }
211
+ else if (Array.isArray(value)) {
212
+ value.forEach((val) => {
213
+ searchParams.append(`${key}[]`, val);
214
+ });
215
+ }
216
+ else if (typeof value === 'string' && value) {
217
+ searchParams.set(key, value);
218
+ }
219
+ else if (typeof value === 'number') {
220
+ searchParams.set(key, value.toString());
221
+ }
215
222
  }
216
- else {
217
- param = serializePair(key, value);
223
+ return searchParams.toString();
224
+ };
225
+ const getUrl = (base, path, query) => {
226
+ const url = new URL(base);
227
+ url.pathname = path;
228
+ if (query) {
229
+ url.search = buildSearchParams(query);
218
230
  }
219
- return params.concat(param);
220
- }, [])
221
- .filter((x) => !!x)
222
- .join('&');
223
- const getUrl = (base, path, query) => [
224
- base,
225
- path,
226
- query && Object.keys(query).length > 0 ? '?' : '',
227
- query && createQuery(query)
228
- ]
229
- .filter(Boolean)
230
- .join('');
231
+ return url.toString();
232
+ };
231
233
 
232
234
  /*
233
235
  Settings for future support:
@@ -249,14 +251,59 @@ const defaultSettings = {
249
251
  const defaultContentType = 'application/octet-stream';
250
252
  const defaultFilename = 'original';
251
253
 
252
- var version = '4.0.1';
254
+ var version = '4.2.1';
255
+
256
+ function isObject(o) {
257
+ return Object.prototype.toString.call(o) === '[object Object]';
258
+ }
259
+
260
+ const SEPARATOR = /\W|_/g;
261
+ function camelizeString(text) {
262
+ return text
263
+ .split(SEPARATOR)
264
+ .map((word, index) => word.charAt(0)[index > 0 ? 'toUpperCase' : 'toLowerCase']() +
265
+ word.slice(1))
266
+ .join('');
267
+ }
268
+ function camelizeArrayItems(array, { ignoreKeys } = { ignoreKeys: [] }) {
269
+ if (!Array.isArray(array)) {
270
+ return array;
271
+ }
272
+ return array.map((item) => camelizeKeys(item, { ignoreKeys }));
273
+ }
274
+ function camelizeKeys(source, { ignoreKeys } = { ignoreKeys: [] }) {
275
+ if (Array.isArray(source)) {
276
+ return camelizeArrayItems(source, { ignoreKeys });
277
+ }
278
+ if (!isObject(source)) {
279
+ return source;
280
+ }
281
+ const result = {};
282
+ for (const key of Object.keys(source)) {
283
+ let value = source[key];
284
+ if (ignoreKeys.includes(key)) {
285
+ result[key] = value;
286
+ continue;
287
+ }
288
+ if (isObject(value)) {
289
+ value = camelizeKeys(value, { ignoreKeys });
290
+ }
291
+ else if (Array.isArray(value)) {
292
+ value = camelizeArrayItems(value, { ignoreKeys });
293
+ }
294
+ result[camelizeString(key)] = value;
295
+ }
296
+ return result;
297
+ }
253
298
 
254
299
  /**
255
- * Returns User Agent based on version and settings.
300
+ * setTimeout as Promise.
301
+ *
302
+ * @param {number} ms Timeout in milliseconds.
256
303
  */
257
- function getUserAgent({ userAgent, publicKey = '', integration = '' } = {}) {
258
- const libraryName = 'UploadcareUploadClient';
259
- const libraryVersion = version;
304
+ const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
305
+
306
+ function getUserAgent$1({ libraryName, libraryVersion, userAgent, publicKey = '', integration = '' }) {
260
307
  const languageName = 'JavaScript';
261
308
  if (typeof userAgent === 'string') {
262
309
  return userAgent;
@@ -277,39 +324,6 @@ function getUserAgent({ userAgent, publicKey = '', integration = '' } = {}) {
277
324
  return `${mainInfo} (${additionInfo})`;
278
325
  }
279
326
 
280
- const SEPARATOR = /\W|_/g;
281
- /**
282
- * Transforms a string to camelCased.
283
- */
284
- function camelize(text) {
285
- return text
286
- .split(SEPARATOR)
287
- .map((word, index) => word.charAt(0)[index > 0 ? 'toUpperCase' : 'toLowerCase']() +
288
- word.slice(1))
289
- .join('');
290
- }
291
- /**
292
- * Transforms keys of an object to camelCased recursively.
293
- */
294
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
295
- function camelizeKeys(source) {
296
- if (!source || typeof source !== 'object') {
297
- return source;
298
- }
299
- return Object.keys(source).reduce((accumulator, key) => {
300
- accumulator[camelize(key)] =
301
- typeof source[key] === 'object' ? camelizeKeys(source[key]) : source[key];
302
- return accumulator;
303
- }, {});
304
- }
305
-
306
- /**
307
- * setTimeout as Promise.
308
- *
309
- * @param {number} ms Timeout in milliseconds.
310
- */
311
- const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
312
-
313
327
  const defaultOptions = {
314
328
  factor: 2,
315
329
  time: 100
@@ -317,8 +331,8 @@ const defaultOptions = {
317
331
  function retrier(fn, options = defaultOptions) {
318
332
  let attempts = 0;
319
333
  function runAttempt(fn) {
320
- const defaultDelayTime = Math.round(options.time * Math.pow(options.factor, attempts));
321
- const retry = (ms) => delay(ms !== null && ms !== void 0 ? ms : defaultDelayTime).then(() => {
334
+ const defaultDelayTime = Math.round(options.time * options.factor ** attempts);
335
+ const retry = (ms) => delay(ms ?? defaultDelayTime).then(() => {
322
336
  attempts += 1;
323
337
  return runAttempt(fn);
324
338
  });
@@ -330,6 +344,16 @@ function retrier(fn, options = defaultOptions) {
330
344
  return runAttempt(fn);
331
345
  }
332
346
 
347
+ const LIBRARY_NAME = 'UploadcareUploadClient';
348
+ const LIBRARY_VERSION = version;
349
+ function getUserAgent(options) {
350
+ return getUserAgent$1({
351
+ libraryName: LIBRARY_NAME,
352
+ libraryVersion: LIBRARY_VERSION,
353
+ ...options
354
+ });
355
+ }
356
+
333
357
  const REQUEST_WAS_THROTTLED_CODE = 'RequestThrottledError';
334
358
  const DEFAULT_RETRY_AFTER_TIMEOUT = 15000;
335
359
  function getTimeoutFromThrottledRequest(error) {
@@ -341,7 +365,7 @@ function getTimeoutFromThrottledRequest(error) {
341
365
  function retryIfThrottled(fn, retryThrottledMaxTimes) {
342
366
  return retrier(({ attempt, retry }) => fn().catch((error) => {
343
367
  if ('response' in error &&
344
- (error === null || error === void 0 ? void 0 : error.code) === REQUEST_WAS_THROTTLED_CODE &&
368
+ error?.code === REQUEST_WAS_THROTTLED_CODE &&
345
369
  attempt < retryThrottledMaxTimes) {
346
370
  return retry(getTimeoutFromThrottledRequest(error));
347
371
  }
@@ -358,41 +382,38 @@ function getStoreValue(store) {
358
382
  * Can be canceled and has progress.
359
383
  */
360
384
  function base(file, { publicKey, fileName, contentType, baseURL = defaultSettings.baseURL, secureSignature, secureExpire, store, signal, onProgress, source = 'local', integration, userAgent, retryThrottledRequestMaxTimes = defaultSettings.retryThrottledRequestMaxTimes, metadata }) {
361
- return retryIfThrottled(() => {
362
- var _a;
363
- return request({
364
- method: 'POST',
365
- url: getUrl(baseURL, '/base/', {
366
- jsonerrors: 1
367
- }),
368
- headers: {
369
- 'X-UC-User-Agent': getUserAgent({ publicKey, integration, userAgent })
385
+ return retryIfThrottled(() => request({
386
+ method: 'POST',
387
+ url: getUrl(baseURL, '/base/', {
388
+ jsonerrors: 1
389
+ }),
390
+ headers: {
391
+ 'X-UC-User-Agent': getUserAgent({ publicKey, integration, userAgent })
392
+ },
393
+ data: buildFormData({
394
+ file: {
395
+ data: file,
396
+ name: fileName ?? file.name ?? defaultFilename,
397
+ contentType
370
398
  },
371
- data: buildFormData({
372
- file: {
373
- data: file,
374
- name: (_a = fileName !== null && fileName !== void 0 ? fileName : file.name) !== null && _a !== void 0 ? _a : defaultFilename,
375
- contentType
376
- },
377
- UPLOADCARE_PUB_KEY: publicKey,
378
- UPLOADCARE_STORE: getStoreValue(store),
379
- signature: secureSignature,
380
- expire: secureExpire,
381
- source: source,
382
- metadata
383
- }),
384
- signal,
385
- onProgress
386
- }).then(({ data, headers, request }) => {
387
- const response = camelizeKeys(JSON.parse(data));
388
- if ('error' in response) {
389
- throw new UploadClientError(response.error.content, response.error.errorCode, request, response, headers);
390
- }
391
- else {
392
- return response;
393
- }
394
- });
395
- }, retryThrottledRequestMaxTimes);
399
+ UPLOADCARE_PUB_KEY: publicKey,
400
+ UPLOADCARE_STORE: getStoreValue(store),
401
+ signature: secureSignature,
402
+ expire: secureExpire,
403
+ source: source,
404
+ metadata
405
+ }),
406
+ signal,
407
+ onProgress
408
+ }).then(({ data, headers, request }) => {
409
+ const response = camelizeKeys(JSON.parse(data));
410
+ if ('error' in response) {
411
+ throw new UploadClientError(response.error.content, response.error.errorCode, request, response, headers);
412
+ }
413
+ else {
414
+ return response;
415
+ }
416
+ }), retryThrottledRequestMaxTimes);
396
417
  }
397
418
 
398
419
  var TypeEnum;
@@ -571,9 +592,9 @@ function multipartStart(size, { publicKey, contentType, fileName, multipartChunk
571
592
  'X-UC-User-Agent': getUserAgent({ publicKey, integration, userAgent })
572
593
  },
573
594
  data: buildFormData({
574
- filename: fileName !== null && fileName !== void 0 ? fileName : defaultFilename,
595
+ filename: fileName ?? defaultFilename,
575
596
  size: size,
576
- content_type: contentType !== null && contentType !== void 0 ? contentType : defaultContentType,
597
+ content_type: contentType ?? defaultContentType,
577
598
  part_size: multipartChunkSize,
578
599
  UPLOADCARE_STORE: getStoreValue(store),
579
600
  UPLOADCARE_PUB_KEY: publicKey,
@@ -675,9 +696,9 @@ class UploadcareFile {
675
696
  this.mimeType = fileInfo.mimeType;
676
697
  this.cdnUrl = cdnUrl;
677
698
  this.originalFilename = fileInfo.originalFilename;
678
- this.imageInfo = camelizeKeys(fileInfo.imageInfo);
679
- this.videoInfo = camelizeKeys(fileInfo.videoInfo);
680
- this.contentInfo = camelizeKeys(fileInfo.contentInfo);
699
+ this.imageInfo = fileInfo.imageInfo;
700
+ this.videoInfo = fileInfo.videoInfo;
701
+ this.contentInfo = fileInfo.contentInfo;
681
702
  this.metadata = fileInfo.metadata || null;
682
703
  this.s3Bucket = s3Bucket || null;
683
704
  this.s3Url = s3Url;
@@ -805,8 +826,7 @@ class Events {
805
826
  this.events = Object.create({});
806
827
  }
807
828
  emit(event, data) {
808
- var _a;
809
- (_a = this.events[event]) === null || _a === void 0 ? void 0 : _a.forEach((fn) => fn(data));
829
+ this.events[event]?.forEach((fn) => fn(data));
810
830
  }
811
831
  on(event, callback) {
812
832
  this.events[event] = this.events[event] || [];
@@ -824,12 +844,12 @@ class Events {
824
844
 
825
845
  const response = (type, data) => {
826
846
  if (type === 'success') {
827
- return Object.assign({ status: Status.Success }, data);
847
+ return { status: Status.Success, ...data };
828
848
  }
829
849
  if (type === 'progress') {
830
- return Object.assign({ status: Status.Progress }, data);
850
+ return { status: Status.Progress, ...data };
831
851
  }
832
- return Object.assign({ status: Status.Error }, data);
852
+ return { status: Status.Error, ...data };
833
853
  };
834
854
  class Pusher {
835
855
  constructor(pusherKey, disconnectTime = 30000) {
@@ -877,8 +897,7 @@ class Pusher {
877
897
  }
878
898
  disconnect() {
879
899
  const actualDisconect = () => {
880
- var _a;
881
- (_a = this.ws) === null || _a === void 0 ? void 0 : _a.close();
900
+ this.ws?.close();
882
901
  this.ws = undefined;
883
902
  this.isConnected = false;
884
903
  };
@@ -892,9 +911,8 @@ class Pusher {
892
911
  }
893
912
  }
894
913
  send(event, data) {
895
- var _a;
896
914
  const str = JSON.stringify({ event, data });
897
- (_a = this.ws) === null || _a === void 0 ? void 0 : _a.send(str);
915
+ this.ws?.send(str);
898
916
  }
899
917
  subscribe(token, handler) {
900
918
  this.subscribers += 1;
@@ -1061,7 +1079,7 @@ const uploadFromUrl = (sourceUrl, { publicKey, fileName, baseURL, baseCDN, check
1061
1079
  }))
1062
1080
  .catch((error) => {
1063
1081
  const pusher = getPusher(pusherKey);
1064
- pusher === null || pusher === void 0 ? void 0 : pusher.disconnect();
1082
+ pusher?.disconnect();
1065
1083
  return Promise.reject(error);
1066
1084
  })
1067
1085
  .then((urlResponse) => {
@@ -1154,7 +1172,7 @@ const sliceChunk = (file, index, fileSize, chunkSize) => {
1154
1172
  * being deallocated until uploading complete. Access to deallocated blob
1155
1173
  * causes app crash.
1156
1174
  *
1157
- * See https://github.com/uploadcare/uploadcare-upload-client/issues/306
1175
+ * See https://github.com/uploadcare/uploadcare-js-api-clients/issues/306
1158
1176
  * and https://github.com/facebook/react-native/issues/27543
1159
1177
  */
1160
1178
  function prepareChunks(file, fileSize, chunkSize) {
@@ -1234,7 +1252,7 @@ const uploadMultipart = (file, { publicKey, fileName, fileSize, baseURL, secureS
1234
1252
  return multipartStart(size, {
1235
1253
  publicKey,
1236
1254
  contentType,
1237
- fileName: fileName !== null && fileName !== void 0 ? fileName : file.name,
1255
+ fileName: fileName ?? file.name,
1238
1256
  baseURL,
1239
1257
  secureSignature,
1240
1258
  secureExpire,
@@ -1486,7 +1504,10 @@ function uploadFileGroup(data, { publicKey, fileName, baseURL = defaultSettings.
1486
1504
  /**
1487
1505
  * Populate options with settings.
1488
1506
  */
1489
- const populateOptionsWithSettings = (options, settings) => (Object.assign(Object.assign({}, settings), options));
1507
+ const populateOptionsWithSettings = (options, settings) => ({
1508
+ ...settings,
1509
+ ...options
1510
+ });
1490
1511
  class UploadClient {
1491
1512
  constructor(settings) {
1492
1513
  this.settings = Object.assign({}, defaultSettings, settings);
package/dist/types.d.ts CHANGED
@@ -1,7 +1,16 @@
1
- // Generated by dts-bundle-generator v6.9.0
1
+ // Generated by dts-bundle-generator v6.12.0
2
2
 
3
3
  import NodeFormData from 'form-data';
4
4
 
5
+ export declare type CustomUserAgentOptions = {
6
+ publicKey: string;
7
+ libraryName: string;
8
+ libraryVersion: string;
9
+ languageName: string;
10
+ integration?: string;
11
+ };
12
+ export declare type CustomUserAgentFn = (options: CustomUserAgentOptions) => string;
13
+ export declare type CustomUserAgent = string | CustomUserAgentFn;
5
14
  export declare type GeoLocation = {
6
15
  latitude: number;
7
16
  longitude: number;
@@ -39,16 +48,15 @@ export declare type VideoInfo = {
39
48
  codec: string;
40
49
  };
41
50
  };
51
+ export declare type MimeInfo = {
52
+ mime: string;
53
+ type: string;
54
+ subtype: string;
55
+ };
42
56
  export declare type ContentInfo = {
43
- content_info: {
44
- mime?: {
45
- mime: string;
46
- type: string;
47
- subtype: string;
48
- };
49
- image?: ImageInfo;
50
- video?: VideoInfo;
51
- };
57
+ mime?: MimeInfo;
58
+ image?: ImageInfo;
59
+ video?: VideoInfo;
52
60
  };
53
61
  export declare type FileInfo = {
54
62
  size: number;
@@ -92,42 +100,6 @@ export declare type ProgressCallback<T = ComputableProgressInfo | UnknownProgres
92
100
  export declare type Metadata = {
93
101
  [key: string]: string;
94
102
  };
95
- export interface DefaultSettings {
96
- baseCDN: string;
97
- baseURL: string;
98
- maxContentLength: number;
99
- retryThrottledRequestMaxTimes: number;
100
- multipartMinFileSize: number;
101
- multipartChunkSize: number;
102
- multipartMinLastPartSize: number;
103
- maxConcurrentRequests: number;
104
- multipartMaxAttempts: number;
105
- pollingTimeoutMilliseconds: number;
106
- pusherKey: string;
107
- }
108
- export interface Settings extends Partial<DefaultSettings> {
109
- publicKey: string;
110
- fileName?: string;
111
- contentType?: string;
112
- store?: boolean;
113
- secureSignature?: string;
114
- secureExpire?: string;
115
- integration?: string;
116
- userAgent?: CustomUserAgent;
117
- checkForUrlDuplicates?: boolean;
118
- saveUrlForRecurrentUploads?: boolean;
119
- source?: string;
120
- jsonpCallback?: string;
121
- }
122
- export declare type CustomUserAgentOptions = {
123
- publicKey: string;
124
- libraryName: string;
125
- libraryVersion: string;
126
- languageName: string;
127
- integration?: string;
128
- };
129
- export declare type CustomUserAgentFn = (options: CustomUserAgentOptions) => string;
130
- export declare type CustomUserAgent = string | CustomUserAgentFn;
131
103
  export declare type Headers = {
132
104
  [key: string]: string | string[] | undefined;
133
105
  };
@@ -454,6 +426,33 @@ export declare type GroupFromOptions = {
454
426
  jsonpCallback?: string;
455
427
  };
456
428
  export function uploadFileGroup(data: (NodeFile | BrowserFile)[] | Url[] | Uuid[], { publicKey, fileName, baseURL, secureSignature, secureExpire, store, signal, onProgress, source, integration, userAgent, retryThrottledRequestMaxTimes, contentType, multipartChunkSize, baseCDN, jsonpCallback }: FileFromOptions & GroupFromOptions): Promise<UploadcareGroup>;
429
+ export interface DefaultSettings {
430
+ baseCDN: string;
431
+ baseURL: string;
432
+ maxContentLength: number;
433
+ retryThrottledRequestMaxTimes: number;
434
+ multipartMinFileSize: number;
435
+ multipartChunkSize: number;
436
+ multipartMinLastPartSize: number;
437
+ maxConcurrentRequests: number;
438
+ multipartMaxAttempts: number;
439
+ pollingTimeoutMilliseconds: number;
440
+ pusherKey: string;
441
+ }
442
+ export interface Settings extends Partial<DefaultSettings> {
443
+ publicKey: string;
444
+ fileName?: string;
445
+ contentType?: string;
446
+ store?: boolean;
447
+ secureSignature?: string;
448
+ secureExpire?: string;
449
+ integration?: string;
450
+ userAgent?: CustomUserAgent;
451
+ checkForUrlDuplicates?: boolean;
452
+ saveUrlForRecurrentUploads?: boolean;
453
+ source?: string;
454
+ jsonpCallback?: string;
455
+ }
457
456
  export declare class UploadClient {
458
457
  private settings;
459
458
  constructor(settings: Settings);
package/package.json CHANGED
@@ -1,41 +1,46 @@
1
1
  {
2
2
  "name": "@uploadcare/upload-client",
3
- "version": "4.0.1",
3
+ "version": "4.2.1",
4
4
  "description": "Library for work with Uploadcare Upload API",
5
5
  "type": "module",
6
- "main": "dist/index.node.js",
7
- "module": "dist/index.node.js",
8
- "browser": "dist/index.browser.js",
9
- "react-native": "dist/index.react-native.js",
10
- "types": "dist/types.d.ts",
6
+ "main": "./dist/index.node.js",
7
+ "module": "./dist/index.node.js",
8
+ "browser": "./dist/index.browser.js",
9
+ "react-native": "./dist/index.react-native.js",
10
+ "types": "./dist/types.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "node": "./dist/index.node.js",
14
+ "browser": "./dist/index.browser.js"
15
+ }
16
+ },
11
17
  "sideEffects": false,
12
- "files": [
13
- "dist/*"
14
- ],
18
+ "files": ["dist/*", "README.md", "LICENSE"],
19
+ "engines": {
20
+ "node": ">=16"
21
+ },
15
22
  "scripts": {
16
- "check-env-vars": "node ./checkvars.js",
17
- "mock:start": "node --loader ts-node/esm ./mock-server/server.ts --silent",
23
+ "prepack": "cp ../../LICENSE ./LICENSE",
24
+ "mock:start": "ts-node-esm --experimentalSpecifierResolution node ./mock-server/server.ts --silent",
18
25
  "clean": "rimraf dist",
19
- "lint": "eslint ./src ./mock-server --ext=ts",
20
26
  "test": "start-server-and-test mock:start :3000 test:jest",
21
- "test:production": "npm run check-env-vars && TEST_ENV=production jest",
22
- "test:jest": "jest",
27
+ "test:production": "TEST_ENV=production npm run test:jest",
28
+ "test:jest": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js",
23
29
  "prebuild": "npm run clean",
24
30
  "build": "npm run build:types && npm run build:compile",
25
31
  "build:types": "dts-bundle-generator --project tsconfig.dts.json -o dist/types.d.ts src/index.ts",
26
- "build:compile": "rollup -c",
27
- "release": "shipjs prepare"
32
+ "build:compile": "rollup -c"
28
33
  },
29
34
  "repository": {
30
35
  "type": "git",
31
- "url": "git+https://github.com/uploadcare/uploadcare-upload-client.git"
36
+ "url": "git+https://github.com/uploadcare/uploadcare-js-api-clients.git"
32
37
  },
33
38
  "author": "Uploadcare",
34
39
  "license": "MIT",
35
40
  "bugs": {
36
- "url": "https://github.com/uploadcare/uploadcare-upload-client/issues"
41
+ "url": "https://github.com/uploadcare/uploadcare-js-api-clients/issues"
37
42
  },
38
- "homepage": "https://github.com/uploadcare/uploadcare-upload-client#readme",
43
+ "homepage": "https://github.com/uploadcare/uploadcare-js-api-clients#readme",
39
44
  "keywords": [
40
45
  "uploadcare",
41
46
  "file",
@@ -48,43 +53,20 @@
48
53
  "devDependencies": {
49
54
  "@koa/cors": "3.3.0",
50
55
  "@koa/router": "10.1.1",
51
- "@rollup/plugin-alias": "^3.1.9",
52
- "@rollup/plugin-node-resolve": "^13.3.0",
53
- "@rollup/plugin-typescript": "^8.3.2",
54
56
  "@types/express-serve-static-core": "^4.17.28",
55
- "@types/form-data": "2.5.0",
56
- "@types/jest": "27.0.0",
57
57
  "@types/koa": "2.13.4",
58
- "@types/node": "17.0.38",
59
- "@types/promise": "7.1.30",
60
58
  "@types/ws": "8.5.3",
61
- "@typescript-eslint/eslint-plugin": "5.27.0",
62
- "@typescript-eslint/parser": "5.27.0",
63
- "chalk": "4.1.0",
64
59
  "data-uri-to-buffer": "3.0.1",
65
60
  "dataurl-to-blob": "0.0.1",
66
- "dotenv": "8.2.0",
67
- "dts-bundle-generator": "6.9.0",
68
- "eslint": "8.2.0",
69
- "eslint-config-prettier": "8.3.0",
70
- "eslint-plugin-prettier": "4.0.0",
71
- "jest": "^28.1.0",
72
61
  "jest-environment-jsdom": "28.1.0",
73
62
  "jest-websocket-mock": "2.3.0",
74
63
  "koa": "2.13.4",
75
64
  "koa-add-trailing-slashes": "2.0.1",
76
65
  "koa-body": "5.0.0",
77
66
  "mock-socket": "9.0.3",
78
- "prettier": "2.2.1",
79
- "prettier-config-standard": "4.0.0",
80
- "rimraf": "3.0.2",
81
- "rollup": "^2.75.5",
82
- "shipjs": "0.24.0",
83
- "start-server-and-test": "1.11.7",
84
- "ts-jest": "28.0.3",
85
- "ts-node": "^10.8.0",
86
- "tslib": "^2.4.0",
87
- "typescript": "^4.7.2"
67
+ "start-server-and-test": "1.14.0",
68
+ "@uploadcare/api-client-utils": "^4.2.1",
69
+ "chalk": "^4.1.2"
88
70
  },
89
71
  "dependencies": {
90
72
  "form-data": "^4.0.0",