@effect-vfs/core 0.2.0 → 0.3.1
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/BytePath.d.ts +49 -5
- package/dist/BytePath.d.ts.map +1 -1
- package/dist/BytePath.js +9 -9
- package/dist/Snapshot.d.ts +61 -5
- package/dist/Snapshot.d.ts.map +1 -1
- package/dist/Snapshot.js +60 -5
- package/dist/SnapshotDelta.d.ts +208 -31
- package/dist/SnapshotDelta.d.ts.map +1 -1
- package/dist/SnapshotDelta.js +162 -25
- package/dist/VirtualFileSystem.d.ts +1035 -348
- package/dist/VirtualFileSystem.d.ts.map +1 -1
- package/dist/VirtualFileSystem.js +620 -1772
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/bytePath.d.ts +10 -0
- package/dist/internal/bytePath.d.ts.map +1 -0
- package/dist/internal/bytePath.js +41 -0
- package/dist/internal/bytes.d.ts +6 -0
- package/dist/internal/bytes.d.ts.map +1 -0
- package/dist/internal/bytes.js +17 -0
- package/dist/internal/canonicalBase64.d.ts +14 -6
- package/dist/internal/canonicalBase64.d.ts.map +1 -1
- package/dist/internal/canonicalBase64.js +29 -7
- package/dist/internal/image.d.ts +85 -104
- package/dist/internal/image.d.ts.map +1 -1
- package/dist/internal/image.js +99 -95
- package/dist/internal/metadata.d.ts +28 -0
- package/dist/internal/metadata.d.ts.map +1 -0
- package/dist/internal/metadata.js +29 -0
- package/dist/internal/snapshotDelta.d.ts +0 -1
- package/dist/internal/snapshotDelta.d.ts.map +1 -1
- package/dist/internal/snapshotDelta.js +358 -325
- package/dist/internal/snapshotDeltaModel.d.ts +10 -0
- package/dist/internal/snapshotDeltaModel.d.ts.map +1 -0
- package/dist/internal/snapshotDeltaModel.js +15 -0
- package/dist/internal/virtualFileSystem/errors.d.ts +31 -0
- package/dist/internal/virtualFileSystem/errors.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem/errors.js +51 -0
- package/dist/internal/virtualFileSystem/fixture.d.ts +63 -0
- package/dist/internal/virtualFileSystem/fixture.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem/fixture.js +144 -0
- package/dist/internal/{content.d.ts → virtualFileSystem/overlayContent.d.ts} +4 -14
- package/dist/internal/virtualFileSystem/overlayContent.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem/overlayContent.js +29 -0
- package/dist/internal/{overlayChanges.d.ts → virtualFileSystem/overlayDiff.d.ts} +3 -12
- package/dist/internal/virtualFileSystem/overlayDiff.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem/overlayDiff.js +120 -0
- package/dist/internal/virtualFileSystem/path.d.ts +44 -0
- package/dist/internal/virtualFileSystem/path.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem/path.js +127 -0
- package/dist/internal/virtualFileSystem/testHooks.d.ts +20 -0
- package/dist/internal/virtualFileSystem/testHooks.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem/testHooks.js +23 -0
- package/dist/internal/virtualFileSystem/watchHub.d.ts +16 -0
- package/dist/internal/virtualFileSystem/watchHub.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem/watchHub.js +33 -0
- package/dist/internal/virtualFileSystem.d.ts +366 -0
- package/dist/internal/virtualFileSystem.d.ts.map +1 -0
- package/dist/internal/virtualFileSystem.js +1755 -0
- package/package.json +15 -5
- package/dist/internal/content.d.ts.map +0 -1
- package/dist/internal/content.js +0 -26
- package/dist/internal/overlayChanges.d.ts.map +0 -1
- package/dist/internal/overlayChanges.js +0 -146
- package/dist/internal/overlayTesting.d.ts +0 -12
- package/dist/internal/overlayTesting.d.ts.map +0 -1
- package/dist/internal/overlayTesting.js +0 -12
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Byte-preserving path validation and conversion.
|
|
2
|
+
import * as ByteSize from "effect/ByteSize";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import * as Encoding from "effect/Encoding";
|
|
5
|
+
import * as Predicate from "effect/Predicate";
|
|
6
|
+
import * as Result from "effect/Result";
|
|
7
|
+
import { getBytes as getBytePathBytes, make as makeBytePath } from "../bytePath.js";
|
|
8
|
+
import { FsError } from "./errors.js";
|
|
9
|
+
// Components are hex-encoded bytes so names compare as bytes, not text: 2f is "/", 2e is ".", 2e2e is "..".
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const SLASH_HEX = "2f";
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const DOT_HEX = "2e";
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const DOT_DOT_HEX = "2e2e";
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const SLASH_BYTE = 47;
|
|
18
|
+
// POSIX NAME_MAX: the longest single path component.
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const MAX_NAME_BYTES = 255;
|
|
21
|
+
// A missing final component is rejected wherever "." and ".." are, so it counts as a dot component.
|
|
22
|
+
// Callers pass the code POSIX gives their operation, so the codes differ on purpose: EEXIST for
|
|
23
|
+
// create (link, symlink, mkdir), EISDIR for open and unlink, EINVAL for rename and rmdir.
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const isDotComponent = (name) => name === undefined || name === DOT_HEX || name === DOT_DOT_HEX;
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const ownedPath = (bytes) => makeBytePath(bytes);
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const strictString = (bytes, operation) => Effect.try({
|
|
30
|
+
try: () => new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(bytes),
|
|
31
|
+
catch: () => new FsError({ code: "UnrepresentableName", operation })
|
|
32
|
+
});
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const nameBytes = (name) => Result.getOrThrow(Encoding.decodeHex(name));
|
|
35
|
+
// A zero-length view distinguishes a detached buffer from a valid empty buffer.
|
|
36
|
+
const attachedBuffer = (bytes) => {
|
|
37
|
+
try {
|
|
38
|
+
const probe = new Uint8Array(bytes.buffer, bytes.byteOffset, 0);
|
|
39
|
+
return probe.byteLength === 0;
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (error instanceof TypeError)
|
|
43
|
+
return false;
|
|
44
|
+
throw error;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
// Accepts any Uint8Array, subclasses such as Node's Buffer included; rejects views over a
|
|
48
|
+
// SharedArrayBuffer or a detached buffer before the bytes are copied or trusted.
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const isAttachedBytes = (bytes) => Predicate.isUint8Array(bytes) && bytes.buffer instanceof ArrayBuffer && attachedBuffer(bytes);
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const pathFromBytes = Effect.fn("VirtualFileSystem.pathFromBytes")(function* (bytes) {
|
|
53
|
+
if (!isAttachedBytes(bytes))
|
|
54
|
+
return yield* new FsError({ code: "InvalidArgument", operation: "pathFromBytes" });
|
|
55
|
+
const owned = new Uint8Array(bytes);
|
|
56
|
+
if (owned.length === 0 || owned.includes(0)) {
|
|
57
|
+
return yield* new FsError({ code: "InvalidArgument", operation: "pathFromBytes" });
|
|
58
|
+
}
|
|
59
|
+
return makeBytePath(owned);
|
|
60
|
+
});
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const pathToBytes = Effect.fn("VirtualFileSystem.pathToBytes")(function* (path) {
|
|
63
|
+
const bytes = getBytePathBytes(path);
|
|
64
|
+
if (bytes === undefined)
|
|
65
|
+
return yield* new FsError({ code: "InvalidArgument", operation: "pathToBytes" });
|
|
66
|
+
return new Uint8Array(bytes);
|
|
67
|
+
});
|
|
68
|
+
// Hand-rolled because String.prototype.isWellFormed is ES2024 and the package targets ES2023.
|
|
69
|
+
const wellFormed = (value) => {
|
|
70
|
+
for (let index = 0; index < value.length; index++) {
|
|
71
|
+
const code = value.charCodeAt(index);
|
|
72
|
+
if (code >= 0xd800 && code <= 0xdbff) {
|
|
73
|
+
const next = value.charCodeAt(++index);
|
|
74
|
+
if (!(next >= 0xdc00 && next <= 0xdfff))
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
else if (code >= 0xdc00 && code <= 0xdfff)
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
};
|
|
82
|
+
const UTF8_ENCODER = new TextEncoder();
|
|
83
|
+
// Strings must be well-formed UTF-16 before encoding; BytePaths must belong to this package.
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const inputBytes = (input) => Predicate.isString(input)
|
|
86
|
+
? wellFormed(input) ? Result.succeed(UTF8_ENCODER.encode(input)) : Result.fail("InvalidPathEncoding")
|
|
87
|
+
: Result.fromNullishOr(getBytePathBytes(input), () => "InvalidArgument");
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const preparePath = (input, operation, maxPathBytes) => {
|
|
90
|
+
const encoded = inputBytes(input);
|
|
91
|
+
if (Result.isFailure(encoded)) {
|
|
92
|
+
return Result.fail(encoded.failure === "InvalidPathEncoding"
|
|
93
|
+
? new FsError({ code: "InvalidPathEncoding", operation, path: input })
|
|
94
|
+
: new FsError({ code: "InvalidArgument", operation }));
|
|
95
|
+
}
|
|
96
|
+
const bytes = encoded.success;
|
|
97
|
+
if (bytes.length === 0)
|
|
98
|
+
return Result.fail(new FsError({ code: "NotFound", operation, path: input }));
|
|
99
|
+
if (bytes.includes(0))
|
|
100
|
+
return Result.fail(new FsError({ code: "InvalidArgument", operation, path: input }));
|
|
101
|
+
if (maxPathBytes !== undefined && ByteSize.isGreaterThan(ByteSize.bytes(bytes.length), maxPathBytes)) {
|
|
102
|
+
return Result.fail(new FsError({ code: "PathTooLong", operation, path: input }));
|
|
103
|
+
}
|
|
104
|
+
const components = [];
|
|
105
|
+
const suffixes = [];
|
|
106
|
+
let start = 0;
|
|
107
|
+
for (let index = 0; index <= bytes.length; index++) {
|
|
108
|
+
if (index !== bytes.length && bytes[index] !== SLASH_BYTE)
|
|
109
|
+
continue;
|
|
110
|
+
if (index > start) {
|
|
111
|
+
if (index - start > MAX_NAME_BYTES) {
|
|
112
|
+
return Result.fail(new FsError({ code: "PathTooLong", operation, path: input }));
|
|
113
|
+
}
|
|
114
|
+
components.push(Encoding.encodeHex(bytes.subarray(start, index)));
|
|
115
|
+
suffixes.push(bytes.subarray(index));
|
|
116
|
+
}
|
|
117
|
+
start = index + 1;
|
|
118
|
+
}
|
|
119
|
+
return Result.succeed({
|
|
120
|
+
input,
|
|
121
|
+
absolute: bytes[0] === SLASH_BYTE,
|
|
122
|
+
trailingSlash: bytes.at(-1) === SLASH_BYTE,
|
|
123
|
+
bytes,
|
|
124
|
+
suffixes,
|
|
125
|
+
components
|
|
126
|
+
});
|
|
127
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type * as Effect from "effect/Effect";
|
|
2
|
+
import type { Snapshot } from "../../Snapshot.js";
|
|
3
|
+
import type { Volume } from "../../VirtualFileSystem.js";
|
|
4
|
+
/** @internal */
|
|
5
|
+
export interface ObservationHook {
|
|
6
|
+
readonly betweenSnapshotAndSummary: Effect.Effect<void>;
|
|
7
|
+
}
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const getObservationHook: (snapshot: Snapshot) => ObservationHook | undefined;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const setObservationHook: (snapshot: Snapshot, hook: ObservationHook) => () => void;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export interface RegistrationHook {
|
|
14
|
+
readonly afterSubscribe: Effect.Effect<void>;
|
|
15
|
+
}
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const getRegistrationHook: (volume: Volume) => RegistrationHook | undefined;
|
|
18
|
+
/** @internal */
|
|
19
|
+
export declare const setRegistrationHook: (volume: Volume, hook: RegistrationHook) => () => void;
|
|
20
|
+
//# sourceMappingURL=testHooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testHooks.d.ts","sourceRoot":"","sources":["../../../src/internal/virtualFileSystem/testHooks.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,gBAAgB;AAChB,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;CACxD;AAID,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,aAAc,QAAQ,KAAG,eAAe,GAAG,SAA2C,CAAA;AAErH,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,aAAc,QAAQ,QAAQ,eAAe,KAAG,MAAM,IAMpF,CAAA;AAED,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;CAC7C;AAID,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,WAAY,MAAM,KAAG,gBAAgB,GAAG,SAA0C,CAAA;AAElH,gBAAgB;AAChB,eAAO,MAAM,mBAAmB,WAAY,MAAM,QAAQ,gBAAgB,KAAG,MAAM,IAMlF,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Package-internal synchronization hooks for deterministic volume tests.
|
|
2
|
+
const observationHooks = new WeakMap();
|
|
3
|
+
/** @internal */
|
|
4
|
+
export const getObservationHook = (snapshot) => observationHooks.get(snapshot);
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const setObservationHook = (snapshot, hook) => {
|
|
7
|
+
observationHooks.set(snapshot, hook);
|
|
8
|
+
return () => {
|
|
9
|
+
if (observationHooks.get(snapshot) === hook)
|
|
10
|
+
observationHooks.delete(snapshot);
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
const registrationHooks = new WeakMap();
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const getRegistrationHook = (volume) => registrationHooks.get(volume);
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const setRegistrationHook = (volume, hook) => {
|
|
18
|
+
registrationHooks.set(volume, hook);
|
|
19
|
+
return () => {
|
|
20
|
+
if (registrationHooks.get(volume) === hook)
|
|
21
|
+
registrationHooks.delete(volume);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type * as Scope from "effect/Scope";
|
|
3
|
+
import * as Stream from "effect/Stream";
|
|
4
|
+
/** @internal */
|
|
5
|
+
export interface Coordinator {
|
|
6
|
+
<A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, R>;
|
|
7
|
+
}
|
|
8
|
+
/** @internal */
|
|
9
|
+
export interface WatchHub<A> {
|
|
10
|
+
readonly publishUnsafe: (event: () => A) => void;
|
|
11
|
+
readonly publishManyUnsafe: (events: () => Iterable<A>) => void;
|
|
12
|
+
readonly subscribe: (afterSubscribe?: Effect.Effect<void>) => Effect.Effect<Stream.Stream<A>, never, Scope.Scope>;
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const make: <A>(coordinate: Coordinator) => Effect.Effect<WatchHub<A>, never, never>;
|
|
16
|
+
//# sourceMappingURL=watchHub.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"watchHub.d.ts","sourceRoot":"","sources":["../../../src/internal/virtualFileSystem/watchHub.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,gBAAgB;AAChB,MAAM,WAAW,WAAW;IAC1B,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAA;CAClE;AAGD,gBAAgB;AAChB,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,CAAA;IAChD,QAAQ,CAAC,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IAC/D,QAAQ,CAAC,SAAS,EAAE,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;CAClH;AAED,gBAAgB;AAChB,eAAO,MAAM,IAAI,GAA+B,CAAC,sEAmC/C,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Change broadcasting for Volume.watch: one PubSub per volume, published to only while someone listens.
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as PubSub from "effect/PubSub";
|
|
4
|
+
import * as Stream from "effect/Stream";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export const make = Effect.fnUntraced(function* (coordinate) {
|
|
7
|
+
const pubsub = yield* PubSub.unbounded();
|
|
8
|
+
// Guarded by `coordinate`: publishers run inside coordinated mutations and both writes below hold the gate.
|
|
9
|
+
let activeSubscribers = 0;
|
|
10
|
+
const publishUnsafe = (event) => {
|
|
11
|
+
if (activeSubscribers === 0)
|
|
12
|
+
return;
|
|
13
|
+
PubSub.publishUnsafe(pubsub, event());
|
|
14
|
+
};
|
|
15
|
+
const publishManyUnsafe = (events) => {
|
|
16
|
+
if (activeSubscribers === 0)
|
|
17
|
+
return;
|
|
18
|
+
for (const event of events())
|
|
19
|
+
PubSub.publishUnsafe(pubsub, event);
|
|
20
|
+
};
|
|
21
|
+
// Registration is uninterruptible end to end, including the permit wait, so a watcher is never
|
|
22
|
+
// half-registered. This deliberately tightens the engine's "permit waits stay interruptible" rule.
|
|
23
|
+
const subscribe = (afterSubscribe) => Effect.acquireRelease(coordinate(Effect.gen(function* () {
|
|
24
|
+
const subscription = yield* PubSub.subscribe(pubsub);
|
|
25
|
+
if (afterSubscribe !== undefined)
|
|
26
|
+
yield* afterSubscribe;
|
|
27
|
+
activeSubscribers += 1;
|
|
28
|
+
return subscription;
|
|
29
|
+
})), () => coordinate(Effect.sync(() => {
|
|
30
|
+
activeSubscribers -= 1;
|
|
31
|
+
}))).pipe(Effect.map(Stream.fromSubscription));
|
|
32
|
+
return { publishUnsafe, publishManyUnsafe, subscribe };
|
|
33
|
+
});
|
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import * as ByteSize from "effect/ByteSize";
|
|
2
|
+
import * as Context from "effect/Context";
|
|
3
|
+
import * as Data from "effect/Data";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as Schema from "effect/Schema";
|
|
6
|
+
import { BytePath } from "../BytePath.js";
|
|
7
|
+
import { ImageError, type Snapshot } from "../Snapshot.js";
|
|
8
|
+
import type { Caller, OverlayVolume, RelativeOptions, Volume } from "../VirtualFileSystem.js";
|
|
9
|
+
import * as Image from "./image.js";
|
|
10
|
+
import { ConfigurationError, FsCode as FsCodeSchema, FsError } from "./virtualFileSystem/errors.js";
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const VolumeId: unique symbol;
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const CallerId: unique symbol;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const FileHandleId: unique symbol;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const DirectoryHandleId: unique symbol;
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const ObjectReferenceId: unique symbol;
|
|
21
|
+
/** @internal */
|
|
22
|
+
export { ConfigurationError, FsCodeSchema as FsCode, FsError };
|
|
23
|
+
/** @internal */
|
|
24
|
+
export declare const Identity: Schema.Struct<{
|
|
25
|
+
readonly uid: Schema.Natural;
|
|
26
|
+
readonly gid: Schema.Natural;
|
|
27
|
+
readonly groups: Schema.$Array<Schema.Natural>;
|
|
28
|
+
readonly privileged: Schema.Boolean;
|
|
29
|
+
}>;
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type Identity = typeof Identity.Type;
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const RootCallerOptions: Schema.Struct<{
|
|
34
|
+
readonly identity: Schema.optionalKey<Schema.Struct<{
|
|
35
|
+
readonly uid: Schema.Natural;
|
|
36
|
+
readonly gid: Schema.Natural;
|
|
37
|
+
readonly groups: Schema.$Array<Schema.Natural>;
|
|
38
|
+
readonly privileged: Schema.Boolean;
|
|
39
|
+
}>>;
|
|
40
|
+
readonly umask: Schema.optionalKey<Schema.Natural>;
|
|
41
|
+
}>;
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type RootCallerOptions = typeof RootCallerOptions.Type;
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const VolumeOptions: Schema.Struct<{
|
|
46
|
+
readonly maxEntries: Schema.optionalKey<Schema.Natural>;
|
|
47
|
+
readonly maxBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
48
|
+
readonly maxFileBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
49
|
+
readonly maxPathBytes: Schema.optionalKey<Schema.ByteSize>;
|
|
50
|
+
}>;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type VolumeOptions = typeof VolumeOptions.Type;
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const Metadata: Schema.Struct<{
|
|
55
|
+
readonly kind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
56
|
+
readonly ino: Schema.BigInt;
|
|
57
|
+
readonly nlink: Schema.Natural;
|
|
58
|
+
readonly size: Schema.BigInt;
|
|
59
|
+
readonly uid: Schema.Natural;
|
|
60
|
+
readonly gid: Schema.Natural;
|
|
61
|
+
readonly mode: Schema.Natural;
|
|
62
|
+
readonly atimeNs: Schema.BigInt;
|
|
63
|
+
readonly mtimeNs: Schema.BigInt;
|
|
64
|
+
readonly ctimeNs: Schema.BigInt;
|
|
65
|
+
readonly birthtimeNs: Schema.BigInt;
|
|
66
|
+
}>;
|
|
67
|
+
/** @internal */
|
|
68
|
+
export type Metadata = typeof Metadata.Type;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export declare const OwnerUpdate: Schema.Struct<{
|
|
71
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
72
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
73
|
+
}>;
|
|
74
|
+
/** @internal */
|
|
75
|
+
export type OwnerUpdate = typeof OwnerUpdate.Type;
|
|
76
|
+
/** @internal */
|
|
77
|
+
export declare const TimeUpdate: Schema.Union<readonly [Schema.Struct<{
|
|
78
|
+
readonly kind: Schema.Literal<"now">;
|
|
79
|
+
}>, Schema.Struct<{
|
|
80
|
+
readonly kind: Schema.Literal<"omit">;
|
|
81
|
+
}>, Schema.Struct<{
|
|
82
|
+
readonly kind: Schema.Literal<"value">;
|
|
83
|
+
readonly nanoseconds: Schema.BigInt;
|
|
84
|
+
}>]>;
|
|
85
|
+
/** @internal */
|
|
86
|
+
export declare const Times: Schema.Struct<{
|
|
87
|
+
readonly access: Schema.Union<readonly [Schema.Struct<{
|
|
88
|
+
readonly kind: Schema.Literal<"now">;
|
|
89
|
+
}>, Schema.Struct<{
|
|
90
|
+
readonly kind: Schema.Literal<"omit">;
|
|
91
|
+
}>, Schema.Struct<{
|
|
92
|
+
readonly kind: Schema.Literal<"value">;
|
|
93
|
+
readonly nanoseconds: Schema.BigInt;
|
|
94
|
+
}>]>;
|
|
95
|
+
readonly modification: Schema.Union<readonly [Schema.Struct<{
|
|
96
|
+
readonly kind: Schema.Literal<"now">;
|
|
97
|
+
}>, Schema.Struct<{
|
|
98
|
+
readonly kind: Schema.Literal<"omit">;
|
|
99
|
+
}>, Schema.Struct<{
|
|
100
|
+
readonly kind: Schema.Literal<"value">;
|
|
101
|
+
readonly nanoseconds: Schema.BigInt;
|
|
102
|
+
}>]>;
|
|
103
|
+
}>;
|
|
104
|
+
/** @internal */
|
|
105
|
+
export type Times = typeof Times.Type;
|
|
106
|
+
/** @internal */
|
|
107
|
+
export declare const SeekMode: Schema.Literals<readonly ["start", "current", "end", "data", "hole"]>;
|
|
108
|
+
/** @internal */
|
|
109
|
+
export type SeekMode = typeof SeekMode.Type;
|
|
110
|
+
/** @internal */
|
|
111
|
+
export declare const OpenSettings: Schema.Struct<{
|
|
112
|
+
readonly access: Schema.Literals<readonly ["read", "write", "readWrite"]>;
|
|
113
|
+
readonly create: Schema.optionalKey<Schema.Literals<readonly ["never", "ifMissing", "exclusive"]>>;
|
|
114
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
115
|
+
readonly append: Schema.optionalKey<Schema.Boolean>;
|
|
116
|
+
readonly truncate: Schema.optionalKey<Schema.Boolean>;
|
|
117
|
+
readonly followFinalSymlink: Schema.optionalKey<Schema.Boolean>;
|
|
118
|
+
}>;
|
|
119
|
+
/** @internal */
|
|
120
|
+
export type OpenOptions = typeof OpenSettings.Type & RelativeOptions;
|
|
121
|
+
declare const WriteFileSettings: Schema.Struct<{
|
|
122
|
+
readonly access: Schema.Literals<readonly ["read", "write", "readWrite"]>;
|
|
123
|
+
readonly create: Schema.optionalKey<Schema.Literals<readonly ["never", "ifMissing", "exclusive"]>>;
|
|
124
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
125
|
+
readonly append: Schema.optionalKey<Schema.Boolean>;
|
|
126
|
+
readonly truncate: Schema.optionalKey<Schema.Boolean>;
|
|
127
|
+
readonly followFinalSymlink: Schema.optionalKey<Schema.Boolean>;
|
|
128
|
+
readonly replaceFinalSymlink: Schema.optionalKey<Schema.Boolean>;
|
|
129
|
+
readonly finalMode: Schema.optionalKey<Schema.Natural>;
|
|
130
|
+
}>;
|
|
131
|
+
/** @internal */
|
|
132
|
+
export type WriteFileOptions = typeof WriteFileSettings.Type & RelativeOptions;
|
|
133
|
+
/** @internal */
|
|
134
|
+
export declare const OverlayNodeKind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
135
|
+
/** @internal */
|
|
136
|
+
export type OverlayNodeKind = typeof OverlayNodeKind.Type;
|
|
137
|
+
/** @internal */
|
|
138
|
+
export declare const OverlayDifference: Schema.Literals<readonly ["content", "mode", "uid", "gid", "atimeNs", "mtimeNs", "ctimeNs", "birthtimeNs"]>;
|
|
139
|
+
/** @internal */
|
|
140
|
+
export type OverlayDifference = typeof OverlayDifference.Type;
|
|
141
|
+
/** @internal */
|
|
142
|
+
export declare const OverlayChange: Schema.Union<readonly [Schema.TaggedStruct<"Added", {
|
|
143
|
+
readonly path: Schema.declare<BytePath, BytePath>;
|
|
144
|
+
readonly kind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
145
|
+
}>, Schema.TaggedStruct<"Removed", {
|
|
146
|
+
readonly path: Schema.declare<BytePath, BytePath>;
|
|
147
|
+
readonly kind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
148
|
+
}>, Schema.TaggedStruct<"Replaced", {
|
|
149
|
+
readonly path: Schema.declare<BytePath, BytePath>;
|
|
150
|
+
readonly beforeKind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
151
|
+
readonly afterKind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
152
|
+
readonly differences: Schema.$Array<Schema.Literals<readonly ["content", "mode", "uid", "gid", "atimeNs", "mtimeNs", "ctimeNs", "birthtimeNs"]>>;
|
|
153
|
+
}>, Schema.TaggedStruct<"Renamed", {
|
|
154
|
+
readonly from: Schema.declare<BytePath, BytePath>;
|
|
155
|
+
readonly to: Schema.declare<BytePath, BytePath>;
|
|
156
|
+
readonly kind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
157
|
+
readonly differences: Schema.$Array<Schema.Literals<readonly ["content", "mode", "uid", "gid", "atimeNs", "mtimeNs", "ctimeNs", "birthtimeNs"]>>;
|
|
158
|
+
}>, Schema.TaggedStruct<"Updated", {
|
|
159
|
+
readonly path: Schema.declare<BytePath, BytePath>;
|
|
160
|
+
readonly kind: Schema.Literals<readonly ["directory", "file", "symlink"]>;
|
|
161
|
+
readonly differences: Schema.$Array<Schema.Literals<readonly ["content", "mode", "uid", "gid", "atimeNs", "mtimeNs", "ctimeNs", "birthtimeNs"]>>;
|
|
162
|
+
}>]>;
|
|
163
|
+
/** @internal */
|
|
164
|
+
export type OverlayChange = typeof OverlayChange.Type;
|
|
165
|
+
/** @internal */
|
|
166
|
+
export declare const OverlayChangesOptions: Schema.Struct<{
|
|
167
|
+
readonly includeTimestamps: Schema.optionalKey<Schema.Boolean>;
|
|
168
|
+
}>;
|
|
169
|
+
/** @internal */
|
|
170
|
+
export type OverlayChangesOptions = typeof OverlayChangesOptions.Type;
|
|
171
|
+
declare const CurrentFileSystem_base: Context.ServiceClass<CurrentFileSystem, "@effect-vfs/core/CurrentFileSystem", Caller>;
|
|
172
|
+
/** @internal */
|
|
173
|
+
export declare class CurrentFileSystem extends CurrentFileSystem_base {
|
|
174
|
+
}
|
|
175
|
+
/** @internal */
|
|
176
|
+
export declare const FixtureMetadata: Schema.Struct<{
|
|
177
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
178
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
179
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
180
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
181
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
182
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
183
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
184
|
+
}>;
|
|
185
|
+
/** @internal */
|
|
186
|
+
export declare const FixtureEntry: Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
187
|
+
readonly kind: Schema.Literal<"directory">;
|
|
188
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
189
|
+
readonly metadata: Schema.optionalKey<Schema.Struct<{
|
|
190
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
191
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
192
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
193
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
194
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
195
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
196
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
197
|
+
}>>;
|
|
198
|
+
}>, Schema.Struct<{
|
|
199
|
+
readonly kind: Schema.Literal<"file">;
|
|
200
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
201
|
+
readonly bytes: Schema.Uint8Array;
|
|
202
|
+
readonly metadata: Schema.optionalKey<Schema.Struct<{
|
|
203
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
204
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
205
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
206
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
207
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
208
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
209
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
210
|
+
}>>;
|
|
211
|
+
}>, Schema.Struct<{
|
|
212
|
+
readonly kind: Schema.Literal<"symlink">;
|
|
213
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
214
|
+
readonly target: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
215
|
+
readonly metadata: Schema.optionalKey<Schema.Struct<{
|
|
216
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
217
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
218
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
219
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
220
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
221
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
222
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
223
|
+
}>>;
|
|
224
|
+
}>, Schema.Struct<{
|
|
225
|
+
readonly kind: Schema.Literal<"hardLink">;
|
|
226
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
227
|
+
readonly target: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
228
|
+
}>]>;
|
|
229
|
+
/** @internal */
|
|
230
|
+
export declare const Fixture: Schema.Struct<{
|
|
231
|
+
readonly rootMetadata: Schema.optionalKey<Schema.Struct<{
|
|
232
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
233
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
234
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
235
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
236
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
237
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
238
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
239
|
+
}>>;
|
|
240
|
+
readonly entries: Schema.$Array<Schema.toTaggedUnion<"kind", readonly [Schema.Struct<{
|
|
241
|
+
readonly kind: Schema.Literal<"directory">;
|
|
242
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
243
|
+
readonly metadata: Schema.optionalKey<Schema.Struct<{
|
|
244
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
245
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
246
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
247
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
248
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
249
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
250
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
251
|
+
}>>;
|
|
252
|
+
}>, Schema.Struct<{
|
|
253
|
+
readonly kind: Schema.Literal<"file">;
|
|
254
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
255
|
+
readonly bytes: Schema.Uint8Array;
|
|
256
|
+
readonly metadata: Schema.optionalKey<Schema.Struct<{
|
|
257
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
258
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
259
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
260
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
261
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
262
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
263
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
264
|
+
}>>;
|
|
265
|
+
}>, Schema.Struct<{
|
|
266
|
+
readonly kind: Schema.Literal<"symlink">;
|
|
267
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
268
|
+
readonly target: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
269
|
+
readonly metadata: Schema.optionalKey<Schema.Struct<{
|
|
270
|
+
readonly uid: Schema.optionalKey<Schema.Natural>;
|
|
271
|
+
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
272
|
+
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
273
|
+
readonly atimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
274
|
+
readonly mtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
275
|
+
readonly ctimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
276
|
+
readonly birthtimeNs: Schema.optionalKey<Schema.BigInt>;
|
|
277
|
+
}>>;
|
|
278
|
+
}>, Schema.Struct<{
|
|
279
|
+
readonly kind: Schema.Literal<"hardLink">;
|
|
280
|
+
readonly path: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
281
|
+
readonly target: Schema.Union<readonly [Schema.String, Schema.declare<BytePath, BytePath>]>;
|
|
282
|
+
}>]>>;
|
|
283
|
+
}>;
|
|
284
|
+
/** @internal */
|
|
285
|
+
export type Fixture = typeof Fixture.Type;
|
|
286
|
+
type VolumeSource = {
|
|
287
|
+
readonly _tag: "Empty";
|
|
288
|
+
} | {
|
|
289
|
+
readonly _tag: "Snapshot";
|
|
290
|
+
readonly image: Image.Document;
|
|
291
|
+
} | {
|
|
292
|
+
readonly _tag: "Overlay";
|
|
293
|
+
readonly base: Snapshot;
|
|
294
|
+
readonly image: Image.Document;
|
|
295
|
+
};
|
|
296
|
+
/** @internal */
|
|
297
|
+
export declare const VolumeSource: {
|
|
298
|
+
readonly $is: <Tag extends "Empty" | "Overlay" | "Snapshot">(tag: Tag) => (u: unknown) => u is Extract<{
|
|
299
|
+
readonly _tag: "Empty";
|
|
300
|
+
}, {
|
|
301
|
+
readonly _tag: Tag;
|
|
302
|
+
}> | Extract<{
|
|
303
|
+
readonly _tag: "Snapshot";
|
|
304
|
+
readonly image: Image.Document;
|
|
305
|
+
}, {
|
|
306
|
+
readonly _tag: Tag;
|
|
307
|
+
}> | Extract<{
|
|
308
|
+
readonly _tag: "Overlay";
|
|
309
|
+
readonly base: Snapshot;
|
|
310
|
+
readonly image: Image.Document;
|
|
311
|
+
}, {
|
|
312
|
+
readonly _tag: Tag;
|
|
313
|
+
}>;
|
|
314
|
+
readonly $match: {
|
|
315
|
+
<Cases extends { readonly [Tag in "Empty" | "Overlay" | "Snapshot"]: (args: Extract<VolumeSource, {
|
|
316
|
+
readonly _tag: Tag;
|
|
317
|
+
}>) => any; }>(cases: Cases): (value: VolumeSource) => import("effect/Unify").Unify<ReturnType<Cases["Empty" | "Overlay" | "Snapshot"]>>;
|
|
318
|
+
<Cases extends { readonly [Tag in "Empty" | "Overlay" | "Snapshot"]: (args: Extract<VolumeSource, {
|
|
319
|
+
readonly _tag: Tag;
|
|
320
|
+
}>) => any; }>(value: VolumeSource, cases: Cases): import("effect/Unify").Unify<ReturnType<Cases["Empty" | "Overlay" | "Snapshot"]>>;
|
|
321
|
+
};
|
|
322
|
+
readonly Empty: Data.TaggedEnum.ConstructorFrom<{
|
|
323
|
+
readonly _tag: "Empty";
|
|
324
|
+
}, "_tag">;
|
|
325
|
+
readonly Overlay: Data.TaggedEnum.ConstructorFrom<{
|
|
326
|
+
readonly _tag: "Overlay";
|
|
327
|
+
readonly base: Snapshot;
|
|
328
|
+
readonly image: Image.Document;
|
|
329
|
+
}, "_tag">;
|
|
330
|
+
readonly Snapshot: Data.TaggedEnum.ConstructorFrom<{
|
|
331
|
+
readonly _tag: "Snapshot";
|
|
332
|
+
readonly image: Image.Document;
|
|
333
|
+
}, "_tag">;
|
|
334
|
+
};
|
|
335
|
+
type VolumeFor<S extends VolumeSource> = S extends {
|
|
336
|
+
readonly _tag: "Overlay";
|
|
337
|
+
} ? OverlayVolume : Volume;
|
|
338
|
+
/** @internal */
|
|
339
|
+
export declare const makeVolume: <S extends VolumeSource>(source: S, options?: {
|
|
340
|
+
readonly maxEntries?: number;
|
|
341
|
+
readonly maxBytes?: ByteSize.ByteSize;
|
|
342
|
+
readonly maxFileBytes?: ByteSize.ByteSize;
|
|
343
|
+
readonly maxPathBytes?: ByteSize.ByteSize;
|
|
344
|
+
} | undefined) => Effect.Effect<VolumeFor<S>, ConfigurationError | ImageError, never>;
|
|
345
|
+
/** @internal */
|
|
346
|
+
export declare const make: (options?: {
|
|
347
|
+
readonly maxEntries?: number;
|
|
348
|
+
readonly maxBytes?: ByteSize.ByteSize;
|
|
349
|
+
readonly maxFileBytes?: ByteSize.ByteSize;
|
|
350
|
+
readonly maxPathBytes?: ByteSize.ByteSize;
|
|
351
|
+
} | undefined) => Effect.Effect<Volume, ConfigurationError, never>;
|
|
352
|
+
/** @internal */
|
|
353
|
+
export declare const fromSnapshot: (snapshot: Snapshot, options?: {
|
|
354
|
+
readonly maxEntries?: number;
|
|
355
|
+
readonly maxBytes?: ByteSize.ByteSize;
|
|
356
|
+
readonly maxFileBytes?: ByteSize.ByteSize;
|
|
357
|
+
readonly maxPathBytes?: ByteSize.ByteSize;
|
|
358
|
+
} | undefined) => Effect.Effect<Volume, ConfigurationError | ImageError, never>;
|
|
359
|
+
/** @internal */
|
|
360
|
+
export declare const makeOverlay: (base: Snapshot, options?: {
|
|
361
|
+
readonly maxEntries?: number;
|
|
362
|
+
readonly maxBytes?: ByteSize.ByteSize;
|
|
363
|
+
readonly maxFileBytes?: ByteSize.ByteSize;
|
|
364
|
+
readonly maxPathBytes?: ByteSize.ByteSize;
|
|
365
|
+
} | undefined) => Effect.Effect<OverlayVolume, ConfigurationError | ImageError, never>;
|
|
366
|
+
//# sourceMappingURL=virtualFileSystem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtualFileSystem.d.ts","sourceRoot":"","sources":["../../src/internal/virtualFileSystem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAE3C,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AACnC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OA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