@sonicjs-cms/core 2.0.0-alpha.1 → 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 (89) hide show
  1. package/dist/chunk-3MNMOLSA.js +133 -0
  2. package/dist/chunk-3MNMOLSA.js.map +1 -0
  3. package/dist/chunk-4USDL3UP.cjs +15565 -0
  4. package/dist/chunk-4USDL3UP.cjs.map +1 -0
  5. package/dist/{chunk-CXZDAR6S.js → chunk-7N3HK7ZK.js} +3 -3
  6. package/dist/{chunk-CXZDAR6S.js.map → chunk-7N3HK7ZK.js.map} +1 -1
  7. package/dist/chunk-AGOE25LF.cjs +137 -0
  8. package/dist/chunk-AGOE25LF.cjs.map +1 -0
  9. package/dist/{chunk-NRSL6BQI.js → chunk-BITQ4MFX.js} +3 -3
  10. package/dist/{chunk-NRSL6BQI.js.map → chunk-BITQ4MFX.js.map} +1 -1
  11. package/dist/{chunk-24PWAFUT.cjs → chunk-BUKT6HP5.cjs} +13 -13
  12. package/dist/{chunk-24PWAFUT.cjs.map → chunk-BUKT6HP5.cjs.map} +1 -1
  13. package/dist/{chunk-L3NXO7Y4.cjs → chunk-FVMV5DKA.cjs} +49 -49
  14. package/dist/{chunk-L3NXO7Y4.cjs.map → chunk-FVMV5DKA.cjs.map} +1 -1
  15. package/dist/chunk-GGBHOIDD.js +15552 -0
  16. package/dist/chunk-GGBHOIDD.js.map +1 -0
  17. package/dist/{chunk-EMMSS5I5.cjs → chunk-IGJUBJBW.cjs} +8 -2
  18. package/dist/{chunk-ALTMI5Y2.cjs.map → chunk-IGJUBJBW.cjs.map} +1 -1
  19. package/dist/{chunk-WJ7QYVR2.cjs → chunk-RNR4HA23.cjs} +4 -4
  20. package/dist/{chunk-WJ7QYVR2.cjs.map → chunk-RNR4HA23.cjs.map} +1 -1
  21. package/dist/{chunk-G3PMV62Z.js → chunk-V4OQ3NZ2.js} +7 -3
  22. package/dist/{chunk-G3PMV62Z.js.map → chunk-V4OQ3NZ2.js.map} +1 -1
  23. package/dist/{chunk-PTQZ5FEI.js → chunk-WESS2U3K.js} +3 -3
  24. package/dist/{chunk-PTQZ5FEI.js.map → chunk-WESS2U3K.js.map} +1 -1
  25. package/dist/index.cjs +105 -92
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.js +22 -8
  28. package/dist/index.js.map +1 -1
  29. package/dist/middleware.cjs +23 -23
  30. package/dist/middleware.js +3 -3
  31. package/dist/plugins.cjs +8 -8
  32. package/dist/plugins.js +2 -2
  33. package/dist/routes.cjs +51 -3
  34. package/dist/routes.js +6 -2
  35. package/dist/services.cjs +31 -19
  36. package/dist/services.js +3 -3
  37. package/dist/templates.cjs +1 -1
  38. package/dist/templates.js +1 -1
  39. package/dist/types.cjs +1 -1
  40. package/dist/types.js +1 -1
  41. package/dist/utils.cjs +1 -1
  42. package/dist/utils.js +1 -1
  43. package/migrations/001_initial_schema.sql +198 -0
  44. package/migrations/002_faq_plugin.sql +86 -0
  45. package/migrations/003_stage5_enhancements.sql +121 -0
  46. package/migrations/004_stage6_user_management.sql +183 -0
  47. package/migrations/005_stage7_workflow_automation.sql +294 -0
  48. package/migrations/006_plugin_system.sql +155 -0
  49. package/migrations/007_demo_login_plugin.sql +23 -0
  50. package/migrations/008_fix_slug_validation.sql +22 -0
  51. package/migrations/009_system_logging.sql +57 -0
  52. package/migrations/011_config_managed_collections.sql +14 -0
  53. package/migrations/012_testimonials_plugin.sql +80 -0
  54. package/migrations/013_code_examples_plugin.sql +177 -0
  55. package/migrations/014_fix_plugin_registry.sql +88 -0
  56. package/migrations/015_add_remaining_plugins.sql +89 -0
  57. package/migrations/016_remove_duplicate_cache_plugin.sql +17 -0
  58. package/migrations/017_auth_configurable_fields.sql +49 -0
  59. package/package.json +1 -1
  60. package/dist/chunk-4URGXJP7.js +0 -3
  61. package/dist/chunk-4URGXJP7.js.map +0 -1
  62. package/dist/chunk-ALTMI5Y2.cjs +0 -4
  63. package/dist/chunk-BOLQHE4J.cjs +0 -11
  64. package/dist/chunk-BOLQHE4J.cjs.map +0 -1
  65. package/dist/chunk-EMMSS5I5.cjs.map +0 -1
  66. package/dist/chunk-HD7R6T6I.js +0 -9
  67. package/dist/chunk-HD7R6T6I.js.map +0 -1
  68. package/dist/collection-config-FLlGtsh9.d.cts +0 -107
  69. package/dist/collection-config-FLlGtsh9.d.ts +0 -107
  70. package/dist/index-BlsY5XNH.d.ts +0 -8333
  71. package/dist/index-D45jaIlr.d.cts +0 -8333
  72. package/dist/index.d.cts +0 -136
  73. package/dist/index.d.ts +0 -136
  74. package/dist/middleware.d.cts +0 -206
  75. package/dist/middleware.d.ts +0 -206
  76. package/dist/plugin-UzmDImQc.d.cts +0 -357
  77. package/dist/plugin-UzmDImQc.d.ts +0 -357
  78. package/dist/plugins.d.cts +0 -330
  79. package/dist/plugins.d.ts +0 -330
  80. package/dist/routes.d.cts +0 -17
  81. package/dist/routes.d.ts +0 -17
  82. package/dist/services.d.cts +0 -5
  83. package/dist/services.d.ts +0 -5
  84. package/dist/templates.d.cts +0 -140
  85. package/dist/templates.d.ts +0 -140
  86. package/dist/types.d.cts +0 -41
  87. package/dist/types.d.ts +0 -41
  88. package/dist/utils.d.cts +0 -184
  89. 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 };