@sonicjs-cms/core 2.0.9 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/chunk-22EFGHAX.cjs +801 -0
  2. package/dist/chunk-22EFGHAX.cjs.map +1 -0
  3. package/dist/{chunk-TMIRVVQ7.cjs → chunk-2MBNRFS5.cjs} +7 -5
  4. package/dist/chunk-2MBNRFS5.cjs.map +1 -0
  5. package/dist/{chunk-VEC5MLT3.js → chunk-5RKQB2JG.js} +10 -228
  6. package/dist/chunk-5RKQB2JG.js.map +1 -0
  7. package/dist/{chunk-DYYAXDXI.cjs → chunk-7EGKU7OO.cjs} +31 -11
  8. package/dist/chunk-7EGKU7OO.cjs.map +1 -0
  9. package/dist/{chunk-6FR25MPC.js → chunk-F4K5QAN6.js} +246 -3
  10. package/dist/chunk-F4K5QAN6.js.map +1 -0
  11. package/dist/{chunk-WRRLB6KG.js → chunk-K5JZ4JI3.js} +7 -5
  12. package/dist/chunk-K5JZ4JI3.js.map +1 -0
  13. package/dist/{chunk-ABYMIXRN.js → chunk-KZ5XDGE6.js} +11891 -10589
  14. package/dist/chunk-KZ5XDGE6.js.map +1 -0
  15. package/dist/{chunk-4I25AGUR.cjs → chunk-LPM3NPAX.cjs} +12083 -10780
  16. package/dist/chunk-LPM3NPAX.cjs.map +1 -0
  17. package/dist/chunk-LWMMMW43.js +787 -0
  18. package/dist/chunk-LWMMMW43.js.map +1 -0
  19. package/dist/chunk-NMVOTNSL.js +61 -0
  20. package/dist/chunk-NMVOTNSL.js.map +1 -0
  21. package/dist/{chunk-OPGDMS7L.js → chunk-QNWYQZ55.js} +3 -3
  22. package/dist/{chunk-OPGDMS7L.js.map → chunk-QNWYQZ55.js.map} +1 -1
  23. package/dist/{chunk-COBUPOMD.js → chunk-T7IYBGGO.cjs} +5 -770
  24. package/dist/chunk-T7IYBGGO.cjs.map +1 -0
  25. package/dist/{chunk-OKPDQO2Y.js → chunk-UJ4K4B23.js} +30 -10
  26. package/dist/chunk-UJ4K4B23.js.map +1 -0
  27. package/dist/chunk-WBX5YMTB.cjs +70 -0
  28. package/dist/chunk-WBX5YMTB.cjs.map +1 -0
  29. package/dist/{chunk-DOR2IU73.cjs → chunk-YP52USGX.cjs} +249 -2
  30. package/dist/chunk-YP52USGX.cjs.map +1 -0
  31. package/dist/{chunk-EYMHWJTW.cjs → chunk-YU6QFFI4.cjs} +9 -228
  32. package/dist/chunk-YU6QFFI4.cjs.map +1 -0
  33. package/dist/{chunk-MABBKINE.cjs → chunk-ZMSYKV62.cjs} +5 -5
  34. package/dist/{chunk-MABBKINE.cjs.map → chunk-ZMSYKV62.cjs.map} +1 -1
  35. package/dist/{chunk-NBDPIRQS.cjs → chunk-ZPMFT2JW.js} +4 -786
  36. package/dist/chunk-ZPMFT2JW.js.map +1 -0
  37. package/dist/index.cjs +520 -147
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.js +390 -13
  40. package/dist/index.js.map +1 -1
  41. package/dist/middleware.cjs +24 -23
  42. package/dist/middleware.js +3 -2
  43. package/dist/migrations-IHERIQVD.js +4 -0
  44. package/dist/migrations-IHERIQVD.js.map +1 -0
  45. package/dist/migrations-POFD5KNG.cjs +13 -0
  46. package/dist/migrations-POFD5KNG.cjs.map +1 -0
  47. package/dist/routes.cjs +31 -29
  48. package/dist/routes.js +8 -6
  49. package/dist/services.cjs +42 -24
  50. package/dist/services.js +4 -2
  51. package/dist/templates.cjs +17 -21
  52. package/dist/templates.js +2 -2
  53. package/dist/utils.cjs +44 -11
  54. package/dist/utils.js +2 -1
  55. package/migrations/001_initial_schema.sql +2 -2
  56. package/migrations/007_demo_login_plugin.sql +1 -1
  57. package/migrations/020_add_email_plugin.sql +22 -0
  58. package/migrations/021_add_magic_link_auth_plugin.sql +42 -0
  59. package/migrations/021_add_otp_login.sql +42 -0
  60. package/migrations/022_add_tinymce_plugin.sql +25 -0
  61. package/migrations/023_add_easy_mdx_plugin.sql +25 -0
  62. package/migrations/024_add_quill_editor_plugin.sql +25 -0
  63. package/migrations/025_rename_mdxeditor_to_easy_mdx.sql +22 -0
  64. package/package.json +5 -3
  65. package/dist/chunk-4I25AGUR.cjs.map +0 -1
  66. package/dist/chunk-6FR25MPC.js.map +0 -1
  67. package/dist/chunk-ABYMIXRN.js.map +0 -1
  68. package/dist/chunk-COBUPOMD.js.map +0 -1
  69. package/dist/chunk-DOR2IU73.cjs.map +0 -1
  70. package/dist/chunk-DYYAXDXI.cjs.map +0 -1
  71. package/dist/chunk-EYMHWJTW.cjs.map +0 -1
  72. package/dist/chunk-NBDPIRQS.cjs.map +0 -1
  73. package/dist/chunk-OKPDQO2Y.js.map +0 -1
  74. package/dist/chunk-TMIRVVQ7.cjs.map +0 -1
  75. package/dist/chunk-VEC5MLT3.js.map +0 -1
  76. package/dist/chunk-WRRLB6KG.js.map +0 -1
  77. package/migrations/002_faq_plugin.sql +0 -86
@@ -0,0 +1,25 @@
1
+ -- Add TinyMCE Rich Text Editor Plugin
2
+ -- Migration: 022_add_tinymce_plugin
3
+ -- Description: Add TinyMCE plugin for WYSIWYG rich text editing
4
+
5
+ -- Register the plugin (active by default since it replaces hardcoded TinyMCE)
6
+ INSERT OR IGNORE INTO plugins (
7
+ id, name, display_name, description, version, author, category, icon,
8
+ status, is_core, permissions, dependencies, settings, installed_at, last_updated
9
+ ) VALUES (
10
+ 'tinymce-plugin',
11
+ 'tinymce-plugin',
12
+ 'TinyMCE Rich Text Editor',
13
+ 'Powerful WYSIWYG rich text editor for content creation. Provides a full-featured editor with formatting, media embedding, and customizable toolbars for richtext fields.',
14
+ '1.0.0',
15
+ 'SonicJS Team',
16
+ 'editor',
17
+ '✏️',
18
+ 'active',
19
+ FALSE,
20
+ '[]',
21
+ '[]',
22
+ '{"apiKey":"no-api-key","defaultHeight":300,"defaultToolbar":"full","skin":"oxide-dark"}',
23
+ unixepoch(),
24
+ unixepoch()
25
+ );
@@ -0,0 +1,25 @@
1
+ -- Add EasyMDE Markdown Editor Plugin
2
+ -- Migration: 023_add_easy_mdx_plugin
3
+ -- Description: Add EasyMDE plugin for lightweight markdown editing
4
+
5
+ -- Register the plugin (active by default)
6
+ INSERT OR IGNORE INTO plugins (
7
+ id, name, display_name, description, version, author, category, icon,
8
+ status, is_core, permissions, dependencies, settings, installed_at, last_updated
9
+ ) VALUES (
10
+ 'easy-mdx',
11
+ 'easy-mdx',
12
+ 'EasyMDE Markdown Editor',
13
+ 'Lightweight markdown editor with live preview. Provides a simple and efficient editor with markdown support for richtext fields.',
14
+ '1.0.0',
15
+ 'SonicJS Team',
16
+ 'editor',
17
+ '📝',
18
+ 'active',
19
+ FALSE,
20
+ '[]',
21
+ '[]',
22
+ '{"defaultHeight":400,"theme":"dark","toolbar":"full","placeholder":"Start writing your content..."}',
23
+ unixepoch(),
24
+ unixepoch()
25
+ );
@@ -0,0 +1,25 @@
1
+ -- Add Quill Rich Text Editor Plugin
2
+ -- Migration: 024_add_quill_editor_plugin
3
+ -- Description: Add Quill plugin for modern rich text editing
4
+
5
+ -- Register the plugin (active by default)
6
+ INSERT OR IGNORE INTO plugins (
7
+ id, name, display_name, description, version, author, category, icon,
8
+ status, is_core, permissions, dependencies, settings, installed_at, last_updated
9
+ ) VALUES (
10
+ 'quill-editor',
11
+ 'quill-editor',
12
+ 'Quill Rich Text Editor',
13
+ 'Modern rich text editor for content creation. Provides a clean, intuitive WYSIWYG editor with customizable toolbars for richtext fields.',
14
+ '1.0.0',
15
+ 'SonicJS Team',
16
+ 'editor',
17
+ '✍️',
18
+ 'active',
19
+ FALSE,
20
+ '[]',
21
+ '[]',
22
+ '{"theme":"snow","defaultHeight":300,"defaultToolbar":"full","placeholder":"Start writing your content..."}',
23
+ unixepoch(),
24
+ unixepoch()
25
+ );
@@ -0,0 +1,22 @@
1
+ -- Rename mdxeditor-plugin to easy-mdx
2
+ -- Migration: 025_rename_mdxeditor_to_easy_mdx
3
+ -- Description: Update plugin ID from mdxeditor-plugin to easy-mdx to reflect the change to EasyMDE editor
4
+
5
+ -- Update the plugin record if it exists with the old ID
6
+ UPDATE plugins
7
+ SET
8
+ id = 'easy-mdx',
9
+ name = 'easy-mdx',
10
+ display_name = 'EasyMDE Markdown Editor',
11
+ description = 'Lightweight markdown editor with live preview. Provides a simple and efficient editor with markdown support for richtext fields.'
12
+ WHERE id = 'mdxeditor-plugin';
13
+
14
+ -- Update any plugin_hooks references
15
+ UPDATE plugin_hooks
16
+ SET plugin_id = 'easy-mdx'
17
+ WHERE plugin_id = 'mdxeditor-plugin';
18
+
19
+ -- Update any plugin_activity_log references
20
+ UPDATE plugin_activity_log
21
+ SET plugin_id = 'easy-mdx'
22
+ WHERE plugin_id = 'mdxeditor-plugin';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonicjs-cms/core",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "description": "Core framework for SonicJS headless CMS - Edge-first, TypeScript-native CMS built for Cloudflare Workers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -46,7 +46,8 @@
46
46
  "types": "./dist/types.d.ts",
47
47
  "import": "./dist/types.js",
48
48
  "require": "./dist/types.cjs"
49
- }
49
+ },
50
+ "./package.json": "./package.json"
50
51
  },
51
52
  "files": [
52
53
  "dist",
@@ -95,7 +96,8 @@
95
96
  "drizzle-zod": "^0.8.3",
96
97
  "marked": "^16.4.1",
97
98
  "highlight.js": "^11.11.1",
98
- "semver": "^7.7.3"
99
+ "semver": "^7.7.3",
100
+ "posthog-node": "^4.0.0"
99
101
  },
100
102
  "devDependencies": {
101
103
  "@cloudflare/workers-types": "^4.20251014.0",