@hot-updater/server 0.33.2 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.cjs +0 -2
- package/dist/adapters/drizzle.cjs +195 -2
- package/dist/adapters/drizzle.d.cts +7 -4
- package/dist/adapters/drizzle.d.mts +7 -4
- package/dist/adapters/drizzle.mjs +194 -2
- package/dist/adapters/drizzleLazyDB.cjs +53 -0
- package/dist/adapters/drizzleLazyDB.mjs +53 -0
- package/dist/adapters/kysely.cjs +154 -3
- package/dist/adapters/kysely.d.cts +18 -10
- package/dist/adapters/kysely.d.mts +18 -10
- package/dist/adapters/kysely.mjs +153 -3
- package/dist/adapters/mongodb.cjs +183 -2
- package/dist/adapters/mongodb.d.cts +5 -4
- package/dist/adapters/mongodb.d.mts +5 -4
- package/dist/adapters/mongodb.mjs +183 -2
- package/dist/adapters/prisma.cjs +200 -2
- package/dist/adapters/prisma.d.cts +9 -4
- package/dist/adapters/prisma.d.mts +9 -4
- package/dist/adapters/prisma.mjs +199 -2
- package/dist/db/bundleRows.cjs +82 -0
- package/dist/db/bundleRows.d.cts +33 -0
- package/dist/db/bundleRows.d.mts +33 -0
- package/dist/db/bundleRows.mjs +79 -0
- package/dist/db/fixedMigrator.cjs +136 -0
- package/dist/db/fixedMigrator.mjs +135 -0
- package/dist/db/index.cjs +17 -15
- package/dist/db/index.d.cts +3 -3
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +17 -15
- package/dist/db/pluginCore.cjs +13 -5
- package/dist/db/pluginCore.mjs +13 -5
- package/dist/db/schema/mongodb.cjs +17 -0
- package/dist/db/schema/mongodb.mjs +17 -0
- package/dist/db/schema/registry.cjs +23 -0
- package/dist/db/schema/registry.mjs +18 -0
- package/dist/db/schema/sql.cjs +84 -0
- package/dist/db/schema/sql.mjs +78 -0
- package/dist/db/schema/sqlMigrations.cjs +74 -0
- package/dist/db/schema/sqlMigrations.mjs +73 -0
- package/dist/db/schema/sqlOperations.cjs +27 -0
- package/dist/db/schema/sqlOperations.mjs +26 -0
- package/dist/db/schemaEnhancements.cjs +1 -152
- package/dist/db/schemaEnhancements.mjs +1 -149
- package/dist/db/schemaGenerators.cjs +222 -0
- package/dist/db/schemaGenerators.mjs +220 -0
- package/dist/db/schemaReadiness.cjs +23 -0
- package/dist/db/schemaReadiness.d.cts +8 -0
- package/dist/db/schemaReadiness.d.mts +8 -0
- package/dist/db/schemaReadiness.mjs +22 -0
- package/dist/db/types.cjs +10 -2
- package/dist/db/types.d.cts +58 -14
- package/dist/db/types.d.mts +58 -14
- package/dist/db/types.mjs +9 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +3 -2
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +2 -2
- package/dist/{packages/server/package.cjs → package.cjs} +1 -1
- package/dist/{packages/server/package.mjs → package.mjs} +1 -1
- package/dist/runtime.cjs +9 -2
- package/dist/runtime.mjs +9 -2
- package/dist/schema/dsl.cjs +86 -0
- package/dist/schema/dsl.mjs +73 -0
- package/dist/schema/index.cjs +13 -0
- package/dist/schema/index.mjs +13 -0
- package/dist/schema/settings.cjs +9 -0
- package/dist/schema/settings.mjs +9 -0
- package/dist/schema/types.cjs +6 -0
- package/dist/schema/types.mjs +5 -0
- package/dist/schema/v0_21_0.cjs +33 -18
- package/dist/schema/v0_21_0.mjs +32 -18
- package/dist/schema/v0_29_0.cjs +40 -20
- package/dist/schema/v0_29_0.mjs +39 -20
- package/dist/schema/v0_31_0.cjs +77 -43
- package/dist/schema/v0_31_0.mjs +75 -43
- package/dist/version.cjs +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +30 -16
- package/src/adapters/drizzle.spec.ts +75 -0
- package/src/adapters/drizzle.ts +328 -12
- package/src/adapters/drizzleLazyDB.ts +151 -0
- package/src/adapters/kysely.spec.ts +107 -0
- package/src/adapters/kysely.ts +349 -14
- package/src/adapters/mongodb.ts +298 -15
- package/src/adapters/prisma.ts +337 -12
- package/src/db/bundleRows.ts +140 -0
- package/src/db/fixedMigrator.spec.ts +89 -0
- package/src/db/fixedMigrator.ts +288 -0
- package/src/db/hotUpdaterSchema.ts +6 -0
- package/src/db/index.spec.ts +976 -13
- package/src/db/index.ts +37 -36
- package/src/db/pluginCore.spec.ts +17 -11
- package/src/db/pluginCore.ts +15 -6
- package/src/db/schema/definitions.ts +1 -0
- package/src/db/schema/mongodb.ts +26 -0
- package/src/db/schema/registry.ts +55 -0
- package/src/db/schema/sql.ts +200 -0
- package/src/db/schema/sqlMigrations.ts +219 -0
- package/src/db/schema/sqlOperations.ts +62 -0
- package/src/db/schema/types.ts +1 -0
- package/src/db/schemaEnhancements.ts +0 -405
- package/src/db/schemaGenerators.ts +382 -0
- package/src/db/schemaReadiness.ts +33 -0
- package/src/db/types.ts +69 -25
- package/src/runtime.spec.ts +70 -0
- package/src/runtime.ts +14 -2
- package/src/schema/dsl-all-versions.spec.ts +26 -0
- package/src/schema/dsl.ts +148 -0
- package/src/schema/index.ts +16 -0
- package/src/schema/settings.ts +15 -0
- package/src/schema/types.ts +73 -0
- package/src/schema/v0_21_0.ts +48 -18
- package/src/schema/v0_29_0.ts +58 -22
- package/src/schema/v0_31_0.spec.ts +73 -0
- package/src/schema/v0_31_0.ts +116 -54
- package/dist/_virtual/_rolldown/runtime.mjs +0 -6
- package/dist/calculatePagination.cjs +0 -25
- package/dist/calculatePagination.mjs +0 -25
- package/dist/db/ormCore.cjs +0 -577
- package/dist/db/ormCore.d.cts +0 -110
- package/dist/db/ormCore.d.mts +0 -110
- package/dist/db/ormCore.mjs +0 -575
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.cjs +0 -112
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.mjs +0 -108
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.cjs +0 -22
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.mjs +0 -18
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.cjs +0 -219
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.mjs +0 -214
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.cjs +0 -275
- package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.mjs +0 -270
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.cjs +0 -17
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.mjs +0 -13
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.cjs +0 -69
- package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.mjs +0 -65
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/column.cjs +0 -52
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/column.mjs +0 -52
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/entity.cjs +0 -16
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/entity.mjs +0 -15
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/pg-core/columns/enum.cjs +0 -7
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/pg-core/columns/enum.mjs +0 -7
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/conditions.cjs +0 -92
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/conditions.mjs +0 -78
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/select.cjs +0 -11
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/expressions/select.mjs +0 -10
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/sql.cjs +0 -383
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/sql/sql.mjs +0 -366
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/subquery.cjs +0 -17
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/subquery.mjs +0 -17
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.cjs +0 -60
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.mjs +0 -59
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.utils.cjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/table.utils.mjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/tracing.cjs +0 -6
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/tracing.mjs +0 -6
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/view-common.cjs +0 -4
- package/dist/node_modules/.pnpm/drizzle-orm@0.45.2_@cloudflare_workers-types@4.20260611.1_@electric-sql_pglite@0.4.1_@l_601a3995dfc55b0b7fac93cbe1e76579/node_modules/drizzle-orm/view-common.mjs +0 -4
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.cjs +0 -383
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.d.cts +0 -12
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.d.mts +0 -12
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/drizzle/index.mjs +0 -383
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/kysely/index.cjs +0 -4
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/kysely/index.mjs +0 -5
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.cjs +0 -339
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.d.cts +0 -70
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.d.mts +0 -70
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.mjs +0 -339
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-7PZK4ONR.cjs +0 -57
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-7PZK4ONR.mjs +0 -56
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-C6OTUURW.cjs +0 -330
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-C6OTUURW.mjs +0 -326
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-CHTIKPQU.cjs +0 -166
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-CHTIKPQU.mjs +0 -163
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-GUE4GMNC.cjs +0 -14
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-GUE4GMNC.mjs +0 -13
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LHHP6UVP.cjs +0 -24
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LHHP6UVP.mjs +0 -24
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LVCPMTAT.cjs +0 -1190
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-LVCPMTAT.mjs +0 -1189
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-PK2W2SQ7.cjs +0 -197
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-PK2W2SQ7.mjs +0 -197
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZEQMAIFI.cjs +0 -410
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZEQMAIFI.mjs +0 -400
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZOCGSAWS.cjs +0 -213
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/chunk-ZOCGSAWS.mjs +0 -212
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/create-tg0451Y_.d.cts +0 -285
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/create-tg0451Y_.d.mts +0 -285
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index-CMqePMTF.d.cts +0 -45
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index-CMqePMTF.d.mts +0 -45
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.cjs +0 -69
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.d.cts +0 -49
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.d.mts +0 -49
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/index.mjs +0 -67
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/query/index.d.cts +0 -156
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/query/index.d.mts +0 -156
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/schema/index.cjs +0 -1
- package/dist/node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk_credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/schema/index.mjs +0 -2
- package/src/db/ormCore.ts +0 -1059
- package/src/db/ormUpdateCheck.bench.ts +0 -262
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
const require_chunk_ZEQMAIFI = require("../../chunk-ZEQMAIFI.cjs");
|
|
2
|
-
const require_chunk_ZOCGSAWS = require("../../chunk-ZOCGSAWS.cjs");
|
|
3
|
-
const require_chunk_PK2W2SQ7 = require("../../chunk-PK2W2SQ7.cjs");
|
|
4
|
-
const require_chunk_GUE4GMNC = require("../../chunk-GUE4GMNC.cjs");
|
|
5
|
-
//#region ../../node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk+credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.js
|
|
6
|
-
var foreignKeyActionMap = {
|
|
7
|
-
"SET NULL": "SetNull",
|
|
8
|
-
CASCADE: "Cascade",
|
|
9
|
-
RESTRICT: "Restrict"
|
|
10
|
-
};
|
|
11
|
-
function generateSchema(schema, provider) {
|
|
12
|
-
function generateTable(table2) {
|
|
13
|
-
const code = [`model ${table2.names.prisma} {`];
|
|
14
|
-
for (const column2 of Object.values(table2.columns)) {
|
|
15
|
-
let map2 = function(name) {
|
|
16
|
-
if (column2.names.prisma === name) return;
|
|
17
|
-
attributes.push(`@map("${name}")`);
|
|
18
|
-
};
|
|
19
|
-
let type;
|
|
20
|
-
const attributes = [];
|
|
21
|
-
map2(provider === "mongodb" ? column2.names.mongodb : column2.names.sql);
|
|
22
|
-
switch (column2.type) {
|
|
23
|
-
case "uuid":
|
|
24
|
-
type = "String";
|
|
25
|
-
switch (provider) {
|
|
26
|
-
case "postgresql":
|
|
27
|
-
case "cockroachdb":
|
|
28
|
-
attributes.push("@db.Uuid");
|
|
29
|
-
break;
|
|
30
|
-
case "mssql":
|
|
31
|
-
attributes.push("@db.UniqueIdentifier");
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
break;
|
|
35
|
-
case "integer":
|
|
36
|
-
type = "Int";
|
|
37
|
-
break;
|
|
38
|
-
case "bigint":
|
|
39
|
-
type = "BigInt";
|
|
40
|
-
break;
|
|
41
|
-
case "bool":
|
|
42
|
-
type = "Boolean";
|
|
43
|
-
break;
|
|
44
|
-
case "json":
|
|
45
|
-
type = "Json";
|
|
46
|
-
break;
|
|
47
|
-
case "timestamp":
|
|
48
|
-
case "date":
|
|
49
|
-
type = "DateTime";
|
|
50
|
-
break;
|
|
51
|
-
case "decimal":
|
|
52
|
-
type = "Decimal";
|
|
53
|
-
break;
|
|
54
|
-
case "binary":
|
|
55
|
-
type = "Bytes";
|
|
56
|
-
break;
|
|
57
|
-
default:
|
|
58
|
-
type = "String";
|
|
59
|
-
if (column2.type.startsWith("varchar")) {
|
|
60
|
-
const parsed = require_chunk_GUE4GMNC.parseVarchar(column2.type);
|
|
61
|
-
switch (provider) {
|
|
62
|
-
case "cockroachdb":
|
|
63
|
-
attributes.push(`@db.String(${parsed})`);
|
|
64
|
-
break;
|
|
65
|
-
case "mysql":
|
|
66
|
-
case "postgresql":
|
|
67
|
-
case "mssql":
|
|
68
|
-
attributes.push(`@db.VarChar(${parsed})`);
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (column2 instanceof require_chunk_ZEQMAIFI.IdColumn) attributes.push("@id");
|
|
74
|
-
if (column2.isUnique) attributes.push("@unique");
|
|
75
|
-
if (column2.default) {
|
|
76
|
-
if ("value" in column2.default) attributes.push(`@default(${JSON.stringify(column2.default.value)})`);
|
|
77
|
-
else if (column2.default.runtime === "auto") attributes.push("@default(cuid())");
|
|
78
|
-
else if (column2.default.runtime === "now") attributes.push("@default(now())");
|
|
79
|
-
}
|
|
80
|
-
if (column2.isNullable) type += "?";
|
|
81
|
-
code.push(` ${[
|
|
82
|
-
column2.names.prisma,
|
|
83
|
-
type,
|
|
84
|
-
...attributes
|
|
85
|
-
].join(" ")}`);
|
|
86
|
-
}
|
|
87
|
-
for (const relation of Object.values(table2.relations)) {
|
|
88
|
-
let type = relation.table.names.prisma;
|
|
89
|
-
if (relation.implied) {
|
|
90
|
-
if (relation.type === "many") type += "[]";
|
|
91
|
-
else type += "?";
|
|
92
|
-
code.push(` ${relation.name} ${type} @relation("${relation.id}")`);
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
const fields = [];
|
|
96
|
-
const references = [];
|
|
97
|
-
let isOptional = false;
|
|
98
|
-
for (const [left, right] of relation.on) {
|
|
99
|
-
const col = table2.columns[left];
|
|
100
|
-
const refCol = relation.table.columns[right];
|
|
101
|
-
if (col.isNullable) isOptional = true;
|
|
102
|
-
fields.push(col.names.prisma);
|
|
103
|
-
references.push(refCol.names.prisma);
|
|
104
|
-
}
|
|
105
|
-
if (isOptional) type += "?";
|
|
106
|
-
const config = relation.foreignKey;
|
|
107
|
-
code.push(` ${relation.name} ${type} @relation(${[
|
|
108
|
-
`"${relation.id}"`,
|
|
109
|
-
`fields: [${fields.join(", ")}]`,
|
|
110
|
-
`references: [${references.join(", ")}]`,
|
|
111
|
-
`onUpdate: ${foreignKeyActionMap[config.onUpdate]}`,
|
|
112
|
-
`onDelete: ${foreignKeyActionMap[config.onDelete]}`
|
|
113
|
-
].join(", ")})`);
|
|
114
|
-
}
|
|
115
|
-
for (const con of table2.getUniqueConstraints("table")) code.push(`@@unique([${con.columns.map((col) => col.names.prisma).join(", ")}])`);
|
|
116
|
-
function mapTable(name) {
|
|
117
|
-
if (table2.names.prisma === name) return;
|
|
118
|
-
code.push(`@@map("${name}")`);
|
|
119
|
-
}
|
|
120
|
-
mapTable(provider === "mongodb" ? table2.names.mongodb : table2.names.sql);
|
|
121
|
-
code.push("}");
|
|
122
|
-
return code.join("\n");
|
|
123
|
-
}
|
|
124
|
-
const lines = [];
|
|
125
|
-
for (const t of Object.values(schema.tables)) lines.push(generateTable(t));
|
|
126
|
-
return lines.join("\n\n");
|
|
127
|
-
}
|
|
128
|
-
function buildWhere(condition) {
|
|
129
|
-
if (condition.type === 2) {
|
|
130
|
-
const column2 = condition.a;
|
|
131
|
-
const value = condition.b;
|
|
132
|
-
const name = column2.names.prisma;
|
|
133
|
-
if (value instanceof require_chunk_ZEQMAIFI.Column) throw new Error("Prisma adapter does not support comparing against another column at the moment.");
|
|
134
|
-
switch (condition.operator) {
|
|
135
|
-
case "=":
|
|
136
|
-
case "is": return { [name]: value };
|
|
137
|
-
case "!=":
|
|
138
|
-
case "is not": return { [name]: { not: value } };
|
|
139
|
-
case ">": return { [name]: { gt: value } };
|
|
140
|
-
case ">=": return { [name]: { gte: value } };
|
|
141
|
-
case "<": return { [name]: { lt: value } };
|
|
142
|
-
case "<=": return { [name]: { lte: value } };
|
|
143
|
-
case "in": return { [name]: { in: value } };
|
|
144
|
-
case "not in": return { [name]: { notIn: value } };
|
|
145
|
-
case "starts with": return { [name]: { startsWith: value } };
|
|
146
|
-
case "not starts with": return { NOT: { [name]: { startsWith: value } } };
|
|
147
|
-
case "contains": return { [name]: { contains: value } };
|
|
148
|
-
case "not contains": return { NOT: { [name]: { contains: value } } };
|
|
149
|
-
case "ends with": return { [name]: { endsWith: value } };
|
|
150
|
-
case "not ends with": return { NOT: { [name]: { endsWith: value } } };
|
|
151
|
-
default: throw new Error(`Unsupported operator: ${condition.operator}`);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (condition.type === 0) return { AND: condition.items.map(buildWhere) };
|
|
155
|
-
if (condition.type === 3) return { NOT: condition };
|
|
156
|
-
return { OR: condition.items.map(buildWhere) };
|
|
157
|
-
}
|
|
158
|
-
function mapSelect(select, table2) {
|
|
159
|
-
const out = {};
|
|
160
|
-
if (select === true) for (const col of Object.values(table2.columns)) out[col.names.prisma] = true;
|
|
161
|
-
else for (const col of select) out[table2.columns[col].names.prisma] = true;
|
|
162
|
-
return out;
|
|
163
|
-
}
|
|
164
|
-
function mapOrderBy(orderBy) {
|
|
165
|
-
const out = {};
|
|
166
|
-
for (const [col, mode] of orderBy) out[col.names.prisma] = mode;
|
|
167
|
-
return out;
|
|
168
|
-
}
|
|
169
|
-
function mapResult(result, table2) {
|
|
170
|
-
const out = {};
|
|
171
|
-
for (const k in result) {
|
|
172
|
-
const value = result[k];
|
|
173
|
-
if (k in table2.relations) {
|
|
174
|
-
const relation = table2.relations[k];
|
|
175
|
-
if (relation.type === "many") out[k] = value.map((v) => mapResult(v, relation.table));
|
|
176
|
-
else out[k] = value ? mapResult(value, relation.table) : null;
|
|
177
|
-
continue;
|
|
178
|
-
}
|
|
179
|
-
const col = table2.getColumnByName(k, "prisma");
|
|
180
|
-
if (col) out[col.ormName] = value;
|
|
181
|
-
}
|
|
182
|
-
return out;
|
|
183
|
-
}
|
|
184
|
-
function fromPrisma(schema, config) {
|
|
185
|
-
const { provider, prisma, relationMode = provider === "mongodb" ? "prisma" : "foreign-keys", db: internalClient, isTransaction = false } = config;
|
|
186
|
-
async function initMongoDB() {
|
|
187
|
-
if (!internalClient || isTransaction) return;
|
|
188
|
-
const db = internalClient.db();
|
|
189
|
-
async function initCollection(table2) {
|
|
190
|
-
const collection = db.collection(table2.names.mongodb);
|
|
191
|
-
const indexes = await collection.indexes();
|
|
192
|
-
for (const index of indexes) {
|
|
193
|
-
if (!index.unique || !index.name || index.sparse) continue;
|
|
194
|
-
await collection.dropIndex(index.name);
|
|
195
|
-
await collection.createIndex(index.key, {
|
|
196
|
-
name: index.name,
|
|
197
|
-
unique: true,
|
|
198
|
-
sparse: true
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
await Promise.all(Object.values(schema.tables).map(initCollection));
|
|
203
|
-
}
|
|
204
|
-
const init = initMongoDB();
|
|
205
|
-
function createFindOptions(table2, v) {
|
|
206
|
-
const where = v.where ? buildWhere(v.where) : void 0;
|
|
207
|
-
const select = mapSelect(v.select, table2);
|
|
208
|
-
if (v.join) for (const { relation, options: joinOptions } of v.join) {
|
|
209
|
-
if (joinOptions === false) continue;
|
|
210
|
-
select[relation.name] = createFindOptions(relation.table, joinOptions);
|
|
211
|
-
}
|
|
212
|
-
return {
|
|
213
|
-
where,
|
|
214
|
-
select,
|
|
215
|
-
skip: v.offset,
|
|
216
|
-
take: v.limit,
|
|
217
|
-
orderBy: v.orderBy ? mapOrderBy(v.orderBy) : void 0
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
function mapValues(table2, values, generateDefault = false) {
|
|
221
|
-
const out = {};
|
|
222
|
-
for (const col of Object.values(table2.columns)) {
|
|
223
|
-
let value = values[col.ormName];
|
|
224
|
-
if (value === void 0 && generateDefault) value = col.generateDefaultValue();
|
|
225
|
-
out[col.names.prisma] = value;
|
|
226
|
-
}
|
|
227
|
-
return out;
|
|
228
|
-
}
|
|
229
|
-
return require_chunk_PK2W2SQ7.toORM({
|
|
230
|
-
tables: schema.tables,
|
|
231
|
-
async count(table2, v) {
|
|
232
|
-
await init;
|
|
233
|
-
return (await prisma[table2.names.prisma].count({
|
|
234
|
-
select: { _all: true },
|
|
235
|
-
where: v.where ? buildWhere(v.where) : void 0
|
|
236
|
-
}))._all;
|
|
237
|
-
},
|
|
238
|
-
async findFirst(table2, v) {
|
|
239
|
-
await init;
|
|
240
|
-
const options = createFindOptions(table2, v);
|
|
241
|
-
delete options.take;
|
|
242
|
-
const result = await prisma[table2.names.prisma].findFirst({
|
|
243
|
-
...options,
|
|
244
|
-
where: options.where
|
|
245
|
-
});
|
|
246
|
-
if (result) return mapResult(result, table2);
|
|
247
|
-
return null;
|
|
248
|
-
},
|
|
249
|
-
async findMany(table2, v) {
|
|
250
|
-
await init;
|
|
251
|
-
return (await prisma[table2.names.prisma].findMany(createFindOptions(table2, v))).map((v2) => mapResult(v2, table2));
|
|
252
|
-
},
|
|
253
|
-
async updateMany(table2, v) {
|
|
254
|
-
await init;
|
|
255
|
-
const where = v.where ? buildWhere(v.where) : void 0;
|
|
256
|
-
await prisma[table2.names.prisma].updateMany({
|
|
257
|
-
where,
|
|
258
|
-
data: v.set
|
|
259
|
-
});
|
|
260
|
-
},
|
|
261
|
-
async create(table2, values) {
|
|
262
|
-
await init;
|
|
263
|
-
if (relationMode === "prisma") await Promise.all(table2.foreignKeys.map((key) => require_chunk_ZOCGSAWS.checkForeignKeyOnInsert(this, key, [values])));
|
|
264
|
-
values = mapValues(table2, values, true);
|
|
265
|
-
return mapResult(await prisma[table2.names.prisma].create({ data: values }), table2);
|
|
266
|
-
},
|
|
267
|
-
async createMany(table2, values) {
|
|
268
|
-
await init;
|
|
269
|
-
const idField = table2.getIdColumn().names.prisma;
|
|
270
|
-
if (relationMode === "prisma") await Promise.all(table2.foreignKeys.map((key) => require_chunk_ZOCGSAWS.checkForeignKeyOnInsert(this, key, values)));
|
|
271
|
-
values = values.map((value) => mapValues(table2, value, true));
|
|
272
|
-
await prisma[table2.names.prisma].createMany({ data: values });
|
|
273
|
-
return values.map((value) => ({ _id: value[idField] }));
|
|
274
|
-
},
|
|
275
|
-
async deleteMany(table2, v) {
|
|
276
|
-
await init;
|
|
277
|
-
const where = v.where ? buildWhere(v.where) : void 0;
|
|
278
|
-
await prisma[table2.names.prisma].deleteMany({ where });
|
|
279
|
-
},
|
|
280
|
-
async upsert(table2, { where, ...v }) {
|
|
281
|
-
await init;
|
|
282
|
-
await prisma[table2.names.prisma].upsert({
|
|
283
|
-
where: where ? buildWhere(where) : {},
|
|
284
|
-
create: mapValues(table2, v.create, true),
|
|
285
|
-
update: mapValues(table2, v.update)
|
|
286
|
-
});
|
|
287
|
-
},
|
|
288
|
-
async transaction(run) {
|
|
289
|
-
await init;
|
|
290
|
-
return prisma.$transaction((tx) => run(fromPrisma(schema, {
|
|
291
|
-
...config,
|
|
292
|
-
isTransaction: true,
|
|
293
|
-
prisma: tx
|
|
294
|
-
})));
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
function prismaAdapter(options) {
|
|
299
|
-
const config = options;
|
|
300
|
-
const settingsModel = (namespace) => `private_${namespace}_settings`;
|
|
301
|
-
return {
|
|
302
|
-
name: "prisma",
|
|
303
|
-
createORM(schema) {
|
|
304
|
-
return fromPrisma(schema, config);
|
|
305
|
-
},
|
|
306
|
-
async getSchemaVersion() {
|
|
307
|
-
const prisma = config.prisma;
|
|
308
|
-
const settings = settingsModel(this.namespace);
|
|
309
|
-
if (!(settings in prisma)) return;
|
|
310
|
-
let result = await prisma[settings].findFirst({ where: { key: "version" } });
|
|
311
|
-
if (!result) try {
|
|
312
|
-
result = await prisma[settings].create({ data: { key: "version" } });
|
|
313
|
-
} catch {
|
|
314
|
-
result = await prisma[settings].findFirst({ where: { key: "version" } });
|
|
315
|
-
}
|
|
316
|
-
return result?.value;
|
|
317
|
-
},
|
|
318
|
-
generateSchema(schema, name) {
|
|
319
|
-
const settings = settingsModel(this.namespace);
|
|
320
|
-
const internalTable = require_chunk_ZEQMAIFI.table(settings, {
|
|
321
|
-
key: require_chunk_ZEQMAIFI.idColumn("key", "varchar(255)"),
|
|
322
|
-
value: require_chunk_ZEQMAIFI.column("value", "string").defaultTo(schema.version)
|
|
323
|
-
});
|
|
324
|
-
internalTable.ormName = settings;
|
|
325
|
-
return {
|
|
326
|
-
code: generateSchema({
|
|
327
|
-
...schema,
|
|
328
|
-
tables: {
|
|
329
|
-
...schema.tables,
|
|
330
|
-
[settings]: internalTable
|
|
331
|
-
}
|
|
332
|
-
}, config.provider),
|
|
333
|
-
path: `./prisma/schema/${name}.prisma`
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
|
-
//#endregion
|
|
339
|
-
exports.prismaAdapter = prismaAdapter;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { FumaDBAdapter, Provider } from "../../index-CMqePMTF.cjs";
|
|
2
|
-
import { MongoClient } from "mongodb";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk+credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.d.ts
|
|
5
|
-
type PrismaClient = Record<string, {
|
|
6
|
-
count: (options: {
|
|
7
|
-
select: Record<string, unknown>;
|
|
8
|
-
where?: object;
|
|
9
|
-
}) => Promise<Record<string, number>>;
|
|
10
|
-
upsert: (options: {
|
|
11
|
-
where: object;
|
|
12
|
-
update: Record<string, unknown>;
|
|
13
|
-
create: Record<string, unknown>;
|
|
14
|
-
}) => Promise<void>;
|
|
15
|
-
create: (options: {
|
|
16
|
-
data: Record<string, unknown>;
|
|
17
|
-
}) => Promise<Record<string, unknown>>;
|
|
18
|
-
createMany: (options: {
|
|
19
|
-
data: Record<string, unknown>[];
|
|
20
|
-
}) => Promise<void>;
|
|
21
|
-
delete: (options: {
|
|
22
|
-
where: object;
|
|
23
|
-
}) => Promise<Record<string, unknown>>;
|
|
24
|
-
deleteMany: (options: {
|
|
25
|
-
where?: object;
|
|
26
|
-
}) => Promise<void>;
|
|
27
|
-
findFirst: (options: {
|
|
28
|
-
where: object;
|
|
29
|
-
select?: Record<string, unknown>;
|
|
30
|
-
orderBy?: OrderBy | OrderBy[];
|
|
31
|
-
skip?: number;
|
|
32
|
-
}) => Promise<Record<string, unknown> | null>;
|
|
33
|
-
findMany: (options: {
|
|
34
|
-
where?: object;
|
|
35
|
-
select?: Record<string, unknown>;
|
|
36
|
-
orderBy?: OrderBy | OrderBy[];
|
|
37
|
-
skip?: number;
|
|
38
|
-
take?: number;
|
|
39
|
-
}) => Promise<Record<string, unknown>[]>;
|
|
40
|
-
updateMany: (options: {
|
|
41
|
-
where?: object;
|
|
42
|
-
data: Record<string, unknown>;
|
|
43
|
-
}) => Promise<void>;
|
|
44
|
-
}> & {
|
|
45
|
-
$transaction: <T>(v: (tx: PrismaClient) => T | Promise<T>) => Promise<T>;
|
|
46
|
-
};
|
|
47
|
-
type OrderBy = {
|
|
48
|
-
[k: string]: "asc" | "desc" | OrderBy;
|
|
49
|
-
};
|
|
50
|
-
interface PrismaConfig {
|
|
51
|
-
provider: Provider;
|
|
52
|
-
prisma: PrismaClient;
|
|
53
|
-
/**
|
|
54
|
-
* The relation mode you're using, see https://prisma.io/docs/orm/prisma-schema/data-model/relations/relation-mode.
|
|
55
|
-
*
|
|
56
|
-
* Default to foreign keys on SQL databases, and `prisma` on MongoDB.
|
|
57
|
-
*/
|
|
58
|
-
relationMode?: "prisma" | "foreign-keys";
|
|
59
|
-
/**
|
|
60
|
-
* Underlying database instance, highly recommended to provide so FumaDB can optimize some operations & indexes.
|
|
61
|
-
*
|
|
62
|
-
* supported: MongoDB
|
|
63
|
-
*/
|
|
64
|
-
db?: MongoClient;
|
|
65
|
-
}
|
|
66
|
-
declare function prismaAdapter(options: Omit<PrismaConfig, "prisma"> & {
|
|
67
|
-
prisma: unknown;
|
|
68
|
-
}): FumaDBAdapter;
|
|
69
|
-
//#endregion
|
|
70
|
-
export { prismaAdapter };
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { FumaDBAdapter, Provider } from "../../index-CMqePMTF.mjs";
|
|
2
|
-
import { MongoClient } from "mongodb";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/fumadb@0.2.2_mongodb@6.20.0_@aws-sdk+credential-providers@3.1066.0_socks@2.8.9__prisma@_ee79457f0e32f18f0beb5c2db02e4f73/node_modules/fumadb/dist/adapters/prisma/index.d.ts
|
|
5
|
-
type PrismaClient = Record<string, {
|
|
6
|
-
count: (options: {
|
|
7
|
-
select: Record<string, unknown>;
|
|
8
|
-
where?: object;
|
|
9
|
-
}) => Promise<Record<string, number>>;
|
|
10
|
-
upsert: (options: {
|
|
11
|
-
where: object;
|
|
12
|
-
update: Record<string, unknown>;
|
|
13
|
-
create: Record<string, unknown>;
|
|
14
|
-
}) => Promise<void>;
|
|
15
|
-
create: (options: {
|
|
16
|
-
data: Record<string, unknown>;
|
|
17
|
-
}) => Promise<Record<string, unknown>>;
|
|
18
|
-
createMany: (options: {
|
|
19
|
-
data: Record<string, unknown>[];
|
|
20
|
-
}) => Promise<void>;
|
|
21
|
-
delete: (options: {
|
|
22
|
-
where: object;
|
|
23
|
-
}) => Promise<Record<string, unknown>>;
|
|
24
|
-
deleteMany: (options: {
|
|
25
|
-
where?: object;
|
|
26
|
-
}) => Promise<void>;
|
|
27
|
-
findFirst: (options: {
|
|
28
|
-
where: object;
|
|
29
|
-
select?: Record<string, unknown>;
|
|
30
|
-
orderBy?: OrderBy | OrderBy[];
|
|
31
|
-
skip?: number;
|
|
32
|
-
}) => Promise<Record<string, unknown> | null>;
|
|
33
|
-
findMany: (options: {
|
|
34
|
-
where?: object;
|
|
35
|
-
select?: Record<string, unknown>;
|
|
36
|
-
orderBy?: OrderBy | OrderBy[];
|
|
37
|
-
skip?: number;
|
|
38
|
-
take?: number;
|
|
39
|
-
}) => Promise<Record<string, unknown>[]>;
|
|
40
|
-
updateMany: (options: {
|
|
41
|
-
where?: object;
|
|
42
|
-
data: Record<string, unknown>;
|
|
43
|
-
}) => Promise<void>;
|
|
44
|
-
}> & {
|
|
45
|
-
$transaction: <T>(v: (tx: PrismaClient) => T | Promise<T>) => Promise<T>;
|
|
46
|
-
};
|
|
47
|
-
type OrderBy = {
|
|
48
|
-
[k: string]: "asc" | "desc" | OrderBy;
|
|
49
|
-
};
|
|
50
|
-
interface PrismaConfig {
|
|
51
|
-
provider: Provider;
|
|
52
|
-
prisma: PrismaClient;
|
|
53
|
-
/**
|
|
54
|
-
* The relation mode you're using, see https://prisma.io/docs/orm/prisma-schema/data-model/relations/relation-mode.
|
|
55
|
-
*
|
|
56
|
-
* Default to foreign keys on SQL databases, and `prisma` on MongoDB.
|
|
57
|
-
*/
|
|
58
|
-
relationMode?: "prisma" | "foreign-keys";
|
|
59
|
-
/**
|
|
60
|
-
* Underlying database instance, highly recommended to provide so FumaDB can optimize some operations & indexes.
|
|
61
|
-
*
|
|
62
|
-
* supported: MongoDB
|
|
63
|
-
*/
|
|
64
|
-
db?: MongoClient;
|
|
65
|
-
}
|
|
66
|
-
declare function prismaAdapter(options: Omit<PrismaConfig, "prisma"> & {
|
|
67
|
-
prisma: unknown;
|
|
68
|
-
}): FumaDBAdapter;
|
|
69
|
-
//#endregion
|
|
70
|
-
export { prismaAdapter };
|