@flowscripter/pluggable-io-framework 1.2.5 → 1.2.7
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/dist/src/copyMove.d.ts.map +1 -1
- package/dist/src/copyMove.js +8 -5
- package/package.json +5 -5
- package/src/copyMove.ts +9 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copyMove.d.ts","sourceRoot":"","sources":["../../src/copyMove.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,UAAU,EAIf,KAAK,cAAc,EACpB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;IACpC,6FAA6F;IAC7F,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACjD,sFAAsF;IACtF,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;CAC/B;
|
|
1
|
+
{"version":3,"file":"copyMove.d.ts","sourceRoot":"","sources":["../../src/copyMove.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAEnB,KAAK,UAAU,EAIf,KAAK,cAAc,EACpB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC;IACpC,6FAA6F;IAC7F,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC;IACzC;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACjD,sFAAsF;IACtF,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;CAC/B;AAmXD;;;;;;;;;;;;GAYG;AACH,wBAAsB,IAAI,CACxB,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAOf;AAED;;;;;GAKG;AACH,wBAAsB,IAAI,CACxB,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,IAAI,CAAC,CAOf"}
|
package/dist/src/copyMove.js
CHANGED
|
@@ -183,15 +183,18 @@ async function resolveRecursiveDestRoot(sourcePath, sink, destPath) {
|
|
|
183
183
|
return joinPath(destPath, baseName);
|
|
184
184
|
}
|
|
185
185
|
async function recursiveTransfer(source, sourcePath, sink, destPath, options, mode) {
|
|
186
|
+
const resolvedDestRoot = await resolveRecursiveDestRoot(sourcePath, sink, destPath);
|
|
186
187
|
if (source.canDirectTransfer?.(sink) && source.supportsRecursiveDirectTransfer) {
|
|
187
|
-
const
|
|
188
|
-
if (
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
const telemetry = { operationId: crypto.randomUUID(), hooks: options.telemetry ?? {} };
|
|
189
|
+
if (mode === "copy" && source.directCopy) {
|
|
190
|
+
await source.directCopy(sourcePath, resolvedDestRoot, telemetry);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (mode === "move" && source.directMove) {
|
|
194
|
+
await source.directMove(sourcePath, resolvedDestRoot, telemetry);
|
|
191
195
|
return;
|
|
192
196
|
}
|
|
193
197
|
}
|
|
194
|
-
const resolvedDestRoot = await resolveRecursiveDestRoot(sourcePath, sink, destPath);
|
|
195
198
|
const recursiveOperationId = crypto.randomUUID();
|
|
196
199
|
const limiter = options.concurrencyLimiter ?? defaultConcurrencyLimiter;
|
|
197
200
|
let discovered = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowscripter/pluggable-io-framework",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "A pluggable source/sink IO framework using https://github.com/flowscripter/dynamic-plugin-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"test": "bun test"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@flowscripter/dynamic-plugin-framework": "^2.2.
|
|
44
|
-
"@flowscripter/pluggable-io-framework-api": "^1.1.
|
|
43
|
+
"@flowscripter/dynamic-plugin-framework": "^2.2.14",
|
|
44
|
+
"@flowscripter/pluggable-io-framework-api": "^1.1.6"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/bun": "^1.4.2",
|
|
48
|
-
"oxfmt": "0.
|
|
49
|
-
"oxlint": "1.
|
|
48
|
+
"oxfmt": "0.71.0",
|
|
49
|
+
"oxlint": "1.86.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"typescript": "^7.0.2"
|
package/src/copyMove.ts
CHANGED
|
@@ -324,16 +324,20 @@ async function recursiveTransfer(
|
|
|
324
324
|
options: TransferOptions,
|
|
325
325
|
mode: "copy" | "move",
|
|
326
326
|
): Promise<void> {
|
|
327
|
+
const resolvedDestRoot = await resolveRecursiveDestRoot(sourcePath, sink, destPath);
|
|
328
|
+
|
|
327
329
|
if (source.canDirectTransfer?.(sink) && source.supportsRecursiveDirectTransfer) {
|
|
328
|
-
const
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
|
|
330
|
+
const telemetry = { operationId: crypto.randomUUID(), hooks: options.telemetry ?? {} };
|
|
331
|
+
if (mode === "copy" && source.directCopy) {
|
|
332
|
+
await source.directCopy(sourcePath, resolvedDestRoot, telemetry);
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
if (mode === "move" && source.directMove) {
|
|
336
|
+
await source.directMove(sourcePath, resolvedDestRoot, telemetry);
|
|
332
337
|
return;
|
|
333
338
|
}
|
|
334
339
|
}
|
|
335
340
|
|
|
336
|
-
const resolvedDestRoot = await resolveRecursiveDestRoot(sourcePath, sink, destPath);
|
|
337
341
|
const recursiveOperationId = crypto.randomUUID();
|
|
338
342
|
const limiter = options.concurrencyLimiter ?? defaultConcurrencyLimiter;
|
|
339
343
|
|