@quickback-dev/cli 0.66.9 → 0.66.11
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/index.js.map +1 -1
- package/dist/lib/migrations/drizzle-wrapper.d.ts.map +1 -1
- package/dist/lib/migrations/drizzle-wrapper.js +11 -1
- package/dist/lib/migrations/drizzle-wrapper.js.map +1 -1
- package/dist/lib/migrations/drizzle-wrapper.test.d.ts +2 -0
- package/dist/lib/migrations/drizzle-wrapper.test.d.ts.map +1 -0
- package/dist/lib/migrations/drizzle-wrapper.test.js +64 -0
- package/dist/lib/migrations/drizzle-wrapper.test.js.map +1 -0
- package/dist/lib/migrations/drizzle.d.ts.map +1 -1
- package/dist/lib/migrations/drizzle.js +6 -2
- package/dist/lib/migrations/drizzle.js.map +1 -1
- package/dist/lib/migrations/prompt-runner.test.js +8 -1
- package/dist/lib/migrations/prompt-runner.test.js.map +1 -1
- package/dist/skill/SKILL.md +12 -6
- package/dist/skill/agents/quickback-specialist/AGENT.md +1 -1
- package/dist/skill/docs/api/batch-operations.md +14 -8
- package/dist/skill/docs/define/changesets.md +1 -1
- package/dist/skill/docs/define/firewall.md +7 -0
- package/dist/skill/docs/define/schema.md +12 -3
- package/dist/skill/docs/define/security.md +22 -0
- package/dist/skill/docs/platform/auth/index.md +5 -1
- package/dist/skill/docs/platform/database/neon.md +18 -0
- package/dist/skill/docs/platform/database/planetscale-postgres.md +57 -23
- package/dist/skill/docs/tooling/cli.md +2 -2
- package/dist/skill/docs/tooling/output.md +19 -0
- package/package.json +1 -1
- package/src/skill/SKILL.md +12 -6
- package/src/skill/agents/quickback-specialist/AGENT.md +1 -1
- package/src/skill/docs/api/batch-operations.md +14 -8
- package/src/skill/docs/define/changesets.md +1 -1
- package/src/skill/docs/define/firewall.md +7 -0
- package/src/skill/docs/define/schema.md +12 -3
- package/src/skill/docs/define/security.md +22 -0
- package/src/skill/docs/platform/auth/index.md +5 -1
- package/src/skill/docs/platform/database/neon.md +18 -0
- package/src/skill/docs/platform/database/planetscale-postgres.md +57 -23
- package/src/skill/docs/tooling/cli.md +2 -2
- package/src/skill/docs/tooling/output.md +19 -0
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,8DAA8D;AAC9D,MAAM,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,8DAA8D;AAC9D,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,SAAS,iBAAiB;IACtB,OAAO,WAAW,CAAC;AACvB,CAAC;AAED,4BAA4B;AAC5B,SAAS,YAAY;IACjB,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,mBAAmB,OAAO,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,aAAa;AACb,MAAM,IAAI,GAAG;;;;;;;;;;;;;CAaZ,CAAC;AAEF,yBAAyB;AACzB,SAAS,SAAS;IACd,MAAM,OAAO,GAAG,iBAAiB,EAAE,CAAC;IACpC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;IAC7B,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;;EAE1B,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,OAAO;;EAEpC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;;EAGhB,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;IACjB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;IAChB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjB,EAAE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AU,GAAG,gCAAgC,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC,CAAC;IAC5E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC,CAAC;IACzE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;KAAM,CAAC;IACJ,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,oBAAoB,GAAG,EAAE,CAAC,CAAC,CAAC;IACjD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,kDAAkD,CAAC,CAAC,CAAC;IACzE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle-wrapper.d.ts","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,iCAAiC,8BAA8B,CAAC;AAE7E;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"drizzle-wrapper.d.ts","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,iCAAiC,8BAA8B,CAAC;AAE7E;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CA6CvE"}
|
|
@@ -28,12 +28,22 @@ export function buildDrizzleGenerateWrapper(projectRoot) {
|
|
|
28
28
|
return `// Quickback drizzle-generate wrapper. Generated; do not edit.
|
|
29
29
|
import { Readable } from 'node:stream';
|
|
30
30
|
import { createRequire } from 'node:module';
|
|
31
|
+
import { dirname, join } from 'node:path';
|
|
31
32
|
|
|
32
33
|
// Anchored at the project root so we resolve the PINNED drizzle-kit that
|
|
33
34
|
// assertSupportedDrizzleVersion approved. No fallback: running a different
|
|
34
35
|
// copy against real migration history is worse than failing.
|
|
35
36
|
const require = createRequire(${JSON.stringify(`${projectRoot.replace(/\/+$/, '')}/package.json`)});
|
|
36
|
-
|
|
37
|
+
// drizzle-kit 0.31.10 ships an exports map listing only "." and "./api", so
|
|
38
|
+
// resolving './package.json' throws ERR_PACKAGE_PATH_NOT_EXPORTED under Node's
|
|
39
|
+
// strict exports (older releases had no map and resolved it fine). Try the
|
|
40
|
+
// package.json first, then fall back to the directory of the main export;
|
|
41
|
+
// bin.cjs sits at the package root either way.
|
|
42
|
+
function drizzleKitDir() {
|
|
43
|
+
try { return dirname(require.resolve('drizzle-kit/package.json')); } catch {}
|
|
44
|
+
return dirname(require.resolve('drizzle-kit'));
|
|
45
|
+
}
|
|
46
|
+
const binPath = join(drizzleKitDir(), 'bin.cjs');
|
|
37
47
|
|
|
38
48
|
// Present a fake TTY and bridge the real (piped) stdin into it, so the parent
|
|
39
49
|
// runner's injected keystrokes ('\\r' = create, arrow-downs = rename hint)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle-wrapper.js","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,WAAmB;IAC7D,OAAO
|
|
1
|
+
{"version":3,"file":"drizzle-wrapper.js","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle-wrapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,2BAA2B,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,WAAmB;IAC7D,OAAO;;;;;;;;gCAQuB,IAAI,CAAC,SAAS,CAAC,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmChG,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drizzle-wrapper.test.d.ts","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle-wrapper.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
import { mkdtemp, mkdir, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { buildDrizzleGenerateWrapper } from './drizzle-wrapper.js';
|
|
6
|
+
/**
|
|
7
|
+
* drizzle-kit 0.31.10 ships an exports map listing only "." and "./api". Under
|
|
8
|
+
* Node's strict exports, `require.resolve('drizzle-kit/package.json')` throws
|
|
9
|
+
* ERR_PACKAGE_PATH_NOT_EXPORTED — which took down local migration generation
|
|
10
|
+
* for every Postgres project on Node 22 (2026-09-07). Bun is lenient about
|
|
11
|
+
* exports maps, so the prompt-runner tests (which spawn the wrapper with Bun)
|
|
12
|
+
* cannot see this. This test runs the generated wrapper under `node` against
|
|
13
|
+
* a fixture that mirrors the real package layout.
|
|
14
|
+
*/
|
|
15
|
+
async function nodeAvailable() {
|
|
16
|
+
try {
|
|
17
|
+
const proc = Bun.spawn(['node', '--version'], { stdout: 'pipe', stderr: 'pipe' });
|
|
18
|
+
return (await proc.exited) === 0;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
describe('drizzle generate wrapper', () => {
|
|
25
|
+
test('resolves bin.cjs under node when ./package.json is not exported', async () => {
|
|
26
|
+
if (!(await nodeAvailable()))
|
|
27
|
+
return; // node is the runtime the wrapper targets; skip where absent
|
|
28
|
+
const root = await mkdtemp(join(tmpdir(), 'qb-wrapper-'));
|
|
29
|
+
try {
|
|
30
|
+
const pkgDir = join(root, 'node_modules', 'drizzle-kit');
|
|
31
|
+
await mkdir(pkgDir, { recursive: true });
|
|
32
|
+
await writeFile(join(pkgDir, 'package.json'), JSON.stringify({
|
|
33
|
+
name: 'drizzle-kit',
|
|
34
|
+
version: '0.31.10',
|
|
35
|
+
main: './index.js',
|
|
36
|
+
exports: { '.': './index.js', './api': './api.js' },
|
|
37
|
+
}));
|
|
38
|
+
await writeFile(join(pkgDir, 'index.js'), 'module.exports = {};\n');
|
|
39
|
+
await writeFile(join(pkgDir, 'bin.cjs'), 'process.stdout.write("FAKE_DRIZZLE_OK " + process.argv.slice(2).join(" "));\n');
|
|
40
|
+
await writeFile(join(root, 'package.json'), JSON.stringify({ name: 'proj' }));
|
|
41
|
+
const wrapper = join(root, '__qb_drizzle_generate.mjs');
|
|
42
|
+
await writeFile(wrapper, buildDrizzleGenerateWrapper(root));
|
|
43
|
+
const proc = Bun.spawn(['node', wrapper, 'generate', '--config', 'drizzle.config.ts'], {
|
|
44
|
+
cwd: root,
|
|
45
|
+
stdin: 'pipe',
|
|
46
|
+
stdout: 'pipe',
|
|
47
|
+
stderr: 'pipe',
|
|
48
|
+
});
|
|
49
|
+
proc.stdin.end();
|
|
50
|
+
const [code, out, err] = await Promise.all([
|
|
51
|
+
proc.exited,
|
|
52
|
+
new Response(proc.stdout).text(),
|
|
53
|
+
new Response(proc.stderr).text(),
|
|
54
|
+
]);
|
|
55
|
+
expect(err).not.toContain('ERR_PACKAGE_PATH_NOT_EXPORTED');
|
|
56
|
+
expect(code).toBe(0);
|
|
57
|
+
expect(out).toContain('FAKE_DRIZZLE_OK generate --config drizzle.config.ts');
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
await rm(root, { recursive: true, force: true });
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=drizzle-wrapper.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drizzle-wrapper.test.js","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle-wrapper.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAEnE;;;;;;;;GAQG;AACH,KAAK,UAAU,aAAa;IAC1B,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAClF,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,IAAI,CAAC,iEAAiE,EAAE,KAAK,IAAI,EAAE;QACjF,IAAI,CAAC,CAAC,MAAM,aAAa,EAAE,CAAC;YAAE,OAAO,CAA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AAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUjE;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"drizzle.d.ts","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle.ts"],"names":[],"mappings":"AAKA,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,sBAAsB,CAAC;IAChC,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,MAAM,CAAC,CA2BjB;AAED,wBAAgB,6BAA6B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAOzE;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUjE;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,MAAM,GAAG,IAAI,CAkCf"}
|
|
@@ -47,8 +47,12 @@ export function detectDrizzleCommandFailure(stdout, stderr) {
|
|
|
47
47
|
if (/Interactive prompts require a TTY/i.test(output) ||
|
|
48
48
|
(lastPrompt >= 0 && lastSuccess < lastPrompt) ||
|
|
49
49
|
/\bCommand aborted\b/i.test(output)) {
|
|
50
|
-
return 'drizzle-kit requested interactive rename input. ' +
|
|
51
|
-
'
|
|
50
|
+
return 'drizzle-kit requested interactive rename input: it asked whether a table or column was created or renamed. ' +
|
|
51
|
+
'If it is a rename, add a compiler.migrations.renames hint (new name -> old name). ' +
|
|
52
|
+
'If it is a new object, check for tables that disappeared from the schema in the same ' +
|
|
53
|
+
'compile (turning a subsystem off, such as removing webhooksBinding, drops its tables and ' +
|
|
54
|
+
'makes every new table look like a rename candidate). autoCreateRenames is a sqlite-only ' +
|
|
55
|
+
'migration-target option; it is refused for postgresql.';
|
|
52
56
|
}
|
|
53
57
|
if (/\b(?:ReferenceError|TypeError|SyntaxError|RangeError):\s+/.test(output) ||
|
|
54
58
|
/\bError:\s+/.test(output) ||
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drizzle.js","sourceRoot":"","sources":["../../../src/lib/migrations/drizzle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EACL,yBAAyB,GAG1B,MAAM,YAAY,CAAC;AASpB,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,OAAiC;IAEjC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,6BAA6B,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC5F,MAAM,sBAAsB,CAAC,UAAU,CAAC,CAAC;IACzC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,mBAAmB,CAAC;IACrD,MAAM,UAAU,GAAsB;QACpC,UAAU;QACV,IAAI,EAAE,CAAC,WAAW,CAAC;QACnB,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC;QACjC,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IACxC,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,sBAAsB,CAC9B,2BAA2B,EAC3B,kEAAkE,UAAU,EAAE,CAC/E,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AU,CAAC,WAAW,CAAC,iCAAiC,CAAC,CAAC;IAC7E,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAC1B,UAAU,CAAC,WAAW,CAAC,yBAAyB,CAAC,EACjD,UAAU,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAC5C,CAAC;IACF,IACE,oCAAoC,CAAC,IAAI,CAAC,MAAM,CAAC;QACjD,CAAC,UAAU,IAAI,CAAC,IAAI,WAAW,GAAG,UAAU,CAAC;QAC7C,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,EACnC,CAAC;QACD,OAAO,6GAA6G;YAClH,oFAAoF;YACpF,uFAAuF;YACvF,2FAA2F;YAC3F,0FAA0F;YAC1F,wDAAwD,CAAC;IAC7D,CAAC;IACD,IACE,2DAA2D,CAAC,IAAI,CAAC,MAAM,CAAC;QACxE,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;QAC1B,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC;QACrC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,EACjC,CAAC;QACD,OAAO,oEAAoE,CAAC;IAC9E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,KAAK,UAAU,sBAAsB,CAAC,UAAkB;IACtD,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,sBAAsB,CAC9B,2BAA2B,EAC3B,6BAA6B,yBAAyB,eAAe;YACnE,oEAAoE,yBAAyB,EAAE,EACjG,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -45,7 +45,14 @@ process.stdin.on('data', (chunk) => {
|
|
|
45
45
|
async function fixture() {
|
|
46
46
|
const projectRoot = await mkdtemp(join(tmpdir(), 'qb-prompt-runner-'));
|
|
47
47
|
const pkgDir = join(projectRoot, 'node_modules', 'drizzle-kit');
|
|
48
|
-
|
|
48
|
+
// Mirror drizzle-kit 0.31.10's exports map: "./package.json" is NOT exported,
|
|
49
|
+
// so the wrapper must find bin.cjs via the main export instead.
|
|
50
|
+
await Bun.write(join(pkgDir, 'package.json'), JSON.stringify({
|
|
51
|
+
name: 'drizzle-kit',
|
|
52
|
+
main: './index.js',
|
|
53
|
+
exports: { '.': './index.js', './api': './api.js' },
|
|
54
|
+
}));
|
|
55
|
+
await Bun.write(join(pkgDir, 'index.js'), 'module.exports = {};\n');
|
|
49
56
|
await Bun.write(join(pkgDir, 'bin.cjs'), FAKE_DRIZZLE);
|
|
50
57
|
await Bun.write(join(projectRoot, 'package.json'), JSON.stringify({ name: 'proj' }));
|
|
51
58
|
const binDir = join(projectRoot, 'node_modules', '.bin');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-runner.test.js","sourceRoot":"","sources":["../../../src/lib/migrations/prompt-runner.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE;;;;;;;;;GASG;AACH,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BpB,CAAC;AAEF,+EAA+E;AAC/E,KAAK,UAAU,OAAO;IACpB,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC;IACvE,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;IAChE,MAAM,GAAG,CAA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E,EAAE,EAAE;SACjE,CAAC,CACH,CACF,CAAC,OAAO,CAAC,OAAO,CAAC,iEAAiE,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6DAA6D,EAAE,KAAK,IAAI,EAAE;QAC7E,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,yBAAyB,CAAC,CAAC,CAAC;QAC7E,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QACzD,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACxC,MAAM,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,2DAA2D,CAAC,CAAC;QAClF,MAAM,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACxB,sEAAsE;QACtE,0EAA0E;QAC1E,MAAM,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAErF,MAAM,MAAM,GAAG,gCAAgC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC;QAErD,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/skill/SKILL.md
CHANGED
|
@@ -6,18 +6,24 @@ allowed-tools: Read, Grep, Glob, Edit, Write
|
|
|
6
6
|
|
|
7
7
|
# Quickback
|
|
8
8
|
|
|
9
|
-
Quickback is a **backend compiler**. Define your database schema and security rules in TypeScript; compile them into
|
|
9
|
+
Quickback is a **backend compiler**. Define your database schema and security rules in TypeScript; compile them into a Hono API running on Cloudflare Workers. Pair the output with the Quickback Stack for a complete Supabase alternative on Cloudflare.
|
|
10
10
|
|
|
11
11
|
It's two products:
|
|
12
12
|
|
|
13
13
|
## 1. Quickback Compiler — the build tool
|
|
14
14
|
|
|
15
|
-
Define schema + security in TypeScript. Compile to
|
|
15
|
+
Define schema + security in TypeScript. Compile to a full Hono application with
|
|
16
|
+
CRUD, batch endpoints, OpenAPI, and an MCP server, on one of three registered
|
|
17
|
+
database providers:
|
|
16
18
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
+
- **`cloudflare-d1`** — edge SQLite, the default.
|
|
20
|
+
- **`neon`** — Postgres over HTTP, WebSocket or Cloudflare Hyperdrive.
|
|
21
|
+
- **`planetscale-postgres`** — the same Postgres emitters, Hyperdrive only. Compiler support; live acceptance pending. `planetscale` without the suffix means MySQL and is not registered.
|
|
19
22
|
|
|
20
|
-
The same `defineTable()` definitions work
|
|
23
|
+
The same `defineTable()` definitions work across every provider. On Postgres,
|
|
24
|
+
the compiler additionally emits **backstop** Row Level Security: it fences
|
|
25
|
+
tenant scope, soft delete and lane admission only — roles, status, transitions
|
|
26
|
+
and masking stay with the API. The compiler runs as a remote service at `compiler.quickback.dev` (override with `QUICKBACK_API_URL`) — the CLI is a thin client that sends config + features and writes the generated files.
|
|
21
27
|
|
|
22
28
|
## 2. Quickback Stack — the runtime services
|
|
23
29
|
|
|
@@ -409,7 +415,7 @@ The path layout mirrors the public docs site (https://docs.quickback.dev). Open
|
|
|
409
415
|
|
|
410
416
|
**Platform services** (`docs/platform/<topic>.md`)
|
|
411
417
|
- `cloudflare` — the Workers runtime target
|
|
412
|
-
- `database/{index,d1,neon}` — D1 and Neon/Postgres
|
|
418
|
+
- `database/{index,d1,neon,planetscale-postgres}` — D1, and Neon / PlanetScale Postgres
|
|
413
419
|
- `auth` — Better Auth integration, JWT optimization, plugins, device-auth, security
|
|
414
420
|
- `storage/{kv,r2}` — using KV and R2 in actions
|
|
415
421
|
- `realtime` — Durable Objects, WebSocket
|
|
@@ -70,7 +70,7 @@ When explaining compile outputs:
|
|
|
70
70
|
|
|
71
71
|
Detect the database dialect from `quickback.config.ts`:
|
|
72
72
|
- Cloudflare D1 / SQLite: Use `sqliteTable`, `text`, `integer` from `drizzle-orm/sqlite-core`
|
|
73
|
-
-
|
|
73
|
+
- Neon / PlanetScale Postgres / PostgreSQL: Use `pgTable`, `text`, `boolean`, `timestamp` from `drizzle-orm/pg-core`
|
|
74
74
|
|
|
75
75
|
### Table Definition Pattern (recommended: `feature()` + `q.scope()`)
|
|
76
76
|
|
|
@@ -273,24 +273,30 @@ and, for Neon, its **connection mode** — supports interactive transactions.
|
|
|
273
273
|
The response's `meta.transactional` flag tells you which guarantee you
|
|
274
274
|
actually got — inspect it in clients that care about rollback.
|
|
275
275
|
|
|
276
|
-
Neon is transactional
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
276
|
+
Neon is transactional over **websocket** (`connectionMode: 'websocket'`, the
|
|
277
|
+
default on Node/Bun runtimes) and over **hyperdrive** (postgres.js on a
|
|
278
|
+
Cloudflare Hyperdrive binding — the only Neon mode with interactive
|
|
279
|
+
transactions on Workers). Over HTTP — the default on Cloudflare Workers — the
|
|
280
|
+
`drizzle-orm/neon-http` driver has no `db.transaction()` (it throws at
|
|
281
|
+
runtime), so Neon-over-HTTP batches behave exactly like D1: fail-fast
|
|
282
|
+
per-record loop, `meta.transactional: false`.
|
|
283
|
+
|
|
284
|
+
[PlanetScale Postgres](/platform/database/planetscale-postgres) is Hyperdrive-only
|
|
285
|
+
and therefore always transactional — it shares the `postgres-js-hyperdrive`
|
|
286
|
+
transport with Neon's hyperdrive mode.
|
|
281
287
|
|
|
282
288
|
### Per-Provider Matrix
|
|
283
289
|
|
|
284
290
|
| Endpoint | Provider | `failFast` | `meta.transactional` | Behavior |
|
|
285
291
|
|----------|----------|-----------|----------------------|----------|
|
|
286
|
-
| `PATCH /batch` (update) | tx-supporting (postgres, neon over websocket) | `true` | `true` | `db.transaction()` wraps the per-record loop. Any failure rolls back ALL writes in the batch. |
|
|
292
|
+
| `PATCH /batch` (update) | tx-supporting (postgres, neon over websocket/hyperdrive, planetscale-postgres) | `true` | `true` | `db.transaction()` wraps the per-record loop. Any failure rolls back ALL writes in the batch. |
|
|
287
293
|
| `PATCH /batch` (update) | (any) | `false` | `false` | Per-record loop, partial success. Each record commits independently. |
|
|
288
294
|
| `PATCH /batch` (update) | cloudflare-d1, neon over http (Cloudflare default) | `true` | `false` | Fail-fast loop without rollback — the driver has no `db.transaction`. Records before the failure stay committed. |
|
|
289
|
-
| `PUT /batch` (upsert) | tx-supporting (postgres, neon over websocket) | `true` | `true` | Bulk insert + per-record update share one transaction. Any failure rolls back both. |
|
|
295
|
+
| `PUT /batch` (upsert) | tx-supporting (postgres, neon over websocket/hyperdrive, planetscale-postgres) | `true` | `true` | Bulk insert + per-record update share one transaction. Any failure rolls back both. |
|
|
290
296
|
| `PUT /batch` (upsert) | cloudflare-d1, neon over http (Cloudflare default) | `true` | `false` | Bulk insert commits; per-record update loop is fail-fast without rollback. |
|
|
291
297
|
| `POST /batch` (create) | (any) | (any) | `true` | Single bulk `INSERT` — atomic at the DB level. |
|
|
292
298
|
| `DELETE /batch` | (any) | (any) | `true` | Single bulk `UPDATE` (soft) or `DELETE` (hard) — atomic at the DB level. |
|
|
293
|
-
| [Changeset](/define/changesets) (`application/vnd.quickback.changeset+json`) | tx-supporting (postgres, neon over websocket/hyperdrive) | n/a | `true` | Root op + every child op share one transaction; any op failure rolls back the whole changeset. |
|
|
299
|
+
| [Changeset](/define/changesets) (`application/vnd.quickback.changeset+json`) | tx-supporting (postgres, neon over websocket/hyperdrive, planetscale-postgres) | n/a | `true` | Root op + every child op share one transaction; any op failure rolls back the whole changeset. |
|
|
294
300
|
| [Changeset](/define/changesets) | cloudflare-d1, neon over http (Cloudflare default) | n/a | `false` | Deterministic parent-first fail-fast — the first op failure stops the changeset; already-applied ops stay committed (a consistent, independently-authorized prefix). |
|
|
295
301
|
|
|
296
302
|
### Reading `meta.transactional` in clients
|
|
@@ -417,7 +417,7 @@ it; `meta.transactional` reports the actual guarantee (same contract as
|
|
|
417
417
|
|
|
418
418
|
| Provider | transactional | Behavior |
|
|
419
419
|
|---|---|---|
|
|
420
|
-
| postgres /
|
|
420
|
+
| postgres / neon (websocket / hyperdrive) / planetscale-postgres (hyperdrive) / libsql / better-sqlite3 / bun-sqlite | `true` | One transaction; any op failure rolls back the root op and every child op |
|
|
421
421
|
| cloudflare-d1, neon over http (the Cloudflare default) | `false` | Deterministic parent-first **fail-fast**: the first failure stops the changeset; ops already applied stay committed (a consistent prefix — each was independently authorized) |
|
|
422
422
|
|
|
423
423
|
## Calling it from authored code
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
The firewall generates WHERE clauses automatically to isolate data by user, organization, or team.
|
|
4
4
|
|
|
5
|
+
The firewall is also **the only security pillar that lowers to SQL**. On a Postgres
|
|
6
|
+
provider the compiler mirrors it into backstop Row Level Security — tenant scope,
|
|
7
|
+
owner scope, soft delete and lane admission — so a custom route or a mis-scoped
|
|
8
|
+
handle cannot escape it. Roles, status, transitions and masking stay in the API and
|
|
9
|
+
appear in no policy. See [Security Overview](/define/security#where-each-pillar-is-enforced)
|
|
10
|
+
and [Row Level Security](/platform/database/neon#row-level-security).
|
|
11
|
+
|
|
5
12
|
## Basic Usage
|
|
6
13
|
|
|
7
14
|
The cleanest pattern is `q.scope()` — declare the tenant column once and the firewall is auto-derived:
|
|
@@ -224,8 +224,8 @@ If you have an existing Drizzle schema you're bringing forward — or need a dia
|
|
|
224
224
|
| Target Database | Import From | Table Function |
|
|
225
225
|
|-----------------|-------------|----------------|
|
|
226
226
|
| Cloudflare D1, Turso, SQLite | `drizzle-orm/sqlite-core` | `sqliteTable` |
|
|
227
|
-
|
|
|
228
|
-
|
|
|
227
|
+
| Neon, PlanetScale Postgres, PostgreSQL | `drizzle-orm/pg-core` | `pgTable` |
|
|
228
|
+
| MySQL (`planetscale`, `mysql`) — dialect only, no registered provider | `drizzle-orm/mysql-core` | `mysqlTable` |
|
|
229
229
|
|
|
230
230
|
```typescript
|
|
231
231
|
// quickback/features/jobs/jobs.ts
|
|
@@ -274,7 +274,7 @@ Default to `feature()`. Drop to Drizzle only when:
|
|
|
274
274
|
|
|
275
275
|
Features in the same project may mix freely — Quickback dispatches per feature — so one interop table doesn't force the rest of the project off `feature()`.
|
|
276
276
|
|
|
277
|
-
One dialect rule: interop files **without** a `defineTable(...)` default export (internal child tables) are not dialect-translated — author them in the target database's dialect. On Postgres providers (
|
|
277
|
+
One dialect rule: interop files **without** a `defineTable(...)` default export (internal child tables) are not dialect-translated — author them in the target database's dialect. On Postgres providers (`neon`, `planetscale-postgres`), a `sqliteTable` interop source without `defineTable` is a compile-time error; write it with `pgTable` from `drizzle-orm/pg-core` instead. Sources **with** `defineTable(...)` keep compiling across dialects automatically.
|
|
278
278
|
|
|
279
279
|
### Drizzle Column Types
|
|
280
280
|
|
|
@@ -747,6 +747,10 @@ selector/typeahead controls:
|
|
|
747
747
|
|
|
748
748
|
{/* doc-compile: skip — cross-table column excerpt; the complete table forms appear at the top of this page. */}
|
|
749
749
|
```typescript
|
|
750
|
+
// features/applications/applications.ts
|
|
751
|
+
import candidates from "../candidates/candidates";
|
|
752
|
+
import jobs from "../jobs/jobs";
|
|
753
|
+
|
|
750
754
|
const applications = q.table("applications", {
|
|
751
755
|
id: q.id(),
|
|
752
756
|
candidateId: q.text().required().references(() => candidates.id),
|
|
@@ -754,6 +758,11 @@ const applications = q.table("applications", {
|
|
|
754
758
|
});
|
|
755
759
|
```
|
|
756
760
|
|
|
761
|
+
When the target table lives in **another feature**, import it in the table
|
|
762
|
+
file — `import <table> from "../<feature>/<table>"`, one `../`, since table
|
|
763
|
+
files sit at `features/<feature>/`. The thunk names a real binding; without
|
|
764
|
+
the import the generated schema fails migration generation.
|
|
765
|
+
|
|
757
766
|
Do this even when a column name appears obvious, such as `sessionId` beside a
|
|
758
767
|
`sessions` table. A matching `*Id` name is a useful compiler suggestion when a
|
|
759
768
|
relationship might be missing; it is not enough evidence to silently invent
|
|
@@ -19,6 +19,28 @@ Views and Guards are documented under **Reads** and **Writes** rather than under
|
|
|
19
19
|
Security, because that is where you are when you need them: a view is a shape you
|
|
20
20
|
return, a guard is a rule about a write. They are security mechanisms either way.
|
|
21
21
|
|
|
22
|
+
## Where each pillar is enforced
|
|
23
|
+
|
|
24
|
+
All six pillars run in the API. On a Postgres provider ([Neon](/platform/database/neon),
|
|
25
|
+
[PlanetScale Postgres](/platform/database/planetscale-postgres)) the compiler *also*
|
|
26
|
+
emits Row Level Security — but only as a **backstop**, and only for one pillar:
|
|
27
|
+
|
|
28
|
+
> **The firewall is the only pillar that lowers to SQL.** Generated RLS fences tenant
|
|
29
|
+
> scope, owner scope, soft delete and lane admission. Roles, status, transitions,
|
|
30
|
+
> masking and record conditions are the API's job and appear in no policy body — no
|
|
31
|
+
> generated policy names an authored role.
|
|
32
|
+
|
|
33
|
+
The backstop exists so a bug in a custom route or a mis-scoped handle cannot cross a
|
|
34
|
+
tenant, resurrect a soft-deleted row, or read another owner's row. It is not a second
|
|
35
|
+
copy of `access`. A scoped-role gate or an `access.record` owner rule is an **Access**
|
|
36
|
+
decision and stays in the API; if an owner boundary must hold at the database, author
|
|
37
|
+
it as `firewall.owner`, which does lower.
|
|
38
|
+
|
|
39
|
+
Better Auth's tables carry the same backstop, and **Better Auth's own API is the gate
|
|
40
|
+
for its tables** — the caller lane never writes them. On D1 there is no RLS at all:
|
|
41
|
+
enforcement is the API plus the fact that the database is unreachable except through
|
|
42
|
+
your Worker. See [D1 vs Neon RLS](/platform/database/d1#comparison-with-neon-rls).
|
|
43
|
+
|
|
22
44
|
## Firewall — which rows
|
|
23
45
|
|
|
24
46
|
The firewall is tenant isolation. It rewrites every query so a caller can only ever
|
|
@@ -56,7 +56,11 @@ These are Better Auth's built-in organization roles — no configuration needed.
|
|
|
56
56
|
|
|
57
57
|
> **Tip:** Account UI's role picker uses these exact three roles. Use `["owner", "admin", "member"]` in your [Access](/define/access) rules so generated projects plug into Better Auth and Account UI seamlessly.
|
|
58
58
|
|
|
59
|
-
Roles are used throughout the security layers — in [Access](/define/access) rules
|
|
59
|
+
Roles are used throughout the security layers — in [Access](/define/access) rules and
|
|
60
|
+
[Firewall](/define/firewall) owner checks. Roles are an **API** gate: they do not reach SQL.
|
|
61
|
+
Generated [Row Level Security](/platform/database/neon#row-level-security) is a backstop that
|
|
62
|
+
fences tenant scope, soft delete and lane admission only, and no generated policy body names a
|
|
63
|
+
role. Better Auth's own API is the gate for its tables.
|
|
60
64
|
|
|
61
65
|
## Next Steps
|
|
62
66
|
|
|
@@ -1086,6 +1086,24 @@ Mixed database providers (e.g. D1 auth + Neon features) remain unsupported.
|
|
|
1086
1086
|
|
|
1087
1087
|
## Deploying
|
|
1088
1088
|
|
|
1089
|
+
### Projects with no custom domain
|
|
1090
|
+
|
|
1091
|
+
A Worker that lives only on `workers.dev` (no `providers.runtime.config.routes`,
|
|
1092
|
+
no `domains`) must tell the generated auth layer its own host. Without it the
|
|
1093
|
+
JWT issuer defaults to the local dev URL and cookie-backed browser mutations are
|
|
1094
|
+
refused as cross-site:
|
|
1095
|
+
|
|
1096
|
+
```sh
|
|
1097
|
+
npx wrangler deploy \
|
|
1098
|
+
--var EXTRA_APP_HOSTS:<name>.<account>.workers.dev \
|
|
1099
|
+
--var BETTER_AUTH_URL:https://<name>.<account>.workers.dev
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
Named environments set `BETTER_AUTH_URL` in `worker.vars` (see above);
|
|
1103
|
+
`EXTRA_APP_HOSTS` is documented under
|
|
1104
|
+
[Multi-domain architecture](/configure/domains#one-bundle-several-hostnames).
|
|
1105
|
+
|
|
1106
|
+
|
|
1089
1107
|
For an unnamed target, the generated `deploy` script runs migrations, then
|
|
1090
1108
|
ships the Worker:
|
|
1091
1109
|
|
|
@@ -7,12 +7,20 @@ schema, the same Better Auth wiring, the same
|
|
|
7
7
|
migrations. For identical definitions the generated schema and security
|
|
8
8
|
migrations are byte-identical between the two providers.
|
|
9
9
|
|
|
10
|
-
> **
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
15
|
-
>
|
|
10
|
+
> **Proven live end to end (2026-09-07).** The direct-connection contract, the
|
|
11
|
+
> Hyperdrive transport, and a generated project's Worker were each run against a
|
|
12
|
+
> real PlanetScale Postgres 18 branch. Against a real PlanetScale Postgres 18 branch, the
|
|
13
|
+
> generated journal applied unchanged: role bootstrap with `CREATE ROLE`
|
|
14
|
+
> verbatim, ownership transfer to `quickback_owner`, the RLS backstop through
|
|
15
|
+
> the emitted client as the restricted role, interactive transaction commit and
|
|
16
|
+
> rollback, incremental migration as `quickback_admin`, and a migration ledger
|
|
17
|
+
> the runtime cannot read. The `recruitment` example, compiled with this provider,
|
|
18
|
+
> applied its four-file upgrade journal, then served sign-up, sessions, organization
|
|
19
|
+
> activation, tenant CRUD, a named view and an action through a cache-disabled
|
|
20
|
+
> Hyperdrive config connected as `quickback.<branch_id>`, with every security
|
|
21
|
+
> layer answering correctly. Not yet exercised there: outbound webhook delivery,
|
|
22
|
+
> realtime traffic and the automated acceptance manifest. Sanitized record in the
|
|
23
|
+
> repository's `plans/postgres-acceptance-results.md`.
|
|
16
24
|
|
|
17
25
|
|
|
18
26
|
## Configuration
|
|
@@ -179,24 +187,50 @@ never silently-broken output:
|
|
|
179
187
|
| `webhooksDatabaseId` / `webhooksDatabaseName` | rejected — D1-only keys; webhook tables live in the `webhooks` schema of the same database |
|
|
180
188
|
| `connectionMode` of `'http'` or `'websocket'` | rejected — no such driver for this provider |
|
|
181
189
|
|
|
182
|
-
##
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
190
|
+
## Live acceptance findings
|
|
191
|
+
|
|
192
|
+
Answered by the direct-connection spike on 2026-09-07 (PostgreSQL 18.6,
|
|
193
|
+
postgres.js 3.4.9, drizzle-orm 0.45.2; sanitized record in the repository's
|
|
194
|
+
`plans/postgres-acceptance-results.md`):
|
|
195
|
+
|
|
196
|
+
- **`CREATE ROLE … NOLOGIN NOBYPASSRLS`** runs verbatim from the generated
|
|
197
|
+
journal as the vendor default role. No vendor role API is needed.
|
|
198
|
+
- **Ownership transfer** with `ALTER … OWNER TO quickback_owner` works,
|
|
199
|
+
including `ALTER SCHEMA public`.
|
|
200
|
+
- **`SECURITY DEFINER` with a pinned `search_path`**, `GRANT … WITH SET TRUE`
|
|
201
|
+
and `REVOKE CREATE ON SCHEMA public FROM PUBLIC` are all accepted.
|
|
202
|
+
- **`SET LOCAL ROLE quickback` from the vendor default role is refused**
|
|
203
|
+
(SQLSTATE 42501). PostgreSQL 16+ gives a role's creator ADMIN OPTION but not
|
|
204
|
+
SET. This does not affect the shipped design: the Worker connects directly as
|
|
205
|
+
the restricted role through Hyperdrive, and `quickback_admin` holds SET on it
|
|
206
|
+
for routine migrations. Do not work around it by granting the default role
|
|
207
|
+
more; it is the setup actor only and carries `BYPASSRLS`.
|
|
208
|
+
- **Connection username** is `<role>.<branch_id>`; SQL role names stay bare.
|
|
209
|
+
Create the Hyperdrive origin credential as `quickback.<branch_id>`.
|
|
210
|
+
- **Extensions:** the journal needs only `plpgsql`. `pgcrypto`, `uuid-ossp`,
|
|
211
|
+
`vector`, `pg_trgm`, `citext` and `pg_cron` are available if a project
|
|
212
|
+
declares them.
|
|
213
|
+
|
|
214
|
+
Still to prove, and the reason this page keeps a qualifier: the deployed
|
|
215
|
+
Hyperdrive run, and one provider-independent item — the generated RLS helper
|
|
216
|
+
functions end up owned by the migrating actor rather than `quickback_owner`,
|
|
217
|
+
which is why a changed security migration currently needs the setup-owner
|
|
218
|
+
credential (see [Neon](/platform/database/neon#upgrading-an-existing-database)).
|
|
219
|
+
|
|
220
|
+
## Deploying to workers.dev only
|
|
221
|
+
|
|
222
|
+
A project with no custom domain must tell the generated auth layer its own
|
|
223
|
+
host, or the JWT issuer defaults to the local dev URL and browser mutations
|
|
224
|
+
fail the origin check:
|
|
225
|
+
|
|
226
|
+
```sh
|
|
227
|
+
npx wrangler deploy \
|
|
228
|
+
--var EXTRA_APP_HOSTS:<name>.<account>.workers.dev \
|
|
229
|
+
--var BETTER_AUTH_URL:https://<name>.<account>.workers.dev
|
|
230
|
+
```
|
|
197
231
|
|
|
198
|
-
|
|
199
|
-
|
|
232
|
+
Projects with `providers.runtime.config.routes` or `domains` get both from
|
|
233
|
+
the configured hostnames automatically.
|
|
200
234
|
|
|
201
235
|
## See also
|
|
202
236
|
|
|
@@ -167,8 +167,8 @@ blocks the write.
|
|
|
167
167
|
|
|
168
168
|
The SQL dialect for written declarations comes from your configured database
|
|
169
169
|
provider — the same provider→dialect table the compiler uses. Postgres
|
|
170
|
-
providers (`
|
|
171
|
-
get Postgres declarations; SQLite providers (`cloudflare-d1`,
|
|
170
|
+
providers (`neon`, `planetscale-postgres`, `supabase`, `vercel-postgres`,
|
|
171
|
+
`postgres`, `postgresql`) get Postgres declarations; SQLite providers (`cloudflare-d1`,
|
|
172
172
|
`better-sqlite3`, `bun-sqlite`, `libsql`, `turso`) get SQLite. MySQL
|
|
173
173
|
providers are refused with an error rather than written in the wrong
|
|
174
174
|
dialect; no provider (or an unrecognized one) defaults to SQLite.
|
|
@@ -254,6 +254,25 @@ projects acquire build and deployment fixes without losing unrelated tooling.
|
|
|
254
254
|
|
|
255
255
|
These files are generated only when the corresponding features are configured:
|
|
256
256
|
|
|
257
|
+
### Database provider setup files
|
|
258
|
+
|
|
259
|
+
Every compile emits an environment example named for the configured provider.
|
|
260
|
+
Postgres providers additionally emit a setup guide under `docs/` and the auth
|
|
261
|
+
schema qualifier script:
|
|
262
|
+
|
|
263
|
+
| Provider | Emitted |
|
|
264
|
+
|----------|---------|
|
|
265
|
+
| `cloudflare-d1` | `.env.cloudflare-d1.example`, `wrangler.d1.example`, `drizzle.auth.config.ts` (dual-database mode) |
|
|
266
|
+
| `neon` | `.env.neon.example`, `.dev.vars.example`, `docs/neon-setup.md`, `scripts/quickback-qualify-auth-schema.mjs` |
|
|
267
|
+
| `planetscale-postgres` | `.env.planetscale.example`, `.dev.vars.example`, `docs/planetscale-postgres-setup.md`, `scripts/quickback-qualify-auth-schema.mjs` |
|
|
268
|
+
|
|
269
|
+
The setup guide is host-specific — role bootstrap, the connection username, the
|
|
270
|
+
Hyperdrive binding and named environments — and is regenerated on every compile.
|
|
271
|
+
Both Postgres providers keep auth and feature tables in **one** database, so
|
|
272
|
+
they emit a single `drizzle.config.ts` rather than the D1 dual-database pair.
|
|
273
|
+
See [Neon](/platform/database/neon) and
|
|
274
|
+
[PlanetScale Postgres](/platform/database/planetscale-postgres).
|
|
275
|
+
|
|
257
276
|
### Embeddings
|
|
258
277
|
|
|
259
278
|
When any feature has `embeddings` configured:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quickback-dev/cli",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.11",
|
|
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/skill/SKILL.md
CHANGED
|
@@ -6,18 +6,24 @@ allowed-tools: Read, Grep, Glob, Edit, Write
|
|
|
6
6
|
|
|
7
7
|
# Quickback
|
|
8
8
|
|
|
9
|
-
Quickback is a **backend compiler**. Define your database schema and security rules in TypeScript; compile them into
|
|
9
|
+
Quickback is a **backend compiler**. Define your database schema and security rules in TypeScript; compile them into a Hono API running on Cloudflare Workers. Pair the output with the Quickback Stack for a complete Supabase alternative on Cloudflare.
|
|
10
10
|
|
|
11
11
|
It's two products:
|
|
12
12
|
|
|
13
13
|
## 1. Quickback Compiler — the build tool
|
|
14
14
|
|
|
15
|
-
Define schema + security in TypeScript. Compile to
|
|
15
|
+
Define schema + security in TypeScript. Compile to a full Hono application with
|
|
16
|
+
CRUD, batch endpoints, OpenAPI, and an MCP server, on one of three registered
|
|
17
|
+
database providers:
|
|
16
18
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
+
- **`cloudflare-d1`** — edge SQLite, the default.
|
|
20
|
+
- **`neon`** — Postgres over HTTP, WebSocket or Cloudflare Hyperdrive.
|
|
21
|
+
- **`planetscale-postgres`** — the same Postgres emitters, Hyperdrive only. Compiler support; live acceptance pending. `planetscale` without the suffix means MySQL and is not registered.
|
|
19
22
|
|
|
20
|
-
The same `defineTable()` definitions work
|
|
23
|
+
The same `defineTable()` definitions work across every provider. On Postgres,
|
|
24
|
+
the compiler additionally emits **backstop** Row Level Security: it fences
|
|
25
|
+
tenant scope, soft delete and lane admission only — roles, status, transitions
|
|
26
|
+
and masking stay with the API. The compiler runs as a remote service at `compiler.quickback.dev` (override with `QUICKBACK_API_URL`) — the CLI is a thin client that sends config + features and writes the generated files.
|
|
21
27
|
|
|
22
28
|
## 2. Quickback Stack — the runtime services
|
|
23
29
|
|
|
@@ -409,7 +415,7 @@ The path layout mirrors the public docs site (https://docs.quickback.dev). Open
|
|
|
409
415
|
|
|
410
416
|
**Platform services** (`docs/platform/<topic>.md`)
|
|
411
417
|
- `cloudflare` — the Workers runtime target
|
|
412
|
-
- `database/{index,d1,neon}` — D1 and Neon/Postgres
|
|
418
|
+
- `database/{index,d1,neon,planetscale-postgres}` — D1, and Neon / PlanetScale Postgres
|
|
413
419
|
- `auth` — Better Auth integration, JWT optimization, plugins, device-auth, security
|
|
414
420
|
- `storage/{kv,r2}` — using KV and R2 in actions
|
|
415
421
|
- `realtime` — Durable Objects, WebSocket
|
|
@@ -70,7 +70,7 @@ When explaining compile outputs:
|
|
|
70
70
|
|
|
71
71
|
Detect the database dialect from `quickback.config.ts`:
|
|
72
72
|
- Cloudflare D1 / SQLite: Use `sqliteTable`, `text`, `integer` from `drizzle-orm/sqlite-core`
|
|
73
|
-
-
|
|
73
|
+
- Neon / PlanetScale Postgres / PostgreSQL: Use `pgTable`, `text`, `boolean`, `timestamp` from `drizzle-orm/pg-core`
|
|
74
74
|
|
|
75
75
|
### Table Definition Pattern (recommended: `feature()` + `q.scope()`)
|
|
76
76
|
|
|
@@ -273,24 +273,30 @@ and, for Neon, its **connection mode** — supports interactive transactions.
|
|
|
273
273
|
The response's `meta.transactional` flag tells you which guarantee you
|
|
274
274
|
actually got — inspect it in clients that care about rollback.
|
|
275
275
|
|
|
276
|
-
Neon is transactional
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
276
|
+
Neon is transactional over **websocket** (`connectionMode: 'websocket'`, the
|
|
277
|
+
default on Node/Bun runtimes) and over **hyperdrive** (postgres.js on a
|
|
278
|
+
Cloudflare Hyperdrive binding — the only Neon mode with interactive
|
|
279
|
+
transactions on Workers). Over HTTP — the default on Cloudflare Workers — the
|
|
280
|
+
`drizzle-orm/neon-http` driver has no `db.transaction()` (it throws at
|
|
281
|
+
runtime), so Neon-over-HTTP batches behave exactly like D1: fail-fast
|
|
282
|
+
per-record loop, `meta.transactional: false`.
|
|
283
|
+
|
|
284
|
+
[PlanetScale Postgres](/platform/database/planetscale-postgres) is Hyperdrive-only
|
|
285
|
+
and therefore always transactional — it shares the `postgres-js-hyperdrive`
|
|
286
|
+
transport with Neon's hyperdrive mode.
|
|
281
287
|
|
|
282
288
|
### Per-Provider Matrix
|
|
283
289
|
|
|
284
290
|
| Endpoint | Provider | `failFast` | `meta.transactional` | Behavior |
|
|
285
291
|
|----------|----------|-----------|----------------------|----------|
|
|
286
|
-
| `PATCH /batch` (update) | tx-supporting (postgres, neon over websocket) | `true` | `true` | `db.transaction()` wraps the per-record loop. Any failure rolls back ALL writes in the batch. |
|
|
292
|
+
| `PATCH /batch` (update) | tx-supporting (postgres, neon over websocket/hyperdrive, planetscale-postgres) | `true` | `true` | `db.transaction()` wraps the per-record loop. Any failure rolls back ALL writes in the batch. |
|
|
287
293
|
| `PATCH /batch` (update) | (any) | `false` | `false` | Per-record loop, partial success. Each record commits independently. |
|
|
288
294
|
| `PATCH /batch` (update) | cloudflare-d1, neon over http (Cloudflare default) | `true` | `false` | Fail-fast loop without rollback — the driver has no `db.transaction`. Records before the failure stay committed. |
|
|
289
|
-
| `PUT /batch` (upsert) | tx-supporting (postgres, neon over websocket) | `true` | `true` | Bulk insert + per-record update share one transaction. Any failure rolls back both. |
|
|
295
|
+
| `PUT /batch` (upsert) | tx-supporting (postgres, neon over websocket/hyperdrive, planetscale-postgres) | `true` | `true` | Bulk insert + per-record update share one transaction. Any failure rolls back both. |
|
|
290
296
|
| `PUT /batch` (upsert) | cloudflare-d1, neon over http (Cloudflare default) | `true` | `false` | Bulk insert commits; per-record update loop is fail-fast without rollback. |
|
|
291
297
|
| `POST /batch` (create) | (any) | (any) | `true` | Single bulk `INSERT` — atomic at the DB level. |
|
|
292
298
|
| `DELETE /batch` | (any) | (any) | `true` | Single bulk `UPDATE` (soft) or `DELETE` (hard) — atomic at the DB level. |
|
|
293
|
-
| [Changeset](/define/changesets) (`application/vnd.quickback.changeset+json`) | tx-supporting (postgres, neon over websocket/hyperdrive) | n/a | `true` | Root op + every child op share one transaction; any op failure rolls back the whole changeset. |
|
|
299
|
+
| [Changeset](/define/changesets) (`application/vnd.quickback.changeset+json`) | tx-supporting (postgres, neon over websocket/hyperdrive, planetscale-postgres) | n/a | `true` | Root op + every child op share one transaction; any op failure rolls back the whole changeset. |
|
|
294
300
|
| [Changeset](/define/changesets) | cloudflare-d1, neon over http (Cloudflare default) | n/a | `false` | Deterministic parent-first fail-fast — the first op failure stops the changeset; already-applied ops stay committed (a consistent, independently-authorized prefix). |
|
|
295
301
|
|
|
296
302
|
### Reading `meta.transactional` in clients
|
|
@@ -417,7 +417,7 @@ it; `meta.transactional` reports the actual guarantee (same contract as
|
|
|
417
417
|
|
|
418
418
|
| Provider | transactional | Behavior |
|
|
419
419
|
|---|---|---|
|
|
420
|
-
| postgres /
|
|
420
|
+
| postgres / neon (websocket / hyperdrive) / planetscale-postgres (hyperdrive) / libsql / better-sqlite3 / bun-sqlite | `true` | One transaction; any op failure rolls back the root op and every child op |
|
|
421
421
|
| cloudflare-d1, neon over http (the Cloudflare default) | `false` | Deterministic parent-first **fail-fast**: the first failure stops the changeset; ops already applied stay committed (a consistent prefix — each was independently authorized) |
|
|
422
422
|
|
|
423
423
|
## Calling it from authored code
|
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
The firewall generates WHERE clauses automatically to isolate data by user, organization, or team.
|
|
4
4
|
|
|
5
|
+
The firewall is also **the only security pillar that lowers to SQL**. On a Postgres
|
|
6
|
+
provider the compiler mirrors it into backstop Row Level Security — tenant scope,
|
|
7
|
+
owner scope, soft delete and lane admission — so a custom route or a mis-scoped
|
|
8
|
+
handle cannot escape it. Roles, status, transitions and masking stay in the API and
|
|
9
|
+
appear in no policy. See [Security Overview](/define/security#where-each-pillar-is-enforced)
|
|
10
|
+
and [Row Level Security](/platform/database/neon#row-level-security).
|
|
11
|
+
|
|
5
12
|
## Basic Usage
|
|
6
13
|
|
|
7
14
|
The cleanest pattern is `q.scope()` — declare the tenant column once and the firewall is auto-derived:
|
|
@@ -224,8 +224,8 @@ If you have an existing Drizzle schema you're bringing forward — or need a dia
|
|
|
224
224
|
| Target Database | Import From | Table Function |
|
|
225
225
|
|-----------------|-------------|----------------|
|
|
226
226
|
| Cloudflare D1, Turso, SQLite | `drizzle-orm/sqlite-core` | `sqliteTable` |
|
|
227
|
-
|
|
|
228
|
-
|
|
|
227
|
+
| Neon, PlanetScale Postgres, PostgreSQL | `drizzle-orm/pg-core` | `pgTable` |
|
|
228
|
+
| MySQL (`planetscale`, `mysql`) — dialect only, no registered provider | `drizzle-orm/mysql-core` | `mysqlTable` |
|
|
229
229
|
|
|
230
230
|
```typescript
|
|
231
231
|
// quickback/features/jobs/jobs.ts
|
|
@@ -274,7 +274,7 @@ Default to `feature()`. Drop to Drizzle only when:
|
|
|
274
274
|
|
|
275
275
|
Features in the same project may mix freely — Quickback dispatches per feature — so one interop table doesn't force the rest of the project off `feature()`.
|
|
276
276
|
|
|
277
|
-
One dialect rule: interop files **without** a `defineTable(...)` default export (internal child tables) are not dialect-translated — author them in the target database's dialect. On Postgres providers (
|
|
277
|
+
One dialect rule: interop files **without** a `defineTable(...)` default export (internal child tables) are not dialect-translated — author them in the target database's dialect. On Postgres providers (`neon`, `planetscale-postgres`), a `sqliteTable` interop source without `defineTable` is a compile-time error; write it with `pgTable` from `drizzle-orm/pg-core` instead. Sources **with** `defineTable(...)` keep compiling across dialects automatically.
|
|
278
278
|
|
|
279
279
|
### Drizzle Column Types
|
|
280
280
|
|
|
@@ -747,6 +747,10 @@ selector/typeahead controls:
|
|
|
747
747
|
|
|
748
748
|
{/* doc-compile: skip — cross-table column excerpt; the complete table forms appear at the top of this page. */}
|
|
749
749
|
```typescript
|
|
750
|
+
// features/applications/applications.ts
|
|
751
|
+
import candidates from "../candidates/candidates";
|
|
752
|
+
import jobs from "../jobs/jobs";
|
|
753
|
+
|
|
750
754
|
const applications = q.table("applications", {
|
|
751
755
|
id: q.id(),
|
|
752
756
|
candidateId: q.text().required().references(() => candidates.id),
|
|
@@ -754,6 +758,11 @@ const applications = q.table("applications", {
|
|
|
754
758
|
});
|
|
755
759
|
```
|
|
756
760
|
|
|
761
|
+
When the target table lives in **another feature**, import it in the table
|
|
762
|
+
file — `import <table> from "../<feature>/<table>"`, one `../`, since table
|
|
763
|
+
files sit at `features/<feature>/`. The thunk names a real binding; without
|
|
764
|
+
the import the generated schema fails migration generation.
|
|
765
|
+
|
|
757
766
|
Do this even when a column name appears obvious, such as `sessionId` beside a
|
|
758
767
|
`sessions` table. A matching `*Id` name is a useful compiler suggestion when a
|
|
759
768
|
relationship might be missing; it is not enough evidence to silently invent
|
|
@@ -19,6 +19,28 @@ Views and Guards are documented under **Reads** and **Writes** rather than under
|
|
|
19
19
|
Security, because that is where you are when you need them: a view is a shape you
|
|
20
20
|
return, a guard is a rule about a write. They are security mechanisms either way.
|
|
21
21
|
|
|
22
|
+
## Where each pillar is enforced
|
|
23
|
+
|
|
24
|
+
All six pillars run in the API. On a Postgres provider ([Neon](/platform/database/neon),
|
|
25
|
+
[PlanetScale Postgres](/platform/database/planetscale-postgres)) the compiler *also*
|
|
26
|
+
emits Row Level Security — but only as a **backstop**, and only for one pillar:
|
|
27
|
+
|
|
28
|
+
> **The firewall is the only pillar that lowers to SQL.** Generated RLS fences tenant
|
|
29
|
+
> scope, owner scope, soft delete and lane admission. Roles, status, transitions,
|
|
30
|
+
> masking and record conditions are the API's job and appear in no policy body — no
|
|
31
|
+
> generated policy names an authored role.
|
|
32
|
+
|
|
33
|
+
The backstop exists so a bug in a custom route or a mis-scoped handle cannot cross a
|
|
34
|
+
tenant, resurrect a soft-deleted row, or read another owner's row. It is not a second
|
|
35
|
+
copy of `access`. A scoped-role gate or an `access.record` owner rule is an **Access**
|
|
36
|
+
decision and stays in the API; if an owner boundary must hold at the database, author
|
|
37
|
+
it as `firewall.owner`, which does lower.
|
|
38
|
+
|
|
39
|
+
Better Auth's tables carry the same backstop, and **Better Auth's own API is the gate
|
|
40
|
+
for its tables** — the caller lane never writes them. On D1 there is no RLS at all:
|
|
41
|
+
enforcement is the API plus the fact that the database is unreachable except through
|
|
42
|
+
your Worker. See [D1 vs Neon RLS](/platform/database/d1#comparison-with-neon-rls).
|
|
43
|
+
|
|
22
44
|
## Firewall — which rows
|
|
23
45
|
|
|
24
46
|
The firewall is tenant isolation. It rewrites every query so a caller can only ever
|
|
@@ -56,7 +56,11 @@ These are Better Auth's built-in organization roles — no configuration needed.
|
|
|
56
56
|
|
|
57
57
|
> **Tip:** Account UI's role picker uses these exact three roles. Use `["owner", "admin", "member"]` in your [Access](/define/access) rules so generated projects plug into Better Auth and Account UI seamlessly.
|
|
58
58
|
|
|
59
|
-
Roles are used throughout the security layers — in [Access](/define/access) rules
|
|
59
|
+
Roles are used throughout the security layers — in [Access](/define/access) rules and
|
|
60
|
+
[Firewall](/define/firewall) owner checks. Roles are an **API** gate: they do not reach SQL.
|
|
61
|
+
Generated [Row Level Security](/platform/database/neon#row-level-security) is a backstop that
|
|
62
|
+
fences tenant scope, soft delete and lane admission only, and no generated policy body names a
|
|
63
|
+
role. Better Auth's own API is the gate for its tables.
|
|
60
64
|
|
|
61
65
|
## Next Steps
|
|
62
66
|
|
|
@@ -1086,6 +1086,24 @@ Mixed database providers (e.g. D1 auth + Neon features) remain unsupported.
|
|
|
1086
1086
|
|
|
1087
1087
|
## Deploying
|
|
1088
1088
|
|
|
1089
|
+
### Projects with no custom domain
|
|
1090
|
+
|
|
1091
|
+
A Worker that lives only on `workers.dev` (no `providers.runtime.config.routes`,
|
|
1092
|
+
no `domains`) must tell the generated auth layer its own host. Without it the
|
|
1093
|
+
JWT issuer defaults to the local dev URL and cookie-backed browser mutations are
|
|
1094
|
+
refused as cross-site:
|
|
1095
|
+
|
|
1096
|
+
```sh
|
|
1097
|
+
npx wrangler deploy \
|
|
1098
|
+
--var EXTRA_APP_HOSTS:<name>.<account>.workers.dev \
|
|
1099
|
+
--var BETTER_AUTH_URL:https://<name>.<account>.workers.dev
|
|
1100
|
+
```
|
|
1101
|
+
|
|
1102
|
+
Named environments set `BETTER_AUTH_URL` in `worker.vars` (see above);
|
|
1103
|
+
`EXTRA_APP_HOSTS` is documented under
|
|
1104
|
+
[Multi-domain architecture](/configure/domains#one-bundle-several-hostnames).
|
|
1105
|
+
|
|
1106
|
+
|
|
1089
1107
|
For an unnamed target, the generated `deploy` script runs migrations, then
|
|
1090
1108
|
ships the Worker:
|
|
1091
1109
|
|
|
@@ -7,12 +7,20 @@ schema, the same Better Auth wiring, the same
|
|
|
7
7
|
migrations. For identical definitions the generated schema and security
|
|
8
8
|
migrations are byte-identical between the two providers.
|
|
9
9
|
|
|
10
|
-
> **
|
|
11
|
-
>
|
|
12
|
-
>
|
|
13
|
-
>
|
|
14
|
-
>
|
|
15
|
-
>
|
|
10
|
+
> **Proven live end to end (2026-09-07).** The direct-connection contract, the
|
|
11
|
+
> Hyperdrive transport, and a generated project's Worker were each run against a
|
|
12
|
+
> real PlanetScale Postgres 18 branch. Against a real PlanetScale Postgres 18 branch, the
|
|
13
|
+
> generated journal applied unchanged: role bootstrap with `CREATE ROLE`
|
|
14
|
+
> verbatim, ownership transfer to `quickback_owner`, the RLS backstop through
|
|
15
|
+
> the emitted client as the restricted role, interactive transaction commit and
|
|
16
|
+
> rollback, incremental migration as `quickback_admin`, and a migration ledger
|
|
17
|
+
> the runtime cannot read. The `recruitment` example, compiled with this provider,
|
|
18
|
+
> applied its four-file upgrade journal, then served sign-up, sessions, organization
|
|
19
|
+
> activation, tenant CRUD, a named view and an action through a cache-disabled
|
|
20
|
+
> Hyperdrive config connected as `quickback.<branch_id>`, with every security
|
|
21
|
+
> layer answering correctly. Not yet exercised there: outbound webhook delivery,
|
|
22
|
+
> realtime traffic and the automated acceptance manifest. Sanitized record in the
|
|
23
|
+
> repository's `plans/postgres-acceptance-results.md`.
|
|
16
24
|
|
|
17
25
|
|
|
18
26
|
## Configuration
|
|
@@ -179,24 +187,50 @@ never silently-broken output:
|
|
|
179
187
|
| `webhooksDatabaseId` / `webhooksDatabaseName` | rejected — D1-only keys; webhook tables live in the `webhooks` schema of the same database |
|
|
180
188
|
| `connectionMode` of `'http'` or `'websocket'` | rejected — no such driver for this provider |
|
|
181
189
|
|
|
182
|
-
##
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
190
|
+
## Live acceptance findings
|
|
191
|
+
|
|
192
|
+
Answered by the direct-connection spike on 2026-09-07 (PostgreSQL 18.6,
|
|
193
|
+
postgres.js 3.4.9, drizzle-orm 0.45.2; sanitized record in the repository's
|
|
194
|
+
`plans/postgres-acceptance-results.md`):
|
|
195
|
+
|
|
196
|
+
- **`CREATE ROLE … NOLOGIN NOBYPASSRLS`** runs verbatim from the generated
|
|
197
|
+
journal as the vendor default role. No vendor role API is needed.
|
|
198
|
+
- **Ownership transfer** with `ALTER … OWNER TO quickback_owner` works,
|
|
199
|
+
including `ALTER SCHEMA public`.
|
|
200
|
+
- **`SECURITY DEFINER` with a pinned `search_path`**, `GRANT … WITH SET TRUE`
|
|
201
|
+
and `REVOKE CREATE ON SCHEMA public FROM PUBLIC` are all accepted.
|
|
202
|
+
- **`SET LOCAL ROLE quickback` from the vendor default role is refused**
|
|
203
|
+
(SQLSTATE 42501). PostgreSQL 16+ gives a role's creator ADMIN OPTION but not
|
|
204
|
+
SET. This does not affect the shipped design: the Worker connects directly as
|
|
205
|
+
the restricted role through Hyperdrive, and `quickback_admin` holds SET on it
|
|
206
|
+
for routine migrations. Do not work around it by granting the default role
|
|
207
|
+
more; it is the setup actor only and carries `BYPASSRLS`.
|
|
208
|
+
- **Connection username** is `<role>.<branch_id>`; SQL role names stay bare.
|
|
209
|
+
Create the Hyperdrive origin credential as `quickback.<branch_id>`.
|
|
210
|
+
- **Extensions:** the journal needs only `plpgsql`. `pgcrypto`, `uuid-ossp`,
|
|
211
|
+
`vector`, `pg_trgm`, `citext` and `pg_cron` are available if a project
|
|
212
|
+
declares them.
|
|
213
|
+
|
|
214
|
+
Still to prove, and the reason this page keeps a qualifier: the deployed
|
|
215
|
+
Hyperdrive run, and one provider-independent item — the generated RLS helper
|
|
216
|
+
functions end up owned by the migrating actor rather than `quickback_owner`,
|
|
217
|
+
which is why a changed security migration currently needs the setup-owner
|
|
218
|
+
credential (see [Neon](/platform/database/neon#upgrading-an-existing-database)).
|
|
219
|
+
|
|
220
|
+
## Deploying to workers.dev only
|
|
221
|
+
|
|
222
|
+
A project with no custom domain must tell the generated auth layer its own
|
|
223
|
+
host, or the JWT issuer defaults to the local dev URL and browser mutations
|
|
224
|
+
fail the origin check:
|
|
225
|
+
|
|
226
|
+
```sh
|
|
227
|
+
npx wrangler deploy \
|
|
228
|
+
--var EXTRA_APP_HOSTS:<name>.<account>.workers.dev \
|
|
229
|
+
--var BETTER_AUTH_URL:https://<name>.<account>.workers.dev
|
|
230
|
+
```
|
|
197
231
|
|
|
198
|
-
|
|
199
|
-
|
|
232
|
+
Projects with `providers.runtime.config.routes` or `domains` get both from
|
|
233
|
+
the configured hostnames automatically.
|
|
200
234
|
|
|
201
235
|
## See also
|
|
202
236
|
|
|
@@ -167,8 +167,8 @@ blocks the write.
|
|
|
167
167
|
|
|
168
168
|
The SQL dialect for written declarations comes from your configured database
|
|
169
169
|
provider — the same provider→dialect table the compiler uses. Postgres
|
|
170
|
-
providers (`
|
|
171
|
-
get Postgres declarations; SQLite providers (`cloudflare-d1`,
|
|
170
|
+
providers (`neon`, `planetscale-postgres`, `supabase`, `vercel-postgres`,
|
|
171
|
+
`postgres`, `postgresql`) get Postgres declarations; SQLite providers (`cloudflare-d1`,
|
|
172
172
|
`better-sqlite3`, `bun-sqlite`, `libsql`, `turso`) get SQLite. MySQL
|
|
173
173
|
providers are refused with an error rather than written in the wrong
|
|
174
174
|
dialect; no provider (or an unrecognized one) defaults to SQLite.
|
|
@@ -254,6 +254,25 @@ projects acquire build and deployment fixes without losing unrelated tooling.
|
|
|
254
254
|
|
|
255
255
|
These files are generated only when the corresponding features are configured:
|
|
256
256
|
|
|
257
|
+
### Database provider setup files
|
|
258
|
+
|
|
259
|
+
Every compile emits an environment example named for the configured provider.
|
|
260
|
+
Postgres providers additionally emit a setup guide under `docs/` and the auth
|
|
261
|
+
schema qualifier script:
|
|
262
|
+
|
|
263
|
+
| Provider | Emitted |
|
|
264
|
+
|----------|---------|
|
|
265
|
+
| `cloudflare-d1` | `.env.cloudflare-d1.example`, `wrangler.d1.example`, `drizzle.auth.config.ts` (dual-database mode) |
|
|
266
|
+
| `neon` | `.env.neon.example`, `.dev.vars.example`, `docs/neon-setup.md`, `scripts/quickback-qualify-auth-schema.mjs` |
|
|
267
|
+
| `planetscale-postgres` | `.env.planetscale.example`, `.dev.vars.example`, `docs/planetscale-postgres-setup.md`, `scripts/quickback-qualify-auth-schema.mjs` |
|
|
268
|
+
|
|
269
|
+
The setup guide is host-specific — role bootstrap, the connection username, the
|
|
270
|
+
Hyperdrive binding and named environments — and is regenerated on every compile.
|
|
271
|
+
Both Postgres providers keep auth and feature tables in **one** database, so
|
|
272
|
+
they emit a single `drizzle.config.ts` rather than the D1 dual-database pair.
|
|
273
|
+
See [Neon](/platform/database/neon) and
|
|
274
|
+
[PlanetScale Postgres](/platform/database/planetscale-postgres).
|
|
275
|
+
|
|
257
276
|
### Embeddings
|
|
258
277
|
|
|
259
278
|
When any feature has `embeddings` configured:
|