@effect-vfs/core 0.8.0 → 0.10.0
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/README.md +9 -0
- package/dist/BytePath.d.ts +4 -1
- package/dist/BytePath.d.ts.map +1 -1
- package/dist/BytePath.js +6 -4
- package/dist/Caller.d.ts +107 -66
- package/dist/Caller.d.ts.map +1 -1
- package/dist/Caller.js +16 -86
- package/dist/LiveVolume.d.ts +75 -2
- package/dist/LiveVolume.d.ts.map +1 -1
- package/dist/LiveVolume.js +87 -3
- package/dist/Search.d.ts +32 -8
- package/dist/Search.d.ts.map +1 -1
- package/dist/Search.js +19 -10
- package/dist/SynchronousAdapter.d.ts +58 -0
- package/dist/SynchronousAdapter.d.ts.map +1 -0
- package/dist/SynchronousAdapter.js +116 -0
- package/dist/Target.d.ts +7 -91
- package/dist/Target.d.ts.map +1 -1
- package/dist/Target.js +7 -47
- package/dist/Testing.d.ts +5 -2
- package/dist/Testing.d.ts.map +1 -1
- package/dist/Testing.js +2 -1
- package/dist/VfsError.d.ts +4 -2
- package/dist/VfsError.d.ts.map +1 -1
- package/dist/VfsError.js +3 -1
- package/dist/VirtualFileSystem.d.ts +151 -44
- package/dist/VirtualFileSystem.d.ts.map +1 -1
- package/dist/VirtualFileSystem.js +31 -21
- package/dist/Volume.d.ts +6 -1
- package/dist/Volume.d.ts.map +1 -1
- package/dist/Volume.js +6 -2
- package/dist/Watch.d.ts +18 -0
- package/dist/Watch.d.ts.map +1 -1
- package/dist/Watch.js +12 -0
- package/dist/internal/adapterBinding.d.ts +13 -0
- package/dist/internal/adapterBinding.d.ts.map +1 -0
- package/dist/internal/adapterBinding.js +13 -0
- package/dist/internal/bytePath.d.ts +6 -1
- package/dist/internal/bytePath.d.ts.map +1 -1
- package/dist/internal/callerWatch.d.ts +36 -0
- package/dist/internal/callerWatch.d.ts.map +1 -0
- package/dist/internal/callerWatch.js +185 -0
- package/dist/internal/engine.d.ts +1305 -0
- package/dist/internal/engine.d.ts.map +1 -0
- package/dist/internal/engine.js +3458 -0
- package/dist/internal/errors.d.ts +1 -33
- package/dist/internal/errors.d.ts.map +1 -1
- package/dist/internal/errors.js +1 -45
- package/dist/internal/fixture.d.ts +2 -1
- package/dist/internal/fixture.d.ts.map +1 -1
- package/dist/internal/fixture.js +8 -4
- package/dist/internal/image.d.ts +4 -1
- package/dist/internal/image.d.ts.map +1 -1
- package/dist/internal/image.js +6 -3
- package/dist/internal/lines.d.ts.map +1 -1
- package/dist/internal/lines.js +3 -2
- package/dist/internal/liveImage.d.ts +4 -2
- package/dist/internal/liveImage.d.ts.map +1 -1
- package/dist/internal/liveImage.js +3 -1
- package/dist/internal/merkle.d.ts +7 -4
- package/dist/internal/merkle.d.ts.map +1 -1
- package/dist/internal/merkle.js +6 -4
- package/dist/internal/search.d.ts +3 -1
- package/dist/internal/search.d.ts.map +1 -1
- package/dist/internal/search.js +4 -3
- package/dist/internal/snapshotDelta.d.ts +11 -7
- package/dist/internal/snapshotDelta.d.ts.map +1 -1
- package/dist/internal/snapshotDelta.js +15 -9
- package/dist/internal/snapshotMerge.d.ts +1 -1
- package/dist/internal/snapshotMerge.d.ts.map +1 -1
- package/dist/internal/snapshotMerge.js +5 -2
- package/dist/internal/tree.d.ts +4 -2
- package/dist/internal/tree.d.ts.map +1 -1
- package/dist/internal/tree.js +4 -2
- package/dist/internal/virtualFileSystem.d.ts +20 -49
- package/dist/internal/virtualFileSystem.d.ts.map +1 -1
- package/dist/internal/virtualFileSystem.js +85 -1927
- package/dist/internal/volumeLimits.d.ts +1 -0
- package/dist/internal/volumeLimits.d.ts.map +1 -1
- package/dist/internal/volumeLimits.js +3 -2
- package/dist/internal/volumeState.d.ts +10 -79
- package/dist/internal/volumeState.d.ts.map +1 -1
- package/dist/internal/volumeState.js +9 -79
- package/dist/internal/watchHub.d.ts +9 -5
- package/dist/internal/watchHub.d.ts.map +1 -1
- package/dist/internal/watchHub.js +35 -8
- package/package.json +16 -9
- package/dist/internal/inodeTable.d.ts +0 -20
- package/dist/internal/inodeTable.d.ts.map +0 -1
- package/dist/internal/inodeTable.js +0 -48
- package/dist/internal/path.d.ts +0 -56
- package/dist/internal/path.d.ts.map +0 -1
- package/dist/internal/path.js +0 -141
- package/dist/internal/resolution.d.ts +0 -135
- package/dist/internal/resolution.d.ts.map +0 -1
- package/dist/internal/resolution.js +0 -277
- package/dist/internal/testSeams.d.ts +0 -17
- package/dist/internal/testSeams.d.ts.map +0 -1
- package/dist/internal/testSeams.js +0 -20
- package/dist/internal/tokenRegistry.d.ts +0 -77
- package/dist/internal/tokenRegistry.d.ts.map +0 -1
- package/dist/internal/tokenRegistry.js +0 -128
- package/dist/internal/turnstile.d.ts +0 -8
- package/dist/internal/turnstile.d.ts.map +0 -1
- package/dist/internal/turnstile.js +0 -43
package/dist/Target.js
CHANGED
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* How a caller names what it operates on. A `Target` is a path, an object
|
|
3
|
-
* reference, or an open handle; an `Entry` is a child of a directory target
|
|
4
|
-
* called `name`. Every verb takes one or the other, so the three addressing
|
|
5
|
-
* modes share one body and one option vocabulary.
|
|
6
|
-
*
|
|
7
|
-
* @since 0.6.0
|
|
8
|
-
*/
|
|
9
|
-
import * as Data from "effect/Data";
|
|
10
|
-
import * as Predicate from "effect/Predicate";
|
|
11
|
-
import * as Schema from "effect/Schema";
|
|
12
|
-
import { DirectoryHandleId, FileHandleId } from "./FileHandle.js";
|
|
13
|
-
import * as Internal from "./internal/bytePath.js";
|
|
14
|
-
const isFileHandle = (value) => Predicate.hasProperty(FileHandleId)(value) && value[FileHandleId] === true;
|
|
15
|
-
const isDirectoryHandle = (value) => Predicate.hasProperty(DirectoryHandleId)(value) && value[DirectoryHandleId] === true;
|
|
16
|
-
const enumeration = Data.taggedEnum();
|
|
1
|
+
import { Address } from "./internal/engine.js";
|
|
17
2
|
/**
|
|
18
3
|
* Whether a value is a `Target`.
|
|
19
4
|
*
|
|
20
5
|
* @category predicates
|
|
21
6
|
* @since 0.6.0
|
|
22
7
|
*/
|
|
23
|
-
export const isTarget =
|
|
8
|
+
export const isTarget = Address.isTarget;
|
|
24
9
|
/**
|
|
25
10
|
* Constructors and matchers for `Target`, plus `of`, which wraps a bare path,
|
|
26
11
|
* reference, or handle.
|
|
@@ -28,46 +13,21 @@ export const isTarget = (value) => Predicate.isTagged("Path")(value) || Predicat
|
|
|
28
13
|
* @category constructors
|
|
29
14
|
* @since 0.6.0
|
|
30
15
|
*/
|
|
31
|
-
export const Target =
|
|
32
|
-
Path: enumeration.Path,
|
|
33
|
-
Reference: enumeration.Reference,
|
|
34
|
-
Handle: enumeration.Handle,
|
|
35
|
-
$is: enumeration.$is,
|
|
36
|
-
$match: enumeration.$match,
|
|
37
|
-
// A string or byte path is a path and a handle is a handle; anything else is taken for a reference, so a forged
|
|
38
|
-
// token reaches the registry and is reported as one.
|
|
39
|
-
of: (input) => {
|
|
40
|
-
if (isTarget(input))
|
|
41
|
-
return input;
|
|
42
|
-
if (isFileHandle(input) || isDirectoryHandle(input))
|
|
43
|
-
return enumeration.Handle({ handle: input });
|
|
44
|
-
if (Predicate.isString(input) || Internal.isBytePath(input))
|
|
45
|
-
return enumeration.Path({ path: input });
|
|
46
|
-
return enumeration.Reference({ reference: input });
|
|
47
|
-
}
|
|
48
|
-
};
|
|
16
|
+
export const Target = Address.Target;
|
|
49
17
|
/**
|
|
50
18
|
* Schema for a well-formed entry name, as bytes.
|
|
51
19
|
*
|
|
52
20
|
* @category schemas
|
|
53
21
|
* @since 0.6.0
|
|
54
22
|
*/
|
|
55
|
-
export const Name =
|
|
56
|
-
? "must not be empty"
|
|
57
|
-
: bytes.length > 255
|
|
58
|
-
? "must be at most 255 bytes"
|
|
59
|
-
: bytes.includes(0)
|
|
60
|
-
? "must not contain NUL"
|
|
61
|
-
: bytes.includes(0x2f)
|
|
62
|
-
? "must not contain a slash"
|
|
63
|
-
: undefined));
|
|
23
|
+
export const Name = Address.Name;
|
|
64
24
|
/**
|
|
65
25
|
* Whether a value is an `Entry`.
|
|
66
26
|
*
|
|
67
27
|
* @category predicates
|
|
68
28
|
* @since 0.6.0
|
|
69
29
|
*/
|
|
70
|
-
export const isEntry =
|
|
30
|
+
export const isEntry = Address.isEntry;
|
|
71
31
|
/**
|
|
72
32
|
* Names a child of a directory. The directory may be given bare.
|
|
73
33
|
*
|
|
@@ -82,11 +42,11 @@ export const isEntry = (value) => Predicate.hasProperty(value, "directory") && P
|
|
|
82
42
|
* @category constructors
|
|
83
43
|
* @since 0.6.0
|
|
84
44
|
*/
|
|
85
|
-
export const Entry =
|
|
45
|
+
export const Entry = Address.Entry;
|
|
86
46
|
/**
|
|
87
47
|
* Whether a path input is a byte path rather than a string.
|
|
88
48
|
*
|
|
89
49
|
* @category predicates
|
|
90
50
|
* @since 0.6.0
|
|
91
51
|
*/
|
|
92
|
-
export const isBytePathInput =
|
|
52
|
+
export const isBytePathInput = Address.isBytePathInput;
|
package/dist/Testing.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ import type { VolumeOptions } from "./Volume.js";
|
|
|
31
31
|
export interface LayerOptions {
|
|
32
32
|
/** Entries the volume starts with; without one the volume starts empty. */
|
|
33
33
|
readonly fixture?: Fixture;
|
|
34
|
-
/**
|
|
34
|
+
/** Execution mode, limits and identity of the volume. */
|
|
35
35
|
readonly volume?: VolumeOptions;
|
|
36
36
|
/** Credentials and umask of the root caller the layer provides. */
|
|
37
37
|
readonly caller?: RootCallerOptions;
|
|
@@ -128,5 +128,8 @@ export declare const callerAs: (identity: Identity, options?: Omit<RootCallerOpt
|
|
|
128
128
|
* @category combinators
|
|
129
129
|
* @since 0.6.0
|
|
130
130
|
*/
|
|
131
|
-
export declare const collectChanges:
|
|
131
|
+
export declare const collectChanges: {
|
|
132
|
+
(n: number): <A, E, R>(stream: Stream.Stream<A, E, R>) => Effect.Effect<Effect.Effect<Array<A>, E>, never, R | Scope.Scope>;
|
|
133
|
+
<A, E, R>(stream: Stream.Stream<A, E, R>, n: number): Effect.Effect<Effect.Effect<Array<A>, E>, never, R | Scope.Scope>;
|
|
134
|
+
};
|
|
132
135
|
//# sourceMappingURL=Testing.d.ts.map
|
package/dist/Testing.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Testing.d.ts","sourceRoot":"","sources":["../src/Testing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"Testing.d.ts","sourceRoot":"","sources":["../src/Testing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,CAAC,EAAE,aAAa,CAAA;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAA;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,KAAK,aAAc,YAAY,KAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,CAOhG,CAAA;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,QAAQ,aACT,QAAQ,YACR,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAC5C,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CACoC,CAAA;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,cAAc,EAAE;IAC3B,CACE,CAAC,EAAE,MAAM,GACR,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;IACjH,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACN,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC9B,CAAC,EAAE,MAAM,GACR,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAA;CAQlE,CAAA"}
|
package/dist/Testing.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import * as Fiber from "effect/Fiber";
|
|
3
|
+
import { dual } from "effect/Function";
|
|
3
4
|
import * as Layer from "effect/Layer";
|
|
4
5
|
import * as Stream from "effect/Stream";
|
|
5
6
|
import { Caller, Volume } from "./VirtualFileSystem.js";
|
|
@@ -97,4 +98,4 @@ export const callerAs = (identity, options) => Effect.flatMap(Volume, (volume) =
|
|
|
97
98
|
* @category combinators
|
|
98
99
|
* @since 0.6.0
|
|
99
100
|
*/
|
|
100
|
-
export const collectChanges = (stream, n) => Stream.runCollect(Stream.take(stream, n)).pipe(Effect.forkScoped({ startImmediately: true }), Effect.map(Fiber.join));
|
|
101
|
+
export const collectChanges = dual(2, (stream, n) => Stream.runCollect(Stream.take(stream, n)).pipe(Effect.forkScoped({ startImmediately: true }), Effect.map(Fiber.join)));
|
package/dist/VfsError.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Filesystem and configuration errors for `@effect-vfs/core`. Every failure a volume, caller,
|
|
3
3
|
* handle, snapshot codec, delta codec, or live store reports is a `VfsError`
|
|
4
4
|
* whose `code` says what went wrong, whose `operation` names the verb or
|
|
5
5
|
* constructor, and which may name the offending option `field`, the `path`
|
|
6
6
|
* it was addressing, and the underlying `cause` it classifies.
|
|
7
|
+
* Live-volume registry capacity additionally reports Effect's native
|
|
8
|
+
* `Cause.ExceededCapacityError`.
|
|
7
9
|
*
|
|
8
10
|
* @since 0.6.0
|
|
9
11
|
*/
|
|
10
12
|
import * as Schema from "effect/Schema";
|
|
11
|
-
import type { BytePath } from "./
|
|
13
|
+
import type { BytePath } from "./internal/bytePath.js";
|
|
12
14
|
/**
|
|
13
15
|
* Schema for the codes an operation on a volume, caller, or handle reports.
|
|
14
16
|
*
|
package/dist/VfsError.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VfsError.d.ts","sourceRoot":"","sources":["../src/VfsError.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"VfsError.d.ts","sourceRoot":"","sources":["../src/VfsError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAMtD;;;;;GAKG;AACH,eAAO,MAAM,MAAM,4bA+BjB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,SAAS,0GAAkG,CAAA;AAExH;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,SAAS,4CAAoC,CAAA;AAE1D;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,SAAS,yFAAiF,CAAA;AAEvG;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,OAAO,ulBAKlB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,gGAUrB,CAAA;;IA2BC,uBAAuB;;IAEvB,2CAA2C;;IAE3C,wEAAwE;;IAExE,gEAAgE;;IAEhE,qEAAqE;;;AAjCvE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,QAAS,SAAQ,aAW5B;IACA,IAAa,OAAO,IAAI,MAAM,CAE7B;CACF;AAED;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5D;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAElE;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,CAAA;AAElE;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,CAAA;AAE7E;;;;;;GAMG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC,SAAS,OAAO;IACtC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;IAChB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CACzB;AAUD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,OAAO,SAAS,KAAK,CAAC,CAAC,CAAC,KAAG,QAAQ,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;CAYtF,CAAA"}
|
package/dist/VfsError.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Filesystem and configuration errors for `@effect-vfs/core`. Every failure a volume, caller,
|
|
3
3
|
* handle, snapshot codec, delta codec, or live store reports is a `VfsError`
|
|
4
4
|
* whose `code` says what went wrong, whose `operation` names the verb or
|
|
5
5
|
* constructor, and which may name the offending option `field`, the `path`
|
|
6
6
|
* it was addressing, and the underlying `cause` it classifies.
|
|
7
|
+
* Live-volume registry capacity additionally reports Effect's native
|
|
8
|
+
* `Cause.ExceededCapacityError`.
|
|
7
9
|
*
|
|
8
10
|
* @since 0.6.0
|
|
9
11
|
*/
|
|
@@ -34,8 +34,9 @@ import * as VolumeModule from "./Volume.js";
|
|
|
34
34
|
import * as WatchModule from "./Watch.js";
|
|
35
35
|
export { Entry, type EntryInput, isEntry, isTarget, Name, type NameInput, type PathTarget, Target, type TargetInput } from "./Target.js";
|
|
36
36
|
export { BytePath } from "./BytePath.js";
|
|
37
|
-
import type
|
|
37
|
+
import { type DecodeLimits, type Snapshot } from "./Snapshot.js";
|
|
38
38
|
export { DecodeLimits, type Snapshot, SnapshotTypeId } from "./Snapshot.js";
|
|
39
|
+
import type * as Engine from "./internal/engine.js";
|
|
39
40
|
import { type LiveImageStore, type Options as LiveVolumeOptions } from "./LiveVolume.js";
|
|
40
41
|
import * as SnapshotDeltaModel from "./SnapshotDelta.js";
|
|
41
42
|
export { MergeConflict, MergeConflictReason, MergeOptions, MergeResolution, MergeResult, MergeSideChange, MergeTake, SnapshotChange, SnapshotChangesOptions, type SnapshotDelta, SnapshotDeltaLimits, SnapshotDeltaTypeId, SnapshotDifference, SnapshotNodeKind } from "./SnapshotDelta.js";
|
|
@@ -235,7 +236,7 @@ export declare const VolumeDurabilityOrder: Order.Order<VolumeDurability>;
|
|
|
235
236
|
* @category predicates
|
|
236
237
|
* @since 0.1.0
|
|
237
238
|
*/
|
|
238
|
-
export declare const isVolumeDurabilityAtLeast:
|
|
239
|
+
export declare const isVolumeDurabilityAtLeast: typeof VolumeModule.isVolumeDurabilityAtLeast;
|
|
239
240
|
/**
|
|
240
241
|
* Schema for the stable logical identity of a volume.
|
|
241
242
|
*
|
|
@@ -337,7 +338,8 @@ export type ReferenceKey = typeof ReferenceKey.Type;
|
|
|
337
338
|
*/
|
|
338
339
|
export declare const VolumeOptions: typeof VolumeModule.VolumeOptions;
|
|
339
340
|
/**
|
|
340
|
-
*
|
|
341
|
+
* Execution policy, capacity, admission, watch retention, and path limits for a volume.
|
|
342
|
+
* `execution` defaults to `"cooperative"`; `"sync"` opts memory operations into non-yielding coordination.
|
|
341
343
|
* `maxPendingOperations` defaults to 64 and `maxWatchEvents` defaults to 256.
|
|
342
344
|
*
|
|
343
345
|
* @category models
|
|
@@ -351,7 +353,7 @@ export type VolumeOptions = typeof VolumeOptions.Type;
|
|
|
351
353
|
* @category models
|
|
352
354
|
* @since 0.1.0
|
|
353
355
|
*/
|
|
354
|
-
export interface VolumeLimits {
|
|
356
|
+
export interface VolumeLimits extends Engine.EngineLimits {
|
|
355
357
|
readonly maxBytes: ByteSize.ByteSize | undefined;
|
|
356
358
|
readonly maxFileBytes: ByteSize.ByteSize;
|
|
357
359
|
readonly maxEntries: number | undefined;
|
|
@@ -368,7 +370,7 @@ export interface VolumeLimits {
|
|
|
368
370
|
* @category models
|
|
369
371
|
* @since 0.1.0
|
|
370
372
|
*/
|
|
371
|
-
export interface VolumeUsage {
|
|
373
|
+
export interface VolumeUsage extends Engine.VolumeUsage {
|
|
372
374
|
readonly usedBytes: bigint;
|
|
373
375
|
readonly entries: number;
|
|
374
376
|
}
|
|
@@ -416,7 +418,7 @@ export type Metadata = typeof Metadata.Type;
|
|
|
416
418
|
* @category models
|
|
417
419
|
* @since 0.1.0
|
|
418
420
|
*/
|
|
419
|
-
export interface ObjectReference {
|
|
421
|
+
export interface ObjectReference extends Engine.ObjectReference {
|
|
420
422
|
readonly [ObjectReferenceId]: true;
|
|
421
423
|
}
|
|
422
424
|
/**
|
|
@@ -454,7 +456,7 @@ export interface ObjectReference {
|
|
|
454
456
|
* @category models
|
|
455
457
|
* @since 0.1.0
|
|
456
458
|
*/
|
|
457
|
-
export interface ObjectObservation<A> {
|
|
459
|
+
export interface ObjectObservation<A> extends Engine.ObjectObservation<A> {
|
|
458
460
|
readonly value: A;
|
|
459
461
|
readonly revision: bigint;
|
|
460
462
|
}
|
|
@@ -464,7 +466,7 @@ export interface ObjectObservation<A> {
|
|
|
464
466
|
* @category models
|
|
465
467
|
* @since 0.1.0
|
|
466
468
|
*/
|
|
467
|
-
export interface DirectoryEntry {
|
|
469
|
+
export interface DirectoryEntry extends Engine.DirectoryEntry {
|
|
468
470
|
readonly name: Uint8Array;
|
|
469
471
|
readonly reference: ObjectReference;
|
|
470
472
|
}
|
|
@@ -482,7 +484,7 @@ export interface DirectoryEntry {
|
|
|
482
484
|
* @category models
|
|
483
485
|
* @since 0.6.0
|
|
484
486
|
*/
|
|
485
|
-
export interface WalkEntry {
|
|
487
|
+
export interface WalkEntry extends Engine.WalkEntry {
|
|
486
488
|
readonly path: BytePath;
|
|
487
489
|
readonly name: Uint8Array;
|
|
488
490
|
readonly reference: ObjectReference;
|
|
@@ -535,7 +537,7 @@ export type DirectoryChange = typeof DirectoryChange.Type;
|
|
|
535
537
|
* @category models
|
|
536
538
|
* @since 0.4.0
|
|
537
539
|
*/
|
|
538
|
-
export interface ReferenceEntryResult {
|
|
540
|
+
export interface ReferenceEntryResult extends Engine.ReferenceEntryResult {
|
|
539
541
|
readonly reference: ObjectReference;
|
|
540
542
|
readonly directory: DirectoryChange;
|
|
541
543
|
}
|
|
@@ -651,7 +653,7 @@ export type Times = typeof Times.Type;
|
|
|
651
653
|
* @category models
|
|
652
654
|
* @since 0.1.0
|
|
653
655
|
*/
|
|
654
|
-
export interface DirectoryHandle {
|
|
656
|
+
export interface DirectoryHandle extends Engine.DirectoryHandle {
|
|
655
657
|
readonly [DirectoryHandleId]: true;
|
|
656
658
|
readonly stat: Effect.Effect<Metadata, FsFailure>;
|
|
657
659
|
readonly close: Effect.Effect<void, FsFailure>;
|
|
@@ -801,7 +803,7 @@ export type OpenEntryOptions = typeof OpenEntryOptions.Type;
|
|
|
801
803
|
* @category models
|
|
802
804
|
* @since 0.4.0
|
|
803
805
|
*/
|
|
804
|
-
export interface OpenEntryResult {
|
|
806
|
+
export interface OpenEntryResult extends Engine.OpenEntryResult {
|
|
805
807
|
readonly handle: FileHandle;
|
|
806
808
|
readonly reference: ObjectReference;
|
|
807
809
|
readonly created: boolean;
|
|
@@ -862,7 +864,7 @@ export type WriteFileOptions = typeof WriteFileOptions.Type;
|
|
|
862
864
|
* @category models
|
|
863
865
|
* @since 0.6.0
|
|
864
866
|
*/
|
|
865
|
-
export interface ReadResult {
|
|
867
|
+
export interface ReadResult extends Engine.ReadResult {
|
|
866
868
|
readonly bytes: Uint8Array;
|
|
867
869
|
readonly eof: boolean;
|
|
868
870
|
}
|
|
@@ -898,7 +900,7 @@ export interface ReadResult {
|
|
|
898
900
|
* @category models
|
|
899
901
|
* @since 0.1.0
|
|
900
902
|
*/
|
|
901
|
-
export interface FileHandle {
|
|
903
|
+
export interface FileHandle extends Engine.FileHandle {
|
|
902
904
|
readonly [FileHandleId]: true;
|
|
903
905
|
/** Reads up to `maximumBytes` from the cursor and advances it by the returned length. */
|
|
904
906
|
readonly read: (maximumBytes: number) => Effect.Effect<Uint8Array, FsFailure>;
|
|
@@ -906,10 +908,22 @@ export interface FileHandle {
|
|
|
906
908
|
readonly pread: (maximumBytes: number, offset: bigint) => Effect.Effect<ReadResult, FsFailure>;
|
|
907
909
|
/** Writes at the cursor and advances it, or writes at end of file when opened for append. */
|
|
908
910
|
readonly write: (bytes: Uint8Array) => Effect.Effect<number, FsFailure>;
|
|
909
|
-
/**
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
911
|
+
/**
|
|
912
|
+
* Writes at `offset` without changing the cursor. Append mode does not affect positional writes.
|
|
913
|
+
* The curried form is `pwrite(offset)(bytes)`.
|
|
914
|
+
*/
|
|
915
|
+
readonly pwrite: {
|
|
916
|
+
(offset: bigint): (bytes: Uint8Array) => Effect.Effect<number, FsFailure>;
|
|
917
|
+
(bytes: Uint8Array, offset: bigint): Effect.Effect<number, FsFailure>;
|
|
918
|
+
};
|
|
919
|
+
/**
|
|
920
|
+
* Moves the cursor and returns its new offset. `data` finds content and `hole` finds end of file.
|
|
921
|
+
* The curried form is `seek(mode)(offset)`.
|
|
922
|
+
*/
|
|
923
|
+
readonly seek: {
|
|
924
|
+
(mode: SeekMode): (offset: bigint) => Effect.Effect<bigint, FsFailure>;
|
|
925
|
+
(offset: bigint, mode: SeekMode): Effect.Effect<bigint, FsFailure>;
|
|
926
|
+
};
|
|
913
927
|
/** Sets the file length without changing the cursor. */
|
|
914
928
|
readonly truncate: (length: bigint) => Effect.Effect<void, FsFailure>;
|
|
915
929
|
/** Reads metadata for the open file. */
|
|
@@ -1006,9 +1020,21 @@ export interface FileHandle {
|
|
|
1006
1020
|
* @category models
|
|
1007
1021
|
* @since 0.1.0
|
|
1008
1022
|
*/
|
|
1009
|
-
export interface Caller {
|
|
1023
|
+
export interface Caller extends Engine.EngineOperations {
|
|
1010
1024
|
readonly [CallerId]: true;
|
|
1011
|
-
/**
|
|
1025
|
+
/** Backing volume configuration; these are not subtree quotas. */
|
|
1026
|
+
readonly limits: VolumeLimits;
|
|
1027
|
+
/** Watches current authorized names, rebasing events when each change commits. */
|
|
1028
|
+
readonly watch: (target: TargetInput, options?: WatchModule.CallerWatchOptions) => Effect.Effect<Stream.Stream<Change, FsFailure>, FsFailure, Scope.Scope>;
|
|
1029
|
+
/**
|
|
1030
|
+
* Narrows authority to a directory identity and resets the working directory. Absolute paths and symbolic
|
|
1031
|
+
* links start at this root; `..` stops here. Nested roots retain their ancestor boundaries. References and
|
|
1032
|
+
* direct handles check current membership on every use, including privileged callers. Root rename preserves
|
|
1033
|
+
* authority; deletion permanently invalidates it. Existing hard links can share contents across roots.
|
|
1034
|
+
* Independently scoped descendants and handles retain their own lifetime when their creator closes.
|
|
1035
|
+
*/
|
|
1036
|
+
readonly withRoot: (directory: TargetInput) => Effect.Effect<Caller, FsFailure, Scope.Scope>;
|
|
1037
|
+
/** The reference of the caller's visible root directory. */
|
|
1012
1038
|
readonly root: Effect.Effect<ObjectReference, FsFailure>;
|
|
1013
1039
|
/** The reference of a child of a directory, without following it. */
|
|
1014
1040
|
readonly lookup: (entry: EntryInput) => Effect.Effect<ObjectReference, FsFailure>;
|
|
@@ -1036,8 +1062,14 @@ export interface Caller {
|
|
|
1036
1062
|
readonly access: (target: TargetInput, bits?: number) => Effect.Effect<number, FsFailure>;
|
|
1037
1063
|
/** The whole content of a regular file. */
|
|
1038
1064
|
readonly readFile: (target: TargetInput) => Effect.Effect<Uint8Array, FsFailure>;
|
|
1039
|
-
/**
|
|
1040
|
-
|
|
1065
|
+
/**
|
|
1066
|
+
* Writes a whole file in one operation and returns its object reference, creating or replacing it as the options say.
|
|
1067
|
+
* The curried form is `writeFile(bytes, options)(entry)`; the caller remains bound.
|
|
1068
|
+
*/
|
|
1069
|
+
readonly writeFile: {
|
|
1070
|
+
(bytes: Uint8Array, options: WriteFileOptions): (entry: EntryInput) => Effect.Effect<ObjectReference, FsFailure>;
|
|
1071
|
+
(entry: EntryInput, bytes: Uint8Array, options: WriteFileOptions): Effect.Effect<ObjectReference, FsFailure>;
|
|
1072
|
+
};
|
|
1041
1073
|
/**
|
|
1042
1074
|
* Opens a file. On a target, the file must exist and `create` is rejected. On an entry, the name is looked up
|
|
1043
1075
|
* and created in one gate hold, and the result reports whether it was created.
|
|
@@ -1059,7 +1091,10 @@ export interface Caller {
|
|
|
1059
1091
|
/** Creates a symbolic link to `target`, stored as given. */
|
|
1060
1092
|
readonly symlink: (target: PathInput, entry: EntryInput, options?: SymlinkOptions) => Effect.Effect<ReferenceEntryResult, FsFailure>;
|
|
1061
1093
|
/** Adds a name for an existing file or symbolic link. A path source follows a final symbolic link only when its target says so. */
|
|
1062
|
-
readonly link:
|
|
1094
|
+
readonly link: {
|
|
1095
|
+
(entry: EntryInput): (source: TargetInput) => Effect.Effect<ReferenceEntryResult, FsFailure>;
|
|
1096
|
+
(source: TargetInput, entry: EntryInput): Effect.Effect<ReferenceEntryResult, FsFailure>;
|
|
1097
|
+
};
|
|
1063
1098
|
/** Removes a file or symbolic link. */
|
|
1064
1099
|
readonly unlink: (entry: EntryInput) => Effect.Effect<DirectoryChange, FsFailure>;
|
|
1065
1100
|
/** Removes an empty directory. */
|
|
@@ -1079,15 +1114,30 @@ export interface Caller {
|
|
|
1079
1114
|
(entry: EntryInput, options: RemoveOptions): Effect.Effect<DirectoryChange | undefined, FsFailure>;
|
|
1080
1115
|
};
|
|
1081
1116
|
/** Moves an entry, replacing a compatible destination. */
|
|
1082
|
-
readonly rename:
|
|
1117
|
+
readonly rename: {
|
|
1118
|
+
(to: EntryInput): (from: EntryInput) => Effect.Effect<RenameReferenceResult, FsFailure>;
|
|
1119
|
+
(from: EntryInput, to: EntryInput): Effect.Effect<RenameReferenceResult, FsFailure>;
|
|
1120
|
+
};
|
|
1083
1121
|
/** Sets the permission bits of a target. */
|
|
1084
|
-
readonly chmod:
|
|
1122
|
+
readonly chmod: {
|
|
1123
|
+
(mode: number): (target: TargetInput) => Effect.Effect<void, FsFailure>;
|
|
1124
|
+
(target: TargetInput, mode: number): Effect.Effect<void, FsFailure>;
|
|
1125
|
+
};
|
|
1085
1126
|
/** Changes the owner or group of a target. */
|
|
1086
|
-
readonly chown:
|
|
1127
|
+
readonly chown: {
|
|
1128
|
+
(owner: OwnerUpdate): (target: TargetInput) => Effect.Effect<void, FsFailure>;
|
|
1129
|
+
(target: TargetInput, owner: OwnerUpdate): Effect.Effect<void, FsFailure>;
|
|
1130
|
+
};
|
|
1087
1131
|
/** Sets the access and modification times of a target. */
|
|
1088
|
-
readonly utimes:
|
|
1132
|
+
readonly utimes: {
|
|
1133
|
+
(times: Times): (target: TargetInput) => Effect.Effect<void, FsFailure>;
|
|
1134
|
+
(target: TargetInput, times: Times): Effect.Effect<void, FsFailure>;
|
|
1135
|
+
};
|
|
1089
1136
|
/** Sets the size of a regular file. */
|
|
1090
|
-
readonly truncate:
|
|
1137
|
+
readonly truncate: {
|
|
1138
|
+
(length: bigint): (target: TargetInput) => Effect.Effect<void, FsFailure>;
|
|
1139
|
+
(target: TargetInput, length: bigint): Effect.Effect<void, FsFailure>;
|
|
1140
|
+
};
|
|
1091
1141
|
/**
|
|
1092
1142
|
* Changes a target's size, owner, mode and times as one change. Every check passes before any attribute
|
|
1093
1143
|
* applies, so a failure changes nothing. The attributes apply as size, owner, mode, then times, the POSIX
|
|
@@ -1096,7 +1146,10 @@ export interface Caller {
|
|
|
1096
1146
|
* does so before it calls setattr, and passes the revision it read as `expected` so the change refuses a
|
|
1097
1147
|
* target another change has moved.
|
|
1098
1148
|
*/
|
|
1099
|
-
readonly setattr:
|
|
1149
|
+
readonly setattr: {
|
|
1150
|
+
(attributes: SetattrOptions): (target: TargetInput) => Effect.Effect<void, FsFailure>;
|
|
1151
|
+
(target: TargetInput, attributes: SetattrOptions): Effect.Effect<void, FsFailure>;
|
|
1152
|
+
};
|
|
1100
1153
|
/** A caller whose working directory is the target, released with the scope. */
|
|
1101
1154
|
readonly withDirectory: (directory: TargetInput) => Effect.Effect<Caller, FsFailure, Scope.Scope>;
|
|
1102
1155
|
/** A handle on a directory, released with the scope. */
|
|
@@ -1201,6 +1254,18 @@ export declare const WatchOptions: typeof WatchModule.WatchOptions;
|
|
|
1201
1254
|
* @since 0.6.0
|
|
1202
1255
|
*/
|
|
1203
1256
|
export type WatchOptions = typeof WatchOptions.Type;
|
|
1257
|
+
/**
|
|
1258
|
+
* Caller watch publication and alias options.
|
|
1259
|
+
* @category schemas
|
|
1260
|
+
* @since 0.9.0
|
|
1261
|
+
*/
|
|
1262
|
+
export declare const CallerWatchOptions: typeof WatchModule.CallerWatchOptions;
|
|
1263
|
+
/**
|
|
1264
|
+
* Options for a caller watch.
|
|
1265
|
+
* @category models
|
|
1266
|
+
* @since 0.9.0
|
|
1267
|
+
*/
|
|
1268
|
+
export type CallerWatchOptions = typeof CallerWatchOptions.Type;
|
|
1204
1269
|
/**
|
|
1205
1270
|
* Schema for the filesystem entry kinds reported by overlay summaries.
|
|
1206
1271
|
*
|
|
@@ -1464,11 +1529,20 @@ export declare const Volume: Context.Service<Volume, Volume> & {
|
|
|
1464
1529
|
/** A fresh empty volume. */
|
|
1465
1530
|
readonly layer: (options?: VolumeOptions) => Layer.Layer<Volume, VfsError, Crypto.Crypto>;
|
|
1466
1531
|
/** A fresh volume restored from a snapshot. */
|
|
1467
|
-
readonly layerFromSnapshot:
|
|
1532
|
+
readonly layerFromSnapshot: {
|
|
1533
|
+
(options?: VolumeOptions): (snapshot: Snapshot) => Layer.Layer<Volume, VfsError, Crypto.Crypto>;
|
|
1534
|
+
(snapshot: Snapshot, options?: VolumeOptions): Layer.Layer<Volume, VfsError, Crypto.Crypto>;
|
|
1535
|
+
};
|
|
1468
1536
|
/** A fresh volume built from a fixture. */
|
|
1469
|
-
readonly layerFromFixture:
|
|
1537
|
+
readonly layerFromFixture: {
|
|
1538
|
+
(options?: VolumeOptions): (fixture: Fixture) => Layer.Layer<Volume, VfsError, Crypto.Crypto>;
|
|
1539
|
+
(fixture: Fixture, options?: VolumeOptions): Layer.Layer<Volume, VfsError, Crypto.Crypto>;
|
|
1540
|
+
};
|
|
1470
1541
|
/** A writable overlay over a snapshot base. */
|
|
1471
|
-
readonly layerOverlay:
|
|
1542
|
+
readonly layerOverlay: {
|
|
1543
|
+
(options?: VolumeOptions): (base: Snapshot) => Layer.Layer<Volume, VfsError, Crypto.Crypto>;
|
|
1544
|
+
(base: Snapshot, options?: VolumeOptions): Layer.Layer<Volume, VfsError, Crypto.Crypto>;
|
|
1545
|
+
};
|
|
1472
1546
|
/** A durable volume opened through the `LiveImageStore` in context; it shuts down with the layer's scope. */
|
|
1473
1547
|
readonly layerLive: (options: LiveVolumeOptions) => Layer.Layer<Volume, VfsError, LiveImageStore | Crypto.Crypto>;
|
|
1474
1548
|
};
|
|
@@ -1530,7 +1604,10 @@ export declare const Caller: Context.Service<Caller, Caller> & {
|
|
|
1530
1604
|
* @category serialization
|
|
1531
1605
|
* @since 0.6.0
|
|
1532
1606
|
*/
|
|
1533
|
-
export declare const encodeSnapshotStream:
|
|
1607
|
+
export declare const encodeSnapshotStream: {
|
|
1608
|
+
(limits?: DecodeLimits): (snapshot: Snapshot) => Stream.Stream<Uint8Array, ImageFailure | ArgumentFailure>;
|
|
1609
|
+
(snapshot: Snapshot, limits?: DecodeLimits): Stream.Stream<Uint8Array, ImageFailure | ArgumentFailure>;
|
|
1610
|
+
};
|
|
1534
1611
|
/**
|
|
1535
1612
|
* Encodes a snapshot as owned UTF-8 bytes in the version 1 snapshot format.
|
|
1536
1613
|
*
|
|
@@ -1571,7 +1648,10 @@ export declare const encodeSnapshotStream: (snapshot: Snapshot, limits?: DecodeL
|
|
|
1571
1648
|
* @category serialization
|
|
1572
1649
|
* @since 0.1.0
|
|
1573
1650
|
*/
|
|
1574
|
-
export declare const encodeSnapshot:
|
|
1651
|
+
export declare const encodeSnapshot: {
|
|
1652
|
+
(limits?: DecodeLimits): (snapshot: Snapshot) => Effect.Effect<Uint8Array, ImageFailure | ArgumentFailure>;
|
|
1653
|
+
(snapshot: Snapshot, limits?: DecodeLimits): Effect.Effect<Uint8Array, ImageFailure | ArgumentFailure>;
|
|
1654
|
+
};
|
|
1575
1655
|
/**
|
|
1576
1656
|
* A sink that decodes a stream of version 1 snapshot chunks while enforcing
|
|
1577
1657
|
* explicit input and payload limits.
|
|
@@ -1665,7 +1745,10 @@ export declare const decodeSnapshotSink: (limits: DecodeLimits) => Sink.Sink<Sna
|
|
|
1665
1745
|
* @category serialization
|
|
1666
1746
|
* @since 0.1.0
|
|
1667
1747
|
*/
|
|
1668
|
-
export declare const decodeSnapshot:
|
|
1748
|
+
export declare const decodeSnapshot: {
|
|
1749
|
+
(limits: DecodeLimits): (input: Uint8Array) => Effect.Effect<Snapshot, ImageFailure | ArgumentFailure>;
|
|
1750
|
+
(input: Uint8Array, limits: DecodeLimits): Effect.Effect<Snapshot, ImageFailure | ArgumentFailure>;
|
|
1751
|
+
};
|
|
1669
1752
|
/**
|
|
1670
1753
|
* Computes an exact portable delta between two immutable snapshots.
|
|
1671
1754
|
* Requires the platform-neutral `Crypto.Crypto` service for base identity. Provide
|
|
@@ -1704,7 +1787,10 @@ export declare const decodeSnapshot: (input: Uint8Array, limits: DecodeLimits) =
|
|
|
1704
1787
|
* @category snapshots
|
|
1705
1788
|
* @since 0.1.0
|
|
1706
1789
|
*/
|
|
1707
|
-
export declare const diffSnapshots:
|
|
1790
|
+
export declare const diffSnapshots: {
|
|
1791
|
+
(target: Snapshot, limits?: SnapshotDeltaModel.SnapshotDeltaLimits): (base: Snapshot) => Effect.Effect<SnapshotDeltaModel.SnapshotDelta, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1792
|
+
(base: Snapshot, target: Snapshot, limits?: SnapshotDeltaModel.SnapshotDeltaLimits): Effect.Effect<SnapshotDeltaModel.SnapshotDelta, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1793
|
+
};
|
|
1708
1794
|
/**
|
|
1709
1795
|
* Verifies an exact snapshot delta against its base and derives an owned path-oriented summary.
|
|
1710
1796
|
* Requires the platform-neutral `Crypto.Crypto` service for base identity. Provide
|
|
@@ -1740,7 +1826,10 @@ export declare const diffSnapshots: (base: Snapshot, target: Snapshot, limits?:
|
|
|
1740
1826
|
* @category snapshots
|
|
1741
1827
|
* @since 0.1.0
|
|
1742
1828
|
*/
|
|
1743
|
-
export declare const inspectSnapshotDelta:
|
|
1829
|
+
export declare const inspectSnapshotDelta: {
|
|
1830
|
+
(delta: SnapshotDeltaModel.SnapshotDelta, options?: SnapshotDeltaModel.SnapshotChangesOptions, limits?: SnapshotDeltaModel.SnapshotDeltaLimits): (base: Snapshot) => Effect.Effect<ReadonlyArray<SnapshotDeltaModel.SnapshotChange>, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1831
|
+
(base: Snapshot, delta: SnapshotDeltaModel.SnapshotDelta, options?: SnapshotDeltaModel.SnapshotChangesOptions, limits?: SnapshotDeltaModel.SnapshotDeltaLimits): Effect.Effect<ReadonlyArray<SnapshotDeltaModel.SnapshotChange>, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1832
|
+
};
|
|
1744
1833
|
/**
|
|
1745
1834
|
* Applies an exact delta to its semantically matching base and returns a new snapshot.
|
|
1746
1835
|
* Requires the platform-neutral `Crypto.Crypto` service for base identity. Provide
|
|
@@ -1781,7 +1870,10 @@ export declare const inspectSnapshotDelta: (base: Snapshot, delta: SnapshotDelta
|
|
|
1781
1870
|
* @category snapshots
|
|
1782
1871
|
* @since 0.1.0
|
|
1783
1872
|
*/
|
|
1784
|
-
export declare const applySnapshotDelta:
|
|
1873
|
+
export declare const applySnapshotDelta: {
|
|
1874
|
+
(delta: SnapshotDeltaModel.SnapshotDelta, limits?: SnapshotDeltaModel.SnapshotDeltaLimits): (base: Snapshot) => Effect.Effect<Snapshot, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1875
|
+
(base: Snapshot, delta: SnapshotDeltaModel.SnapshotDelta, limits?: SnapshotDeltaModel.SnapshotDeltaLimits): Effect.Effect<Snapshot, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1876
|
+
};
|
|
1785
1877
|
/**
|
|
1786
1878
|
* Merges two snapshot deltas that share one base into a single delta, reporting path-level conflicts as data.
|
|
1787
1879
|
*
|
|
@@ -1819,7 +1911,7 @@ export declare const applySnapshotDelta: (base: Snapshot, delta: SnapshotDeltaMo
|
|
|
1819
1911
|
* )
|
|
1820
1912
|
*
|
|
1821
1913
|
* // Disjoint changes merge without conflicts; the delta applies to the shared base.
|
|
1822
|
-
* const merged = yield* Vfs.
|
|
1914
|
+
* const merged = yield* Vfs.applySnapshotDelta(base, result.delta).pipe(Effect.flatMap(Vfs.fromSnapshot()))
|
|
1823
1915
|
* const reader = yield* merged.caller()
|
|
1824
1916
|
*
|
|
1825
1917
|
* return [result.conflicts.length, new TextDecoder().decode(yield* reader.readFile("/shared.txt"))]
|
|
@@ -1833,7 +1925,10 @@ export declare const applySnapshotDelta: (base: Snapshot, delta: SnapshotDeltaMo
|
|
|
1833
1925
|
* @category snapshots
|
|
1834
1926
|
* @since 0.8.0
|
|
1835
1927
|
*/
|
|
1836
|
-
export declare const mergeSnapshotDeltas:
|
|
1928
|
+
export declare const mergeSnapshotDeltas: {
|
|
1929
|
+
(ours: SnapshotDeltaModel.SnapshotDelta, theirs: SnapshotDeltaModel.SnapshotDelta, options?: SnapshotDeltaModel.MergeOptions): (base: Snapshot) => Effect.Effect<SnapshotDeltaModel.MergeResult, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1930
|
+
(base: Snapshot, ours: SnapshotDeltaModel.SnapshotDelta, theirs: SnapshotDeltaModel.SnapshotDelta, options?: SnapshotDeltaModel.MergeOptions): Effect.Effect<SnapshotDeltaModel.MergeResult, VfsError | PlatformError.PlatformError, Crypto.Crypto>;
|
|
1931
|
+
};
|
|
1837
1932
|
/**
|
|
1838
1933
|
* Creates an Effect Schema codec between owned bytes and opaque snapshot deltas.
|
|
1839
1934
|
* Omission uses `SnapshotDeltaLimits.default`.
|
|
@@ -2031,7 +2126,10 @@ export declare const make: (options?: VolumeOptions) => Effect.Effect<Volume, Vf
|
|
|
2031
2126
|
* @category snapshots
|
|
2032
2127
|
* @since 0.6.0
|
|
2033
2128
|
*/
|
|
2034
|
-
export declare const snapshotEntries:
|
|
2129
|
+
export declare const snapshotEntries: {
|
|
2130
|
+
(root: PathInput): (snapshot: Snapshot) => Stream.Stream<Fixture["entries"][number], FsFailure | ImageFailure>;
|
|
2131
|
+
(snapshot: Snapshot, root: PathInput): Stream.Stream<Fixture["entries"][number], FsFailure | ImageFailure>;
|
|
2132
|
+
};
|
|
2035
2133
|
/**
|
|
2036
2134
|
* Restores a fresh volume from an opaque snapshot under the supplied destination limits.
|
|
2037
2135
|
*
|
|
@@ -2074,7 +2172,10 @@ export declare const snapshotEntries: (snapshot: Snapshot, root: PathInput) => S
|
|
|
2074
2172
|
* @category constructors
|
|
2075
2173
|
* @since 0.1.0
|
|
2076
2174
|
*/
|
|
2077
|
-
export declare const fromSnapshot:
|
|
2175
|
+
export declare const fromSnapshot: {
|
|
2176
|
+
(options?: VolumeOptions): (snapshot: Snapshot) => Effect.Effect<Volume, VfsError, Crypto.Crypto>;
|
|
2177
|
+
(snapshot: Snapshot, options?: VolumeOptions): Effect.Effect<Volume, VfsError, Crypto.Crypto>;
|
|
2178
|
+
};
|
|
2078
2179
|
/**
|
|
2079
2180
|
* Creates an isolated writable volume relative to one immutable snapshot base.
|
|
2080
2181
|
*
|
|
@@ -2126,7 +2227,10 @@ export declare const fromSnapshot: (snapshot: Snapshot, options?: VolumeOptions)
|
|
|
2126
2227
|
* @category constructors
|
|
2127
2228
|
* @since 0.1.0
|
|
2128
2229
|
*/
|
|
2129
|
-
export declare const makeOverlay:
|
|
2230
|
+
export declare const makeOverlay: {
|
|
2231
|
+
(options?: VolumeOptions): (base: Snapshot) => Effect.Effect<OverlayVolume, VfsError, Crypto.Crypto>;
|
|
2232
|
+
(base: Snapshot, options?: VolumeOptions): Effect.Effect<OverlayVolume, VfsError, Crypto.Crypto>;
|
|
2233
|
+
};
|
|
2130
2234
|
/**
|
|
2131
2235
|
* Builds a fresh volume from a validated final-state fixture.
|
|
2132
2236
|
*
|
|
@@ -2167,5 +2271,8 @@ export declare const makeOverlay: (base: Snapshot, options?: VolumeOptions) => E
|
|
|
2167
2271
|
* @category constructors
|
|
2168
2272
|
* @since 0.1.0
|
|
2169
2273
|
*/
|
|
2170
|
-
export declare const fromFixture:
|
|
2274
|
+
export declare const fromFixture: {
|
|
2275
|
+
(options?: VolumeOptions): (fixture: Fixture) => Effect.Effect<Volume, VfsError, Crypto.Crypto>;
|
|
2276
|
+
(fixture: Fixture, options?: VolumeOptions): Effect.Effect<Volume, VfsError, Crypto.Crypto>;
|
|
2277
|
+
};
|
|
2171
2278
|
//# sourceMappingURL=VirtualFileSystem.d.ts.map
|