@hot-updater/server 0.33.1 → 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.
Files changed (198) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +0 -2
  2. package/dist/adapters/drizzle.cjs +195 -2
  3. package/dist/adapters/drizzle.d.cts +7 -4
  4. package/dist/adapters/drizzle.d.mts +7 -4
  5. package/dist/adapters/drizzle.mjs +194 -2
  6. package/dist/adapters/drizzleLazyDB.cjs +53 -0
  7. package/dist/adapters/drizzleLazyDB.mjs +53 -0
  8. package/dist/adapters/kysely.cjs +154 -3
  9. package/dist/adapters/kysely.d.cts +18 -10
  10. package/dist/adapters/kysely.d.mts +18 -10
  11. package/dist/adapters/kysely.mjs +153 -3
  12. package/dist/adapters/mongodb.cjs +183 -2
  13. package/dist/adapters/mongodb.d.cts +5 -4
  14. package/dist/adapters/mongodb.d.mts +5 -4
  15. package/dist/adapters/mongodb.mjs +183 -2
  16. package/dist/adapters/prisma.cjs +200 -2
  17. package/dist/adapters/prisma.d.cts +9 -4
  18. package/dist/adapters/prisma.d.mts +9 -4
  19. package/dist/adapters/prisma.mjs +199 -2
  20. package/dist/db/bundleRows.cjs +82 -0
  21. package/dist/db/bundleRows.d.cts +33 -0
  22. package/dist/db/bundleRows.d.mts +33 -0
  23. package/dist/db/bundleRows.mjs +79 -0
  24. package/dist/db/fixedMigrator.cjs +136 -0
  25. package/dist/db/fixedMigrator.mjs +135 -0
  26. package/dist/db/index.cjs +17 -15
  27. package/dist/db/index.d.cts +3 -3
  28. package/dist/db/index.d.mts +3 -3
  29. package/dist/db/index.mjs +17 -15
  30. package/dist/db/pluginCore.cjs +13 -5
  31. package/dist/db/pluginCore.mjs +13 -5
  32. package/dist/db/schema/mongodb.cjs +17 -0
  33. package/dist/db/schema/mongodb.mjs +17 -0
  34. package/dist/db/schema/registry.cjs +23 -0
  35. package/dist/db/schema/registry.mjs +18 -0
  36. package/dist/db/schema/sql.cjs +84 -0
  37. package/dist/db/schema/sql.mjs +78 -0
  38. package/dist/db/schema/sqlMigrations.cjs +74 -0
  39. package/dist/db/schema/sqlMigrations.mjs +73 -0
  40. package/dist/db/schema/sqlOperations.cjs +27 -0
  41. package/dist/db/schema/sqlOperations.mjs +26 -0
  42. package/dist/db/schemaEnhancements.cjs +1 -152
  43. package/dist/db/schemaEnhancements.mjs +1 -149
  44. package/dist/db/schemaGenerators.cjs +222 -0
  45. package/dist/db/schemaGenerators.mjs +220 -0
  46. package/dist/db/schemaReadiness.cjs +23 -0
  47. package/dist/db/schemaReadiness.d.cts +8 -0
  48. package/dist/db/schemaReadiness.d.mts +8 -0
  49. package/dist/db/schemaReadiness.mjs +22 -0
  50. package/dist/db/types.cjs +10 -2
  51. package/dist/db/types.d.cts +58 -14
  52. package/dist/db/types.d.mts +58 -14
  53. package/dist/db/types.mjs +9 -1
  54. package/dist/index.cjs +2 -2
  55. package/dist/index.d.cts +3 -2
  56. package/dist/index.d.mts +3 -2
  57. package/dist/index.mjs +2 -2
  58. package/dist/{packages/server/package.cjs → package.cjs} +1 -1
  59. package/dist/{packages/server/package.mjs → package.mjs} +1 -1
  60. package/dist/runtime.cjs +9 -2
  61. package/dist/runtime.mjs +9 -2
  62. package/dist/schema/dsl.cjs +86 -0
  63. package/dist/schema/dsl.mjs +73 -0
  64. package/dist/schema/index.cjs +13 -0
  65. package/dist/schema/index.mjs +13 -0
  66. package/dist/schema/settings.cjs +9 -0
  67. package/dist/schema/settings.mjs +9 -0
  68. package/dist/schema/types.cjs +6 -0
  69. package/dist/schema/types.mjs +5 -0
  70. package/dist/schema/v0_21_0.cjs +33 -18
  71. package/dist/schema/v0_21_0.mjs +32 -18
  72. package/dist/schema/v0_29_0.cjs +40 -20
  73. package/dist/schema/v0_29_0.mjs +39 -20
  74. package/dist/schema/v0_31_0.cjs +77 -43
  75. package/dist/schema/v0_31_0.mjs +75 -43
  76. package/dist/version.cjs +1 -1
  77. package/dist/version.mjs +1 -1
  78. package/package.json +30 -16
  79. package/src/adapters/drizzle.spec.ts +75 -0
  80. package/src/adapters/drizzle.ts +328 -12
  81. package/src/adapters/drizzleLazyDB.ts +151 -0
  82. package/src/adapters/kysely.spec.ts +107 -0
  83. package/src/adapters/kysely.ts +349 -14
  84. package/src/adapters/mongodb.ts +298 -15
  85. package/src/adapters/prisma.ts +337 -12
  86. package/src/db/bundleRows.ts +140 -0
  87. package/src/db/fixedMigrator.spec.ts +89 -0
  88. package/src/db/fixedMigrator.ts +288 -0
  89. package/src/db/hotUpdaterSchema.ts +6 -0
  90. package/src/db/index.spec.ts +976 -13
  91. package/src/db/index.ts +37 -36
  92. package/src/db/pluginCore.spec.ts +17 -11
  93. package/src/db/pluginCore.ts +15 -6
  94. package/src/db/schema/definitions.ts +1 -0
  95. package/src/db/schema/mongodb.ts +26 -0
  96. package/src/db/schema/registry.ts +55 -0
  97. package/src/db/schema/sql.ts +200 -0
  98. package/src/db/schema/sqlMigrations.ts +219 -0
  99. package/src/db/schema/sqlOperations.ts +62 -0
  100. package/src/db/schema/types.ts +1 -0
  101. package/src/db/schemaEnhancements.ts +0 -405
  102. package/src/db/schemaGenerators.ts +382 -0
  103. package/src/db/schemaReadiness.ts +33 -0
  104. package/src/db/types.ts +69 -25
  105. package/src/runtime.spec.ts +70 -0
  106. package/src/runtime.ts +14 -2
  107. package/src/schema/dsl-all-versions.spec.ts +26 -0
  108. package/src/schema/dsl.ts +148 -0
  109. package/src/schema/index.ts +16 -0
  110. package/src/schema/settings.ts +15 -0
  111. package/src/schema/types.ts +73 -0
  112. package/src/schema/v0_21_0.ts +48 -18
  113. package/src/schema/v0_29_0.ts +58 -22
  114. package/src/schema/v0_31_0.spec.ts +73 -0
  115. package/src/schema/v0_31_0.ts +116 -54
  116. package/dist/_virtual/_rolldown/runtime.mjs +0 -6
  117. package/dist/calculatePagination.cjs +0 -25
  118. package/dist/calculatePagination.mjs +0 -25
  119. package/dist/db/ormCore.cjs +0 -577
  120. package/dist/db/ormCore.d.cts +0 -110
  121. package/dist/db/ormCore.d.mts +0 -110
  122. package/dist/db/ormCore.mjs +0 -575
  123. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.cjs +0 -112
  124. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.mjs +0 -108
  125. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.cjs +0 -22
  126. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.mjs +0 -18
  127. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.cjs +0 -219
  128. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.mjs +0 -214
  129. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.cjs +0 -275
  130. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.mjs +0 -270
  131. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.cjs +0 -17
  132. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.mjs +0 -13
  133. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.cjs +0 -69
  134. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.mjs +0 -65
  135. 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
  136. 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
  137. 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
  138. 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
  139. 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
  140. 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
  141. 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
  142. 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
  143. 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
  144. 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
  145. 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
  146. 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
  147. 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
  148. 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
  149. 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
  150. 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
  151. 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
  152. 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
  153. 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
  154. 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
  155. 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
  156. 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
  157. 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
  158. 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
  159. 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
  160. 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
  161. 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
  162. 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
  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/adapters/prisma/index.cjs +0 -339
  164. 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
  165. 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
  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/adapters/prisma/index.mjs +0 -339
  167. 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
  168. 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
  169. 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
  170. 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
  171. 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
  172. 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
  173. 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
  174. 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
  175. 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
  176. 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
  177. 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
  178. 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
  179. 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
  180. 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
  181. 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
  182. 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
  183. 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
  184. 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
  185. 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
  186. 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
  187. 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
  188. 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
  189. 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
  190. 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
  191. 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
  192. 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
  193. 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
  194. 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
  195. 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
  196. 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
  197. package/src/db/ormCore.ts +0 -1059
  198. 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 };