includio-cms 0.14.1 → 0.14.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,39 @@
3
3
  All notable changes to includio-cms are documented here.
4
4
  Generated from `src/lib/updates/` — do not edit manually.
5
5
 
6
+ ## 0.14.3 — 2026-03-27
7
+
8
+ Background maintenance system — automatic style generation, poster regeneration, video transcoding, orphan cleanup on configurable schedule
9
+
10
+ ### Added
11
+ - Background maintenance scheduler — runs style generation, poster regeneration, video transcoding, and orphan cleanup automatically
12
+ - Maintenance status API endpoint (`/admin/api/maintenance-status`) — real-time status of background tasks
13
+ - Configurable maintenance interval via `media.maintenance` config (`autoRun`, `intervalHours`)
14
+ - Maintenance page UI redesign — auto-status banner, organized sections, compact progress indicators
15
+
16
+ ### Fixed
17
+ - Maintenance page SSE handler deduplication — single reusable `handleSSE()` replaces 3 duplicated implementations
18
+
19
+ ## 0.14.2 — 2026-03-27
20
+
21
+ Image styles: aspectRatio support, lazy generation, skip defaults when custom styles defined
22
+
23
+ ### Added
24
+ - aspectRatio option for image styles — crop to ratio without fixed dimensions
25
+ - Lazy generation of custom field styles on first read
26
+ - Skip default styles when field defines custom styles (prevents <source> conflicts in <picture>)
27
+
28
+ ### Migration
29
+
30
+ ```sql
31
+ ALTER TABLE image_styles ADD COLUMN IF NOT EXISTS aspect_ratio REAL;
32
+
33
+ -- Drop old unique index and recreate with aspect_ratio
34
+ DROP INDEX IF EXISTS image_styles_unique_key;
35
+ CREATE UNIQUE INDEX image_styles_unique_key
36
+ ON image_styles (media_file_id, name, COALESCE(width, 0), COALESCE(height, 0), COALESCE(quality, 0), COALESCE(aspect_ratio, 0));
37
+ ```
38
+
6
39
  ## 0.14.1 — 2026-03-27
7
40
 
8
41
  CMS context provider, Svelte 5 compat, docs overhaul
package/DOCS.md CHANGED
@@ -1,4 +1,4 @@
1
- # Includio CMS Documentation (v0.14.1)
1
+ # Includio CMS Documentation (v0.14.3)
2
2
 
3
3
  > This file is auto-generated from the docs site. For the latest version, update the package.
4
4
 
@@ -2472,6 +2472,17 @@ On the frontend, the `<Video>` component serves transcoded sources automatically
2472
2472
 
2473
2473
  See [Video Transcoding](/docs/video-transcoding) for full configuration and usage.
2474
2474
 
2475
+ ## Background Maintenance
2476
+
2477
+ Includio runs automatic background maintenance on a configurable schedule (default: every 6 hours). Tasks include:
2478
+
2479
+ 1. Generate missing image styles
2480
+ 2. Regenerate missing video posters
2481
+ 3. Transcode missing video variants (if ffmpeg available)
2482
+ 4. Clean up orphaned disk files
2483
+
2484
+ Configure via `media.maintenance` in your CMS config. See [Video Transcoding](/docs/video-transcoding#background-maintenance) for details.
2485
+
2475
2486
  ## File Adapter
2476
2487
 
2477
2488
  The file adapter handles physical storage. See [Files Adapter](/docs/adapters/files) for the interface.
@@ -2557,10 +2568,32 @@ interface VideoStyle {
2557
2568
  }
2558
2569
  ```
2559
2570
 
2571
+ ## Background Maintenance
2572
+
2573
+ Since **v0.14.3**, Includio runs automatic background maintenance that includes video transcoding alongside other tasks (image styles, posters, orphan cleanup).
2574
+
2575
+ Configure via `media.maintenance`:
2576
+
2577
+ ```typescript
2578
+ defineConfig({
2579
+ media: {
2580
+ maintenance: {
2581
+ autoRun: true, // default: true — start on CMS init
2582
+ intervalHours: 6 // default: 6 — hours between runs
2583
+ }
2584
+ }
2585
+ });
2586
+ ```
2587
+
2588
+ The first run starts 30 seconds after CMS initialization, then repeats at the configured interval.
2589
+
2590
+ Check status via `GET /admin/api/maintenance-status` — returns whether maintenance is running, last run time, next scheduled run, and result summary.
2591
+
2560
2592
  ## Admin UI
2561
2593
 
2562
2594
  The admin maintenance page provides:
2563
2595
 
2596
+ - **Auto-maintenance status banner** — shows running state, last/next run, result summary
2564
2597
  - **Batch transcode** — transcode all videos that don't have styles yet (SSE progress)
2565
2598
  - **Purge video styles** — delete all transcoded variants from disk and database
2566
2599
  - **Retranscode** — purge + retranscode all videos
package/ROADMAP.md CHANGED
@@ -263,6 +263,19 @@
263
263
  - [x] `[chore]` `[P1]` Documentation overhaul — new pages, README rewrite, DOCS.md compilation script <!-- files: scripts/compile-docs.ts, DOCS.md -->
264
264
  - [x] `[chore]` `[P2]` Remove obsolete docs/ Obsidian config & stale docs
265
265
 
266
+ ## 0.14.2 — Image styles: aspectRatio, skip defaults, lazy generation
267
+
268
+ - [x] `[feature]` `[P1]` aspectRatio option for image styles — crop to ratio without fixed dimensions <!-- files: src/lib/types/fields.ts, src/lib/core/server/media/styles/sharp/generateImageStyle.ts, src/lib/db-postgres/schema/imageStyle.ts -->
269
+ - [x] `[feature]` `[P1]` Skip default styles when field defines custom styles (prevents `<source>` conflicts in `<picture>`) <!-- files: src/lib/core/server/fields/utils/imageStyles.ts -->
270
+ - [x] `[feature]` `[P2]` Lazy generation of custom field styles on first read <!-- files: src/lib/core/server/fields/utils/imageStyles.ts -->
271
+
272
+ ## 0.14.3 — Background maintenance
273
+
274
+ - [x] `[feature]` `[P1]` Background maintenance scheduler — auto styles, posters, transcodes, orphan cleanup on configurable interval <!-- files: src/lib/core/server/media/operations/backgroundMaintenance.ts, src/lib/core/cms.ts -->
275
+ - [x] `[feature]` `[P1]` Maintenance status API endpoint <!-- files: src/lib/admin/api/maintenance-status.ts, src/lib/admin/api/handler.ts -->
276
+ - [x] `[feature]` `[P2]` Configurable maintenance interval via `media.maintenance` config <!-- files: src/lib/types/cms.ts -->
277
+ - [x] `[feature]` `[P1]` Maintenance page UI redesign — status banner, sections, SSE handler dedup <!-- files: src/lib/admin/client/maintenance/maintenance-page.svelte -->
278
+
266
279
  ## 0.15.0 — SEO module
267
280
 
268
281
  - [ ] `[feature]` `[P1]` SERP preview + character limits for title/description <!-- files: src/lib/admin/components/fields/seo-field.svelte -->
@@ -10,6 +10,7 @@ import * as regeneratePostersHandlers from './regenerate-posters.js';
10
10
  import * as transcodeVideosHandlers from './transcode-videos.js';
11
11
  import * as uploadLimitHandlers from './upload-limit.js';
12
12
  import * as systemInfoHandlers from './system-info.js';
13
+ import * as maintenanceStatusHandlers from './maintenance-status.js';
13
14
  import { requireAuth } from '../remote/middleware/auth.js';
14
15
  import { getCMS } from '../../core/cms.js';
15
16
  import { lookup } from 'mrmime';
@@ -26,6 +27,7 @@ export function createAdminApiHandler(options) {
26
27
  'transcode-videos': transcodeVideosHandlers,
27
28
  'upload-limit': uploadLimitHandlers,
28
29
  'system-info': systemInfoHandlers,
30
+ 'maintenance-status': maintenanceStatusHandlers,
29
31
  ...options?.extraRoutes
30
32
  };
31
33
  const privateMediaGet = async (event) => {
@@ -0,0 +1,2 @@
1
+ import { type RequestHandler } from '@sveltejs/kit';
2
+ export declare const GET: RequestHandler;
@@ -0,0 +1,7 @@
1
+ import { requireRole } from '../remote/middleware/auth.js';
2
+ import { getMaintenanceStatus } from '../../core/server/media/operations/backgroundMaintenance.js';
3
+ import { json } from '@sveltejs/kit';
4
+ export const GET = async () => {
5
+ requireRole('admin');
6
+ return json(getMaintenanceStatus());
7
+ };