@sonicjs-cms/core 2.2.0 → 2.3.1

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 (105) hide show
  1. package/README.md +75 -1
  2. package/dist/app-Db0AfT5F.d.cts +100 -0
  3. package/dist/app-Db0AfT5F.d.ts +100 -0
  4. package/dist/chunk-23VPL6VI.cjs +1828 -0
  5. package/dist/chunk-23VPL6VI.cjs.map +1 -0
  6. package/dist/chunk-3MPQII4R.js +1826 -0
  7. package/dist/chunk-3MPQII4R.js.map +1 -0
  8. package/dist/{chunk-YTMFJLJZ.cjs → chunk-44LBCF3B.cjs} +5 -3
  9. package/dist/chunk-44LBCF3B.cjs.map +1 -0
  10. package/dist/{chunk-2DIWLDCA.cjs → chunk-5QJX2VMP.cjs} +541 -533
  11. package/dist/chunk-5QJX2VMP.cjs.map +1 -0
  12. package/dist/{chunk-UEYMFNBN.cjs → chunk-5UUYHAZT.cjs} +7 -36
  13. package/dist/chunk-5UUYHAZT.cjs.map +1 -0
  14. package/dist/{chunk-ZUK55KZB.js → chunk-6RJU7HL5.js} +5 -3
  15. package/dist/chunk-6RJU7HL5.js.map +1 -0
  16. package/dist/{chunk-K4Z3IHOK.js → chunk-7CXL5K7N.js} +5 -248
  17. package/dist/chunk-7CXL5K7N.js.map +1 -0
  18. package/dist/{chunk-WBX5YMTB.cjs → chunk-7KCDFDRI.cjs} +27 -15
  19. package/dist/chunk-7KCDFDRI.cjs.map +1 -0
  20. package/dist/{chunk-HKEK7UNV.js → chunk-CPXAVWCU.js} +3 -3
  21. package/dist/{chunk-HKEK7UNV.js.map → chunk-CPXAVWCU.js.map} +1 -1
  22. package/dist/{chunk-F5ESJXI2.cjs → chunk-DTLB6UIH.cjs} +3 -3
  23. package/dist/{chunk-F5ESJXI2.cjs.map → chunk-DTLB6UIH.cjs.map} +1 -1
  24. package/dist/{chunk-AINTFRTC.cjs → chunk-ES3BRZQJ.cjs} +252 -2
  25. package/dist/chunk-ES3BRZQJ.cjs.map +1 -0
  26. package/dist/{chunk-HV2I6API.cjs → chunk-NAYD76QF.cjs} +4 -251
  27. package/dist/chunk-NAYD76QF.cjs.map +1 -0
  28. package/dist/{chunk-L232U757.js → chunk-Q52ZQFMB.js} +249 -3
  29. package/dist/chunk-Q52ZQFMB.js.map +1 -0
  30. package/dist/{chunk-NMVOTNSL.js → chunk-RRKXFGIO.js} +28 -16
  31. package/dist/chunk-RRKXFGIO.js.map +1 -0
  32. package/dist/{chunk-OORGXYDA.js → chunk-WK5EUGBO.js} +5 -32
  33. package/dist/chunk-WK5EUGBO.js.map +1 -0
  34. package/dist/{chunk-R57VFNP3.js → chunk-ZPERJATF.js} +441 -433
  35. package/dist/chunk-ZPERJATF.js.map +1 -0
  36. package/dist/collection-config-FLlGtsh9.d.cts +107 -0
  37. package/dist/collection-config-FLlGtsh9.d.ts +107 -0
  38. package/dist/filter-bar.template-By4jeiw_.d.cts +140 -0
  39. package/dist/filter-bar.template-By4jeiw_.d.ts +140 -0
  40. package/dist/index.cjs +146 -165
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts +44 -0
  43. package/dist/index.d.ts +43 -5
  44. package/dist/index.js +19 -14
  45. package/dist/index.js.map +1 -1
  46. package/dist/middleware.cjs +24 -33
  47. package/dist/middleware.d.cts +89 -0
  48. package/dist/middleware.d.ts +89 -2
  49. package/dist/middleware.js +3 -4
  50. package/dist/migrations-CCLAGJGP.js +4 -0
  51. package/dist/{migrations-IHERIQVD.js.map → migrations-CCLAGJGP.js.map} +1 -1
  52. package/dist/migrations-O6INOHRD.cjs +13 -0
  53. package/dist/{migrations-POFD5KNG.cjs.map → migrations-O6INOHRD.cjs.map} +1 -1
  54. package/dist/plugin-bootstrap-C0E3jdz-.d.cts +8339 -0
  55. package/dist/plugin-bootstrap-CDh0JHtW.d.ts +8339 -0
  56. package/dist/plugin-manifest-BCMx9CAq.d.cts +35 -0
  57. package/dist/plugin-manifest-BCMx9CAq.d.ts +35 -0
  58. package/dist/plugin-zvZpaiP5.d.cts +357 -0
  59. package/dist/plugin-zvZpaiP5.d.ts +357 -0
  60. package/dist/plugins.cjs +7 -7
  61. package/dist/plugins.d.cts +330 -0
  62. package/dist/plugins.d.ts +330 -2
  63. package/dist/plugins.js +1 -1
  64. package/dist/routes.cjs +27 -27
  65. package/dist/routes.d.cts +224 -0
  66. package/dist/routes.d.ts +224 -2
  67. package/dist/routes.js +7 -7
  68. package/dist/services.cjs +41 -41
  69. package/dist/services.d.cts +236 -0
  70. package/dist/services.d.ts +236 -2
  71. package/dist/services.js +4 -4
  72. package/dist/telemetry-BFBIjBxK.d.cts +36 -0
  73. package/dist/telemetry-BFBIjBxK.d.ts +36 -0
  74. package/dist/templates.d.cts +133 -0
  75. package/dist/templates.d.ts +133 -2
  76. package/dist/types.d.cts +7 -0
  77. package/dist/types.d.ts +7 -2
  78. package/dist/utils.cjs +27 -27
  79. package/dist/utils.d.cts +53 -0
  80. package/dist/utils.d.ts +53 -2
  81. package/dist/utils.js +2 -2
  82. package/dist/version-vktVAxhe.d.cts +195 -0
  83. package/dist/version-vktVAxhe.d.ts +195 -0
  84. package/migrations/001_initial_schema.sql +1 -1
  85. package/migrations/002_faq_plugin.sql +86 -0
  86. package/package.json +3 -1
  87. package/dist/chunk-2DIWLDCA.cjs.map +0 -1
  88. package/dist/chunk-AINTFRTC.cjs.map +0 -1
  89. package/dist/chunk-HV2I6API.cjs.map +0 -1
  90. package/dist/chunk-K4Z3IHOK.js.map +0 -1
  91. package/dist/chunk-L232U757.js.map +0 -1
  92. package/dist/chunk-NMVOTNSL.js.map +0 -1
  93. package/dist/chunk-OORGXYDA.js.map +0 -1
  94. package/dist/chunk-R57VFNP3.js.map +0 -1
  95. package/dist/chunk-T7IYBGGO.cjs +0 -746
  96. package/dist/chunk-T7IYBGGO.cjs.map +0 -1
  97. package/dist/chunk-UEYMFNBN.cjs.map +0 -1
  98. package/dist/chunk-WBX5YMTB.cjs.map +0 -1
  99. package/dist/chunk-YTMFJLJZ.cjs.map +0 -1
  100. package/dist/chunk-ZPMFT2JW.js +0 -744
  101. package/dist/chunk-ZPMFT2JW.js.map +0 -1
  102. package/dist/chunk-ZUK55KZB.js.map +0 -1
  103. package/dist/migrations-IHERIQVD.js +0 -4
  104. package/dist/migrations-POFD5KNG.cjs +0 -13
  105. /package/migrations/{021_add_otp_login.sql → 026_add_otp_login.sql} +0 -0
@@ -0,0 +1,330 @@
1
+ import { l as HookSystem, H as HookHandler, j as PluginHook, s as PluginValidator$1, P as Plugin, t as PluginValidationResult, m as PluginRegistry, b as PluginConfig, o as PluginStatus, n as PluginManager$1, a as PluginContext } from './plugin-zvZpaiP5.cjs';
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/plugins.d.ts CHANGED
@@ -1,2 +1,330 @@
1
- // Plugin exports from core package
2
- export * from '../src/plugins/index'
1
+ import { l as HookSystem, H as HookHandler, j as PluginHook, s as PluginValidator$1, P as Plugin, t as PluginValidationResult, m as PluginRegistry, b as PluginConfig, o as PluginStatus, n as PluginManager$1, a as PluginContext } from './plugin-zvZpaiP5.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/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- export { HookSystemImpl, HookUtils, PluginManager, PluginRegistryImpl, PluginValidator, ScopedHookSystem } from './chunk-HKEK7UNV.js';
1
+ export { HookSystemImpl, HookUtils, PluginManager, PluginRegistryImpl, PluginValidator, ScopedHookSystem } from './chunk-CPXAVWCU.js';
2
2
  import './chunk-LOUJRBXV.js';
3
3
  import './chunk-V4OQ3NZ2.js';
4
4
  //# sourceMappingURL=plugins.js.map