@beechcms/api 0.6.7 → 0.7.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.
@@ -163,7 +163,7 @@ CREATE TABLE IF NOT EXISTS notifications (
163
163
  id TEXT NOT NULL PRIMARY KEY,
164
164
  title TEXT NOT NULL,
165
165
  message TEXT NOT NULL,
166
- type TEXT NOT NULL DEFAULT 'info' CHECK (type IN ('info', 'warning', 'error')),
166
+ type TEXT NOT NULL DEFAULT 'info' CHECK (type IN ('info', 'success', 'warning', 'error')),
167
167
  is_read INTEGER NOT NULL DEFAULT 0 CHECK (is_read IN (0, 1)),
168
168
  created_at INTEGER NOT NULL DEFAULT (unixepoch())
169
169
  );
@@ -263,3 +263,16 @@ CREATE TABLE IF NOT EXISTS seed_layouts (
263
263
  updated_at INTEGER NOT NULL DEFAULT (unixepoch()),
264
264
  updated_by TEXT NOT NULL -- users.id of the writer
265
265
  );
266
+
267
+
268
+ -- =============================================================================
269
+ -- 14. SETUP LOCK
270
+ -- Single-row marker enforcing that /auth/setup can only complete once, even
271
+ -- under concurrent requests. Insert into this table in the same transaction
272
+ -- as the initial admin user; the PRIMARY KEY conflict rejects the loser.
273
+ -- =============================================================================
274
+
275
+ CREATE TABLE IF NOT EXISTS setup_completed (
276
+ id INTEGER NOT NULL PRIMARY KEY CHECK (id = 1)
277
+ );
278
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beechcms/api",
3
- "version": "0.6.7",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/factory.d.ts",
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "@aws-sdk/client-s3": "^3.995.0",
22
22
  "@aws-sdk/s3-request-presigner": "^3.995.0",
23
- "@beechcms/core": "^0.6.7",
23
+ "@beechcms/core": "^0.7.0",
24
24
  "@upstash/qstash": "^2.11.0",
25
25
  "bcryptjs": "^2.4.3",
26
26
  "hono": "^4.12.34",