@effect-vfs/core 0.4.0 → 0.6.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 +39 -32
- package/dist/BytePath.d.ts +114 -4
- package/dist/BytePath.d.ts.map +1 -1
- package/dist/BytePath.js +155 -0
- package/dist/Caller.d.ts +391 -0
- package/dist/Caller.d.ts.map +1 -0
- package/dist/Caller.js +199 -0
- package/dist/FileHandle.d.ts +50 -0
- package/dist/FileHandle.d.ts.map +1 -0
- package/dist/FileHandle.js +28 -0
- package/dist/Fixture.d.ts +155 -0
- package/dist/Fixture.d.ts.map +1 -0
- package/dist/Fixture.js +65 -0
- package/dist/LiveVolume.d.ts +15 -22
- package/dist/LiveVolume.d.ts.map +1 -1
- package/dist/LiveVolume.js +19 -15
- package/dist/Metadata.d.ts +186 -0
- package/dist/Metadata.d.ts.map +1 -0
- package/dist/Metadata.js +125 -0
- package/dist/Snapshot.d.ts +31 -53
- package/dist/Snapshot.d.ts.map +1 -1
- package/dist/Snapshot.js +26 -49
- package/dist/SnapshotDelta.d.ts +24 -39
- package/dist/SnapshotDelta.d.ts.map +1 -1
- package/dist/SnapshotDelta.js +14 -35
- package/dist/Target.d.ts +225 -0
- package/dist/Target.d.ts.map +1 -0
- package/dist/Target.js +92 -0
- package/dist/Testing.d.ts +128 -0
- package/dist/Testing.d.ts.map +1 -0
- package/dist/Testing.js +111 -0
- package/dist/VfsError.d.ts +199 -0
- package/dist/VfsError.d.ts.map +1 -0
- package/dist/VfsError.js +164 -0
- package/dist/VirtualFileSystem.d.ts +628 -347
- package/dist/VirtualFileSystem.d.ts.map +1 -1
- package/dist/VirtualFileSystem.js +450 -117
- package/dist/Volume.d.ts +211 -0
- package/dist/Volume.d.ts.map +1 -0
- package/dist/Volume.js +172 -0
- package/dist/Watch.d.ts +68 -0
- package/dist/Watch.d.ts.map +1 -0
- package/dist/Watch.js +46 -0
- package/dist/index.d.ts +56 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -1
- package/dist/internal/budget.d.ts +90 -0
- package/dist/internal/budget.d.ts.map +1 -0
- package/dist/internal/budget.js +70 -0
- package/dist/internal/bytePath.d.ts +2 -0
- package/dist/internal/bytePath.d.ts.map +1 -1
- package/dist/internal/bytePath.js +3 -2
- package/dist/internal/bytes.d.ts +3 -0
- package/dist/internal/bytes.d.ts.map +1 -1
- package/dist/internal/bytes.js +4 -2
- package/dist/internal/canonicalBase64.d.ts +1 -4
- package/dist/internal/canonicalBase64.d.ts.map +1 -1
- package/dist/internal/canonicalBase64.js +9 -13
- package/dist/internal/errors.d.ts +54 -0
- package/dist/internal/errors.d.ts.map +1 -0
- package/dist/internal/errors.js +91 -0
- package/dist/internal/{virtualFileSystem/fixture.d.ts → fixture.d.ts} +8 -8
- package/dist/internal/fixture.d.ts.map +1 -0
- package/dist/internal/fixture.js +133 -0
- package/dist/internal/hex128.d.ts +12 -0
- package/dist/internal/hex128.d.ts.map +1 -0
- package/dist/internal/hex128.js +7 -0
- package/dist/internal/hmac.d.ts +5 -0
- package/dist/internal/hmac.d.ts.map +1 -0
- package/dist/internal/hmac.js +150 -0
- package/dist/internal/image.d.ts +14 -117
- package/dist/internal/image.d.ts.map +1 -1
- package/dist/internal/image.js +137 -167
- package/dist/internal/inodeTable.d.ts +20 -0
- package/dist/internal/inodeTable.d.ts.map +1 -0
- package/dist/internal/inodeTable.js +48 -0
- package/dist/internal/lines.d.ts +36 -0
- package/dist/internal/lines.d.ts.map +1 -0
- package/dist/internal/lines.js +115 -0
- package/dist/internal/liveImage.d.ts +19 -278
- package/dist/internal/liveImage.d.ts.map +1 -1
- package/dist/internal/liveImage.js +75 -166
- package/dist/internal/merkle.d.ts +45 -0
- package/dist/internal/merkle.d.ts.map +1 -0
- package/dist/internal/merkle.js +179 -0
- package/dist/internal/metadata.d.ts +2 -13
- package/dist/internal/metadata.d.ts.map +1 -1
- package/dist/internal/metadata.js +5 -15
- package/dist/internal/{virtualFileSystem/overlayDiff.d.ts → overlayDiff.d.ts} +3 -3
- package/dist/internal/overlayDiff.d.ts.map +1 -0
- package/dist/internal/{virtualFileSystem/overlayDiff.js → overlayDiff.js} +1 -4
- package/dist/internal/{virtualFileSystem/path.d.ts → path.d.ts} +19 -7
- package/dist/internal/path.d.ts.map +1 -0
- package/dist/internal/{virtualFileSystem/path.js → path.js} +39 -25
- package/dist/internal/snapshotDelta.d.ts +61 -60
- package/dist/internal/snapshotDelta.d.ts.map +1 -1
- package/dist/internal/snapshotDelta.js +612 -504
- package/dist/internal/snapshotDeltaModel.d.ts.map +1 -1
- package/dist/internal/snapshotDeltaModel.js +0 -1
- package/dist/internal/stagedState.d.ts +18 -0
- package/dist/internal/stagedState.d.ts.map +1 -0
- package/dist/internal/stagedState.js +18 -0
- package/dist/internal/testSeams.d.ts +17 -0
- package/dist/internal/testSeams.d.ts.map +1 -0
- package/dist/internal/testSeams.js +20 -0
- package/dist/internal/tree.d.ts +225 -0
- package/dist/internal/tree.d.ts.map +1 -0
- package/dist/internal/tree.js +385 -0
- package/dist/internal/turnstile.d.ts +8 -0
- package/dist/internal/turnstile.d.ts.map +1 -0
- package/dist/internal/turnstile.js +43 -0
- package/dist/internal/virtualFileSystem.d.ts +41 -491
- package/dist/internal/virtualFileSystem.d.ts.map +1 -1
- package/dist/internal/virtualFileSystem.js +2118 -2471
- package/dist/internal/volumeState.d.ts +110 -0
- package/dist/internal/volumeState.d.ts.map +1 -0
- package/dist/internal/volumeState.js +204 -0
- package/dist/internal/watchHub.d.ts +25 -0
- package/dist/internal/watchHub.d.ts.map +1 -0
- package/dist/internal/watchHub.js +68 -0
- package/package.json +53 -9
- package/dist/VirtualFileSystemError.d.ts +0 -54
- package/dist/VirtualFileSystemError.d.ts.map +0 -1
- package/dist/VirtualFileSystemError.js +0 -49
- package/dist/internal/virtualFileSystem/errors.d.ts +0 -12
- package/dist/internal/virtualFileSystem/errors.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/errors.js +0 -47
- package/dist/internal/virtualFileSystem/fixture.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/fixture.js +0 -150
- package/dist/internal/virtualFileSystem/overlayContent.d.ts +0 -15
- package/dist/internal/virtualFileSystem/overlayContent.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/overlayContent.js +0 -29
- package/dist/internal/virtualFileSystem/overlayDiff.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/path.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/stagedState.d.ts +0 -22
- package/dist/internal/virtualFileSystem/stagedState.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/stagedState.js +0 -62
- package/dist/internal/virtualFileSystem/testHooks.d.ts +0 -20
- package/dist/internal/virtualFileSystem/testHooks.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/testHooks.js +0 -23
- package/dist/internal/virtualFileSystem/watchHub.d.ts +0 -16
- package/dist/internal/virtualFileSystem/watchHub.d.ts.map +0 -1
- package/dist/internal/virtualFileSystem/watchHub.js +0 -54
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
/** @internal */
|
|
3
|
+
export declare const Hex128: Schema.String;
|
|
4
|
+
/** @internal */
|
|
5
|
+
export declare const VolumeEpoch: Schema.brand<Schema.String, "@effect-vfs/core/VolumeEpoch">;
|
|
6
|
+
/** @internal */
|
|
7
|
+
export type VolumeEpoch = typeof VolumeEpoch.Type;
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const KeySecret: Schema.brand<Schema.String, "@effect-vfs/core/KeySecret">;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export type KeySecret = typeof KeySecret.Type;
|
|
12
|
+
//# sourceMappingURL=hex128.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hex128.d.ts","sourceRoot":"","sources":["../../src/internal/hex128.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,gBAAgB;AAChB,eAAO,MAAM,MAAM,eAA0D,CAAA;AAE7E,gBAAgB;AAChB,eAAO,MAAM,WAAW,6DAA4D,CAAA;AAEpF,gBAAgB;AAChB,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,gBAAgB;AAChB,eAAO,MAAM,SAAS,2DAA0D,CAAA;AAEhF,gBAAgB;AAChB,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
/** @internal */
|
|
3
|
+
export const Hex128 = Schema.String.check(Schema.isPattern(/^[0-9a-f]{32}$/));
|
|
4
|
+
/** @internal */
|
|
5
|
+
export const VolumeEpoch = Hex128.pipe(Schema.brand("@effect-vfs/core/VolumeEpoch"));
|
|
6
|
+
/** @internal */
|
|
7
|
+
export const KeySecret = Hex128.pipe(Schema.brand("@effect-vfs/core/KeySecret"));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../../src/internal/hmac.ts"],"names":[],"mappings":"AAqJA,gBAAgB;AAChB,eAAO,MAAM,UAAU,QAAS,UAAU,WAAW,UAAU,KAAG,UAOjE,CAAA;AAGD,gBAAgB;AAChB,eAAO,MAAM,OAAO,SAAU,UAAU,SAAS,UAAU,KAAG,OAQ7D,CAAA"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// Synchronous HMAC keeps reference-key methods free of Crypto service requirements.
|
|
2
|
+
const BLOCK_BYTES = 64;
|
|
3
|
+
const ROUND_CONSTANTS = new Uint32Array([
|
|
4
|
+
0x428a2f98,
|
|
5
|
+
0x71374491,
|
|
6
|
+
0xb5c0fbcf,
|
|
7
|
+
0xe9b5dba5,
|
|
8
|
+
0x3956c25b,
|
|
9
|
+
0x59f111f1,
|
|
10
|
+
0x923f82a4,
|
|
11
|
+
0xab1c5ed5,
|
|
12
|
+
0xd807aa98,
|
|
13
|
+
0x12835b01,
|
|
14
|
+
0x243185be,
|
|
15
|
+
0x550c7dc3,
|
|
16
|
+
0x72be5d74,
|
|
17
|
+
0x80deb1fe,
|
|
18
|
+
0x9bdc06a7,
|
|
19
|
+
0xc19bf174,
|
|
20
|
+
0xe49b69c1,
|
|
21
|
+
0xefbe4786,
|
|
22
|
+
0x0fc19dc6,
|
|
23
|
+
0x240ca1cc,
|
|
24
|
+
0x2de92c6f,
|
|
25
|
+
0x4a7484aa,
|
|
26
|
+
0x5cb0a9dc,
|
|
27
|
+
0x76f988da,
|
|
28
|
+
0x983e5152,
|
|
29
|
+
0xa831c66d,
|
|
30
|
+
0xb00327c8,
|
|
31
|
+
0xbf597fc7,
|
|
32
|
+
0xc6e00bf3,
|
|
33
|
+
0xd5a79147,
|
|
34
|
+
0x06ca6351,
|
|
35
|
+
0x14292967,
|
|
36
|
+
0x27b70a85,
|
|
37
|
+
0x2e1b2138,
|
|
38
|
+
0x4d2c6dfc,
|
|
39
|
+
0x53380d13,
|
|
40
|
+
0x650a7354,
|
|
41
|
+
0x766a0abb,
|
|
42
|
+
0x81c2c92e,
|
|
43
|
+
0x92722c85,
|
|
44
|
+
0xa2bfe8a1,
|
|
45
|
+
0xa81a664b,
|
|
46
|
+
0xc24b8b70,
|
|
47
|
+
0xc76c51a3,
|
|
48
|
+
0xd192e819,
|
|
49
|
+
0xd6990624,
|
|
50
|
+
0xf40e3585,
|
|
51
|
+
0x106aa070,
|
|
52
|
+
0x19a4c116,
|
|
53
|
+
0x1e376c08,
|
|
54
|
+
0x2748774c,
|
|
55
|
+
0x34b0bcb5,
|
|
56
|
+
0x391c0cb3,
|
|
57
|
+
0x4ed8aa4a,
|
|
58
|
+
0x5b9cca4f,
|
|
59
|
+
0x682e6ff3,
|
|
60
|
+
0x748f82ee,
|
|
61
|
+
0x78a5636f,
|
|
62
|
+
0x84c87814,
|
|
63
|
+
0x8cc70208,
|
|
64
|
+
0x90befffa,
|
|
65
|
+
0xa4506ceb,
|
|
66
|
+
0xbef9a3f7,
|
|
67
|
+
0xc67178f2
|
|
68
|
+
]);
|
|
69
|
+
const INITIAL_STATE = [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19];
|
|
70
|
+
const rotr = (value, bits) => (value >>> bits) | (value << (32 - bits));
|
|
71
|
+
const sha256 = (message) => {
|
|
72
|
+
const padded = new Uint8Array(Math.ceil((message.length + 9) / BLOCK_BYTES) * BLOCK_BYTES);
|
|
73
|
+
padded.set(message);
|
|
74
|
+
padded[message.length] = 0x80;
|
|
75
|
+
const view = new DataView(padded.buffer);
|
|
76
|
+
view.setBigUint64(padded.length - 8, BigInt(message.length) * 8n);
|
|
77
|
+
const state = Int32Array.from(INITIAL_STATE);
|
|
78
|
+
const schedule = new Uint32Array(64);
|
|
79
|
+
for (let block = 0; block < padded.length; block += BLOCK_BYTES) {
|
|
80
|
+
for (let t = 0; t < 16; t++)
|
|
81
|
+
schedule[t] = view.getUint32(block + t * 4);
|
|
82
|
+
for (let t = 16; t < 64; t++) {
|
|
83
|
+
const w15 = schedule[t - 15];
|
|
84
|
+
const w2 = schedule[t - 2];
|
|
85
|
+
const s0 = rotr(w15, 7) ^ rotr(w15, 18) ^ (w15 >>> 3);
|
|
86
|
+
const s1 = rotr(w2, 17) ^ rotr(w2, 19) ^ (w2 >>> 10);
|
|
87
|
+
schedule[t] = (schedule[t - 16] + s0 + schedule[t - 7] + s1) | 0;
|
|
88
|
+
}
|
|
89
|
+
let a = state[0];
|
|
90
|
+
let b = state[1];
|
|
91
|
+
let c = state[2];
|
|
92
|
+
let d = state[3];
|
|
93
|
+
let e = state[4];
|
|
94
|
+
let f = state[5];
|
|
95
|
+
let g = state[6];
|
|
96
|
+
let h = state[7];
|
|
97
|
+
for (let t = 0; t < 64; t++) {
|
|
98
|
+
const t1 = (h + (rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25)) + ((e & f) ^ (~e & g)) + ROUND_CONSTANTS[t]
|
|
99
|
+
+ schedule[t]) | 0;
|
|
100
|
+
const t2 = ((rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22)) + ((a & b) ^ (a & c) ^ (b & c))) | 0;
|
|
101
|
+
h = g;
|
|
102
|
+
g = f;
|
|
103
|
+
f = e;
|
|
104
|
+
e = (d + t1) | 0;
|
|
105
|
+
d = c;
|
|
106
|
+
c = b;
|
|
107
|
+
b = a;
|
|
108
|
+
a = (t1 + t2) | 0;
|
|
109
|
+
}
|
|
110
|
+
state.set([
|
|
111
|
+
state[0] + a,
|
|
112
|
+
state[1] + b,
|
|
113
|
+
state[2] + c,
|
|
114
|
+
state[3] + d,
|
|
115
|
+
state[4] + e,
|
|
116
|
+
state[5] + f,
|
|
117
|
+
state[6] + g,
|
|
118
|
+
state[7] + h
|
|
119
|
+
]);
|
|
120
|
+
}
|
|
121
|
+
const digest = new Uint8Array(32);
|
|
122
|
+
const out = new DataView(digest.buffer);
|
|
123
|
+
for (let word = 0; word < 8; word++)
|
|
124
|
+
out.setUint32(word * 4, state[word]);
|
|
125
|
+
return digest;
|
|
126
|
+
};
|
|
127
|
+
const concat = (left, right) => {
|
|
128
|
+
const joined = new Uint8Array(left.length + right.length);
|
|
129
|
+
joined.set(left);
|
|
130
|
+
joined.set(right, left.length);
|
|
131
|
+
return joined;
|
|
132
|
+
};
|
|
133
|
+
/** @internal */
|
|
134
|
+
export const hmacSha256 = (key, message) => {
|
|
135
|
+
const block = new Uint8Array(BLOCK_BYTES);
|
|
136
|
+
block.set(key.length > BLOCK_BYTES ? sha256(key) : key);
|
|
137
|
+
const inner = block.map((byte) => byte ^ 0x36);
|
|
138
|
+
const outer = block.map((byte) => byte ^ 0x5c);
|
|
139
|
+
return sha256(concat(outer, sha256(concat(inner, message))));
|
|
140
|
+
};
|
|
141
|
+
// Compare every byte regardless of the first difference to avoid leaking a matching prefix.
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const sameTag = (left, right) => {
|
|
144
|
+
if (left.length !== right.length)
|
|
145
|
+
return false;
|
|
146
|
+
let difference = 0;
|
|
147
|
+
for (let index = 0; index < left.length; index++)
|
|
148
|
+
difference |= left[index] ^ right[index];
|
|
149
|
+
return difference === 0;
|
|
150
|
+
};
|
package/dist/internal/image.d.ts
CHANGED
|
@@ -1,125 +1,22 @@
|
|
|
1
|
-
import * as ByteSize from "effect/ByteSize";
|
|
2
1
|
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import type * as Sink from "effect/Sink";
|
|
3
|
+
import * as Stream from "effect/Stream";
|
|
4
|
+
import type { FixtureEntry } from "../Fixture.js";
|
|
5
|
+
import { type Snapshot } from "../Snapshot.js";
|
|
6
|
+
import type { FsFailure, ImageFailure } from "../VfsError.js";
|
|
7
|
+
import type { PathInput } from "../VirtualFileSystem.js";
|
|
8
|
+
import type { Budget } from "./budget.js";
|
|
9
|
+
import { type VolumeState } from "./volumeState.js";
|
|
6
10
|
/** @internal */
|
|
7
|
-
export
|
|
11
|
+
export declare const make: (value: VolumeState) => Snapshot;
|
|
8
12
|
/** @internal */
|
|
9
|
-
export declare const
|
|
10
|
-
readonly directory: Schema.TaggedStruct<"directory", {
|
|
11
|
-
readonly id: Schema.String;
|
|
12
|
-
readonly metadata: Schema.Struct<{
|
|
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>;
|
|
20
|
-
}>;
|
|
21
|
-
readonly entries: Schema.$Array<Schema.Struct<{
|
|
22
|
-
readonly name: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
|
|
23
|
-
readonly target: Schema.String;
|
|
24
|
-
}>>;
|
|
25
|
-
}>;
|
|
26
|
-
readonly file: Schema.TaggedStruct<"file", {
|
|
27
|
-
readonly id: Schema.String;
|
|
28
|
-
readonly metadata: Schema.Struct<{
|
|
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>;
|
|
36
|
-
}>;
|
|
37
|
-
readonly data: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
|
|
38
|
-
}>;
|
|
39
|
-
readonly symlink: Schema.TaggedStruct<"symlink", {
|
|
40
|
-
readonly id: Schema.String;
|
|
41
|
-
readonly metadata: Schema.Struct<{
|
|
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>;
|
|
49
|
-
}>;
|
|
50
|
-
readonly target: Schema.brand<Schema.refine<string, Schema.String>, "CanonicalBase64">;
|
|
51
|
-
}>;
|
|
52
|
-
}>;
|
|
13
|
+
export declare const valueOf: (snapshot: Snapshot) => Effect.Effect<VolumeState, ImageFailure>;
|
|
53
14
|
/** @internal */
|
|
54
|
-
export
|
|
15
|
+
export declare const encodeSnapshotStream: (snapshot: Snapshot, budget?: Budget) => Stream.Stream<Uint8Array, ImageFailure>;
|
|
55
16
|
/** @internal */
|
|
56
|
-
export declare const
|
|
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
|
-
}>;
|
|
17
|
+
export declare const encodeSnapshot: (snapshot: Snapshot, budget?: Budget) => Effect.Effect<Uint8Array, ImageFailure>;
|
|
105
18
|
/** @internal */
|
|
106
|
-
export
|
|
19
|
+
export declare const decodeSnapshotSink: (budget: Budget) => Sink.Sink<Snapshot, Uint8Array, never, ImageFailure>;
|
|
107
20
|
/** @internal */
|
|
108
|
-
export declare const
|
|
109
|
-
/** @internal */
|
|
110
|
-
export declare const capture: (input: unknown, limits?: {
|
|
111
|
-
readonly maxEncodedBytes: ByteSize.ByteSize;
|
|
112
|
-
readonly maxRecords: number;
|
|
113
|
-
readonly maxEntries: number;
|
|
114
|
-
readonly maxDecodedBytes: ByteSize.ByteSize;
|
|
115
|
-
} | undefined, trusted?: any) => Effect.Effect<Snapshot, ImageError, never>;
|
|
116
|
-
/** @internal */
|
|
117
|
-
export declare const encodeSnapshot: (snapshot: Snapshot) => Effect.Effect<Uint8Array<ArrayBuffer>, ImageError, never>;
|
|
118
|
-
/** @internal */
|
|
119
|
-
export declare const decodeSnapshot: (input: Uint8Array<ArrayBufferLike>, limits: {
|
|
120
|
-
readonly maxEncodedBytes: ByteSize.ByteSize;
|
|
121
|
-
readonly maxRecords: number;
|
|
122
|
-
readonly maxEntries: number;
|
|
123
|
-
readonly maxDecodedBytes: ByteSize.ByteSize;
|
|
124
|
-
}) => Effect.Effect<Snapshot, ImageError, never>;
|
|
21
|
+
export declare const snapshotEntries: (snapshot: Snapshot, root: PathInput) => Stream.Stream<FixtureEntry, FsFailure | ImageFailure>;
|
|
125
22
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/internal/image.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/internal/image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAKvC,OAAO,KAAK,KAAK,IAAI,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,gBAAgB,CAAA;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAezC,OAAO,EAQL,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAA;AAgBzB,gBAAgB;AAChB,eAAO,MAAM,IAAI,UAAW,WAAW,KAAG,QAAkD,CAAA;AAE5F,gBAAgB;AAChB,eAAO,MAAM,OAAO,aAAc,QAAQ,KAAG,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,YAAY,CAOhF,CAAA;AAOJ,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,aACrB,QAAQ,WACT,MAAM,KACd,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,CAapC,CAAA;AAEL,gBAAgB;AAChB,eAAO,MAAM,cAAc,aAAc,QAAQ,WAAW,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,YAAY,CACpD,CAAA;AAEvD,gBAAgB;AAChB,eAAO,MAAM,kBAAkB,WAAY,MAAM,KAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,CAYtG,CAAA;AA0GD,gBAAgB;AAChB,eAAO,MAAM,eAAe,aAChB,QAAQ,QACZ,SAAS,KACd,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,GAAG,YAAY,CAOlD,CAAA"}
|