@hot-updater/server 0.30.12 → 0.31.1

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 (165) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +25 -0
  2. package/dist/_virtual/_rolldown/runtime.mjs +6 -0
  3. package/dist/adapters/drizzle.cjs +6 -9
  4. package/dist/adapters/drizzle.d.cts +8 -1
  5. package/dist/adapters/drizzle.d.mts +8 -1
  6. package/dist/adapters/drizzle.mjs +5 -2
  7. package/dist/adapters/kysely.cjs +7 -9
  8. package/dist/adapters/kysely.d.cts +14 -1
  9. package/dist/adapters/kysely.d.mts +14 -1
  10. package/dist/adapters/kysely.mjs +6 -2
  11. package/dist/adapters/mongodb.cjs +7 -9
  12. package/dist/adapters/mongodb.d.cts +9 -1
  13. package/dist/adapters/mongodb.d.mts +9 -1
  14. package/dist/adapters/mongodb.mjs +5 -2
  15. package/dist/adapters/prisma.cjs +6 -9
  16. package/dist/adapters/prisma.d.cts +8 -1
  17. package/dist/adapters/prisma.d.mts +8 -1
  18. package/dist/adapters/prisma.mjs +5 -2
  19. package/dist/db/createBundleDiff.cjs +166 -0
  20. package/dist/db/createBundleDiff.d.cts +20 -0
  21. package/dist/db/createBundleDiff.d.mts +20 -0
  22. package/dist/db/createBundleDiff.mjs +161 -0
  23. package/dist/db/index.cjs +15 -16
  24. package/dist/db/index.d.cts +5 -4
  25. package/dist/db/index.d.mts +5 -4
  26. package/dist/db/index.mjs +14 -16
  27. package/dist/db/ormCore.cjs +173 -65
  28. package/dist/db/ormCore.d.cts +100 -34
  29. package/dist/db/ormCore.d.mts +100 -34
  30. package/dist/db/ormCore.mjs +171 -64
  31. package/dist/db/pluginCore.cjs +37 -3
  32. package/dist/db/pluginCore.mjs +36 -3
  33. package/dist/db/schemaEnhancements.cjs +171 -0
  34. package/dist/db/schemaEnhancements.mjs +167 -0
  35. package/dist/db/types.cjs +6 -0
  36. package/dist/db/types.d.cts +19 -7
  37. package/dist/db/types.d.mts +22 -10
  38. package/dist/db/types.mjs +6 -1
  39. package/dist/db/updateArtifacts.cjs +127 -0
  40. package/dist/db/updateArtifacts.mjs +125 -0
  41. package/dist/handler.cjs +61 -5
  42. package/dist/handler.d.cts +2 -2
  43. package/dist/handler.d.mts +5 -5
  44. package/dist/handler.mjs +59 -5
  45. package/dist/index.cjs +2 -0
  46. package/dist/index.d.cts +3 -2
  47. package/dist/index.d.mts +3 -2
  48. package/dist/index.mjs +2 -1
  49. package/dist/node.d.cts +0 -1
  50. package/dist/node.d.mts +0 -1
  51. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.cjs +112 -0
  52. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.mjs +108 -0
  53. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.cjs +22 -0
  54. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.mjs +18 -0
  55. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.cjs +219 -0
  56. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.mjs +214 -0
  57. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.cjs +275 -0
  58. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.mjs +270 -0
  59. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.cjs +17 -0
  60. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.mjs +13 -0
  61. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.cjs +69 -0
  62. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.mjs +65 -0
  63. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/column.cjs +52 -0
  64. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/column.mjs +52 -0
  65. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/entity.cjs +16 -0
  66. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/entity.mjs +15 -0
  67. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/pg-core/columns/enum.cjs +7 -0
  68. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/pg-core/columns/enum.mjs +7 -0
  69. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/sql/expressions/conditions.cjs +92 -0
  70. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/sql/expressions/conditions.mjs +78 -0
  71. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/sql/expressions/select.cjs +11 -0
  72. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/sql/expressions/select.mjs +10 -0
  73. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/sql/sql.cjs +383 -0
  74. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/sql/sql.mjs +366 -0
  75. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/subquery.cjs +17 -0
  76. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/subquery.mjs +17 -0
  77. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.cjs +60 -0
  78. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.mjs +59 -0
  79. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.utils.cjs +4 -0
  80. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/table.utils.mjs +4 -0
  81. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/tracing.cjs +6 -0
  82. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/tracing.mjs +6 -0
  83. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/view-common.cjs +4 -0
  84. package/dist/node_modules/.pnpm/drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pglite@0.2.17_@_31f44b782f9321d71f3ce9d35aa1edf7/node_modules/drizzle-orm/view-common.mjs +4 -0
  85. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/drizzle/index.cjs +383 -0
  86. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/drizzle/index.d.cts +12 -0
  87. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/drizzle/index.d.mts +12 -0
  88. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/drizzle/index.mjs +383 -0
  89. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/kysely/index.cjs +4 -0
  90. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/kysely/index.mjs +5 -0
  91. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/prisma/index.cjs +339 -0
  92. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/prisma/index.d.cts +70 -0
  93. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/prisma/index.d.mts +70 -0
  94. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/adapters/prisma/index.mjs +339 -0
  95. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-7PZK4ONR.cjs +57 -0
  96. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-7PZK4ONR.mjs +56 -0
  97. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-C6OTUURW.cjs +330 -0
  98. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-C6OTUURW.mjs +326 -0
  99. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-CHTIKPQU.cjs +166 -0
  100. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-CHTIKPQU.mjs +163 -0
  101. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-GUE4GMNC.cjs +14 -0
  102. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-GUE4GMNC.mjs +13 -0
  103. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-LHHP6UVP.cjs +24 -0
  104. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-LHHP6UVP.mjs +24 -0
  105. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-LVCPMTAT.cjs +1190 -0
  106. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-LVCPMTAT.mjs +1189 -0
  107. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-PK2W2SQ7.cjs +197 -0
  108. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-PK2W2SQ7.mjs +197 -0
  109. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-ZEQMAIFI.cjs +410 -0
  110. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-ZEQMAIFI.mjs +400 -0
  111. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-ZOCGSAWS.cjs +213 -0
  112. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/chunk-ZOCGSAWS.mjs +212 -0
  113. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/create-tg0451Y_.d.cts +285 -0
  114. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/create-tg0451Y_.d.mts +285 -0
  115. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/index-CMqePMTF.d.cts +45 -0
  116. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/index-CMqePMTF.d.mts +45 -0
  117. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/index.cjs +69 -0
  118. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/index.d.cts +49 -0
  119. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/index.d.mts +49 -0
  120. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/index.mjs +67 -0
  121. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/query/index.d.cts +156 -0
  122. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/query/index.d.mts +156 -0
  123. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/schema/index.cjs +1 -0
  124. package/dist/node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare_workers-types@4.20260313.1_@electric-sql_pg_c72c8c754becd21f6d6662e8fbd28e7f/node_modules/fumadb/dist/schema/index.mjs +2 -0
  125. package/dist/{package.cjs → packages/server/package.cjs} +1 -1
  126. package/dist/{package.mjs → packages/server/package.mjs} +1 -1
  127. package/dist/runtime.cjs +13 -13
  128. package/dist/runtime.d.cts +4 -4
  129. package/dist/runtime.d.mts +4 -4
  130. package/dist/runtime.mjs +12 -13
  131. package/dist/schema/v0_21_0.cjs +16 -15
  132. package/dist/schema/v0_21_0.mjs +3 -2
  133. package/dist/schema/v0_29_0.cjs +18 -17
  134. package/dist/schema/v0_29_0.mjs +3 -2
  135. package/dist/schema/v0_31_0.cjs +48 -0
  136. package/dist/schema/v0_31_0.mjs +48 -0
  137. package/dist/storageAccess.cjs +44 -0
  138. package/dist/storageAccess.mjs +44 -0
  139. package/dist/version.cjs +1 -1
  140. package/dist/version.mjs +1 -1
  141. package/package.json +15 -7
  142. package/src/adapters/drizzle.ts +15 -1
  143. package/src/adapters/kysely.ts +24 -1
  144. package/src/adapters/mongodb.ts +19 -1
  145. package/src/adapters/prisma.ts +15 -1
  146. package/src/db/createBundleDiff.spec.ts +402 -0
  147. package/src/db/createBundleDiff.ts +375 -0
  148. package/src/db/index.spec.ts +528 -27
  149. package/src/db/index.ts +22 -36
  150. package/src/db/ormCore.ts +308 -75
  151. package/src/db/pluginCore.spec.ts +385 -0
  152. package/src/db/pluginCore.ts +45 -4
  153. package/src/db/schemaEnhancements.ts +460 -0
  154. package/src/db/types.ts +38 -7
  155. package/src/db/updateArtifacts.ts +388 -0
  156. package/src/handler-standalone.integration.spec.ts +1 -0
  157. package/src/handler.spec.ts +121 -0
  158. package/src/handler.ts +117 -5
  159. package/src/runtime.spec.ts +287 -55
  160. package/src/runtime.ts +21 -37
  161. package/src/schema/v0_21_0.ts +1 -1
  162. package/src/schema/v0_29_0.ts +1 -1
  163. package/src/schema/v0_31_0.ts +58 -0
  164. package/src/storageAccess.spec.ts +57 -0
  165. package/src/storageAccess.ts +90 -0
@@ -0,0 +1,197 @@
1
+ //#region ../../node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pg_c72c8c754becd21f6d6662e8fbd28e7f/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;
@@ -0,0 +1,197 @@
1
+ //#region ../../node_modules/.pnpm/fumadb@0.2.2_drizzle-orm@0.44.7_@cloudflare+workers-types@4.20260313.1_@electric-sql+pg_c72c8c754becd21f6d6662e8fbd28e7f/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 };