@nextsparkjs/theme-default 0.1.0-beta.166 → 0.1.0-beta.168

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.
@@ -1,39 +1,31 @@
1
1
  -- Migration: 089_add_editor_team_role.sql
2
- -- Description: Add 'editor' role to team_role ENUM
2
+ -- Description: (No-op) 'editor' team role now config-driven, no DDL required
3
3
  -- Date: 2025-12-24
4
4
  -- Theme: default
5
5
  -- Phase: Theme extension - demonstrates extensible team roles system
6
6
  --
7
- -- This migration adds the 'editor' team role as an example of the extensible
8
- -- team roles system. The role is added to the PostgreSQL ENUM type.
7
+ -- HISTORICAL NOTE:
8
+ -- This migration used to run `ALTER TYPE team_role ADD VALUE 'editor'` because
9
+ -- team roles were a Postgres ENUM. As of core beta.167, `team_members.role` /
10
+ -- `team_invitations.role` are TEXT (see core migration 007), so themes extend
11
+ -- team roles purely via config — no DB DDL, no ENUM patching.
9
12
  --
10
- -- Note: ALTER TYPE ADD VALUE cannot run inside a transaction block in PostgreSQL.
11
- -- The migration runner handles this automatically.
12
-
13
- -- Add 'editor' value to team_role ENUM
14
- -- Inserted after 'member' in the hierarchy order
15
- ALTER TYPE team_role ADD VALUE IF NOT EXISTS 'editor';
13
+ -- The 'editor' role is declared in this theme's config:
14
+ -- - app.config.ts -> availableTeamRoles
15
+ -- - config/permissions.config.ts -> roles.additionalRoles + entity permissions
16
+ --
17
+ -- This file is kept as a no-op so the migration sequence/tracking stays stable.
16
18
 
17
- -- Success message
18
19
  DO $$
19
20
  BEGIN
20
21
  RAISE NOTICE '';
21
22
  RAISE NOTICE '════════════════════════════════════════════════════════════';
22
- RAISE NOTICE ' Migration 089_add_editor_team_role.sql completed!';
23
+ RAISE NOTICE ' Migration 089_add_editor_team_role.sql (no-op)';
23
24
  RAISE NOTICE '════════════════════════════════════════════════════════════';
24
25
  RAISE NOTICE '';
25
- RAISE NOTICE ' Added "editor" to team_role ENUM';
26
- RAISE NOTICE '';
27
- RAISE NOTICE ' Team role hierarchy (config-driven):';
28
- RAISE NOTICE ' owner: 100 (protected)';
29
- RAISE NOTICE ' admin: 50';
30
- RAISE NOTICE ' member: 10';
31
- RAISE NOTICE ' editor: 5 (NEW)';
32
- RAISE NOTICE ' viewer: 1';
33
- RAISE NOTICE '';
34
- RAISE NOTICE ' Editor permissions (defined in app.config.ts):';
35
- RAISE NOTICE ' - team.view';
36
- RAISE NOTICE ' - team.members.view';
26
+ RAISE NOTICE ' ℹ️ team_members.role is now TEXT (core 007).';
27
+ RAISE NOTICE ' ℹ️ The "editor" role is config-driven (availableTeamRoles +';
28
+ RAISE NOTICE ' permissions.config.ts) no ALTER TYPE needed.';
37
29
  RAISE NOTICE '';
38
30
  RAISE NOTICE '════════════════════════════════════════════════════════════';
39
31
  END $$;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextsparkjs/theme-default",
3
- "version": "0.1.0-beta.166",
3
+ "version": "0.1.0-beta.168",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./config/theme.config.ts",