includio-cms 0.5.1 → 0.5.2

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,18 @@
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.5.2 — 2026-02-25
7
+
8
+ Update system: split migration into sql + notes
9
+
10
+ ### Fixed
11
+ - CmsUpdate.migration split into sql (executable SQL) and notes (manual steps) — fixes CLI crash on text descriptions
12
+ - Changelog dialog: SQL accordion hidden when no SQL, notes shown as inline text
13
+ - Changelog script: SQL in ```sql blocks, notes as plain text
14
+
15
+ ### Breaking
16
+ - CmsUpdate interface: migration field replaced by sql + notes fields
17
+
6
18
  ## 0.5.1 — 2026-02-24
7
19
 
8
20
  Restore archived entries, dashboard redesign, translation fixes
@@ -28,11 +40,9 @@ Frontend rendering for structured content
28
40
  - Query helpers: `extractBlocks()`, `extractInlineBlocks()`, `extractText()`, `extractMediaRefs()`
29
41
  - Media resolution in population pipeline for `content` field — figure/video nodes enriched with `_media`
30
42
 
31
- ### Migration
43
+ ### Notes
32
44
 
33
- ```sql
34
45
  No migration needed. Import `StructuredContent` from `includio/sveltekit` to render content fields.
35
- ```
36
46
 
37
47
  ## 0.2.2 — 2026-02-21
38
48
 
@@ -43,11 +53,9 @@ Structured Content field (TipTap JSON)
43
53
  - Extracted shared editor toolbar component
44
54
  - Content field link resolution in resolve pipeline
45
55
 
46
- ### Migration
56
+ ### Notes
47
57
 
48
- ```sql
49
58
  No migration needed. Add type:"content" fields to collection/single configs. Existing richtext fields unchanged.
50
- ```
51
59
 
52
60
  ## 0.2.0 — 2026-02-21
53
61
 
@@ -59,11 +67,9 @@ Array→Blocks rename, new simple array field
59
67
  ### Breaking
60
68
  - type:"array" with objects renamed to type:"blocks". Update collection/single configs.
61
69
 
62
- ### Migration
70
+ ### Notes
63
71
 
64
- ```sql
65
72
  Config-only: rename type:"array" to type:"blocks" in field definitions. Stored data unchanged.
66
- ```
67
73
 
68
74
  ## 0.1.5 — 2026-02-21
69
75
 
@@ -80,11 +86,9 @@ Simplified entry versioning
80
86
  - Auto-save no longer creates dozens of empty versions
81
87
  - Pruning no longer deletes important versions to make room for empty ones
82
88
 
83
- ### Migration
89
+ ### Notes
84
90
 
85
- ```sql
86
91
  Removes duplicate entry versions where data is identical to the previous version. Preserves published, scheduled, and latest draft versions.
87
- ```
88
92
 
89
93
  ## 0.1.4 — 2026-02-19
90
94
 
package/ROADMAP.md CHANGED
@@ -72,6 +72,10 @@
72
72
  - [x] `[fix]` `[P1]` False "Niezapisane zmiany" on entry load
73
73
  - [x] `[fix]` `[P2]` Hide translation dots for non-required empty fields
74
74
 
75
+ ## 0.5.2 — Update system fix
76
+
77
+ - [x] `[fix]` `[P1]` Split `migration` field into `sql` + `notes` — fixes CLI crash on text descriptions
78
+
75
79
  ## 0.6.0 — Plugin system _(deferred from 0.2.0)_
76
80
 
77
81
  - [ ] `[feature]` `[P0]` Wire plugin hooks into CRUD operations (before/afterCreate, Update, Delete) <!-- files: src/lib/types/plugins.ts, src/lib/core/server/entries/operations/ -->
@@ -33,7 +33,8 @@
33
33
  features: string;
34
34
  fixes: string;
35
35
  breaking: string;
36
- migration: string;
36
+ sql: string;
37
+ notes: string;
37
38
  empty: string;
38
39
  }
39
40
  > = {
@@ -42,7 +43,8 @@
42
43
  features: 'Nowe funkcje',
43
44
  fixes: 'Poprawki',
44
45
  breaking: 'Zmiany wymagające uwagi',
45
- migration: 'Migracja SQL',
46
+ sql: 'Migracja SQL',
47
+ notes: 'Uwagi do aktualizacji',
46
48
  empty: 'Brak zmian w tej wersji.'
47
49
  },
48
50
  en: {
@@ -50,7 +52,8 @@
50
52
  features: 'Features',
51
53
  fixes: 'Fixes',
52
54
  breaking: 'Breaking changes',
53
- migration: 'SQL Migration',
55
+ sql: 'SQL Migration',
56
+ notes: 'Update notes',
54
57
  empty: 'No changes in this version.'
55
58
  }
56
59
  };
@@ -138,14 +141,21 @@
138
141
  </div>
139
142
  {/if}
140
143
 
141
- {#if update.migration}
144
+ {#if update.sql}
142
145
  <details>
143
146
  <summary class="cursor-pointer text-xs font-semibold text-foreground/60">
144
- {t.migration}
147
+ {t.sql}
145
148
  </summary>
146
- <pre class="mt-1 overflow-x-auto rounded-lg bg-muted p-2 text-xs">{update.migration}</pre>
149
+ <pre class="mt-1 overflow-x-auto rounded-lg bg-muted p-2 text-xs">{update.sql}</pre>
147
150
  </details>
148
151
  {/if}
152
+
153
+ {#if update.notes}
154
+ <p class="text-xs text-foreground/60">
155
+ <span class="font-semibold">{t.notes}:</span>
156
+ {update.notes}
157
+ </p>
158
+ {/if}
149
159
  </div>
150
160
  {:else}
151
161
  <p class="mt-1 text-xs text-foreground/50 italic">{t.empty}</p>
@@ -10,7 +10,7 @@ export const update = {
10
10
  ],
11
11
  fixes: [],
12
12
  breakingChanges: ['Media folders replaced with tags — existing folder assignments will be lost'],
13
- migration: `-- Move publish logic from entry_version to entry
13
+ sql: `-- Move publish logic from entry_version to entry
14
14
 
15
15
  ALTER TABLE entry ADD COLUMN published_at TIMESTAMP;
16
16
  ALTER TABLE entry ADD COLUMN published_version_id UUID
@@ -33,7 +33,7 @@ export const update = {
33
33
  breakingChanges: [
34
34
  'getImageStyles() now returns { styles, blurDataUrl } instead of plain styles record'
35
35
  ],
36
- migration: `ALTER TABLE image_styles ADD COLUMN IF NOT EXISTS quality INTEGER;
36
+ sql: `ALTER TABLE image_styles ADD COLUMN IF NOT EXISTS quality INTEGER;
37
37
  ALTER TABLE media_file ADD COLUMN IF NOT EXISTS blur_data_url TEXT;
38
38
  ALTER TABLE media_file ADD COLUMN IF NOT EXISTS focal_x REAL;
39
39
  ALTER TABLE media_file ADD COLUMN IF NOT EXISTS focal_y REAL;`
@@ -21,7 +21,7 @@ export const update = {
21
21
  ],
22
22
  fixes: [],
23
23
  breakingChanges: [],
24
- migration: `CREATE TABLE IF NOT EXISTS invitation (
24
+ sql: `CREATE TABLE IF NOT EXISTS invitation (
25
25
  id TEXT PRIMARY KEY,
26
26
  email TEXT NOT NULL,
27
27
  role TEXT NOT NULL DEFAULT 'user',
@@ -14,5 +14,5 @@ export const update = {
14
14
  'Pruning no longer deletes important versions to make room for empty ones'
15
15
  ],
16
16
  breakingChanges: [],
17
- migration: 'Removes duplicate entry versions where data is identical to the previous version. Preserves published, scheduled, and latest draft versions.'
17
+ notes: 'Removes duplicate entry versions where data is identical to the previous version. Preserves published, scheduled, and latest draft versions.'
18
18
  };
@@ -7,5 +7,5 @@ export const update = {
7
7
  breakingChanges: [
8
8
  'type:"array" with objects renamed to type:"blocks". Update collection/single configs.'
9
9
  ],
10
- migration: 'Config-only: rename type:"array" to type:"blocks" in field definitions. Stored data unchanged.'
10
+ notes: 'Config-only: rename type:"array" to type:"blocks" in field definitions. Stored data unchanged.'
11
11
  };
@@ -9,5 +9,5 @@ export const update = {
9
9
  ],
10
10
  fixes: [],
11
11
  breakingChanges: [],
12
- migration: 'No migration needed. Add type:"content" fields to collection/single configs. Existing richtext fields unchanged.'
12
+ notes: 'No migration needed. Add type:"content" fields to collection/single configs. Existing richtext fields unchanged.'
13
13
  };
@@ -10,5 +10,5 @@ export const update = {
10
10
  ],
11
11
  fixes: [],
12
12
  breakingChanges: [],
13
- migration: 'No migration needed. Import `StructuredContent` from `includio/sveltekit` to render content fields.'
13
+ notes: 'No migration needed. Import `StructuredContent` from `includio/sveltekit` to render content fields.'
14
14
  };
@@ -0,0 +1,2 @@
1
+ import type { CmsUpdate } from '../index.js';
2
+ export declare const update: CmsUpdate;
@@ -0,0 +1,14 @@
1
+ export const update = {
2
+ version: '0.5.2',
3
+ date: '2026-02-25',
4
+ description: 'Update system: split migration into sql + notes',
5
+ features: [],
6
+ fixes: [
7
+ 'CmsUpdate.migration split into sql (executable SQL) and notes (manual steps) — fixes CLI crash on text descriptions',
8
+ 'Changelog dialog: SQL accordion hidden when no SQL, notes shown as inline text',
9
+ 'Changelog script: SQL in ```sql blocks, notes as plain text'
10
+ ],
11
+ breakingChanges: [
12
+ 'CmsUpdate interface: migration field replaced by sql + notes fields'
13
+ ]
14
+ };
@@ -5,7 +5,8 @@ export interface CmsUpdate {
5
5
  features: string[];
6
6
  fixes: string[];
7
7
  breakingChanges: string[];
8
- migration?: string;
8
+ sql?: string;
9
+ notes?: string;
9
10
  }
10
11
  export declare const updates: CmsUpdate[];
11
12
  export declare const getUpdatesFrom: (fromVersion: string) => CmsUpdate[];
@@ -13,7 +13,8 @@ import { update as update020 } from './0.2.0/index.js';
13
13
  import { update as update022 } from './0.2.2/index.js';
14
14
  import { update as update050 } from './0.5.0/index.js';
15
15
  import { update as update051 } from './0.5.1/index.js';
16
- export const updates = [update0065, update0066, update0067, update0068, update0069, update010, update011, update012, update013, update014, update015, update020, update022, update050, update051];
16
+ import { update as update052 } from './0.5.2/index.js';
17
+ export const updates = [update0065, update0066, update0067, update0068, update0069, update010, update011, update012, update013, update014, update015, update020, update022, update050, update051, update052];
17
18
  export const getUpdatesFrom = (fromVersion) => {
18
19
  const fromParts = fromVersion.split('.').map(Number);
19
20
  return updates.filter((update) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "includio-cms",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",
@@ -1,55 +0,0 @@
1
- -- Move publish logic from entry_version to entry
2
-
3
- ALTER TABLE entry ADD COLUMN published_at TIMESTAMP;
4
- ALTER TABLE entry ADD COLUMN published_version_id UUID
5
- REFERENCES entry_version(id) ON DELETE SET NULL;
6
- ALTER TABLE entry ADD COLUMN published_by TEXT;
7
-
8
- UPDATE entry e SET
9
- published_version_id = latest.id,
10
- published_at = first_pub.first_published_at,
11
- published_by = latest.published_by
12
- FROM (
13
- SELECT DISTINCT ON (entry_id) id, entry_id, published_by
14
- FROM entry_version
15
- WHERE published_at IS NOT NULL AND published_at <= NOW()
16
- ORDER BY entry_id, version_number DESC
17
- ) latest
18
- JOIN (
19
- SELECT entry_id, MIN(published_at) as first_published_at
20
- FROM entry_version
21
- WHERE published_at IS NOT NULL AND published_at <= NOW()
22
- GROUP BY entry_id
23
- ) first_pub ON first_pub.entry_id = latest.entry_id
24
- WHERE e.id = latest.entry_id;
25
-
26
- UPDATE entry e SET
27
- published_version_id = COALESCE(e.published_version_id, sub.id),
28
- published_at = CASE WHEN e.published_at IS NULL THEN sub.published_at ELSE e.published_at END,
29
- published_by = COALESCE(e.published_by, sub.published_by)
30
- FROM (
31
- SELECT DISTINCT ON (entry_id) id, entry_id, published_at, published_by
32
- FROM entry_version
33
- WHERE published_at IS NOT NULL AND published_at > NOW()
34
- ORDER BY entry_id, published_at ASC
35
- ) sub
36
- WHERE e.id = sub.entry_id AND e.published_version_id IS NULL;
37
-
38
- -- Replace folder-based media with tag-based media
39
-
40
- CREATE TABLE IF NOT EXISTS media_tag (
41
- id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
42
- name TEXT NOT NULL UNIQUE,
43
- color TEXT NOT NULL DEFAULT '#3b82f6',
44
- created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL
45
- );
46
-
47
- CREATE TABLE IF NOT EXISTS media_file_tag (
48
- file_id UUID NOT NULL REFERENCES media_file(id) ON DELETE CASCADE,
49
- tag_id UUID NOT NULL REFERENCES media_tag(id) ON DELETE CASCADE,
50
- PRIMARY KEY (file_id, tag_id)
51
- );
52
-
53
- ALTER TABLE media_file DROP COLUMN IF EXISTS folder_id;
54
-
55
- DROP TABLE IF EXISTS media_folder;
@@ -1,9 +0,0 @@
1
- -- Add quality control to image styles
2
- ALTER TABLE image_styles ADD COLUMN IF NOT EXISTS quality INTEGER;
3
-
4
- -- Add LQIP blur placeholder to media files
5
- ALTER TABLE media_file ADD COLUMN IF NOT EXISTS blur_data_url TEXT;
6
-
7
- -- Add focal point columns to media files
8
- ALTER TABLE media_file ADD COLUMN IF NOT EXISTS focal_x REAL;
9
- ALTER TABLE media_file ADD COLUMN IF NOT EXISTS focal_y REAL;