bunderstack 0.24.0 → 0.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +1 -0
- package/dist/auth.d.ts +20 -9
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +3 -8
- package/dist/auth.js.map +1 -1
- package/dist/backend.d.ts +4 -4
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js.map +1 -1
- package/dist/config.d.ts +10 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/provision-internals.d.ts +1 -1
- package/dist/provision-internals.js +1 -1
- package/dist/provision-internals.js.map +1 -1
- package/dist/provision-runtime.d.ts +7 -0
- package/dist/provision-runtime.d.ts.map +1 -0
- package/dist/provision-runtime.js +50 -0
- package/dist/provision-runtime.js.map +1 -0
- package/dist/provision-schema.d.ts +16 -0
- package/dist/provision-schema.d.ts.map +1 -0
- package/dist/provision-schema.js +63 -0
- package/dist/provision-schema.js.map +1 -0
- package/dist/provision.d.ts +4 -21
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +10 -111
- package/dist/provision.js.map +1 -1
- package/dist/runtime.d.ts +9 -7
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +2 -3
- package/dist/runtime.js.map +1 -1
- package/dist/testing/fixture.d.ts +1 -1
- package/dist/testing/fixture.d.ts.map +1 -1
- package/dist/testing/fixture.js +1 -1
- package/dist/testing/fixture.js.map +1 -1
- package/llms-full.txt +416 -226
- package/llms.txt +4 -3
- package/package.json +5 -1
- package/skills/creating-bunderstack-apps/references/verification.md +7 -6
- package/skills/migrating-to-bunderstack/SKILL.md +22 -20
- package/skills/migrating-to-bunderstack/references/runtime-replacements.md +4 -3
package/llms.txt
CHANGED
|
@@ -41,9 +41,10 @@ MINIMAL APP
|
|
|
41
41
|
|
|
42
42
|
The blueprint imports the backend declaration and never starts the runtime.
|
|
43
43
|
Database adapters are imported from their own entry points: libsql(),
|
|
44
|
-
pglite(), bunSql(), postgresJs().
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
pglite(), bunSql(), postgresJs(). Production provisioning imports
|
|
45
|
+
`provision(app)` from `bunderstack/provision` and requires committed migrations;
|
|
46
|
+
that entrypoint never imports Drizzle Kit. Development schema push imports the
|
|
47
|
+
same function name from `bunderstack/provision-schema` instead.
|
|
47
48
|
|
|
48
49
|
DECLARING AN API
|
|
49
50
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bunderstack",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"description": "Batteries-included backend framework for Bun: type-safe oRPC APIs, auth, storage, realtime, jobs, messaging, and validated env from one declaration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"backend",
|
|
@@ -77,6 +77,10 @@
|
|
|
77
77
|
"types": "./dist/provision.d.ts",
|
|
78
78
|
"default": "./dist/provision.js"
|
|
79
79
|
},
|
|
80
|
+
"./provision-schema": {
|
|
81
|
+
"types": "./dist/provision-schema.d.ts",
|
|
82
|
+
"default": "./dist/provision-schema.js"
|
|
83
|
+
},
|
|
80
84
|
"./testing": {
|
|
81
85
|
"types": "./dist/testing.d.ts",
|
|
82
86
|
"default": "./dist/testing.js"
|
|
@@ -17,9 +17,10 @@ the configured Bunderstack entry. Set `package.json#bunderstack.entry` when the
|
|
|
17
17
|
entry is not `src/bunderstack.ts`. `bun run blueprint:check` must pass in CI so
|
|
18
18
|
the committed declaration matches the application.
|
|
19
19
|
|
|
20
|
-
Before production, generate and commit the Drizzle `migrations/` folder.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
Before production, generate and commit the Drizzle `migrations/` folder.
|
|
21
|
+
`provision(app)` from `bunderstack/provision` only applies committed
|
|
22
|
+
migrations and never imports drizzle-kit. For the local schema-push loop, import
|
|
23
|
+
`provision` from `bunderstack/provision-schema`; that development-only
|
|
24
|
+
entrypoint requires drizzle-kit. Keep the generated migrations, blueprint,
|
|
25
|
+
tests, worker entry, API mount, and deployment scripts under version control;
|
|
26
|
+
never commit secrets, databases, uploads, or build output.
|
|
@@ -55,25 +55,26 @@ export type App = typeof app
|
|
|
55
55
|
|
|
56
56
|
All Bunderstack capabilities are imported directly from single-segment subpaths of `bunderstack`:
|
|
57
57
|
|
|
58
|
-
| Subpath Import
|
|
59
|
-
|
|
|
60
|
-
| `bunderstack`
|
|
61
|
-
| `bunderstack/libsql`
|
|
62
|
-
| `bunderstack/postgres-js`
|
|
63
|
-
| `bunderstack/bun-sql`
|
|
64
|
-
| `bunderstack/pglite`
|
|
65
|
-
| `bunderstack/client`
|
|
66
|
-
| `bunderstack/client-react`
|
|
67
|
-
| `bunderstack/client-rest`
|
|
68
|
-
| `bunderstack/query`
|
|
69
|
-
| `bunderstack/query-react`
|
|
70
|
-
| `bunderstack/sync`
|
|
71
|
-
| `bunderstack/start`
|
|
72
|
-
| `bunderstack/start-auth`
|
|
73
|
-
| `bunderstack/provision`
|
|
74
|
-
| `bunderstack/
|
|
75
|
-
| `bunderstack/
|
|
76
|
-
| `bunderstack/
|
|
58
|
+
| Subpath Import | Purpose |
|
|
59
|
+
| ------------------------------ | ------------------------------------------------------------------------------------- |
|
|
60
|
+
| `bunderstack` | Core backend builder (`bunderstack`, `defineApi`, `defineAccess`, `BunderstackError`) |
|
|
61
|
+
| `bunderstack/libsql` | libSQL / SQLite database adapter |
|
|
62
|
+
| `bunderstack/postgres-js` | postgres.js database adapter |
|
|
63
|
+
| `bunderstack/bun-sql` | `Bun.sql` Postgres adapter |
|
|
64
|
+
| `bunderstack/pglite` | PGlite in-memory / embedded Postgres adapter |
|
|
65
|
+
| `bunderstack/client` | Framework-neutral typed client & `createLiveView` |
|
|
66
|
+
| `bunderstack/client-react` | React LiveView hook (`useLiveView`) |
|
|
67
|
+
| `bunderstack/client-rest` | Type-safe REST client |
|
|
68
|
+
| `bunderstack/query` | TanStack Query integration (`createClient`, `syncRealtime`) |
|
|
69
|
+
| `bunderstack/query-react` | React-specific query helpers |
|
|
70
|
+
| `bunderstack/sync` | TanStack DB realtime sync collections |
|
|
71
|
+
| `bunderstack/start` | TanStack Start integration (`createApiHandlers`) |
|
|
72
|
+
| `bunderstack/start-auth` | Better Auth client for TanStack Start |
|
|
73
|
+
| `bunderstack/provision` | Production provisioning from committed migrations |
|
|
74
|
+
| `bunderstack/provision-schema` | Development-only schema push through Drizzle Kit |
|
|
75
|
+
| `bunderstack/testing` | Test fixture helpers |
|
|
76
|
+
| `bunderstack/schema` | Internal system tables (`export * from 'bunderstack/schema'`) |
|
|
77
|
+
| `bunderstack/typeid` | TypeID column types & generators |
|
|
77
78
|
|
|
78
79
|
---
|
|
79
80
|
|
|
@@ -387,11 +388,12 @@ throw new BunderstackError('FORBIDDEN', 'Quota exceeded')
|
|
|
387
388
|
### Development vs. Production Lifecycle
|
|
388
389
|
|
|
389
390
|
1. **Local Development (No Migrations Folder):**
|
|
390
|
-
-
|
|
391
|
+
- Import `provision` from `bunderstack/provision-schema`; it pushes the schema to the SQLite/libSQL/Postgres database.
|
|
391
392
|
- Developers can rapidly prototype and iterate on table schemas without generating migrations on every change.
|
|
392
393
|
|
|
393
394
|
2. **Production & Bunderhost Deployments (MANDATORY Migrations):**
|
|
394
395
|
- **Committed migrations are strictly mandatory for production deployments.**
|
|
396
|
+
- Import `provision` from `bunderstack/provision`; it contains no Drizzle Kit import edge and fails clearly when the migration journal is missing.
|
|
395
397
|
- Bunderhost will **NOT** run schema push in production; deployment will fail if committed migrations in `migrations/` are missing or out of date.
|
|
396
398
|
|
|
397
399
|
### CRITICAL MIGRATION RULES
|
|
@@ -255,9 +255,10 @@ with names and safe placeholders only.
|
|
|
255
255
|
|
|
256
256
|
## Provisioning, migrations, and blueprint
|
|
257
257
|
|
|
258
|
-
`provision(app)`
|
|
259
|
-
|
|
260
|
-
|
|
258
|
+
`provision(app)` from `bunderstack/provision` applies committed migrations
|
|
259
|
+
without importing Drizzle Kit and fails when the journal is absent. During
|
|
260
|
+
local prototyping, import it from `bunderstack/provision-schema` to use the
|
|
261
|
+
development schema-push loop. Generate and commit migrations before production:
|
|
261
262
|
|
|
262
263
|
```json
|
|
263
264
|
{
|