@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,197 +0,0 @@
|
|
|
1
|
-
//#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/chunk-PK2W2SQ7.js
|
|
2
|
-
var stringOperators = [
|
|
3
|
-
"contains",
|
|
4
|
-
"starts with",
|
|
5
|
-
"ends with",
|
|
6
|
-
"not contains",
|
|
7
|
-
"not starts with",
|
|
8
|
-
"not ends with"
|
|
9
|
-
];
|
|
10
|
-
var arrayOperators = ["in", "not in"];
|
|
11
|
-
var operators = [
|
|
12
|
-
...[
|
|
13
|
-
"=",
|
|
14
|
-
"!=",
|
|
15
|
-
">",
|
|
16
|
-
">=",
|
|
17
|
-
"<",
|
|
18
|
-
"<=",
|
|
19
|
-
"is",
|
|
20
|
-
"is not"
|
|
21
|
-
],
|
|
22
|
-
...arrayOperators,
|
|
23
|
-
...stringOperators
|
|
24
|
-
];
|
|
25
|
-
function createBuilder(columns) {
|
|
26
|
-
function col(name) {
|
|
27
|
-
const out = columns[name];
|
|
28
|
-
if (!out) throw new Error(`[FumaDB] Invalid column name ${String(name)}`);
|
|
29
|
-
return out;
|
|
30
|
-
}
|
|
31
|
-
const builder = (...args) => {
|
|
32
|
-
if (args.length === 3) {
|
|
33
|
-
const [a, operator, b] = args;
|
|
34
|
-
if (!operators.includes(operator)) throw new Error(`Unsupported operator: ${operator}`);
|
|
35
|
-
return {
|
|
36
|
-
type: 2,
|
|
37
|
-
a: col(a),
|
|
38
|
-
b,
|
|
39
|
-
operator
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
type: 2,
|
|
44
|
-
a: col(args[0]),
|
|
45
|
-
operator: "=",
|
|
46
|
-
b: true
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
builder.isNull = (a) => builder(a, "is", null);
|
|
50
|
-
builder.isNotNull = (a) => builder(a, "is not", null);
|
|
51
|
-
builder.not = (condition) => {
|
|
52
|
-
if (typeof condition === "boolean") return !condition;
|
|
53
|
-
return {
|
|
54
|
-
type: 3,
|
|
55
|
-
item: condition
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
builder.or = (...conditions) => {
|
|
59
|
-
const out = {
|
|
60
|
-
type: 1,
|
|
61
|
-
items: []
|
|
62
|
-
};
|
|
63
|
-
for (const item of conditions) {
|
|
64
|
-
if (item === true) return true;
|
|
65
|
-
if (item === false) continue;
|
|
66
|
-
out.items.push(item);
|
|
67
|
-
}
|
|
68
|
-
if (out.items.length === 0) return false;
|
|
69
|
-
return out;
|
|
70
|
-
};
|
|
71
|
-
builder.and = (...conditions) => {
|
|
72
|
-
const out = {
|
|
73
|
-
type: 0,
|
|
74
|
-
items: []
|
|
75
|
-
};
|
|
76
|
-
for (const item of conditions) {
|
|
77
|
-
if (item === true) continue;
|
|
78
|
-
if (item === false) return false;
|
|
79
|
-
out.items.push(item);
|
|
80
|
-
}
|
|
81
|
-
if (out.items.length === 0) return true;
|
|
82
|
-
return out;
|
|
83
|
-
};
|
|
84
|
-
return builder;
|
|
85
|
-
}
|
|
86
|
-
function buildCondition(columns, input) {
|
|
87
|
-
return input(createBuilder(columns));
|
|
88
|
-
}
|
|
89
|
-
function isOrderByArray(v) {
|
|
90
|
-
return Array.isArray(v) && Array.isArray(v[0]);
|
|
91
|
-
}
|
|
92
|
-
function simplifyOrderBy(columns, orderBy) {
|
|
93
|
-
if (!orderBy || orderBy.length === 0) return;
|
|
94
|
-
if (!isOrderByArray(orderBy)) orderBy = [orderBy];
|
|
95
|
-
return orderBy.map(([name, value]) => {
|
|
96
|
-
const col = columns[name];
|
|
97
|
-
if (!col) throw new Error(`[FumaDB] unknown column name ${name}.`);
|
|
98
|
-
return [col, value];
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function buildFindOptions(table, { select = true, where, orderBy, join, ...options }) {
|
|
102
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
103
|
-
if (conditions === true) conditions = void 0;
|
|
104
|
-
if (conditions === false) return false;
|
|
105
|
-
return {
|
|
106
|
-
select,
|
|
107
|
-
where: conditions,
|
|
108
|
-
orderBy: simplifyOrderBy(table.columns, orderBy),
|
|
109
|
-
join: join ? buildJoin(table, join) : void 0,
|
|
110
|
-
...options
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
function buildJoin(table, fn) {
|
|
114
|
-
const compiled = [];
|
|
115
|
-
const builder = {};
|
|
116
|
-
for (const name in table.relations) {
|
|
117
|
-
const relation = table.relations[name];
|
|
118
|
-
builder[name] = (options = {}) => {
|
|
119
|
-
compiled.push({
|
|
120
|
-
relation,
|
|
121
|
-
options: buildFindOptions(relation.table, options)
|
|
122
|
-
});
|
|
123
|
-
delete builder[name];
|
|
124
|
-
return builder;
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
fn(builder);
|
|
128
|
-
return compiled;
|
|
129
|
-
}
|
|
130
|
-
function toORM(adapter) {
|
|
131
|
-
function toTable(name) {
|
|
132
|
-
const table = adapter.tables[name];
|
|
133
|
-
if (!table) throw new Error(`[FumaDB] Invalid table name ${name}.`);
|
|
134
|
-
return table;
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
internal: adapter,
|
|
138
|
-
async count(name, { where } = {}) {
|
|
139
|
-
const table = toTable(name);
|
|
140
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
141
|
-
if (conditions === true) conditions = void 0;
|
|
142
|
-
if (conditions === false) return 0;
|
|
143
|
-
return await adapter.count(table, { where: conditions });
|
|
144
|
-
},
|
|
145
|
-
async upsert(name, { where, ...options }) {
|
|
146
|
-
const table = toTable(name);
|
|
147
|
-
const conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
148
|
-
if (conditions === false) return;
|
|
149
|
-
await adapter.upsert(table, {
|
|
150
|
-
where: conditions === true ? void 0 : conditions,
|
|
151
|
-
...options
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
async create(name, values) {
|
|
155
|
-
const table = toTable(name);
|
|
156
|
-
return await adapter.create(table, values);
|
|
157
|
-
},
|
|
158
|
-
async createMany(name, values) {
|
|
159
|
-
const table = toTable(name);
|
|
160
|
-
return await adapter.createMany(table, values);
|
|
161
|
-
},
|
|
162
|
-
async deleteMany(name, { where }) {
|
|
163
|
-
const table = toTable(name);
|
|
164
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
165
|
-
if (conditions === true) conditions = void 0;
|
|
166
|
-
if (conditions === false) return;
|
|
167
|
-
await adapter.deleteMany(table, { where: conditions });
|
|
168
|
-
},
|
|
169
|
-
async findMany(name, options = {}) {
|
|
170
|
-
const table = toTable(name);
|
|
171
|
-
const compiledOptions = buildFindOptions(table, options);
|
|
172
|
-
if (compiledOptions === false) return [];
|
|
173
|
-
return await adapter.findMany(table, compiledOptions);
|
|
174
|
-
},
|
|
175
|
-
async findFirst(name, options) {
|
|
176
|
-
const table = toTable(name);
|
|
177
|
-
const compiledOptions = buildFindOptions(table, options);
|
|
178
|
-
if (compiledOptions === false) return null;
|
|
179
|
-
return await adapter.findFirst(table, compiledOptions);
|
|
180
|
-
},
|
|
181
|
-
async updateMany(name, { set, where }) {
|
|
182
|
-
const table = toTable(name);
|
|
183
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
184
|
-
if (conditions === true) conditions = void 0;
|
|
185
|
-
if (conditions === false) return;
|
|
186
|
-
return adapter.updateMany(table, {
|
|
187
|
-
set,
|
|
188
|
-
where: conditions
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
async transaction(run) {
|
|
192
|
-
return adapter.transaction(run);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
//#endregion
|
|
197
|
-
exports.toORM = toORM;
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
//#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/chunk-PK2W2SQ7.js
|
|
2
|
-
var stringOperators = [
|
|
3
|
-
"contains",
|
|
4
|
-
"starts with",
|
|
5
|
-
"ends with",
|
|
6
|
-
"not contains",
|
|
7
|
-
"not starts with",
|
|
8
|
-
"not ends with"
|
|
9
|
-
];
|
|
10
|
-
var arrayOperators = ["in", "not in"];
|
|
11
|
-
var operators = [
|
|
12
|
-
...[
|
|
13
|
-
"=",
|
|
14
|
-
"!=",
|
|
15
|
-
">",
|
|
16
|
-
">=",
|
|
17
|
-
"<",
|
|
18
|
-
"<=",
|
|
19
|
-
"is",
|
|
20
|
-
"is not"
|
|
21
|
-
],
|
|
22
|
-
...arrayOperators,
|
|
23
|
-
...stringOperators
|
|
24
|
-
];
|
|
25
|
-
function createBuilder(columns) {
|
|
26
|
-
function col(name) {
|
|
27
|
-
const out = columns[name];
|
|
28
|
-
if (!out) throw new Error(`[FumaDB] Invalid column name ${String(name)}`);
|
|
29
|
-
return out;
|
|
30
|
-
}
|
|
31
|
-
const builder = (...args) => {
|
|
32
|
-
if (args.length === 3) {
|
|
33
|
-
const [a, operator, b] = args;
|
|
34
|
-
if (!operators.includes(operator)) throw new Error(`Unsupported operator: ${operator}`);
|
|
35
|
-
return {
|
|
36
|
-
type: 2,
|
|
37
|
-
a: col(a),
|
|
38
|
-
b,
|
|
39
|
-
operator
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
type: 2,
|
|
44
|
-
a: col(args[0]),
|
|
45
|
-
operator: "=",
|
|
46
|
-
b: true
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
builder.isNull = (a) => builder(a, "is", null);
|
|
50
|
-
builder.isNotNull = (a) => builder(a, "is not", null);
|
|
51
|
-
builder.not = (condition) => {
|
|
52
|
-
if (typeof condition === "boolean") return !condition;
|
|
53
|
-
return {
|
|
54
|
-
type: 3,
|
|
55
|
-
item: condition
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
builder.or = (...conditions) => {
|
|
59
|
-
const out = {
|
|
60
|
-
type: 1,
|
|
61
|
-
items: []
|
|
62
|
-
};
|
|
63
|
-
for (const item of conditions) {
|
|
64
|
-
if (item === true) return true;
|
|
65
|
-
if (item === false) continue;
|
|
66
|
-
out.items.push(item);
|
|
67
|
-
}
|
|
68
|
-
if (out.items.length === 0) return false;
|
|
69
|
-
return out;
|
|
70
|
-
};
|
|
71
|
-
builder.and = (...conditions) => {
|
|
72
|
-
const out = {
|
|
73
|
-
type: 0,
|
|
74
|
-
items: []
|
|
75
|
-
};
|
|
76
|
-
for (const item of conditions) {
|
|
77
|
-
if (item === true) continue;
|
|
78
|
-
if (item === false) return false;
|
|
79
|
-
out.items.push(item);
|
|
80
|
-
}
|
|
81
|
-
if (out.items.length === 0) return true;
|
|
82
|
-
return out;
|
|
83
|
-
};
|
|
84
|
-
return builder;
|
|
85
|
-
}
|
|
86
|
-
function buildCondition(columns, input) {
|
|
87
|
-
return input(createBuilder(columns));
|
|
88
|
-
}
|
|
89
|
-
function isOrderByArray(v) {
|
|
90
|
-
return Array.isArray(v) && Array.isArray(v[0]);
|
|
91
|
-
}
|
|
92
|
-
function simplifyOrderBy(columns, orderBy) {
|
|
93
|
-
if (!orderBy || orderBy.length === 0) return;
|
|
94
|
-
if (!isOrderByArray(orderBy)) orderBy = [orderBy];
|
|
95
|
-
return orderBy.map(([name, value]) => {
|
|
96
|
-
const col = columns[name];
|
|
97
|
-
if (!col) throw new Error(`[FumaDB] unknown column name ${name}.`);
|
|
98
|
-
return [col, value];
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function buildFindOptions(table, { select = true, where, orderBy, join, ...options }) {
|
|
102
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
103
|
-
if (conditions === true) conditions = void 0;
|
|
104
|
-
if (conditions === false) return false;
|
|
105
|
-
return {
|
|
106
|
-
select,
|
|
107
|
-
where: conditions,
|
|
108
|
-
orderBy: simplifyOrderBy(table.columns, orderBy),
|
|
109
|
-
join: join ? buildJoin(table, join) : void 0,
|
|
110
|
-
...options
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
function buildJoin(table, fn) {
|
|
114
|
-
const compiled = [];
|
|
115
|
-
const builder = {};
|
|
116
|
-
for (const name in table.relations) {
|
|
117
|
-
const relation = table.relations[name];
|
|
118
|
-
builder[name] = (options = {}) => {
|
|
119
|
-
compiled.push({
|
|
120
|
-
relation,
|
|
121
|
-
options: buildFindOptions(relation.table, options)
|
|
122
|
-
});
|
|
123
|
-
delete builder[name];
|
|
124
|
-
return builder;
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
fn(builder);
|
|
128
|
-
return compiled;
|
|
129
|
-
}
|
|
130
|
-
function toORM(adapter) {
|
|
131
|
-
function toTable(name) {
|
|
132
|
-
const table = adapter.tables[name];
|
|
133
|
-
if (!table) throw new Error(`[FumaDB] Invalid table name ${name}.`);
|
|
134
|
-
return table;
|
|
135
|
-
}
|
|
136
|
-
return {
|
|
137
|
-
internal: adapter,
|
|
138
|
-
async count(name, { where } = {}) {
|
|
139
|
-
const table = toTable(name);
|
|
140
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
141
|
-
if (conditions === true) conditions = void 0;
|
|
142
|
-
if (conditions === false) return 0;
|
|
143
|
-
return await adapter.count(table, { where: conditions });
|
|
144
|
-
},
|
|
145
|
-
async upsert(name, { where, ...options }) {
|
|
146
|
-
const table = toTable(name);
|
|
147
|
-
const conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
148
|
-
if (conditions === false) return;
|
|
149
|
-
await adapter.upsert(table, {
|
|
150
|
-
where: conditions === true ? void 0 : conditions,
|
|
151
|
-
...options
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
async create(name, values) {
|
|
155
|
-
const table = toTable(name);
|
|
156
|
-
return await adapter.create(table, values);
|
|
157
|
-
},
|
|
158
|
-
async createMany(name, values) {
|
|
159
|
-
const table = toTable(name);
|
|
160
|
-
return await adapter.createMany(table, values);
|
|
161
|
-
},
|
|
162
|
-
async deleteMany(name, { where }) {
|
|
163
|
-
const table = toTable(name);
|
|
164
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
165
|
-
if (conditions === true) conditions = void 0;
|
|
166
|
-
if (conditions === false) return;
|
|
167
|
-
await adapter.deleteMany(table, { where: conditions });
|
|
168
|
-
},
|
|
169
|
-
async findMany(name, options = {}) {
|
|
170
|
-
const table = toTable(name);
|
|
171
|
-
const compiledOptions = buildFindOptions(table, options);
|
|
172
|
-
if (compiledOptions === false) return [];
|
|
173
|
-
return await adapter.findMany(table, compiledOptions);
|
|
174
|
-
},
|
|
175
|
-
async findFirst(name, options) {
|
|
176
|
-
const table = toTable(name);
|
|
177
|
-
const compiledOptions = buildFindOptions(table, options);
|
|
178
|
-
if (compiledOptions === false) return null;
|
|
179
|
-
return await adapter.findFirst(table, compiledOptions);
|
|
180
|
-
},
|
|
181
|
-
async updateMany(name, { set, where }) {
|
|
182
|
-
const table = toTable(name);
|
|
183
|
-
let conditions = where ? buildCondition(table.columns, where) : void 0;
|
|
184
|
-
if (conditions === true) conditions = void 0;
|
|
185
|
-
if (conditions === false) return;
|
|
186
|
-
return adapter.updateMany(table, {
|
|
187
|
-
set,
|
|
188
|
-
where: conditions
|
|
189
|
-
});
|
|
190
|
-
},
|
|
191
|
-
async transaction(run) {
|
|
192
|
-
return adapter.transaction(run);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
//#endregion
|
|
197
|
-
export { toORM };
|