@engine9-io/input-tools 1.8.8 → 1.8.9
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/file/S3.js +2 -1
- package/package.json +1 -1
package/file/S3.js
CHANGED
|
@@ -12,7 +12,6 @@ const {
|
|
|
12
12
|
ListObjectsV2Command
|
|
13
13
|
} = require('@aws-sdk/client-s3');
|
|
14
14
|
const { getTempFilename } = require('./tools');
|
|
15
|
-
const { default: pLimit } = require('p-limit');
|
|
16
15
|
|
|
17
16
|
function Worker() {
|
|
18
17
|
this.prefix = 's3';
|
|
@@ -303,6 +302,8 @@ Worker.prototype.moveAll = async function ({ directory, targetDirectory }) {
|
|
|
303
302
|
target: d.replace(directory, targetDirectory)
|
|
304
303
|
}));
|
|
305
304
|
|
|
305
|
+
const pLimit = await import('p-limit');
|
|
306
|
+
pLimit.default();
|
|
306
307
|
const limitedMethod = pLimit(10);
|
|
307
308
|
|
|
308
309
|
return Promise.all(configs.map(({ filename, target }) => limitedMethod(async () => this.move({ filename, target }))));
|