@poe-platform/safe-fs 0.1.803 → 0.1.805

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 (40) hide show
  1. package/README.md +22 -4
  2. package/dist/safe-fs/bridge/filesystem.js +1 -1
  3. package/dist/safe-fs/contracts/errors.d.ts +1 -0
  4. package/dist/safe-fs/contracts/errors.js +16 -3
  5. package/dist/safe-fs/contracts/filesystem.d.ts +3 -2
  6. package/dist/safe-fs/contracts/io.d.ts +2 -0
  7. package/dist/safe-fs/contracts/io.js +32 -7
  8. package/dist/safe-fs/contracts/portable-path.d.ts +8 -0
  9. package/dist/safe-fs/contracts/portable-path.js +22 -1
  10. package/dist/safe-fs/core.d.ts +3 -14
  11. package/dist/safe-fs/core.js +3 -11
  12. package/dist/safe-fs/fs/devices/index.d.ts +6 -1
  13. package/dist/safe-fs/fs/devices/index.js +40 -24
  14. package/dist/safe-fs/fs/devices/path.js +1 -1
  15. package/dist/safe-fs/fs/directory-admission.js +2 -2
  16. package/dist/safe-fs/fs/memory/atomic-view.d.ts +3 -0
  17. package/dist/safe-fs/fs/memory/atomic-view.js +5 -0
  18. package/dist/safe-fs/fs/memory/index.d.ts +6 -3
  19. package/dist/safe-fs/fs/memory/index.js +147 -131
  20. package/dist/safe-fs/fs/memory/ledger.js +3 -1
  21. package/dist/safe-fs/fs/memory/limits.js +3 -0
  22. package/dist/safe-fs/fs/mount/comparison.js +3 -3
  23. package/dist/safe-fs/fs/object-publication/index.js +2 -1
  24. package/dist/safe-fs/fs/readonly/index.js +1 -1
  25. package/dist/safe-fs/fs/real/index.js +3 -2
  26. package/dist/safe-fs/fs/s3/filesystem.js +1 -1
  27. package/dist/safe-fs/fs/s3/http/request-fetch.d.ts +14 -3
  28. package/dist/safe-fs/fs/s3/http/request-node.d.ts +2 -2
  29. package/dist/safe-fs/fs/s3/http/types.d.ts +2 -2
  30. package/dist/safe-fs/fs/s3/manifest-admission.js +0 -4
  31. package/dist/safe-fs/fs/s3/namespace.js +2 -4
  32. package/dist/safe-fs/fs/webdav/webdav.js +5 -29
  33. package/dist/safe-fs/fs/webdav/xml.js +2 -2
  34. package/dist/safe-fs/python/emscripten.js +5 -2
  35. package/dist/safe-fs/python/filesystem.js +2 -2
  36. package/dist/safe-fs/python/native.js +1 -1
  37. package/dist/safe-fs/python/stat.js +5 -2
  38. package/dist/safe-fs/runtime-core.d.ts +26 -0
  39. package/dist/safe-fs/runtime-core.js +56 -0
  40. package/package.json +16 -2
@@ -1,4 +1,4 @@
1
- import type { RequestOptions } from "node:http";
2
- import type { S3HttpRequestFactory } from "./types.js";
1
+ import type { ClientRequest, IncomingMessage, RequestOptions } from "node:http";
3
2
  import type { RequestScope, WireResponse } from "./request.js";
3
+ export type S3HttpRequestFactory = (options: RequestOptions, onResponse: (response: IncomingMessage) => void) => ClientRequest;
4
4
  export declare function sendRequest(options: RequestOptions, body: Uint8Array, scope: RequestScope, factory?: S3HttpRequestFactory): Promise<WireResponse>;
@@ -1,4 +1,5 @@
1
- import type { ClientRequest, IncomingMessage, RequestOptions } from "node:http";
1
+ import type { S3HttpRequestFactory } from "#safe-fs-s3-request";
2
+ export type { S3HttpRequestFactory } from "#safe-fs-s3-request";
2
3
  export interface S3HttpCredentials {
3
4
  readonly accessKeyId: string;
4
5
  readonly secretAccessKey: string;
@@ -7,7 +8,6 @@ export interface S3HttpCredentials {
7
8
  export type S3HttpCredentialProvider = (options: {
8
9
  readonly signal: AbortSignal;
9
10
  }) => Promise<S3HttpCredentials>;
10
- export type S3HttpRequestFactory = (options: RequestOptions, onResponse: (response: IncomingMessage) => void) => ClientRequest;
11
11
  export interface S3HttpTransportOptions {
12
12
  readonly endpoint: string;
13
13
  readonly region: string;
@@ -41,8 +41,6 @@ export async function* admitManifest(source, options) {
41
41
  invalid();
42
42
  const key = value;
43
43
  if (frame.shape === 'nodes') {
44
- if (key.length > 4096)
45
- invalid();
46
44
  if (++entries > options.maxEntries)
47
45
  throw new FsError('ENOSPC');
48
46
  }
@@ -83,8 +81,6 @@ export async function* admitManifest(source, options) {
83
81
  if (token) {
84
82
  if (quoted) {
85
83
  token += character;
86
- if (token.length > 4096 * 6 + 2)
87
- invalid();
88
84
  if (escaped)
89
85
  escaped = false;
90
86
  else if (character === '\\')
@@ -4,7 +4,7 @@ import { dirname, normalizePath, validatePath } from '../../contracts/virtual-pa
4
4
  import { withObjectFileDescriptors } from '../object-publication/index.js';
5
5
  import { admitManifest } from './manifest-admission.js';
6
6
  function limit(value) {
7
- if (value === undefined)
7
+ if (value === undefined || value === Infinity)
8
8
  return Infinity;
9
9
  if (!Number.isSafeInteger(value) || value < 1)
10
10
  throw new RangeError('Invalid S3 namespace limit');
@@ -18,7 +18,7 @@ export async function createS3NamespaceFileSystem(options) {
18
18
  throw new TypeError('An explicit S3 bucket and manifest key are required');
19
19
  const maxBytes = limit(options.maxBytes);
20
20
  const maxEntries = limit(options.maxEntries);
21
- const maxManifestBytes = options.maxManifestBytes === Infinity ? Infinity : limit(options.maxManifestBytes);
21
+ const maxManifestBytes = limit(options.maxManifestBytes);
22
22
  const maxAttempts = limit(options.maxAttempts);
23
23
  const descriptorOptions = options;
24
24
  for (const key of ['chunkBytes', 'maxStagedBytes', 'maxStagedPages', 'maxFileBytes', 'maxOpenFiles']) {
@@ -32,8 +32,6 @@ export async function createS3NamespaceFileSystem(options) {
32
32
  validatePath(value);
33
33
  if (!value)
34
34
  throw new FsError('ENOENT');
35
- if (value.length > 4096)
36
- throw new FsError('ENAMETOOLONG');
37
35
  return normalizePath(value);
38
36
  };
39
37
  const entryPath = (value) => {
@@ -1,6 +1,7 @@
1
1
  import { FsError, isErrnoCode, isFsError } from "../../contracts/errors.js";
2
2
  import { composeAbortSignals } from "../../contracts/abort.js";
3
3
  import { readBytes } from "../../contracts/io.js";
4
+ import { validatePath } from "../../contracts/virtual-path.js";
4
5
  import { davChild, davChildren, parseXmlSteps, scalar, XmlResponseLimitError, XmlResourceLimitError } from "./xml.js";
5
6
  import { admitDirectoryEntries, directoryEntryLimit } from "../directory-admission.js";
6
7
  import { assertCallbackAuthorityAllowed, compareEntries, registerEntryAuthority } from "../mount/comparison.js";
@@ -159,28 +160,6 @@ function normalize(path) {
159
160
  }
160
161
  return `/${segments.join("/")}`;
161
162
  }
162
- function validateDirectoryWalkPath(path, syscall = "access") {
163
- if (typeof path !== "string")
164
- fail("EINVAL", "resolve", String(path), "invalid WebDAV path");
165
- let bytes = 0;
166
- let components = 0;
167
- let inComponent = false;
168
- for (let offset = 0; offset < path.length; offset++) {
169
- const point = path.codePointAt(offset);
170
- if (point === 47)
171
- inComponent = false;
172
- else if (!inComponent) {
173
- components++;
174
- inComponent = true;
175
- }
176
- bytes += point <= 0x7f ? 1 : point <= 0x7ff ? 2 : point <= 0xffff ? 3 : 4;
177
- if (point > 0xffff)
178
- offset++;
179
- if (bytes > 65_536 || components > 256) {
180
- fail("ENAMETOOLONG", syscall, path, "directory access exceeds the 64KiB path or 256 component limit");
181
- }
182
- }
183
- }
184
163
  function requiresCollection(path) {
185
164
  const last = path.split("/").at(-1);
186
165
  return last === "" || last === "." || last === "..";
@@ -826,7 +805,7 @@ export class WebDavFileSystem {
826
805
  }
827
806
  }
828
807
  async stat(path, options = {}) {
829
- validateDirectoryWalkPath(path, "stat");
808
+ validatePath(path, options.pathLimits);
830
809
  return this.statWithAncestors(path, options);
831
810
  }
832
811
  async statWithAncestors(path, options) {
@@ -909,7 +888,7 @@ export class WebDavFileSystem {
909
888
  }.bind(this));
910
889
  }
911
890
  async prepareWrite(path, options) {
912
- validateDirectoryWalkPath(path, "writeFile");
891
+ validatePath(path, options.pathLimits);
913
892
  const normalized = normalize(path);
914
893
  if (options.mode !== undefined)
915
894
  this.unsupported("writeFile mode", path);
@@ -1329,10 +1308,7 @@ export class WebDavFileSystem {
1329
1308
  fail("ECANCELED", "access", path);
1330
1309
  if (mode & 2)
1331
1310
  this.unsupported("access write/execute permission checks", path);
1332
- if (mode & 1)
1333
- validateDirectoryWalkPath(path);
1334
- // Non-execute probes do not inherit stat's raw-path limits.
1335
- const stat = await (mode & 1 ? this.stat(path, options) : this.statWithAncestors(path, options));
1311
+ const stat = await this.stat(path, options);
1336
1312
  if (options.signal?.aborted)
1337
1313
  fail("ECANCELED", "access", path);
1338
1314
  if ((mode & 1) && stat.type !== "directory")
@@ -1398,4 +1374,4 @@ export class WebDavFileSystem {
1398
1374
  }
1399
1375
  async truncate(path, _length, _options = {}) { this.unsupported("truncate", path); }
1400
1376
  }
1401
- const originalWebDavComparison = WebDavFileSystem.prototype.compareEntry;
1377
+ const originalWebDavComparison = /* @__PURE__ */ (() => WebDavFileSystem.prototype.compareEntry)();
@@ -20,8 +20,8 @@ export function parseXml(input, limits = {}) {
20
20
  }
21
21
  export function* parseXmlSteps(input, limits = {}) {
22
22
  const { maxResponses, ...documentLimits } = limits;
23
- if (maxResponses !== undefined && (!Number.isSafeInteger(maxResponses) || maxResponses < 1)) {
24
- throw new RangeError("XML limits must be positive integers");
23
+ if (maxResponses !== undefined && maxResponses !== Infinity && (!Number.isSafeInteger(maxResponses) || maxResponses < 1)) {
24
+ throw new RangeError("XML limits must be positive integers or Infinity");
25
25
  }
26
26
  let responses = 0;
27
27
  try {
@@ -332,8 +332,8 @@ export function writePythonStat(heap, pointer, stat) {
332
332
  return 0;
333
333
  }
334
334
  /** Runtime storage and application storage occupy disjoint guest device ranges. */
335
- export function createPythonRuntimeStatMapper(maxDevices = 1024) {
336
- if (!Number.isSafeInteger(maxDevices) || maxDevices < 1 || maxDevices > 1024)
335
+ export function createPythonRuntimeStatMapper(maxDevices = Infinity) {
336
+ if (maxDevices !== Infinity && (!Number.isSafeInteger(maxDevices) || maxDevices < 1))
337
337
  throw new RangeError('Invalid runtime device limit');
338
338
  const mapped = Symbol('mapped Python runtime device');
339
339
  const devices = new Map();
@@ -346,6 +346,9 @@ export function createPythonRuntimeStatMapper(maxDevices = 1024) {
346
346
  if (device === undefined) {
347
347
  if (devices.size >= maxDevices)
348
348
  throw new Error('EOVERFLOW');
349
+ // Preserve the uint32 guest ABI even when the resource budget is unlimited.
350
+ if (devices.size >= 0x80000000)
351
+ throw new Error('EOVERFLOW');
349
352
  device = 0x80000000 + devices.size;
350
353
  devices.set(stat.dev, device);
351
354
  }
@@ -23,11 +23,11 @@ export class PythonFileSystem {
23
23
  if (!options.cwd.startsWith("/"))
24
24
  throw new FsError("EINVAL", { syscall: "python filesystem", path: options.cwd, message: "cwd must be absolute" });
25
25
  this.#cwd = options.cwd;
26
- this.#transfer = options.maxTransferBytes ?? 65536;
26
+ this.#transfer = options.maxTransferBytes ?? Infinity;
27
27
  this.#limit = options.maxOpenFiles ?? Infinity;
28
28
  this.#directoryLimit = options.maxDirectoryEntries ?? Infinity;
29
29
  for (const limit of [this.#transfer, options.maxOpenFiles, options.maxDirectoryEntries])
30
- if (limit !== undefined && (!Number.isSafeInteger(limit) || limit < 1))
30
+ if (limit !== undefined && limit !== Infinity && (!Number.isSafeInteger(limit) || limit < 1))
31
31
  throw new FsError("EINVAL", { syscall: "python filesystem" });
32
32
  this.#open = options.open;
33
33
  this.#scope = composeAbortSignals([...(options.signal === undefined ? [] : [options.signal]), this.#abort.signal]);
@@ -10,7 +10,7 @@ const errno = {
10
10
  };
11
11
  export function createPythonNativeSyscalls(options) {
12
12
  const { runtime, signal, maxTransferBytes, runtimeMount } = options;
13
- if (!Number.isSafeInteger(maxTransferBytes) || maxTransferBytes < 1)
13
+ if (maxTransferBytes !== Infinity && (!Number.isSafeInteger(maxTransferBytes) || maxTransferBytes < 1))
14
14
  throw new RangeError('Invalid native transfer limit');
15
15
  const descriptors = new Map();
16
16
  const closedStdio = new Set();
@@ -4,8 +4,8 @@ export class PythonStatTranslator {
4
4
  #devices = new Map();
5
5
  #maxDevices;
6
6
  #next = 1;
7
- constructor(maxDevices = 1024) {
8
- if (!Number.isSafeInteger(maxDevices) || maxDevices < 1)
7
+ constructor(maxDevices = Infinity) {
8
+ if (maxDevices !== Infinity && (!Number.isSafeInteger(maxDevices) || maxDevices < 1))
9
9
  throw new FsError("EINVAL");
10
10
  this.#maxDevices = maxDevices;
11
11
  }
@@ -19,6 +19,9 @@ export class PythonStatTranslator {
19
19
  if (guestDevice === undefined) {
20
20
  if (this.#next > this.#maxDevices)
21
21
  throw new FsError("EFBIG", { syscall: "stat", message: "Python device identity limit exceeded" });
22
+ // The upper half of the uint32 guest ABI is reserved for runtime devices.
23
+ if (this.#next >= 0x80000000)
24
+ throw new FsError("EFBIG", { syscall: "stat", message: "Python device identity exceeds guest ABI range" });
22
25
  if (!devices) {
23
26
  devices = new Map();
24
27
  this.#devices.set(identityScope, devices);
@@ -0,0 +1,26 @@
1
+ export * from "./contracts/errors.js";
2
+ export * from "./contracts/filesystem.js";
3
+ export * from "./contracts/io.js";
4
+ export { openFileDescriptor } from "./fs/descriptor.js";
5
+ export type { DescriptorBackend, DescriptorOpenOptions } from "./fs/descriptor.js";
6
+ export { assertPathWithin, isPathWithin, normalizePath, relativePath, resolvePath, validatePath } from "./contracts/virtual-path.js";
7
+ export { basename, dirname, extname, isAbsolutePath, joinPath, posixPath } from "./contracts/portable-path.js";
8
+ import type { FileSystem } from "./contracts/filesystem.js";
9
+ export type { MemoryFileSystem, MemoryFileSystemLimits, MemoryFileSystemOptions, MemoryRedirectHandle } from "./fs/memory/index.js";
10
+ export declare function isUnmodifiedMemoryFileSystem(fs: FileSystem): boolean;
11
+ export declare function isCleanAbsolutePath(p: string): boolean;
12
+ export declare function tryGetMemoryDirectoryEntryNamesSync(fs: FileSystem, path: string): any;
13
+ export declare function tryReadMemoryFileViewSync(fs: FileSystem, path: string, maxBytes?: number, signal?: AbortSignal, captureSourceRef?: boolean, beforeRead?: () => void): Uint8Array | undefined;
14
+ export declare function tryResolveMemoryDevicePath(fs: FileSystem, path: string, followFinal?: boolean): string | undefined;
15
+ export * from "./fs/devices/index.js";
16
+ export { retargetScopedFileSystem, scopeFileSystem, retainFileSystemCleanup } from "./fs/scoped.js";
17
+ export type { RetainedFileSystemCleanupView, RetainedFileSystemCleanupOptions } from "./fs/scoped.js";
18
+ export { compareEntries, registerEntryView } from "./fs/mount/comparison.js";
19
+ export type { EntryViewResolver } from "./fs/mount/comparison.js";
20
+ export type { ConditionalMutationBinding } from "./fs/memory/index.js";
21
+ export declare function bindConditionalMutation<Result>(identityScope: object | symbol | undefined, binding: any, action: () => Promise<Result>): Promise<Result>;
22
+ export declare function tryOpenMemoryRedirectHandleSync(fs: FileSystem, path: string, append: boolean, mode: number, signal?: AbortSignal): any;
23
+ export declare function tryWriteMemoryFileSync(fs: FileSystem, path: string, data: Uint8Array, append: boolean, mode: number, signal?: AbortSignal): boolean;
24
+ export declare function tryMkdirMemorySync(fs: FileSystem, path: string, recursive: boolean, mode: number, signal?: AbortSignal, dirPrefixHint?: string): boolean;
25
+ export declare function tryRmRfMemorySync(fs: FileSystem, path: string, signal?: AbortSignal): boolean;
26
+ export declare function tryWriteMemoryFileInDirSync(fs: FileSystem, dirPrefix: string, name: string, data: Uint8Array, append: boolean, mode: number, signal?: AbortSignal): boolean;
@@ -0,0 +1,56 @@
1
+ export * from "./contracts/errors.js";
2
+ export * from "./contracts/filesystem.js";
3
+ export * from "./contracts/io.js";
4
+ export { openFileDescriptor } from "./fs/descriptor.js";
5
+ export { assertPathWithin, isPathWithin, normalizePath, relativePath, resolvePath, validatePath } from "./contracts/virtual-path.js";
6
+ export { basename, dirname, extname, isAbsolutePath, joinPath, posixPath } from "./contracts/portable-path.js";
7
+ const _getMemHooks = () => globalThis.__safeBashMemHooks;
8
+ export function isUnmodifiedMemoryFileSystem(fs) {
9
+ const proto = Object.getPrototypeOf(fs);
10
+ if (!proto || !_getMemHooks()?.protos?.has(proto))
11
+ return false;
12
+ return Object.getOwnPropertyNames(fs).every(name => {
13
+ const method = Object.getOwnPropertyDescriptor(proto, name)?.value;
14
+ return typeof method !== "function" || Object.getOwnPropertyDescriptor(fs, name)?.value === method;
15
+ }) && Object.getOwnPropertyNames(proto).every(name => {
16
+ const method = Object.getOwnPropertyDescriptor(proto, name)?.value;
17
+ return typeof method !== "function" || Reflect.get(fs, name) === method;
18
+ });
19
+ }
20
+ export function isCleanAbsolutePath(p) {
21
+ const fn = _getMemHooks()?.isCleanAbsolutePath;
22
+ if (fn)
23
+ return fn(p);
24
+ return p.length > 0 && p.charCodeAt(0) === 47 && !p.includes("//") && !p.includes("/.") && (p.length === 1 || p.charCodeAt(p.length - 1) !== 47);
25
+ }
26
+ export function tryGetMemoryDirectoryEntryNamesSync(fs, path) {
27
+ return (fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryGetMemoryDirectoryEntryNamesSync)?.(fs, path);
28
+ }
29
+ export function tryReadMemoryFileViewSync(fs, path, maxBytes, signal, captureSourceRef, beforeRead) {
30
+ return (fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryReadMemoryFileViewSync)?.(fs, path, maxBytes, signal, captureSourceRef, beforeRead);
31
+ }
32
+ export function tryResolveMemoryDevicePath(fs, path, followFinal) {
33
+ return (fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryResolveMemoryDevicePath)?.(fs, path, followFinal);
34
+ }
35
+ export * from "./fs/devices/index.js";
36
+ export { retargetScopedFileSystem, scopeFileSystem, retainFileSystemCleanup } from "./fs/scoped.js";
37
+ export { compareEntries, registerEntryView } from "./fs/mount/comparison.js";
38
+ export async function bindConditionalMutation(identityScope, binding, action) {
39
+ const fn = _getMemHooks()?.bindConditionalMutation;
40
+ return fn ? fn(identityScope, binding, action) : action();
41
+ }
42
+ export function tryOpenMemoryRedirectHandleSync(fs, path, append, mode, signal) {
43
+ return (fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryOpenMemoryRedirectHandleSync)?.(fs, path, append, mode, signal);
44
+ }
45
+ export function tryWriteMemoryFileSync(fs, path, data, append, mode, signal) {
46
+ return Boolean((fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryWriteMemoryFileSync)?.(fs, path, data, append, mode, signal));
47
+ }
48
+ export function tryMkdirMemorySync(fs, path, recursive, mode, signal, dirPrefixHint) {
49
+ return Boolean((fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryMkdirMemorySync)?.(fs, path, recursive, mode, signal, dirPrefixHint));
50
+ }
51
+ export function tryRmRfMemorySync(fs, path, signal) {
52
+ return Boolean((fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryRmRfMemorySync)?.(fs, path, signal));
53
+ }
54
+ export function tryWriteMemoryFileInDirSync(fs, dirPrefix, name, data, append, mode, signal) {
55
+ return Boolean((fs && _getMemHooks()?.byProto?.get(Object.getPrototypeOf(fs))?.tryWriteMemoryFileInDirSync)?.(fs, dirPrefix, name, data, append, mode, signal));
56
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poe-platform/safe-fs",
3
- "version": "0.1.803",
3
+ "version": "0.1.805",
4
4
  "description": "Composable filesystem with a portable core and explicit Node adapters",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -43,12 +43,14 @@
43
43
  "types": "./dist/safe-fs/testing/atomic-filesystem.d.ts",
44
44
  "workerd": "./dist/safe-fs/testing/atomic-filesystem.js",
45
45
  "browser": "./dist/safe-fs/testing/atomic-filesystem.js",
46
+ "worker": "./dist/safe-fs/testing/atomic-filesystem.js",
46
47
  "import": "./dist/safe-fs/testing/atomic-filesystem.js"
47
48
  },
48
49
  "./testing/object-publication": {
49
50
  "types": "./dist/safe-fs/testing/object-publication.d.ts",
50
51
  "workerd": "./dist/safe-fs/testing/object-publication.js",
51
52
  "browser": "./dist/safe-fs/testing/object-publication.js",
53
+ "worker": "./dist/safe-fs/testing/object-publication.js",
52
54
  "import": "./dist/safe-fs/testing/object-publication.js"
53
55
  },
54
56
  "./node": {
@@ -63,10 +65,12 @@
63
65
  "types": {
64
66
  "workerd": "./dist/safe-fs/node-unavailable.d.ts",
65
67
  "browser": "./dist/safe-fs/node-unavailable.d.ts",
68
+ "worker": "./dist/safe-fs/node-unavailable.d.ts",
66
69
  "default": "./dist/safe-fs/node/filesystem.d.ts"
67
70
  },
68
71
  "workerd": null,
69
72
  "browser": null,
73
+ "worker": null,
70
74
  "import": "./dist/safe-fs/node/filesystem.js"
71
75
  },
72
76
  "./fs/memory": {
@@ -122,6 +126,10 @@
122
126
  "./contracts/errors": {
123
127
  "types": "./dist/safe-fs/contracts/errors.d.ts",
124
128
  "import": "./dist/safe-fs/contracts/errors.js"
129
+ },
130
+ "./runtime-core": {
131
+ "types": "./dist/safe-fs/runtime-core.d.ts",
132
+ "import": "./dist/safe-fs/runtime-core.js"
125
133
  }
126
134
  },
127
135
  "repository": {
@@ -138,9 +146,15 @@
138
146
  },
139
147
  "imports": {
140
148
  "#safe-fs-s3-request": {
141
- "types": "./dist/safe-fs/fs/s3/http/request-node.d.ts",
149
+ "types": {
150
+ "workerd": "./dist/safe-fs/fs/s3/http/request-fetch.d.ts",
151
+ "browser": "./dist/safe-fs/fs/s3/http/request-fetch.d.ts",
152
+ "worker": "./dist/safe-fs/fs/s3/http/request-fetch.d.ts",
153
+ "default": "./dist/safe-fs/fs/s3/http/request-node.d.ts"
154
+ },
142
155
  "workerd": "./dist/safe-fs/fs/s3/http/request-fetch.js",
143
156
  "browser": "./dist/safe-fs/fs/s3/http/request-fetch.js",
157
+ "worker": "./dist/safe-fs/fs/s3/http/request-fetch.js",
144
158
  "default": "./dist/safe-fs/fs/s3/http/request-node.js"
145
159
  },
146
160
  "#safe-fs-platform": {