@sonicjs-cms/core 2.0.0-alpha.1 → 2.0.0-alpha.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.
- package/dist/chunk-3MNMOLSA.js +133 -0
- package/dist/chunk-3MNMOLSA.js.map +1 -0
- package/dist/{chunk-BRC3F4CG.cjs → chunk-6BHDKYLU.cjs} +8 -2
- package/dist/{chunk-KRJMGD4E.js.map → chunk-6BHDKYLU.cjs.map} +1 -1
- package/dist/{chunk-CXZDAR6S.js → chunk-7N3HK7ZK.js} +3 -3
- package/dist/{chunk-CXZDAR6S.js.map → chunk-7N3HK7ZK.js.map} +1 -1
- package/dist/chunk-AGOE25LF.cjs +137 -0
- package/dist/chunk-AGOE25LF.cjs.map +1 -0
- package/dist/{chunk-NRSL6BQI.js → chunk-BITQ4MFX.js} +3 -3
- package/dist/{chunk-NRSL6BQI.js.map → chunk-BITQ4MFX.js.map} +1 -1
- package/dist/{chunk-24PWAFUT.cjs → chunk-BUKT6HP5.cjs} +13 -13
- package/dist/{chunk-24PWAFUT.cjs.map → chunk-BUKT6HP5.cjs.map} +1 -1
- package/dist/chunk-DG4INX36.cjs +14246 -0
- package/dist/chunk-DG4INX36.cjs.map +1 -0
- package/dist/chunk-FDUDHGI6.js +14233 -0
- package/dist/chunk-FDUDHGI6.js.map +1 -0
- package/dist/{chunk-L3NXO7Y4.cjs → chunk-FVMV5DKA.cjs} +49 -49
- package/dist/{chunk-L3NXO7Y4.cjs.map → chunk-FVMV5DKA.cjs.map} +1 -1
- package/dist/{chunk-KRJMGD4E.js → chunk-FZYF43TN.js} +8 -2
- package/dist/chunk-FZYF43TN.js.map +1 -0
- package/dist/chunk-G4JGVZAF.js +1337 -0
- package/dist/chunk-G4JGVZAF.js.map +1 -0
- package/dist/{chunk-EMMSS5I5.cjs → chunk-IGJUBJBW.cjs} +8 -2
- package/dist/{chunk-ALTMI5Y2.cjs.map → chunk-IGJUBJBW.cjs.map} +1 -1
- package/dist/chunk-LEGKJ5DI.cjs +1344 -0
- package/dist/chunk-LEGKJ5DI.cjs.map +1 -0
- package/dist/{chunk-WJ7QYVR2.cjs → chunk-RNR4HA23.cjs} +4 -4
- package/dist/{chunk-WJ7QYVR2.cjs.map → chunk-RNR4HA23.cjs.map} +1 -1
- package/dist/{chunk-G3PMV62Z.js → chunk-V4OQ3NZ2.js} +7 -3
- package/dist/{chunk-G3PMV62Z.js.map → chunk-V4OQ3NZ2.js.map} +1 -1
- package/dist/{chunk-PTQZ5FEI.js → chunk-WESS2U3K.js} +3 -3
- package/dist/{chunk-PTQZ5FEI.js.map → chunk-WESS2U3K.js.map} +1 -1
- package/dist/index.cjs +147 -101
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -135
- package/dist/index.js +24 -9
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +23 -23
- package/dist/middleware.d.ts +2 -206
- package/dist/middleware.js +3 -3
- package/dist/plugins.cjs +8 -8
- package/dist/plugins.d.ts +2 -330
- package/dist/plugins.js +2 -2
- package/dist/routes.cjs +52 -3
- package/dist/routes.d.ts +2 -17
- package/dist/routes.js +7 -2
- package/dist/services.cjs +31 -19
- package/dist/services.d.ts +2 -5
- package/dist/services.js +3 -3
- package/dist/templates.cjs +23 -10
- package/dist/templates.d.ts +2 -140
- package/dist/templates.js +3 -2
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +2 -41
- package/dist/types.js +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.d.ts +2 -184
- package/dist/utils.js +1 -1
- package/migrations/001_initial_schema.sql +198 -0
- package/migrations/002_faq_plugin.sql +86 -0
- package/migrations/003_stage5_enhancements.sql +121 -0
- package/migrations/004_stage6_user_management.sql +183 -0
- package/migrations/005_stage7_workflow_automation.sql +294 -0
- package/migrations/006_plugin_system.sql +155 -0
- package/migrations/007_demo_login_plugin.sql +23 -0
- package/migrations/008_fix_slug_validation.sql +22 -0
- package/migrations/009_system_logging.sql +57 -0
- package/migrations/011_config_managed_collections.sql +14 -0
- package/migrations/012_testimonials_plugin.sql +80 -0
- package/migrations/013_code_examples_plugin.sql +177 -0
- package/migrations/014_fix_plugin_registry.sql +88 -0
- package/migrations/015_add_remaining_plugins.sql +89 -0
- package/migrations/016_remove_duplicate_cache_plugin.sql +17 -0
- package/migrations/017_auth_configurable_fields.sql +49 -0
- package/package.json +2 -2
- package/dist/chunk-4URGXJP7.js +0 -3
- package/dist/chunk-4URGXJP7.js.map +0 -1
- package/dist/chunk-ALTMI5Y2.cjs +0 -4
- package/dist/chunk-BOLQHE4J.cjs +0 -11
- package/dist/chunk-BOLQHE4J.cjs.map +0 -1
- package/dist/chunk-BRC3F4CG.cjs.map +0 -1
- package/dist/chunk-EMMSS5I5.cjs.map +0 -1
- package/dist/chunk-HD7R6T6I.js +0 -9
- package/dist/chunk-HD7R6T6I.js.map +0 -1
- package/dist/collection-config-FLlGtsh9.d.cts +0 -107
- package/dist/collection-config-FLlGtsh9.d.ts +0 -107
- package/dist/index-BlsY5XNH.d.ts +0 -8333
- package/dist/index-D45jaIlr.d.cts +0 -8333
- package/dist/index.d.cts +0 -136
- package/dist/middleware.d.cts +0 -206
- package/dist/plugin-UzmDImQc.d.cts +0 -357
- package/dist/plugin-UzmDImQc.d.ts +0 -357
- package/dist/plugins.d.cts +0 -330
- package/dist/routes.d.cts +0 -17
- package/dist/services.d.cts +0 -5
- package/dist/templates.d.cts +0 -140
- package/dist/types.d.cts +0 -41
- package/dist/utils.d.cts +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 };
|
|
@@ -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 };
|