@valbuild/shared 0.140.2 → 0.142.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 +74 -0
- package/dist/declarations/src/internal/ApiRoutes.d.ts +196 -120
- package/dist/declarations/src/internal/server/types.d.ts +3 -3
- package/dist/declarations/src/internal/zod/History.d.ts +7 -7
- package/dist/declarations/src/internal/zod/Patch.d.ts +0 -1
- package/dist/declarations/src/internal/zod/SerializedSchema.d.ts +18 -21
- package/internal/dist/valbuild-shared-internal.cjs.dev.js +188 -16
- package/internal/dist/valbuild-shared-internal.cjs.prod.js +188 -16
- package/internal/dist/valbuild-shared-internal.esm.js +186 -17
- package/package.json +2 -2
|
@@ -1158,13 +1158,16 @@ var SerializedRecordSchema = z.lazy(function () {
|
|
|
1158
1158
|
type: z.literal("record"),
|
|
1159
1159
|
item: SerializedSchema,
|
|
1160
1160
|
opt: z["boolean"](),
|
|
1161
|
-
// Optional gallery marker for files/images
|
|
1162
|
-
mediaType: z.union([z.literal("files"), z.literal("images")]).optional(),
|
|
1161
|
+
// Optional gallery marker for files/images/videos
|
|
1162
|
+
mediaType: z.union([z.literal("files"), z.literal("images"), z.literal("videos")]).optional(),
|
|
1163
1163
|
// Optional legacy gallery metadata
|
|
1164
1164
|
accept: z.string().optional(),
|
|
1165
1165
|
dir: z.string().optional(),
|
|
1166
1166
|
remote: z["boolean"]().optional(),
|
|
1167
1167
|
encode: ImageEncodeOption.optional(),
|
|
1168
|
+
// A videoset's: see `VideoStreamOption` below for why it is spelled
|
|
1169
|
+
// out rather than passed through.
|
|
1170
|
+
stream: VideoStreamOption.optional(),
|
|
1168
1171
|
alt: SerializedSchema.optional(),
|
|
1169
1172
|
moduleMetadata: z.record(z.string(), z.record(z.string(), z.any())).optional()
|
|
1170
1173
|
})).passthrough());
|
|
@@ -1198,6 +1201,29 @@ var SerializedFileSchema = z.object(_objectSpread2(_objectSpread2({}, commonSche
|
|
|
1198
1201
|
remote: z["boolean"]().optional(),
|
|
1199
1202
|
referencedModule: z.string().optional()
|
|
1200
1203
|
}));
|
|
1204
|
+
|
|
1205
|
+
// `stream` is the one option that changes what an upload BECOMES, so it is
|
|
1206
|
+
// declared field by field: these z.objects strip unknown keys, and a stream
|
|
1207
|
+
// dropped in transit is a Studio that uploads a 2 GB mp4 where an HLS stream
|
|
1208
|
+
// was asked for.
|
|
1209
|
+
var VideoStreamOption = z.union([z.literal(false), z.object({
|
|
1210
|
+
type: z.literal("hls"),
|
|
1211
|
+
renditions: z.array(z.number()).optional(),
|
|
1212
|
+
segmentDuration: z.number().optional()
|
|
1213
|
+
})]);
|
|
1214
|
+
var VideoOptions = z.object({
|
|
1215
|
+
dir: z.string().optional(),
|
|
1216
|
+
accept: z.string().optional(),
|
|
1217
|
+
stream: VideoStreamOption.optional()
|
|
1218
|
+
});
|
|
1219
|
+
var SerializedVideoSchema = z.object(_objectSpread2(_objectSpread2({}, commonSchemaFields), {}, {
|
|
1220
|
+
type: z.literal("video"),
|
|
1221
|
+
options: VideoOptions.optional(),
|
|
1222
|
+
opt: z["boolean"](),
|
|
1223
|
+
remote: z["boolean"]().optional(),
|
|
1224
|
+
// The `s.videoset()` a set-backed field picks from.
|
|
1225
|
+
referencedModule: z.string().optional()
|
|
1226
|
+
}));
|
|
1201
1227
|
var DateOptions = z.object({
|
|
1202
1228
|
from: z.string().optional(),
|
|
1203
1229
|
to: z.string().optional()
|
|
@@ -1288,7 +1314,7 @@ var SerializedValViewSchema = z.object({
|
|
|
1288
1314
|
hidden: z["boolean"]().optional(),
|
|
1289
1315
|
description: z.string().optional()
|
|
1290
1316
|
});
|
|
1291
|
-
var SerializedSchema = z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedValViewSchema]);
|
|
1317
|
+
var SerializedSchema = z.union([SerializedStringSchema, SerializedLiteralSchema, SerializedBooleanSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedArraySchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedRichTextSchema, SerializedRecordSchema, SerializedKeyOfSchema, SerializedRouteSchema, SerializedLocaleSchema, SerializedFileSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedColorSchema, SerializedCodeSchema, SerializedSettingsSchema, SerializedImageSchema, SerializedVideoSchema, SerializedValViewSchema]);
|
|
1292
1318
|
|
|
1293
1319
|
var ValCommit = z.object({
|
|
1294
1320
|
commitSha: z.string(),
|
|
@@ -1469,12 +1495,12 @@ var ValConfig = z.object({
|
|
|
1469
1495
|
project: z.string().optional(),
|
|
1470
1496
|
root: z.string().optional(),
|
|
1471
1497
|
files: z.object({
|
|
1472
|
-
|
|
1498
|
+
remote: z["boolean"]().optional()
|
|
1473
1499
|
}).optional(),
|
|
1474
1500
|
gitCommit: z.string().optional(),
|
|
1475
1501
|
gitBranch: z.string().optional()
|
|
1476
1502
|
});
|
|
1477
|
-
var ValidationFixZ = z.union([z.literal("image:add-metadata"), z.literal("image:check-metadata"), z.literal("image:check-remote"), z.literal("image:upload-remote"), z.literal("image:download-remote"), z.literal("images:check-remote"), z.literal("images:upload-remote"), z.literal("file:add-metadata"), z.literal("file:check-metadata"), z.literal("file:check-remote"), z.literal("file:upload-remote"), z.literal("file:download-remote"), z.literal("files:check-remote"), z.literal("files:upload-remote"), z.literal("keyof:check-keys"), z.literal("router:check-route"), z.literal("locale:check-locale"), z.literal("record:fill-keys"), z.literal("images:check-unique-folder"), z.literal("files:check-unique-folder"), z.literal("images:check-all-files"), z.literal("files:check-all-files"), z.literal("jsonValues:extract-entry"), z.literal("view:check-module")]);
|
|
1503
|
+
var ValidationFixZ = z.union([z.literal("image:add-metadata"), z.literal("image:check-metadata"), z.literal("image:check-remote"), z.literal("image:upload-remote"), z.literal("image:download-remote"), z.literal("images:check-remote"), z.literal("images:upload-remote"), z.literal("file:add-metadata"), z.literal("video:add-metadata"), z.literal("video:upload-remote"), z.literal("video:download-remote"), z.literal("videos:add-metadata"), z.literal("videos:check-remote"), z.literal("videos:upload-remote"), z.literal("file:check-metadata"), z.literal("file:check-remote"), z.literal("file:upload-remote"), z.literal("file:download-remote"), z.literal("files:check-remote"), z.literal("files:upload-remote"), z.literal("keyof:check-keys"), z.literal("router:check-route"), z.literal("locale:check-locale"), z.literal("record:fill-keys"), z.literal("images:check-unique-folder"), z.literal("files:check-unique-folder"), z.literal("images:check-all-files"), z.literal("files:check-all-files"), z.literal("videos:check-unique-folder"), z.literal("videos:check-all-files"), z.literal("jsonValues:extract-entry"), z.literal("view:check-module")]);
|
|
1478
1504
|
var ValidationError = z.object({
|
|
1479
1505
|
message: z.string(),
|
|
1480
1506
|
value: z.unknown().optional(),
|
|
@@ -1569,6 +1595,14 @@ var PublishRefusal = z.object({
|
|
|
1569
1595
|
message: z.string()
|
|
1570
1596
|
});
|
|
1571
1597
|
|
|
1598
|
+
/** See `proposal` on `/stat`. */
|
|
1599
|
+
var StatProposal = z.object({
|
|
1600
|
+
/** Twenty hex characters, the hash of what it was made from. */
|
|
1601
|
+
name: z.string(),
|
|
1602
|
+
/** `val/p/<name>`. */
|
|
1603
|
+
branch: z.string()
|
|
1604
|
+
});
|
|
1605
|
+
|
|
1572
1606
|
/**
|
|
1573
1607
|
* A patch group: the set of patches one user has chosen to publish.
|
|
1574
1608
|
*
|
|
@@ -1999,7 +2033,13 @@ var Api = {
|
|
|
1999
2033
|
* connected ones by commit.
|
|
2000
2034
|
*/
|
|
2001
2035
|
publishJobs: z["boolean"]().optional(),
|
|
2002
|
-
publishRefusal: PublishRefusal.optional()
|
|
2036
|
+
publishRefusal: PublishRefusal.optional(),
|
|
2037
|
+
/**
|
|
2038
|
+
* The proposal this server runs at the address of, or absent
|
|
2039
|
+
* on the site. What the Studio's switcher says it is in, and
|
|
2040
|
+
* where its Save goes (valbuild/home `docs/proposals.md`).
|
|
2041
|
+
*/
|
|
2042
|
+
proposal: StatProposal.optional()
|
|
2003
2043
|
}), z.object({
|
|
2004
2044
|
type: z.literal("use-websocket"),
|
|
2005
2045
|
url: z.string(),
|
|
@@ -2117,7 +2157,13 @@ var Api = {
|
|
|
2117
2157
|
* connected ones by commit.
|
|
2118
2158
|
*/
|
|
2119
2159
|
publishJobs: z["boolean"]().optional(),
|
|
2120
|
-
publishRefusal: PublishRefusal.optional()
|
|
2160
|
+
publishRefusal: PublishRefusal.optional(),
|
|
2161
|
+
/**
|
|
2162
|
+
* The proposal this server runs at the address of, or absent
|
|
2163
|
+
* on the site. What the Studio's switcher says it is in, and
|
|
2164
|
+
* where its Save goes (valbuild/home `docs/proposals.md`).
|
|
2165
|
+
*/
|
|
2166
|
+
proposal: StatProposal.optional()
|
|
2121
2167
|
})])
|
|
2122
2168
|
})])
|
|
2123
2169
|
}
|
|
@@ -2203,6 +2249,60 @@ var Api = {
|
|
|
2203
2249
|
})
|
|
2204
2250
|
}
|
|
2205
2251
|
},
|
|
2252
|
+
/**
|
|
2253
|
+
* The content service's proposals API, reached through this deployment:
|
|
2254
|
+
* list, open, read, rename, close, reopen and retry a setup
|
|
2255
|
+
* (valbuild/home `docs/proposals.md`, Flow B).
|
|
2256
|
+
*
|
|
2257
|
+
* The same arrangement as `/publish-api`, for the same reasons: the browser
|
|
2258
|
+
* holds a session for this origin and no credential content accepts, so
|
|
2259
|
+
* this server checks the session, sends the project's key with the person's
|
|
2260
|
+
* profile id beside it -- a proposal is opened, renamed and closed by
|
|
2261
|
+
* somebody -- and carries content's status and body back unread. The sub-path
|
|
2262
|
+
* is content's, after `/proposals`; `ValOpsHttp.proposalsApi` holds the
|
|
2263
|
+
* allow list. A save is not here: it is `/save`, which a proposal's server
|
|
2264
|
+
* sends to the proposal's own route.
|
|
2265
|
+
*/
|
|
2266
|
+
"/proposals-api": {
|
|
2267
|
+
GET: {
|
|
2268
|
+
req: {
|
|
2269
|
+
path: z.string().optional(),
|
|
2270
|
+
cookies: {
|
|
2271
|
+
val_session: z.string().optional()
|
|
2272
|
+
}
|
|
2273
|
+
},
|
|
2274
|
+
res: z.object({
|
|
2275
|
+
status: z.number(),
|
|
2276
|
+
json: z.unknown()
|
|
2277
|
+
})
|
|
2278
|
+
},
|
|
2279
|
+
POST: {
|
|
2280
|
+
req: {
|
|
2281
|
+
path: z.string().optional(),
|
|
2282
|
+
body: z.unknown().optional(),
|
|
2283
|
+
cookies: {
|
|
2284
|
+
val_session: z.string().optional()
|
|
2285
|
+
}
|
|
2286
|
+
},
|
|
2287
|
+
res: z.object({
|
|
2288
|
+
status: z.number(),
|
|
2289
|
+
json: z.unknown()
|
|
2290
|
+
})
|
|
2291
|
+
},
|
|
2292
|
+
PATCH: {
|
|
2293
|
+
req: {
|
|
2294
|
+
path: z.string().optional(),
|
|
2295
|
+
body: z.unknown().optional(),
|
|
2296
|
+
cookies: {
|
|
2297
|
+
val_session: z.string().optional()
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2300
|
+
res: z.object({
|
|
2301
|
+
status: z.number(),
|
|
2302
|
+
json: z.unknown()
|
|
2303
|
+
})
|
|
2304
|
+
}
|
|
2305
|
+
},
|
|
2206
2306
|
"/upload/patches": {
|
|
2207
2307
|
POST: {
|
|
2208
2308
|
req: {
|
|
@@ -2732,6 +2832,32 @@ var Api = {
|
|
|
2732
2832
|
})])
|
|
2733
2833
|
}
|
|
2734
2834
|
},
|
|
2835
|
+
/**
|
|
2836
|
+
* In a proposal: the SITE's Source for every module the proposal has saved,
|
|
2837
|
+
* as the build it is based on has it. What Compare with the site diffs the
|
|
2838
|
+
* proposal against -- saved and unsaved alike -- because the Studio's own
|
|
2839
|
+
* base Source there is the proposal's last save. 404 anywhere that is not a
|
|
2840
|
+
* proposal's address. valbuild/home `docs/proposals.md`.
|
|
2841
|
+
*/
|
|
2842
|
+
"/proposal-site-sources": {
|
|
2843
|
+
GET: {
|
|
2844
|
+
req: {
|
|
2845
|
+
cookies: {
|
|
2846
|
+
val_session: z.string().optional()
|
|
2847
|
+
}
|
|
2848
|
+
},
|
|
2849
|
+
res: z.union([unauthorizedResponse, z.object({
|
|
2850
|
+
status: z.literal(404),
|
|
2851
|
+
json: GenericError
|
|
2852
|
+
}), z.object({
|
|
2853
|
+
status: z.literal(200),
|
|
2854
|
+
json: z.object({
|
|
2855
|
+
/** By module file path. A module absent here is the same in both. */
|
|
2856
|
+
modules: z.record(z.string(), z.unknown())
|
|
2857
|
+
})
|
|
2858
|
+
})])
|
|
2859
|
+
}
|
|
2860
|
+
},
|
|
2735
2861
|
"/profiles": {
|
|
2736
2862
|
GET: {
|
|
2737
2863
|
req: {
|
|
@@ -3187,11 +3313,23 @@ var Api = {
|
|
|
3187
3313
|
return arg[0];
|
|
3188
3314
|
}).optional(),
|
|
3189
3315
|
remote: onlyOneStringQueryParam.optional()
|
|
3316
|
+
},
|
|
3317
|
+
// A `<video>` seeks with byte ranges, Safari will not play one from a
|
|
3318
|
+
// server that ignores them, and HLS segments that are byte ranges of
|
|
3319
|
+
// one file are fetched no other way.
|
|
3320
|
+
headers: {
|
|
3321
|
+
range: z.string().optional()
|
|
3190
3322
|
}
|
|
3191
3323
|
},
|
|
3192
3324
|
res: z.union([unauthorizedResponse, notFoundResponse, z.object({
|
|
3193
3325
|
status: z.literal(200),
|
|
3194
3326
|
body: z["instanceof"](ReadableStream)
|
|
3327
|
+
}), z.object({
|
|
3328
|
+
status: z.literal(206),
|
|
3329
|
+
body: z["instanceof"](ReadableStream)
|
|
3330
|
+
}), z.object({
|
|
3331
|
+
status: z.literal(416),
|
|
3332
|
+
json: GenericError
|
|
3195
3333
|
})])
|
|
3196
3334
|
}
|
|
3197
3335
|
},
|
|
@@ -5315,7 +5453,7 @@ function emptyOf(schema, context) {
|
|
|
5315
5453
|
// language nobody chose, which is the thing this whole feature exists to
|
|
5316
5454
|
// make visible.
|
|
5317
5455
|
return (_context$selectedLoca = context === null || context === void 0 ? void 0 : context.selectedLocale) !== null && _context$selectedLoca !== void 0 ? _context$selectedLoca : "";
|
|
5318
|
-
} else if (schema.type === "file" || schema.type === "image") {
|
|
5456
|
+
} else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
|
|
5319
5457
|
return null; // returning null is the only thing we can do, however, it means that the patches cannot be applied yet since that might fail
|
|
5320
5458
|
} else if (schema.type === "literal") {
|
|
5321
5459
|
return schema.value;
|
|
@@ -5525,6 +5663,14 @@ function checkGallerySchema(moduleSchema) {
|
|
|
5525
5663
|
if (moduleSchema.type === "record" && moduleSchema.mediaType === "images") {
|
|
5526
5664
|
return null;
|
|
5527
5665
|
}
|
|
5666
|
+
if (moduleSchema.type === "record" && moduleSchema.mediaType === "videos") {
|
|
5667
|
+
// Said outright rather than as "not an images gallery": a set of videos
|
|
5668
|
+
// looks like a gallery from here, and the tool can do nothing with one.
|
|
5669
|
+
return {
|
|
5670
|
+
kind: "error",
|
|
5671
|
+
message: "Module is a video set (s.videoset()), not an images gallery. Videos cannot be added or removed by this tool: upload them in Val Studio."
|
|
5672
|
+
};
|
|
5673
|
+
}
|
|
5528
5674
|
if (moduleSchema.type === "image") {
|
|
5529
5675
|
return {
|
|
5530
5676
|
kind: "wrong-tool",
|
|
@@ -5619,17 +5765,32 @@ var GALLERY_REDIRECT = {
|
|
|
5619
5765
|
reason: "Destination is a media gallery (s.imageset() / s.fileset()). Gallery entries are keyed by file path and carry a file on disk, so they cannot be created with a plain patch. Use add_session_image_to_gallery."
|
|
5620
5766
|
};
|
|
5621
5767
|
|
|
5622
|
-
/**
|
|
5768
|
+
/**
|
|
5769
|
+
* A video set's entries are keyed by a file too, and a stream's by a
|
|
5770
|
+
* directory of them — and there is no tool to send them to: a video is
|
|
5771
|
+
* uploaded (and, for a stream, transcoded) in the Studio.
|
|
5772
|
+
*/
|
|
5773
|
+
var VIDEOSET_REFUSAL = {
|
|
5774
|
+
kind: "error",
|
|
5775
|
+
message: "Destination is a video set (s.videoset()). Its entries are keyed by file path and carry video files, so they cannot be created with a plain patch, and no tool here uploads a video: add it in Val Studio."
|
|
5776
|
+
};
|
|
5777
|
+
|
|
5778
|
+
/** An `s.imageset()` / `s.fileset()` / `s.videoset()` record: a gallery, not an ordinary record. */
|
|
5623
5779
|
function isGallery(schema) {
|
|
5624
5780
|
return schema.type === "record" && schema.mediaType !== undefined;
|
|
5625
5781
|
}
|
|
5782
|
+
|
|
5783
|
+
/** Where to send someone whose destination is (in) the gallery `schema`. */
|
|
5784
|
+
function galleryRedirect(schema) {
|
|
5785
|
+
return schema.type === "record" && schema.mediaType === "videos" ? VIDEOSET_REFUSAL : GALLERY_REDIRECT;
|
|
5786
|
+
}
|
|
5626
5787
|
function decideOp(moduleSchema, destinationPath) {
|
|
5627
5788
|
// The DESTINATION itself, checked before its parent: `["gallery"]` resolves
|
|
5628
5789
|
// its parent to the enclosing object and would otherwise look like an
|
|
5629
5790
|
// ordinary `replace` that overwrites a whole gallery.
|
|
5630
5791
|
var destination = resolveSerializedSchemaAtPath(moduleSchema, destinationPath);
|
|
5631
5792
|
if (destination.kind === "gallery-traversed") {
|
|
5632
|
-
return
|
|
5793
|
+
return galleryRedirect(destination.schema);
|
|
5633
5794
|
}
|
|
5634
5795
|
if (destination.kind === "richtext") {
|
|
5635
5796
|
return {
|
|
@@ -5640,7 +5801,7 @@ function decideOp(moduleSchema, destinationPath) {
|
|
|
5640
5801
|
}
|
|
5641
5802
|
if (destination.kind === "leaf") {
|
|
5642
5803
|
if (isGallery(destination.schema)) {
|
|
5643
|
-
return
|
|
5804
|
+
return galleryRedirect(destination.schema);
|
|
5644
5805
|
}
|
|
5645
5806
|
// A richtext value the path lands exactly ON resolves as a leaf, not as
|
|
5646
5807
|
// `kind: "richtext"` (which only fires when the walk continues INTO it).
|
|
@@ -5677,7 +5838,7 @@ function decideOp(moduleSchema, destinationPath) {
|
|
|
5677
5838
|
// destination is a gallery entry; `isGallery` catches the case where the
|
|
5678
5839
|
// parent IS the gallery and the destination is a new entry key in it.
|
|
5679
5840
|
if (parent.kind === "gallery-traversed" || isGallery(parent.schema)) {
|
|
5680
|
-
return
|
|
5841
|
+
return galleryRedirect(parent.schema);
|
|
5681
5842
|
}
|
|
5682
5843
|
var schema = parent.schema;
|
|
5683
5844
|
if (schema.type === "array" || schema.type === "record") {
|
|
@@ -5998,6 +6159,14 @@ function isSkippableFixCode(fix) {
|
|
|
5998
6159
|
case "file:check-remote":
|
|
5999
6160
|
case "files:check-remote":
|
|
6000
6161
|
case "files:upload-remote":
|
|
6162
|
+
case "video:add-metadata": // the Studio writes it on upload; --fix for the rest
|
|
6163
|
+
case "video:upload-remote":
|
|
6164
|
+
case "video:download-remote":
|
|
6165
|
+
case "videos:add-metadata": // as `video:add-metadata`, for a set's entry
|
|
6166
|
+
case "videos:check-remote":
|
|
6167
|
+
case "videos:upload-remote":
|
|
6168
|
+
case "videos:check-unique-folder":
|
|
6169
|
+
case "videos:check-all-files":
|
|
6001
6170
|
case "images:check-unique-folder":
|
|
6002
6171
|
case "files:check-unique-folder":
|
|
6003
6172
|
case "images:check-all-files":
|
|
@@ -6322,8 +6491,8 @@ function traverseSchemaSource(source, schema, path, callback) {
|
|
|
6322
6491
|
return;
|
|
6323
6492
|
}
|
|
6324
6493
|
|
|
6325
|
-
// Handle file/image
|
|
6326
|
-
if (schema.type === "file" || schema.type === "image") {
|
|
6494
|
+
// Handle file/image/video
|
|
6495
|
+
if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
|
|
6327
6496
|
if (source && _typeof(source) === "object" && "path" in source && typeof source.path === "string") {
|
|
6328
6497
|
callback({
|
|
6329
6498
|
source: source,
|
|
@@ -6670,8 +6839,8 @@ function indexModule(searchIndex, moduleFilePath, source, schema) {
|
|
|
6670
6839
|
// Use first 50 chars as label
|
|
6671
6840
|
label = searchText.substring(0, 50) || "richtext";
|
|
6672
6841
|
}
|
|
6673
|
-
// Handle file/image
|
|
6674
|
-
else if (schema.type === "file" || schema.type === "image") {
|
|
6842
|
+
// Handle file/image/video
|
|
6843
|
+
else if (schema.type === "file" || schema.type === "image" || schema.type === "video") {
|
|
6675
6844
|
if (source !== null && _typeof(source) === "object" && "path" in source && typeof source.path === "string") {
|
|
6676
6845
|
// The label is the bare filename - the folder is shown separately in
|
|
6677
6846
|
// the UI - but both are searchable.
|
|
@@ -7761,4 +7930,4 @@ function parse(schema, body, call) {
|
|
|
7761
7930
|
return parsed.data;
|
|
7762
7931
|
}
|
|
7763
7932
|
|
|
7764
|
-
export { AA_LARGE, AA_TEXT, Api, BRAND_CONTRAST_PAIRS, BinaryFileRef, CodeOptions, ColorOptions, DEFAULT_ERROR_MESSAGE, DateOptions, ENCODE_DEFAULTS, ENCODE_MIME_TYPE_OF, FileOptions, HistoricalCommit, HistoricalModule, HistoricalPatchSet, HistoryError, ImageEncodeOption, ImageOptions, JSONValue, JSON_ENTRIES_BATCH_MAX, ModuleComparison, NEVER_ENCODED, ParentRef$1 as ParentRef, Patch, PatchBlock, PatchGroup, PatchId, PatchJSON, PublishProtocolError, RAMP_STEPS, RemirrorBr, RemirrorBulletList, RemirrorHeading, RemirrorImage, RemirrorJSON, RemirrorLinkMark, RemirrorListItem, RemirrorOrderedList, RemirrorParagraph, RemirrorText, RemirrorTextMark, RestoreVerdict, RichTextOptions, SCHEMA_SOURCE_FIXES, SerializedArraySchema, SerializedBooleanSchema, SerializedCodeSchema, SerializedColorSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedFileSchema, SerializedImageSchema, SerializedKeyOfSchema, SerializedLiteralSchema, SerializedLocaleSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedRecordSchema, SerializedRichTextSchema, SerializedRouteSchema, SerializedSchema, SerializedSettingsSchema, SerializedStringSchema, SerializedValViewSchema, SharedValConfig, VAL_ENABLE_COOKIE_NAME, VAL_GREEN_RAMP, VAL_SESSION_COOKIE, VAL_STATE_COOKIE, VAL_STUDIO_HEADER, ValCommit, ValDeployment, accentRamp, buildDuplicatePatch, buildEmptyAtPathPatch, buildFileRefValue, buildImageGalleryPatch, buildRemoveImageGalleryEntryPatch, buildSearchIndex, chainHeadOf, checkCompatibility, chooseEncoded, concatModulePath, contrastRatio, createRegExpFromPattern, createSearchIndex, createValClient, declaredLocales, describeContainerAtPath, emptyOf, explainIncompatible, filterBlockingValidationErrors, filterRoutesByPatterns, findSimilar, fitWithin, flattenRichText, getErrorMessageFromUnknownJson, getFilenameFromRef, getInlineImgInfo, getKeyOfRecordAt, getRefParts, getRoutesOf, getRoutesWithModulePaths, getSourceAt, indexModule, isMimeTypeAccepted, isRemoteSchema, isSchemaSourceFixError, isSkippedSource, keyOfRecordPath, levenshtein, localeAt, memoizePerRequest, newestCommitSha, parseArtifacts, parseBuildTarget, parseCancel, parseDeclare, parseDiscard, parseJob, parseNewestCiRun, parsePress, parseProblems, parseProjectSource, parsePromote, parsePublishToken, parseRenew, parseRequestStatus, parseStatus, parseUpdateTarget, parseVerify, partitionValidationErrors, performSearch, relativeLuminance, remirrorToRichTextSource, removeModule, resolveEncodeSettings, resolvePairGround, resolveSchemaSourceFixForError, resolveSchemaSourceFixes, resolveSerializedSchemaAtPath, richTextToRemirror, safeParsePatch, sourcePathOfChild, themeCustomProperties, toolNames, traverseSchemaSource, urlOf, validateRoutePatterns, withExtension };
|
|
7933
|
+
export { AA_LARGE, AA_TEXT, Api, BRAND_CONTRAST_PAIRS, BinaryFileRef, CodeOptions, ColorOptions, DEFAULT_ERROR_MESSAGE, DateOptions, ENCODE_DEFAULTS, ENCODE_MIME_TYPE_OF, FileOptions, HistoricalCommit, HistoricalModule, HistoricalPatchSet, HistoryError, ImageEncodeOption, ImageOptions, JSONValue, JSON_ENTRIES_BATCH_MAX, ModuleComparison, NEVER_ENCODED, ParentRef$1 as ParentRef, Patch, PatchBlock, PatchGroup, PatchId, PatchJSON, PublishProtocolError, RAMP_STEPS, RemirrorBr, RemirrorBulletList, RemirrorHeading, RemirrorImage, RemirrorJSON, RemirrorLinkMark, RemirrorListItem, RemirrorOrderedList, RemirrorParagraph, RemirrorText, RemirrorTextMark, RestoreVerdict, RichTextOptions, SCHEMA_SOURCE_FIXES, SerializedArraySchema, SerializedBooleanSchema, SerializedCodeSchema, SerializedColorSchema, SerializedDateSchema, SerializedDateTimeSchema, SerializedDiscriminatedUnionSchema, SerializedEnumSchema, SerializedFileSchema, SerializedImageSchema, SerializedKeyOfSchema, SerializedLiteralSchema, SerializedLocaleSchema, SerializedNumberSchema, SerializedObjectSchema, SerializedRecordSchema, SerializedRichTextSchema, SerializedRouteSchema, SerializedSchema, SerializedSettingsSchema, SerializedStringSchema, SerializedValViewSchema, SerializedVideoSchema, SharedValConfig, VAL_ENABLE_COOKIE_NAME, VAL_GREEN_RAMP, VAL_SESSION_COOKIE, VAL_STATE_COOKIE, VAL_STUDIO_HEADER, ValCommit, ValDeployment, VideoOptions, VideoStreamOption, accentRamp, buildDuplicatePatch, buildEmptyAtPathPatch, buildFileRefValue, buildImageGalleryPatch, buildRemoveImageGalleryEntryPatch, buildSearchIndex, chainHeadOf, checkCompatibility, chooseEncoded, concatModulePath, contrastRatio, createRegExpFromPattern, createSearchIndex, createValClient, declaredLocales, describeContainerAtPath, emptyOf, explainIncompatible, filterBlockingValidationErrors, filterRoutesByPatterns, findSimilar, fitWithin, flattenRichText, getErrorMessageFromUnknownJson, getFilenameFromRef, getInlineImgInfo, getKeyOfRecordAt, getRefParts, getRoutesOf, getRoutesWithModulePaths, getSourceAt, indexModule, isMimeTypeAccepted, isRemoteSchema, isSchemaSourceFixError, isSkippedSource, keyOfRecordPath, levenshtein, localeAt, memoizePerRequest, newestCommitSha, parseArtifacts, parseBuildTarget, parseCancel, parseDeclare, parseDiscard, parseJob, parseNewestCiRun, parsePress, parseProblems, parseProjectSource, parsePromote, parsePublishToken, parseRenew, parseRequestStatus, parseStatus, parseUpdateTarget, parseVerify, partitionValidationErrors, performSearch, relativeLuminance, remirrorToRichTextSource, removeModule, resolveEncodeSettings, resolvePairGround, resolveSchemaSourceFixForError, resolveSchemaSourceFixes, resolveSerializedSchemaAtPath, richTextToRemirror, safeParsePatch, sourcePathOfChild, themeCustomProperties, toolNames, traverseSchemaSource, urlOf, validateRoutePatterns, withExtension };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valbuild/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.142.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Val shared types and utilities",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"flexsearch": "^0.8.212",
|
|
38
38
|
"zod": "^4.4.3",
|
|
39
39
|
"zod-validation-error": "^5.0.0",
|
|
40
|
-
"@valbuild/core": "0.
|
|
40
|
+
"@valbuild/core": "0.141.0"
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"CHANGELOG.md",
|