@sonicjs-cms/core 3.0.0-beta.17 → 3.0.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-RQ6N3FTV.js → chunk-2XAQTPAE.js} +3 -2
- package/dist/chunk-2XAQTPAE.js.map +1 -0
- package/dist/{chunk-4BTBSXMR.cjs → chunk-36Z3AKX3.cjs} +3 -2
- package/dist/chunk-36Z3AKX3.cjs.map +1 -0
- package/dist/{chunk-PDC7DLOV.js → chunk-3TMTYJAJ.js} +7 -3
- package/dist/chunk-3TMTYJAJ.js.map +1 -0
- package/dist/{chunk-Y34TG4TF.js → chunk-6Z7MZDDF.js} +3 -3
- package/dist/{chunk-Y34TG4TF.js.map → chunk-6Z7MZDDF.js.map} +1 -1
- package/dist/{chunk-RIFCRZYC.js → chunk-BCE6XJYG.js} +3 -3
- package/dist/{chunk-RIFCRZYC.js.map → chunk-BCE6XJYG.js.map} +1 -1
- package/dist/{chunk-MJZI3NHR.cjs → chunk-BUMHSDRW.cjs} +139 -73
- package/dist/chunk-BUMHSDRW.cjs.map +1 -0
- package/dist/{chunk-KDRHGEUF.cjs → chunk-E6LGR24C.cjs} +3 -3
- package/dist/{chunk-KDRHGEUF.cjs.map → chunk-E6LGR24C.cjs.map} +1 -1
- package/dist/{chunk-7YMMCIWY.cjs → chunk-ETRNDMB2.cjs} +3 -2
- package/dist/chunk-ETRNDMB2.cjs.map +1 -0
- package/dist/{chunk-C3KSTUEA.cjs → chunk-FAADMKJX.cjs} +4 -2
- package/dist/chunk-FAADMKJX.cjs.map +1 -0
- package/dist/{chunk-KMCLNO4K.cjs → chunk-GMMCCIQO.cjs} +3 -3
- package/dist/{chunk-KMCLNO4K.cjs.map → chunk-GMMCCIQO.cjs.map} +1 -1
- package/dist/{chunk-CYDEM6SY.js → chunk-GY2XWOG3.js} +23 -17
- package/dist/chunk-GY2XWOG3.js.map +1 -0
- package/dist/{chunk-KXTGLSFY.js → chunk-KCS65CVN.js} +133 -67
- package/dist/chunk-KCS65CVN.js.map +1 -0
- package/dist/{chunk-JEQ7FLOD.cjs → chunk-KIGVVO6N.cjs} +16 -10
- package/dist/chunk-KIGVVO6N.cjs.map +1 -0
- package/dist/{chunk-W36OZTJ5.cjs → chunk-LTZ5WYOK.cjs} +10 -6
- package/dist/chunk-LTZ5WYOK.cjs.map +1 -0
- package/dist/{chunk-ZHQP75SR.cjs → chunk-NOT5YX23.cjs} +19 -18
- package/dist/chunk-NOT5YX23.cjs.map +1 -0
- package/dist/{chunk-73KSHGOT.js → chunk-PXWT5OWC.js} +3 -2
- package/dist/chunk-PXWT5OWC.js.map +1 -0
- package/dist/{chunk-3RNDJAZ5.cjs → chunk-QSDN2CKI.cjs} +4 -4
- package/dist/{chunk-3RNDJAZ5.cjs.map → chunk-QSDN2CKI.cjs.map} +1 -1
- package/dist/{chunk-IQZA2OY5.js → chunk-SOZUG52O.js} +3 -3
- package/dist/{chunk-IQZA2OY5.js.map → chunk-SOZUG52O.js.map} +1 -1
- package/dist/{chunk-YA4V4Y5U.js → chunk-TAB4XUUP.js} +4 -2
- package/dist/chunk-TAB4XUUP.js.map +1 -0
- package/dist/{chunk-GCDZZNIN.js → chunk-UWUP2VMT.js} +16 -10
- package/dist/chunk-UWUP2VMT.js.map +1 -0
- package/dist/{chunk-NOBU34HS.cjs → chunk-V6EZYAWF.cjs} +279 -273
- package/dist/chunk-V6EZYAWF.cjs.map +1 -0
- package/dist/{chunk-OSMPF3PU.js → chunk-ZQLBHD3J.js} +8 -7
- package/dist/chunk-ZQLBHD3J.js.map +1 -0
- package/dist/config-6FB2BXMP.js +6 -0
- package/dist/{config-SM2UWSDN.js.map → config-6FB2BXMP.js.map} +1 -1
- package/dist/{config-YCRSU7ZP.cjs → config-OCH7S4WK.cjs} +5 -5
- package/dist/{config-YCRSU7ZP.cjs.map → config-OCH7S4WK.cjs.map} +1 -1
- package/dist/document-projection-4HG75S5S.js +4 -0
- package/dist/{document-projection-YYMC6I4U.js.map → document-projection-4HG75S5S.js.map} +1 -1
- package/dist/document-projection-JQHSTSFD.cjs +13 -0
- package/dist/{document-projection-TDWRJX3Z.cjs.map → document-projection-JQHSTSFD.cjs.map} +1 -1
- package/dist/index.cjs +327 -291
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +56 -20
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +35 -35
- package/dist/middleware.js +6 -6
- package/dist/migrations-GN6H36JS.cjs +13 -0
- package/dist/{migrations-QIRBSVJJ.cjs.map → migrations-GN6H36JS.cjs.map} +1 -1
- package/dist/migrations-KFRAQ4CE.js +4 -0
- package/dist/{migrations-7G6QBDSM.js.map → migrations-KFRAQ4CE.js.map} +1 -1
- package/dist/plugins.cjs +40 -40
- package/dist/plugins.js +3 -3
- package/dist/rbac-7QZ4JZ2E.cjs +14 -0
- package/dist/{rbac-ESTOCVT2.cjs.map → rbac-7QZ4JZ2E.cjs.map} +1 -1
- package/dist/rbac-Y43IEQOP.js +5 -0
- package/dist/{rbac-4QLDXIDF.js.map → rbac-Y43IEQOP.js.map} +1 -1
- package/dist/routes.cjs +29 -29
- package/dist/routes.js +9 -9
- package/dist/services.cjs +30 -30
- package/dist/services.js +3 -3
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4BTBSXMR.cjs.map +0 -1
- package/dist/chunk-73KSHGOT.js.map +0 -1
- package/dist/chunk-7YMMCIWY.cjs.map +0 -1
- package/dist/chunk-C3KSTUEA.cjs.map +0 -1
- package/dist/chunk-CYDEM6SY.js.map +0 -1
- package/dist/chunk-GCDZZNIN.js.map +0 -1
- package/dist/chunk-JEQ7FLOD.cjs.map +0 -1
- package/dist/chunk-KXTGLSFY.js.map +0 -1
- package/dist/chunk-MJZI3NHR.cjs.map +0 -1
- package/dist/chunk-NOBU34HS.cjs.map +0 -1
- package/dist/chunk-OSMPF3PU.js.map +0 -1
- package/dist/chunk-PDC7DLOV.js.map +0 -1
- package/dist/chunk-RQ6N3FTV.js.map +0 -1
- package/dist/chunk-W36OZTJ5.cjs.map +0 -1
- package/dist/chunk-YA4V4Y5U.js.map +0 -1
- package/dist/chunk-ZHQP75SR.cjs.map +0 -1
- package/dist/config-SM2UWSDN.js +0 -6
- package/dist/document-projection-TDWRJX3Z.cjs +0 -13
- package/dist/document-projection-YYMC6I4U.js +0 -4
- package/dist/migrations-7G6QBDSM.js +0 -4
- package/dist/migrations-QIRBSVJJ.cjs +0 -13
- package/dist/rbac-4QLDXIDF.js +0 -5
- package/dist/rbac-ESTOCVT2.cjs +0 -14
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { createAuth } from './chunk-
|
|
2
|
-
import { getEmailService, hasEmailService, setEmailService, invalidateVariablesCache, resolveVariablesInObject, resolveDocScope, denyIfNotAllowed, DocumentRepository, dispatchHookEvent, getCustomData, createDocumentSchema, renderTable, getVariablesCached, setVariablesCache, TenantService, isValidMemberRole, renderConfirmationDialog, getConfirmationDialogScript, VALID_MEMBER_ROLES, userProfilesPlugin, lexicalEditorPlugin, api_media_default, api_system_default, apiDocumentsRoutes, api_default, adminDocumentsRoutes, admin_api_default, adminCollectionsRoutes, adminSettingsRoutes, router2, admin_content_default, adminMediaRoutes, router, adminPluginRoutes, adminLogsRoutes, userRoutes, auth_default, test_cleanup_default } from './chunk-
|
|
3
|
-
export { DocumentRepository, ROUTES_INFO, admin_api_default as adminApiRoutes, adminCheckboxRoutes, adminCollectionsRoutes, admin_content_default as adminContentRoutes, router as adminDashboardRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, userRoutes as adminUsersRoutes, api_content_crud_default as apiContentCrudRoutes, api_media_default as apiMediaRoutes, api_default as apiRoutes, api_system_default as apiSystemRoutes, auth_default as authRoutes, createUserProfilesPlugin, defineUserProfile, getUserProfileConfig, userProfilesPlugin } from './chunk-
|
|
1
|
+
import { createAuth } from './chunk-SOZUG52O.js';
|
|
2
|
+
import { getEmailService, hasEmailService, setEmailService, invalidateVariablesCache, resolveVariablesInObject, resolveDocScope, denyIfNotAllowed, DocumentRepository, dispatchHookEvent, getCustomData, createDocumentSchema, renderTable, getVariablesCached, setVariablesCache, TenantService, isValidMemberRole, renderConfirmationDialog, getConfirmationDialogScript, VALID_MEMBER_ROLES, userProfilesPlugin, lexicalEditorPlugin, api_media_default, api_system_default, apiDocumentsRoutes, api_default, adminDocumentsRoutes, admin_api_default, adminCollectionsRoutes, adminSettingsRoutes, router2, admin_content_default, adminMediaRoutes, router, adminPluginRoutes, adminLogsRoutes, userRoutes, auth_default, test_cleanup_default } from './chunk-GY2XWOG3.js';
|
|
3
|
+
export { DocumentRepository, ROUTES_INFO, admin_api_default as adminApiRoutes, adminCheckboxRoutes, adminCollectionsRoutes, admin_content_default as adminContentRoutes, router as adminDashboardRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, userRoutes as adminUsersRoutes, api_content_crud_default as apiContentCrudRoutes, api_media_default as apiMediaRoutes, api_default as apiRoutes, api_system_default as apiSystemRoutes, auth_default as authRoutes, createUserProfilesPlugin, defineUserProfile, getUserProfileConfig, userProfilesPlugin } from './chunk-GY2XWOG3.js';
|
|
4
4
|
import './chunk-VVYVFCML.js';
|
|
5
5
|
import './chunk-RMRJGMDE.js';
|
|
6
|
-
import { SettingsService, setAppInstance } from './chunk-
|
|
7
|
-
export { Logger, getLogger, initLogger } from './chunk-
|
|
6
|
+
import { SettingsService, setAppInstance } from './chunk-2XAQTPAE.js';
|
|
7
|
+
export { Logger, getLogger, initLogger } from './chunk-2XAQTPAE.js';
|
|
8
8
|
import { getAllCacheStats, CACHE_CONFIGS, getCacheService, clearAllCaches, parseCacheKey } from './chunk-K25XHMM3.js';
|
|
9
9
|
import { schema_exports } from './chunk-AI663NBO.js';
|
|
10
10
|
export { apiTokens, content, contentVersions, insertContentSchema, insertLogConfigSchema, insertMediaSchema, insertPluginActivityLogSchema, insertPluginAssetSchema, insertPluginHookSchema, insertPluginRouteSchema, insertPluginSchema, insertSystemLogSchema, insertUserSchema, insertWorkflowHistorySchema, logConfig, media, pluginActivityLog, pluginAssets, pluginHooks, pluginRoutes, plugins, selectContentSchema, selectLogConfigSchema, selectMediaSchema, selectPluginActivityLogSchema, selectPluginAssetSchema, selectPluginHookSchema, selectPluginRouteSchema, selectPluginSchema, selectSystemLogSchema, selectUserSchema, selectWorkflowHistorySchema, systemLogs, users, workflowHistory } from './chunk-AI663NBO.js';
|
|
11
|
-
import { requireAuth, DocumentTypeRegistry, requireRbac, requireRole, getJwtExpirySecondsFromDb, AuthManager, metricsMiddleware, bootstrapMiddleware, securityHeadersMiddleware, csrfProtection } from './chunk-
|
|
12
|
-
export { AuthManager, PermissionManager, bootstrapDocumentTypes, bootstrapMiddleware, cacheHeaders, compressionMiddleware, detailedLoggingMiddleware, getActivePlugins, isPluginActive, logActivity, loggingMiddleware, optionalAuth, performanceLoggingMiddleware, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeadersMiddleware as securityHeaders, securityLoggingMiddleware } from './chunk-
|
|
13
|
-
import { RbacService, DocumentsService } from './chunk-
|
|
14
|
-
export { DocumentsService, RbacService } from './chunk-
|
|
15
|
-
import { nanoid } from './chunk-
|
|
16
|
-
import { PluginService, PLUGIN_REGISTRY, invalidateTenantCache, getCollectionRegistry, TENANT_COOKIE, MULTI_TENANT_PLUGIN_ID, collectionRecordToRow, tenantMiddleware } from './chunk-
|
|
17
|
-
export { PluginBootstrapService, PluginService as PluginServiceClass, getAvailableCollectionNames, loadCollectionConfig, loadCollectionConfigs, registerCollections, validateCollectionConfig } from './chunk-
|
|
18
|
-
export { MigrationService } from './chunk-
|
|
11
|
+
import { requireAuth, DocumentTypeRegistry, requireRbac, requireRole, getJwtExpirySecondsFromDb, AuthManager, metricsMiddleware, bootstrapMiddleware, securityHeadersMiddleware, csrfProtection } from './chunk-ZQLBHD3J.js';
|
|
12
|
+
export { AuthManager, PermissionManager, bootstrapDocumentTypes, bootstrapMiddleware, cacheHeaders, compressionMiddleware, detailedLoggingMiddleware, getActivePlugins, isPluginActive, logActivity, loggingMiddleware, optionalAuth, performanceLoggingMiddleware, requireActivePlugin, requireActivePlugins, requireAnyPermission, requireAuth, requirePermission, requireRole, securityHeadersMiddleware as securityHeaders, securityLoggingMiddleware } from './chunk-ZQLBHD3J.js';
|
|
13
|
+
import { RbacService, DocumentsService } from './chunk-3TMTYJAJ.js';
|
|
14
|
+
export { DocumentsService, RbacService } from './chunk-3TMTYJAJ.js';
|
|
15
|
+
import { nanoid } from './chunk-UWUP2VMT.js';
|
|
16
|
+
import { PluginService, PLUGIN_REGISTRY, invalidateTenantCache, getCollectionRegistry, TENANT_COOKIE, MULTI_TENANT_PLUGIN_ID, collectionRecordToRow, tenantMiddleware } from './chunk-TAB4XUUP.js';
|
|
17
|
+
export { PluginBootstrapService, PluginService as PluginServiceClass, getAvailableCollectionNames, loadCollectionConfig, loadCollectionConfigs, registerCollections, validateCollectionConfig } from './chunk-TAB4XUUP.js';
|
|
18
|
+
export { MigrationService } from './chunk-PXWT5OWC.js';
|
|
19
19
|
export { renderFilterBar } from './chunk-JQISFW6U.js';
|
|
20
20
|
import { renderAdminLayout } from './chunk-OBA2RYZN.js';
|
|
21
21
|
export { getConfirmationDialogScript, renderAlert, renderConfirmationDialog, renderForm, renderFormField, renderPagination, renderTable } from './chunk-OBA2RYZN.js';
|
|
22
22
|
import { init_admin_layout_catalyst_template, renderAdminLayoutCatalyst } from './chunk-5V62WT6M.js';
|
|
23
23
|
export { renderAdminLayoutCatalyst } from './chunk-5V62WT6M.js';
|
|
24
|
-
import { TurnstileService, HookSystemImpl, createPluginWirer, registerPluginRoutes, setPluginMenu, resolvePluginMenuItems } from './chunk-
|
|
25
|
-
export { HookSystemImpl, HookUtils, PluginDependencyCycleError, PluginManager as PluginManagerClass, PluginRegistryImpl, PluginValidator as PluginValidatorClass, RegisterPluginsError, ScopedHookSystem as ScopedHookSystemClass, collectCronSchedules, collectCrons, createScheduledHandler, dispatchCronTick, getPluginMenu, registerPlugins, resetPluginMenu, resolvePluginMenuItems, setPluginMenu, topoSort } from './chunk-
|
|
26
|
-
import { definePlugin, setPluginDefinitions } from './chunk-
|
|
27
|
-
export { applySchemaDefaults, definePlugin, isDefinedPlugin, parseConfigSchema, parseFormDataToSettings, renderSchemaFields } from './chunk-
|
|
24
|
+
import { TurnstileService, HookSystemImpl, createPluginWirer, registerPluginRoutes, setPluginMenu, resolvePluginMenuItems } from './chunk-KCS65CVN.js';
|
|
25
|
+
export { HookSystemImpl, HookUtils, PluginDependencyCycleError, PluginManager as PluginManagerClass, PluginRegistryImpl, PluginValidator as PluginValidatorClass, RegisterPluginsError, ScopedHookSystem as ScopedHookSystemClass, collectCronSchedules, collectCrons, createScheduledHandler, dispatchCronTick, getPluginMenu, registerPlugins, resetPluginMenu, resolvePluginMenuItems, setPluginMenu, topoSort } from './chunk-KCS65CVN.js';
|
|
26
|
+
import { definePlugin, setPluginDefinitions } from './chunk-6Z7MZDDF.js';
|
|
27
|
+
export { applySchemaDefaults, definePlugin, isDefinedPlugin, parseConfigSchema, parseFormDataToSettings, renderSchemaFields } from './chunk-6Z7MZDDF.js';
|
|
28
28
|
import { setHookSystem } from './chunk-RNZFGN4R.js';
|
|
29
29
|
export { getHookSystem, getTypedHooks, hasHookSystem, resetHookSystem, setHookSystem } from './chunk-RNZFGN4R.js';
|
|
30
30
|
export { QueryFilterBuilder, TemplateRenderer, buildQuery, renderTemplate, templateRenderer } from './chunk-QZGABF2M.js';
|
|
31
31
|
export { metricsTracker } from './chunk-FICTAGD4.js';
|
|
32
32
|
import './chunk-X7ZAEI5S.js';
|
|
33
|
-
import { getCoreVersion, package_default } from './chunk-
|
|
34
|
-
export { SONICJS_VERSION, getCoreVersion } from './chunk-
|
|
33
|
+
import { getCoreVersion, package_default } from './chunk-BCE6XJYG.js';
|
|
34
|
+
export { SONICJS_VERSION, getCoreVersion } from './chunk-BCE6XJYG.js';
|
|
35
35
|
import { escapeHtml, sanitizeInput } from './chunk-TQABQWOP.js';
|
|
36
36
|
export { escapeHtml, sanitizeInput, sanitizeObject } from './chunk-TQABQWOP.js';
|
|
37
37
|
export { HOOKS } from './chunk-QXOZI5Q2.js';
|
|
@@ -51,6 +51,7 @@ var DatabaseToolsService = class {
|
|
|
51
51
|
constructor(db) {
|
|
52
52
|
this.db = db;
|
|
53
53
|
}
|
|
54
|
+
db;
|
|
54
55
|
/**
|
|
55
56
|
* Get database statistics
|
|
56
57
|
*/
|
|
@@ -909,6 +910,7 @@ var EmailSettingsService = class {
|
|
|
909
910
|
constructor(db) {
|
|
910
911
|
this.db = db;
|
|
911
912
|
}
|
|
913
|
+
db;
|
|
912
914
|
async load() {
|
|
913
915
|
let row = null;
|
|
914
916
|
try {
|
|
@@ -937,6 +939,8 @@ var SiteConfigService = class {
|
|
|
937
939
|
this.db = db;
|
|
938
940
|
this.env = env;
|
|
939
941
|
}
|
|
942
|
+
db;
|
|
943
|
+
env;
|
|
940
944
|
async load() {
|
|
941
945
|
const settings = new SettingsService(this.db);
|
|
942
946
|
const general = await settings.getGeneralSettings();
|
|
@@ -1274,6 +1278,8 @@ var EmailValidationError = class extends Error {
|
|
|
1274
1278
|
this.reason = reason;
|
|
1275
1279
|
this.name = "EmailValidationError";
|
|
1276
1280
|
}
|
|
1281
|
+
field;
|
|
1282
|
+
reason;
|
|
1277
1283
|
code = "EMAIL_VALIDATION_FAILED";
|
|
1278
1284
|
};
|
|
1279
1285
|
|
|
@@ -1309,6 +1315,9 @@ var CfGraphqlClient = class {
|
|
|
1309
1315
|
throw new EmailValidationError("apiToken", "EMAIL_API_TOKEN is required for GraphQL queries");
|
|
1310
1316
|
}
|
|
1311
1317
|
}
|
|
1318
|
+
zoneId;
|
|
1319
|
+
apiToken;
|
|
1320
|
+
fetchImpl;
|
|
1312
1321
|
async queryEmailSends(input) {
|
|
1313
1322
|
const startIso = new Date(input.startSeconds * 1e3).toISOString();
|
|
1314
1323
|
const endIso = new Date(input.endSeconds * 1e3).toISOString();
|
|
@@ -1371,6 +1380,7 @@ var EmailLogService = class {
|
|
|
1371
1380
|
constructor(db) {
|
|
1372
1381
|
this.db = db;
|
|
1373
1382
|
}
|
|
1383
|
+
db;
|
|
1374
1384
|
/**
|
|
1375
1385
|
* Records a successful submission to CF Email Service. `status` =
|
|
1376
1386
|
* `'submitted'`, `delivery_state` remains NULL until reconciliation runs.
|
|
@@ -1544,6 +1554,8 @@ var ReconciliationService = class {
|
|
|
1544
1554
|
this.graphql = graphql;
|
|
1545
1555
|
this.emailLog = emailLog;
|
|
1546
1556
|
}
|
|
1557
|
+
graphql;
|
|
1558
|
+
emailLog;
|
|
1547
1559
|
async run(input = {}) {
|
|
1548
1560
|
const windowHours = input.windowHours ?? 24;
|
|
1549
1561
|
const nowMs = input.now ?? Date.now();
|
|
@@ -1952,6 +1964,7 @@ var CloudflareEmailProvider = class {
|
|
|
1952
1964
|
constructor(binding) {
|
|
1953
1965
|
this.binding = binding;
|
|
1954
1966
|
}
|
|
1967
|
+
binding;
|
|
1955
1968
|
name = "cloudflare";
|
|
1956
1969
|
isConfigured() {
|
|
1957
1970
|
return !!this.binding;
|
|
@@ -2134,6 +2147,7 @@ var OTPService = class {
|
|
|
2134
2147
|
constructor(db) {
|
|
2135
2148
|
this.db = db;
|
|
2136
2149
|
}
|
|
2150
|
+
db;
|
|
2137
2151
|
/**
|
|
2138
2152
|
* Generate a secure random OTP code
|
|
2139
2153
|
*/
|
|
@@ -2768,6 +2782,7 @@ var OAuthService = class {
|
|
|
2768
2782
|
constructor(db) {
|
|
2769
2783
|
this.db = db;
|
|
2770
2784
|
}
|
|
2785
|
+
db;
|
|
2771
2786
|
/**
|
|
2772
2787
|
* Build the authorization redirect URL for a provider.
|
|
2773
2788
|
*/
|
|
@@ -3284,6 +3299,7 @@ var EmbeddingService = class {
|
|
|
3284
3299
|
constructor(ai) {
|
|
3285
3300
|
this.ai = ai;
|
|
3286
3301
|
}
|
|
3302
|
+
ai;
|
|
3287
3303
|
/**
|
|
3288
3304
|
* Generate embedding for a single text
|
|
3289
3305
|
*/
|
|
@@ -3488,6 +3504,9 @@ var CustomRAGService = class {
|
|
|
3488
3504
|
this.embeddingService = new EmbeddingService(ai);
|
|
3489
3505
|
this.chunkingService = new ChunkingService();
|
|
3490
3506
|
}
|
|
3507
|
+
db;
|
|
3508
|
+
ai;
|
|
3509
|
+
vectorize;
|
|
3491
3510
|
embeddingService;
|
|
3492
3511
|
chunkingService;
|
|
3493
3512
|
/**
|
|
@@ -3778,6 +3797,9 @@ var AISearchService = class {
|
|
|
3778
3797
|
console.log("[AISearchService] Custom RAG not available, using keyword search only");
|
|
3779
3798
|
}
|
|
3780
3799
|
}
|
|
3800
|
+
db;
|
|
3801
|
+
ai;
|
|
3802
|
+
vectorize;
|
|
3781
3803
|
customRAG;
|
|
3782
3804
|
/**
|
|
3783
3805
|
* Get plugin settings
|
|
@@ -4218,6 +4240,9 @@ var IndexManager = class {
|
|
|
4218
4240
|
console.log("[IndexManager] Custom RAG initialized");
|
|
4219
4241
|
}
|
|
4220
4242
|
}
|
|
4243
|
+
db;
|
|
4244
|
+
ai;
|
|
4245
|
+
vectorize;
|
|
4221
4246
|
customRAG;
|
|
4222
4247
|
/**
|
|
4223
4248
|
* Index all content items within a collection using Custom RAG
|
|
@@ -5151,6 +5176,8 @@ var SecurityAuditService = class {
|
|
|
5151
5176
|
tenantId: TENANT
|
|
5152
5177
|
});
|
|
5153
5178
|
}
|
|
5179
|
+
db;
|
|
5180
|
+
settings;
|
|
5154
5181
|
docsService;
|
|
5155
5182
|
async logEvent(event) {
|
|
5156
5183
|
const doc = await this.docsService.create({
|
|
@@ -6094,6 +6121,7 @@ var BruteForceDetector = class {
|
|
|
6094
6121
|
this.kv = kv;
|
|
6095
6122
|
this.settings = settings || DEFAULT_SETTINGS2.bruteForce;
|
|
6096
6123
|
}
|
|
6124
|
+
kv;
|
|
6097
6125
|
settings;
|
|
6098
6126
|
async recordFailedAttempt(ip, email) {
|
|
6099
6127
|
if (!this.settings.enabled || !this.kv) {
|
|
@@ -6675,6 +6703,8 @@ var ApiKeyService = class {
|
|
|
6675
6703
|
this.db = db;
|
|
6676
6704
|
this.tenantId = tenantId;
|
|
6677
6705
|
}
|
|
6706
|
+
db;
|
|
6707
|
+
tenantId;
|
|
6678
6708
|
docService() {
|
|
6679
6709
|
return new DocumentsService(this.db, {
|
|
6680
6710
|
queryableFields: API_KEY_QUERYABLE,
|
|
@@ -7102,6 +7132,7 @@ var SubscriptionService = class {
|
|
|
7102
7132
|
constructor(db) {
|
|
7103
7133
|
this.db = db;
|
|
7104
7134
|
}
|
|
7135
|
+
db;
|
|
7105
7136
|
/**
|
|
7106
7137
|
* Ensure the subscriptions table exists
|
|
7107
7138
|
*/
|
|
@@ -7340,6 +7371,7 @@ var StripeEventService = class {
|
|
|
7340
7371
|
constructor(db) {
|
|
7341
7372
|
this.db = db;
|
|
7342
7373
|
}
|
|
7374
|
+
db;
|
|
7343
7375
|
async ensureTable() {
|
|
7344
7376
|
await this.db.prepare(`
|
|
7345
7377
|
CREATE TABLE IF NOT EXISTS stripe_events (
|
|
@@ -8036,6 +8068,7 @@ var StripeAPI = class {
|
|
|
8036
8068
|
constructor(secretKey) {
|
|
8037
8069
|
this.secretKey = secretKey;
|
|
8038
8070
|
}
|
|
8071
|
+
secretKey;
|
|
8039
8072
|
baseUrl = "https://api.stripe.com/v1";
|
|
8040
8073
|
/**
|
|
8041
8074
|
* Verify a webhook signature
|
|
@@ -11727,6 +11760,7 @@ var EventTrackingService = class {
|
|
|
11727
11760
|
tenantId: TENANT2
|
|
11728
11761
|
});
|
|
11729
11762
|
}
|
|
11763
|
+
db;
|
|
11730
11764
|
docsService;
|
|
11731
11765
|
async trackEvent(input) {
|
|
11732
11766
|
const doc = await this.docsService.create({
|
|
@@ -16709,7 +16743,7 @@ function createSonicJSApp(config = {}) {
|
|
|
16709
16743
|
if (!user?.userId) return next();
|
|
16710
16744
|
let perms = [];
|
|
16711
16745
|
try {
|
|
16712
|
-
const { RbacService: RbacService2 } = await import('./rbac-
|
|
16746
|
+
const { RbacService: RbacService2 } = await import('./rbac-Y43IEQOP.js');
|
|
16713
16747
|
perms = await new RbacService2(c.env.DB, c.env.CACHE_KV).permissionsForUser(user.userId);
|
|
16714
16748
|
} catch {
|
|
16715
16749
|
return next();
|
|
@@ -17651,6 +17685,8 @@ var RedirectService = class {
|
|
|
17651
17685
|
this.cloudflareService = new CloudflareBulkService(env);
|
|
17652
17686
|
}
|
|
17653
17687
|
}
|
|
17688
|
+
db;
|
|
17689
|
+
env;
|
|
17654
17690
|
cloudflareService = null;
|
|
17655
17691
|
getDocService() {
|
|
17656
17692
|
return new DocumentsService(this.db, {
|