@12-apps/prisma 6.1.1 → 6.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/prisma",
3
- "version": "6.1.1",
3
+ "version": "6.2.0",
4
4
  "description": "Prisma host: the multi-file schema folder, the plugin migration seam, and the shared PrismaClient singleton with its audit / append-only extensions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -63,23 +63,23 @@
63
63
  "pglite-prisma-adapter": "0.7.2"
64
64
  },
65
65
  "devDependencies": {
66
- "@12-apps/audit": "^5.0.1",
67
- "@12-apps/auth": "^2.5.0",
68
- "@12-apps/entitlements": "^3.1.0",
69
- "@12-apps/entity-lifecycle": "^4.2.0",
70
- "@12-apps/eslint-config": "^1.21.0",
71
- "@12-apps/feature-flags": "^2.0.1",
72
- "@12-apps/jobs": "^4.2.0",
73
- "@12-apps/mcp": "^3.5.0",
74
- "@12-apps/notifications": "^4.1.1",
75
- "@12-apps/onboarding": "^2.0.1",
76
- "@12-apps/payments-backend": "^4.14.0",
77
- "@12-apps/product-research": "^2.0.0",
78
- "@12-apps/rbac": "^4.1.0",
79
- "@12-apps/realtime": "^2.0.0",
80
- "@12-apps/report-builder": "^5.3.0",
81
- "@12-apps/shift": "^3.0.1",
82
- "@12-apps/typescript-config": "^1.20.0",
66
+ "@12-apps/audit": "^5.0.2",
67
+ "@12-apps/auth": "^2.7.0",
68
+ "@12-apps/entitlements": "^3.2.0",
69
+ "@12-apps/entity-lifecycle": "^4.4.0",
70
+ "@12-apps/eslint-config": "^1.21.1",
71
+ "@12-apps/feature-flags": "^2.1.1",
72
+ "@12-apps/jobs": "^4.3.1",
73
+ "@12-apps/mcp": "^3.5.1",
74
+ "@12-apps/notifications": "^4.2.0",
75
+ "@12-apps/onboarding": "^2.1.0",
76
+ "@12-apps/payments-backend": "^4.15.0",
77
+ "@12-apps/product-research": "^2.2.0",
78
+ "@12-apps/rbac": "^4.2.0",
79
+ "@12-apps/realtime": "^2.2.0",
80
+ "@12-apps/report-builder": "^5.4.1",
81
+ "@12-apps/shift": "^3.2.0",
82
+ "@12-apps/typescript-config": "^1.20.1",
83
83
  "@types/node": "^22.10.6",
84
84
  "@vitest/coverage-v8": "^3.2.4",
85
85
  "eslint": "^9.39.1",
@@ -0,0 +1,25 @@
1
+ -- @12-apps/shift: `kind` carries HOST vocabulary, so the database stops naming it.
2
+ --
3
+ -- `shifts_kind_check` restricted every adopter's `shifts.kind` to two values
4
+ -- taken from the staff structure of the application this package was extracted
5
+ -- from. That is the most structural form this leak can take. A leaked string is
6
+ -- cosmetic and a leaked type union is at least deletable in a major; a CHECK
7
+ -- constraint is a fact recorded in the adopter's own database, and a host whose
8
+ -- workers are not organised into those two groups could not insert a row at all
9
+ -- — no configuration this package offered could reach it.
10
+ --
11
+ -- What replaces it is the guarantee the package genuinely owns: `kind` is
12
+ -- present and not blank. WHICH kinds exist is now stated by the host and
13
+ -- enforced at the open, by the service, against the vocabulary it was
14
+ -- constructed with (`createShiftService(db, { kinds })`).
15
+ --
16
+ -- Deliberately NOT touched: `shifts_ended_reason_check`. Those three values are
17
+ -- this package's own vocabulary — a shift ends because a worker said so, a
18
+ -- supervisor said so, or the sweep did — and no adopter renames them.
19
+ --
20
+ -- Existing rows all satisfy the replacement, so this is safe to deploy against
21
+ -- a live table with no backfill.
22
+ ALTER TABLE "shifts" DROP CONSTRAINT IF EXISTS "shifts_kind_check";
23
+
24
+ ALTER TABLE "shifts"
25
+ ADD CONSTRAINT "shifts_kind_present_check" CHECK (btrim("kind") <> '');
@@ -33,6 +33,7 @@
33
33
  "20260813140000_add_notification_tables",
34
34
  "20260813180000_add_realtime_outbox",
35
35
  "20260819230000_auth_email_password",
36
- "20260820120000_add_user_feature_grants"
36
+ "20260820120000_add_user_feature_grants",
37
+ "20260821120000_shift_kind_host_vocabulary"
37
38
  ]
38
39
  }