|
|
@@ -5,11 +5,14 @@ const Blob = require('overleaf-editor-core').Blob
|
|
|
|
|
|
const hexHashPattern = new RegExp(Blob.HEX_HASH_RX_STRING)
|
|
|
|
|
|
-const fileSchema = z.object({
|
|
|
- hash: z.string().optional(),
|
|
|
- byteLength: z.number().int().nullable().optional(),
|
|
|
- stringLength: z.number().int().nullable().optional(),
|
|
|
-})
|
|
|
+const fileSchema = z
|
|
|
+ .object({
|
|
|
+ hash: z.string().optional(),
|
|
|
+ byteLength: z.number().int().nullable().optional(),
|
|
|
+ stringLength: z.number().int().nullable().optional(),
|
|
|
+ metadata: z.object({}).passthrough().optional(),
|
|
|
+ })
|
|
|
+ .passthrough()
|
|
|
|
|
|
const snapshotSchema = z.object({
|
|
|
files: z.record(z.string(), fileSchema),
|