@quickback-dev/cli 0.66.3 → 0.66.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/skill/docs/api/errors.md +1 -1
  3. package/dist/skill/docs/api/openapi.md +26 -6
  4. package/dist/skill/docs/changelog/index.md +31 -0
  5. package/dist/skill/docs/configure/agents.md +2 -2
  6. package/dist/skill/docs/configure/auth.md +17 -3
  7. package/dist/skill/docs/define/access.md +29 -6
  8. package/dist/skill/docs/define/firewall.md +1 -0
  9. package/dist/skill/docs/define/guards.md +16 -11
  10. package/dist/skill/docs/define/scopes.md +33 -0
  11. package/dist/skill/docs/platform/api-contract/index.md +36 -1
  12. package/dist/skill/docs/platform/auth/security.md +40 -15
  13. package/dist/skill/docs/platform/realtime/using-realtime.md +8 -0
  14. package/dist/skill/docs/platform/storage/r2.md +9 -6
  15. package/dist/skill/docs/platform/storage/using-r2.md +23 -8
  16. package/dist/skill/docs/ui/account/features/admin.md +3 -1
  17. package/package.json +1 -1
  18. package/src/skill/docs/api/errors.md +1 -1
  19. package/src/skill/docs/api/openapi.md +26 -6
  20. package/src/skill/docs/changelog/index.md +31 -0
  21. package/src/skill/docs/configure/agents.md +2 -2
  22. package/src/skill/docs/configure/auth.md +17 -3
  23. package/src/skill/docs/define/access.md +29 -6
  24. package/src/skill/docs/define/firewall.md +1 -0
  25. package/src/skill/docs/define/guards.md +16 -11
  26. package/src/skill/docs/define/scopes.md +33 -0
  27. package/src/skill/docs/platform/api-contract/index.md +36 -1
  28. package/src/skill/docs/platform/auth/security.md +40 -15
  29. package/src/skill/docs/platform/realtime/using-realtime.md +8 -0
  30. package/src/skill/docs/platform/storage/r2.md +9 -6
  31. package/src/skill/docs/platform/storage/using-r2.md +23 -8
  32. package/src/skill/docs/ui/account/features/admin.md +3 -1
  33. package/dist/codex/AGENTS.md +0 -290
  34. package/dist/commands/codex.d.ts +0 -16
  35. package/dist/commands/codex.d.ts.map +0 -1
  36. package/dist/commands/codex.js +0 -159
  37. package/dist/commands/codex.js.map +0 -1
  38. package/dist/commands/compile.d.ts +0 -62
  39. package/dist/commands/compile.d.ts.map +0 -1
  40. package/dist/commands/compile.js +0 -830
  41. package/dist/commands/compile.js.map +0 -1
  42. package/dist/commands/compile.test.d.ts +0 -2
  43. package/dist/commands/compile.test.d.ts.map +0 -1
  44. package/dist/commands/compile.test.js +0 -150
  45. package/dist/commands/compile.test.js.map +0 -1
  46. package/dist/commands/init.d.ts +0 -6
  47. package/dist/commands/init.d.ts.map +0 -1
  48. package/dist/commands/init.js +0 -405
  49. package/dist/commands/init.js.map +0 -1
  50. package/dist/docs/content.d.ts +0 -7
  51. package/dist/docs/content.d.ts.map +0 -1
  52. package/dist/docs/content.js +0 -672
  53. package/dist/docs/content.js.map +0 -1
  54. package/dist/lib/helpers.d.ts +0 -39
  55. package/dist/lib/helpers.d.ts.map +0 -1
  56. package/dist/lib/helpers.js +0 -299
  57. package/dist/lib/helpers.js.map +0 -1
  58. package/dist/lib/sweep-stale.d.ts +0 -25
  59. package/dist/lib/sweep-stale.d.ts.map +0 -1
  60. package/dist/lib/sweep-stale.js +0 -179
  61. package/dist/lib/sweep-stale.js.map +0 -1
  62. package/dist/lib/sweep-stale.test.d.ts +0 -2
  63. package/dist/lib/sweep-stale.test.d.ts.map +0 -1
  64. package/dist/lib/sweep-stale.test.js +0 -130
  65. package/dist/lib/sweep-stale.test.js.map +0 -1
@@ -1,290 +0,0 @@
1
- # Quickback
2
-
3
- Quickback is two things:
4
-
5
- 1. **Compiler** — Transforms declarative TypeScript definitions into secure, production-ready APIs
6
- 2. **Stack** — A Supabase alternative running entirely on Cloudflare (D1, R2, KV, Durable Objects, Queues, Workers AI)
7
-
8
- The output is standard TypeScript (Hono, Drizzle, Better Auth) running on your own infrastructure.
9
-
10
- ## Project Structure
11
-
12
- ```
13
- my-app/
14
- ├── quickback/
15
- │ ├── quickback.config.ts
16
- │ └── features/
17
- │ └── {feature-name}/
18
- │ ├── {table}.ts # Schema + security (defineTable)
19
- │ ├── actions/ # One file per action — defineAction({...}) (optional)
20
- │ │ ├── {action}.ts # Binds to primary table (or standalone if path: is set)
21
- │ │ └── {table}/{action}.ts # Binds to sibling <table>.ts (multi-table features)
22
- │ └── lib/ # Feature-local helpers, copied verbatim (optional)
23
- └── ...
24
- ```
25
-
26
- ## quickback.config.ts
27
-
28
- ```typescript
29
- import { defineConfig, defineRuntime, defineDatabase, defineAuth } from '@quickback/compiler';
30
-
31
- export default defineConfig({
32
- name: "my-saas-app",
33
- providers: {
34
- runtime: defineRuntime("cloudflare"),
35
- database: defineDatabase("cloudflare-d1"),
36
- auth: defineAuth("better-auth"),
37
- },
38
- });
39
- ```
40
-
41
- ## Automatic Audit Fields
42
-
43
- Quickback auto-injects: `createdAt`, `modifiedAt`, `deletedAt`, `createdBy`, `modifiedBy`, `deletedBy`. Do NOT define these in schemas.
44
-
45
- ## defineTable() — Schema + Security
46
-
47
- Each feature file exports a Drizzle table and a `defineTable()` default export with security config:
48
-
49
- ```typescript
50
- import { sqliteTable, text, integer } from "drizzle-orm/sqlite-core";
51
- import { defineTable } from "@quickback/compiler";
52
-
53
- export const todos = sqliteTable("todos", {
54
- id: integer("id").primaryKey(),
55
- title: text("title").notNull(),
56
- description: text("description"),
57
- completed: integer("completed", { mode: "boolean" }).default(false),
58
- userId: text("user_id").notNull(),
59
- organizationId: text("organization_id").notNull(),
60
- });
61
-
62
- export default defineTable(todos, {
63
- firewall: [
64
- { field: "organizationId", equals: "ctx.activeOrgId" },
65
- { field: "userId", equals: "ctx.userId" },
66
- { field: "deletedAt", isNull: true },
67
- ],
68
- read: { access: { roles: ["member", "admin"] } },
69
- create: { access: { roles: ["member", "admin"] } },
70
- update: { access: { roles: ["admin"] } },
71
- delete: { access: { roles: ["admin"] }, mode: "soft" },
72
- guards: {
73
- createable: ["title", "description", "completed"],
74
- updatable: ["title", "description", "completed"],
75
- },
76
- masking: {
77
- userId: { type: "redact", show: { roles: ["admin"] } },
78
- },
79
- });
80
- ```
81
-
82
- ## Four Security Layers
83
-
84
- Every request passes through: `Request → Firewall → Access → Guards → Database → Masking → Response`
85
-
86
- ### 1. Firewall — Data Isolation
87
-
88
- Auto WHERE clauses for tenant isolation. Predicates are AND'd:
89
-
90
- ```typescript
91
- firewall: [
92
- { field: 'organizationId', equals: 'ctx.activeOrgId' }, // WHERE organizationId = ctx.activeOrgId
93
- { field: 'ownerId', equals: 'ctx.userId' }, // AND ownerId = ctx.userId
94
- { field: 'teamId', equals: 'ctx.activeTeamId' }, // AND teamId = ctx.activeTeamId
95
- { field: 'deletedAt', isNull: true }, // AND deletedAt IS NULL
96
- ]
97
-
98
- // Public/system resources opt out of tenant scoping (soft-delete still applied):
99
- firewall: [{ exception: true }]
100
- ```
101
-
102
- Auto-derived when omitted: scans the schema for `organizationId` / `ownerId` / `teamId` and emits matching predicates. Two or more isolation columns → declare explicitly.
103
-
104
- ### 2. Access — Permission Checks
105
-
106
- Role-based and record-based (deny by default). Reads (`GET /` and `GET /:id`) gate via `read.access`; mutations gate via `create.access`, `update.access`, `delete.access`, and `upsert.access`.
107
-
108
- ```typescript
109
- read: { access: { roles: ['member'] } }, // gates GET / and GET /:id
110
- create: { access: { roles: ['admin'] } },
111
- update: {
112
- access: {
113
- or: [
114
- { roles: ['admin'] },
115
- { record: { createdBy: { equals: '$ctx.userId' } } },
116
- ],
117
- },
118
- },
119
- delete: { access: { roles: ['admin'] } },
120
- ```
121
-
122
- > **DSL v2:** `crud.list` and `crud.get` are rejected at compile time. Move them to `read.access`.
123
-
124
- Operators: `equals`, `notEquals`, `in`, `notIn`, `greaterThan`, `lessThan`
125
- Context: `$ctx.userId`, `$ctx.activeOrgId`, `$ctx.roles`
126
-
127
- ### 3. Guards — Field Protection
128
-
129
- ```typescript
130
- guards: {
131
- createable: ['name', 'description'],
132
- updatable: ['description'],
133
- immutable: ['invoiceNumber'],
134
- protected: { status: ['approve'] }, // Only via named actions
135
- }
136
- ```
137
-
138
- ### 4. Masking — PII Redaction
139
-
140
- ```typescript
141
- masking: {
142
- ssn: { type: 'ssn', show: { roles: ['admin'] } },
143
- email: { type: 'email', show: { roles: ['admin'], or: 'owner' } },
144
- }
145
- ```
146
-
147
- Types: `email`, `phone`, `ssn`, `creditCard`, `name`, `redact`, `custom`
148
-
149
- ## Views — Column Projections
150
-
151
- ```typescript
152
- views: {
153
- summary: { fields: ['id', 'name'], access: { roles: ['member'] } },
154
- full: { fields: ['id', 'name', 'phone', 'ssn'], access: { roles: ['admin'] } },
155
- }
156
- ```
157
-
158
- ## Validation
159
-
160
- ```typescript
161
- validation: {
162
- name: { minLength: 1, maxLength: 100 },
163
- capacity: { min: 1, max: 1000 },
164
- roomType: { enum: ['meeting', 'conference'] },
165
- email: { email: true },
166
- }
167
- ```
168
-
169
- ## Actions — Custom Business Logic
170
-
171
- One file per action under `actions/<name>.ts`. The filename is the action name AND URL segment. `actions/<name>.ts` binds to the feature's primary table; `actions/<table>/<name>.ts` binds to a sibling table. Setting `path:` makes the action standalone.
172
-
173
- ```typescript
174
- // features/todos/actions/complete.ts
175
- import { z } from "zod";
176
- import { eq } from "drizzle-orm";
177
- import { defineAction } from "../.quickback/define-action";
178
- import { todos } from "../todos";
179
-
180
- export default defineAction({
181
- description: "Mark todo as complete",
182
- input: z.object({ completedAt: z.string().datetime().optional() }),
183
- access: { roles: ["member", "admin"], record: { completed: { equals: false } } },
184
- async execute({ db, record, auditFields }) {
185
- await db.update(todos)
186
- .set({ completed: true, modifiedAt: auditFields!.modifiedAt })
187
- .where(eq(todos.id, record.id));
188
- return { success: true };
189
- },
190
- });
191
- ```
192
-
193
- Record-based (no `path:`): `POST /api/v1/{resource}/:id/{action}`
194
- Standalone (`path:` set): custom `path` and `method`
195
-
196
- `execute:` must be an `async (ctx) => { … }` arrow function. Retired (rejected at load time): bundled `actions.ts`, `_feature.ts`, `handlers/` directory, `defineActions()`.
197
-
198
- ### Actions-Only Features (no tables)
199
-
200
- A feature with no top-level `*.ts` files is "tableless" — every action must be standalone (have `path:`).
201
-
202
- ```typescript
203
- // quickback/features/utilities/actions/health-check.ts
204
- import { z } from "zod";
205
- import { defineAction } from "../.quickback/define-action";
206
-
207
- export default defineAction({
208
- description: "Health check",
209
- path: "/health",
210
- method: "GET",
211
- input: z.object({}),
212
- access: { roles: ["member", "admin"] },
213
- async execute() { return { ok: true }; },
214
- });
215
- ```
216
-
217
- ### Public Actions
218
-
219
- Use `roles: ["PUBLIC"]` for unauthenticated endpoints. Mandatory audit logged. The wildcard `"*"` is not supported.
220
-
221
- ```typescript
222
- access: { roles: ["PUBLIC"] } // No auth, audit logged
223
- access: { roles: ["member"] } // Requires auth + role
224
- ```
225
-
226
- ## Custom Dependencies
227
-
228
- ```typescript
229
- export default defineConfig({
230
- build: {
231
- dependencies: {
232
- "fast-xml-parser": "^4.5.0",
233
- },
234
- },
235
- });
236
- ```
237
-
238
- ## CMS Layouts
239
-
240
- ```typescript
241
- layouts: {
242
- default: {
243
- sections: [
244
- { label: "Details", columns: 2, fields: ["name", "email"] },
245
- { label: "Notes", collapsed: true, fields: ["notes"] },
246
- ],
247
- },
248
- }
249
- ```
250
-
251
- ## API Reference
252
-
253
- | Method | Endpoint | Description |
254
- |--------|----------|-------------|
255
- | `GET` | `/api/v1/{resource}` | List |
256
- | `GET` | `/api/v1/{resource}/:id` | Get |
257
- | `POST` | `/api/v1/{resource}` | Create |
258
- | `PATCH` | `/api/v1/{resource}/:id` | Update |
259
- | `DELETE` | `/api/v1/{resource}/:id` | Delete |
260
-
261
- Query params: `?limit=50&offset=0`, `?status=active`, `?sort=-createdAt`, `?fields=id,name`, `?search=text`
262
- Filter operators: `.gt`, `.gte`, `.lt`, `.lte`, `.ne`, `.like`, `.in`
263
-
264
- ## Database Dialects
265
-
266
- | Stack | Import | Table Function |
267
- |-------|--------|----------------|
268
- | Cloudflare D1 / SQLite | `drizzle-orm/sqlite-core` | `sqliteTable` |
269
- | Supabase / PostgreSQL | `drizzle-orm/pg-core` | `pgTable` |
270
-
271
- ## Migrations are generated — never hand-merge them
272
-
273
- The files under `quickback/drizzle/` (`*.sql`, `meta/_journal.json`, `meta/*_snapshot.json`) are **generated artifacts**, not source. Never hand-edit them, and never resolve a merge or rebase conflict inside them.
274
-
275
- When integrating a branch: get the feature/schema `.ts` files in first, then run `quickback compile`. The compiler regenerates the migrations from the merged schema and journals them in the correct (append-only) order. Hand-merging migration SQL or snapshots produces schema drift and broken ordering that only surfaces at deploy time. If a migration file conflicts during a merge, take either side to unblock, then recompile and let the compiler restate the migrations.
276
-
277
- ## CLI Commands
278
-
279
- ```bash
280
- quickback create <template> <name> # Create project
281
- quickback compile # Compile definitions
282
- quickback docs [topic] # Show documentation
283
- quickback claude install # Install Claude Code skill
284
- quickback cursor install # Install Cursor rules
285
- quickback codex install # Install Codex AGENTS.md rules
286
- ```
287
-
288
- ## Full Documentation
289
-
290
- https://docs.quickback.dev
@@ -1,16 +0,0 @@
1
- /**
2
- * Codex command - manage ChatGPT Codex AGENTS.md rules.
3
- *
4
- * Codex reads `AGENTS.md` from the project root (merging up the tree), so unlike
5
- * Cursor's dedicated .mdc file the rules live in a file the user may also own.
6
- * We therefore manage only a delimited block, leaving the rest of AGENTS.md
7
- * untouched.
8
- *
9
- * Usage:
10
- * quickback codex install # Add/update the Quickback block in ./AGENTS.md
11
- * quickback codex update # Alias for install (refresh the block)
12
- * quickback codex remove # Strip the Quickback block
13
- * quickback codex status # Check installation status
14
- */
15
- export declare function codex(args: string[]): Promise<void>;
16
- //# sourceMappingURL=codex.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/commands/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAwIH,wBAAsB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBzD"}
@@ -1,159 +0,0 @@
1
- /**
2
- * Codex command - manage ChatGPT Codex AGENTS.md rules.
3
- *
4
- * Codex reads `AGENTS.md` from the project root (merging up the tree), so unlike
5
- * Cursor's dedicated .mdc file the rules live in a file the user may also own.
6
- * We therefore manage only a delimited block, leaving the rest of AGENTS.md
7
- * untouched.
8
- *
9
- * Usage:
10
- * quickback codex install # Add/update the Quickback block in ./AGENTS.md
11
- * quickback codex update # Alias for install (refresh the block)
12
- * quickback codex remove # Strip the Quickback block
13
- * quickback codex status # Check installation status
14
- */
15
- import { readFileSync, writeFileSync, existsSync } from "fs";
16
- import { join, dirname } from "path";
17
- import { fileURLToPath } from "url";
18
- import pc from "picocolors";
19
- const __filename = fileURLToPath(import.meta.url);
20
- const __dirname = dirname(__filename);
21
- const CODEX_BUNDLE = join(__dirname, "..", "codex");
22
- const AGENTS_FILE = join(process.cwd(), "AGENTS.md");
23
- const BEGIN = "<!-- BEGIN QUICKBACK RULES (managed by `quickback codex`) -->";
24
- const END = "<!-- END QUICKBACK RULES -->";
25
- function bundledRules() {
26
- const file = join(CODEX_BUNDLE, "AGENTS.md");
27
- if (!existsSync(file)) {
28
- console.log(pc.red("\nCodex rules not found in CLI bundle."));
29
- console.log(pc.dim("This may indicate an incomplete CLI installation."));
30
- console.log(pc.dim("Try reinstalling: npm install -g @quickback-dev/cli\n"));
31
- return null;
32
- }
33
- return readFileSync(file, "utf-8").trim();
34
- }
35
- function escapeRegExp(s) {
36
- return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
37
- }
38
- /** Returns the AGENTS.md content with the Quickback block removed (trimmed). */
39
- function stripBlock(content) {
40
- const re = new RegExp(`\\n*${escapeRegExp(BEGIN)}[\\s\\S]*?${escapeRegExp(END)}\\n*`, "g");
41
- return content.replace(re, "\n").trim();
42
- }
43
- function hasBlock(content) {
44
- return content.includes(BEGIN) && content.includes(END);
45
- }
46
- function installRules() {
47
- const rules = bundledRules();
48
- if (rules === null)
49
- process.exit(1);
50
- const block = `${BEGIN}\n${rules}\n${END}`;
51
- let next;
52
- if (existsSync(AGENTS_FILE)) {
53
- const current = readFileSync(AGENTS_FILE, "utf-8");
54
- if (hasBlock(current)) {
55
- // Replace the existing managed block in place.
56
- const re = new RegExp(`${escapeRegExp(BEGIN)}[\\s\\S]*?${escapeRegExp(END)}`);
57
- next = current.replace(re, block).trimEnd() + "\n";
58
- }
59
- else {
60
- // Preserve the user's AGENTS.md; append our block.
61
- next = current.trimEnd() + `\n\n${block}\n`;
62
- }
63
- }
64
- else {
65
- next = `${block}\n`;
66
- }
67
- writeFileSync(AGENTS_FILE, next);
68
- console.log(pc.green(` ✓ Quickback rules block → ${AGENTS_FILE}`));
69
- console.log("");
70
- console.log(pc.green("✓ Quickback rules installed for Codex (AGENTS.md)"));
71
- console.log(pc.dim("Consider committing AGENTS.md to your repository.\n"));
72
- }
73
- async function install() {
74
- console.log("");
75
- console.log(pc.bold("Installing Quickback rules for Codex"));
76
- console.log("");
77
- installRules();
78
- }
79
- async function remove() {
80
- if (!existsSync(AGENTS_FILE) || !hasBlock(readFileSync(AGENTS_FILE, "utf-8"))) {
81
- console.log(pc.yellow("\nNo Quickback block found in AGENTS.md.\n"));
82
- return;
83
- }
84
- console.log("");
85
- console.log(pc.bold("Remove Quickback Codex rules"));
86
- console.log("");
87
- const stripped = stripBlock(readFileSync(AGENTS_FILE, "utf-8"));
88
- if (stripped === "") {
89
- // The file held only our block — remove it entirely.
90
- const { rmSync } = await import("fs");
91
- rmSync(AGENTS_FILE, { force: true });
92
- console.log(pc.yellow(` ✓ Removed ${AGENTS_FILE}`));
93
- }
94
- else {
95
- writeFileSync(AGENTS_FILE, stripped + "\n");
96
- console.log(pc.yellow(` ✓ Stripped Quickback block from ${AGENTS_FILE}`));
97
- }
98
- console.log("");
99
- console.log(pc.green("✓ Quickback Codex rules removed.\n"));
100
- }
101
- async function status() {
102
- console.log("");
103
- console.log(pc.bold("Quickback Codex Rules (AGENTS.md)"));
104
- console.log("");
105
- const installed = existsSync(AGENTS_FILE) && hasBlock(readFileSync(AGENTS_FILE, "utf-8"));
106
- if (installed) {
107
- console.log(` ${pc.green("●")} Installed`);
108
- console.log(pc.dim(` ${AGENTS_FILE}`));
109
- }
110
- else {
111
- console.log(` ${pc.dim("○")} Not installed`);
112
- console.log(pc.dim("Run 'quickback codex install' to install the rules.\n"));
113
- }
114
- console.log("");
115
- }
116
- function printHelp() {
117
- console.log(`
118
- ${pc.bold("Quickback Codex Rules (AGENTS.md)")}
119
-
120
- ${pc.bold("USAGE")}
121
- quickback codex <command>
122
-
123
- ${pc.bold("COMMANDS")}
124
- ${pc.cyan("install")} Add/update the Quickback block in ./AGENTS.md
125
- ${pc.cyan("update")} Refresh the block to the latest version
126
- ${pc.cyan("remove")} Strip the Quickback block
127
- ${pc.cyan("status")} Check installation status
128
-
129
- ${pc.bold("EXAMPLES")}
130
- ${pc.gray("# Install rules")}
131
- quickback codex install
132
- `);
133
- }
134
- export async function codex(args) {
135
- const subcommand = args[0];
136
- switch (subcommand) {
137
- case "install":
138
- case "update":
139
- await install();
140
- break;
141
- case "remove":
142
- case "uninstall":
143
- await remove();
144
- break;
145
- case "status":
146
- await status();
147
- break;
148
- case "--help":
149
- case "-h":
150
- case undefined:
151
- printHelp();
152
- break;
153
- default:
154
- console.log(pc.red(`\nUnknown subcommand: ${subcommand}`));
155
- printHelp();
156
- process.exit(1);
157
- }
158
- }
159
- //# sourceMappingURL=codex.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/commands/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAA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E,CAAC,IAAI,CAAC,SAAS,CAAC;IAClB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;IACjB,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;;EAEnB,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC;IACjB,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;;CAE7B,CAAC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,IAAc;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAE3B,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ;YACX,MAAM,OAAO,EAAE,CAAC;YAChB,MAAM;QACR,KAAK,QAAQ,CAAC;QACd,KAAK,WAAW;YACd,MAAM,MAAM,EAAE,CAAC;YACf,MAAM;QACR,KAAK,QAAQ;YACX,MAAM,MAAM,EAAE,CAAC;YACf,MAAM;QACR,KAAK,QAAQ,CAAC;QACd,KAAK,IAAI,CAAC;QACV,KAAK,SAAS;YACZ,SAAS,EAAE,CAAC;YACZ,MAAM;QACR;YACE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,yBAAyB,UAAU,EAAE,CAAC,CAAC,CAAC;YAC3D,SAAS,EAAE,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACH,CAAC"}
@@ -1,62 +0,0 @@
1
- /**
2
- * Compile Command
3
- *
4
- * Loads configuration and features from disk, calls the remote compiler API,
5
- * writes the generated files to the project root, and runs post-compile commands.
6
- *
7
- * Project structure:
8
- * my-app/
9
- * ├── quickback/
10
- * │ ├── quickback.config.ts
11
- * │ ├── features/...
12
- * │ └── drizzle/ ← migration SQL + meta (compiler-owned)
13
- * ├── src/ ← compiled code written here
14
- * ├── supabase/migrations/ ← for Supabase provider
15
- * └── package.json
16
- */
17
- /**
18
- * `build.outputDir` → the migration staging workspace's `outputRootPath`.
19
- *
20
- * The two use different bases, which is the whole reason this exists.
21
- * `outputDir` is authored relative to the **quickback/ dir** (every other
22
- * reader does `join(quickbackDir, outputDir)`), while staging resolves its
23
- * paths against the **project root** and rejects anything containing `..`.
24
- * Passing the raw value made a legitimate `outputDir: "../src"` — config in
25
- * `quickback/`, generated tree at `<root>/src`, the standard nested layout —
26
- * read as a path-escape attempt and fail the compile.
27
- *
28
- * Returns a POSIX-style path relative to the project root, or `undefined`
29
- * when the project doesn't set `outputDir`.
30
- */
31
- export declare function resolveOutputRootPath(projectRoot: string, quickbackDir: string, outputDir: string | undefined): string | undefined;
32
- export interface CompileOptions {
33
- /**
34
- * Whether to splice the schema-driven kitchen-sink block into the
35
- * user's quickback.config.ts after a successful compile. Defaults
36
- * to true; the CLI accepts `--no-sync-config` to disable.
37
- */
38
- syncConfig?: boolean;
39
- /**
40
- * Request detailed compiler failure output, including the failing command,
41
- * exit code, stderr/stdout tails, and any suggested fixes.
42
- */
43
- verbose?: boolean;
44
- /**
45
- * Apply safe additive managed-column declarations to authored feature
46
- * schemas before loading them for compilation.
47
- */
48
- fixSchema?: boolean;
49
- /**
50
- * Continue compiling when an action's input schema fails to harvest,
51
- * falling back to the compiler's static Zod parser. `--allow-degraded-schemas`.
52
- *
53
- * Off by default since v0.63.0: a fallback schema keeps its `properties`
54
- * and silently loses `required` + `additionalProperties`, so the operation
55
- * still looks typed while enforcing nothing. That degradation used to be
56
- * the default and shipped hundreds of unenforced operations
57
- * before anyone compared the specs structurally.
58
- */
59
- allowDegradedSchemas?: boolean;
60
- }
61
- export declare function compile(options?: CompileOptions): Promise<void>;
62
- //# sourceMappingURL=compile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAyFH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,MAAM,GAAG,SAAS,CAGpB;AAED,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;OASG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAsB,OAAO,CAAC,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAszBzE"}