@quickback-dev/cli 0.47.0 → 0.47.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/claude.d.ts +1 -1
- package/dist/commands/claude.d.ts.map +1 -1
- package/dist/commands/claude.js +9 -6
- package/dist/commands/claude.js.map +1 -1
- package/dist/commands/compile.d.ts +1 -1
- package/dist/commands/compile.js +1 -1
- package/dist/commands/start.d.ts +2 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +84 -39
- package/dist/commands/start.js.map +1 -1
- package/dist/docs/content.js +14 -14
- package/dist/docs/content.js.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/file-loader.d.ts +1 -1
- package/dist/lib/file-loader.d.ts.map +1 -1
- package/dist/lib/file-loader.js +16 -3
- package/dist/lib/file-loader.js.map +1 -1
- package/dist/skill/docs/changelog.md +328 -0
- package/dist/skill/docs/compiler/cloud-compiler/cli.md +1 -1
- package/dist/skill/docs/compiler/definitions/access.md +17 -0
- package/dist/skill/docs/compiler/definitions/actions.md +9 -4
- package/dist/skill/docs/compiler/getting-started/claude-code.md +1 -1
- package/dist/skill/docs/compiler/getting-started/index.md +9 -1
- package/dist/skill/docs/compiler/getting-started/templates.md +11 -7
- package/dist/skill/docs/compiler/targets/hono-api/database/neon.md +27 -8
- package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +2 -1
- package/dist/skill/docs/stack/account-ui/features/organizations.md +1 -1
- package/dist/skill/docs/stack/cms/pages.md +1 -1
- package/dist/skill/docs/stack/realtime/durable-objects.md +9 -0
- package/dist/skill/docs/stack/realtime/live-views.md +4 -0
- package/dist/skill/docs/stack/realtime/using-realtime.md +2 -2
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +1 -0
- package/dist/templates/registry.js.map +1 -1
- package/package.json +1 -1
- package/src/skill/docs/changelog.md +328 -0
- package/src/skill/docs/compiler/cloud-compiler/cli.md +1 -1
- package/src/skill/docs/compiler/definitions/access.md +17 -0
- package/src/skill/docs/compiler/definitions/actions.md +9 -4
- package/src/skill/docs/compiler/getting-started/claude-code.md +1 -1
- package/src/skill/docs/compiler/getting-started/index.md +9 -1
- package/src/skill/docs/compiler/getting-started/templates.md +11 -7
- package/src/skill/docs/compiler/targets/hono-api/database/neon.md +27 -8
- package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +2 -1
- package/src/skill/docs/stack/account-ui/features/organizations.md +1 -1
- package/src/skill/docs/stack/cms/pages.md +1 -1
- package/src/skill/docs/stack/realtime/durable-objects.md +9 -0
- package/src/skill/docs/stack/realtime/live-views.md +4 -0
- package/src/skill/docs/stack/realtime/using-realtime.md +2 -2
|
@@ -107,6 +107,15 @@ attendee — their realtime socket now opens.
|
|
|
107
107
|
|
|
108
108
|
Quickback emits auto-broadcasts in **only one place**: the generated CRUD route handlers (`POST /` create, `PATCH /:id` update, `DELETE /:id` delete) for resources with `realtime.enabled` (or covered by `dbConfig.realtime: true`'s project-level default). Those handlers wrap each successful write with a `realtime.insert / update / delete` call before responding.
|
|
109
109
|
|
|
110
|
+
Auto-broadcasts carry the table's declared gates (v0.46+): the
|
|
111
|
+
`realtime.requiredRoles` list becomes the broadcast's `targetRoles` (with
|
|
112
|
+
role-hierarchy `+` expanded), and the table's effective masking config —
|
|
113
|
+
declared plus auto-detected sensitive columns — is applied per subscriber
|
|
114
|
+
role at fanout, matching what the HTTP routes mask. A `type: 'custom'` mask
|
|
115
|
+
function can't be replicated by the Broadcaster, so those columns broadcast
|
|
116
|
+
as `[REDACTED]` (fail closed). Tables that declare neither broadcast openly,
|
|
117
|
+
as before.
|
|
118
|
+
|
|
110
119
|
Everywhere else — action handlers, queue consumers, scheduled jobs, custom Hono routes — you broadcast manually. In action handlers on realtime-enabled projects, Quickback now injects a typed `realtime` helper directly into `execute(...)`; outside actions you still call `createRealtime(env)` yourself.
|
|
111
120
|
|
|
112
121
|
| Mutation site | Auto-broadcast? | Why |
|
|
@@ -145,6 +145,10 @@ are emitted as `DELETE` so the row leaves the surface.
|
|
|
145
145
|
- Each included table's `firewall` + `masking` apply on both the initial
|
|
146
146
|
materialize and the live deltas (masking is applied per subscriber role at
|
|
147
147
|
fanout), so the two are consistent.
|
|
148
|
+
- A table-level `realtime.requiredRoles` declaration is honored on view
|
|
149
|
+
deltas too (v0.46+): `view_changes` for that table fan out only to
|
|
150
|
+
subscribers holding one of the required roles, exactly like its row-stream
|
|
151
|
+
broadcasts. Tables without `requiredRoles` are unaffected.
|
|
148
152
|
- **Stricter-child guard.** When a reverse-FK child's firewall is *stricter*
|
|
149
153
|
than the root's (e.g. an owner-scoped note under an org-scoped person), the
|
|
150
154
|
raw child row is **never broadcast**. Instead the server emits a *resync
|
|
@@ -130,7 +130,7 @@ Custom namespaces (from `defineRealtime()`) use the format `namespace:event` —
|
|
|
130
130
|
|
|
131
131
|
### Role-Based Filtering
|
|
132
132
|
|
|
133
|
-
Events are only delivered to users whose role matches the broadcast's `targetRoles`. If a table's realtime config specifies `requiredRoles: ["hiring-manager", "recruiter"]`, only users with those roles receive the events.
|
|
133
|
+
Events are only delivered to users whose role matches the broadcast's `targetRoles`. If a table's realtime config specifies `requiredRoles: ["hiring-manager", "recruiter"]`, only users with those roles receive the events. This applies to generated CRUD broadcasts and to [live view](/stack/realtime/live-views) `view_changes` deltas alike, enforced at fanout (v0.46+ — recompile and redeploy to pick up the enforcement).
|
|
134
134
|
|
|
135
135
|
### Per-Role Masking
|
|
136
136
|
|
|
@@ -145,7 +145,7 @@ masking: {
|
|
|
145
145
|
- **Owner sees:** `{ ssn: "123-45-6789" }`
|
|
146
146
|
- **Recruiter sees:** `{ ssn: "*****6789" }`
|
|
147
147
|
|
|
148
|
-
Masking is pre-computed per-role (O(roles), not O(subscribers)) for efficiency.
|
|
148
|
+
Masking is pre-computed per-role (O(roles), not O(subscribers)) for efficiency. A `type: 'custom'` mask function can't run inside the Broadcaster — those columns broadcast as `[REDACTED]` (fail closed).
|
|
149
149
|
|
|
150
150
|
### User-Specific Events
|
|
151
151
|
|