poe-code 14.0.21 → 14.0.23

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.
Files changed (161) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/index.js.map +1 -1
  3. package/dist/metafile.json +1 -1
  4. package/package.json +1 -1
  5. package/packages/safe-bash/dist/browser.d.ts +5 -0
  6. package/packages/safe-bash/dist/browser.d.ts.map +1 -1
  7. package/packages/safe-bash/dist/browser.js +981 -134
  8. package/packages/safe-bash/dist/browser.js.map +4 -4
  9. package/packages/safe-bash/dist/commands/apply-patch/shared.js +2 -2
  10. package/packages/safe-bash/dist/commands/apply-patch/shared.js.map +1 -1
  11. package/packages/safe-bash/dist/commands/archive/internal.d.ts.map +1 -1
  12. package/packages/safe-bash/dist/commands/archive/internal.js +3 -2
  13. package/packages/safe-bash/dist/commands/archive/internal.js.map +1 -1
  14. package/packages/safe-bash/dist/commands/bytes/checksums/index.d.ts.map +1 -1
  15. package/packages/safe-bash/dist/commands/bytes/checksums/index.js +3 -2
  16. package/packages/safe-bash/dist/commands/bytes/checksums/index.js.map +1 -1
  17. package/packages/safe-bash/dist/commands/bytes/compression/gunzip.js +2 -2
  18. package/packages/safe-bash/dist/commands/bytes/compression/gunzip.js.map +1 -1
  19. package/packages/safe-bash/dist/commands/bytes/compression/stream.js +2 -2
  20. package/packages/safe-bash/dist/commands/bytes/compression/stream.js.map +1 -1
  21. package/packages/safe-bash/dist/commands/bytes/encoding/shared.js +3 -3
  22. package/packages/safe-bash/dist/commands/bytes/encoding/shared.js.map +1 -1
  23. package/packages/safe-bash/dist/commands/column/internal.d.ts.map +1 -1
  24. package/packages/safe-bash/dist/commands/column/internal.js +2 -1
  25. package/packages/safe-bash/dist/commands/column/internal.js.map +1 -1
  26. package/packages/safe-bash/dist/commands/diff-patch/shared.js +2 -2
  27. package/packages/safe-bash/dist/commands/diff-patch/shared.js.map +1 -1
  28. package/packages/safe-bash/dist/commands/du/budget.d.ts.map +1 -1
  29. package/packages/safe-bash/dist/commands/du/budget.js +3 -2
  30. package/packages/safe-bash/dist/commands/du/budget.js.map +1 -1
  31. package/packages/safe-bash/dist/commands/env-split.d.ts.map +1 -1
  32. package/packages/safe-bash/dist/commands/env-split.js +2 -1
  33. package/packages/safe-bash/dist/commands/env-split.js.map +1 -1
  34. package/packages/safe-bash/dist/commands/expr/internal.d.ts.map +1 -1
  35. package/packages/safe-bash/dist/commands/expr/internal.js +2 -1
  36. package/packages/safe-bash/dist/commands/expr/internal.js.map +1 -1
  37. package/packages/safe-bash/dist/commands/file/shared.d.ts.map +1 -1
  38. package/packages/safe-bash/dist/commands/file/shared.js +3 -2
  39. package/packages/safe-bash/dist/commands/file/shared.js.map +1 -1
  40. package/packages/safe-bash/dist/commands/find.d.ts.map +1 -1
  41. package/packages/safe-bash/dist/commands/find.js +12 -31
  42. package/packages/safe-bash/dist/commands/find.js.map +1 -1
  43. package/packages/safe-bash/dist/commands/html-to-markdown/budget.js +2 -2
  44. package/packages/safe-bash/dist/commands/html-to-markdown/budget.js.map +1 -1
  45. package/packages/safe-bash/dist/commands/metadata/internal.d.ts.map +1 -1
  46. package/packages/safe-bash/dist/commands/metadata/internal.js +2 -1
  47. package/packages/safe-bash/dist/commands/metadata/internal.js.map +1 -1
  48. package/packages/safe-bash/dist/commands/move.d.ts.map +1 -1
  49. package/packages/safe-bash/dist/commands/move.js +2 -1
  50. package/packages/safe-bash/dist/commands/move.js.map +1 -1
  51. package/packages/safe-bash/dist/commands/network/authorizer.d.ts +7 -0
  52. package/packages/safe-bash/dist/commands/network/authorizer.d.ts.map +1 -0
  53. package/packages/safe-bash/dist/commands/network/authorizer.js +48 -0
  54. package/packages/safe-bash/dist/commands/network/authorizer.js.map +1 -0
  55. package/packages/safe-bash/dist/commands/network/body.js +2 -2
  56. package/packages/safe-bash/dist/commands/network/body.js.map +1 -1
  57. package/packages/safe-bash/dist/commands/network/curl.js +2 -2
  58. package/packages/safe-bash/dist/commands/network/curl.js.map +1 -1
  59. package/packages/safe-bash/dist/commands/network/fetch-transport.d.ts +6 -0
  60. package/packages/safe-bash/dist/commands/network/fetch-transport.d.ts.map +1 -0
  61. package/packages/safe-bash/dist/commands/network/fetch-transport.js +82 -0
  62. package/packages/safe-bash/dist/commands/network/fetch-transport.js.map +1 -0
  63. package/packages/safe-bash/dist/commands/network/index.d.ts +2 -0
  64. package/packages/safe-bash/dist/commands/network/index.d.ts.map +1 -1
  65. package/packages/safe-bash/dist/commands/network/index.js +2 -0
  66. package/packages/safe-bash/dist/commands/network/index.js.map +1 -1
  67. package/packages/safe-bash/dist/commands/network/types.d.ts +1 -0
  68. package/packages/safe-bash/dist/commands/network/types.d.ts.map +1 -1
  69. package/packages/safe-bash/dist/commands/network/types.js +10 -0
  70. package/packages/safe-bash/dist/commands/network/types.js.map +1 -1
  71. package/packages/safe-bash/dist/commands/regex-execution/ere/limits.js +2 -2
  72. package/packages/safe-bash/dist/commands/regex-execution/ere/limits.js.map +1 -1
  73. package/packages/safe-bash/dist/commands/safejs/io.js +2 -2
  74. package/packages/safe-bash/dist/commands/safejs/io.js.map +1 -1
  75. package/packages/safe-bash/dist/commands/search/shared.js +2 -2
  76. package/packages/safe-bash/dist/commands/search/shared.js.map +1 -1
  77. package/packages/safe-bash/dist/commands/split/io.js +2 -2
  78. package/packages/safe-bash/dist/commands/split/io.js.map +1 -1
  79. package/packages/safe-bash/dist/commands/stream-format/shared.d.ts.map +1 -1
  80. package/packages/safe-bash/dist/commands/stream-format/shared.js +2 -1
  81. package/packages/safe-bash/dist/commands/stream-format/shared.js.map +1 -1
  82. package/packages/safe-bash/dist/commands/stream-inspection/shared.d.ts.map +1 -1
  83. package/packages/safe-bash/dist/commands/stream-inspection/shared.js +2 -1
  84. package/packages/safe-bash/dist/commands/stream-inspection/shared.js.map +1 -1
  85. package/packages/safe-bash/dist/commands/streams.d.ts.map +1 -1
  86. package/packages/safe-bash/dist/commands/streams.js +114 -13
  87. package/packages/safe-bash/dist/commands/streams.js.map +1 -1
  88. package/packages/safe-bash/dist/commands/structured/limits.js +2 -2
  89. package/packages/safe-bash/dist/commands/structured/limits.js.map +1 -1
  90. package/packages/safe-bash/dist/commands/table-text/internal.d.ts.map +1 -1
  91. package/packages/safe-bash/dist/commands/table-text/internal.js +2 -1
  92. package/packages/safe-bash/dist/commands/table-text/internal.js.map +1 -1
  93. package/packages/safe-bash/dist/commands/text-programs/shared.js +2 -2
  94. package/packages/safe-bash/dist/commands/text-programs/shared.js.map +1 -1
  95. package/packages/safe-bash/dist/commands/tree/io.js +2 -2
  96. package/packages/safe-bash/dist/commands/tree/io.js.map +1 -1
  97. package/packages/safe-bash/dist/contracts/yield.d.ts +13 -0
  98. package/packages/safe-bash/dist/contracts/yield.d.ts.map +1 -0
  99. package/packages/safe-bash/dist/contracts/yield.js +41 -0
  100. package/packages/safe-bash/dist/contracts/yield.js.map +1 -0
  101. package/packages/safe-bash/dist/shell/arithmetic.js +1 -1
  102. package/packages/safe-bash/dist/shell/arithmetic.js.map +1 -1
  103. package/packages/safe-bash/dist/shell/arrays/ledger.d.ts.map +1 -1
  104. package/packages/safe-bash/dist/shell/arrays/ledger.js +2 -9
  105. package/packages/safe-bash/dist/shell/arrays/ledger.js.map +1 -1
  106. package/packages/safe-bash/dist/shell/conditional.d.ts.map +1 -1
  107. package/packages/safe-bash/dist/shell/conditional.js +2 -1
  108. package/packages/safe-bash/dist/shell/conditional.js.map +1 -1
  109. package/packages/safe-bash/dist/shell/env-warning.d.ts +2 -0
  110. package/packages/safe-bash/dist/shell/env-warning.d.ts.map +1 -0
  111. package/packages/safe-bash/dist/shell/env-warning.js +12 -0
  112. package/packages/safe-bash/dist/shell/env-warning.js.map +1 -0
  113. package/packages/safe-bash/dist/shell/index.d.ts +1 -0
  114. package/packages/safe-bash/dist/shell/index.d.ts.map +1 -1
  115. package/packages/safe-bash/dist/shell/index.js +1 -0
  116. package/packages/safe-bash/dist/shell/index.js.map +1 -1
  117. package/packages/safe-bash/dist/shell/input.d.ts.map +1 -1
  118. package/packages/safe-bash/dist/shell/input.js +4 -3
  119. package/packages/safe-bash/dist/shell/input.js.map +1 -1
  120. package/packages/safe-bash/dist/shell/parser.d.ts.map +1 -1
  121. package/packages/safe-bash/dist/shell/parser.js +15 -1
  122. package/packages/safe-bash/dist/shell/parser.js.map +1 -1
  123. package/packages/safe-bash/dist/shell/pattern.d.ts.map +1 -1
  124. package/packages/safe-bash/dist/shell/pattern.js +3 -2
  125. package/packages/safe-bash/dist/shell/pattern.js.map +1 -1
  126. package/packages/safe-bash/dist/shell/runtime.d.ts +3 -2
  127. package/packages/safe-bash/dist/shell/runtime.d.ts.map +1 -1
  128. package/packages/safe-bash/dist/shell/runtime.js +57 -55
  129. package/packages/safe-bash/dist/shell/runtime.js.map +1 -1
  130. package/packages/safe-bash/dist/shell/shell.d.ts.map +1 -1
  131. package/packages/safe-bash/dist/shell/shell.js +4 -1
  132. package/packages/safe-bash/dist/shell/shell.js.map +1 -1
  133. package/packages/safe-bash/dist/shell/types.d.ts +2 -0
  134. package/packages/safe-bash/dist/shell/types.d.ts.map +1 -1
  135. package/packages/safe-bash/dist/shell/types.js.map +1 -1
  136. package/packages/safe-bash/dist/shell/worker-limits.d.ts +3 -0
  137. package/packages/safe-bash/dist/shell/worker-limits.d.ts.map +1 -0
  138. package/packages/safe-bash/dist/shell/worker-limits.js +14 -0
  139. package/packages/safe-bash/dist/shell/worker-limits.js.map +1 -0
  140. package/packages/safe-fs/dist/contracts/filesystem.d.ts +1 -0
  141. package/packages/safe-fs/dist/core.d.ts +1 -0
  142. package/packages/safe-fs/dist/fs/quota/index.d.ts +9 -0
  143. package/packages/safe-fs/dist/index.d.ts +1 -0
  144. package/packages/safe-js/dist/browser/chunks/{chunk-QGN6DKT5.js → chunk-EMJUKJ6C.js} +111 -1
  145. package/packages/safe-js/dist/browser/chunks/chunk-EMJUKJ6C.js.map +7 -0
  146. package/packages/safe-js/dist/browser/safe-fs-core.js +7 -3
  147. package/packages/safe-js/dist/browser/safe-fs.js +7 -3
  148. package/packages/safe-js/dist/chunks/{chunk-7M2SJPSZ.js → chunk-AFVEPD3R.js} +2 -2
  149. package/packages/safe-js/dist/chunks/{chunk-5XRQ3GNN.js → chunk-WGUFH7HF.js} +3 -3
  150. package/packages/safe-js/dist/chunks/{chunk-2QRYPKQQ.js → chunk-WMZQYBLB.js} +111 -1
  151. package/packages/safe-js/dist/chunks/chunk-WMZQYBLB.js.map +7 -0
  152. package/packages/safe-js/dist/cli.js +3 -3
  153. package/packages/safe-js/dist/index.js +3 -3
  154. package/packages/safe-js/dist/safe-fs-core.js +7 -3
  155. package/packages/safe-js/dist/safe-fs-core.js.map +1 -1
  156. package/packages/safe-js/dist/safe-fs-node.js +8 -4
  157. package/packages/safe-js/dist/safe-fs.js +8 -4
  158. package/packages/safe-js/dist/browser/chunks/chunk-QGN6DKT5.js.map +0 -7
  159. package/packages/safe-js/dist/chunks/chunk-2QRYPKQQ.js.map +0 -7
  160. /package/packages/safe-js/dist/chunks/{chunk-7M2SJPSZ.js.map → chunk-AFVEPD3R.js.map} +0 -0
  161. /package/packages/safe-js/dist/chunks/{chunk-5XRQ3GNN.js.map → chunk-WGUFH7HF.js.map} +0 -0
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  ACCESS_MODES,
3
+ FileSystemQuotaError,
3
4
  FsError,
4
5
  MemoryFileSystem,
5
6
  MountFileSystem,
@@ -29,10 +30,12 @@ import {
29
30
  resolvePath,
30
31
  toByteSource,
31
32
  toFsError,
32
- validatePath
33
- } from "./chunks/chunk-QGN6DKT5.js";
33
+ validatePath,
34
+ withFileSystemQuota
35
+ } from "./chunks/chunk-EMJUKJ6C.js";
34
36
  export {
35
37
  ACCESS_MODES,
38
+ FileSystemQuotaError,
36
39
  FsError,
37
40
  MemoryFileSystem,
38
41
  MountFileSystem,
@@ -62,6 +65,7 @@ export {
62
65
  resolvePath,
63
66
  toByteSource,
64
67
  toFsError,
65
- validatePath
68
+ validatePath,
69
+ withFileSystemQuota
66
70
  };
67
71
  //# sourceMappingURL=safe-fs-core.js.map
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  ACCESS_MODES,
3
+ FileSystemQuotaError,
3
4
  FsError,
4
5
  MemoryFileSystem,
5
6
  MountFileSystem,
@@ -29,10 +30,12 @@ import {
29
30
  resolvePath,
30
31
  toByteSource,
31
32
  toFsError,
32
- validatePath
33
- } from "./chunks/chunk-QGN6DKT5.js";
33
+ validatePath,
34
+ withFileSystemQuota
35
+ } from "./chunks/chunk-EMJUKJ6C.js";
34
36
  export {
35
37
  ACCESS_MODES,
38
+ FileSystemQuotaError,
36
39
  FsError,
37
40
  MemoryFileSystem,
38
41
  MountFileSystem,
@@ -62,6 +65,7 @@ export {
62
65
  resolvePath,
63
66
  toByteSource,
64
67
  toFsError,
65
- validatePath
68
+ validatePath,
69
+ withFileSystemQuota
66
70
  };
67
71
  //# sourceMappingURL=safe-fs.js.map
@@ -16,7 +16,7 @@ import {
16
16
  toByteSource,
17
17
  toFsError,
18
18
  validatePath
19
- } from "./chunk-2QRYPKQQ.js";
19
+ } from "./chunk-WMZQYBLB.js";
20
20
 
21
21
  // packages/safe-fs/src/contracts/path.ts
22
22
  import { posix } from "node:path";
@@ -2610,4 +2610,4 @@ export {
2610
2610
  createFileSystem,
2611
2611
  createNodeFileSystemAdapterRegistry
2612
2612
  };
2613
- //# sourceMappingURL=chunk-7M2SJPSZ.js.map
2613
+ //# sourceMappingURL=chunk-AFVEPD3R.js.map
@@ -34,11 +34,11 @@ import {
34
34
  createNodeFsBridge,
35
35
  readConfigRecord,
36
36
  validateFileSystemConfig
37
- } from "./chunk-7M2SJPSZ.js";
37
+ } from "./chunk-AFVEPD3R.js";
38
38
  import {
39
39
  FsError,
40
40
  isPathWithin
41
- } from "./chunk-2QRYPKQQ.js";
41
+ } from "./chunk-WMZQYBLB.js";
42
42
 
43
43
  // packages/safe-js/src/migrate.ts
44
44
  import { createHash } from "node:crypto";
@@ -8245,4 +8245,4 @@ export {
8245
8245
  parseMcpConfig,
8246
8246
  makeMcpModule
8247
8247
  };
8248
- //# sourceMappingURL=chunk-5XRQ3GNN.js.map
8248
+ //# sourceMappingURL=chunk-WGUFH7HF.js.map
@@ -2329,6 +2329,7 @@ var ReadOnlyFileSystem = class {
2329
2329
  const streamingRead = typeof filesystem.readStream === "function" ? filesystem.capabilities.streamingRead : false;
2330
2330
  this.#capabilities = Object.freeze({
2331
2331
  readOnly: true,
2332
+ append: false,
2332
2333
  symlinks: filesystem.capabilities.symlinks === true && typeof filesystem.readlink === "function",
2333
2334
  hardlinks: false,
2334
2335
  permissions: false,
@@ -2507,11 +2508,13 @@ var MountFileSystem = class _MountFileSystem {
2507
2508
  const streaming = (capability, method) => all(capability, [method]) ? true : mounts.some(({ backend }) => backend.capabilities[capability] !== false && typeof backend[method] === "function") ? void 0 : false;
2508
2509
  const streamingRead = streaming("streamingRead", "readStream");
2509
2510
  const streamingWrite = streaming("streamingWrite", "writeStream");
2511
+ const append = all("append") ? true : mounts.every(({ backend }) => backend.capabilities.append === false) ? false : void 0;
2510
2512
  this.capabilities = Object.freeze({
2511
2513
  get snapshotRmdir() {
2512
2514
  return mounts.some(({ backend }) => backend.capabilities.snapshotRmdir === true);
2513
2515
  },
2514
2516
  readOnly: all("readOnly"),
2517
+ ...append === void 0 ? {} : { append },
2515
2518
  symlinks: all("symlinks", ["readlink", "symlink"]),
2516
2519
  hardlinks: all("hardlinks", ["link"]),
2517
2520
  permissions: all("permissions", ["chmod"]),
@@ -2996,8 +2999,10 @@ var OverlayFileSystem = class {
2996
2999
  const readable = [this.#upper, this.#lower].map((backend) => typeof backend.readStream === "function" ? backend.capabilities.streamingRead : false);
2997
3000
  const streamingRead = readable.every((capability) => capability === true) ? true : readable.every((capability) => capability === false) ? false : void 0;
2998
3001
  const streamingWrite = writable && this.#upper.capabilities.streamingWrite === true && this.#upper.capabilities.streamingRead === true && typeof this.#upper.writeStream === "function" && typeof this.#upper.readStream === "function" ? readable.every((capability) => capability === true) ? true : void 0 : false;
3002
+ const append = !writable || this.#upper.capabilities.append === false ? false : this.#upper.capabilities.append === true ? true : void 0;
2999
3003
  this.capabilities = Object.freeze({
3000
3004
  readOnly: !writable,
3005
+ ...append === void 0 ? {} : { append },
3001
3006
  atomicRename: false,
3002
3007
  hardlinks: false,
3003
3008
  symlinks: writable && this.#upper.capabilities.symlinks === true && typeof this.#upper.symlink === "function" && typeof this.#upper.readlink === "function" && (this.#lower.capabilities.symlinks !== true || typeof this.#lower.readlink === "function"),
@@ -3688,6 +3693,109 @@ function createOverlayFileSystem(options) {
3688
3693
  return new OverlayFileSystem(options);
3689
3694
  }
3690
3695
 
3696
+ // packages/safe-fs/src/fs/quota/index.ts
3697
+ var FileSystemQuotaError = class extends Error {
3698
+ constructor(maxBytes) {
3699
+ super(`Filesystem quota exceeded (${maxBytes} bytes)`);
3700
+ this.maxBytes = maxBytes;
3701
+ this.name = "FileSystemQuotaError";
3702
+ }
3703
+ maxBytes;
3704
+ };
3705
+ async function usedBytes(fs, options) {
3706
+ let total = 0;
3707
+ const pending = ["/"];
3708
+ while (pending.length) {
3709
+ const directory = pending.pop();
3710
+ for (const entry of await fs.readdir(directory, options)) {
3711
+ const path = `${directory === "/" ? "" : directory}/${entry.name}`;
3712
+ if (entry.type === "directory") pending.push(path);
3713
+ else total += (await fs.lstat(path, options)).size;
3714
+ }
3715
+ }
3716
+ return total;
3717
+ }
3718
+ async function existingBytes(fs, path, options) {
3719
+ try {
3720
+ const stat = await fs.lstat(path, options);
3721
+ return stat.type === "directory" ? 0 : stat.size;
3722
+ } catch (error) {
3723
+ if (error instanceof Error && "code" in error && error.code === "ENOENT") return 0;
3724
+ throw error;
3725
+ }
3726
+ }
3727
+ function withFileSystemQuota(fs, options) {
3728
+ if (!Number.isSafeInteger(options.maxBytes) || options.maxBytes < 0) throw new RangeError("maxBytes must be a nonnegative safe integer");
3729
+ let queue = Promise.resolve();
3730
+ const mutate = (operation) => {
3731
+ const result = queue.then(operation);
3732
+ queue = result.catch(() => void 0);
3733
+ return result;
3734
+ };
3735
+ const assertDelta = async (path, nextBytes, fsOptions) => {
3736
+ const current = await existingBytes(fs, path, fsOptions);
3737
+ if (await usedBytes(fs, fsOptions) - current + nextBytes > options.maxBytes) throw new FileSystemQuotaError(options.maxBytes);
3738
+ };
3739
+ const mutations = {
3740
+ writeFile(path, data, writeOptions) {
3741
+ return mutate(async () => {
3742
+ const append = writeOptions?.flag === "a" || writeOptions?.flag === "ax";
3743
+ const current = append ? await existingBytes(fs, path, writeOptions) : 0;
3744
+ await assertDelta(path, current + data.length, writeOptions);
3745
+ await fs.writeFile(path, data, writeOptions);
3746
+ });
3747
+ },
3748
+ appendFile(path, data, appendOptions) {
3749
+ return mutate(async () => {
3750
+ await assertDelta(path, await existingBytes(fs, path, appendOptions) + data.length, appendOptions);
3751
+ await fs.appendFile(path, data, appendOptions);
3752
+ });
3753
+ },
3754
+ copyFile(source, destination, copyOptions) {
3755
+ return mutate(async () => {
3756
+ await assertDelta(destination, (await fs.stat(source, copyOptions)).size, copyOptions);
3757
+ await fs.copyFile(source, destination, copyOptions);
3758
+ });
3759
+ },
3760
+ truncate(path, length = 0, truncateOptions) {
3761
+ return mutate(async () => {
3762
+ await assertDelta(path, length, truncateOptions);
3763
+ await fs.truncate(path, length, truncateOptions);
3764
+ });
3765
+ },
3766
+ link(source, destination, linkOptions) {
3767
+ return mutate(async () => {
3768
+ await assertDelta(destination, (await fs.stat(source, linkOptions)).size, linkOptions);
3769
+ await fs.link(source, destination, linkOptions);
3770
+ });
3771
+ },
3772
+ symlink(target, path, linkOptions) {
3773
+ return mutate(async () => {
3774
+ await assertDelta(path, new TextEncoder().encode(target).length, linkOptions);
3775
+ await fs.symlink(target, path, linkOptions);
3776
+ });
3777
+ },
3778
+ writeStream(path, source, writeOptions) {
3779
+ return mutate(async () => {
3780
+ const append = writeOptions?.flag === "a" || writeOptions?.flag === "ax";
3781
+ if (!append) await fs.writeFile(path, new Uint8Array(), writeOptions);
3782
+ for await (const chunk of source) {
3783
+ await assertDelta(path, await existingBytes(fs, path, writeOptions) + chunk.length, writeOptions);
3784
+ await fs.appendFile(path, chunk, writeOptions);
3785
+ }
3786
+ });
3787
+ }
3788
+ };
3789
+ return new Proxy(fs, {
3790
+ get(target, property) {
3791
+ const replacement = Reflect.get(mutations, property);
3792
+ if (typeof replacement === "function") return replacement;
3793
+ const original = Reflect.get(target, property);
3794
+ return typeof original === "function" ? original.bind(target) : original;
3795
+ }
3796
+ });
3797
+ }
3798
+
3691
3799
  // packages/safe-fs/src/bridge/stats.ts
3692
3800
  function predicates(type) {
3693
3801
  return {
@@ -4310,6 +4418,8 @@ export {
4310
4418
  createMountFileSystem,
4311
4419
  OverlayFileSystem,
4312
4420
  createOverlayFileSystem,
4421
+ FileSystemQuotaError,
4422
+ withFileSystemQuota,
4313
4423
  FileSystemBridge
4314
4424
  };
4315
- //# sourceMappingURL=chunk-2QRYPKQQ.js.map
4425
+ //# sourceMappingURL=chunk-WMZQYBLB.js.map