@effect-vfs/core 0.9.0 → 0.11.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.
Files changed (106) hide show
  1. package/dist/BytePath.d.ts +4 -1
  2. package/dist/BytePath.d.ts.map +1 -1
  3. package/dist/BytePath.js +6 -4
  4. package/dist/Caller.d.ts +105 -66
  5. package/dist/Caller.d.ts.map +1 -1
  6. package/dist/Caller.js +15 -87
  7. package/dist/LiveVolume.d.ts +14 -8
  8. package/dist/LiveVolume.d.ts.map +1 -1
  9. package/dist/LiveVolume.js +10 -3
  10. package/dist/Search.d.ts +32 -8
  11. package/dist/Search.d.ts.map +1 -1
  12. package/dist/Search.js +14 -13
  13. package/dist/SynchronousAdapter.d.ts +58 -0
  14. package/dist/SynchronousAdapter.d.ts.map +1 -0
  15. package/dist/SynchronousAdapter.js +116 -0
  16. package/dist/Target.d.ts +7 -91
  17. package/dist/Target.d.ts.map +1 -1
  18. package/dist/Target.js +7 -47
  19. package/dist/Testing.d.ts +9 -5
  20. package/dist/Testing.d.ts.map +1 -1
  21. package/dist/Testing.js +3 -2
  22. package/dist/VfsError.d.ts +1 -1
  23. package/dist/VfsError.d.ts.map +1 -1
  24. package/dist/VirtualFileSystem.d.ts +143 -59
  25. package/dist/VirtualFileSystem.d.ts.map +1 -1
  26. package/dist/VirtualFileSystem.js +37 -33
  27. package/dist/Volume.d.ts +6 -1
  28. package/dist/Volume.d.ts.map +1 -1
  29. package/dist/Volume.js +6 -2
  30. package/dist/internal/adapterBinding.d.ts +13 -0
  31. package/dist/internal/adapterBinding.d.ts.map +1 -0
  32. package/dist/internal/adapterBinding.js +13 -0
  33. package/dist/internal/bytePath.d.ts +6 -1
  34. package/dist/internal/bytePath.d.ts.map +1 -1
  35. package/dist/internal/callerWatch.d.ts +5 -1
  36. package/dist/internal/callerWatch.d.ts.map +1 -1
  37. package/dist/internal/callerWatch.js +4 -3
  38. package/dist/internal/engine.d.ts +1305 -0
  39. package/dist/internal/engine.d.ts.map +1 -0
  40. package/dist/internal/engine.js +3458 -0
  41. package/dist/internal/errors.d.ts +1 -33
  42. package/dist/internal/errors.d.ts.map +1 -1
  43. package/dist/internal/errors.js +1 -45
  44. package/dist/internal/fixture.d.ts +3 -2
  45. package/dist/internal/fixture.d.ts.map +1 -1
  46. package/dist/internal/fixture.js +7 -3
  47. package/dist/internal/image.d.ts +4 -1
  48. package/dist/internal/image.d.ts.map +1 -1
  49. package/dist/internal/image.js +6 -3
  50. package/dist/internal/lines.d.ts.map +1 -1
  51. package/dist/internal/lines.js +3 -2
  52. package/dist/internal/liveImage.d.ts +4 -2
  53. package/dist/internal/liveImage.d.ts.map +1 -1
  54. package/dist/internal/liveImage.js +3 -1
  55. package/dist/internal/merkle.d.ts +8 -5
  56. package/dist/internal/merkle.d.ts.map +1 -1
  57. package/dist/internal/merkle.js +8 -7
  58. package/dist/internal/search.d.ts +3 -1
  59. package/dist/internal/search.d.ts.map +1 -1
  60. package/dist/internal/search.js +4 -3
  61. package/dist/internal/snapshotDelta.d.ts +14 -10
  62. package/dist/internal/snapshotDelta.d.ts.map +1 -1
  63. package/dist/internal/snapshotDelta.js +15 -9
  64. package/dist/internal/snapshotMerge.d.ts +1 -1
  65. package/dist/internal/snapshotMerge.d.ts.map +1 -1
  66. package/dist/internal/snapshotMerge.js +5 -2
  67. package/dist/internal/tree.d.ts +4 -2
  68. package/dist/internal/tree.d.ts.map +1 -1
  69. package/dist/internal/tree.js +4 -2
  70. package/dist/internal/virtualFileSystem.d.ts +27 -56
  71. package/dist/internal/virtualFileSystem.d.ts.map +1 -1
  72. package/dist/internal/virtualFileSystem.js +77 -2085
  73. package/dist/internal/volumeLimits.d.ts +1 -0
  74. package/dist/internal/volumeLimits.d.ts.map +1 -1
  75. package/dist/internal/volumeLimits.js +3 -2
  76. package/dist/internal/volumeState.d.ts +10 -79
  77. package/dist/internal/volumeState.d.ts.map +1 -1
  78. package/dist/internal/volumeState.js +9 -79
  79. package/dist/internal/watchHub.d.ts +3 -3
  80. package/dist/internal/watchHub.d.ts.map +1 -1
  81. package/dist/internal/watchHub.js +4 -2
  82. package/package.json +14 -9
  83. package/dist/internal/confinement.d.ts +0 -16
  84. package/dist/internal/confinement.d.ts.map +0 -1
  85. package/dist/internal/confinement.js +0 -79
  86. package/dist/internal/directoryEntries.d.ts +0 -6
  87. package/dist/internal/directoryEntries.d.ts.map +0 -1
  88. package/dist/internal/directoryEntries.js +0 -79
  89. package/dist/internal/inodeTable.d.ts +0 -20
  90. package/dist/internal/inodeTable.d.ts.map +0 -1
  91. package/dist/internal/inodeTable.js +0 -48
  92. package/dist/internal/path.d.ts +0 -56
  93. package/dist/internal/path.d.ts.map +0 -1
  94. package/dist/internal/path.js +0 -141
  95. package/dist/internal/resolution.d.ts +0 -139
  96. package/dist/internal/resolution.d.ts.map +0 -1
  97. package/dist/internal/resolution.js +0 -332
  98. package/dist/internal/testSeams.d.ts +0 -17
  99. package/dist/internal/testSeams.d.ts.map +0 -1
  100. package/dist/internal/testSeams.js +0 -20
  101. package/dist/internal/tokenRegistry.d.ts +0 -83
  102. package/dist/internal/tokenRegistry.d.ts.map +0 -1
  103. package/dist/internal/tokenRegistry.js +0 -146
  104. package/dist/internal/turnstile.d.ts +0 -8
  105. package/dist/internal/turnstile.d.ts.map +0 -1
  106. package/dist/internal/turnstile.js +0 -43
@@ -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: (path: BytePath, name: string | Uint8Array) => BytePath;
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
@@ -1 +1 @@
1
- {"version":3,"file":"BytePath.d.ts","sourceRoot":"","sources":["../src/BytePath.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,MA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AAC,MAAM,CAAC,UAAU,EAAE,SAAS,CACzB,CAAA;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,SAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,CAItE,CAAA;AAEH;;;;;GAKG;AACH,eAAO,MAAM,cAAc,SAAU,QAAQ,KAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAgC,CAAA;AAEpG;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC,MAAM,CAAC,MAAM,CAErE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,MAAM,SAAU,QAAQ,KAAG,OAIvC,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 { fsFailure, retargetFailure } from "./internal/errors.js";
18
- import * as Path from "./internal/path.js";
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
- import * as Schema from "effect/Schema";
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: unique symbol;
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 [Schema.Struct<{
181
- readonly kind: Schema.Literal<"now">;
182
- }>, Schema.Struct<{
183
- readonly kind: Schema.Literal<"omit">;
184
- }>, Schema.Struct<{
185
- readonly kind: Schema.Literal<"value">;
186
- readonly nanoseconds: Schema.BigInt;
187
- }>]>;
188
- readonly modification: Schema.Union<readonly [Schema.Struct<{
189
- readonly kind: Schema.Literal<"now">;
190
- }>, Schema.Struct<{
191
- readonly kind: Schema.Literal<"omit">;
192
- }>, Schema.Struct<{
193
- readonly kind: Schema.Literal<"value">;
194
- readonly nanoseconds: Schema.BigInt;
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
  }>;
@@ -255,22 +270,30 @@ export type RemoveOptions = typeof RemoveOptions.Type;
255
270
  */
256
271
  export declare const SymlinkOptions: Schema.Struct<{
257
272
  readonly times: Schema.optionalKey<Schema.Struct<{
258
- readonly access: Schema.Union<readonly [Schema.Struct<{
259
- readonly kind: Schema.Literal<"now">;
260
- }>, Schema.Struct<{
261
- readonly kind: Schema.Literal<"omit">;
262
- }>, Schema.Struct<{
263
- readonly kind: Schema.Literal<"value">;
264
- readonly nanoseconds: Schema.BigInt;
265
- }>]>;
266
- readonly modification: Schema.Union<readonly [Schema.Struct<{
267
- readonly kind: Schema.Literal<"now">;
268
- }>, Schema.Struct<{
269
- readonly kind: Schema.Literal<"omit">;
270
- }>, Schema.Struct<{
271
- readonly kind: Schema.Literal<"value">;
272
- readonly nanoseconds: Schema.BigInt;
273
- }>]>;
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
+ ]>;
274
297
  }>>;
275
298
  }>;
276
299
  /**
@@ -299,22 +322,30 @@ export declare const SetattrOptions: Schema.Struct<{
299
322
  readonly gid: Schema.optionalKey<Schema.Natural>;
300
323
  }>>;
301
324
  readonly times: Schema.optionalKey<Schema.Struct<{
302
- readonly access: Schema.Union<readonly [Schema.Struct<{
303
- readonly kind: Schema.Literal<"now">;
304
- }>, Schema.Struct<{
305
- readonly kind: Schema.Literal<"omit">;
306
- }>, Schema.Struct<{
307
- readonly kind: Schema.Literal<"value">;
308
- readonly nanoseconds: Schema.BigInt;
309
- }>]>;
310
- readonly modification: Schema.Union<readonly [Schema.Struct<{
311
- readonly kind: Schema.Literal<"now">;
312
- }>, Schema.Struct<{
313
- readonly kind: Schema.Literal<"omit">;
314
- }>, Schema.Struct<{
315
- readonly kind: Schema.Literal<"value">;
316
- readonly nanoseconds: Schema.BigInt;
317
- }>]>;
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
+ ]>;
318
349
  }>>;
319
350
  readonly expected: Schema.optionalKey<Schema.Struct<{
320
351
  readonly revision: Schema.BigInt;
@@ -352,22 +383,30 @@ export declare const OpenEntryOptions: Schema.Struct<{
352
383
  readonly truncate: Schema.optionalKey<Schema.Boolean>;
353
384
  readonly followFinalSymlink: Schema.optionalKey<Schema.Boolean>;
354
385
  readonly times: Schema.optionalKey<Schema.Struct<{
355
- readonly access: Schema.Union<readonly [Schema.Struct<{
356
- readonly kind: Schema.Literal<"now">;
357
- }>, Schema.Struct<{
358
- readonly kind: Schema.Literal<"omit">;
359
- }>, Schema.Struct<{
360
- readonly kind: Schema.Literal<"value">;
361
- readonly nanoseconds: Schema.BigInt;
362
- }>]>;
363
- readonly modification: Schema.Union<readonly [Schema.Struct<{
364
- readonly kind: Schema.Literal<"now">;
365
- }>, Schema.Struct<{
366
- readonly kind: Schema.Literal<"omit">;
367
- }>, Schema.Struct<{
368
- readonly kind: Schema.Literal<"value">;
369
- readonly nanoseconds: Schema.BigInt;
370
- }>]>;
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
+ ]>;
371
410
  }>>;
372
411
  readonly initialSize: Schema.optionalKey<Schema.BigInt>;
373
412
  readonly exactMode: Schema.optionalKey<Schema.Boolean>;
@@ -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;AAE5E;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAA;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAAO,MAAuD,CAAA;AAE9F;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAA;AAExD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ;;;;;EAKnB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;EAG5B,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,iBAAiB,CAAC,IAAI,CAAA;AAE7D;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;;;;;;EAMtB,CAAA;AAEF;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM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,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QAChD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;KACjD,CAAC,CACH,CAAA;IACD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;IACtG,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,WAAW,CACxC,MAAM,CAAC,MAAM,CACX,MAAM,CAAC,MAAM,CAAC;QACZ,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC,CAAA;QACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAA;QAChC,QAAQ,CAAC,OAAO,EAAE,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 = Symbol.for("@effect-vfs/core/ObjectReference");
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 = Schema.Struct({
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 = Schema.Struct({
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 = Schema.Struct({
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 = Schema.Struct({
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 = Schema.Struct({
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 = Schema.TaggedUnion({
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 = Schema.Struct({
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,12 +80,7 @@ export const MkdirOptions = Schema.Struct({
121
80
  * @category schemas
122
81
  * @since 0.6.0
123
82
  */
124
- export const WalkOptions = Schema.Struct({
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.
@@ -135,20 +89,14 @@ export const WalkOptions = Schema.Struct({
135
89
  * @category schemas
136
90
  * @since 0.6.0
137
91
  */
138
- export const RemoveOptions = Schema.Struct({
139
- recursive: Schema.optionalKey(Schema.Boolean),
140
- force: Schema.optionalKey(Schema.Boolean),
141
- expected: Schema.optionalKey(Schema.suspend(() => ObjectReferenceSchema))
142
- });
92
+ export const RemoveOptions = Engine.RemoveOptions;
143
93
  /**
144
94
  * Schema for the options of `symlink`.
145
95
  *
146
96
  * @category schemas
147
97
  * @since 0.6.0
148
98
  */
149
- export const SymlinkOptions = Schema.Struct({
150
- times: Schema.optionalKey(Times)
151
- });
99
+ export const SymlinkOptions = Engine.SymlinkOptions;
152
100
  /**
153
101
  * Schema for the attributes `setattr` changes together: a regular file's
154
102
  * size, the permission mode, the owner, and the access and modification
@@ -160,20 +108,14 @@ export const SymlinkOptions = Schema.Struct({
160
108
  * @category schemas
161
109
  * @since 0.6.0
162
110
  */
163
- export const SetattrOptions = Schema.Struct({
164
- size: Schema.optionalKey(Schema.BigInt.check(Schema.isGreaterThanOrEqualToBigInt(0n))),
165
- mode: Schema.optionalKey(Mode),
166
- owner: Schema.optionalKey(OwnerUpdate),
167
- times: Schema.optionalKey(Times),
168
- expected: Schema.optionalKey(Schema.Struct({ revision: Schema.BigInt }))
169
- });
111
+ export const SetattrOptions = Engine.SetattrOptions;
170
112
  /**
171
113
  * Schema for an object reference: any value carrying the reference brand. Whether the volume issued it is checked
172
114
  * where it is used.
173
115
  *
174
116
  * @internal
175
117
  */
176
- export const ObjectReferenceSchema = Schema.declare((input) => Predicate.hasProperty(ObjectReferenceId)(input) && input[ObjectReferenceId] === true);
118
+ export const ObjectReferenceSchema = Engine.ObjectReferenceSchema;
177
119
  /**
178
120
  * Schema for the options of `open` on an entry, a lookup-or-create-and-open in
179
121
  * one gate hold. `expected` pins the child the caller last observed under the
@@ -184,18 +126,4 @@ export const ObjectReferenceSchema = Schema.declare((input) => Predicate.hasProp
184
126
  * @category schemas
185
127
  * @since 0.6.0
186
128
  */
187
- export const OpenEntryOptions = Schema.Struct({
188
- ...OpenOptions.fields,
189
- followFinalSymlink: Schema.optionalKey(Schema.Boolean),
190
- times: Schema.optionalKey(Times),
191
- initialSize: Schema.optionalKey(Schema.BigInt),
192
- exactMode: Schema.optionalKey(Schema.Boolean),
193
- owner: Schema.optionalKey(OwnerUpdate),
194
- expected: Schema.optionalKey(Schema.NullOr(ObjectReferenceSchema)),
195
- expectedChild: Schema.optionalKey(Schema.NullOr(Schema.Struct({
196
- reference: ObjectReferenceSchema,
197
- revision: Schema.BigInt,
198
- atimeNs: Timestamp,
199
- mtimeNs: Timestamp
200
- })))
201
- });
129
+ export const OpenEntryOptions = Engine.OpenEntryOptions;
@@ -11,17 +11,23 @@
11
11
  import { Context, Duration, Effect, Layer } from "effect";
12
12
  import * as ByteSize from "effect/ByteSize";
13
13
  import type * as Cause from "effect/Cause";
14
- import type * as Crypto from "effect/Crypto";
14
+ import type * as Digest from "effect/crypto/Digest";
15
+ import type * as SecureRandom from "effect/crypto/SecureRandom";
15
16
  import type * as Scope from "effect/Scope";
16
17
  import { type ArgumentFailure, type StoreFailure, VfsError } from "./VfsError.js";
17
18
  import type { Volume, VolumeDurability, VolumeOptions } from "./VirtualFileSystem.js";
18
19
  /**
19
20
  * A storage commit's observed outcome.
21
+ * A provider may return a rejected Cause only when no storage write was attempted.
22
+ * Ordinary mutations preserve that cause and leave the volume available; uncertain writes use `unknown`.
20
23
  *
21
24
  * @category models
22
25
  * @since 0.4.0
23
26
  */
24
- export type CommitOutcome = "committed" | "rejected" | "unknown";
27
+ export type CommitOutcome = "committed" | "rejected" | "unknown" | {
28
+ readonly _tag: "Rejected";
29
+ readonly cause: Cause.Cause<never>;
30
+ };
25
31
  declare const LiveImageStore_base: Context.ServiceClass<LiveImageStore, "@effect-vfs/core/LiveImageStore", {
26
32
  /** Storage guarantee for successful commits; omission means memory-only. */
27
33
  readonly durability?: VolumeDurability;
@@ -51,12 +57,12 @@ export interface Options {
51
57
  /**
52
58
  * Open a live volume using the supplied store Layer. The caller owns a Scope;
53
59
  * the volume shuts down before that Layer releases its storage resource.
54
- * Requires `Crypto.Crypto` to mint a new volume or incarnation.
60
+ * Requires the `Digest` and `SecureRandom` services to mint a new volume or incarnation.
55
61
  *
56
62
  * @category constructors
57
63
  * @since 0.4.0
58
64
  */
59
- export declare const open: (options: Options) => Effect.Effect<Volume, VfsError, LiveImageStore | Scope.Scope | Crypto.Crypto>;
65
+ export declare const open: (options: Options) => Effect.Effect<Volume, VfsError, LiveImageStore | Scope.Scope | Digest.Digest | SecureRandom.SecureRandom>;
60
66
  /**
61
67
  * Scoped access to live volumes shared by canonical storage identity.
62
68
  * Each `get` retains its volume until the borrowing scope closes. Keep that
@@ -123,7 +129,7 @@ export interface RegistryOptions<K, E = never, R = never> {
123
129
  * @category constructors
124
130
  * @since 0.9.0
125
131
  */
126
- export declare const makeRegistry: <K, E, R>(options: RegistryOptions<K, E, R>) => Effect.Effect<Registry<K, E>, ArgumentFailure, R | Crypto.Crypto | Scope.Scope>;
132
+ export declare const makeRegistry: <K, E, R>(options: RegistryOptions<K, E, R>) => Effect.Effect<Registry<K, E>, ArgumentFailure, R | Digest.Digest | SecureRandom.SecureRandom | Scope.Scope>;
127
133
  /**
128
134
  * A live volume and the shutdown action its storage adapter must run before
129
135
  * closing the underlying store.
@@ -145,12 +151,12 @@ export interface ImageSession {
145
151
  /**
146
152
  * Construct a versioned image for a new, empty volume.
147
153
  * Store this image before opening it for mutation.
148
- * Requires `Crypto.Crypto` for secure volume identifiers and reference keys.
154
+ * Requires the `Digest` and `SecureRandom` services for secure volume identifiers and reference keys.
149
155
  *
150
156
  * @category constructors
151
157
  * @since 0.4.0
152
158
  */
153
- export declare const prepareEmptyImage: (options?: VolumeOptions) => Effect.Effect<Uint8Array, VfsError, Crypto.Crypto>;
159
+ export declare const prepareEmptyImage: (options?: VolumeOptions) => Effect.Effect<Uint8Array, VfsError, Digest.Digest | SecureRandom.SecureRandom>;
154
160
  /**
155
161
  * Open a validated image and stage every mutation before calling `commit`.
156
162
  * The returned session contains the volume and a coordinated shutdown effect.
@@ -160,6 +166,6 @@ export declare const prepareEmptyImage: (options?: VolumeOptions) => Effect.Effe
160
166
  * @category constructors
161
167
  * @since 0.4.0
162
168
  */
163
- export declare const openImage: (image: Uint8Array, maxImageBytes: ByteSize.ByteSize, commit: (image: Uint8Array) => Effect.Effect<CommitOutcome>, durability?: VolumeDurability) => Effect.Effect<ImageSession, VfsError, Crypto.Crypto>;
169
+ export declare const openImage: (image: Uint8Array, maxImageBytes: ByteSize.ByteSize, commit: (image: Uint8Array) => Effect.Effect<CommitOutcome>, durability?: VolumeDurability) => Effect.Effect<ImageSession, VfsError, Digest.Digest | SecureRandom.SecureRandom>;
164
170
  export {};
165
171
  //# sourceMappingURL=LiveVolume.d.ts.map
@@ -1 +1 @@
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,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAC5C,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAI1C,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjF,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAErF;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GA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C,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;CACvC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,aAAa,KAAK,MAAM,CAAC,MAAM,CACxE,UAAU,EACV,QAAQ,EACR,MAAM,CAAC,MAAM,GAAG,YAAY,CAAC,YAAY,CAKxC,CAAA;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,CACtB,KAAK,EAAE,UAAU,EACjB,aAAa,EAAE,QAAQ,CAAC,QAAQ,EAChC,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAC3D,UAAU,CAAC,EAAE,gBAAgB,KAC1B,MAAM,CAAC,MAAM,CAChB,YAAY,EACZ,QAAQ,EACR,MAAM,CAAC,MAAM,GAAG,YAAY,CAAC,YAAY,CAClB,CAAA"}
@@ -10,10 +10,12 @@
10
10
  */
11
11
  import { Context, Deferred, Duration, Effect, Layer, MutableHashMap, Option, RcMap, Schema } from "effect";
12
12
  import * as ByteSize from "effect/ByteSize";
13
- import { argumentFailure, decodeConfiguration, retargetFailure } from "./internal/errors.js";
13
+ import { Errors } from "./internal/engine.js";
14
+ import { retargetFailure } from "./internal/errors.js";
14
15
  import * as Model from "./internal/virtualFileSystem.js";
15
16
  import * as Limits from "./internal/volumeLimits.js";
16
17
  import { VfsError } from "./VfsError.js";
18
+ const { argumentFailure, decodeConfiguration } = Errors;
17
19
  /**
18
20
  * One exclusively owned store. Its Layer holds the storage resource until the
19
21
  * volume has shut down. Providers must atomically replace each image and
@@ -27,7 +29,7 @@ export class LiveImageStore extends Context.Service()("@effect-vfs/core/LiveImag
27
29
  /**
28
30
  * Open a live volume using the supplied store Layer. The caller owns a Scope;
29
31
  * the volume shuts down before that Layer releases its storage resource.
30
- * Requires `Crypto.Crypto` to mint a new volume or incarnation.
32
+ * Requires the `Digest` and `SecureRandom` services to mint a new volume or incarnation.
31
33
  *
32
34
  * @category constructors
33
35
  * @since 0.4.0
@@ -36,6 +38,8 @@ export const open = Effect.fnUntraced(function* (options) {
36
38
  const store = yield* LiveImageStore;
37
39
  const { decoded, initial } = yield* Effect.gen(function* () {
38
40
  const decoded = yield* Effect.fromResult(Limits.configuration(options.volume, "LiveVolume.open"));
41
+ if (decoded.options.execution === "sync")
42
+ return yield* argumentFailure("LiveVolume.open", "execution");
39
43
  const initial = yield* prepareEmptyImage(decoded.options);
40
44
  return { decoded, initial };
41
45
  }).pipe(
@@ -103,6 +107,9 @@ export const makeRegistry = Effect.fnUntraced(function* (options) {
103
107
  const idleTimeToLive = Duration.fromInput(options.idleTimeToLive ?? 0);
104
108
  if (Option.isNone(idleTimeToLive))
105
109
  return yield* argumentFailure("LiveVolume.makeRegistry", "idleTimeToLive");
110
+ if (options.volume.volume.execution === "sync") {
111
+ return yield* argumentFailure("LiveVolume.makeRegistry", "volume.volume.execution");
112
+ }
106
113
  const store = options.store;
107
114
  const volume = { maxImageBytes: options.volume.maxImageBytes, volume: { ...options.volume.volume } };
108
115
  const retiring = MutableHashMap.empty();
@@ -137,7 +144,7 @@ export const makeRegistry = Effect.fnUntraced(function* (options) {
137
144
  /**
138
145
  * Construct a versioned image for a new, empty volume.
139
146
  * Store this image before opening it for mutation.
140
- * Requires `Crypto.Crypto` for secure volume identifiers and reference keys.
147
+ * Requires the `Digest` and `SecureRandom` services for secure volume identifiers and reference keys.
141
148
  *
142
149
  * @category constructors
143
150
  * @since 0.4.0