@effect-vfs/core 0.9.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.
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 +6 -1
  8. package/dist/LiveVolume.d.ts.map +1 -1
  9. package/dist/LiveVolume.js +8 -1
  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 +5 -2
  20. package/dist/Testing.d.ts.map +1 -1
  21. package/dist/Testing.js +2 -1
  22. package/dist/VfsError.d.ts +1 -1
  23. package/dist/VfsError.d.ts.map +1 -1
  24. package/dist/VirtualFileSystem.d.ts +126 -43
  25. package/dist/VirtualFileSystem.d.ts.map +1 -1
  26. package/dist/VirtualFileSystem.js +25 -21
  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 +2 -1
  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 +7 -4
  56. package/dist/internal/merkle.d.ts.map +1 -1
  57. package/dist/internal/merkle.js +6 -4
  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 +11 -7
  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 +20 -49
  71. package/dist/internal/virtualFileSystem.d.ts.map +1 -1
  72. package/dist/internal/virtualFileSystem.js +75 -2082
  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
@@ -1,56 +0,0 @@
1
- import * as ByteSize from "effect/ByteSize";
2
- import * as Effect from "effect/Effect";
3
- import * as Result from "effect/Result";
4
- import type { BytePath } from "../BytePath.js";
5
- import type { FsFailure } from "../VfsError.js";
6
- import type { PathInput } from "../VirtualFileSystem.js";
7
- /** @internal */
8
- export declare const SLASH_HEX = "2f";
9
- /** @internal */
10
- export declare const DOT_HEX = "2e";
11
- /** @internal */
12
- export declare const DOT_DOT_HEX = "2e2e";
13
- /** @internal */
14
- export declare const SLASH_BYTE = 47;
15
- /** @internal */
16
- export declare const NUL_BYTE = 0;
17
- /** @internal */
18
- export declare const MAX_SYMLINK_TRAVERSALS = 40;
19
- /** @internal */
20
- export declare const MAX_NAME_BYTES = 255;
21
- /** @internal */
22
- export declare const isNameBytes: (name: Uint8Array) => boolean;
23
- /** @internal */
24
- export declare const ROOT_PATH: Uint8Array<ArrayBuffer>;
25
- /** @internal */
26
- export declare const joinPath: (prefix: Uint8Array, name: Uint8Array) => Uint8Array;
27
- /** @internal */
28
- export declare const isDotComponent: (name: string | undefined) => name is undefined | typeof DOT_HEX | typeof DOT_DOT_HEX;
29
- /** @internal */
30
- export declare const ownedPath: (bytes: Uint8Array) => BytePath;
31
- /** @internal */
32
- export declare const strictString: (bytes: Uint8Array, operation: string) => Effect.Effect<string, FsFailure, never>;
33
- /** @internal */
34
- export declare const nameBytes: (name: string) => Uint8Array;
35
- /** @internal */
36
- export declare const isAttachedBytes: (bytes: Uint8Array) => boolean;
37
- /** @internal */
38
- export declare const pathFromBytes: (bytes: Uint8Array<ArrayBufferLike>) => Effect.Effect<BytePath, FsFailure, never>;
39
- /** @internal */
40
- export declare const pathToBytes: (path: BytePath) => Effect.Effect<Uint8Array<ArrayBuffer>, FsFailure, never>;
41
- /** @internal */
42
- export interface PreparedPath {
43
- readonly input: PathInput;
44
- readonly absolute: boolean;
45
- readonly trailingSlash: boolean;
46
- readonly bytes: Uint8Array;
47
- readonly suffixes: ReadonlyArray<Uint8Array>;
48
- readonly components: ReadonlyArray<string>;
49
- }
50
- /** @internal */
51
- export declare const isWellFormed: (value: string) => boolean;
52
- /** @internal */
53
- export declare const inputBytes: (input: PathInput) => Result.Result<Uint8Array, "InvalidPathEncoding" | "InvalidArgument">;
54
- /** @internal */
55
- export declare const preparePath: (input: PathInput, operation: string, maxPathBytes: ByteSize.ByteSize | undefined) => Result.Result<PreparedPath, FsFailure>;
56
- //# sourceMappingURL=path.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"path.d.ts","sourceRoot":"","sources":["../../src/internal/path.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QA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,MAAM,eAAe,UAAW,UAAU,KAAG,OAC2C,CAAA;AAE/F,gBAAgB;AAChB,eAAO,MAAM,aAAa,mFASxB,CAAA;AAEF,gBAAgB;AAChB,eAAO,MAAM,WAAW,8EAMtB,CAAA;AAEF,gBAAgB;AAChB,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IAC5C,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;CAC3C;AAGD,gBAAgB;AAChB,eAAO,MAAM,YAAY,UAAW,MAAM,KAAG,OAY5C,CAAA;AAID,gBAAgB;AAChB,eAAO,MAAM,UAAU,UAAW,SAAS,KAAG,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,qBAAqB,GAAG,iBAAiB,CAG5B,CAAA;AAErF,gBAAgB;AAChB,eAAO,MAAM,WAAW,UACf,SAAS,aACL,MAAM,gBACH,QAAQ,CAAC,QAAQ,GAAG,SAAS,KAC1C,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAgDvC,CAAA"}
@@ -1,141 +0,0 @@
1
- import * as ByteSize from "effect/ByteSize";
2
- import * as Effect from "effect/Effect";
3
- import * as Hex from "effect/encoding/Hex";
4
- import * as Predicate from "effect/Predicate";
5
- import * as Result from "effect/Result";
6
- import { getBytes as getBytePathBytes, make as makeBytePath } from "./bytePath.js";
7
- import { fsFailure } from "./errors.js";
8
- /** @internal */
9
- export const SLASH_HEX = "2f";
10
- /** @internal */
11
- export const DOT_HEX = "2e";
12
- /** @internal */
13
- export const DOT_DOT_HEX = "2e2e";
14
- /** @internal */
15
- export const SLASH_BYTE = 47;
16
- const DOT_BYTE = 46;
17
- /** @internal */
18
- export const NUL_BYTE = 0;
19
- /** @internal */
20
- export const MAX_SYMLINK_TRAVERSALS = 40;
21
- /** @internal */
22
- export const MAX_NAME_BYTES = 255;
23
- /** @internal */
24
- export const isNameBytes = (name) => name.length >= 1 && name.length <= MAX_NAME_BYTES && !name.includes(NUL_BYTE) && !name.includes(SLASH_BYTE) &&
25
- !(name.length === 1 && name[0] === DOT_BYTE) && !(name.length === 2 && name[0] === DOT_BYTE && name[1] === DOT_BYTE);
26
- /** @internal */
27
- export const ROOT_PATH = new Uint8Array([SLASH_BYTE]);
28
- /** @internal */
29
- export const joinPath = (prefix, name) => {
30
- const separator = prefix.length === 0 || prefix[prefix.length - 1] === SLASH_BYTE ? 0 : 1;
31
- const joined = new Uint8Array(prefix.length + separator + name.length);
32
- joined.set(prefix);
33
- if (separator === 1)
34
- joined[prefix.length] = SLASH_BYTE;
35
- joined.set(name, prefix.length + separator);
36
- return joined;
37
- };
38
- // A missing final component follows the same rejection path as "." and ".."; callers choose the POSIX error code.
39
- /** @internal */
40
- export const isDotComponent = (name) => name === undefined || name === DOT_HEX || name === DOT_DOT_HEX;
41
- /** @internal */
42
- export const ownedPath = (bytes) => makeBytePath(bytes);
43
- /** @internal */
44
- export const strictString = (bytes, operation) => Effect.try({
45
- try: () => new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(bytes),
46
- catch: () => fsFailure("UnrepresentableName", operation)
47
- });
48
- /** @internal */
49
- export const nameBytes = (name) => Result.getOrThrow(Hex.decode(name));
50
- // Constructing a view detects detached buffers, including empty ones.
51
- const attachedBuffer = (bytes) => {
52
- try {
53
- const probe = new Uint8Array(bytes.buffer, bytes.byteOffset, 0);
54
- return probe.byteLength === 0;
55
- }
56
- catch (error) {
57
- if (error instanceof TypeError)
58
- return false;
59
- throw error;
60
- }
61
- };
62
- // Reject shared or detached buffers before copying; Buffer subclasses remain valid.
63
- /** @internal */
64
- export const isAttachedBytes = (bytes) => Predicate.isUint8Array(bytes) && bytes.buffer instanceof ArrayBuffer && attachedBuffer(bytes);
65
- /** @internal */
66
- export const pathFromBytes = Effect.fnUntraced(function* (bytes) {
67
- if (!isAttachedBytes(bytes))
68
- return yield* fsFailure("InvalidArgument", "pathFromBytes");
69
- const owned = new Uint8Array(bytes);
70
- if (owned.length === 0 || owned.includes(0)) {
71
- return yield* fsFailure("InvalidArgument", "pathFromBytes");
72
- }
73
- return makeBytePath(owned);
74
- });
75
- /** @internal */
76
- export const pathToBytes = Effect.fnUntraced(function* (path) {
77
- const bytes = getBytePathBytes(path);
78
- if (bytes === undefined)
79
- return yield* fsFailure("InvalidArgument", "pathToBytes");
80
- return new Uint8Array(bytes);
81
- });
82
- // String.prototype.isWellFormed requires ES2024; this package targets ES2023.
83
- /** @internal */
84
- export const isWellFormed = (value) => {
85
- for (let index = 0; index < value.length; index++) {
86
- const code = value.charCodeAt(index);
87
- if (code >= 0xd800 && code <= 0xdbff) {
88
- const next = value.charCodeAt(++index);
89
- if (!(next >= 0xdc00 && next <= 0xdfff))
90
- return false;
91
- }
92
- else if (code >= 0xdc00 && code <= 0xdfff)
93
- return false;
94
- }
95
- return true;
96
- };
97
- const UTF8_ENCODER = new TextEncoder();
98
- /** @internal */
99
- export const inputBytes = (input) => Predicate.isString(input)
100
- ? isWellFormed(input) ? Result.succeed(UTF8_ENCODER.encode(input)) : Result.fail("InvalidPathEncoding")
101
- : Result.fromNullishOr(getBytePathBytes(input), () => "InvalidArgument");
102
- /** @internal */
103
- export const preparePath = (input, operation, maxPathBytes) => {
104
- const encoded = inputBytes(input);
105
- if (Result.isFailure(encoded)) {
106
- return Result.fail(encoded.failure === "InvalidPathEncoding"
107
- ? fsFailure("InvalidPathEncoding", operation, { path: input })
108
- : fsFailure("InvalidArgument", operation));
109
- }
110
- const bytes = encoded.success;
111
- if (bytes.length === 0)
112
- return Result.fail(fsFailure("NotFound", operation, { path: input }));
113
- if (bytes.includes(0))
114
- return Result.fail(fsFailure("InvalidArgument", operation, { path: input }));
115
- if (maxPathBytes !== undefined && ByteSize.isGreaterThan(ByteSize.bytes(bytes.length), maxPathBytes)) {
116
- return Result.fail(fsFailure("PathTooLong", operation, { path: input }));
117
- }
118
- const components = [];
119
- const suffixes = [];
120
- let start = 0;
121
- for (let index = 0; index <= bytes.length; index++) {
122
- if (index !== bytes.length && bytes[index] !== SLASH_BYTE)
123
- continue;
124
- if (index > start) {
125
- if (index - start > MAX_NAME_BYTES) {
126
- return Result.fail(fsFailure("PathTooLong", operation, { path: input }));
127
- }
128
- components.push(Hex.encode(bytes.subarray(start, index)));
129
- suffixes.push(bytes.subarray(index));
130
- }
131
- start = index + 1;
132
- }
133
- return Result.succeed({
134
- input,
135
- absolute: bytes[0] === SLASH_BYTE,
136
- trailingSlash: bytes.at(-1) === SLASH_BYTE,
137
- bytes,
138
- suffixes,
139
- components
140
- });
141
- };
@@ -1,139 +0,0 @@
1
- import * as ByteSize from "effect/ByteSize";
2
- import * as Effect from "effect/Effect";
3
- import * as Result from "effect/Result";
4
- import type { Identity } from "../Caller.js";
5
- import { type EntryInput, type NameInput, type Target } from "../Target.js";
6
- import type { FsFailure } from "../VfsError.js";
7
- import type { DirectoryHandle, FileHandle, PathInput } from "../VirtualFileSystem.js";
8
- import { type Confinement } from "./confinement.js";
9
- import type { OpContext } from "./errors.js";
10
- import { type PreparedPath } from "./path.js";
11
- import * as TokenRegistry from "./tokenRegistry.js";
12
- import { type Directory, type Ino, type Node } from "./volumeState.js";
13
- /** @internal */
14
- export type PreparedEntry = {
15
- readonly kind: "path";
16
- readonly path: PreparedPath;
17
- readonly base: DirectoryHandle | undefined;
18
- } | {
19
- readonly kind: "entry";
20
- readonly directory: Target;
21
- readonly name: string;
22
- };
23
- /** @internal */
24
- export interface NodeMode<R = never> {
25
- readonly kind: "Node";
26
- readonly followFinalSymlink?: boolean;
27
- readonly final?: boolean;
28
- readonly createMissing?: (parent: Directory, name: string, final: boolean) => Effect.Effect<Directory, FsFailure, R>;
29
- }
30
- /** @internal */
31
- export interface ParentMode {
32
- readonly kind: "Parent";
33
- }
34
- /** @internal */
35
- export interface OrCreateMode<R = never> {
36
- readonly kind: "OrCreate";
37
- readonly create: "never" | "ifMissing" | "exclusive";
38
- readonly finalSymlink: "follow" | "preserve";
39
- readonly entryExclusive?: "afterSymlink";
40
- readonly beforeFollow?: (parent: Directory, child: Node | undefined) => Effect.Effect<void, FsFailure, R>;
41
- }
42
- /** @internal */
43
- export type NodeResult = {
44
- readonly kind: "node";
45
- readonly node: Node;
46
- readonly op: OpContext;
47
- } | {
48
- readonly kind: "entry";
49
- readonly node: Node;
50
- readonly parent: Directory;
51
- readonly name: string;
52
- readonly op: OpContext;
53
- };
54
- /** @internal */
55
- export interface ParentResult {
56
- readonly kind: "parent";
57
- readonly parent: Ino;
58
- readonly name: string | undefined;
59
- readonly trailingSlash: boolean;
60
- readonly addressing: "path" | "entry";
61
- readonly op: OpContext;
62
- }
63
- interface CreateEntry {
64
- readonly parent: Directory;
65
- readonly name: string;
66
- readonly trailingSlash: boolean;
67
- readonly addressing: "path" | "entry";
68
- readonly op: OpContext;
69
- readonly origin: {
70
- readonly parent: Directory;
71
- readonly name: string;
72
- };
73
- }
74
- /** @internal */
75
- export type CreateResult = (CreateEntry & {
76
- readonly kind: "existing";
77
- readonly node: Node;
78
- }) | (CreateEntry & {
79
- readonly kind: "missing";
80
- });
81
- /** @internal */
82
- export declare const inGroup: (identity: Identity, gid: number) => boolean;
83
- /** @internal */
84
- export declare const permitted: (node: Node, identity: Identity) => number;
85
- /** @internal */
86
- export declare const authorize: (node: Node, identity: Identity, bits: number, op: OpContext) => Effect.Effect<void, never, never> | Effect.Effect<never, FsFailure, never>;
87
- /** @internal */
88
- export declare const entryName: (input: NameInput, op: OpContext) => Result.Result<string, FsFailure>;
89
- /** @internal */
90
- export declare const make: ({ caller, get, identity, maxPathBytes, registry, confinement, additional, authorityView }: {
91
- readonly additional?: ReadonlyArray<Confinement> | undefined;
92
- readonly authorityView: Effect.Effect<(ino: Ino) => Node | undefined>;
93
- readonly confinement?: Confinement | undefined;
94
- readonly caller: TokenRegistry.DirectoryReference;
95
- readonly get: (ino: Ino) => Effect.Effect<Node | undefined>;
96
- readonly identity: Identity;
97
- readonly maxPathBytes: ByteSize.ByteSize | undefined;
98
- readonly registry: TokenRegistry.TokenRegistry;
99
- }) => {
100
- prepare: (input: PathInput, op: OpContext) => Result.Result<PreparedPath, FsFailure>;
101
- prepareEntry: (input: EntryInput, op: OpContext) => Result.Result<PreparedEntry, FsFailure>;
102
- resolve: {
103
- <R = never>(target: Target, mode: NodeMode<R>, op: OpContext): Effect.Effect<NodeResult, FsFailure, R>;
104
- (prepared: PreparedEntry, mode: ParentMode, op: OpContext): Effect.Effect<ParentResult, FsFailure>;
105
- <R = never>(prepared: PreparedEntry, mode: OrCreateMode<R>, op: OpContext): Effect.Effect<CreateResult, FsFailure, R>;
106
- };
107
- directory: (target: {
108
- readonly _tag: "Handle";
109
- readonly handle: FileHandle | DirectoryHandle;
110
- } | {
111
- readonly _tag: "Path";
112
- readonly path: PathInput;
113
- readonly relativeTo?: DirectoryHandle;
114
- readonly followFinalSymlink?: boolean;
115
- } | {
116
- readonly _tag: "Reference";
117
- readonly reference: import("../VirtualFileSystem.js").ObjectReference;
118
- }, op: OpContext) => Effect.Effect<{
119
- node: Directory;
120
- op: OpContext;
121
- }, FsFailure, never>;
122
- entryDirectory: (target: {
123
- readonly _tag: "Handle";
124
- readonly handle: FileHandle | DirectoryHandle;
125
- } | {
126
- readonly _tag: "Path";
127
- readonly path: PathInput;
128
- readonly relativeTo?: DirectoryHandle;
129
- readonly followFinalSymlink?: boolean;
130
- } | {
131
- readonly _tag: "Reference";
132
- readonly reference: import("../VirtualFileSystem.js").ObjectReference;
133
- }, op: OpContext) => Effect.Effect<{
134
- node: Directory;
135
- op: OpContext;
136
- }, FsFailure, never>;
137
- };
138
- export {};
139
- //# sourceMappingURL=resolution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolution.d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