mirror of
https://github.com/hanzo-apps/dataroom.git
synced 2026-10-30 14:47:36 +00:00
The schema is sqlite, but the app is upstream Papermark written for postgres,
and three of the gaps between them were failing the build.
lists — postgres `String[]` has no sqlite equivalent, so allowList, denyList,
emails, domains and globalBlockList became `Json` and read back as
`Prisma.JsonValue`. Callers still treat them as arrays, so `.length`,
`.some()` and spreading them were all errors: 52 of the 99. The generated
payload types are now narrowed to `string[]`, which is what those columns
actually hold. Model-scoped, because `domains` is a string list on
ViewerGroup but a `Domain[]` relation on Team and User.
target — `es5` made every `for...of` over a Set or Map an error while the
code shipped through SWC untouched. tsc is `noEmit` here, so this only ever
described the typecheck, never the output.
svg — `next-env.d.ts` carries the declaration for static image imports and is
gitignored, so a typecheck that had not been preceded by a build could not
resolve them. Committed as types/next.d.ts so tsc stands on its own.
The enum shim grew the list handling and is renamed for what it now does. Its
"nothing injected" check also treated an already-shimmed client as a missing
one, which failed any second install that did not regenerate first.
99 errors -> 37, no file worse than it was.
Co-authored-by: Hanzo Dev <[email protected]>