@quickback-dev/cli 0.66.1 → 0.66.3

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 (205) hide show
  1. package/README.md +7 -4
  2. package/dist/commands/build.d.ts +51 -0
  3. package/dist/commands/build.d.ts.map +1 -0
  4. package/dist/commands/build.js +804 -0
  5. package/dist/commands/build.js.map +1 -0
  6. package/dist/commands/build.test.d.ts +2 -0
  7. package/dist/commands/build.test.d.ts.map +1 -0
  8. package/dist/commands/build.test.js +150 -0
  9. package/dist/commands/build.test.js.map +1 -0
  10. package/dist/commands/check.d.ts +2 -2
  11. package/dist/commands/check.js +4 -4
  12. package/dist/commands/check.js.map +1 -1
  13. package/dist/commands/create.d.ts +1 -1
  14. package/dist/commands/create.js +7 -7
  15. package/dist/commands/create.js.map +1 -1
  16. package/dist/commands/deploy.d.ts +6 -6
  17. package/dist/commands/deploy.js +23 -23
  18. package/dist/commands/deploy.js.map +1 -1
  19. package/dist/commands/example.js +1 -1
  20. package/dist/commands/example.js.map +1 -1
  21. package/dist/commands/mcp.js +1 -1
  22. package/dist/commands/mcp.js.map +1 -1
  23. package/dist/commands/migrate.d.ts +1 -1
  24. package/dist/commands/migrate.js +3 -3
  25. package/dist/commands/migrate.js.map +1 -1
  26. package/dist/commands/migrations.js +2 -2
  27. package/dist/commands/migrations.js.map +1 -1
  28. package/dist/commands/push.js +1 -1
  29. package/dist/commands/push.js.map +1 -1
  30. package/dist/commands/start.js +1 -1
  31. package/dist/commands/start.js.map +1 -1
  32. package/dist/cursor/quickback.mdc +1 -1
  33. package/dist/index.js +18 -15
  34. package/dist/index.js.map +1 -1
  35. package/dist/lib/auth.js +1 -1
  36. package/dist/lib/auth.js.map +1 -1
  37. package/dist/lib/compiler-floor.d.ts +1 -1
  38. package/dist/lib/compiler-floor.js +1 -1
  39. package/dist/lib/file-loader.js +2 -2
  40. package/dist/lib/file-loader.js.map +1 -1
  41. package/dist/lib/file-writer.d.ts +2 -0
  42. package/dist/lib/file-writer.d.ts.map +1 -1
  43. package/dist/lib/file-writer.js +16 -0
  44. package/dist/lib/file-writer.js.map +1 -1
  45. package/dist/lib/file-writer.test.js +16 -0
  46. package/dist/lib/file-writer.test.js.map +1 -1
  47. package/dist/lib/migrations/file-envelopes.js +3 -3
  48. package/dist/lib/migrations/file-envelopes.js.map +1 -1
  49. package/dist/lib/prepare-output.test.js +1 -1
  50. package/dist/lib/prepare-output.test.js.map +1 -1
  51. package/dist/lib/schema-sync/index.js +1 -1
  52. package/dist/lib/schema-sync/index.test.js +1 -1
  53. package/dist/lib/schema-sync/index.test.js.map +1 -1
  54. package/dist/skill/SKILL.md +6 -6
  55. package/dist/skill/docs/api/actions.md +27 -3
  56. package/dist/skill/docs/api/batch-operations.md +4 -0
  57. package/dist/skill/docs/api/crud.md +64 -0
  58. package/dist/skill/docs/api/index.md +1 -1
  59. package/dist/skill/docs/api/openapi.md +1 -1
  60. package/dist/skill/docs/api/query-params.md +19 -2
  61. package/dist/skill/docs/changelog/index.md +33 -1
  62. package/dist/skill/docs/configure/agents.md +1 -1
  63. package/dist/skill/docs/configure/index.md +8 -3
  64. package/dist/skill/docs/configure/providers.md +3 -0
  65. package/dist/skill/docs/configure/variables.md +3 -3
  66. package/dist/skill/docs/define/access.md +7 -0
  67. package/dist/skill/docs/define/actions/defining.md +39 -8
  68. package/dist/skill/docs/define/actions/record-and-standalone.md +7 -4
  69. package/dist/skill/docs/define/actions/scoped-db.md +46 -16
  70. package/dist/skill/docs/define/areas.md +1 -1
  71. package/dist/skill/docs/define/diagnostics.md +1 -0
  72. package/dist/skill/docs/define/encryption.md +1 -1
  73. package/dist/skill/docs/define/feature.md +14 -7
  74. package/dist/skill/docs/define/guards.md +34 -3
  75. package/dist/skill/docs/define/schema.md +29 -17
  76. package/dist/skill/docs/define/security.md +1 -1
  77. package/dist/skill/docs/define/transitions.md +35 -4
  78. package/dist/skill/docs/define/views.md +33 -0
  79. package/dist/skill/docs/index.md +2 -2
  80. package/dist/skill/docs/platform/auth/api-keys.md +1 -1
  81. package/dist/skill/docs/platform/auth/using-auth.md +37 -0
  82. package/dist/skill/docs/platform/database/d1.md +2 -2
  83. package/dist/skill/docs/platform/database/neon.md +4 -4
  84. package/dist/skill/docs/platform/email/index.md +1 -1
  85. package/dist/skill/docs/platform/queues/handlers.md +1 -1
  86. package/dist/skill/docs/platform/queues/using-queues.md +1 -1
  87. package/dist/skill/docs/platform/schedules/index.md +1 -1
  88. package/dist/skill/docs/platform/storage/index.md +3 -3
  89. package/dist/skill/docs/platform/storage/r2.md +87 -37
  90. package/dist/skill/docs/platform/storage/using-r2.md +99 -19
  91. package/dist/skill/docs/platform/webhooks/inbound.md +40 -0
  92. package/dist/skill/docs/start/deploy-browser.md +39 -44
  93. package/dist/skill/docs/start/deploy-owner-access.md +28 -19
  94. package/dist/skill/docs/start/deploy.md +2 -2
  95. package/dist/skill/docs/start/first-api.md +1 -1
  96. package/dist/skill/docs/start/hand-crafted.md +3 -3
  97. package/dist/skill/docs/start/index.md +3 -3
  98. package/dist/skill/docs/start/quickstart.md +3 -3
  99. package/dist/skill/docs/start/template-blog.md +2 -2
  100. package/dist/skill/docs/start/template-cloudflare.md +2 -2
  101. package/dist/skill/docs/start/template-empty.md +1 -1
  102. package/dist/skill/docs/start/templates.md +1 -1
  103. package/dist/skill/docs/tooling/claude-skill.md +1 -1
  104. package/dist/skill/docs/tooling/cli.md +40 -19
  105. package/dist/skill/docs/tooling/cloud-compiler/authentication.md +1 -1
  106. package/dist/skill/docs/tooling/cloud-compiler/endpoints.md +5 -3
  107. package/dist/skill/docs/tooling/cloud-compiler/index.md +1 -1
  108. package/dist/skill/docs/tooling/cloud-compiler/local-compiler.md +2 -2
  109. package/dist/skill/docs/tooling/cloud-compiler/troubleshooting.md +47 -2
  110. package/dist/skill/docs/tooling/output.md +32 -2
  111. package/dist/skill/docs/tooling/troubleshooting.md +1 -1
  112. package/dist/skill/docs/ui/account/environment-variables.md +2 -2
  113. package/dist/skill/docs/ui/account/features/admin.md +1 -1
  114. package/dist/skill/docs/ui/account/features/avatars.md +24 -8
  115. package/dist/skill/docs/ui/account/features/index.md +9 -5
  116. package/dist/skill/docs/ui/account/features/organizations.md +3 -2
  117. package/dist/skill/docs/ui/account/index.md +3 -1
  118. package/dist/skill/docs/ui/account/with-quickback.md +1 -1
  119. package/dist/skill/docs/ui/admin/actions.md +97 -3
  120. package/dist/skill/docs/ui/admin/components.md +4 -6
  121. package/dist/skill/docs/ui/admin/connecting.md +15 -3
  122. package/dist/skill/docs/ui/admin/index.md +71 -6
  123. package/dist/skill/docs/ui/admin/inline-editing.md +38 -4
  124. package/dist/skill/docs/ui/admin/record-layouts.md +22 -21
  125. package/dist/skill/docs/ui/admin/schema-format.md +39 -2
  126. package/dist/skill/docs/ui/admin/schema-registry.md +107 -7
  127. package/dist/skill/docs/ui/admin/security.md +19 -4
  128. package/dist/skill/docs/ui/admin/table-views.md +59 -12
  129. package/package.json +1 -1
  130. package/src/cursor/quickback.mdc +1 -1
  131. package/src/skill/SKILL.md +6 -6
  132. package/src/skill/docs/api/actions.md +27 -3
  133. package/src/skill/docs/api/batch-operations.md +4 -0
  134. package/src/skill/docs/api/crud.md +64 -0
  135. package/src/skill/docs/api/index.md +1 -1
  136. package/src/skill/docs/api/openapi.md +1 -1
  137. package/src/skill/docs/api/query-params.md +19 -2
  138. package/src/skill/docs/changelog/index.md +33 -1
  139. package/src/skill/docs/configure/agents.md +1 -1
  140. package/src/skill/docs/configure/index.md +8 -3
  141. package/src/skill/docs/configure/providers.md +3 -0
  142. package/src/skill/docs/configure/variables.md +3 -3
  143. package/src/skill/docs/define/access.md +7 -0
  144. package/src/skill/docs/define/actions/defining.md +39 -8
  145. package/src/skill/docs/define/actions/record-and-standalone.md +7 -4
  146. package/src/skill/docs/define/actions/scoped-db.md +46 -16
  147. package/src/skill/docs/define/areas.md +1 -1
  148. package/src/skill/docs/define/diagnostics.md +1 -0
  149. package/src/skill/docs/define/encryption.md +1 -1
  150. package/src/skill/docs/define/feature.md +14 -7
  151. package/src/skill/docs/define/guards.md +34 -3
  152. package/src/skill/docs/define/schema.md +29 -17
  153. package/src/skill/docs/define/security.md +1 -1
  154. package/src/skill/docs/define/transitions.md +35 -4
  155. package/src/skill/docs/define/views.md +33 -0
  156. package/src/skill/docs/index.md +2 -2
  157. package/src/skill/docs/platform/auth/api-keys.md +1 -1
  158. package/src/skill/docs/platform/auth/using-auth.md +37 -0
  159. package/src/skill/docs/platform/database/d1.md +2 -2
  160. package/src/skill/docs/platform/database/neon.md +4 -4
  161. package/src/skill/docs/platform/email/index.md +1 -1
  162. package/src/skill/docs/platform/queues/handlers.md +1 -1
  163. package/src/skill/docs/platform/queues/using-queues.md +1 -1
  164. package/src/skill/docs/platform/schedules/index.md +1 -1
  165. package/src/skill/docs/platform/storage/index.md +3 -3
  166. package/src/skill/docs/platform/storage/r2.md +87 -37
  167. package/src/skill/docs/platform/storage/using-r2.md +99 -19
  168. package/src/skill/docs/platform/webhooks/inbound.md +40 -0
  169. package/src/skill/docs/start/deploy-browser.md +39 -44
  170. package/src/skill/docs/start/deploy-owner-access.md +28 -19
  171. package/src/skill/docs/start/deploy.md +2 -2
  172. package/src/skill/docs/start/first-api.md +1 -1
  173. package/src/skill/docs/start/hand-crafted.md +3 -3
  174. package/src/skill/docs/start/index.md +3 -3
  175. package/src/skill/docs/start/quickstart.md +3 -3
  176. package/src/skill/docs/start/template-blog.md +2 -2
  177. package/src/skill/docs/start/template-cloudflare.md +2 -2
  178. package/src/skill/docs/start/template-empty.md +1 -1
  179. package/src/skill/docs/start/templates.md +1 -1
  180. package/src/skill/docs/tooling/claude-skill.md +1 -1
  181. package/src/skill/docs/tooling/cli.md +40 -19
  182. package/src/skill/docs/tooling/cloud-compiler/authentication.md +1 -1
  183. package/src/skill/docs/tooling/cloud-compiler/endpoints.md +5 -3
  184. package/src/skill/docs/tooling/cloud-compiler/index.md +1 -1
  185. package/src/skill/docs/tooling/cloud-compiler/local-compiler.md +2 -2
  186. package/src/skill/docs/tooling/cloud-compiler/troubleshooting.md +47 -2
  187. package/src/skill/docs/tooling/output.md +32 -2
  188. package/src/skill/docs/tooling/troubleshooting.md +1 -1
  189. package/src/skill/docs/ui/account/environment-variables.md +2 -2
  190. package/src/skill/docs/ui/account/features/admin.md +1 -1
  191. package/src/skill/docs/ui/account/features/avatars.md +24 -8
  192. package/src/skill/docs/ui/account/features/index.md +9 -5
  193. package/src/skill/docs/ui/account/features/organizations.md +3 -2
  194. package/src/skill/docs/ui/account/index.md +3 -1
  195. package/src/skill/docs/ui/account/with-quickback.md +1 -1
  196. package/src/skill/docs/ui/admin/actions.md +97 -3
  197. package/src/skill/docs/ui/admin/components.md +4 -6
  198. package/src/skill/docs/ui/admin/connecting.md +15 -3
  199. package/src/skill/docs/ui/admin/index.md +71 -6
  200. package/src/skill/docs/ui/admin/inline-editing.md +38 -4
  201. package/src/skill/docs/ui/admin/record-layouts.md +22 -21
  202. package/src/skill/docs/ui/admin/schema-format.md +39 -2
  203. package/src/skill/docs/ui/admin/schema-registry.md +107 -7
  204. package/src/skill/docs/ui/admin/security.md +19 -4
  205. package/src/skill/docs/ui/admin/table-views.md +59 -12
@@ -9,7 +9,7 @@ Table mode is the default browse experience:
9
9
  - **Click rows** to navigate to the record detail view
10
10
  - **Row action menus** (three-dot icon) with view, edit, delete, and custom actions
11
11
  - **Column headers** are sortable — click to toggle ascending/descending
12
- - **Search bar** for full-text search across all fields
12
+ - **Search bar** for full-text search across fields allowed by the active collection or named-view query contract
13
13
  - **Responsive columns** that adapt to available space
14
14
 
15
15
  Each row shows the most relevant columns for the table. Foreign key columns display human-readable labels (resolved via `_label` fields) instead of raw UUIDs. Boolean columns render as colored Yes/No badges. Enum columns use color-coded pills.
@@ -74,10 +74,22 @@ Views are named column projections defined in your table's resource config. They
74
74
 
75
75
  ### Toolbar
76
76
 
77
- The toolbar shows a view dropdown when the table has views defined. Options include:
77
+ The toolbar shows a view dropdown when the table has named views. Its options
78
+ are the named views the current role may access.
78
79
 
79
- - **All Fields** — Shows all columns (default)
80
- - Custom views — Only show the columns specified in the view config
80
+ For a table with no named views, the toolbar renders no view control and the
81
+ table uses its ordinary collection projection. Declaring any `read.views`
82
+ replaces that projection with the named-view contract; **All Fields** is not an
83
+ extra option alongside the named views. Set `read.defaultView` to choose which
84
+ named projection opens first in the CMS. The schema registry carries that
85
+ selection as `defaultView`, and the CMS calls the named-view route from its
86
+ first request.
87
+
88
+ If named views exist without `read.defaultView`, the registry emits
89
+ `requiresExplicitView: true`. The CMS shows **Choose a view** and makes no data
90
+ request until the user selects an accessible named view. It never silently
91
+ chooses the first accessible projection, because projection choice is part of
92
+ the table's data/access contract.
81
93
 
82
94
  Views are filtered by role access. If a view's access rules require `admin` and the current user is a `member`, that view won't appear in the dropdown.
83
95
 
@@ -87,24 +99,49 @@ Given this definition:
87
99
 
88
100
  ```typescript
89
101
  read: {
102
+ defaultView: 'summary',
90
103
  views: {
91
104
  summary: {
92
105
  fields: ['id', 'name', 'status'],
93
- access: { roles: ['member', 'admin'] },
106
+ access: { roles: ['member+'] },
94
107
  },
95
108
  full: {
96
109
  fields: ['id', 'name', 'status', 'ssn', 'internalNotes'],
97
- access: { roles: ['admin'] },
110
+ access: { roles: ['admin+'] },
98
111
  },
99
112
  },
100
113
  }
101
114
  ```
102
115
 
103
- - Members see: "All Fields" and "summary"
104
- - Admins see: "All Fields", "summary", and "full"
105
- - Owners see: "All Fields", "summary", and "full"
116
+ - Members see `summary`, which opens by default.
117
+ - Admins and owners see `summary` and `full`; `summary` still opens by default.
118
+
119
+ When a view is selected, the CMS calls
120
+ `GET /api/v1/<table>/views/<name>`, fetching only the projected columns. With
121
+ named views but no `read.defaultView`, bare `GET /api/v1/<table>` returns
122
+ `400 VIEW_REQUIRED`. That can be intentional for API callers that must choose a
123
+ projection, but a CMS table intended to open directly should declare an
124
+ accessible default view.
125
+
126
+ ### Views Used by FK Lookups
106
127
 
107
- When a view is selected, the CMS calls the `listView` API endpoint instead of the standard `list`, fetching only the projected columns.
128
+ When this table is the target of an FK selector, a table with no named views
129
+ uses its ordinary collection route. A table with named views is different: the
130
+ CMS lookup uses only the authored `read.defaultView`, verifies that the current
131
+ role may access it, and calls its named-view route. It never retries the bare
132
+ collection endpoint and never chooses another named view automatically.
133
+
134
+ Make that default view lookup-safe by including the table's primary key and
135
+ `displayColumn` in `fields`. For searchable label typeahead, include the
136
+ `displayColumn` in the view's effective `query.searchable` allowlist. An
137
+ explicit named-view allowlist is authoritative, so the column does not also
138
+ need `.searchable()`. The schema registry emits the effective inherited view
139
+ access and searchability so the CMS can decide before requesting data.
140
+
141
+ If the default is missing, inaccessible, or omits the primary key/label, the
142
+ selector is disabled with an actionable message. If the default is otherwise
143
+ valid but its effective searchable list is empty, the selector shows the first
144
+ 50 options as a chooser, keeps search read-only, and sends no `?search`.
108
145
 
109
146
  ## Default Sort
110
147
 
@@ -121,6 +158,10 @@ export default defineTable(podcastEpisodes, {
121
158
 
122
159
  When the CMS loads the table, it applies this sort automatically. Users can still click column headers to change the sort — `defaultSort` only sets the initial state.
123
160
 
161
+ `defaultSort` does not select a named view. Adding or changing it cannot resolve
162
+ `VIEW_REQUIRED`; use `read.defaultView` (or call the explicit named-view route)
163
+ for that.
164
+
124
165
  ## Pagination
125
166
 
126
167
  The bottom of every table view shows pagination controls:
@@ -133,9 +174,15 @@ The default page size is 25 records. The CMS resets to page 1 when you change th
133
174
 
134
175
  ## Search
135
176
 
136
- The search bar performs full-text search across all columns. Type a query and the CMS debounces the request, then fetches matching records from the API.
177
+ The search bar performs full-text search across the fields allowed by the
178
+ active collection or named-view query contract. Type a query and the CMS
179
+ debounces the request, then fetches matching records from the API. For named
180
+ views, the registry's effective `query.searchable` list tells the CMS whether
181
+ the route accepts `?search` and which projected fields participate.
137
182
 
138
- Search works in both Table and Data Table modes, and works with views (searching within the projected columns).
183
+ Search works in both Table and Data Table modes when the active route supports
184
+ it. For FK selectors, an empty named-default-view search allowlist activates
185
+ the first-50 chooser behavior above, which sends no `?search`.
139
186
 
140
187
  ## Next Steps
141
188