bunderstack 0.22.0 → 0.23.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.
Files changed (85) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +2 -1
  3. package/dist/api/catalog.d.ts +8 -0
  4. package/dist/api/catalog.d.ts.map +1 -0
  5. package/dist/api/catalog.js +56 -0
  6. package/dist/api/catalog.js.map +1 -0
  7. package/dist/api/context.d.ts +3 -0
  8. package/dist/api/context.d.ts.map +1 -1
  9. package/dist/api/context.js +2 -0
  10. package/dist/api/context.js.map +1 -1
  11. package/dist/api/registry.d.ts.map +1 -1
  12. package/dist/api/registry.js +1 -0
  13. package/dist/api/registry.js.map +1 -1
  14. package/dist/api/router.d.ts +3 -0
  15. package/dist/api/router.d.ts.map +1 -1
  16. package/dist/api/router.js +7 -2
  17. package/dist/api/router.js.map +1 -1
  18. package/dist/backend-internals.d.ts +11 -0
  19. package/dist/backend-internals.d.ts.map +1 -1
  20. package/dist/backend-internals.js.map +1 -1
  21. package/dist/backend.d.ts +2 -2
  22. package/dist/backend.d.ts.map +1 -1
  23. package/dist/backend.js +18 -5
  24. package/dist/backend.js.map +1 -1
  25. package/dist/blueprint.d.ts +21 -1
  26. package/dist/blueprint.d.ts.map +1 -1
  27. package/dist/blueprint.js +45 -17
  28. package/dist/blueprint.js.map +1 -1
  29. package/dist/env.d.ts +18 -0
  30. package/dist/env.d.ts.map +1 -1
  31. package/dist/env.js +1 -0
  32. package/dist/env.js.map +1 -1
  33. package/dist/errors.d.ts.map +1 -1
  34. package/dist/errors.js +4 -2
  35. package/dist/errors.js.map +1 -1
  36. package/dist/index.d.ts +3 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +1 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/jobs/worker.d.ts +12 -0
  41. package/dist/jobs/worker.d.ts.map +1 -1
  42. package/dist/jobs/worker.js +32 -1
  43. package/dist/jobs/worker.js.map +1 -1
  44. package/dist/logging.d.ts +8 -0
  45. package/dist/logging.d.ts.map +1 -0
  46. package/dist/logging.js +6 -0
  47. package/dist/logging.js.map +1 -0
  48. package/dist/manifest.d.ts +20 -0
  49. package/dist/manifest.d.ts.map +1 -1
  50. package/dist/manifest.js +68 -6
  51. package/dist/manifest.js.map +1 -1
  52. package/dist/readiness-probes.d.ts +4 -0
  53. package/dist/readiness-probes.d.ts.map +1 -0
  54. package/dist/readiness-probes.js +23 -0
  55. package/dist/readiness-probes.js.map +1 -0
  56. package/dist/readiness.d.ts +39 -0
  57. package/dist/readiness.d.ts.map +1 -0
  58. package/dist/readiness.js +72 -0
  59. package/dist/readiness.js.map +1 -0
  60. package/dist/runtime.d.ts +4 -0
  61. package/dist/runtime.d.ts.map +1 -1
  62. package/dist/runtime.js +32 -4
  63. package/dist/runtime.js.map +1 -1
  64. package/dist/testing/auth.d.ts +30 -2
  65. package/dist/testing/auth.d.ts.map +1 -1
  66. package/dist/testing/auth.js +103 -14
  67. package/dist/testing/auth.js.map +1 -1
  68. package/dist/testing/fixture.d.ts +18 -0
  69. package/dist/testing/fixture.d.ts.map +1 -1
  70. package/dist/testing/fixture.js +55 -2
  71. package/dist/testing/fixture.js.map +1 -1
  72. package/dist/testing/jobs.d.ts +9 -1
  73. package/dist/testing/jobs.d.ts.map +1 -1
  74. package/dist/testing/jobs.js +9 -0
  75. package/dist/testing/jobs.js.map +1 -1
  76. package/dist/testing/logs.d.ts +18 -0
  77. package/dist/testing/logs.d.ts.map +1 -0
  78. package/dist/testing/logs.js +53 -0
  79. package/dist/testing/logs.js.map +1 -0
  80. package/dist/testing.d.ts +5 -4
  81. package/dist/testing.d.ts.map +1 -1
  82. package/dist/testing.js +1 -1
  83. package/dist/testing.js.map +1 -1
  84. package/llms.txt +20 -13
  85. package/package.json +1 -1
package/llms.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  BUNDERSTACK
2
2
 
3
- A batteries-included backend framework for Bun. Version 0.17 (beta).
3
+ A batteries-included backend framework for Bun. Version 0.22.1.
4
4
  Docs: https://bunderstack.kcrz.dev/docs
5
5
  This file is written for coding agents. It is dense on purpose.
6
6
 
@@ -88,25 +88,32 @@ TESTING
88
88
  Use lexical fixture ownership; do not use a process-wide app registry or a
89
89
  global afterEach hook:
90
90
 
91
+ export const createFixture = backend.test.configure({
92
+ database: { schema: 'push' },
93
+ setup: async (t) => {
94
+ const identity = t.auth.mockSession({
95
+ id: 'user-1', email: 'dev@example.com', name: 'Developer',
96
+ })
97
+ return { identity, client: t.client(identity) }
98
+ },
99
+ })
100
+
91
101
  import { backend } from './backend'
92
102
 
93
103
  test('creates a post', async () => {
94
- await using t = await backend.test({ database: { schema: 'push' } })
95
- const identity = t.auth.mockSession({
96
- id: 'user-1',
97
- email: 'dev@example.com',
98
- name: 'Developer',
99
- })
100
- const client = t.client(identity)
104
+ await using t = await createFixture()
105
+ const { client, identity } = t.context
101
106
  await client.posts.create({ title: 'Hello', userId: identity.user.id })
102
107
  })
103
108
 
104
109
  The fixture owns isolated database, email, storage, realtime, and job state.
105
- Its auth helper creates user/session identities only; application-specific
106
- organization setup belongs in a typed application helper. t.jobs.tick() claims
107
- one snapshot of runnable jobs. t.jobs.settle() repeats snapshots until the
108
- queue converges, a terminal job fails, or its limits are reached; it does not
109
- advance the clock to delayed jobs automatically.
110
+ fixture.defer() registers LIFO async cleanup. fixture.logs captures internal
111
+ runtime logs by default. Auth supports sign-up, sign-in, session lookup, sign-out,
112
+ email verification, and multiple header-scoped mock identities. t.jobs.runNext()
113
+ claims one snapshot of runnable jobs. t.jobs.runUntilIdle() repeats snapshots
114
+ until the queue converges, a terminal job fails, or its limits are reached; it
115
+ does not advance the clock to delayed jobs automatically. inspect(), pending(),
116
+ and failed() expose queue rows for assertions.
110
117
 
111
118
  BASES
112
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunderstack",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Batteries-included backend framework for Bun: type-safe oRPC APIs, auth, storage, realtime, jobs, email, and validated env from one config.",
5
5
  "keywords": [
6
6
  "backend",