@quickback-dev/cli 0.16.5 → 0.18.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/README.md +7 -3
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +12 -48
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/create.d.ts +20 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +216 -151
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/login.d.ts +4 -2
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +25 -17
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/start.d.ts +20 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +163 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +5 -4
- package/dist/commands/whoami.js.map +1 -1
- package/dist/docs/content.js +42 -42
- package/dist/docs/content.js.map +1 -1
- package/dist/index.js +27 -10
- package/dist/index.js.map +1 -1
- package/dist/lib/api-client.js +1 -1
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/api-client.test.js +15 -0
- package/dist/lib/api-client.test.js.map +1 -1
- package/dist/lib/auth.d.ts +39 -3
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js +57 -3
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/drizzle-meta-routing.test.js +16 -3
- package/dist/lib/drizzle-meta-routing.test.js.map +1 -1
- package/dist/lib/file-loader.d.ts +6 -4
- package/dist/lib/file-loader.d.ts.map +1 -1
- package/dist/lib/file-loader.js +30 -27
- package/dist/lib/file-loader.js.map +1 -1
- package/dist/lib/file-loader.test.js +16 -7
- package/dist/lib/file-loader.test.js.map +1 -1
- package/dist/skill/docs/changelog.md +429 -1100
- package/dist/skill/docs/compiler/cloud-compiler/cli.md +54 -33
- package/dist/skill/docs/compiler/cloud-compiler/index.md +9 -9
- package/dist/skill/docs/compiler/config/providers.md +87 -0
- package/dist/skill/docs/compiler/config/single-tenant.md +5 -11
- package/dist/skill/docs/compiler/definitions/access.md +43 -57
- package/dist/skill/docs/compiler/definitions/feature.md +7 -11
- package/dist/skill/docs/compiler/definitions/firewall.md +2 -4
- package/dist/skill/docs/compiler/definitions/guards.md +16 -18
- package/dist/skill/docs/compiler/definitions/index.md +10 -14
- package/dist/skill/docs/compiler/definitions/masking.md +6 -6
- package/dist/skill/docs/compiler/definitions/read.md +6 -11
- package/dist/skill/docs/compiler/definitions/schema.md +18 -18
- package/dist/skill/docs/compiler/definitions/views.md +3 -5
- package/dist/skill/docs/compiler/getting-started/full-example.md +6 -8
- package/dist/skill/docs/compiler/getting-started/hand-crafted.md +3 -5
- package/dist/skill/docs/compiler/getting-started/index.md +23 -20
- package/dist/skill/docs/compiler/getting-started/patterns.md +19 -31
- package/dist/skill/docs/compiler/getting-started/template-blog.md +6 -10
- package/dist/skill/docs/compiler/getting-started/template-cloudflare.md +49 -56
- package/dist/skill/docs/compiler/getting-started/template-empty.md +3 -5
- package/dist/skill/docs/compiler/getting-started/templates.md +58 -56
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +29 -23
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +12 -14
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +5 -2
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +5 -7
- package/dist/skill/docs/compiler/troubleshooting.md +10 -0
- package/dist/skill/docs/index.md +9 -0
- package/dist/skill/docs/stack/auth/security.md +69 -0
- package/dist/skill/docs/stack/cms/actions.md +28 -0
- package/dist/skill/docs/stack/cms/connecting.md +2 -2
- package/dist/skill/docs/stack/cms/index.md +2 -2
- package/dist/skill/docs/stack/cms/record-layouts.md +19 -19
- package/dist/skill/docs/stack/cms/schema-format.md +33 -3
- package/dist/skill/docs/stack/cms/schema-registry.md +22 -2
- package/dist/skill/docs/stack/cms/security.md +10 -12
- package/dist/skill/docs/stack/cms/table-views.md +1 -1
- package/dist/skill/docs/stack/index.md +8 -4
- package/dist/skill/docs/stack/realtime/durable-objects.md +46 -5
- package/dist/skill/docs/stack/realtime/index.md +20 -3
- package/dist/skill/docs/stack/realtime/using-realtime.md +8 -6
- package/dist/skill/docs/stack/vector/embeddings.md +7 -6
- package/package.json +1 -1
- package/src/skill/docs/changelog.md +486 -1097
- package/src/skill/docs/compiler/cloud-compiler/cli.md +54 -33
- package/src/skill/docs/compiler/cloud-compiler/index.md +9 -9
- package/src/skill/docs/compiler/config/domains.md +44 -10
- package/src/skill/docs/compiler/config/output.md +1 -1
- package/src/skill/docs/compiler/config/providers.md +87 -0
- package/src/skill/docs/compiler/config/single-tenant.md +5 -11
- package/src/skill/docs/compiler/definitions/access.md +43 -57
- package/src/skill/docs/compiler/definitions/feature.md +7 -11
- package/src/skill/docs/compiler/definitions/firewall.md +2 -4
- package/src/skill/docs/compiler/definitions/guards.md +16 -18
- package/src/skill/docs/compiler/definitions/index.md +10 -14
- package/src/skill/docs/compiler/definitions/masking.md +6 -6
- package/src/skill/docs/compiler/definitions/read.md +6 -11
- package/src/skill/docs/compiler/definitions/schema.md +18 -18
- package/src/skill/docs/compiler/definitions/views.md +3 -5
- package/src/skill/docs/compiler/getting-started/full-example.md +6 -8
- package/src/skill/docs/compiler/getting-started/hand-crafted.md +3 -5
- package/src/skill/docs/compiler/getting-started/index.md +23 -20
- package/src/skill/docs/compiler/getting-started/patterns.md +19 -31
- package/src/skill/docs/compiler/getting-started/template-blog.md +6 -10
- package/src/skill/docs/compiler/getting-started/template-cloudflare.md +49 -56
- package/src/skill/docs/compiler/getting-started/template-empty.md +3 -5
- package/src/skill/docs/compiler/getting-started/templates.md +58 -56
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/batch-operations.md +29 -23
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/crud.md +12 -14
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +5 -2
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/query-params.md +5 -7
- package/src/skill/docs/compiler/troubleshooting.md +10 -0
- package/src/skill/docs/index.md +9 -0
- package/src/skill/docs/stack/auth/plugins/index.md +74 -0
- package/src/skill/docs/stack/auth/security.md +69 -0
- package/src/skill/docs/stack/cms/actions.md +28 -0
- package/src/skill/docs/stack/cms/connecting.md +2 -2
- package/src/skill/docs/stack/cms/index.md +2 -2
- package/src/skill/docs/stack/cms/record-layouts.md +19 -19
- package/src/skill/docs/stack/cms/schema-format.md +33 -3
- package/src/skill/docs/stack/cms/schema-registry.md +22 -2
- package/src/skill/docs/stack/cms/security.md +10 -12
- package/src/skill/docs/stack/cms/table-views.md +1 -1
- package/src/skill/docs/stack/index.md +8 -4
- package/src/skill/docs/stack/realtime/durable-objects.md +46 -5
- package/src/skill/docs/stack/realtime/index.md +20 -3
- package/src/skill/docs/stack/realtime/using-realtime.md +8 -6
- package/src/skill/docs/stack/vector/embeddings.md +7 -6
|
@@ -1,437 +1,473 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## v0.18.0 — May 17, 2026
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## v0.16.4 — May 12, 2026
|
|
5
|
+
### `config.apps` — mount user-authored SPAs on dedicated hostnames
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
The compiler now generates per-hostname Worker middleware for arbitrary user SPAs alongside the built-in CMS and Account UIs. Previously the only way to host a product app next to a Quickback API was a second Worker; `config.apps` brings the full stack — API, account, and product UI — onto one deployment with same-origin auth.
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
```ts
|
|
10
|
+
apps: {
|
|
11
|
+
www: {
|
|
12
|
+
domain: "www.example.com",
|
|
13
|
+
aliasDomains: ["example.com"], // apex serves the same SPA
|
|
14
|
+
},
|
|
15
|
+
}
|
|
16
|
+
```
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
Each entry binds one or more hostnames to a directory under `src/apps/<name>/` and inherits the Account-domain pass-through behavior — `/api/`, `/auth/`, `/admin/`, `/storage/`, and `/health` route to Hono so the SPA fetches its API without CORS. The compiler:
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
- emits a `custom_domain = true` route in `wrangler.toml` for the primary hostname and every alias
|
|
21
|
+
- adds each hostname to Better Auth's `TRUSTED_ORIGINS` (when `trustedOrigins` is left unset)
|
|
22
|
+
- widens the CSP `connect-src` to cover the SPA-baked origins
|
|
23
|
+
- folds the new hostnames into shared-parent detection for `crossSubDomainCookies`
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
Drop the prebuilt SPA bundle at `quickback/apps/<name>/` — the existing source-apps passthrough copies it byte-for-byte into `src/apps/<name>/`. The compiler doesn't build the SPA; it only emits routing for whatever's already there. The names `cms`, `account`, and `public` are reserved; hostname collisions with `cms.domain` / `account.domain` / `account.adminDomain` or between two `apps[*]` entries fail at compile time.
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
When `cms` and `account` are both configured, the multi-domain catchall now explicitly skips app hostnames — an API miss on an app host returns the standard 404 JSON via `app.notFound` instead of stray-serving a sibling SPA's HTML shell.
|
|
20
28
|
|
|
21
|
-
|
|
29
|
+
### Cross-subdomain cookie inference handles apex aliases
|
|
22
30
|
|
|
23
|
-
The
|
|
31
|
+
The shared-parent detection that drives `advanced.crossSubDomainCookies` previously reduced any hostname by stripping the leftmost label — `'example.com'` collapsed to `'com'`, which broke equality against sibling subdomains. Apex hostnames (exactly two dot-segments) are now treated as already being the parent, so apex aliases (`example.com` listed alongside `www.example.com`) coexist cleanly with `auth.example.com` / `cms.example.com` and the compiler still emits `crossSubDomainCookies: { enabled: true, domain: '.example.com' }`.
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
---
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
## v0.17.2 — May 15, 2026
|
|
28
36
|
|
|
29
|
-
|
|
37
|
+
### `customPlugins` escape hatch on `defineAuth("better-auth", …)`
|
|
30
38
|
|
|
31
|
-
|
|
39
|
+
The Better Auth provider now accepts `customPlugins` alongside the named-plugin registry — a path to ship third-party plugins (`@better-auth-kit/audit`, …), unregistered built-ins, or one-off project-local plugins without forking the compiler.
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
Each entry is an explicit import descriptor:
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
```ts
|
|
44
|
+
auth: defineAuth("better-auth", {
|
|
45
|
+
emailAndPassword: { enabled: true },
|
|
46
|
+
plugins: { passkey: true, organization: true },
|
|
47
|
+
customPlugins: [
|
|
48
|
+
// (1) Project-local plugin file at quickback/plugins/long-session.ts
|
|
49
|
+
{ from: "./plugins/long-session", export: "longSessionPlugin" },
|
|
50
|
+
// (2) Third-party npm package
|
|
51
|
+
{
|
|
52
|
+
from: "@better-auth-kit/audit",
|
|
53
|
+
export: "auditPlugin",
|
|
54
|
+
args: { events: ["sign-in"] },
|
|
55
|
+
dependencies: { "@better-auth-kit/audit": "^1.0.0" },
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
}),
|
|
59
|
+
```
|
|
36
60
|
|
|
37
|
-
|
|
61
|
+
`from` is either a relative path under `./plugins/` (the CLI auto-uploads matching files from `quickback/plugins/`; the compiler copies them into `src/plugins/<name>.ts` and rewrites the emitted import) or a bare npm specifier (emitted verbatim; declare `dependencies` so the package lands in the generated `package.json`). Omit `args` to emit the symbol uncalled (plugin instance); provide `args` to emit a JSON-serialized factory call.
|
|
38
62
|
|
|
39
|
-
|
|
63
|
+
The descriptor is validated with Zod — typos in `from`/`export`, paths that escape `./plugins/`, and references to files the CLI didn't ship all fail at compile time with a targeted message.
|
|
40
64
|
|
|
41
65
|
---
|
|
42
66
|
|
|
43
|
-
## v0.
|
|
67
|
+
## v0.17.1 — May 14, 2026
|
|
44
68
|
|
|
45
|
-
###
|
|
69
|
+
### `quickback start` — interactive onboarding
|
|
46
70
|
|
|
47
|
-
|
|
71
|
+
```bash
|
|
72
|
+
mkdir my-app && cd my-app
|
|
73
|
+
npx @quickback-dev/cli start
|
|
74
|
+
```
|
|
48
75
|
|
|
49
|
-
|
|
76
|
+
`start` walks new users through template selection, scaffolds the project on disk, and only prompts for an account when it's ready to compile. Cancelling at the login prompt leaves the scaffold intact — sign in and run `quickback compile` whenever you're ready.
|
|
50
77
|
|
|
51
|
-
|
|
78
|
+
The same deferred-auth flow applies to `quickback create`. Scaffolding and (optional) Cloudflare D1 setup run before authentication, so you can preview the project on disk before committing to an account.
|
|
52
79
|
|
|
53
|
-
|
|
80
|
+
### Named views on the free tier
|
|
54
81
|
|
|
55
|
-
|
|
82
|
+
The `todos` template now ships a `dashboard` named view, exposing a projected response at `GET /api/v1/todos/views/dashboard`. Named views support per-view access rules and per-view field selection while inheriting the table's firewall and masking — the canonical way to ship list-view payloads that are cheaper to fetch and easier to cache than a full collection read.
|
|
56
83
|
|
|
57
|
-
|
|
84
|
+
### `quickback init` removed
|
|
58
85
|
|
|
59
|
-
|
|
86
|
+
Folded into `start` and `create`. The legacy command name prints a deprecation notice pointing at its replacements.
|
|
60
87
|
|
|
61
|
-
|
|
88
|
+
### Minor
|
|
62
89
|
|
|
63
|
-
|
|
90
|
+
- `quickback whoami` reads the stored tier from your credentials.
|
|
91
|
+
- Pro upsell copy in `quickback login` is shown only when the server returns an explicit free-tier subscription.
|
|
92
|
+
- Bare scaffolds (`cloudflare`, `empty`) report accurately when there are no features to generate migrations for.
|
|
64
93
|
|
|
65
|
-
|
|
94
|
+
---
|
|
66
95
|
|
|
67
|
-
|
|
96
|
+
## v0.16.10 — May 14, 2026
|
|
68
97
|
|
|
69
|
-
|
|
98
|
+
### D1-specific safety pass on generated migrations
|
|
70
99
|
|
|
71
|
-
|
|
100
|
+
The `cloudflare-d1` provider now runs a post-generation pass over every Drizzle migration directory (auth, features, webhooks, audit) before the compile finishes. Better Auth cleanup for retired managed tables is stripped from raw `DROP TABLE` statements. Drop-only cleanup migrations are reordered child-first when foreign-key dependencies require it. Every generated D1 migration directory is replayed against SQLite during compile, so a D1-breaking migration fails at compile time rather than at `wrangler d1 migrations apply`.
|
|
72
101
|
|
|
73
|
-
|
|
102
|
+
---
|
|
74
103
|
|
|
75
|
-
|
|
104
|
+
## v0.16.9 — May 13, 2026
|
|
76
105
|
|
|
77
|
-
|
|
106
|
+
### Resource-scoped realtime tickets
|
|
78
107
|
|
|
79
|
-
|
|
108
|
+
`providers.database.config.realtime` accepts an object form for projects whose WebSocket subscribers aren't org members:
|
|
80
109
|
|
|
81
|
-
|
|
110
|
+
```ts
|
|
111
|
+
realtime: {
|
|
112
|
+
wsTicket: {
|
|
113
|
+
role: "attendee",
|
|
114
|
+
requestField: "eventId",
|
|
115
|
+
scopeTable: "events",
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The generated `/broadcast/v1/ws-ticket` route authenticates the caller, evaluates the declared relationship role against the request, and mints a short-lived WebSocket ticket scoped to the resolved resource. `realtime: true` continues to enable the org-scoped broadcaster.
|
|
121
|
+
|
|
122
|
+
### Unified broadcast targeting
|
|
82
123
|
|
|
83
|
-
|
|
124
|
+
The realtime helper and Broadcaster now route by `scopeKey || organizationId || userId`. String targets remain shorthand for `organizationId`; explicit targets can scope a broadcast to a resource or a single user:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
await realtime.broadcast("event-page-updated", payload, { scopeKey: "events:evt_123" });
|
|
128
|
+
await realtime.broadcast("dm", payload, { userId: recipientId });
|
|
129
|
+
```
|
|
84
130
|
|
|
85
|
-
|
|
131
|
+
WebSocket tickets are Quickback-minted (signed with `BETTER_AUTH_SECRET`), not Better Auth tokens — Better Auth remains the front-door auth check; Quickback signs the upgrade ticket after authorization succeeds.
|
|
86
132
|
|
|
87
133
|
---
|
|
88
134
|
|
|
89
|
-
## v0.16.
|
|
135
|
+
## v0.16.8 — May 13, 2026
|
|
90
136
|
|
|
91
|
-
###
|
|
137
|
+
### One auth transport per request
|
|
92
138
|
|
|
93
|
-
|
|
139
|
+
Generated middleware treats `Cookie`, `Authorization: Bearer`, and `x-api-key` as distinct auth methods and rejects mixed requests with `400 AUTH_METHOD_CONFLICT`. Query-string API keys (`?api_key=` / `?key=`) are no longer accepted. Machine-to-machine auth is explicit; precedence rules between transports are gone.
|
|
94
140
|
|
|
95
|
-
|
|
141
|
+
### Cookie-backed CSRF gate
|
|
96
142
|
|
|
97
|
-
|
|
143
|
+
Generated apps now block cross-site `POST` / `PUT` / `PATCH` / `DELETE` requests from cookie-relying callers. The middleware skips explicit `Authorization` clients, requires a trusted `Origin` or `Referer`, and blocks `Sec-Fetch-Site: cross-site`. This matters most for cross-subdomain session setups where `SameSite=None` is intentional.
|
|
98
144
|
|
|
99
|
-
|
|
145
|
+
### First-class Wrangler observability
|
|
100
146
|
|
|
101
|
-
|
|
147
|
+
`providers.runtime.config.observability` now supports nested `logs` / `traces` blocks for `headSamplingRate`, `destinations`, `persist`, and `logs.invocationLogs`, emitting matching `[observability]`, `[observability.logs]`, and `[observability.traces]` TOML.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## v0.16.7 — May 12, 2026
|
|
102
152
|
|
|
103
|
-
|
|
153
|
+
### Bearer wins over cookie
|
|
104
154
|
|
|
105
|
-
|
|
106
|
-
- OAuth access token via the OAuth Provider plugin
|
|
107
|
-
- Agent JWT via `@better-auth/agent-auth`
|
|
155
|
+
A request carrying both `Authorization` and a session `Cookie` resolves entirely from the bearer; the cookie is dropped before `getSession()` runs. All three Bearer flavors (API key, JWT, session-token) now behave consistently — no more silent cookie precedence on session-token bearers.
|
|
108
156
|
|
|
109
|
-
|
|
157
|
+
### Bearer plugin defaults to `requireSignature: true`
|
|
110
158
|
|
|
111
|
-
|
|
159
|
+
Better Auth's `bearer` plugin defaults to unsigned tokens; Quickback now emits `bearer({ requireSignature: true })`. Tokens emitted in the CORS-exposed `set-auth-token` header are server-signed with `BETTER_AUTH_SECRET` and verified on every request. Projects that genuinely need unsigned bearers can override via `providers.auth.config.plugins.bearer`.
|
|
112
160
|
|
|
113
|
-
|
|
161
|
+
See [Authentication Security → Bearer Tokens and Cookie Precedence](/stack/auth/security#bearer-tokens-and-cookie-precedence).
|
|
114
162
|
|
|
115
|
-
|
|
163
|
+
---
|
|
116
164
|
|
|
117
|
-
|
|
165
|
+
## v0.16.5 — May 12, 2026
|
|
118
166
|
|
|
119
|
-
|
|
167
|
+
### Flat write DSL
|
|
120
168
|
|
|
121
|
-
|
|
169
|
+
Resource write operations are now declared at the table level alongside `read`, replacing the nested `crud` block:
|
|
122
170
|
|
|
123
|
-
|
|
171
|
+
```ts
|
|
172
|
+
defineTable(customers, {
|
|
173
|
+
read: { ... },
|
|
174
|
+
create: { access: { roles: ["admin"] } },
|
|
175
|
+
update: { access: { roles: ["admin"] } },
|
|
176
|
+
delete: { access: { roles: ["admin"] }, mode: "soft" },
|
|
177
|
+
upsert: { access: { roles: ["admin"] } },
|
|
178
|
+
guards: { ... },
|
|
179
|
+
});
|
|
180
|
+
```
|
|
124
181
|
|
|
125
|
-
|
|
182
|
+
`crud` and top-level `put` still compile as deprecated compatibility aliases. Mixed usage on the same resource is rejected. `schema-registry.json` emits both shapes during the transition.
|
|
126
183
|
|
|
127
|
-
|
|
184
|
+
### CMS placement for multi-table feature actions
|
|
128
185
|
|
|
129
|
-
|
|
186
|
+
Standalone actions on multi-table features have an explicit placement model:
|
|
130
187
|
|
|
131
|
-
|
|
188
|
+
- `cms.placement: "feature"` shows the action on every table toolbar in the feature
|
|
189
|
+
- `cms.placement: "tables"` with `cms.tables` scopes it to specific tables
|
|
190
|
+
- `cms.hidden: true` keeps it API-only
|
|
132
191
|
|
|
133
|
-
|
|
192
|
+
Feature-root standalone actions are emitted under a new `featureActions` bucket in `schema-registry.json`. Ambiguous multi-table standalone actions without placement compile with a warning.
|
|
134
193
|
|
|
135
|
-
|
|
194
|
+
### `openapi.types` accepts a string array
|
|
136
195
|
|
|
137
|
-
|
|
196
|
+
One compile can write the generated types file to multiple locations, keeping colocated SPA clients in sync:
|
|
197
|
+
|
|
198
|
+
```ts
|
|
199
|
+
openapi: { types: ['api-types.gen.ts', 'apps/web/src/lib/api-types.gen.ts'] }
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Stable artifact ordering
|
|
203
|
+
|
|
204
|
+
Generated route files and `schema-registry.json` are emitted in a stable order across runs. Identical logical input produces identical artifacts.
|
|
138
205
|
|
|
139
206
|
---
|
|
140
207
|
|
|
141
|
-
## v0.
|
|
208
|
+
## v0.16.4 — May 12, 2026
|
|
142
209
|
|
|
143
|
-
###
|
|
210
|
+
### Drizzle snapshot integrity
|
|
144
211
|
|
|
145
|
-
|
|
212
|
+
Drizzle metadata files (`<n>_snapshot.json`) are no longer stamped with a Quickback warning key. The warning is now journal-only. Projects whose snapshots were corrupted by an earlier release self-heal on the next compile — the stripped header is removed during staging and the rewritten snapshot is clean.
|
|
146
213
|
|
|
147
|
-
|
|
214
|
+
### `account.auth.*` drives the server, not just the SPA
|
|
148
215
|
|
|
149
|
-
The
|
|
216
|
+
The Account UI's auth flags (`signup`, `password`, `passkey`, `emailOTP`, `emailVerification`) now configure the Better Auth server alongside the SPA bundle. A normalizer maps them into the server config:
|
|
150
217
|
|
|
151
|
-
|
|
218
|
+
- `signup → emailAndPassword.disableSignUp` (inverted)
|
|
219
|
+
- `password → emailAndPassword.enabled`
|
|
220
|
+
- `emailVerification → emailAndPassword.requireEmailVerification`
|
|
221
|
+
- `passkey` / `emailOTP` → plugin additions
|
|
152
222
|
|
|
153
|
-
|
|
223
|
+
The SPA's `VITE_ENABLE_*` flags are derived from the same canonicalized server config, so the bundle and the server cannot drift. Two new flags ride along: `VITE_ENABLE_API_KEYS` and `VITE_ENABLE_MAGIC_LINK`.
|
|
154
224
|
|
|
155
|
-
|
|
225
|
+
**Breaking** for projects that implicitly relied on the SPA-only behaviour: `account.auth.signup: false` now actually disables `POST /auth/v1/sign-up/email` on the server. Set `providers.auth.config.emailAndPassword.disableSignUp: false` explicitly to keep server signup open while hiding the SPA screen.
|
|
156
226
|
|
|
157
|
-
|
|
227
|
+
---
|
|
158
228
|
|
|
159
|
-
|
|
229
|
+
## v0.16.3 — May 9, 2026
|
|
160
230
|
|
|
161
|
-
Standalone
|
|
231
|
+
### Standalone action mount order
|
|
162
232
|
|
|
163
|
-
|
|
233
|
+
Feature-level standalone action routers now register before sibling CRUD routers when both mount at the exact same prefix. A literal path like `GET /api/v1/records/today-bundle` resolves to the standalone handler instead of falling through to `GET /:id` and treating `"today-bundle"` as a record ID.
|
|
164
234
|
|
|
165
|
-
|
|
235
|
+
---
|
|
166
236
|
|
|
167
|
-
|
|
237
|
+
## v0.16.1 — May 9, 2026
|
|
168
238
|
|
|
169
|
-
|
|
239
|
+
### Cloudflare ASSETS canonicalization
|
|
170
240
|
|
|
171
|
-
|
|
241
|
+
Worker SPA fallbacks now request `/<dir>/` instead of `/<dir>/index.html`. Cloudflare's static-assets binding rewrites `/index.html` requests as 307 redirects to the trailing-slash path under the default `html_handling=auto-trailing-slash`, which previously caused redirect loops in SPA fallback handlers. Affects CMS, Account, admin, and the multi-domain catchall.
|
|
172
242
|
|
|
173
|
-
|
|
243
|
+
### `account.customLogin`
|
|
174
244
|
|
|
175
|
-
-
|
|
176
|
-
- **Stale-cleaned.** `src/` is wiped and rewritten each compile, so files removed from `quickback/public/` disappear from `src/apps/` automatically on the next run.
|
|
177
|
-
- **Hidden entries skipped.** `.DS_Store`, `.git/`, dotfiles — none of these were intentional drops; including them would break worker asset bindings.
|
|
178
|
-
- **Collisions fail loud.** A file in `quickback/public/` whose path would shadow a compiler-emitted manifest entry — e.g. `quickback/public/cms/index.html` against the SPA shell — fails the compile with the offending paths listed, rather than silently overwriting and producing a confused-looking SPA build. Move or rename the offending file.
|
|
245
|
+
Set `account: { customLogin: true }` to drop a project-branded sign-in page in front of the bundled SPA. Place the page at `quickback/public/account/login/index.html` (as a directory) and the existing public passthrough serves it. The route registers before the `/account/*` SPA catch-all so the static handler wins; everything else under `/account/` continues to route through the bundled SPA.
|
|
179
246
|
|
|
180
|
-
|
|
247
|
+
### Project-level realtime defaults
|
|
181
248
|
|
|
182
|
-
|
|
249
|
+
`providers.database.config.realtime: true` now treats every resource as realtime-enabled by default. Per-resource `realtime: { enabled: false }` still wins.
|
|
183
250
|
|
|
184
|
-
|
|
251
|
+
### Compile-time validators
|
|
185
252
|
|
|
186
|
-
|
|
253
|
+
Two new compile-time errors over silent runtime failures:
|
|
187
254
|
|
|
188
|
-
|
|
255
|
+
- `AUTHENTICATED` + org-scoped firewall is rejected. The combination silently returned empty lists to sign-in-only callers who lacked an active org; the validator names three valid resolutions (drop the org scope, use `USER`, or split the route).
|
|
256
|
+
- `createRealtime` imports without `realtime: true` enabled in the config are rejected at compile.
|
|
189
257
|
|
|
190
|
-
|
|
258
|
+
### Drizzle metadata hardening
|
|
191
259
|
|
|
192
|
-
|
|
260
|
+
Drizzle journal files carry a "do not edit" header. The compiler warns when the journal entry count exceeds the snapshot file count (typically the trace of a hand-deleted snapshot).
|
|
193
261
|
|
|
194
|
-
|
|
262
|
+
### Minor
|
|
195
263
|
|
|
196
|
-
|
|
264
|
+
- `SYSADMIN` is now recognised by the standalone-action org gate's pseudo-role matcher.
|
|
265
|
+
- Apex `/` and `/account/login` get fallback redirects to `auth.loginUrl` when neither bundled SPA is enabled.
|
|
266
|
+
- Record-based action URLs are kebab-case to match the OpenAPI spec (e.g. `/api/v1/widgets/:id/send-invite`).
|
|
197
267
|
|
|
198
|
-
|
|
268
|
+
---
|
|
199
269
|
|
|
200
|
-
|
|
270
|
+
## v0.16.0 — May 9, 2026
|
|
201
271
|
|
|
202
|
-
|
|
272
|
+
### Agent Auth Protocol
|
|
203
273
|
|
|
204
|
-
|
|
274
|
+
Quickback ships a server implementation of the [Agent Auth Protocol](https://agentauthprotocol.com) via `@better-auth/agent-auth`. Enable with `auth.plugins.agentAuth: true` and the compiler emits the full agent-auth surface: discovery at `/.well-known/agent-configuration`, capability projection from the project's OpenAPI spec, a device-authorization approval page in the Account SPA at `/agents/approve`, and the four agent-auth tables added to the auth schema automatically.
|
|
205
275
|
|
|
206
|
-
|
|
207
|
-
|
|
276
|
+
**OpenAPI capability projection runs by default.** Every operation with an `operationId` becomes an agent capability. Default `approvalStrength` map: `GET → "session"`, `POST/PUT/PATCH/DELETE → "webauthn"`. The proxy `onExecute` makes a self-fetch with a Better Auth JWT minted for the agent session, so the inner request hits the existing JWT fast-path and runs the full firewall + access + masking pipeline. Opt out of OpenAPI projection with `agentAuth: { fromOpenAPI: false }` and wire `capabilities` + `onExecute` by hand.
|
|
277
|
+
|
|
278
|
+
### Bearer-only on `/mcp` and the agent-auth surface
|
|
208
279
|
|
|
209
|
-
|
|
280
|
+
`/mcp` forwards only `Authorization: Bearer …` into the inner request. Cookie and `x-api-key` forwarding are removed. Three Bearer flavors land on the same header — Better Auth session token (via the `bearer` plugin), OAuth access token (via OAuth Provider), and agent JWT (via `@better-auth/agent-auth`).
|
|
210
281
|
|
|
211
|
-
|
|
282
|
+
### Auth DSL gains first-class plugin entries
|
|
212
283
|
|
|
213
|
-
|
|
284
|
+
`bearer`, `oauthProvider`, and `agentAuth` are now typed entries in both the array-form union and the `BetterAuthPlugins` interface, with their own options shapes (`OAuthProviderOptions`, `AgentAuthOptions`). Existing `as any` casts can come out.
|
|
214
285
|
|
|
215
|
-
|
|
286
|
+
Auto-enable rule: turning on `agentAuth` force-adds `bearer` + `oauthProvider`. No useful agent-auth deployment ships without those two.
|
|
216
287
|
|
|
217
|
-
|
|
288
|
+
### `queue-consumer.ts` gating
|
|
218
289
|
|
|
219
|
-
|
|
290
|
+
The queue consumer is emitted when any of the following are true: embeddings are configured, queue handlers exist under `services/queues/*`, or `additionalQueues` is declared. Previously the third case left projects with a wrangler binding pointing at a missing handler.
|
|
220
291
|
|
|
221
292
|
---
|
|
222
293
|
|
|
223
|
-
## v0.
|
|
294
|
+
## v0.15.0 — May 7, 2026
|
|
224
295
|
|
|
225
|
-
###
|
|
296
|
+
### Sysadmin tier for the CMS
|
|
226
297
|
|
|
227
|
-
|
|
298
|
+
A new opt-in `cms: { sysadmin: true }` flag turns the CMS into a cross-tenant DB-admin tool gated by `user.role === 'sysadmin'`. Distinct from the Better Auth `'admin'` plugin role, so user-management powers and DB-admin powers stay decoupled. Off by default.
|
|
228
299
|
|
|
229
|
-
|
|
300
|
+
When enabled, the compiler emits a `SYSADMIN` pseudo-role (a fifth marker alongside `PUBLIC` / `AUTHENTICATED` / `USER` / `ADMIN`), a firewall escape hatch that drops tenant scopes for sysadmins while preserving soft-delete, a true cross-tenant `/admin/v1/sysadmin/organizations` endpoint, and a relaxed cross-tenant guard for list routes.
|
|
230
301
|
|
|
231
|
-
|
|
302
|
+
The CMS SPA gains a two-mode design: org admins keep the existing membership-based switcher, sysadmins get an "All organizations" selector that pins tenants via `?organizationId=` on every API call.
|
|
232
303
|
|
|
233
|
-
|
|
304
|
+
### Durable Object `[[migrations]]` order is preserved
|
|
234
305
|
|
|
235
|
-
|
|
306
|
+
Cloudflare's migration list is append-only. The compiler now reads your existing `wrangler.toml` (when present) and emits auto-generated DO `[[migrations]]` blocks in two phases: deployed entries first (preserving order), net-new entries appended last. Reordering DOs in the config array no longer reshuffles deployed migrations.
|
|
236
307
|
|
|
237
|
-
|
|
308
|
+
### `quickback/public/` — static-asset passthrough
|
|
238
309
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
310
|
+
Anything dropped under `quickback/public/` is copied verbatim into `src/apps/` on every compile and served by the wrangler `[assets]` binding. Use for favicons, `robots.txt`, OG images, `.well-known/` files, marketing PDFs — anything that needs to ride past the compiler as bytes.
|
|
311
|
+
|
|
312
|
+
- Optional. Missing folder is a no-op.
|
|
313
|
+
- Stale-cleaned. Files removed from `quickback/public/` disappear on the next compile.
|
|
314
|
+
- Hidden entries (`.DS_Store`, dotfiles) are skipped.
|
|
315
|
+
- Collisions with compiler-emitted manifest paths fail the compile loudly.
|
|
316
|
+
|
|
317
|
+
### Minor
|
|
245
318
|
|
|
246
|
-
|
|
319
|
+
- Standalone-action wrapper skips the org gate when the access tree references any pseudo-role.
|
|
320
|
+
- Queue handler emit no longer drops the `queue` export when there are no embeddings.
|
|
247
321
|
|
|
248
322
|
---
|
|
249
323
|
|
|
250
|
-
## v0.14.
|
|
324
|
+
## v0.14.7 — May 7, 2026
|
|
325
|
+
|
|
326
|
+
### Codegen fixes for projects with non-`id` primary keys and DO-only features
|
|
251
327
|
|
|
252
|
-
|
|
328
|
+
Four surgical fixes to the generated output:
|
|
253
329
|
|
|
254
|
-
|
|
330
|
+
- Duplicate table imports in relationship-role routes are deduplicated.
|
|
331
|
+
- `db` references in single-record and bulk action handlers now resolve correctly during pre-fetch.
|
|
332
|
+
- PartyServer auth gates pass the in-scope `db` handle into firewall calls.
|
|
333
|
+
- Durable-object-only features keep their `lib/` files in the output.
|
|
255
334
|
|
|
256
|
-
|
|
335
|
+
### `emailOtp` + AWS SES is OTP-only
|
|
257
336
|
|
|
258
|
-
|
|
337
|
+
`auth.emailOtp` with the AWS SES email provider no longer auto-wires the magic-link companion. Mail-client URL prefetching can burn the one-time code before the human sees it; the Account SPA's `/email-otp` route is the single canonical entry point. Projects that explicitly want the magic-link arm can wire `sendVerificationOTP` directly.
|
|
259
338
|
|
|
260
339
|
---
|
|
261
340
|
|
|
262
|
-
## v0.14.
|
|
341
|
+
## v0.14.6 — May 7, 2026
|
|
263
342
|
|
|
264
|
-
###
|
|
343
|
+
### MCP transport correctness
|
|
265
344
|
|
|
266
|
-
|
|
345
|
+
Four fixes to the MCP-over-HTTP path:
|
|
267
346
|
|
|
268
|
-
|
|
347
|
+
- `tools/call` URLs are no longer double-prefixed for action tools.
|
|
348
|
+
- Auth middleware accepts API keys via `Authorization: Bearer` in addition to `x-api-key` and query parameters — the channel MCP clients use exclusively.
|
|
349
|
+
- `auth.roleHierarchy` is expanded for runtime role checks across api-key, JWT, and session auth paths. A higher role inherits the privileges of every lower role.
|
|
350
|
+
- Team-scoped firewall predicates degrade gracefully when no team is active (org scoping continues to apply; team scoping is optional).
|
|
269
351
|
|
|
270
|
-
|
|
271
|
-
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## v0.14.5 — May 7, 2026
|
|
272
355
|
|
|
273
|
-
|
|
356
|
+
### MCP environment threading
|
|
274
357
|
|
|
275
|
-
|
|
358
|
+
The generated MCP server's `tools/call` dispatch threads `env` and `executionCtx` into the inner request, so action tools that touch Cloudflare bindings (D1, KV, R2, Queues) no longer crash with `undefined` env access.
|
|
276
359
|
|
|
277
360
|
---
|
|
278
361
|
|
|
279
|
-
## v0.14.
|
|
362
|
+
## v0.14.4 — May 7, 2026
|
|
280
363
|
|
|
281
|
-
###
|
|
364
|
+
### `via:` firewall predicates pull required imports
|
|
282
365
|
|
|
283
|
-
|
|
366
|
+
The relationship-role generator emits `inArray` and `sql` imports when the firewall has any `via:` predicate, and `buildFirewallConditions` accepts `(ctx, db)` so the relationship subquery has a Drizzle client to evaluate against. Every CRUD and action call site passes `db` through automatically.
|
|
284
367
|
|
|
285
|
-
|
|
368
|
+
---
|
|
286
369
|
|
|
287
|
-
|
|
370
|
+
## v0.14.3 — May 7, 2026
|
|
288
371
|
|
|
289
|
-
|
|
290
|
-
// generated <table>.resource.ts (after fix)
|
|
291
|
-
import { event_guests } from './schema';
|
|
292
|
-
export { event_guests }; // ← was missing
|
|
293
|
-
```
|
|
372
|
+
### Relationship-role table re-exports
|
|
294
373
|
|
|
295
|
-
|
|
374
|
+
Generated `<table>.resource.ts` files now re-export their Drizzle table binding. Cross-feature relationship subqueries that import the binding from the resource file (rather than the schema) resolve correctly.
|
|
296
375
|
|
|
297
376
|
---
|
|
298
377
|
|
|
299
378
|
## v0.14.2 — May 7, 2026
|
|
300
379
|
|
|
301
|
-
###
|
|
302
|
-
|
|
303
|
-
Cloudflare requires the `[[migrations]]` list in `wrangler.toml` to be **append-only**: once a tag has been deployed, removing it on a subsequent compile causes the next deploy to fail with `Cannot apply <new|deleted|renamed|transferred>-class migration to class <X>` — CF replays the full migrations log on every push and notices the tag is gone.
|
|
304
|
-
|
|
305
|
-
Pre-fix, the compiler regenerated the `[[migrations]]` blocks from scratch on every compile, emitting only entries for the *current* `durableObjects` bindings. Any historical lifecycle events the user had hand-maintained — `deleted_classes`, `renamed_classes`, `transferred_classes` — were silently dropped and the deploy then broke. AttendVIP hit this first: a `qb-do-deleted-legacy-notes-2026-05-05` deletion entry got dropped, and the next deploy tried to re-apply `qb-do-Notepad`'s `new_sqlite_classes` against the existing class.
|
|
380
|
+
### Historical DO `[[migrations]]` are preserved
|
|
306
381
|
|
|
307
|
-
|
|
382
|
+
A new `bindings.durableObjectMigrations` config slot carries forward `deleted_classes`, `renamed_classes`, and `transferred_classes` lifecycle entries across recompiles. Cloudflare's migration list is append-only; entries declared here are emitted first in `wrangler.toml`, then auto-generated current-class entries follow:
|
|
308
383
|
|
|
309
384
|
```ts
|
|
310
|
-
// quickback.config.ts
|
|
311
385
|
bindings: {
|
|
312
|
-
durableObjects: [
|
|
313
|
-
{ name: 'NOTEPAD', className: 'Notepad', from: 'lib/Notepad' },
|
|
314
|
-
],
|
|
386
|
+
durableObjects: [{ name: 'NOTEPAD', className: 'Notepad', from: 'lib/Notepad' }],
|
|
315
387
|
durableObjectMigrations: [
|
|
316
|
-
|
|
317
|
-
{
|
|
318
|
-
tag: 'qb-do-deleted-legacy-notes-2026-05-05',
|
|
319
|
-
deletedClasses: ['LegacyNotes'],
|
|
320
|
-
},
|
|
388
|
+
{ tag: 'qb-do-deleted-legacy-notes-2026-05-05', deletedClasses: ['LegacyNotes'] },
|
|
321
389
|
],
|
|
322
390
|
}
|
|
323
391
|
```
|
|
324
392
|
|
|
325
|
-
All four lifecycle shapes are supported
|
|
326
|
-
|
|
327
|
-
This is a config-side fix, not a wrangler.toml-merging one — Quickback doesn't read your existing `wrangler.toml`. The discipline is the same as for any append-only log: declare lifecycle events as you make them. Auto-detection of removed classes from the schema diff is on the roadmap; for now the compiler trusts your declaration.
|
|
328
|
-
|
|
329
|
-
7 new tests covering deletion, rename, transfer, multi-entry ordering, override-via-same-tag, no-history bit-identical output, and the historical-only-no-current-DOs edge case.
|
|
393
|
+
All four lifecycle shapes are supported. User-declared entries can override auto-emit by reusing the same tag.
|
|
330
394
|
|
|
331
395
|
---
|
|
332
396
|
|
|
333
397
|
## v0.14.1 — May 7, 2026
|
|
334
398
|
|
|
335
|
-
### Bulk action variants
|
|
336
|
-
|
|
337
|
-
Record-based actions with `bulkVariant: true` (introduced in v0.14.0) generate a working `POST /<base>/batch/<actionName>` route at runtime, but the OpenAPI generator wasn't aware of them — so the bulk endpoints were invisible to typed-client codegen (`api-types.gen.ts`) and to MCP-driven agents discovering operations from the spec. AttendVIP's v0.14.0 rollout (seven actions with `bulkVariant: true`: `approve`, `checkIn`, `checkOut`, `setVisibility`, `cancelInvite`, `sendInvite`, `sessionApprove`) found this within hours of shipping.
|
|
399
|
+
### Bulk action variants in `openapi.json`
|
|
338
400
|
|
|
339
|
-
|
|
401
|
+
Record-based actions with `bulkVariant: true` are now emitted as sibling operations in the OpenAPI spec, with the documented `{ ids, input, failFast? }` request shape, 200/207/400 responses, and a separate `<Resource><Action>Bulk` `operationId` so typed-client codegen distinguishes single from bulk.
|
|
340
402
|
|
|
341
|
-
|
|
403
|
+
### Cross-tenant "my events" patterns
|
|
342
404
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
The v0.14.0 docs noted that relationship-roles do **not** solve cross-tenant aggregation ("a guest's view of events across all tenants they were invited to") and pointed at function-form access as the workaround, but didn't show what that looked like in practice. The access docs now carry a full standalone-action example for `GET /my-events` — the canonical attendee-dashboard pattern — including the two security guardrails (always filter by `ctx.userId`; the action takes responsibility for soft-delete and other invariants the firewall would otherwise apply). Standalone actions are already mandatorily audit-logged in the runtime, so the cross-tenant traversal is recorded automatically.
|
|
346
|
-
|
|
347
|
-
See [Access → Cross-tenant "my events" dashboards](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this).
|
|
405
|
+
The access docs now include a worked example for the cross-tenant aggregation pattern (e.g. `GET /my-events` returning resources across all tenants a caller is invited to). See [Access → Cross-tenant dashboards](/compiler/definitions/access#cross-tenant-my-events-dashboards-are-not-this).
|
|
348
406
|
|
|
349
407
|
---
|
|
350
408
|
|
|
351
409
|
## v0.14.0 — May 7, 2026
|
|
352
410
|
|
|
353
|
-
### Relationship-based authorization
|
|
354
|
-
|
|
355
|
-
Quickback's role system now supports a third kind of role beyond Better Auth org membership and the four pseudo-roles (`PUBLIC`/`AUTHENTICATED`/`USER`/`ADMIN`): **relationship-roles** that bind to a domain-table membership ("user is a confirmed guest of this event") rather than an org/admin gate. The original ask was a B2B event-management app where logged-in users who aren't team members but ARE confirmed guests of an event need to see that event's sessions, pages, and tracks — same data, different access lane. The old workarounds (function-form access, hand-written actions, `firewall: { exception: true }`) all gave up some combination of OpenAPI/MCP visibility, CRUD code generation, or tenant safety.
|
|
411
|
+
### Relationship-based authorization
|
|
356
412
|
|
|
357
|
-
Declare the relationship once
|
|
413
|
+
Roles can now be bound to a domain-table membership ("user is a confirmed guest of this event") rather than an org membership or a pseudo-role. Declare the relationship once and reference it from `firewall:` or `access.roles:`:
|
|
358
414
|
|
|
359
415
|
```ts
|
|
360
|
-
// quickback.config.ts
|
|
361
416
|
authz: {
|
|
362
417
|
relationships: {
|
|
363
418
|
guestOf: {
|
|
364
|
-
from: 'event_guests',
|
|
365
|
-
subject: { column: 'userId', equals: 'ctx.userId' },
|
|
366
|
-
resource: { column: 'eventId' },
|
|
367
|
-
where: { status: 'confirmed' },
|
|
419
|
+
from: 'event_guests',
|
|
420
|
+
subject: { column: 'userId', equals: 'ctx.userId' },
|
|
421
|
+
resource: { column: 'eventId' },
|
|
422
|
+
where: { status: 'confirmed' },
|
|
368
423
|
},
|
|
369
424
|
},
|
|
370
425
|
roles: {
|
|
371
426
|
guest: { via: 'guestOf' },
|
|
372
|
-
eventStaff: {
|
|
373
|
-
or: [{ via: 'guestOf' }, { roles: ['admin', 'owner'] }],
|
|
374
|
-
},
|
|
427
|
+
eventStaff: { or: [{ via: 'guestOf' }, { roles: ['admin', 'owner'] }] },
|
|
375
428
|
},
|
|
376
429
|
}
|
|
377
430
|
|
|
378
431
|
// features/sessions/sessions.ts
|
|
379
432
|
firewall: [
|
|
380
433
|
{ field: 'organizationId', equals: 'ctx.activeOrgId' },
|
|
381
|
-
{ field: 'eventId', via: 'guestOf' },
|
|
434
|
+
{ field: 'eventId', via: 'guestOf' },
|
|
382
435
|
],
|
|
383
|
-
read: { access: { roles: ['admin', 'member', 'guest'] } },
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
update: { access: { roles: ['admin'] } },
|
|
387
|
-
}
|
|
436
|
+
read: { access: { roles: ['admin', 'member', 'guest'] } },
|
|
437
|
+
create: { access: { roles: ['admin', 'guest'] } },
|
|
438
|
+
update: { access: { roles: ['admin'] } },
|
|
388
439
|
```
|
|
389
440
|
|
|
390
|
-
The compiler emits an inline Drizzle subquery against the relationship table and AND-composes it as the outermost firewall clause. The relationship table's own
|
|
391
|
-
|
|
392
|
-
What works in v0.14.0:
|
|
393
|
-
|
|
394
|
-
| Surface | Status |
|
|
395
|
-
|---|---|
|
|
396
|
-
| `firewall: [{ field, via }]` row-level scoping | Full |
|
|
397
|
-
| `crud.<op>.access` `roles: ['guest']` (inline emission) | Full |
|
|
398
|
-
| `read.access` and `read.views.*.access` | Full |
|
|
399
|
-
| `masking.<f>.show` `roles: ['guest']` | Compile-refused (workaround pointer) |
|
|
400
|
-
| `actions.<n>.access` `roles: ['guest']` | Compile-refused (workaround pointer) |
|
|
401
|
-
|
|
402
|
-
The runtime evaluator fails closed on relationship arms regardless of which surface you hit, so silent grants are impossible everywhere. The two refused surfaces have clear compile-time errors pointing to the working pattern (gate the row at the firewall layer with `via:`, gate the role at the access layer with BA roles).
|
|
441
|
+
The compiler emits an inline Drizzle subquery against the relationship table and AND-composes it as the outermost firewall clause. The relationship table's own firewall (tenant scope, soft-delete) is honored inside the subquery; cross-tenant grants are impossible because the resource's tenant filter sits outermost.
|
|
403
442
|
|
|
404
|
-
|
|
443
|
+
Supported surfaces: row-level scoping via `firewall: [{ field, via }]`, role gates on writes and reads, view access. Masking and action access reject relationship-roles at compile time with pointers to the working pattern (gate the row at the firewall layer, gate the role at the access layer).
|
|
405
444
|
|
|
406
|
-
Cross-tenant
|
|
445
|
+
Cross-tenant aggregation dashboards aren't solved by relationship-roles — the tenant firewall remains the outermost AND. For that pattern, use a user-scoped firewall or function-form access on a dedicated route.
|
|
407
446
|
|
|
408
|
-
|
|
447
|
+
See [Firewall → Relationship-based scoping](/compiler/definitions/firewall#relationship-based-scoping-via) and [Access → Relationship-based authorization](/compiler/definitions/access#relationship-based-authorization).
|
|
409
448
|
|
|
410
|
-
### Bulk variants
|
|
449
|
+
### Bulk variants on record-based actions
|
|
411
450
|
|
|
412
|
-
|
|
451
|
+
`defineAction({ bulkVariant: true })` emits `POST /:resource/batch/{action}` alongside the per-record route. The bulk handler loops the same access + transition + execute pipeline over a `{ ids, input, failFast? }` body:
|
|
413
452
|
|
|
414
453
|
```ts
|
|
415
|
-
// features/applications/actions/advance.ts
|
|
416
454
|
export default defineAction({
|
|
417
455
|
description: "Move an application forward in the pipeline.",
|
|
418
456
|
input: z.object({ nextStatus: z.enum(["screening", "interview", "offer"]) }),
|
|
419
457
|
access: { roles: ["owner", "admin"] },
|
|
420
|
-
bulkVariant: true,
|
|
458
|
+
bulkVariant: true,
|
|
421
459
|
transition: { field: "status", via: "nextStatus", fromTo: { /* ... */ } },
|
|
422
460
|
async execute({ db, record, input, whereTransition }) {
|
|
423
|
-
// exact same body
|
|
461
|
+
// exact same body — runs once per id
|
|
424
462
|
},
|
|
425
463
|
});
|
|
426
464
|
```
|
|
427
465
|
|
|
428
|
-
Per-record outcomes return as 207 Multi-Status
|
|
429
|
-
|
|
430
|
-
Compile-time refusals: `bulkVariant: true` is rejected on standalone actions (no record context to loop over) and on actions that declare `unsafe` (cross-tenant per-record audit not yet wired). Method is forced to POST regardless of the action's `method` setting — the one-row-to-many-rows asymmetry makes inheriting GET/DELETE confusing. Max batch size is 100 ids per request, mirroring the CRUD batch endpoints. See [Actions → Bulk variant](/compiler/definitions/actions#bulk-variant).
|
|
466
|
+
Per-record outcomes return as 207 Multi-Status. `failFast: true` aborts on the first failure and wraps the loop in `db.transaction()` on tx-supporting providers; D1 fails fast without rollback. Max 100 IDs per request. Rejected on standalone actions and `unsafe` actions.
|
|
431
467
|
|
|
432
468
|
### Aggregations on read views
|
|
433
469
|
|
|
434
|
-
Read views can
|
|
470
|
+
Read views can declare pre-computed metrics that surface alongside the row payload:
|
|
435
471
|
|
|
436
472
|
```ts
|
|
437
473
|
read: {
|
|
@@ -447,51 +483,29 @@ read: {
|
|
|
447
483
|
}
|
|
448
484
|
```
|
|
449
485
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
```json
|
|
453
|
-
{
|
|
454
|
-
"data": [/* paginated rows */],
|
|
455
|
-
"view": "pipeline",
|
|
456
|
-
"pagination": { "count": 50, "page": 1, "pageSize": 50, "hasMore": true },
|
|
457
|
-
"aggregations": {
|
|
458
|
-
"totalApplications": 173,
|
|
459
|
-
"byStatus": { "applied": 102, "screening": 41, "interview": 18, "offer": 7, "rejected": 5 }
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
Aggregations always run over the **same firewalled, filtered set** as the row query — pagination is intentionally ignored, so `?status=applied&limit=10` returns the 10 paged rows AND the count over every applied row. Supported `fn`s: `sum`, `avg`, `min`, `max`, `count` (with or without `field` — `COUNT(*)` vs `COUNT(field)`), `count_distinct`, and `groupBy` (returns `{ value: count }`, NULLs bucket as `"(none)"`).
|
|
465
|
-
|
|
466
|
-
Compile-time validation: `field` must reference a real column; `sum`/`avg` require numeric column types; the same masking opt-out gate that governs `query.{filterable, sortable, searchable}` applies to aggregations (a `sum(salary)` leaks structure even when the row payload is redacted); aggregation names cannot collide with the reserved response fields `data`, `pagination`, `view`. No raw SQL `expr:` form in v1 — column references only. See [Views → Aggregations](/compiler/definitions/views#aggregations).
|
|
486
|
+
Aggregations run over the same firewalled, filtered set as the row query; pagination is intentionally ignored. Supported functions: `sum`, `avg`, `min`, `max`, `count`, `count_distinct`, `groupBy`. See [Views → Aggregations](/compiler/definitions/views#aggregations).
|
|
467
487
|
|
|
468
488
|
---
|
|
469
489
|
|
|
470
490
|
## v0.13.5 — May 6, 2026
|
|
471
491
|
|
|
472
|
-
### Object-form `auth.plugins`
|
|
492
|
+
### Object-form `auth.plugins` config is honored
|
|
473
493
|
|
|
474
|
-
The documented
|
|
494
|
+
The documented `plugins: { oauthProvider: {...} }`, `plugins: { organization: { teams: { enabled: true } } }` shapes now flow through the compiler unchanged. Per-plugin options reach the generated `auth.ts` as written.
|
|
475
495
|
|
|
476
|
-
|
|
496
|
+
### `roles: ["PUBLIC"]` allowed on writes and actions
|
|
477
497
|
|
|
478
|
-
|
|
498
|
+
`PUBLIC` is the explicit, uppercase opt-in for unauthenticated access on every access node — reads, writes, views, and actions. The runtime trusts the marker; row-level safety comes from firewall, masking, and the action's own validation. `PUBLIC` actions continue to receive mandatory audit logging.
|
|
479
499
|
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
v0.10.17 added a compile-time block that rejected `roles: ["PUBLIC"]` on `crud.create` / `crud.update` / `crud.delete` and on every action. The intent — "anonymous mutations are usually a misconfiguration" — collided with the legitimate use cases the rest of Quickback was built around: Gmail one-click RSVP confirms, public RSVP forms, magic-link redemption, List-Unsubscribe-Post handlers, webhook ingest, captcha-gated contact forms. None of those carry a session, so `AUTHENTICATED` 401s the caller before the handler can validate its own token, and the suggested escape hatch ("custom action that does its own auth + `firewall: { exception: true }`") was itself blocked by the same validator.
|
|
483
|
-
|
|
484
|
-
The block is removed. `PUBLIC` is the explicit, uppercase opt-in for unauthenticated access on every access node — reads, CRUD writes, views, and actions. The compiler trusts the marker; row-level safety comes from firewall, masking, and the action's own token validation. `PUBLIC` actions continue to receive **mandatory audit logging** (IP, input, result, timing) in the runtime regardless. `crud.create`/`update`/`delete` typically pair `roles: ["PUBLIC"]` with `firewall: { exception: true }` on the resource so the row predicate doesn't reject every unauthenticated caller.
|
|
485
|
-
|
|
486
|
-
`USER` and `ADMIN` keep their compile-time prerequisites (firewall must scope by `userId` / admin plugin must be enabled).
|
|
500
|
+
Common pattern: pair `roles: ["PUBLIC"]` with `firewall: { exception: true }` on the resource so the row predicate doesn't reject every unauthenticated caller.
|
|
487
501
|
|
|
488
502
|
---
|
|
489
503
|
|
|
490
504
|
## v0.12.0 — May 5, 2026
|
|
491
505
|
|
|
492
|
-
### Per-room authorization for PartyServer
|
|
506
|
+
### Per-room authorization for PartyServer
|
|
493
507
|
|
|
494
|
-
`bindings.durableObjects[].access`
|
|
508
|
+
`bindings.durableObjects[].access` declares a path-scoped gate that runs the declared resource's firewall and `read.access` pipeline before the WebSocket upgrade:
|
|
495
509
|
|
|
496
510
|
```ts
|
|
497
511
|
durableObjects: [
|
|
@@ -510,119 +524,70 @@ durableObjects: [
|
|
|
510
524
|
},
|
|
511
525
|
} },
|
|
512
526
|
|
|
513
|
-
// Anonymous
|
|
527
|
+
// Anonymous lobbies / public pads: explicit opt-out.
|
|
514
528
|
{ name: 'PublicLobby', className: 'PublicLobby', from: 'lib/PublicLobby',
|
|
515
529
|
access: 'public' },
|
|
516
|
-
]
|
|
530
|
+
]
|
|
517
531
|
```
|
|
518
532
|
|
|
519
|
-
The gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing
|
|
533
|
+
The gate 401s unauthenticated callers, 403s when the firewall hides the row, 404s when the row is missing. Resource references are validated against feature names at compile time. See [PartyServer Rooms → Per-room authorization](/stack/realtime/partyserver-rooms#per-room-authorization-via-access-v012).
|
|
520
534
|
|
|
521
535
|
---
|
|
522
536
|
|
|
523
537
|
## v0.11.1 — May 5, 2026
|
|
524
538
|
|
|
525
|
-
### PartyServer auto-mount is
|
|
526
|
-
|
|
527
|
-
The `/realtime/*` auto-mount shipped in v0.11.0 didn't gate WebSocket upgrades — anyone who knew a room ID (CUID2, hard to guess but not a security boundary) could open a connection. `authMiddleware` populated the request context but `partyserverMiddleware` doesn't 401 anonymous upgrades on its own.
|
|
539
|
+
### PartyServer auto-mount is secure by default
|
|
528
540
|
|
|
529
|
-
The auto-mount now wraps `partyserverMiddleware` in an auth check
|
|
530
|
-
|
|
531
|
-
Per-room access (e.g., "is this user a member of the org that owns this room?") is still your `Server` class's responsibility in `onConnect` — the auto-mount only enforces "are you authenticated at all." Hand-written mounts with custom `onBeforeConnect` continue to work unchanged; declare them at `/realtime/*` before the auto-mount runs to opt out of the default gate.
|
|
532
|
-
|
|
533
|
-
No code changes required — `quickback compile` regenerates the gated mount automatically. Single-tenant alphas weren't exploitable in practice (room IDs aren't logged or surfaced); multi-tenant projects should redeploy to pick this up.
|
|
541
|
+
The `/realtime/*` auto-mount now wraps `partyserverMiddleware` in an auth check. Unauthenticated upgrades return 401; the four auth mechanisms (session cookie, JWT bearer, `x-api-key` header, query parameter) all unlock connections. Per-room access remains the `Server` class's responsibility in `onConnect`.
|
|
534
542
|
|
|
535
543
|
---
|
|
536
544
|
|
|
537
545
|
## v0.11.0 — May 5, 2026
|
|
538
546
|
|
|
539
|
-
### OAuth Provider
|
|
540
|
-
|
|
541
|
-
Quickback can now act as a standards-compliant OAuth 2.1 + OIDC authorization server via [`@better-auth/oauth-provider`](https://better-auth.com/docs/plugins/oauth-provider). Enable it with `plugins: ["oauthProvider"]` in your auth config — the compiler auto-includes Better Auth's `jwt` plugin (the OAuth provider delegates access-token signing to it) and the Account SPA gains a `/consent` page for the standard authorization-code flow.
|
|
547
|
+
### OAuth Provider (MCP-ready)
|
|
542
548
|
|
|
543
|
-
|
|
549
|
+
Quickback can act as a standards-compliant OAuth 2.1 + OIDC authorization server via [`@better-auth/oauth-provider`](https://better-auth.com/docs/plugins/oauth-provider). Enable with `plugins: ["oauthProvider"]`. The compiler auto-includes Better Auth's `jwt` plugin and the Account SPA gains a `/consent` page for the standard authorization-code flow.
|
|
544
550
|
|
|
545
|
-
|
|
551
|
+
This replaces Better Auth's deprecated `mcp` plugin and gives every MCP client (Cursor, Claude Desktop, claude.ai connectors, custom tooling) RFC 7591 dynamic client registration plus the discovery documents they need to bootstrap. See [Auth Plugins → OAuth Provider](/stack/auth/plugins#oauth-provider-mcp-ready).
|
|
546
552
|
|
|
547
|
-
|
|
553
|
+
### API keys via query parameter
|
|
548
554
|
|
|
549
|
-
The
|
|
555
|
+
The auth middleware now accepts API keys as `?api_key=…` or `?key=…` query parameters. The `x-api-key` header takes precedence when both are sent. Prefer the header whenever the client supports it — query parameters land in access logs and `Referer` headers.
|
|
550
556
|
|
|
551
|
-
### PartyServer rooms + realtime URL split
|
|
557
|
+
### PartyServer rooms + realtime URL split
|
|
552
558
|
|
|
553
|
-
The realtime URL space is reorganized so
|
|
559
|
+
The realtime URL space is reorganized so names match what each primitive does:
|
|
554
560
|
|
|
555
|
-
- **`/realtime/v1/*` → `/broadcast/v1/*`** — the
|
|
556
|
-
- **`/realtime/<binding>/<room-id
|
|
561
|
+
- **`/realtime/v1/*` → `/broadcast/v1/*`** — the org-wide Broadcaster moves to its semantically accurate prefix.
|
|
562
|
+
- **`/realtime/<binding>/<room-id>`** — new mount for [PartyServer](/stack/realtime/partyserver-rooms) rooms. Per-room Durable Objects with presence and lifecycle hooks. Auto-mounted whenever a project declares any in-worker DO.
|
|
557
563
|
|
|
558
|
-
**Breaking
|
|
564
|
+
**Breaking** — recompile + redeploy required:
|
|
559
565
|
|
|
560
|
-
-
|
|
561
|
-
-
|
|
562
|
-
-
|
|
566
|
+
- `REALTIME_URL` env var renamed to `BROADCAST_URL`.
|
|
567
|
+
- SPA helpers `getRealtimeWsUrl()` / `getRealtimeTicketUrl()` renamed to `getBroadcastWsUrl()` / `getBroadcastTicketUrl()`.
|
|
568
|
+
- `appConfig.routes.api.realtime` renamed to `appConfig.routes.api.broadcast`.
|
|
563
569
|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
**Recipe:** see the new [PartyServer Rooms](/stack/realtime/partyserver-rooms) doc page and the `examples/recruitment` interview-room demo for an end-to-end example with presence and live notes.
|
|
570
|
+
`partyserver`, `partysocket`, and `hono-party` are pre-installed in the compiler image; collab projects compile without an extra `npm install` step.
|
|
567
571
|
|
|
568
572
|
---
|
|
569
573
|
|
|
570
574
|
## v0.10.20 — May 4, 2026
|
|
571
575
|
|
|
572
|
-
### In-worker Durable Objects
|
|
573
|
-
|
|
574
|
-
`bindings.durableObjects` previously only emitted the binding declaration — useful for cross-worker DOs (`scriptName: "other-worker"`), but not enough for app-owned classes that live in this worker's source. Authors had to hand-edit `src/index.ts` (to add `export { ItemStream } from './...'`) and `wrangler.toml` (to add the `[[migrations]]` block) on every compile.
|
|
576
|
+
### In-worker Durable Objects
|
|
575
577
|
|
|
576
|
-
|
|
578
|
+
`bindings.durableObjects[].from` flips a DO binding into in-worker mode and emits the export, the `[[migrations]]` block, and the `CloudflareBindings` type all together:
|
|
577
579
|
|
|
578
580
|
```ts
|
|
579
|
-
durableObjects: [
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
]
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
Generates:
|
|
589
|
-
- `src/index.ts`: `export { ItemStream } from './features/loops/lib/ItemStream';` — wrangler resolves the binding by class export.
|
|
590
|
-
- `wrangler.toml`: a `[[migrations]]` block with `tag = "qb-do-ItemStream"` and `new_sqlite_classes = ["ItemStream"]`.
|
|
591
|
-
- `CloudflareBindings`: `ITEM_STREAM: DurableObjectNamespace` so `c.env.ITEM_STREAM.idFromName(...)` typechecks.
|
|
592
|
-
|
|
593
|
-
Where the class file lives: in-worker DO classes go under `quickback/lib/` or `quickback/features/<feature>/lib/` — both copy verbatim into the generated `src/` tree on every compile (the rest of `src/` is wiped). The `from` value is the resulting `src/`-relative path with no `./` prefix and no `.ts` suffix.
|
|
594
|
-
|
|
595
|
-
`from` and `scriptName` are mutually exclusive — the compiler rejects entries that set both. Cross-worker entries (`scriptName` set) skip the re-export and the migration block; the exporting worker owns its own migration table.
|
|
596
|
-
|
|
597
|
-
`migrationTag` (default `qb-do-${className}`) is stable across regenerations and **must never be removed or renamed once deployed** — wrangler tracks applied tags and will reject deploys that try to walk them back. `useSqlite` defaults to `true`; set to `false` for legacy KV-backed DOs.
|
|
598
|
-
|
|
599
|
-
See [Bindings → Durable Objects](/compiler/config/bindings#durableobjects) for the full reference.
|
|
600
|
-
|
|
601
|
-
---
|
|
602
|
-
|
|
603
|
-
## v0.10.19 — May 4, 2026
|
|
604
|
-
|
|
605
|
-
### Fix: bundled-SPA auth survives `wrangler dev` on custom_domain projects
|
|
606
|
-
|
|
607
|
-
`wrangler dev` rewrites the configured `custom_domain` host in **every** response header value (Location, Content-Security-Policy, X-…) to the local hostname, with a case-sensitive substring matcher. That mangles the CSP `connect-src` for projects with `domain: "api.example.com"` + bundled CMS / Account SPAs:
|
|
608
|
-
|
|
609
|
-
```
|
|
610
|
-
# Compiled (correct)
|
|
611
|
-
connect-src 'self' https://api.example.com …
|
|
612
|
-
|
|
613
|
-
# Served by wrangler dev (mangled)
|
|
614
|
-
connect-src 'self' https://localhost:8787 …
|
|
581
|
+
durableObjects: [{
|
|
582
|
+
name: "ITEM_STREAM",
|
|
583
|
+
className: "ItemStream",
|
|
584
|
+
from: "features/loops/lib/ItemStream",
|
|
585
|
+
}]
|
|
615
586
|
```
|
|
616
587
|
|
|
617
|
-
|
|
588
|
+
DO class files live under `quickback/lib/` or `quickback/features/<feature>/lib/` — both copy verbatim into the generated `src/` tree on every compile. `from` and `scriptName` are mutually exclusive; cross-worker DOs (`scriptName` set) skip the re-export and migration block.
|
|
618
589
|
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
`TRUSTED_ORIGINS` keeps its lowercase prod entries: it's consumed by the CORS `isTrustedOrigin` check via `Array.includes()` against the browser-supplied Origin header (always lowercase). The CSP fix only needs to land on the SPA-baked literal — that's the entry the SPA's hardcoded fetch needs covered.
|
|
622
|
-
|
|
623
|
-
If wrangler ships a fix for the response-header rewrite, the case-shifted source remains a valid CSP entry that browsers match identically — no follow-up needed in user code.
|
|
624
|
-
|
|
625
|
-
**Action required:** none. Recompile (`quickback compile`) to pick up the fix.
|
|
590
|
+
`migrationTag` (default `qb-do-${className}`) is stable across regenerations and must never be removed or renamed once deployed. `useSqlite` defaults to `true`. See [Bindings → Durable Objects](/compiler/config/bindings#durableobjects).
|
|
626
591
|
|
|
627
592
|
---
|
|
628
593
|
|
|
@@ -630,93 +595,45 @@ If wrangler ships a fix for the response-header rewrite, the case-shifted source
|
|
|
630
595
|
|
|
631
596
|
### `experimentalRemote` — share deployed D1 with `wrangler dev`
|
|
632
597
|
|
|
633
|
-
Per-binding `experimental_remote = true`
|
|
598
|
+
Per-binding `experimental_remote = true` lets `wrangler dev` read/write deployed D1 for selected bindings:
|
|
634
599
|
|
|
635
600
|
```ts
|
|
636
601
|
providers: {
|
|
637
602
|
database: defineDatabase("cloudflare-d1", {
|
|
638
603
|
splitDatabases: true,
|
|
639
|
-
experimentalRemote: {
|
|
640
|
-
auth: true, // wrangler dev reads/writes deployed AUTH_DB
|
|
641
|
-
features: false, // (default) features stays local
|
|
642
|
-
audit: false,
|
|
643
|
-
webhooks: false,
|
|
644
|
-
files: false,
|
|
645
|
-
},
|
|
604
|
+
experimentalRemote: { auth: true, features: false },
|
|
646
605
|
}),
|
|
647
606
|
}
|
|
648
607
|
```
|
|
649
608
|
|
|
650
|
-
|
|
609
|
+
Useful for "share prod auth in dev, keep feature writes sandboxed." Off by default.
|
|
651
610
|
|
|
652
611
|
### Google OAuth + signup ToS
|
|
653
612
|
|
|
654
|
-
The Account SPA
|
|
655
|
-
|
|
656
|
-
Signup flow gains a Terms-of-Service checkbox gate (configurable via the Account SPA's branding config).
|
|
613
|
+
The Account SPA wires Google OAuth end-to-end when configured under `auth.config.socialProviders.google.enabled`. The signup flow gains a Terms-of-Service checkbox gate (configurable via the Account SPA branding).
|
|
657
614
|
|
|
658
|
-
### CLI compile auth gate
|
|
615
|
+
### CLI compile auth gate
|
|
659
616
|
|
|
660
|
-
|
|
661
|
-
- The device-flow `/cli/authorize` page was sending `?returnTo=` to login, but `signup.tsx` and the `_authenticated` middleware only read `?redirect=` — so a user who clicked "Create one" from `/login` lost the return URL. Standardized on `?redirect=` everywhere.
|
|
662
|
-
|
|
663
|
-
### Skill restructure (Claude Code skill)
|
|
664
|
-
|
|
665
|
-
The bundled Claude Code skill was reorganized for clarity:
|
|
666
|
-
|
|
667
|
-
- `SKILL.md` is now a thin orientation pointer, not a 600-line dump
|
|
668
|
-
- Reference docs split into `Compiler` and `Stack` sections
|
|
669
|
-
- Docs bundled as **files** the model navigates with `Read` / `Glob` rather than via `quickback docs <topic>` shell calls — same content, fewer tool calls per lookup
|
|
670
|
-
- Tightened against audit gaps surfaced by red-team review
|
|
671
|
-
|
|
672
|
-
Run `quickback claude install` to pick up the new skill layout.
|
|
673
|
-
|
|
674
|
-
---
|
|
675
|
-
|
|
676
|
-
## v0.10.17 — May 2, 2026
|
|
677
|
-
|
|
678
|
-
### Security fix: CSP auto-config no longer widens `default-src`
|
|
679
|
-
|
|
680
|
-
When 0.10.15's auto-config was asked to add a value to a directive the user hadn't declared (e.g. `https://fonts.googleapis.com` → `style-src` when only `default-src` was set), it incorrectly pushed the value into `default-src` itself. Because CSP3 fall-back semantics make `default-src` the fallback for `script-src`, `img-src`, `media-src`, and others, this widened the attack surface to every directive that fell back to it — a `style-src`-only host became reachable from `script-src`.
|
|
681
|
-
|
|
682
|
-
0.10.17 fixes the logic: missing target directives are now **scaffolded** with the user's `default-src` values as baseline, then extended with the auto-config addition. `default-src` stays clean. The new directive (e.g. `style-src`) covers exactly the styles the SPA needs and nothing else.
|
|
683
|
-
|
|
684
|
-
Before (0.10.16):
|
|
685
|
-
```
|
|
686
|
-
default-src 'self' https://fonts.googleapis.com https://fonts.gstatic.com @trustedOrigins https://api.example.com
|
|
687
|
-
```
|
|
688
|
-
|
|
689
|
-
After (0.10.17):
|
|
690
|
-
```
|
|
691
|
-
default-src 'self'
|
|
692
|
-
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com
|
|
693
|
-
font-src 'self' https://fonts.gstatic.com
|
|
694
|
-
connect-src 'self' @trustedOrigins https://api.example.com
|
|
695
|
-
```
|
|
696
|
-
|
|
697
|
-
**Action required:** recompile (`quickback compile`) to regenerate the security middleware with the corrected scaffolding. Configs that already declared each `*-src` directive explicitly were unaffected by the bug — the regression only surfaced when users wrote `defaultSrc: ['@self']` and let auto-config fill in the rest.
|
|
698
|
-
|
|
699
|
-
The user-side workaround from 0.10.16 (declaring each directive with `['@self']` to force scaffold) is no longer needed in 0.10.17 — the compiler does the right thing automatically.
|
|
617
|
+
`quickback compile` now requires authentication for cloud-compiler runs. Device-flow `?redirect=` parameters are standardized across the login + signup pages so a user clicking "Create one" no longer loses their return URL.
|
|
700
618
|
|
|
701
619
|
---
|
|
702
620
|
|
|
703
|
-
## v0.10.
|
|
704
|
-
|
|
705
|
-
### CSP auto-config now covers SPA-baked-in API origins
|
|
706
|
-
|
|
707
|
-
When the bundled CMS or Account SPA is enabled, the compiler already inlines the API URL into the SPA bundle as a string literal at build time (`VITE_QUICKBACK_API_URL=https://${unifiedDomain}`). That hardcoded URL is what the SPA actually fetches — regardless of which origin is currently serving the page. CSP `connect-src` must allow it explicitly.
|
|
621
|
+
## v0.10.15–v0.10.17 — May 2, 2026
|
|
708
622
|
|
|
709
|
-
|
|
623
|
+
### CSP auto-config
|
|
710
624
|
|
|
711
|
-
|
|
625
|
+
When `security.csp` is set, the compiler widens directives additively based on the project's enabled features:
|
|
712
626
|
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
627
|
+
| Trigger | Auto-added | Directive |
|
|
628
|
+
|---|---|---|
|
|
629
|
+
| `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |
|
|
630
|
+
| `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |
|
|
631
|
+
| `csp` set (always) | `@trustedOrigins` | `connectSrc` |
|
|
632
|
+
| Bundled SPA enabled | SPA-baked API origin (`config.domain`, `quickback.{baseDomain}`, `cms.domain`, `account.domain`) | `connectSrc` |
|
|
716
633
|
|
|
717
|
-
|
|
634
|
+
Anything you already wrote stays — auto-config never removes or overrides. Each applied addition is logged to stderr. Opt out with `security: { cspAutoConfig: false }`.
|
|
718
635
|
|
|
719
|
-
|
|
636
|
+
Most projects can write the minimal:
|
|
720
637
|
|
|
721
638
|
```ts
|
|
722
639
|
security: {
|
|
@@ -729,286 +646,107 @@ security: {
|
|
|
729
646
|
}
|
|
730
647
|
```
|
|
731
648
|
|
|
732
|
-
…and the compiler fills in
|
|
733
|
-
|
|
734
|
-
---
|
|
735
|
-
|
|
736
|
-
## v0.10.15 — May 2, 2026
|
|
737
|
-
|
|
738
|
-
### CSP auto-config — bundled-SPA origins added automatically
|
|
739
|
-
|
|
740
|
-
When `security.csp` is set, the compiler now widens directives **additively** based on the project's enabled features. The four rules:
|
|
741
|
-
|
|
742
|
-
| Trigger | Auto-added | Directive |
|
|
743
|
-
|---|---|---|
|
|
744
|
-
| `cms: true` OR `account: true` | `'unsafe-inline'`, `https://fonts.googleapis.com` | `styleSrc` |
|
|
745
|
-
| `cms: true` OR `account: true` | `https://fonts.gstatic.com` | `fontSrc` |
|
|
746
|
-
| `csp` set (always) | `@trustedOrigins` | `connectSrc` |
|
|
747
|
-
|
|
748
|
-
Anything you already wrote stays — auto-config never removes or overrides. Every applied addition prints to stderr at compile so the magic is visible:
|
|
749
|
-
|
|
750
|
-
```
|
|
751
|
-
[security] auto-added 'unsafe-inline' to csp.styleSrc — account: true → bundled Account SPA → inline style attributes from Tailwind / TanStack Router
|
|
752
|
-
[security] auto-added @trustedOrigins to csp.connectSrc — CORS-trusted origins must be reachable from XHR/fetch (matches cors() allowlist)
|
|
753
|
-
```
|
|
754
|
-
|
|
755
|
-
The recipe in [the security docs](/compiler/config/security#example-paste-in-csp-for-a-quickback-spa-project) becomes ~5 lines shorter — most projects no longer need to list `fonts.googleapis.com` / `fonts.gstatic.com` / `@trustedOrigins` themselves. **Loop's CSP shrinks dramatically** after recompiling against this version.
|
|
756
|
-
|
|
757
|
-
**Opt-out:** `security: { cspAutoConfig: false, csp: { ... } }` for projects fronted by a CDN that injects its own CSP, or teams that want strict from-scratch control.
|
|
649
|
+
…and the compiler fills in font hosts, trusted origins, and SPA-baked URLs.
|
|
758
650
|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
### Troubleshooting table for CSP violations
|
|
762
|
-
|
|
763
|
-
The security docs page now includes a [Troubleshooting CSP violations](/compiler/config/security#troubleshooting-csp-violations) table mapping browser console errors back to the directive that needs widening. Useful when auto-config is disabled or the project has a non-bundled SPA hitting third-party origins.
|
|
764
|
-
|
|
765
|
-
### Out of scope (deferred)
|
|
766
|
-
|
|
767
|
-
- **Per-request CSP nonces** (`@nonce` sentinel implementation) — Phase 2 / 0.10.16. Sentinel still errors at compile in 0.10.15.
|
|
768
|
-
- **`revocationCheck: 'kv'` for `auth.jwt`** — schema accepts it, runtime still errors at compile. Slipped from 0.10.15 to 0.10.16.
|
|
769
|
-
- **Public R2 host auto-add to `imgSrc`** — most R2 access today goes through the worker so the SPA fetches from `'@self'`. Will revisit once we have a clean way to discover public-bucket hosts at compile.
|
|
651
|
+
When a target directive is missing, auto-config scaffolds it from `default-src` baseline rather than widening `default-src` itself — CSP3 fall-back semantics would otherwise leak the addition to every directive that falls back to `default-src`.
|
|
770
652
|
|
|
771
653
|
---
|
|
772
654
|
|
|
773
655
|
## v0.10.14 — May 1, 2026
|
|
774
656
|
|
|
775
|
-
### `auth.jwt`
|
|
657
|
+
### `auth.jwt` config
|
|
776
658
|
|
|
777
|
-
|
|
659
|
+
The bearer-token JWT used by the auth fast-path is configurable. Tune `expiresIn` to bound the post-revocation replay window without affecting browser SPAs (which auto-refresh on every authed call):
|
|
778
660
|
|
|
779
661
|
```ts
|
|
780
662
|
auth: {
|
|
781
663
|
jwt: {
|
|
782
|
-
expiresIn: 30,
|
|
783
|
-
issuer: 'my-api',
|
|
784
|
-
audience: 'partner-svc',
|
|
785
|
-
secretEnv: 'CUSTOM_JWT_SECRET',
|
|
786
|
-
},
|
|
787
|
-
}
|
|
788
|
-
```
|
|
789
|
-
|
|
790
|
-
`revocationCheck: 'kv'` (KV-denylist consult on every fast-path verify, ~5-15ms edge-cached, no D1 hit) is reserved in the schema today but **deferred to 0.10.15** — setting it errors at compile so the migration path is explicit. `'none'` (today's behaviour, 0 cost, replay bound by TTL) stays the default.
|
|
791
|
-
|
|
792
|
-
See [the docs page](/compiler/config/auth) for the full knob list and tuning recommendations.
|
|
793
|
-
|
|
794
|
-
### MCP admin endpoints hidden from non-admin `tools/list`
|
|
795
|
-
|
|
796
|
-
Better Auth admin endpoints (`/admin/list-users`, `/admin/ban-user`, `/admin/impersonate-user`, etc. — 9 in total) now carry `x-access: { userRole: ['admin'] }` in the generated OpenAPI spec, which means the MCP server's existing access-filter automatically drops them from `tools/list` for callers without an admin token. Anonymous and member-role callers no longer see admin tooling enumerated through MCP; admin endpoints still exist on the HTTP surface (Better Auth gates them server-side regardless).
|
|
797
|
-
|
|
798
|
-
### Declarative `security` config block
|
|
799
|
-
|
|
800
|
-
Every security response-header (`Content-Security-Policy`, `Cross-Origin-Opener-Policy`, `Cross-Origin-Embedder-Policy`, `Cross-Origin-Resource-Policy`, `X-Frame-Options`, `Strict-Transport-Security`, `Referrer-Policy`, `Permissions-Policy`) is now configurable from `quickback.config.ts`. Loop's `postcompile-patch.mjs` (which re-injected a fuller CSP and COOP after every `quickback compile`) can now be deleted in favour of:
|
|
801
|
-
|
|
802
|
-
```ts
|
|
803
|
-
security: {
|
|
804
|
-
csp: {
|
|
805
|
-
defaultSrc: ['@self'],
|
|
806
|
-
scriptSrc: ['@self'],
|
|
807
|
-
styleSrc: ['@self', '@unsafe-inline'],
|
|
808
|
-
frameAncestors: ['@none'],
|
|
809
|
-
objectSrc: ['@none'],
|
|
810
|
-
upgradeInsecureRequests: true,
|
|
664
|
+
expiresIn: 30,
|
|
665
|
+
issuer: 'my-api',
|
|
666
|
+
audience: 'partner-svc',
|
|
667
|
+
secretEnv: 'CUSTOM_JWT_SECRET',
|
|
811
668
|
},
|
|
812
|
-
coop: 'same-origin',
|
|
813
669
|
}
|
|
814
670
|
```
|
|
815
671
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
The compiler runs lint rules over the resolved config — errors for `@nonce` (deferred to 0.10.15), `@unsafe-inline + @nonce` (silently broken), and sentinel-only directives that would resolve to nothing at runtime; warnings for `@unsafe-inline` in `script-src`, wildcard sources, missing `default-src`, HSTS preload-list misconfiguration, etc.
|
|
672
|
+
### Admin MCP endpoints filtered
|
|
819
673
|
|
|
820
|
-
|
|
674
|
+
Better Auth admin endpoints (`/admin/list-users`, `/admin/ban-user`, etc.) now carry `x-access: { userRole: ['admin'] }` in the generated OpenAPI spec. The MCP `tools/list` access-filter drops them for non-admin callers.
|
|
821
675
|
|
|
822
|
-
|
|
676
|
+
### Declarative `security` config
|
|
823
677
|
|
|
824
|
-
|
|
678
|
+
Every security response header (`Content-Security-Policy`, COOP, COEP, CORP, HSTS, `X-Frame-Options`, `Referrer-Policy`, `Permissions-Policy`) is configurable from `quickback.config.ts`. `@`-prefixed sentinels (`@self`, `@none`, `@unsafe-inline`, `@trustedOrigins`, etc.) replace awkward `"'self'"` quoting.
|
|
825
679
|
|
|
826
|
-
The
|
|
680
|
+
The compiler lints the resolved config for known footguns: `@unsafe-inline` in `script-src`, wildcard sources, missing `default-src`, HSTS preload-list misconfiguration.
|
|
827
681
|
|
|
828
|
-
###
|
|
682
|
+
### HSTS skipped on localhost
|
|
829
683
|
|
|
830
|
-
|
|
831
|
-
- **Asset-hash CSP** for inline `<style>` and `<script>` blocks emitted by the bundled SPAs — Phase 3.
|
|
832
|
-
- **Per-route CSP overrides** (e.g. one looser policy for `/admin`) — single global CSP for now.
|
|
684
|
+
Generated middleware skips `Strict-Transport-Security` when the request hostname is `localhost`, `127.0.0.1`, or `*.localhost`. Without this gate, `wrangler dev` would pin a developer's browser to HTTPS across every project on that machine.
|
|
833
685
|
|
|
834
686
|
---
|
|
835
687
|
|
|
836
688
|
## v0.10.13 — May 1, 2026
|
|
837
689
|
|
|
838
|
-
### Clickjacking
|
|
690
|
+
### Clickjacking defence on every Worker
|
|
839
691
|
|
|
840
|
-
Every Worker
|
|
841
|
-
response:
|
|
842
|
-
|
|
843
|
-
- `Content-Security-Policy: frame-ancestors 'self' <TRUSTED_ORIGINS…>`
|
|
844
|
-
- `X-Frame-Options: SAMEORIGIN`
|
|
845
|
-
|
|
846
|
-
The CSP allowlist is sourced from the same `TRUSTED_ORIGINS` constant
|
|
847
|
-
that gates CORS, so users configure their domains in one place
|
|
848
|
-
(`auth.trustedOrigins` / `auth.trustedOriginDefaults` in
|
|
849
|
-
`quickback.config.ts`) and both CORS and frame-ancestors stay in
|
|
850
|
-
lockstep. `'self'` is always allowed so an app's own SPAs can frame
|
|
851
|
-
their own routes (e.g. an account login popover hosted on the same
|
|
852
|
-
origin).
|
|
853
|
-
|
|
854
|
-
Modern browsers obey `frame-ancestors` and ignore `X-Frame-Options`
|
|
855
|
-
when both are set; the legacy header is included for clients that
|
|
856
|
-
don't speak CSP3. The CSP intentionally only sets `frame-ancestors` —
|
|
857
|
-
adding `script-src` / `default-src` would need a much wider audit
|
|
858
|
-
across SPA assets, inline scripts, and third-party embeds, so that's
|
|
859
|
-
left as a follow-up.
|
|
860
|
-
|
|
861
|
-
Recompile (`quickback compile`) and redeploy to pick this up — no
|
|
862
|
-
config change needed unless you want to allow extra cross-origin
|
|
863
|
-
iframe embeds, in which case add them to `auth.trustedOrigins`.
|
|
864
|
-
|
|
865
|
-
---
|
|
866
|
-
|
|
867
|
-
## v0.10.12 — May 1, 2026
|
|
868
|
-
|
|
869
|
-
### Bundled-docs sync for the MCP recon fix
|
|
870
|
-
|
|
871
|
-
Patch release that re-bundles the CLI's offline docs (consulted by the
|
|
872
|
-
Claude Code skill, Cursor rules, and other AI assistants) so they
|
|
873
|
-
reflect the corrected `tools/list` access-filter behavior and CORS
|
|
874
|
-
posture shipped in v0.10.11. The `compiler/config/agents.mdx` page
|
|
875
|
-
itself was already corrected on the docs site immediately after the
|
|
876
|
-
0.10.11 release; this bump propagates that text into the bundle inside
|
|
877
|
-
`@quickback-dev/cli`.
|
|
878
|
-
|
|
879
|
-
No runtime or compiler behavior change — re-running `quickback compile`
|
|
880
|
-
against this version produces the same output as v0.10.11.
|
|
692
|
+
Every Worker emits `Content-Security-Policy: frame-ancestors 'self' <TRUSTED_ORIGINS…>` and `X-Frame-Options: SAMEORIGIN` on every response. The CSP allowlist is sourced from the same `TRUSTED_ORIGINS` constant that gates CORS.
|
|
881
693
|
|
|
882
694
|
---
|
|
883
695
|
|
|
884
696
|
## v0.10.11 — May 1, 2026
|
|
885
697
|
|
|
886
|
-
### MCP `tools/list` is
|
|
887
|
-
|
|
888
|
-
The generated MCP-over-HTTP server (`src/routes/mcp.ts`) had three holes
|
|
889
|
-
that turned a standard pentest into trivial recon:
|
|
890
|
-
|
|
891
|
-
1. `tools/list` returned the entire tool catalogue to anyone — including
|
|
892
|
-
admin-only endpoints — without checking auth or roles. Tool
|
|
893
|
-
descriptions also leaked sentences like `[UNSAFE] bypasses tenant
|
|
894
|
-
scoping and requires elevated access` verbatim.
|
|
895
|
-
2. The endpoint set `Access-Control-Allow-Origin: *` so any origin could
|
|
896
|
-
pull the catalogue from a browser.
|
|
897
|
-
3. Unauthenticated `GET /mcp` enumerated every tool name in its
|
|
898
|
-
discovery payload.
|
|
899
|
-
|
|
900
|
-
Fix:
|
|
901
|
-
|
|
902
|
-
- Each tool now carries sanitised access metadata (`_access` covering
|
|
903
|
-
`roles` / `userRole` / `or` / `and`, plus `_public` for `PUBLIC`
|
|
904
|
-
pseudo-role or empty `security`). `tools/list` filters against the
|
|
905
|
-
caller's `ctx` — unauth callers see only `_public` tools, authed
|
|
906
|
-
callers see only role-gated tools they pass. Record predicates and
|
|
907
|
-
function-form access (opaque at list time) are dropped.
|
|
908
|
-
- Wildcard CORS removed entirely. The parent app's `cors()` middleware
|
|
909
|
-
(origin allowlist via `TRUSTED_ORIGINS` + `BETTER_AUTH_URL`) now
|
|
910
|
-
applies uniformly to `/mcp`, same as every other route.
|
|
911
|
-
- `[UNSAFE] ... bypasses tenant scoping ...` flavour text is gone.
|
|
912
|
-
`annotations.destructiveHint` and `_unsafe` remain — those are the
|
|
913
|
-
spec-correct signals for clients to warn users.
|
|
914
|
-
- Unauthenticated `GET /mcp` no longer lists tool names. Inventory is
|
|
915
|
-
only available via the access-filtered `tools/list`.
|
|
916
|
-
|
|
917
|
-
This filter is recon-mitigation, not a security boundary: `tools/call`
|
|
918
|
-
still re-enters the Hono app and runs every middleware (auth, firewall,
|
|
919
|
-
access, guards, masking), so hiding a tool from list never weakens the
|
|
920
|
-
underlying gate.
|
|
921
|
-
|
|
922
|
-
Known follow-up: Better Auth admin endpoints (`ban-user`, `create-user`,
|
|
923
|
-
`impersonate-user`, etc.) don't yet emit `x-access` in the OpenAPI spec,
|
|
924
|
-
so any logged-in user still sees them in `tools/list` (the actual call
|
|
925
|
-
is still gated by the admin plugin). Tracked separately.
|
|
926
|
-
|
|
927
|
-
---
|
|
928
|
-
|
|
929
|
-
## v0.10.10 — April 29, 2026
|
|
698
|
+
### MCP `tools/list` is access-filtered
|
|
930
699
|
|
|
931
|
-
|
|
700
|
+
Each MCP tool now carries sanitised access metadata. `tools/list` filters against the caller's `ctx`: unauthenticated callers see only `PUBLIC` tools, authenticated callers see only role-gated tools they pass.
|
|
932
701
|
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
runtime treated the literal string `"and"` as a column lookup, the
|
|
937
|
-
predicate failed on every row, and the caller got a silent `403` /
|
|
938
|
-
empty list with nothing pointing at the misuse. The TypeScript type
|
|
939
|
-
couldn't catch this — `RecordConditions` is an open-ended index
|
|
940
|
-
signature, so any key parses.
|
|
702
|
+
- Wildcard CORS removed from the MCP endpoint.
|
|
703
|
+
- Unauthenticated `GET /mcp` no longer enumerates tool names.
|
|
704
|
+
- Internal flavor text is removed; `annotations.destructiveHint` and `_unsafe` remain — those are the spec-correct signals for clients.
|
|
941
705
|
|
|
942
|
-
|
|
943
|
-
ops, `read.access`, view access, masking `show` / `query`, action
|
|
944
|
-
access) and throws a clear migration error when `record` contains a
|
|
945
|
-
reserved key:
|
|
946
|
-
|
|
947
|
-
- `and` / `or` inside `record` → use the top-level `and` / `or`
|
|
948
|
-
sibling: `{ and: [{ record: { ... } }, { record: { ... } }] }`
|
|
949
|
-
- `roles` / `userRole` inside `record` → put them at the access node
|
|
950
|
-
alongside `record`: `{ roles: [...], record: { ... } }`
|
|
951
|
-
|
|
952
|
-
The error names the exact origin (`crud.update.access`,
|
|
953
|
-
`actions.focus.access.or[1]`, etc.) so the fix lands in the right place.
|
|
706
|
+
`tools/call` continues to re-enter the Hono app and run every middleware (auth, firewall, access, guards, masking), so hiding a tool from list never weakens the underlying gate.
|
|
954
707
|
|
|
955
708
|
---
|
|
956
709
|
|
|
957
|
-
## v0.10.
|
|
958
|
-
|
|
959
|
-
### Role hierarchy now expands in record-based action access
|
|
960
|
-
|
|
961
|
-
`auth.roleHierarchy: ['member', 'admin', 'owner']` plus
|
|
962
|
-
`access: { roles: ['member+'] }` on a record-based action used to
|
|
963
|
-
silently 403 valid callers. The standalone-action route generator
|
|
964
|
-
inlined the expanded role list as a JSON literal, but the
|
|
965
|
-
record-based generator read the access config back through the
|
|
966
|
-
runtime `actions['name'].access` import — the user's source, where
|
|
967
|
-
the unexpanded `'member+'` shorthand still lived. The runtime did
|
|
968
|
-
literal string matching against `ctx.roles`, so an `owner` calling
|
|
969
|
-
the action got `['member+'] !== 'owner'` and was rejected.
|
|
710
|
+
## v0.10.10 — April 29, 2026
|
|
970
711
|
|
|
971
|
-
|
|
972
|
-
same way standalone routes do. `input` and `execute` still flow
|
|
973
|
-
through the runtime import (closures aren't serializable); only the
|
|
974
|
-
access config is lifted to a JSON literal so the compile-time
|
|
975
|
-
expansion actually reaches the matcher.
|
|
712
|
+
### Reserved keys in `access.record` are rejected
|
|
976
713
|
|
|
977
|
-
|
|
978
|
-
behavior in — it asserts that `member+` never reaches the route
|
|
979
|
-
output and that the access config is no longer read from
|
|
980
|
-
`actions[name].access` at runtime.
|
|
714
|
+
`access.record` is a flat field map evaluated as implicit AND between entries — keys must be column names. The compiler now rejects reserved keys (`and`, `or`, `roles`, `userRole`) inside `record` with migration guidance pointing at the working pattern (top-level siblings with their own `record:` blocks).
|
|
981
715
|
|
|
982
716
|
---
|
|
983
717
|
|
|
984
718
|
## v0.10.8 — April 29, 2026
|
|
985
719
|
|
|
986
|
-
### Audit
|
|
720
|
+
### Audit logging on Postgres targets
|
|
721
|
+
|
|
722
|
+
`audit_events` previously only existed on `cloudflare-d1`. The audit table now lives in a dedicated `audit` schema (`drizzle.pgSchema('audit')`) on Postgres targets. The `hasSecurityAudit` gate accepts D1 or any PG dialect; `auditDatabaseId` remains a D1-only requirement.
|
|
987
723
|
|
|
988
|
-
|
|
724
|
+
### `auditDatabaseId` is a compile-time requirement
|
|
989
725
|
|
|
990
|
-
|
|
726
|
+
Projects with unsafe or `PUBLIC` actions that previously produced a placeholder `database_id = "local-audit"` in production now fail at compile time with the exact `wrangler d1 create <project>-audit` command and the config key where the returned ID goes.
|
|
991
727
|
|
|
992
|
-
###
|
|
728
|
+
### Action input → OpenAPI / MCP
|
|
993
729
|
|
|
994
|
-
|
|
730
|
+
`defineAction({ input: z.object({...}) })` schemas flow into the OpenAPI `requestBody` and the MCP tool's `inputSchema.properties`. Simple `z.object` shapes are extracted at compile time; discriminated unions, refinements, recursive schemas, and bare-identifier references run through Zod's native `z.toJSONSchema()` for full-fidelity output.
|
|
995
731
|
|
|
996
|
-
|
|
997
|
-
- Response schemas now emit `required[]` for every non-nullable column, so generated SDKs treat them as guaranteed-present rather than optional.
|
|
998
|
-
- `text(_, { enum: [...] })` columns emit as closed `{ type: "string", enum: [...] }`, narrowing to literal unions.
|
|
999
|
-
- `id` only claims `format: "uuid"` when the project's `generateId` actually produces UUIDs. cuid2 / prefixed / nanoid / serial generators get plain `{ type: "string" }` — strict validators stop rejecting responses against their own spec.
|
|
732
|
+
### OpenAPI fidelity
|
|
1000
733
|
|
|
1001
|
-
|
|
734
|
+
- Response schemas emit `required[]` for every non-nullable column.
|
|
735
|
+
- `text(_, { enum: [...] })` columns emit as closed `{ type: "string", enum: [...] }`.
|
|
736
|
+
- `id` claims `format: "uuid"` only when the project's `generateId` actually produces UUIDs. cuid2 / prefixed / nanoid / serial generators emit plain `{ type: "string" }`.
|
|
1002
737
|
|
|
1003
|
-
|
|
738
|
+
### Minor
|
|
1004
739
|
|
|
1005
|
-
|
|
740
|
+
- Auto-mask predicate verifies the resolved owner column exists before emitting an `or: 'owner'` clause; falls back to roles-only with a warning otherwise.
|
|
741
|
+
- Generated CRUD errors emit canonical `QuickbackErrorCode` enum values (`DB_NOT_NULL_VIOLATION`, `DB_UNIQUE_VIOLATION`, etc.) so generated SDKs can exhaustively switch on `code`. See [API errors](/compiler/targets/hono-api/using-the-api/errors#database).
|
|
1006
742
|
|
|
1007
743
|
---
|
|
1008
744
|
|
|
1009
|
-
##
|
|
745
|
+
## DSL: one file per action, multi-table per feature
|
|
1010
746
|
|
|
1011
|
-
|
|
747
|
+
### One file per action
|
|
748
|
+
|
|
749
|
+
Action authoring is one file per action under `<feature>/actions/<name>.ts`. The filename is the action name and the URL segment:
|
|
1012
750
|
|
|
1013
751
|
```typescript
|
|
1014
752
|
// features/applications/actions/advance.ts
|
|
@@ -1029,65 +767,37 @@ export default defineAction({
|
|
|
1029
767
|
});
|
|
1030
768
|
```
|
|
1031
769
|
|
|
1032
|
-
`defineAction` is imported from a generated per-feature helper at `<feature>/.quickback/define-action.ts` —
|
|
770
|
+
`defineAction` is imported from a generated per-feature helper at `<feature>/.quickback/define-action.ts` — `record`, `input`, and audit fields are typed without manual annotations.
|
|
1033
771
|
|
|
1034
772
|
**Discovery rules:**
|
|
1035
|
-
- `actions/<name>.ts` binds to the feature's primary table
|
|
1036
|
-
- `actions/<table>/<name>.ts` binds to the sibling table file
|
|
1037
|
-
- Setting `path:` makes the action standalone (custom URL, no record fetch
|
|
1038
|
-
- Tableless features
|
|
1039
|
-
- Action names are unique per `(bindTable, name)` pair — sibling-bound actions on different tables may share a verb (e.g. `actions/episodes/publish.ts` + `actions/shows/publish.ts` mount at `/episodes/:id/publish` and `/shows/:id/publish` and don't collide). Standalone actions are unique per `(method, path)`.
|
|
1040
|
-
- Files under `<feature>/lib/` are copied verbatim for feature-local helpers; `quickback/lib/` is exposed via the `~/lib/*` alias for cross-feature shared code (with a one-way import rule enforced at compile time).
|
|
1041
|
-
|
|
1042
|
-
**Retired** (rejected at load time with migration guidance):
|
|
773
|
+
- `actions/<name>.ts` binds to the feature's primary table.
|
|
774
|
+
- `actions/<table>/<name>.ts` binds to the sibling table file.
|
|
775
|
+
- Setting `path:` makes the action standalone (custom URL, no record fetch).
|
|
776
|
+
- Tableless features require every action to be standalone.
|
|
1043
777
|
|
|
1044
|
-
|
|
1045
|
-
- `_feature.ts` (shared preamble + tableless actions)
|
|
1046
|
-
- `handlers/` directory + `handler:` string ref
|
|
1047
|
-
- `defineActions(table, {…})` and `defineActions(null, {…})`
|
|
1048
|
-
- `export default { actions: {…} }`
|
|
1049
|
-
- Colocated `defineActions` inside table files
|
|
1050
|
-
- `standalone: true` flag (presence of `path:` is the new signal)
|
|
1051
|
-
- `*-actions.ts` / `*.actions.ts` filename patterns
|
|
778
|
+
**Retired** (rejected at load time with migration guidance): `actions.ts` (bundled multi-action file), `_feature.ts`, `handlers/` directory + `handler:` string ref, `defineActions(table, {…})`, colocated `defineActions` inside table files, `standalone: true` flag, `*-actions.ts` / `*.actions.ts` filename patterns.
|
|
1052
779
|
|
|
1053
|
-
|
|
780
|
+
See [Actions docs](/compiler/definitions/actions).
|
|
1054
781
|
|
|
1055
|
-
|
|
782
|
+
### Multi-table actions per feature
|
|
1056
783
|
|
|
1057
|
-
|
|
784
|
+
One feature directory can own actions on multiple tables. Three discovery modes:
|
|
1058
785
|
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
Features used to support exactly one `defineActions(table, …)` call via `actions.ts`, which forced unnatural feature splits whenever multiple tables in the same feature needed actions (a podcast feature with `episodes`, `shows`, `seasons`, `collections`, etc.). One feature directory can now own actions on multiple tables across three discovery modes:
|
|
1064
|
-
|
|
1065
|
-
- **Colocated** (canonical) — `<table>.ts` containing both `defineTable` and `defineActions(<table>, …)`. One file per entity. Default for new features.
|
|
1066
|
-
- **`actions.ts`** (existing) — single primary-table actions file at feature root. Unchanged behaviour.
|
|
1067
|
-
- **`actions/<table>.ts`** — per-table action files for teams that want strict schema/behavior separation or need to break an import cycle.
|
|
1068
|
-
|
|
1069
|
-
Plus the universal `_feature.ts` slot (at feature root) for **non-table-bound feature-level actions** (`export default { actions: { … } }` shape) and **shared Zod schemas** that get prepended once to the merged actions module so every sibling action sees them. Allowed in any of the three modes — orthogonal to table binding.
|
|
1070
|
-
|
|
1071
|
-
The decision flowchart: *one table with actions → colocate. Multiple tables with actions → colocate each. Hit a cycle or want strict separation → `actions/<table>.ts`. Want schema/actions split for a single-table feature → `actions.ts`. Non-table actions → always `_feature.ts`.*
|
|
786
|
+
- **Colocated** (canonical) — `<table>.ts` containing both `defineTable` and `defineActions(<table>, …)`. One file per entity.
|
|
787
|
+
- **`actions.ts`** — single primary-table actions file at feature root.
|
|
788
|
+
- **`actions/<table>.ts`** — per-table action files for strict schema/behavior separation.
|
|
1072
789
|
|
|
1073
|
-
|
|
790
|
+
Plus a universal `_feature.ts` slot for non-table-bound feature-level actions and shared Zod schemas.
|
|
1074
791
|
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
Inline `execute:` bodies must be arrow functions (`execute: async (ctx) => { … }`). `async function` and plain `function` shapes were silently misparsed by the route emitter — they now hard-error at parse time pointing at the canonical arrow form, with a suggestion to use `handler:` for callers who genuinely need a named function declaration.
|
|
1078
|
-
|
|
1079
|
-
`handlers/` walks recursively now — `handlers/<table>/<action>.ts` is the canonical layout. A new `lib/` directory under each feature gets copied verbatim into the output for feature-local helpers.
|
|
1080
|
-
|
|
1081
|
-
Migration: existing `actions.ts` projects compile bit-identically — the legacy single-table path is unchanged. Legacy `*-actions.ts` filenames produce a soft warning and silently aren't picked up; rename to `<table>.ts` (colocated), `actions/<table>.ts`, or single `actions.ts`.
|
|
792
|
+
Action names are unique per `(bindTable, name)` pair. Sibling-bound `actions/episodes/publish.ts` and `actions/shows/publish.ts` mount at `/episodes/:id/publish` and `/shows/:id/publish` and compile cleanly.
|
|
1082
793
|
|
|
1083
794
|
---
|
|
1084
795
|
|
|
1085
|
-
## Firewall: named-scope shape
|
|
796
|
+
## Firewall: named-scope shape
|
|
1086
797
|
|
|
1087
|
-
The named-scope firewall shape
|
|
798
|
+
The named-scope firewall shape is a co-equal user-facing input alongside the predicate array:
|
|
1088
799
|
|
|
1089
800
|
```typescript
|
|
1090
|
-
// All three are now valid; all compile to the same predicate array internally.
|
|
1091
801
|
firewall: { organization: { column: 'tenant_id' } } // named-scope (compact)
|
|
1092
802
|
firewall: { owner: { column: 'account_user_id' } }
|
|
1093
803
|
firewall: { exception: true }
|
|
@@ -1099,27 +809,17 @@ firewall: [
|
|
|
1099
809
|
|
|
1100
810
|
Pick the form that reads better — named-scope for the common one-line case, predicate array when you need custom `in`-lists or non-scope predicates.
|
|
1101
811
|
|
|
1102
|
-
**Auto-detection synonyms
|
|
812
|
+
**Auto-detection synonyms.** When `firewall:` is omitted, the compiler scans the schema for an isolation column. The org-scope list accepts `organizationId`, `organisationId`, `orgId`, `organization`, `organisation`, `org` (American + British). User-scope accepts `userId`.
|
|
1103
813
|
|
|
1104
|
-
**`ownerId` is
|
|
1105
|
-
|
|
1106
|
-
Migration: nothing breaks. Projects on the predicate-array shape compile bit-identically. Projects on the named-scope shape — including any test fixtures or example projects that were left on the legacy form — now compile cleanly again.
|
|
814
|
+
**`ownerId` is a targeted error signal.** When a table carries `ownerId` but no isolation column and no explicit `firewall:`, the compiler raises a specific error — `ownerId` is business-logic ownership, not access control. Use `userId` for access control, declare an explicit `firewall:`, or add a separate isolation column.
|
|
1107
815
|
|
|
1108
816
|
---
|
|
1109
817
|
|
|
1110
818
|
## v0.10.0 — April 26, 2026
|
|
1111
819
|
|
|
1112
|
-
### `q.scope()`
|
|
1113
|
-
|
|
1114
|
-
Two related DSL consolidations land. The `q.scope()` half is purely additive; the `masking.query` half rejects three legacy per-capability flags at compile time (migration is mechanical — see below).
|
|
820
|
+
### `q.scope()` — single-declaration tenant scoping
|
|
1115
821
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
1. Auto-derive the firewall predicate (`{ field: 'organizationId', equals: 'ctx.activeOrgId' }`) so the explicit `firewall:` block can be omitted entirely.
|
|
1119
|
-
2. Add the column to `GUARDS_CONFIG.systemManaged` so client input is rejected at the guard layer.
|
|
1120
|
-
3. Auto-populate from `ctx` on create / upsert.
|
|
1121
|
-
|
|
1122
|
-
The systemManaged extension generalises beyond `q.scope()`: any firewall predicate whose `equals` references `ctx.*` adds its `field` to the systemManaged set. So a hand-rolled `firewall: [{ field: 'tenantId', equals: 'ctx.activeOrgId' }]` gets the same treatment.
|
|
822
|
+
`q.scope(kind)` replaces the three-place pattern (column declaration + firewall predicate + ownership-guard) with one column:
|
|
1123
823
|
|
|
1124
824
|
```typescript
|
|
1125
825
|
columns: {
|
|
@@ -1129,304 +829,148 @@ columns: {
|
|
|
1129
829
|
}
|
|
1130
830
|
```
|
|
1131
831
|
|
|
1132
|
-
|
|
832
|
+
`q.scope()` columns auto-derive the firewall predicate, register with the guards layer as `systemManaged` (client input rejected), and auto-populate from `ctx` on create / upsert. The systemManaged extension generalises beyond `q.scope()`: any firewall predicate whose `equals` references `ctx.*` registers its `field` automatically.
|
|
833
|
+
|
|
834
|
+
See [`q.scope()`](/compiler/definitions/schema#qscope--tenant-scope-columns).
|
|
1133
835
|
|
|
1134
|
-
|
|
836
|
+
### `masking[col].query.roles` — unified filter / sort / search gate
|
|
837
|
+
|
|
838
|
+
The three legacy per-capability flags (`filterable`, `searchable`, `sortable`) are replaced by a single `query.roles` allowlist:
|
|
1135
839
|
|
|
1136
840
|
```typescript
|
|
1137
841
|
masking: {
|
|
1138
842
|
email: {
|
|
1139
843
|
type: 'email',
|
|
1140
844
|
show: { roles: ['admin'] },
|
|
1141
|
-
query: { roles: ['admin'] }, //
|
|
845
|
+
query: { roles: ['admin'] }, // defaults to show.roles when omitted
|
|
1142
846
|
},
|
|
1143
847
|
}
|
|
1144
848
|
```
|
|
1145
849
|
|
|
1146
|
-
|
|
850
|
+
A view's own `query.{filterable,searchable,sortable}` allowlist is the opt-in for higher-privileged roles; the existing intersection validator gates it at compile time.
|
|
1147
851
|
|
|
1148
|
-
**Breaking:**
|
|
852
|
+
**Breaking:** `masking[col].filterable / .searchable / .sortable` is rejected at compile time with a migration hint. Replace with `query.roles` (or delete the flags — `query` defaults to `show.roles`).
|
|
1149
853
|
|
|
1150
854
|
---
|
|
1151
855
|
|
|
1152
856
|
## v0.9.0 — April 25, 2026
|
|
1153
857
|
|
|
1154
|
-
###
|
|
858
|
+
### Unified `read:` pipeline
|
|
1155
859
|
|
|
1156
|
-
|
|
1157
|
-
side of every resource now has its own block — `read:` — that owns the
|
|
1158
|
-
collection-level `GET /` endpoint, single-record `GET /:id`, and named view
|
|
1159
|
-
projections. The legacy `crud.list` and `crud.get` shapes are rejected at
|
|
1160
|
-
compile time. See the new [Read pipeline](/compiler/definitions/read) page
|
|
1161
|
-
for the full reference and migration table.
|
|
860
|
+
The read side of every resource has its own block — `read:` — that owns the collection-level `GET /` endpoint, single-record `GET /:id`, and named view projections.
|
|
1162
861
|
|
|
1163
862
|
**Breaking changes** (compile-time errors with migration hints):
|
|
1164
863
|
|
|
1165
|
-
- `crud.list` →
|
|
1166
|
-
- `crud.get` → `read.access` (single-record GET inherits automatically
|
|
1167
|
-
- Top-level `views: {...}` →
|
|
864
|
+
- `crud.list` → `read.access` (plus `read.pageSize` / `read.maxPageSize`)
|
|
865
|
+
- `crud.get` → `read.access` (single-record GET inherits automatically)
|
|
866
|
+
- Top-level `views: {...}` → `read.views: {...}`
|
|
1168
867
|
- `crud.list.fields` / `crud.get.fields` → declare a named view under `read.views` and call `/views/{name}`
|
|
1169
868
|
|
|
1170
|
-
|
|
1171
|
-
access check **before** the firewall query, so a caller without a matching
|
|
1172
|
-
role gets 403 before the database is touched. This closes the 404-vs-403
|
|
1173
|
-
ID-probe channel — an unauthorized caller can no longer distinguish "row
|
|
1174
|
-
exists in another tenant" from "row doesn't exist." See
|
|
1175
|
-
[Access evaluation order](/compiler/definitions/access#evaluation-order).
|
|
1176
|
-
|
|
1177
|
-
**Transactional batch operations**: batch endpoints now expose a
|
|
1178
|
-
`failFast` option (replacing the old `atomic` naming) and a
|
|
1179
|
-
`meta.transactional` response field. On tx-supporting providers
|
|
1180
|
-
(postgres, supabase, neon, libsql, better-sqlite3, bun-sqlite), `failFast: true`
|
|
1181
|
-
wraps the per-record loop in `db.transaction(...)` so any failure rolls
|
|
1182
|
-
back the entire batch. On Cloudflare D1 (no `db.transaction`), `failFast: true`
|
|
1183
|
-
still stops on the first error but prior writes stay committed; inspect
|
|
1184
|
-
`meta.transactional` to know which guarantee you got. Embedding queue
|
|
1185
|
-
messages and realtime broadcasts are emitted **after** the transaction
|
|
1186
|
-
commits, so a rolled-back batch produces no orphan jobs. See
|
|
1187
|
-
[Batch Operations: Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).
|
|
1188
|
-
|
|
1189
|
-
**`firewallErrorMode` lifted off the firewall block**: the field that
|
|
1190
|
-
controls 403-vs-404 on firewall misses now lives at the resource top level
|
|
1191
|
-
(sibling to `firewall:`), since the firewall config is now a predicate
|
|
1192
|
-
array and this is a presentation-layer choice. Existing `firewall.errorMode`
|
|
1193
|
-
values should be lifted to `firewallErrorMode` at the resource level.
|
|
1194
|
-
|
|
1195
|
-
**Read-only resources**: an empty `crud: {}` block (or omitting `crud:`
|
|
1196
|
-
entirely) is valid for read-only resources. `read:` alone is enough to
|
|
1197
|
-
expose `GET /` and `GET /:id`.
|
|
1198
|
-
|
|
1199
|
-
**Strict-mode top-level keys**: the strict allow-list now includes `dev` so
|
|
1200
|
-
`defineConfig({ dev: { ... } })` is accepted at the top level.
|
|
869
|
+
### Pre-record access ordering
|
|
1201
870
|
|
|
1202
|
-
|
|
871
|
+
Handlers on `/:id` run a role-only access check before the firewall query. A caller without a matching role gets 403 before the database is touched. This closes the 404-vs-403 ID-probe channel — an unauthorized caller can no longer distinguish "row exists in another tenant" from "row doesn't exist." See [Access evaluation order](/compiler/definitions/access#evaluation-order).
|
|
1203
872
|
|
|
1204
|
-
|
|
873
|
+
### Transactional batch operations
|
|
1205
874
|
|
|
1206
|
-
|
|
875
|
+
Batch endpoints expose `failFast` and a `meta.transactional` response field. On tx-supporting providers (postgres, supabase, neon, libsql, better-sqlite3, bun-sqlite), `failFast: true` wraps the per-record loop in `db.transaction(...)` so any failure rolls back the entire batch. On Cloudflare D1 (no `db.transaction`), `failFast: true` stops on the first error but prior writes stay committed.
|
|
1207
876
|
|
|
1208
|
-
|
|
877
|
+
Embedding queue messages and realtime broadcasts emit after the transaction commits — rolled-back batches produce no orphan jobs.
|
|
1209
878
|
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
Quickback already defaults to the Workers `send_email` binding for Cloudflare deploys, and Cloudflare Email Sending has now graduated to public beta — production-ready with zero-config, no API keys, no third-party accounts. No action needed; recompiling any existing project continues to wire the default Cloudflare transport. AWS SES remains a fully supported opt-in (`email.provider: 'aws-ses'`) for non-Cloudflare runtimes or existing SES setups. See [Email Configuration](/compiler/config#email-configuration).
|
|
1213
|
-
|
|
1214
|
-
### Minor/patch dep sweep
|
|
1215
|
-
|
|
1216
|
-
Aligned the whole dep surface — monorepo, compiler Docker image, and generator emissions into compiled projects — so new compiles and existing recompiles converge on the same versions:
|
|
1217
|
-
|
|
1218
|
-
- `wrangler@^4.83.0`
|
|
1219
|
-
- `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`
|
|
1220
|
-
- `zod@^4.3.6`
|
|
1221
|
-
- `@cloudflare/workers-types@^4.20260417.1` (also deduped — was accidentally declared in both `dependencies` and `devDependencies` in some paths)
|
|
1222
|
-
- `@tanstack/react-query@^5.99.0` (Account app)
|
|
879
|
+
See [Batch Operations → Transactional semantics](/compiler/targets/hono-api/using-the-api/batch-operations#transactional-semantics).
|
|
1223
880
|
|
|
1224
881
|
---
|
|
1225
882
|
|
|
1226
|
-
## v0.8.
|
|
1227
|
-
|
|
1228
|
-
### Fix: Better Auth 1.5 and `@cloudflare/workers-types` Compatibility
|
|
883
|
+
## v0.8.7 — April 17, 2026
|
|
1229
884
|
|
|
1230
|
-
|
|
885
|
+
### Hono CVE bump
|
|
1231
886
|
|
|
1232
|
-
|
|
1233
|
-
- **`REALTIME_URL` and `ACCESS_TOKEN`** are always emitted as optional `CloudflareBindings` fields when the organization plugin is active, so the broadcast hook typechecks even when `realtimeMode` is `"inline"` (or realtime isn't configured at all).
|
|
1234
|
-
- **`auth.api.listOrganizations` / `getFullOrganization` / `session.session.activeOrganizationId`** — third-party Better Auth plugins narrow the inferred `auth.api` type and hide organization-plugin endpoints. The generated middleware and `/admin/v1/organizations` route now cast through `any` for these calls.
|
|
1235
|
-
- **`crypto.subtle.sign` / `verify`** no longer accept `Uint8Array<ArrayBufferLike>` directly. Generated `jwt.ts` casts encoded payloads to `BufferSource`.
|
|
887
|
+
Hono is bumped to `^4.12.14` across the monorepo, the compiler Docker image's pre-installed deps, and every generator path that emits Hono into compiled projects. Older ranges covered the vulnerable window. Recompile to pick up the fix in your generated project's `package.json`.
|
|
1236
888
|
|
|
1237
|
-
|
|
889
|
+
### Cloudflare Email Sending in public beta
|
|
1238
890
|
|
|
1239
|
-
|
|
891
|
+
Quickback defaults to the Workers `send_email` binding for Cloudflare deploys. Cloudflare Email Sending has graduated to public beta — production-ready with zero-config. AWS SES remains a fully supported opt-in (`email.provider: 'aws-ses'`) for non-Cloudflare runtimes. See [Email Configuration](/compiler/config#email-configuration).
|
|
1240
892
|
|
|
1241
|
-
|
|
893
|
+
### Dependency sweep
|
|
1242
894
|
|
|
1243
|
-
|
|
895
|
+
`wrangler@^4.83.0`, `drizzle-orm@^0.45.2`, `drizzle-kit@^0.31.10`, `zod@^4.3.6`, `@cloudflare/workers-types@^4.20260417.1`.
|
|
1244
896
|
|
|
1245
|
-
|
|
1246
|
-
- **`/api/v1/schema`** — returns `403` to non-admins.
|
|
1247
|
-
- **`custom_view` CRUD** — now gated on the new `userRole: ["admin"]` primitive rather than org membership.
|
|
1248
|
-
- **In-SPA gate** — unchanged; defense in depth behind the server-side gates.
|
|
897
|
+
---
|
|
1249
898
|
|
|
1250
|
-
|
|
899
|
+
## v0.8.5 — April 15, 2026
|
|
1251
900
|
|
|
1252
|
-
###
|
|
901
|
+
### `userRole` access primitive
|
|
1253
902
|
|
|
1254
|
-
|
|
903
|
+
A new `userRole?: string[]` field in the declarative `Access` config evaluates against `ctx.userRole` (the Better Auth admin-plugin `user.role` column). Distinct from `roles`, which matches `ctx.roles` (org membership).
|
|
1255
904
|
|
|
1256
905
|
```typescript
|
|
1257
|
-
//
|
|
1258
|
-
access: { roles: ['admin'] }
|
|
1259
|
-
|
|
1260
|
-
// New: explicitly require user.role === 'admin' regardless of org membership
|
|
1261
|
-
access: { userRole: ['admin'] }
|
|
1262
|
-
|
|
1263
|
-
// "Org owner OR platform admin"
|
|
906
|
+
// Org owner OR platform admin
|
|
1264
907
|
access: { or: [{ roles: ['owner'] }, { userRole: ['admin'] }] }
|
|
1265
908
|
|
|
1266
909
|
// Platform admins see SSNs across every org
|
|
1267
910
|
masking: { ssn: { type: 'ssn', show: { userRole: ['admin'] } } }
|
|
1268
911
|
```
|
|
1269
912
|
|
|
1270
|
-
`userRole` works everywhere `Access` is accepted — CRUD, actions, views, masking, and inside `or
|
|
1271
|
-
|
|
1272
|
-
### Fix: `ReferenceError: customAlphabet is not defined` in generated POST handlers
|
|
1273
|
-
|
|
1274
|
-
Projects with `providers.database.config.generateId: "short"` (or `"nanoid"` / `"cuid"`) compiled routes that called the ID helper but never imported it. Every generated `src/features/**/*.routes.ts` had `customAlphabet('0123...', 6)()` in its POST body but no matching `import { customAlphabet } from 'nanoid';` at the top of the file. Every `POST /api/v1/<resource>` and batch-create returned `500` with `ReferenceError: customAlphabet is not defined` on the first write.
|
|
1275
|
-
|
|
1276
|
-
The compiler now emits the correct import alongside the ID expression for all three modes: `nanoid`, `customAlphabet`, and `createId` from `@paralleldrive/cuid2`.
|
|
1277
|
-
|
|
1278
|
-
No config changes required — recompile to pick up the fix.
|
|
1279
|
-
|
|
1280
|
-
### Fix: Dangling `export const` in generated `actions.ts` breaks `tsc`
|
|
1281
|
-
|
|
1282
|
-
When a feature authored actions as `export const xActions = defineActions(...)` (instead of `export default defineActions(...)`), the compiler's preamble extractor leaked the assignment's left-hand side into the generated `src/features/<feature>/actions.ts`. The output contained a dangling `export const xActions =` with no right-hand side, and `tsc --noEmit` failed with `TS1109: Expression expected`. Runtime happened to work because the unused placeholder was never evaluated, but typecheck was red.
|
|
1283
|
-
|
|
1284
|
-
The preamble extractor now anchors its boundary to the start of the top-level statement containing `defineActions(...)`, covering `export default`, `export const X =`, `const X =`, and bare call forms. Local Zod helper declarations above the call continue to be preserved.
|
|
1285
|
-
|
|
1286
|
-
### Fix: Files worker `database_id` reverted to `"local-files"` on every compile
|
|
1287
|
-
|
|
1288
|
-
Projects using the two-worker R2 architecture had their files worker's `wrangler.toml` (`apps/backend/cloudflare-workers/files/wrangler.toml`) rewritten with `database_id = "local-files"` on every `quickback compile`, even when `providers.database.config.filesDatabaseId` was set to a real D1 UUID. The main worker's binding was correct — only the files worker fell through. Remote deploys of the files worker bound to a non-existent D1, so file serving and access-control reads failed with a binding error.
|
|
1289
|
-
|
|
1290
|
-
The files-worker wrangler generator now reads `filesDatabaseId` (and `filesDatabaseName`) from `providers.database.config` as a fallback when they aren't set on `providers.fileStorage.config`, matching the precedence chain already used by the main worker. Local dev is unaffected — `wrangler dev --local` uses `.wrangler/state/` regardless of the configured ID.
|
|
1291
|
-
|
|
1292
|
-
No config changes required — recompile and redeploy the files worker.
|
|
1293
|
-
|
|
1294
|
-
---
|
|
1295
|
-
|
|
1296
|
-
## v0.8.6 — April 16, 2026
|
|
1297
|
-
|
|
1298
|
-
### Fix: Audit columns silently dropped from tables with a same-line index callback
|
|
1299
|
-
|
|
1300
|
-
Tables authored with the composite-index shape Drizzle / prettier produces —
|
|
1301
|
-
|
|
1302
|
-
```ts
|
|
1303
|
-
export const episodeTags = sqliteTable("episode_tags", {
|
|
1304
|
-
id: text("id").primaryKey(),
|
|
1305
|
-
episodeId: text("episode_id").notNull(),
|
|
1306
|
-
tagId: text("tag_id").notNull(),
|
|
1307
|
-
}, (t) => [ // <-- "}, (t) =>" on one line
|
|
1308
|
-
uniqueIndex("episode_tag_unique").on(t.episodeId, t.tagId),
|
|
1309
|
-
]);
|
|
1310
|
-
```
|
|
1311
|
-
|
|
1312
|
-
never received audit field injection. A regex in `injectAuditFields` required a literal `\n` between the columns-object `},` and the `(t) =>` index callback, so same-line closers were silently skipped and the function returned the source unchanged. drizzle-kit then diffed the audit-less schema against the previous snapshot and emitted `ALTER TABLE ... DROP COLUMN created_at/modified_at/deleted_at/created_by/modified_by/deleted_by` for every affected table. Any project that applied those migrations had production CRUD return `500` because the generated firewall helper still referenced `deletedAt`.
|
|
1313
|
-
|
|
1314
|
-
The regex is now whitespace-flexible and the identifier class accepts any valid JS identifier (`t`, `table`, `_t`, `tbl2`). A defensive guard throws at compile time if all three terminator patterns fail on a recognizable Drizzle table — no more silent drops.
|
|
1315
|
-
|
|
1316
|
-
**Recovery path:**
|
|
913
|
+
`userRole` works everywhere `Access` is accepted — CRUD, actions, views, masking, and inside `or` / `and` combinators. See [Access → userRole vs roles](/compiler/definitions/access#userrole-vs-roles).
|
|
1317
914
|
|
|
1318
|
-
|
|
1319
|
-
- Projects that already hand-patched their schema and ran a manual `ADD COLUMN` migration (like the `podcast-app` workaround in commit `98d8758`): the next compile will regenerate a matching `ADD COLUMN` migration that will fail with "duplicate column name" against a DB that already has the columns. Mark the new migration as applied without running it (e.g. `INSERT INTO __drizzle_migrations` in the features DB) or hand-edit the generated SQL to a no-op, then continue normally.
|
|
915
|
+
### CMS admin gate enforced server-side
|
|
1320
916
|
|
|
1321
|
-
|
|
917
|
+
`cms: { access: "admin" }` previously only hid the CMS link in Account UI and rendered an "Access Denied" screen inside the SPA. Server-side enforcement now applies at every CMS-facing surface: the SPA shell, `/api/v1/schema`, and `custom_view` CRUD.
|
|
1322
918
|
|
|
1323
|
-
|
|
919
|
+
### Better Auth 1.5 + `@cloudflare/workers-types` compatibility
|
|
1324
920
|
|
|
1325
|
-
The
|
|
1326
|
-
|
|
1327
|
-
- **`firewall.exception: true`** — only disables tenant scoping (org/user/team `WHERE` clauses). It does not gate audit fields or soft-delete.
|
|
1328
|
-
- **Audit fields** — always injected unless globally opted out. Unchanged.
|
|
1329
|
-
- **Soft-delete filter** — emitted only when the schema actually has `deletedAt` *or* the user explicitly set `firewall.softDelete`.
|
|
1330
|
-
|
|
1331
|
-
In the default configuration (audit injection on), behavior is unchanged: exception resources still filter `deletedAt IS NULL`. Only the broken case changes — exception resources on a schema without `deletedAt` now return `undefined` (no firewall), matching the column reality.
|
|
1332
|
-
|
|
1333
|
-
No config changes required — recompile to pick up the fix.
|
|
921
|
+
Generated API code typechecks against the new versions. The org-member role-change broadcast hook is emitted via `organizationHooks.afterUpdateMemberRole` (the supported shape after the 1.5 deprecation of `databaseHooks.member.update.after`). `REALTIME_URL` and `ACCESS_TOKEN` are always emitted as optional bindings when the organization plugin is active.
|
|
1334
922
|
|
|
1335
923
|
---
|
|
1336
924
|
|
|
1337
925
|
## v0.8.4 — April 14, 2026
|
|
1338
926
|
|
|
1339
|
-
###
|
|
927
|
+
### `generateId: "short"` strategy
|
|
1340
928
|
|
|
1341
|
-
|
|
929
|
+
A compact ID option for tables where short, shareable codes matter more than collision resistance at scale:
|
|
1342
930
|
|
|
1343
931
|
```typescript
|
|
1344
932
|
providers: {
|
|
1345
|
-
database: defineDatabase("cloudflare-d1", {
|
|
1346
|
-
generateId: "short",
|
|
1347
|
-
}),
|
|
933
|
+
database: defineDatabase("cloudflare-d1", { generateId: "short" }),
|
|
1348
934
|
}
|
|
1349
935
|
```
|
|
1350
936
|
|
|
1351
|
-
Generates 6-character alphanumeric IDs (e.g. `a3F9xK`) using nanoid's `customAlphabet` with the full 62-char alphabet (`0-9A-Za-z`). Requires the `nanoid` package
|
|
1352
|
-
|
|
1353
|
-
**When to use:** room codes, invite links, share URLs, ephemeral records — anywhere the ID appears in a URL or needs to be human-typeable.
|
|
1354
|
-
|
|
1355
|
-
**When not to use:** high-volume tables. 62^6 ≈ 56.8B combinations means ~238K rows before a 50% collision probability (birthday bound). For large tables stick with `"uuid"`, `"cuid"`, or `"prefixed"`.
|
|
1356
|
-
|
|
1357
|
-
See [Providers - ID Generation Options](/compiler/config/providers#id-generation-options) for the full list of strategies.
|
|
1358
|
-
|
|
1359
|
-
---
|
|
1360
|
-
|
|
1361
|
-
## v0.8.3 — April 14, 2026
|
|
1362
|
-
|
|
1363
|
-
### Fix: `wrangler.toml` Route Placement and Binding IDs
|
|
1364
|
-
|
|
1365
|
-
Two bugs in the generated `wrangler.toml` that blocked production deployment without manual edits:
|
|
1366
|
-
|
|
1367
|
-
**Routes were nested under `[dev]`.** The `routes = [...]` array was emitted after the `[dev]` section header, so TOML parsed it as `dev.routes` and wrangler ignored the custom domain (warning: `Unexpected fields found in dev field: "routes"`). Routes now emit as a top-level key.
|
|
1368
|
-
|
|
1369
|
-
**D1 and KV bindings used placeholder IDs.** Despite `databaseId`, `filesDatabaseId`, and `kvId` being set in the quickback config, the generated `wrangler.toml` wrote `"local-features"`, `"local-files"`, and `"local"` instead of the real UUIDs. The compiler now resolves IDs from multiple config sources:
|
|
1370
|
-
|
|
1371
|
-
| Binding | Config sources checked (in order) |
|
|
1372
|
-
|---------|-----------------------------------|
|
|
1373
|
-
| `AUTH_DB` | `database.config.authDatabaseId` |
|
|
1374
|
-
| `DB` | `database.config.featuresDatabaseId`, `database.config.databaseId` |
|
|
1375
|
-
| `FILES_DB` | `fileStorage.config.filesDatabaseId`, `database.config.filesDatabaseId` |
|
|
1376
|
-
| `KV` | `database.config.kvNamespaceId`, `storage.config.namespaceId`, `auth.config.kvId` |
|
|
937
|
+
Generates 6-character alphanumeric IDs (e.g. `a3F9xK`) using nanoid's `customAlphabet` with the full 62-char alphabet (`0-9A-Za-z`). Requires the `nanoid` package.
|
|
1377
938
|
|
|
1378
|
-
|
|
939
|
+
**When to use:** room codes, invite links, share URLs, ephemeral records.
|
|
1379
940
|
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
When the Account SPA was served at `/account/` on the unified quickback domain (e.g. `secure.example.com/account/`), post-login redirects dropped the basepath and sent users to `/dashboard` instead of `/account/dashboard`. Sign-out redirects had the same issue.
|
|
1383
|
-
|
|
1384
|
-
The SPA now shares a basepath module across the router and all raw `window.location.href` assignments, so login, signup, email OTP, welcome, and sign-out flows all stay under the correct path prefix regardless of whether the SPA is on the unified domain or its own dedicated auth subdomain.
|
|
1385
|
-
|
|
1386
|
-
No config changes required — recompile to pick up the fix.
|
|
941
|
+
**When not to use:** high-volume tables. 62^6 ≈ 56.8B combinations means ~238K rows before a 50% collision probability. For large tables stick with `"uuid"`, `"cuid"`, or `"prefixed"`. See [Providers → ID Generation Options](/compiler/config/providers#id-generation-options).
|
|
1387
942
|
|
|
1388
943
|
---
|
|
1389
944
|
|
|
1390
945
|
## v0.8.2 — April 11, 2026
|
|
1391
946
|
|
|
1392
|
-
### Catch-
|
|
947
|
+
### Catch-all `VITE_QUICKBACK_URL`
|
|
1393
948
|
|
|
1394
|
-
|
|
949
|
+
A single Quickback origin can be set in place of four separate URL env vars:
|
|
1395
950
|
|
|
1396
951
|
```bash
|
|
1397
|
-
# One variable — done.
|
|
1398
952
|
VITE_QUICKBACK_URL=https://secure.example.com
|
|
1399
953
|
```
|
|
1400
954
|
|
|
1401
|
-
When set, it's used as a fallback for the individual URLs:
|
|
1402
|
-
|
|
1403
955
|
| Individual var (explicit) | Fallback when unset |
|
|
1404
956
|
|---|---|
|
|
1405
957
|
| `VITE_QUICKBACK_API_URL` | `${VITE_QUICKBACK_URL}` |
|
|
1406
958
|
| `VITE_QUICKBACK_ACCOUNT_URL` | `${VITE_QUICKBACK_URL}/account` |
|
|
1407
959
|
| `VITE_QUICKBACK_CMS_URL` | `${VITE_QUICKBACK_URL}/cms` |
|
|
1408
960
|
|
|
1409
|
-
`VITE_QUICKBACK_APP_URL` stays independent — it points at the tenant's own frontend
|
|
1410
|
-
|
|
1411
|
-
**Non-breaking.** Individual vars still take precedence when set, so existing configurations work unchanged. The compiler now also emits `VITE_QUICKBACK_URL` into the generated SPA `.env` files, and library users can set `__QUICKBACK_URL__` on `globalThis` for the same effect.
|
|
1412
|
-
|
|
1413
|
-
See [Environment Variables](/stack/account-ui/environment-variables) for the full reference.
|
|
961
|
+
`VITE_QUICKBACK_APP_URL` stays independent — it points at the tenant's own frontend. Non-breaking; individual vars take precedence when set. Library users can set `__QUICKBACK_URL__` on `globalThis`. See [Environment Variables](/stack/account-ui/environment-variables).
|
|
1414
962
|
|
|
1415
963
|
---
|
|
1416
964
|
|
|
1417
965
|
## v0.8.1 — April 9, 2026
|
|
1418
966
|
|
|
1419
|
-
### Role
|
|
967
|
+
### Role hierarchy with `+` suffix
|
|
1420
968
|
|
|
1421
|
-
|
|
969
|
+
Define a hierarchy and use `+` to mean "this role and above":
|
|
1422
970
|
|
|
1423
971
|
```typescript
|
|
1424
|
-
|
|
1425
|
-
auth: {
|
|
1426
|
-
roleHierarchy: ['member', 'admin', 'owner'],
|
|
1427
|
-
}
|
|
972
|
+
auth: { roleHierarchy: ['member', 'admin', 'owner'] }
|
|
1428
973
|
|
|
1429
|
-
// In resource definitions
|
|
1430
974
|
crud: {
|
|
1431
975
|
list: { access: { roles: ["member+"] } }, // member, admin, owner
|
|
1432
976
|
create: { access: { roles: ["admin+"] } }, // admin, owner
|
|
@@ -1434,15 +978,15 @@ crud: {
|
|
|
1434
978
|
}
|
|
1435
979
|
```
|
|
1436
980
|
|
|
1437
|
-
Roles are expanded at compile time. No `+` = exact match. See [Access
|
|
981
|
+
Roles are expanded at compile time. No `+` = exact match. See [Access → Role Hierarchy](/compiler/definitions/access#role-hierarchy).
|
|
1438
982
|
|
|
1439
983
|
---
|
|
1440
984
|
|
|
1441
985
|
## v0.8.0 — April 9, 2026
|
|
1442
986
|
|
|
1443
|
-
### Breaking: VITE URL
|
|
987
|
+
### Breaking: VITE URL environment variables namespaced
|
|
1444
988
|
|
|
1445
|
-
All Quickback-generated URL environment variables are
|
|
989
|
+
All Quickback-generated URL environment variables are namespaced under `VITE_QUICKBACK_*` to avoid collisions with other Vite projects.
|
|
1446
990
|
|
|
1447
991
|
| Old | New |
|
|
1448
992
|
|-----|-----|
|
|
@@ -1451,129 +995,58 @@ All Quickback-generated URL environment variables are now namespaced under `VITE
|
|
|
1451
995
|
| `VITE_APP_URL` | `VITE_QUICKBACK_APP_URL` |
|
|
1452
996
|
| `VITE_CMS_URL` | `VITE_QUICKBACK_CMS_URL` |
|
|
1453
997
|
|
|
1454
|
-
|
|
998
|
+
Non-URL variables are unchanged (`VITE_ENABLE_*`, branding vars, `VITE_STRIPE_PUBLISHABLE_KEY`).
|
|
1455
999
|
|
|
1456
1000
|
**Action required:**
|
|
1457
|
-
-
|
|
1458
|
-
-
|
|
1459
|
-
-
|
|
1460
|
-
|
|
1461
|
-
See [Environment Variables](/stack/account-ui/environment-variables) for the full reference.
|
|
1462
|
-
|
|
1463
|
-
### CMS Access Control
|
|
1464
|
-
|
|
1465
|
-
The `cms.access` config option now enforces access at the CMS level, not just link visibility in Account UI.
|
|
1001
|
+
- Compiled projects: re-run `quickback compile`.
|
|
1002
|
+
- Standalone deploys: update `.env`, `.env.production`, and `wrangler.toml` files manually.
|
|
1003
|
+
- Library users: `__QUICKBACK_API_URL__` / `__QUICKBACK_APP_URL__` globals are unchanged.
|
|
1466
1004
|
|
|
1467
|
-
|
|
1468
|
-
cms: { access: "admin" }
|
|
1469
|
-
```
|
|
1470
|
-
|
|
1471
|
-
When set to `"admin"`, non-admin users (`user.role !== "admin"`) see an "Access Denied" screen with a sign-out button instead of the CMS. When set to `"user"` (the default), any authenticated user can access the CMS.
|
|
1005
|
+
### CMS access control
|
|
1472
1006
|
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
### SPA Sub-Route Fix
|
|
1476
|
-
|
|
1477
|
-
Fixed a bug where hard-refreshing or directly navigating to SPA sub-routes (e.g., `/account/profile`, `/cms/tables/users`) returned a blank white screen. The Worker now correctly serves `index.html` for all SPA paths, allowing the client-side router to handle routing.
|
|
1007
|
+
`cms.access: "admin"` enforces access at the CMS level, not just link visibility. Non-admin users (`user.role !== "admin"`) see an "Access Denied" screen with a sign-out button.
|
|
1478
1008
|
|
|
1479
1009
|
---
|
|
1480
1010
|
|
|
1481
1011
|
## v0.5.11 — February 24, 2026
|
|
1482
1012
|
|
|
1483
|
-
###
|
|
1484
|
-
|
|
1485
|
-
- Fixed email-OTP magic links not working correctly
|
|
1486
|
-
- Removed deprecated `/internal/validate` endpoint — use standard Better Auth session validation instead
|
|
1487
|
-
- Auth is now required for all API routes when running locally (previously some routes were unprotected in dev)
|
|
1488
|
-
|
|
1489
|
-
### Multiple Table Exports Fix
|
|
1490
|
-
|
|
1491
|
-
- Fixed a compiler error when a single file exports multiple Drizzle tables alongside a `defineTable()` default export
|
|
1492
|
-
- The CLI now properly detects and reports this with a clear error message pointing to the fix
|
|
1493
|
-
|
|
1494
|
-
### Headless Drizzle Rename Hints
|
|
1495
|
-
|
|
1496
|
-
- Added `compiler.migrations.renames` configuration for CI/CD environments where Drizzle's interactive rename prompts would block compilation
|
|
1497
|
-
- Compile errors now include explicit rename key paths and fail fast on malformed rename config keys
|
|
1498
|
-
- See [Configuration](/compiler/config) for details
|
|
1499
|
-
|
|
1500
|
-
### Security Contract Report Artifacts
|
|
1013
|
+
### Mandatory unsafe action audit trail
|
|
1501
1014
|
|
|
1502
|
-
-
|
|
1503
|
-
- `reports/security-contracts.report.json`
|
|
1504
|
-
- `reports/security-contracts.report.sig.json`
|
|
1505
|
-
- Added config-driven signing controls:
|
|
1506
|
-
- `compiler.securityContracts.report.signature.enabled`
|
|
1507
|
-
- `compiler.securityContracts.report.signature.required`
|
|
1508
|
-
- `compiler.securityContracts.report.signature.key` / `keyEnv` / `keyId`
|
|
1509
|
-
- Missing required signing keys now fail loudly with explicit remediation guidance
|
|
1510
|
-
- Added strict config validation for report/signature paths and signing options
|
|
1015
|
+
Structured `unsafe` config (`unsafe: { reason, adminOnly, crossTenant, targetScope }`). Cross-tenant unsafe actions require Better Auth authentication plus platform admin role (`ctx.userRole === "admin"`). Mandatory audit logging on success, denial, and error paths. Cloudflare output includes `AUDIT_DB` wiring, `drizzle.audit.config.ts`, and `db:migrate:audit:*` scripts when unsafe actions are present.
|
|
1511
1016
|
|
|
1512
|
-
|
|
1017
|
+
Compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action).
|
|
1513
1018
|
|
|
1514
|
-
|
|
1515
|
-
- Cross-tenant unsafe actions now require Better Auth authentication plus platform admin role (`ctx.userRole === "admin"`)
|
|
1516
|
-
- Added mandatory audit logging for unsafe cross-tenant actions (success, denial, and error paths)
|
|
1517
|
-
- Cloudflare output now includes optional `AUDIT_DB` wiring, `drizzle.audit.config.ts`, and `db:migrate:audit:*` scripts when unsafe actions are present
|
|
1518
|
-
- Added compile-time raw SQL guard for actions and handlers (`allowRawSql: true` required per action)
|
|
1019
|
+
### Security contract report artifacts
|
|
1519
1020
|
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
## v0.5.10 — February 19, 2026
|
|
1021
|
+
Generated security contract artifacts: `reports/security-contracts.report.json`, `reports/security-contracts.report.sig.json`. Config-driven signing controls (`compiler.securityContracts.report.signature.*`). Missing required signing keys fail loudly with explicit remediation.
|
|
1523
1022
|
|
|
1524
|
-
###
|
|
1023
|
+
### Headless Drizzle rename hints
|
|
1525
1024
|
|
|
1526
|
-
|
|
1527
|
-
- Better CLI output formatting during compilation
|
|
1528
|
-
- Added `apiPath` to schema registry for CMS integration
|
|
1025
|
+
`compiler.migrations.renames` configuration for CI/CD environments where Drizzle's interactive rename prompts block compilation. See [Configuration](/compiler/config).
|
|
1529
1026
|
|
|
1530
|
-
###
|
|
1027
|
+
### Minor
|
|
1531
1028
|
|
|
1532
|
-
-
|
|
1533
|
-
-
|
|
1534
|
-
|
|
1535
|
-
---
|
|
1536
|
-
|
|
1537
|
-
## v0.5.9 — February 16, 2026
|
|
1538
|
-
|
|
1539
|
-
### CMS Pages & CLI Page Support
|
|
1540
|
-
|
|
1541
|
-
- Added `definePage()` support for CMS-managed pages
|
|
1542
|
-
- Auth middleware improvements for page routes
|
|
1543
|
-
- CLI now supports page definitions alongside table and action definitions
|
|
1029
|
+
- Email OTP magic links work correctly.
|
|
1030
|
+
- Auth is required for all API routes when running locally.
|
|
1031
|
+
- Single-file multi-table exports alongside `defineTable()` produce a clear error.
|
|
1544
1032
|
|
|
1545
1033
|
---
|
|
1546
1034
|
|
|
1547
1035
|
## v0.5.8 — February 14, 2026
|
|
1548
1036
|
|
|
1549
|
-
### CMS
|
|
1550
|
-
|
|
1551
|
-
- Introduced the Quickback CMS — a schema-driven admin panel that connects to your generated API
|
|
1552
|
-
- CMS namespace added to actions for admin-specific operations
|
|
1553
|
-
- Fixed `guard` → `access` naming inconsistency in CMS action definitions
|
|
1554
|
-
|
|
1555
|
-
### Schema Registry & Firewall Improvements
|
|
1556
|
-
|
|
1557
|
-
- Added schema registry generator — the compiler now outputs a JSON schema registry used by the CMS
|
|
1558
|
-
- Firewall error modes: choose between `reveal` (403 with details) and `hide` (opaque 404) for security-sensitive deployments
|
|
1559
|
-
|
|
1560
|
-
### Bug Fixes
|
|
1037
|
+
### Quickback CMS
|
|
1561
1038
|
|
|
1562
|
-
-
|
|
1563
|
-
- Organization selector improvements in Account UI
|
|
1564
|
-
- Config validation now catches more errors at compile time
|
|
1565
|
-
- Better CRUD error handling with structured error responses
|
|
1566
|
-
- Fixed masking to use representative star counts instead of fixed formatting
|
|
1039
|
+
A schema-driven admin panel that connects to your generated API. The compiler now outputs a JSON schema registry consumed by the CMS at runtime. Firewall error modes (`reveal` for 403 with details, `hide` for opaque 404) are configurable per resource for security-sensitive deployments.
|
|
1567
1040
|
|
|
1568
1041
|
---
|
|
1569
1042
|
|
|
1570
1043
|
## v0.5.7 — February 12, 2026
|
|
1571
1044
|
|
|
1572
|
-
### Scoped
|
|
1045
|
+
### Scoped database for actions
|
|
1573
1046
|
|
|
1574
|
-
Actions
|
|
1047
|
+
Actions receive a security-scoped database instead of a raw Drizzle instance. The compiler generates a proxy wrapper that automatically enforces org isolation, owner filtering, and soft-delete visibility — the same protections that CRUD routes have always had.
|
|
1575
1048
|
|
|
1576
|
-
|
|
1049
|
+
Duck-typed column detection at runtime:
|
|
1577
1050
|
|
|
1578
1051
|
| Column Detected | SELECT / UPDATE / DELETE | INSERT |
|
|
1579
1052
|
|---|---|---|
|
|
@@ -1581,24 +1054,9 @@ The scoped DB uses duck-typed column detection at runtime:
|
|
|
1581
1054
|
| `ownerId` | Adds `WHERE ownerId = ?` | Auto-injects `ownerId` from context |
|
|
1582
1055
|
| `deletedAt` | Adds `WHERE deletedAt IS NULL` | — |
|
|
1583
1056
|
|
|
1584
|
-
|
|
1057
|
+
Every action is secure by default — no manual `WHERE` clauses needed.
|
|
1585
1058
|
|
|
1586
|
-
|
|
1587
|
-
defineActions(todos, {
|
|
1588
|
-
complete: {
|
|
1589
|
-
type: "record",
|
|
1590
|
-
execute: async ({ db, ctx, record, input }) => {
|
|
1591
|
-
// db is scoped — only sees records in user's org, excludes soft-deleted
|
|
1592
|
-
const siblings = await db.select().from(todos);
|
|
1593
|
-
// ↑ automatically filtered to ctx.activeOrgId + deletedAt IS NULL
|
|
1594
|
-
},
|
|
1595
|
-
},
|
|
1596
|
-
});
|
|
1597
|
-
```
|
|
1598
|
-
|
|
1599
|
-
#### Unsafe Mode
|
|
1600
|
-
|
|
1601
|
-
Actions that intentionally need to bypass security (admin reports, cross-org queries, migrations) can declare `unsafe: true` to receive a raw, unscoped database handle:
|
|
1059
|
+
Actions that intentionally need to bypass security (admin reports, cross-org queries, migrations) can declare `unsafe: true` to receive a raw, unscoped database handle via `rawDb`:
|
|
1602
1060
|
|
|
1603
1061
|
```typescript
|
|
1604
1062
|
defineActions(analytics, {
|
|
@@ -1613,108 +1071,45 @@ defineActions(analytics, {
|
|
|
1613
1071
|
});
|
|
1614
1072
|
```
|
|
1615
1073
|
|
|
1616
|
-
Without `unsafe: true`, `rawDb` is `undefined`.
|
|
1617
|
-
|
|
1618
|
-
**Related docs:** [Actions](/compiler/definitions/actions), [Actions API](/compiler/targets/hono-api/using-the-api/actions-api)
|
|
1619
|
-
|
|
1620
|
-
---
|
|
1621
|
-
|
|
1622
|
-
### Cascading Soft Delete
|
|
1074
|
+
Without `unsafe: true`, `rawDb` is `undefined`. See [Actions](/compiler/definitions/actions).
|
|
1623
1075
|
|
|
1624
|
-
|
|
1076
|
+
### Cascading soft delete
|
|
1625
1077
|
|
|
1626
|
-
|
|
1627
|
-
DELETE /api/v1/projects/:id
|
|
1628
|
-
```
|
|
1629
|
-
|
|
1630
|
-
Generated behavior:
|
|
1631
|
-
```typescript
|
|
1632
|
-
// 1. Soft delete the parent
|
|
1633
|
-
await db.update(projects)
|
|
1634
|
-
.set({ deletedAt: now, deletedBy: userId })
|
|
1635
|
-
.where(eq(projects.id, id));
|
|
1636
|
-
|
|
1637
|
-
// 2. Auto-cascade to children (compiler-generated)
|
|
1638
|
-
await db.update(projectMembers)
|
|
1639
|
-
.set({ deletedAt: now, deletedBy: userId })
|
|
1640
|
-
.where(eq(projectMembers.projectId, id));
|
|
1641
|
-
|
|
1642
|
-
await db.update(projectTasks)
|
|
1643
|
-
.set({ deletedAt: now, deletedBy: userId })
|
|
1644
|
-
.where(eq(projectTasks.projectId, id));
|
|
1645
|
-
```
|
|
1078
|
+
Soft-deleting a parent record automatically cascades to child and junction tables within the same feature. The compiler detects foreign key references at build time and generates cascade `UPDATE` statements.
|
|
1646
1079
|
|
|
1647
1080
|
Rules:
|
|
1648
|
-
-
|
|
1649
|
-
-
|
|
1650
|
-
- Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler
|
|
1081
|
+
- Applies to soft delete only. Hard delete relies on database-level `ON DELETE CASCADE`.
|
|
1082
|
+
- Cascades within the same feature only — cross-feature references are not affected.
|
|
1083
|
+
- Child tables must have `deletedAt` / `deletedBy` columns (auto-added by the compiler).
|
|
1651
1084
|
|
|
1652
|
-
|
|
1085
|
+
See [Actions API → Cascading Soft Delete](/compiler/targets/hono-api/using-the-api/actions-api#cascading-soft-delete).
|
|
1653
1086
|
|
|
1654
|
-
|
|
1087
|
+
### Advanced query parameters
|
|
1655
1088
|
|
|
1656
|
-
|
|
1089
|
+
New capabilities for all list endpoints:
|
|
1657
1090
|
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
- **
|
|
1661
|
-
- **Multi-sort** — `?sort=status:asc,createdAt:desc` sorts by multiple fields
|
|
1662
|
-
- **Total count** — `?count=true` returns total matching records in response headers (`X-Total-Count`)
|
|
1091
|
+
- **Field selection** — `?fields=id,name,status`
|
|
1092
|
+
- **Multi-sort** — `?sort=status:asc,createdAt:desc`
|
|
1093
|
+
- **Total count** — `?count=true` returns total matching records in `X-Total-Count`
|
|
1663
1094
|
- **Full-text search** — `?search=keyword` searches across all text columns
|
|
1664
1095
|
|
|
1665
|
-
|
|
1666
|
-
# Get only names and statuses, sorted by status then date, with total count
|
|
1667
|
-
GET /api/v1/todos?fields=id,name,status&sort=status:asc,createdAt:desc&count=true
|
|
1668
|
-
|
|
1669
|
-
# Search across all text fields
|
|
1670
|
-
GET /api/v1/todos?search=urgent
|
|
1671
|
-
```
|
|
1672
|
-
|
|
1673
|
-
**Related docs:** [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params)
|
|
1674
|
-
|
|
1675
|
-
---
|
|
1676
|
-
|
|
1677
|
-
### Audit Field Improvements
|
|
1678
|
-
|
|
1679
|
-
- `deletedAt` and `deletedBy` fields are now **always injected** by the compiler for tables with soft delete enabled — no need to define them in your schema
|
|
1680
|
-
- All audit fields (`createdAt`, `createdBy`, `modifiedAt`, `modifiedBy`, `deletedAt`, `deletedBy`) are auto-managed
|
|
1681
|
-
|
|
1682
|
-
---
|
|
1683
|
-
|
|
1684
|
-
## v0.5.6 — February 8, 2026
|
|
1685
|
-
|
|
1686
|
-
### Database Naming Conventions
|
|
1687
|
-
|
|
1688
|
-
- Default table and column naming changed to **snake_case** with `usePlurals: false`
|
|
1689
|
-
- Table names derived from generated Better Auth schema for consistency
|
|
1690
|
-
- Removed legacy single-database mode — split databases (auth + features) is now the standard
|
|
1691
|
-
|
|
1692
|
-
### Auth Variable Shadowing Fix
|
|
1693
|
-
|
|
1694
|
-
- Fixed `member` variable in auth middleware that shadowed the Drizzle `member` table import
|
|
1695
|
-
- Renamed to `sessionMember` to avoid conflicts in generated routes
|
|
1096
|
+
See [Query Parameters](/compiler/targets/hono-api/using-the-api/query-params).
|
|
1696
1097
|
|
|
1697
1098
|
---
|
|
1698
1099
|
|
|
1699
1100
|
## v0.5.5 — February 5, 2026
|
|
1700
1101
|
|
|
1701
|
-
###
|
|
1102
|
+
### OpenAPI spec generation
|
|
1702
1103
|
|
|
1703
|
-
|
|
1704
|
-
- Published `@quickback-dev/better-auth-combo-auth` — combined email + password + OTP authentication
|
|
1705
|
-
- Published `@quickback-dev/better-auth-aws-ses` — AWS SES email provider for Better Auth
|
|
1104
|
+
Generated APIs include a full OpenAPI specification at `/openapi.json`. Better Auth endpoints are included in the spec.
|
|
1706
1105
|
|
|
1707
|
-
###
|
|
1106
|
+
### Better Auth plugins
|
|
1708
1107
|
|
|
1709
|
-
-
|
|
1710
|
-
- Better Auth endpoints included in the spec
|
|
1711
|
-
- Runtime route: `GET /openapi.json`
|
|
1108
|
+
Published `@quickback-dev/better-auth-upgrade-anonymous` (post-passkey email collection flow), `@quickback-dev/better-auth-combo-auth` (combined email + password + OTP), and `@quickback-dev/better-auth-aws-ses` (AWS SES email provider).
|
|
1712
1109
|
|
|
1713
|
-
### Security
|
|
1110
|
+
### Security headers
|
|
1714
1111
|
|
|
1715
|
-
|
|
1716
|
-
- Security headers middleware (CSP, HSTS, X-Frame-Options, X-Content-Type-Options)
|
|
1717
|
-
- `BETTER_AUTH_SECRET` properly passed to generated config
|
|
1112
|
+
Global error handler prevents leaking internal error details. Security headers middleware (CSP, HSTS, X-Frame-Options, X-Content-Type-Options). `BETTER_AUTH_SECRET` properly passed to generated config.
|
|
1718
1113
|
|
|
1719
1114
|
---
|
|
1720
1115
|
|
|
@@ -1722,34 +1117,28 @@ GET /api/v1/todos?search=urgent
|
|
|
1722
1117
|
|
|
1723
1118
|
### Account UI
|
|
1724
1119
|
|
|
1725
|
-
|
|
1726
|
-
- Features: sessions, organizations, passkeys, passwordless, admin panel, API keys
|
|
1727
|
-
- Dual-mode: standalone (degit template) or embedded with Quickback projects
|
|
1120
|
+
Pre-built authentication UI deployed as Cloudflare Workers. Sessions, organizations, passkeys, passwordless, admin panel, API keys. Dual-mode: standalone (degit template) or embedded with Quickback projects.
|
|
1728
1121
|
|
|
1729
|
-
### Webhook
|
|
1122
|
+
### Webhook system
|
|
1730
1123
|
|
|
1731
|
-
|
|
1732
|
-
- Outbound webhooks via Cloudflare Queues with automatic retries
|
|
1733
|
-
- Configurable per-feature webhook events
|
|
1124
|
+
Inbound webhook endpoints with signature verification. Outbound webhooks via Cloudflare Queues with automatic retries. Configurable per-feature webhook events.
|
|
1734
1125
|
|
|
1735
|
-
### Realtime &
|
|
1126
|
+
### Realtime & vector search
|
|
1736
1127
|
|
|
1737
|
-
|
|
1738
|
-
- Vector embeddings via Cloudflare Vectorize
|
|
1739
|
-
- KV and R2 storage integrations
|
|
1128
|
+
Durable Objects + WebSocket realtime subscriptions. Vector embeddings via Cloudflare Vectorize. KV and R2 storage integrations.
|
|
1740
1129
|
|
|
1741
1130
|
---
|
|
1742
1131
|
|
|
1743
1132
|
## v0.5.0 — January 2026
|
|
1744
1133
|
|
|
1745
|
-
### Initial
|
|
1746
|
-
|
|
1747
|
-
- **Quickback Compiler** — TypeScript-first backend compiler
|
|
1748
|
-
- **Four
|
|
1749
|
-
- **`defineTable()`** —
|
|
1750
|
-
- **Templates** — Cloudflare Workers,
|
|
1751
|
-
- **Cloud
|
|
1752
|
-
- **CLI** — `quickback create`, `quickback compile
|
|
1753
|
-
- **Better Auth
|
|
1754
|
-
- **Drizzle ORM** —
|
|
1755
|
-
- **Cloudflare D1** —
|
|
1134
|
+
### Initial release
|
|
1135
|
+
|
|
1136
|
+
- **Quickback Compiler** — TypeScript-first backend compiler.
|
|
1137
|
+
- **Four security pillars** — Firewall, Access, Guards, Masking.
|
|
1138
|
+
- **`defineTable()`** — schema + security configuration in a single file.
|
|
1139
|
+
- **Templates** — Cloudflare Workers, B2B SaaS.
|
|
1140
|
+
- **Cloud compiler** — remote compilation via `compiler.quickback.dev`.
|
|
1141
|
+
- **CLI** — `quickback create`, `quickback compile`.
|
|
1142
|
+
- **Better Auth integration** — organizations, roles, sessions.
|
|
1143
|
+
- **Drizzle ORM** — schema-first with automatic migrations.
|
|
1144
|
+
- **Cloudflare D1** — split database support (auth + features).
|