@uploadcare/upload-client 6.6.0 → 6.7.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.
@@ -310,15 +310,14 @@ const getFileOptions = ({ name, contentType }) => [
310
310
  const transformFile = identity;
311
311
  var getFormData = () => new NodeFormData();
312
312
 
313
+ const isBuffer = (data) => data instanceof Buffer;
314
+
313
315
  const isBlob = (data) => {
314
316
  return typeof Blob !== 'undefined' && data instanceof Blob;
315
317
  };
316
318
  const isFile = (data) => {
317
319
  return typeof File !== 'undefined' && data instanceof File;
318
320
  };
319
- const isBuffer = (data) => {
320
- return typeof Buffer !== 'undefined' && data instanceof Buffer;
321
- };
322
321
  const isReactNativeAsset = (data) => {
323
322
  return (!!data &&
324
323
  typeof data === 'object' &&
@@ -427,7 +426,7 @@ const getUrl = (base, path, query) => {
427
426
  return url.toString();
428
427
  };
429
428
 
430
- var version = '6.6.0';
429
+ var version = '6.7.0';
431
430
 
432
431
  const LIBRARY_NAME = 'UploadcareUploadClient';
433
432
  const LIBRARY_VERSION = version;
@@ -801,6 +800,9 @@ function isReadyPoll({ file, publicKey, baseURL, source, integration, userAgent,
801
800
  });
802
801
  }
803
802
 
803
+ function isGroupFileInfo(fileInfo) {
804
+ return 'defaultEffects' in fileInfo;
805
+ }
804
806
  class UploadcareFile {
805
807
  uuid;
806
808
  name = null;
@@ -816,6 +818,7 @@ class UploadcareFile {
816
818
  contentInfo = null;
817
819
  metadata = null;
818
820
  s3Bucket = null;
821
+ defaultEffects = null;
819
822
  constructor(fileInfo, { baseCDN = defaultSettings.baseCDN, fileName } = {}) {
820
823
  const { uuid, s3Bucket } = fileInfo;
821
824
  const cdnUrl = getUrl(baseCDN, `${uuid}/`);
@@ -836,6 +839,9 @@ class UploadcareFile {
836
839
  this.metadata = fileInfo.metadata || null;
837
840
  this.s3Bucket = s3Bucket || null;
838
841
  this.s3Url = s3Url;
842
+ if (isGroupFileInfo(fileInfo)) {
843
+ this.defaultEffects = fileInfo.defaultEffects;
844
+ }
839
845
  }
840
846
  }
841
847
 
@@ -1514,14 +1520,16 @@ class UploadcareGroup {
1514
1520
  files;
1515
1521
  createdAt;
1516
1522
  storedAt = null;
1517
- constructor(groupInfo, files) {
1523
+ constructor(groupInfo, { baseCDN = defaultSettings.baseCDN } = {}) {
1518
1524
  this.uuid = groupInfo.id;
1519
1525
  this.filesCount = groupInfo.filesCount;
1520
- this.totalSize = Object.values(groupInfo.files).reduce((acc, file) => acc + file.size, 0);
1526
+ const groupFiles = groupInfo.files.filter(Boolean);
1527
+ this.totalSize = Object.values(groupFiles).reduce((acc, file) => acc + file.size, 0);
1521
1528
  this.isStored = !!groupInfo.datetimeStored;
1522
- this.isImage = !!Object.values(groupInfo.files).filter((file) => file.isImage).length;
1529
+ this.isImage = !!Object.values(groupFiles).filter((file) => file.isImage)
1530
+ .length;
1523
1531
  this.cdnUrl = groupInfo.cdnUrl;
1524
- this.files = files;
1532
+ this.files = groupFiles.map((fileInfo) => new UploadcareFile(fileInfo, { baseCDN }));
1525
1533
  this.createdAt = groupInfo.datetimeCreated;
1526
1534
  this.storedAt = groupInfo.datetimeStored;
1527
1535
  }
@@ -1579,27 +1587,34 @@ function uploadFileGroup(data, { publicKey, fileName, baseURL = defaultSettings.
1579
1587
  onProgress({ isComputable: true, value: normalize(progressValues) });
1580
1588
  };
1581
1589
  };
1582
- return Promise.all(data.map((file, index) => uploadFile(file, {
1583
- publicKey,
1584
- fileName,
1585
- baseURL,
1586
- secureSignature,
1587
- secureExpire,
1588
- store,
1589
- signal,
1590
- onProgress: createProgressHandler(filesCount, index),
1591
- source,
1592
- integration,
1593
- userAgent,
1594
- retryThrottledRequestMaxTimes,
1595
- retryNetworkErrorMaxTimes,
1596
- contentType,
1597
- multipartChunkSize,
1598
- baseCDN,
1599
- checkForUrlDuplicates,
1600
- saveUrlForRecurrentUploads
1601
- }))).then((files) => {
1602
- const uuids = files.map((file) => file.uuid);
1590
+ return Promise.all(data.map((file, index) => {
1591
+ if (isFileData(file) || isUrl(file)) {
1592
+ return uploadFile(file, {
1593
+ publicKey,
1594
+ fileName,
1595
+ baseURL,
1596
+ secureSignature,
1597
+ secureExpire,
1598
+ store,
1599
+ signal,
1600
+ onProgress: createProgressHandler(filesCount, index),
1601
+ source,
1602
+ integration,
1603
+ userAgent,
1604
+ retryThrottledRequestMaxTimes,
1605
+ retryNetworkErrorMaxTimes,
1606
+ contentType,
1607
+ multipartChunkSize,
1608
+ baseCDN,
1609
+ checkForUrlDuplicates,
1610
+ saveUrlForRecurrentUploads
1611
+ }).then((fileInfo) => fileInfo.uuid);
1612
+ }
1613
+ else {
1614
+ // Do not request file info by uuid before creating group because this isn't necessary
1615
+ return file;
1616
+ }
1617
+ })).then((uuids) => {
1603
1618
  return group(uuids, {
1604
1619
  publicKey,
1605
1620
  baseURL,
@@ -1613,7 +1628,7 @@ function uploadFileGroup(data, { publicKey, fileName, baseURL = defaultSettings.
1613
1628
  retryThrottledRequestMaxTimes,
1614
1629
  retryNetworkErrorMaxTimes
1615
1630
  })
1616
- .then((groupInfo) => new UploadcareGroup(groupInfo, files))
1631
+ .then((groupInfo) => new UploadcareGroup(groupInfo, { baseCDN }))
1617
1632
  .then((group) => {
1618
1633
  onProgress && onProgress({ isComputable: true, value: 1 });
1619
1634
  return group;
@@ -1684,32 +1699,32 @@ class UploadClient {
1684
1699
  }
1685
1700
 
1686
1701
  class Queue {
1687
- #concurrency = 1;
1688
- #pending = [];
1689
- #running = 0;
1690
- #resolvers = new WeakMap();
1691
- #rejectors = new WeakMap();
1702
+ _concurrency = 1;
1703
+ _pending = [];
1704
+ _running = 0;
1705
+ _resolvers = new Map();
1706
+ _rejectors = new Map();
1692
1707
  constructor(concurrency) {
1693
- this.#concurrency = concurrency;
1708
+ this._concurrency = concurrency;
1694
1709
  }
1695
- #run() {
1696
- const tasksLeft = this.#concurrency - this.#running;
1710
+ _run() {
1711
+ const tasksLeft = this._concurrency - this._running;
1697
1712
  for (let i = 0; i < tasksLeft; i++) {
1698
- const task = this.#pending.shift();
1713
+ const task = this._pending.shift();
1699
1714
  if (!task) {
1700
1715
  return;
1701
1716
  }
1702
- const resolver = this.#resolvers.get(task);
1703
- const rejector = this.#rejectors.get(task);
1717
+ const resolver = this._resolvers.get(task);
1718
+ const rejector = this._rejectors.get(task);
1704
1719
  if (!resolver || !rejector)
1705
1720
  throw new Error('Unexpected behavior: resolver or rejector is undefined');
1706
- this.#running += 1;
1721
+ this._running += 1;
1707
1722
  task()
1708
1723
  .finally(() => {
1709
- this.#resolvers.delete(task);
1710
- this.#rejectors.delete(task);
1711
- this.#running -= 1;
1712
- this.#run();
1724
+ this._resolvers.delete(task);
1725
+ this._rejectors.delete(task);
1726
+ this._running -= 1;
1727
+ this._run();
1713
1728
  })
1714
1729
  .then((value) => resolver(value))
1715
1730
  .catch((error) => rejector(error));
@@ -1717,24 +1732,24 @@ class Queue {
1717
1732
  }
1718
1733
  add(task) {
1719
1734
  return new Promise((resolve, reject) => {
1720
- this.#resolvers.set(task, resolve);
1721
- this.#rejectors.set(task, reject);
1722
- this.#pending.push(task);
1723
- this.#run();
1735
+ this._resolvers.set(task, resolve);
1736
+ this._rejectors.set(task, reject);
1737
+ this._pending.push(task);
1738
+ this._run();
1724
1739
  });
1725
1740
  }
1726
1741
  get pending() {
1727
- return this.#pending.length;
1742
+ return this._pending.length;
1728
1743
  }
1729
1744
  get running() {
1730
- return this.#running;
1745
+ return this._running;
1731
1746
  }
1732
1747
  set concurrency(value) {
1733
- this.#concurrency = value;
1734
- this.#run();
1748
+ this._concurrency = value;
1749
+ this._run();
1735
1750
  }
1736
1751
  get concurrency() {
1737
- return this.#concurrency;
1752
+ return this._concurrency;
1738
1753
  }
1739
1754
  }
1740
1755
 
@@ -126,12 +126,15 @@ export type FileInfo = {
126
126
  s3Bucket?: string;
127
127
  metadata?: Metadata;
128
128
  };
129
+ export type GroupFileInfo = FileInfo & {
130
+ defaultEffects: string;
131
+ };
129
132
  export type GroupInfo = {
130
133
  datetimeCreated: string;
131
134
  datetimeStored: string | null;
132
135
  filesCount: string;
133
136
  cdnUrl: string;
134
- files: FileInfo[];
137
+ files: (GroupFileInfo | null)[];
135
138
  url: string;
136
139
  id: GroupId;
137
140
  };
@@ -347,7 +350,8 @@ export declare class UploadcareFile {
347
350
  readonly contentInfo: null | ContentInfo;
348
351
  readonly metadata: null | Metadata;
349
352
  readonly s3Bucket: null | string;
350
- constructor(fileInfo: FileInfo, { baseCDN, fileName }?: {
353
+ readonly defaultEffects: null | string;
354
+ constructor(fileInfo: FileInfo | GroupFileInfo, { baseCDN, fileName }?: {
351
355
  baseCDN?: string;
352
356
  fileName?: string;
353
357
  });
@@ -449,7 +453,9 @@ export declare class UploadcareGroup {
449
453
  readonly files: UploadcareFile[];
450
454
  readonly createdAt: string;
451
455
  readonly storedAt: string | null;
452
- constructor(groupInfo: GroupInfo, files: UploadcareFile[]);
456
+ constructor(groupInfo: GroupInfo, { baseCDN }?: {
457
+ baseCDN?: string;
458
+ });
453
459
  }
454
460
  export type GroupFromOptions = {
455
461
  jsonpCallback?: string;
@@ -474,8 +480,13 @@ export declare class UploadClient {
474
480
  }
475
481
  export type Task<T = unknown> = () => Promise<T>;
476
482
  export declare class Queue {
477
- #private;
483
+ private _concurrency;
484
+ private _pending;
485
+ private _running;
486
+ private _resolvers;
487
+ private _rejectors;
478
488
  constructor(concurrency: number);
489
+ private _run;
479
490
  add<T>(task: Task<T>): Promise<T>;
480
491
  get pending(): number;
481
492
  get running(): number;
@@ -270,15 +270,14 @@ const request = ({ method, url, data, headers = {}, signal, onProgress }) => new
270
270
  }
271
271
  });
272
272
 
273
+ const isBuffer = (data) => false;
274
+
273
275
  const isBlob = (data) => {
274
276
  return typeof Blob !== 'undefined' && data instanceof Blob;
275
277
  };
276
278
  const isFile = (data) => {
277
279
  return typeof File !== 'undefined' && data instanceof File;
278
280
  };
279
- const isBuffer = (data) => {
280
- return typeof Buffer !== 'undefined' && data instanceof Buffer;
281
- };
282
281
  const isReactNativeAsset = (data) => {
283
282
  return (!!data &&
284
283
  typeof data === 'object' &&
@@ -287,7 +286,7 @@ const isReactNativeAsset = (data) => {
287
286
  typeof data.uri === 'string');
288
287
  };
289
288
  const isFileData = (data) => {
290
- return (isBlob(data) || isFile(data) || isBuffer(data) || isReactNativeAsset(data));
289
+ return (isBlob(data) || isFile(data) || isBuffer() || isReactNativeAsset(data));
291
290
  };
292
291
 
293
292
  const getFileOptions = () => [];
@@ -404,7 +403,7 @@ const getUrl = (base, path, query) => {
404
403
  return url.toString();
405
404
  };
406
405
 
407
- var version = '6.6.0';
406
+ var version = '6.7.0';
408
407
 
409
408
  const LIBRARY_NAME = 'UploadcareUploadClient';
410
409
  const LIBRARY_VERSION = version;
@@ -459,7 +458,7 @@ const getFileName = (file) => {
459
458
  if (isFile(file) && file.name) {
460
459
  filename = file.name;
461
460
  }
462
- else if (isBlob(file) || isBuffer(file)) {
461
+ else if (isBlob(file) || isBuffer()) {
463
462
  filename = '';
464
463
  }
465
464
  else if (isReactNativeAsset(file) && file.name) {
@@ -778,6 +777,9 @@ function isReadyPoll({ file, publicKey, baseURL, source, integration, userAgent,
778
777
  });
779
778
  }
780
779
 
780
+ function isGroupFileInfo(fileInfo) {
781
+ return 'defaultEffects' in fileInfo;
782
+ }
781
783
  class UploadcareFile {
782
784
  uuid;
783
785
  name = null;
@@ -793,6 +795,7 @@ class UploadcareFile {
793
795
  contentInfo = null;
794
796
  metadata = null;
795
797
  s3Bucket = null;
798
+ defaultEffects = null;
796
799
  constructor(fileInfo, { baseCDN = defaultSettings.baseCDN, fileName } = {}) {
797
800
  const { uuid, s3Bucket } = fileInfo;
798
801
  const cdnUrl = getUrl(baseCDN, `${uuid}/`);
@@ -813,6 +816,9 @@ class UploadcareFile {
813
816
  this.metadata = fileInfo.metadata || null;
814
817
  this.s3Bucket = s3Bucket || null;
815
818
  this.s3Url = s3Url;
819
+ if (isGroupFileInfo(fileInfo)) {
820
+ this.defaultEffects = fileInfo.defaultEffects;
821
+ }
816
822
  }
817
823
  }
818
824
 
@@ -1224,9 +1230,6 @@ const getBlobFromReactNativeAsset = async (asset) => {
1224
1230
  };
1225
1231
 
1226
1232
  const getFileSize = async (file) => {
1227
- if (isBuffer(file)) {
1228
- return file.length;
1229
- }
1230
1233
  if (isFile(file) || isBlob(file)) {
1231
1234
  return file.size;
1232
1235
  }
@@ -1513,14 +1516,16 @@ class UploadcareGroup {
1513
1516
  files;
1514
1517
  createdAt;
1515
1518
  storedAt = null;
1516
- constructor(groupInfo, files) {
1519
+ constructor(groupInfo, { baseCDN = defaultSettings.baseCDN } = {}) {
1517
1520
  this.uuid = groupInfo.id;
1518
1521
  this.filesCount = groupInfo.filesCount;
1519
- this.totalSize = Object.values(groupInfo.files).reduce((acc, file) => acc + file.size, 0);
1522
+ const groupFiles = groupInfo.files.filter(Boolean);
1523
+ this.totalSize = Object.values(groupFiles).reduce((acc, file) => acc + file.size, 0);
1520
1524
  this.isStored = !!groupInfo.datetimeStored;
1521
- this.isImage = !!Object.values(groupInfo.files).filter((file) => file.isImage).length;
1525
+ this.isImage = !!Object.values(groupFiles).filter((file) => file.isImage)
1526
+ .length;
1522
1527
  this.cdnUrl = groupInfo.cdnUrl;
1523
- this.files = files;
1528
+ this.files = groupFiles.map((fileInfo) => new UploadcareFile(fileInfo, { baseCDN }));
1524
1529
  this.createdAt = groupInfo.datetimeCreated;
1525
1530
  this.storedAt = groupInfo.datetimeStored;
1526
1531
  }
@@ -1578,27 +1583,34 @@ function uploadFileGroup(data, { publicKey, fileName, baseURL = defaultSettings.
1578
1583
  onProgress({ isComputable: true, value: normalize(progressValues) });
1579
1584
  };
1580
1585
  };
1581
- return Promise.all(data.map((file, index) => uploadFile(file, {
1582
- publicKey,
1583
- fileName,
1584
- baseURL,
1585
- secureSignature,
1586
- secureExpire,
1587
- store,
1588
- signal,
1589
- onProgress: createProgressHandler(filesCount, index),
1590
- source,
1591
- integration,
1592
- userAgent,
1593
- retryThrottledRequestMaxTimes,
1594
- retryNetworkErrorMaxTimes,
1595
- contentType,
1596
- multipartChunkSize,
1597
- baseCDN,
1598
- checkForUrlDuplicates,
1599
- saveUrlForRecurrentUploads
1600
- }))).then((files) => {
1601
- const uuids = files.map((file) => file.uuid);
1586
+ return Promise.all(data.map((file, index) => {
1587
+ if (isFileData(file) || isUrl(file)) {
1588
+ return uploadFile(file, {
1589
+ publicKey,
1590
+ fileName,
1591
+ baseURL,
1592
+ secureSignature,
1593
+ secureExpire,
1594
+ store,
1595
+ signal,
1596
+ onProgress: createProgressHandler(filesCount, index),
1597
+ source,
1598
+ integration,
1599
+ userAgent,
1600
+ retryThrottledRequestMaxTimes,
1601
+ retryNetworkErrorMaxTimes,
1602
+ contentType,
1603
+ multipartChunkSize,
1604
+ baseCDN,
1605
+ checkForUrlDuplicates,
1606
+ saveUrlForRecurrentUploads
1607
+ }).then((fileInfo) => fileInfo.uuid);
1608
+ }
1609
+ else {
1610
+ // Do not request file info by uuid before creating group because this isn't necessary
1611
+ return file;
1612
+ }
1613
+ })).then((uuids) => {
1602
1614
  return group(uuids, {
1603
1615
  publicKey,
1604
1616
  baseURL,
@@ -1612,7 +1624,7 @@ function uploadFileGroup(data, { publicKey, fileName, baseURL = defaultSettings.
1612
1624
  retryThrottledRequestMaxTimes,
1613
1625
  retryNetworkErrorMaxTimes
1614
1626
  })
1615
- .then((groupInfo) => new UploadcareGroup(groupInfo, files))
1627
+ .then((groupInfo) => new UploadcareGroup(groupInfo, { baseCDN }))
1616
1628
  .then((group) => {
1617
1629
  onProgress && onProgress({ isComputable: true, value: 1 });
1618
1630
  return group;
@@ -1683,32 +1695,32 @@ class UploadClient {
1683
1695
  }
1684
1696
 
1685
1697
  class Queue {
1686
- #concurrency = 1;
1687
- #pending = [];
1688
- #running = 0;
1689
- #resolvers = new WeakMap();
1690
- #rejectors = new WeakMap();
1698
+ _concurrency = 1;
1699
+ _pending = [];
1700
+ _running = 0;
1701
+ _resolvers = new Map();
1702
+ _rejectors = new Map();
1691
1703
  constructor(concurrency) {
1692
- this.#concurrency = concurrency;
1704
+ this._concurrency = concurrency;
1693
1705
  }
1694
- #run() {
1695
- const tasksLeft = this.#concurrency - this.#running;
1706
+ _run() {
1707
+ const tasksLeft = this._concurrency - this._running;
1696
1708
  for (let i = 0; i < tasksLeft; i++) {
1697
- const task = this.#pending.shift();
1709
+ const task = this._pending.shift();
1698
1710
  if (!task) {
1699
1711
  return;
1700
1712
  }
1701
- const resolver = this.#resolvers.get(task);
1702
- const rejector = this.#rejectors.get(task);
1713
+ const resolver = this._resolvers.get(task);
1714
+ const rejector = this._rejectors.get(task);
1703
1715
  if (!resolver || !rejector)
1704
1716
  throw new Error('Unexpected behavior: resolver or rejector is undefined');
1705
- this.#running += 1;
1717
+ this._running += 1;
1706
1718
  task()
1707
1719
  .finally(() => {
1708
- this.#resolvers.delete(task);
1709
- this.#rejectors.delete(task);
1710
- this.#running -= 1;
1711
- this.#run();
1720
+ this._resolvers.delete(task);
1721
+ this._rejectors.delete(task);
1722
+ this._running -= 1;
1723
+ this._run();
1712
1724
  })
1713
1725
  .then((value) => resolver(value))
1714
1726
  .catch((error) => rejector(error));
@@ -1716,24 +1728,24 @@ class Queue {
1716
1728
  }
1717
1729
  add(task) {
1718
1730
  return new Promise((resolve, reject) => {
1719
- this.#resolvers.set(task, resolve);
1720
- this.#rejectors.set(task, reject);
1721
- this.#pending.push(task);
1722
- this.#run();
1731
+ this._resolvers.set(task, resolve);
1732
+ this._rejectors.set(task, reject);
1733
+ this._pending.push(task);
1734
+ this._run();
1723
1735
  });
1724
1736
  }
1725
1737
  get pending() {
1726
- return this.#pending.length;
1738
+ return this._pending.length;
1727
1739
  }
1728
1740
  get running() {
1729
- return this.#running;
1741
+ return this._running;
1730
1742
  }
1731
1743
  set concurrency(value) {
1732
- this.#concurrency = value;
1733
- this.#run();
1744
+ this._concurrency = value;
1745
+ this._run();
1734
1746
  }
1735
1747
  get concurrency() {
1736
- return this.#concurrency;
1748
+ return this._concurrency;
1737
1749
  }
1738
1750
  }
1739
1751
 
package/dist/index.d.ts CHANGED
@@ -126,12 +126,15 @@ export type FileInfo = {
126
126
  s3Bucket?: string;
127
127
  metadata?: Metadata;
128
128
  };
129
+ export type GroupFileInfo = FileInfo & {
130
+ defaultEffects: string;
131
+ };
129
132
  export type GroupInfo = {
130
133
  datetimeCreated: string;
131
134
  datetimeStored: string | null;
132
135
  filesCount: string;
133
136
  cdnUrl: string;
134
- files: FileInfo[];
137
+ files: (GroupFileInfo | null)[];
135
138
  url: string;
136
139
  id: GroupId;
137
140
  };
@@ -347,7 +350,8 @@ export declare class UploadcareFile {
347
350
  readonly contentInfo: null | ContentInfo;
348
351
  readonly metadata: null | Metadata;
349
352
  readonly s3Bucket: null | string;
350
- constructor(fileInfo: FileInfo, { baseCDN, fileName }?: {
353
+ readonly defaultEffects: null | string;
354
+ constructor(fileInfo: FileInfo | GroupFileInfo, { baseCDN, fileName }?: {
351
355
  baseCDN?: string;
352
356
  fileName?: string;
353
357
  });
@@ -449,7 +453,9 @@ export declare class UploadcareGroup {
449
453
  readonly files: UploadcareFile[];
450
454
  readonly createdAt: string;
451
455
  readonly storedAt: string | null;
452
- constructor(groupInfo: GroupInfo, files: UploadcareFile[]);
456
+ constructor(groupInfo: GroupInfo, { baseCDN }?: {
457
+ baseCDN?: string;
458
+ });
453
459
  }
454
460
  export type GroupFromOptions = {
455
461
  jsonpCallback?: string;
@@ -474,8 +480,13 @@ export declare class UploadClient {
474
480
  }
475
481
  export type Task<T = unknown> = () => Promise<T>;
476
482
  export declare class Queue {
477
- #private;
483
+ private _concurrency;
484
+ private _pending;
485
+ private _running;
486
+ private _resolvers;
487
+ private _rejectors;
478
488
  constructor(concurrency: number);
489
+ private _run;
479
490
  add<T>(task: Task<T>): Promise<T>;
480
491
  get pending(): number;
481
492
  get running(): number;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@uploadcare/upload-client",
3
- "version": "6.6.0",
3
+ "version": "6.7.0",
4
4
  "description": "Library for work with Uploadcare Upload API",
5
5
  "type": "module",
6
6
  "module": "./dist/esm/index.node.mjs",
7
7
  "browser": "./dist/esm/index.browser.mjs",
8
- "react-native": "./dist/index.react-native.js",
8
+ "react-native": "./dist/index.react-native.mjs",
9
9
  "types": "./dist/index.d.ts",
10
10
  "exports": {
11
11
  ".": {
@@ -90,7 +90,7 @@
90
90
  "koa-body": "5.0.0",
91
91
  "mock-socket": "9.0.3",
92
92
  "start-server-and-test": "1.14.0",
93
- "@uploadcare/api-client-utils": "^6.6.0",
93
+ "@uploadcare/api-client-utils": "^6.7.0",
94
94
  "chalk": "^4.1.2"
95
95
  },
96
96
  "dependencies": {