@sonicjs-cms/core 2.0.4 → 2.0.7
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 +16 -0
- package/dist/{chunk-4BJGEGX5.cjs → chunk-3R7EQNGO.cjs} +19 -32
- package/dist/chunk-3R7EQNGO.cjs.map +1 -0
- package/dist/{chunk-CDBVZEWR.js → chunk-4MBTSUI6.js} +35 -3
- package/dist/chunk-4MBTSUI6.js.map +1 -0
- package/dist/{chunk-LH4Z7QID.js → chunk-6FR25MPC.js} +111 -3
- package/dist/chunk-6FR25MPC.js.map +1 -0
- package/dist/{chunk-3SPQ3J4N.cjs → chunk-7XEESVSX.cjs} +73 -2
- package/dist/chunk-7XEESVSX.cjs.map +1 -0
- package/dist/{chunk-3NVJ6W27.cjs → chunk-DOR2IU73.cjs} +111 -2
- package/dist/chunk-DOR2IU73.cjs.map +1 -0
- package/dist/{chunk-CQ2VMJQO.js → chunk-JB2NUJJ5.js} +253 -85
- package/dist/chunk-JB2NUJJ5.js.map +1 -0
- package/dist/{chunk-5APKEYFK.cjs → chunk-KHNSPJ6X.cjs} +5 -5
- package/dist/{chunk-5APKEYFK.cjs.map → chunk-KHNSPJ6X.cjs.map} +1 -1
- package/dist/{chunk-RYQCT2IV.js → chunk-LS5CMDNL.js} +3 -3
- package/dist/{chunk-RYQCT2IV.js.map → chunk-LS5CMDNL.js.map} +1 -1
- package/dist/{chunk-M6FPVS7E.js → chunk-O7LMFJMZ.js} +16 -29
- package/dist/chunk-O7LMFJMZ.js.map +1 -0
- package/dist/{chunk-RZW752PE.cjs → chunk-OOV64BK4.cjs} +429 -261
- package/dist/chunk-OOV64BK4.cjs.map +1 -0
- package/dist/{chunk-BRPONFW6.cjs → chunk-RSFXIU6A.cjs} +14 -14
- package/dist/{chunk-BRPONFW6.cjs.map → chunk-RSFXIU6A.cjs.map} +1 -1
- package/dist/{chunk-LEG4KNFP.cjs → chunk-YGVWY6KO.cjs} +35 -3
- package/dist/chunk-YGVWY6KO.cjs.map +1 -0
- package/dist/{chunk-3LZ6TLPC.js → chunk-YHLLVUJC.js} +73 -2
- package/dist/chunk-YHLLVUJC.js.map +1 -0
- package/dist/{chunk-WKGONLHK.js → chunk-YURRY22X.js} +14 -14
- package/dist/{chunk-WKGONLHK.js.map → chunk-YURRY22X.js.map} +1 -1
- package/dist/index.cjs +886 -137
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +761 -11
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +23 -23
- package/dist/middleware.js +2 -2
- package/dist/routes.cjs +26 -26
- package/dist/routes.js +6 -6
- package/dist/services.cjs +25 -21
- package/dist/services.js +2 -2
- package/dist/templates.cjs +18 -18
- package/dist/templates.js +2 -2
- package/dist/utils.cjs +11 -11
- package/dist/utils.js +1 -1
- package/migrations/006_plugin_system.sql +2 -2
- package/migrations/011_config_managed_collections.sql +1 -0
- package/migrations/018_settings_table.sql +23 -0
- package/package.json +12 -12
- package/dist/chunk-3LZ6TLPC.js.map +0 -1
- package/dist/chunk-3NVJ6W27.cjs.map +0 -1
- package/dist/chunk-3SPQ3J4N.cjs.map +0 -1
- package/dist/chunk-4BJGEGX5.cjs.map +0 -1
- package/dist/chunk-CDBVZEWR.js.map +0 -1
- package/dist/chunk-CQ2VMJQO.js.map +0 -1
- package/dist/chunk-LEG4KNFP.cjs.map +0 -1
- package/dist/chunk-LH4Z7QID.js.map +0 -1
- package/dist/chunk-M6FPVS7E.js.map +0 -1
- package/dist/chunk-RZW752PE.cjs.map +0 -1
|
@@ -279,6 +279,39 @@ function renderAdminLayoutCatalyst(data) {
|
|
|
279
279
|
<!-- Notification Container -->
|
|
280
280
|
<div id="notification-container" class="fixed top-4 right-4 z-50 space-y-2"></div>
|
|
281
281
|
|
|
282
|
+
<!-- Migration Warning Banner (hidden by default) -->
|
|
283
|
+
<div id="migration-banner" class="hidden fixed top-0 left-0 right-0 z-50 bg-amber-500 dark:bg-amber-600 shadow-lg">
|
|
284
|
+
<div class="max-w-7xl mx-auto px-4 py-3 sm:px-6 lg:px-8">
|
|
285
|
+
<div class="flex items-center justify-between flex-wrap">
|
|
286
|
+
<div class="flex items-center flex-1">
|
|
287
|
+
<span class="flex p-2 rounded-lg bg-amber-600 dark:bg-amber-700">
|
|
288
|
+
<svg class="h-5 w-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
289
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"/>
|
|
290
|
+
</svg>
|
|
291
|
+
</span>
|
|
292
|
+
<div class="ml-3">
|
|
293
|
+
<p class="text-sm font-medium text-white">
|
|
294
|
+
<span id="migration-count"></span> pending database migration(s) detected
|
|
295
|
+
</p>
|
|
296
|
+
<p class="text-xs text-amber-100 dark:text-amber-200 mt-1">
|
|
297
|
+
Run: <code class="bg-amber-700 dark:bg-amber-800 px-2 py-0.5 rounded font-mono text-white">wrangler d1 migrations apply DB --local</code>
|
|
298
|
+
</p>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
<div class="flex items-center gap-2">
|
|
302
|
+
<a href="/admin/settings/migrations" class="text-xs font-semibold text-white hover:text-amber-100 underline">
|
|
303
|
+
View Details
|
|
304
|
+
</a>
|
|
305
|
+
<button onclick="closeMigrationBanner()" class="p-1 rounded-md text-white hover:bg-amber-600 dark:hover:bg-amber-700 focus:outline-none focus:ring-2 focus:ring-white">
|
|
306
|
+
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
307
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
308
|
+
</svg>
|
|
309
|
+
</button>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
282
315
|
<script>
|
|
283
316
|
// Mobile sidebar toggle
|
|
284
317
|
function openMobileSidebar() {
|
|
@@ -347,6 +380,44 @@ function renderAdminLayoutCatalyst(data) {
|
|
|
347
380
|
if (localStorage.getItem('darkMode') === 'false') {
|
|
348
381
|
document.documentElement.classList.remove('dark');
|
|
349
382
|
}
|
|
383
|
+
|
|
384
|
+
// Migration banner functions
|
|
385
|
+
function closeMigrationBanner() {
|
|
386
|
+
const banner = document.getElementById('migration-banner');
|
|
387
|
+
if (banner) {
|
|
388
|
+
banner.classList.add('hidden');
|
|
389
|
+
// Store in session storage so it doesn't show again during this session
|
|
390
|
+
sessionStorage.setItem('migrationBannerDismissed', 'true');
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
// Check for pending migrations on page load
|
|
395
|
+
async function checkPendingMigrations() {
|
|
396
|
+
// Don't check if user dismissed the banner in this session
|
|
397
|
+
if (sessionStorage.getItem('migrationBannerDismissed') === 'true') {
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
try {
|
|
402
|
+
const response = await fetch('/api/migrations/status');
|
|
403
|
+
if (response.ok) {
|
|
404
|
+
const data = await response.json();
|
|
405
|
+
if (data.pendingMigrations > 0) {
|
|
406
|
+
const banner = document.getElementById('migration-banner');
|
|
407
|
+
const countElement = document.getElementById('migration-count');
|
|
408
|
+
if (banner && countElement) {
|
|
409
|
+
countElement.textContent = data.pendingMigrations;
|
|
410
|
+
banner.classList.remove('hidden');
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
} catch (error) {
|
|
415
|
+
console.error('Failed to check migration status:', error);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
// Check for pending migrations when the page loads
|
|
420
|
+
document.addEventListener('DOMContentLoaded', checkPendingMigrations);
|
|
350
421
|
</script>
|
|
351
422
|
</body>
|
|
352
423
|
</html>`;
|
|
@@ -3672,5 +3743,5 @@ function renderFormField(field) {
|
|
|
3672
3743
|
}
|
|
3673
3744
|
|
|
3674
3745
|
export { adminLayoutV2, getConfirmationDialogScript, init_admin_layout_catalyst_template, init_logo_template, renderAdminLayout, renderAdminLayoutCatalyst, renderAlert, renderCheckboxPage, renderCodeExamplesList, renderConfirmationDialog, renderDesignPage, renderFAQList, renderForm, renderFormField, renderLogo, renderPagination, renderTable, renderTestimonialsList };
|
|
3675
|
-
//# sourceMappingURL=chunk-
|
|
3676
|
-
//# sourceMappingURL=chunk-
|
|
3746
|
+
//# sourceMappingURL=chunk-YHLLVUJC.js.map
|
|
3747
|
+
//# sourceMappingURL=chunk-YHLLVUJC.js.map
|