@sonicjs-cms/core 3.0.0-beta.12 → 3.0.0-beta.13
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-R2O6TTQS.js → chunk-3FBZFYSQ.js} +25 -10
- package/dist/chunk-3FBZFYSQ.js.map +1 -0
- package/dist/{chunk-XGH2FVVR.cjs → chunk-6CKXZFED.cjs} +3 -3
- package/dist/{chunk-XGH2FVVR.cjs.map → chunk-6CKXZFED.cjs.map} +1 -1
- package/dist/{chunk-Q3P7Y5VO.js → chunk-6KFX4LAT.js} +4 -4
- package/dist/{chunk-Q3P7Y5VO.js.map → chunk-6KFX4LAT.js.map} +1 -1
- package/dist/{chunk-DMXDQ5YI.js → chunk-BK3NB35S.js} +4 -4
- package/dist/{chunk-DMXDQ5YI.js.map → chunk-BK3NB35S.js.map} +1 -1
- package/dist/{chunk-XHBEFQJ3.js → chunk-EKMN6W5B.js} +3 -3
- package/dist/{chunk-XHBEFQJ3.js.map → chunk-EKMN6W5B.js.map} +1 -1
- package/dist/{chunk-SY7CBACS.cjs → chunk-IM3UG4QW.cjs} +10 -10
- package/dist/{chunk-SY7CBACS.cjs.map → chunk-IM3UG4QW.cjs.map} +1 -1
- package/dist/{chunk-INKP2WNU.js → chunk-IV3NA6WZ.js} +2 -2
- package/dist/{chunk-INKP2WNU.js.map → chunk-IV3NA6WZ.js.map} +1 -1
- package/dist/{chunk-SUHGXAII.js → chunk-KG6GQE6B.js} +2 -2
- package/dist/{chunk-SUHGXAII.js.map → chunk-KG6GQE6B.js.map} +1 -1
- package/dist/{chunk-LLWLHFTD.cjs → chunk-KPQ57HAH.cjs} +2 -2
- package/dist/{chunk-LLWLHFTD.cjs.map → chunk-KPQ57HAH.cjs.map} +1 -1
- package/dist/{chunk-ALNODOY4.js → chunk-PPFQDMZE.js} +3 -3
- package/dist/{chunk-ALNODOY4.js.map → chunk-PPFQDMZE.js.map} +1 -1
- package/dist/{chunk-NYLWNR6T.cjs → chunk-PZGGIJI6.cjs} +4 -4
- package/dist/{chunk-NYLWNR6T.cjs.map → chunk-PZGGIJI6.cjs.map} +1 -1
- package/dist/{chunk-BYLQOBO6.cjs → chunk-VMBQ6NQB.cjs} +13 -13
- package/dist/{chunk-BYLQOBO6.cjs.map → chunk-VMBQ6NQB.cjs.map} +1 -1
- package/dist/{chunk-TV7LRFXH.cjs → chunk-VT77YUTP.cjs} +216 -201
- package/dist/chunk-VT77YUTP.cjs.map +1 -0
- package/dist/{chunk-KI5KMJH2.cjs → chunk-YNYEQP3K.cjs} +2 -2
- package/dist/{chunk-KI5KMJH2.cjs.map → chunk-YNYEQP3K.cjs.map} +1 -1
- package/dist/index.cjs +252 -252
- package/dist/index.js +13 -13
- package/dist/middleware.cjs +32 -32
- package/dist/middleware.js +3 -3
- package/dist/migrations-KKLQ2CEF.js +4 -0
- package/dist/{migrations-MLBACCPF.js.map → migrations-KKLQ2CEF.js.map} +1 -1
- package/dist/migrations-XOXYLHHU.cjs +13 -0
- package/dist/{migrations-AFSCRO56.cjs.map → migrations-XOXYLHHU.cjs.map} +1 -1
- package/dist/plugins.cjs +40 -40
- package/dist/plugins.js +3 -3
- package/dist/routes.cjs +26 -26
- package/dist/routes.js +6 -6
- package/dist/services.cjs +18 -18
- package/dist/services.js +2 -2
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-R2O6TTQS.js.map +0 -1
- package/dist/chunk-TV7LRFXH.cjs.map +0 -1
- package/dist/migrations-AFSCRO56.cjs +0 -13
- package/dist/migrations-MLBACCPF.js +0 -4
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { isFirstUserRegistration, isRegistrationEnabled, authValidationService } from './chunk-IESEVHXL.js';
|
|
2
2
|
import { renderDocumentFormPage, renderAlert } from './chunk-RMRJGMDE.js';
|
|
3
3
|
import { getCacheService, CACHE_CONFIGS, SettingsService, getLogger, getAppInstance, buildRouteList, CATEGORY_INFO } from './chunk-RQ6N3FTV.js';
|
|
4
|
-
import { DocumentTypeRegistry, requireAuth, requireRole, optionalAuth, isPluginActive, rateLimit, AuthManager, getJwtExpirySecondsFromDb, getJwtRefreshGraceSecondsFromDb, logActivity, generateCsrfToken } from './chunk-
|
|
4
|
+
import { DocumentTypeRegistry, requireAuth, requireRole, optionalAuth, isPluginActive, rateLimit, AuthManager, getJwtExpirySecondsFromDb, getJwtRefreshGraceSecondsFromDb, logActivity, generateCsrfToken } from './chunk-BK3NB35S.js';
|
|
5
5
|
import { DocumentsService, documentSecondsToMs, RbacService } from './chunk-BLMTL57B.js';
|
|
6
6
|
import { nanoid } from './chunk-GCDZZNIN.js';
|
|
7
|
-
import { getCollectionRegistry, collectionRecordToRow, loadCollectionConfigs, getVisibleCollections, PluginService, PLUGIN_REGISTRY, findPluginByCodeName, isCodeCollectionInternal, isDbDocTypeInternal, invalidateTenantCache } from './chunk-
|
|
8
|
-
import { MigrationService } from './chunk-
|
|
7
|
+
import { getCollectionRegistry, collectionRecordToRow, loadCollectionConfigs, getVisibleCollections, PluginService, PLUGIN_REGISTRY, findPluginByCodeName, isCodeCollectionInternal, isDbDocTypeInternal, invalidateTenantCache } from './chunk-KG6GQE6B.js';
|
|
8
|
+
import { MigrationService } from './chunk-IV3NA6WZ.js';
|
|
9
9
|
import { renderCheckboxPage, renderAlert as renderAlert$1, renderTable, renderPagination, renderConfirmationDialog, getConfirmationDialogScript, renderAdminLayout, adminLayoutV2, renderForm } from './chunk-OBA2RYZN.js';
|
|
10
10
|
import { init_admin_layout_catalyst_template, renderAdminLayoutCatalyst } from './chunk-5V62WT6M.js';
|
|
11
|
-
import { createServiceSingleton, definePlugin, getPluginDefinition, applySchemaDefaults, renderSchemaFields, parseFormDataToSettings } from './chunk-
|
|
11
|
+
import { createServiceSingleton, definePlugin, getPluginDefinition, applySchemaDefaults, renderSchemaFields, parseFormDataToSettings } from './chunk-EKMN6W5B.js';
|
|
12
12
|
import { hasHookSystem, getTypedHooks } from './chunk-RNZFGN4R.js';
|
|
13
13
|
import { QueryFilterBuilder, getBlocksFieldConfig, parseBlocksValue } from './chunk-QZGABF2M.js';
|
|
14
14
|
import { metricsTracker } from './chunk-FICTAGD4.js';
|
|
15
|
-
import { getCoreVersion } from './chunk-
|
|
15
|
+
import { getCoreVersion } from './chunk-PPFQDMZE.js';
|
|
16
16
|
import { escapeHtml, sanitizeRichText, sanitizeInput } from './chunk-TQABQWOP.js';
|
|
17
17
|
import { Hono } from 'hono';
|
|
18
18
|
import { z } from 'zod';
|
|
@@ -3389,7 +3389,7 @@ adminApiRoutes.patch("/collections/:id", collectionsReadOnly);
|
|
|
3389
3389
|
adminApiRoutes.delete("/collections/:id", collectionsReadOnly);
|
|
3390
3390
|
adminApiRoutes.get("/migrations/status", async (c) => {
|
|
3391
3391
|
try {
|
|
3392
|
-
const { MigrationService: MigrationService2 } = await import('./migrations-
|
|
3392
|
+
const { MigrationService: MigrationService2 } = await import('./migrations-KKLQ2CEF.js');
|
|
3393
3393
|
const db = c.env.DB;
|
|
3394
3394
|
const migrationService = new MigrationService2(db);
|
|
3395
3395
|
const status = await migrationService.getMigrationStatus();
|
|
@@ -3432,7 +3432,7 @@ adminApiRoutes.post("/migrations/run", async (c) => {
|
|
|
3432
3432
|
});
|
|
3433
3433
|
adminApiRoutes.get("/migrations/validate", async (c) => {
|
|
3434
3434
|
try {
|
|
3435
|
-
const { MigrationService: MigrationService2 } = await import('./migrations-
|
|
3435
|
+
const { MigrationService: MigrationService2 } = await import('./migrations-KKLQ2CEF.js');
|
|
3436
3436
|
const db = c.env.DB;
|
|
3437
3437
|
const migrationService = new MigrationService2(db);
|
|
3438
3438
|
const validation = await migrationService.validateSchema();
|
|
@@ -7104,6 +7104,20 @@ authRoutes.post(
|
|
|
7104
7104
|
await setCsrfCookie(c);
|
|
7105
7105
|
const baBody = await baRes.json();
|
|
7106
7106
|
const user = baBody.user ?? {};
|
|
7107
|
+
const tokenTtl = await getJwtExpirySecondsFromDb(c.env.DB, c.env);
|
|
7108
|
+
const token = await AuthManager.generateToken(
|
|
7109
|
+
user.id,
|
|
7110
|
+
user.email,
|
|
7111
|
+
user.role ?? "viewer",
|
|
7112
|
+
c.env.JWT_SECRET,
|
|
7113
|
+
tokenTtl
|
|
7114
|
+
);
|
|
7115
|
+
setCookie(c, "auth_token", token, {
|
|
7116
|
+
httpOnly: true,
|
|
7117
|
+
secure: true,
|
|
7118
|
+
sameSite: "Strict",
|
|
7119
|
+
maxAge: tokenTtl
|
|
7120
|
+
});
|
|
7107
7121
|
return c.json({
|
|
7108
7122
|
user: {
|
|
7109
7123
|
id: user.id,
|
|
@@ -7111,7 +7125,8 @@ authRoutes.post(
|
|
|
7111
7125
|
firstName: user.name?.split(" ")[0] ?? "",
|
|
7112
7126
|
lastName: user.name?.split(" ").slice(1).join(" ") ?? "",
|
|
7113
7127
|
role: user.role ?? "viewer"
|
|
7114
|
-
}
|
|
7128
|
+
},
|
|
7129
|
+
token
|
|
7115
7130
|
});
|
|
7116
7131
|
} catch (error) {
|
|
7117
7132
|
console.error("Login error:", error);
|
|
@@ -26628,5 +26643,5 @@ var ROUTES_INFO = {
|
|
|
26628
26643
|
};
|
|
26629
26644
|
|
|
26630
26645
|
export { DocumentRepository, ROUTES_INFO, TenantService, VALID_MEMBER_ROLES, adminCheckboxRoutes, adminCollectionsRoutes, adminDocumentsRoutes, adminLogsRoutes, adminMediaRoutes, adminPluginRoutes, adminSettingsRoutes, admin_api_default, admin_content_default, apiDocumentsRoutes, api_content_crud_default, api_default, api_media_default, api_system_default, auth_default, createUserProfilesPlugin, defineUserProfile, denyIfNotAllowed, dispatchHookEvent, getConfirmationDialogScript2 as getConfirmationDialogScript, getCustomData, getEmailService, getUserProfileConfig, getVariablesCached, hasEmailService, invalidateVariablesCache, isValidMemberRole, lexicalEditorPlugin, renderConfirmationDialog2 as renderConfirmationDialog, renderTable2 as renderTable, resolveDocScope, resolveVariablesInObject, router, router2, setEmailService, setVariablesCache, test_cleanup_default, userProfilesPlugin, userRoutes };
|
|
26631
|
-
//# sourceMappingURL=chunk-
|
|
26632
|
-
//# sourceMappingURL=chunk-
|
|
26646
|
+
//# sourceMappingURL=chunk-3FBZFYSQ.js.map
|
|
26647
|
+
//# sourceMappingURL=chunk-3FBZFYSQ.js.map
|