@getstrata/bootstrap 3.0.7 → 3.1.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 CHANGED
@@ -1,635 +1,11 @@
1
1
  # @getstrata/bootstrap changelog
2
2
 
3
- ## 3.0.7
3
+ ## 3.1.0
4
4
 
5
- Carry forward the 3.0.6 application-authoring and correctness changes after its release stopped before publication. Correct SAML release acceptance to require browser-bound state while preserving assertion validation, successful login and MFA. See docs/releases/3.0.7.md for upgrade notes.
5
+ - Preserve API/web classification when composing unclassified route maps, preventing generated browser pages from leaking into API-only OpenAPI output.
6
+ - Allow applications to register model classes without manual repository declarations; preserve after-commit cache invalidation for their derived repositories.
7
+ - Expose startup route composition for conventional application route files while retaining middleware, collision detection, tenant boundaries and native Bun responses.
6
8
 
7
- ## 3.0.6
9
+ ## 3.0.8
8
10
 
9
- - Add packaged `defineApp` and `serveApplication` composition, shared account workflows, database provisioning/migration helpers and concise model/event listener declarations.
10
- - Validate and freeze configuration before provisioning or migration. Carry the same snapshot through auth, workers, migrations and seeding; resolve relative storage/SQLite paths from the application root.
11
- - Run canonical provider setup and boot in the correct phases, retain application-owned resource cleanup, and reject missing worker configuration before schema side effects.
12
- - Keep composition tokens identical across the package root and application entrypoint. Fix separately bundled event listeners using a different token from application event bindings.
13
- - Narrow consumer queue/event/policy capabilities and expose bootstrap test controls only through `@getstrata/bootstrap/testing`.
14
- - Integrate core shutdown and authentication fixes, including browser-bound OAuth/SAML state, purpose-bound password confirmation and compatible positive JWT lifetimes.
15
-
16
- **Upgrade:** Existing applications should adopt the small `defineApp` declaration and current generated composition instead of copying framework lifecycle code. Model/repository registration and account mapping remain explicit. Update removed test-control imports. Package upgrades do not rewrite existing auth modules: apply the current GitHub/SAML route changes, use HTTPS for SAML, and expect one fresh password confirmation. See [the release notes](../../docs/releases/3.0.6.md).
17
-
18
- ## 3.0.5
19
-
20
- - Fixed SQLite queries returning no rows when SQL begins with comments, including VALUES, PRAGMA, EXPLAIN, and compact RETURNING statements.
21
- - Aligned memory and Redis cache expiration. Added put and forever to ordinary, tagged, and execution-scoped caches. Zero or negative TTLs now remove entries; invalid numeric TTLs are rejected before effects.
22
- - Fixed stale cache loaders overwriting newer writes and empty cache keys bypassing memory limits.
23
- - Fixed internal redirect validation bypasses and preserved repeated query parameters.
24
- - Fixed malformed intended-URL and flash cookies throwing errors.
25
- - Fixed CI package dry-runs failing when the package version was already published.
26
-
27
- **Migration:** Replace Redis TTL 0 used for permanent storage with forever(). For a permanent configured default, use . TTL units remain milliseconds.
28
-
29
- ## 3.0.4
30
-
31
- Restore workspace-based npm publication and remove custom archive packing/recovery. Skip confirmed existing versions, stop on registry lookup failures, and accept successful npm uploads without requiring immediate registry visibility. Retain release quality gates, pinned npm, provenance and publication dry-runs. The v3.0.3 attempt published only @getstrata/core before its visibility check failed.
32
-
33
- ## 3.0.3
34
-
35
- Remove the separate successful-main-CI prerequisite; the release workflow still requires its own full quality gate before publication.
36
-
37
- Fix npm publication of local release archives by resolving paths absolutely, avoiding GitHub shorthand interpretation. Exercise archive publication dry-runs in CI and before live publication. Preserve the failed v3.0.2 tag; its first publish failed before any package was published.
38
-
39
- ## 3.0.2
40
-
41
- Reconcile completed framework ownership and retirement documentation. Clarify the exact-commit main CI prerequisite, early-tag retry procedure, and maintainer release handoff; improve the release admission diagnostic without changing its checks.
42
-
43
- Remove unused internal renderer/build compatibility helpers and migrate their test imports. Refresh v3 application, auth, discovery, queue, tracing and lifecycle guidance; clearly label retained 2.x qualification evidence.
44
-
45
- ## 3.0.1
46
-
47
- Fix release archive packing for npm 12 package-keyed JSON output while retaining npm 11 compatibility. Validate archive identity and integrity, pin the publication toolchain, and exercise actual release packing in CI. The v3.0.0 tag remains unchanged; its failed workflow published no npm packages.
48
-
49
- ## 3.0.0
50
-
51
- Breaking application-owned runtime, typed authorization and persistence, immutable starter plans, isolated adapters and authenticated queue handoffs.
52
-
53
- ## 2.2.60
54
-
55
- - Align the core requirement with the 2.2.60 PostgreSQL failed-job persistence correction. Bootstrap, HTTP/auth, lifecycle and public/protected contracts are unchanged.
56
-
57
- ## 2.2.59
58
-
59
- - Align the core dependency with the compatible 2.2.59 schema, repository typing, mail initialization and migration-status corrections. Bootstrap runtime, HTTP/auth, lifecycle and public/protected extension contracts are unchanged.
60
- - Native assets and the explicit public artifact-origin API remain major-version design work; this release adds no breaking implementation.
61
-
62
- ## 2.2.58
63
-
64
- PostgreSQL runtime privilege fix: Replace broad table/sequence grants with explicit CRUD and sequence usage/read permissions. Repair legacy helper-managed grants that allowed TRUNCATE across RLS tenant boundaries. Preserve provisioning locks and transactional rollback. Resolves #364 through #370.
65
- UUID schema columns: Add table.uuid() with PostgreSQL native UUID, MySQL CHAR(36) and SQLite TEXT. Supports explicit constraints and application-supplied identifiers; existing schemas remain unchanged. #365
66
- Model and view generators: Add make:model for declarative models with automatic repositories, and make:view for escaped Eta templates. Support nested names and explicit model metadata, with path validation and overwrite protection. Migrations remain explicit and separate. #368
67
- Repeated form values: Add opt-in { preserveRepeated: true } parsing through core form helpers and WebFormRequest, retaining repeated text and files in order. Existing parsing defaults remain unchanged; applications retain responsibility for duplicate validation. #366
68
- Mail extension documentation and coverage: Qualify existing injected MailDriver integrations, including HTTPS providers, cancellation, deadlines, error propagation and provider-controlled idempotency. This adds tests and guidance without changing stock mail transports. #367
69
-
70
- ## 2.2.57
71
-
72
- Expose CSRF_TARGET_ORIGIN_CONFIG_KEY and capture an explicitly configured CSRF target policy when constructing HttpKernel for web and cookie API groups. Root provider binds the optional environment value; existing default behavior and tenancy/proxy boundaries stay intact. Reject unparseable native HTTP request URL metadata with 400 before application callbacks and middleware.
73
-
74
- ## 2.2.56
75
-
76
- - Require Bun >=1.4.4 and align the core requirement with 2.2.56. Preserve bootstrap, HTTP/auth, lifecycle and extension-point contracts; the native-assets major-version proposal and mixed HTTP/WebSocket limitation are unchanged.
77
-
78
- ## 2.2.55
79
-
80
- - Align the core requirement with 2.2.55. Existing startup aggregation, provider drain/flush/close policy and server APIs are unchanged; native asset and mixed HTTP/WebSocket limitations remain.
81
-
82
- ## 2.2.54
83
-
84
- - Preserve own native route parameter keys such as __proto__ as data properties instead of losing them through an inherited setter. Keep the ordinary object prototype, string coercion, Bun-owned decoding and native request identity.
85
- - Align the core requirement with 2.2.54. No new route API or native asset admission/delivery or mixed HTTP/WebSocket behavior is introduced.
86
-
87
- ## 2.2.53
88
-
89
- - Preserve Bun-native decoded route parameters without decoding them a second time. Literal percent identifiers remain valid, and encoded-looking identifiers retain the key Bun supplies before binding and authorization.
90
- - Align the core requirement with 2.2.53. Native asset admission/delivery and mixed HTTP/WebSocket reporting limitations remain unchanged.
91
-
92
- ## 2.2.52
93
-
94
- - Share response policy and observation middleware for explicitly public application documents without adding auth/tenant requirements.
95
- - Allow an explicit view capability for browser SSO continuation in API/SPA applications; default view-provider behavior remains unchanged.
96
- - Require aligned core 2.2.52. Native Bun asset admission/delivery and mixed HTTP/WebSocket reporting limitations remain unchanged.
97
-
98
- ## 2.2.51
99
-
100
- - Resolve encoded static paths consistently across guarded server fallback, web routes and SPA assets, including HEAD and request-hook checks.
101
- - Align core requirements with 2.2.51; retain native asset admission, Bun delivery and mixed HTTP/WebSocket abort-reporting limitations.
102
-
103
- ## 2.2.50
104
-
105
- - Report an unsuccessful graceful drain when an admitted HTTP-only response aborts during shutdown, after waiting for outstanding application work. Preserve pre-shutdown disconnect handling and normal WebSocket shutdown.
106
- - Retain the documented mixed HTTP/WebSocket reporting limitation and upstream Bun asynchronous-pipelining truncation limitation; no lossless native-assets support is claimed.
107
- - Align the core peer requirement with 2.2.50.
108
-
109
- ## 2.2.49
110
-
111
- - Supply the real shared conditional cache operation to API and web module contexts, preserving tags, ETags, invalidation and error recovery.
112
- - Keep provider phase admission inside lifecycle ownership, retaining reverse cleanup, drain/flush/close ordering and shared application identity.
113
- - Preserve native callback arguments and cloned Response routes, apply CSRF correctly to mixed method maps, and pair normalized route aliases with the winning handler's own metadata. Existing whole-path override precedence remains intact.
114
- - Align core requirements with 2.2.49. Opaque native file/directory/HTML routes remain a known adapter limitation; this patch does not bypass request admission or introduce a public-assets API.
115
-
116
- ## 2.2.48
117
-
118
- - Align the core peer requirement with 2.2.48 for strict environment validation, compatible repository contracts and dependency-cycle diagnostics. Existing HTTP kernel, module-context and provider contracts remain unchanged.
119
-
120
- ## 2.2.47
121
-
122
- - Align the package version with the starter/CLI correction batch; no bootstrap runtime behavior changes.
123
-
124
- ## 2.2.46
125
-
126
- - Align the core dependency with 2.2.46 for the validated SPA runtime namespace contract.
127
-
128
- ## 2.2.45
129
-
130
- Offer optional Adminer consistently in Docker and Mix wizard modes when the selected database is in Compose. Generate debug-profile startup commands and complete database login instructions; correct noninteractive Docker documentation while preserving existing flag behavior. Add prompt/CLI regressions and real isolated MySQL/Postgres Adminer profile and login acceptance tests without removing assertions.
131
-
132
- ## 2.2.44
133
-
134
- Generate JSON registration, verification/resend, reset and password-confirmed MFA for API/SPA cookie starters; share guarded MFA persistence with HTML, reject malformed TOTP secrets, and extend installed-app SMTP, replay, revocation and compiler coverage without changing HTML contracts.
135
-
136
- Preserve private/no-store headers when the tenancy boundary maps an HTTP error to JSON, without changing its status/body or transaction rollback. Rebuild the starter in standalone generated-app verification to prevent stale output from producing false green results.
137
-
138
- Honor the explicit API JSON error context during password confirmation even when a client sends HTML/HTMX headers; preserve automatic HTML behavior outside that context.
139
-
140
- Use the shared JSON parser for signed password reset so malformed input is a controlled 400 and does not consume the reset proof.
141
-
142
- ## 2.2.43
143
-
144
- Add `afterCommit` for process-local effects after the outermost managed transaction, sharing savepoint rollback and tenant replay with model events. Generated auth SMTP uses this boundary even inside RLS request transactions; callback failures propagate after commit without undoing persisted accounts. Durable delivery still requires the SQL outbox.
145
-
146
- Fix MySQL verification/reset and session-revocation timestamps through the shared SQL dialect; make signup account and verification-token persistence atomic with SMTP after commit; initialize no-tenancy seed connections; add installed starter auth/SMTP/MFA/rollback journeys for every database and frontend, plus generated TypeScript profiles.
147
-
148
- ## 2.2.42
149
-
150
- Generate auth JSON and forms with explicit private, no-store cache policy. Add privateJsonResponse and typed view namespace header defaults while preserving normal public defaults, native cookies, per-response overrides and HTMX representation behavior. Cover packed APIs and actual generated cookie/token/JWT/CSRF/profile/form HTTP responses.
151
-
152
- Use the canonical error serializer for core JSON admission denials so authentication, policy/admin/ability, verification, password confirmation and body-limit failures retain no-store. Preserve exact status/message contracts, keep checker details private and retain HTML redirects/throws and successful response headers. Add packed producer regressions and a native detail-projection case.
153
-
154
- ## 2.2.41
155
-
156
- Make framework HTML/JSON error responses non-storeable, including configured/fallback renderers and custom-body 404 responses; retain success-response cache policy and add packed header regressions.
157
-
158
- Fix packaged error wrappers ignoring the configured application error renderer; preserve API JSON precedence and add packed configured/default rendering regressions.
159
-
160
- Fix packaged membership middleware and default service ignoring the configured application lookup. Use the canonical membership context while preserving explicit service injection and request isolation. Add mandatory packed external-app coverage for concurrent users, replacement configuration and propagated lookup failures.
161
-
162
- ## 2.2.40
163
-
164
- Fix shared DNS fixture state in packaged outbound consumers. safeFetch and GitHub OAuth now use the canonical safeUrl resolver while retaining DNS pinning, private-address validation and request deadlines. Add mandatory packed external-app regressions for resolver replacement and private-target refusal; document controlled-provider qualification limits.
165
-
166
- ## 2.2.39
167
-
168
- Fix published HTTP metrics registry identity: share root/subpath Prometheus state and preserve registry, class and bucket exports. Keep generated middleware/exporter observations consistent and extend installed Postgres/SQLite/MySQL HTTP regressions; no app bridge, schema change or collector-policy change.
169
-
170
- ## 2.2.38
171
-
172
- Qualify packed OIDC and SAML callbacks across Postgres, SQLite and MySQL. Fix explicitly non-migrating local bootstrap provisioning, dialect-safe transactional SAML replay, verified bearer ACS recipient binding, and independent SAML Response Destination validation through a maintained parser. Fix owned listener/client address mismatches with typed generated native options and optional CLI HOST, retaining default production binding. Preserve existing generated auth, production guards, compiler/runtime assertions and coverage gates; live provider and deployment qualification remain separate.
173
-
174
- ## 2.2.37
175
-
176
- Fix MySQL repository entity-returning mutations with transaction-pinned readback, persisted keys/defaults, honest null and deletion outcomes, complete model event payloads and injected connection ownership. Preserve native Postgres/SQLite RETURNING and conditional affected-row metadata. Close owned generated OpenAPI and failed-job command applications on success and failure before exit; retain both command and cleanup errors. Add mandatory packaged MySQL production column-tenancy CLI and HTTP auth/SCIM acceptance with an owned DML-only account, unchanged route/spec/SDK contracts, native ORM regressions and cleanup tests. Records dogfood issues #232 and #233 without application SQL workarounds.
177
-
178
- ## 2.2.36
179
-
180
- Add a mandatory installed-package SQLite column-tenancy CLI/OpenAPI/HTTP profile, including cookie/token/JWT/Basic and repeated SCIM isolation, while preserving existing Postgres security, route inventories, compiler combinations and Docker gates. Reconcile observability/rotation trackers against shipped capabilities and remaining operational qualification.
181
-
182
- Fix declared default exports missing from nine published core subpaths. Preserve defaults in generated non-shared entries and alias the shared BaseRepository default to its canonical root constructor, retaining named exports and singleton/class identity. Extend declaration/runtime verification with value-default and type-only-default regressions; compile all nine imports across the existing 18 generated compiler combinations and execute them in every installed candidate app. Records the published 2.2.35 reproduction from Q01 dogfooding; no shop adapter or node_modules patch.
183
-
184
- ## 2.2.35
185
-
186
- Retire checked-in HiroApp applications after preserving security, CLI/OpenAPI/HTTP, source, migration and Docker acceptance in generated candidate-package fixtures. Keep all 23 security cases, 40 runtime operations, 22 API/protocol operations, three-engine migration cases and 18 compiler combinations. Make the private root CLI fixture-only, isolate post-commit HTTP databases, and validate the generated production image with restricted runtime credentials, Redis recovery and graceful shutdown. Remove obsolete app regeneration/selectors and update contributor, generator and deployment documentation; retain compatible example preset IDs and explicit application-owned deployment boundaries. Regenerate the sample SDK from the API-only snapshot and verify it against the installed candidate package. Core coverage retains 136 enforced files at 100%; remove only the two deleted private-entrypoint exemptions (272 remaining).
187
-
188
- ## 2.2.34
189
-
190
- Complete opt-in persisted account-state adoption: atomic SCIM suspension/reactivation and credential revocation, serialized generated password/SSO issuance, version-bound session/MFA/confirmation proofs, safe optional credential-table handling and malformed-cookie rejection. Includes explicit schema migration and upgrade instructions; installing packages alone does not rewrite existing apps.
191
-
192
- Database-cookie stores persist and compare optional session epochs, reject inactive/invalid creation state and project the current epoch for sensitive-write fencing. Legacy stores without epoch metadata retain timestamp-watermark behavior. Cookie-session schemas must explicitly opt into the additive session column before deploying epoch-aware writers.
193
-
194
- ## 2.2.33
195
-
196
- Fix shared tenant lookups in generated SQLite column-tenancy apps through typed repositories. Generated SCIM rejects unsupported status/profile mutations before writing and runs mutations in explicit transactions, including immediate observer rollback. Add actual SQLite and restricted Postgres HTTP regressions; full account deactivation remains unsupported and explicit.
197
-
198
- ## 2.2.32
199
-
200
- Generated JSON and HTML email verification now atomically consumes the one-time link with the account update and immediate observers, including SQLite/non-RLS apps. Failed verification remains retryable. Adds actual signed HTTP rollback, purpose/expiry/admission, concurrency and replay regressions while preserving existing response contracts.
201
-
202
- ## 2.2.31
203
-
204
- Preserve JWT issuance precision across millisecond revocation cutoffs without changing expiration. Generated MFA setup rejects stale concurrent state changes and atomically commits credential revocation in SQLite/non-RLS as well as Postgres RLS. Adds real HTTP initial/replacement races, revocation rollback and withheld-success recovery regressions; intentional fresh replacement remains supported.
205
-
206
- ## 2.2.30
207
-
208
- Basic authentication resolution is reused only within the same Request and unchanged credentials, preventing middleware/controller lookups from consuming MFA recovery proofs twice. Adds real HTTP replay/concurrency and credential/guard invalidation regressions.
209
-
210
- ## 2.2.29
211
-
212
- MFA recovery-code persistence atomically claims the validated snapshot and rejects stale requests before credential issuance. Basic authentication fails closed and consumes under the verified RLS identifier scope. Adds native SQLite/Postgres/MySQL concurrency and restricted-role regressions.
213
-
214
- ## 2.2.28
215
-
216
- Generated JSON and HTML password resets validate input before consuming signed links and atomically commit token consumption, password updates and credential revocation. Adds real generated-app failure, retry, replay and cookie/token/JWT revocation regressions.
217
-
218
- ## 2.2.27
219
-
220
- Storage distinguishes missing objects from filesystem, authorization, missing-bucket and transport failures; S3 reads use a single native GET. Adds native Bun protocol regressions and documents failure/reconciliation contracts.
221
-
222
- ## 2.2.26
223
-
224
- Fix complete safe integer validation with optional strict JSON-number input; add scoped read-only outbox delivery inspection; add typed grouped sums with exact textual totals, protected predicates and dialect/RLS regressions.
225
-
226
- ## 2.2.25
227
-
228
- Queue worker run loops recover native Redis connection closure with bounded backoff and a fresh connection. Uncertain Redis mutations are not replayed; retained reservations and retries use normal recovery. Explicit closure remains terminal and non-connection errors remain fatal. Native poll/ack closure regressions cover Streams and list transports.
229
-
230
- ## 2.2.24
231
-
232
- Fix Redis cache recovery after transport failures and command deadlines: retire failed connections, abort active fills, and lazily reconnect for later operations without replaying uncertain commands; preserve permanent explicit closure and shared invalidation fencing.
233
-
234
- ## 2.2.23
235
-
236
- Fix native SMTP hangs with bounded whole-send deadlines, cancellation, buffered multiline replies, complete writes and verified implicit TLS. Preserve known final DATA acceptance through cleanup failures. Correct DATA transparency, CRLF, UTF-8 MIME/header encoding and long-line framing; reject incomplete AUTH and unsupported SMTPUTF8 envelopes explicitly. Generate documented SMTP timeout and TLS defaults. Real socket/TLS/protocol regressions cover outages, cancellation, accepted sends and framing; SMTP delivery before final acknowledgement remains uncertain.
237
-
238
- ## 2.2.22
239
-
240
- Preserve caller auth, credential sources, request metadata and application async stores through cold/queued native transaction callbacks. Serialize Postgres privilege grants with full provisioning using atomic database-scoped batches, retaining delegated-admin permissions and rollback/retry safety. Add real constrained-pool JSON/HTML bearer/session-CSRF and concurrent grant/atomicity regressions; no automatic workers, auth bypass or production runtime provisioning.
241
-
242
- ## 2.2.21
243
-
244
- Make registered queue/outbox workers discoverable in CLI help and generated startup guidance. Announce polling after boot and when it stops without claiming dependency health, printing secrets, or starting workers automatically. Preserve explicit process ownership, delivery semantics and graceful lifecycle; cover idle, boot/runtime/cleanup failures and real SIGTERM draining.
245
-
246
- ## 2.2.20
247
-
248
- Validate complete migration definitions before callbacks, locks or database effects; reject malformed exports and duplicate names with source diagnostics. Refuse fresh with missing applied definitions and rollback with incomplete latest batches; preserve partial forward migration and remove blanket history deletion. Cover physical schema/data/history preservation and reset recovery on real Postgres, MySQL and SQLite, plus loader and preflight regressions; document safe missing-file recovery and unchanged atomicity limits.
249
-
250
- ## 2.2.19
251
-
252
- Fix explicit development fresh resets with unfinished outbox deliveries while preserving ordinary rollback guards. Record each completed reset down immediately so later refusal leaves recoverable migration progress; document partial-DDL/crash limits and old-history reconciliation. Add independent outbox-state and reset failure/migrate/retry regressions on real Postgres, MySQL and SQLite, history-write/reapplication fault injection, and a documented stateful regression review flow.
253
-
254
- ## 2.2.18
255
-
256
- Add optional typed guardMigrationRollback for application-owned rollback history predicates; skip history reads only during explicit development fresh resets, propagate predicate failures, and reuse the contract for encryption-checkpoint archival protection. Document guard placement and unchanged reset/rollback safety; cover type, runner and real SQLite history regressions.
257
-
258
- ## 2.2.17
259
-
260
- Add explicit development-only migration reset context while preserving guarded rollback and encryption archival; align generated fresh entries and reject production/staging or unsupported reset arguments before provisioning. Replace CSP-blocked error-page JavaScript navigation with safe same-origin links, and correct ambiguous Postgres/SQLite foreign-key messages without changing their HTTP status.
261
-
262
- ## 2.2.16
263
-
264
- Allow managed outbox workers to reuse a configured instance, preserving application tenant resolution, listener registration and delivery settings. Keep generated listeners-only defaults compatible, reject ambiguous worker sources, and cover configured SQL delivery, cancellation, cleanup and TypeScript contracts.
265
-
266
- ## 2.2.15
267
-
268
- - Batch legacy list-queue priority polling while retaining recovery and ownership contracts.
269
- - Batch dialect-portable pivot writes with framework transaction/savepoint composition and consistent numeric/string ID toggle semantics. Noncanonical or textual IDs use sequential database comparisons to preserve coercion and collation behavior.
270
- - New Redis scaffolds explicitly select Streams; existing unset transport settings continue to select lists.
271
- - Generate the SQL outbox migration, listener registry and managed worker command. Durable publication and cache-invalidation activation remain explicit.
272
-
273
- - Primary-key ascending `chunk` queries reuse the existing keyset walk, including default primary-key ordering; projections, joins, grouping, locks and other orders retain OFFSET behavior.
274
- - Empty filtered pagination totals skip the row query. Nonempty page-number pagination preserves OFFSET semantics and its count-plus-row-query budget; explicit cursor/keyset APIs remain available for deep traversal.
275
- - Independent hashed write casts run concurrently. Deterministic regressions prove concurrent start, complete awaiting and failure before model observers or SQL writes; hydration and existing-hash behavior are preserved.
276
- - Streams workers poll retry promotion, pending recovery and new delivery across priorities in one bounded Redis script, preserving priority, ownership fencing and at-least-once delivery contracts.
277
- - Clarify historical 2.1.0–2.2.13 release notes and database/queue documentation. Remove the consolidated 1.x-to-2.x migration guide; existing projects are upgraded individually.
278
-
279
- ## 2.2.14
280
-
281
- Complete the scoped HTML rendering starter adoption: generated apps inject ViewRenderer through createViewProvider instead of copying renderPage; welcome pages opt into HTMX fragments with full-page fallbacks, auth retains existing contracts, and CORS preserves representation Vary headers. Includes generator, runtime auth and cache-header regressions.
282
-
283
- Add optional typed resourceRoutes and strict mergeRouteMaps composition, preserving native Bun routing and app-owned middleware. Add explicit ViewRenderer.namespace prefixes with unchanged layout/Response/HTMX contracts; generated auth controllers use the namespace. Includes native HTTP, compile-time, rendering isolation and generator regressions.
284
-
285
- ## 2.2.13
286
-
287
- - Add a typed per-app HTML renderer on top of the native response path.
288
- - Add explicit HTMX page and fragment responses. A fragment can fall back to the full page. Layout and auth response contracts stay the same.
289
-
290
- ## 2.2.12
291
-
292
- - Require Bun >=1.4.3; align CI, generated/existing example runtime pins and Docker stages to 1.4.3, with bun-types >=1.4.3 behind the official @types/bun shim.
293
-
294
- Add identified field-encryption keyrings, reader-first email/MFA configuration, and explicit transactional maintenance rotation for ciphertext and lookup keys with durable checkpoints, RLS scopes, fresh retirement audits and backup/rollback guidance. Fix SQLite primary-key compilation for non-generated keys. Preserve legacy auth defaults; no automatic data migration.
295
-
296
- ## 2.2.11
297
-
298
- Add independently interruptible read-only SQLite and MySQL observations; extend bounded failed-job and outbox metrics to file-backed SQLite and URL-backed MySQL with schema/index guards, real-engine regressions and three-process consistency tests. Preserve Postgres RLS and business transaction behavior.
299
-
300
- ## 2.2.10
301
-
302
- - Add bounded OpenTelemetry SDK health observations and selected native transaction-acquisition histograms through explicit metrics options.
303
- - Add bounded Postgres failed-job counts using ORM ID projections, with schema guards, native acquisition deadlines and read-only collector draining.
304
- - Observe Streams retry promotion lateness using Redis time; cancellation cleanup sentinels omit unavailable age instead of reporting age since epoch.
305
- - Generate typed runtimeMetrics opt-in and provider-owned SQL collector draining, including startup cleanup; HTTP-only defaults and borrowed tracing ownership remain intact.
306
- - Keep additional SQL observation dialects, sustained operational qualification and encryption rotation explicit follow-up work.
307
-
308
- ## 2.2.9
309
-
310
- - Pool checkout can be cancelled. `reserve({ signal })` on the native driver aborts while it is still waiting for a connection. Drivers without that method are not given a fake one.
311
-
312
- ## 2.2.8
313
-
314
- - Add bounded, read-only Postgres outbox metrics.
315
- - Add bounded, opt-in Redis queue metrics. List and Streams depth stay separate.
316
-
317
- ## 2.2.7
318
-
319
- - `ORDER BY` accepts explicit `nulls: "first" | "last"`. Postgres and SQLite emit `NULLS FIRST` / `NULLS LAST`. MySQL has no `NULLS FIRST` / `NULLS LAST` clause, so it orders nulls with an `IS NULL` discriminator and leaves the rest of the sort unchanged.
320
-
321
- ## 2.2.6
322
-
323
- - The CLI, when it supervises the app or worker as a child, forwards shutdown signals to that child and waits for it. The container launcher no longer exits while the child is still running.
324
-
325
- ## 2.2.5
326
-
327
- - Container readiness no longer means the API is admitting traffic. Database readiness no longer provisions roles or creates a missing database. A failed configured admin connection does not fall back to a generated password.
328
-
329
- ## 2.2.4
330
-
331
- - Composite keyset pages on Postgres seek with a row comparison (`(a, b) > (cursor)`), so the planner can start at the index bound instead of expanding the cursor into a chain of OR predicates.
332
-
333
- ## 2.2.3
334
-
335
- - Add scoped composite keyset pagination. The order must end with the primary key. Global scopes and caller filters stay in force across the cursor. Joins, grouping, and offset queries are rejected.
336
-
337
- ## 2.2.2
338
-
339
- - Schema `bigId` emits an explicit 64-bit generated identity.
340
- - Repository writes can be conditional and set-based.
341
- - Repositories and models can take a typed row lock inside the current transaction.
342
- - Generated Postgres query handles keep tagged-SQL typing.
343
-
344
- ## 2.2.1
345
-
346
- - Opt-in Redis Streams (`QUEUE_REDIS_TRANSPORT=streams`). Lists stay the default. Streams adds consumer-group recovery, persisted retry schedules, total job deadlines, opt-in cancellation, and a stable job id across replay. Conversion from lists is a stopped maintenance step.
347
- - Failed jobs stay recorded until retry admission succeeds. Manual replay keeps `failed_job.job_id` when the row has one.
348
- - Public reads and tenant host selection are separate. Unknown hosts fail closed. Forwarded hosts are accepted only from configured trusted proxies.
349
- - Generated apps can provision one initial administrator with `auth:provision-admin` and a one-time claim migration. Demo seeding stays explicit and is rejected in production and staging.
350
- - Quota and in-memory throttle docs match the code: memory throttles stay process-local, and a Redis failure does not fall back to them.
351
-
352
- ## 2.2.0
353
-
354
- Consistent model scopes.
355
- Changed-field model writes.
356
- Awaited provider startup.
357
- Shared cache correctness.
358
- Native HTTP controls and body limits.
359
- Graceful lifecycle.
360
- Validated async discovery.
361
- Stronger model input types.
362
- OpenTelemetry tracing.
363
- Distributed scheduler ownership.
364
- App-owned quota policy.
365
- Bounded memory throttling.
366
-
367
- ## Unreleased
368
-
369
- - Provide shared tracing provider ownership and phased OpenTelemetry flush/shutdown without replacing application global tracer providers.
370
-
371
- - Breaking source contract: `discoverJobs()` and `discoverListeners()` now return promises. Await ESM discovery before queue construction or listener boot; malformed exports and duplicate discovered identities fail visibly. Add explicit job/listener/module manifests for bundles, preserve custom job factories, evict failed discovery loads and protect publication after reset. See `docs/DISCOVERY.md` before release/adoption.
372
-
373
- - Make provider startup awaited, register all providers before boot, and expose idempotent context disposal with failure cleanup. Direct startup helper callers must now await; appContext getters require completed startup.
374
-
375
- - Add awaited model discovery with nested exports, two-phase naming/boot, duplicate-name detection and startup error propagation.
376
-
377
- ## 2.1.0
378
-
379
- - Generated apps reuse the shared config store and base repositories instead of a copied stack.
380
- - Password casts are awaited before the write reaches SQL or observers. Hydration does not hash.
381
- - Model queries keep the concrete model type in their results. Service tokens, route handlers, and the starter's generated infrastructure were tightened in the same release.
382
-
383
- ## 2.0.9
384
-
385
- - fix(starter): remove demo credentials from public login defaults
386
-
387
- ## 2.0.8
388
-
389
- - fix(schema): preserve constraints and generate builder migrations
390
-
391
- ## 2.0.7
392
-
393
- - Fix concurrent Postgres role provisioning across databases
394
-
395
- ## 2.0.6
396
-
397
- - Dispatch registered Bun route preflights through CORS
398
-
399
- ## 2.0.5
400
-
401
- - Allow explicitly approved application headers in CORS
402
-
403
- ## 2.0.4
404
-
405
- - Place cache rollout guidance beside outbox docs without overlapping API additions
406
-
407
- ## 2.0.3
408
-
409
- - Persist transactional events with leased tenant-aware SQL outbox workers
410
-
411
- ## 2.0.2
412
-
413
- - Adopt TypeScript 7.0.2 in framework and generated apps; preserve tested TypeScript 5.9 and 6.x consumer compatibility.
414
- - Verify six generated app configurations against three compiler versions and typecheck/build React SPA and hybrid frontends.
415
- - Declare Bun-supported CSS imports in the SPA scaffold for TypeScript 7.
416
-
417
- ## 2.0.1
418
-
419
- - Fix release lockfile drift and CLI 2.x peer compatibility
420
-
421
- ## 2.0.0
422
-
423
- - Strata 2.0: compose business transactions and tenant scopes
424
-
425
- ## 1.1.9
426
-
427
- - Defer model events until the surrounding transaction commits
428
-
429
- ## 1.1.8
430
-
431
- - Exclude HTML and SPA routes from generated OpenAPI specs
432
-
433
- ## 1.1.7
434
-
435
- - Fix generated webhook SQL, billing hook, and hybrid SPA smoke
436
-
437
- ## 1.1.6
438
-
439
- - Add optional OIDC cookie login and loopback discovery
440
-
441
- ## 1.1.5
442
-
443
- - Close dogfood gaps: webhook docs, starter extras, signing helper
444
-
445
- ## Unreleased
446
-
447
- - Docs no longer mention `registerWebhookJobs()`. Default jobs stay `cache.invalidate-tags` and `audit.export`. Apps discover `src/jobs/*.ts` with `discoverJobs()` (generated `--webhooks` registers `webhook.dispatch`).
448
-
449
- ## 1.1.4
450
-
451
- - Publish http/uploads, validateUploadFile, migration-adoption docs
452
-
453
- ## 1.1.3
454
-
455
- - Eager with() arrays, OpenAPI mkdir, public-read/auth docs
456
-
457
- ## 1.1.2
458
-
459
- - Product CLI helpers, file migrations, and job discovery.
460
-
461
- ## Unreleased
462
-
463
- - `discoverJobs()` loads `src/jobs/*.ts` default exports with `static jobName` into `jobRegistry`, same cache pattern as `discoverListeners()`.
464
- - Queue providers register default jobs and discovered jobs together.
465
-
466
- ## 1.1.1
467
-
468
- Fix generated app boot
469
-
470
- ## 1.1.0
471
-
472
- Lockstep with `@getstrata/core` 1.1.0. Cookie sessions select `s.created_at AS session_created_at` so `users.created_at` from `u.*` cannot clobber the session issued-at. API group always includes session-mutating CSRF. `buildModuleRoutes` maps thrown API middleware errors (including CSRF `ForbiddenError`) to JSON. `HttpKernel.wrap("api")` does the same for routes used outside that builder. Path confinement on the web server and safer production defaults. The rls role denylist checks the runtime URL (`APP_DATABASE_URL` when set, otherwise `DATABASE_URL`) so fixture admin `DATABASE_URL` can stay `postgres`.
473
-
474
- ## 1.0.9
475
-
476
- Label HiroApp as internal e2e dogfood and seed notes via Model
477
-
478
- ## 1.0.8
479
-
480
- - Container image starts and ships production dependencies only.
481
-
482
- ## 1.0.7
483
-
484
- ## 1.0.6
485
-
486
- - Lockstep with `create-strata` 1.0.6. No runtime changes.
487
-
488
- ## 1.0.5
489
-
490
- - Lockstep with `create-strata` 1.0.5. No runtime changes.
491
-
492
- ## 1.0.4
493
-
494
- - `assertProductionSecrets()` uses `isProductionEnv()`, so `NODE_ENV=production`, `APP_ENV=Production`, and `APP_ENV=staging` cannot skip the guard.
495
- - Feature flags parse with `envFlagEnabled()` (`=== "true"` only).
496
-
497
- ## 1.0.3
498
-
499
- - Lockstep with `create-strata` 1.0.3. No runtime changes.
500
-
501
- ## 1.0.2
502
-
503
- - Lockstep with `create-strata` 1.0.2. No runtime changes.
504
-
505
- ## 1.0.1
506
-
507
- - `assertProductionSecrets()` rejects secrets still holding a generated `change-me` placeholder. The shipped `SESSION_SECRET` placeholder was 38 characters, so it passed the length check and booted in production unchanged.
508
- - Cookie sessions write timestamps through the active dialect, so `CookieSessionStore.create()` works on MySQL.
509
- - Removed the `createRoutes` subpath. It was in-repo fixture HTTP, documented as not an app API, and it packed a stray `dist/_.._/_.._/index.html` asset and dogfood helpers into the tarball.
510
- - Removed leftover third-party product token strings from the production blocklist.
511
- - `assertProductionSecrets()` requires `APP_URL` to be a public `http(s)` origin (localhost rejected, plain http warns). Signed links and redirects are built from it.
512
- - `createWebServer()` records the socket address (IPv4-mapped addresses normalized) in the request context, so throttles, request logs, and session rows see the real client.
513
- - `CookieSessionAuthManager.signIn()` fills `ip_address` and `user_agent` from the request context when the caller passes no meta. The `Secure` cookie flag now keys on `APP_ENV=production` (or `NODE_ENV`), matching the rest of the framework; generated apps never set `NODE_ENV`, so production cookies were not marked `Secure`.
514
- - `engines.bun` is declared.
515
-
516
- ## 1.0.0
517
-
518
- - First stable release of `@getstrata/bootstrap`.
519
-
520
- ## 0.4.3
521
-
522
- - Cookie session `mapUser` / row mapping can pass `email_verified_at` through as `emailVerifiedAt` so HTML email verification works.
523
- - Session insert binds `expires_at` as an ISO string so SQLite cookie login does not fail parameter binding.
524
-
525
- ## 0.4.2
526
-
527
- - `HttpKernel.wrapApi` uses `withJsonErrorHandling`. Hybrid views do not turn API errors into HTML.
528
-
529
- ## 0.4.1
530
-
531
- - `createSpaRoutes` reads `SPA_PREFIX`, registers `prefix`, `prefix/`, and `prefix/*`, and accepts `distDirectory` plus `wrap`. Hybrid still does not redirect `/`.
532
- - `appEnvSchema` defaults `SPA_PREFIX` from core `DEFAULT_SPA_PREFIX`.
533
- - Peer `@getstrata/core` `^0.7.1`.
534
-
535
- ## 0.4.0
536
-
537
- - Peer `@getstrata/core` `^0.7.0`.
538
- - Production `SESSION_SECRET` is required whenever views are on (`FRONTEND_MODE=server-htmx` or `hybrid`).
539
- - Hybrid SPA routes stay under `/app/*`. They do not redirect `/`, so HTML at `/` keeps the home path.
540
- - `appEnvSchema` validates `FRONTEND_MODE` with the core pattern, including `hybrid`.
541
- - `HttpKernel.wrapApi` maps thrown HTTP errors to JSON the same way `wrapWeb` maps them to HTML.
542
-
543
- ## 0.3.0
544
-
545
- - Peer `@getstrata/core` `^0.6.0`.
546
- - Cookie session SQL uses the current SQL dialect for placeholders, `NOW()`, and `NULLS LAST`.
547
- - Kernel helpers cover guest, verified-email, and password-confirm gates.
548
-
549
- ## 0.2.68
550
-
551
- - `configureModulesDirectory()` clears the discovered-module cache when the directory changes, so OpenAPI/`createApp` can load HiroApp after core tests pointed at empty fixtures.
552
- - `createWebRoutes()` / `mergeWebRoutes()` accept optional `{ modules }` so leftover bootstrap route assembly does not pick up the dogfood app's modules. `CreateWebRoutesOptions` is exported from the public API.
553
-
554
- ## 0.2.67
555
-
556
- - `CookieSessionStore.create()` records optional browser metadata (`userAgent`, `ipAddress`, `last_active_at`).
557
- - `CookieSessionStore` can list live sessions, touch `last_active_at`, and destroy every session except the current cookie (`listForUser`, `touch`, `destroyOtherSessions`).
558
- - `CookieSessionAuthManager.signIn()` / `signInRedirect()` accept the same metadata. Apps that use cookie sessions (HiroApp) must have `user_agent`, `ip_address`, and `last_active_at` on `sessions`.
559
-
560
- ## 0.2.66
561
-
562
- - `assertProductionSecrets()` is feature-gated for every app. API tokens no longer imply HiroApp's encryption/CORS/OAuth/public-read checklist. Published test token strings are still denied. HiroApp's extra production profile lives in the app (`src/config/productionSecrets.ts`).
563
- - **Breaking:** `HttpKernel.wrapWebGuest()` defaults `home` to `/` instead of `/organizations`. Apps with an org home should pass that path (HiroApp already does).
564
- - `createWebRoutes()` no longer seeds a `/` → `/organizations` redirect. The in-repo app owns `/` via its organization module.
565
-
566
- ## 0.2.65
567
-
568
- - App listener discovery reads `src/listeners` from `process.cwd()` so a built `@getstrata/bootstrap` bundle still finds HiroApp registrars (`import.meta.dir` after `build:bootstrap` is the package dist). Listener boot calls each registrar every time (registrars are idempotent per `eventBus`).
569
-
570
- ## 0.2.64
571
-
572
- - `registerDefaultJobs()` no longer registers HiroApp `webhook.dispatch`. Apps that dispatch model webhooks should call `registerWebhookJobs()` (HiroApp's webhook provider and `queue:work` do).
573
-
574
- ## 0.2.63
575
-
576
- - `HttpKernel.wrapWebGuest()` `home` accepts `string | ((user) => string | Promise<string>)` so signed-in guest redirects can follow the current team. Default remains `/organizations`.
577
-
578
- ## 0.2.62
579
-
580
- - `HttpKernel.wrapWebPasswordConfirm()` is the HTML password-confirm gate. Peer `@getstrata/core` `^0.5.75`.
581
-
582
- ## 0.2.61
583
-
584
- - `HttpKernel.wrapVerified()` / `wrapWebVerified()` / `wrapWebAuthenticatedAllowUnverified()`. When `FEATURE_EMAIL_VERIFICATION=true`, `wrapWebAuthenticated` and `wrapWebAbility` require a verified email. Peer `@getstrata/core` `^0.5.74`.
585
-
586
- ## 0.2.60
587
-
588
- - Peer `@getstrata/core` `^0.5.73` for public OpenAPI email verification resend.
589
-
590
- ## 0.2.59
591
-
592
- - `HttpKernel.wrapWebGuest()` sends signed-in HTML users to `/organizations` (override the home path). Peer `@getstrata/core` `^0.5.72`.
593
-
594
- ## 0.2.58
595
-
596
- - Peer `@getstrata/core` `^0.5.71` for public OpenAPI `/auth/register`.
597
-
598
- ## 0.2.57
599
-
600
- - Peer `@getstrata/core` `^0.5.70` for optional OAuth `redirectUri`.
601
-
602
- ## 0.2.56
603
-
604
- - Peer `@getstrata/core` `^0.5.69` for `MembershipLookup.updateMemberRole`.
605
-
606
- ## 0.2.55
607
-
608
- - HttpKernel and route builders read `isViewsEnabled` / `isSpaEnabled` from `@getstrata/core/runtime/frontendMode` instead of HiroApp `src/config/frontend`.
609
-
610
- ## 0.2.54
611
-
612
- - `HttpKernel.wrapSigned()` applies `createValidateSignatureMiddleware` so HTMX routes can require a valid signed URL.
613
-
614
- ## 0.2.53
615
-
616
- - `registerDefaultJobs()` also registers `audit.export` (`ExportAuditLogsJob`).
617
- - In-process `audit-export` schedule runs that job instead of calling `exportPendingAuditLogs()` inline.
618
-
619
- ## 0.2.52
620
-
621
- - View provider registers `configureWebErrorView` so `errors/*.eta` render through the app Eta layout. `EtaViewEngine` receives `Request` from the layout-data resolver.
622
- - `createWebServer` unknown routes and null handlers return styled HTML 404s and run inside request ALS so `configureWebLayoutData` can read the session cookie.
623
- - `wrapSecuredRouteModelByKey` is documented as the wrong default for public HTML show pages; a missing model is a styled 404 and HTML/composite GET ETags stay off.
624
-
625
- ## 0.2.51
626
-
627
- - `createCookieSessionAuthManager` returns `CookieSessionAuthManager` (`signIn`, `signOut`, `signInRedirect`, `signOutRedirect`). Controllers no longer need a local cookie helper.
628
- - Pass `loadSessionUser` to replace the default `users.learn_subscriber` / `users.is_admin` session query. Keep `mapUser` in the app.
629
-
630
- ## 0.2.50
631
-
632
- - `createCookieSessionAuthManager` / `CookieSessionGuard` turn `CookieSessionStore` into an `AuthGuard` / `AuthManager` for `CORE_AUTH_TOKEN`. Supply a `mapUser` mapper; HiroApp abilities are not baked in. Omit `sql` to read the client from `bindDatabaseConnection()` on every call.
633
- - `checkDatabase()` / `createHealthRoutes()` ping the bound database client, not HiroApp's private connection holder. `/health` stays `{ status: "ok" }` unless `{ pingOnHealth: true }`. Extra JSON fields are optional.
634
- - `assertProductionSecrets()` is feature-gated. A production HTMX app with `SESSION_SECRET` (32+), `AUTH_DEV_HEADERS=false`, and feature flags off does not need HiroApp API tokens. HiroApp's current production env (rotated tokens, CORS, pepper, expiry) still passes.
635
- - Re-exports `CORE_ABILITY_CHECKER_TOKEN` and `CORE_AUTH_USER_DIRECTORY_TOKEN`.
11
+ Synchronize packages and correct installed starter template discovery. Both generator entrypoints include their selected templates in published packages.
package/README.md CHANGED
@@ -1,64 +1,30 @@
1
1
  # @getstrata/bootstrap
2
2
 
3
- Application bootstrap for [Strata](https://github.com/EyK-26/strata) apps: HttpKernel, service container, and web session helpers. Requires Bun >=1.4.4 (tested on 1.4.4).
3
+ Application startup, HTTP route composition, service configuration, and resource cleanup for [Strata](https://github.com/EyK-26/strata/blob/main/README.md). Requires Bun >=1.4.4; tested on Bun 1.4.4.
4
4
 
5
- Generate an app rather than wiring this by hand:
5
+ The generator configures this package for you:
6
6
 
7
7
  ```bash
8
8
  bunx create-strata my-app
9
9
  ```
10
10
 
11
- ## Install
11
+ For an existing application:
12
12
 
13
13
  ```bash
14
14
  bun add @getstrata/bootstrap @getstrata/core
15
15
  ```
16
16
 
17
- ## Application startup
18
-
19
- Generated apps use `defineApp` from `@getstrata/bootstrap/application` with a small
20
- application definition. The package supplies `bootstrapApp`, `createApp` and
21
- `createAppServer`; application choices belong in that definition. The application
22
- owns startup validation, discovery, providers, native Bun HTTP and resource cleanup.
23
- Keep the returned owner and stop it through its application lifecycle handle.
24
-
25
- Advanced integrations can still compose `createHttpKernel`, module route builders
26
- and explicit providers. Low-level application contexts require an application
27
- definition and selected connection; they are not ownerless startup shortcuts.
28
- Test seams belong on `@getstrata/bootstrap/testing`.
29
-
30
- ## Web utilities
17
+ `defineApp` from `@getstrata/bootstrap/application` takes the application definition and returns `bootstrapApp`, `createApp`, and `createAppServer`. Generated apps keep that definition in `src/bootstrap/createApp.ts`; their HTTP entry point is:
31
18
 
32
19
  ```typescript
33
- import {
34
- CookieSessionStore,
35
- createCsrfProtection,
36
- createWebServer,
37
- parseFormBody,
38
- slugify,
39
- } from "@getstrata/bootstrap";
40
- ```
41
-
42
- `CookieSessionStore` reads `is_admin` from the user row for `wrapWebGlobalAdmin`. Pass `loadSessionUser` when your `users` table does not match the default `SELECT u.*`.
43
-
44
- HTML apps should bind `createCookieSessionAuthManager` from `@getstrata/bootstrap/web/session` rather than the HMAC `SessionGuard`, then use `signIn` / `signOut` or the redirect helpers. Pass `mapUser` to map roles.
20
+ import { serveApplication } from "@getstrata/bootstrap/application";
21
+ import { createAppServer } from "./createApp.ts";
45
22
 
46
- `wrapWeb` applies the web group (CSRF plus flash) and `withErrorHandling`, so a CSRF `ForbiddenError` becomes an HTML 403 when views are on (`FRONTEND_MODE=server-htmx` or `hybrid`). `wrapWebGuest` sends signed-in users to `/` by default; pass a string or `(user) => path` to override. `wrapWebLogin` and `wrapWebRegister` already include the web group plus throttle, so do not wrap them with `wrapWeb` again. The throttle callback should return an HTML form at 429.
47
-
48
- ## SPA routes
49
-
50
- `createSpaRoutes` and `mergeSpaRoutes` serve `SPA_PREFIX` (default `/app`) as `prefix`, `prefix/`, and `prefix/*`. Hybrid keeps HTML at `/`. Pass `distDirectory` and `wrap` when the app is not the process cwd. Until the SPA is built, the prefix answers 503 telling you to run `bun run frontend:build`; generated apps ship that script.
51
-
52
- ## Queue
53
-
54
- `registerDefaultJobs()` registers `cache.invalidate-tags` and `audit.export` only. Outbound model webhooks are not a core job. Put a class with `static jobName` in `src/jobs/` (generated `--webhooks` uses `webhook.dispatch`) and discover it into the owned job registry on boot. `queue:work` already does that. There is no `registerWebhookJobs()` export.
55
-
56
- ## Not a starter API
23
+ await serveApplication(createAppServer);
24
+ ```
57
25
 
58
- `@getstrata/bootstrap/createWebRoutes` and `@getstrata/bootstrap/schedule` assemble in-repo fixture HTTP for framework tests. They are not a general app API. New apps use `buildWebModuleRoutes` and `buildModuleRoutes`.
26
+ Application paths and middleware belong in `src/routes/web.ts` and `src/routes/api.ts`. Named actions live in `src/http/controllers`; constructors receive concrete capabilities, while each action receives Bun's native `Request` and its execution ports. `BusinessRouteHandler` is exported from `@getstrata/bootstrap/persistenceContracts`, and `ModuleRouteContext` from `@getstrata/bootstrap/contracts` describes route composition.
59
27
 
60
- ## Docs
28
+ The HTTP kernel provides API and browser middleware groups, including authentication, CSRF, and throttling. Keep those declarations on the route when assigning a controller action. Optional modules can contribute routes through the same composition API. Testing helpers live on `@getstrata/bootstrap/testing`.
61
29
 
62
- - [Building apps](https://github.com/EyK-26/strata/blob/main/docs/BUILDING-APPS.md)
63
- - [Production](https://github.com/EyK-26/strata/blob/main/docs/PRODUCTION.md)
64
- - [Auth choices](https://github.com/EyK-26/strata/blob/main/docs/AUTH.md)
30
+ See the [project README](https://github.com/EyK-26/strata/blob/main/README.md), [starter guide](https://github.com/EyK-26/strata/blob/main/docs/STARTER.md), [authentication guide](https://github.com/EyK-26/strata/blob/main/docs/AUTH.md), and [production guide](https://github.com/EyK-26/strata/blob/main/docs/PRODUCTION.md).
@@ -74,7 +74,7 @@ export interface AppDefinition<A extends ApplicationAuthServices> {
74
74
  readonly token: ServiceToken<A>;
75
75
  };
76
76
  readonly models: NonNullable<DatabaseDefinition["models"]>;
77
- readonly repositories: NonNullable<DatabaseDefinition["repositories"]>;
77
+ readonly repositories?: NonNullable<DatabaseDefinition["repositories"]>;
78
78
  readonly migrate: (environment?: Readonly<Record<string, string | undefined>>) => Promise<void>;
79
79
  readonly ensureDatabase?: (options: {
80
80
  provision: boolean;
@@ -113,3 +113,6 @@ export declare function defineApp<A extends ApplicationAuthServices>(input: AppD
113
113
  export declare function serveApplication(start: () => Promise<BootstrappedApp>): Promise<BootstrappedApp>;
114
114
  export { CORE_QUEUE_TOKEN as APPLICATION_QUEUE } from "@getstrata/core/contracts/serviceTokens";
115
115
  export { APPLICATION_BILLING, APPLICATION_WEBHOOKS, } from "./application/services";
116
+ export declare function buildApplicationRoutes(dependencies: import("./contracts").AppDependencies, modules: readonly AppModule[], options: {
117
+ frontend: FrontendMode;
118
+ }): AppRouteMap;
@@ -1,6 +1,7 @@
1
1
  import type { CacheLike } from "@getstrata/core/cache/tokens";
2
2
  import { type ServiceToken } from "@getstrata/core/contracts/token";
3
- import { type AnyRepositoryDefinition } from "@getstrata/core/database/definitions";
3
+ import { type AnyModelDefinition, type AnyRepositoryDefinition } from "@getstrata/core/database/definitions";
4
+ import { type AnyModelClass } from "@getstrata/core/database/model";
4
5
  import type { DurableListener } from "@getstrata/core/events/outbox";
5
6
  import type { Queue } from "@getstrata/core/queue";
6
7
  import type { AppModule } from "../contracts";
@@ -9,5 +10,5 @@ import type { ListenerDeclarations } from "../discoverListeners";
9
10
  export declare function createModelCacheInvalidationEffects<C extends CacheLike>(repositories: readonly AnyRepositoryDefinition[], modules: readonly AppModule[], tokens: {
10
11
  readonly cache: ServiceToken<C>;
11
12
  readonly queue: ServiceToken<Queue>;
12
- }): ListenerDeclarations;
13
+ }, models?: readonly (AnyModelDefinition | AnyModelClass)[]): ListenerDeclarations;
13
14
  export declare function createModelCacheInvalidationListener(cache: CacheLike): DurableListener;
@@ -1,4 +1,4 @@
1
- export { APPLICATION_BILLING, APPLICATION_QUEUE, APPLICATION_WEBHOOKS, type AppDefinition, type ApplicationAuthOptions, type ApplicationAuthServices, type BootstrapOptions, type BootstrappedApp, defineApp, serveApplication, } from "./application";
1
+ export { APPLICATION_BILLING, APPLICATION_QUEUE, APPLICATION_WEBHOOKS, type AppDefinition, type ApplicationAuthOptions, type ApplicationAuthServices, type BootstrapOptions, type BootstrappedApp, buildApplicationRoutes, defineApp, serveApplication, } from "./application";
2
2
  /**
3
3
  * @getstrata/bootstrap: application shell for Strata apps.
4
4
  */
@@ -1 +1 @@
1
- export { defineApp, serveApplication, APPLICATION_BILLING, APPLICATION_WEBHOOKS, APPLICATION_QUEUE } from "../index.js";
1
+ export { defineApp, buildApplicationRoutes, serveApplication, APPLICATION_BILLING, APPLICATION_WEBHOOKS, APPLICATION_QUEUE } from "../index.js";
@@ -840,7 +840,11 @@ function compileRoutePlan(sources, prefix = "") {
840
840
  }
841
841
  const inherited = readRouteInventory(source.routes)?.filter((entry) => entry.path === rawPath);
842
842
  if (inherited) {
843
- inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({ ...entry, path })));
843
+ inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({
844
+ ...entry,
845
+ path,
846
+ middleware: entry.middleware.length ? entry.middleware : source.middleware ?? []
847
+ })));
844
848
  } else {
845
849
  for (const method of methods) {
846
850
  const openApi = metadata?.[method];
@@ -864,10 +868,11 @@ function compileRoutePlan(sources, prefix = "") {
864
868
  }
865
869
  if (methods.includes("GET") && !methods.includes("HEAD")) {
866
870
  const openApi = metadata?.HEAD ?? inherited?.find((entry) => entry.method === "HEAD")?.openApi;
871
+ const inheritedMiddleware = inherited?.find((entry) => entry.method === "GET")?.middleware;
867
872
  implicitHeads.set(path, {
868
873
  method: "HEAD",
869
874
  path,
870
- middleware: inherited?.find((entry) => entry.method === "GET")?.middleware ?? source.middleware ?? [],
875
+ middleware: inheritedMiddleware?.length ? inheritedMiddleware : source.middleware ?? [],
871
876
  ...openApi ? { openApi } : {}
872
877
  });
873
878
  }
@@ -836,7 +836,11 @@ function compileRoutePlan(sources, prefix = "") {
836
836
  }
837
837
  const inherited = readRouteInventory(source.routes)?.filter((entry) => entry.path === rawPath);
838
838
  if (inherited) {
839
- inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({ ...entry, path })));
839
+ inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({
840
+ ...entry,
841
+ path,
842
+ middleware: entry.middleware.length ? entry.middleware : source.middleware ?? []
843
+ })));
840
844
  } else {
841
845
  for (const method of methods) {
842
846
  const openApi = metadata?.[method];
@@ -860,10 +864,11 @@ function compileRoutePlan(sources, prefix = "") {
860
864
  }
861
865
  if (methods.includes("GET") && !methods.includes("HEAD")) {
862
866
  const openApi = metadata?.HEAD ?? inherited?.find((entry) => entry.method === "HEAD")?.openApi;
867
+ const inheritedMiddleware = inherited?.find((entry) => entry.method === "GET")?.middleware;
863
868
  implicitHeads.set(path, {
864
869
  method: "HEAD",
865
870
  path,
866
- middleware: inherited?.find((entry) => entry.method === "GET")?.middleware ?? source.middleware ?? [],
871
+ middleware: inheritedMiddleware?.length ? inheritedMiddleware : source.middleware ?? [],
867
872
  ...openApi ? { openApi } : {}
868
873
  });
869
874
  }
@@ -117,7 +117,11 @@ function compileRoutePlan(sources, prefix = "") {
117
117
  }
118
118
  const inherited = readRouteInventory(source.routes)?.filter((entry) => entry.path === rawPath);
119
119
  if (inherited) {
120
- inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({ ...entry, path })));
120
+ inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({
121
+ ...entry,
122
+ path,
123
+ middleware: entry.middleware.length ? entry.middleware : source.middleware ?? []
124
+ })));
121
125
  } else {
122
126
  for (const method of methods) {
123
127
  const openApi = metadata?.[method];
@@ -141,10 +145,11 @@ function compileRoutePlan(sources, prefix = "") {
141
145
  }
142
146
  if (methods.includes("GET") && !methods.includes("HEAD")) {
143
147
  const openApi = metadata?.HEAD ?? inherited?.find((entry) => entry.method === "HEAD")?.openApi;
148
+ const inheritedMiddleware = inherited?.find((entry) => entry.method === "GET")?.middleware;
144
149
  implicitHeads.set(path, {
145
150
  method: "HEAD",
146
151
  path,
147
- middleware: inherited?.find((entry) => entry.method === "GET")?.middleware ?? source.middleware ?? [],
152
+ middleware: inheritedMiddleware?.length ? inheritedMiddleware : source.middleware ?? [],
148
153
  ...openApi ? { openApi } : {}
149
154
  });
150
155
  }
@@ -843,7 +843,11 @@ function compileRoutePlan(sources, prefix = "") {
843
843
  }
844
844
  const inherited = readRouteInventory(source.routes)?.filter((entry) => entry.path === rawPath);
845
845
  if (inherited) {
846
- inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({ ...entry, path })));
846
+ inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({
847
+ ...entry,
848
+ path,
849
+ middleware: entry.middleware.length ? entry.middleware : source.middleware ?? []
850
+ })));
847
851
  } else {
848
852
  for (const method of methods) {
849
853
  const openApi = metadata?.[method];
@@ -867,10 +871,11 @@ function compileRoutePlan(sources, prefix = "") {
867
871
  }
868
872
  if (methods.includes("GET") && !methods.includes("HEAD")) {
869
873
  const openApi = metadata?.HEAD ?? inherited?.find((entry) => entry.method === "HEAD")?.openApi;
874
+ const inheritedMiddleware = inherited?.find((entry) => entry.method === "GET")?.middleware;
870
875
  implicitHeads.set(path, {
871
876
  method: "HEAD",
872
877
  path,
873
- middleware: inherited?.find((entry) => entry.method === "GET")?.middleware ?? source.middleware ?? [],
878
+ middleware: inheritedMiddleware?.length ? inheritedMiddleware : source.middleware ?? [],
874
879
  ...openApi ? { openApi } : {}
875
880
  });
876
881
  }
@@ -5,6 +5,7 @@ import { createServiceToken } from "@getstrata/core/contracts/token";
5
5
  import {
6
6
  repositoryEffects
7
7
  } from "@getstrata/core/database/definitions";
8
+ import { modelEffects, modelTable } from "@getstrata/core/database/model";
8
9
  import { InvalidateCacheTagsJob } from "@getstrata/core/jobs/invalidateCacheTagsJob";
9
10
 
10
11
  // ../../src/bootstrap/cache/modelCacheTags.ts
@@ -21,15 +22,19 @@ function discoverModelTableNames(modules) {
21
22
  // ../../src/bootstrap/listeners/invalidateCacheOnModelWrite.ts
22
23
  var ACTIONS = ["created", "updated", "deleted", "restored", "force-deleted"];
23
24
  var CACHE_EVENT = "strata.cache.invalidate-tags";
24
- function createModelCacheInvalidationEffects(repositories, modules, tokens) {
25
+ function createModelCacheInvalidationEffects(repositories, modules, tokens, models = []) {
25
26
  const services = [];
26
27
  const effects = [];
27
- for (const definition of repositories) {
28
+ const classes = models.filter((model) => typeof model === "function");
29
+ for (const definition of [...repositories, ...classes]) {
30
+ const model = typeof definition === "function" ? definition : undefined;
31
+ const repository = definition;
32
+ const table = model ? modelTable(model) : repository.table;
28
33
  for (const action of ACTIONS) {
29
- const tags = Object.freeze(cacheTagsForModelWrite(definition.table.name, action, modules));
34
+ const tags = Object.freeze(cacheTagsForModelWrite(table.name, action, modules));
30
35
  if (!tags.length)
31
36
  continue;
32
- const listener = createServiceToken(`cache.${definition.name}.${action}`);
37
+ const listener = createServiceToken(`cache.${table.name}.${action}`);
33
38
  services.push(service(listener, {
34
39
  lifetime: "application",
35
40
  dependencies: [tokens.cache, tokens.queue],
@@ -37,7 +42,7 @@ function createModelCacheInvalidationEffects(repositories, modules, tokens) {
37
42
  await queue.dispatch(new InvalidateCacheTagsJob(cache), { tags: [...tags] });
38
43
  }
39
44
  }));
40
- effects.push(repositoryEffects(definition, [{ action, afterCommit: listener }]));
45
+ effects.push(model ? modelEffects(model, [{ action, afterCommit: listener }]) : repositoryEffects(repository, [{ action, afterCommit: listener }]));
41
46
  }
42
47
  }
43
48
  return Object.freeze({
@@ -111,7 +111,11 @@ function compileRoutePlan(sources, prefix = "") {
111
111
  }
112
112
  const inherited = readRouteInventory(source.routes)?.filter((entry) => entry.path === rawPath);
113
113
  if (inherited) {
114
- inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({ ...entry, path })));
114
+ inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({
115
+ ...entry,
116
+ path,
117
+ middleware: entry.middleware.length ? entry.middleware : source.middleware ?? []
118
+ })));
115
119
  } else {
116
120
  for (const method of methods) {
117
121
  const openApi = metadata?.[method];
@@ -135,10 +139,11 @@ function compileRoutePlan(sources, prefix = "") {
135
139
  }
136
140
  if (methods.includes("GET") && !methods.includes("HEAD")) {
137
141
  const openApi = metadata?.HEAD ?? inherited?.find((entry) => entry.method === "HEAD")?.openApi;
142
+ const inheritedMiddleware = inherited?.find((entry) => entry.method === "GET")?.middleware;
138
143
  implicitHeads.set(path, {
139
144
  method: "HEAD",
140
145
  path,
141
- middleware: inherited?.find((entry) => entry.method === "GET")?.middleware ?? source.middleware ?? [],
146
+ middleware: inheritedMiddleware?.length ? inheritedMiddleware : source.middleware ?? [],
142
147
  ...openApi ? { openApi } : {}
143
148
  });
144
149
  }
package/dist/index.js CHANGED
@@ -1092,7 +1092,11 @@ function compileRoutePlan(sources, prefix = "") {
1092
1092
  }
1093
1093
  const inherited = readRouteInventory(source.routes)?.filter((entry) => entry.path === rawPath);
1094
1094
  if (inherited) {
1095
- inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({ ...entry, path })));
1095
+ inventory.push(...inherited.filter((entry) => entry.method !== "HEAD" || !methods.includes("GET") || methods.includes("HEAD")).map((entry) => ({
1096
+ ...entry,
1097
+ path,
1098
+ middleware: entry.middleware.length ? entry.middleware : source.middleware ?? []
1099
+ })));
1096
1100
  } else {
1097
1101
  for (const method of methods) {
1098
1102
  const openApi = metadata?.[method];
@@ -1116,10 +1120,11 @@ function compileRoutePlan(sources, prefix = "") {
1116
1120
  }
1117
1121
  if (methods.includes("GET") && !methods.includes("HEAD")) {
1118
1122
  const openApi = metadata?.HEAD ?? inherited?.find((entry) => entry.method === "HEAD")?.openApi;
1123
+ const inheritedMiddleware = inherited?.find((entry) => entry.method === "GET")?.middleware;
1119
1124
  implicitHeads.set(path, {
1120
1125
  method: "HEAD",
1121
1126
  path,
1122
- middleware: inherited?.find((entry) => entry.method === "GET")?.middleware ?? source.middleware ?? [],
1127
+ middleware: inheritedMiddleware?.length ? inheritedMiddleware : source.middleware ?? [],
1123
1128
  ...openApi ? { openApi } : {}
1124
1129
  });
1125
1130
  }
@@ -2242,6 +2247,7 @@ import { createServiceToken as createServiceToken5 } from "@getstrata/core/contr
2242
2247
  import {
2243
2248
  repositoryEffects as repositoryEffects2
2244
2249
  } from "@getstrata/core/database/definitions";
2250
+ import { modelEffects, modelTable } from "@getstrata/core/database/model";
2245
2251
  import { InvalidateCacheTagsJob as InvalidateCacheTagsJob2 } from "@getstrata/core/jobs/invalidateCacheTagsJob";
2246
2252
 
2247
2253
  // ../../src/bootstrap/cache/modelCacheTags.ts
@@ -2257,15 +2263,19 @@ function discoverModelTableNames(modules) {
2257
2263
 
2258
2264
  // ../../src/bootstrap/listeners/invalidateCacheOnModelWrite.ts
2259
2265
  var ACTIONS = ["created", "updated", "deleted", "restored", "force-deleted"];
2260
- function createModelCacheInvalidationEffects(repositories, modules, tokens) {
2266
+ function createModelCacheInvalidationEffects(repositories, modules, tokens, models = []) {
2261
2267
  const services = [];
2262
2268
  const effects = [];
2263
- for (const definition of repositories) {
2269
+ const classes = models.filter((model) => typeof model === "function");
2270
+ for (const definition of [...repositories, ...classes]) {
2271
+ const model = typeof definition === "function" ? definition : undefined;
2272
+ const repository = definition;
2273
+ const table = model ? modelTable(model) : repository.table;
2264
2274
  for (const action of ACTIONS) {
2265
- const tags = Object.freeze(cacheTagsForModelWrite(definition.table.name, action, modules));
2275
+ const tags = Object.freeze(cacheTagsForModelWrite(table.name, action, modules));
2266
2276
  if (!tags.length)
2267
2277
  continue;
2268
- const listener = createServiceToken5(`cache.${definition.name}.${action}`);
2278
+ const listener = createServiceToken5(`cache.${table.name}.${action}`);
2269
2279
  services.push(service3(listener, {
2270
2280
  lifetime: "application",
2271
2281
  dependencies: [tokens.cache, tokens.queue],
@@ -2273,7 +2283,7 @@ function createModelCacheInvalidationEffects(repositories, modules, tokens) {
2273
2283
  await queue.dispatch(new InvalidateCacheTagsJob2(cache), { tags: [...tags] });
2274
2284
  }
2275
2285
  }));
2276
- effects.push(repositoryEffects2(definition, [{ action, afterCommit: listener }]));
2286
+ effects.push(model ? modelEffects(model, [{ action, afterCommit: listener }]) : repositoryEffects2(repository, [{ action, afterCommit: listener }]));
2277
2287
  }
2278
2288
  }
2279
2289
  return Object.freeze({
@@ -3067,7 +3077,7 @@ function defineApp(input) {
3067
3077
  root: resolve6(input.root),
3068
3078
  auth: Object.freeze({ ...input.auth }),
3069
3079
  models: Object.freeze([...input.models]),
3070
- repositories: Object.freeze([...input.repositories]),
3080
+ repositories: Object.freeze([...input.repositories ?? []]),
3071
3081
  outbox: Object.freeze({
3072
3082
  ...input.outbox,
3073
3083
  listeners: Object.freeze([...input.outbox.listeners])
@@ -3141,7 +3151,7 @@ function defineApp(input) {
3141
3151
  const cacheEffects = createModelCacheInvalidationEffects(repositoryDefinitions, modules, {
3142
3152
  cache: APPLICATION_CACHE,
3143
3153
  queue: APPLICATION_QUEUE
3144
- });
3154
+ }, modelDefinitions);
3145
3155
  const catalog = [cacheEffects, ...listenerDeclarations];
3146
3156
  let invoke;
3147
3157
  let auditExport;
@@ -3959,6 +3969,7 @@ export {
3959
3969
  appSchedule,
3960
3970
  assertAppDependenciesComplete,
3961
3971
  assertProductionSecrets,
3972
+ buildApplicationRoutes,
3962
3973
  buildModuleRoutes,
3963
3974
  buildWebModuleRoutes,
3964
3975
  cacheTagsForModelWrite,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/bootstrap",
3
- "version": "3.0.7",
3
+ "version": "3.1.0",
4
4
  "description": "Strata application bootstrap: HttpKernel, DI, web session helpers",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -235,7 +235,7 @@
235
235
  ],
236
236
  "scripts": {
237
237
  "build": "rm -rf dist && bun run build:internal && bun run build:bundle && bun run build:shims && bun run build:subpaths && bun run build:types",
238
- "build:bundle": "bun build index.ts --outdir dist --target bun --external bun --external eta --external mysql2 --external @getstrata/core --external @getstrata/core/auth/authOutcome --external @getstrata/core/auth/policy --external @getstrata/core/contracts/authUserDirectory --external @getstrata/core/contracts/token --external @getstrata/core/contracts/container --external @getstrata/core/contracts/serviceTokens --external @getstrata/core/contracts/services --external @getstrata/core/contracts/executionContext --external @getstrata/core/contracts/executionOperations --external @getstrata/core/contracts/executionOwnership --external @getstrata/core/database/acquisitionMetrics --external @getstrata/core/database/errors --external @getstrata/core/errors/http --external @getstrata/core/database/definitions --external @getstrata/core/database/factory --external @getstrata/core/queue/failedJobRepository --external @getstrata/core/queue/queueConfig --external @getstrata/core/queue/queueHandoff --external @getstrata/core/database/tokens --external @getstrata/core/cache/tokens --external @getstrata/core/config/applicationConfig --external @getstrata/core/view/tokens --external '#strata-http-route' --external '#strata-job-discovery'",
238
+ "build:bundle": "bun build index.ts --outdir dist --target bun --external bun --external eta --external mysql2 --external @getstrata/core --external @getstrata/core/auth/authOutcome --external @getstrata/core/auth/policy --external @getstrata/core/contracts/authUserDirectory --external @getstrata/core/contracts/token --external @getstrata/core/contracts/container --external @getstrata/core/contracts/serviceTokens --external @getstrata/core/contracts/services --external @getstrata/core/contracts/executionContext --external @getstrata/core/contracts/executionOperations --external @getstrata/core/contracts/executionOwnership --external @getstrata/core/database/acquisitionMetrics --external @getstrata/core/database/errors --external @getstrata/core/errors/http --external @getstrata/core/http/parseMultipartUpload --external @getstrata/core/database/definitions --external @getstrata/core/database/factory --external @getstrata/core/queue/failedJobRepository --external @getstrata/core/queue/queueConfig --external @getstrata/core/queue/queueHandoff --external @getstrata/core/database/tokens --external @getstrata/core/cache/tokens --external @getstrata/core/config/applicationConfig --external @getstrata/core/view/tokens --external '#strata-http-route' --external '#strata-job-discovery'",
239
239
  "build:types": "tsc -p tsconfig.types.json && bun ../../scripts/prune-bootstrap-dist-types.ts",
240
240
  "prepublishOnly": "bun run build",
241
241
  "build:subpaths": "bun build entries/auth/accountWorkflows.ts entries/auth/runtimeConfig.ts entries/databaseCommands.ts entries/testing.ts entries/buildModuleRoutes.ts entries/buildWebModuleRoutes.ts entries/cache/modelCacheTags.ts entries/cachedJson.ts entries/config.ts entries/context.ts entries/contracts.ts entries/createWebRoutes.ts entries/createSpaRoutes.ts entries/dependencies.ts entries/discoverModules.ts entries/discoverListeners.ts entries/discoverModels.ts entries/discoverJobs.ts entries/health.ts entries/http/securedRouteModelBinding.ts entries/httpKernel.ts entries/persistenceContracts.ts entries/persistenceInvocation.ts entries/databaseReadiness.ts entries/listeners/invalidateCacheOnModelWrite.ts entries/membershipService.ts entries/metricsRoutes.ts entries/queue/defaultJobs.ts entries/providers.ts entries/providers/view.ts entries/providers/cache.ts entries/providers/events.ts entries/providers/auth.ts entries/routePlan.ts entries/schedule.ts entries/secretsGuard.ts entries/web/forms.ts entries/web/routing.ts entries/web/server.ts entries/web/session.ts entries/web/slug.ts --outdir dist --root . --target bun --external bun --external eta --external mysql2 --external @getstrata/core --external @getstrata/bootstrap --external @getstrata/bootstrap/application --external @getstrata/bootstrap/auth/accountWorkflows --external @getstrata/bootstrap/auth/runtimeConfig --external @getstrata/bootstrap/databaseCommands --external @getstrata/bootstrap/testing --external @getstrata/bootstrap/buildModuleRoutes --external @getstrata/bootstrap/buildWebModuleRoutes --external @getstrata/bootstrap/cache/modelCacheTags --external @getstrata/bootstrap/cachedJson --external @getstrata/bootstrap/config --external @getstrata/bootstrap/context --external @getstrata/bootstrap/contracts --external @getstrata/bootstrap/createWebRoutes --external @getstrata/bootstrap/createSpaRoutes --external @getstrata/bootstrap/dependencies --external @getstrata/bootstrap/discoverModules --external @getstrata/bootstrap/discoverListeners --external @getstrata/bootstrap/discoverModels --external @getstrata/bootstrap/discoverJobs --external @getstrata/bootstrap/health --external @getstrata/bootstrap/http/securedRouteModelBinding --external @getstrata/bootstrap/httpKernel --external @getstrata/bootstrap/persistenceContracts --external @getstrata/bootstrap/persistenceInvocation --external @getstrata/bootstrap/databaseReadiness --external @getstrata/bootstrap/listeners/invalidateCacheOnModelWrite --external @getstrata/bootstrap/membershipService --external @getstrata/bootstrap/metricsRoutes --external @getstrata/bootstrap/queue/defaultJobs --external @getstrata/bootstrap/providers --external @getstrata/bootstrap/providers/view --external @getstrata/bootstrap/providers/cache --external @getstrata/bootstrap/providers/events --external @getstrata/bootstrap/providers/auth --external @getstrata/bootstrap/routePlan --external @getstrata/bootstrap/schedule --external @getstrata/bootstrap/secretsGuard --external @getstrata/bootstrap/web/forms --external @getstrata/bootstrap/web/routing --external @getstrata/bootstrap/web/server --external @getstrata/bootstrap/web/session --external @getstrata/bootstrap/web/slug --external @getstrata/core/testing --external @getstrata/core/auth/accountState --external @getstrata/core/auth/accountStateMigration --external @getstrata/core/auth/accessControl --external @getstrata/core/auth/abilityChecker --external @getstrata/core/auth/authContext --external @getstrata/core/auth/authReader --external @getstrata/core/auth/authOutcome --external @getstrata/core/auth/abilityCatalog --external @getstrata/core/auth/emailVerification --external @getstrata/core/auth/guard --external @getstrata/core/auth/jwt --external @getstrata/core/auth/jwtGuard --external @getstrata/core/auth/basicAuthGuard --external @getstrata/core/auth/tokenAbilityChecker --external @getstrata/core/auth/membershipContext --external @getstrata/core/auth/membershipMiddleware --external @getstrata/core/auth/membershipScope --external @getstrata/core/auth/membershipService --external @getstrata/core/auth/oauth/oidcProvider --external @getstrata/core/auth/oauth/providers --external @getstrata/core/auth/oauth/samlProvider --external @getstrata/core/auth/oauth/types --external @getstrata/core/auth/saml/samlServiceProvider --external @getstrata/core/auth/password --external @getstrata/core/auth/passwordLogin --external @getstrata/core/auth/pendingMfaCookie --external @getstrata/core/auth/oneTimeToken --external @getstrata/core/auth/intendedUrlCookie --external @getstrata/core/auth/passwordConfirmCookie --external @getstrata/core/auth/policy --external @getstrata/core/auth/scimAuthMiddleware --external @getstrata/core/auth/sessionCookie --external @getstrata/core/auth/sessionGuard --external @getstrata/core/auth/tokenHash --external @getstrata/core/audit/exportAuditLogs --external @getstrata/core/audit/siemFormatter --external @getstrata/core/admin/formatValue --external @getstrata/core/admin/registry --external @getstrata/core/admin/types --external @getstrata/core/cache/tags --external @getstrata/core/cache/tokens --external @getstrata/core/cache/createCacheStore --external @getstrata/core/cache/repository --external @getstrata/core/cache/simpleCache --external @getstrata/core/cache/simpleCacheStore --external @getstrata/core/config/envSchema --external @getstrata/core/config/applicationConfig --external @getstrata/core/contracts/token --external @getstrata/core/contracts/application --external @getstrata/core/contracts/services --external @getstrata/core/contracts/executionContext --external @getstrata/core/contracts/executionOperations --external @getstrata/core/contracts/executionOwnership --external @getstrata/core/contracts/serviceTokens --external @getstrata/core/contracts/authUserDirectory --external @getstrata/core/contracts/container --external @getstrata/core/contracts/di --external @getstrata/core/contracts/persistence --external @getstrata/core/contracts/membership --external @getstrata/core/crypto/fieldEncryption --external @getstrata/core/crypto/fieldEncryptionRotation --external @getstrata/core/crypto/mfaSecret --external @getstrata/core/database --external @getstrata/core/database/acquisitionMetrics --external @getstrata/core/database/baseRepository --external @getstrata/core/database/bindings --external @getstrata/core/database/definitions --external @getstrata/core/database/ownedReadOnlyObservation --external @getstrata/core/database/session --external @getstrata/core/database/tokens --external @getstrata/core/database/bunSql --external @getstrata/core/database/connection --external @getstrata/core/database/connectionContext --external @getstrata/core/database/dialect --external @getstrata/core/database/mysqlConnection --external @getstrata/core/database/errors --external @getstrata/core/database/factory --external @getstrata/core/database/migrations --external @getstrata/core/database/migrations/types --external @getstrata/core/database/model --external @getstrata/core/database/query --external @getstrata/core/database/relationships --external @getstrata/core/database/repositoryQuery --external @getstrata/core/database/seeders --external @getstrata/core/database/seeders/types --external @getstrata/core/database/schema --external @getstrata/core/database/sqliteConnection --external @getstrata/core/database/table --external @getstrata/core/database/types --external @getstrata/core/database/whereBuilder --external @getstrata/core/errors/http --external @getstrata/core/events --external @getstrata/core/events/outbox --external @getstrata/core/http --external @getstrata/core/http/authMiddleware --external @getstrata/core/http/authorizeMiddleware --external @getstrata/core/http/bodySizeLimitMiddleware --external @getstrata/core/http/clientIp --external @getstrata/core/http/cookies --external @getstrata/core/http/contentNegotiation --external @getstrata/core/http/contentSecurityPolicy --external @getstrata/core/http/conditionalResponse --external @getstrata/core/http/corsMiddleware --external @getstrata/core/http/csrfMiddleware --external @getstrata/core/http/csrfProtection --external @getstrata/core/http/csrfToken --external @getstrata/core/http/etag --external @getstrata/core/http/flashSession --external @getstrata/core/http/flashMiddleware --external @getstrata/core/http/formRequest --external @getstrata/core/http/middleware --external @getstrata/core/http/metricsMiddleware --external @getstrata/core/http/loginThrottleMiddleware --external @getstrata/core/http/memoryThrottleMiddleware --external @getstrata/core/http/pagination --external @getstrata/core/http/parseFormBody --external @getstrata/core/http/parseMultipartUpload --external @getstrata/core/http/requireAbilityMiddleware --external @getstrata/core/http/requireAuthMiddleware --external @getstrata/core/http/requireGlobalAdminMiddleware --external @getstrata/core/http/requireWebAuthMiddleware --external @getstrata/core/http/requireVerifiedMiddleware --external @getstrata/core/http/requirePasswordConfirmMiddleware --external @getstrata/core/http/resources --external @getstrata/core/http/response --external @getstrata/core/http/route --external @getstrata/core/http/routeMiddleware --external @getstrata/core/http/routeModelBinding --external @getstrata/core/http/safeInternalPath --external @getstrata/core/http/signedUrl --external @getstrata/core/http/statelessAuth --external @getstrata/core/http/scimThrottleMiddleware --external @getstrata/core/http/securityHeadersMiddleware --external @getstrata/core/http/securedRouteModelBinding --external @getstrata/core/http/requestMetaContext --external @getstrata/core/http/webErrorResponse --external @getstrata/core/http/webFormRequest --external @getstrata/core/http/throttleMiddleware --external @getstrata/core/http/uploads --external @getstrata/core/http/validation --external @getstrata/core/jobs/exportAuditLogsJob --external @getstrata/core/jobs/invalidateCacheTagsJob --external @getstrata/core/lifecycle/gracefulShutdown --external @getstrata/core/logging/logger --external @getstrata/core/logging/requestLoggingMiddleware --external @getstrata/core/mail/mailer --external @getstrata/core/mail/markdownMail --external @getstrata/core/mail/markdownMailable --external @getstrata/core/mail/sanitizeMailHtml --external @getstrata/core/media/imageTransform --external @getstrata/core/metrics/prometheus --external @getstrata/core/notifications --external @getstrata/core/openapi/generator --external @getstrata/core/openapi/registeredRoute --external @getstrata/core/openapi/validate --external @getstrata/core/pagination --external @getstrata/core/queue --external @getstrata/core/queue/createAppQueue --external @getstrata/core/queue/failedJobRepository --external @getstrata/core/queue/failedJobService --external @getstrata/core/queue/jobRegistry --external @getstrata/core/queue/jobRunner --external @getstrata/core/queue/queueConfig --external @getstrata/core/queue/queueHandoff --external @getstrata/core/queue/queueMetrics --external @getstrata/core/queue/queueServices --external @getstrata/core/queue/queueWorkerTransport --external @getstrata/core/queue/publicQueue --external @getstrata/core/queue/redisQueue --external @getstrata/core/queue/types --external @getstrata/core/runtime/appEnv --external @getstrata/core/runtime/appKeyPrefix --external @getstrata/core/runtime/application --external @getstrata/core/runtime/frontendMode --external @getstrata/core/runtime/asyncContextStore --external @getstrata/core/scheduler/schedule --external @getstrata/core/scheduler/osCron --external @getstrata/core/security/oauthState --external @getstrata/core/security/publicReads --external @getstrata/core/security/recoveryCodes --external @getstrata/core/security/safeFetch --external @getstrata/core/security/safePath --external @getstrata/core/security/safeUrl --external @getstrata/core/security/scimTenantTokens --external @getstrata/core/security/securityEvents --external @getstrata/core/security/stripeWebhook --external @getstrata/core/security/webhookSignature --external @getstrata/core/security/timingSafeCompare --external @getstrata/core/security/tokenExpiry --external @getstrata/core/security/totp --external @getstrata/core/storage/storage --external @getstrata/core/tenant/tenancyConfig --external @getstrata/core/tenant/scopedDatabasePolicy --external @getstrata/core/tenant/publicTenantHost --external @getstrata/core/tenant/resolveTenant --external @getstrata/core/tenant/tenantContext --external @getstrata/core/tenant/tenantDatabaseScope --external @getstrata/core/tenant/databaseTenantContext --external @getstrata/core/tenant/tenantMiddleware --external @getstrata/core/tenant/enableTenantRls --external @getstrata/core/terminal/runShell --external @getstrata/core/tracing/traceContext --external @getstrata/core/tracing/tracingMiddleware --external @getstrata/core/validation/rules --external @getstrata/core/view --external @getstrata/core/view/tokens --external '#strata-http-route' --external '#strata-job-discovery'",
@@ -246,7 +246,7 @@
246
246
  "access": "public"
247
247
  },
248
248
  "peerDependencies": {
249
- "@getstrata/core": "^3.0.7",
249
+ "@getstrata/core": "^3.1.0",
250
250
  "typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
251
251
  },
252
252
  "engines": {