feat: Add proxying support for images (#2427)

- Closes #2418
This commit is contained in:
Dermot Duffy
2026-06-30 17:45:12 -07:00
committed by dermotduffy
parent 9384785d37
commit 1cd5520154
51 changed files with 2404 additions and 687 deletions
+12 -4
View File
@@ -7,7 +7,9 @@ describe('getParseErrorPaths', () => {
const result = z
.object({ a: z.string(), b: z.number() })
.safeParse({ a: 1, b: 'a' });
if (result.success) return;
if (result.success) {
return;
}
expect(getParseErrorPaths(result.error)).toEqual(new Set(['a', 'b']));
});
@@ -15,13 +17,17 @@ describe('getParseErrorPaths', () => {
const result = z
.object({ a: z.object({ b: z.string() }) })
.safeParse({ a: { b: 1 } });
if (result.success) return;
if (result.success) {
return;
}
expect(getParseErrorPaths(result.error)).toEqual(new Set(['a.b']));
});
it('should get array error paths', () => {
const result = z.array(z.string()).safeParse([1, 'a', 2]);
if (result.success) return;
if (result.success) {
return;
}
expect(getParseErrorPaths(result.error)).toEqual(new Set(['[0]', '[2]']));
});
@@ -29,7 +35,9 @@ describe('getParseErrorPaths', () => {
const result = z
.object({ a: z.array(z.object({ b: z.string() })) })
.safeParse({ a: [{ b: 1 }, { b: 'a' }, { b: 2 }] });
if (result.success) return;
if (result.success) {
return;
}
expect(getParseErrorPaths(result.error)).toEqual(new Set(['a[0].b', 'a[2].b']));
});
});