@quickback-dev/cli 0.60.0 → 0.60.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/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +42 -14
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/cursor.d.ts.map +1 -1
- package/dist/commands/cursor.js +6 -7
- package/dist/commands/cursor.js.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +1 -9
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +3 -1
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +3 -1
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/migrations.d.ts.map +1 -1
- package/dist/commands/migrations.js +1 -9
- package/dist/commands/migrations.js.map +1 -1
- package/dist/docs/index.d.ts +25 -0
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +70 -0
- package/dist/docs/index.js.map +1 -0
- package/dist/docs/index.test.d.ts +2 -0
- package/dist/docs/index.test.d.ts.map +1 -0
- package/dist/docs/index.test.js +51 -0
- package/dist/docs/index.test.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/lib/api-client.d.ts +15 -0
- package/dist/lib/api-client.d.ts.map +1 -1
- package/dist/lib/api-client.js.map +1 -1
- package/dist/lib/auth.d.ts +0 -4
- package/dist/lib/auth.d.ts.map +1 -1
- package/dist/lib/auth.js +0 -16
- package/dist/lib/auth.js.map +1 -1
- package/dist/lib/compiler-stubs.d.ts +22 -67
- package/dist/lib/compiler-stubs.d.ts.map +1 -1
- package/dist/lib/compiler-stubs.js +35 -100
- package/dist/lib/compiler-stubs.js.map +1 -1
- package/dist/lib/copy-passthrough.d.ts +43 -0
- package/dist/lib/copy-passthrough.d.ts.map +1 -0
- package/dist/lib/copy-passthrough.js +118 -0
- package/dist/lib/copy-passthrough.js.map +1 -0
- package/dist/lib/copy-public-assets.d.ts +19 -22
- package/dist/lib/copy-public-assets.d.ts.map +1 -1
- package/dist/lib/copy-public-assets.js +20 -99
- package/dist/lib/copy-public-assets.js.map +1 -1
- package/dist/lib/copy-source-apps.d.ts +22 -20
- package/dist/lib/copy-source-apps.d.ts.map +1 -1
- package/dist/lib/copy-source-apps.js +21 -105
- package/dist/lib/copy-source-apps.js.map +1 -1
- package/dist/lib/file-writer.d.ts +0 -5
- package/dist/lib/file-writer.d.ts.map +1 -1
- package/dist/lib/file-writer.js +0 -17
- package/dist/lib/file-writer.js.map +1 -1
- package/dist/lib/prepare-output.d.ts.map +1 -1
- package/dist/lib/prepare-output.js +1 -9
- package/dist/lib/prepare-output.js.map +1 -1
- package/dist/skill/docs/changelog/index.md +49 -3
- package/dist/skill/docs/configure/index.md +3 -0
- package/dist/skill/docs/platform/database/d1.md +98 -0
- package/dist/skill/docs/platform/database/neon.md +14 -7
- package/dist/skill/docs/start/deploy-browser.md +35 -1
- package/dist/skill/docs/tooling/output.md +36 -0
- package/dist/templates/registry.d.ts +0 -5
- package/dist/templates/registry.d.ts.map +1 -1
- package/dist/templates/registry.js +0 -21
- package/dist/templates/registry.js.map +1 -1
- package/package.json +2 -3
- package/src/skill/docs/changelog/index.md +49 -3
- package/src/skill/docs/configure/index.md +3 -0
- package/src/skill/docs/platform/database/d1.md +98 -0
- package/src/skill/docs/platform/database/neon.md +14 -7
- package/src/skill/docs/start/deploy-browser.md +35 -1
- package/src/skill/docs/tooling/output.md +36 -0
- package/dist/docs/content.d.ts +0 -7
- package/dist/docs/content.d.ts.map +0 -1
- package/dist/docs/content.js +0 -737
- package/dist/docs/content.js.map +0 -1
- package/dist/lib/helpers.d.ts +0 -39
- package/dist/lib/helpers.d.ts.map +0 -1
- package/dist/lib/helpers.js +0 -299
- package/dist/lib/helpers.js.map +0 -1
|
@@ -7,10 +7,7 @@ export const TEMPLATE_REGISTRY = {
|
|
|
7
7
|
"betterauth-d1-cloudflare": {
|
|
8
8
|
name: "Better Auth + D1 + Cloudflare",
|
|
9
9
|
description: "Authentication with Better Auth, D1 database, deployed to Cloudflare Workers — bare scaffold, add your own features",
|
|
10
|
-
category: "auth",
|
|
11
10
|
tags: ["auth", "cloudflare", "d1", "hono"],
|
|
12
|
-
author: "quickback",
|
|
13
|
-
version: "1.0.0",
|
|
14
11
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
15
12
|
preset: "cloudflare",
|
|
16
13
|
requiresCloudflare: true,
|
|
@@ -18,10 +15,7 @@ export const TEMPLATE_REGISTRY = {
|
|
|
18
15
|
"todos-cloudflare": {
|
|
19
16
|
name: "Todos Example (Cloudflare)",
|
|
20
17
|
description: "Working todos example — schema with masking, two record-based actions (complete / uncomplete), Better Auth, D1. Read the source as a learning template.",
|
|
21
|
-
category: "api",
|
|
22
18
|
tags: ["example", "todos", "actions", "cloudflare", "d1"],
|
|
23
|
-
author: "quickback",
|
|
24
|
-
version: "1.0.0",
|
|
25
19
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
26
20
|
preset: "cloudflare",
|
|
27
21
|
requiresCloudflare: true,
|
|
@@ -31,10 +25,7 @@ export const TEMPLATE_REGISTRY = {
|
|
|
31
25
|
"b2bsaas-cloudflare": {
|
|
32
26
|
name: "B2B SaaS Starter",
|
|
33
27
|
description: "Full B2B SaaS with auth, organizations, file storage (R2), webhooks, and views",
|
|
34
|
-
category: "saas",
|
|
35
28
|
tags: ["saas", "b2b", "cloudflare", "r2", "webhooks", "teams"],
|
|
36
|
-
author: "quickback",
|
|
37
|
-
version: "1.0.0",
|
|
38
29
|
includes: ["betterauth", "organizations", "d1", "r2", "files", "webhooks", "hono", "drizzle"],
|
|
39
30
|
preset: "cloudflare",
|
|
40
31
|
requiresCloudflare: true,
|
|
@@ -43,10 +34,7 @@ export const TEMPLATE_REGISTRY = {
|
|
|
43
34
|
"blog-cloudflare": {
|
|
44
35
|
name: "Blog / CMS Starter",
|
|
45
36
|
description: "Blog/CMS starter with a pinned organization id, public pages, and admin-only editing on Cloudflare Workers",
|
|
46
|
-
category: "api",
|
|
47
37
|
tags: ["blog", "cms", "pinned-organization", "cloudflare", "d1"],
|
|
48
|
-
author: "quickback",
|
|
49
|
-
version: "1.0.0",
|
|
50
38
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
51
39
|
preset: "blog",
|
|
52
40
|
requiresCloudflare: true,
|
|
@@ -54,10 +42,7 @@ export const TEMPLATE_REGISTRY = {
|
|
|
54
42
|
"empty-cloudflare": {
|
|
55
43
|
name: "Empty Scaffold (Cloudflare)",
|
|
56
44
|
description: "Empty project structure with config only — no example features. Add your own definitions.",
|
|
57
|
-
category: "api",
|
|
58
45
|
tags: ["empty", "scaffold", "cloudflare", "d1"],
|
|
59
|
-
author: "quickback",
|
|
60
|
-
version: "1.0.0",
|
|
61
46
|
includes: ["betterauth", "d1", "hono", "drizzle"],
|
|
62
47
|
preset: "cloudflare",
|
|
63
48
|
requiresCloudflare: true,
|
|
@@ -84,12 +69,6 @@ export function getTemplate(nameOrAlias) {
|
|
|
84
69
|
export function listTemplates() {
|
|
85
70
|
return Object.values(TEMPLATE_REGISTRY);
|
|
86
71
|
}
|
|
87
|
-
export function listTemplateNames() {
|
|
88
|
-
return Object.keys(TEMPLATE_REGISTRY);
|
|
89
|
-
}
|
|
90
|
-
export function listAliases() {
|
|
91
|
-
return TEMPLATE_ALIASES;
|
|
92
|
-
}
|
|
93
72
|
export function formatTemplateList() {
|
|
94
73
|
const lines = ["Available templates:\n"];
|
|
95
74
|
for (const [id, template] of Object.entries(TEMPLATE_REGISTRY)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/templates/registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,MAA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CAAC,CAAC;QAC1C,KAAK,CAAC,IAAI,CAAC,aAAa,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvB,KAAK,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;QAC7D,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,OAAO,MAAM,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quickback-dev/cli",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.2",
|
|
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",
|
|
@@ -42,13 +42,12 @@
|
|
|
42
42
|
"LICENSE"
|
|
43
43
|
],
|
|
44
44
|
"scripts": {
|
|
45
|
-
"prebuild": "npx tsx scripts/inject-version.ts && npm run bundle:
|
|
45
|
+
"prebuild": "npx tsx scripts/inject-version.ts && npm run bundle:skill && npm run bundle:examples",
|
|
46
46
|
"build": "tsc && npm run bundle:schema-engine",
|
|
47
47
|
"postbuild": "npx tsx scripts/bundle-cursor.ts && rm -rf dist/skill dist/examples && cp -r src/skill dist/skill && cp -r src/examples dist/examples",
|
|
48
48
|
"dev": "tsc --watch",
|
|
49
49
|
"test": "bun test",
|
|
50
50
|
"typecheck": "tsc --noEmit",
|
|
51
|
-
"bundle:docs": "npx tsx scripts/bundle-docs.ts",
|
|
52
51
|
"bundle:schema-engine": "node --import tsx scripts/bundle-schema-engine.ts",
|
|
53
52
|
"bundle:skill": "npx tsx scripts/bundle-skill.ts",
|
|
54
53
|
"bundle:cursor": "npx tsx scripts/bundle-cursor.ts",
|
|
@@ -8,6 +8,34 @@ The current release series. Older entries are archived by version range:
|
|
|
8
8
|
- [v0.20 – v0.29](/changelog/v0.2x)
|
|
9
9
|
- [v0.18 and earlier](/changelog/v0.1x)
|
|
10
10
|
|
|
11
|
+
## v0.60.1 — August 3, 2026
|
|
12
|
+
|
|
13
|
+
### Fix: moved files no longer leave orphans behind
|
|
14
|
+
|
|
15
|
+
Upgrading to v0.60 left the old `openapi.json`, `asyncapi.json`, and
|
|
16
|
+
`schema-registry.json` sitting at your project root. The compiler wrote the new
|
|
17
|
+
copies under `src/apps/__quickback/spec/`, but nothing removed the old ones —
|
|
18
|
+
on a real project that was **6.7 MB of stale specs**, still committed, that
|
|
19
|
+
tooling pointed at the old path kept reading in place of the live ones.
|
|
20
|
+
|
|
21
|
+
That is worse than a clean break: a stale spec drifts from your API silently,
|
|
22
|
+
where a missing file fails immediately.
|
|
23
|
+
|
|
24
|
+
The root cause was structural, not a one-off. The compiler's output is a
|
|
25
|
+
manifest of files to **write**, with no way to express "and drop what you wrote
|
|
26
|
+
last time at a path I no longer use." The CLI's pre-write wipe covers `src/`
|
|
27
|
+
only, so any path that relocates outside `src/` leaves an orphan forever.
|
|
28
|
+
|
|
29
|
+
The compiler now also returns **retired paths**, and the CLI deletes them on
|
|
30
|
+
your next compile. See [Retired paths](/tooling/output#retired-paths).
|
|
31
|
+
|
|
32
|
+
Every filter errs toward keeping a file, because a wrong deletion is
|
|
33
|
+
unrecoverable while a missed one is only untidy — a moved path is removed only
|
|
34
|
+
once its replacement is actually emitted, a path the current compile still
|
|
35
|
+
writes is never removed, and nothing may escape the output directory.
|
|
36
|
+
|
|
37
|
+
No action needed: recompile and the stale files go.
|
|
38
|
+
|
|
11
39
|
## v0.60.0 — August 3, 2026
|
|
12
40
|
|
|
13
41
|
### Spec blobs move out of the Worker bundle
|
|
@@ -20,9 +48,23 @@ binding](https://developers.cloudflare.com/workers/static-assets/).
|
|
|
20
48
|
Previously the specs shipped as text imports parsed lazily on first request.
|
|
21
49
|
That kept their object graphs out of the isolate startup window, but the *bytes*
|
|
22
50
|
still sat in the script V8 has to parse on every cold start. On a large API
|
|
23
|
-
that is measured in megabytes
|
|
24
|
-
|
|
25
|
-
|
|
51
|
+
that is measured in megabytes, spent to serve discovery routes most callers
|
|
52
|
+
never request. As assets they leave the bundle entirely.
|
|
53
|
+
|
|
54
|
+
Measured on a 40-feature production API (paired runs, alternating, same
|
|
55
|
+
machine):
|
|
56
|
+
|
|
57
|
+
| | Before | After | |
|
|
58
|
+
|---|---|---|---|
|
|
59
|
+
| Bundle (raw) | 23,610 KiB | 17,218 KiB | **−6,392 KiB (−27%)** |
|
|
60
|
+
| Bundle (gzip) | 3,027 KiB | 2,762 KiB | −266 KiB (−8.8%) |
|
|
61
|
+
| Startup CPU (median) | 258 ms | 232 ms | −26 ms (−10%) |
|
|
62
|
+
| of which GC | 77 ms | 70 ms | −7 ms |
|
|
63
|
+
|
|
64
|
+
The bundle numbers are exact. The CPU figure is a local `wrangler check
|
|
65
|
+
startup` median whose run-to-run ranges overlap, so treat −10% as the shape of
|
|
66
|
+
the win rather than a precise constant — and note it scales with spec size: a
|
|
67
|
+
project with a small spec will see little.
|
|
26
68
|
|
|
27
69
|
Two consequences worth knowing:
|
|
28
70
|
|
|
@@ -48,6 +90,10 @@ structure](/tooling/output#spec-blobs-are-assets-not-bundle).
|
|
|
48
90
|
> `api-types.gen.ts` is **unaffected** — the compiler still generates it at the
|
|
49
91
|
> project root, which is why most projects never invoke `openapi-typescript`
|
|
50
92
|
> directly and need no change at all.
|
|
93
|
+
>
|
|
94
|
+
> On your first compile after upgrading, the CLI deletes the now-orphaned root
|
|
95
|
+
> copies. It only does so for blobs it just re-emitted under the new path, so an
|
|
96
|
+
> older compiler that still writes to the root is never second-guessed.
|
|
51
97
|
|
|
52
98
|
|
|
53
99
|
## v0.59.1 — July 29, 2026
|
|
@@ -107,10 +107,13 @@ Every optional top-level key the config accepts is listed below. You never have
|
|
|
107
107
|
| `agents` | `boolean \| object` | AI/agent discovery surface (`robots.txt`, `llms.txt`, MCP, OAuth discovery) — see [Agents](/configure/agents) |
|
|
108
108
|
| `security` | `object \| false` | HTTP response security headers (CSP, HSTS, COOP/COEP, Referrer/Permissions-Policy) — see [Security Headers](/configure/security) |
|
|
109
109
|
| `openapi` | `object` | OpenAPI spec generation (`generate`, `publish`, `docs: 'scalar' \| 'swagger'`, `types`) — see [OpenAPI](/api/openapi) |
|
|
110
|
+
| `types` | `boolean \| object` | Quickback's first-party TypeScript contract (`output`, `brandIds`) — see [TypeScript](/api/typescript) |
|
|
110
111
|
| `schemaRegistry` | `object` | Schema registry generation for the CMS (`{ generate: false }` to disable) — see [Schema Registry](/ui/admin/schema-registry) |
|
|
111
112
|
| `etag` | `object` | ETag caching for GET responses (`{ enabled: false }` to disable) — see [Caching & ETags](/api/caching) |
|
|
112
113
|
| `email` | `object` | Email delivery config (`provider`, `from`, `fromName`, `region`) — see [Email Configuration](#email-configuration) |
|
|
114
|
+
| `push` | `object` | Web Push (VAPID keys, TTL/urgency defaults, queue fan-out) — see [Push](/platform/push) |
|
|
113
115
|
| `bindings` | `object` | Extra Cloudflare bindings (durable objects, queues, R2, services, `vars`, AI) — see [Bindings](/configure/bindings) |
|
|
116
|
+
| `environments` | `object` | Named deployment targets (`dev`/`staging`/`production`) → one `[env.<name>]` Wrangler stanza each, on Cloudflare D1 or Neon Hyperdrive — see [D1](/platform/database/d1#named-cloudflare-deployment-environments) and [Neon](/platform/database/neon#named-cloudflare-deployment-environments) |
|
|
114
117
|
| `compiler` | `object` | Compiler internals — `features.auditFields: false`, `migrations.renames` (headless CI), Neon `migrations.foreignKeys`, `securityContracts`, `injectId`, `routes` |
|
|
115
118
|
| `build` | `object` | Build options (`outputDir`, `packageManager`, `dependencies`) — see [Custom Dependencies](#custom-dependencies) |
|
|
116
119
|
| `dev` | `object` | Local development settings (`port`, `api`, `cms`, `account`, `hostnames`) — see [Variables](/configure/variables) |
|
|
@@ -140,6 +140,104 @@ wrangler d1 create my-app-files
|
|
|
140
140
|
> `wrangler d1 create` dance only when you need to control provisioning yourself.
|
|
141
141
|
|
|
142
142
|
|
|
143
|
+
## Named Cloudflare deployment environments
|
|
144
|
+
|
|
145
|
+
The bindings above describe a single deploy target. A project that needs
|
|
146
|
+
isolated `dev` / `staging` / `production` Workers — each with its own D1
|
|
147
|
+
databases — declares them under the top-level `environments` block instead of
|
|
148
|
+
hand-maintaining a second `wrangler.dev.toml`:
|
|
149
|
+
|
|
150
|
+
```typescript title="quickback/quickback.config.ts"
|
|
151
|
+
export default defineConfig({
|
|
152
|
+
name: "my-app",
|
|
153
|
+
providers: {
|
|
154
|
+
runtime: defineRuntime("cloudflare"),
|
|
155
|
+
database: defineDatabase("cloudflare-d1", {}),
|
|
156
|
+
auth: defineAuth("better-auth"),
|
|
157
|
+
},
|
|
158
|
+
environments: {
|
|
159
|
+
dev: {
|
|
160
|
+
domain: "api-dev.example.com",
|
|
161
|
+
// `name` is optional — defaults to `${config.name}-${key}` ("my-app-dev")
|
|
162
|
+
worker: {
|
|
163
|
+
env: "dev",
|
|
164
|
+
workersDev: true,
|
|
165
|
+
previewUrls: false,
|
|
166
|
+
vars: { BETTER_AUTH_URL: "https://api-dev.example.com" },
|
|
167
|
+
requiredSecrets: ["BETTER_AUTH_SECRET"],
|
|
168
|
+
bindings: {
|
|
169
|
+
d1: {
|
|
170
|
+
auth: { databaseId: "…", databaseName: "my-app-auth-dev" },
|
|
171
|
+
features: { databaseId: "…", databaseName: "my-app-features-dev" },
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
production: {
|
|
177
|
+
domain: "api.example.com",
|
|
178
|
+
worker: {
|
|
179
|
+
env: "production",
|
|
180
|
+
workersDev: true,
|
|
181
|
+
previewUrls: false,
|
|
182
|
+
vars: { BETTER_AUTH_URL: "https://api.example.com" },
|
|
183
|
+
requiredSecrets: ["BETTER_AUTH_SECRET"],
|
|
184
|
+
bindings: {
|
|
185
|
+
d1: {
|
|
186
|
+
auth: { databaseId: "…", databaseName: "my-app-auth-prod" },
|
|
187
|
+
features: { databaseId: "…", databaseName: "my-app-features-prod" },
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
});
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Each entry emits one `[env.<name>]` stanza. Wrangler does **not** inherit
|
|
197
|
+
bindings or vars into a named environment, so Quickback repeats the full set
|
|
198
|
+
per target: `[[env.<name>.d1_databases]]` for every role the primary config
|
|
199
|
+
declares, plus `vars`, required secrets, KV, rate-limits, Cloudflare Email,
|
|
200
|
+
queue producers/consumers, R2 buckets, and the `[assets]` block. Binding names
|
|
201
|
+
and `migrations_dir` inherit from the primary config so runtime code reads by
|
|
202
|
+
binding name unchanged across environments; only `database_id` (and optionally
|
|
203
|
+
`database_name`) is per-environment.
|
|
204
|
+
|
|
205
|
+
While `environments` is present, the primary top-level binding blocks are
|
|
206
|
+
suppressed and there is no bare `deploy` script — every deployment names its
|
|
207
|
+
target:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npm run deploy:dev # wrangler deploy --env dev
|
|
211
|
+
npm run deploy:production # wrangler deploy --env production
|
|
212
|
+
|
|
213
|
+
npm run db:migrate:dev:auth:remote # wrangler d1 migrations apply my-app-auth-dev --remote
|
|
214
|
+
npm run db:migrate:dev:remote # fan-out over every declared role
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
The contract fails closed:
|
|
218
|
+
|
|
219
|
+
- Better Auth is required, and a logical `dev` target must exist (it is what
|
|
220
|
+
`npm run dev` selects).
|
|
221
|
+
- Every D1 role the primary config declares — `auth`, `features`, plus `audit`
|
|
222
|
+
and `webhooks` when enabled — needs its own `databaseId` per environment.
|
|
223
|
+
A missing role is a compile error, not a Worker that boots without a
|
|
224
|
+
database.
|
|
225
|
+
- The same `database_id` cannot appear in two environments; sharing one would
|
|
226
|
+
race the migration ledger.
|
|
227
|
+
- `requiredSecrets` and `rateLimits` must match the generated runtime
|
|
228
|
+
inventory exactly, so adding a feature tells you which override changed.
|
|
229
|
+
- `workersDev: true` and `previewUrls: false` must be explicit on each target.
|
|
230
|
+
|
|
231
|
+
Set secrets per target: `wrangler secret put BETTER_AUTH_SECRET --env dev`.
|
|
232
|
+
|
|
233
|
+
> `environments` may live at the top level (preferred) or under
|
|
234
|
+
> `providers.database.environments` (the original placement, still accepted).
|
|
235
|
+
> Declaring it in both places is a compile error. The same block powers
|
|
236
|
+
> [Neon Hyperdrive projects](/platform/database/neon#named-cloudflare-deployment-environments),
|
|
237
|
+
> which swap `bindings.d1` for `bindings.hyperdrive` and add a Neon `branch` per
|
|
238
|
+
> target.
|
|
239
|
+
|
|
240
|
+
|
|
143
241
|
## Accessing Data via API
|
|
144
242
|
|
|
145
243
|
All data access in Quickback goes through the generated API endpoints—never direct database queries. This ensures security rules (firewall, access, guards, masking) are always enforced.
|
|
@@ -83,9 +83,15 @@ transactions (see [Interactive transactions](#interactive-transactions)).
|
|
|
83
83
|
## Named Cloudflare deployment environments
|
|
84
84
|
|
|
85
85
|
Neon Hyperdrive projects can declare isolated Worker targets under
|
|
86
|
-
`
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
`environments`. A logical `dev` / `prod` pair on a project named `attend-v2`
|
|
87
|
+
deploys through Wrangler as `attend-v2-dev` and `attend-v2-prod`:
|
|
88
|
+
|
|
89
|
+
> `environments` reads from either the **top-level** `environments` slot (the
|
|
90
|
+
> preferred placement, and the one the config scaffold advertises) or the
|
|
91
|
+
> original `providers.database.environments` slot shown below. Both are accepted
|
|
92
|
+
> and behave identically; declaring the block in **both** places is a compile
|
|
93
|
+
> error, because there would be no single source of truth.
|
|
94
|
+
|
|
89
95
|
|
|
90
96
|
```typescript title="quickback/quickback.config.ts"
|
|
91
97
|
export default defineConfig({
|
|
@@ -215,10 +221,11 @@ maps to its configured Wrangler environment. Apply that branch's migrations
|
|
|
215
221
|
first; migrations intentionally remain a separate target-owned step.
|
|
216
222
|
|
|
217
223
|
Projects that omit `environments` retain the existing `wrangler.toml` and
|
|
218
|
-
package scripts byte-for-byte. Named environments
|
|
219
|
-
Neon with `connectionMode: "hyperdrive"`
|
|
220
|
-
|
|
221
|
-
|
|
224
|
+
package scripts byte-for-byte. Named environments require Better Auth, plus
|
|
225
|
+
either Neon with `connectionMode: "hyperdrive"` (this page) or Cloudflare D1
|
|
226
|
+
(see [Named deployment environments](/platform/database/d1#named-cloudflare-deployment-environments)).
|
|
227
|
+
Quickback rejects other providers or partial binding sets instead of emitting a
|
|
228
|
+
Worker that can deploy but fail at runtime.
|
|
222
229
|
|
|
223
230
|
## Environment variables
|
|
224
231
|
|
|
@@ -75,6 +75,40 @@ What's requested, and why:
|
|
|
75
75
|
|
|
76
76
|
Nothing broader is requested — no zone, DNS, billing, or account-management access.
|
|
77
77
|
|
|
78
|
+
If you cancel at Cloudflare's consent screen — or Cloudflare ends the attempt for any other reason — you land back in Start with the card explaining what happened and a **Try Cloudflare again** button. Nothing is stored on a cancelled attempt, and a connection you already had is left untouched.
|
|
79
|
+
|
|
80
|
+
## Connection states and recovery
|
|
81
|
+
|
|
82
|
+
The deploy card is the whole connection UI: it reports the state of your Cloudflare connection and offers exactly one thing to do about it.
|
|
83
|
+
|
|
84
|
+
| What you see | What happened | What to do |
|
|
85
|
+
|---|---|---|
|
|
86
|
+
| **Connect your Cloudflare account** | No connection stored | **Continue with Cloudflare** |
|
|
87
|
+
| Masked email badge, green | Connected and healthy | Deploy |
|
|
88
|
+
| "This connection expires in N minutes" | The access token is near the end of its life | Nothing yet — reconnect when it lapses |
|
|
89
|
+
| Badge turns amber, "· reconnect" | Token expired, grant revoked in Cloudflare, or the connection was deleted | **Reconnect Cloudflare** — one consent, same connection record |
|
|
90
|
+
| "This Cloudflare connection can't …" | The grant is missing a permission a deploy needs (an older connection, or a scope your OAuth client didn't allow) | **Reconnect Cloudflare** to grant the rest |
|
|
91
|
+
| "This Cloudflare login isn't a member of any account" | The identity you connected belongs to no Cloudflare account | Create or join an account in the Cloudflare dashboard, then reconnect |
|
|
92
|
+
| "Couldn't reach the deploy service…" | Transient failure talking to Quickback or Cloudflare | **Try again** |
|
|
93
|
+
| "Browser deploys are still rolling out" | Your session isn't in the rollout | Use [`quickback deploy`](/start/deploy) |
|
|
94
|
+
|
|
95
|
+
Deploy is disabled while a reconnect is pending, so a deploy never starts on a connection that can't finish it. If a connection dies *during* a deploy, the failure comes back as a reconnect prompt rather than a raw error — the deploy is safe to re-run after reconnecting, because provisioning adopts and migrations apply once.
|
|
96
|
+
|
|
97
|
+
### Reconnecting
|
|
98
|
+
|
|
99
|
+
**Reconnect** re-runs the same consent and lands on the **same connection record** — your account picker, deploys, and claim links all keep working. Reconnecting is also how you widen a grant that's missing a permission.
|
|
100
|
+
|
|
101
|
+
### Connecting more than one Cloudflare account
|
|
102
|
+
|
|
103
|
+
Connect a second Cloudflare login with **Connect another** and the card grows a login picker above the account picker. Start remembers which one you deployed with last and preselects it.
|
|
104
|
+
|
|
105
|
+
### Disconnecting vs. revoking
|
|
106
|
+
|
|
107
|
+
Two different things, and you usually want both:
|
|
108
|
+
|
|
109
|
+
- **Disconnect** (in the card) makes Quickback forget the connection and its stored token. It doesn't touch anything in your Cloudflare account, and it never touches deployed apps — they're plain Workers in your account and keep running.
|
|
110
|
+
- **Revoke** (Cloudflare dashboard → **My Profile → Access Management → Connected Applications**, linked from the card) withdraws the grant itself. The stored ciphertext becomes useless immediately; the next thing Start tries turns into a reconnect prompt.
|
|
111
|
+
|
|
78
112
|
## Where your token lives
|
|
79
113
|
|
|
80
114
|
The OAuth token never reaches your browser, the chat model, or the compiler. It is held by the deploy service and:
|
|
@@ -83,7 +117,7 @@ The OAuth token never reaches your browser, the chat model, or the compiler. It
|
|
|
83
117
|
- bound to its connection record (the ciphertext is unusable if copied elsewhere);
|
|
84
118
|
- decrypted only inside the API calls of an active deploy, then discarded.
|
|
85
119
|
|
|
86
|
-
Tokens expire; when one does, Start shows a reconnect prompt and a fresh consent re-issues it onto the same connection. Revoking in Cloudflare kills the token immediately — the stored ciphertext becomes useless.
|
|
120
|
+
Tokens expire; when one does, Start shows a reconnect prompt and a fresh consent re-issues it onto the same connection. Revoking in Cloudflare kills the token immediately — the stored ciphertext becomes useless, and the card turns the next failed call into that same reconnect prompt. See [Connection states and recovery](#connection-states-and-recovery) for the full set.
|
|
87
121
|
|
|
88
122
|
## Secrets on the deployed app
|
|
89
123
|
|
|
@@ -127,6 +127,42 @@ an asset is served only when the Worker fetches it. That is what keeps
|
|
|
127
127
|
> most projects never need to run `openapi-typescript` by hand.
|
|
128
128
|
|
|
129
129
|
|
|
130
|
+
## Retired Paths
|
|
131
|
+
|
|
132
|
+
The compiler's output is a manifest of files to **write**. It has no way to say
|
|
133
|
+
"and drop the thing you wrote last time at a path I no longer use."
|
|
134
|
+
|
|
135
|
+
For most moves that gap is invisible: the CLI wipes `src/` from the manifest
|
|
136
|
+
before each write, so relocating a file *within* `src/` cleans up after itself.
|
|
137
|
+
It bites the moment a path crosses that boundary — v0.60 moved the spec blobs
|
|
138
|
+
from the project root into `src/apps/__quickback/spec/`, and the root copies
|
|
139
|
+
survived every later compile as multi-MB orphans that tooling kept reading.
|
|
140
|
+
|
|
141
|
+
So the compiler now also returns **retired paths** — things it used to emit and
|
|
142
|
+
no longer does — and the CLI deletes them:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
● Removed 3 retired file(s):
|
|
146
|
+
openapi.json (spec blobs moved under the assets dir so they leave the Worker bundle)
|
|
147
|
+
asyncapi.json (spec blobs moved under the assets dir so they leave the Worker bundle)
|
|
148
|
+
schema-registry.json (spec blobs moved under the assets dir so they leave the Worker bundle)
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Every filter errs toward keeping a file, because a wrong deletion is
|
|
152
|
+
unrecoverable while a missed one is only untidy:
|
|
153
|
+
|
|
154
|
+
- A retired path that was **moved** is only deleted once its replacement is
|
|
155
|
+
actually in this compile's manifest. Disable the surface
|
|
156
|
+
(`openapi.generate: false`) and neither path is emitted, so nothing is
|
|
157
|
+
removed.
|
|
158
|
+
- A path the current manifest still writes is **never** deleted — that is what
|
|
159
|
+
keeps an older compiler, which still writes to the old location, from having
|
|
160
|
+
its live output pulled out from under it.
|
|
161
|
+
- The CLI re-checks both conditions itself and refuses any path that would
|
|
162
|
+
escape the output directory.
|
|
163
|
+
|
|
164
|
+
Nothing under `src/` is ever listed: the wipe already covers it.
|
|
165
|
+
|
|
130
166
|
## Generated Package Dependency Security
|
|
131
167
|
|
|
132
168
|
For projects using Better Auth, the generated `package.json` keeps the stable
|
package/dist/docs/content.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../src/docs/content.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAykBzC,CAAC;AAEF,eAAO,MAAM,UAAU,UAmJtB,CAAC"}
|