@sonicjs-cms/core 1.0.0-alpha.4 → 2.0.0-alpha.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 (90) hide show
  1. package/README.md +268 -166
  2. package/dist/chunk-3MNMOLSA.js +133 -0
  3. package/dist/chunk-3MNMOLSA.js.map +1 -0
  4. package/dist/chunk-4USDL3UP.cjs +15565 -0
  5. package/dist/chunk-4USDL3UP.cjs.map +1 -0
  6. package/dist/{chunk-CXZDAR6S.js → chunk-7N3HK7ZK.js} +3 -3
  7. package/dist/{chunk-CXZDAR6S.js.map → chunk-7N3HK7ZK.js.map} +1 -1
  8. package/dist/chunk-AGOE25LF.cjs +137 -0
  9. package/dist/chunk-AGOE25LF.cjs.map +1 -0
  10. package/dist/{chunk-NRSL6BQI.js → chunk-BITQ4MFX.js} +3 -3
  11. package/dist/{chunk-NRSL6BQI.js.map → chunk-BITQ4MFX.js.map} +1 -1
  12. package/dist/{chunk-24PWAFUT.cjs → chunk-BUKT6HP5.cjs} +13 -13
  13. package/dist/{chunk-24PWAFUT.cjs.map → chunk-BUKT6HP5.cjs.map} +1 -1
  14. package/dist/{chunk-L3NXO7Y4.cjs → chunk-FVMV5DKA.cjs} +49 -49
  15. package/dist/{chunk-L3NXO7Y4.cjs.map → chunk-FVMV5DKA.cjs.map} +1 -1
  16. package/dist/chunk-GGBHOIDD.js +15552 -0
  17. package/dist/chunk-GGBHOIDD.js.map +1 -0
  18. package/dist/{chunk-EMMSS5I5.cjs → chunk-IGJUBJBW.cjs} +8 -2
  19. package/dist/{chunk-ALTMI5Y2.cjs.map → chunk-IGJUBJBW.cjs.map} +1 -1
  20. package/dist/{chunk-WJ7QYVR2.cjs → chunk-RNR4HA23.cjs} +4 -4
  21. package/dist/{chunk-WJ7QYVR2.cjs.map → chunk-RNR4HA23.cjs.map} +1 -1
  22. package/dist/{chunk-G3PMV62Z.js → chunk-V4OQ3NZ2.js} +7 -3
  23. package/dist/{chunk-G3PMV62Z.js.map → chunk-V4OQ3NZ2.js.map} +1 -1
  24. package/dist/{chunk-PTQZ5FEI.js → chunk-WESS2U3K.js} +3 -3
  25. package/dist/{chunk-PTQZ5FEI.js.map → chunk-WESS2U3K.js.map} +1 -1
  26. package/dist/index.cjs +105 -92
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.js +22 -8
  29. package/dist/index.js.map +1 -1
  30. package/dist/middleware.cjs +23 -23
  31. package/dist/middleware.js +3 -3
  32. package/dist/plugins.cjs +8 -8
  33. package/dist/plugins.js +2 -2
  34. package/dist/routes.cjs +51 -3
  35. package/dist/routes.js +6 -2
  36. package/dist/services.cjs +31 -19
  37. package/dist/services.js +3 -3
  38. package/dist/templates.cjs +1 -1
  39. package/dist/templates.js +1 -1
  40. package/dist/types.cjs +1 -1
  41. package/dist/types.js +1 -1
  42. package/dist/utils.cjs +1 -1
  43. package/dist/utils.js +1 -1
  44. package/migrations/001_initial_schema.sql +198 -0
  45. package/migrations/002_faq_plugin.sql +86 -0
  46. package/migrations/003_stage5_enhancements.sql +121 -0
  47. package/migrations/004_stage6_user_management.sql +183 -0
  48. package/migrations/005_stage7_workflow_automation.sql +294 -0
  49. package/migrations/006_plugin_system.sql +155 -0
  50. package/migrations/007_demo_login_plugin.sql +23 -0
  51. package/migrations/008_fix_slug_validation.sql +22 -0
  52. package/migrations/009_system_logging.sql +57 -0
  53. package/migrations/011_config_managed_collections.sql +14 -0
  54. package/migrations/012_testimonials_plugin.sql +80 -0
  55. package/migrations/013_code_examples_plugin.sql +177 -0
  56. package/migrations/014_fix_plugin_registry.sql +88 -0
  57. package/migrations/015_add_remaining_plugins.sql +89 -0
  58. package/migrations/016_remove_duplicate_cache_plugin.sql +17 -0
  59. package/migrations/017_auth_configurable_fields.sql +49 -0
  60. package/package.json +24 -24
  61. package/dist/chunk-4URGXJP7.js +0 -3
  62. package/dist/chunk-4URGXJP7.js.map +0 -1
  63. package/dist/chunk-ALTMI5Y2.cjs +0 -4
  64. package/dist/chunk-BOLQHE4J.cjs +0 -11
  65. package/dist/chunk-BOLQHE4J.cjs.map +0 -1
  66. package/dist/chunk-EMMSS5I5.cjs.map +0 -1
  67. package/dist/chunk-HD7R6T6I.js +0 -9
  68. package/dist/chunk-HD7R6T6I.js.map +0 -1
  69. package/dist/collection-config-FLlGtsh9.d.cts +0 -107
  70. package/dist/collection-config-FLlGtsh9.d.ts +0 -107
  71. package/dist/index-BlsY5XNH.d.ts +0 -8333
  72. package/dist/index-D45jaIlr.d.cts +0 -8333
  73. package/dist/index.d.cts +0 -136
  74. package/dist/index.d.ts +0 -136
  75. package/dist/middleware.d.cts +0 -206
  76. package/dist/middleware.d.ts +0 -206
  77. package/dist/plugin-UzmDImQc.d.cts +0 -357
  78. package/dist/plugin-UzmDImQc.d.ts +0 -357
  79. package/dist/plugins.d.cts +0 -330
  80. package/dist/plugins.d.ts +0 -330
  81. package/dist/routes.d.cts +0 -17
  82. package/dist/routes.d.ts +0 -17
  83. package/dist/services.d.cts +0 -5
  84. package/dist/services.d.ts +0 -5
  85. package/dist/templates.d.cts +0 -140
  86. package/dist/templates.d.ts +0 -140
  87. package/dist/types.d.cts +0 -41
  88. package/dist/types.d.ts +0 -41
  89. package/dist/utils.d.cts +0 -184
  90. package/dist/utils.d.ts +0 -184
@@ -1,107 +0,0 @@
1
- /**
2
- * Collection Configuration Types
3
- *
4
- * These types define the structure for collection configuration files.
5
- * Collections can be defined in TypeScript/JSON files and synced to the database.
6
- */
7
- type FieldType = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'email' | 'url' | 'richtext' | 'markdown' | 'json' | 'array' | 'object' | 'reference' | 'media' | 'select' | 'multiselect' | 'checkbox' | 'radio' | 'textarea' | 'slug' | 'color' | 'file';
8
- interface FieldConfig {
9
- type: FieldType;
10
- title?: string;
11
- description?: string;
12
- required?: boolean;
13
- default?: any;
14
- placeholder?: string;
15
- helpText?: string;
16
- min?: number;
17
- max?: number;
18
- minLength?: number;
19
- maxLength?: number;
20
- pattern?: string;
21
- enum?: string[];
22
- enumLabels?: string[];
23
- collection?: string;
24
- items?: FieldConfig;
25
- properties?: Record<string, FieldConfig>;
26
- format?: string;
27
- widget?: string;
28
- dependsOn?: string;
29
- showWhen?: any;
30
- }
31
- interface CollectionSchema {
32
- type: 'object';
33
- properties: Record<string, FieldConfig>;
34
- required?: string[];
35
- }
36
- interface CollectionConfig {
37
- /**
38
- * Unique machine name for the collection (lowercase, underscores)
39
- * e.g., 'blog_posts', 'products', 'team_members'
40
- */
41
- name: string;
42
- /**
43
- * Human-readable display name
44
- * e.g., 'Blog Posts', 'Products', 'Team Members'
45
- */
46
- displayName: string;
47
- /**
48
- * Optional description of the collection
49
- */
50
- description?: string;
51
- /**
52
- * JSON schema definition for the collection's content structure
53
- */
54
- schema: CollectionSchema;
55
- /**
56
- * If true, this collection is managed by config files and cannot be edited in the UI
57
- * Default: true for config-based collections
58
- */
59
- managed?: boolean;
60
- /**
61
- * If true, the collection is active and available for use
62
- * Default: true
63
- */
64
- isActive?: boolean;
65
- /**
66
- * Optional icon name for the collection (used in admin UI)
67
- */
68
- icon?: string;
69
- /**
70
- * Optional color for the collection (hex code)
71
- */
72
- color?: string;
73
- /**
74
- * Optional default sort field
75
- */
76
- defaultSort?: string;
77
- /**
78
- * Optional default sort order
79
- */
80
- defaultSortOrder?: 'asc' | 'desc';
81
- /**
82
- * Optional fields to show in list view
83
- */
84
- listFields?: string[];
85
- /**
86
- * Optional search fields
87
- */
88
- searchFields?: string[];
89
- /**
90
- * Optional metadata
91
- */
92
- metadata?: Record<string, any>;
93
- }
94
- interface CollectionConfigModule {
95
- default: CollectionConfig;
96
- }
97
- /**
98
- * Result of syncing a collection
99
- */
100
- interface CollectionSyncResult {
101
- name: string;
102
- status: 'created' | 'updated' | 'unchanged' | 'error';
103
- message?: string;
104
- error?: string;
105
- }
106
-
107
- export type { CollectionSchema as C, FieldType as F, FieldConfig as a, CollectionConfig as b, CollectionConfigModule as c, CollectionSyncResult as d };