@baseplate-dev/plugin-auth 0.6.9 → 0.6.10

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 (643) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/auth/core/web.js +31 -2
  3. package/dist/better-auth/constants/packages.d.ts +1 -1
  4. package/dist/better-auth/constants/packages.js +1 -1
  5. package/dist/better-auth/core/web.js +15 -2
  6. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts +0 -1
  7. package/dist/local-auth/core/web.js +15 -2
  8. package/dist/placeholder-auth/core/web.js +13 -2
  9. package/dist/web/assets/_virtual_mf-localSharedImportMap___mfe_internal__plugin_mf_2_auth-ClIdhDoz.js +218 -0
  10. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib__loadShare__.mjs-DMKuehfC.js +100 -0
  11. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_project_mf_2_builder_mf_2_lib_mf_1_web__loadShare__.mjs-D-Ap1aU9.js +38 -0
  12. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_baseplate_mf_2_dev_mf_1_ui_mf_2_components__loadShare__.mjs-BwkXxd-B.js +38 -0
  13. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__-D-_Nu6mi.js +2 -0
  14. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare___mf_0_tanstack_mf_1_react_mf_2_router__loadShare__.mjs-CCE3BH4R.js +7061 -0
  15. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__react__loadShare__-Bed38hA6.js +3 -0
  16. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__react_mf_2_dom__loadShare__-Bixm3Wfj.js +2 -0
  17. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__-BArWH8PX.js +2 -0
  18. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__loadShare__zod__loadShare__.mjs-BalS-ZNe.js +13533 -0
  19. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__prebuild___mf_0_tanstack_mf_1_react_mf_2_router__prebuild__-C01b4AWM.js +2 -0
  20. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__prebuild__react__prebuild__-D4n2cb00.js +3 -0
  21. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-BkswA-5f.js +2 -0
  22. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__prebuild__react_mf_2_dom__prebuild__-CiX5bkAg.js +2 -0
  23. package/dist/web/assets/_virtual_mf___mfe_internal__plugin_mf_2_auth__prebuild__zod__prebuild__-BnF6dd62.js +2 -0
  24. package/dist/web/assets/auth-B91ghZtH.js +1 -0
  25. package/dist/web/assets/common-C7yhhy8-.js +39 -0
  26. package/dist/web/assets/common-DiDohcsR.js +37 -0
  27. package/dist/web/assets/common-DpbhYjND.js +39 -0
  28. package/dist/web/assets/common-DsAJIAWm.js +63 -0
  29. package/dist/web/assets/common-ERn8TuKQ.js +37 -0
  30. package/dist/web/assets/common-KNIYXbku.js +18 -0
  31. package/dist/web/assets/dist-B0GpYPx6.js +18145 -0
  32. package/dist/web/assets/dist-BhvYza4J.js +69565 -0
  33. package/dist/web/assets/dist-CEUHjZe8.js +3017 -0
  34. package/dist/web/assets/get-auth-plugin-definition-Bu_lkrUz.js +14 -0
  35. package/dist/web/assets/hostInit-BeM6xnlw.js +72 -0
  36. package/dist/web/assets/index-D5GoD4M0.js +2 -0
  37. package/dist/web/assets/index.esm-iUXrvsTx.js +2003 -0
  38. package/dist/web/assets/md-BLjaL5ZD.js +439 -0
  39. package/dist/web/assets/model-names-BluImOzu.js +27 -0
  40. package/dist/web/assets/model-names-CUS5rSei.js +12 -0
  41. package/dist/web/assets/model-utils-BPfI0c3Y.js +1287 -0
  42. package/dist/web/assets/models-BTYxwDyB.js +304 -0
  43. package/dist/web/assets/models-BufWBHGv.js +285 -0
  44. package/dist/web/assets/plugin-definition-BTHzuXv5.js +78 -0
  45. package/dist/web/assets/plugin-definition-D5s4GTfd.js +11 -0
  46. package/dist/web/assets/react-B4hMnLhV.js +49 -0
  47. package/dist/web/assets/rolldown-runtime-_TIqcEvS.js +35 -0
  48. package/dist/web/assets/stringify-pretty-stable-ByfjYf8u.js +155 -0
  49. package/dist/web/assets/styles-BpmWykfT.js +174 -0
  50. package/dist/web/assets/{style-DiK_rD1L.css → styles-CAm3HyKx.css} +1 -1
  51. package/dist/web/assets/virtualExposes-Bru0eAhP.js +2 -0
  52. package/dist/web/assets/virtual_mf-REMOTE_ENTRY_ID___mfe_internal__plugin-auth__remoteEntry_js-DK03x1PZ.js +270 -0
  53. package/dist/web/assets/virtual_mf-exposes___mfe_internal__plugin-auth__remoteEntry_js-DBiKf3iL.js +168 -0
  54. package/dist/web/assets/web-BUa3uD-P.js +400 -0
  55. package/dist/web/assets/web-BmHd5WWD.js +124 -0
  56. package/dist/web/assets/web-CgosRRUN.js +119 -0
  57. package/dist/web/assets/web-DhTqWxxL.js +46 -0
  58. package/dist/web/assets/web-DlJyNEbj.js +357 -0
  59. package/dist/web/assets/web-ffSErgfF.js +46 -0
  60. package/dist/web/assets/web-nADEuz1b.js +107 -0
  61. package/dist/web/index.html +1 -1
  62. package/dist/web/mf-entry-bootstrap-0.js +17 -0
  63. package/dist/web/remoteEntry.js +2 -0
  64. package/package.json +23 -20
  65. package/dist/auth/core/common.d.ts.map +0 -1
  66. package/dist/auth/core/common.js.map +0 -1
  67. package/dist/auth/core/components/auth-definition-editor.d.ts.map +0 -1
  68. package/dist/auth/core/components/auth-definition-editor.js.map +0 -1
  69. package/dist/auth/core/components/role-editor-form/role-dialog.d.ts.map +0 -1
  70. package/dist/auth/core/components/role-editor-form/role-dialog.js.map +0 -1
  71. package/dist/auth/core/components/role-editor-form/role-editor-form.d.ts.map +0 -1
  72. package/dist/auth/core/components/role-editor-form/role-editor-form.js.map +0 -1
  73. package/dist/auth/core/node.d.ts.map +0 -1
  74. package/dist/auth/core/node.js.map +0 -1
  75. package/dist/auth/core/schema/migrations.d.ts.map +0 -1
  76. package/dist/auth/core/schema/migrations.js.map +0 -1
  77. package/dist/auth/core/schema/plugin-definition.d.ts.map +0 -1
  78. package/dist/auth/core/schema/plugin-definition.js.map +0 -1
  79. package/dist/auth/core/schema/roles/constants.d.ts.map +0 -1
  80. package/dist/auth/core/schema/roles/constants.js.map +0 -1
  81. package/dist/auth/core/schema/roles/index.d.ts.map +0 -1
  82. package/dist/auth/core/schema/roles/index.js.map +0 -1
  83. package/dist/auth/core/schema/roles/schema.d.ts.map +0 -1
  84. package/dist/auth/core/schema/roles/schema.js.map +0 -1
  85. package/dist/auth/core/web.d.ts.map +0 -1
  86. package/dist/auth/core/web.js.map +0 -1
  87. package/dist/auth/index.d.ts.map +0 -1
  88. package/dist/auth/index.js.map +0 -1
  89. package/dist/auth/utils/get-auth-plugin-definition.d.ts.map +0 -1
  90. package/dist/auth/utils/get-auth-plugin-definition.js.map +0 -1
  91. package/dist/auth/utils/index.d.ts.map +0 -1
  92. package/dist/auth/utils/index.js.map +0 -1
  93. package/dist/better-auth/admin/common.d.ts.map +0 -1
  94. package/dist/better-auth/admin/common.js.map +0 -1
  95. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +0 -1
  96. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +0 -1
  97. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +0 -1
  98. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js.map +0 -1
  99. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +0 -1
  100. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +0 -1
  101. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +0 -1
  102. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +0 -1
  103. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +0 -1
  104. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +0 -1
  105. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts.map +0 -1
  106. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/index.js.map +0 -1
  107. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +0 -1
  108. package/dist/better-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +0 -1
  109. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +0 -1
  110. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +0 -1
  111. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +0 -1
  112. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/index.js.map +0 -1
  113. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +0 -1
  114. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +0 -1
  115. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +0 -1
  116. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +0 -1
  117. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +0 -1
  118. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +0 -1
  119. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/index.d.ts.map +0 -1
  120. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/index.js.map +0 -1
  121. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +0 -1
  122. package/dist/better-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +0 -1
  123. package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +0 -1
  124. package/dist/better-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +0 -1
  125. package/dist/better-auth/admin/generators/admin-crud-roles-column/index.d.ts.map +0 -1
  126. package/dist/better-auth/admin/generators/admin-crud-roles-column/index.js.map +0 -1
  127. package/dist/better-auth/admin/node.d.ts.map +0 -1
  128. package/dist/better-auth/admin/node.js.map +0 -1
  129. package/dist/better-auth/admin/schema/manage-role-action.d.ts.map +0 -1
  130. package/dist/better-auth/admin/schema/manage-role-action.js.map +0 -1
  131. package/dist/better-auth/admin/schema/reset-password-action.d.ts.map +0 -1
  132. package/dist/better-auth/admin/schema/reset-password-action.js.map +0 -1
  133. package/dist/better-auth/admin/schema/roles-column.d.ts.map +0 -1
  134. package/dist/better-auth/admin/schema/roles-column.js.map +0 -1
  135. package/dist/better-auth/admin/web.d.ts.map +0 -1
  136. package/dist/better-auth/admin/web.js.map +0 -1
  137. package/dist/better-auth/constants/model-names.d.ts.map +0 -1
  138. package/dist/better-auth/constants/model-names.js.map +0 -1
  139. package/dist/better-auth/constants/packages.d.ts.map +0 -1
  140. package/dist/better-auth/constants/packages.js.map +0 -1
  141. package/dist/better-auth/core/common.d.ts.map +0 -1
  142. package/dist/better-auth/core/common.js.map +0 -1
  143. package/dist/better-auth/core/components/better-auth-definition-editor.d.ts.map +0 -1
  144. package/dist/better-auth/core/components/better-auth-definition-editor.js.map +0 -1
  145. package/dist/better-auth/core/index.d.ts.map +0 -1
  146. package/dist/better-auth/core/index.js.map +0 -1
  147. package/dist/better-auth/core/node.d.ts.map +0 -1
  148. package/dist/better-auth/core/node.js.map +0 -1
  149. package/dist/better-auth/core/schema/models.d.ts.map +0 -1
  150. package/dist/better-auth/core/schema/models.js.map +0 -1
  151. package/dist/better-auth/core/schema/plugin-definition.d.ts.map +0 -1
  152. package/dist/better-auth/core/schema/plugin-definition.js.map +0 -1
  153. package/dist/better-auth/core/schema/schema-issue-checker.d.ts.map +0 -1
  154. package/dist/better-auth/core/schema/schema-issue-checker.js.map +0 -1
  155. package/dist/better-auth/core/web.d.ts.map +0 -1
  156. package/dist/better-auth/core/web.js.map +0 -1
  157. package/dist/better-auth/generators/fastify/better-auth-admin-module/better-auth-admin-module.generator.d.ts.map +0 -1
  158. package/dist/better-auth/generators/fastify/better-auth-admin-module/better-auth-admin-module.generator.js.map +0 -1
  159. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.d.ts.map +0 -1
  160. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/index.js.map +0 -1
  161. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-paths.d.ts.map +0 -1
  162. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-paths.js.map +0 -1
  163. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-renderers.d.ts.map +0 -1
  164. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/template-renderers.js.map +0 -1
  165. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.d.ts.map +0 -1
  166. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/ts-import-providers.js.map +0 -1
  167. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/typed-templates.d.ts.map +0 -1
  168. package/dist/better-auth/generators/fastify/better-auth-admin-module/generated/typed-templates.js.map +0 -1
  169. package/dist/better-auth/generators/fastify/better-auth-admin-module/index.d.ts.map +0 -1
  170. package/dist/better-auth/generators/fastify/better-auth-admin-module/index.js.map +0 -1
  171. package/dist/better-auth/generators/fastify/better-auth-email-templates/better-auth-email-templates.generator.d.ts.map +0 -1
  172. package/dist/better-auth/generators/fastify/better-auth-email-templates/better-auth-email-templates.generator.js.map +0 -1
  173. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/index.d.ts.map +0 -1
  174. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/index.js.map +0 -1
  175. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-paths.d.ts.map +0 -1
  176. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-paths.js.map +0 -1
  177. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-renderers.d.ts.map +0 -1
  178. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/template-renderers.js.map +0 -1
  179. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/typed-templates.d.ts.map +0 -1
  180. package/dist/better-auth/generators/fastify/better-auth-email-templates/generated/typed-templates.js.map +0 -1
  181. package/dist/better-auth/generators/fastify/better-auth-email-templates/index.d.ts.map +0 -1
  182. package/dist/better-auth/generators/fastify/better-auth-email-templates/index.js.map +0 -1
  183. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.d.ts.map +0 -1
  184. package/dist/better-auth/generators/fastify/better-auth-module/better-auth-module.generator.js.map +0 -1
  185. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.d.ts.map +0 -1
  186. package/dist/better-auth/generators/fastify/better-auth-module/generated/index.js.map +0 -1
  187. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.d.ts.map +0 -1
  188. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-paths.js.map +0 -1
  189. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.d.ts.map +0 -1
  190. package/dist/better-auth/generators/fastify/better-auth-module/generated/template-renderers.js.map +0 -1
  191. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.d.ts.map +0 -1
  192. package/dist/better-auth/generators/fastify/better-auth-module/generated/ts-import-providers.js.map +0 -1
  193. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.d.ts.map +0 -1
  194. package/dist/better-auth/generators/fastify/better-auth-module/generated/typed-templates.js.map +0 -1
  195. package/dist/better-auth/generators/fastify/better-auth-module/index.d.ts.map +0 -1
  196. package/dist/better-auth/generators/fastify/better-auth-module/index.js.map +0 -1
  197. package/dist/better-auth/generators/fastify/index.d.ts.map +0 -1
  198. package/dist/better-auth/generators/fastify/index.js.map +0 -1
  199. package/dist/better-auth/generators/fastify/seed-initial-user/generated/index.d.ts.map +0 -1
  200. package/dist/better-auth/generators/fastify/seed-initial-user/generated/index.js.map +0 -1
  201. package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-paths.d.ts.map +0 -1
  202. package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-paths.js.map +0 -1
  203. package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-renderers.d.ts.map +0 -1
  204. package/dist/better-auth/generators/fastify/seed-initial-user/generated/template-renderers.js.map +0 -1
  205. package/dist/better-auth/generators/fastify/seed-initial-user/generated/typed-templates.d.ts.map +0 -1
  206. package/dist/better-auth/generators/fastify/seed-initial-user/generated/typed-templates.js.map +0 -1
  207. package/dist/better-auth/generators/fastify/seed-initial-user/index.d.ts.map +0 -1
  208. package/dist/better-auth/generators/fastify/seed-initial-user/index.js.map +0 -1
  209. package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.d.ts.map +0 -1
  210. package/dist/better-auth/generators/fastify/seed-initial-user/seed-initial-user.generator.js.map +0 -1
  211. package/dist/better-auth/generators/index.d.ts.map +0 -1
  212. package/dist/better-auth/generators/index.js.map +0 -1
  213. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.d.ts.map +0 -1
  214. package/dist/better-auth/generators/react/better-auth-hooks/better-auth-hooks.generator.js.map +0 -1
  215. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.d.ts.map +0 -1
  216. package/dist/better-auth/generators/react/better-auth-hooks/generated/index.js.map +0 -1
  217. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.d.ts.map +0 -1
  218. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-paths.js.map +0 -1
  219. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.d.ts.map +0 -1
  220. package/dist/better-auth/generators/react/better-auth-hooks/generated/template-renderers.js.map +0 -1
  221. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.d.ts.map +0 -1
  222. package/dist/better-auth/generators/react/better-auth-hooks/generated/ts-import-providers.js.map +0 -1
  223. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.d.ts.map +0 -1
  224. package/dist/better-auth/generators/react/better-auth-hooks/generated/typed-templates.js.map +0 -1
  225. package/dist/better-auth/generators/react/better-auth-hooks/index.d.ts.map +0 -1
  226. package/dist/better-auth/generators/react/better-auth-hooks/index.js.map +0 -1
  227. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.d.ts.map +0 -1
  228. package/dist/better-auth/generators/react/better-auth-pages/better-auth-pages.generator.js.map +0 -1
  229. package/dist/better-auth/generators/react/better-auth-pages/generated/index.d.ts.map +0 -1
  230. package/dist/better-auth/generators/react/better-auth-pages/generated/index.js.map +0 -1
  231. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.d.ts.map +0 -1
  232. package/dist/better-auth/generators/react/better-auth-pages/generated/template-paths.js.map +0 -1
  233. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.d.ts.map +0 -1
  234. package/dist/better-auth/generators/react/better-auth-pages/generated/template-renderers.js.map +0 -1
  235. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.d.ts.map +0 -1
  236. package/dist/better-auth/generators/react/better-auth-pages/generated/typed-templates.js.map +0 -1
  237. package/dist/better-auth/generators/react/better-auth-pages/index.d.ts.map +0 -1
  238. package/dist/better-auth/generators/react/better-auth-pages/index.js.map +0 -1
  239. package/dist/better-auth/generators/react/index.d.ts.map +0 -1
  240. package/dist/better-auth/generators/react/index.js.map +0 -1
  241. package/dist/better-auth/generators/react/react-better-auth/generated/index.d.ts.map +0 -1
  242. package/dist/better-auth/generators/react/react-better-auth/generated/index.js.map +0 -1
  243. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.d.ts.map +0 -1
  244. package/dist/better-auth/generators/react/react-better-auth/generated/template-paths.js.map +0 -1
  245. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.d.ts.map +0 -1
  246. package/dist/better-auth/generators/react/react-better-auth/generated/template-renderers.js.map +0 -1
  247. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.d.ts.map +0 -1
  248. package/dist/better-auth/generators/react/react-better-auth/generated/ts-import-providers.js.map +0 -1
  249. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.d.ts.map +0 -1
  250. package/dist/better-auth/generators/react/react-better-auth/generated/typed-templates.js.map +0 -1
  251. package/dist/better-auth/generators/react/react-better-auth/index.d.ts.map +0 -1
  252. package/dist/better-auth/generators/react/react-better-auth/index.js.map +0 -1
  253. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.d.ts.map +0 -1
  254. package/dist/better-auth/generators/react/react-better-auth/react-better-auth.generator.js.map +0 -1
  255. package/dist/better-auth/index.d.ts.map +0 -1
  256. package/dist/better-auth/index.js.map +0 -1
  257. package/dist/common/components/auth-config-tabs.d.ts.map +0 -1
  258. package/dist/common/components/auth-config-tabs.js.map +0 -1
  259. package/dist/local-auth/admin/common.d.ts.map +0 -1
  260. package/dist/local-auth/admin/common.js.map +0 -1
  261. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.d.ts.map +0 -1
  262. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/admin-crud-manage-roles-action.generator.js.map +0 -1
  263. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.d.ts.map +0 -1
  264. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/index.js.map +0 -1
  265. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.d.ts.map +0 -1
  266. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-paths.js.map +0 -1
  267. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.d.ts.map +0 -1
  268. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/template-renderers.js.map +0 -1
  269. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.d.ts.map +0 -1
  270. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/generated/typed-templates.js.map +0 -1
  271. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.d.ts.map +0 -1
  272. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/index.js.map +0 -1
  273. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.d.ts.map +0 -1
  274. package/dist/local-auth/admin/generators/admin-crud-manage-roles-action/templates/routes/-components/role-manager-dialog.js.map +0 -1
  275. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.d.ts.map +0 -1
  276. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/admin-crud-reset-password-action.generator.js.map +0 -1
  277. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.d.ts.map +0 -1
  278. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/index.js.map +0 -1
  279. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.d.ts.map +0 -1
  280. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-paths.js.map +0 -1
  281. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.d.ts.map +0 -1
  282. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/template-renderers.js.map +0 -1
  283. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.d.ts.map +0 -1
  284. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/generated/typed-templates.js.map +0 -1
  285. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.d.ts.map +0 -1
  286. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/index.js.map +0 -1
  287. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.d.ts.map +0 -1
  288. package/dist/local-auth/admin/generators/admin-crud-reset-password-action/templates/routes/-components/password-reset-dialog.js.map +0 -1
  289. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.d.ts.map +0 -1
  290. package/dist/local-auth/admin/generators/admin-crud-roles-column/admin-crud-roles-column.generator.js.map +0 -1
  291. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.d.ts.map +0 -1
  292. package/dist/local-auth/admin/generators/admin-crud-roles-column/index.js.map +0 -1
  293. package/dist/local-auth/admin/node.d.ts.map +0 -1
  294. package/dist/local-auth/admin/node.js.map +0 -1
  295. package/dist/local-auth/admin/schema/manage-role-action.d.ts.map +0 -1
  296. package/dist/local-auth/admin/schema/manage-role-action.js.map +0 -1
  297. package/dist/local-auth/admin/schema/reset-password-action.d.ts.map +0 -1
  298. package/dist/local-auth/admin/schema/reset-password-action.js.map +0 -1
  299. package/dist/local-auth/admin/schema/roles-column.d.ts.map +0 -1
  300. package/dist/local-auth/admin/schema/roles-column.js.map +0 -1
  301. package/dist/local-auth/admin/web.d.ts.map +0 -1
  302. package/dist/local-auth/admin/web.js.map +0 -1
  303. package/dist/local-auth/constants/model-names.d.ts.map +0 -1
  304. package/dist/local-auth/constants/model-names.js.map +0 -1
  305. package/dist/local-auth/core/common.d.ts.map +0 -1
  306. package/dist/local-auth/core/common.js.map +0 -1
  307. package/dist/local-auth/core/components/local-auth-definition-editor.d.ts.map +0 -1
  308. package/dist/local-auth/core/components/local-auth-definition-editor.js.map +0 -1
  309. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.d.ts.map +0 -1
  310. package/dist/local-auth/core/generators/auth-apollo/auth-apollo.generator.js.map +0 -1
  311. package/dist/local-auth/core/generators/auth-apollo/index.d.ts.map +0 -1
  312. package/dist/local-auth/core/generators/auth-apollo/index.js.map +0 -1
  313. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.d.ts.map +0 -1
  314. package/dist/local-auth/core/generators/auth-apollo/templates/session-error-link.js.map +0 -1
  315. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.d.ts.map +0 -1
  316. package/dist/local-auth/core/generators/auth-email-password/auth-email-password.generator.js.map +0 -1
  317. package/dist/local-auth/core/generators/auth-email-password/generated/index.d.ts.map +0 -1
  318. package/dist/local-auth/core/generators/auth-email-password/generated/index.js.map +0 -1
  319. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.d.ts.map +0 -1
  320. package/dist/local-auth/core/generators/auth-email-password/generated/template-paths.js.map +0 -1
  321. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.d.ts.map +0 -1
  322. package/dist/local-auth/core/generators/auth-email-password/generated/template-renderers.js.map +0 -1
  323. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.d.ts.map +0 -1
  324. package/dist/local-auth/core/generators/auth-email-password/generated/ts-import-providers.js.map +0 -1
  325. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.d.ts.map +0 -1
  326. package/dist/local-auth/core/generators/auth-email-password/generated/typed-templates.js.map +0 -1
  327. package/dist/local-auth/core/generators/auth-email-password/index.d.ts.map +0 -1
  328. package/dist/local-auth/core/generators/auth-email-password/index.js.map +0 -1
  329. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.d.ts.map +0 -1
  330. package/dist/local-auth/core/generators/auth-email-password/templates/module/constants/password.constants.js.map +0 -1
  331. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.d.ts.map +0 -1
  332. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/email-verification.mutations.js.map +0 -1
  333. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.d.ts.map +0 -1
  334. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/password-reset.mutations.js.map +0 -1
  335. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.d.ts.map +0 -1
  336. package/dist/local-auth/core/generators/auth-email-password/templates/module/schema/user-password.mutations.js.map +0 -1
  337. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.d.ts.map +0 -1
  338. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/email-verification.service.js.map +0 -1
  339. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.d.ts.map +0 -1
  340. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/password-reset.service.js.map +0 -1
  341. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.d.ts.map +0 -1
  342. package/dist/local-auth/core/generators/auth-email-password/templates/module/services/user-password.service.js.map +0 -1
  343. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.d.ts.map +0 -1
  344. package/dist/local-auth/core/generators/auth-email-templates/auth-email-templates.generator.js.map +0 -1
  345. package/dist/local-auth/core/generators/auth-email-templates/generated/index.d.ts.map +0 -1
  346. package/dist/local-auth/core/generators/auth-email-templates/generated/index.js.map +0 -1
  347. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.d.ts.map +0 -1
  348. package/dist/local-auth/core/generators/auth-email-templates/generated/template-paths.js.map +0 -1
  349. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.d.ts.map +0 -1
  350. package/dist/local-auth/core/generators/auth-email-templates/generated/template-renderers.js.map +0 -1
  351. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.d.ts.map +0 -1
  352. package/dist/local-auth/core/generators/auth-email-templates/generated/typed-templates.js.map +0 -1
  353. package/dist/local-auth/core/generators/auth-email-templates/index.d.ts.map +0 -1
  354. package/dist/local-auth/core/generators/auth-email-templates/index.js.map +0 -1
  355. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.d.ts.map +0 -1
  356. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/account-verification.email.js.map +0 -1
  357. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.d.ts.map +0 -1
  358. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-changed.email.js.map +0 -1
  359. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.d.ts.map +0 -1
  360. package/dist/local-auth/core/generators/auth-email-templates/templates/src/emails/auth/password-reset.email.js.map +0 -1
  361. package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.d.ts.map +0 -1
  362. package/dist/local-auth/core/generators/auth-hooks/auth-hooks.generator.js.map +0 -1
  363. package/dist/local-auth/core/generators/auth-hooks/generated/index.d.ts.map +0 -1
  364. package/dist/local-auth/core/generators/auth-hooks/generated/index.js.map +0 -1
  365. package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.d.ts.map +0 -1
  366. package/dist/local-auth/core/generators/auth-hooks/generated/template-paths.js.map +0 -1
  367. package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.d.ts.map +0 -1
  368. package/dist/local-auth/core/generators/auth-hooks/generated/template-renderers.js.map +0 -1
  369. package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.d.ts.map +0 -1
  370. package/dist/local-auth/core/generators/auth-hooks/generated/ts-import-providers.js.map +0 -1
  371. package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.d.ts.map +0 -1
  372. package/dist/local-auth/core/generators/auth-hooks/generated/typed-templates.js.map +0 -1
  373. package/dist/local-auth/core/generators/auth-hooks/index.d.ts.map +0 -1
  374. package/dist/local-auth/core/generators/auth-hooks/index.js.map +0 -1
  375. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.d.ts.map +0 -1
  376. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-log-out.js.map +0 -1
  377. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.d.ts.map +0 -1
  378. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-session.js.map +0 -1
  379. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +0 -1
  380. package/dist/local-auth/core/generators/auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +0 -1
  381. package/dist/local-auth/core/generators/auth-module/auth-module.generator.d.ts.map +0 -1
  382. package/dist/local-auth/core/generators/auth-module/auth-module.generator.js.map +0 -1
  383. package/dist/local-auth/core/generators/auth-module/generated/index.d.ts.map +0 -1
  384. package/dist/local-auth/core/generators/auth-module/generated/index.js.map +0 -1
  385. package/dist/local-auth/core/generators/auth-module/generated/template-paths.d.ts.map +0 -1
  386. package/dist/local-auth/core/generators/auth-module/generated/template-paths.js.map +0 -1
  387. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.d.ts.map +0 -1
  388. package/dist/local-auth/core/generators/auth-module/generated/template-renderers.js.map +0 -1
  389. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.d.ts.map +0 -1
  390. package/dist/local-auth/core/generators/auth-module/generated/ts-import-providers.js.map +0 -1
  391. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.d.ts.map +0 -1
  392. package/dist/local-auth/core/generators/auth-module/generated/typed-templates.js.map +0 -1
  393. package/dist/local-auth/core/generators/auth-module/index.d.ts.map +0 -1
  394. package/dist/local-auth/core/generators/auth-module/index.js.map +0 -1
  395. package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.d.ts.map +0 -1
  396. package/dist/local-auth/core/generators/auth-module/templates/module/constants/user-session.constants.js.map +0 -1
  397. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.d.ts.map +0 -1
  398. package/dist/local-auth/core/generators/auth-module/templates/module/queues/cleanup-auth-verification.queue.js.map +0 -1
  399. package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.d.ts.map +0 -1
  400. package/dist/local-auth/core/generators/auth-module/templates/module/schema/auth-role.enum.js.map +0 -1
  401. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.d.ts.map +0 -1
  402. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-roles.mutations.js.map +0 -1
  403. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.d.ts.map +0 -1
  404. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session-payload.object-type.js.map +0 -1
  405. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.d.ts.map +0 -1
  406. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.mutations.js.map +0 -1
  407. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.d.ts.map +0 -1
  408. package/dist/local-auth/core/generators/auth-module/templates/module/schema/user-session.queries.js.map +0 -1
  409. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.d.ts.map +0 -1
  410. package/dist/local-auth/core/generators/auth-module/templates/module/services/auth-verification.service.js.map +0 -1
  411. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.d.ts.map +0 -1
  412. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-roles.service.js.map +0 -1
  413. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.d.ts.map +0 -1
  414. package/dist/local-auth/core/generators/auth-module/templates/module/services/user-session.service.js.map +0 -1
  415. package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.d.ts.map +0 -1
  416. package/dist/local-auth/core/generators/auth-module/templates/module/utils/cookie-signer.js.map +0 -1
  417. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.d.ts.map +0 -1
  418. package/dist/local-auth/core/generators/auth-module/templates/module/utils/session-cookie.js.map +0 -1
  419. package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.d.ts.map +0 -1
  420. package/dist/local-auth/core/generators/auth-module/templates/module/utils/verify-request-origin.js.map +0 -1
  421. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.d.ts.map +0 -1
  422. package/dist/local-auth/core/generators/auth-routes/auth-routes.generator.js.map +0 -1
  423. package/dist/local-auth/core/generators/auth-routes/generated/index.d.ts.map +0 -1
  424. package/dist/local-auth/core/generators/auth-routes/generated/index.js.map +0 -1
  425. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.d.ts.map +0 -1
  426. package/dist/local-auth/core/generators/auth-routes/generated/template-paths.js.map +0 -1
  427. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.d.ts.map +0 -1
  428. package/dist/local-auth/core/generators/auth-routes/generated/template-renderers.js.map +0 -1
  429. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.d.ts.map +0 -1
  430. package/dist/local-auth/core/generators/auth-routes/generated/ts-import-providers.js.map +0 -1
  431. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.d.ts.map +0 -1
  432. package/dist/local-auth/core/generators/auth-routes/generated/typed-templates.js.map +0 -1
  433. package/dist/local-auth/core/generators/auth-routes/index.d.ts.map +0 -1
  434. package/dist/local-auth/core/generators/auth-routes/index.js.map +0 -1
  435. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.d.ts.map +0 -1
  436. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/-constants.js.map +0 -1
  437. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.d.ts.map +0 -1
  438. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/forgot-password.js.map +0 -1
  439. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.d.ts.map +0 -1
  440. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/login.js.map +0 -1
  441. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.d.ts.map +0 -1
  442. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/register.js.map +0 -1
  443. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.d.ts.map +0 -1
  444. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/reset-password.js.map +0 -1
  445. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.d.ts.map +0 -1
  446. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/route.js.map +0 -1
  447. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.d.ts.map +0 -1
  448. package/dist/local-auth/core/generators/auth-routes/templates/routes/auth_/verify-email.js.map +0 -1
  449. package/dist/local-auth/core/generators/index.d.ts.map +0 -1
  450. package/dist/local-auth/core/generators/index.js.map +0 -1
  451. package/dist/local-auth/core/generators/react-auth/index.d.ts.map +0 -1
  452. package/dist/local-auth/core/generators/react-auth/index.js.map +0 -1
  453. package/dist/local-auth/core/generators/react-auth/react-auth.generator.d.ts.map +0 -1
  454. package/dist/local-auth/core/generators/react-auth/react-auth.generator.js.map +0 -1
  455. package/dist/local-auth/core/generators/react-session/generated/index.d.ts.map +0 -1
  456. package/dist/local-auth/core/generators/react-session/generated/index.js.map +0 -1
  457. package/dist/local-auth/core/generators/react-session/generated/template-paths.d.ts.map +0 -1
  458. package/dist/local-auth/core/generators/react-session/generated/template-paths.js.map +0 -1
  459. package/dist/local-auth/core/generators/react-session/generated/template-renderers.d.ts.map +0 -1
  460. package/dist/local-auth/core/generators/react-session/generated/template-renderers.js.map +0 -1
  461. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.d.ts.map +0 -1
  462. package/dist/local-auth/core/generators/react-session/generated/ts-import-providers.js.map +0 -1
  463. package/dist/local-auth/core/generators/react-session/generated/typed-templates.d.ts.map +0 -1
  464. package/dist/local-auth/core/generators/react-session/generated/typed-templates.js.map +0 -1
  465. package/dist/local-auth/core/generators/react-session/index.d.ts.map +0 -1
  466. package/dist/local-auth/core/generators/react-session/index.js.map +0 -1
  467. package/dist/local-auth/core/generators/react-session/react-session.generator.d.ts.map +0 -1
  468. package/dist/local-auth/core/generators/react-session/react-session.generator.js.map +0 -1
  469. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.d.ts.map +0 -1
  470. package/dist/local-auth/core/generators/react-session/templates/src/app/user-session-provider.js.map +0 -1
  471. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.d.ts.map +0 -1
  472. package/dist/local-auth/core/generators/react-session/templates/src/services/user-session-client.js.map +0 -1
  473. package/dist/local-auth/core/generators/seed-initial-user/generated/index.d.ts.map +0 -1
  474. package/dist/local-auth/core/generators/seed-initial-user/generated/index.js.map +0 -1
  475. package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.d.ts.map +0 -1
  476. package/dist/local-auth/core/generators/seed-initial-user/generated/template-paths.js.map +0 -1
  477. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.d.ts.map +0 -1
  478. package/dist/local-auth/core/generators/seed-initial-user/generated/template-renderers.js.map +0 -1
  479. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.d.ts.map +0 -1
  480. package/dist/local-auth/core/generators/seed-initial-user/generated/typed-templates.js.map +0 -1
  481. package/dist/local-auth/core/generators/seed-initial-user/index.d.ts.map +0 -1
  482. package/dist/local-auth/core/generators/seed-initial-user/index.js.map +0 -1
  483. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.d.ts.map +0 -1
  484. package/dist/local-auth/core/generators/seed-initial-user/seed-initial-user.generator.js.map +0 -1
  485. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.d.ts.map +0 -1
  486. package/dist/local-auth/core/generators/seed-initial-user/templates/src/prisma/seed-initial-user.js.map +0 -1
  487. package/dist/local-auth/core/index.d.ts.map +0 -1
  488. package/dist/local-auth/core/index.js.map +0 -1
  489. package/dist/local-auth/core/node.d.ts.map +0 -1
  490. package/dist/local-auth/core/node.js.map +0 -1
  491. package/dist/local-auth/core/schema/models.d.ts.map +0 -1
  492. package/dist/local-auth/core/schema/models.js.map +0 -1
  493. package/dist/local-auth/core/schema/plugin-definition.d.ts.map +0 -1
  494. package/dist/local-auth/core/schema/plugin-definition.js.map +0 -1
  495. package/dist/local-auth/core/schema/schema-issue-checker.d.ts.map +0 -1
  496. package/dist/local-auth/core/schema/schema-issue-checker.js.map +0 -1
  497. package/dist/local-auth/core/web.d.ts.map +0 -1
  498. package/dist/local-auth/core/web.js.map +0 -1
  499. package/dist/local-auth/index.d.ts.map +0 -1
  500. package/dist/local-auth/index.js.map +0 -1
  501. package/dist/placeholder-auth/constants/model-names.d.ts.map +0 -1
  502. package/dist/placeholder-auth/constants/model-names.js.map +0 -1
  503. package/dist/placeholder-auth/core/common.d.ts.map +0 -1
  504. package/dist/placeholder-auth/core/common.js.map +0 -1
  505. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.d.ts.map +0 -1
  506. package/dist/placeholder-auth/core/components/placeholder-auth-definition-editor.js.map +0 -1
  507. package/dist/placeholder-auth/core/generators/index.d.ts.map +0 -1
  508. package/dist/placeholder-auth/core/generators/index.js.map +0 -1
  509. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.d.ts.map +0 -1
  510. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/index.js.map +0 -1
  511. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.d.ts.map +0 -1
  512. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-paths.js.map +0 -1
  513. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.d.ts.map +0 -1
  514. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/template-renderers.js.map +0 -1
  515. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.d.ts.map +0 -1
  516. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/ts-import-providers.js.map +0 -1
  517. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.d.ts.map +0 -1
  518. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/generated/typed-templates.js.map +0 -1
  519. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.d.ts.map +0 -1
  520. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/index.js.map +0 -1
  521. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.d.ts.map +0 -1
  522. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/placeholder-auth-hooks.generator.js.map +0 -1
  523. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.d.ts.map +0 -1
  524. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-log-out.js.map +0 -1
  525. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.d.ts.map +0 -1
  526. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-session.js.map +0 -1
  527. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.d.ts.map +0 -1
  528. package/dist/placeholder-auth/core/generators/placeholder-auth-hooks/templates/src/hooks/use-user-id-or-throw.js.map +0 -1
  529. package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.d.ts.map +0 -1
  530. package/dist/placeholder-auth/core/generators/placeholder-auth-module/auth-module.generator.js.map +0 -1
  531. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.d.ts.map +0 -1
  532. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/index.js.map +0 -1
  533. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.d.ts.map +0 -1
  534. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-paths.js.map +0 -1
  535. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.d.ts.map +0 -1
  536. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/template-renderers.js.map +0 -1
  537. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.d.ts.map +0 -1
  538. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/ts-import-providers.js.map +0 -1
  539. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.d.ts.map +0 -1
  540. package/dist/placeholder-auth/core/generators/placeholder-auth-module/generated/typed-templates.js.map +0 -1
  541. package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.d.ts.map +0 -1
  542. package/dist/placeholder-auth/core/generators/placeholder-auth-module/index.js.map +0 -1
  543. package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.d.ts.map +0 -1
  544. package/dist/placeholder-auth/core/generators/placeholder-auth-module/templates/module/services/user-session.service.js.map +0 -1
  545. package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.d.ts.map +0 -1
  546. package/dist/placeholder-auth/core/generators/placeholder-react-auth/index.js.map +0 -1
  547. package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.d.ts.map +0 -1
  548. package/dist/placeholder-auth/core/generators/placeholder-react-auth/react-auth.generator.js.map +0 -1
  549. package/dist/placeholder-auth/core/index.d.ts.map +0 -1
  550. package/dist/placeholder-auth/core/index.js.map +0 -1
  551. package/dist/placeholder-auth/core/node.d.ts.map +0 -1
  552. package/dist/placeholder-auth/core/node.js.map +0 -1
  553. package/dist/placeholder-auth/core/schema/models.d.ts.map +0 -1
  554. package/dist/placeholder-auth/core/schema/models.js.map +0 -1
  555. package/dist/placeholder-auth/core/schema/plugin-definition.d.ts.map +0 -1
  556. package/dist/placeholder-auth/core/schema/plugin-definition.js.map +0 -1
  557. package/dist/placeholder-auth/core/web.d.ts.map +0 -1
  558. package/dist/placeholder-auth/core/web.js.map +0 -1
  559. package/dist/placeholder-auth/index.d.ts.map +0 -1
  560. package/dist/placeholder-auth/index.js.map +0 -1
  561. package/dist/web/assets/__federation_expose_authCoreCommon-B9LFt4zi.js +0 -85
  562. package/dist/web/assets/__federation_expose_authCoreCommon-B9LFt4zi.js.map +0 -1
  563. package/dist/web/assets/__federation_expose_authCoreWeb-CRo6bfSQ.js +0 -453
  564. package/dist/web/assets/__federation_expose_authCoreWeb-CRo6bfSQ.js.map +0 -1
  565. package/dist/web/assets/__federation_expose_better-authAdminCommon-Drx1dj0K.js +0 -63
  566. package/dist/web/assets/__federation_expose_better-authAdminCommon-Drx1dj0K.js.map +0 -1
  567. package/dist/web/assets/__federation_expose_better-authAdminWeb-Zsc9mjjD.js +0 -41
  568. package/dist/web/assets/__federation_expose_better-authAdminWeb-Zsc9mjjD.js.map +0 -1
  569. package/dist/web/assets/__federation_expose_better-authCoreCommon-BTstKS5D.js +0 -54
  570. package/dist/web/assets/__federation_expose_better-authCoreCommon-BTstKS5D.js.map +0 -1
  571. package/dist/web/assets/__federation_expose_better-authCoreWeb-ClXucVm1.js +0 -157
  572. package/dist/web/assets/__federation_expose_better-authCoreWeb-ClXucVm1.js.map +0 -1
  573. package/dist/web/assets/__federation_expose_local-authAdminCommon-Drx1dj0K.js +0 -63
  574. package/dist/web/assets/__federation_expose_local-authAdminCommon-Drx1dj0K.js.map +0 -1
  575. package/dist/web/assets/__federation_expose_local-authAdminWeb-Ci30yAgH.js +0 -41
  576. package/dist/web/assets/__federation_expose_local-authAdminWeb-Ci30yAgH.js.map +0 -1
  577. package/dist/web/assets/__federation_expose_local-authCoreCommon-C13Qctt3.js +0 -54
  578. package/dist/web/assets/__federation_expose_local-authCoreCommon-C13Qctt3.js.map +0 -1
  579. package/dist/web/assets/__federation_expose_local-authCoreWeb-CLMjEvfQ.js +0 -167
  580. package/dist/web/assets/__federation_expose_local-authCoreWeb-CLMjEvfQ.js.map +0 -1
  581. package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-CtZPLUXY.js +0 -23
  582. package/dist/web/assets/__federation_expose_placeholder-authCoreCommon-CtZPLUXY.js.map +0 -1
  583. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-DNuOQDyt.js +0 -177
  584. package/dist/web/assets/__federation_expose_placeholder-authCoreWeb-DNuOQDyt.js.map +0 -1
  585. package/dist/web/assets/__federation_fn_import-DvwH-J9J.js +0 -421
  586. package/dist/web/assets/__federation_fn_import-DvwH-J9J.js.map +0 -1
  587. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-B2EK5IrR.js +0 -359
  588. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib/web-B2EK5IrR.js.map +0 -1
  589. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CueLW7vJ.js +0 -22532
  590. package/dist/web/assets/__federation_shared_@baseplate-dev/project-builder-lib-CueLW7vJ.js.map +0 -1
  591. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-Cs5voPoC.js +0 -78638
  592. package/dist/web/assets/__federation_shared_@baseplate-dev/ui-components-Cs5voPoC.js.map +0 -1
  593. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-DH2Y7csi.js +0 -1855
  594. package/dist/web/assets/__federation_shared_@baseplate-dev/utils-DH2Y7csi.js.map +0 -1
  595. package/dist/web/assets/__federation_shared_@tanstack/react-router-CDlgRD7c.js +0 -6565
  596. package/dist/web/assets/__federation_shared_@tanstack/react-router-CDlgRD7c.js.map +0 -1
  597. package/dist/web/assets/__federation_shared_react-CJ2OfFKA.js +0 -8
  598. package/dist/web/assets/__federation_shared_react-CJ2OfFKA.js.map +0 -1
  599. package/dist/web/assets/__federation_shared_react-dom-B4vgf5Ln.js +0 -251
  600. package/dist/web/assets/__federation_shared_react-dom-B4vgf5Ln.js.map +0 -1
  601. package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js +0 -13250
  602. package/dist/web/assets/__federation_shared_zod-Do7Aa1b5.js.map +0 -1
  603. package/dist/web/assets/_commonjsHelpers-B85MJLTf.js +0 -6
  604. package/dist/web/assets/_commonjsHelpers-B85MJLTf.js.map +0 -1
  605. package/dist/web/assets/get-auth-plugin-definition-B2xRtRBt.js +0 -13
  606. package/dist/web/assets/get-auth-plugin-definition-B2xRtRBt.js.map +0 -1
  607. package/dist/web/assets/index-D2s6d88Y.js +0 -101
  608. package/dist/web/assets/index-D2s6d88Y.js.map +0 -1
  609. package/dist/web/assets/index-DUwCgkeV.js +0 -570
  610. package/dist/web/assets/index-DUwCgkeV.js.map +0 -1
  611. package/dist/web/assets/index-l0sNRNKZ.js.map +0 -1
  612. package/dist/web/assets/index.esm-CUhaqfEI.js +0 -2676
  613. package/dist/web/assets/index.esm-CUhaqfEI.js.map +0 -1
  614. package/dist/web/assets/isEqual-tnzoadW8.js +0 -242
  615. package/dist/web/assets/isEqual-tnzoadW8.js.map +0 -1
  616. package/dist/web/assets/jsx-runtime-XI9uIe3W.js +0 -60
  617. package/dist/web/assets/jsx-runtime-XI9uIe3W.js.map +0 -1
  618. package/dist/web/assets/mergeWith-VagwCqUi.js +0 -76
  619. package/dist/web/assets/mergeWith-VagwCqUi.js.map +0 -1
  620. package/dist/web/assets/model-names-D7UT0B8x.js +0 -10
  621. package/dist/web/assets/model-names-D7UT0B8x.js.map +0 -1
  622. package/dist/web/assets/model-names-DrcaRxt1.js +0 -25
  623. package/dist/web/assets/model-names-DrcaRxt1.js.map +0 -1
  624. package/dist/web/assets/model-utils-Ccvph4Ii.js +0 -840
  625. package/dist/web/assets/model-utils-Ccvph4Ii.js.map +0 -1
  626. package/dist/web/assets/plugin-definition-B6PqjUHm.js +0 -16
  627. package/dist/web/assets/plugin-definition-B6PqjUHm.js.map +0 -1
  628. package/dist/web/assets/plugin-definition-B6kOvigE.js +0 -315
  629. package/dist/web/assets/plugin-definition-B6kOvigE.js.map +0 -1
  630. package/dist/web/assets/plugin-definition-DDe2WhbZ.js +0 -93
  631. package/dist/web/assets/plugin-definition-DDe2WhbZ.js.map +0 -1
  632. package/dist/web/assets/plugin-definition-QKz1ZAYK.js +0 -304
  633. package/dist/web/assets/plugin-definition-QKz1ZAYK.js.map +0 -1
  634. package/dist/web/assets/react-D62wAwO5.js +0 -47
  635. package/dist/web/assets/react-D62wAwO5.js.map +0 -1
  636. package/dist/web/assets/registries-Tz_dluz3.js +0 -1119
  637. package/dist/web/assets/registries-Tz_dluz3.js.map +0 -1
  638. package/dist/web/assets/remoteEntry.js +0 -84
  639. package/dist/web/assets/remoteEntry.js.map +0 -1
  640. package/dist/web/assets/styles-BEU-uMT0.js +0 -69
  641. package/dist/web/assets/styles-BEU-uMT0.js.map +0 -1
  642. package/dist/web/assets/with-selector-DTXBONcE.js +0 -201
  643. package/dist/web/assets/with-selector-DTXBONcE.js.map +0 -1
@@ -1,1855 +0,0 @@
1
- import { s as sortBy, m as mergeWith } from '../mergeWith-VagwCqUi.js';
2
- import { importShared } from '../__federation_fn_import-DvwH-J9J.js';
3
- import { A as isEqual, y as isPlainObject$1 } from '../isEqual-tnzoadW8.js';
4
-
5
- /**
6
- * Asserts that an array has no duplicate values based on an optional key function.
7
- * Throws an error if duplicates are found, listing all duplicate keys.
8
- *
9
- * @template T The type of elements in the array.
10
- * @param items The array to check for duplicates.
11
- * @param context A string describing the context for the error message (e.g., "route loader fields").
12
- * @param keyFn A function that extracts the comparison key from each element. Defaults to identity.
13
- * @throws Error if duplicate keys are found.
14
- */
15
- function assertNoDuplicates(items, context, keyFn) {
16
- const getKey = keyFn ?? ((item) => item);
17
- const seen = new Map();
18
- const duplicates = [];
19
- for (const item of items) {
20
- const key = getKey(item);
21
- const count = seen.get(key) ?? 0;
22
- seen.set(key, count + 1);
23
- if (count === 1) {
24
- // First time we see a duplicate
25
- duplicates.push(key);
26
- }
27
- }
28
- if (duplicates.length > 0) {
29
- const duplicateList = duplicates
30
- .map((key) => JSON.stringify(key))
31
- .join(', ');
32
- throw new Error(`Duplicate ${context} found: ${duplicateList}`);
33
- }
34
- }
35
-
36
- function normalizeContent(content) {
37
- if (typeof content === 'string') {
38
- const encoder = new TextEncoder();
39
- const { buffer } = encoder.encode(content);
40
- if (!(buffer instanceof ArrayBuffer)) {
41
- throw new TypeError('Buffer is not an ArrayBuffer');
42
- }
43
- return buffer;
44
- }
45
- return content;
46
- }
47
- async function hashWithSHA256(content) {
48
- const data = normalizeContent(content);
49
- const hashBuffer = await crypto.subtle.digest('SHA-256', data);
50
- const hashArray = [...new Uint8Array(hashBuffer)];
51
- return hashArray.map((b) => b.toString(16).padStart(2, '0')).join('');
52
- }
53
-
54
- /**
55
- * Enhances an error with additional context while preserving the original stack trace
56
- * @param {Error} originalError - The original error that was caught
57
- * @param {string} contextMessage - Additional context to prepend to the error message
58
- * @param {Object} [additionalProps] - Optional object with additional properties to add to the error
59
- * @returns {Error} - Enhanced error with preserved stack trace
60
- */
61
- function enhanceErrorWithContext(originalError, contextMessage) {
62
- // Create a new error with combined message
63
- const enhancedError = new Error(`${contextMessage}:\n${originalError instanceof Error
64
- ? originalError.message
65
- : String(originalError)}`);
66
- // Preserve the original stack if possible
67
- if (originalError instanceof Error) {
68
- enhancedError.stack = originalError.stack;
69
- }
70
- return enhancedError;
71
- }
72
-
73
- /**
74
- * Class providing typed event emitter functionality.
75
- *
76
- * @template T - Mapping of event names to payload types.
77
- */
78
- class TypedEventEmitter {
79
- listenerMap = new Map();
80
- /**
81
- * Abort controller for the event emitter to terminate all async generator listeners.
82
- */
83
- eventEmitterAbortController = new AbortController();
84
- /**
85
- * Registers a listener for an event.
86
- *
87
- * @template K - The event name.
88
- * @param eventName - Name of the event.
89
- * @param listener - Callback invoked with the event payload.
90
- * @param options - Options for the listener.
91
- * @returns Function to unregister the listener.
92
- */
93
- on(eventName, listener, options) {
94
- const { signal } = options ?? {};
95
- const existingListeners = this.listenerMap.get(eventName) ?? [];
96
- this.listenerMap.set(eventName, [
97
- ...existingListeners,
98
- listener,
99
- ]);
100
- // Returns a function that unregisters this listener.
101
- const unregister = () => {
102
- const updatedListeners = (this.listenerMap.get(eventName) ?? []).filter((l) => l !== listener);
103
- if (updatedListeners.length > 0) {
104
- this.listenerMap.set(eventName, updatedListeners);
105
- }
106
- else {
107
- this.listenerMap.delete(eventName);
108
- }
109
- };
110
- signal?.addEventListener('abort', unregister, {
111
- once: true,
112
- });
113
- return unregister;
114
- }
115
- /**
116
- * Creates an async generator for an event.
117
- *
118
- * @template K - The event name.
119
- * @param eventName - Name of the event.
120
- * @param options - Additional options.
121
- * @returns An async generator yielding event payloads.
122
- */
123
- async *onAsync(eventName, options) {
124
- // Create a queue to store events when consumer isn't ready
125
- const queue = [];
126
- let pendingNext;
127
- let isDone = false;
128
- // Return early if the signal is aborted
129
- const eventEmitterAbortSignal = this.eventEmitterAbortController.signal;
130
- if (options.signal?.aborted || eventEmitterAbortSignal.aborted)
131
- return;
132
- function abortHandler() {
133
- isDone = true;
134
- // trigger dummy event to unblock the consumer
135
- pendingNext?.(undefined);
136
- }
137
- options.signal?.addEventListener('abort', abortHandler, { once: true });
138
- eventEmitterAbortSignal.addEventListener('abort', abortHandler, {
139
- once: true,
140
- });
141
- this.on(eventName, (payload) => {
142
- if (pendingNext) {
143
- pendingNext(payload);
144
- pendingNext = undefined;
145
- }
146
- else {
147
- queue.push(payload);
148
- }
149
- }, { signal: options.signal });
150
- // Keep yielding events until done
151
- // oxlint-disable-next-line no-unmodified-loop-condition -- false positive since isDone is set to true in the abort handler
152
- while (!isDone) {
153
- const payload = queue.shift() ??
154
- (await new Promise((resolve) => {
155
- pendingNext = resolve;
156
- }));
157
- // oxlint-disable-next-line typescript/no-unnecessary-condition -- false positive since isDone is set to true in the abort handler
158
- if (isDone)
159
- break;
160
- yield payload;
161
- }
162
- }
163
- /**
164
- * Emits an event with the given payload.
165
- *
166
- * @template K - The event name.
167
- * @param eventName - Name of the event.
168
- * @param payload - Payload for the event.
169
- */
170
- emit(eventName, payload) {
171
- const listeners = this.listenerMap.get(eventName) ?? [];
172
- for (const listener of listeners) {
173
- listener(payload);
174
- }
175
- }
176
- /**
177
- * Removes all registered event listeners.
178
- *
179
- * Note: This is dangerous and should only be used in testing.
180
- */
181
- clearListeners() {
182
- this.listenerMap.clear();
183
- this.eventEmitterAbortController.abort();
184
- }
185
- /**
186
- * Aborts the event emitter to terminate all async generator listeners.
187
- */
188
- abortEventEmitter() {
189
- this.eventEmitterAbortController.abort();
190
- }
191
- }
192
- /**
193
- * Creates a typed event emitter that supports event listening and emitting.
194
- *
195
- * @template T - Mapping of event names to payload types.
196
- * @returns An emitter with `on`, `emit`, and `clear` methods.
197
- */
198
- function createTypedEventEmitter() {
199
- return new TypedEventEmitter();
200
- }
201
-
202
- /**
203
- * Field container for a single value that cannot be overridden once set
204
- */
205
- class ScalarContainer {
206
- _value;
207
- defaultValue;
208
- isSet = false;
209
- setBySource;
210
- getDynamicSource;
211
- constructor(defaultValue, options) {
212
- this.defaultValue = defaultValue;
213
- this.getDynamicSource = options?.getDynamicSource;
214
- }
215
- getValue() {
216
- return this._value === undefined ? this.defaultValue : this._value;
217
- }
218
- set(value, source) {
219
- const setBySource = source ?? this.getDynamicSource?.() ?? 'unknown';
220
- if (this.isSet) {
221
- // oxlint-disable-next-line unicorn/prefer-type-error -- false positive
222
- throw new Error(`Value has already been set by ${this.setBySource} and cannot be overwritten by ${setBySource}`);
223
- }
224
- this._value = value;
225
- this.isSet = true;
226
- this.setBySource = setBySource;
227
- }
228
- }
229
- // Array field container
230
- class ArrayContainer {
231
- _stripDuplicates;
232
- _value;
233
- constructor(initialValue, options) {
234
- this._stripDuplicates = options?.stripDuplicates ?? false;
235
- this._value = initialValue ?? [];
236
- }
237
- push(...items) {
238
- let currentValue = this._value;
239
- if (this._stripDuplicates) {
240
- // Add items without duplicates
241
- const set = new Set([...currentValue, ...items]);
242
- currentValue = [...set];
243
- }
244
- else {
245
- // Add all items
246
- currentValue = [...currentValue, ...items];
247
- }
248
- this._value = currentValue;
249
- }
250
- getValue() {
251
- return this._value;
252
- }
253
- }
254
- class ObjectContainer {
255
- map;
256
- getDynamicSource;
257
- constructor(initialValue, options) {
258
- this.getDynamicSource = options?.getDynamicSource;
259
- this.map = new Map(Object.entries(initialValue).map(([key, value]) => [
260
- key,
261
- { value, setBySource: this.getDynamicSource?.() },
262
- ]));
263
- }
264
- set(key, value, source) {
265
- const existingValue = this.map.get(key);
266
- const setBySource = source ?? this.getDynamicSource?.() ?? 'unknown';
267
- if (existingValue?.setBySource) {
268
- throw new Error(`Value for key ${key} has already been set by ${existingValue.setBySource} and cannot be overwritten by ${setBySource}`);
269
- }
270
- this.map.set(key, {
271
- value,
272
- setBySource,
273
- });
274
- }
275
- merge(value, source) {
276
- const mergeSource = source ?? this.getDynamicSource?.();
277
- for (const [key, val] of Object.entries(value)) {
278
- this.set(key, val, mergeSource);
279
- }
280
- }
281
- getValue() {
282
- return Object.fromEntries([...this.map.entries()].map(([key, value]) => [key, value.value]));
283
- }
284
- }
285
- // Map field container
286
- class MapContainer {
287
- _value;
288
- getDynamicSource;
289
- constructor(initialValue, options) {
290
- this.getDynamicSource = options?.getDynamicSource;
291
- const initialMap = initialValue ?? new Map();
292
- this._value = new Map([...initialMap.entries()].map(([key, value]) => [
293
- key,
294
- { value, setBySource: this.getDynamicSource?.() },
295
- ]));
296
- }
297
- set(key, value, source) {
298
- const existingValue = this._value.get(key);
299
- const setBySource = source ?? this.getDynamicSource?.() ?? 'unknown';
300
- if (existingValue?.setBySource) {
301
- throw new Error(`Value for key ${key} has already been set by ${existingValue.setBySource} and cannot be overwritten by ${setBySource}`);
302
- }
303
- this._value.set(key, {
304
- value,
305
- setBySource,
306
- });
307
- }
308
- merge(value, source) {
309
- const mergeSource = source ?? this.getDynamicSource?.();
310
- for (const [key, val] of value.entries()) {
311
- this.set(key, val, mergeSource);
312
- }
313
- }
314
- mergeObj(value, source) {
315
- const mergeSource = source ?? this.getDynamicSource?.();
316
- for (const [key, val] of Object.entries(value)) {
317
- this.set(key, val, mergeSource);
318
- }
319
- }
320
- getValue() {
321
- return new Map([...this._value.entries()].map(([key, value]) => [key, value.value]));
322
- }
323
- }
324
- /**
325
- * Named field container
326
- *
327
- * This container stores objects that contains a name field that can be used for
328
- * detecting duplicate names.
329
- */
330
- class NamedArrayFieldContainer {
331
- _value;
332
- getDynamicSource;
333
- constructor(initialValue, options) {
334
- this.getDynamicSource = options?.getDynamicSource;
335
- const value = initialValue ?? [];
336
- this._value = new Map(value.map((val) => [
337
- val.name,
338
- { value: val, setBySource: this.getDynamicSource?.() },
339
- ]));
340
- }
341
- add(value, source) {
342
- const existingValue = this._value.get(value.name);
343
- const setBySource = source ?? this.getDynamicSource?.() ?? 'unknown';
344
- if (existingValue?.setBySource) {
345
- throw new Error(`Value for name ${value.name} has already been set by ${existingValue.setBySource} and cannot be overwritten by ${setBySource}`);
346
- }
347
- this._value.set(value.name, {
348
- value,
349
- setBySource,
350
- });
351
- }
352
- addMany(values, source) {
353
- for (const value of values) {
354
- this.add(value, source);
355
- }
356
- }
357
- getValue() {
358
- return sortBy([...this._value.values()].map((value) => value.value), [(v) => v.name]);
359
- }
360
- }
361
- /**
362
- * Named array field container that returns a map of names to values
363
- */
364
- class NamedArrayToMapFieldContainer {
365
- _namedFieldContainer;
366
- constructor(initialValue, options) {
367
- this._namedFieldContainer = new NamedArrayFieldContainer(initialValue, options);
368
- }
369
- add(value, source) {
370
- this._namedFieldContainer.add(value, source);
371
- }
372
- addMany(values, source) {
373
- this._namedFieldContainer.addMany(values, source);
374
- }
375
- getValue() {
376
- return new Map(this._namedFieldContainer.getValue().map((value) => [value.name, value]));
377
- }
378
- }
379
- // Map of maps field container
380
- class MapOfMapsContainer {
381
- _value;
382
- getDynamicSource;
383
- constructor(initialValue, options) {
384
- this.getDynamicSource = options?.getDynamicSource;
385
- const initialMap = initialValue ?? new Map();
386
- this._value = new Map([...initialMap.entries()].map(([key1, innerMap]) => [
387
- key1,
388
- {
389
- value: new Map([...innerMap.entries()].map(([key2, value]) => [
390
- key2,
391
- { value, setBySource: this.getDynamicSource?.() },
392
- ])),
393
- setBySource: this.getDynamicSource?.(),
394
- },
395
- ]));
396
- }
397
- set(key1, key2, value, source) {
398
- const existingOuterValue = this._value.get(key1);
399
- const setBySource = source ?? this.getDynamicSource?.() ?? 'unknown';
400
- // If the outer key doesn't exist yet, create a new map for it
401
- if (!existingOuterValue) {
402
- const newInnerMap = new Map([[key2, { value, setBySource }]]);
403
- this._value.set(key1, {
404
- value: newInnerMap,
405
- setBySource,
406
- });
407
- return;
408
- }
409
- // Check if this specific key1+key2 combination has already been set
410
- const existingInnerValue = existingOuterValue.value.get(key2);
411
- if (existingInnerValue?.setBySource) {
412
- throw new Error(`Value for keys ${key1}+${key2} has already been set by ${existingInnerValue.setBySource} and cannot be overwritten by ${setBySource}`);
413
- }
414
- // Add the new value to the existing inner map
415
- existingOuterValue.value.set(key2, {
416
- value,
417
- setBySource,
418
- });
419
- }
420
- merge(key1, value, source) {
421
- const mergeSource = source ?? this.getDynamicSource?.() ?? 'unknown';
422
- for (const [key2, val] of value.entries()) {
423
- this.set(key1, key2, val, mergeSource);
424
- }
425
- }
426
- mergeObj(key1, value, source) {
427
- const mergeSource = source ?? this.getDynamicSource?.() ?? 'unknown';
428
- for (const [key2, val] of Object.entries(value)) {
429
- this.set(key1, key2, val, mergeSource);
430
- }
431
- }
432
- getValue() {
433
- return new Map([...this._value.entries()].map(([key1, outerValue]) => [
434
- key1,
435
- new Map([...outerValue.value.entries()].map(([key2, innerValue]) => [
436
- key2,
437
- innerValue.value,
438
- ])),
439
- ]));
440
- }
441
- }
442
- // Schema builder class
443
- class FieldMapSchemaBuilder {
444
- options;
445
- constructor(options) {
446
- this.options = options;
447
- }
448
- scalar(defaultValue) {
449
- return new ScalarContainer(defaultValue, this.options);
450
- }
451
- string(defaultValue) {
452
- return new ScalarContainer(defaultValue, this.options);
453
- }
454
- number(defaultValue) {
455
- return new ScalarContainer(defaultValue, this.options);
456
- }
457
- boolean(defaultValue) {
458
- return new ScalarContainer(defaultValue, this.options);
459
- }
460
- array(initialValue, options) {
461
- return new ArrayContainer(initialValue, options);
462
- }
463
- object(defaultValue) {
464
- return new ObjectContainer(defaultValue, this.options);
465
- }
466
- map(initialValue) {
467
- return new MapContainer(initialValue ?? new Map(), this.options);
468
- }
469
- mapFromObj(initialValue) {
470
- return new MapContainer(new Map(Object.entries(initialValue ?? {})), this.options);
471
- }
472
- namedArray(initialValue) {
473
- return new NamedArrayFieldContainer(initialValue, this.options);
474
- }
475
- namedArrayToMap(initialValue) {
476
- return new NamedArrayToMapFieldContainer(initialValue, this.options);
477
- }
478
- mapOfMaps(initialValue) {
479
- return new MapOfMapsContainer(initialValue ?? new Map(), this.options);
480
- }
481
- mapOfMapsFromObj(initialValue) {
482
- const map = new Map();
483
- if (initialValue) {
484
- for (const [key1, innerObj] of Object.entries(initialValue)) {
485
- map.set(key1, new Map(Object.entries(innerObj)));
486
- }
487
- }
488
- return new MapOfMapsContainer(map, this.options);
489
- }
490
- }
491
- function createFieldMapSchemaBuilder(schemaBuilder) {
492
- return schemaBuilder;
493
- }
494
- /**
495
- * Creates a field map with type-safe field definitions
496
- */
497
- function createFieldMap(schemaBuilder, options) {
498
- const schema = schemaBuilder(new FieldMapSchemaBuilder(options));
499
- // Add getValues method
500
- return {
501
- ...schema,
502
- getValues: () => {
503
- const values = {};
504
- for (const key of Object.keys(schema)) {
505
- const container = schema[key];
506
- values[key] = container.getValue();
507
- }
508
- return values;
509
- },
510
- };
511
- }
512
-
513
- /**
514
- * Recursively deep clones JSON-compatible values.
515
- * Throws if the value is not JSON-serializable.
516
- *
517
- * @param value - The value to clone
518
- * @returns A deep-cloned copy of the value
519
- * @throws Error if a non-JSON value is encountered
520
- */
521
- function jsonDeepClone(value) {
522
- if (value === undefined ||
523
- value === null ||
524
- typeof value === 'boolean' ||
525
- typeof value === 'string') {
526
- return value;
527
- }
528
- if (typeof value === 'number') {
529
- return value;
530
- }
531
- if (typeof value === 'object') {
532
- if (value instanceof Date || value instanceof RegExp) {
533
- throw new TypeError(`Cannot clone value of unsupported type: ${value.constructor.name}`);
534
- }
535
- if (Array.isArray(value)) {
536
- // Clone array elements
537
- const copy = [];
538
- for (const [i, element] of value.entries()) {
539
- copy[i] = jsonDeepClone(element);
540
- }
541
- return copy;
542
- }
543
- // Clone plain object properties
544
- const copy = {};
545
- for (const key in value) {
546
- if (Object.prototype.hasOwnProperty.call(value, key)) {
547
- const prop = value[key];
548
- copy[key] = jsonDeepClone(prop);
549
- }
550
- }
551
- return copy;
552
- }
553
- // Reject functions, symbols, BigInt, etc.
554
- throw new Error(`Cannot clone value of unsupported type: ${typeof value}`);
555
- }
556
-
557
- // adapted from https://github.com/AitoDotAI/json-stringify-pretty-compact
558
- // allows { } to be presented as {} to better mirror prettier formatting
559
- function isObject(obj) {
560
- return typeof obj === 'object' && obj !== null;
561
- }
562
- function forEach(obj, cb) {
563
- if (Array.isArray(obj)) {
564
- // oxlint-disable-next-line unicorn/no-array-for-each
565
- obj.forEach(cb);
566
- }
567
- else if (isObject(obj)) {
568
- for (const key of Object.keys(obj)) {
569
- const val = obj[key];
570
- cb(val, key);
571
- }
572
- }
573
- }
574
- function getTreeDepth(obj) {
575
- let depth = 0;
576
- if (Array.isArray(obj) || isObject(obj)) {
577
- forEach(obj, (val) => {
578
- if (Array.isArray(val) || isObject(val)) {
579
- const tmpDepth = getTreeDepth(val);
580
- if (tmpDepth > depth) {
581
- depth = tmpDepth;
582
- }
583
- }
584
- });
585
- return depth + 1;
586
- }
587
- return depth;
588
- }
589
- function get(options, name, defaultValue) {
590
- return (name in options ? options[name] : defaultValue);
591
- }
592
- // Note: This regex matches even invalid JSON strings, but since we’re
593
- // working on the output of `JSON.stringify` we know that only valid strings
594
- // are present (unless the user supplied a weird `options.indent` but in
595
- // that case we don’t care since the output would be invalid anyway).
596
- // This regex has been adjusted to allow replacement of { } and [ ] with {} and []
597
- // to better mirror prettier formatting.
598
- const stringOrChar = /("(?:[^\\"]|\\.)*")|[:,]|\{(?!})|(?<!\{)}|\[(?!])|(?<!\[)]/g;
599
- function prettify(str, options = {}) {
600
- const tokens = {
601
- '{': '{',
602
- '}': '}',
603
- '[': '[',
604
- ']': ']',
605
- ',': ', ',
606
- ':': ': ',
607
- };
608
- if (!!options.addMargin || !!options.addObjectMargin) {
609
- tokens['{'] = '{ ';
610
- tokens['}'] = ' }';
611
- }
612
- if (!!options.addMargin || !!options.addArrayMargin) {
613
- tokens['['] = '[ ';
614
- tokens[']'] = ' ]';
615
- }
616
- return str.replaceAll(stringOrChar, (match, string) => string ? match : tokens[match]);
617
- }
618
- function stringifyPrettyCompact(rootObj, options = {}) {
619
- const indent = JSON.stringify([1], null, get(options, 'indent', 2)).slice(2, -3);
620
- const addMargin = get(options, 'margins', false);
621
- const addArrayMargin = get(options, 'arrayMargins', false);
622
- const addObjectMargin = get(options, 'objectMargins', true);
623
- const maxLength = indent === '' ? Infinity : get(options, 'maxLength', 80);
624
- const maxNesting = get(options, 'maxNesting', Infinity);
625
- return (function stringifyRecursive(obj, currentIndent, reserved) {
626
- if (obj &&
627
- typeof obj === 'object' &&
628
- typeof obj.toJSON === 'function') {
629
- // oxlint-disable-next-line typescript/no-confusing-void-expression
630
- obj = obj.toJSON();
631
- }
632
- const string = JSON.stringify(obj);
633
- // oxlint-disable-next-line typescript/no-unnecessary-condition
634
- if (string === undefined) {
635
- return string;
636
- }
637
- const length = maxLength - currentIndent.length - reserved;
638
- const treeDepth = getTreeDepth(obj);
639
- if (treeDepth <= maxNesting && string.length <= length) {
640
- const prettified = prettify(string, {
641
- addMargin,
642
- addArrayMargin,
643
- addObjectMargin,
644
- });
645
- if (prettified.length <= length) {
646
- return prettified;
647
- }
648
- }
649
- if (isObject(obj)) {
650
- const nextIndent = currentIndent + indent;
651
- const items = [];
652
- let delimiters;
653
- const atEndOfArray = (array, index) => index === array.length - 1 ? 0 : 1;
654
- if (Array.isArray(obj)) {
655
- for (let index = 0; index < obj.length; index += 1) {
656
- items.push(stringifyRecursive(obj[index], nextIndent, atEndOfArray(obj, index)) || 'null');
657
- }
658
- delimiters = '[]';
659
- }
660
- else {
661
- // oxlint-disable-next-line unicorn/no-array-for-each
662
- Object.keys(obj).forEach((key, index, array) => {
663
- const keyPart = `${JSON.stringify(key)}: `;
664
- const value = stringifyRecursive(obj[key], nextIndent, keyPart.length + atEndOfArray(array, index));
665
- // oxlint-disable-next-line typescript/no-unnecessary-condition
666
- if (value !== undefined) {
667
- items.push(keyPart + value);
668
- }
669
- });
670
- delimiters = '{}';
671
- }
672
- if (items.length > 0) {
673
- return [
674
- delimiters[0],
675
- indent + items.join(`,\n${nextIndent}`),
676
- delimiters[1],
677
- ].join(`\n${currentIndent}`);
678
- }
679
- }
680
- return string;
681
- })(rootObj, '', 0);
682
- }
683
-
684
- function isPlainObject(value) {
685
- if (typeof value !== 'object' || value === null) {
686
- return false;
687
- }
688
-
689
- const prototype = Object.getPrototypeOf(value);
690
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
691
- }
692
-
693
- function sortKeys(object, options = {}) {
694
- if (!isPlainObject(object) && !Array.isArray(object)) {
695
- throw new TypeError('Expected a plain object or array');
696
- }
697
-
698
- const {deep, compare} = options;
699
- const cache = new WeakMap();
700
-
701
- const deepSortArray = array => {
702
- const resultFromCache = cache.get(array);
703
- if (resultFromCache !== undefined) {
704
- return resultFromCache;
705
- }
706
-
707
- const result = [];
708
- cache.set(array, result);
709
-
710
- result.push(...array.map(item => {
711
- if (Array.isArray(item)) {
712
- return deepSortArray(item);
713
- }
714
-
715
- if (isPlainObject(item)) {
716
- return _sortKeys(item);
717
- }
718
-
719
- return item;
720
- }));
721
-
722
- return result;
723
- };
724
-
725
- const _sortKeys = object => {
726
- const resultFromCache = cache.get(object);
727
- if (resultFromCache !== undefined) {
728
- return resultFromCache;
729
- }
730
-
731
- const result = {};
732
- const keys = Object.keys(object).sort(compare);
733
-
734
- cache.set(object, result);
735
-
736
- for (const key of keys) {
737
- const value = object[key];
738
- let newValue;
739
-
740
- if (deep && Array.isArray(value)) {
741
- newValue = deepSortArray(value);
742
- } else {
743
- newValue = deep && isPlainObject(value) ? _sortKeys(value) : value;
744
- }
745
-
746
- Object.defineProperty(result, key, {
747
- ...Object.getOwnPropertyDescriptor(object, key),
748
- value: newValue,
749
- });
750
- }
751
-
752
- return result;
753
- };
754
-
755
- if (Array.isArray(object)) {
756
- return deep ? deepSortArray(object) : [...object];
757
- }
758
-
759
- return _sortKeys(object);
760
- }
761
-
762
- /**
763
- * Stringifies a value with stable pretty printing.
764
- *
765
- * That means the keys are sorted and the value is pretty printed.
766
- *
767
- * @param value - The value to stringify.
768
- * @returns The stringified value.
769
- */
770
- function stringifyPrettyStable(value) {
771
- const sortedValue = sortKeys(value, {
772
- deep: true,
773
- });
774
- return `${stringifyPrettyCompact(sortedValue)}\n`;
775
- }
776
-
777
- /**
778
- * Groups values of an iterable using a key-generating function and returns a Map.
779
- *
780
- * Mimics the behavior of ES2025 `Map.groupBy`.
781
- *
782
- * @template T The type of elements in the iterable.
783
- * @template K The key type returned by the key function.
784
- * @param iterable The iterable to group.
785
- * @param keyFn A function that returns a grouping key for each element.
786
- * @returns A Map where each key maps to an array of elements with that key.
787
- */
788
- function mapGroupBy(iterable, keyFn) {
789
- const result = new Map();
790
- for (const item of iterable) {
791
- const key = keyFn(item);
792
- const group = result.get(key);
793
- if (group) {
794
- group.push(item);
795
- }
796
- else {
797
- result.set(key, [item]);
798
- }
799
- }
800
- return result;
801
- }
802
-
803
- /**
804
- * Creates a Map from an iterable, using a key-generating function.
805
- * If multiple elements generate the same key, later elements override earlier ones.
806
- *
807
- * Analogous to lodash's keyBy function, but returns a Map instead of an object.
808
- *
809
- * @template T The type of elements in the iterable.
810
- * @template K The key type returned by the key function.
811
- * @param iterable The iterable to transform.
812
- * @param keyFn A function that returns a unique key for each element.
813
- * @returns A Map where each key maps to a single element.
814
- */
815
- function mapKeyBy(iterable, keyFn) {
816
- const result = new Map();
817
- for (const item of iterable) {
818
- const key = keyFn(item);
819
- result.set(key, item);
820
- }
821
- return result;
822
- }
823
-
824
- /**
825
- * Maps the values of a Map to a new Map with the same keys.
826
- *
827
- * @template K - Type of keys in the map.
828
- * @template V - Original value type.
829
- * @template R - Resulting value type.
830
- * @param map - The input Map to transform.
831
- * @param fn - A function to transform each value, receiving the value, key, and original map.
832
- * @returns A new Map with the same keys and transformed values.
833
- */
834
- function mapValuesOfMap(map, fn) {
835
- const result = new Map();
836
- for (const [key, value] of map.entries()) {
837
- result.set(key, fn(value, key, map));
838
- }
839
- return result;
840
- }
841
-
842
- /**
843
- * Merges an array of maps, throwing an error if any keys overlap (unless the values are deeply equal and allowed).
844
- *
845
- * @param maps - The array of maps to merge.
846
- * @param options - Options to control merge behavior.
847
- * @returns The merged map.
848
- */
849
- function safeMergeMapsWithOptions(maps, options = {}) {
850
- const result = new Map();
851
- for (const map of maps) {
852
- for (const [key, value] of map) {
853
- if (result.has(key)) {
854
- const existing = result.get(key);
855
- if (!options.allowEqualValues || !isEqual(existing, value)) {
856
- throw new Error(`Cannot merge key ${String(key)} because it already exists.`);
857
- }
858
- }
859
- result.set(key, value);
860
- }
861
- }
862
- return result;
863
- }
864
- /**
865
- * Merges two maps, throwing an error if any keys overlap.
866
- *
867
- * @param mapOne - The first map to merge.
868
- * @param mapTwo - The second map to merge.
869
- * @param options - Options to control merge behavior
870
- * @returns The merged map.
871
- */
872
- function safeMergeMap(mapOne, mapTwo, options = {}) {
873
- return safeMergeMapsWithOptions([mapOne, mapTwo], options);
874
- }
875
- /**
876
- * Merges an array of maps, throwing an error if any keys overlap (unless the values are deeply equal and allowed).
877
- * This function delegates to safeMergeMapsWithOptions.
878
- *
879
- * @param maps - The array of maps to merge.
880
- * @returns The merged map.
881
- */
882
- function safeMergeMaps(...maps) {
883
- return safeMergeMapsWithOptions(maps);
884
- }
885
-
886
- /**
887
- * Sets a value at a given path in an object or array immutably.
888
- *
889
- * Mimics lodash set but returns a new object/array and throws on invalid paths.
890
- * Only operates on JSON-stringifyable data (objects and arrays).
891
- *
892
- * It navigates the path and recursively copies objects/arrays along the path.
893
- *
894
- * @param obj - The object or array to modify
895
- * @param path - The path to set the value at
896
- * @param value - The value to set
897
- * @returns A new object or array with the value set
898
- * @throws Error if the path is invalid (e.g., trying to set a property on a non-object)
899
- */
900
- function immutableSet(obj, path, value) {
901
- if (path.length === 0) {
902
- return value;
903
- }
904
- const [head, ...tail] = path;
905
- if (Array.isArray(obj)) {
906
- if (typeof head !== 'number') {
907
- throw new TypeError(`Invalid path: expected number index for array, got "${head}"`);
908
- }
909
- const newArr = [...obj];
910
- newArr[head] =
911
- tail.length === 0
912
- ? value
913
- : immutableSet(obj[head], tail, value);
914
- return newArr;
915
- }
916
- if (isPlainObject$1(obj)) {
917
- const newObj = { ...obj };
918
- const key = String(head);
919
- newObj[key] =
920
- tail.length === 0
921
- ? value
922
- : immutableSet(obj[key], tail, value);
923
- return newObj;
924
- }
925
- throw new Error(`Invalid path: cannot set property "${head}" on non-object value`);
926
- }
927
-
928
- /**
929
- * Merges two objects, throwing an error if any keys overlap.
930
- *
931
- * @param itemOne - The first object to merge.
932
- * @param itemTwo - The second object to merge.
933
- * @param options - Options to control merge behavior
934
- * @returns The merged object.
935
- */
936
- function safeMerge(itemOne, itemTwo, options = {}) {
937
- return mergeWith(itemOne, itemTwo, (targetValue, sourceValue, key) => {
938
- if (key in itemOne && key in itemTwo) {
939
- if (options.allowEqualValues && isEqual(targetValue, sourceValue)) {
940
- // oxlint-disable-next-line typescript/no-unsafe-return -- we're just using the sourceValue
941
- return sourceValue;
942
- }
943
- throw new Error(`Cannot merge key ${key} because it already exists.`);
944
- }
945
- // oxlint-disable-next-line typescript/no-unsafe-return -- we're just using the sourceValue
946
- return sourceValue;
947
- });
948
- }
949
- /**
950
- * Merges an array of objects, throwing an error if any keys overlap.
951
- *
952
- * @param items - The array of objects to merge.
953
- * @param options - Options to control merge behavior
954
- * @returns The merged object.
955
- */
956
- function safeMergeAllWithOptions(items, options = {}) {
957
- const targetValue = {};
958
- for (const item of items.flat()) {
959
- safeMerge(targetValue, item, options);
960
- }
961
- return targetValue;
962
- }
963
- /**
964
- * Merges an array of objects, throwing an error if any keys overlap.
965
- *
966
- * @param items - The array of objects to merge.
967
- * @returns The merged object.
968
- */
969
- function safeMergeAll(...items) {
970
- return safeMergeAllWithOptions(items);
971
- }
972
-
973
- /**
974
- * Stable string comparison function that uses case-insensitive lexicographic ordering
975
- * with a case-sensitive tiebreaker for determinism.
976
- *
977
- * This matches the default behavior of `localeCompare` (case-insensitive) while
978
- * providing consistent results across different operating systems and locales.
979
- * Use this for deterministic sorting where locale-aware comparison is not required.
980
- *
981
- * @param a - First string to compare
982
- * @param b - Second string to compare
983
- * @returns Negative if a < b, positive if a > b, zero if equal
984
- *
985
- * @example
986
- * ```ts
987
- * const items = ['Banana', 'apple', 'Cherry', 'cherry'];
988
- * items.sort(compareStrings); // ['apple', 'Banana', 'Cherry', 'cherry']
989
- * ```
990
- */
991
- function compareStrings(a, b) {
992
- const aLower = a.toLowerCase();
993
- const bLower = b.toLowerCase();
994
- if (aLower < bLower)
995
- return -1;
996
- if (aLower > bLower)
997
- return 1;
998
- // Tiebreaker: case-sensitive comparison for determinism
999
- if (a < b)
1000
- return -1;
1001
- if (a > b)
1002
- return 1;
1003
- return 0;
1004
- }
1005
-
1006
- /**
1007
- * Recursively sorts all keys in an object, including nested objects and arrays.
1008
- *
1009
- * @param obj - The object to sort recursively.
1010
- * @returns A new object with all keys sorted recursively.
1011
- */
1012
- function sortKeysRecursive(obj) {
1013
- if (obj === null || typeof obj !== 'object') {
1014
- return obj;
1015
- }
1016
- if (Array.isArray(obj)) {
1017
- return obj.map(sortKeysRecursive);
1018
- }
1019
- return Object.fromEntries(Object.entries(obj)
1020
- .toSorted(([a], [b]) => compareStrings(a, b))
1021
- .map(([key, value]) => [key, sortKeysRecursive(value)]));
1022
- }
1023
-
1024
- /**
1025
- * Sorts the keys of an object.
1026
- *
1027
- * @param obj - The object to sort.
1028
- * @returns The sorted object.
1029
- */
1030
- function sortObjectKeys(obj) {
1031
- return Object.fromEntries(Object.entries(obj).toSorted(([a], [b]) => compareStrings(a, b)));
1032
- }
1033
-
1034
- /**
1035
- * Returns a new Set containing values in `setA` that are not in `setB`.
1036
- *
1037
- * @param setA - The original set
1038
- * @param setB - The set of values to exclude
1039
- * @returns A new Set with the difference
1040
- */
1041
- function differenceSet(setA, setB) {
1042
- const result = new Set();
1043
- for (const value of setA) {
1044
- if (!setB.has(value)) {
1045
- result.add(value);
1046
- }
1047
- }
1048
- return result;
1049
- }
1050
-
1051
- /**
1052
- * Lowercase the first character of a string, leaving the remainder unchanged.
1053
- *
1054
- * - Returns the input unchanged when it's an empty string
1055
- * - Non-alphabetic first characters are returned as-is
1056
- *
1057
- * @param str - The input string
1058
- * @returns The string with the first character lowercased
1059
- * @example
1060
- * lowercaseFirstChar('Hello') // 'hello'
1061
- * lowercaseFirstChar('hello') // 'hello'
1062
- * lowercaseFirstChar('1World') // '1World'
1063
- */
1064
- function lowercaseFirstChar(str) {
1065
- if (str.length === 0) {
1066
- return str;
1067
- }
1068
- return str.charAt(0).toLowerCase() + str.slice(1);
1069
- }
1070
- /**
1071
- * Uppercase the first character of a string, leaving the remainder unchanged.
1072
- *
1073
- * - Returns the input unchanged when it's an empty string
1074
- * - Non-alphabetic first characters are returned as-is
1075
- *
1076
- * @param str - The input string
1077
- * @returns The string with the first character uppercased
1078
- * @example
1079
- * uppercaseFirstChar('hello') // 'Hello'
1080
- * uppercaseFirstChar('Hello') // 'Hello'
1081
- * uppercaseFirstChar('#tag') // '#tag'
1082
- */
1083
- function uppercaseFirstChar(str) {
1084
- if (str.length === 0) {
1085
- return str;
1086
- }
1087
- return str.charAt(0).toUpperCase() + str.slice(1);
1088
- }
1089
-
1090
- /**
1091
- * Converts a string to the specified case while preserving non-alphanumeric prefixes and suffixes.
1092
- *
1093
- * @param input - The string to convert
1094
- * @param caseConverter - The case conversion function to apply
1095
- * @returns The converted string with preserved prefix and suffix
1096
- *
1097
- * @example
1098
- * ```typescript
1099
- * convertCaseWithPrefix('_layoutTest', kebabCase)
1100
- * // Returns: '_layout-test'
1101
- *
1102
- * convertCaseWithPrefix('__privateHelper', kebabCase)
1103
- * // Returns: '__private-helper'
1104
- *
1105
- * convertCaseWithPrefix('[id]', kebabCase)
1106
- * // Returns: '[id]'
1107
- * ```
1108
- */
1109
- function convertCaseWithPrefix(input, caseConverter) {
1110
- // Handle special pattern where the entire string is non-alphanumeric (like "[id]")
1111
- if (!/[a-zA-Z0-9]/.test(input)) {
1112
- return input;
1113
- }
1114
- // Extract non-alphanumeric prefix
1115
- const prefixMatch = /^([^a-zA-Z0-9]*)/.exec(input);
1116
- const prefix = prefixMatch?.[1] ?? '';
1117
- // Extract non-alphanumeric suffix
1118
- const suffixMatch = /([^a-zA-Z0-9]*)$/.exec(input);
1119
- const suffix = suffixMatch?.[1] ?? '';
1120
- // Get the middle part (everything between prefix and suffix)
1121
- const startIndex = prefix.length;
1122
- const endIndex = input.length - suffix.length;
1123
- const middlePart = input.slice(startIndex, endIndex);
1124
- // Only apply case conversion to the middle part if it contains alphanumeric characters
1125
- const convertedMiddlePart = middlePart && /[a-zA-Z0-9]/.test(middlePart)
1126
- ? caseConverter(middlePart)
1127
- : middlePart;
1128
- return prefix + convertedMiddlePart + suffix;
1129
- }
1130
-
1131
- const peq = new Uint32Array(0x10000);
1132
- const myers_32 = (a, b) => {
1133
- const n = a.length;
1134
- const m = b.length;
1135
- const lst = 1 << (n - 1);
1136
- let pv = -1;
1137
- let mv = 0;
1138
- let sc = n;
1139
- let i = n;
1140
- while (i--) {
1141
- peq[a.charCodeAt(i)] |= 1 << i;
1142
- }
1143
- for (i = 0; i < m; i++) {
1144
- let eq = peq[b.charCodeAt(i)];
1145
- const xv = eq | mv;
1146
- eq |= ((eq & pv) + pv) ^ pv;
1147
- mv |= ~(eq | pv);
1148
- pv &= eq;
1149
- if (mv & lst) {
1150
- sc++;
1151
- }
1152
- if (pv & lst) {
1153
- sc--;
1154
- }
1155
- mv = (mv << 1) | 1;
1156
- pv = (pv << 1) | ~(xv | mv);
1157
- mv &= xv;
1158
- }
1159
- i = n;
1160
- while (i--) {
1161
- peq[a.charCodeAt(i)] = 0;
1162
- }
1163
- return sc;
1164
- };
1165
- const myers_x = (b, a) => {
1166
- const n = a.length;
1167
- const m = b.length;
1168
- const mhc = [];
1169
- const phc = [];
1170
- const hsize = Math.ceil(n / 32);
1171
- const vsize = Math.ceil(m / 32);
1172
- for (let i = 0; i < hsize; i++) {
1173
- phc[i] = -1;
1174
- mhc[i] = 0;
1175
- }
1176
- let j = 0;
1177
- for (; j < vsize - 1; j++) {
1178
- let mv = 0;
1179
- let pv = -1;
1180
- const start = j * 32;
1181
- const vlen = Math.min(32, m) + start;
1182
- for (let k = start; k < vlen; k++) {
1183
- peq[b.charCodeAt(k)] |= 1 << k;
1184
- }
1185
- for (let i = 0; i < n; i++) {
1186
- const eq = peq[a.charCodeAt(i)];
1187
- const pb = (phc[(i / 32) | 0] >>> i) & 1;
1188
- const mb = (mhc[(i / 32) | 0] >>> i) & 1;
1189
- const xv = eq | mv;
1190
- const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
1191
- let ph = mv | ~(xh | pv);
1192
- let mh = pv & xh;
1193
- if ((ph >>> 31) ^ pb) {
1194
- phc[(i / 32) | 0] ^= 1 << i;
1195
- }
1196
- if ((mh >>> 31) ^ mb) {
1197
- mhc[(i / 32) | 0] ^= 1 << i;
1198
- }
1199
- ph = (ph << 1) | pb;
1200
- mh = (mh << 1) | mb;
1201
- pv = mh | ~(xv | ph);
1202
- mv = ph & xv;
1203
- }
1204
- for (let k = start; k < vlen; k++) {
1205
- peq[b.charCodeAt(k)] = 0;
1206
- }
1207
- }
1208
- let mv = 0;
1209
- let pv = -1;
1210
- const start = j * 32;
1211
- const vlen = Math.min(32, m - start) + start;
1212
- for (let k = start; k < vlen; k++) {
1213
- peq[b.charCodeAt(k)] |= 1 << k;
1214
- }
1215
- let score = m;
1216
- for (let i = 0; i < n; i++) {
1217
- const eq = peq[a.charCodeAt(i)];
1218
- const pb = (phc[(i / 32) | 0] >>> i) & 1;
1219
- const mb = (mhc[(i / 32) | 0] >>> i) & 1;
1220
- const xv = eq | mv;
1221
- const xh = ((((eq | mb) & pv) + pv) ^ pv) | eq | mb;
1222
- let ph = mv | ~(xh | pv);
1223
- let mh = pv & xh;
1224
- score += (ph >>> (m - 1)) & 1;
1225
- score -= (mh >>> (m - 1)) & 1;
1226
- if ((ph >>> 31) ^ pb) {
1227
- phc[(i / 32) | 0] ^= 1 << i;
1228
- }
1229
- if ((mh >>> 31) ^ mb) {
1230
- mhc[(i / 32) | 0] ^= 1 << i;
1231
- }
1232
- ph = (ph << 1) | pb;
1233
- mh = (mh << 1) | mb;
1234
- pv = mh | ~(xv | ph);
1235
- mv = ph & xv;
1236
- }
1237
- for (let k = start; k < vlen; k++) {
1238
- peq[b.charCodeAt(k)] = 0;
1239
- }
1240
- return score;
1241
- };
1242
- const distance = (a, b) => {
1243
- if (a.length < b.length) {
1244
- const tmp = b;
1245
- b = a;
1246
- a = tmp;
1247
- }
1248
- if (b.length === 0) {
1249
- return a.length;
1250
- }
1251
- if (a.length <= 32) {
1252
- return myers_32(a, b);
1253
- }
1254
- return myers_x(a, b);
1255
- };
1256
-
1257
- /**
1258
- * Finds the n closest matches to a target string from an array of strings using Levenshtein distance.
1259
- *
1260
- * @param target - The string to find matches for
1261
- * @param candidates - Array of candidate strings to search through
1262
- * @param n - Number of closest matches to return (defaults to 1)
1263
- * @returns Array of the n closest matches, sorted by distance (closest first)
1264
- *
1265
- * @example
1266
- * ```typescript
1267
- * const candidates = ['apple', 'banana', 'orange', 'grape'];
1268
- * const matches = findClosestMatch('aple', candidates, 2);
1269
- * // Returns: ['apple', 'grape'] (assuming these are the 2 closest matches)
1270
- * ```
1271
- */
1272
- function findClosestMatch(target, candidates, n = 1) {
1273
- if (candidates.length === 0) {
1274
- return [];
1275
- }
1276
- if (n <= 0) {
1277
- return [];
1278
- }
1279
- // Calculate distances for all candidates
1280
- const distances = candidates.map((candidate, index) => ({
1281
- candidate,
1282
- distance: distance(target, candidate),
1283
- index,
1284
- }));
1285
- // Sort by distance (ascending) and then by original index for stable sorting
1286
- distances.sort((a, b) => {
1287
- if (a.distance !== b.distance) {
1288
- return a.distance - b.distance;
1289
- }
1290
- return a.index - b.index;
1291
- });
1292
- // Return the n closest matches
1293
- return distances.slice(0, n).map((item) => item.candidate);
1294
- }
1295
-
1296
- /**
1297
- * Quotes a string with single quotes and escapes single quotes.
1298
- * @param value - The string to quote.
1299
- * @returns The quoted string.
1300
- */
1301
- function quot(value) {
1302
- return `'${value.replaceAll("'", String.raw `\'`)}'`;
1303
- }
1304
- /**
1305
- * Quotes a string with double quotes and escapes double quotes.
1306
- * @param value - The string to quote.
1307
- * @returns The quoted string.
1308
- */
1309
- function doubleQuot(value) {
1310
- return `"${value.replaceAll('"', String.raw `\"`)}"`;
1311
- }
1312
-
1313
- let random = bytes => crypto.getRandomValues(new Uint8Array(bytes));
1314
- let customRandom = (alphabet, defaultSize, getRandom) => {
1315
- let mask = (2 << Math.log2(alphabet.length - 1)) - 1;
1316
- let step = -~((1.6 * mask * defaultSize) / alphabet.length);
1317
- return (size = defaultSize) => {
1318
- let id = '';
1319
- while (true) {
1320
- let bytes = getRandom(step);
1321
- let j = step | 0;
1322
- while (j--) {
1323
- id += alphabet[bytes[j] & mask] || '';
1324
- if (id.length >= size) return id
1325
- }
1326
- }
1327
- }
1328
- };
1329
- let customAlphabet = (alphabet, size = 21) =>
1330
- customRandom(alphabet, size | 0, random);
1331
-
1332
- const NUMBERS = '0123456789';
1333
- const LOWERCASE = 'abcdefghijklmnopqrstuvwxyz';
1334
- const UPPERCASE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
1335
- /**
1336
- * Use custom ID generator for characters that be easily selected
1337
- */
1338
- const customNanoid = customAlphabet(`${NUMBERS}${LOWERCASE}${UPPERCASE}_`, 12);
1339
- /**
1340
- * Generate a random key string made up of numbers, lowercase, and uppercase letters
1341
- * @returns A random key string
1342
- */
1343
- function randomKey(length = 12) {
1344
- return customNanoid(length);
1345
- }
1346
-
1347
- class ToposortCyclicalDependencyError extends Error {
1348
- cyclePath;
1349
- constructor(nodes) {
1350
- super(`Cyclical dependency detected: ${nodes.map((n) => JSON.stringify(n)).join(' -> ')}`);
1351
- this.name = 'ToposortCyclicalDependencyError';
1352
- this.cyclePath = nodes; // Store the path for potential inspection
1353
- }
1354
- }
1355
- class ToposortUnknownNodeError extends Error {
1356
- unknownNode;
1357
- constructor(node) {
1358
- super(`Unknown node referenced in edges: ${JSON.stringify(node)}`);
1359
- this.name = 'ToposortUnknownNodeError';
1360
- this.unknownNode = node; // Store the node for potential inspection
1361
- }
1362
- }
1363
-
1364
- /**
1365
- * Creates a map of inbound edges from node indices to their source indices
1366
- */
1367
- function makeInboundEdges(nodes, edgeArr) {
1368
- const inboundEdgesMap = new Map();
1369
- for (const edge of edgeArr) {
1370
- const [source, target] = edge;
1371
- const sourceIndex = nodes.get(source);
1372
- const targetIndex = nodes.get(target);
1373
- // Check both source and target exist in the provided nodes set
1374
- if (sourceIndex === undefined)
1375
- throw new ToposortUnknownNodeError(source);
1376
- if (targetIndex === undefined)
1377
- throw new ToposortUnknownNodeError(target);
1378
- const targetEdges = inboundEdgesMap.get(targetIndex);
1379
- if (targetEdges) {
1380
- targetEdges.add(sourceIndex);
1381
- }
1382
- else {
1383
- inboundEdgesMap.set(targetIndex, new Set([sourceIndex]));
1384
- }
1385
- }
1386
- return inboundEdgesMap;
1387
- }
1388
- /**
1389
- * Creates a map of node indices to their out-degree
1390
- */
1391
- function makeNodeOutDegrees(inboundEdgesMap, nodeLength) {
1392
- const nodeOutDegrees = Array.from({ length: nodeLength }, () => 0);
1393
- for (const [, sources] of inboundEdgesMap.entries()) {
1394
- for (const source of sources) {
1395
- nodeOutDegrees[source]++;
1396
- }
1397
- }
1398
- return nodeOutDegrees;
1399
- }
1400
- /**
1401
- * Detects a cycle in a graph and returns the path of the first cycle found.
1402
- */
1403
- function detectCycle$1(nodes,
1404
- // Set of nodes already processed by a prior algorithm (e.g., a topological sort).
1405
- // This function will only search for cycles among the remaining nodes.
1406
- initialVisited, edges) {
1407
- // Tracks nodes visited by ANY DFS traversal within this function.
1408
- const cycleCheckVisited = new Set();
1409
- for (let i = 0; i < nodes.length; i++) {
1410
- if (!initialVisited.has(i) && !cycleCheckVisited.has(i)) {
1411
- const path = [];
1412
- const recursionStack = new Set();
1413
- const cyclePath = dfs(i, path, recursionStack);
1414
- if (cyclePath) {
1415
- // A cycle was found, convert indices to nodes and return immediately.
1416
- return cyclePath.map((idx) => nodes[idx]);
1417
- }
1418
- }
1419
- }
1420
- // No cycles were found in any of the graph's components.
1421
- return [];
1422
- /**
1423
- * Performs a DFS from a starting node to find a cycle.
1424
- * @returns The cycle path as an array of indices if found, otherwise null.
1425
- */
1426
- function dfs(node, path, recursionStack) {
1427
- path.push(node);
1428
- recursionStack.add(node);
1429
- cycleCheckVisited.add(node);
1430
- const neighbors = edges.get(node) ?? new Set();
1431
- for (const neighbor of neighbors) {
1432
- if (recursionStack.has(neighbor)) {
1433
- const cycleStartIndex = path.indexOf(neighbor);
1434
- const cycle = path.slice(cycleStartIndex);
1435
- cycle.push(neighbor);
1436
- return cycle;
1437
- }
1438
- // If the neighbor hasn't been visited by any DFS run yet, recurse.
1439
- if (!cycleCheckVisited.has(neighbor)) {
1440
- const result = dfs(neighbor, path, recursionStack);
1441
- if (result) {
1442
- // A cycle was found deeper in the traversal; propagate the result up.
1443
- return result;
1444
- }
1445
- }
1446
- }
1447
- // Backtrack: No cycle found from this node.
1448
- recursionStack.delete(node);
1449
- path.pop();
1450
- return null;
1451
- }
1452
- }
1453
- /**
1454
- * Default comparison function for stable topological sort
1455
- */
1456
- function defaultCompareFunc$1(a, b) {
1457
- if (typeof a === 'string' && typeof b === 'string') {
1458
- return compareStrings(a, b);
1459
- }
1460
- if (a === b)
1461
- return 0;
1462
- return a < b ? -1 : 1;
1463
- }
1464
- /**
1465
- * Performs a locality-based topological sort on a directed acyclic graph.
1466
- *
1467
- * This is a variant of Kahn's algorithm that starts from nodes with no outbound edges first,
1468
- * and then works its way back.
1469
- *
1470
- * This is useful for tasks where we want to process nodes in a way that is consistent with their locality in the graph
1471
- * such as sorting fragments of a generated code file that depend on each other.
1472
- *
1473
- * @param nodes - The nodes to sort
1474
- * @param edges - The edges of the graph
1475
- * @param options - Optional options for the topological sort
1476
- * @returns The sorted nodes
1477
- */
1478
- function toposortLocal(nodes, edges, options = {}) {
1479
- const { compareFunc = defaultCompareFunc$1 } = options;
1480
- const compareIdx = (a, b) => compareFunc(nodes[a], nodes[b]);
1481
- // Map each node to its index
1482
- const nodeIndexMap = new Map(nodes.map((node, index) => [node, index]));
1483
- // Create a map of outgoing edges from each node
1484
- const inboundEdgesMap = makeInboundEdges(nodeIndexMap, edges);
1485
- const nodeOutDegrees = makeNodeOutDegrees(inboundEdgesMap, nodes.length);
1486
- // Create a stack of nodes with no incoming edges (in-degree == 0)
1487
- // We use a stack so that the most recently added nodes are processed first
1488
- const zeroOutDegreeStack = [];
1489
- for (const [i, nodeOutDegree] of nodeOutDegrees.entries()) {
1490
- if (nodeOutDegree === 0) {
1491
- zeroOutDegreeStack.push(i);
1492
- }
1493
- }
1494
- zeroOutDegreeStack.sort(compareIdx);
1495
- const reverseResult = [];
1496
- const visited = new Set();
1497
- // Process nodes in BFS order
1498
- while (zeroOutDegreeStack.length > 0) {
1499
- const current = zeroOutDegreeStack.pop();
1500
- if (current === undefined)
1501
- break;
1502
- visited.add(current);
1503
- reverseResult.push(nodes[current]);
1504
- // Process all outgoing edges from the current node
1505
- const incomingEdges = inboundEdgesMap.get(current);
1506
- const newZeroOutDegreeNodes = [];
1507
- if (incomingEdges) {
1508
- for (const source of incomingEdges) {
1509
- nodeOutDegrees[source]--;
1510
- // If the target node now has no incoming edges, add it to the queue
1511
- if (nodeOutDegrees[source] === 0) {
1512
- newZeroOutDegreeNodes.push(source);
1513
- }
1514
- }
1515
- }
1516
- newZeroOutDegreeNodes.sort(compareIdx);
1517
- zeroOutDegreeStack.push(...newZeroOutDegreeNodes);
1518
- }
1519
- // Check for cycles
1520
- if (reverseResult.length !== nodes.length) {
1521
- const cyclePath = detectCycle$1(nodes, visited, inboundEdgesMap);
1522
- throw new ToposortCyclicalDependencyError(cyclePath.toReversed());
1523
- }
1524
- return reverseResult.toReversed();
1525
- }
1526
-
1527
- class TinyQueue {
1528
- constructor(data = [], compare = (a, b) => (a < b ? -1 : a > b ? 1 : 0)) {
1529
- this.data = data;
1530
- this.length = this.data.length;
1531
- this.compare = compare;
1532
-
1533
- if (this.length > 0) {
1534
- for (let i = (this.length >> 1) - 1; i >= 0; i--) this._down(i);
1535
- }
1536
- }
1537
-
1538
- push(item) {
1539
- this.data.push(item);
1540
- this._up(this.length++);
1541
- }
1542
-
1543
- pop() {
1544
- if (this.length === 0) return undefined;
1545
-
1546
- const top = this.data[0];
1547
- const bottom = this.data.pop();
1548
-
1549
- if (--this.length > 0) {
1550
- this.data[0] = bottom;
1551
- this._down(0);
1552
- }
1553
-
1554
- return top;
1555
- }
1556
-
1557
- peek() {
1558
- return this.data[0];
1559
- }
1560
-
1561
- _up(pos) {
1562
- const {data, compare} = this;
1563
- const item = data[pos];
1564
-
1565
- while (pos > 0) {
1566
- const parent = (pos - 1) >> 1;
1567
- const current = data[parent];
1568
- if (compare(item, current) >= 0) break;
1569
- data[pos] = current;
1570
- pos = parent;
1571
- }
1572
-
1573
- data[pos] = item;
1574
- }
1575
-
1576
- _down(pos) {
1577
- const {data, compare} = this;
1578
- const halfLength = this.length >> 1;
1579
- const item = data[pos];
1580
-
1581
- while (pos < halfLength) {
1582
- let bestChild = (pos << 1) + 1; // initially it is the left child
1583
- const right = bestChild + 1;
1584
-
1585
- if (right < this.length && compare(data[right], data[bestChild]) < 0) {
1586
- bestChild = right;
1587
- }
1588
- if (compare(data[bestChild], item) >= 0) break;
1589
-
1590
- data[pos] = data[bestChild];
1591
- pos = bestChild;
1592
- }
1593
-
1594
- data[pos] = item;
1595
- }
1596
- }
1597
-
1598
- /**
1599
- * Creates a map of outgoing edges from node indices to their target indices
1600
- */
1601
- function makeOutgoingEdges(nodes, edgeArr) {
1602
- const outgoingEdgesMap = new Map();
1603
- for (const edge of edgeArr) {
1604
- const [source, target] = edge;
1605
- const sourceIndex = nodes.get(source);
1606
- const targetIndex = nodes.get(target);
1607
- // Check both source and target exist in the provided nodes set
1608
- if (sourceIndex === undefined)
1609
- throw new ToposortUnknownNodeError(source);
1610
- if (targetIndex === undefined)
1611
- throw new ToposortUnknownNodeError(target);
1612
- const sourceEdges = outgoingEdgesMap.get(sourceIndex);
1613
- if (sourceEdges) {
1614
- sourceEdges.add(targetIndex);
1615
- }
1616
- else {
1617
- outgoingEdgesMap.set(sourceIndex, new Set([targetIndex]));
1618
- }
1619
- }
1620
- return outgoingEdgesMap;
1621
- }
1622
- /**
1623
- * Creates a map of node indices to their in-degree
1624
- */
1625
- function makeNodeInDegrees(outgoingEdgesMap, nodeLength) {
1626
- const nodeInDegrees = Array.from({ length: nodeLength }, () => 0);
1627
- for (const [, targets] of outgoingEdgesMap.entries()) {
1628
- for (const target of targets) {
1629
- nodeInDegrees[target]++;
1630
- }
1631
- }
1632
- return nodeInDegrees;
1633
- }
1634
- /**
1635
- * Detects cycles in a graph by checking if all nodes are included in the topological sort
1636
- */
1637
- function detectCycle(nodes, visited, edges) {
1638
- // If all nodes were visited, no cycle exists
1639
- if (visited.size === nodes.length) {
1640
- return [];
1641
- }
1642
- // Run DFS from any unvisited node to find a cycle
1643
- const path = [];
1644
- const visitSet = new Set();
1645
- function dfs(node) {
1646
- if (visitSet.has(node)) {
1647
- path.push(node);
1648
- return true;
1649
- }
1650
- if (visited.has(node)) {
1651
- return false;
1652
- }
1653
- visitSet.add(node);
1654
- path.push(node);
1655
- const neighbors = edges.get(node) ?? new Set();
1656
- for (const neighbor of neighbors) {
1657
- if (dfs(neighbor)) {
1658
- return true;
1659
- }
1660
- }
1661
- path.pop();
1662
- visitSet.delete(node);
1663
- return false;
1664
- }
1665
- // For cycle detection, we need to try all unvisited nodes
1666
- for (let i = 0; i < nodes.length; i++) {
1667
- if (!visited.has(i)) {
1668
- // Reset path and visitSet for each starting node
1669
- path.length = 0;
1670
- visitSet.clear();
1671
- const cycleFound = dfs(i);
1672
- if (cycleFound) {
1673
- // Convert path indices to actual nodes
1674
- return path.map((idx) => nodes[idx]);
1675
- }
1676
- }
1677
- }
1678
- return [];
1679
- }
1680
- /**
1681
- * Default comparison function for stable topological sort
1682
- */
1683
- function defaultCompareFunc(a, b) {
1684
- if (typeof a === 'string' && typeof b === 'string') {
1685
- return compareStrings(a, b);
1686
- }
1687
- if (a === b)
1688
- return 0;
1689
- return a < b ? -1 : 1;
1690
- }
1691
- /**
1692
- * Performs a topological sort on a directed acyclic graph.
1693
- *
1694
- * @param nodes - The nodes to sort
1695
- * @param edges - The edges of the graph
1696
- * @param options - Optional options for the topological sort
1697
- * @returns The sorted nodes
1698
- */
1699
- function toposort(nodes, edges, options = {}) {
1700
- const { compareFunc } = options;
1701
- // Map each node to its index
1702
- const nodeIndexMap = new Map(nodes.map((node, index) => [node, index]));
1703
- // Create a map of outgoing edges from each node
1704
- const outgoingEdgesMap = makeOutgoingEdges(nodeIndexMap, edges);
1705
- const nodeInDegrees = makeNodeInDegrees(outgoingEdgesMap, nodes.length);
1706
- // Create a queue of nodes with no incoming edges (in-degree == 0)
1707
- const zeroInDegreeQueue = compareFunc
1708
- ? new TinyQueue([], (a, b) => compareFunc(nodes[a], nodes[b]))
1709
- : [];
1710
- for (const [i, nodeInDegree] of nodeInDegrees.entries()) {
1711
- if (nodeInDegree === 0) {
1712
- zeroInDegreeQueue.push(i);
1713
- }
1714
- }
1715
- const result = [];
1716
- const visited = new Set();
1717
- // Process nodes in BFS order
1718
- while (zeroInDegreeQueue.length > 0) {
1719
- const current = zeroInDegreeQueue.pop();
1720
- if (current === undefined)
1721
- break;
1722
- visited.add(current);
1723
- result.push(nodes[current]);
1724
- // Process all outgoing edges from the current node
1725
- const outgoingEdges = outgoingEdgesMap.get(current);
1726
- if (outgoingEdges) {
1727
- for (const target of outgoingEdges) {
1728
- nodeInDegrees[target]--;
1729
- // If the target node now has no incoming edges, add it to the queue
1730
- if (nodeInDegrees[target] === 0) {
1731
- zeroInDegreeQueue.push(target);
1732
- }
1733
- }
1734
- }
1735
- }
1736
- // Check for cycles
1737
- if (result.length !== nodes.length) {
1738
- const cyclePath = detectCycle(nodes, visited, outgoingEdgesMap);
1739
- throw new ToposortCyclicalDependencyError(cyclePath);
1740
- }
1741
- return result;
1742
- }
1743
- /**
1744
- * Performs a topological sort on a directed acyclic graph, always selecting
1745
- * the smallest available node according to the provided comparison function,
1746
- * yielding the lexicographically minimal ordering.
1747
- *
1748
- * @param nodes - The nodes to sort
1749
- * @param edges - The edges of the graph
1750
- * @param compareFunc - Optional custom comparison function to break ties between nodes with the same topological level (default is string comparison)
1751
- * @returns The sorted nodes
1752
- */
1753
- function toposortOrdered(nodes, edges, compareFunc = defaultCompareFunc) {
1754
- return toposort(nodes, edges, { compareFunc });
1755
- }
1756
-
1757
- /**
1758
- * Type guard to check if a value is not null or undefined.
1759
- */
1760
- function notEmpty(value) {
1761
- return value !== null && value !== undefined;
1762
- }
1763
-
1764
- const {z: z$2} = await importShared('zod');
1765
-
1766
- /**
1767
- * Registry that stores human-readable validation hints on Zod schema instances.
1768
- *
1769
- * Used by `buildTsDescriptionRegistry` to annotate TypeScript type output with
1770
- * validation constraints (e.g., "camelCase", "CONSTANT_CASE") as JSDoc comments.
1771
- *
1772
- * Validators register hints at module load time. The registry is consumed
1773
- * during schema-to-TypeScript conversion to produce annotated output.
1774
- */
1775
- const validationHintRegistry = z$2.registry();
1776
-
1777
- const {z: z$1} = await importShared('zod');
1778
- /**
1779
- * Regex for validating kebab case, e.g. "my-project".
1780
- */
1781
- const KEBAB_CASE_REGEX = /^[a-z0-9-]+$/;
1782
- /**
1783
- * Regex for validating pascal case, e.g. "MyProject".
1784
- */
1785
- const PASCAL_CASE_REGEX = /^[A-Z][a-zA-Z0-9]*$/;
1786
- /**
1787
- * Regex for validating camel case, e.g. "myProject".
1788
- */
1789
- const CAMEL_CASE_REGEX = /^[a-z][a-zA-Z0-9]*$/;
1790
- /**
1791
- * Regex for validating constant case, e.g. "MY_PROJECT".
1792
- */
1793
- const CONSTANT_CASE_REGEX = /^[A-Z][A-Z0-9_]*$/;
1794
- const CASE_VALIDATORS = {
1795
- /**
1796
- * Zod validator for validating kebab case, e.g. "my-project".
1797
- */
1798
- KEBAB_CASE: z$1
1799
- .string()
1800
- .regex(KEBAB_CASE_REGEX, {
1801
- message: 'Must be kebab case (e.g. "my-project")',
1802
- })
1803
- .register(validationHintRegistry, {
1804
- description: 'kebab-case (e.g. "my-project")',
1805
- }),
1806
- /**
1807
- * Zod validator for validating pascal case, e.g. "MyProject".
1808
- */
1809
- PASCAL_CASE: z$1
1810
- .string()
1811
- .regex(PASCAL_CASE_REGEX, {
1812
- message: 'Must be pascal case (e.g. "MyProject")',
1813
- })
1814
- .register(validationHintRegistry, {
1815
- description: 'PascalCase (e.g. "MyProject")',
1816
- }),
1817
- /**
1818
- * Zod validator for validating camel case, e.g. "myProject".
1819
- */
1820
- CAMEL_CASE: z$1
1821
- .string()
1822
- .regex(CAMEL_CASE_REGEX, {
1823
- message: 'Must be camel case (e.g. "myProject")',
1824
- })
1825
- .register(validationHintRegistry, {
1826
- description: 'camelCase (e.g. "myProject")',
1827
- }),
1828
- /**
1829
- * Zod validator for validating constant case, e.g. "MY_PROJECT".
1830
- */
1831
- CONSTANT_CASE: z$1
1832
- .string()
1833
- .regex(CONSTANT_CASE_REGEX, {
1834
- message: 'Must be constant case (e.g. "MY_PROJECT")',
1835
- })
1836
- .register(validationHintRegistry, {
1837
- description: 'CONSTANT_CASE (e.g. "MY_PROJECT")',
1838
- }),
1839
- };
1840
-
1841
- const {z} = await importShared('zod');
1842
-
1843
- /**
1844
- * Zod validator for a positive integer.
1845
- */
1846
- const POSITIVE_INT = z.int().positive();
1847
- /**
1848
- * Zod number validators.
1849
- */
1850
- const NUMBER_VALIDATORS = {
1851
- POSITIVE_INT,
1852
- };
1853
-
1854
- export { ArrayContainer, CAMEL_CASE_REGEX, CASE_VALIDATORS, CONSTANT_CASE_REGEX, FieldMapSchemaBuilder, KEBAB_CASE_REGEX, MapContainer, MapOfMapsContainer, NUMBER_VALIDATORS, NamedArrayFieldContainer, NamedArrayToMapFieldContainer, ObjectContainer, PASCAL_CASE_REGEX, ScalarContainer, ToposortCyclicalDependencyError, ToposortUnknownNodeError, TypedEventEmitter, assertNoDuplicates, compareStrings, convertCaseWithPrefix, createFieldMap, createFieldMapSchemaBuilder, createTypedEventEmitter, differenceSet, doubleQuot, enhanceErrorWithContext, findClosestMatch, hashWithSHA256, immutableSet, jsonDeepClone, lowercaseFirstChar, mapGroupBy, mapKeyBy, mapValuesOfMap, notEmpty, quot, randomKey, safeMerge, safeMergeAll, safeMergeAllWithOptions, safeMergeMap, safeMergeMaps, safeMergeMapsWithOptions, sortKeysRecursive, sortObjectKeys, stringifyPrettyCompact, stringifyPrettyStable, toposort, toposortLocal, toposortOrdered, uppercaseFirstChar, validationHintRegistry };
1855
- //# sourceMappingURL=utils-DH2Y7csi.js.map