@engine9/input-tools 2.0.10 → 2.0.11
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/FileUtilities.js +3 -3
- package/file/S3.js +2 -2
- package/package.json +1 -1
package/file/FileUtilities.js
CHANGED
|
@@ -657,11 +657,11 @@ Worker.prototype.list.metadata = {
|
|
|
657
657
|
directory: { required: true }
|
|
658
658
|
}
|
|
659
659
|
};
|
|
660
|
-
Worker.prototype.
|
|
660
|
+
Worker.prototype.analyzeDirectory = async function ({ directory }) {
|
|
661
661
|
if (!directory) throw new Error('directory is required');
|
|
662
662
|
if (directory.startsWith('s3://') || directory.startsWith('r2://')) {
|
|
663
663
|
const worker = new (directory.startsWith('r2://') ? R2Worker : S3Worker)(this);
|
|
664
|
-
return worker.
|
|
664
|
+
return worker.analyzeDirectory({ directory });
|
|
665
665
|
}
|
|
666
666
|
let fileCount = 0;
|
|
667
667
|
let directoryCount = 0;
|
|
@@ -704,7 +704,7 @@ Worker.prototype.analyze = async function ({ directory }) {
|
|
|
704
704
|
lastModified: fileCount ? lastModified : null
|
|
705
705
|
};
|
|
706
706
|
};
|
|
707
|
-
Worker.prototype.
|
|
707
|
+
Worker.prototype.analyzeDirectory.metadata = {
|
|
708
708
|
options: {
|
|
709
709
|
directory: { required: true }
|
|
710
710
|
}
|
package/file/S3.js
CHANGED
|
@@ -233,7 +233,7 @@ Worker.prototype.list.metadata = {
|
|
|
233
233
|
directory: { required: true }
|
|
234
234
|
}
|
|
235
235
|
};
|
|
236
|
-
Worker.prototype.
|
|
236
|
+
Worker.prototype.analyzeDirectory = async function ({ directory }) {
|
|
237
237
|
if (!directory) throw new Error('directory is required');
|
|
238
238
|
let dir = directory;
|
|
239
239
|
while (dir.slice(-1) === '/') dir = dir.slice(0, -1);
|
|
@@ -295,7 +295,7 @@ Worker.prototype.analyze = async function ({ directory }) {
|
|
|
295
295
|
lastModified: fileCount ? lastModified : null
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
|
-
Worker.prototype.
|
|
298
|
+
Worker.prototype.analyzeDirectory.metadata = {
|
|
299
299
|
options: {
|
|
300
300
|
directory: { required: true }
|
|
301
301
|
}
|