Commit Graph
31 Commits
Author SHA1 Message Date
TaesuandGitHub b00692d4ea fix(cli): treat omitted required as true in Drizzle and Prisma generators (#8614) 2026-03-16 17:12:48 +00:00
Bereket Engida 859367a813 chore: lint 2026-02-28 15:55:57 -08:00
MaxwellGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>Bereket Engida
3485e5e96c feat(cli): generate schema from adapter CLI flag (#7316)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
2026-02-28 15:38:12 -08:00
f77c391393 chore: bump prisma to v7 (#8166)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 02:24:32 +00:00
Joél SolanoandGitHub cf8322707c feat: auth cli (#7964) 2026-02-15 07:44:50 +00:00
Alex Yang 00c95728f1 Revert "feat: make name field optional (#7617)"
This reverts commit e0df7c9e38.
2026-02-02 10:52:19 -08:00
TaesuandGitHub e0df7c9e38 feat: make name field optional (#7617) 2026-01-29 23:42:52 +00:00
4588fb4d84 chore(cli): export schema generators via /api subpath (#7082)
Co-authored-by: Alex Yang <himself65@outlook.com>
2026-01-02 15:43:28 +08:00
MaxwellandGitHub 5ce4d098fa fix(cli): deduplicate drizzle schema relationships (#6547) 2025-12-05 17:07:59 -08:00
Alex YangandGitHub 47044905d4 chore(cli): reduce better-auth imports (#6507) 2025-12-03 21:17:46 -08:00
Alex YangandGitHub 123bdee671 fix(cli): compatibility for Prisma v7 in schema generation (#6459) 2025-12-02 11:27:36 -08:00
KinfeMichael TarikuandGitHub 39eb685200 fix: improve error handling for unsupported additionalFields on generate (#3977) 2025-11-29 22:27:45 -08:00
dc2f56985f chore(fix): usePlural should work wtith joins (#6132)
Co-authored-by: Bereket Engida <Bekacru@gmail.com>
2025-11-21 18:12:35 +00:00
Alex YangandGitHub 252ab7e2fa test: update snapshot expectations to use async/await (#6141) 2025-11-20 20:37:05 +00:00
rovertrackGitHubcubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
09162d3d12 feat(prisma): enhance JSON default value handling for arrays and objects in schema generation (#5904)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-11-11 18:21:03 +00:00
MaxwellandGitHub 705f7434c7 fix: treat generateId "serial" as numeric ID and correct UUID column types across adapters (#5823) 2025-11-11 18:04:24 +00:00
Alex YangandGitHub 938c2a7c31 chore: lint enable organize import (#5556) 2025-10-24 19:05:09 +00:00
Eniola OsabiyaandGitHub 03fbf937db fix(drizzle): replace pgEnum with text enum type in Drizzle schema generation (#5408) 2025-10-19 01:29:51 +00:00
Alex YangandGitHub fd780aca6b feat: enum support for drizzle schema (#5287) 2025-10-13 23:56:39 +00:00
20e87a2e1c fix(cli): add missing JSON type to schema generation (#4494)
Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
2025-09-14 13:27:13 -07:00
TaesuandGitHub df6151d161 fix(cli): simplify and correct comma insertion logic in plugin array (#4281) 2025-08-29 11:40:39 -07:00
MaxwellandGitHub 5d84a76a54 fix(cli): Incorrect drizzle schema gen (#4132) 2025-08-23 18:18:10 -07:00
KinfeMichael TarikuandBereket Engida 1993317251 fix(cli): clean up unused pg and mysql import in drizzle schema generator (#3974)
* fix(cli): clean up unused pg import in schema generator

* sql clean up

* clean up
2025-08-14 18:35:26 -07:00
KinfeMichael TarikuandBereket Engida 4c4c259a54 fix(cli): prisma schema generate mismatch on custom plugin table names (#3021)
* fix: generate mismatch

* clean up

* linkt

* lint

* clean up

* clean up

* lint

* lint

* test

* clean up

* clean up

* lint

* update
2025-08-06 16:38:50 -07:00
KinfeMichael TarikuandGitHub 4cff983e5c refactor: migrated all packages from Zod v3 to Zod v4 (#3399)
Refactors
- Updated all imports and type references to use zod/v4.
- Replaced deprecated or changed Zod APIs and options across the codebase.
- Adjusted validation schemas and error messages to match Zod v4 requirements.
- Updated dependencies and lockfiles to use Zod v4.
2025-07-17 08:30:02 -07:00
AbbasandBereket Engida 4a5d798999 fix(drizzle-cli): use serial as PK when useNumberId is enabled (#3228) 2025-07-03 11:40:11 -07:00
986614b241 feat: createAdapter and useNumberId (#1926)
* refactor(adapter): `createAdapter` helper

* update: Kysely adapter support

* update: memory adapter

* chore: cleanup

* update: MongoDB adapter supported

* update: mongodb adapter file names

* update: support for prisma adapter

- also fixed memory adapter with `getField`
- disabled all debug logs by default

* chore: lint

* fix: generate an `id` if it isn't already provided

* update(test): init config snapshot

* update: existing adapters tests to include an `id` existence check

* fix: renamed prisma adapter file names

* ^

* update(mongo): Removed `disableIdGeneration` for mongo adapter

* fix: dont add `id` from fields if `disableIdGeneration` is false

* fix: adapter converting dates to string using the wrong value data

* add: create-adapter tests

* update: moved `adapter` to `create-adapter` under the existing `adapters` folder

* WIP: docs

* fix: create-adapter test importing from wrong path

* WIP: docs

* update: key transformation map options are now objs not fns

* chore: lint

* update: cleanup & added debugLogs/usePlural option to some adapters

* update: tests

* chore: cleanup

* update: fields name & made customTransforminput/output to run after supportsDates/supportsBoolean/SupportsJSON to run

* chore: lint

* Update: docs

* update: update-many to not use transformOutput

* chore: lint

* fix: adapter options breaking

* update: set the default limit on findMany

* update: docs

* update: docs & cleaned up code

* update: create schema comes with `tables` now

* This is useless

* fix: api-key shouldn't handle id gen in row creation

* chore: lint

* WIP: useNumberId

* chore: cleanup

* removed all cases of `id` during adapter.create call

* update: useNumberId

* update: drizzle adapter schema generation

- update: pg now sets `id` field to use `uuid`.
- fix: sets the correct reference `onDelete` action.
- refactor: cleaned up the code a lot more

* update: added `supportNumericIds` in create adapter options

* chore: cleanup

* update(tests): added option to disable any adapter tests & created a `useNumberId` test

* fix: skip tests options were using old method

* chore: lint

* WIP: Drizzle tests with number id

* chore: lint

* fix: memory adapter failing on number id adapter tests

* chore: cleanup

* fix: adapter tests fail due to emails needing to be unique

* update: support drizzle adapter use-number-id

* fix: cleanup Drizzle Adapter tests

* fix: drizzle schema generation for reference id fields

* fix: type errs in memory adapter tests

* fix: memory adapter tests

* Update init.test.ts.snap

* fix: prisma tests correctly uses the right primsa client per schema

* Delete run-vitest.ts

* update: create-adapter to support `getDefaultFieldName`

* update: create-adapter adapter options updated

* fix: adapters using older function names

* fix: create-adapter now converts where clauses & added tests

* update: new `getFieldAttributes` option in create-adapter, and fixed convert where clause fn

* chore: cleanup

* update: convertWhereClause in create-adapter improved

* update: BAOptions to start using `database` & updated adapter tests

* fix: type errors

* chore: lint

* update: default config values for the create-adapter config

* fix: getModelName doesnt take into account of plural

* chore: cleanup

* update: improved getDefaultModelname

* fix: create-adapter transform input doesn't take into account reference IDs

* fix: transformInput on reference IDs doesn't take into account of array IDs

* chore: lint

* fix: prisma tests

* fix: Prisma adapter tests running one after another

* fix: init snapshot should state supportJSON as `false`

* fix: drizzle adapter tests

* update: adapter test options to allow passing a test prefix

* chore: add state.txt to gitignore

* remove: state.txt from gitignore, it's useless

* chore: lint

* Update adapter.prisma.numberid.test.ts

* fix: get-migration for mysql & mssql `id` fields to use varchar

* chore: cleanup

* update: adapter comes with adapter-test-debug-log functions

* update: made adapterTestDebugLog functions only be in adapter if config enabled it

* fix: transactionId for debug logs not working correctly

This was due to the adapter being reinitialized each test case

* update: Added colors to debug logs

* update: adapter tests a little more refined

* add: deepmerge dev deps to deep merge better auth options config for adapters

* fix: create-adapter types

* update: revert back to old types

* fix: prisma adapter tests now run one after another

* fix: kysely adapter to work when no `id` is provided

* update: mongoDB to set `supportNumericids` to false

* update(docs): discuss new `database` object in BetterAuthOptions

* add: support for custom ID generation

* fix: docs had incorrect default value for `supportsJSON`

* update(docs): added number id adapter test documentation

* fix: drizzle-adapter mysql tests

* update: drizzle-adapter tests to use deepmerge

* add: drizzle-adapter mysql tests to test useNumberId

* add: Prisma generate to support number id

* update: support the old `generateId` option, but warn the user for deprecation

* update: init test snapshot

* update: adapter tests not included in normal tests

* Update pnpm-lock.yaml

* fix: typo in file names for kysley test files

* update: separated adapter tests

* Update pnpm-lock.yaml

* fix: please tell me I actually fixed this

* fix: pnpm-lock merge conflict

* chore: lint

* fix: sveltekit pkg.json merge conflicts (hopefully)

* Delete pnpm-lock.yaml

* update: createSchema takes into account of rate-limit and secondaryStorage

* improve docs

* add drizzle returning id retriver

* chore: fix test script

---------

Co-authored-by: Bereket Engida <bekacru@gmail.com>
2025-04-11 09:04:49 +03:00
Bereket EngidaandGitHub ee705a5f26 fix: prisma schema generator should add @db.text for mysql and generate many fields (#718) 2024-12-02 12:01:54 +03:00
Bereket EngidaandGitHub 0775612256 feat: native adapter interfaces (#513) 2024-11-13 19:28:11 +03:00
Bereket EngidaandGitHub a573f941b1 fix: add mongodb id map and support array type gen for prisma (#243) 2024-10-19 14:33:49 +03:00
Bereket EngidaandGitHub 2953fe882d refactor: move cli to it's own pacakge (#176)
* refactor

* cleanup and more refactor

* test: cli

* chore: release v0.4.9-beta.12

* feat: kysley generate and orm migrations

* chore: release v0.4.9-beta.13

* test: generate

* test: change test snapshot file

* docs

* chore: lint

* fix: test

* chore: release v0.4.9-beta.14

* chore: release v0.4.9
2024-10-15 16:35:14 +03:00