@hot-updater/server 0.33.2 → 0.35.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 (216) 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/{runtime.cjs → createHotUpdaterCore.cjs} +34 -12
  21. package/dist/createHotUpdaterCore.d.cts +25 -0
  22. package/dist/createHotUpdaterCore.d.mts +25 -0
  23. package/dist/{runtime.mjs → createHotUpdaterCore.mjs} +34 -10
  24. package/dist/db/bundleRows.cjs +82 -0
  25. package/dist/db/bundleRows.d.cts +33 -0
  26. package/dist/db/bundleRows.d.mts +33 -0
  27. package/dist/db/bundleRows.mjs +79 -0
  28. package/dist/db/createBundleDiff.cjs +1 -1
  29. package/dist/db/createBundleDiff.mjs +1 -1
  30. package/dist/db/fixedMigrator.cjs +136 -0
  31. package/dist/db/fixedMigrator.mjs +135 -0
  32. package/dist/db/index.cjs +24 -42
  33. package/dist/db/index.d.cts +7 -26
  34. package/dist/db/index.d.mts +7 -26
  35. package/dist/db/index.mjs +19 -41
  36. package/dist/db/pluginCore.cjs +13 -5
  37. package/dist/db/pluginCore.mjs +13 -5
  38. package/dist/db/schema/mongodb.cjs +17 -0
  39. package/dist/db/schema/mongodb.mjs +17 -0
  40. package/dist/db/schema/registry.cjs +23 -0
  41. package/dist/db/schema/registry.mjs +18 -0
  42. package/dist/db/schema/sql.cjs +84 -0
  43. package/dist/db/schema/sql.mjs +78 -0
  44. package/dist/db/schema/sqlMigrations.cjs +74 -0
  45. package/dist/db/schema/sqlMigrations.mjs +73 -0
  46. package/dist/db/schema/sqlOperations.cjs +27 -0
  47. package/dist/db/schema/sqlOperations.mjs +26 -0
  48. package/dist/db/schemaEnhancements.cjs +1 -152
  49. package/dist/db/schemaEnhancements.mjs +1 -149
  50. package/dist/db/schemaGenerators.cjs +222 -0
  51. package/dist/db/schemaGenerators.mjs +220 -0
  52. package/dist/db/schemaReadiness.cjs +23 -0
  53. package/dist/db/schemaReadiness.d.cts +8 -0
  54. package/dist/db/schemaReadiness.d.mts +8 -0
  55. package/dist/db/schemaReadiness.mjs +22 -0
  56. package/dist/db/types.cjs +10 -2
  57. package/dist/db/types.d.cts +58 -14
  58. package/dist/db/types.d.mts +58 -14
  59. package/dist/db/types.mjs +9 -1
  60. package/dist/index.cjs +2 -6
  61. package/dist/index.d.cts +3 -5
  62. package/dist/index.d.mts +3 -5
  63. package/dist/index.mjs +2 -4
  64. package/dist/node.cjs +2 -0
  65. package/dist/node.d.cts +7 -3
  66. package/dist/node.d.mts +7 -3
  67. package/dist/node.mjs +2 -1
  68. package/dist/{packages/server/package.cjs → package.cjs} +1 -1
  69. package/dist/{packages/server/package.mjs → package.mjs} +1 -1
  70. package/dist/schema/dsl.cjs +86 -0
  71. package/dist/schema/dsl.mjs +73 -0
  72. package/dist/schema/index.cjs +13 -0
  73. package/dist/schema/index.mjs +13 -0
  74. package/dist/schema/settings.cjs +9 -0
  75. package/dist/schema/settings.mjs +9 -0
  76. package/dist/schema/types.cjs +6 -0
  77. package/dist/schema/types.mjs +5 -0
  78. package/dist/schema/v0_21_0.cjs +33 -18
  79. package/dist/schema/v0_21_0.mjs +32 -18
  80. package/dist/schema/v0_29_0.cjs +40 -20
  81. package/dist/schema/v0_29_0.mjs +39 -20
  82. package/dist/schema/v0_31_0.cjs +77 -43
  83. package/dist/schema/v0_31_0.mjs +75 -43
  84. package/dist/types/index.d.cts +1 -1
  85. package/dist/types/index.d.mts +1 -1
  86. package/dist/version.cjs +1 -1
  87. package/dist/version.mjs +1 -1
  88. package/package.json +34 -20
  89. package/src/adapters/drizzle.spec.ts +76 -0
  90. package/src/adapters/drizzle.ts +328 -12
  91. package/src/adapters/drizzleLazyDB.ts +151 -0
  92. package/src/adapters/kysely.spec.ts +107 -0
  93. package/src/adapters/kysely.ts +349 -14
  94. package/src/adapters/mongodb.ts +298 -15
  95. package/src/adapters/prisma.ts +337 -12
  96. package/src/createHotUpdaterCore.ts +168 -0
  97. package/src/db/bundleRows.ts +140 -0
  98. package/src/db/fixedMigrator.spec.ts +89 -0
  99. package/src/db/fixedMigrator.ts +288 -0
  100. package/src/db/hotUpdaterSchema.ts +6 -0
  101. package/src/db/index.spec.ts +983 -19
  102. package/src/db/index.ts +37 -108
  103. package/src/db/pluginCore.spec.ts +17 -11
  104. package/src/db/pluginCore.ts +15 -6
  105. package/src/db/schema/definitions.ts +1 -0
  106. package/src/db/schema/mongodb.ts +26 -0
  107. package/src/db/schema/registry.ts +55 -0
  108. package/src/db/schema/sql.ts +200 -0
  109. package/src/db/schema/sqlMigrations.ts +219 -0
  110. package/src/db/schema/sqlOperations.ts +62 -0
  111. package/src/db/schema/types.ts +1 -0
  112. package/src/db/schemaEnhancements.ts +0 -405
  113. package/src/db/schemaGenerators.ts +382 -0
  114. package/src/db/schemaReadiness.ts +33 -0
  115. package/src/db/types.ts +69 -25
  116. package/src/handler-standalone.integration.spec.ts +3 -2
  117. package/src/index.ts +9 -3
  118. package/src/node.spec.ts +50 -0
  119. package/src/node.ts +7 -3
  120. package/src/runtime.spec.ts +132 -1
  121. package/src/schema/dsl-all-versions.spec.ts +26 -0
  122. package/src/schema/dsl.ts +148 -0
  123. package/src/schema/index.ts +16 -0
  124. package/src/schema/settings.ts +15 -0
  125. package/src/schema/types.ts +73 -0
  126. package/src/schema/v0_21_0.ts +48 -18
  127. package/src/schema/v0_29_0.ts +58 -22
  128. package/src/schema/v0_31_0.spec.ts +73 -0
  129. package/src/schema/v0_31_0.ts +116 -54
  130. package/src/types/index.ts +1 -1
  131. package/dist/_virtual/_rolldown/runtime.mjs +0 -6
  132. package/dist/calculatePagination.cjs +0 -25
  133. package/dist/calculatePagination.mjs +0 -25
  134. package/dist/db/ormCore.cjs +0 -577
  135. package/dist/db/ormCore.d.cts +0 -110
  136. package/dist/db/ormCore.d.mts +0 -110
  137. package/dist/db/ormCore.mjs +0 -575
  138. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.cjs +0 -112
  139. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/_u64.mjs +0 -108
  140. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.cjs +0 -22
  141. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.mjs +0 -18
  142. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.cjs +0 -219
  143. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/sha3.mjs +0 -214
  144. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.cjs +0 -275
  145. package/dist/node_modules/.pnpm/@noble_hashes@1.8.0/node_modules/@noble/hashes/utils.mjs +0 -270
  146. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.cjs +0 -17
  147. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/index.mjs +0 -13
  148. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.cjs +0 -69
  149. package/dist/node_modules/.pnpm/@paralleldrive_cuid2@2.3.1/node_modules/@paralleldrive/cuid2/src/index.mjs +0 -65
  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/column.cjs +0 -52
  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/column.mjs +0 -52
  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/entity.cjs +0 -16
  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/entity.mjs +0 -15
  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/pg-core/columns/enum.cjs +0 -7
  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/pg-core/columns/enum.mjs +0 -7
  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/sql/expressions/conditions.cjs +0 -92
  157. 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
  158. 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
  159. 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
  160. 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
  161. 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
  162. 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
  163. 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
  164. 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
  165. 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
  166. 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
  167. 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
  168. 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
  169. 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
  170. 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
  171. 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
  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/adapters/drizzle/index.cjs +0 -383
  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/adapters/drizzle/index.d.cts +0 -12
  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/adapters/drizzle/index.d.mts +0 -12
  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/adapters/drizzle/index.mjs +0 -383
  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/adapters/kysely/index.cjs +0 -4
  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/adapters/kysely/index.mjs +0 -5
  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/adapters/prisma/index.cjs +0 -339
  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/adapters/prisma/index.d.cts +0 -70
  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/adapters/prisma/index.d.mts +0 -70
  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/adapters/prisma/index.mjs +0 -339
  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-7PZK4ONR.cjs +0 -57
  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-7PZK4ONR.mjs +0 -56
  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-C6OTUURW.cjs +0 -330
  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/chunk-C6OTUURW.mjs +0 -326
  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/chunk-CHTIKPQU.cjs +0 -166
  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/chunk-CHTIKPQU.mjs +0 -163
  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/chunk-GUE4GMNC.cjs +0 -14
  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/chunk-GUE4GMNC.mjs +0 -13
  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/chunk-LHHP6UVP.cjs +0 -24
  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/chunk-LHHP6UVP.mjs +0 -24
  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/chunk-LVCPMTAT.cjs +0 -1190
  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/chunk-LVCPMTAT.mjs +0 -1189
  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/chunk-PK2W2SQ7.cjs +0 -197
  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/chunk-PK2W2SQ7.mjs +0 -197
  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/chunk-ZEQMAIFI.cjs +0 -410
  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.mjs +0 -400
  198. 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
  199. 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
  200. 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
  201. 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
  202. 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
  203. 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
  204. 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
  205. 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
  206. 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
  207. 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
  208. 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
  209. 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
  210. 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
  211. 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
  212. package/dist/runtime.d.cts +0 -22
  213. package/dist/runtime.d.mts +0 -22
  214. package/src/db/ormCore.ts +0 -1059
  215. package/src/db/ormUpdateCheck.bench.ts +0 -262
  216. package/src/runtime.ts +0 -106
@@ -1,112 +0,0 @@
1
- "use strict";
2
- //#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js
3
- var require__u64 = /* @__PURE__ */ require("../../../../../../_virtual/_rolldown/runtime.cjs").__commonJSMin(((exports) => {
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.toBig = exports.shrSL = exports.shrSH = exports.rotrSL = exports.rotrSH = exports.rotrBL = exports.rotrBH = exports.rotr32L = exports.rotr32H = exports.rotlSL = exports.rotlSH = exports.rotlBL = exports.rotlBH = exports.add5L = exports.add5H = exports.add4L = exports.add4H = exports.add3L = exports.add3H = void 0;
6
- exports.add = add;
7
- exports.fromBig = fromBig;
8
- exports.split = split;
9
- /**
10
- * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
11
- * @todo re-check https://issues.chromium.org/issues/42212588
12
- * @module
13
- */
14
- const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
15
- const _32n = /* @__PURE__ */ BigInt(32);
16
- function fromBig(n, le = false) {
17
- if (le) return {
18
- h: Number(n & U32_MASK64),
19
- l: Number(n >> _32n & U32_MASK64)
20
- };
21
- return {
22
- h: Number(n >> _32n & U32_MASK64) | 0,
23
- l: Number(n & U32_MASK64) | 0
24
- };
25
- }
26
- function split(lst, le = false) {
27
- const len = lst.length;
28
- let Ah = new Uint32Array(len);
29
- let Al = new Uint32Array(len);
30
- for (let i = 0; i < len; i++) {
31
- const { h, l } = fromBig(lst[i], le);
32
- [Ah[i], Al[i]] = [h, l];
33
- }
34
- return [Ah, Al];
35
- }
36
- const toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
37
- exports.toBig = toBig;
38
- const shrSH = (h, _l, s) => h >>> s;
39
- exports.shrSH = shrSH;
40
- const shrSL = (h, l, s) => h << 32 - s | l >>> s;
41
- exports.shrSL = shrSL;
42
- const rotrSH = (h, l, s) => h >>> s | l << 32 - s;
43
- exports.rotrSH = rotrSH;
44
- const rotrSL = (h, l, s) => h << 32 - s | l >>> s;
45
- exports.rotrSL = rotrSL;
46
- const rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
47
- exports.rotrBH = rotrBH;
48
- const rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
49
- exports.rotrBL = rotrBL;
50
- const rotr32H = (_h, l) => l;
51
- exports.rotr32H = rotr32H;
52
- const rotr32L = (h, _l) => h;
53
- exports.rotr32L = rotr32L;
54
- const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
55
- exports.rotlSH = rotlSH;
56
- const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
57
- exports.rotlSL = rotlSL;
58
- const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
59
- exports.rotlBH = rotlBH;
60
- const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
61
- exports.rotlBL = rotlBL;
62
- function add(Ah, Al, Bh, Bl) {
63
- const l = (Al >>> 0) + (Bl >>> 0);
64
- return {
65
- h: Ah + Bh + (l / 2 ** 32 | 0) | 0,
66
- l: l | 0
67
- };
68
- }
69
- const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
70
- exports.add3L = add3L;
71
- const add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
72
- exports.add3H = add3H;
73
- const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
74
- exports.add4L = add4L;
75
- const add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
76
- exports.add4H = add4H;
77
- const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
78
- exports.add5L = add5L;
79
- const add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
80
- exports.add5H = add5H;
81
- exports.default = {
82
- fromBig,
83
- split,
84
- toBig,
85
- shrSH,
86
- shrSL,
87
- rotrSH,
88
- rotrSL,
89
- rotrBH,
90
- rotrBL,
91
- rotr32H,
92
- rotr32L,
93
- rotlSH,
94
- rotlSL,
95
- rotlBH,
96
- rotlBL,
97
- add,
98
- add3L,
99
- add3H,
100
- add4L,
101
- add4H,
102
- add5H,
103
- add5L
104
- };
105
- }));
106
- //#endregion
107
- Object.defineProperty(exports, "default", {
108
- enumerable: true,
109
- get: function() {
110
- return require__u64();
111
- }
112
- });
@@ -1,108 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.mjs";
2
- //#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/_u64.js
3
- var require__u64 = /* @__PURE__ */ __commonJSMin(((exports) => {
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.toBig = exports.shrSL = exports.shrSH = exports.rotrSL = exports.rotrSH = exports.rotrBL = exports.rotrBH = exports.rotr32L = exports.rotr32H = exports.rotlSL = exports.rotlSH = exports.rotlBL = exports.rotlBH = exports.add5L = exports.add5H = exports.add4L = exports.add4H = exports.add3L = exports.add3H = void 0;
6
- exports.add = add;
7
- exports.fromBig = fromBig;
8
- exports.split = split;
9
- /**
10
- * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
11
- * @todo re-check https://issues.chromium.org/issues/42212588
12
- * @module
13
- */
14
- const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
15
- const _32n = /* @__PURE__ */ BigInt(32);
16
- function fromBig(n, le = false) {
17
- if (le) return {
18
- h: Number(n & U32_MASK64),
19
- l: Number(n >> _32n & U32_MASK64)
20
- };
21
- return {
22
- h: Number(n >> _32n & U32_MASK64) | 0,
23
- l: Number(n & U32_MASK64) | 0
24
- };
25
- }
26
- function split(lst, le = false) {
27
- const len = lst.length;
28
- let Ah = new Uint32Array(len);
29
- let Al = new Uint32Array(len);
30
- for (let i = 0; i < len; i++) {
31
- const { h, l } = fromBig(lst[i], le);
32
- [Ah[i], Al[i]] = [h, l];
33
- }
34
- return [Ah, Al];
35
- }
36
- const toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
37
- exports.toBig = toBig;
38
- const shrSH = (h, _l, s) => h >>> s;
39
- exports.shrSH = shrSH;
40
- const shrSL = (h, l, s) => h << 32 - s | l >>> s;
41
- exports.shrSL = shrSL;
42
- const rotrSH = (h, l, s) => h >>> s | l << 32 - s;
43
- exports.rotrSH = rotrSH;
44
- const rotrSL = (h, l, s) => h << 32 - s | l >>> s;
45
- exports.rotrSL = rotrSL;
46
- const rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
47
- exports.rotrBH = rotrBH;
48
- const rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
49
- exports.rotrBL = rotrBL;
50
- const rotr32H = (_h, l) => l;
51
- exports.rotr32H = rotr32H;
52
- const rotr32L = (h, _l) => h;
53
- exports.rotr32L = rotr32L;
54
- const rotlSH = (h, l, s) => h << s | l >>> 32 - s;
55
- exports.rotlSH = rotlSH;
56
- const rotlSL = (h, l, s) => l << s | h >>> 32 - s;
57
- exports.rotlSL = rotlSL;
58
- const rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
59
- exports.rotlBH = rotlBH;
60
- const rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
61
- exports.rotlBL = rotlBL;
62
- function add(Ah, Al, Bh, Bl) {
63
- const l = (Al >>> 0) + (Bl >>> 0);
64
- return {
65
- h: Ah + Bh + (l / 2 ** 32 | 0) | 0,
66
- l: l | 0
67
- };
68
- }
69
- const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
70
- exports.add3L = add3L;
71
- const add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
72
- exports.add3H = add3H;
73
- const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
74
- exports.add4L = add4L;
75
- const add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
76
- exports.add4H = add4H;
77
- const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
78
- exports.add5L = add5L;
79
- const add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
80
- exports.add5H = add5H;
81
- exports.default = {
82
- fromBig,
83
- split,
84
- toBig,
85
- shrSH,
86
- shrSL,
87
- rotrSH,
88
- rotrSL,
89
- rotrBH,
90
- rotrBL,
91
- rotr32H,
92
- rotr32L,
93
- rotlSH,
94
- rotlSL,
95
- rotlBH,
96
- rotlBL,
97
- add,
98
- add3L,
99
- add3H,
100
- add4L,
101
- add4H,
102
- add5H,
103
- add5L
104
- };
105
- }));
106
- //#endregion
107
- export default require__u64();
108
- export { require__u64 };
@@ -1,22 +0,0 @@
1
- "use strict";
2
- //#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.js
3
- var require_cryptoNode = /* @__PURE__ */ require("../../../../../../_virtual/_rolldown/runtime.cjs").__commonJSMin(((exports) => {
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.crypto = void 0;
6
- /**
7
- * Internal webcrypto alias.
8
- * We prefer WebCrypto aka globalThis.crypto, which exists in node.js 16+.
9
- * Falls back to Node.js built-in crypto for Node.js <=v14.
10
- * See utils.ts for details.
11
- * @module
12
- */
13
- const nc = require("node:crypto");
14
- exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
15
- }));
16
- //#endregion
17
- Object.defineProperty(exports, "default", {
18
- enumerable: true,
19
- get: function() {
20
- return require_cryptoNode();
21
- }
22
- });
@@ -1,18 +0,0 @@
1
- import { __commonJSMin, __require } from "../../../../../../_virtual/_rolldown/runtime.mjs";
2
- //#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/cryptoNode.js
3
- var require_cryptoNode = /* @__PURE__ */ __commonJSMin(((exports) => {
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.crypto = void 0;
6
- /**
7
- * Internal webcrypto alias.
8
- * We prefer WebCrypto aka globalThis.crypto, which exists in node.js 16+.
9
- * Falls back to Node.js built-in crypto for Node.js <=v14.
10
- * See utils.ts for details.
11
- * @module
12
- */
13
- const nc = __require("node:crypto");
14
- exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && "randomBytes" in nc ? nc : void 0;
15
- }));
16
- //#endregion
17
- export default require_cryptoNode();
18
- export { require_cryptoNode };
@@ -1,219 +0,0 @@
1
- "use strict";
2
- const require_runtime = require("../../../../../../_virtual/_rolldown/runtime.cjs");
3
- const require__u64$1 = require("./_u64.cjs");
4
- const require_utils$1 = require("./utils.cjs");
5
- //#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha3.js
6
- var require_sha3 = /* @__PURE__ */ require_runtime.__commonJSMin(((exports) => {
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.shake256 = exports.shake128 = exports.keccak_512 = exports.keccak_384 = exports.keccak_256 = exports.keccak_224 = exports.sha3_512 = exports.sha3_384 = exports.sha3_256 = exports.sha3_224 = exports.Keccak = void 0;
9
- exports.keccakP = keccakP;
10
- /**
11
- * SHA3 (keccak) hash function, based on a new "Sponge function" design.
12
- * Different from older hashes, the internal state is bigger than output size.
13
- *
14
- * Check out [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),
15
- * [Website](https://keccak.team/keccak.html),
16
- * [the differences between SHA-3 and Keccak](https://crypto.stackexchange.com/questions/15727/what-are-the-key-differences-between-the-draft-sha-3-standard-and-the-keccak-sub).
17
- *
18
- * Check out `sha3-addons` module for cSHAKE, k12, and others.
19
- * @module
20
- */
21
- const _u64_ts_1 = require__u64$1.default;
22
- const utils_ts_1 = require_utils$1.default;
23
- const _0n = BigInt(0);
24
- const _1n = BigInt(1);
25
- const _2n = BigInt(2);
26
- const _7n = BigInt(7);
27
- const _256n = BigInt(256);
28
- const _0x71n = BigInt(113);
29
- const SHA3_PI = [];
30
- const SHA3_ROTL = [];
31
- const _SHA3_IOTA = [];
32
- for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
33
- [x, y] = [y, (2 * x + 3 * y) % 5];
34
- SHA3_PI.push(2 * (5 * y + x));
35
- SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
36
- let t = _0n;
37
- for (let j = 0; j < 7; j++) {
38
- R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
39
- if (R & _2n) t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
40
- }
41
- _SHA3_IOTA.push(t);
42
- }
43
- const IOTAS = (0, _u64_ts_1.split)(_SHA3_IOTA, true);
44
- const SHA3_IOTA_H = IOTAS[0];
45
- const SHA3_IOTA_L = IOTAS[1];
46
- const rotlH = (h, l, s) => s > 32 ? (0, _u64_ts_1.rotlBH)(h, l, s) : (0, _u64_ts_1.rotlSH)(h, l, s);
47
- const rotlL = (h, l, s) => s > 32 ? (0, _u64_ts_1.rotlBL)(h, l, s) : (0, _u64_ts_1.rotlSL)(h, l, s);
48
- /** `keccakf1600` internal function, additionally allows to adjust round count. */
49
- function keccakP(s, rounds = 24) {
50
- const B = new Uint32Array(10);
51
- for (let round = 24 - rounds; round < 24; round++) {
52
- for (let x = 0; x < 10; x++) B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
53
- for (let x = 0; x < 10; x += 2) {
54
- const idx1 = (x + 8) % 10;
55
- const idx0 = (x + 2) % 10;
56
- const B0 = B[idx0];
57
- const B1 = B[idx0 + 1];
58
- const Th = rotlH(B0, B1, 1) ^ B[idx1];
59
- const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
60
- for (let y = 0; y < 50; y += 10) {
61
- s[x + y] ^= Th;
62
- s[x + y + 1] ^= Tl;
63
- }
64
- }
65
- let curH = s[2];
66
- let curL = s[3];
67
- for (let t = 0; t < 24; t++) {
68
- const shift = SHA3_ROTL[t];
69
- const Th = rotlH(curH, curL, shift);
70
- const Tl = rotlL(curH, curL, shift);
71
- const PI = SHA3_PI[t];
72
- curH = s[PI];
73
- curL = s[PI + 1];
74
- s[PI] = Th;
75
- s[PI + 1] = Tl;
76
- }
77
- for (let y = 0; y < 50; y += 10) {
78
- for (let x = 0; x < 10; x++) B[x] = s[y + x];
79
- for (let x = 0; x < 10; x++) s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
80
- }
81
- s[0] ^= SHA3_IOTA_H[round];
82
- s[1] ^= SHA3_IOTA_L[round];
83
- }
84
- (0, utils_ts_1.clean)(B);
85
- }
86
- /** Keccak sponge function. */
87
- var Keccak = class Keccak extends utils_ts_1.Hash {
88
- constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
89
- super();
90
- this.pos = 0;
91
- this.posOut = 0;
92
- this.finished = false;
93
- this.destroyed = false;
94
- this.enableXOF = false;
95
- this.blockLen = blockLen;
96
- this.suffix = suffix;
97
- this.outputLen = outputLen;
98
- this.enableXOF = enableXOF;
99
- this.rounds = rounds;
100
- (0, utils_ts_1.anumber)(outputLen);
101
- if (!(0 < blockLen && blockLen < 200)) throw new Error("only keccak-f1600 function is supported");
102
- this.state = new Uint8Array(200);
103
- this.state32 = (0, utils_ts_1.u32)(this.state);
104
- }
105
- clone() {
106
- return this._cloneInto();
107
- }
108
- keccak() {
109
- (0, utils_ts_1.swap32IfBE)(this.state32);
110
- keccakP(this.state32, this.rounds);
111
- (0, utils_ts_1.swap32IfBE)(this.state32);
112
- this.posOut = 0;
113
- this.pos = 0;
114
- }
115
- update(data) {
116
- (0, utils_ts_1.aexists)(this);
117
- data = (0, utils_ts_1.toBytes)(data);
118
- (0, utils_ts_1.abytes)(data);
119
- const { blockLen, state } = this;
120
- const len = data.length;
121
- for (let pos = 0; pos < len;) {
122
- const take = Math.min(blockLen - this.pos, len - pos);
123
- for (let i = 0; i < take; i++) state[this.pos++] ^= data[pos++];
124
- if (this.pos === blockLen) this.keccak();
125
- }
126
- return this;
127
- }
128
- finish() {
129
- if (this.finished) return;
130
- this.finished = true;
131
- const { state, suffix, pos, blockLen } = this;
132
- state[pos] ^= suffix;
133
- if ((suffix & 128) !== 0 && pos === blockLen - 1) this.keccak();
134
- state[blockLen - 1] ^= 128;
135
- this.keccak();
136
- }
137
- writeInto(out) {
138
- (0, utils_ts_1.aexists)(this, false);
139
- (0, utils_ts_1.abytes)(out);
140
- this.finish();
141
- const bufferOut = this.state;
142
- const { blockLen } = this;
143
- for (let pos = 0, len = out.length; pos < len;) {
144
- if (this.posOut >= blockLen) this.keccak();
145
- const take = Math.min(blockLen - this.posOut, len - pos);
146
- out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
147
- this.posOut += take;
148
- pos += take;
149
- }
150
- return out;
151
- }
152
- xofInto(out) {
153
- if (!this.enableXOF) throw new Error("XOF is not possible for this instance");
154
- return this.writeInto(out);
155
- }
156
- xof(bytes) {
157
- (0, utils_ts_1.anumber)(bytes);
158
- return this.xofInto(new Uint8Array(bytes));
159
- }
160
- digestInto(out) {
161
- (0, utils_ts_1.aoutput)(out, this);
162
- if (this.finished) throw new Error("digest() was already called");
163
- this.writeInto(out);
164
- this.destroy();
165
- return out;
166
- }
167
- digest() {
168
- return this.digestInto(new Uint8Array(this.outputLen));
169
- }
170
- destroy() {
171
- this.destroyed = true;
172
- (0, utils_ts_1.clean)(this.state);
173
- }
174
- _cloneInto(to) {
175
- const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
176
- to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
177
- to.state32.set(this.state32);
178
- to.pos = this.pos;
179
- to.posOut = this.posOut;
180
- to.finished = this.finished;
181
- to.rounds = rounds;
182
- to.suffix = suffix;
183
- to.outputLen = outputLen;
184
- to.enableXOF = enableXOF;
185
- to.destroyed = this.destroyed;
186
- return to;
187
- }
188
- };
189
- exports.Keccak = Keccak;
190
- const gen = (suffix, blockLen, outputLen) => (0, utils_ts_1.createHasher)(() => new Keccak(blockLen, suffix, outputLen));
191
- /** SHA3-224 hash function. */
192
- exports.sha3_224 = gen(6, 144, 224 / 8);
193
- /** SHA3-256 hash function. Different from keccak-256. */
194
- exports.sha3_256 = gen(6, 136, 256 / 8);
195
- /** SHA3-384 hash function. */
196
- exports.sha3_384 = gen(6, 104, 384 / 8);
197
- /** SHA3-512 hash function. */
198
- exports.sha3_512 = gen(6, 72, 512 / 8);
199
- /** keccak-224 hash function. */
200
- exports.keccak_224 = gen(1, 144, 224 / 8);
201
- /** keccak-256 hash function. Different from SHA3-256. */
202
- exports.keccak_256 = gen(1, 136, 256 / 8);
203
- /** keccak-384 hash function. */
204
- exports.keccak_384 = gen(1, 104, 384 / 8);
205
- /** keccak-512 hash function. */
206
- exports.keccak_512 = gen(1, 72, 512 / 8);
207
- const genShake = (suffix, blockLen, outputLen) => (0, utils_ts_1.createXOFer)((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));
208
- /** SHAKE128 XOF with 128-bit security. */
209
- exports.shake128 = genShake(31, 168, 128 / 8);
210
- /** SHAKE256 XOF with 256-bit security. */
211
- exports.shake256 = genShake(31, 136, 256 / 8);
212
- }));
213
- //#endregion
214
- Object.defineProperty(exports, "default", {
215
- enumerable: true,
216
- get: function() {
217
- return require_sha3();
218
- }
219
- });
@@ -1,214 +0,0 @@
1
- import { __commonJSMin } from "../../../../../../_virtual/_rolldown/runtime.mjs";
2
- import { require__u64 } from "./_u64.mjs";
3
- import { require_utils } from "./utils.mjs";
4
- //#region ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/sha3.js
5
- var require_sha3 = /* @__PURE__ */ __commonJSMin(((exports) => {
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.shake256 = exports.shake128 = exports.keccak_512 = exports.keccak_384 = exports.keccak_256 = exports.keccak_224 = exports.sha3_512 = exports.sha3_384 = exports.sha3_256 = exports.sha3_224 = exports.Keccak = void 0;
8
- exports.keccakP = keccakP;
9
- /**
10
- * SHA3 (keccak) hash function, based on a new "Sponge function" design.
11
- * Different from older hashes, the internal state is bigger than output size.
12
- *
13
- * Check out [FIPS-202](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf),
14
- * [Website](https://keccak.team/keccak.html),
15
- * [the differences between SHA-3 and Keccak](https://crypto.stackexchange.com/questions/15727/what-are-the-key-differences-between-the-draft-sha-3-standard-and-the-keccak-sub).
16
- *
17
- * Check out `sha3-addons` module for cSHAKE, k12, and others.
18
- * @module
19
- */
20
- const _u64_ts_1 = require__u64();
21
- const utils_ts_1 = require_utils();
22
- const _0n = BigInt(0);
23
- const _1n = BigInt(1);
24
- const _2n = BigInt(2);
25
- const _7n = BigInt(7);
26
- const _256n = BigInt(256);
27
- const _0x71n = BigInt(113);
28
- const SHA3_PI = [];
29
- const SHA3_ROTL = [];
30
- const _SHA3_IOTA = [];
31
- for (let round = 0, R = _1n, x = 1, y = 0; round < 24; round++) {
32
- [x, y] = [y, (2 * x + 3 * y) % 5];
33
- SHA3_PI.push(2 * (5 * y + x));
34
- SHA3_ROTL.push((round + 1) * (round + 2) / 2 % 64);
35
- let t = _0n;
36
- for (let j = 0; j < 7; j++) {
37
- R = (R << _1n ^ (R >> _7n) * _0x71n) % _256n;
38
- if (R & _2n) t ^= _1n << (_1n << /* @__PURE__ */ BigInt(j)) - _1n;
39
- }
40
- _SHA3_IOTA.push(t);
41
- }
42
- const IOTAS = (0, _u64_ts_1.split)(_SHA3_IOTA, true);
43
- const SHA3_IOTA_H = IOTAS[0];
44
- const SHA3_IOTA_L = IOTAS[1];
45
- const rotlH = (h, l, s) => s > 32 ? (0, _u64_ts_1.rotlBH)(h, l, s) : (0, _u64_ts_1.rotlSH)(h, l, s);
46
- const rotlL = (h, l, s) => s > 32 ? (0, _u64_ts_1.rotlBL)(h, l, s) : (0, _u64_ts_1.rotlSL)(h, l, s);
47
- /** `keccakf1600` internal function, additionally allows to adjust round count. */
48
- function keccakP(s, rounds = 24) {
49
- const B = new Uint32Array(10);
50
- for (let round = 24 - rounds; round < 24; round++) {
51
- for (let x = 0; x < 10; x++) B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
52
- for (let x = 0; x < 10; x += 2) {
53
- const idx1 = (x + 8) % 10;
54
- const idx0 = (x + 2) % 10;
55
- const B0 = B[idx0];
56
- const B1 = B[idx0 + 1];
57
- const Th = rotlH(B0, B1, 1) ^ B[idx1];
58
- const Tl = rotlL(B0, B1, 1) ^ B[idx1 + 1];
59
- for (let y = 0; y < 50; y += 10) {
60
- s[x + y] ^= Th;
61
- s[x + y + 1] ^= Tl;
62
- }
63
- }
64
- let curH = s[2];
65
- let curL = s[3];
66
- for (let t = 0; t < 24; t++) {
67
- const shift = SHA3_ROTL[t];
68
- const Th = rotlH(curH, curL, shift);
69
- const Tl = rotlL(curH, curL, shift);
70
- const PI = SHA3_PI[t];
71
- curH = s[PI];
72
- curL = s[PI + 1];
73
- s[PI] = Th;
74
- s[PI + 1] = Tl;
75
- }
76
- for (let y = 0; y < 50; y += 10) {
77
- for (let x = 0; x < 10; x++) B[x] = s[y + x];
78
- for (let x = 0; x < 10; x++) s[y + x] ^= ~B[(x + 2) % 10] & B[(x + 4) % 10];
79
- }
80
- s[0] ^= SHA3_IOTA_H[round];
81
- s[1] ^= SHA3_IOTA_L[round];
82
- }
83
- (0, utils_ts_1.clean)(B);
84
- }
85
- /** Keccak sponge function. */
86
- var Keccak = class Keccak extends utils_ts_1.Hash {
87
- constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
88
- super();
89
- this.pos = 0;
90
- this.posOut = 0;
91
- this.finished = false;
92
- this.destroyed = false;
93
- this.enableXOF = false;
94
- this.blockLen = blockLen;
95
- this.suffix = suffix;
96
- this.outputLen = outputLen;
97
- this.enableXOF = enableXOF;
98
- this.rounds = rounds;
99
- (0, utils_ts_1.anumber)(outputLen);
100
- if (!(0 < blockLen && blockLen < 200)) throw new Error("only keccak-f1600 function is supported");
101
- this.state = new Uint8Array(200);
102
- this.state32 = (0, utils_ts_1.u32)(this.state);
103
- }
104
- clone() {
105
- return this._cloneInto();
106
- }
107
- keccak() {
108
- (0, utils_ts_1.swap32IfBE)(this.state32);
109
- keccakP(this.state32, this.rounds);
110
- (0, utils_ts_1.swap32IfBE)(this.state32);
111
- this.posOut = 0;
112
- this.pos = 0;
113
- }
114
- update(data) {
115
- (0, utils_ts_1.aexists)(this);
116
- data = (0, utils_ts_1.toBytes)(data);
117
- (0, utils_ts_1.abytes)(data);
118
- const { blockLen, state } = this;
119
- const len = data.length;
120
- for (let pos = 0; pos < len;) {
121
- const take = Math.min(blockLen - this.pos, len - pos);
122
- for (let i = 0; i < take; i++) state[this.pos++] ^= data[pos++];
123
- if (this.pos === blockLen) this.keccak();
124
- }
125
- return this;
126
- }
127
- finish() {
128
- if (this.finished) return;
129
- this.finished = true;
130
- const { state, suffix, pos, blockLen } = this;
131
- state[pos] ^= suffix;
132
- if ((suffix & 128) !== 0 && pos === blockLen - 1) this.keccak();
133
- state[blockLen - 1] ^= 128;
134
- this.keccak();
135
- }
136
- writeInto(out) {
137
- (0, utils_ts_1.aexists)(this, false);
138
- (0, utils_ts_1.abytes)(out);
139
- this.finish();
140
- const bufferOut = this.state;
141
- const { blockLen } = this;
142
- for (let pos = 0, len = out.length; pos < len;) {
143
- if (this.posOut >= blockLen) this.keccak();
144
- const take = Math.min(blockLen - this.posOut, len - pos);
145
- out.set(bufferOut.subarray(this.posOut, this.posOut + take), pos);
146
- this.posOut += take;
147
- pos += take;
148
- }
149
- return out;
150
- }
151
- xofInto(out) {
152
- if (!this.enableXOF) throw new Error("XOF is not possible for this instance");
153
- return this.writeInto(out);
154
- }
155
- xof(bytes) {
156
- (0, utils_ts_1.anumber)(bytes);
157
- return this.xofInto(new Uint8Array(bytes));
158
- }
159
- digestInto(out) {
160
- (0, utils_ts_1.aoutput)(out, this);
161
- if (this.finished) throw new Error("digest() was already called");
162
- this.writeInto(out);
163
- this.destroy();
164
- return out;
165
- }
166
- digest() {
167
- return this.digestInto(new Uint8Array(this.outputLen));
168
- }
169
- destroy() {
170
- this.destroyed = true;
171
- (0, utils_ts_1.clean)(this.state);
172
- }
173
- _cloneInto(to) {
174
- const { blockLen, suffix, outputLen, rounds, enableXOF } = this;
175
- to || (to = new Keccak(blockLen, suffix, outputLen, enableXOF, rounds));
176
- to.state32.set(this.state32);
177
- to.pos = this.pos;
178
- to.posOut = this.posOut;
179
- to.finished = this.finished;
180
- to.rounds = rounds;
181
- to.suffix = suffix;
182
- to.outputLen = outputLen;
183
- to.enableXOF = enableXOF;
184
- to.destroyed = this.destroyed;
185
- return to;
186
- }
187
- };
188
- exports.Keccak = Keccak;
189
- const gen = (suffix, blockLen, outputLen) => (0, utils_ts_1.createHasher)(() => new Keccak(blockLen, suffix, outputLen));
190
- /** SHA3-224 hash function. */
191
- exports.sha3_224 = gen(6, 144, 224 / 8);
192
- /** SHA3-256 hash function. Different from keccak-256. */
193
- exports.sha3_256 = gen(6, 136, 256 / 8);
194
- /** SHA3-384 hash function. */
195
- exports.sha3_384 = gen(6, 104, 384 / 8);
196
- /** SHA3-512 hash function. */
197
- exports.sha3_512 = gen(6, 72, 512 / 8);
198
- /** keccak-224 hash function. */
199
- exports.keccak_224 = gen(1, 144, 224 / 8);
200
- /** keccak-256 hash function. Different from SHA3-256. */
201
- exports.keccak_256 = gen(1, 136, 256 / 8);
202
- /** keccak-384 hash function. */
203
- exports.keccak_384 = gen(1, 104, 384 / 8);
204
- /** keccak-512 hash function. */
205
- exports.keccak_512 = gen(1, 72, 512 / 8);
206
- const genShake = (suffix, blockLen, outputLen) => (0, utils_ts_1.createXOFer)((opts = {}) => new Keccak(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true));
207
- /** SHAKE128 XOF with 128-bit security. */
208
- exports.shake128 = genShake(31, 168, 128 / 8);
209
- /** SHAKE256 XOF with 256-bit security. */
210
- exports.shake256 = genShake(31, 136, 256 / 8);
211
- }));
212
- //#endregion
213
- export default require_sha3();
214
- export { require_sha3 };