@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.
Files changed (50) hide show
  1. package/dist/commands/claude.d.ts +1 -1
  2. package/dist/commands/claude.d.ts.map +1 -1
  3. package/dist/commands/claude.js +9 -6
  4. package/dist/commands/claude.js.map +1 -1
  5. package/dist/commands/compile.d.ts +1 -1
  6. package/dist/commands/compile.js +1 -1
  7. package/dist/commands/start.d.ts +2 -0
  8. package/dist/commands/start.d.ts.map +1 -1
  9. package/dist/commands/start.js +84 -39
  10. package/dist/commands/start.js.map +1 -1
  11. package/dist/docs/content.js +14 -14
  12. package/dist/docs/content.js.map +1 -1
  13. package/dist/index.js +7 -3
  14. package/dist/index.js.map +1 -1
  15. package/dist/lib/file-loader.d.ts +1 -1
  16. package/dist/lib/file-loader.d.ts.map +1 -1
  17. package/dist/lib/file-loader.js +16 -3
  18. package/dist/lib/file-loader.js.map +1 -1
  19. package/dist/skill/docs/changelog.md +328 -0
  20. package/dist/skill/docs/compiler/cloud-compiler/cli.md +1 -1
  21. package/dist/skill/docs/compiler/definitions/access.md +17 -0
  22. package/dist/skill/docs/compiler/definitions/actions.md +9 -4
  23. package/dist/skill/docs/compiler/getting-started/claude-code.md +1 -1
  24. package/dist/skill/docs/compiler/getting-started/index.md +9 -1
  25. package/dist/skill/docs/compiler/getting-started/templates.md +11 -7
  26. package/dist/skill/docs/compiler/targets/hono-api/database/neon.md +27 -8
  27. package/dist/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +2 -1
  28. package/dist/skill/docs/stack/account-ui/features/organizations.md +1 -1
  29. package/dist/skill/docs/stack/cms/pages.md +1 -1
  30. package/dist/skill/docs/stack/realtime/durable-objects.md +9 -0
  31. package/dist/skill/docs/stack/realtime/live-views.md +4 -0
  32. package/dist/skill/docs/stack/realtime/using-realtime.md +2 -2
  33. package/dist/templates/registry.d.ts.map +1 -1
  34. package/dist/templates/registry.js +1 -0
  35. package/dist/templates/registry.js.map +1 -1
  36. package/package.json +1 -1
  37. package/src/skill/docs/changelog.md +328 -0
  38. package/src/skill/docs/compiler/cloud-compiler/cli.md +1 -1
  39. package/src/skill/docs/compiler/definitions/access.md +17 -0
  40. package/src/skill/docs/compiler/definitions/actions.md +9 -4
  41. package/src/skill/docs/compiler/getting-started/claude-code.md +1 -1
  42. package/src/skill/docs/compiler/getting-started/index.md +9 -1
  43. package/src/skill/docs/compiler/getting-started/templates.md +11 -7
  44. package/src/skill/docs/compiler/targets/hono-api/database/neon.md +27 -8
  45. package/src/skill/docs/compiler/targets/hono-api/using-the-api/openapi.md +2 -1
  46. package/src/skill/docs/stack/account-ui/features/organizations.md +1 -1
  47. package/src/skill/docs/stack/cms/pages.md +1 -1
  48. package/src/skill/docs/stack/realtime/durable-objects.md +9 -0
  49. package/src/skill/docs/stack/realtime/live-views.md +4 -0
  50. 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