@sonicjs-cms/core 2.0.10 → 2.0.11

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 (67) hide show
  1. package/dist/{chunk-LW33AOBF.js → chunk-5RKQB2JG.js} +6 -222
  2. package/dist/chunk-5RKQB2JG.js.map +1 -0
  3. package/dist/chunk-AMSTLQFI.cjs +801 -0
  4. package/dist/chunk-AMSTLQFI.cjs.map +1 -0
  5. package/dist/{chunk-Z4H6DBVF.js → chunk-CLLJFZ5U.js} +1965 -1043
  6. package/dist/chunk-CLLJFZ5U.js.map +1 -0
  7. package/dist/{chunk-MXJJN4IA.js → chunk-DU7JJZN7.js} +5 -4
  8. package/dist/chunk-DU7JJZN7.js.map +1 -0
  9. package/dist/{chunk-YHG45LMU.js → chunk-FYWJMETG.js} +20 -4
  10. package/dist/chunk-FYWJMETG.js.map +1 -0
  11. package/dist/chunk-I5ZPYKNX.js +787 -0
  12. package/dist/chunk-I5ZPYKNX.js.map +1 -0
  13. package/dist/{chunk-Q7SL7U43.cjs → chunk-IM2LGCYD.cjs} +2114 -1192
  14. package/dist/chunk-IM2LGCYD.cjs.map +1 -0
  15. package/dist/{chunk-3PHG75W4.cjs → chunk-NNXPAPUD.cjs} +5 -4
  16. package/dist/chunk-NNXPAPUD.cjs.map +1 -0
  17. package/dist/{chunk-FTMKKKNH.js → chunk-QNWYQZ55.js} +3 -3
  18. package/dist/{chunk-FTMKKKNH.js.map → chunk-QNWYQZ55.js.map} +1 -1
  19. package/dist/{chunk-COBUPOMD.js → chunk-T7IYBGGO.cjs} +5 -770
  20. package/dist/chunk-T7IYBGGO.cjs.map +1 -0
  21. package/dist/{chunk-HXA5QSI3.cjs → chunk-X2VADBA4.cjs} +22 -6
  22. package/dist/chunk-X2VADBA4.cjs.map +1 -0
  23. package/dist/{chunk-MU3MR2QR.cjs → chunk-YU6QFFI4.cjs} +5 -222
  24. package/dist/chunk-YU6QFFI4.cjs.map +1 -0
  25. package/dist/{chunk-CAP6QQR2.cjs → chunk-ZMSYKV62.cjs} +5 -5
  26. package/dist/{chunk-CAP6QQR2.cjs.map → chunk-ZMSYKV62.cjs.map} +1 -1
  27. package/dist/{chunk-NBDPIRQS.cjs → chunk-ZPMFT2JW.js} +4 -786
  28. package/dist/chunk-ZPMFT2JW.js.map +1 -0
  29. package/dist/index.cjs +475 -104
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.js +385 -10
  32. package/dist/index.js.map +1 -1
  33. package/dist/middleware.cjs +24 -23
  34. package/dist/middleware.js +3 -2
  35. package/dist/migrations-IHERIQVD.js +4 -0
  36. package/dist/migrations-IHERIQVD.js.map +1 -0
  37. package/dist/migrations-POFD5KNG.cjs +13 -0
  38. package/dist/migrations-POFD5KNG.cjs.map +1 -0
  39. package/dist/routes.cjs +25 -28
  40. package/dist/routes.js +6 -5
  41. package/dist/services.cjs +19 -18
  42. package/dist/services.js +2 -1
  43. package/dist/templates.cjs +17 -21
  44. package/dist/templates.js +2 -2
  45. package/dist/utils.cjs +11 -11
  46. package/dist/utils.js +1 -1
  47. package/migrations/001_initial_schema.sql +2 -2
  48. package/migrations/007_demo_login_plugin.sql +1 -1
  49. package/migrations/020_add_email_plugin.sql +22 -0
  50. package/migrations/021_add_magic_link_auth_plugin.sql +42 -0
  51. package/migrations/021_add_otp_login.sql +42 -0
  52. package/migrations/022_add_tinymce_plugin.sql +25 -0
  53. package/migrations/023_add_mdxeditor_plugin.sql +25 -0
  54. package/migrations/024_add_quill_editor_plugin.sql +25 -0
  55. package/migrations/025_add_easymde_plugin.sql +25 -0
  56. package/package.json +3 -2
  57. package/dist/chunk-3PHG75W4.cjs.map +0 -1
  58. package/dist/chunk-COBUPOMD.js.map +0 -1
  59. package/dist/chunk-HXA5QSI3.cjs.map +0 -1
  60. package/dist/chunk-LW33AOBF.js.map +0 -1
  61. package/dist/chunk-MU3MR2QR.cjs.map +0 -1
  62. package/dist/chunk-MXJJN4IA.js.map +0 -1
  63. package/dist/chunk-NBDPIRQS.cjs.map +0 -1
  64. package/dist/chunk-Q7SL7U43.cjs.map +0 -1
  65. package/dist/chunk-YHG45LMU.js.map +0 -1
  66. package/dist/chunk-Z4H6DBVF.js.map +0 -1
  67. package/migrations/002_faq_plugin.sql +0 -86
@@ -1,86 +0,0 @@
1
- -- FAQ Plugin Migration (DEPRECATED - Now managed by third-party plugin)
2
- -- Creates FAQ table for the FAQ plugin
3
- -- NOTE: This migration is kept for historical purposes.
4
- -- The FAQ functionality is now provided by the faq-plugin third-party plugin.
5
-
6
- CREATE TABLE IF NOT EXISTS faqs (
7
- id INTEGER PRIMARY KEY AUTOINCREMENT,
8
- question TEXT NOT NULL,
9
- answer TEXT NOT NULL,
10
- category TEXT,
11
- tags TEXT,
12
- isPublished INTEGER NOT NULL DEFAULT 1,
13
- sortOrder INTEGER NOT NULL DEFAULT 0,
14
- created_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now')),
15
- updated_at INTEGER NOT NULL DEFAULT (strftime('%s', 'now'))
16
- );
17
-
18
- -- Create indexes for better performance
19
- CREATE INDEX IF NOT EXISTS idx_faqs_category ON faqs(category);
20
- CREATE INDEX IF NOT EXISTS idx_faqs_published ON faqs(isPublished);
21
- CREATE INDEX IF NOT EXISTS idx_faqs_sort_order ON faqs(sortOrder);
22
-
23
- -- Create trigger to update updated_at timestamp
24
- CREATE TRIGGER IF NOT EXISTS faqs_updated_at
25
- AFTER UPDATE ON faqs
26
- BEGIN
27
- UPDATE faqs SET updated_at = strftime('%s', 'now') WHERE id = NEW.id;
28
- END;
29
-
30
- -- Insert sample FAQ data
31
- INSERT OR IGNORE INTO faqs (question, answer, category, tags, isPublished, sortOrder) VALUES
32
- ('What is SonicJS AI?',
33
- 'SonicJS AI is a modern, TypeScript-first headless CMS built for Cloudflare''s edge platform. It provides a complete content management system with admin interface, API endpoints, and plugin architecture.',
34
- 'general',
35
- 'sonicjs, cms, cloudflare',
36
- 1,
37
- 1),
38
-
39
- ('How do I get started with SonicJS AI?',
40
- 'To get started: 1) Clone the repository, 2) Install dependencies with npm install, 3) Set up your Cloudflare account and services, 4) Run the development server with npm run dev, 5) Access the admin interface at /admin.',
41
- 'general',
42
- 'getting-started, setup',
43
- 1,
44
- 2),
45
-
46
- ('What technologies does SonicJS AI use?',
47
- 'SonicJS AI is built with: TypeScript for type safety, Hono.js as the web framework, Cloudflare D1 for the database, Cloudflare R2 for media storage, Cloudflare Workers for serverless execution, and Tailwind CSS for styling.',
48
- 'technical',
49
- 'technology-stack, typescript, cloudflare',
50
- 1,
51
- 3),
52
-
53
- ('How do I create content in SonicJS AI?',
54
- 'Content creation is done through the admin interface. Navigate to /admin, log in with your credentials, go to Content section, select a collection, and click "New Content" to create articles, pages, or other content types.',
55
- 'general',
56
- 'content-creation, admin',
57
- 1,
58
- 4),
59
-
60
- ('Is SonicJS AI free to use?',
61
- 'SonicJS AI is open source and free to use. You only pay for the Cloudflare services you consume (D1 database, R2 storage, Workers execution time). Cloudflare offers generous free tiers for development and small projects.',
62
- 'billing',
63
- 'pricing, open-source, cloudflare',
64
- 1,
65
- 5),
66
-
67
- ('How do I add custom functionality?',
68
- 'SonicJS AI features a plugin system that allows you to extend functionality. You can create plugins using the PluginBuilder API, add custom routes, models, admin pages, and integrate with external services.',
69
- 'technical',
70
- 'plugins, customization, development',
71
- 1,
72
- 6),
73
-
74
- ('Can I customize the admin interface?',
75
- 'Yes! The admin interface is built with TypeScript templates and can be customized. You can modify existing templates, create new components, add custom pages, and integrate your own styling while maintaining the dark theme.',
76
- 'technical',
77
- 'admin-interface, customization, templates',
78
- 1,
79
- 7),
80
-
81
- ('How does authentication work?',
82
- 'SonicJS AI includes a built-in authentication system with JWT tokens, role-based access control (admin, editor, viewer), secure password hashing, and session management. Users can be managed through the admin interface.',
83
- 'technical',
84
- 'authentication, security, users',
85
- 1,
86
- 8);