@quickback-dev/cli 0.70.27 → 0.70.38
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/codex/AGENTS.md +290 -0
- package/dist/commands/build.d.ts +12 -0
- package/dist/commands/build.d.ts.map +1 -1
- package/dist/commands/build.js +69 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/build.test.d.ts.map +1 -0
- package/dist/commands/codex.d.ts +16 -0
- package/dist/commands/codex.d.ts.map +1 -0
- package/dist/commands/codex.js +159 -0
- package/dist/commands/codex.js.map +1 -0
- package/dist/commands/compile.d.ts +62 -0
- package/dist/commands/compile.d.ts.map +1 -0
- package/dist/commands/compile.js +830 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/compile.test.d.ts.map +1 -0
- package/dist/commands/deploy.d.ts +9 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +20 -2
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +405 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/migrate-data.d.ts +12 -0
- package/dist/commands/migrate-data.d.ts.map +1 -0
- package/dist/commands/migrate-data.js +134 -0
- package/dist/commands/migrate-data.js.map +1 -0
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +11 -0
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/migrate.test.d.ts.map +1 -0
- package/dist/commands/migrations.test.d.ts.map +1 -0
- package/dist/commands/push.test.d.ts.map +1 -0
- package/dist/commands/schema.test.d.ts.map +1 -0
- package/dist/commands/secrets.d.ts +27 -0
- package/dist/commands/secrets.d.ts.map +1 -0
- package/dist/commands/secrets.js +186 -0
- package/dist/commands/secrets.js.map +1 -0
- package/dist/docs/content.d.ts +7 -0
- package/dist/docs/content.d.ts.map +1 -0
- package/dist/docs/content.js +672 -0
- package/dist/docs/content.js.map +1 -0
- package/dist/docs/index.test.d.ts.map +1 -0
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/access-manifest-diff.d.ts +87 -0
- package/dist/lib/access-manifest-diff.d.ts.map +1 -0
- package/dist/lib/access-manifest-diff.js +331 -0
- package/dist/lib/access-manifest-diff.js.map +1 -0
- package/dist/lib/action-harvest.test.d.ts.map +1 -0
- package/dist/lib/api-client.test.d.ts.map +1 -0
- package/dist/lib/artifact-routing.d.ts.map +1 -1
- package/dist/lib/artifact-routing.js +3 -0
- package/dist/lib/artifact-routing.js.map +1 -1
- package/dist/lib/artifact-routing.test.d.ts.map +1 -0
- package/dist/lib/auth.test.d.ts.map +1 -0
- package/dist/lib/compile-next-steps.test.d.ts.map +1 -0
- package/dist/lib/compiler-floor.test.d.ts.map +1 -0
- package/dist/lib/compiler-stubs.d.ts +2 -0
- package/dist/lib/compiler-stubs.d.ts.map +1 -1
- package/dist/lib/compiler-stubs.js +2 -0
- package/dist/lib/compiler-stubs.js.map +1 -1
- package/dist/lib/config-id-splice.test.d.ts.map +1 -0
- package/dist/lib/config-sync.test.d.ts.map +1 -0
- package/dist/lib/copy-public-assets.test.d.ts.map +1 -0
- package/dist/lib/copy-source-apps.test.d.ts.map +1 -0
- package/dist/lib/drizzle-meta-routing.test.d.ts.map +1 -0
- package/dist/lib/file-loader-typescript-fallback.test.d.ts.map +1 -0
- package/dist/lib/file-loader.d.ts +6 -0
- package/dist/lib/file-loader.d.ts.map +1 -1
- package/dist/lib/file-loader.js +17 -0
- package/dist/lib/file-loader.js.map +1 -1
- package/dist/lib/file-loader.test.d.ts.map +1 -0
- package/dist/lib/file-writer.test.d.ts.map +1 -0
- package/dist/lib/helpers.d.ts +39 -0
- package/dist/lib/helpers.d.ts.map +1 -0
- package/dist/lib/helpers.js +299 -0
- package/dist/lib/helpers.js.map +1 -0
- package/dist/lib/migrations/drizzle-prompts.test.d.ts.map +1 -0
- package/dist/lib/migrations/drizzle.test.d.ts.map +1 -0
- package/dist/lib/migrations/executor.test.d.ts.map +1 -0
- package/dist/lib/migrations/inventory.test.d.ts.map +1 -0
- package/dist/lib/migrations/lock.test.d.ts.map +1 -0
- package/dist/lib/migrations/paths.test.d.ts.map +1 -0
- package/dist/lib/migrations/plan.test.d.ts.map +1 -0
- package/dist/lib/migrations/postprocessors/index.test.d.ts.map +1 -0
- package/dist/lib/migrations/prompt-runner.test.d.ts.map +1 -0
- package/dist/lib/migrations/staging.test.d.ts.map +1 -0
- package/dist/lib/neon-canary.test.d.ts.map +1 -0
- package/dist/lib/neon-target.test.d.ts.map +1 -0
- package/dist/lib/neon.test.d.ts.map +1 -0
- package/dist/lib/ops-manifest.d.ts +76 -0
- package/dist/lib/ops-manifest.d.ts.map +1 -0
- package/dist/lib/ops-manifest.js +94 -0
- package/dist/lib/ops-manifest.js.map +1 -0
- package/dist/lib/prepare-output.test.d.ts.map +1 -0
- package/dist/lib/prepare-state-output.test.d.ts.map +1 -0
- package/dist/lib/release-and-pin.d.ts +34 -0
- package/dist/lib/release-and-pin.d.ts.map +1 -0
- package/dist/lib/release-and-pin.js +71 -0
- package/dist/lib/release-and-pin.js.map +1 -0
- package/dist/lib/schema-sync/index.test.d.ts.map +1 -0
- package/dist/lib/shell.d.ts +4 -1
- package/dist/lib/shell.d.ts.map +1 -1
- package/dist/lib/shell.js +8 -3
- package/dist/lib/shell.js.map +1 -1
- package/dist/lib/shell.test.d.ts.map +1 -0
- package/dist/lib/sweep-stale.d.ts +25 -0
- package/dist/lib/sweep-stale.d.ts.map +1 -0
- package/dist/lib/sweep-stale.js +179 -0
- package/dist/lib/sweep-stale.js.map +1 -0
- package/dist/lib/sweep-stale.test.d.ts.map +1 -0
- package/dist/lib/wrangler-resources.test.d.ts.map +1 -0
- package/dist/skill/docs/api/actions.md +2 -0
- package/dist/skill/docs/api/batch-operations.md +18 -4
- package/dist/skill/docs/api/crud.md +62 -0
- package/dist/skill/docs/api/errors.md +17 -2
- package/dist/skill/docs/configure/auth.md +49 -2
- package/dist/skill/docs/configure/bindings.md +15 -0
- package/dist/skill/docs/configure/domains.md +4 -0
- package/dist/skill/docs/configure/index.md +29 -11
- package/dist/skill/docs/configure/providers.md +1 -0
- package/dist/skill/docs/configure/tenancy.md +117 -0
- package/dist/skill/docs/define/access.md +19 -0
- package/dist/skill/docs/define/actions/access.md +76 -0
- package/dist/skill/docs/define/actions/defining.md +156 -1
- package/dist/skill/docs/define/actions/scoped-db.md +236 -9
- package/dist/skill/docs/define/areas.md +46 -0
- package/dist/skill/docs/define/authz-roles.md +10 -0
- package/dist/skill/docs/define/diagnostics.md +263 -0
- package/dist/skill/docs/define/encryption.md +34 -2
- package/dist/skill/docs/define/guards.md +13 -0
- package/dist/skill/docs/define/masking.md +77 -3
- package/dist/skill/docs/define/rate-limit.md +3 -3
- package/dist/skill/docs/define/schema.md +148 -7
- package/dist/skill/docs/define/scopes.md +79 -0
- package/dist/skill/docs/define/sealed-protocol.md +111 -9
- package/dist/skill/docs/define/transitions.md +39 -0
- package/dist/skill/docs/define/views.md +77 -3
- package/dist/skill/docs/platform/api-contract/index.md +4 -0
- package/dist/skill/docs/platform/auth/jwt-optimization.md +2 -0
- package/dist/skill/docs/platform/auth/plugins/aws-ses.md +4 -3
- package/dist/skill/docs/platform/auth/using-auth.md +6 -0
- package/dist/skill/docs/platform/database/d1.md +47 -0
- package/dist/skill/docs/platform/database/data-migrations.md +109 -0
- package/dist/skill/docs/platform/database/index.md +1 -0
- package/dist/skill/docs/platform/database/read-replication.md +257 -0
- package/dist/skill/docs/platform/database/using-d1.md +2 -1
- package/dist/skill/docs/platform/payments/one-off-checkout.md +6 -1
- package/dist/skill/docs/platform/push/index.md +2 -0
- package/dist/skill/docs/platform/realtime/partyserver-rooms.md +95 -9
- package/dist/skill/docs/platform/storage/using-r2.md +135 -19
- package/dist/skill/docs/start/deploy.md +38 -0
- package/dist/skill/docs/tooling/cli.md +120 -0
- package/dist/skill/docs/tooling/cloud-compiler/troubleshooting.md +13 -13
- package/dist/skill/docs/tooling/output.md +70 -2
- package/package.json +1 -1
- package/src/skill/docs/api/actions.md +2 -0
- package/src/skill/docs/api/batch-operations.md +18 -4
- package/src/skill/docs/api/crud.md +62 -0
- package/src/skill/docs/api/errors.md +17 -2
- package/src/skill/docs/configure/auth.md +49 -2
- package/src/skill/docs/configure/bindings.md +15 -0
- package/src/skill/docs/configure/domains.md +4 -0
- package/src/skill/docs/configure/index.md +29 -11
- package/src/skill/docs/configure/providers.md +1 -0
- package/src/skill/docs/configure/tenancy.md +117 -0
- package/src/skill/docs/define/access.md +19 -0
- package/src/skill/docs/define/actions/access.md +76 -0
- package/src/skill/docs/define/actions/defining.md +156 -1
- package/src/skill/docs/define/actions/scoped-db.md +236 -9
- package/src/skill/docs/define/areas.md +46 -0
- package/src/skill/docs/define/authz-roles.md +10 -0
- package/src/skill/docs/define/diagnostics.md +263 -0
- package/src/skill/docs/define/encryption.md +34 -2
- package/src/skill/docs/define/guards.md +13 -0
- package/src/skill/docs/define/masking.md +77 -3
- package/src/skill/docs/define/rate-limit.md +3 -3
- package/src/skill/docs/define/schema.md +148 -7
- package/src/skill/docs/define/scopes.md +79 -0
- package/src/skill/docs/define/sealed-protocol.md +111 -9
- package/src/skill/docs/define/transitions.md +39 -0
- package/src/skill/docs/define/views.md +77 -3
- package/src/skill/docs/platform/api-contract/index.md +4 -0
- package/src/skill/docs/platform/auth/jwt-optimization.md +2 -0
- package/src/skill/docs/platform/auth/plugins/aws-ses.md +4 -3
- package/src/skill/docs/platform/auth/using-auth.md +6 -0
- package/src/skill/docs/platform/database/d1.md +47 -0
- package/src/skill/docs/platform/database/data-migrations.md +109 -0
- package/src/skill/docs/platform/database/index.md +1 -0
- package/src/skill/docs/platform/database/read-replication.md +257 -0
- package/src/skill/docs/platform/database/using-d1.md +2 -1
- package/src/skill/docs/platform/payments/one-off-checkout.md +6 -1
- package/src/skill/docs/platform/push/index.md +2 -0
- package/src/skill/docs/platform/realtime/partyserver-rooms.md +95 -9
- package/src/skill/docs/platform/storage/using-r2.md +135 -19
- package/src/skill/docs/start/deploy.md +38 -0
- package/src/skill/docs/tooling/cli.md +120 -0
- package/src/skill/docs/tooling/cloud-compiler/troubleshooting.md +13 -13
- package/src/skill/docs/tooling/output.md +70 -2
|
@@ -277,7 +277,7 @@ schema qualifier script:
|
|
|
277
277
|
|
|
278
278
|
| Provider | Emitted |
|
|
279
279
|
|----------|---------|
|
|
280
|
-
| `cloudflare-d1` | `.env.cloudflare-d1.example`, `wrangler.d1.example`, `drizzle.auth.config.ts` (dual-database mode) |
|
|
280
|
+
| `cloudflare-d1` | `.env.cloudflare-d1.example`, `.dev.vars.example`, `wrangler.d1.example`, `drizzle.auth.config.ts` (dual-database mode) |
|
|
281
281
|
| `neon` | `.env.neon.example`, `.dev.vars.example`, `docs/neon-setup.md`, `scripts/quickback-qualify-auth-schema.mjs` |
|
|
282
282
|
| `planetscale-postgres` | `.env.planetscale.example`, `.dev.vars.example`, `docs/planetscale-postgres-setup.md`, `scripts/quickback-qualify-auth-schema.mjs` |
|
|
283
283
|
|
|
@@ -288,6 +288,39 @@ they emit a single `drizzle.config.ts` rather than the D1 dual-database pair.
|
|
|
288
288
|
See [Neon](/platform/database/neon) and
|
|
289
289
|
[PlanetScale Postgres](/platform/database/planetscale-postgres).
|
|
290
290
|
|
|
291
|
+
Every Cloudflare project gets a `.dev.vars.example` that lists every declared
|
|
292
|
+
secret (see below). The Postgres providers keep their own connection guidance
|
|
293
|
+
in that file, and any declared secret they do not mention is appended. The
|
|
294
|
+
generated `.gitignore` ignores `.dev.vars` and `.env.*` (keeping `*.example`),
|
|
295
|
+
so files that hold secret values are never committed.
|
|
296
|
+
|
|
297
|
+
### Ops manifest
|
|
298
|
+
|
|
299
|
+
`reports/ops.manifest.json` is written on every Cloudflare build. It is the
|
|
300
|
+
one place the CLI reads operational facts from, so the CLI never re-derives a
|
|
301
|
+
compiler rule:
|
|
302
|
+
|
|
303
|
+
| Key | Contents | Read by |
|
|
304
|
+
| --- | --- | --- |
|
|
305
|
+
| `compiler` | `version` and `gitSha` of the build that produced the output | — |
|
|
306
|
+
| `targets` | each deploy target: logical name, Worker name, `wrangler --env`, API origin | every command below |
|
|
307
|
+
| `secrets` | `required`, `optional`, and `declared[]` (source, `bootGuarded`, description) | `quickback secrets check\|push` |
|
|
308
|
+
| `release` | the stamped `{ version, sha, at }` when `release.stampVars` is on | `quickback deploy` (`--tag` / `--message`) |
|
|
309
|
+
| `dataMigrations` | runner path, ledger table, allowed roles, declared ids | `quickback migrate data` |
|
|
310
|
+
|
|
311
|
+
Readers ignore unknown keys. New sections are added over time, and existing
|
|
312
|
+
ones are never restructured.
|
|
313
|
+
|
|
314
|
+
### Data migrations
|
|
315
|
+
|
|
316
|
+
When `quickback/migrations/data/*.ts` exist, each file is emitted as a module
|
|
317
|
+
under `src/data-migrations/`, along with `src/lib/data-migration-define.ts`,
|
|
318
|
+
the gated runner `src/lib/data-migrations.ts` (mounted at
|
|
319
|
+
`/api/v1/system/data-migrations`), and the `_qb_data_migrations` ledger table
|
|
320
|
+
in the features database. On Postgres, that table lives in the `app` schema
|
|
321
|
+
behind a service-role-only RLS policy. See
|
|
322
|
+
[Data Migrations](/platform/database/data-migrations).
|
|
323
|
+
|
|
291
324
|
### Embeddings
|
|
292
325
|
|
|
293
326
|
When any feature has `embeddings` configured:
|
|
@@ -384,7 +417,7 @@ quickback/drizzle/
|
|
|
384
417
|
|
|
385
418
|
### Security Audit Database (Unsafe Actions)
|
|
386
419
|
|
|
387
|
-
When any action enables unsafe cross-tenant mode (`unsafe.crossTenant: true`):
|
|
420
|
+
When any action enables unsafe cross-tenant mode (`unsafe.crossTenant: true`), declares the [operator lane](/define/actions/scoped-db#operator-lane-operator) (`operator:`), is `PUBLIC`, or a resource hard-deletes:
|
|
388
421
|
|
|
389
422
|
```
|
|
390
423
|
src/
|
|
@@ -422,6 +455,41 @@ Set `compiler.securityContracts.report.signature.required: true` to fail compila
|
|
|
422
455
|
|
|
423
456
|
The report names the compiler that produced it twice: `compilerVersion` is the semver, and `compilerBuildId` is `<version>@<gitSha>@<builtAt>` — the same string the compiler's `/health` endpoint reports as `buildId`. The semver is a floor that can serve several hosted builds, so a drift tripwire should pin on `compilerBuildId`, not `compilerVersion`.
|
|
424
457
|
|
|
458
|
+
### Access Manifest
|
|
459
|
+
|
|
460
|
+
`reports/access-manifest.json` is emitted on every compile. The contract
|
|
461
|
+
report says how many invariants held; the manifest says **what the backend
|
|
462
|
+
admits**:
|
|
463
|
+
|
|
464
|
+
- **`routes`** — one entry per HTTP route (CRUD, batch, views, actions), keyed
|
|
465
|
+
`<METHOD> <path>`: the `auth` requirement (`public` / `session` /
|
|
466
|
+
`bearer-only`), the access tree, and the flattened principals that open it —
|
|
467
|
+
`roles`, `pseudoRoles`, `userRole`, `scopeLanes` (`scope:<kind>:<role>`) and
|
|
468
|
+
`relationships`. `firewall` lists the row arms (`mode` is `scoped`,
|
|
469
|
+
`exception` or `none`); each arm carries its boolean `path`
|
|
470
|
+
(`and`, `and > any`, …), a canonical `predicate`, and **`tenantBound`** —
|
|
471
|
+
true when every row the arm admits is bound to the caller's org (the org
|
|
472
|
+
equality itself, an arm under an AND with it, or a scope / relationship arm
|
|
473
|
+
the compiler wraps in `tenantBound(arm, orgEq)` inside an org-anchored
|
|
474
|
+
`any:` group). Actions with `unsafe` enabled carry `adminOnly`,
|
|
475
|
+
`crossTenant` and `targetScope`.
|
|
476
|
+
- **`realtimeRooms`** — each Durable Object mount with its `connectAuth` and,
|
|
477
|
+
for resource-gated rooms, the keyed table's read access and firewall arms.
|
|
478
|
+
Each gate also records `connectAccess` (the expanded room `roles`, or the
|
|
479
|
+
table read policy when inherited) and `writeAccess` (the additional expanded
|
|
480
|
+
`writeRoles` restriction, or `null` when every admitted connection may write).
|
|
481
|
+
The table firewall still applies when a room overrides its role policy.
|
|
482
|
+
- **`trustedOrigins`** — `bundle` is the `TRUSTED_ORIGINS` list baked into the
|
|
483
|
+
one shared Worker bundle; `environments` lists, per named environment, the
|
|
484
|
+
origins of the hostnames it claims.
|
|
485
|
+
|
|
486
|
+
The file is deterministic — no timestamps, no compiler version, sorted
|
|
487
|
+
arrays — so a committed copy is a baseline. The CLI writes it to
|
|
488
|
+
`quickback/reports/access-manifest.json` alongside the contract report.
|
|
489
|
+
`quickback build --diff <baseline>` compares the fresh manifest to it and
|
|
490
|
+
exits non-zero on any widening; see
|
|
491
|
+
[CLI → Diff the access manifest](/tooling/cli#diff-the-access-manifest).
|
|
492
|
+
|
|
425
493
|
### Data Remediation Report
|
|
426
494
|
|
|
427
495
|
`reports/data-remediation.sql` is emitted when the project has something to check. It is **read-only as emitted** — every statement is a `SELECT`, and the compiler never runs it:
|