@sonicjs-cms/core 2.18.1 → 3.0.0-beta.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 (232) hide show
  1. package/README.md +52 -52
  2. package/dist/admin-documents-form.template-DDSH6ROU.js +6 -0
  3. package/dist/{admin-layout-catalyst.template-UMTIN66R.js.map → admin-documents-form.template-DDSH6ROU.js.map} +1 -1
  4. package/dist/admin-documents-form.template-LSZKGA5J.cjs +19 -0
  5. package/dist/{admin-layout-catalyst.template-HFD37TY5.cjs.map → admin-documents-form.template-LSZKGA5J.cjs.map} +1 -1
  6. package/dist/{filter-bar.template-DlVYMk-T.d.cts → admin-layout-catalyst.template-DrwDUfsE.d.cts} +25 -1
  7. package/dist/{filter-bar.template-DlVYMk-T.d.ts → admin-layout-catalyst.template-DrwDUfsE.d.ts} +25 -1
  8. package/dist/admin-layout-catalyst.template-KDHKVLXR.cjs +21 -0
  9. package/dist/admin-layout-catalyst.template-KDHKVLXR.cjs.map +1 -0
  10. package/dist/admin-layout-catalyst.template-YQ4EMF2J.js +7 -0
  11. package/dist/admin-layout-catalyst.template-YQ4EMF2J.js.map +1 -0
  12. package/dist/app-Bo0X1OWX.d.ts +1268 -0
  13. package/dist/app-Do66yCcV.d.cts +1268 -0
  14. package/dist/cache-DDARE4QE.js +4 -0
  15. package/dist/cache-DDARE4QE.js.map +1 -0
  16. package/dist/cache-LVYS4BPL.cjs +33 -0
  17. package/dist/cache-LVYS4BPL.cjs.map +1 -0
  18. package/dist/chunk-2CB4KY7I.cjs +771 -0
  19. package/dist/chunk-2CB4KY7I.cjs.map +1 -0
  20. package/dist/{chunk-ABB34XUS.cjs → chunk-3KYKEXV7.cjs} +667 -19
  21. package/dist/chunk-3KYKEXV7.cjs.map +1 -0
  22. package/dist/chunk-4BTBSXMR.cjs +912 -0
  23. package/dist/chunk-4BTBSXMR.cjs.map +1 -0
  24. package/dist/{chunk-55RDMDOP.js → chunk-5V62WT6M.js} +181 -57
  25. package/dist/chunk-5V62WT6M.js.map +1 -0
  26. package/dist/{chunk-XXDFQERJ.js → chunk-6OC6MF3C.js} +7192 -9806
  27. package/dist/chunk-6OC6MF3C.js.map +1 -0
  28. package/dist/chunk-AI663NBO.js +821 -0
  29. package/dist/chunk-AI663NBO.js.map +1 -0
  30. package/dist/chunk-ALDRXTUO.js +273 -0
  31. package/dist/chunk-ALDRXTUO.js.map +1 -0
  32. package/dist/{chunk-TFNTM3OA.js → chunk-ATUPB6MN.js} +645 -15
  33. package/dist/chunk-ATUPB6MN.js.map +1 -0
  34. package/dist/chunk-BLMTL57B.js +767 -0
  35. package/dist/chunk-BLMTL57B.js.map +1 -0
  36. package/dist/{chunk-4ZSNJDLS.cjs → chunk-CRGUD4KC.cjs} +9 -9
  37. package/dist/chunk-CRGUD4KC.cjs.map +1 -0
  38. package/dist/chunk-F67UK75A.cjs +158 -0
  39. package/dist/chunk-F67UK75A.cjs.map +1 -0
  40. package/dist/chunk-GCDZZNIN.js +192 -0
  41. package/dist/chunk-GCDZZNIN.js.map +1 -0
  42. package/dist/chunk-HIKBY7MS.cjs +70 -0
  43. package/dist/chunk-HIKBY7MS.cjs.map +1 -0
  44. package/dist/chunk-IDCZBF35.js +1186 -0
  45. package/dist/chunk-IDCZBF35.js.map +1 -0
  46. package/dist/chunk-IESEVHXL.js +66 -0
  47. package/dist/chunk-IESEVHXL.js.map +1 -0
  48. package/dist/chunk-IGADDMXH.js +387 -0
  49. package/dist/chunk-IGADDMXH.js.map +1 -0
  50. package/dist/chunk-IHTXB7AT.cjs +276 -0
  51. package/dist/chunk-IHTXB7AT.cjs.map +1 -0
  52. package/dist/chunk-IVPRUGTY.js +242 -0
  53. package/dist/chunk-IVPRUGTY.js.map +1 -0
  54. package/dist/{chunk-SQ6FNXU2.cjs → chunk-IXUHXTHW.cjs} +2 -151
  55. package/dist/chunk-IXUHXTHW.cjs.map +1 -0
  56. package/dist/chunk-J6JTWD2A.cjs +100 -0
  57. package/dist/chunk-J6JTWD2A.cjs.map +1 -0
  58. package/dist/chunk-JEQ7FLOD.cjs +199 -0
  59. package/dist/chunk-JEQ7FLOD.cjs.map +1 -0
  60. package/dist/{chunk-ON5ZMSU4.js → chunk-JQISFW6U.js} +3 -3
  61. package/dist/chunk-JQISFW6U.js.map +1 -0
  62. package/dist/chunk-K25XHMM3.js +566 -0
  63. package/dist/chunk-K25XHMM3.js.map +1 -0
  64. package/dist/{chunk-UYJ6TJHX.cjs → chunk-K623Q6WD.cjs} +181 -56
  65. package/dist/chunk-K623Q6WD.cjs.map +1 -0
  66. package/dist/chunk-MUNO67TT.cjs +1219 -0
  67. package/dist/chunk-MUNO67TT.cjs.map +1 -0
  68. package/dist/chunk-N32OWET6.cjs +327 -0
  69. package/dist/chunk-N32OWET6.cjs.map +1 -0
  70. package/dist/chunk-NUKJ54GA.cjs +245 -0
  71. package/dist/chunk-NUKJ54GA.cjs.map +1 -0
  72. package/dist/{chunk-XWIA3HVX.js → chunk-OBA2RYZN.js} +6 -1249
  73. package/dist/chunk-OBA2RYZN.js.map +1 -0
  74. package/dist/chunk-PMGOBS6X.cjs +408 -0
  75. package/dist/chunk-PMGOBS6X.cjs.map +1 -0
  76. package/dist/{chunk-OHYBNCVL.cjs → chunk-PXNTCCPE.cjs} +10 -1256
  77. package/dist/chunk-PXNTCCPE.cjs.map +1 -0
  78. package/dist/chunk-PYVFXCSD.js +1828 -0
  79. package/dist/chunk-PYVFXCSD.js.map +1 -0
  80. package/dist/{chunk-MGFRZO24.js → chunk-QZGABF2M.js} +3 -149
  81. package/dist/chunk-QZGABF2M.js.map +1 -0
  82. package/dist/{chunk-T3Q5V33G.cjs → chunk-R4ILO3W6.cjs} +876 -829
  83. package/dist/chunk-R4ILO3W6.cjs.map +1 -0
  84. package/dist/chunk-RMRJGMDE.js +323 -0
  85. package/dist/chunk-RMRJGMDE.js.map +1 -0
  86. package/dist/chunk-RNZFGN4R.js +88 -0
  87. package/dist/chunk-RNZFGN4R.js.map +1 -0
  88. package/dist/chunk-RQ6N3FTV.js +900 -0
  89. package/dist/chunk-RQ6N3FTV.js.map +1 -0
  90. package/dist/{chunk-SXXTQETM.cjs → chunk-TO6EY4P7.cjs} +8722 -11323
  91. package/dist/chunk-TO6EY4P7.cjs.map +1 -0
  92. package/dist/chunk-V464XBYS.js +154 -0
  93. package/dist/chunk-V464XBYS.js.map +1 -0
  94. package/dist/chunk-YA3TJ65D.cjs +575 -0
  95. package/dist/chunk-YA3TJ65D.cjs.map +1 -0
  96. package/dist/chunk-YP7GW2G5.cjs +866 -0
  97. package/dist/chunk-YP7GW2G5.cjs.map +1 -0
  98. package/dist/{collection-config-B4PG-AaF.d.cts → collection-config-JgHOpFCG.d.cts} +30 -2
  99. package/dist/{collection-config-B4PG-AaF.d.ts → collection-config-JgHOpFCG.d.ts} +30 -2
  100. package/dist/config-HFXANXCC.js +6 -0
  101. package/dist/config-HFXANXCC.js.map +1 -0
  102. package/dist/config-ON6FNMYX.cjs +19 -0
  103. package/dist/config-ON6FNMYX.cjs.map +1 -0
  104. package/dist/define-plugin-BzNHc1ZI.d.ts +1321 -0
  105. package/dist/define-plugin-IWDKYaVm.d.cts +1321 -0
  106. package/dist/document-projection-TDWRJX3Z.cjs +13 -0
  107. package/dist/document-projection-TDWRJX3Z.cjs.map +1 -0
  108. package/dist/document-projection-YYMC6I4U.js +4 -0
  109. package/dist/document-projection-YYMC6I4U.js.map +1 -0
  110. package/dist/index.cjs +13737 -4327
  111. package/dist/index.cjs.map +1 -1
  112. package/dist/index.d.cts +331 -493
  113. package/dist/index.d.ts +331 -493
  114. package/dist/index.js +13456 -4068
  115. package/dist/index.js.map +1 -1
  116. package/dist/middleware.cjs +38 -32
  117. package/dist/middleware.d.cts +69 -7
  118. package/dist/middleware.d.ts +69 -7
  119. package/dist/middleware.js +9 -3
  120. package/dist/migrations-2XHQEGOQ.cjs +13 -0
  121. package/dist/{migrations-IYNTWDC6.cjs.map → migrations-2XHQEGOQ.cjs.map} +1 -1
  122. package/dist/migrations-PE3CDVSM.js +4 -0
  123. package/dist/{migrations-R337UD46.js.map → migrations-PE3CDVSM.js.map} +1 -1
  124. package/dist/{plugin-bootstrap-DfVerYV4.d.cts → plugin-bootstrap-B8ThJU21.d.cts} +4315 -1661
  125. package/dist/{plugin-bootstrap-P_ciLp_C.d.ts → plugin-bootstrap-qu8hJgUt.d.ts} +4315 -1661
  126. package/dist/plugins.cjs +171 -12
  127. package/dist/plugins.d.cts +36 -2
  128. package/dist/plugins.d.ts +36 -2
  129. package/dist/plugins.js +5 -2
  130. package/dist/rbac-O73MFKDA.js +5 -0
  131. package/dist/rbac-O73MFKDA.js.map +1 -0
  132. package/dist/rbac-VONLJJKB.cjs +14 -0
  133. package/dist/rbac-VONLJJKB.cjs.map +1 -0
  134. package/dist/routes.cjs +42 -46
  135. package/dist/routes.d.cts +56 -146
  136. package/dist/routes.d.ts +56 -146
  137. package/dist/routes.js +18 -10
  138. package/dist/services.cjs +43 -76
  139. package/dist/services.d.cts +93 -55
  140. package/dist/services.d.ts +93 -55
  141. package/dist/services.js +6 -3
  142. package/dist/{telemetry-B9vIV4wh.d.cts → telemetry-Cku1ax74.d.cts} +1 -1
  143. package/dist/{telemetry-B9vIV4wh.d.ts → telemetry-Cku1ax74.d.ts} +1 -1
  144. package/dist/templates.cjs +17 -29
  145. package/dist/templates.d.cts +2 -89
  146. package/dist/templates.d.ts +2 -89
  147. package/dist/templates.js +3 -3
  148. package/dist/types-Dea1eNxU.d.cts +286 -0
  149. package/dist/types-Dea1eNxU.d.ts +286 -0
  150. package/dist/types.d.cts +2 -2
  151. package/dist/types.d.ts +2 -2
  152. package/dist/utils.cjs +21 -20
  153. package/dist/utils.d.cts +2 -2
  154. package/dist/utils.d.ts +2 -2
  155. package/dist/utils.js +3 -2
  156. package/migrations/0001_core.sql +184 -0
  157. package/migrations/0002_documents.sql +163 -0
  158. package/package.json +12 -7
  159. package/dist/admin-layout-catalyst.template-HFD37TY5.cjs +0 -17
  160. package/dist/admin-layout-catalyst.template-UMTIN66R.js +0 -7
  161. package/dist/app-C9esKLmh.d.cts +0 -112
  162. package/dist/app-C9esKLmh.d.ts +0 -112
  163. package/dist/chunk-4R3NOOL3.js +0 -2217
  164. package/dist/chunk-4R3NOOL3.js.map +0 -1
  165. package/dist/chunk-4ZSNJDLS.cjs.map +0 -1
  166. package/dist/chunk-55RDMDOP.js.map +0 -1
  167. package/dist/chunk-635JAMSE.cjs +0 -653
  168. package/dist/chunk-635JAMSE.cjs.map +0 -1
  169. package/dist/chunk-ABB34XUS.cjs.map +0 -1
  170. package/dist/chunk-C54YUA23.cjs +0 -2219
  171. package/dist/chunk-C54YUA23.cjs.map +0 -1
  172. package/dist/chunk-DSUJ5YQH.cjs +0 -722
  173. package/dist/chunk-DSUJ5YQH.cjs.map +0 -1
  174. package/dist/chunk-EW5NOBVU.js +0 -1783
  175. package/dist/chunk-EW5NOBVU.js.map +0 -1
  176. package/dist/chunk-EXNEW5US.js +0 -648
  177. package/dist/chunk-EXNEW5US.js.map +0 -1
  178. package/dist/chunk-I2H5NGJQ.js +0 -692
  179. package/dist/chunk-I2H5NGJQ.js.map +0 -1
  180. package/dist/chunk-MGFRZO24.js.map +0 -1
  181. package/dist/chunk-OHYBNCVL.cjs.map +0 -1
  182. package/dist/chunk-ON5ZMSU4.js.map +0 -1
  183. package/dist/chunk-QFWHAFEO.js +0 -1843
  184. package/dist/chunk-QFWHAFEO.js.map +0 -1
  185. package/dist/chunk-SQ6FNXU2.cjs.map +0 -1
  186. package/dist/chunk-SXXTQETM.cjs.map +0 -1
  187. package/dist/chunk-T3Q5V33G.cjs.map +0 -1
  188. package/dist/chunk-TFNTM3OA.js.map +0 -1
  189. package/dist/chunk-UYJ6TJHX.cjs.map +0 -1
  190. package/dist/chunk-WAEQXGCX.cjs +0 -1898
  191. package/dist/chunk-WAEQXGCX.cjs.map +0 -1
  192. package/dist/chunk-XWIA3HVX.js.map +0 -1
  193. package/dist/chunk-XXDFQERJ.js.map +0 -1
  194. package/dist/migrations-IYNTWDC6.cjs +0 -13
  195. package/dist/migrations-R337UD46.js +0 -4
  196. package/dist/plugin-manager-BoM3Q7o7.d.cts +0 -328
  197. package/dist/plugin-manager-Efx9RyDX.d.ts +0 -328
  198. package/migrations/001_initial_schema.sql +0 -170
  199. package/migrations/002_faq_plugin.sql +0 -86
  200. package/migrations/003_stage5_enhancements.sql +0 -121
  201. package/migrations/004_stage6_user_management.sql +0 -183
  202. package/migrations/005_stage7_workflow_automation.sql +0 -294
  203. package/migrations/006_plugin_system.sql +0 -155
  204. package/migrations/007_demo_login_plugin.sql +0 -23
  205. package/migrations/008_fix_slug_validation.sql +0 -22
  206. package/migrations/009_system_logging.sql +0 -57
  207. package/migrations/011_config_managed_collections.sql +0 -15
  208. package/migrations/012_testimonials_plugin.sql +0 -80
  209. package/migrations/013_code_examples_plugin.sql +0 -177
  210. package/migrations/014_fix_plugin_registry.sql +0 -88
  211. package/migrations/015_add_remaining_plugins.sql +0 -89
  212. package/migrations/016_remove_duplicate_cache_plugin.sql +0 -17
  213. package/migrations/017_auth_configurable_fields.sql +0 -49
  214. package/migrations/018_settings_table.sql +0 -23
  215. package/migrations/019_remove_blog_posts_collection.sql +0 -15
  216. package/migrations/020_add_email_plugin.sql +0 -22
  217. package/migrations/021_add_magic_link_auth_plugin.sql +0 -42
  218. package/migrations/022_add_tinymce_plugin.sql +0 -25
  219. package/migrations/023_add_easy_mdx_plugin.sql +0 -25
  220. package/migrations/024_add_quill_editor_plugin.sql +0 -25
  221. package/migrations/025_add_easymde_plugin.sql +0 -25
  222. package/migrations/026_add_otp_login.sql +0 -42
  223. package/migrations/027_fix_slug_field_type.sql +0 -18
  224. package/migrations/028_fix_slug_field_type_in_schemas.sql +0 -30
  225. package/migrations/029_add_forms_system.sql +0 -184
  226. package/migrations/030_add_turnstile_to_forms.sql +0 -14
  227. package/migrations/031_ai_search_plugin.sql +0 -45
  228. package/migrations/032_user_profiles.sql +0 -37
  229. package/migrations/033_form_content_integration.sql +0 -19
  230. package/migrations/034_security_audit_plugin.sql +0 -27
  231. package/migrations/035_user_profiles_data_column.sql +0 -16
  232. package/migrations/036_analytics_events.sql +0 -22
@@ -1,128 +1,134 @@
1
1
  'use strict';
2
2
 
3
- var chunkDSUJ5YQH_cjs = require('./chunk-DSUJ5YQH.cjs');
4
- require('./chunk-T3Q5V33G.cjs');
5
- require('./chunk-C54YUA23.cjs');
3
+ var chunkMUNO67TT_cjs = require('./chunk-MUNO67TT.cjs');
4
+ require('./chunk-2CB4KY7I.cjs');
5
+ require('./chunk-JEQ7FLOD.cjs');
6
+ require('./chunk-R4ILO3W6.cjs');
7
+ require('./chunk-IHTXB7AT.cjs');
8
+ require('./chunk-K623Q6WD.cjs');
9
+ require('./chunk-J6JTWD2A.cjs');
6
10
  require('./chunk-RCQ2HIQD.cjs');
11
+ require('./chunk-P3XDZL6Q.cjs');
12
+ require('./chunk-MNWKYY5E.cjs');
7
13
  require('./chunk-IGJUBJBW.cjs');
8
14
 
9
15
 
10
16
 
11
17
  Object.defineProperty(exports, "AuthManager", {
12
18
  enumerable: true,
13
- get: function () { return chunkDSUJ5YQH_cjs.AuthManager; }
19
+ get: function () { return chunkMUNO67TT_cjs.AuthManager; }
14
20
  });
15
21
  Object.defineProperty(exports, "PermissionManager", {
16
22
  enumerable: true,
17
- get: function () { return chunkDSUJ5YQH_cjs.PermissionManager; }
23
+ get: function () { return chunkMUNO67TT_cjs.PermissionManager; }
18
24
  });
19
25
  Object.defineProperty(exports, "bootstrapMiddleware", {
20
26
  enumerable: true,
21
- get: function () { return chunkDSUJ5YQH_cjs.bootstrapMiddleware; }
27
+ get: function () { return chunkMUNO67TT_cjs.bootstrapMiddleware; }
22
28
  });
23
29
  Object.defineProperty(exports, "cacheHeaders", {
24
30
  enumerable: true,
25
- get: function () { return chunkDSUJ5YQH_cjs.cacheHeaders; }
31
+ get: function () { return chunkMUNO67TT_cjs.cacheHeaders; }
26
32
  });
27
33
  Object.defineProperty(exports, "compressionMiddleware", {
28
34
  enumerable: true,
29
- get: function () { return chunkDSUJ5YQH_cjs.compressionMiddleware; }
35
+ get: function () { return chunkMUNO67TT_cjs.compressionMiddleware; }
30
36
  });
31
37
  Object.defineProperty(exports, "csrfProtection", {
32
38
  enumerable: true,
33
- get: function () { return chunkDSUJ5YQH_cjs.csrfProtection; }
39
+ get: function () { return chunkMUNO67TT_cjs.csrfProtection; }
34
40
  });
35
41
  Object.defineProperty(exports, "detailedLoggingMiddleware", {
36
42
  enumerable: true,
37
- get: function () { return chunkDSUJ5YQH_cjs.detailedLoggingMiddleware; }
43
+ get: function () { return chunkMUNO67TT_cjs.detailedLoggingMiddleware; }
38
44
  });
39
45
  Object.defineProperty(exports, "generateCsrfToken", {
40
46
  enumerable: true,
41
- get: function () { return chunkDSUJ5YQH_cjs.generateCsrfToken; }
47
+ get: function () { return chunkMUNO67TT_cjs.generateCsrfToken; }
42
48
  });
43
49
  Object.defineProperty(exports, "getActivePlugins", {
44
50
  enumerable: true,
45
- get: function () { return chunkDSUJ5YQH_cjs.getActivePlugins; }
51
+ get: function () { return chunkMUNO67TT_cjs.getActivePlugins; }
46
52
  });
47
53
  Object.defineProperty(exports, "getJwtExpirySeconds", {
48
54
  enumerable: true,
49
- get: function () { return chunkDSUJ5YQH_cjs.getJwtExpirySeconds; }
55
+ get: function () { return chunkMUNO67TT_cjs.getJwtExpirySeconds; }
50
56
  });
51
57
  Object.defineProperty(exports, "getJwtExpirySecondsFromDb", {
52
58
  enumerable: true,
53
- get: function () { return chunkDSUJ5YQH_cjs.getJwtExpirySecondsFromDb; }
59
+ get: function () { return chunkMUNO67TT_cjs.getJwtExpirySecondsFromDb; }
54
60
  });
55
61
  Object.defineProperty(exports, "getJwtRefreshGraceSecondsFromDb", {
56
62
  enumerable: true,
57
- get: function () { return chunkDSUJ5YQH_cjs.getJwtRefreshGraceSecondsFromDb; }
63
+ get: function () { return chunkMUNO67TT_cjs.getJwtRefreshGraceSecondsFromDb; }
58
64
  });
59
65
  Object.defineProperty(exports, "isPluginActive", {
60
66
  enumerable: true,
61
- get: function () { return chunkDSUJ5YQH_cjs.isPluginActive; }
67
+ get: function () { return chunkMUNO67TT_cjs.isPluginActive; }
62
68
  });
63
69
  Object.defineProperty(exports, "logActivity", {
64
70
  enumerable: true,
65
- get: function () { return chunkDSUJ5YQH_cjs.logActivity; }
71
+ get: function () { return chunkMUNO67TT_cjs.logActivity; }
66
72
  });
67
73
  Object.defineProperty(exports, "loggingMiddleware", {
68
74
  enumerable: true,
69
- get: function () { return chunkDSUJ5YQH_cjs.loggingMiddleware; }
75
+ get: function () { return chunkMUNO67TT_cjs.loggingMiddleware; }
70
76
  });
71
77
  Object.defineProperty(exports, "metricsMiddleware", {
72
78
  enumerable: true,
73
- get: function () { return chunkDSUJ5YQH_cjs.metricsMiddleware; }
79
+ get: function () { return chunkMUNO67TT_cjs.metricsMiddleware; }
74
80
  });
75
81
  Object.defineProperty(exports, "optionalAuth", {
76
82
  enumerable: true,
77
- get: function () { return chunkDSUJ5YQH_cjs.optionalAuth; }
83
+ get: function () { return chunkMUNO67TT_cjs.optionalAuth; }
78
84
  });
79
85
  Object.defineProperty(exports, "performanceLoggingMiddleware", {
80
86
  enumerable: true,
81
- get: function () { return chunkDSUJ5YQH_cjs.performanceLoggingMiddleware; }
87
+ get: function () { return chunkMUNO67TT_cjs.performanceLoggingMiddleware; }
82
88
  });
83
89
  Object.defineProperty(exports, "rateLimit", {
84
90
  enumerable: true,
85
- get: function () { return chunkDSUJ5YQH_cjs.rateLimit; }
91
+ get: function () { return chunkMUNO67TT_cjs.rateLimit; }
86
92
  });
87
93
  Object.defineProperty(exports, "requireActivePlugin", {
88
94
  enumerable: true,
89
- get: function () { return chunkDSUJ5YQH_cjs.requireActivePlugin; }
95
+ get: function () { return chunkMUNO67TT_cjs.requireActivePlugin; }
90
96
  });
91
97
  Object.defineProperty(exports, "requireActivePlugins", {
92
98
  enumerable: true,
93
- get: function () { return chunkDSUJ5YQH_cjs.requireActivePlugins; }
99
+ get: function () { return chunkMUNO67TT_cjs.requireActivePlugins; }
94
100
  });
95
101
  Object.defineProperty(exports, "requireAnyPermission", {
96
102
  enumerable: true,
97
- get: function () { return chunkDSUJ5YQH_cjs.requireAnyPermission; }
103
+ get: function () { return chunkMUNO67TT_cjs.requireAnyPermission; }
98
104
  });
99
105
  Object.defineProperty(exports, "requireAuth", {
100
106
  enumerable: true,
101
- get: function () { return chunkDSUJ5YQH_cjs.requireAuth; }
107
+ get: function () { return chunkMUNO67TT_cjs.requireAuth; }
102
108
  });
103
109
  Object.defineProperty(exports, "requirePermission", {
104
110
  enumerable: true,
105
- get: function () { return chunkDSUJ5YQH_cjs.requirePermission; }
111
+ get: function () { return chunkMUNO67TT_cjs.requirePermission; }
106
112
  });
107
113
  Object.defineProperty(exports, "requireRole", {
108
114
  enumerable: true,
109
- get: function () { return chunkDSUJ5YQH_cjs.requireRole; }
115
+ get: function () { return chunkMUNO67TT_cjs.requireRole; }
110
116
  });
111
117
  Object.defineProperty(exports, "securityHeaders", {
112
118
  enumerable: true,
113
- get: function () { return chunkDSUJ5YQH_cjs.securityHeadersMiddleware; }
119
+ get: function () { return chunkMUNO67TT_cjs.securityHeadersMiddleware; }
114
120
  });
115
121
  Object.defineProperty(exports, "securityLoggingMiddleware", {
116
122
  enumerable: true,
117
- get: function () { return chunkDSUJ5YQH_cjs.securityLoggingMiddleware; }
123
+ get: function () { return chunkMUNO67TT_cjs.securityLoggingMiddleware; }
118
124
  });
119
125
  Object.defineProperty(exports, "validateCsrfToken", {
120
126
  enumerable: true,
121
- get: function () { return chunkDSUJ5YQH_cjs.validateCsrfToken; }
127
+ get: function () { return chunkMUNO67TT_cjs.validateCsrfToken; }
122
128
  });
123
129
  Object.defineProperty(exports, "verifySecurityConfig", {
124
130
  enumerable: true,
125
- get: function () { return chunkDSUJ5YQH_cjs.verifySecurityConfig; }
131
+ get: function () { return chunkMUNO67TT_cjs.verifySecurityConfig; }
126
132
  });
127
133
  //# sourceMappingURL=middleware.cjs.map
128
134
  //# sourceMappingURL=middleware.cjs.map
@@ -1,7 +1,15 @@
1
1
  import * as hono from 'hono';
2
2
  import { Context, Next, MiddlewareHandler } from 'hono';
3
- import { S as SonicJSConfig } from './app-C9esKLmh.cjs';
4
- import '@cloudflare/workers-types';
3
+ import { S as SonicJSConfig } from './app-Do66yCcV.cjs';
4
+ import { D1Database as D1Database$1 } from '@cloudflare/workers-types';
5
+ import 'better-auth/client';
6
+ import 'better-auth/plugins/email-otp';
7
+ import 'better-auth';
8
+ import 'better-auth/plugins/magic-link';
9
+ import 'better-call';
10
+ import 'zod/v4/core';
11
+ import 'zod';
12
+ import './types-Dea1eNxU.cjs';
5
13
 
6
14
  type Bindings = {
7
15
  DB: D1Database;
@@ -22,6 +30,9 @@ declare function verifySecurityConfig(env: Bindings): void;
22
30
  */
23
31
  declare function bootstrapMiddleware(config?: SonicJSConfig): (c: Context<{
24
32
  Bindings: Bindings;
33
+ Variables: {
34
+ hookSystem?: unknown;
35
+ };
25
36
  }>, next: Next) => Promise<void>;
26
37
 
27
38
  type JWTPayload = {
@@ -62,12 +73,31 @@ declare class AuthManager {
62
73
  /**
63
74
  * Verify a token's signature and expiration.
64
75
  *
76
+ * IMPORTANT: pass the `JWT_SECRET` binding (e.g. `c.env.JWT_SECRET`) as the
77
+ * `secret` argument. If omitted, this falls back to a development-only
78
+ * placeholder secret — tokens signed with the real `JWT_SECRET` will then
79
+ * silently fail verification. From inside a Hono handler prefer
80
+ * `AuthManager.verifyAuthRequest(c)`, which handles header/cookie extraction
81
+ * and pulls the secret from `c.env` for you.
82
+ *
65
83
  * If `graceSeconds` > 0, tokens whose `exp` is within the grace window
66
84
  * (i.e. expired by no more than `graceSeconds`) are still returned. This
67
85
  * supports a sliding-session refresh endpoint that accepts recently-expired
68
86
  * tokens. Signature failures always return null.
69
87
  */
70
88
  static verifyToken(token: string, secret?: string, graceSeconds?: number): Promise<JWTPayload | null>;
89
+ /**
90
+ * Verify the JWT on an incoming Hono request using the `JWT_SECRET`
91
+ * binding from `c.env`. Reads the token from the `Authorization: Bearer …`
92
+ * header first, then falls back to the `auth_token` cookie. Returns the
93
+ * decoded payload, or null when the token is missing, malformed, expired,
94
+ * or signed with a different secret.
95
+ *
96
+ * Use this from custom Hono routes mounted alongside SonicJS — it
97
+ * resolves the secret the same way `requireAuth()` does, without forcing
98
+ * the caller to plumb it through manually.
99
+ */
100
+ static verifyAuthRequest(c: Context): Promise<JWTPayload | null>;
71
101
  static hashPassword(password: string): Promise<string>;
72
102
  static hashPasswordLegacy(password: string): Promise<string>;
73
103
  static verifyPassword(password: string, storedHash: string): Promise<boolean>;
@@ -93,7 +123,7 @@ declare const requireRole: (requiredRole: string | string[]) => (c: Context, nex
93
123
  }, 401, "json">) | (Response & hono.TypedResponse<{
94
124
  error: string;
95
125
  }, 403, "json">)>;
96
- declare const optionalAuth: () => (c: Context, next: Next) => Promise<void>;
126
+ declare const optionalAuth: () => (_c: Context, next: Next) => Promise<void>;
97
127
 
98
128
  /**
99
129
  * Middleware to track all HTTP requests for real-time analytics
@@ -170,6 +200,42 @@ declare function rateLimit(options: RateLimitOptions): (c: Context, next: Next)
170
200
  */
171
201
  declare const securityHeadersMiddleware: () => (c: Context, next: Next) => Promise<void>;
172
202
 
203
+ /**
204
+ * Plugin Middleware
205
+ *
206
+ * Provides middleware functions for checking plugin status and enforcing plugin requirements
207
+ */
208
+
209
+ /**
210
+ * Check if a plugin is active
211
+ * @param db - The D1 database instance
212
+ * @param pluginId - The plugin ID to check
213
+ * @returns Promise<boolean> - True if the plugin is active, false otherwise
214
+ */
215
+ declare function isPluginActive(db: D1Database$1, pluginId: string): Promise<boolean>;
216
+ /**
217
+ * Middleware to require a plugin to be active
218
+ * Throws an error if the plugin is not active
219
+ * @param db - The D1 database instance
220
+ * @param pluginId - The plugin ID to check
221
+ * @throws Error if plugin is not active
222
+ */
223
+ declare function requireActivePlugin(db: D1Database$1, pluginId: string): Promise<void>;
224
+ /**
225
+ * Middleware to require multiple plugins to be active
226
+ * Throws an error if any plugin is not active
227
+ * @param db - The D1 database instance
228
+ * @param pluginIds - Array of plugin IDs to check
229
+ * @throws Error if any plugin is not active
230
+ */
231
+ declare function requireActivePlugins(db: D1Database$1, pluginIds: string[]): Promise<void>;
232
+ /**
233
+ * Get all active plugins
234
+ * @param db - The D1 database instance
235
+ * @returns Promise<any[]> - Array of active plugin records
236
+ */
237
+ declare function getActivePlugins(db: D1Database$1): Promise<any[]>;
238
+
173
239
  /**
174
240
  * Middleware Module Exports
175
241
  *
@@ -195,9 +261,5 @@ declare const PermissionManager: any;
195
261
  declare const requirePermission: any;
196
262
  declare const requireAnyPermission: any;
197
263
  declare const logActivity: any;
198
- declare const requireActivePlugin: any;
199
- declare const requireActivePlugins: any;
200
- declare const getActivePlugins: any;
201
- declare const isPluginActive: any;
202
264
 
203
265
  export { AuthManager, type Permission, PermissionManager, type UserPermissions, bootstrapMiddleware, cacheHeaders, compressionMiddleware, csrfProtection, detailedLoggingMiddleware, generateCsrfToken, getActivePlugins, getJwtExpirySeconds, getJwtExpirySecondsFromDb, getJwtRefreshGraceSecondsFromDb, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, rateLimit, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeadersMiddleware as securityHeaders, securityLoggingMiddleware, validateCsrfToken, verifySecurityConfig };
@@ -1,7 +1,15 @@
1
1
  import * as hono from 'hono';
2
2
  import { Context, Next, MiddlewareHandler } from 'hono';
3
- import { S as SonicJSConfig } from './app-C9esKLmh.js';
4
- import '@cloudflare/workers-types';
3
+ import { S as SonicJSConfig } from './app-Bo0X1OWX.js';
4
+ import { D1Database as D1Database$1 } from '@cloudflare/workers-types';
5
+ import 'better-auth/client';
6
+ import 'better-auth/plugins/email-otp';
7
+ import 'better-auth';
8
+ import 'better-auth/plugins/magic-link';
9
+ import 'better-call';
10
+ import 'zod/v4/core';
11
+ import 'zod';
12
+ import './types-Dea1eNxU.js';
5
13
 
6
14
  type Bindings = {
7
15
  DB: D1Database;
@@ -22,6 +30,9 @@ declare function verifySecurityConfig(env: Bindings): void;
22
30
  */
23
31
  declare function bootstrapMiddleware(config?: SonicJSConfig): (c: Context<{
24
32
  Bindings: Bindings;
33
+ Variables: {
34
+ hookSystem?: unknown;
35
+ };
25
36
  }>, next: Next) => Promise<void>;
26
37
 
27
38
  type JWTPayload = {
@@ -62,12 +73,31 @@ declare class AuthManager {
62
73
  /**
63
74
  * Verify a token's signature and expiration.
64
75
  *
76
+ * IMPORTANT: pass the `JWT_SECRET` binding (e.g. `c.env.JWT_SECRET`) as the
77
+ * `secret` argument. If omitted, this falls back to a development-only
78
+ * placeholder secret — tokens signed with the real `JWT_SECRET` will then
79
+ * silently fail verification. From inside a Hono handler prefer
80
+ * `AuthManager.verifyAuthRequest(c)`, which handles header/cookie extraction
81
+ * and pulls the secret from `c.env` for you.
82
+ *
65
83
  * If `graceSeconds` > 0, tokens whose `exp` is within the grace window
66
84
  * (i.e. expired by no more than `graceSeconds`) are still returned. This
67
85
  * supports a sliding-session refresh endpoint that accepts recently-expired
68
86
  * tokens. Signature failures always return null.
69
87
  */
70
88
  static verifyToken(token: string, secret?: string, graceSeconds?: number): Promise<JWTPayload | null>;
89
+ /**
90
+ * Verify the JWT on an incoming Hono request using the `JWT_SECRET`
91
+ * binding from `c.env`. Reads the token from the `Authorization: Bearer …`
92
+ * header first, then falls back to the `auth_token` cookie. Returns the
93
+ * decoded payload, or null when the token is missing, malformed, expired,
94
+ * or signed with a different secret.
95
+ *
96
+ * Use this from custom Hono routes mounted alongside SonicJS — it
97
+ * resolves the secret the same way `requireAuth()` does, without forcing
98
+ * the caller to plumb it through manually.
99
+ */
100
+ static verifyAuthRequest(c: Context): Promise<JWTPayload | null>;
71
101
  static hashPassword(password: string): Promise<string>;
72
102
  static hashPasswordLegacy(password: string): Promise<string>;
73
103
  static verifyPassword(password: string, storedHash: string): Promise<boolean>;
@@ -93,7 +123,7 @@ declare const requireRole: (requiredRole: string | string[]) => (c: Context, nex
93
123
  }, 401, "json">) | (Response & hono.TypedResponse<{
94
124
  error: string;
95
125
  }, 403, "json">)>;
96
- declare const optionalAuth: () => (c: Context, next: Next) => Promise<void>;
126
+ declare const optionalAuth: () => (_c: Context, next: Next) => Promise<void>;
97
127
 
98
128
  /**
99
129
  * Middleware to track all HTTP requests for real-time analytics
@@ -170,6 +200,42 @@ declare function rateLimit(options: RateLimitOptions): (c: Context, next: Next)
170
200
  */
171
201
  declare const securityHeadersMiddleware: () => (c: Context, next: Next) => Promise<void>;
172
202
 
203
+ /**
204
+ * Plugin Middleware
205
+ *
206
+ * Provides middleware functions for checking plugin status and enforcing plugin requirements
207
+ */
208
+
209
+ /**
210
+ * Check if a plugin is active
211
+ * @param db - The D1 database instance
212
+ * @param pluginId - The plugin ID to check
213
+ * @returns Promise<boolean> - True if the plugin is active, false otherwise
214
+ */
215
+ declare function isPluginActive(db: D1Database$1, pluginId: string): Promise<boolean>;
216
+ /**
217
+ * Middleware to require a plugin to be active
218
+ * Throws an error if the plugin is not active
219
+ * @param db - The D1 database instance
220
+ * @param pluginId - The plugin ID to check
221
+ * @throws Error if plugin is not active
222
+ */
223
+ declare function requireActivePlugin(db: D1Database$1, pluginId: string): Promise<void>;
224
+ /**
225
+ * Middleware to require multiple plugins to be active
226
+ * Throws an error if any plugin is not active
227
+ * @param db - The D1 database instance
228
+ * @param pluginIds - Array of plugin IDs to check
229
+ * @throws Error if any plugin is not active
230
+ */
231
+ declare function requireActivePlugins(db: D1Database$1, pluginIds: string[]): Promise<void>;
232
+ /**
233
+ * Get all active plugins
234
+ * @param db - The D1 database instance
235
+ * @returns Promise<any[]> - Array of active plugin records
236
+ */
237
+ declare function getActivePlugins(db: D1Database$1): Promise<any[]>;
238
+
173
239
  /**
174
240
  * Middleware Module Exports
175
241
  *
@@ -195,9 +261,5 @@ declare const PermissionManager: any;
195
261
  declare const requirePermission: any;
196
262
  declare const requireAnyPermission: any;
197
263
  declare const logActivity: any;
198
- declare const requireActivePlugin: any;
199
- declare const requireActivePlugins: any;
200
- declare const getActivePlugins: any;
201
- declare const isPluginActive: any;
202
264
 
203
265
  export { AuthManager, type Permission, PermissionManager, type UserPermissions, bootstrapMiddleware, cacheHeaders, compressionMiddleware, csrfProtection, detailedLoggingMiddleware, generateCsrfToken, getActivePlugins, getJwtExpirySeconds, getJwtExpirySecondsFromDb, getJwtRefreshGraceSecondsFromDb, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, rateLimit, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeadersMiddleware as securityHeaders, securityLoggingMiddleware, validateCsrfToken, verifySecurityConfig };
@@ -1,7 +1,13 @@
1
- export { AuthManager, PermissionManager, bootstrapMiddleware, cacheHeaders, compressionMiddleware, csrfProtection, detailedLoggingMiddleware, generateCsrfToken, getActivePlugins, getJwtExpirySeconds, getJwtExpirySecondsFromDb, getJwtRefreshGraceSecondsFromDb, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, rateLimit, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeadersMiddleware as securityHeaders, securityLoggingMiddleware, validateCsrfToken, verifySecurityConfig } from './chunk-I2H5NGJQ.js';
2
- import './chunk-EW5NOBVU.js';
3
- import './chunk-4R3NOOL3.js';
1
+ export { AuthManager, PermissionManager, bootstrapMiddleware, cacheHeaders, compressionMiddleware, csrfProtection, detailedLoggingMiddleware, generateCsrfToken, getActivePlugins, getJwtExpirySeconds, getJwtExpirySecondsFromDb, getJwtRefreshGraceSecondsFromDb, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, rateLimit, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeadersMiddleware as securityHeaders, securityLoggingMiddleware, validateCsrfToken, verifySecurityConfig } from './chunk-IDCZBF35.js';
2
+ import './chunk-BLMTL57B.js';
3
+ import './chunk-GCDZZNIN.js';
4
+ import './chunk-PYVFXCSD.js';
5
+ import './chunk-ALDRXTUO.js';
6
+ import './chunk-5V62WT6M.js';
7
+ import './chunk-RNZFGN4R.js';
4
8
  import './chunk-FICTAGD4.js';
9
+ import './chunk-X7ZAEI5S.js';
10
+ import './chunk-TQABQWOP.js';
5
11
  import './chunk-V4OQ3NZ2.js';
6
12
  //# sourceMappingURL=middleware.js.map
7
13
  //# sourceMappingURL=middleware.js.map
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkIHTXB7AT_cjs = require('./chunk-IHTXB7AT.cjs');
4
+ require('./chunk-IGJUBJBW.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "MigrationService", {
9
+ enumerable: true,
10
+ get: function () { return chunkIHTXB7AT_cjs.MigrationService; }
11
+ });
12
+ //# sourceMappingURL=migrations-2XHQEGOQ.cjs.map
13
+ //# sourceMappingURL=migrations-2XHQEGOQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-IYNTWDC6.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-2XHQEGOQ.cjs"}
@@ -0,0 +1,4 @@
1
+ export { MigrationService } from './chunk-ALDRXTUO.js';
2
+ import './chunk-V4OQ3NZ2.js';
3
+ //# sourceMappingURL=migrations-PE3CDVSM.js.map
4
+ //# sourceMappingURL=migrations-PE3CDVSM.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-R337UD46.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-PE3CDVSM.js"}