Skip to content

Tags

Tags

v0.3.0

Toggle v0.3.0's commit message
chore: release v0.3.0

v0.2.5

Toggle v0.2.5's commit message
fix: reject unknown nested select keys

v0.2.4

Toggle v0.2.4's commit message
ci: use package manager pnpm version

v0.2.3

Toggle v0.2.3's commit message
fix: avoid ModelResult in ZenDefaultResult to fix inferRouterOutputs …

…depth on large schemas

@zenstackhq/orm 3.5.0 added `ExtResult extends ExtResultBase<Schema>` to ModelResult, causing
TypeScript's instantiation limit to be exceeded on schemas with 50+ models (apiv4: 57 models).
ZenDefaultResult now uses a direct mapped type over NonRelationFields instead of delegating to
SimplifiedPlainResult/ModelResult, eliminating the ExtResultBase<Schema> constraint overhead.

Adds regression test (tests/large-model-depth.test.ts) with a 100-model fixture that
documents the breakage and verifies correct scalar field resolution through inferRouterOutputs.

See: zenstackhq/zenstack#2569

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

v0.2.2

Toggle v0.2.2's commit message
fix: add ZenResult type to fix tsgo scalar-field narrowing and _count…

… include support

Replace SimplifiedPlainResult with ZenResult (split mapped type approach) in the
router generator so scalar fields in nested selects are never `unknown` under tsgo,
even when the ZenStack client has plugins applied (non-empty ExtResult). Add
IncludeCountResult to handle `include: { _count: ... }` in ZenResult — fixes the
missing _count property error seen in apiv4's AppAgents.tsx.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

v0.2.1

Toggle v0.2.1's commit message
fix: infer tRPC context type and fix nested router never typing

- ZenStackRouter now based on TRPCBuiltRouter so it satisfies
  Router<any, infer TRecord> — prevents `generated: never` when nesting
  via t.router({ generated: generatedRouter })
- InferTRPCContext<T> extracts the full context type from the tRPC
  instance, so createZenStackRouter no longer widens ctx to { db: any }
- Added type tests covering context inference, nested never regression,
  and create.data field presence via inferRouterInputs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

v0.2.0

Toggle v0.2.0's commit message
feat!: replace hand-rolled zod schemas with ZenStack's createQuerySch…

…emaFactory

Upgrades to @zenstackhq/orm 3.4.0 and uses the built-in ZodSchemaFactory
for input validation, ensuring schemas stay in sync with the ORM type
definitions and automatically respect ZModel validation attributes
(@email, @Length, @regex, etc.).

BREAKING CHANGE: removes createModelSchemas, createWhereSchema,
createCreateDataSchema, createUpdateDataSchema, createUniqueWhereSchema,
createSelectSchema, createIncludeSchema, createOrderBySchema exports.
Use createQuerySchemaFactory from @zenstackhq/orm instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

v0.1.22

Toggle v0.1.22's commit message
fix: properly preserve merged router types and update deps

- Update @zenstackhq/orm to 3.3.2, @trpc/* to 11.9.0, add @zenstackhq/cli
- Fix MergeUtils: remove index signature from typed branch so custom router
  types (admin, chat, etc.) are preserved after typedClient() — only use
  Record<string, any> fallback when base types are any
- Replace mock useUtils test with realistic apiV4 pattern using
  createTRPCReact<AppRouter> with real merged routers
- Fix generated schema for ExpressionUtils.array() signature change in 3.3.2
- Remove deprecated generator block from schema.zmodel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

v0.1.21

Toggle v0.1.21's commit message
chore: bump version to 0.1.21

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

v0.1.20

Toggle v0.1.20's commit message
feat: allow custom base procedure