@sonicjs-cms/core 1.0.0-alpha.1 → 1.0.0-alpha.2

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 (63) hide show
  1. package/dist/chunk-24PWAFUT.cjs +776 -0
  2. package/dist/chunk-24PWAFUT.cjs.map +1 -0
  3. package/dist/chunk-4URGXJP7.js +3 -0
  4. package/dist/{chunk-PZ5AY32C.js.map → chunk-4URGXJP7.js.map} +1 -1
  5. package/dist/chunk-ALTMI5Y2.cjs +4 -0
  6. package/dist/{chunk-Q7SFCCGT.cjs.map → chunk-ALTMI5Y2.cjs.map} +1 -1
  7. package/dist/chunk-CXZDAR6S.js +2360 -0
  8. package/dist/chunk-CXZDAR6S.js.map +1 -0
  9. package/dist/chunk-EMMSS5I5.cjs +37 -0
  10. package/dist/chunk-EMMSS5I5.cjs.map +1 -0
  11. package/dist/chunk-G3PMV62Z.js +33 -0
  12. package/dist/chunk-G3PMV62Z.js.map +1 -0
  13. package/dist/chunk-L3NXO7Y4.cjs +3093 -0
  14. package/dist/chunk-L3NXO7Y4.cjs.map +1 -0
  15. package/dist/chunk-NRSL6BQI.js +3086 -0
  16. package/dist/chunk-NRSL6BQI.js.map +1 -0
  17. package/dist/chunk-PTQZ5FEI.js +755 -0
  18. package/dist/chunk-PTQZ5FEI.js.map +1 -0
  19. package/dist/chunk-WJ7QYVR2.cjs +2416 -0
  20. package/dist/chunk-WJ7QYVR2.cjs.map +1 -0
  21. package/dist/collection-config-FLlGtsh9.d.cts +107 -0
  22. package/dist/collection-config-FLlGtsh9.d.ts +107 -0
  23. package/dist/index-BlsY5XNH.d.ts +8333 -0
  24. package/dist/index-D45jaIlr.d.cts +8333 -0
  25. package/dist/index.cjs +327 -630
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +13 -7961
  28. package/dist/index.d.ts +13 -7961
  29. package/dist/index.js +8 -592
  30. package/dist/index.js.map +1 -1
  31. package/dist/middleware.cjs +84 -4
  32. package/dist/middleware.cjs.map +1 -1
  33. package/dist/middleware.d.cts +203 -5
  34. package/dist/middleware.d.ts +203 -5
  35. package/dist/middleware.js +3 -6
  36. package/dist/middleware.js.map +1 -1
  37. package/dist/plugin-UzmDImQc.d.cts +357 -0
  38. package/dist/plugin-UzmDImQc.d.ts +357 -0
  39. package/dist/plugins.cjs +28 -4
  40. package/dist/plugins.cjs.map +1 -1
  41. package/dist/plugins.d.cts +326 -4
  42. package/dist/plugins.d.ts +326 -4
  43. package/dist/plugins.js +3 -6
  44. package/dist/plugins.js.map +1 -1
  45. package/dist/routes.cjs +1 -1
  46. package/dist/routes.js +1 -1
  47. package/dist/services.cjs +68 -4
  48. package/dist/services.cjs.map +1 -1
  49. package/dist/services.d.cts +5 -8
  50. package/dist/services.d.ts +5 -8
  51. package/dist/services.js +3 -6
  52. package/dist/services.js.map +1 -1
  53. package/dist/templates.cjs +1 -1
  54. package/dist/templates.js +1 -1
  55. package/dist/types.cjs +1 -1
  56. package/dist/types.d.cts +6 -462
  57. package/dist/types.d.ts +6 -462
  58. package/dist/types.js +1 -1
  59. package/dist/utils.cjs +1 -1
  60. package/dist/utils.js +1 -1
  61. package/package.json +1 -1
  62. package/dist/chunk-PZ5AY32C.js +0 -9
  63. package/dist/chunk-Q7SFCCGT.cjs +0 -11
package/dist/services.cjs CHANGED
@@ -1,10 +1,74 @@
1
1
  'use strict';
2
2
 
3
- require('./chunk-Q7SFCCGT.cjs');
3
+ require('./chunk-ALTMI5Y2.cjs');
4
+ var chunkWJ7QYVR2_cjs = require('./chunk-WJ7QYVR2.cjs');
5
+ require('./chunk-EMMSS5I5.cjs');
4
6
 
5
- // src/services/index.ts
6
- var placeholder = "services";
7
7
 
8
- exports.placeholder = placeholder;
8
+
9
+ Object.defineProperty(exports, "Logger", {
10
+ enumerable: true,
11
+ get: function () { return chunkWJ7QYVR2_cjs.Logger; }
12
+ });
13
+ Object.defineProperty(exports, "MigrationService", {
14
+ enumerable: true,
15
+ get: function () { return chunkWJ7QYVR2_cjs.MigrationService; }
16
+ });
17
+ Object.defineProperty(exports, "PluginBootstrapService", {
18
+ enumerable: true,
19
+ get: function () { return chunkWJ7QYVR2_cjs.PluginBootstrapService; }
20
+ });
21
+ Object.defineProperty(exports, "PluginService", {
22
+ enumerable: true,
23
+ get: function () { return chunkWJ7QYVR2_cjs.PluginService; }
24
+ });
25
+ Object.defineProperty(exports, "cleanupRemovedCollections", {
26
+ enumerable: true,
27
+ get: function () { return chunkWJ7QYVR2_cjs.cleanupRemovedCollections; }
28
+ });
29
+ Object.defineProperty(exports, "fullCollectionSync", {
30
+ enumerable: true,
31
+ get: function () { return chunkWJ7QYVR2_cjs.fullCollectionSync; }
32
+ });
33
+ Object.defineProperty(exports, "getAvailableCollectionNames", {
34
+ enumerable: true,
35
+ get: function () { return chunkWJ7QYVR2_cjs.getAvailableCollectionNames; }
36
+ });
37
+ Object.defineProperty(exports, "getLogger", {
38
+ enumerable: true,
39
+ get: function () { return chunkWJ7QYVR2_cjs.getLogger; }
40
+ });
41
+ Object.defineProperty(exports, "getManagedCollections", {
42
+ enumerable: true,
43
+ get: function () { return chunkWJ7QYVR2_cjs.getManagedCollections; }
44
+ });
45
+ Object.defineProperty(exports, "initLogger", {
46
+ enumerable: true,
47
+ get: function () { return chunkWJ7QYVR2_cjs.initLogger; }
48
+ });
49
+ Object.defineProperty(exports, "isCollectionManaged", {
50
+ enumerable: true,
51
+ get: function () { return chunkWJ7QYVR2_cjs.isCollectionManaged; }
52
+ });
53
+ Object.defineProperty(exports, "loadCollectionConfig", {
54
+ enumerable: true,
55
+ get: function () { return chunkWJ7QYVR2_cjs.loadCollectionConfig; }
56
+ });
57
+ Object.defineProperty(exports, "loadCollectionConfigs", {
58
+ enumerable: true,
59
+ get: function () { return chunkWJ7QYVR2_cjs.loadCollectionConfigs; }
60
+ });
61
+ Object.defineProperty(exports, "syncCollection", {
62
+ enumerable: true,
63
+ get: function () { return chunkWJ7QYVR2_cjs.syncCollection; }
64
+ });
65
+ Object.defineProperty(exports, "syncCollections", {
66
+ enumerable: true,
67
+ get: function () { return chunkWJ7QYVR2_cjs.syncCollections; }
68
+ });
69
+ Object.defineProperty(exports, "validateCollectionConfig", {
70
+ enumerable: true,
71
+ get: function () { return chunkWJ7QYVR2_cjs.validateCollectionConfig; }
72
+ });
9
73
  //# sourceMappingURL=services.cjs.map
10
74
  //# sourceMappingURL=services.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/services/index.ts"],"names":[],"mappings":";;;;;AAOO,IAAM,WAAA,GAAc","file":"services.cjs","sourcesContent":["/**\n * Services Module Exports\n *\n * Core business logic services for SonicJS\n */\n\n// Placeholder - will be populated in Phase 2 Week 2\nexport const placeholder = 'services'\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"services.cjs"}
@@ -1,8 +1,5 @@
1
- /**
2
- * Services Module Exports
3
- *
4
- * Core business logic services for SonicJS
5
- */
6
- declare const placeholder = "services";
7
-
8
- export { placeholder };
1
+ export { C as CorePlugin, p as LogCategory, q as LogEntry, r as LogFilter, o as LogLevel, L as Logger, m as Migration, M as MigrationService, n as MigrationStatus, k as PluginBootstrapService, P as PluginService, e as cleanupRemovedCollections, f as fullCollectionSync, g as getAvailableCollectionNames, h as getLogger, d as getManagedCollections, j as initLogger, i as isCollectionManaged, a as loadCollectionConfig, l as loadCollectionConfigs, c as syncCollection, b as syncCollections, v as validateCollectionConfig } from './index-D45jaIlr.cjs';
2
+ import './collection-config-FLlGtsh9.cjs';
3
+ import '@cloudflare/workers-types';
4
+ import 'drizzle-zod';
5
+ import 'drizzle-orm/sqlite-core';
@@ -1,8 +1,5 @@
1
- /**
2
- * Services Module Exports
3
- *
4
- * Core business logic services for SonicJS
5
- */
6
- declare const placeholder = "services";
7
-
8
- export { placeholder };
1
+ export { C as CorePlugin, p as LogCategory, q as LogEntry, r as LogFilter, o as LogLevel, L as Logger, m as Migration, M as MigrationService, n as MigrationStatus, k as PluginBootstrapService, P as PluginService, e as cleanupRemovedCollections, f as fullCollectionSync, g as getAvailableCollectionNames, h as getLogger, d as getManagedCollections, j as initLogger, i as isCollectionManaged, a as loadCollectionConfig, l as loadCollectionConfigs, c as syncCollection, b as syncCollections, v as validateCollectionConfig } from './index-BlsY5XNH.js';
2
+ import './collection-config-FLlGtsh9.js';
3
+ import '@cloudflare/workers-types';
4
+ import 'drizzle-zod';
5
+ import 'drizzle-orm/sqlite-core';
package/dist/services.js CHANGED
@@ -1,8 +1,5 @@
1
- import './chunk-PZ5AY32C.js';
2
-
3
- // src/services/index.ts
4
- var placeholder = "services";
5
-
6
- export { placeholder };
1
+ import './chunk-4URGXJP7.js';
2
+ export { Logger, MigrationService, PluginBootstrapService, PluginService, cleanupRemovedCollections, fullCollectionSync, getAvailableCollectionNames, getLogger, getManagedCollections, initLogger, isCollectionManaged, loadCollectionConfig, loadCollectionConfigs, syncCollection, syncCollections, validateCollectionConfig } from './chunk-CXZDAR6S.js';
3
+ import './chunk-G3PMV62Z.js';
7
4
  //# sourceMappingURL=services.js.map
8
5
  //# sourceMappingURL=services.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/services/index.ts"],"names":[],"mappings":";;;AAOO,IAAM,WAAA,GAAc","file":"services.js","sourcesContent":["/**\n * Services Module Exports\n *\n * Core business logic services for SonicJS\n */\n\n// Placeholder - will be populated in Phase 2 Week 2\nexport const placeholder = 'services'\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"services.js"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- require('./chunk-Q7SFCCGT.cjs');
3
+ require('./chunk-EMMSS5I5.cjs');
4
4
 
5
5
  // src/templates/index.ts
6
6
  var placeholder = "templates";
package/dist/templates.js CHANGED
@@ -1,4 +1,4 @@
1
- import './chunk-PZ5AY32C.js';
1
+ import './chunk-G3PMV62Z.js';
2
2
 
3
3
  // src/templates/index.ts
4
4
  var placeholder = "templates";
package/dist/types.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkKYGRJCZM_cjs = require('./chunk-KYGRJCZM.cjs');
4
- require('./chunk-Q7SFCCGT.cjs');
4
+ require('./chunk-EMMSS5I5.cjs');
5
5
 
6
6
 
7
7
 
package/dist/types.d.cts CHANGED
@@ -1,464 +1,8 @@
1
- import { Hono, MiddlewareHandler, Context } from 'hono';
2
- import { z } from 'zod';
3
- import { D1Database, KVNamespace, R2Bucket } from '@cloudflare/workers-types';
4
-
5
- /**
6
- * Collection Configuration Types
7
- *
8
- * These types define the structure for collection configuration files.
9
- * Collections can be defined in TypeScript/JSON files and synced to the database.
10
- */
11
- type FieldType = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'email' | 'url' | 'richtext' | 'markdown' | 'json' | 'array' | 'object' | 'reference' | 'media' | 'select' | 'multiselect' | 'checkbox' | 'radio' | 'textarea' | 'slug' | 'color' | 'file';
12
- interface FieldConfig {
13
- type: FieldType;
14
- title?: string;
15
- description?: string;
16
- required?: boolean;
17
- default?: any;
18
- placeholder?: string;
19
- helpText?: string;
20
- min?: number;
21
- max?: number;
22
- minLength?: number;
23
- maxLength?: number;
24
- pattern?: string;
25
- enum?: string[];
26
- enumLabels?: string[];
27
- collection?: string;
28
- items?: FieldConfig;
29
- properties?: Record<string, FieldConfig>;
30
- format?: string;
31
- widget?: string;
32
- dependsOn?: string;
33
- showWhen?: any;
34
- }
35
- interface CollectionSchema {
36
- type: 'object';
37
- properties: Record<string, FieldConfig>;
38
- required?: string[];
39
- }
40
- interface CollectionConfig {
41
- /**
42
- * Unique machine name for the collection (lowercase, underscores)
43
- * e.g., 'blog_posts', 'products', 'team_members'
44
- */
45
- name: string;
46
- /**
47
- * Human-readable display name
48
- * e.g., 'Blog Posts', 'Products', 'Team Members'
49
- */
50
- displayName: string;
51
- /**
52
- * Optional description of the collection
53
- */
54
- description?: string;
55
- /**
56
- * JSON schema definition for the collection's content structure
57
- */
58
- schema: CollectionSchema;
59
- /**
60
- * If true, this collection is managed by config files and cannot be edited in the UI
61
- * Default: true for config-based collections
62
- */
63
- managed?: boolean;
64
- /**
65
- * If true, the collection is active and available for use
66
- * Default: true
67
- */
68
- isActive?: boolean;
69
- /**
70
- * Optional icon name for the collection (used in admin UI)
71
- */
72
- icon?: string;
73
- /**
74
- * Optional color for the collection (hex code)
75
- */
76
- color?: string;
77
- /**
78
- * Optional default sort field
79
- */
80
- defaultSort?: string;
81
- /**
82
- * Optional default sort order
83
- */
84
- defaultSortOrder?: 'asc' | 'desc';
85
- /**
86
- * Optional fields to show in list view
87
- */
88
- listFields?: string[];
89
- /**
90
- * Optional search fields
91
- */
92
- searchFields?: string[];
93
- /**
94
- * Optional metadata
95
- */
96
- metadata?: Record<string, any>;
97
- }
98
- interface CollectionConfigModule {
99
- default: CollectionConfig;
100
- }
101
- /**
102
- * Result of syncing a collection
103
- */
104
- interface CollectionSyncResult {
105
- name: string;
106
- status: 'created' | 'updated' | 'unchanged' | 'error';
107
- message?: string;
108
- error?: string;
109
- }
110
-
111
- /**
112
- * SonicJS Plugin System Types
113
- *
114
- * Defines the core interfaces and types for the plugin system
115
- */
116
-
117
- interface Plugin {
118
- /** Unique plugin identifier */
119
- name: string;
120
- /** Plugin version (semantic versioning) */
121
- version: string;
122
- /** Human-readable description */
123
- description?: string;
124
- /** Plugin author information */
125
- author?: {
126
- name: string;
127
- email?: string;
128
- url?: string;
129
- };
130
- /** Plugin dependencies (other plugins required) */
131
- dependencies?: string[];
132
- /** SonicJS version compatibility */
133
- compatibility?: string;
134
- /** Plugin license */
135
- license?: string;
136
- routes?: PluginRoutes[];
137
- middleware?: PluginMiddleware[];
138
- models?: PluginModel[];
139
- services?: PluginService[];
140
- adminPages?: PluginAdminPage[];
141
- adminComponents?: PluginComponent[];
142
- menuItems?: PluginMenuItem[];
143
- hooks?: PluginHook[];
144
- install?: (context: PluginContext) => Promise<void>;
145
- uninstall?: (context: PluginContext) => Promise<void>;
146
- activate?: (context: PluginContext) => Promise<void>;
147
- deactivate?: (context: PluginContext) => Promise<void>;
148
- configure?: (config: PluginConfig) => Promise<void>;
149
- }
150
- interface PluginContext {
151
- /** Database instance */
152
- db: D1Database;
153
- /** Key-value storage */
154
- kv: KVNamespace;
155
- /** R2 storage bucket */
156
- r2?: R2Bucket;
157
- /** Plugin configuration */
158
- config: PluginConfig;
159
- /** Core SonicJS services */
160
- services: {
161
- auth: AuthService;
162
- content: ContentService;
163
- media: MediaService;
164
- };
165
- /** Hook system for inter-plugin communication */
166
- hooks: HookSystem | ScopedHookSystem;
167
- /** Logging utilities */
168
- logger: PluginLogger;
169
- }
170
- interface PluginConfig {
171
- /** Plugin-specific configuration */
172
- [key: string]: any;
173
- /** Whether plugin is enabled */
174
- enabled: boolean;
175
- /** Plugin installation timestamp */
176
- installedAt?: number;
177
- /** Plugin last update timestamp */
178
- updatedAt?: number;
179
- }
180
- interface PluginRoutes {
181
- /** Route path prefix */
182
- path: string;
183
- /** Hono route handler */
184
- handler: Hono;
185
- /** Route description */
186
- description?: string;
187
- /** Whether route requires authentication */
188
- requiresAuth?: boolean;
189
- /** Required roles for access */
190
- roles?: string[];
191
- /** Route priority (for ordering) */
192
- priority?: number;
193
- }
194
- interface PluginMiddleware {
195
- /** Middleware name */
196
- name: string;
197
- /** Middleware handler function */
198
- handler: MiddlewareHandler;
199
- /** Middleware description */
200
- description?: string;
201
- /** Middleware priority (lower = earlier) */
202
- priority?: number;
203
- /** Routes to apply middleware to */
204
- routes?: string[];
205
- /** Whether to apply globally */
206
- global?: boolean;
207
- }
208
- interface PluginModel {
209
- /** Model name */
210
- name: string;
211
- /** Database table name */
212
- tableName: string;
213
- /** Zod schema for validation */
214
- schema: z.ZodSchema;
215
- /** Database migrations */
216
- migrations: string[];
217
- /** Model relationships */
218
- relationships?: ModelRelationship[];
219
- /** Whether model extends core content */
220
- extendsContent?: boolean;
221
- }
222
- interface ModelRelationship {
223
- type: 'oneToOne' | 'oneToMany' | 'manyToMany';
224
- target: string;
225
- foreignKey?: string;
226
- joinTable?: string;
227
- }
228
- interface PluginService {
229
- /** Service name */
230
- name: string;
231
- /** Service implementation */
232
- implementation: any;
233
- /** Service description */
234
- description?: string;
235
- /** Service dependencies */
236
- dependencies?: string[];
237
- /** Whether service is singleton */
238
- singleton?: boolean;
239
- }
240
- interface PluginAdminPage {
241
- /** Page path (relative to /admin) */
242
- path: string;
243
- /** Page title */
244
- title: string;
245
- /** Page component/template */
246
- component: string;
247
- /** Page description */
248
- description?: string;
249
- /** Required permissions */
250
- permissions?: string[];
251
- /** Menu item configuration */
252
- menuItem?: PluginMenuItem;
253
- /** Page icon */
254
- icon?: string;
255
- }
256
- interface PluginComponent {
257
- /** Component name */
258
- name: string;
259
- /** Component template function */
260
- template: (props: any) => string;
261
- /** Component description */
262
- description?: string;
263
- /** Component props schema */
264
- propsSchema?: z.ZodSchema;
265
- }
266
- interface PluginMenuItem {
267
- /** Menu item label */
268
- label: string;
269
- /** Menu item path */
270
- path: string;
271
- /** Menu item icon */
272
- icon?: string;
273
- /** Menu item order */
274
- order?: number;
275
- /** Parent menu item */
276
- parent?: string;
277
- /** Required permissions */
278
- permissions?: string[];
279
- /** Whether item is active */
280
- active?: boolean;
281
- }
282
- interface PluginHook {
283
- /** Hook name */
284
- name: string;
285
- /** Hook handler function */
286
- handler: HookHandler;
287
- /** Hook priority */
288
- priority?: number;
289
- /** Hook description */
290
- description?: string;
291
- }
292
- type HookHandler = (data: any, context: HookContext) => Promise<any>;
293
- interface HookContext {
294
- /** Plugin that registered the hook */
295
- plugin: string;
296
- /** Hook execution context */
297
- context: PluginContext;
298
- /** Cancel hook execution */
299
- cancel?: () => void;
300
- }
301
- interface HookSystem {
302
- /** Register a hook handler */
303
- register(hookName: string, handler: HookHandler, priority?: number): void;
304
- /** Execute all handlers for a hook */
305
- execute(hookName: string, data: any, context?: any): Promise<any>;
306
- /** Remove a hook handler */
307
- unregister(hookName: string, handler: HookHandler): void;
308
- /** Get all registered hooks */
309
- getHooks(hookName: string): PluginHook[];
310
- /** Create a scoped hook system (optional) */
311
- createScope?(pluginName: string): ScopedHookSystem;
312
- }
313
- interface ScopedHookSystem {
314
- /** Register a hook handler */
315
- register(hookName: string, handler: HookHandler, priority?: number): void;
316
- /** Execute all handlers for a hook */
317
- execute(hookName: string, data: any, context?: any): Promise<any>;
318
- /** Remove a hook handler */
319
- unregister(hookName: string, handler: HookHandler): void;
320
- /** Remove all hooks for this scope */
321
- unregisterAll(): void;
322
- }
323
- interface PluginRegistry {
324
- /** Get plugin by name */
325
- get(name: string): Plugin | undefined;
326
- /** Get all registered plugins */
327
- getAll(): Plugin[];
328
- /** Get active plugins */
329
- getActive(): Plugin[];
330
- /** Register a plugin */
331
- register(plugin: Plugin): Promise<void>;
332
- /** Unregister a plugin */
333
- unregister(name: string): Promise<void>;
334
- /** Check if plugin is registered */
335
- has(name: string): boolean;
336
- /** Activate a plugin */
337
- activate(name: string): Promise<void>;
338
- /** Deactivate a plugin */
339
- deactivate(name: string): Promise<void>;
340
- /** Get plugin configuration */
341
- getConfig(name: string): PluginConfig | undefined;
342
- /** Set plugin configuration */
343
- setConfig(name: string, config: PluginConfig): void;
344
- /** Get plugin status */
345
- getStatus(name: string): PluginStatus | undefined;
346
- /** Get all plugin statuses */
347
- getAllStatuses(): Map<string, PluginStatus>;
348
- /** Resolve plugin load order based on dependencies */
349
- resolveLoadOrder(): string[];
350
- }
351
- interface PluginManager {
352
- /** Plugin registry */
353
- registry: PluginRegistry;
354
- /** Hook system */
355
- hooks: HookSystem;
356
- /** Initialize plugin system */
357
- initialize(context: PluginContext): Promise<void>;
358
- /** Load plugins from configuration */
359
- loadPlugins(config: PluginConfig[]): Promise<void>;
360
- /** Install a plugin */
361
- install(plugin: Plugin, config?: PluginConfig): Promise<void>;
362
- /** Uninstall a plugin */
363
- uninstall(name: string): Promise<void>;
364
- /** Get plugin status */
365
- getStatus(name: string): PluginStatus;
366
- }
367
- interface PluginStatus {
368
- name: string;
369
- version: string;
370
- active: boolean;
371
- installed: boolean;
372
- hasErrors: boolean;
373
- errors?: string[];
374
- lastError?: string;
375
- }
376
- interface AuthService {
377
- /** Verify user permissions */
378
- hasPermission(userId: string, permission: string): Promise<boolean>;
379
- /** Get current user */
380
- getCurrentUser(context: Context): Promise<any>;
381
- /** Create authentication middleware */
382
- createMiddleware(options?: any): MiddlewareHandler;
383
- }
384
- interface ContentService {
385
- /** Get content by ID */
386
- getById(id: string): Promise<any>;
387
- /** Create new content */
388
- create(data: any): Promise<any>;
389
- /** Update content */
390
- update(id: string, data: any): Promise<any>;
391
- /** Delete content */
392
- delete(id: string): Promise<void>;
393
- /** Search content */
394
- search(query: string, options?: any): Promise<any[]>;
395
- }
396
- interface MediaService {
397
- /** Upload file */
398
- upload(file: File, options?: any): Promise<any>;
399
- /** Get media by ID */
400
- getById(id: string): Promise<any>;
401
- /** Delete media */
402
- delete(id: string): Promise<void>;
403
- /** Transform image */
404
- transform(id: string, options: any): Promise<string>;
405
- }
406
- interface PluginLogger {
407
- debug(message: string, data?: any): void;
408
- info(message: string, data?: any): void;
409
- warn(message: string, data?: any): void;
410
- error(message: string, error?: Error, data?: any): void;
411
- }
412
- interface PluginBuilderOptions {
413
- name: string;
414
- version: string;
415
- description?: string;
416
- author?: Plugin['author'];
417
- dependencies?: string[];
418
- }
419
- interface PluginValidator {
420
- /** Validate plugin definition */
421
- validate(plugin: Plugin): PluginValidationResult;
422
- /** Validate plugin dependencies */
423
- validateDependencies(plugin: Plugin, registry: PluginRegistry): PluginValidationResult;
424
- /** Validate plugin compatibility */
425
- validateCompatibility(plugin: Plugin, version: string): PluginValidationResult;
426
- }
427
- interface PluginValidationResult {
428
- valid: boolean;
429
- errors: string[];
430
- warnings: string[];
431
- }
432
- declare const HOOKS: {
433
- readonly APP_INIT: "app:init";
434
- readonly APP_READY: "app:ready";
435
- readonly APP_SHUTDOWN: "app:shutdown";
436
- readonly REQUEST_START: "request:start";
437
- readonly REQUEST_END: "request:end";
438
- readonly REQUEST_ERROR: "request:error";
439
- readonly AUTH_LOGIN: "auth:login";
440
- readonly AUTH_LOGOUT: "auth:logout";
441
- readonly AUTH_REGISTER: "auth:register";
442
- readonly USER_LOGIN: "user:login";
443
- readonly USER_LOGOUT: "user:logout";
444
- readonly CONTENT_CREATE: "content:create";
445
- readonly CONTENT_UPDATE: "content:update";
446
- readonly CONTENT_DELETE: "content:delete";
447
- readonly CONTENT_PUBLISH: "content:publish";
448
- readonly CONTENT_SAVE: "content:save";
449
- readonly MEDIA_UPLOAD: "media:upload";
450
- readonly MEDIA_DELETE: "media:delete";
451
- readonly MEDIA_TRANSFORM: "media:transform";
452
- readonly PLUGIN_INSTALL: "plugin:install";
453
- readonly PLUGIN_UNINSTALL: "plugin:uninstall";
454
- readonly PLUGIN_ACTIVATE: "plugin:activate";
455
- readonly PLUGIN_DEACTIVATE: "plugin:deactivate";
456
- readonly ADMIN_MENU_RENDER: "admin:menu:render";
457
- readonly ADMIN_PAGE_RENDER: "admin:page:render";
458
- readonly DB_MIGRATE: "db:migrate";
459
- readonly DB_SEED: "db:seed";
460
- };
461
- type HookName = typeof HOOKS[keyof typeof HOOKS];
1
+ export { b as CollectionConfig, c as CollectionConfigModule, C as CollectionSchema, d as CollectionSyncResult, a as FieldConfig, F as FieldType } from './collection-config-FLlGtsh9.cjs';
2
+ export { A as AuthService, C as ContentService, u as HOOKS, k as HookContext, H as HookHandler, t as HookName, l as HookSystem, M as MediaService, v as ModelRelationship, P as Plugin, g as PluginAdminPage, q as PluginBuilderOptions, h as PluginComponent, b as PluginConfig, a as PluginContext, j as PluginHook, p as PluginLogger, n as PluginManager, i as PluginMenuItem, d as PluginMiddleware, e as PluginModel, m as PluginRegistry, c as PluginRoutes, f as PluginService, o as PluginStatus, s as PluginValidationResult, r as PluginValidator, S as ScopedHookSystem } from './plugin-UzmDImQc.cjs';
3
+ import 'hono';
4
+ import 'zod';
5
+ import '@cloudflare/workers-types';
462
6
 
463
7
  /**
464
8
  * Plugin Manifest Types
@@ -494,4 +38,4 @@ interface PluginManifest {
494
38
  };
495
39
  }
496
40
 
497
- export { type AuthService, type CollectionConfig, type CollectionConfigModule, type CollectionSchema, type CollectionSyncResult, type ContentService, type FieldConfig, type FieldType, HOOKS, type HookContext, type HookHandler, type HookName, type HookSystem, type MediaService, type ModelRelationship, type Plugin, type PluginAdminPage, type PluginBuilderOptions, type PluginComponent, type PluginConfig, type PluginContext, type PluginHook, type PluginLogger, type PluginManager, type PluginManifest, type PluginMenuItem, type PluginMiddleware, type PluginModel, type PluginRegistry, type PluginRoutes, type PluginService, type PluginStatus, type PluginValidationResult, type PluginValidator, type ScopedHookSystem };
41
+ export type { PluginManifest };