@valbuild/shared 0.120.0 → 0.122.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/CHANGELOG.md +184 -0
- package/dist/declarations/src/internal/ApiRoutes.d.ts +485 -43
- package/dist/declarations/src/internal/index.d.ts +3 -0
- package/dist/declarations/src/internal/newestCommitSha.d.ts +20 -0
- package/dist/declarations/src/internal/schema/compatibility.d.ts +62 -0
- package/dist/declarations/src/internal/zod/History.d.ts +257 -0
- package/dist/declarations/src/internal/zod/Patch.d.ts +7 -0
- package/dist/declarations/src/internal/zod/SerializedSchema.d.ts +2 -1
- package/internal/dist/valbuild-shared-internal.cjs.dev.js +1025 -60
- package/internal/dist/valbuild-shared-internal.cjs.prod.js +1025 -60
- package/internal/dist/valbuild-shared-internal.esm.js +1013 -61
- package/package.json +2 -2
|
@@ -3,10 +3,13 @@ export * from "./server/types.js";
|
|
|
3
3
|
export * from "./ValClient.js";
|
|
4
4
|
export * from "./ValUrls.js";
|
|
5
5
|
export * from "./ApiRoutes.js";
|
|
6
|
+
export * from "./schema/compatibility.js";
|
|
7
|
+
export * from "./newestCommitSha.js";
|
|
6
8
|
export * from "./zod/Patch.js";
|
|
7
9
|
export * from "./sessionStorage.js";
|
|
8
10
|
export * from "./SharedValConfig.js";
|
|
9
11
|
export * from "./zod/ValCommit.js";
|
|
12
|
+
export * from "./zod/History.js";
|
|
10
13
|
export * from "./zod/ValDeployment.js";
|
|
11
14
|
export * from "./getSitemapTree.js";
|
|
12
15
|
export * from "./parseRoutePattern.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ValCommit } from "./zod/ValCommit.js";
|
|
2
|
+
/**
|
|
3
|
+
* The newest commit the client has been told about, or `null` if none.
|
|
4
|
+
*
|
|
5
|
+
* This is the **publish head**: unlike `baseSha`, which only moves once a
|
|
6
|
+
* deployment lands, it moves the instant somebody publishes. That makes it the
|
|
7
|
+
* one thing a client can carry to `/save` to say "this is the world I decided
|
|
8
|
+
* against" — and the only way the server can tell that somebody else has
|
|
9
|
+
* published since the review screen was read.
|
|
10
|
+
*
|
|
11
|
+
* In `shared` because both sides need the SAME answer: the client names a head
|
|
12
|
+
* and the server compares against one, so two implementations of "newest" is two
|
|
13
|
+
* ways to disagree about whether a publish is stale.
|
|
14
|
+
*
|
|
15
|
+
* By `createdAt` rather than by position, because the list's order is the
|
|
16
|
+
* content API's business and nothing here should depend on it. Ties keep the
|
|
17
|
+
* first seen, which is arbitrary and does not matter: two commits sharing a
|
|
18
|
+
* timestamp are equally "since", and either answer refuses the same publishes.
|
|
19
|
+
*/
|
|
20
|
+
export declare function newestCommitSha(commits: readonly ValCommit[] | undefined): string | null;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Json, SerializedSchema } from "@valbuild/core";
|
|
2
|
+
/**
|
|
3
|
+
* Can this value, taken from one schema, be written into another?
|
|
4
|
+
*
|
|
5
|
+
* The question restore asks, and it is NOT the question validation asks.
|
|
6
|
+
* Validation checks a value against the schema it belongs to. This compares two
|
|
7
|
+
* schemas — the one a value was stored under and the one it is being written
|
|
8
|
+
* into — because a restore moves a value across a schema change, and possibly
|
|
9
|
+
* across paths.
|
|
10
|
+
*
|
|
11
|
+
* Three answers, not two. `unknown` is where the comparison genuinely cannot
|
|
12
|
+
* decide, and it exists so that an editor is told "we are not sure" rather than
|
|
13
|
+
* being given a confident answer we made up. Treating unknown as compatible
|
|
14
|
+
* writes values that break; treating it as incompatible blocks restores that
|
|
15
|
+
* would have been fine.
|
|
16
|
+
*/
|
|
17
|
+
export type Compatibility = {
|
|
18
|
+
status: "compatible";
|
|
19
|
+
} | {
|
|
20
|
+
status: "incompatible";
|
|
21
|
+
reason: IncompatibleReason;
|
|
22
|
+
} | {
|
|
23
|
+
status: "unknown";
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
export type IncompatibleReason = {
|
|
27
|
+
kind: "type-changed";
|
|
28
|
+
from: string;
|
|
29
|
+
to: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "no-matching-variant";
|
|
32
|
+
variants: string[];
|
|
33
|
+
} | {
|
|
34
|
+
kind: "unknown-field";
|
|
35
|
+
keys: string[];
|
|
36
|
+
} | {
|
|
37
|
+
kind: "missing-required";
|
|
38
|
+
keys: string[];
|
|
39
|
+
} | {
|
|
40
|
+
kind: "not-optional";
|
|
41
|
+
} | {
|
|
42
|
+
kind: "literal-changed";
|
|
43
|
+
from: string;
|
|
44
|
+
to: string;
|
|
45
|
+
} | {
|
|
46
|
+
kind: "different-module";
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* A sentence an editor can act on, for the popup that explains a refusal.
|
|
52
|
+
*
|
|
53
|
+
* Kept beside the reasons rather than in the UI so that adding a reason without
|
|
54
|
+
* wording for it is a type error rather than a blank dialog.
|
|
55
|
+
*/
|
|
56
|
+
export declare function explainIncompatible(reason: IncompatibleReason): string;
|
|
57
|
+
export declare function checkCompatibility(from: {
|
|
58
|
+
schema: SerializedSchema;
|
|
59
|
+
value: Json;
|
|
60
|
+
}, to: {
|
|
61
|
+
schema: SerializedSchema;
|
|
62
|
+
}): Compatibility;
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* The wire shapes for reading history.
|
|
4
|
+
*
|
|
5
|
+
* Here rather than in `@valbuild/server` because both sides of `/api/val` need
|
|
6
|
+
* them: the server builds these and the Studio parses them, and a second
|
|
7
|
+
* hand-written copy in the client is how the two drift.
|
|
8
|
+
*
|
|
9
|
+
* `HistoryError` is a closed union of everything that can go wrong
|
|
10
|
+
* reconstructing a commit - see `packages/server/src/history/HistoryError.ts`
|
|
11
|
+
* for what each one means. It travels as data rather than as a message because
|
|
12
|
+
* the Studio decides what to OFFER from it: a schema mismatch means "cannot
|
|
13
|
+
* restore this field", a missing source means "cannot restore this module at
|
|
14
|
+
* all", and a rendered string cannot be told apart.
|
|
15
|
+
*/
|
|
16
|
+
export declare const HistoryError: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
|
+
kind: z.ZodLiteral<"commit-not-found">;
|
|
18
|
+
commitSha: z.ZodString;
|
|
19
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
20
|
+
kind: z.ZodLiteral<"archive-unreadable">;
|
|
21
|
+
commitSha: z.ZodString;
|
|
22
|
+
message: z.ZodString;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
kind: z.ZodLiteral<"source-unavailable">;
|
|
25
|
+
moduleFilePath: z.ZodString;
|
|
26
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
27
|
+
kind: z.ZodLiteral<"schema-unreadable">;
|
|
28
|
+
moduleFilePath: z.ZodString;
|
|
29
|
+
message: z.ZodString;
|
|
30
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
31
|
+
kind: z.ZodLiteral<"file-unavailable">;
|
|
32
|
+
gitPath: z.ZodString;
|
|
33
|
+
message: z.ZodString;
|
|
34
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
35
|
+
kind: z.ZodLiteral<"not-supported-in-fs-mode">;
|
|
36
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"transport">;
|
|
38
|
+
message: z.ZodString;
|
|
39
|
+
}, z.core.$strip>], "kind">;
|
|
40
|
+
export type HistoryError = z.infer<typeof HistoryError>;
|
|
41
|
+
export declare const HistoricalCommit: z.ZodObject<{
|
|
42
|
+
commitSha: z.ZodString;
|
|
43
|
+
parentCommitSha: z.ZodString;
|
|
44
|
+
clientCommitSha: z.ZodString;
|
|
45
|
+
branch: z.ZodString;
|
|
46
|
+
createdBranch: z.ZodNullable<z.ZodString>;
|
|
47
|
+
creator: z.ZodNullable<z.ZodString>;
|
|
48
|
+
message: z.ZodNullable<z.ZodString>;
|
|
49
|
+
createdAt: z.ZodString;
|
|
50
|
+
seqNum: z.ZodString;
|
|
51
|
+
patchCount: z.ZodNumber;
|
|
52
|
+
hasArchive: z.ZodBoolean;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type HistoricalCommit = z.infer<typeof HistoricalCommit>;
|
|
55
|
+
/**
|
|
56
|
+
* A binary file the commit touched - named, with a URL, and nothing fetched.
|
|
57
|
+
* Only an `<img src>` that mounts pays for the bytes.
|
|
58
|
+
*/
|
|
59
|
+
export declare const BinaryFileRef: z.ZodObject<{
|
|
60
|
+
gitPath: z.ZodString;
|
|
61
|
+
change: z.ZodUnion<readonly [z.ZodLiteral<"added">, z.ZodLiteral<"modified">, z.ZodLiteral<"deleted">]>;
|
|
62
|
+
remote: z.ZodBoolean;
|
|
63
|
+
url: z.ZodString;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
export type BinaryFileRef = z.infer<typeof BinaryFileRef>;
|
|
66
|
+
export declare const HistoricalModule: z.ZodObject<{
|
|
67
|
+
source: z.ZodNullable<z.ZodType<import("@valbuild/core/patch").JSONValue, unknown, z.core.$ZodTypeInternals<import("@valbuild/core/patch").JSONValue, unknown>>>;
|
|
68
|
+
schema: z.ZodNullable<z.ZodType<import("@valbuild/core").SerializedSchema, unknown, z.core.$ZodTypeInternals<import("@valbuild/core").SerializedSchema, unknown>>>;
|
|
69
|
+
patchIds: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
70
|
+
changedPaths: z.ZodArray<z.ZodString>;
|
|
71
|
+
failures: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"commit-not-found">;
|
|
73
|
+
commitSha: z.ZodString;
|
|
74
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
75
|
+
kind: z.ZodLiteral<"archive-unreadable">;
|
|
76
|
+
commitSha: z.ZodString;
|
|
77
|
+
message: z.ZodString;
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
kind: z.ZodLiteral<"source-unavailable">;
|
|
80
|
+
moduleFilePath: z.ZodString;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
kind: z.ZodLiteral<"schema-unreadable">;
|
|
83
|
+
moduleFilePath: z.ZodString;
|
|
84
|
+
message: z.ZodString;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
kind: z.ZodLiteral<"file-unavailable">;
|
|
87
|
+
gitPath: z.ZodString;
|
|
88
|
+
message: z.ZodString;
|
|
89
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<"not-supported-in-fs-mode">;
|
|
91
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
92
|
+
kind: z.ZodLiteral<"transport">;
|
|
93
|
+
message: z.ZodString;
|
|
94
|
+
}, z.core.$strip>], "kind">>;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
export type HistoricalModule = z.infer<typeof HistoricalModule>;
|
|
97
|
+
export declare const HistoricalPatchSet: z.ZodObject<{
|
|
98
|
+
commit: z.ZodObject<{
|
|
99
|
+
commitSha: z.ZodString;
|
|
100
|
+
parentCommitSha: z.ZodString;
|
|
101
|
+
clientCommitSha: z.ZodString;
|
|
102
|
+
branch: z.ZodString;
|
|
103
|
+
createdBranch: z.ZodNullable<z.ZodString>;
|
|
104
|
+
creator: z.ZodNullable<z.ZodString>;
|
|
105
|
+
message: z.ZodNullable<z.ZodString>;
|
|
106
|
+
createdAt: z.ZodString;
|
|
107
|
+
seqNum: z.ZodString;
|
|
108
|
+
patchCount: z.ZodNumber;
|
|
109
|
+
hasArchive: z.ZodBoolean;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
modules: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
112
|
+
source: z.ZodNullable<z.ZodType<import("@valbuild/core/patch").JSONValue, unknown, z.core.$ZodTypeInternals<import("@valbuild/core/patch").JSONValue, unknown>>>;
|
|
113
|
+
schema: z.ZodNullable<z.ZodType<import("@valbuild/core").SerializedSchema, unknown, z.core.$ZodTypeInternals<import("@valbuild/core").SerializedSchema, unknown>>>;
|
|
114
|
+
patchIds: z.ZodArray<z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>>;
|
|
115
|
+
changedPaths: z.ZodArray<z.ZodString>;
|
|
116
|
+
failures: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
117
|
+
kind: z.ZodLiteral<"commit-not-found">;
|
|
118
|
+
commitSha: z.ZodString;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
kind: z.ZodLiteral<"archive-unreadable">;
|
|
121
|
+
commitSha: z.ZodString;
|
|
122
|
+
message: z.ZodString;
|
|
123
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
|
+
kind: z.ZodLiteral<"source-unavailable">;
|
|
125
|
+
moduleFilePath: z.ZodString;
|
|
126
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
127
|
+
kind: z.ZodLiteral<"schema-unreadable">;
|
|
128
|
+
moduleFilePath: z.ZodString;
|
|
129
|
+
message: z.ZodString;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"file-unavailable">;
|
|
132
|
+
gitPath: z.ZodString;
|
|
133
|
+
message: z.ZodString;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
kind: z.ZodLiteral<"not-supported-in-fs-mode">;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
kind: z.ZodLiteral<"transport">;
|
|
138
|
+
message: z.ZodString;
|
|
139
|
+
}, z.core.$strip>], "kind">>;
|
|
140
|
+
}, z.core.$strip>>;
|
|
141
|
+
patches: z.ZodArray<z.ZodObject<{
|
|
142
|
+
patchId: z.ZodString & z.ZodType<import("@valbuild/core").PatchId, string, z.core.$ZodTypeInternals<import("@valbuild/core").PatchId, string>>;
|
|
143
|
+
moduleFilePath: z.ZodString;
|
|
144
|
+
patch: z.ZodUnknown;
|
|
145
|
+
authorId: z.ZodNullable<z.ZodString>;
|
|
146
|
+
createdAt: z.ZodString;
|
|
147
|
+
baseSha: z.ZodString;
|
|
148
|
+
coreVersion: z.ZodString;
|
|
149
|
+
}, z.core.$strip>>;
|
|
150
|
+
jsonEntries: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
151
|
+
binaryFiles: z.ZodArray<z.ZodObject<{
|
|
152
|
+
gitPath: z.ZodString;
|
|
153
|
+
change: z.ZodUnion<readonly [z.ZodLiteral<"added">, z.ZodLiteral<"modified">, z.ZodLiteral<"deleted">]>;
|
|
154
|
+
remote: z.ZodBoolean;
|
|
155
|
+
url: z.ZodString;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
warnings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
158
|
+
kind: z.ZodLiteral<"commit-not-found">;
|
|
159
|
+
commitSha: z.ZodString;
|
|
160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
+
kind: z.ZodLiteral<"archive-unreadable">;
|
|
162
|
+
commitSha: z.ZodString;
|
|
163
|
+
message: z.ZodString;
|
|
164
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
165
|
+
kind: z.ZodLiteral<"source-unavailable">;
|
|
166
|
+
moduleFilePath: z.ZodString;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
kind: z.ZodLiteral<"schema-unreadable">;
|
|
169
|
+
moduleFilePath: z.ZodString;
|
|
170
|
+
message: z.ZodString;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
kind: z.ZodLiteral<"file-unavailable">;
|
|
173
|
+
gitPath: z.ZodString;
|
|
174
|
+
message: z.ZodString;
|
|
175
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
176
|
+
kind: z.ZodLiteral<"not-supported-in-fs-mode">;
|
|
177
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
178
|
+
kind: z.ZodLiteral<"transport">;
|
|
179
|
+
message: z.ZodString;
|
|
180
|
+
}, z.core.$strip>], "kind">>;
|
|
181
|
+
}, z.core.$strip>;
|
|
182
|
+
export type HistoricalPatchSet = z.infer<typeof HistoricalPatchSet>;
|
|
183
|
+
/**
|
|
184
|
+
* Whether the historical value can be written back as the project stands.
|
|
185
|
+
*
|
|
186
|
+
* Computed in the Studio, not on the server: the verdict depends on the current
|
|
187
|
+
* source and the current schema, both of which the client already holds, and it
|
|
188
|
+
* runs against the same worker-thread validator that validates ordinary edits.
|
|
189
|
+
* The types stay here because they are what a restore preview hands to the UI.
|
|
190
|
+
*
|
|
191
|
+
* `blocked` carries its reasons so a refusal can name the field and say why,
|
|
192
|
+
* rather than being an unexplained disabled button.
|
|
193
|
+
*/
|
|
194
|
+
export declare const RestoreVerdict: z.ZodUnion<readonly [z.ZodObject<{
|
|
195
|
+
status: z.ZodLiteral<"restorable">;
|
|
196
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
197
|
+
status: z.ZodLiteral<"blocked">;
|
|
198
|
+
reasons: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
199
|
+
kind: z.ZodLiteral<"commit-not-found">;
|
|
200
|
+
commitSha: z.ZodString;
|
|
201
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
202
|
+
kind: z.ZodLiteral<"archive-unreadable">;
|
|
203
|
+
commitSha: z.ZodString;
|
|
204
|
+
message: z.ZodString;
|
|
205
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
206
|
+
kind: z.ZodLiteral<"source-unavailable">;
|
|
207
|
+
moduleFilePath: z.ZodString;
|
|
208
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
209
|
+
kind: z.ZodLiteral<"schema-unreadable">;
|
|
210
|
+
moduleFilePath: z.ZodString;
|
|
211
|
+
message: z.ZodString;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
+
kind: z.ZodLiteral<"file-unavailable">;
|
|
214
|
+
gitPath: z.ZodString;
|
|
215
|
+
message: z.ZodString;
|
|
216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
217
|
+
kind: z.ZodLiteral<"not-supported-in-fs-mode">;
|
|
218
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
219
|
+
kind: z.ZodLiteral<"transport">;
|
|
220
|
+
message: z.ZodString;
|
|
221
|
+
}, z.core.$strip>], "kind">>;
|
|
222
|
+
}, z.core.$strip>]>;
|
|
223
|
+
export type RestoreVerdict = z.infer<typeof RestoreVerdict>;
|
|
224
|
+
export declare const ModuleComparison: z.ZodObject<{
|
|
225
|
+
current: z.ZodNullable<z.ZodUnknown>;
|
|
226
|
+
changedVsCurrent: z.ZodArray<z.ZodString>;
|
|
227
|
+
verdict: z.ZodUnion<readonly [z.ZodObject<{
|
|
228
|
+
status: z.ZodLiteral<"restorable">;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
status: z.ZodLiteral<"blocked">;
|
|
231
|
+
reasons: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
232
|
+
kind: z.ZodLiteral<"commit-not-found">;
|
|
233
|
+
commitSha: z.ZodString;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
kind: z.ZodLiteral<"archive-unreadable">;
|
|
236
|
+
commitSha: z.ZodString;
|
|
237
|
+
message: z.ZodString;
|
|
238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
239
|
+
kind: z.ZodLiteral<"source-unavailable">;
|
|
240
|
+
moduleFilePath: z.ZodString;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
kind: z.ZodLiteral<"schema-unreadable">;
|
|
243
|
+
moduleFilePath: z.ZodString;
|
|
244
|
+
message: z.ZodString;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
246
|
+
kind: z.ZodLiteral<"file-unavailable">;
|
|
247
|
+
gitPath: z.ZodString;
|
|
248
|
+
message: z.ZodString;
|
|
249
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
250
|
+
kind: z.ZodLiteral<"not-supported-in-fs-mode">;
|
|
251
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
252
|
+
kind: z.ZodLiteral<"transport">;
|
|
253
|
+
message: z.ZodString;
|
|
254
|
+
}, z.core.$strip>], "kind">>;
|
|
255
|
+
}, z.core.$strip>]>;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
export type ModuleComparison = z.infer<typeof ModuleComparison>;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { JSONValue as JSONValueT, PatchJSON as PatchJSONT, PatchBlock as PatchBlockT, ParentRef as ParentRefT } from "@valbuild/core/patch";
|
|
2
2
|
import type { PatchId as PatchIdT } from "@valbuild/core";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
+
/**
|
|
5
|
+
* JSON, recursively — the shape of a Source over the wire.
|
|
6
|
+
*
|
|
7
|
+
* Exported because history reads stored Sources back and needs the same
|
|
8
|
+
* definition; a second copy is a second thing to keep in step.
|
|
9
|
+
*/
|
|
10
|
+
export declare const JSONValue: z.ZodType<JSONValueT>;
|
|
4
11
|
export declare const PatchJSON: z.ZodType<PatchJSONT>;
|
|
5
12
|
export type PatchJSON = PatchJSONT;
|
|
6
13
|
export declare const Patch: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type SerializedSchema as SerializedSchemaT, type SerializedStringSchema as SerializedStringSchemaT, type SerializedLiteralSchema as SerializedLiteralSchemaT, type SerializedBooleanSchema as SerializedBooleanSchemaT, type SerializedNumberSchema as SerializedNumberSchemaT, type SerializedObjectSchema as SerializedObjectSchemaT, type SerializedArraySchema as SerializedArraySchemaT, type SerializedUnionSchema as SerializedUnionSchemaT, type SerializedRichTextSchema as SerializedRichTextSchemaT, type SerializedRichTextOptions as SerializedRichTextOptionsT, type SerializedRecordSchema as SerializedRecordSchemaT, type SerializedKeyOfSchema as SerializedKeyOfSchemaT, type SerializedRouteSchema as SerializedRouteSchemaT, type SerializedFileSchema as SerializedFileSchemaT, type SerializedDateSchema as SerializedDateSchemaT, type SerializedDateTimeSchema as SerializedDateTimeSchemaT, type SerializedColorSchema as SerializedColorSchemaT, type SerializedCodeSchema as SerializedCodeSchemaT, type SerializedImageSchema as SerializedImageSchemaT } from "@valbuild/core";
|
|
2
|
+
import { type SerializedSchema as SerializedSchemaT, type SerializedStringSchema as SerializedStringSchemaT, type SerializedLiteralSchema as SerializedLiteralSchemaT, type SerializedBooleanSchema as SerializedBooleanSchemaT, type SerializedNumberSchema as SerializedNumberSchemaT, type SerializedObjectSchema as SerializedObjectSchemaT, type SerializedArraySchema as SerializedArraySchemaT, type SerializedUnionSchema as SerializedUnionSchemaT, type SerializedRichTextSchema as SerializedRichTextSchemaT, type SerializedRichTextOptions as SerializedRichTextOptionsT, type SerializedRecordSchema as SerializedRecordSchemaT, type SerializedKeyOfSchema as SerializedKeyOfSchemaT, type SerializedRouteSchema as SerializedRouteSchemaT, type SerializedFileSchema as SerializedFileSchemaT, type SerializedDateSchema as SerializedDateSchemaT, type SerializedDateTimeSchema as SerializedDateTimeSchemaT, type SerializedColorSchema as SerializedColorSchemaT, type SerializedCodeSchema as SerializedCodeSchemaT, type SerializedImageSchema as SerializedImageSchemaT, type SerializedSettingsSchema as SerializedSettingsSchemaT } from "@valbuild/core";
|
|
3
3
|
export declare const SerializedStringSchema: z.ZodType<SerializedStringSchemaT>;
|
|
4
4
|
export declare const SerializedLiteralSchema: z.ZodType<SerializedLiteralSchemaT>;
|
|
5
5
|
export declare const SerializedBooleanSchema: z.ZodType<SerializedBooleanSchemaT>;
|
|
@@ -73,4 +73,5 @@ export declare const CodeOptions: z.ZodObject<{
|
|
|
73
73
|
}, z.core.$strip>;
|
|
74
74
|
export declare const SerializedCodeSchema: z.ZodType<SerializedCodeSchemaT>;
|
|
75
75
|
export declare const SerializedRouteSchema: z.ZodType<SerializedRouteSchemaT>;
|
|
76
|
+
export declare const SerializedSettingsSchema: z.ZodType<SerializedSettingsSchemaT>;
|
|
76
77
|
export declare const SerializedSchema: z.ZodType<SerializedSchemaT>;
|