@quickback-dev/cli 0.66.12 → 0.66.14
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/index.js +1 -1
- package/dist/lib/action-harvest.d.ts.map +1 -1
- package/dist/lib/action-harvest.js +29 -0
- package/dist/lib/action-harvest.js.map +1 -1
- package/dist/lib/action-harvest.test.js +46 -1
- package/dist/lib/action-harvest.test.js.map +1 -1
- package/dist/lib/migrations/command-runner.d.ts +2 -0
- package/dist/lib/migrations/command-runner.d.ts.map +1 -1
- package/dist/lib/migrations/command-runner.js +15 -6
- package/dist/lib/migrations/command-runner.js.map +1 -1
- package/dist/lib/migrations/command-runner.test.d.ts +2 -0
- package/dist/lib/migrations/command-runner.test.d.ts.map +1 -0
- package/dist/lib/migrations/command-runner.test.js +19 -0
- package/dist/lib/migrations/command-runner.test.js.map +1 -0
- package/dist/lib/migrations/drizzle-wrapper.d.ts.map +1 -1
- package/dist/lib/migrations/drizzle-wrapper.js +8 -1
- package/dist/lib/migrations/drizzle-wrapper.js.map +1 -1
- package/dist/lib/migrations/executor.js +2 -5
- package/dist/lib/migrations/executor.js.map +1 -1
- package/dist/lib/migrations/executor.test.js +1 -1
- package/dist/lib/migrations/executor.test.js.map +1 -1
- package/dist/lib/migrations/headless-generate.test.d.ts +2 -0
- package/dist/lib/migrations/headless-generate.test.d.ts.map +1 -0
- package/dist/lib/migrations/headless-generate.test.js +167 -0
- package/dist/lib/migrations/headless-generate.test.js.map +1 -0
- package/dist/lib/migrations/prompt-runner.js +18 -4
- package/dist/lib/migrations/prompt-runner.js.map +1 -1
- package/dist/lib/migrations/prompt-runner.test.js +3 -6
- package/dist/lib/migrations/prompt-runner.test.js.map +1 -1
- package/dist/lib/migrations/types.d.ts +1 -0
- package/dist/lib/migrations/types.d.ts.map +1 -1
- package/dist/skill/docs/configure/index.md +1 -1
- package/dist/skill/docs/define/bundles.md +6 -0
- package/dist/skill/docs/index.md +3 -3
- package/dist/skill/docs/platform/database/neon.md +14 -0
- package/dist/skill/docs/platform/database/planetscale-postgres.md +13 -0
- package/dist/skill/docs/platform/index.md +1 -1
- package/dist/skill/docs/start/index.md +2 -2
- package/dist/skill/docs/tooling/cloud-compiler/troubleshooting.md +11 -0
- package/dist/skill/docs/tooling/troubleshooting.md +4 -1
- package/package.json +4 -2
- package/src/skill/docs/configure/index.md +1 -1
- package/src/skill/docs/define/bundles.md +6 -0
- package/src/skill/docs/index.md +3 -3
- package/src/skill/docs/platform/database/neon.md +14 -0
- package/src/skill/docs/platform/database/planetscale-postgres.md +13 -0
- package/src/skill/docs/platform/index.md +1 -1
- package/src/skill/docs/start/index.md +2 -2
- package/src/skill/docs/tooling/cloud-compiler/troubleshooting.md +11 -0
- package/src/skill/docs/tooling/troubleshooting.md +4 -1
package/src/skill/docs/index.md
CHANGED
|
@@ -26,8 +26,8 @@ Write ~50 lines of definitions. Get a production codebase.
|
|
|
26
26
|
|
|
27
27
|
```
|
|
28
28
|
defineTable() ─┐
|
|
29
|
-
├─► Compiler ─► Hono API (
|
|
30
|
-
defineAction() ─┘ └► RLS policies (
|
|
29
|
+
├─► Compiler ─► Hono API (D1 / Neon / PlanetScale)
|
|
30
|
+
defineAction() ─┘ └► RLS policies (Postgres)
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Every API request passes through four security layers:
|
|
@@ -51,7 +51,7 @@ Request → Firewall → Access → Guards → Masking → Response
|
|
|
51
51
|
|
|
52
52
|
[**Quickback Compiler**](/start) — the build tool. Define your schema and security rules in TypeScript and compile to a complete Hono application on Cloudflare:
|
|
53
53
|
|
|
54
|
-
- **[Quickback for Hono API](/api)** — A complete Hono application on Cloudflare D1 or Neon, with CRUD, batch endpoints, OpenAPI, and an MCP server.
|
|
54
|
+
- **[Quickback for Hono API](/api)** — A complete Hono application on Cloudflare D1 or Postgres (Neon or PlanetScale), with CRUD, batch endpoints, OpenAPI, and an MCP server.
|
|
55
55
|
|
|
56
56
|
**Start here:**
|
|
57
57
|
- **[Getting Started](/start/quickstart)** — Create your first project
|
|
@@ -27,6 +27,20 @@ comes exclusively from `env.HYPERDRIVE.connectionString`: feature queries and
|
|
|
27
27
|
Better Auth share the generated database helpers. `DATABASE_URL` is then a
|
|
28
28
|
compiler/migration input, not a deployed Worker secret.
|
|
29
29
|
|
|
30
|
+
### Where the tables go
|
|
31
|
+
|
|
32
|
+
One Neon **project** hosts one app, and that app uses the project's existing
|
|
33
|
+
database (`neondb` by default). Quickback's migrations create *schemas* inside
|
|
34
|
+
it — `app` for feature tables, `auth` for Better Auth, plus `webhooks`,
|
|
35
|
+
`audit` and `drizzle` when the project uses them.
|
|
36
|
+
|
|
37
|
+
Do **not** `CREATE DATABASE` per app inside a project. Postgres roles are
|
|
38
|
+
cluster-wide but grants, ownership and the migration ledger are per-database,
|
|
39
|
+
so an extra database silently splits the bootstrap: the roles look right in
|
|
40
|
+
`pg_roles` while the grants live somewhere the Worker never connects to. Point
|
|
41
|
+
`DATABASE_URL` at the project's own database and let the schemas do the
|
|
42
|
+
separating. Two apps means two Neon projects, not two databases.
|
|
43
|
+
|
|
30
44
|
Mixing providers — for example D1 for auth with Neon for features — is not
|
|
31
45
|
supported. The per-service config form is rejected at compile time:
|
|
32
46
|
|
|
@@ -48,6 +48,19 @@ compile time, as is any runtime other than `cloudflare`.
|
|
|
48
48
|
`planetscale` — without the suffix — remains the MySQL provider name and is not
|
|
49
49
|
registered. Only `planetscale-postgres` selects this provider.
|
|
50
50
|
|
|
51
|
+
## Where the tables go
|
|
52
|
+
|
|
53
|
+
One PlanetScale **branch** hosts one app, and that app uses the branch's own
|
|
54
|
+
database. Quickback's migrations create *schemas* inside it — `app` for feature
|
|
55
|
+
tables, `auth` for Better Auth, plus `webhooks`, `audit` and `drizzle` when the
|
|
56
|
+
project uses them.
|
|
57
|
+
|
|
58
|
+
Do **not** `CREATE DATABASE` per app inside a branch. Roles are cluster-wide but
|
|
59
|
+
grants, ownership and the migration ledger are per-database, so an extra
|
|
60
|
+
database silently splits the bootstrap. Point the Hyperdrive config's
|
|
61
|
+
`<database>` at the branch's own database and let the schemas do the
|
|
62
|
+
separating. The same rule holds on [Neon](/platform/database/neon#where-the-tables-go).
|
|
63
|
+
|
|
51
64
|
## Roles: three SQL roles, one deployed
|
|
52
65
|
|
|
53
66
|
The first generated migration creates the same three roles it creates on Neon:
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
│ │ │ │ │
|
|
33
33
|
│ ┌──────┴──────┐ ┌──────┴──────┐ ┌──────┴──────┐ │
|
|
34
34
|
│ │ D1 │ │ Realtime │ │ R2 │ │
|
|
35
|
-
│ │ (
|
|
35
|
+
│ │ (Postgres) │ │ (WebSocket)│ │ (Storage) │ │
|
|
36
36
|
│ └─────────────┘ └─────────────┘ └─────────────┘ │
|
|
37
37
|
│ │
|
|
38
38
|
│ ┌─────────────┐ ┌─────────────────────────────────┐ │
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
You write declarative definitions in TypeScript — schema, security rules, validation,
|
|
4
4
|
custom actions — and **the compiler** emits a production Hono application running on
|
|
5
|
-
Cloudflare Workers, backed by D1 or Neon.
|
|
5
|
+
Cloudflare Workers, backed by D1 or Postgres (Neon or PlanetScale).
|
|
6
6
|
|
|
7
7
|
```
|
|
8
8
|
feature() ─┐
|
|
9
9
|
├─► quickback build ─► Hono API on Cloudflare
|
|
10
|
-
defineAction() ─┘
|
|
10
|
+
defineAction() ─┘ (D1 / Neon / PlanetScale)
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
When you run `quickback build`, it:
|
|
@@ -49,6 +49,11 @@ npx @quickback-dev/cli create cloudflare my-app
|
|
|
49
49
|
|
|
50
50
|
## Drizzle rename prompts in CI/headless compile
|
|
51
51
|
|
|
52
|
+
Run `quickback build` with the updated Quickback CLI. SQLite migration targets
|
|
53
|
+
automatically select **create** for new tables and columns when their migration
|
|
54
|
+
plan enables auto-create; explicit rename hints take precedence. The CLI handles
|
|
55
|
+
repeated prompts without user input. PostgreSQL targets require rename hints.
|
|
56
|
+
|
|
52
57
|
If compilation fails with an interactive Drizzle message like:
|
|
53
58
|
|
|
54
59
|
- `drizzle-kit requested interactive rename input, but Quickback compile is running headless`
|
|
@@ -83,6 +88,12 @@ If a hint is missing, compile now fails loudly with the exact key path to add, f
|
|
|
83
88
|
- `Expected hint key: compiler.migrations.renames.tables["events_v2"]`
|
|
84
89
|
- `Expected hint key: compiler.migrations.renames.columns["events"]["summary_text"]`
|
|
85
90
|
|
|
91
|
+
If the CLI already selected **create** but generation still failed, inspect the
|
|
92
|
+
end of the reported Drizzle output for the unfinished prompt or process error.
|
|
93
|
+
A failed generate or postprocessor leaves existing migration history untouched.
|
|
94
|
+
Do not use raw `drizzle-kit generate` as an equivalent workaround for an auth
|
|
95
|
+
upgrade: it skips Quickback's OAuth client backfills and resource-grant cleanup.
|
|
96
|
+
|
|
86
97
|
## `Critical command failed: Generate features database migrations`
|
|
87
98
|
|
|
88
99
|
drizzle-kit could not load the generated **features** schema. The usual cause on
|
|
@@ -92,7 +92,10 @@ To clean up, you'd need to manually create a migration.
|
|
|
92
92
|
|
|
93
93
|
### Drizzle rename prompts in CI
|
|
94
94
|
|
|
95
|
-
|
|
95
|
+
Use the updated Quickback CLI for automatic SQLite create prompts. For an
|
|
96
|
+
actual rename, add explicit rename hints in your config. If generation fails
|
|
97
|
+
after the CLI answered a prompt, inspect the final Drizzle output in the error.
|
|
98
|
+
See [Drizzle rename prompts](/tooling/cloud-compiler/troubleshooting#drizzle-rename-prompts-in-ciheadless-compile).
|
|
96
99
|
|
|
97
100
|
### Cloudflare D1 destructive migrations
|
|
98
101
|
|