@quickback-dev/cli 0.66.24 → 0.66.25
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/cursor/quickback.mdc +6 -0
- package/dist/index.js +1 -1
- package/dist/skill/SKILL.md +6 -0
- package/dist/skill/docs/define/authz-roles.md +2 -1
- package/dist/skill/docs/platform/auth/plugins/subscriptions.md +4 -2
- package/dist/skill/docs/tooling/output.md +19 -0
- package/package.json +1 -1
- package/src/cursor/quickback.mdc +6 -0
- package/src/skill/SKILL.md +6 -0
- package/src/skill/docs/define/authz-roles.md +2 -1
- package/src/skill/docs/platform/auth/plugins/subscriptions.md +4 -2
- package/src/skill/docs/tooling/output.md +19 -0
|
@@ -283,6 +283,12 @@ quickback claude install # Install Claude Code skill
|
|
|
283
283
|
quickback cursor install # Install Cursor rules
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
+
Never hand-edit or hand-merge anything under `quickback/drizzle/` — it is generated,
|
|
287
|
+
append-only history. If two branches both added a migration, take the target branch's
|
|
288
|
+
`quickback/drizzle/`, drop your branch's never-applied migrations, run `quickback build`
|
|
289
|
+
to regenerate them on top, then `quickback migrations doctor`. See
|
|
290
|
+
https://docs.quickback.dev/tooling/output#merging-branches-that-both-added-migrations
|
|
291
|
+
|
|
286
292
|
## Full Documentation
|
|
287
293
|
|
|
288
294
|
https://docs.quickback.dev
|
package/dist/index.js
CHANGED
package/dist/skill/SKILL.md
CHANGED
|
@@ -108,6 +108,12 @@ compatible with the prod schema across the apply→deploy window. **Caveat:** if
|
|
|
108
108
|
and regenerates full `CREATE TABLE`s — which then collide with the live DB. Keep the
|
|
109
109
|
meta in git.
|
|
110
110
|
|
|
111
|
+
**Never hand-edit or hand-merge anything under `quickback/drizzle/`.** If two
|
|
112
|
+
branches both added a migration, take the target branch's `quickback/drizzle/`,
|
|
113
|
+
drop your branch's never-applied migrations, `quickback build` to regenerate
|
|
114
|
+
them on top, then `quickback migrations doctor`. See
|
|
115
|
+
[Output Structure](https://docs.quickback.dev/tooling/output#merging-branches-that-both-added-migrations).
|
|
116
|
+
|
|
111
117
|
---
|
|
112
118
|
|
|
113
119
|
## Tenancy is not yours to model
|
|
@@ -64,11 +64,12 @@ export default defineAction({
|
|
|
64
64
|
|
|
65
65
|
### Rule shapes
|
|
66
66
|
|
|
67
|
-
Each entry in `authz.roles` is one of
|
|
67
|
+
Each entry in `authz.roles` is one of five shapes:
|
|
68
68
|
|
|
69
69
|
| Shape | Meaning |
|
|
70
70
|
|---|---|
|
|
71
71
|
| `{ roles: ['admin', 'member'] }` | Composition — matches any of the listed roles (BA, pseudo, or other named rules) |
|
|
72
|
+
| `{ userRole: ['appmanager', 'sysadmin'] }` | Platform role — the caller's user-table role, same semantics as `access.userRole` on a resource. Lets "paid subscribers **or** operators" be written once: `paid: { or: [{ roles: ['tier_pro'] }, { userRole: ['appmanager', 'sysadmin'] }] }` |
|
|
72
73
|
| `{ or: [ruleA, ruleB] }` | Matches if **any** sub-rule matches |
|
|
73
74
|
| `{ and: [ruleA, ruleB] }` | Matches only if **all** sub-rules match |
|
|
74
75
|
| `{ via: 'relationshipName' }` | Caller proves a declared relationship — see [Relationship-based authorization](#relationship-based-authorization) below |
|
|
@@ -91,12 +91,14 @@ All mounted under your auth base path (`/auth/v1` by default).
|
|
|
91
91
|
| `POST` | `/subscriptions/checkout` | Authenticated — creates a Stripe Checkout Session |
|
|
92
92
|
| `POST` | `/subscriptions/portal` | Authenticated — creates a Stripe billing-portal session |
|
|
93
93
|
| `GET` | `/subscriptions` | Admin, or org-scoped with `?organizationId=` |
|
|
94
|
-
| `POST` | `/subscriptions` | Admin |
|
|
95
|
-
| `POST` | `/subscriptions/update` | Admin — takes `{ id, ... }` in the body |
|
|
94
|
+
| `POST` | `/subscriptions` | Admin — `{ userId, tier, organizationId?, status?, limits?, expiresAt?, startsAt? }` |
|
|
95
|
+
| `POST` | `/subscriptions/update` | Admin — takes `{ id, ... }` in the body; any of `tier`, `status`, `limits`, `expiresAt`, `startsAt` |
|
|
96
96
|
| `POST` | `/subscriptions/delete` | Admin — soft delete, takes `{ id }` in the body |
|
|
97
97
|
|
|
98
98
|
The two admin mutations are `POST` with the id in the **body**, not `PATCH`/`DELETE` on `/subscriptions/:id`. That matches the rest of the Better Auth surface, which is POST-with-body throughout; the generated OpenAPI describes them the same way.
|
|
99
99
|
|
|
100
|
+
`expiresAt` and `startsAt` take an ISO-8601 string or epoch milliseconds. This is the manual-billing path: a customer who pays by bank transfer gets a row with a paid-through `expiresAt`, and renewal is bumping that date via `/subscriptions/update`. Omit it (or send `null`) for a comp that grants until revoked — the [expiry bound](#expiry-is-the-second-bound) only applies to rows that carry a date. Anything that does not parse to a real instant is a 400, never a silently expired row.
|
|
101
|
+
|
|
100
102
|
`GET /subscriptions/me` returns the base tier with `isDefault: true` when the caller has no subscription row, so clients never have to special-case "not subscribed".
|
|
101
103
|
|
|
102
104
|
Checkout takes the tier name, not a price:
|
|
@@ -577,6 +577,25 @@ if an earlier compiler already rewrote one.
|
|
|
577
577
|
> compiling. Compile does not delete snapshots it was never given.
|
|
578
578
|
|
|
579
579
|
|
|
580
|
+
### Merging branches that both added migrations
|
|
581
|
+
|
|
582
|
+
Everything under `quickback/drizzle/` is generated — never hand-edit a `.sql`
|
|
583
|
+
file or snapshot, and never resolve a merge conflict inside one. When your branch
|
|
584
|
+
and the target branch each added a migration, the numbers collide and
|
|
585
|
+
`meta/_journal.json` conflicts. Resolve it by regenerating, not merging:
|
|
586
|
+
|
|
587
|
+
1. Merge the `quickback/` definitions (features, config) as normal.
|
|
588
|
+
2. Take the target branch's `quickback/drizzle/` as-is, dropping the migrations
|
|
589
|
+
your branch added. The target's history is what deployed databases have.
|
|
590
|
+
3. `quickback build`. Your schema changes are diffed against the target's latest
|
|
591
|
+
snapshot and appended as a fresh migration after it.
|
|
592
|
+
4. `quickback migrations doctor` to confirm the journal and snapshots agree.
|
|
593
|
+
|
|
594
|
+
Only drop migrations that were never applied anywhere. D1 records applied
|
|
595
|
+
migrations by path, so if your branch's migration already ran against a shared
|
|
596
|
+
or preview database, dropping it leaves that database drifted — resolve that
|
|
597
|
+
database before merging.
|
|
598
|
+
|
|
580
599
|
For non-interactive environments (cloud compile, CI), table/column renames must be declared with `compiler.migrations.renames` in `quickback.config.ts`. This avoids interactive rename prompts during migration generation.
|
|
581
600
|
|
|
582
601
|
Migration files follow the Drizzle Kit naming convention:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quickback-dev/cli",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.25",
|
|
4
4
|
"description": "CLI for Quickback — define your backend in TypeScript, compile to a fully wired Cloudflare Worker (or Bun / Node) with auth, database, migrations, security, CMS, and Account UI.",
|
|
5
5
|
"author": "Kardoe Incorporated <paul@kardoe.com>",
|
|
6
6
|
"license": "MIT",
|
package/src/cursor/quickback.mdc
CHANGED
|
@@ -283,6 +283,12 @@ quickback claude install # Install Claude Code skill
|
|
|
283
283
|
quickback cursor install # Install Cursor rules
|
|
284
284
|
```
|
|
285
285
|
|
|
286
|
+
Never hand-edit or hand-merge anything under `quickback/drizzle/` — it is generated,
|
|
287
|
+
append-only history. If two branches both added a migration, take the target branch's
|
|
288
|
+
`quickback/drizzle/`, drop your branch's never-applied migrations, run `quickback build`
|
|
289
|
+
to regenerate them on top, then `quickback migrations doctor`. See
|
|
290
|
+
https://docs.quickback.dev/tooling/output#merging-branches-that-both-added-migrations
|
|
291
|
+
|
|
286
292
|
## Full Documentation
|
|
287
293
|
|
|
288
294
|
https://docs.quickback.dev
|
package/src/skill/SKILL.md
CHANGED
|
@@ -108,6 +108,12 @@ compatible with the prod schema across the apply→deploy window. **Caveat:** if
|
|
|
108
108
|
and regenerates full `CREATE TABLE`s — which then collide with the live DB. Keep the
|
|
109
109
|
meta in git.
|
|
110
110
|
|
|
111
|
+
**Never hand-edit or hand-merge anything under `quickback/drizzle/`.** If two
|
|
112
|
+
branches both added a migration, take the target branch's `quickback/drizzle/`,
|
|
113
|
+
drop your branch's never-applied migrations, `quickback build` to regenerate
|
|
114
|
+
them on top, then `quickback migrations doctor`. See
|
|
115
|
+
[Output Structure](https://docs.quickback.dev/tooling/output#merging-branches-that-both-added-migrations).
|
|
116
|
+
|
|
111
117
|
---
|
|
112
118
|
|
|
113
119
|
## Tenancy is not yours to model
|
|
@@ -64,11 +64,12 @@ export default defineAction({
|
|
|
64
64
|
|
|
65
65
|
### Rule shapes
|
|
66
66
|
|
|
67
|
-
Each entry in `authz.roles` is one of
|
|
67
|
+
Each entry in `authz.roles` is one of five shapes:
|
|
68
68
|
|
|
69
69
|
| Shape | Meaning |
|
|
70
70
|
|---|---|
|
|
71
71
|
| `{ roles: ['admin', 'member'] }` | Composition — matches any of the listed roles (BA, pseudo, or other named rules) |
|
|
72
|
+
| `{ userRole: ['appmanager', 'sysadmin'] }` | Platform role — the caller's user-table role, same semantics as `access.userRole` on a resource. Lets "paid subscribers **or** operators" be written once: `paid: { or: [{ roles: ['tier_pro'] }, { userRole: ['appmanager', 'sysadmin'] }] }` |
|
|
72
73
|
| `{ or: [ruleA, ruleB] }` | Matches if **any** sub-rule matches |
|
|
73
74
|
| `{ and: [ruleA, ruleB] }` | Matches only if **all** sub-rules match |
|
|
74
75
|
| `{ via: 'relationshipName' }` | Caller proves a declared relationship — see [Relationship-based authorization](#relationship-based-authorization) below |
|
|
@@ -91,12 +91,14 @@ All mounted under your auth base path (`/auth/v1` by default).
|
|
|
91
91
|
| `POST` | `/subscriptions/checkout` | Authenticated — creates a Stripe Checkout Session |
|
|
92
92
|
| `POST` | `/subscriptions/portal` | Authenticated — creates a Stripe billing-portal session |
|
|
93
93
|
| `GET` | `/subscriptions` | Admin, or org-scoped with `?organizationId=` |
|
|
94
|
-
| `POST` | `/subscriptions` | Admin |
|
|
95
|
-
| `POST` | `/subscriptions/update` | Admin — takes `{ id, ... }` in the body |
|
|
94
|
+
| `POST` | `/subscriptions` | Admin — `{ userId, tier, organizationId?, status?, limits?, expiresAt?, startsAt? }` |
|
|
95
|
+
| `POST` | `/subscriptions/update` | Admin — takes `{ id, ... }` in the body; any of `tier`, `status`, `limits`, `expiresAt`, `startsAt` |
|
|
96
96
|
| `POST` | `/subscriptions/delete` | Admin — soft delete, takes `{ id }` in the body |
|
|
97
97
|
|
|
98
98
|
The two admin mutations are `POST` with the id in the **body**, not `PATCH`/`DELETE` on `/subscriptions/:id`. That matches the rest of the Better Auth surface, which is POST-with-body throughout; the generated OpenAPI describes them the same way.
|
|
99
99
|
|
|
100
|
+
`expiresAt` and `startsAt` take an ISO-8601 string or epoch milliseconds. This is the manual-billing path: a customer who pays by bank transfer gets a row with a paid-through `expiresAt`, and renewal is bumping that date via `/subscriptions/update`. Omit it (or send `null`) for a comp that grants until revoked — the [expiry bound](#expiry-is-the-second-bound) only applies to rows that carry a date. Anything that does not parse to a real instant is a 400, never a silently expired row.
|
|
101
|
+
|
|
100
102
|
`GET /subscriptions/me` returns the base tier with `isDefault: true` when the caller has no subscription row, so clients never have to special-case "not subscribed".
|
|
101
103
|
|
|
102
104
|
Checkout takes the tier name, not a price:
|
|
@@ -577,6 +577,25 @@ if an earlier compiler already rewrote one.
|
|
|
577
577
|
> compiling. Compile does not delete snapshots it was never given.
|
|
578
578
|
|
|
579
579
|
|
|
580
|
+
### Merging branches that both added migrations
|
|
581
|
+
|
|
582
|
+
Everything under `quickback/drizzle/` is generated — never hand-edit a `.sql`
|
|
583
|
+
file or snapshot, and never resolve a merge conflict inside one. When your branch
|
|
584
|
+
and the target branch each added a migration, the numbers collide and
|
|
585
|
+
`meta/_journal.json` conflicts. Resolve it by regenerating, not merging:
|
|
586
|
+
|
|
587
|
+
1. Merge the `quickback/` definitions (features, config) as normal.
|
|
588
|
+
2. Take the target branch's `quickback/drizzle/` as-is, dropping the migrations
|
|
589
|
+
your branch added. The target's history is what deployed databases have.
|
|
590
|
+
3. `quickback build`. Your schema changes are diffed against the target's latest
|
|
591
|
+
snapshot and appended as a fresh migration after it.
|
|
592
|
+
4. `quickback migrations doctor` to confirm the journal and snapshots agree.
|
|
593
|
+
|
|
594
|
+
Only drop migrations that were never applied anywhere. D1 records applied
|
|
595
|
+
migrations by path, so if your branch's migration already ran against a shared
|
|
596
|
+
or preview database, dropping it leaves that database drifted — resolve that
|
|
597
|
+
database before merging.
|
|
598
|
+
|
|
580
599
|
For non-interactive environments (cloud compile, CI), table/column renames must be declared with `compiler.migrations.renames` in `quickback.config.ts`. This avoids interactive rename prompts during migration generation.
|
|
581
600
|
|
|
582
601
|
Migration files follow the Drizzle Kit naming convention:
|