@poe-platform/safe-bash 0.1.671 → 0.1.672
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.
|
@@ -347,7 +347,11 @@ async function installFile(operation, sourceDisplay, destinationDisplay) {
|
|
|
347
347
|
if (closed)
|
|
348
348
|
throw new FsError("EBADF");
|
|
349
349
|
let chunks;
|
|
350
|
-
|
|
350
|
+
const capabilities = await context.fs.capabilitiesFor?.(source, fsOptions) ?? context.fs.capabilities;
|
|
351
|
+
context.signal.throwIfAborted();
|
|
352
|
+
if (closed)
|
|
353
|
+
throw new FsError("EBADF");
|
|
354
|
+
if (context.fs.open && capabilities.open !== false) {
|
|
351
355
|
opening = context.fs.open(source, { ...fsOptions, access: "read", creation: "never" });
|
|
352
356
|
const descriptor = await opening;
|
|
353
357
|
context.signal.throwIfAborted();
|
|
@@ -383,7 +387,7 @@ async function installFile(operation, sourceDisplay, destinationDisplay) {
|
|
|
383
387
|
})();
|
|
384
388
|
}
|
|
385
389
|
else
|
|
386
|
-
chunks = context.fs.readStream &&
|
|
390
|
+
chunks = context.fs.readStream && capabilities.streamingRead !== false ? context.fs.readStream(source, fsOptions)
|
|
387
391
|
: (async function* () { yield await context.fs.readFile(source, { ...fsOptions, maxBytes: maxFileBytes }); })();
|
|
388
392
|
iterator = chunks[Symbol.asyncIterator]();
|
|
389
393
|
let size = 0, untilYield = 65536;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@poe-platform/safe-bash",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.672",
|
|
4
4
|
"description": "Extensible virtual shell with pluggable filesystems and streaming commands",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
"access": "public"
|
|
366
366
|
},
|
|
367
367
|
"dependencies": {
|
|
368
|
-
"@poe-platform/safe-fs": "0.1.
|
|
368
|
+
"@poe-platform/safe-fs": "0.1.672",
|
|
369
369
|
"pako": "3.0.1",
|
|
370
370
|
"@types/node": "^25.2.2",
|
|
371
371
|
"@noble/hashes": "2.4.0",
|