Commit graph

9 commits

Author SHA1 Message Date
Yiming Cao
9cef0272e7
chore: upgrade to TypeScript 6 (#2629) 2026-04-29 20:41:27 -07:00
ymc9
c96bdbaf6e address PR comments 2026-03-12 21:35:50 -07:00
ymc9
1ba4e54066 refactor(schema): widen types for attributes, default, and foreignKeyFor in generated schema
The generated schema previously used `as const` on entire model/enum/typeDef
objects, causing TypeScript to deeply infer literal types for all nested
properties. This is unnecessary for `attributes`, `default`, and `foreignKeyFor`
which are only used at runtime, not in CRUD type computations.

Changes:
- Add type assertions (`as readonly AttributeApplication[]`, `as FieldDefault`,
  `as readonly string[]`) to prevent deep const inference on these properties
- Extract `FieldDefault` type alias from `FieldDef` for cleaner generated code
- Change `FieldHasDefault` to use key existence check (`'default' extends keyof`)
  instead of value type check, enabling the `default` widening
- Conditionally import `AttributeApplication` and `FieldDefault` only when used

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:51:43 -07:00
Yiming Cao
1e70052ded
feat(zod): introduce an option to control depth of the built zod schemas (#2392) 2026-02-21 12:08:31 -08:00
Yiming Cao
3e03ab1506
refactor: remove import from orm package in generated schema (#2387) 2026-02-19 18:16:13 -08:00
Yiming Cao
fc703b8f42
chore: clean up repo merging stale files (#2370) 2026-02-11 11:51:44 +08:00
Yiming Cao
209312a27b
fix(orm): properly handle literal array values in policy evaluation for postgres (#628) 2026-01-29 00:15:07 +08:00
Yiming Cao
2c9db43cc2
feat(cli): implement watch mode for generate (#573)
* feat(cli): implement watch mode for generate

* chore(root): update pnpm-lock.yaml

* chore(cli): track all model declaration and removed paths, logs in past tense

* fix(cli): typo, unused double array from

* fix(orm): preserve zod validation errors when validating custom json types

* update

* chore(cli): move import, fix parallel generation on watch

* feat(common-helpers): implement single-debounce

* chore(cli): use single-debounce for debouncing

* feat(common-helpers): implement single-debounce

* fix(common-helpers): re run single-debounce

* fix(tanstack): avoid invalidating queries for custom proc mutations

* add missing file

* fix formatting

---------

Co-authored-by: FTB_lag <tabolskyy.git@gmail.com>
2026-01-08 16:12:14 +08:00
Yiming Cao
fe731f726a
refactor: extract client-helpers package, update svelte-query to v6 (#535) 2025-12-27 22:49:19 +08:00