@effect-vfs/core 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/BytePath.d.ts +49 -5
  2. package/dist/BytePath.d.ts.map +1 -1
  3. package/dist/BytePath.js +9 -9
  4. package/dist/Snapshot.d.ts +61 -5
  5. package/dist/Snapshot.d.ts.map +1 -1
  6. package/dist/Snapshot.js +60 -5
  7. package/dist/SnapshotDelta.d.ts +208 -31
  8. package/dist/SnapshotDelta.d.ts.map +1 -1
  9. package/dist/SnapshotDelta.js +162 -25
  10. package/dist/VirtualFileSystem.d.ts +1035 -348
  11. package/dist/VirtualFileSystem.d.ts.map +1 -1
  12. package/dist/VirtualFileSystem.js +620 -1772
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/internal/bytePath.d.ts +10 -0
  16. package/dist/internal/bytePath.d.ts.map +1 -0
  17. package/dist/internal/bytePath.js +41 -0
  18. package/dist/internal/bytes.d.ts +6 -0
  19. package/dist/internal/bytes.d.ts.map +1 -0
  20. package/dist/internal/bytes.js +17 -0
  21. package/dist/internal/canonicalBase64.d.ts +14 -6
  22. package/dist/internal/canonicalBase64.d.ts.map +1 -1
  23. package/dist/internal/canonicalBase64.js +29 -7
  24. package/dist/internal/image.d.ts +85 -104
  25. package/dist/internal/image.d.ts.map +1 -1
  26. package/dist/internal/image.js +99 -95
  27. package/dist/internal/metadata.d.ts +28 -0
  28. package/dist/internal/metadata.d.ts.map +1 -0
  29. package/dist/internal/metadata.js +29 -0
  30. package/dist/internal/snapshotDelta.d.ts +0 -1
  31. package/dist/internal/snapshotDelta.d.ts.map +1 -1
  32. package/dist/internal/snapshotDelta.js +358 -325
  33. package/dist/internal/snapshotDeltaModel.d.ts +10 -0
  34. package/dist/internal/snapshotDeltaModel.d.ts.map +1 -0
  35. package/dist/internal/snapshotDeltaModel.js +15 -0
  36. package/dist/internal/virtualFileSystem/errors.d.ts +31 -0
  37. package/dist/internal/virtualFileSystem/errors.d.ts.map +1 -0
  38. package/dist/internal/virtualFileSystem/errors.js +51 -0
  39. package/dist/internal/virtualFileSystem/fixture.d.ts +63 -0
  40. package/dist/internal/virtualFileSystem/fixture.d.ts.map +1 -0
  41. package/dist/internal/virtualFileSystem/fixture.js +144 -0
  42. package/dist/internal/{content.d.ts → virtualFileSystem/overlayContent.d.ts} +4 -14
  43. package/dist/internal/virtualFileSystem/overlayContent.d.ts.map +1 -0
  44. package/dist/internal/virtualFileSystem/overlayContent.js +29 -0
  45. package/dist/internal/{overlayChanges.d.ts → virtualFileSystem/overlayDiff.d.ts} +3 -12
  46. package/dist/internal/virtualFileSystem/overlayDiff.d.ts.map +1 -0
  47. package/dist/internal/virtualFileSystem/overlayDiff.js +120 -0
  48. package/dist/internal/virtualFileSystem/path.d.ts +44 -0
  49. package/dist/internal/virtualFileSystem/path.d.ts.map +1 -0
  50. package/dist/internal/virtualFileSystem/path.js +127 -0
  51. package/dist/internal/virtualFileSystem/testHooks.d.ts +20 -0
  52. package/dist/internal/virtualFileSystem/testHooks.d.ts.map +1 -0
  53. package/dist/internal/virtualFileSystem/testHooks.js +23 -0
  54. package/dist/internal/virtualFileSystem/watchHub.d.ts +16 -0
  55. package/dist/internal/virtualFileSystem/watchHub.d.ts.map +1 -0
  56. package/dist/internal/virtualFileSystem/watchHub.js +33 -0
  57. package/dist/internal/virtualFileSystem.d.ts +366 -0
  58. package/dist/internal/virtualFileSystem.d.ts.map +1 -0
  59. package/dist/internal/virtualFileSystem.js +1755 -0
  60. package/package.json +15 -5
  61. package/dist/internal/content.d.ts.map +0 -1
  62. package/dist/internal/content.js +0 -26
  63. package/dist/internal/overlayChanges.d.ts.map +0 -1
  64. package/dist/internal/overlayChanges.js +0 -146
  65. package/dist/internal/overlayTesting.d.ts +0 -12
  66. package/dist/internal/overlayTesting.d.ts.map +0 -1
  67. package/dist/internal/overlayTesting.js +0 -12
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Virtual filesystem contracts, schemas, errors, and constructors.
8
8
  *
9
- * @category exports
9
+ * @category re-exports
10
10
  * @since 0.1.0
11
11
  */
12
12
  export * as VirtualFileSystem from "./VirtualFileSystem.js";
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Virtual filesystem contracts, schemas, errors, and constructors.
8
8
  *
9
- * @category exports
9
+ * @category re-exports
10
10
  * @since 0.1.0
11
11
  */
12
12
  export * as VirtualFileSystem from "./VirtualFileSystem.js";
@@ -0,0 +1,10 @@
1
+ import type { BytePath } from "../BytePath.js";
2
+ /** @internal */
3
+ export declare const BytePathId: "@effect-vfs/core/BytePath";
4
+ /** @internal */
5
+ export declare const isBytePath: (value: unknown) => value is BytePath;
6
+ /** @internal */
7
+ export declare const make: (bytes: Uint8Array) => BytePath;
8
+ /** @internal */
9
+ export declare const getBytes: (path: BytePath) => Uint8Array | undefined;
10
+ //# sourceMappingURL=bytePath.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytePath.d.ts","sourceRoot":"","sources":["../../src/internal/bytePath.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAG9C,gBAAgB;AAChB,eAAO,MAAM,UAAU,EAAG,2BAAoC,CAAA;AA6B9D,gBAAgB;AAChB,eAAO,MAAM,UAAU,UAAW,OAAO,KAAG,KAAK,IAAI,QAA6D,CAAA;AAElH,gBAAgB;AAChB,eAAO,MAAM,IAAI,UAAW,UAAU,KAAG,QAMxC,CAAA;AAED,gBAAgB;AAChB,eAAO,MAAM,QAAQ,SAAU,QAAQ,KAAG,UAAU,GAAG,SAAgC,CAAA"}
@@ -0,0 +1,41 @@
1
+ // Opaque byte path representation and value protocols.
2
+ import * as Equal from "effect/Equal";
3
+ import * as Hash from "effect/Hash";
4
+ import { pipeArguments } from "effect/Pipeable";
5
+ import * as Predicate from "effect/Predicate";
6
+ import { sameBytes } from "./bytes.js";
7
+ /** @internal */
8
+ export const BytePathId = "@effect-vfs/core/BytePath";
9
+ const bytePaths = new WeakMap();
10
+ const hashBytes = (bytes) => {
11
+ let hash = Hash.string("@effect-vfs/core/BytePath");
12
+ for (const byte of bytes) {
13
+ hash = Hash.combine(Hash.number(byte))(hash);
14
+ }
15
+ return Hash.combine(Hash.number(bytes.length))(hash);
16
+ };
17
+ const BytePathProto = {
18
+ [BytePathId]: BytePathId,
19
+ [Equal.symbol](that) {
20
+ if (!isBytePath(that))
21
+ return false;
22
+ return sameBytes(bytePaths.get(this), bytePaths.get(that));
23
+ },
24
+ [Hash.symbol]() {
25
+ return hashBytes(bytePaths.get(this));
26
+ },
27
+ pipe() {
28
+ return pipeArguments(this, arguments);
29
+ }
30
+ };
31
+ /** @internal */
32
+ export const isBytePath = (value) => Predicate.isObject(value) && bytePaths.has(value);
33
+ /** @internal */
34
+ export const make = (bytes) => {
35
+ // SAFETY: BytePathProto implements every member of the opaque BytePath contract.
36
+ const path = Object.create(BytePathProto);
37
+ bytePaths.set(path, bytes);
38
+ return Object.freeze(path);
39
+ };
40
+ /** @internal */
41
+ export const getBytes = (path) => bytePaths.get(path);
@@ -0,0 +1,6 @@
1
+ import * as Order from "effect/Order";
2
+ /** @internal */
3
+ export declare const bytesOrder: Order.Order<Uint8Array>;
4
+ /** @internal */
5
+ export declare const sameBytes: (left: Uint8Array | undefined, right: Uint8Array | undefined) => boolean;
6
+ //# sourceMappingURL=bytes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytes.d.ts","sourceRoot":"","sources":["../../src/internal/bytes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAerC,gBAAgB;AAChB,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAA4B,CAAA;AAG3E,gBAAgB;AAChB,eAAO,MAAM,SAAS,SAAU,UAAU,GAAG,SAAS,SAAS,UAAU,GAAG,SAAS,KAAG,OACU,CAAA"}
@@ -0,0 +1,17 @@
1
+ // Byte-array comparison shared by the overlay diff, the snapshot delta, and BytePath equality.
2
+ import * as Order from "effect/Order";
3
+ const compareBytes = (left, right) => {
4
+ const length = Math.min(left.length, right.length);
5
+ for (let index = 0; index < length; index++) {
6
+ const l = left[index];
7
+ const r = right[index];
8
+ if (l !== r)
9
+ return l < r ? -1 : 1;
10
+ }
11
+ return left.length === right.length ? 0 : left.length < right.length ? -1 : 1;
12
+ };
13
+ /** @internal */
14
+ export const bytesOrder = Order.make(compareBytes);
15
+ // A plain loop: Equal.equals would hash both arrays and memoise the pair in a WeakMap first.
16
+ /** @internal */
17
+ export const sameBytes = (left, right) => left === right || (left !== undefined && right !== undefined && compareBytes(left, right) === 0);
@@ -1,7 +1,15 @@
1
- /** Strict padded base64 check, including canonical unused pad bits and no ignored whitespace. */
2
- export declare const isCanonical: (value: string) => boolean;
3
- /** Decoded length for an already canonical base64 string, without allocating its payload. */
4
- export declare const decodedLength: (value: string) => number;
5
- /** Decodes base64 previously accepted by `isCanonical`. */
6
- export declare const decodeTrusted: (value: string) => Uint8Array;
1
+ import * as Effect from "effect/Effect";
2
+ import * as Schema from "effect/Schema";
3
+ declare const Encoded: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
4
+ type Encoded = typeof Encoded.Type;
5
+ /** @internal */
6
+ export declare const CanonicalBase64: {
7
+ Encoded: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
8
+ Bytes: Schema.decodeTo<Schema.Uint8Array, Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">, never, never>;
9
+ decode: (input: Encoded) => Effect.Effect<Uint8Array<ArrayBufferLike>, never, never>;
10
+ encode: (input: Uint8Array) => Encoded;
11
+ decodedLength: (value: Encoded) => number;
12
+ is: (value: string) => value is Encoded;
13
+ };
14
+ export {};
7
15
  //# sourceMappingURL=canonicalBase64.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canonicalBase64.d.ts","sourceRoot":"","sources":["../../src/internal/canonicalBase64.ts"],"names":[],"mappings":"AAKA,iGAAiG;AACjG,eAAO,MAAM,WAAW,UAAW,MAAM,KAAG,OAGP,CAAA;AAErC,6FAA6F;AAC7F,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,MACmC,CAAA;AAEjF,2DAA2D;AAC3D,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,UAC4D,CAAA"}
1
+ {"version":3,"file":"canonicalBase64.d.ts","sourceRoot":"","sources":["../../src/internal/canonicalBase64.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AA0BvC,QAAA,MAAM,OAAO,uEAGZ,CAAA;AASD,KAAK,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAElC,gBAAgB;AAChB,eAAO,MAAM,eAAe;;;oBAGV,OAAO;oBACP,UAAU,KAAG,OAAO;2BACb,OAAO,KAAG,MAAM;gBAC3B,MAAM,KAAG,KAAK,IAAI,OAAO;CACtC,CAAA"}
@@ -1,11 +1,33 @@
1
+ import * as Effect from "effect/Effect";
1
2
  import * as Encoding from "effect/Encoding";
2
- import * as Result from "effect/Result";
3
+ import * as Schema from "effect/Schema";
4
+ import * as SchemaGetter from "effect/SchemaGetter";
3
5
  const canonicalTail = /^(?:[A-Za-z0-9+/]{4}|[A-Za-z0-9+/][AQgw]==|[A-Za-z0-9+/]{2}[AEIMQUYcgkosw048]=)?(?![\s\S])/;
4
- /** Strict padded base64 check, including canonical unused pad bits and no ignored whitespace. */
5
- export const isCanonical = (value) => value.length % 4 === 0 &&
6
+ const isCanonical = (value) => value.length % 4 === 0 &&
6
7
  !/[^A-Za-z0-9+/]/.test(value.slice(0, -4)) &&
7
8
  canonicalTail.test(value.slice(-4));
8
- /** Decoded length for an already canonical base64 string, without allocating its payload. */
9
- export const decodedLength = (value) => value.length / 4 * 3 - (value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0);
10
- /** Decodes base64 previously accepted by `isCanonical`. */
11
- export const decodeTrusted = (value) => Result.getOrThrowWith(Encoding.decodeBase64(value), () => new Error("Invalid trusted canonical base64"));
9
+ const decodedLength = (value) => value.length / 4 * 3 - (value.endsWith("==") ? 2 : value.endsWith("=") ? 1 : 0);
10
+ const encode = (input) => {
11
+ // Join bounded chunks to avoid the encoder's intermediate string chains. Three-byte
12
+ // boundaries keep padding in the final chunk, preserving the canonical representation.
13
+ const chunkBytes = 12_288;
14
+ const chunks = [];
15
+ for (let offset = 0; offset < input.length; offset += chunkBytes) {
16
+ chunks.push(Encoding.encodeBase64(input.subarray(offset, offset + chunkBytes)));
17
+ }
18
+ return Encoded.make(chunks.join(""));
19
+ };
20
+ const Encoded = Schema.String.pipe(Schema.refine((value) => isCanonical(value), { expected: "canonical padded base64" }), Schema.brand("CanonicalBase64"));
21
+ const Bytes = Encoded.pipe(Schema.decodeTo(Schema.Uint8Array, {
22
+ decode: SchemaGetter.decodeBase64(),
23
+ encode: SchemaGetter.transform((input) => encode(input))
24
+ }));
25
+ /** @internal */
26
+ export const CanonicalBase64 = {
27
+ Encoded,
28
+ Bytes,
29
+ decode: (input) => Schema.decodeEffect(Bytes)(input).pipe(Effect.orDie),
30
+ encode: (input) => encode(input),
31
+ decodedLength: (value) => decodedLength(value),
32
+ is: (value) => isCanonical(value)
33
+ };
@@ -1,128 +1,109 @@
1
- /**
2
- * Snapshot validation and serialization used by `VirtualFileSystem`.
3
- *
4
- * @internal
5
- */
6
1
  import * as ByteSize from "effect/ByteSize";
7
2
  import * as Effect from "effect/Effect";
8
3
  import * as Schema from "effect/Schema";
9
4
  import { ImageError, type Snapshot } from "../Snapshot.js";
10
- import * as CanonicalBase64 from "./canonicalBase64.js";
5
+ import { StoredMetadata } from "./metadata.js";
11
6
  /** @internal */
12
- export declare const StoredMetadata: Schema.Struct<{
13
- readonly uid: Schema.Finite;
14
- readonly gid: Schema.Finite;
15
- readonly mode: Schema.Finite;
16
- readonly atimeNs: Schema.String;
17
- readonly mtimeNs: Schema.String;
18
- readonly ctimeNs: Schema.String;
19
- readonly birthtimeNs: Schema.String;
20
- }>;
21
- /** @internal */
22
- export type StoredMetadata = typeof StoredMetadata.Type;
23
- /** @internal */
24
- export declare const Record: Schema.Union<readonly [Schema.Struct<{
25
- readonly id: Schema.String;
26
- readonly kind: Schema.Literal<"directory">;
27
- readonly metadata: Schema.Struct<{
28
- readonly uid: Schema.Finite;
29
- readonly gid: Schema.Finite;
30
- readonly mode: Schema.Finite;
31
- readonly atimeNs: Schema.String;
32
- readonly mtimeNs: Schema.String;
33
- readonly ctimeNs: Schema.String;
34
- readonly birthtimeNs: Schema.String;
35
- }>;
36
- readonly entries: Schema.$Array<Schema.Struct<{
37
- readonly name: Schema.String;
38
- readonly target: Schema.String;
39
- }>>;
40
- }>, Schema.Struct<{
41
- readonly id: Schema.String;
42
- readonly kind: Schema.Literal<"file">;
43
- readonly metadata: Schema.Struct<{
44
- readonly uid: Schema.Finite;
45
- readonly gid: Schema.Finite;
46
- readonly mode: Schema.Finite;
47
- readonly atimeNs: Schema.String;
48
- readonly mtimeNs: Schema.String;
49
- readonly ctimeNs: Schema.String;
50
- readonly birthtimeNs: Schema.String;
51
- }>;
52
- readonly data: Schema.String;
53
- }>, Schema.Struct<{
54
- readonly id: Schema.String;
55
- readonly kind: Schema.Literal<"symlink">;
56
- readonly metadata: Schema.Struct<{
57
- readonly uid: Schema.Finite;
58
- readonly gid: Schema.Finite;
59
- readonly mode: Schema.Finite;
60
- readonly atimeNs: Schema.String;
61
- readonly mtimeNs: Schema.String;
62
- readonly ctimeNs: Schema.String;
63
- readonly birthtimeNs: Schema.String;
64
- }>;
65
- readonly target: Schema.String;
66
- }>]>;
7
+ export { StoredMetadata };
67
8
  /** @internal */
68
- export type Record = typeof Record.Type;
69
- /** @internal */
70
- export declare const Document: Schema.Struct<{
71
- readonly format: Schema.Literal<"effect-vfs">;
72
- readonly version: Schema.Literal<1>;
73
- readonly root: Schema.String;
74
- readonly records: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
9
+ export declare const Record: Schema.TaggedUnion<{
10
+ readonly directory: Schema.TaggedStruct<"directory", {
75
11
  readonly id: Schema.String;
76
- readonly kind: Schema.Literal<"directory">;
77
12
  readonly metadata: Schema.Struct<{
78
- readonly uid: Schema.Finite;
79
- readonly gid: Schema.Finite;
80
- readonly mode: Schema.Finite;
81
- readonly atimeNs: Schema.String;
82
- readonly mtimeNs: Schema.String;
83
- readonly ctimeNs: Schema.String;
84
- readonly birthtimeNs: Schema.String;
13
+ readonly uid: Schema.Natural;
14
+ readonly gid: Schema.Natural;
15
+ readonly mode: Schema.Natural;
16
+ readonly atimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
17
+ readonly mtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
18
+ readonly ctimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
19
+ readonly birthtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
85
20
  }>;
86
21
  readonly entries: Schema.$Array<Schema.Struct<{
87
- readonly name: Schema.String;
22
+ readonly name: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
88
23
  readonly target: Schema.String;
89
24
  }>>;
90
- }>, Schema.Struct<{
25
+ }>;
26
+ readonly file: Schema.TaggedStruct<"file", {
91
27
  readonly id: Schema.String;
92
- readonly kind: Schema.Literal<"file">;
93
28
  readonly metadata: Schema.Struct<{
94
- readonly uid: Schema.Finite;
95
- readonly gid: Schema.Finite;
96
- readonly mode: Schema.Finite;
97
- readonly atimeNs: Schema.String;
98
- readonly mtimeNs: Schema.String;
99
- readonly ctimeNs: Schema.String;
100
- readonly birthtimeNs: Schema.String;
29
+ readonly uid: Schema.Natural;
30
+ readonly gid: Schema.Natural;
31
+ readonly mode: Schema.Natural;
32
+ readonly atimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
33
+ readonly mtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
34
+ readonly ctimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
35
+ readonly birthtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
101
36
  }>;
102
- readonly data: Schema.String;
103
- }>, Schema.Struct<{
37
+ readonly data: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
38
+ }>;
39
+ readonly symlink: Schema.TaggedStruct<"symlink", {
104
40
  readonly id: Schema.String;
105
- readonly kind: Schema.Literal<"symlink">;
106
41
  readonly metadata: Schema.Struct<{
107
- readonly uid: Schema.Finite;
108
- readonly gid: Schema.Finite;
109
- readonly mode: Schema.Finite;
110
- readonly atimeNs: Schema.String;
111
- readonly mtimeNs: Schema.String;
112
- readonly ctimeNs: Schema.String;
113
- readonly birthtimeNs: Schema.String;
42
+ readonly uid: Schema.Natural;
43
+ readonly gid: Schema.Natural;
44
+ readonly mode: Schema.Natural;
45
+ readonly atimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
46
+ readonly mtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
47
+ readonly ctimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
48
+ readonly birthtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
114
49
  }>;
115
- readonly target: Schema.String;
116
- }>]>>;
50
+ readonly target: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
51
+ }>;
117
52
  }>;
118
53
  /** @internal */
119
- export type Document = typeof Document.Type;
120
- /** @internal */
121
- export declare const decodedLength: typeof CanonicalBase64.decodedLength;
54
+ export type Record = typeof Record.Type;
122
55
  /** @internal */
123
- export declare const base64: (input: Uint8Array) => string;
56
+ export declare const Document: Schema.Struct<{
57
+ readonly format: Schema.Literal<"effect-vfs">;
58
+ readonly version: Schema.Literal<1>;
59
+ readonly root: Schema.String;
60
+ readonly records: Schema.$Array<Schema.TaggedUnion<{
61
+ readonly directory: Schema.TaggedStruct<"directory", {
62
+ readonly id: Schema.String;
63
+ readonly metadata: Schema.Struct<{
64
+ readonly uid: Schema.Natural;
65
+ readonly gid: Schema.Natural;
66
+ readonly mode: Schema.Natural;
67
+ readonly atimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
68
+ readonly mtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
69
+ readonly ctimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
70
+ readonly birthtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
71
+ }>;
72
+ readonly entries: Schema.$Array<Schema.Struct<{
73
+ readonly name: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
74
+ readonly target: Schema.String;
75
+ }>>;
76
+ }>;
77
+ readonly file: Schema.TaggedStruct<"file", {
78
+ readonly id: Schema.String;
79
+ readonly metadata: Schema.Struct<{
80
+ readonly uid: Schema.Natural;
81
+ readonly gid: Schema.Natural;
82
+ readonly mode: Schema.Natural;
83
+ readonly atimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
84
+ readonly mtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
85
+ readonly ctimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
86
+ readonly birthtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
87
+ }>;
88
+ readonly data: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
89
+ }>;
90
+ readonly symlink: Schema.TaggedStruct<"symlink", {
91
+ readonly id: Schema.String;
92
+ readonly metadata: Schema.Struct<{
93
+ readonly uid: Schema.Natural;
94
+ readonly gid: Schema.Natural;
95
+ readonly mode: Schema.Natural;
96
+ readonly atimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
97
+ readonly mtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
98
+ readonly ctimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
99
+ readonly birthtimeNs: Schema.decodeTo<Schema.BigInt, Schema.String, never, never>;
100
+ }>;
101
+ readonly target: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
102
+ }>;
103
+ }>>;
104
+ }>;
124
105
  /** @internal */
125
- export declare const bytes: (value: string) => Uint8Array;
106
+ export type Document = typeof Document.Type;
126
107
  /** @internal */
127
108
  export declare const inspect: (snapshot: Snapshot) => Effect.Effect<Document, ImageError>;
128
109
  /** @internal */
@@ -131,7 +112,7 @@ export declare const capture: (input: unknown, limits?: {
131
112
  readonly maxRecords: number;
132
113
  readonly maxEntries: number;
133
114
  readonly maxDecodedBytes: ByteSize.ByteSize;
134
- } | undefined) => Effect.Effect<Snapshot, ImageError, never>;
115
+ } | undefined, trusted?: any) => Effect.Effect<Snapshot, ImageError, never>;
135
116
  /** @internal */
136
117
  export declare const encodeSnapshot: (snapshot: Snapshot) => Effect.Effect<Uint8Array<ArrayBuffer>, ImageError, never>;
137
118
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/internal/image.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAGvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAgB,UAAU,EAAE,KAAK,QAAQ,EAAkB,MAAM,gBAAgB,CAAA;AACxF,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAA;AAavD,gBAAgB;AAChB,eAAO,MAAM,cAAc;;;;;;;;EAQzB,CAAA;AACF,gBAAgB;AAChB,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD,gBAAgB;AAChB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASjB,CAAA;AACF,gBAAgB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