@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.
- package/README.md +268 -166
- package/dist/chunk-3MNMOLSA.js +133 -0
- package/dist/chunk-3MNMOLSA.js.map +1 -0
- package/dist/chunk-4USDL3UP.cjs +15565 -0
- package/dist/chunk-4USDL3UP.cjs.map +1 -0
- 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-L3NXO7Y4.cjs → chunk-FVMV5DKA.cjs} +49 -49
- package/dist/{chunk-L3NXO7Y4.cjs.map → chunk-FVMV5DKA.cjs.map} +1 -1
- package/dist/chunk-GGBHOIDD.js +15552 -0
- package/dist/chunk-GGBHOIDD.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-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 +105 -92
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +23 -23
- package/dist/middleware.js +3 -3
- package/dist/plugins.cjs +8 -8
- package/dist/plugins.js +2 -2
- package/dist/routes.cjs +51 -3
- package/dist/routes.js +6 -2
- package/dist/services.cjs +31 -19
- package/dist/services.js +3 -3
- package/dist/templates.cjs +1 -1
- package/dist/templates.js +1 -1
- package/dist/types.cjs +1 -1
- package/dist/types.js +1 -1
- package/dist/utils.cjs +1 -1
- 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 +24 -24
- 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-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/index.d.ts +0 -136
- package/dist/middleware.d.cts +0 -206
- package/dist/middleware.d.ts +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/plugins.d.ts +0 -330
- package/dist/routes.d.cts +0 -17
- package/dist/routes.d.ts +0 -17
- package/dist/services.d.cts +0 -5
- package/dist/services.d.ts +0 -5
- package/dist/templates.d.cts +0 -140
- package/dist/templates.d.ts +0 -140
- package/dist/types.d.cts +0 -41
- package/dist/types.d.ts +0 -41
- package/dist/utils.d.cts +0 -184
- package/dist/utils.d.ts +0 -184
package/dist/plugins.d.ts
DELETED
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
import { l as HookSystem, H as HookHandler, j as PluginHook, r as PluginValidator$1, P as Plugin, s as PluginValidationResult, m as PluginRegistry, b as PluginConfig, o as PluginStatus, n as PluginManager$1, a as PluginContext } from './plugin-UzmDImQc.js';
|
|
2
|
-
import { Hono } from 'hono';
|
|
3
|
-
import 'zod';
|
|
4
|
-
import '@cloudflare/workers-types';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Hook System Implementation
|
|
8
|
-
*
|
|
9
|
-
* Provides event-driven extensibility for plugins
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
declare class HookSystemImpl implements HookSystem {
|
|
13
|
-
private hooks;
|
|
14
|
-
private executing;
|
|
15
|
-
/**
|
|
16
|
-
* Register a hook handler
|
|
17
|
-
*/
|
|
18
|
-
register(hookName: string, handler: HookHandler, priority?: number): void;
|
|
19
|
-
/**
|
|
20
|
-
* Execute all handlers for a hook
|
|
21
|
-
*/
|
|
22
|
-
execute(hookName: string, data: any, context?: any): Promise<any>;
|
|
23
|
-
/**
|
|
24
|
-
* Remove a hook handler
|
|
25
|
-
*/
|
|
26
|
-
unregister(hookName: string, handler: HookHandler): void;
|
|
27
|
-
/**
|
|
28
|
-
* Get all registered hooks for a name
|
|
29
|
-
*/
|
|
30
|
-
getHooks(hookName: string): PluginHook[];
|
|
31
|
-
/**
|
|
32
|
-
* Get all registered hook names
|
|
33
|
-
*/
|
|
34
|
-
getHookNames(): string[];
|
|
35
|
-
/**
|
|
36
|
-
* Get hook statistics
|
|
37
|
-
*/
|
|
38
|
-
getStats(): {
|
|
39
|
-
hookName: string;
|
|
40
|
-
handlerCount: number;
|
|
41
|
-
}[];
|
|
42
|
-
/**
|
|
43
|
-
* Clear all hooks (useful for testing)
|
|
44
|
-
*/
|
|
45
|
-
clear(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Create a scoped hook system for a plugin
|
|
48
|
-
*/
|
|
49
|
-
createScope(_pluginName: string): ScopedHookSystem;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Scoped hook system for individual plugins
|
|
53
|
-
*/
|
|
54
|
-
declare class ScopedHookSystem {
|
|
55
|
-
private parent;
|
|
56
|
-
private registeredHooks;
|
|
57
|
-
constructor(parent: HookSystemImpl);
|
|
58
|
-
/**
|
|
59
|
-
* Register a hook (scoped to this plugin)
|
|
60
|
-
*/
|
|
61
|
-
register(hookName: string, handler: HookHandler, priority?: number): void;
|
|
62
|
-
/**
|
|
63
|
-
* Execute a hook
|
|
64
|
-
*/
|
|
65
|
-
execute(hookName: string, data: any, context?: any): Promise<any>;
|
|
66
|
-
/**
|
|
67
|
-
* Unregister a specific hook
|
|
68
|
-
*/
|
|
69
|
-
unregister(hookName: string, handler: HookHandler): void;
|
|
70
|
-
/**
|
|
71
|
-
* Unregister all hooks for this plugin
|
|
72
|
-
*/
|
|
73
|
-
unregisterAll(): void;
|
|
74
|
-
/**
|
|
75
|
-
* Get hooks registered by this plugin
|
|
76
|
-
*/
|
|
77
|
-
getRegisteredHooks(): {
|
|
78
|
-
hookName: string;
|
|
79
|
-
handler: HookHandler;
|
|
80
|
-
}[];
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Hook utilities
|
|
84
|
-
*/
|
|
85
|
-
declare class HookUtils {
|
|
86
|
-
/**
|
|
87
|
-
* Create a hook name with namespace
|
|
88
|
-
*/
|
|
89
|
-
static createHookName(namespace: string, event: string): string;
|
|
90
|
-
/**
|
|
91
|
-
* Parse a hook name to extract namespace and event
|
|
92
|
-
*/
|
|
93
|
-
static parseHookName(hookName: string): {
|
|
94
|
-
namespace: string;
|
|
95
|
-
event: string;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* Create a middleware that executes hooks
|
|
99
|
-
*/
|
|
100
|
-
static createHookMiddleware(hookSystem: HookSystem, beforeHook?: string, afterHook?: string): (c: any, next: any) => Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Create a debounced hook handler
|
|
103
|
-
*/
|
|
104
|
-
static debounce(handler: HookHandler, delay: number): HookHandler;
|
|
105
|
-
/**
|
|
106
|
-
* Create a throttled hook handler
|
|
107
|
-
*/
|
|
108
|
-
static throttle(handler: HookHandler, limit: number): HookHandler;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Plugin Validator
|
|
113
|
-
*
|
|
114
|
-
* Validates plugin definitions, dependencies, and compatibility
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
declare class PluginValidator implements PluginValidator$1 {
|
|
118
|
-
private static readonly RESERVED_NAMES;
|
|
119
|
-
private static readonly RESERVED_PATHS;
|
|
120
|
-
/**
|
|
121
|
-
* Validate plugin definition
|
|
122
|
-
*/
|
|
123
|
-
validate(plugin: Plugin): PluginValidationResult;
|
|
124
|
-
/**
|
|
125
|
-
* Validate plugin dependencies
|
|
126
|
-
*/
|
|
127
|
-
validateDependencies(plugin: Plugin, registry: PluginRegistry): PluginValidationResult;
|
|
128
|
-
/**
|
|
129
|
-
* Validate plugin compatibility with SonicJS version
|
|
130
|
-
*/
|
|
131
|
-
validateCompatibility(plugin: Plugin, sonicVersion: string): PluginValidationResult;
|
|
132
|
-
/**
|
|
133
|
-
* Check if two version ranges are compatible
|
|
134
|
-
*/
|
|
135
|
-
private isCompatible;
|
|
136
|
-
/**
|
|
137
|
-
* Validate plugin security constraints
|
|
138
|
-
*/
|
|
139
|
-
validateSecurity(plugin: Plugin): PluginValidationResult;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Plugin Registry Implementation
|
|
144
|
-
*
|
|
145
|
-
* Manages plugin registration, activation, and lifecycle
|
|
146
|
-
*/
|
|
147
|
-
|
|
148
|
-
declare class PluginRegistryImpl implements PluginRegistry {
|
|
149
|
-
private plugins;
|
|
150
|
-
private configs;
|
|
151
|
-
private statuses;
|
|
152
|
-
private validator;
|
|
153
|
-
constructor(validator?: PluginValidator);
|
|
154
|
-
/**
|
|
155
|
-
* Get plugin by name
|
|
156
|
-
*/
|
|
157
|
-
get(name: string): Plugin | undefined;
|
|
158
|
-
/**
|
|
159
|
-
* Get all registered plugins
|
|
160
|
-
*/
|
|
161
|
-
getAll(): Plugin[];
|
|
162
|
-
/**
|
|
163
|
-
* Get active plugins
|
|
164
|
-
*/
|
|
165
|
-
getActive(): Plugin[];
|
|
166
|
-
/**
|
|
167
|
-
* Register a plugin
|
|
168
|
-
*/
|
|
169
|
-
register(plugin: Plugin): Promise<void>;
|
|
170
|
-
/**
|
|
171
|
-
* Unregister a plugin
|
|
172
|
-
*/
|
|
173
|
-
unregister(name: string): Promise<void>;
|
|
174
|
-
/**
|
|
175
|
-
* Check if plugin is registered
|
|
176
|
-
*/
|
|
177
|
-
has(name: string): boolean;
|
|
178
|
-
/**
|
|
179
|
-
* Activate a plugin
|
|
180
|
-
*/
|
|
181
|
-
activate(name: string): Promise<void>;
|
|
182
|
-
/**
|
|
183
|
-
* Deactivate a plugin
|
|
184
|
-
*/
|
|
185
|
-
deactivate(name: string): Promise<void>;
|
|
186
|
-
/**
|
|
187
|
-
* Get plugin configuration
|
|
188
|
-
*/
|
|
189
|
-
getConfig(name: string): PluginConfig | undefined;
|
|
190
|
-
/**
|
|
191
|
-
* Set plugin configuration
|
|
192
|
-
*/
|
|
193
|
-
setConfig(name: string, config: PluginConfig): void;
|
|
194
|
-
/**
|
|
195
|
-
* Get plugin status
|
|
196
|
-
*/
|
|
197
|
-
getStatus(name: string): PluginStatus | undefined;
|
|
198
|
-
/**
|
|
199
|
-
* Get all plugin statuses
|
|
200
|
-
*/
|
|
201
|
-
getAllStatuses(): Map<string, PluginStatus>;
|
|
202
|
-
/**
|
|
203
|
-
* Update plugin status
|
|
204
|
-
*/
|
|
205
|
-
private updateStatus;
|
|
206
|
-
/**
|
|
207
|
-
* Get plugins that depend on the specified plugin
|
|
208
|
-
*/
|
|
209
|
-
private getDependents;
|
|
210
|
-
/**
|
|
211
|
-
* Get dependency graph
|
|
212
|
-
*/
|
|
213
|
-
getDependencyGraph(): Map<string, string[]>;
|
|
214
|
-
/**
|
|
215
|
-
* Resolve plugin load order based on dependencies
|
|
216
|
-
*/
|
|
217
|
-
resolveLoadOrder(): string[];
|
|
218
|
-
/**
|
|
219
|
-
* Export plugin configuration
|
|
220
|
-
*/
|
|
221
|
-
exportConfig(): {
|
|
222
|
-
plugins: PluginConfig[];
|
|
223
|
-
};
|
|
224
|
-
/**
|
|
225
|
-
* Import plugin configuration
|
|
226
|
-
*/
|
|
227
|
-
importConfig(config: {
|
|
228
|
-
plugins: PluginConfig[];
|
|
229
|
-
}): void;
|
|
230
|
-
/**
|
|
231
|
-
* Clear all plugins (useful for testing)
|
|
232
|
-
*/
|
|
233
|
-
clear(): void;
|
|
234
|
-
/**
|
|
235
|
-
* Get registry statistics
|
|
236
|
-
*/
|
|
237
|
-
getStats(): {
|
|
238
|
-
total: number;
|
|
239
|
-
active: number;
|
|
240
|
-
inactive: number;
|
|
241
|
-
withErrors: number;
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Plugin Manager
|
|
247
|
-
*
|
|
248
|
-
* Central orchestrator for the plugin system
|
|
249
|
-
*/
|
|
250
|
-
|
|
251
|
-
declare class PluginManager implements PluginManager$1 {
|
|
252
|
-
readonly registry: PluginRegistry;
|
|
253
|
-
readonly hooks: HookSystem;
|
|
254
|
-
private validator;
|
|
255
|
-
private context?;
|
|
256
|
-
private scopedHooks;
|
|
257
|
-
private pluginRoutes;
|
|
258
|
-
constructor();
|
|
259
|
-
/**
|
|
260
|
-
* Initialize plugin system
|
|
261
|
-
*/
|
|
262
|
-
initialize(context: PluginContext): Promise<void>;
|
|
263
|
-
/**
|
|
264
|
-
* Load plugins from configuration
|
|
265
|
-
*/
|
|
266
|
-
loadPlugins(configs: PluginConfig[]): Promise<void>;
|
|
267
|
-
/**
|
|
268
|
-
* Install a plugin
|
|
269
|
-
*/
|
|
270
|
-
install(plugin: Plugin, config?: PluginConfig): Promise<void>;
|
|
271
|
-
/**
|
|
272
|
-
* Uninstall a plugin
|
|
273
|
-
*/
|
|
274
|
-
uninstall(name: string): Promise<void>;
|
|
275
|
-
/**
|
|
276
|
-
* Get plugin status
|
|
277
|
-
*/
|
|
278
|
-
getStatus(name: string): PluginStatus;
|
|
279
|
-
/**
|
|
280
|
-
* Get all plugin statuses
|
|
281
|
-
*/
|
|
282
|
-
getAllStatuses(): PluginStatus[];
|
|
283
|
-
/**
|
|
284
|
-
* Register plugin extensions (routes, middleware, etc.)
|
|
285
|
-
*/
|
|
286
|
-
private registerPluginExtensions;
|
|
287
|
-
/**
|
|
288
|
-
* Unregister plugin extensions
|
|
289
|
-
*/
|
|
290
|
-
private unregisterPluginExtensions;
|
|
291
|
-
/**
|
|
292
|
-
* Update plugin status
|
|
293
|
-
*/
|
|
294
|
-
private updatePluginStatus;
|
|
295
|
-
/**
|
|
296
|
-
* Create a logger for a plugin
|
|
297
|
-
*/
|
|
298
|
-
private createLogger;
|
|
299
|
-
/**
|
|
300
|
-
* Get plugin routes for mounting in main app
|
|
301
|
-
*/
|
|
302
|
-
getPluginRoutes(): Map<string, Hono>;
|
|
303
|
-
/**
|
|
304
|
-
* Get plugin middleware for main app
|
|
305
|
-
*/
|
|
306
|
-
getPluginMiddleware(): Array<{
|
|
307
|
-
name: string;
|
|
308
|
-
handler: any;
|
|
309
|
-
priority: number;
|
|
310
|
-
global: boolean;
|
|
311
|
-
}>;
|
|
312
|
-
/**
|
|
313
|
-
* Execute shutdown procedures
|
|
314
|
-
*/
|
|
315
|
-
shutdown(): Promise<void>;
|
|
316
|
-
/**
|
|
317
|
-
* Get plugin system statistics
|
|
318
|
-
*/
|
|
319
|
-
getStats(): {
|
|
320
|
-
registry: ReturnType<PluginRegistryImpl['getStats']>;
|
|
321
|
-
hooks: Array<{
|
|
322
|
-
hookName: string;
|
|
323
|
-
handlerCount: number;
|
|
324
|
-
}>;
|
|
325
|
-
routes: number;
|
|
326
|
-
middleware: number;
|
|
327
|
-
};
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export { HookSystemImpl, HookUtils, PluginManager, PluginRegistryImpl, PluginValidator, ScopedHookSystem };
|
package/dist/routes.d.cts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Routes Module Exports
|
|
3
|
-
*
|
|
4
|
-
* Note: HTTP routes are application-specific and should be implemented
|
|
5
|
-
* in the consuming application rather than in the core package.
|
|
6
|
-
*
|
|
7
|
-
* The core package provides the building blocks (middleware, services, types)
|
|
8
|
-
* but each application should define its own routes based on its specific needs.
|
|
9
|
-
*
|
|
10
|
-
* For reference implementations, see the main SonicJS repository.
|
|
11
|
-
*/
|
|
12
|
-
declare const ROUTES_INFO: {
|
|
13
|
-
readonly message: "Routes are application-specific - implement in your application";
|
|
14
|
-
readonly reference: "https://github.com/sonicjs/sonicjs";
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { ROUTES_INFO };
|
package/dist/routes.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Routes Module Exports
|
|
3
|
-
*
|
|
4
|
-
* Note: HTTP routes are application-specific and should be implemented
|
|
5
|
-
* in the consuming application rather than in the core package.
|
|
6
|
-
*
|
|
7
|
-
* The core package provides the building blocks (middleware, services, types)
|
|
8
|
-
* but each application should define its own routes based on its specific needs.
|
|
9
|
-
*
|
|
10
|
-
* For reference implementations, see the main SonicJS repository.
|
|
11
|
-
*/
|
|
12
|
-
declare const ROUTES_INFO: {
|
|
13
|
-
readonly message: "Routes are application-specific - implement in your application";
|
|
14
|
-
readonly reference: "https://github.com/sonicjs/sonicjs";
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export { ROUTES_INFO };
|
package/dist/services.d.cts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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';
|
package/dist/services.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
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/templates.d.cts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
interface FormField {
|
|
2
|
-
name: string;
|
|
3
|
-
label: string;
|
|
4
|
-
type: 'text' | 'email' | 'textarea' | 'select' | 'checkbox' | 'rich_text' | 'number' | 'date' | 'multi_select' | 'file';
|
|
5
|
-
value?: any;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
readonly?: boolean;
|
|
9
|
-
helpText?: string;
|
|
10
|
-
options?: Array<{
|
|
11
|
-
value: string;
|
|
12
|
-
label: string;
|
|
13
|
-
selected?: boolean;
|
|
14
|
-
}>;
|
|
15
|
-
rows?: number;
|
|
16
|
-
className?: string;
|
|
17
|
-
validation?: {
|
|
18
|
-
min?: number;
|
|
19
|
-
max?: number;
|
|
20
|
-
pattern?: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
interface FormData {
|
|
24
|
-
id?: string;
|
|
25
|
-
action?: string;
|
|
26
|
-
method?: string;
|
|
27
|
-
hxPost?: string;
|
|
28
|
-
hxPut?: string;
|
|
29
|
-
hxTarget?: string;
|
|
30
|
-
fields: FormField[];
|
|
31
|
-
submitButtons: Array<{
|
|
32
|
-
label: string;
|
|
33
|
-
type?: 'submit' | 'button';
|
|
34
|
-
value?: string;
|
|
35
|
-
name?: string;
|
|
36
|
-
className?: string;
|
|
37
|
-
onclick?: string;
|
|
38
|
-
}>;
|
|
39
|
-
title?: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
className?: string;
|
|
42
|
-
}
|
|
43
|
-
declare function renderForm(data: FormData): string;
|
|
44
|
-
declare function renderFormField(field: FormField): string;
|
|
45
|
-
|
|
46
|
-
interface TableColumn {
|
|
47
|
-
key: string;
|
|
48
|
-
label: string;
|
|
49
|
-
sortable?: boolean;
|
|
50
|
-
className?: string;
|
|
51
|
-
sortType?: 'string' | 'number' | 'date' | 'boolean';
|
|
52
|
-
render?: (value: any, row: any) => string;
|
|
53
|
-
}
|
|
54
|
-
interface TableData<T = any> {
|
|
55
|
-
columns: TableColumn[];
|
|
56
|
-
rows: T[];
|
|
57
|
-
selectable?: boolean;
|
|
58
|
-
className?: string;
|
|
59
|
-
emptyMessage?: string;
|
|
60
|
-
tableId?: string;
|
|
61
|
-
title?: string;
|
|
62
|
-
rowClickable?: boolean;
|
|
63
|
-
rowClickUrl?: (row: T) => string;
|
|
64
|
-
}
|
|
65
|
-
declare function renderTable<T = any>(data: TableData<T>): string;
|
|
66
|
-
|
|
67
|
-
interface PaginationData {
|
|
68
|
-
currentPage: number;
|
|
69
|
-
totalPages: number;
|
|
70
|
-
totalItems: number;
|
|
71
|
-
itemsPerPage: number;
|
|
72
|
-
startItem: number;
|
|
73
|
-
endItem: number;
|
|
74
|
-
baseUrl: string;
|
|
75
|
-
queryParams?: Record<string, string>;
|
|
76
|
-
showPageNumbers?: boolean;
|
|
77
|
-
maxPageNumbers?: number;
|
|
78
|
-
showPageSizeSelector?: boolean;
|
|
79
|
-
pageSizeOptions?: number[];
|
|
80
|
-
}
|
|
81
|
-
declare function renderPagination(data: PaginationData): string;
|
|
82
|
-
|
|
83
|
-
type AlertType = 'success' | 'error' | 'warning' | 'info';
|
|
84
|
-
interface AlertData {
|
|
85
|
-
type: AlertType;
|
|
86
|
-
title?: string;
|
|
87
|
-
message: string;
|
|
88
|
-
dismissible?: boolean;
|
|
89
|
-
className?: string;
|
|
90
|
-
icon?: boolean;
|
|
91
|
-
}
|
|
92
|
-
declare function renderAlert(data: AlertData): string;
|
|
93
|
-
|
|
94
|
-
interface ConfirmationDialogOptions {
|
|
95
|
-
id: string;
|
|
96
|
-
title: string;
|
|
97
|
-
message: string;
|
|
98
|
-
confirmText?: string;
|
|
99
|
-
cancelText?: string;
|
|
100
|
-
confirmClass?: string;
|
|
101
|
-
iconColor?: 'red' | 'yellow' | 'blue';
|
|
102
|
-
onConfirm?: string;
|
|
103
|
-
}
|
|
104
|
-
declare function renderConfirmationDialog(options: ConfirmationDialogOptions): string;
|
|
105
|
-
/**
|
|
106
|
-
* Helper function to show a confirmation dialog programmatically
|
|
107
|
-
* Usage in templates: Add this script and call showConfirmDialog()
|
|
108
|
-
*/
|
|
109
|
-
declare function getConfirmationDialogScript(): string;
|
|
110
|
-
|
|
111
|
-
interface FilterOption {
|
|
112
|
-
value: string;
|
|
113
|
-
label: string;
|
|
114
|
-
selected?: boolean;
|
|
115
|
-
color?: string;
|
|
116
|
-
}
|
|
117
|
-
interface Filter {
|
|
118
|
-
name: string;
|
|
119
|
-
label: string;
|
|
120
|
-
options: FilterOption[];
|
|
121
|
-
}
|
|
122
|
-
interface FilterBarData {
|
|
123
|
-
filters: Filter[];
|
|
124
|
-
actions?: Array<{
|
|
125
|
-
label: string;
|
|
126
|
-
className?: string;
|
|
127
|
-
onclick?: string;
|
|
128
|
-
hxGet?: string;
|
|
129
|
-
hxTarget?: string;
|
|
130
|
-
}>;
|
|
131
|
-
bulkActions?: Array<{
|
|
132
|
-
label: string;
|
|
133
|
-
value: string;
|
|
134
|
-
icon?: string;
|
|
135
|
-
className?: string;
|
|
136
|
-
}>;
|
|
137
|
-
}
|
|
138
|
-
declare function renderFilterBar(data: FilterBarData): string;
|
|
139
|
-
|
|
140
|
-
export { type AlertData, type ConfirmationDialogOptions, type Filter, type FilterBarData, type FilterOption, type FormData, type FormField, type PaginationData, type TableColumn, type TableData, getConfirmationDialogScript, renderAlert, renderConfirmationDialog, renderFilterBar, renderForm, renderFormField, renderPagination, renderTable };
|
package/dist/templates.d.ts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
interface FormField {
|
|
2
|
-
name: string;
|
|
3
|
-
label: string;
|
|
4
|
-
type: 'text' | 'email' | 'textarea' | 'select' | 'checkbox' | 'rich_text' | 'number' | 'date' | 'multi_select' | 'file';
|
|
5
|
-
value?: any;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
required?: boolean;
|
|
8
|
-
readonly?: boolean;
|
|
9
|
-
helpText?: string;
|
|
10
|
-
options?: Array<{
|
|
11
|
-
value: string;
|
|
12
|
-
label: string;
|
|
13
|
-
selected?: boolean;
|
|
14
|
-
}>;
|
|
15
|
-
rows?: number;
|
|
16
|
-
className?: string;
|
|
17
|
-
validation?: {
|
|
18
|
-
min?: number;
|
|
19
|
-
max?: number;
|
|
20
|
-
pattern?: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
interface FormData {
|
|
24
|
-
id?: string;
|
|
25
|
-
action?: string;
|
|
26
|
-
method?: string;
|
|
27
|
-
hxPost?: string;
|
|
28
|
-
hxPut?: string;
|
|
29
|
-
hxTarget?: string;
|
|
30
|
-
fields: FormField[];
|
|
31
|
-
submitButtons: Array<{
|
|
32
|
-
label: string;
|
|
33
|
-
type?: 'submit' | 'button';
|
|
34
|
-
value?: string;
|
|
35
|
-
name?: string;
|
|
36
|
-
className?: string;
|
|
37
|
-
onclick?: string;
|
|
38
|
-
}>;
|
|
39
|
-
title?: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
className?: string;
|
|
42
|
-
}
|
|
43
|
-
declare function renderForm(data: FormData): string;
|
|
44
|
-
declare function renderFormField(field: FormField): string;
|
|
45
|
-
|
|
46
|
-
interface TableColumn {
|
|
47
|
-
key: string;
|
|
48
|
-
label: string;
|
|
49
|
-
sortable?: boolean;
|
|
50
|
-
className?: string;
|
|
51
|
-
sortType?: 'string' | 'number' | 'date' | 'boolean';
|
|
52
|
-
render?: (value: any, row: any) => string;
|
|
53
|
-
}
|
|
54
|
-
interface TableData<T = any> {
|
|
55
|
-
columns: TableColumn[];
|
|
56
|
-
rows: T[];
|
|
57
|
-
selectable?: boolean;
|
|
58
|
-
className?: string;
|
|
59
|
-
emptyMessage?: string;
|
|
60
|
-
tableId?: string;
|
|
61
|
-
title?: string;
|
|
62
|
-
rowClickable?: boolean;
|
|
63
|
-
rowClickUrl?: (row: T) => string;
|
|
64
|
-
}
|
|
65
|
-
declare function renderTable<T = any>(data: TableData<T>): string;
|
|
66
|
-
|
|
67
|
-
interface PaginationData {
|
|
68
|
-
currentPage: number;
|
|
69
|
-
totalPages: number;
|
|
70
|
-
totalItems: number;
|
|
71
|
-
itemsPerPage: number;
|
|
72
|
-
startItem: number;
|
|
73
|
-
endItem: number;
|
|
74
|
-
baseUrl: string;
|
|
75
|
-
queryParams?: Record<string, string>;
|
|
76
|
-
showPageNumbers?: boolean;
|
|
77
|
-
maxPageNumbers?: number;
|
|
78
|
-
showPageSizeSelector?: boolean;
|
|
79
|
-
pageSizeOptions?: number[];
|
|
80
|
-
}
|
|
81
|
-
declare function renderPagination(data: PaginationData): string;
|
|
82
|
-
|
|
83
|
-
type AlertType = 'success' | 'error' | 'warning' | 'info';
|
|
84
|
-
interface AlertData {
|
|
85
|
-
type: AlertType;
|
|
86
|
-
title?: string;
|
|
87
|
-
message: string;
|
|
88
|
-
dismissible?: boolean;
|
|
89
|
-
className?: string;
|
|
90
|
-
icon?: boolean;
|
|
91
|
-
}
|
|
92
|
-
declare function renderAlert(data: AlertData): string;
|
|
93
|
-
|
|
94
|
-
interface ConfirmationDialogOptions {
|
|
95
|
-
id: string;
|
|
96
|
-
title: string;
|
|
97
|
-
message: string;
|
|
98
|
-
confirmText?: string;
|
|
99
|
-
cancelText?: string;
|
|
100
|
-
confirmClass?: string;
|
|
101
|
-
iconColor?: 'red' | 'yellow' | 'blue';
|
|
102
|
-
onConfirm?: string;
|
|
103
|
-
}
|
|
104
|
-
declare function renderConfirmationDialog(options: ConfirmationDialogOptions): string;
|
|
105
|
-
/**
|
|
106
|
-
* Helper function to show a confirmation dialog programmatically
|
|
107
|
-
* Usage in templates: Add this script and call showConfirmDialog()
|
|
108
|
-
*/
|
|
109
|
-
declare function getConfirmationDialogScript(): string;
|
|
110
|
-
|
|
111
|
-
interface FilterOption {
|
|
112
|
-
value: string;
|
|
113
|
-
label: string;
|
|
114
|
-
selected?: boolean;
|
|
115
|
-
color?: string;
|
|
116
|
-
}
|
|
117
|
-
interface Filter {
|
|
118
|
-
name: string;
|
|
119
|
-
label: string;
|
|
120
|
-
options: FilterOption[];
|
|
121
|
-
}
|
|
122
|
-
interface FilterBarData {
|
|
123
|
-
filters: Filter[];
|
|
124
|
-
actions?: Array<{
|
|
125
|
-
label: string;
|
|
126
|
-
className?: string;
|
|
127
|
-
onclick?: string;
|
|
128
|
-
hxGet?: string;
|
|
129
|
-
hxTarget?: string;
|
|
130
|
-
}>;
|
|
131
|
-
bulkActions?: Array<{
|
|
132
|
-
label: string;
|
|
133
|
-
value: string;
|
|
134
|
-
icon?: string;
|
|
135
|
-
className?: string;
|
|
136
|
-
}>;
|
|
137
|
-
}
|
|
138
|
-
declare function renderFilterBar(data: FilterBarData): string;
|
|
139
|
-
|
|
140
|
-
export { type AlertData, type ConfirmationDialogOptions, type Filter, type FilterBarData, type FilterOption, type FormData, type FormField, type PaginationData, type TableColumn, type TableData, getConfirmationDialogScript, renderAlert, renderConfirmationDialog, renderFilterBar, renderForm, renderFormField, renderPagination, renderTable };
|
package/dist/types.d.cts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Plugin Manifest Types
|
|
9
|
-
*
|
|
10
|
-
* Defines the structure for plugin manifest.json files
|
|
11
|
-
*/
|
|
12
|
-
interface PluginManifest {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
version: string;
|
|
16
|
-
description: string;
|
|
17
|
-
author: string;
|
|
18
|
-
homepage?: string;
|
|
19
|
-
repository?: string;
|
|
20
|
-
license?: string;
|
|
21
|
-
category: string;
|
|
22
|
-
tags?: string[];
|
|
23
|
-
dependencies?: string[];
|
|
24
|
-
settings?: Record<string, any>;
|
|
25
|
-
hooks?: Record<string, string>;
|
|
26
|
-
routes?: Array<{
|
|
27
|
-
path: string;
|
|
28
|
-
method: string;
|
|
29
|
-
handler: string;
|
|
30
|
-
description?: string;
|
|
31
|
-
}>;
|
|
32
|
-
permissions?: Record<string, string>;
|
|
33
|
-
adminMenu?: {
|
|
34
|
-
label: string;
|
|
35
|
-
icon: string;
|
|
36
|
-
path: string;
|
|
37
|
-
order: number;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export type { PluginManifest };
|