@sonicjs-cms/core 2.4.0 → 2.6.0

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 (98) hide show
  1. package/dist/{app-Db0AfT5F.d.cts → app-DV27cjPy.d.cts} +1 -1
  2. package/dist/{app-Db0AfT5F.d.ts → app-DV27cjPy.d.ts} +1 -1
  3. package/dist/{chunk-YIXSSJWD.cjs → chunk-63K7XXRX.cjs} +5 -5
  4. package/dist/{chunk-YIXSSJWD.cjs.map → chunk-63K7XXRX.cjs.map} +1 -1
  5. package/dist/{chunk-VNCYCH3H.js → chunk-7DL5SPPX.js} +59 -5
  6. package/dist/chunk-7DL5SPPX.js.map +1 -0
  7. package/dist/{chunk-AZLU3ROK.cjs → chunk-BZC4FYW7.cjs} +4 -4
  8. package/dist/chunk-BZC4FYW7.cjs.map +1 -0
  9. package/dist/chunk-CLIH2T74.js +403 -0
  10. package/dist/chunk-CLIH2T74.js.map +1 -0
  11. package/dist/{chunk-D2NLCPO2.js → chunk-EVZOVYLO.js} +53 -2
  12. package/dist/chunk-EVZOVYLO.js.map +1 -0
  13. package/dist/{chunk-DXM575E2.js → chunk-EYWR6UA2.js} +6 -6
  14. package/dist/chunk-EYWR6UA2.js.map +1 -0
  15. package/dist/{chunk-CPXAVWCU.js → chunk-F332TENF.js} +278 -3
  16. package/dist/chunk-F332TENF.js.map +1 -0
  17. package/dist/{chunk-FT6NBHNX.js → chunk-F6GZURXJ.js} +2536 -600
  18. package/dist/chunk-F6GZURXJ.js.map +1 -0
  19. package/dist/{chunk-2MI3LZFH.cjs → chunk-IIRVZSP2.cjs} +53 -2
  20. package/dist/chunk-IIRVZSP2.cjs.map +1 -0
  21. package/dist/{chunk-V5LBQN3I.js → chunk-KA2PDJNB.js} +4 -4
  22. package/dist/chunk-KA2PDJNB.js.map +1 -0
  23. package/dist/{chunk-AVPUX57O.js → chunk-KAOWRIFD.js} +3 -3
  24. package/dist/{chunk-AVPUX57O.js.map → chunk-KAOWRIFD.js.map} +1 -1
  25. package/dist/{chunk-ILZ3DP4I.cjs → chunk-MPT5PA6U.cjs} +24 -2
  26. package/dist/chunk-MPT5PA6U.cjs.map +1 -0
  27. package/dist/{chunk-A4SVOGG6.cjs → chunk-N7TDLOUE.cjs} +2696 -762
  28. package/dist/chunk-N7TDLOUE.cjs.map +1 -0
  29. package/dist/{chunk-7I5INVNR.cjs → chunk-T3YIKW2A.cjs} +9 -9
  30. package/dist/chunk-T3YIKW2A.cjs.map +1 -0
  31. package/dist/{chunk-DTLB6UIH.cjs → chunk-Y72M3MVX.cjs} +280 -2
  32. package/dist/chunk-Y72M3MVX.cjs.map +1 -0
  33. package/dist/{chunk-SGAG6FD3.js → chunk-YFJJU26H.js} +24 -2
  34. package/dist/chunk-YFJJU26H.js.map +1 -0
  35. package/dist/chunk-YHW27CBV.cjs +406 -0
  36. package/dist/chunk-YHW27CBV.cjs.map +1 -0
  37. package/dist/{chunk-FYEDK7K7.cjs → chunk-YMTTGHEK.cjs} +61 -4
  38. package/dist/chunk-YMTTGHEK.cjs.map +1 -0
  39. package/dist/{collection-config-FLlGtsh9.d.cts → collection-config-BF95LgQb.d.cts} +10 -2
  40. package/dist/{collection-config-FLlGtsh9.d.ts → collection-config-BF95LgQb.d.ts} +10 -2
  41. package/dist/index.cjs +2001 -142
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.cts +504 -9
  44. package/dist/index.d.ts +504 -9
  45. package/dist/index.js +1893 -41
  46. package/dist/index.js.map +1 -1
  47. package/dist/middleware.cjs +24 -24
  48. package/dist/middleware.d.cts +1 -1
  49. package/dist/middleware.d.ts +1 -1
  50. package/dist/middleware.js +3 -3
  51. package/dist/migrations-QNYAWQLB.cjs +13 -0
  52. package/dist/{migrations-32QAYLWJ.cjs.map → migrations-QNYAWQLB.cjs.map} +1 -1
  53. package/dist/migrations-R6NQBKQV.js +4 -0
  54. package/dist/{migrations-57ZHBQ4X.js.map → migrations-R6NQBKQV.js.map} +1 -1
  55. package/dist/{plugin-bootstrap-CDh0JHtW.d.ts → plugin-bootstrap-CB-xaBfK.d.ts} +2 -2
  56. package/dist/{plugin-bootstrap-C0E3jdz-.d.cts → plugin-bootstrap-U-cw9jn3.d.cts} +2 -2
  57. package/dist/plugin-manager-Baa6xXqB.d.ts +328 -0
  58. package/dist/plugin-manager-vBal9Zip.d.cts +328 -0
  59. package/dist/plugins.cjs +20 -7
  60. package/dist/plugins.d.cts +53 -310
  61. package/dist/plugins.d.ts +53 -310
  62. package/dist/plugins.js +2 -1
  63. package/dist/routes.cjs +27 -26
  64. package/dist/routes.d.cts +1 -1
  65. package/dist/routes.d.ts +1 -1
  66. package/dist/routes.js +7 -6
  67. package/dist/services.cjs +16 -16
  68. package/dist/services.d.cts +2 -2
  69. package/dist/services.d.ts +2 -2
  70. package/dist/services.js +2 -2
  71. package/dist/templates.cjs +17 -17
  72. package/dist/templates.js +2 -2
  73. package/dist/types.d.cts +1 -1
  74. package/dist/types.d.ts +1 -1
  75. package/dist/utils.cjs +23 -11
  76. package/dist/utils.d.cts +38 -1
  77. package/dist/utils.d.ts +38 -1
  78. package/dist/utils.js +1 -1
  79. package/migrations/027_fix_slug_field_type.sql +18 -0
  80. package/migrations/028_fix_slug_field_type_in_schemas.sql +30 -0
  81. package/migrations/029_ai_search_plugin.sql +45 -0
  82. package/package.json +5 -2
  83. package/dist/chunk-2MI3LZFH.cjs.map +0 -1
  84. package/dist/chunk-7I5INVNR.cjs.map +0 -1
  85. package/dist/chunk-A4SVOGG6.cjs.map +0 -1
  86. package/dist/chunk-AZLU3ROK.cjs.map +0 -1
  87. package/dist/chunk-CPXAVWCU.js.map +0 -1
  88. package/dist/chunk-D2NLCPO2.js.map +0 -1
  89. package/dist/chunk-DTLB6UIH.cjs.map +0 -1
  90. package/dist/chunk-DXM575E2.js.map +0 -1
  91. package/dist/chunk-FT6NBHNX.js.map +0 -1
  92. package/dist/chunk-FYEDK7K7.cjs.map +0 -1
  93. package/dist/chunk-ILZ3DP4I.cjs.map +0 -1
  94. package/dist/chunk-SGAG6FD3.js.map +0 -1
  95. package/dist/chunk-V5LBQN3I.js.map +0 -1
  96. package/dist/chunk-VNCYCH3H.js.map +0 -1
  97. package/dist/migrations-32QAYLWJ.cjs +0 -13
  98. package/dist/migrations-57ZHBQ4X.js +0 -4
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk7I5INVNR_cjs = require('./chunk-7I5INVNR.cjs');
4
- require('./chunk-ILZ3DP4I.cjs');
5
- require('./chunk-2MI3LZFH.cjs');
3
+ var chunkT3YIKW2A_cjs = require('./chunk-T3YIKW2A.cjs');
4
+ require('./chunk-MPT5PA6U.cjs');
5
+ require('./chunk-IIRVZSP2.cjs');
6
6
  require('./chunk-RCQ2HIQD.cjs');
7
7
  require('./chunk-IGJUBJBW.cjs');
8
8
 
@@ -10,87 +10,87 @@ require('./chunk-IGJUBJBW.cjs');
10
10
 
11
11
  Object.defineProperty(exports, "AuthManager", {
12
12
  enumerable: true,
13
- get: function () { return chunk7I5INVNR_cjs.AuthManager; }
13
+ get: function () { return chunkT3YIKW2A_cjs.AuthManager; }
14
14
  });
15
15
  Object.defineProperty(exports, "PermissionManager", {
16
16
  enumerable: true,
17
- get: function () { return chunk7I5INVNR_cjs.PermissionManager; }
17
+ get: function () { return chunkT3YIKW2A_cjs.PermissionManager; }
18
18
  });
19
19
  Object.defineProperty(exports, "bootstrapMiddleware", {
20
20
  enumerable: true,
21
- get: function () { return chunk7I5INVNR_cjs.bootstrapMiddleware; }
21
+ get: function () { return chunkT3YIKW2A_cjs.bootstrapMiddleware; }
22
22
  });
23
23
  Object.defineProperty(exports, "cacheHeaders", {
24
24
  enumerable: true,
25
- get: function () { return chunk7I5INVNR_cjs.cacheHeaders; }
25
+ get: function () { return chunkT3YIKW2A_cjs.cacheHeaders; }
26
26
  });
27
27
  Object.defineProperty(exports, "compressionMiddleware", {
28
28
  enumerable: true,
29
- get: function () { return chunk7I5INVNR_cjs.compressionMiddleware; }
29
+ get: function () { return chunkT3YIKW2A_cjs.compressionMiddleware; }
30
30
  });
31
31
  Object.defineProperty(exports, "detailedLoggingMiddleware", {
32
32
  enumerable: true,
33
- get: function () { return chunk7I5INVNR_cjs.detailedLoggingMiddleware; }
33
+ get: function () { return chunkT3YIKW2A_cjs.detailedLoggingMiddleware; }
34
34
  });
35
35
  Object.defineProperty(exports, "getActivePlugins", {
36
36
  enumerable: true,
37
- get: function () { return chunk7I5INVNR_cjs.getActivePlugins; }
37
+ get: function () { return chunkT3YIKW2A_cjs.getActivePlugins; }
38
38
  });
39
39
  Object.defineProperty(exports, "isPluginActive", {
40
40
  enumerable: true,
41
- get: function () { return chunk7I5INVNR_cjs.isPluginActive; }
41
+ get: function () { return chunkT3YIKW2A_cjs.isPluginActive; }
42
42
  });
43
43
  Object.defineProperty(exports, "logActivity", {
44
44
  enumerable: true,
45
- get: function () { return chunk7I5INVNR_cjs.logActivity; }
45
+ get: function () { return chunkT3YIKW2A_cjs.logActivity; }
46
46
  });
47
47
  Object.defineProperty(exports, "loggingMiddleware", {
48
48
  enumerable: true,
49
- get: function () { return chunk7I5INVNR_cjs.loggingMiddleware; }
49
+ get: function () { return chunkT3YIKW2A_cjs.loggingMiddleware; }
50
50
  });
51
51
  Object.defineProperty(exports, "metricsMiddleware", {
52
52
  enumerable: true,
53
- get: function () { return chunk7I5INVNR_cjs.metricsMiddleware; }
53
+ get: function () { return chunkT3YIKW2A_cjs.metricsMiddleware; }
54
54
  });
55
55
  Object.defineProperty(exports, "optionalAuth", {
56
56
  enumerable: true,
57
- get: function () { return chunk7I5INVNR_cjs.optionalAuth; }
57
+ get: function () { return chunkT3YIKW2A_cjs.optionalAuth; }
58
58
  });
59
59
  Object.defineProperty(exports, "performanceLoggingMiddleware", {
60
60
  enumerable: true,
61
- get: function () { return chunk7I5INVNR_cjs.performanceLoggingMiddleware; }
61
+ get: function () { return chunkT3YIKW2A_cjs.performanceLoggingMiddleware; }
62
62
  });
63
63
  Object.defineProperty(exports, "requireActivePlugin", {
64
64
  enumerable: true,
65
- get: function () { return chunk7I5INVNR_cjs.requireActivePlugin; }
65
+ get: function () { return chunkT3YIKW2A_cjs.requireActivePlugin; }
66
66
  });
67
67
  Object.defineProperty(exports, "requireActivePlugins", {
68
68
  enumerable: true,
69
- get: function () { return chunk7I5INVNR_cjs.requireActivePlugins; }
69
+ get: function () { return chunkT3YIKW2A_cjs.requireActivePlugins; }
70
70
  });
71
71
  Object.defineProperty(exports, "requireAnyPermission", {
72
72
  enumerable: true,
73
- get: function () { return chunk7I5INVNR_cjs.requireAnyPermission; }
73
+ get: function () { return chunkT3YIKW2A_cjs.requireAnyPermission; }
74
74
  });
75
75
  Object.defineProperty(exports, "requireAuth", {
76
76
  enumerable: true,
77
- get: function () { return chunk7I5INVNR_cjs.requireAuth; }
77
+ get: function () { return chunkT3YIKW2A_cjs.requireAuth; }
78
78
  });
79
79
  Object.defineProperty(exports, "requirePermission", {
80
80
  enumerable: true,
81
- get: function () { return chunk7I5INVNR_cjs.requirePermission; }
81
+ get: function () { return chunkT3YIKW2A_cjs.requirePermission; }
82
82
  });
83
83
  Object.defineProperty(exports, "requireRole", {
84
84
  enumerable: true,
85
- get: function () { return chunk7I5INVNR_cjs.requireRole; }
85
+ get: function () { return chunkT3YIKW2A_cjs.requireRole; }
86
86
  });
87
87
  Object.defineProperty(exports, "securityHeaders", {
88
88
  enumerable: true,
89
- get: function () { return chunk7I5INVNR_cjs.securityHeaders; }
89
+ get: function () { return chunkT3YIKW2A_cjs.securityHeaders; }
90
90
  });
91
91
  Object.defineProperty(exports, "securityLoggingMiddleware", {
92
92
  enumerable: true,
93
- get: function () { return chunk7I5INVNR_cjs.securityLoggingMiddleware; }
93
+ get: function () { return chunkT3YIKW2A_cjs.securityLoggingMiddleware; }
94
94
  });
95
95
  //# sourceMappingURL=middleware.cjs.map
96
96
  //# sourceMappingURL=middleware.cjs.map
@@ -1,6 +1,6 @@
1
1
  import * as hono from 'hono';
2
2
  import { Context, Next, MiddlewareHandler } from 'hono';
3
- import { S as SonicJSConfig } from './app-Db0AfT5F.cjs';
3
+ import { S as SonicJSConfig } from './app-DV27cjPy.cjs';
4
4
  import '@cloudflare/workers-types';
5
5
 
6
6
  type Bindings = {
@@ -1,6 +1,6 @@
1
1
  import * as hono from 'hono';
2
2
  import { Context, Next, MiddlewareHandler } from 'hono';
3
- import { S as SonicJSConfig } from './app-Db0AfT5F.js';
3
+ import { S as SonicJSConfig } from './app-DV27cjPy.js';
4
4
  import '@cloudflare/workers-types';
5
5
 
6
6
  type Bindings = {
@@ -1,6 +1,6 @@
1
- export { AuthManager, PermissionManager, bootstrapMiddleware, cacheHeaders, compressionMiddleware, detailedLoggingMiddleware, getActivePlugins, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeaders, securityLoggingMiddleware } from './chunk-DXM575E2.js';
2
- import './chunk-SGAG6FD3.js';
3
- import './chunk-D2NLCPO2.js';
1
+ export { AuthManager, PermissionManager, bootstrapMiddleware, cacheHeaders, compressionMiddleware, detailedLoggingMiddleware, getActivePlugins, isPluginActive, logActivity, loggingMiddleware, metricsMiddleware, optionalAuth, performanceLoggingMiddleware, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeaders, securityLoggingMiddleware } from './chunk-EYWR6UA2.js';
2
+ import './chunk-YFJJU26H.js';
3
+ import './chunk-EVZOVYLO.js';
4
4
  import './chunk-FICTAGD4.js';
5
5
  import './chunk-V4OQ3NZ2.js';
6
6
  //# sourceMappingURL=middleware.js.map
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkIIRVZSP2_cjs = require('./chunk-IIRVZSP2.cjs');
4
+ require('./chunk-IGJUBJBW.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "MigrationService", {
9
+ enumerable: true,
10
+ get: function () { return chunkIIRVZSP2_cjs.MigrationService; }
11
+ });
12
+ //# sourceMappingURL=migrations-QNYAWQLB.cjs.map
13
+ //# sourceMappingURL=migrations-QNYAWQLB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-32QAYLWJ.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-QNYAWQLB.cjs"}
@@ -0,0 +1,4 @@
1
+ export { MigrationService } from './chunk-EVZOVYLO.js';
2
+ import './chunk-V4OQ3NZ2.js';
3
+ //# sourceMappingURL=migrations-R6NQBKQV.js.map
4
+ //# sourceMappingURL=migrations-R6NQBKQV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-57ZHBQ4X.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"migrations-R6NQBKQV.js"}
@@ -1,4 +1,4 @@
1
- import { b as CollectionConfig, d as CollectionSyncResult } from './collection-config-FLlGtsh9.js';
1
+ import { c as CollectionConfig, e as CollectionSyncResult } from './collection-config-BF95LgQb.js';
2
2
  import { D1Database as D1Database$1 } from '@cloudflare/workers-types';
3
3
  import * as drizzle_zod from 'drizzle-zod';
4
4
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
@@ -8336,4 +8336,4 @@ declare class PluginBootstrapService {
8336
8336
  isBootstrapNeeded(): Promise<boolean>;
8337
8337
  }
8338
8338
 
8339
- export { insertPluginRouteSchema as $, apiTokens as A, workflowHistory as B, type CorePlugin as C, plugins as D, pluginHooks as E, pluginRoutes as F, pluginAssets as G, pluginActivityLog as H, systemLogs as I, logConfig as J, insertUserSchema as K, Logger as L, MigrationService as M, selectUserSchema as N, insertCollectionSchema as O, PluginService as P, selectCollectionSchema as Q, insertContentSchema as R, selectContentSchema as S, insertMediaSchema as T, selectMediaSchema as U, insertWorkflowHistorySchema as V, selectWorkflowHistorySchema as W, insertPluginSchema as X, selectPluginSchema as Y, insertPluginHookSchema as Z, selectPluginHookSchema as _, loadCollectionConfig as a, selectPluginRouteSchema as a0, insertPluginAssetSchema as a1, selectPluginAssetSchema as a2, insertPluginActivityLogSchema as a3, selectPluginActivityLogSchema as a4, insertSystemLogSchema as a5, selectSystemLogSchema as a6, insertLogConfigSchema as a7, selectLogConfigSchema as a8, type User as a9, type NewUser as aa, type Collection as ab, type NewCollection as ac, type Content as ad, type NewContent as ae, type Media as af, type NewMedia as ag, type WorkflowHistory as ah, type NewWorkflowHistory as ai, type Plugin as aj, type NewPlugin as ak, type PluginHook as al, type NewPluginHook as am, type PluginRoute as an, type NewPluginRoute as ao, type PluginAsset as ap, type NewPluginAsset as aq, type PluginActivityLog as ar, type NewPluginActivityLog as as, type SystemLog as at, type NewSystemLog as au, type LogConfig as av, type NewLogConfig as aw, syncCollections as b, syncCollection as c, getManagedCollections as d, cleanupRemovedCollections as e, fullCollectionSync as f, getAvailableCollectionNames as g, getLogger as h, isCollectionManaged as i, initLogger as j, PluginBootstrapService as k, loadCollectionConfigs as l, type Migration as m, type MigrationStatus as n, type LogLevel as o, type LogCategory as p, type LogEntry as q, registerCollections as r, schema as s, type LogFilter as t, users as u, validateCollectionConfig as v, collections as w, content as x, contentVersions as y, media as z };
8339
+ export { insertPluginRouteSchema as $, apiTokens as A, workflowHistory as B, type CorePlugin as C, plugins as D, pluginHooks as E, pluginRoutes as F, pluginAssets as G, pluginActivityLog as H, systemLogs as I, logConfig as J, insertUserSchema as K, Logger as L, MigrationService as M, selectUserSchema as N, insertCollectionSchema as O, PluginService as P, selectCollectionSchema as Q, insertContentSchema as R, selectContentSchema as S, insertMediaSchema as T, selectMediaSchema as U, insertWorkflowHistorySchema as V, selectWorkflowHistorySchema as W, insertPluginSchema as X, selectPluginSchema as Y, insertPluginHookSchema as Z, selectPluginHookSchema as _, loadCollectionConfig as a, selectPluginRouteSchema as a0, insertPluginAssetSchema as a1, selectPluginAssetSchema as a2, insertPluginActivityLogSchema as a3, selectPluginActivityLogSchema as a4, insertSystemLogSchema as a5, selectSystemLogSchema as a6, insertLogConfigSchema as a7, selectLogConfigSchema as a8, type User as a9, type NewUser as aa, type Collection as ab, type NewCollection as ac, type Content as ad, type NewContent as ae, type Media as af, type NewMedia as ag, type WorkflowHistory as ah, type NewWorkflowHistory as ai, type Plugin as aj, type NewPlugin as ak, type PluginHook as al, type NewPluginHook as am, type PluginRoute as an, type NewPluginRoute as ao, type PluginAsset as ap, type NewPluginAsset as aq, type PluginActivityLog as ar, type NewPluginActivityLog as as, type SystemLog as at, type NewSystemLog as au, type LogConfig as av, type NewLogConfig as aw, syncCollection as b, getManagedCollections as c, cleanupRemovedCollections as d, type Migration as e, fullCollectionSync as f, getAvailableCollectionNames as g, type MigrationStatus as h, isCollectionManaged as i, getLogger as j, initLogger as k, loadCollectionConfigs as l, type LogLevel as m, type LogCategory as n, type LogEntry as o, type LogFilter as p, PluginBootstrapService as q, registerCollections as r, syncCollections as s, schema as t, users as u, validateCollectionConfig as v, collections as w, content as x, contentVersions as y, media as z };
@@ -1,4 +1,4 @@
1
- import { b as CollectionConfig, d as CollectionSyncResult } from './collection-config-FLlGtsh9.cjs';
1
+ import { c as CollectionConfig, e as CollectionSyncResult } from './collection-config-BF95LgQb.cjs';
2
2
  import { D1Database as D1Database$1 } from '@cloudflare/workers-types';
3
3
  import * as drizzle_zod from 'drizzle-zod';
4
4
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
@@ -8336,4 +8336,4 @@ declare class PluginBootstrapService {
8336
8336
  isBootstrapNeeded(): Promise<boolean>;
8337
8337
  }
8338
8338
 
8339
- export { insertPluginRouteSchema as $, apiTokens as A, workflowHistory as B, type CorePlugin as C, plugins as D, pluginHooks as E, pluginRoutes as F, pluginAssets as G, pluginActivityLog as H, systemLogs as I, logConfig as J, insertUserSchema as K, Logger as L, MigrationService as M, selectUserSchema as N, insertCollectionSchema as O, PluginService as P, selectCollectionSchema as Q, insertContentSchema as R, selectContentSchema as S, insertMediaSchema as T, selectMediaSchema as U, insertWorkflowHistorySchema as V, selectWorkflowHistorySchema as W, insertPluginSchema as X, selectPluginSchema as Y, insertPluginHookSchema as Z, selectPluginHookSchema as _, loadCollectionConfig as a, selectPluginRouteSchema as a0, insertPluginAssetSchema as a1, selectPluginAssetSchema as a2, insertPluginActivityLogSchema as a3, selectPluginActivityLogSchema as a4, insertSystemLogSchema as a5, selectSystemLogSchema as a6, insertLogConfigSchema as a7, selectLogConfigSchema as a8, type User as a9, type NewUser as aa, type Collection as ab, type NewCollection as ac, type Content as ad, type NewContent as ae, type Media as af, type NewMedia as ag, type WorkflowHistory as ah, type NewWorkflowHistory as ai, type Plugin as aj, type NewPlugin as ak, type PluginHook as al, type NewPluginHook as am, type PluginRoute as an, type NewPluginRoute as ao, type PluginAsset as ap, type NewPluginAsset as aq, type PluginActivityLog as ar, type NewPluginActivityLog as as, type SystemLog as at, type NewSystemLog as au, type LogConfig as av, type NewLogConfig as aw, syncCollections as b, syncCollection as c, getManagedCollections as d, cleanupRemovedCollections as e, fullCollectionSync as f, getAvailableCollectionNames as g, getLogger as h, isCollectionManaged as i, initLogger as j, PluginBootstrapService as k, loadCollectionConfigs as l, type Migration as m, type MigrationStatus as n, type LogLevel as o, type LogCategory as p, type LogEntry as q, registerCollections as r, schema as s, type LogFilter as t, users as u, validateCollectionConfig as v, collections as w, content as x, contentVersions as y, media as z };
8339
+ export { insertPluginRouteSchema as $, apiTokens as A, workflowHistory as B, type CorePlugin as C, plugins as D, pluginHooks as E, pluginRoutes as F, pluginAssets as G, pluginActivityLog as H, systemLogs as I, logConfig as J, insertUserSchema as K, Logger as L, MigrationService as M, selectUserSchema as N, insertCollectionSchema as O, PluginService as P, selectCollectionSchema as Q, insertContentSchema as R, selectContentSchema as S, insertMediaSchema as T, selectMediaSchema as U, insertWorkflowHistorySchema as V, selectWorkflowHistorySchema as W, insertPluginSchema as X, selectPluginSchema as Y, insertPluginHookSchema as Z, selectPluginHookSchema as _, loadCollectionConfig as a, selectPluginRouteSchema as a0, insertPluginAssetSchema as a1, selectPluginAssetSchema as a2, insertPluginActivityLogSchema as a3, selectPluginActivityLogSchema as a4, insertSystemLogSchema as a5, selectSystemLogSchema as a6, insertLogConfigSchema as a7, selectLogConfigSchema as a8, type User as a9, type NewUser as aa, type Collection as ab, type NewCollection as ac, type Content as ad, type NewContent as ae, type Media as af, type NewMedia as ag, type WorkflowHistory as ah, type NewWorkflowHistory as ai, type Plugin as aj, type NewPlugin as ak, type PluginHook as al, type NewPluginHook as am, type PluginRoute as an, type NewPluginRoute as ao, type PluginAsset as ap, type NewPluginAsset as aq, type PluginActivityLog as ar, type NewPluginActivityLog as as, type SystemLog as at, type NewSystemLog as au, type LogConfig as av, type NewLogConfig as aw, syncCollection as b, getManagedCollections as c, cleanupRemovedCollections as d, type Migration as e, fullCollectionSync as f, getAvailableCollectionNames as g, type MigrationStatus as h, isCollectionManaged as i, getLogger as j, initLogger as k, loadCollectionConfigs as l, type LogLevel as m, type LogCategory as n, type LogEntry as o, type LogFilter as p, PluginBootstrapService as q, registerCollections as r, syncCollections as s, schema as t, users as u, validateCollectionConfig as v, collections as w, content as x, contentVersions as y, media as z };
@@ -0,0 +1,328 @@
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
+
4
+ /**
5
+ * Hook System Implementation
6
+ *
7
+ * Provides event-driven extensibility for plugins
8
+ */
9
+
10
+ declare class HookSystemImpl implements HookSystem {
11
+ private hooks;
12
+ private executing;
13
+ /**
14
+ * Register a hook handler
15
+ */
16
+ register(hookName: string, handler: HookHandler, priority?: number): void;
17
+ /**
18
+ * Execute all handlers for a hook
19
+ */
20
+ execute(hookName: string, data: any, context?: any): Promise<any>;
21
+ /**
22
+ * Remove a hook handler
23
+ */
24
+ unregister(hookName: string, handler: HookHandler): void;
25
+ /**
26
+ * Get all registered hooks for a name
27
+ */
28
+ getHooks(hookName: string): PluginHook[];
29
+ /**
30
+ * Get all registered hook names
31
+ */
32
+ getHookNames(): string[];
33
+ /**
34
+ * Get hook statistics
35
+ */
36
+ getStats(): {
37
+ hookName: string;
38
+ handlerCount: number;
39
+ }[];
40
+ /**
41
+ * Clear all hooks (useful for testing)
42
+ */
43
+ clear(): void;
44
+ /**
45
+ * Create a scoped hook system for a plugin
46
+ */
47
+ createScope(_pluginName: string): ScopedHookSystem;
48
+ }
49
+ /**
50
+ * Scoped hook system for individual plugins
51
+ */
52
+ declare class ScopedHookSystem {
53
+ private parent;
54
+ private registeredHooks;
55
+ constructor(parent: HookSystemImpl);
56
+ /**
57
+ * Register a hook (scoped to this plugin)
58
+ */
59
+ register(hookName: string, handler: HookHandler, priority?: number): void;
60
+ /**
61
+ * Execute a hook
62
+ */
63
+ execute(hookName: string, data: any, context?: any): Promise<any>;
64
+ /**
65
+ * Unregister a specific hook
66
+ */
67
+ unregister(hookName: string, handler: HookHandler): void;
68
+ /**
69
+ * Unregister all hooks for this plugin
70
+ */
71
+ unregisterAll(): void;
72
+ /**
73
+ * Get hooks registered by this plugin
74
+ */
75
+ getRegisteredHooks(): {
76
+ hookName: string;
77
+ handler: HookHandler;
78
+ }[];
79
+ }
80
+ /**
81
+ * Hook utilities
82
+ */
83
+ declare class HookUtils {
84
+ /**
85
+ * Create a hook name with namespace
86
+ */
87
+ static createHookName(namespace: string, event: string): string;
88
+ /**
89
+ * Parse a hook name to extract namespace and event
90
+ */
91
+ static parseHookName(hookName: string): {
92
+ namespace: string;
93
+ event: string;
94
+ };
95
+ /**
96
+ * Create a middleware that executes hooks
97
+ */
98
+ static createHookMiddleware(hookSystem: HookSystem, beforeHook?: string, afterHook?: string): (c: any, next: any) => Promise<void>;
99
+ /**
100
+ * Create a debounced hook handler
101
+ */
102
+ static debounce(handler: HookHandler, delay: number): HookHandler;
103
+ /**
104
+ * Create a throttled hook handler
105
+ */
106
+ static throttle(handler: HookHandler, limit: number): HookHandler;
107
+ }
108
+
109
+ /**
110
+ * Plugin Validator
111
+ *
112
+ * Validates plugin definitions, dependencies, and compatibility
113
+ */
114
+
115
+ declare class PluginValidator implements PluginValidator$1 {
116
+ private static readonly RESERVED_NAMES;
117
+ private static readonly RESERVED_PATHS;
118
+ /**
119
+ * Validate plugin definition
120
+ */
121
+ validate(plugin: Plugin): PluginValidationResult;
122
+ /**
123
+ * Validate plugin dependencies
124
+ */
125
+ validateDependencies(plugin: Plugin, registry: PluginRegistry): PluginValidationResult;
126
+ /**
127
+ * Validate plugin compatibility with SonicJS version
128
+ */
129
+ validateCompatibility(plugin: Plugin, sonicVersion: string): PluginValidationResult;
130
+ /**
131
+ * Check if two version ranges are compatible
132
+ */
133
+ private isCompatible;
134
+ /**
135
+ * Validate plugin security constraints
136
+ */
137
+ validateSecurity(plugin: Plugin): PluginValidationResult;
138
+ }
139
+
140
+ /**
141
+ * Plugin Registry Implementation
142
+ *
143
+ * Manages plugin registration, activation, and lifecycle
144
+ */
145
+
146
+ declare class PluginRegistryImpl implements PluginRegistry {
147
+ private plugins;
148
+ private configs;
149
+ private statuses;
150
+ private validator;
151
+ constructor(validator?: PluginValidator);
152
+ /**
153
+ * Get plugin by name
154
+ */
155
+ get(name: string): Plugin | undefined;
156
+ /**
157
+ * Get all registered plugins
158
+ */
159
+ getAll(): Plugin[];
160
+ /**
161
+ * Get active plugins
162
+ */
163
+ getActive(): Plugin[];
164
+ /**
165
+ * Register a plugin
166
+ */
167
+ register(plugin: Plugin): Promise<void>;
168
+ /**
169
+ * Unregister a plugin
170
+ */
171
+ unregister(name: string): Promise<void>;
172
+ /**
173
+ * Check if plugin is registered
174
+ */
175
+ has(name: string): boolean;
176
+ /**
177
+ * Activate a plugin
178
+ */
179
+ activate(name: string): Promise<void>;
180
+ /**
181
+ * Deactivate a plugin
182
+ */
183
+ deactivate(name: string): Promise<void>;
184
+ /**
185
+ * Get plugin configuration
186
+ */
187
+ getConfig(name: string): PluginConfig | undefined;
188
+ /**
189
+ * Set plugin configuration
190
+ */
191
+ setConfig(name: string, config: PluginConfig): void;
192
+ /**
193
+ * Get plugin status
194
+ */
195
+ getStatus(name: string): PluginStatus | undefined;
196
+ /**
197
+ * Get all plugin statuses
198
+ */
199
+ getAllStatuses(): Map<string, PluginStatus>;
200
+ /**
201
+ * Update plugin status
202
+ */
203
+ private updateStatus;
204
+ /**
205
+ * Get plugins that depend on the specified plugin
206
+ */
207
+ private getDependents;
208
+ /**
209
+ * Get dependency graph
210
+ */
211
+ getDependencyGraph(): Map<string, string[]>;
212
+ /**
213
+ * Resolve plugin load order based on dependencies
214
+ */
215
+ resolveLoadOrder(): string[];
216
+ /**
217
+ * Export plugin configuration
218
+ */
219
+ exportConfig(): {
220
+ plugins: PluginConfig[];
221
+ };
222
+ /**
223
+ * Import plugin configuration
224
+ */
225
+ importConfig(config: {
226
+ plugins: PluginConfig[];
227
+ }): void;
228
+ /**
229
+ * Clear all plugins (useful for testing)
230
+ */
231
+ clear(): void;
232
+ /**
233
+ * Get registry statistics
234
+ */
235
+ getStats(): {
236
+ total: number;
237
+ active: number;
238
+ inactive: number;
239
+ withErrors: number;
240
+ };
241
+ }
242
+
243
+ /**
244
+ * Plugin Manager
245
+ *
246
+ * Central orchestrator for the plugin system
247
+ */
248
+
249
+ declare class PluginManager implements PluginManager$1 {
250
+ readonly registry: PluginRegistry;
251
+ readonly hooks: HookSystem;
252
+ private validator;
253
+ private context?;
254
+ private scopedHooks;
255
+ private pluginRoutes;
256
+ constructor();
257
+ /**
258
+ * Initialize plugin system
259
+ */
260
+ initialize(context: PluginContext): Promise<void>;
261
+ /**
262
+ * Load plugins from configuration
263
+ */
264
+ loadPlugins(configs: PluginConfig[]): Promise<void>;
265
+ /**
266
+ * Install a plugin
267
+ */
268
+ install(plugin: Plugin, config?: PluginConfig): Promise<void>;
269
+ /**
270
+ * Uninstall a plugin
271
+ */
272
+ uninstall(name: string): Promise<void>;
273
+ /**
274
+ * Get plugin status
275
+ */
276
+ getStatus(name: string): PluginStatus;
277
+ /**
278
+ * Get all plugin statuses
279
+ */
280
+ getAllStatuses(): PluginStatus[];
281
+ /**
282
+ * Register plugin extensions (routes, middleware, etc.)
283
+ */
284
+ private registerPluginExtensions;
285
+ /**
286
+ * Unregister plugin extensions
287
+ */
288
+ private unregisterPluginExtensions;
289
+ /**
290
+ * Update plugin status
291
+ */
292
+ private updatePluginStatus;
293
+ /**
294
+ * Create a logger for a plugin
295
+ */
296
+ private createLogger;
297
+ /**
298
+ * Get plugin routes for mounting in main app
299
+ */
300
+ getPluginRoutes(): Map<string, Hono>;
301
+ /**
302
+ * Get plugin middleware for main app
303
+ */
304
+ getPluginMiddleware(): Array<{
305
+ name: string;
306
+ handler: any;
307
+ priority: number;
308
+ global: boolean;
309
+ }>;
310
+ /**
311
+ * Execute shutdown procedures
312
+ */
313
+ shutdown(): Promise<void>;
314
+ /**
315
+ * Get plugin system statistics
316
+ */
317
+ getStats(): {
318
+ registry: ReturnType<PluginRegistryImpl['getStats']>;
319
+ hooks: Array<{
320
+ hookName: string;
321
+ handlerCount: number;
322
+ }>;
323
+ routes: number;
324
+ middleware: number;
325
+ };
326
+ }
327
+
328
+ export { HookSystemImpl as H, PluginRegistryImpl as P, ScopedHookSystem as S, HookUtils as a, PluginManager as b, PluginValidator as c };