@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/README.md
CHANGED
|
@@ -77,6 +77,15 @@ callers default to umask `0o022`; the developer's `0o027` mask turns the request
|
|
|
77
77
|
The root package exports `VirtualFileSystem` as a namespace. The equivalent direct module import is
|
|
78
78
|
`import * as Vfs from "@effect-vfs/core/VirtualFileSystem"`.
|
|
79
79
|
|
|
80
|
+
## Confine a caller to a directory
|
|
81
|
+
|
|
82
|
+
`caller.withRoot(path)` creates a scoped caller whose `/` is that directory. Absolute symlinks and `..` stay
|
|
83
|
+
inside the root. Renaming the root preserves access; deleting it permanently invalidates the caller.
|
|
84
|
+
|
|
85
|
+
Keep the caller's scope open and pass only the capabilities the consumer needs. Existing hard links can share
|
|
86
|
+
file contents across roots. See [Confine a workspace](../../apps/docs/app/content/guides/confined-workspaces.mdx)
|
|
87
|
+
for a complete example with Effect's `FileSystem` service and the confinement limits.
|
|
88
|
+
|
|
80
89
|
## Guides and reference
|
|
81
90
|
|
|
82
91
|
- [Fixtures and snapshots](../../apps/docs/app/content/guides/fixtures-and-snapshots.mdx) covers seeded trees, codecs, and portable deltas.
|
package/dist/BytePath.d.ts
CHANGED
|
@@ -173,5 +173,8 @@ export declare const parent: (path: BytePath) => BytePath;
|
|
|
173
173
|
* @category combinators
|
|
174
174
|
* @since 0.6.0
|
|
175
175
|
*/
|
|
176
|
-
export declare const join:
|
|
176
|
+
export declare const join: {
|
|
177
|
+
(name: string | Uint8Array): (path: BytePath) => BytePath;
|
|
178
|
+
(path: BytePath, name: string | Uint8Array): BytePath;
|
|
179
|
+
};
|
|
177
180
|
//# sourceMappingURL=BytePath.d.ts.map
|
package/dist/BytePath.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BytePath.d.ts","sourceRoot":"","sources":["../src/BytePath.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"BytePath.d.ts","sourceRoot":"","sources":["../src/BytePath.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,WAAW,MAAM,cAAc,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAG/C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAMvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAIvD;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,2BAAiD,CAAA;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,QAAS,SAAQ,KAAK,CAAC,KAAK,EAAE,QAAQ;IACrD,QAAQ,CA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IvC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,UAAU,SAAU,QAAQ,KAAG,OAAqC,CAAA;AAEjF;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,SAAU,QAAQ,KAAG,UAIzC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,SAAU,QAAQ,KAAG,QAOvC,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE;IACjB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,CAAC,IAAI,EAAE,QAAQ,KAAK,QAAQ,CAAA;IACzD,CAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAA;CAYrD,CAAA"}
|
package/dist/BytePath.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @since 0.1.0
|
|
8
8
|
*/
|
|
9
9
|
import * as Effect from "effect/Effect";
|
|
10
|
+
import { dual } from "effect/Function";
|
|
10
11
|
import * as Option from "effect/Option";
|
|
11
12
|
import * as OrderModule from "effect/Order";
|
|
12
13
|
import * as Predicate from "effect/Predicate";
|
|
@@ -14,8 +15,9 @@ import * as Result from "effect/Result";
|
|
|
14
15
|
import * as Schema from "effect/Schema";
|
|
15
16
|
import * as Internal from "./internal/bytePath.js";
|
|
16
17
|
import * as Bytes from "./internal/bytes.js";
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
18
|
+
import { retargetFailure } from "./internal/errors.js";
|
|
19
|
+
import { Errors, Paths as Path } from "./internal/engine.js";
|
|
20
|
+
const fsFailure = Errors.fsFailure;
|
|
19
21
|
/**
|
|
20
22
|
* Type identifier for opaque byte-preserving filesystem paths.
|
|
21
23
|
*
|
|
@@ -158,7 +160,7 @@ export const parent = (path) => {
|
|
|
158
160
|
* @category combinators
|
|
159
161
|
* @since 0.6.0
|
|
160
162
|
*/
|
|
161
|
-
export const join = (path, name) => {
|
|
163
|
+
export const join = dual(2, (path, name) => {
|
|
162
164
|
const prefix = bytesOf(path);
|
|
163
165
|
const suffix = Predicate.isString(name) ? encoder.encode(name) : name;
|
|
164
166
|
const separator = prefix.length > 0 && prefix[prefix.length - 1] === SLASH ? 0 : 1;
|
|
@@ -168,4 +170,4 @@ export const join = (path, name) => {
|
|
|
168
170
|
output[prefix.length] = SLASH;
|
|
169
171
|
output.set(suffix, prefix.length + separator);
|
|
170
172
|
return Internal.make(output);
|
|
171
|
-
};
|
|
173
|
+
});
|
package/dist/Caller.d.ts
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Caller identity brands and schemas: credentials, root caller options, and
|
|
3
|
+
* the settings and results of the operations a caller performs.
|
|
4
|
+
*
|
|
5
|
+
* @since 0.6.0
|
|
6
|
+
*/
|
|
7
|
+
import type * as Schema from "effect/Schema";
|
|
8
|
+
import * as Engine from "./internal/engine.js";
|
|
2
9
|
import type { ObjectReference } from "./VirtualFileSystem.js";
|
|
3
10
|
/**
|
|
4
11
|
* Brand key that marks a caller.
|
|
@@ -20,7 +27,7 @@ export type CallerId = typeof CallerId;
|
|
|
20
27
|
* @category type IDs
|
|
21
28
|
* @since 0.6.0
|
|
22
29
|
*/
|
|
23
|
-
export declare const ObjectReferenceId:
|
|
30
|
+
export declare const ObjectReferenceId: typeof Engine.ObjectReferenceId;
|
|
24
31
|
/**
|
|
25
32
|
* Brand key that marks an object reference.
|
|
26
33
|
*
|
|
@@ -177,22 +184,30 @@ export declare const MkdirOptions: Schema.Struct<{
|
|
|
177
184
|
readonly mode: Schema.optionalKey<Schema.Natural>;
|
|
178
185
|
readonly exactMode: Schema.optionalKey<Schema.Boolean>;
|
|
179
186
|
readonly times: Schema.optionalKey<Schema.Struct<{
|
|
180
|
-
readonly access: Schema.Union<readonly [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
187
|
+
readonly access: Schema.Union<readonly [
|
|
188
|
+
Schema.Struct<{
|
|
189
|
+
readonly kind: Schema.Literal<"now">;
|
|
190
|
+
}>,
|
|
191
|
+
Schema.Struct<{
|
|
192
|
+
readonly kind: Schema.Literal<"omit">;
|
|
193
|
+
}>,
|
|
194
|
+
Schema.Struct<{
|
|
195
|
+
readonly kind: Schema.Literal<"value">;
|
|
196
|
+
readonly nanoseconds: Schema.BigInt;
|
|
197
|
+
}>
|
|
198
|
+
]>;
|
|
199
|
+
readonly modification: Schema.Union<readonly [
|
|
200
|
+
Schema.Struct<{
|
|
201
|
+
readonly kind: Schema.Literal<"now">;
|
|
202
|
+
}>,
|
|
203
|
+
Schema.Struct<{
|
|
204
|
+
readonly kind: Schema.Literal<"omit">;
|
|
205
|
+
}>,
|
|
206
|
+
Schema.Struct<{
|
|
207
|
+
readonly kind: Schema.Literal<"value">;
|
|
208
|
+
readonly nanoseconds: Schema.BigInt;
|
|
209
|
+
}>
|
|
210
|
+
]>;
|
|
196
211
|
}>>;
|
|
197
212
|
readonly recursive: Schema.optionalKey<Schema.Boolean>;
|
|
198
213
|
}>;
|
|
@@ -230,6 +245,7 @@ export type WalkOptions = typeof WalkOptions.Type;
|
|
|
230
245
|
/**
|
|
231
246
|
* Schema for the options of `remove`. `recursive` removes a directory and
|
|
232
247
|
* everything under it; `force` succeeds when the target itself is missing.
|
|
248
|
+
* `expected` pins object identity at each coordinated removal stage. A replacement fails `VolumeBusy`.
|
|
233
249
|
*
|
|
234
250
|
* @category schemas
|
|
235
251
|
* @since 0.6.0
|
|
@@ -237,6 +253,7 @@ export type WalkOptions = typeof WalkOptions.Type;
|
|
|
237
253
|
export declare const RemoveOptions: Schema.Struct<{
|
|
238
254
|
readonly recursive: Schema.optionalKey<Schema.Boolean>;
|
|
239
255
|
readonly force: Schema.optionalKey<Schema.Boolean>;
|
|
256
|
+
readonly expected: Schema.optionalKey<Schema.suspend<Schema.declare<ObjectReference, ObjectReference>>>;
|
|
240
257
|
}>;
|
|
241
258
|
/**
|
|
242
259
|
* Options of `remove`.
|
|
@@ -253,22 +270,30 @@ export type RemoveOptions = typeof RemoveOptions.Type;
|
|
|
253
270
|
*/
|
|
254
271
|
export declare const SymlinkOptions: Schema.Struct<{
|
|
255
272
|
readonly times: Schema.optionalKey<Schema.Struct<{
|
|
256
|
-
readonly access: Schema.Union<readonly [
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
273
|
+
readonly access: Schema.Union<readonly [
|
|
274
|
+
Schema.Struct<{
|
|
275
|
+
readonly kind: Schema.Literal<"now">;
|
|
276
|
+
}>,
|
|
277
|
+
Schema.Struct<{
|
|
278
|
+
readonly kind: Schema.Literal<"omit">;
|
|
279
|
+
}>,
|
|
280
|
+
Schema.Struct<{
|
|
281
|
+
readonly kind: Schema.Literal<"value">;
|
|
282
|
+
readonly nanoseconds: Schema.BigInt;
|
|
283
|
+
}>
|
|
284
|
+
]>;
|
|
285
|
+
readonly modification: Schema.Union<readonly [
|
|
286
|
+
Schema.Struct<{
|
|
287
|
+
readonly kind: Schema.Literal<"now">;
|
|
288
|
+
}>,
|
|
289
|
+
Schema.Struct<{
|
|
290
|
+
readonly kind: Schema.Literal<"omit">;
|
|
291
|
+
}>,
|
|
292
|
+
Schema.Struct<{
|
|
293
|
+
readonly kind: Schema.Literal<"value">;
|
|
294
|
+
readonly nanoseconds: Schema.BigInt;
|
|
295
|
+
}>
|
|
296
|
+
]>;
|
|
272
297
|
}>>;
|
|
273
298
|
}>;
|
|
274
299
|
/**
|
|
@@ -297,22 +322,30 @@ export declare const SetattrOptions: Schema.Struct<{
|
|
|
297
322
|
readonly gid: Schema.optionalKey<Schema.Natural>;
|
|
298
323
|
}>>;
|
|
299
324
|
readonly times: Schema.optionalKey<Schema.Struct<{
|
|
300
|
-
readonly access: Schema.Union<readonly [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
325
|
+
readonly access: Schema.Union<readonly [
|
|
326
|
+
Schema.Struct<{
|
|
327
|
+
readonly kind: Schema.Literal<"now">;
|
|
328
|
+
}>,
|
|
329
|
+
Schema.Struct<{
|
|
330
|
+
readonly kind: Schema.Literal<"omit">;
|
|
331
|
+
}>,
|
|
332
|
+
Schema.Struct<{
|
|
333
|
+
readonly kind: Schema.Literal<"value">;
|
|
334
|
+
readonly nanoseconds: Schema.BigInt;
|
|
335
|
+
}>
|
|
336
|
+
]>;
|
|
337
|
+
readonly modification: Schema.Union<readonly [
|
|
338
|
+
Schema.Struct<{
|
|
339
|
+
readonly kind: Schema.Literal<"now">;
|
|
340
|
+
}>,
|
|
341
|
+
Schema.Struct<{
|
|
342
|
+
readonly kind: Schema.Literal<"omit">;
|
|
343
|
+
}>,
|
|
344
|
+
Schema.Struct<{
|
|
345
|
+
readonly kind: Schema.Literal<"value">;
|
|
346
|
+
readonly nanoseconds: Schema.BigInt;
|
|
347
|
+
}>
|
|
348
|
+
]>;
|
|
316
349
|
}>>;
|
|
317
350
|
readonly expected: Schema.optionalKey<Schema.Struct<{
|
|
318
351
|
readonly revision: Schema.BigInt;
|
|
@@ -350,22 +383,30 @@ export declare const OpenEntryOptions: Schema.Struct<{
|
|
|
350
383
|
readonly truncate: Schema.optionalKey<Schema.Boolean>;
|
|
351
384
|
readonly followFinalSymlink: Schema.optionalKey<Schema.Boolean>;
|
|
352
385
|
readonly times: Schema.optionalKey<Schema.Struct<{
|
|
353
|
-
readonly access: Schema.Union<readonly [
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
386
|
+
readonly access: Schema.Union<readonly [
|
|
387
|
+
Schema.Struct<{
|
|
388
|
+
readonly kind: Schema.Literal<"now">;
|
|
389
|
+
}>,
|
|
390
|
+
Schema.Struct<{
|
|
391
|
+
readonly kind: Schema.Literal<"omit">;
|
|
392
|
+
}>,
|
|
393
|
+
Schema.Struct<{
|
|
394
|
+
readonly kind: Schema.Literal<"value">;
|
|
395
|
+
readonly nanoseconds: Schema.BigInt;
|
|
396
|
+
}>
|
|
397
|
+
]>;
|
|
398
|
+
readonly modification: Schema.Union<readonly [
|
|
399
|
+
Schema.Struct<{
|
|
400
|
+
readonly kind: Schema.Literal<"now">;
|
|
401
|
+
}>,
|
|
402
|
+
Schema.Struct<{
|
|
403
|
+
readonly kind: Schema.Literal<"omit">;
|
|
404
|
+
}>,
|
|
405
|
+
Schema.Struct<{
|
|
406
|
+
readonly kind: Schema.Literal<"value">;
|
|
407
|
+
readonly nanoseconds: Schema.BigInt;
|
|
408
|
+
}>
|
|
409
|
+
]>;
|
|
369
410
|
}>>;
|
|
370
411
|
readonly initialSize: Schema.optionalKey<Schema.BigInt>;
|
|
371
412
|
readonly exactMode: Schema.optionalKey<Schema.Boolean>;
|
package/dist/Caller.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Caller.d.ts","sourceRoot":"","sources":["../src/Caller.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,EAAE,OAAO,MAA8C,CAAA;AAE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AE,MAAM,CAAC,MAAM,CAAA;QAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAA;KAChC,CAAC,CACH,CACF,CAAA;CACF,CAA2B,CAAA;AAE5B;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAA"}
|
package/dist/Caller.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Caller identity brands and schemas: credentials, root caller options, and
|
|
3
|
-
* the settings and results of the operations a caller performs.
|
|
4
|
-
*
|
|
5
|
-
* @since 0.6.0
|
|
6
|
-
*/
|
|
7
|
-
import * as Predicate from "effect/Predicate";
|
|
8
|
-
import * as Schema from "effect/Schema";
|
|
9
|
-
import { Mode, OwnerUpdate, Times, Timestamp } from "./Metadata.js";
|
|
1
|
+
import * as Engine from "./internal/engine.js";
|
|
10
2
|
/**
|
|
11
3
|
* Brand key that marks a caller.
|
|
12
4
|
*
|
|
@@ -20,7 +12,7 @@ export const CallerId = Symbol.for("@effect-vfs/core/Caller");
|
|
|
20
12
|
* @category type IDs
|
|
21
13
|
* @since 0.6.0
|
|
22
14
|
*/
|
|
23
|
-
export const ObjectReferenceId =
|
|
15
|
+
export const ObjectReferenceId = Engine.ObjectReferenceId;
|
|
24
16
|
/**
|
|
25
17
|
* Schema for a caller's credentials. `privileged` is explicit; uid zero alone
|
|
26
18
|
* grants nothing.
|
|
@@ -28,22 +20,14 @@ export const ObjectReferenceId = Symbol.for("@effect-vfs/core/ObjectReference");
|
|
|
28
20
|
* @category schemas
|
|
29
21
|
* @since 0.6.0
|
|
30
22
|
*/
|
|
31
|
-
export const Identity =
|
|
32
|
-
uid: Schema.Natural,
|
|
33
|
-
gid: Schema.Natural,
|
|
34
|
-
groups: Schema.Array(Schema.Natural),
|
|
35
|
-
privileged: Schema.Boolean
|
|
36
|
-
});
|
|
23
|
+
export const Identity = Engine.Identity;
|
|
37
24
|
/**
|
|
38
25
|
* Schema for the options of a root caller.
|
|
39
26
|
*
|
|
40
27
|
* @category schemas
|
|
41
28
|
* @since 0.6.0
|
|
42
29
|
*/
|
|
43
|
-
export const RootCallerOptions =
|
|
44
|
-
identity: Schema.optionalKey(Identity),
|
|
45
|
-
umask: Schema.optionalKey(Schema.Natural.check(Schema.isLessThanOrEqualTo(0o777)))
|
|
46
|
-
});
|
|
30
|
+
export const RootCallerOptions = Engine.RootCallerOptions;
|
|
47
31
|
/**
|
|
48
32
|
* Schema for the options of `open` on a target: the access mode, whether a
|
|
49
33
|
* missing file is created, the creation mode, and append and truncate flags.
|
|
@@ -51,13 +35,7 @@ export const RootCallerOptions = Schema.Struct({
|
|
|
51
35
|
* @category schemas
|
|
52
36
|
* @since 0.6.0
|
|
53
37
|
*/
|
|
54
|
-
export const OpenOptions =
|
|
55
|
-
access: Schema.Literals(["read", "write", "readWrite"]),
|
|
56
|
-
create: Schema.optionalKey(Schema.Literals(["never", "ifMissing", "exclusive"])),
|
|
57
|
-
mode: Schema.optionalKey(Mode),
|
|
58
|
-
append: Schema.optionalKey(Schema.Boolean),
|
|
59
|
-
truncate: Schema.optionalKey(Schema.Boolean)
|
|
60
|
-
});
|
|
38
|
+
export const OpenOptions = Engine.OpenOptions;
|
|
61
39
|
/**
|
|
62
40
|
* Schema for the options of `writeFile`: the open options plus whether a
|
|
63
41
|
* final symbolic link is replaced or followed and the mode the file ends with.
|
|
@@ -65,35 +43,21 @@ export const OpenOptions = Schema.Struct({
|
|
|
65
43
|
* @category schemas
|
|
66
44
|
* @since 0.6.0
|
|
67
45
|
*/
|
|
68
|
-
export const WriteFileOptions =
|
|
69
|
-
...OpenOptions.fields,
|
|
70
|
-
followFinalSymlink: Schema.optionalKey(Schema.Boolean),
|
|
71
|
-
replaceFinalSymlink: Schema.optionalKey(Schema.Boolean),
|
|
72
|
-
finalMode: Schema.optionalKey(Mode)
|
|
73
|
-
});
|
|
46
|
+
export const WriteFileOptions = Engine.WriteFileOptions;
|
|
74
47
|
/**
|
|
75
48
|
* Schema for a directory's revision before and after a change.
|
|
76
49
|
*
|
|
77
50
|
* @category schemas
|
|
78
51
|
* @since 0.6.0
|
|
79
52
|
*/
|
|
80
|
-
export const DirectoryChange =
|
|
81
|
-
before: Schema.BigInt,
|
|
82
|
-
after: Schema.BigInt
|
|
83
|
-
});
|
|
53
|
+
export const DirectoryChange = Engine.DirectoryChange;
|
|
84
54
|
/**
|
|
85
55
|
* Schema for the result of `rename`.
|
|
86
56
|
*
|
|
87
57
|
* @category schemas
|
|
88
58
|
* @since 0.6.0
|
|
89
59
|
*/
|
|
90
|
-
export const RenameReferenceResult =
|
|
91
|
-
SameDirectory: { directory: DirectoryChange },
|
|
92
|
-
DifferentDirectories: {
|
|
93
|
-
sourceDirectory: DirectoryChange,
|
|
94
|
-
destinationDirectory: DirectoryChange
|
|
95
|
-
}
|
|
96
|
-
});
|
|
60
|
+
export const RenameReferenceResult = Engine.RenameReferenceResult;
|
|
97
61
|
/**
|
|
98
62
|
* Schema for the options of `mkdir`. `exactMode` skips the caller's umask for
|
|
99
63
|
* an explicit creation mode; permission policy still applies. `recursive`
|
|
@@ -104,12 +68,7 @@ export const RenameReferenceResult = Schema.TaggedUnion({
|
|
|
104
68
|
* @category schemas
|
|
105
69
|
* @since 0.6.0
|
|
106
70
|
*/
|
|
107
|
-
export const MkdirOptions =
|
|
108
|
-
mode: Schema.optionalKey(Mode),
|
|
109
|
-
exactMode: Schema.optionalKey(Schema.Boolean),
|
|
110
|
-
times: Schema.optionalKey(Times),
|
|
111
|
-
recursive: Schema.optionalKey(Schema.Boolean)
|
|
112
|
-
});
|
|
71
|
+
export const MkdirOptions = Engine.MkdirOptions;
|
|
113
72
|
/**
|
|
114
73
|
* Schema for the options of `walk`: the order entries arrive in and the
|
|
115
74
|
* optional bounds on how deep, how many, and how many bytes the walk may
|
|
@@ -121,32 +80,23 @@ export const MkdirOptions = Schema.Struct({
|
|
|
121
80
|
* @category schemas
|
|
122
81
|
* @since 0.6.0
|
|
123
82
|
*/
|
|
124
|
-
export const WalkOptions =
|
|
125
|
-
order: Schema.optionalKey(Schema.Literals(["pre", "post"])),
|
|
126
|
-
maxDepth: Schema.optionalKey(Schema.Natural),
|
|
127
|
-
maxEntries: Schema.optionalKey(Schema.Natural),
|
|
128
|
-
maxBytes: Schema.optionalKey(Schema.ByteSize)
|
|
129
|
-
});
|
|
83
|
+
export const WalkOptions = Engine.WalkOptions;
|
|
130
84
|
/**
|
|
131
85
|
* Schema for the options of `remove`. `recursive` removes a directory and
|
|
132
86
|
* everything under it; `force` succeeds when the target itself is missing.
|
|
87
|
+
* `expected` pins object identity at each coordinated removal stage. A replacement fails `VolumeBusy`.
|
|
133
88
|
*
|
|
134
89
|
* @category schemas
|
|
135
90
|
* @since 0.6.0
|
|
136
91
|
*/
|
|
137
|
-
export const RemoveOptions =
|
|
138
|
-
recursive: Schema.optionalKey(Schema.Boolean),
|
|
139
|
-
force: Schema.optionalKey(Schema.Boolean)
|
|
140
|
-
});
|
|
92
|
+
export const RemoveOptions = Engine.RemoveOptions;
|
|
141
93
|
/**
|
|
142
94
|
* Schema for the options of `symlink`.
|
|
143
95
|
*
|
|
144
96
|
* @category schemas
|
|
145
97
|
* @since 0.6.0
|
|
146
98
|
*/
|
|
147
|
-
export const SymlinkOptions =
|
|
148
|
-
times: Schema.optionalKey(Times)
|
|
149
|
-
});
|
|
99
|
+
export const SymlinkOptions = Engine.SymlinkOptions;
|
|
150
100
|
/**
|
|
151
101
|
* Schema for the attributes `setattr` changes together: a regular file's
|
|
152
102
|
* size, the permission mode, the owner, and the access and modification
|
|
@@ -158,20 +108,14 @@ export const SymlinkOptions = Schema.Struct({
|
|
|
158
108
|
* @category schemas
|
|
159
109
|
* @since 0.6.0
|
|
160
110
|
*/
|
|
161
|
-
export const SetattrOptions =
|
|
162
|
-
size: Schema.optionalKey(Schema.BigInt.check(Schema.isGreaterThanOrEqualToBigInt(0n))),
|
|
163
|
-
mode: Schema.optionalKey(Mode),
|
|
164
|
-
owner: Schema.optionalKey(OwnerUpdate),
|
|
165
|
-
times: Schema.optionalKey(Times),
|
|
166
|
-
expected: Schema.optionalKey(Schema.Struct({ revision: Schema.BigInt }))
|
|
167
|
-
});
|
|
111
|
+
export const SetattrOptions = Engine.SetattrOptions;
|
|
168
112
|
/**
|
|
169
113
|
* Schema for an object reference: any value carrying the reference brand. Whether the volume issued it is checked
|
|
170
114
|
* where it is used.
|
|
171
115
|
*
|
|
172
116
|
* @internal
|
|
173
117
|
*/
|
|
174
|
-
export const ObjectReferenceSchema =
|
|
118
|
+
export const ObjectReferenceSchema = Engine.ObjectReferenceSchema;
|
|
175
119
|
/**
|
|
176
120
|
* Schema for the options of `open` on an entry, a lookup-or-create-and-open in
|
|
177
121
|
* one gate hold. `expected` pins the child the caller last observed under the
|
|
@@ -182,18 +126,4 @@ export const ObjectReferenceSchema = Schema.declare((input) => Predicate.hasProp
|
|
|
182
126
|
* @category schemas
|
|
183
127
|
* @since 0.6.0
|
|
184
128
|
*/
|
|
185
|
-
export const OpenEntryOptions =
|
|
186
|
-
...OpenOptions.fields,
|
|
187
|
-
followFinalSymlink: Schema.optionalKey(Schema.Boolean),
|
|
188
|
-
times: Schema.optionalKey(Times),
|
|
189
|
-
initialSize: Schema.optionalKey(Schema.BigInt),
|
|
190
|
-
exactMode: Schema.optionalKey(Schema.Boolean),
|
|
191
|
-
owner: Schema.optionalKey(OwnerUpdate),
|
|
192
|
-
expected: Schema.optionalKey(Schema.NullOr(ObjectReferenceSchema)),
|
|
193
|
-
expectedChild: Schema.optionalKey(Schema.NullOr(Schema.Struct({
|
|
194
|
-
reference: ObjectReferenceSchema,
|
|
195
|
-
revision: Schema.BigInt,
|
|
196
|
-
atimeNs: Timestamp,
|
|
197
|
-
mtimeNs: Timestamp
|
|
198
|
-
})))
|
|
199
|
-
});
|
|
129
|
+
export const OpenEntryOptions = Engine.OpenEntryOptions;
|
package/dist/LiveVolume.d.ts
CHANGED
|
@@ -8,19 +8,25 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @since 0.4.0
|
|
10
10
|
*/
|
|
11
|
-
import { Context, Effect } from "effect";
|
|
11
|
+
import { Context, Duration, Effect, Layer } from "effect";
|
|
12
12
|
import * as ByteSize from "effect/ByteSize";
|
|
13
|
+
import type * as Cause from "effect/Cause";
|
|
13
14
|
import type * as Crypto from "effect/Crypto";
|
|
14
15
|
import type * as Scope from "effect/Scope";
|
|
15
16
|
import { type ArgumentFailure, type StoreFailure, VfsError } from "./VfsError.js";
|
|
16
17
|
import type { Volume, VolumeDurability, VolumeOptions } from "./VirtualFileSystem.js";
|
|
17
18
|
/**
|
|
18
19
|
* A storage commit's observed outcome.
|
|
20
|
+
* A provider may return a rejected Cause only when no storage write was attempted.
|
|
21
|
+
* Ordinary mutations preserve that cause and leave the volume available; uncertain writes use `unknown`.
|
|
19
22
|
*
|
|
20
23
|
* @category models
|
|
21
24
|
* @since 0.4.0
|
|
22
25
|
*/
|
|
23
|
-
export type CommitOutcome = "committed" | "rejected" | "unknown"
|
|
26
|
+
export type CommitOutcome = "committed" | "rejected" | "unknown" | {
|
|
27
|
+
readonly _tag: "Rejected";
|
|
28
|
+
readonly cause: Cause.Cause<never>;
|
|
29
|
+
};
|
|
24
30
|
declare const LiveImageStore_base: Context.ServiceClass<LiveImageStore, "@effect-vfs/core/LiveImageStore", {
|
|
25
31
|
/** Storage guarantee for successful commits; omission means memory-only. */
|
|
26
32
|
readonly durability?: VolumeDurability;
|
|
@@ -56,6 +62,73 @@ export interface Options {
|
|
|
56
62
|
* @since 0.4.0
|
|
57
63
|
*/
|
|
58
64
|
export declare const open: (options: Options) => Effect.Effect<Volume, VfsError, LiveImageStore | Scope.Scope | Crypto.Crypto>;
|
|
65
|
+
/**
|
|
66
|
+
* Scoped access to live volumes shared by canonical storage identity.
|
|
67
|
+
* Each `get` retains its volume until the borrowing scope closes. Keep that
|
|
68
|
+
* scope open until its callers and handles finish using the volume.
|
|
69
|
+
*
|
|
70
|
+
* @category models
|
|
71
|
+
* @since 0.9.0
|
|
72
|
+
*/
|
|
73
|
+
export interface Registry<K, E = never> {
|
|
74
|
+
readonly get: (key: K) => Effect.Effect<Volume, E | VfsError | Cause.ExceededCapacityError, Scope.Scope>;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Store Layers are built independently for each acquired entry. The same volume
|
|
78
|
+
* configuration applies to every key. Keys use Effect's equality rules and must
|
|
79
|
+
* identify canonical storage locations; different aliases can create competing
|
|
80
|
+
* owners. Coordinate ownership across processes outside this registry.
|
|
81
|
+
*
|
|
82
|
+
* @category models
|
|
83
|
+
* @since 0.9.0
|
|
84
|
+
*/
|
|
85
|
+
export interface RegistryOptions<K, E = never, R = never> {
|
|
86
|
+
readonly store: (key: K) => Layer.Layer<LiveImageStore, E, R>;
|
|
87
|
+
readonly volume: Options;
|
|
88
|
+
/** Positive integer entry limit. Omission means unlimited; idle entries count. */
|
|
89
|
+
readonly capacity?: number;
|
|
90
|
+
/** Retain unused entries for this duration. Omission releases them immediately. */
|
|
91
|
+
readonly idleTimeToLive?: Duration.Input;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Lazily share one live volume and its store per key through `RcMap`. Concurrent
|
|
95
|
+
* borrowers share acquisition. Reusing an idle entry avoids rebuilding its store
|
|
96
|
+
* and decoding its image, while retaining its memory and storage locks.
|
|
97
|
+
*
|
|
98
|
+
* The registry's owning scope must outlive all borrowers. Closing it shuts down
|
|
99
|
+
* every volume, including borrowed ones, before releasing their store Layers.
|
|
100
|
+
* Capacity exhaustion fails with `Cause.ExceededCapacityError`; it does not evict
|
|
101
|
+
* idle entries. Acquisition failures remain shared until the entry is released.
|
|
102
|
+
*
|
|
103
|
+
* Invalidation is intentionally unavailable: acquiring a replacement while an
|
|
104
|
+
* existing borrower remains would violate exclusive store ownership. Canonicalize
|
|
105
|
+
* keys before borrowing and use one registry for each set of backing stores.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* import { LiveVolume } from "@effect-vfs/core"
|
|
110
|
+
* import { ByteSize, Effect, Layer } from "effect"
|
|
111
|
+
*
|
|
112
|
+
* declare const storeFor: (key: string) => Layer.Layer<LiveVolume.LiveImageStore>
|
|
113
|
+
*
|
|
114
|
+
* const program = Effect.gen(function*() {
|
|
115
|
+
* const registry = yield* LiveVolume.makeRegistry({
|
|
116
|
+
* store: storeFor,
|
|
117
|
+
* volume: { maxImageBytes: ByteSize.megabytes(1), volume: {} },
|
|
118
|
+
* capacity: 8,
|
|
119
|
+
* idleTimeToLive: "5 seconds"
|
|
120
|
+
* })
|
|
121
|
+
* return yield* Effect.scoped(Effect.gen(function*() {
|
|
122
|
+
* const volume = yield* registry.get("workspace")
|
|
123
|
+
* return yield* (yield* volume.caller()).readFile("/plan.md")
|
|
124
|
+
* }))
|
|
125
|
+
* })
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @category constructors
|
|
129
|
+
* @since 0.9.0
|
|
130
|
+
*/
|
|
131
|
+
export declare const makeRegistry: <K, E, R>(options: RegistryOptions<K, E, R>) => Effect.Effect<Registry<K, E>, ArgumentFailure, R | Crypto.Crypto | Scope.Scope>;
|
|
59
132
|
/**
|
|
60
133
|
* A live volume and the shutdown action its storage adapter must run before
|
|
61
134
|
* closing the underlying store.
|
package/dist/LiveVolume.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiveVolume.d.ts","sourceRoot":"","sources":["../src/LiveVolume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"LiveVolume.d.ts","sourceRoot":"","sources":["../src/LiveVolume.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,OAAO,EAAY,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAyC,MAAM,QAAQ,CAAA;AAC1G,O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