bunderstack 0.17.1 → 0.18.0
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/CHANGELOG.md +43 -0
- package/dist/api/crud-router.d.ts.map +1 -1
- package/dist/api/crud-router.js.map +1 -1
- package/dist/api/openapi.js +1 -1
- package/dist/api/openapi.js.map +1 -1
- package/dist/api/realtime-router.d.ts +2 -0
- package/dist/api/realtime-router.d.ts.map +1 -1
- package/dist/api/realtime-router.js +3 -0
- package/dist/api/realtime-router.js.map +1 -1
- package/dist/api/registry.d.ts.map +1 -1
- package/dist/api/registry.js +2 -6
- package/dist/api/registry.js.map +1 -1
- package/dist/api/storage-router.d.ts.map +1 -1
- package/dist/api/storage-router.js.map +1 -1
- package/dist/api/types.d.ts.map +1 -1
- package/dist/cli-skills.d.ts.map +1 -1
- package/dist/cli-skills.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/crud-operations.d.ts.map +1 -1
- package/dist/crud-operations.js +3 -12
- package/dist/crud-operations.js.map +1 -1
- package/dist/email.d.ts.map +1 -1
- package/dist/email.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +8 -3
- package/dist/errors.js.map +1 -1
- package/dist/handler.d.ts.map +1 -1
- package/dist/handler.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -16
- package/dist/index.js.map +1 -1
- package/dist/realtime/facade.d.ts.map +1 -1
- package/dist/realtime/facade.js.map +1 -1
- package/dist/realtime/filter.d.ts.map +1 -1
- package/dist/realtime/filter.js +1 -1
- package/dist/realtime/filter.js.map +1 -1
- package/dist/realtime/heartbeat.d.ts +6 -0
- package/dist/realtime/heartbeat.d.ts.map +1 -1
- package/dist/realtime/heartbeat.js +1 -1
- package/dist/realtime/heartbeat.js.map +1 -1
- package/dist/storage/operations.d.ts.map +1 -1
- package/dist/storage/operations.js.map +1 -1
- package/package.json +1 -1
- package/skills/creating-bunderstack-apps/agents/openai.yaml +3 -3
- package/skills/creating-bunderstack-apps/references/application-structure.md +17 -8
- package/skills/migrating-to-bunderstack/SKILL.md +6 -6
- package/skills/migrating-to-bunderstack/agents/openai.yaml +3 -3
- package/skills/migrating-to-bunderstack/references/audit-checklist.md +22 -22
|
@@ -4,28 +4,28 @@ Use this table at phase 1 to record who owns each capability today, and again
|
|
|
4
4
|
at phase 7 before deleting anything. Fill the evidence column with a command
|
|
5
5
|
output or a file reference, not an assertion.
|
|
6
6
|
|
|
7
|
-
| Capability | Legacy shape to find | Authoritative replacement
|
|
8
|
-
| ---------------------- | ------------------------------------------------------------------------------------ |
|
|
9
|
-
| Auth instance | A second `betterAuth({...})` call, a custom session resolver, a patched `getSession` | `authConfig` passed to `createBunderstack()`; consumers import `app.auth`
|
|
10
|
-
| Auth schema | Auth tables generated into a legacy schema directory | Auth tables in the one schema aggregate
|
|
11
|
-
| Database client | A module constructing its own libSQL/Postgres client | `app.db`, re-exported from the entry
|
|
12
|
-
| API mounting | Hand-written handler maps; separate `/api/auth/$`, `/api/trpc/$` | `createApiHandlers(app)` on one `/api/$`
|
|
13
|
-
| Custom API routes | Route files doing CRUD the framework can generate | Generated CRUD plus `defineAccess`, or an `o.protected` procedure
|
|
14
|
-
| Access control | Per-endpoint session checks and hand-written SQL filters | `defineAccess(schema, rules)` with `scope.read` / `scope.write`
|
|
15
|
-
| Jobs | BullMQ or a bespoke queue module | `jobs.define({ ... })` and `app.jobs.enqueue(...)`
|
|
16
|
-
| Cron | `/api/cron/*` guarded by a shared secret | `jobs.cron({ schedule, handler })`
|
|
17
|
-
| Worker topology | `startWorker()` or a queue bootstrap in the web entry | `src/worker.ts` calling `app.runWorker()`, run as its own process
|
|
18
|
-
| Realtime | Custom WebSocket server, manual pub/sub, channel-and-payload publishing | `realtime` config plus `ctx.realtime.publish(table, event, row)` after commit
|
|
19
|
-
| Storage | AWS or Tigris SDK wrapper, custom multipart upload route | Declared buckets and `app.storage`
|
|
20
|
-
| Email | Resend or SMTP SDK wrapper | `email` config and `app.email.send(...)`
|
|
21
|
-
| Env | `createEnv()` beside the app, `dotenv`, unchecked `process.env` reads | `env` passed to `createBunderstack()`; `app.env` / `ctx.env`
|
|
22
|
-
| API declaration | Router factories taking a bag of procedures; hand-written builder generics
|
|
23
|
-
| Observability | Tracing or logging attached to an application procedure base
|
|
24
|
-
| Errors | `new ORPCError(...)` at call sites, or a second error model
|
|
25
|
-
| List endpoints | Hand-rolled limit/offset/filter/count blocks repeated per table
|
|
26
|
-
| Migrations | Schema push against production | Committed Drizzle `migrations/`, applied by `provision(app)`
|
|
27
|
-
| Deployment declaration | No `bunderstack.entry`, no blueprint | `package.json#bunderstack.entry` and a committed blueprint
|
|
28
|
-
| App lifetime | Tests and scripts leaking app instances | `app.close()` in a `finally` or `afterEach`
|
|
7
|
+
| Capability | Legacy shape to find | Authoritative replacement | Evidence that the move is done | Deletion gate |
|
|
8
|
+
| ---------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
|
|
9
|
+
| Auth instance | A second `betterAuth({...})` call, a custom session resolver, a patched `getSession` | `authConfig` passed to `createBunderstack()`; consumers import `app.auth` | One `betterAuth` construction in the repository; a protected route rejects an unauthenticated request | No importer of the legacy auth module remains |
|
|
10
|
+
| Auth schema | Auth tables generated into a legacy schema directory | Auth tables in the one schema aggregate | Generated migration includes `user`, `session`, `account`, `verification` | Legacy schema directory has no importers |
|
|
11
|
+
| Database client | A module constructing its own libSQL/Postgres client | `app.db`, re-exported from the entry | The entry is the only place calling the adapter factory | Legacy `db` module deleted or reduced to a re-export, then deleted |
|
|
12
|
+
| API mounting | Hand-written handler maps; separate `/api/auth/$`, `/api/trpc/$` | `createApiHandlers(app)` on one `/api/$` | Auth and oRPC requests succeed with only the catch-all present | Shadowing route files deleted |
|
|
13
|
+
| Custom API routes | Route files doing CRUD the framework can generate | Generated CRUD plus `defineAccess`, or an `o.protected` procedure | Access rules cover each exposed table; a cross-owner request is denied | Route file has no client callers |
|
|
14
|
+
| Access control | Per-endpoint session checks and hand-written SQL filters | `defineAccess(schema, rules)` with `scope.read` / `scope.write` | A test asserts a second user cannot read or write the first user's rows | Manual filter helpers unused |
|
|
15
|
+
| Jobs | BullMQ or a bespoke queue module | `jobs.define({ ... })` and `app.jobs.enqueue(...)` | Job appears in `app.manifest.background.jobs` | No queue library importer; package uninstalled |
|
|
16
|
+
| Cron | `/api/cron/*` guarded by a shared secret | `jobs.cron({ schedule, handler })` | Cron task appears in the blueprint | Cron route file and its secret removed from env |
|
|
17
|
+
| Worker topology | `startWorker()` or a queue bootstrap in the web entry | `src/worker.ts` calling `app.runWorker()`, run as its own process | Web entry starts no worker; the worker command exists in deployment config | Worker process is deployed before the embedded call is removed |
|
|
18
|
+
| Realtime | Custom WebSocket server, manual pub/sub, channel-and-payload publishing | `realtime` config plus `ctx.realtime.publish(table, event, row)` after commit | A direct write reaches a subscriber with the complete row | Custom transport deleted; shared Redis configured for multi-process |
|
|
19
|
+
| Storage | AWS or Tigris SDK wrapper, custom multipart upload route | Declared buckets and `app.storage` | Upload, signed URL, and delete work through the facade | Wrapper deleted and SDK uninstalled |
|
|
20
|
+
| Email | Resend or SMTP SDK wrapper | `email` config and `app.email.send(...)` | A send succeeds through the configured provider | Wrapper deleted and SDK uninstalled |
|
|
21
|
+
| Env | `createEnv()` beside the app, `dotenv`, unchecked `process.env` reads | `env` passed to `createBunderstack()`; `app.env` / `ctx.env` | Boot fails with a clear message when a required variable is missing | Legacy env module unused; `.env.example` lists names only |
|
|
22
|
+
| API declaration | Router factories taking a bag of procedures; hand-written builder generics | `defineApi({ schema, env })` bases in one module, plain router objects, `api` object | A router module imports its base and exports an object; no factory remains | `BunderstackApiBuilder<...>` and `os.$context<...>()` deleted |
|
|
23
|
+
| Observability | Tracing or logging attached to an application procedure base | `middleware: [...]` in the config, which also reaches the generated CRUD | A generated CRUD request produces a span or log line | Per-base instrumentation removed |
|
|
24
|
+
| Errors | `new ORPCError(...)` at call sites, or a second error model | `errors.CODE({ message })`; `BunderstackError` outside a handler | A failing request answers the declared status, not 500 | `ORPCError` import gone from the api layer |
|
|
25
|
+
| List endpoints | Hand-rolled limit/offset/filter/count blocks repeated per table | `listSpec(table, options)` applied to your own base | The endpoint accepts cursor and `count: true` and answers `ListResult` | Duplicated paging helpers deleted |
|
|
26
|
+
| Migrations | Schema push against production | Committed Drizzle `migrations/`, applied by `provision(app)` | `migrations/` is under version control and applies cleanly to an empty database | Push command removed from deployment |
|
|
27
|
+
| Deployment declaration | No `bunderstack.entry`, no blueprint | `package.json#bunderstack.entry` and a committed blueprint | `bun run blueprint:check` passes in CI | Deployment reads the blueprint rather than ad-hoc process config |
|
|
28
|
+
| App lifetime | Tests and scripts leaking app instances | `app.close()` in a `finally` or `afterEach` | The test run exits without hanging | — |
|
|
29
29
|
|
|
30
30
|
## Reading a partially migrated application
|
|
31
31
|
|