@getstrata/bootstrap 0.2.54 → 0.2.56

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,5 +1,13 @@
1
1
  # @getstrata/bootstrap changelog
2
2
 
3
+ ## 0.2.56
4
+
5
+ - Peer `@getstrata/core` `^0.5.69` for `MembershipLookup.updateMemberRole`.
6
+
7
+ ## 0.2.55
8
+
9
+ - HttpKernel and route builders read `isViewsEnabled` / `isSpaEnabled` from `@getstrata/core/runtime/frontendMode` instead of WorkHub `src/config/frontend`.
10
+
3
11
  ## 0.2.54
4
12
 
5
13
  - `HttpKernel.wrapSigned()` applies `createValidateSignatureMiddleware` so HTMX routes can require a valid signed URL.
package/README.md CHANGED
@@ -30,7 +30,7 @@ import { createHttpKernel, createAppContext, coreProviders } from "@getstrata/bo
30
30
 
31
31
  `createAppContext()` does not call `assertProductionSecrets`. WorkHub calls that from `App.serve()` / `queue:work`. Sibling HTMX apps can call it in production without WorkHub API tokens when feature flags are off — see [SIBLING-HTMX.md](../../docs/SIBLING-HTMX.md).
32
32
 
33
- Sibling HTMX apps should bind `createCookieSessionAuthManager` from `@getstrata/bootstrap/web/session` instead of HMAC `SessionGuard`. Use `signIn` / `signOut` (or the redirect helpers) instead of calling `CookieSessionStore` from controllers. Pass `mapUser` to map roles in the app. Pass `loadSessionUser` when the default `learn_subscriber` / `is_admin` SELECT does not match your schema.
33
+ Sibling HTMX apps should bind `createCookieSessionAuthManager` from `@getstrata/bootstrap/web/session` instead of HMAC `SessionGuard`. Use `signIn` / `signOut` (or the redirect helpers) instead of calling `CookieSessionStore` from controllers. Pass `mapUser` to map roles in the app. Pass `loadSessionUser` when the default `learn_subscriber` / `is_admin` SELECT does not match your schema. WorkHub’s table is `sessions` (`0031_create_sessions`); its loader is `loadWorkhubSessionUser` (maps `users.role`, decrypts email). WorkHub web login itself stays on HMAC `SessionGuard`.
34
34
 
35
35
  `wrapWeb` applies the web group (CSRF + flash) and `withErrorHandling`, so CSRF `ForbiddenError` becomes an HTML 403 in `FRONTEND_MODE=server-htmx`. `wrapWebLogin` / `wrapWebRegister` include that web group plus throttle — do not wrap them with `wrapWeb` again.
36
36
 
@@ -28,28 +28,11 @@ import { createSecurityHeadersMiddleware } from "@getstrata/core/http/securityHe
28
28
  import { createValidateSignatureMiddleware } from "@getstrata/core/http/signedUrl";
29
29
  import { createThrottleMiddleware } from "@getstrata/core/http/throttleMiddleware";
30
30
  import { createRequestLoggingMiddleware } from "@getstrata/core/logging/requestLoggingMiddleware";
31
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
31
32
  import { isPublicReadsEnabled } from "@getstrata/core/security/publicReads";
32
33
  import { createTenantMiddleware } from "@getstrata/core/tenant/tenantMiddleware";
33
34
  import { createTracingMiddleware } from "@getstrata/core/tracing/tracingMiddleware";
34
35
 
35
- // ../../src/config/frontend.ts
36
- function readFrontendMode() {
37
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
38
- if (mode === "server-htmx") {
39
- return "server-htmx";
40
- }
41
- if (mode === "spa-react") {
42
- return "spa-react";
43
- }
44
- return "api";
45
- }
46
- function isViewsEnabled() {
47
- return readFrontendMode() === "server-htmx";
48
- }
49
- function isSpaEnabled() {
50
- return readFrontendMode() === "spa-react";
51
- }
52
-
53
36
  // ../../src/config/rateLimit.ts
54
37
  var LOCAL_LOGIN_RATE_LIMIT = {
55
38
  maxAttempts: 100,
@@ -31,28 +31,11 @@ import { createSecurityHeadersMiddleware } from "@getstrata/core/http/securityHe
31
31
  import { createValidateSignatureMiddleware } from "@getstrata/core/http/signedUrl";
32
32
  import { createThrottleMiddleware } from "@getstrata/core/http/throttleMiddleware";
33
33
  import { createRequestLoggingMiddleware } from "@getstrata/core/logging/requestLoggingMiddleware";
34
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
34
35
  import { isPublicReadsEnabled } from "@getstrata/core/security/publicReads";
35
36
  import { createTenantMiddleware } from "@getstrata/core/tenant/tenantMiddleware";
36
37
  import { createTracingMiddleware } from "@getstrata/core/tracing/tracingMiddleware";
37
38
 
38
- // ../../src/config/frontend.ts
39
- function readFrontendMode() {
40
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
41
- if (mode === "server-htmx") {
42
- return "server-htmx";
43
- }
44
- if (mode === "spa-react") {
45
- return "spa-react";
46
- }
47
- return "api";
48
- }
49
- function isViewsEnabled() {
50
- return readFrontendMode() === "server-htmx";
51
- }
52
- function isSpaEnabled() {
53
- return readFrontendMode() === "spa-react";
54
- }
55
-
56
39
  // ../../src/config/rateLimit.ts
57
40
  var LOCAL_LOGIN_RATE_LIMIT = {
58
41
  maxAttempts: 100,
@@ -177,14 +177,28 @@ var appConfig = {
177
177
  apiPrefix: process.env.API_PREFIX ?? "/api/v1"
178
178
  };
179
179
 
180
- // ../../src/config/queue.ts
181
- import { DEFAULT_QUEUE_DRIVER as DEFAULT_QUEUE_DRIVER2 } from "@getstrata/bootstrap/config";
180
+ // ../../src/core/queue/queueConfig.ts
181
+ function resolveQueueConfig() {
182
+ const driver = process.env.QUEUE_DRIVER;
183
+ const maxAttempts = Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3");
184
+ const backoffMs = Number(process.env.QUEUE_BACKOFF_MS ?? "1000");
185
+ return {
186
+ driver: driver === "redis" || driver === "async" || driver === "sync" ? driver : "sync",
187
+ maxAttempts: Number.isFinite(maxAttempts) && maxAttempts > 0 ? maxAttempts : 3,
188
+ backoffMs: Number.isFinite(backoffMs) && backoffMs >= 0 ? backoffMs : 1000
189
+ };
190
+ }
182
191
  var queueConfig = {
183
- driver: process.env.QUEUE_DRIVER === "redis" || process.env.QUEUE_DRIVER === "async" || process.env.QUEUE_DRIVER === "sync" ? process.env.QUEUE_DRIVER : DEFAULT_QUEUE_DRIVER2,
184
- maxAttempts: Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3"),
185
- backoffMs: Number(process.env.QUEUE_BACKOFF_MS ?? "1000")
192
+ get driver() {
193
+ return resolveQueueConfig().driver;
194
+ },
195
+ get maxAttempts() {
196
+ return resolveQueueConfig().maxAttempts;
197
+ },
198
+ get backoffMs() {
199
+ return resolveQueueConfig().backoffMs;
200
+ }
186
201
  };
187
-
188
202
  // ../../src/bootstrap/env.ts
189
203
  import { defineEnvSchema } from "@getstrata/core/config/envSchema";
190
204
  var appEnvSchema = defineEnvSchema({
@@ -462,6 +476,7 @@ var storage_default = storageProvider;
462
476
 
463
477
  // ../../src/bootstrap/providers/view.ts
464
478
  import { currentRequestMeta } from "@getstrata/core/http/requestMetaContext";
479
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
465
480
  import {
466
481
  configureWebErrorView,
467
482
  DEFAULT_VIEWS_DIRECTORY,
@@ -469,26 +484,6 @@ import {
469
484
  errorTemplateName,
470
485
  resolveWebLayoutData
471
486
  } from "@getstrata/core/view";
472
-
473
- // ../../src/config/frontend.ts
474
- function readFrontendMode() {
475
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
476
- if (mode === "server-htmx") {
477
- return "server-htmx";
478
- }
479
- if (mode === "spa-react") {
480
- return "spa-react";
481
- }
482
- return "api";
483
- }
484
- function isViewsEnabled() {
485
- return readFrontendMode() === "server-htmx";
486
- }
487
- function isSpaEnabled() {
488
- return readFrontendMode() === "spa-react";
489
- }
490
-
491
- // ../../src/bootstrap/providers/view.ts
492
487
  var CORE_VIEW_TOKEN = "core.view";
493
488
  var VIEW_DIRECTORY_CONFIG_KEY = "view.directory";
494
489
  var viewProvider = {
@@ -4,6 +4,7 @@ var __jsonParse = (a) => JSON.parse(a);
4
4
  // ../../src/bootstrap/createRoutes.ts
5
5
  import { applyMiddlewareToRoutes as applyMiddlewareToRoutes3 } from "@getstrata/core/http/middleware";
6
6
  import { jsonResponse as jsonResponse4 } from "@getstrata/core/http/response";
7
+ import { isSpaEnabled as isSpaEnabled2, isViewsEnabled as isViewsEnabled3 } from "@getstrata/core/runtime/frontendMode";
7
8
  import { notFoundHtmlResponse as notFoundHtmlResponse2 } from "@getstrata/core/view";
8
9
 
9
10
  // ../../index.html
@@ -39,24 +40,6 @@ function isFeatureEnabled(feature) {
39
40
  return readFeatureFlags()[feature];
40
41
  }
41
42
 
42
- // ../../src/config/frontend.ts
43
- function readFrontendMode() {
44
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
45
- if (mode === "server-htmx") {
46
- return "server-htmx";
47
- }
48
- if (mode === "spa-react") {
49
- return "spa-react";
50
- }
51
- return "api";
52
- }
53
- function isViewsEnabled() {
54
- return readFrontendMode() === "server-htmx";
55
- }
56
- function isSpaEnabled() {
57
- return readFrontendMode() === "spa-react";
58
- }
59
-
60
43
  // ../../src/bootstrap/buildModuleRoutes.ts
61
44
  import { conditionalJsonResponse } from "@getstrata/core/http/conditionalResponse";
62
45
  import { applyMiddlewareToRoutes } from "@getstrata/core/http/middleware";
@@ -84,6 +67,7 @@ import { createSecurityHeadersMiddleware } from "@getstrata/core/http/securityHe
84
67
  import { createValidateSignatureMiddleware } from "@getstrata/core/http/signedUrl";
85
68
  import { createThrottleMiddleware } from "@getstrata/core/http/throttleMiddleware";
86
69
  import { createRequestLoggingMiddleware } from "@getstrata/core/logging/requestLoggingMiddleware";
70
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
87
71
  import { isPublicReadsEnabled } from "@getstrata/core/security/publicReads";
88
72
  import { createTenantMiddleware } from "@getstrata/core/tenant/tenantMiddleware";
89
73
  import { createTracingMiddleware } from "@getstrata/core/tracing/tracingMiddleware";
@@ -476,6 +460,7 @@ function buildModuleRoutes(dependencies, options = {}) {
476
460
  // ../../src/bootstrap/createSpaRoutes.ts
477
461
  import { join as join2 } from "path";
478
462
  import { jsonResponse } from "@getstrata/core/http/response";
463
+ import { isSpaEnabled } from "@getstrata/core/runtime/frontendMode";
479
464
  var SPA_DIST_DIRECTORY = join2(process.cwd(), "frontend/dist");
480
465
  var SPA_INDEX_FILE = join2(SPA_DIST_DIRECTORY, "index.html");
481
466
  function createSpaRoutes(_dependencies) {
@@ -512,6 +497,7 @@ function mergeSpaRoutes(dependencies, routes) {
512
497
 
513
498
  // ../../src/bootstrap/createWebRoutes.ts
514
499
  import { join as join3 } from "path";
500
+ import { isViewsEnabled as isViewsEnabled2 } from "@getstrata/core/runtime/frontendMode";
515
501
  import { notFoundHtmlResponse } from "@getstrata/core/view";
516
502
 
517
503
  // ../../src/bootstrap/buildWebModuleRoutes.ts
@@ -563,7 +549,7 @@ function createWebRoutes(dependencies) {
563
549
  return wrappedRoutes;
564
550
  }
565
551
  function mergeWebRoutes(dependencies, routes) {
566
- if (!isViewsEnabled()) {
552
+ if (!isViewsEnabled2()) {
567
553
  return routes;
568
554
  }
569
555
  return {
@@ -757,7 +743,7 @@ function assertScimIfMatch(request, etagSource) {
757
743
  // ../../src/modules/scim/service.ts
758
744
  import { hashPassword as hashPassword3 } from "@getstrata/core/auth/password";
759
745
  import { resolveService } from "@getstrata/core/contracts/di";
760
- import { NotFoundError as NotFoundError4 } from "@getstrata/core/errors/http";
746
+ import { NotFoundError as NotFoundError5 } from "@getstrata/core/errors/http";
761
747
  import { currentTenantId as currentTenantId4 } from "@getstrata/core/tenant/tenantContext";
762
748
 
763
749
  // ../../src/domain/scim.ts
@@ -769,6 +755,9 @@ var SCIM_SCHEMAS = {
769
755
  serviceProviderConfig: "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"
770
756
  };
771
757
 
758
+ // ../../src/modules/organization/memberRepository.ts
759
+ import { NotFoundError } from "@getstrata/core/errors/http";
760
+
772
761
  // ../../src/config/database.ts
773
762
  function readInteger(name, fallback) {
774
763
  const parsed = Number.parseInt(process.env[name] ?? String(fallback), 10);
@@ -926,6 +915,19 @@ class OrganizationMemberRepository {
926
915
  }
927
916
  return row;
928
917
  }
918
+ async updateMemberRole(organizationId, userId, role) {
919
+ const rows = await connection_default`
920
+ UPDATE organization_member
921
+ SET role = ${role}
922
+ WHERE organization_id = ${organizationId} AND user_id = ${userId}
923
+ RETURNING id, organization_id, user_id, role, created_at
924
+ `;
925
+ const row = rows[0];
926
+ if (!row) {
927
+ throw new NotFoundError(`Organization member ${userId} not found.`);
928
+ }
929
+ return row;
930
+ }
929
931
  async removeMember(organizationId, userId) {
930
932
  const rows = await connection_default`
931
933
  DELETE FROM organization_member
@@ -939,7 +941,7 @@ var memberRepository_default = OrganizationMemberRepository;
939
941
 
940
942
  // ../../src/modules/organization/repository.ts
941
943
  import { BaseRepository } from "@getstrata/core/database/baseRepository";
942
- import { NotFoundError } from "@getstrata/core/errors/http";
944
+ import { NotFoundError as NotFoundError2 } from "@getstrata/core/errors/http";
943
945
  import { currentTenantId } from "@getstrata/core/tenant/tenantContext";
944
946
 
945
947
  // ../../src/modules/organization/table.ts
@@ -978,7 +980,7 @@ class OrganizationRepository extends BaseRepository {
978
980
  async findForTenantOrThrow(id, tenantId = currentTenantId()) {
979
981
  const organization = await this.findById(id);
980
982
  if (!organization || organization.tenant_id !== tenantId) {
981
- throw new NotFoundError(`SCIM group ${id} not found.`);
983
+ throw new NotFoundError2(`SCIM group ${id} not found.`);
982
984
  }
983
985
  return organization;
984
986
  }
@@ -1068,7 +1070,7 @@ var notificationTable = defineTable3({
1068
1070
  });
1069
1071
 
1070
1072
  // ../../src/modules/user/notificationService.ts
1071
- import { NotFoundError as NotFoundError2 } from "@getstrata/core/errors/http";
1073
+ import { NotFoundError as NotFoundError3 } from "@getstrata/core/errors/http";
1072
1074
 
1073
1075
  // ../../src/modules/user/oauthIdentityRepository.ts
1074
1076
  import { BaseRepository as BaseRepository4 } from "@getstrata/core/database/baseRepository";
@@ -1126,7 +1128,7 @@ var userTable = defineTable5({
1126
1128
 
1127
1129
  // ../../src/modules/user/tokenService.ts
1128
1130
  import { hashApiToken as hashApiToken2 } from "@getstrata/core/auth/tokenHash";
1129
- import { ForbiddenError, NotFoundError as NotFoundError3 } from "@getstrata/core/errors/http";
1131
+ import { ForbiddenError, NotFoundError as NotFoundError4 } from "@getstrata/core/errors/http";
1130
1132
  import { resolveDefaultTokenExpiryDays as resolveDefaultTokenExpiryDays2 } from "@getstrata/core/security/tokenExpiry";
1131
1133
 
1132
1134
  // ../../src/modules/user/provider.ts
@@ -1184,7 +1186,7 @@ class ScimService {
1184
1186
  async findUserRecord(id) {
1185
1187
  const user = await this.users.findById(id);
1186
1188
  if (!user || user.tenant_id !== currentTenantId4()) {
1187
- throw new NotFoundError4(`SCIM user ${id} not found.`);
1189
+ throw new NotFoundError5(`SCIM user ${id} not found.`);
1188
1190
  }
1189
1191
  return user;
1190
1192
  }
@@ -1226,7 +1228,7 @@ class ScimService {
1226
1228
  const user = await this.findUserRecord(id);
1227
1229
  const deleted = await this.users.deleteById(id);
1228
1230
  if (!deleted) {
1229
- throw new NotFoundError4(`SCIM user ${id} not found.`);
1231
+ throw new NotFoundError5(`SCIM user ${id} not found.`);
1230
1232
  }
1231
1233
  return { id: user.id, updated_at: user.updated_at };
1232
1234
  }
@@ -1436,7 +1438,7 @@ function createRoutes(dependencies) {
1436
1438
  ...healthRoutes,
1437
1439
  ...metricsRoutes,
1438
1440
  ...scimRoutes,
1439
- ...isViewsEnabled() || isSpaEnabled() ? {} : { "/": strata_default },
1441
+ ...isViewsEnabled3() || isSpaEnabled2() ? {} : { "/": strata_default },
1440
1442
  ...wrappedModuleRoutes,
1441
1443
  [`${appConfig.apiPrefix}/*`]: async () => {
1442
1444
  registerRoute2("GET", `${appConfig.apiPrefix}/*`, ["global", "api"]);
@@ -1444,10 +1446,10 @@ function createRoutes(dependencies) {
1444
1446
  },
1445
1447
  "/*": async () => {
1446
1448
  registerRoute2("GET", "/*", []);
1447
- if (isViewsEnabled()) {
1449
+ if (isViewsEnabled3()) {
1448
1450
  return notFoundHtmlResponse2();
1449
1451
  }
1450
- if (isSpaEnabled()) {
1452
+ if (isSpaEnabled2()) {
1451
1453
  return jsonResponse4({ error: "Not Found" }, { status: 404 });
1452
1454
  }
1453
1455
  return jsonResponse4({ error: "Not Found" }, { status: 404 });
@@ -4,26 +4,7 @@ var __jsonParse = (a) => JSON.parse(a);
4
4
  // ../../src/bootstrap/createSpaRoutes.ts
5
5
  import { join } from "path";
6
6
  import { jsonResponse } from "@getstrata/core/http/response";
7
-
8
- // ../../src/config/frontend.ts
9
- function readFrontendMode() {
10
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
11
- if (mode === "server-htmx") {
12
- return "server-htmx";
13
- }
14
- if (mode === "spa-react") {
15
- return "spa-react";
16
- }
17
- return "api";
18
- }
19
- function isViewsEnabled() {
20
- return readFrontendMode() === "server-htmx";
21
- }
22
- function isSpaEnabled() {
23
- return readFrontendMode() === "spa-react";
24
- }
25
-
26
- // ../../src/bootstrap/createSpaRoutes.ts
7
+ import { isSpaEnabled } from "@getstrata/core/runtime/frontendMode";
27
8
  var SPA_DIST_DIRECTORY = join(process.cwd(), "frontend/dist");
28
9
  var SPA_INDEX_FILE = join(SPA_DIST_DIRECTORY, "index.html");
29
10
  function createSpaRoutes(_dependencies) {
@@ -3,26 +3,9 @@ var __jsonParse = (a) => JSON.parse(a);
3
3
 
4
4
  // ../../src/bootstrap/createWebRoutes.ts
5
5
  import { join as join2 } from "path";
6
+ import { isViewsEnabled as isViewsEnabled2 } from "@getstrata/core/runtime/frontendMode";
6
7
  import { notFoundHtmlResponse } from "@getstrata/core/view";
7
8
 
8
- // ../../src/config/frontend.ts
9
- function readFrontendMode() {
10
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
11
- if (mode === "server-htmx") {
12
- return "server-htmx";
13
- }
14
- if (mode === "spa-react") {
15
- return "spa-react";
16
- }
17
- return "api";
18
- }
19
- function isViewsEnabled() {
20
- return readFrontendMode() === "server-htmx";
21
- }
22
- function isSpaEnabled() {
23
- return readFrontendMode() === "spa-react";
24
- }
25
-
26
9
  // ../../src/bootstrap/buildWebModuleRoutes.ts
27
10
  import { applyMiddlewareToRoutes as applyMiddlewareToRoutes2 } from "@getstrata/core/http/middleware";
28
11
 
@@ -53,6 +36,7 @@ import { createSecurityHeadersMiddleware } from "@getstrata/core/http/securityHe
53
36
  import { createValidateSignatureMiddleware } from "@getstrata/core/http/signedUrl";
54
37
  import { createThrottleMiddleware } from "@getstrata/core/http/throttleMiddleware";
55
38
  import { createRequestLoggingMiddleware } from "@getstrata/core/logging/requestLoggingMiddleware";
39
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
56
40
  import { isPublicReadsEnabled } from "@getstrata/core/security/publicReads";
57
41
  import { createTenantMiddleware } from "@getstrata/core/tenant/tenantMiddleware";
58
42
  import { createTracingMiddleware } from "@getstrata/core/tracing/tracingMiddleware";
@@ -490,7 +474,7 @@ function createWebRoutes(dependencies) {
490
474
  return wrappedRoutes;
491
475
  }
492
476
  function mergeWebRoutes(dependencies, routes) {
493
- if (!isViewsEnabled()) {
477
+ if (!isViewsEnabled2()) {
494
478
  return routes;
495
479
  }
496
480
  return {
@@ -177,14 +177,28 @@ var appConfig = {
177
177
  apiPrefix: process.env.API_PREFIX ?? "/api/v1"
178
178
  };
179
179
 
180
- // ../../src/config/queue.ts
181
- import { DEFAULT_QUEUE_DRIVER as DEFAULT_QUEUE_DRIVER2 } from "@getstrata/bootstrap/config";
180
+ // ../../src/core/queue/queueConfig.ts
181
+ function resolveQueueConfig() {
182
+ const driver = process.env.QUEUE_DRIVER;
183
+ const maxAttempts = Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3");
184
+ const backoffMs = Number(process.env.QUEUE_BACKOFF_MS ?? "1000");
185
+ return {
186
+ driver: driver === "redis" || driver === "async" || driver === "sync" ? driver : "sync",
187
+ maxAttempts: Number.isFinite(maxAttempts) && maxAttempts > 0 ? maxAttempts : 3,
188
+ backoffMs: Number.isFinite(backoffMs) && backoffMs >= 0 ? backoffMs : 1000
189
+ };
190
+ }
182
191
  var queueConfig = {
183
- driver: process.env.QUEUE_DRIVER === "redis" || process.env.QUEUE_DRIVER === "async" || process.env.QUEUE_DRIVER === "sync" ? process.env.QUEUE_DRIVER : DEFAULT_QUEUE_DRIVER2,
184
- maxAttempts: Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3"),
185
- backoffMs: Number(process.env.QUEUE_BACKOFF_MS ?? "1000")
192
+ get driver() {
193
+ return resolveQueueConfig().driver;
194
+ },
195
+ get maxAttempts() {
196
+ return resolveQueueConfig().maxAttempts;
197
+ },
198
+ get backoffMs() {
199
+ return resolveQueueConfig().backoffMs;
200
+ }
186
201
  };
187
-
188
202
  // ../../src/bootstrap/env.ts
189
203
  import { defineEnvSchema } from "@getstrata/core/config/envSchema";
190
204
  var appEnvSchema = defineEnvSchema({
@@ -462,6 +476,7 @@ var storage_default = storageProvider;
462
476
 
463
477
  // ../../src/bootstrap/providers/view.ts
464
478
  import { currentRequestMeta } from "@getstrata/core/http/requestMetaContext";
479
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
465
480
  import {
466
481
  configureWebErrorView,
467
482
  DEFAULT_VIEWS_DIRECTORY,
@@ -469,26 +484,6 @@ import {
469
484
  errorTemplateName,
470
485
  resolveWebLayoutData
471
486
  } from "@getstrata/core/view";
472
-
473
- // ../../src/config/frontend.ts
474
- function readFrontendMode() {
475
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
476
- if (mode === "server-htmx") {
477
- return "server-htmx";
478
- }
479
- if (mode === "spa-react") {
480
- return "spa-react";
481
- }
482
- return "api";
483
- }
484
- function isViewsEnabled() {
485
- return readFrontendMode() === "server-htmx";
486
- }
487
- function isSpaEnabled() {
488
- return readFrontendMode() === "spa-react";
489
- }
490
-
491
- // ../../src/bootstrap/providers/view.ts
492
487
  var CORE_VIEW_TOKEN = "core.view";
493
488
  var VIEW_DIRECTORY_CONFIG_KEY = "view.directory";
494
489
  var viewProvider = {
@@ -24,28 +24,11 @@ import { createSecurityHeadersMiddleware } from "@getstrata/core/http/securityHe
24
24
  import { createValidateSignatureMiddleware } from "@getstrata/core/http/signedUrl";
25
25
  import { createThrottleMiddleware } from "@getstrata/core/http/throttleMiddleware";
26
26
  import { createRequestLoggingMiddleware } from "@getstrata/core/logging/requestLoggingMiddleware";
27
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
27
28
  import { isPublicReadsEnabled } from "@getstrata/core/security/publicReads";
28
29
  import { createTenantMiddleware } from "@getstrata/core/tenant/tenantMiddleware";
29
30
  import { createTracingMiddleware } from "@getstrata/core/tracing/tracingMiddleware";
30
31
 
31
- // ../../src/config/frontend.ts
32
- function readFrontendMode() {
33
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
34
- if (mode === "server-htmx") {
35
- return "server-htmx";
36
- }
37
- if (mode === "spa-react") {
38
- return "spa-react";
39
- }
40
- return "api";
41
- }
42
- function isViewsEnabled() {
43
- return readFrontendMode() === "server-htmx";
44
- }
45
- function isSpaEnabled() {
46
- return readFrontendMode() === "spa-react";
47
- }
48
-
49
32
  // ../../src/config/rateLimit.ts
50
33
  var LOCAL_LOGIN_RATE_LIMIT = {
51
34
  maxAttempts: 100,
@@ -3,6 +3,7 @@ var __jsonParse = (a) => JSON.parse(a);
3
3
 
4
4
  // ../../src/bootstrap/providers/view.ts
5
5
  import { currentRequestMeta } from "@getstrata/core/http/requestMetaContext";
6
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
6
7
  import {
7
8
  configureWebErrorView,
8
9
  DEFAULT_VIEWS_DIRECTORY,
@@ -10,26 +11,6 @@ import {
10
11
  errorTemplateName,
11
12
  resolveWebLayoutData
12
13
  } from "@getstrata/core/view";
13
-
14
- // ../../src/config/frontend.ts
15
- function readFrontendMode() {
16
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
17
- if (mode === "server-htmx") {
18
- return "server-htmx";
19
- }
20
- if (mode === "spa-react") {
21
- return "spa-react";
22
- }
23
- return "api";
24
- }
25
- function isViewsEnabled() {
26
- return readFrontendMode() === "server-htmx";
27
- }
28
- function isSpaEnabled() {
29
- return readFrontendMode() === "spa-react";
30
- }
31
-
32
- // ../../src/bootstrap/providers/view.ts
33
14
  var CORE_VIEW_TOKEN = "core.view";
34
15
  var VIEW_DIRECTORY_CONFIG_KEY = "view.directory";
35
16
  var viewProvider = {
@@ -88,14 +88,28 @@ var appConfig = {
88
88
  apiPrefix: process.env.API_PREFIX ?? "/api/v1"
89
89
  };
90
90
 
91
- // ../../src/config/queue.ts
92
- import { DEFAULT_QUEUE_DRIVER as DEFAULT_QUEUE_DRIVER2 } from "@getstrata/bootstrap/config";
91
+ // ../../src/core/queue/queueConfig.ts
92
+ function resolveQueueConfig() {
93
+ const driver = process.env.QUEUE_DRIVER;
94
+ const maxAttempts = Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3");
95
+ const backoffMs = Number(process.env.QUEUE_BACKOFF_MS ?? "1000");
96
+ return {
97
+ driver: driver === "redis" || driver === "async" || driver === "sync" ? driver : "sync",
98
+ maxAttempts: Number.isFinite(maxAttempts) && maxAttempts > 0 ? maxAttempts : 3,
99
+ backoffMs: Number.isFinite(backoffMs) && backoffMs >= 0 ? backoffMs : 1000
100
+ };
101
+ }
93
102
  var queueConfig = {
94
- driver: process.env.QUEUE_DRIVER === "redis" || process.env.QUEUE_DRIVER === "async" || process.env.QUEUE_DRIVER === "sync" ? process.env.QUEUE_DRIVER : DEFAULT_QUEUE_DRIVER2,
95
- maxAttempts: Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3"),
96
- backoffMs: Number(process.env.QUEUE_BACKOFF_MS ?? "1000")
103
+ get driver() {
104
+ return resolveQueueConfig().driver;
105
+ },
106
+ get maxAttempts() {
107
+ return resolveQueueConfig().maxAttempts;
108
+ },
109
+ get backoffMs() {
110
+ return resolveQueueConfig().backoffMs;
111
+ }
97
112
  };
98
-
99
113
  // ../../src/bootstrap/env.ts
100
114
  import { defineEnvSchema } from "@getstrata/core/config/envSchema";
101
115
  var appEnvSchema = defineEnvSchema({
@@ -452,6 +466,7 @@ var storage_default = storageProvider;
452
466
 
453
467
  // ../../src/bootstrap/providers/view.ts
454
468
  import { currentRequestMeta } from "@getstrata/core/http/requestMetaContext";
469
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
455
470
  import {
456
471
  configureWebErrorView,
457
472
  DEFAULT_VIEWS_DIRECTORY,
@@ -459,26 +474,6 @@ import {
459
474
  errorTemplateName,
460
475
  resolveWebLayoutData
461
476
  } from "@getstrata/core/view";
462
-
463
- // ../../src/config/frontend.ts
464
- function readFrontendMode() {
465
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
466
- if (mode === "server-htmx") {
467
- return "server-htmx";
468
- }
469
- if (mode === "spa-react") {
470
- return "spa-react";
471
- }
472
- return "api";
473
- }
474
- function isViewsEnabled() {
475
- return readFrontendMode() === "server-htmx";
476
- }
477
- function isSpaEnabled() {
478
- return readFrontendMode() === "spa-react";
479
- }
480
-
481
- // ../../src/bootstrap/providers/view.ts
482
477
  var CORE_VIEW_TOKEN = "core.view";
483
478
  var VIEW_DIRECTORY_CONFIG_KEY = "view.directory";
484
479
  var viewProvider = {
@@ -33,28 +33,11 @@ import { createSecurityHeadersMiddleware } from "@getstrata/core/http/securityHe
33
33
  import { createValidateSignatureMiddleware } from "@getstrata/core/http/signedUrl";
34
34
  import { createThrottleMiddleware } from "@getstrata/core/http/throttleMiddleware";
35
35
  import { createRequestLoggingMiddleware } from "@getstrata/core/logging/requestLoggingMiddleware";
36
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
36
37
  import { isPublicReadsEnabled } from "@getstrata/core/security/publicReads";
37
38
  import { createTenantMiddleware } from "@getstrata/core/tenant/tenantMiddleware";
38
39
  import { createTracingMiddleware } from "@getstrata/core/tracing/tracingMiddleware";
39
40
 
40
- // ../../src/config/frontend.ts
41
- function readFrontendMode() {
42
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
43
- if (mode === "server-htmx") {
44
- return "server-htmx";
45
- }
46
- if (mode === "spa-react") {
47
- return "spa-react";
48
- }
49
- return "api";
50
- }
51
- function isViewsEnabled() {
52
- return readFrontendMode() === "server-htmx";
53
- }
54
- function isSpaEnabled() {
55
- return readFrontendMode() === "spa-react";
56
- }
57
-
58
41
  // ../../src/config/rateLimit.ts
59
42
  var LOCAL_LOGIN_RATE_LIMIT = {
60
43
  maxAttempts: 100,
package/dist/index.js CHANGED
@@ -41,25 +41,11 @@ import { createSecurityHeadersMiddleware } from "@getstrata/core/http/securityHe
41
41
  import { createValidateSignatureMiddleware } from "@getstrata/core/http/signedUrl";
42
42
  import { createThrottleMiddleware } from "@getstrata/core/http/throttleMiddleware";
43
43
  import { createRequestLoggingMiddleware } from "@getstrata/core/logging/requestLoggingMiddleware";
44
+ import { isViewsEnabled } from "@getstrata/core/runtime/frontendMode";
44
45
  import { isPublicReadsEnabled } from "@getstrata/core/security/publicReads";
45
46
  import { createTenantMiddleware } from "@getstrata/core/tenant/tenantMiddleware";
46
47
  import { createTracingMiddleware } from "@getstrata/core/tracing/tracingMiddleware";
47
48
 
48
- // ../../src/config/frontend.ts
49
- function readFrontendMode() {
50
- const mode = (process.env.FRONTEND_MODE ?? "api").trim();
51
- if (mode === "server-htmx") {
52
- return "server-htmx";
53
- }
54
- if (mode === "spa-react") {
55
- return "spa-react";
56
- }
57
- return "api";
58
- }
59
- function isViewsEnabled() {
60
- return readFrontendMode() === "server-htmx";
61
- }
62
-
63
49
  // ../../src/config/rateLimit.ts
64
50
  var LOCAL_LOGIN_RATE_LIMIT = {
65
51
  maxAttempts: 100,
@@ -542,13 +528,28 @@ var appConfig = {
542
528
  apiPrefix: process.env.API_PREFIX ?? "/api/v1"
543
529
  };
544
530
 
545
- // ../../src/config/queue.ts
531
+ // ../../src/core/queue/queueConfig.ts
532
+ function resolveQueueConfig() {
533
+ const driver = process.env.QUEUE_DRIVER;
534
+ const maxAttempts = Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3");
535
+ const backoffMs = Number(process.env.QUEUE_BACKOFF_MS ?? "1000");
536
+ return {
537
+ driver: driver === "redis" || driver === "async" || driver === "sync" ? driver : "sync",
538
+ maxAttempts: Number.isFinite(maxAttempts) && maxAttempts > 0 ? maxAttempts : 3,
539
+ backoffMs: Number.isFinite(backoffMs) && backoffMs >= 0 ? backoffMs : 1000
540
+ };
541
+ }
546
542
  var queueConfig = {
547
- driver: process.env.QUEUE_DRIVER === "redis" || process.env.QUEUE_DRIVER === "async" || process.env.QUEUE_DRIVER === "sync" ? process.env.QUEUE_DRIVER : DEFAULT_QUEUE_DRIVER,
548
- maxAttempts: Number(process.env.QUEUE_MAX_ATTEMPTS ?? "3"),
549
- backoffMs: Number(process.env.QUEUE_BACKOFF_MS ?? "1000")
543
+ get driver() {
544
+ return resolveQueueConfig().driver;
545
+ },
546
+ get maxAttempts() {
547
+ return resolveQueueConfig().maxAttempts;
548
+ },
549
+ get backoffMs() {
550
+ return resolveQueueConfig().backoffMs;
551
+ }
550
552
  };
551
-
552
553
  // ../../src/bootstrap/env.ts
553
554
  import { defineEnvSchema } from "@getstrata/core/config/envSchema";
554
555
  var appEnvSchema = defineEnvSchema({
@@ -812,6 +813,7 @@ var storage_default = storageProvider;
812
813
 
813
814
  // ../../src/bootstrap/providers/view.ts
814
815
  import { currentRequestMeta } from "@getstrata/core/http/requestMetaContext";
816
+ import { isViewsEnabled as isViewsEnabled2 } from "@getstrata/core/runtime/frontendMode";
815
817
  import {
816
818
  configureWebErrorView,
817
819
  DEFAULT_VIEWS_DIRECTORY,
@@ -824,7 +826,7 @@ var VIEW_DIRECTORY_CONFIG_KEY = "view.directory";
824
826
  var viewProvider = {
825
827
  name: "view",
826
828
  register({ container, config }) {
827
- if (!isViewsEnabled()) {
829
+ if (!isViewsEnabled2()) {
828
830
  return;
829
831
  }
830
832
  const viewsDirectory = process.env.VIEW_DIRECTORY?.trim() || DEFAULT_VIEWS_DIRECTORY;
@@ -888,6 +890,7 @@ function createAppContext() {
888
890
  }
889
891
  // ../../src/bootstrap/createWebRoutes.ts
890
892
  import { join as join3 } from "path";
893
+ import { isViewsEnabled as isViewsEnabled3 } from "@getstrata/core/runtime/frontendMode";
891
894
  import { notFoundHtmlResponse } from "@getstrata/core/view";
892
895
  function registerRoute(method, path, middleware) {
893
896
  routeRegistry.register({ method, path, middleware });
@@ -914,7 +917,7 @@ function createWebRoutes(dependencies) {
914
917
  return wrappedRoutes;
915
918
  }
916
919
  function mergeWebRoutes(dependencies, routes) {
917
- if (!isViewsEnabled()) {
920
+ if (!isViewsEnabled3()) {
918
921
  return routes;
919
922
  }
920
923
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/bootstrap",
3
- "version": "0.2.54",
3
+ "version": "0.2.56",
4
4
  "description": "Strata application bootstrap — HttpKernel, DI, web session helpers",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -173,14 +173,14 @@
173
173
  "build:bundle": "bun build index.ts --outdir dist --target bun --external bun --external eta --external @getstrata/core",
174
174
  "build:types": "tsc -p tsconfig.types.json && bun ../../scripts/prune-bootstrap-dist-types.ts",
175
175
  "prepublishOnly": "bun run build",
176
- "build:subpaths": "bun build entries/applicationRegistry.ts entries/buildModuleRoutes.ts entries/buildWebModuleRoutes.ts entries/cache/modelCacheTags.ts entries/config.ts entries/context.ts entries/contracts.ts entries/createWebRoutes.ts entries/createRoutes.ts entries/createSpaRoutes.ts entries/dependencies.ts entries/discoverModules.ts entries/health.ts entries/http/securedRouteModelBinding.ts entries/httpKernel.ts entries/listeners/invalidateCacheOnModelWrite.ts entries/membershipService.ts entries/metricsRoutes.ts entries/queue/defaultJobs.ts entries/providers.ts entries/providers/view.ts entries/routeRegistry.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 @getstrata/core --external @getstrata/bootstrap --external @getstrata/bootstrap/applicationRegistry --external @getstrata/bootstrap/buildModuleRoutes --external @getstrata/bootstrap/buildWebModuleRoutes --external @getstrata/bootstrap/cache/modelCacheTags --external @getstrata/bootstrap/config --external @getstrata/bootstrap/context --external @getstrata/bootstrap/contracts --external @getstrata/bootstrap/createWebRoutes --external @getstrata/bootstrap/createRoutes --external @getstrata/bootstrap/createSpaRoutes --external @getstrata/bootstrap/dependencies --external @getstrata/bootstrap/discoverModules --external @getstrata/bootstrap/health --external @getstrata/bootstrap/http/securedRouteModelBinding --external @getstrata/bootstrap/httpKernel --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/routeRegistry --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/auth/accessControl --external @getstrata/core/auth/abilityChecker --external @getstrata/core/auth/authContext --external @getstrata/core/auth/guard --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/password --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/createCacheStore --external @getstrata/core/cache/repository --external @getstrata/core/cache/simpleCache --external @getstrata/core/cache/simpleCacheStore --external @getstrata/core/config/envSchema --external @getstrata/core/contracts/serviceTokens --external @getstrata/core/contracts/container --external @getstrata/core/contracts/di --external @getstrata/core/crypto/fieldEncryption --external @getstrata/core/crypto/mfaSecret --external @getstrata/core/database --external @getstrata/core/database/baseRepository --external @getstrata/core/database/bindConnection --external @getstrata/core/database/boundConnection --external @getstrata/core/database/bunSql --external @getstrata/core/database/connection --external @getstrata/core/database/defaultConnection --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/repositoryConnection --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/table --external @getstrata/core/database/transaction --external @getstrata/core/database/types --external @getstrata/core/database/whereBuilder --external @getstrata/core/errors/http --external @getstrata/core/events --external @getstrata/core/facades --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/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/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/validation --external @getstrata/core/jobs/dispatchWebhookJob --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/queueMetrics --external @getstrata/core/queue/publicQueue --external @getstrata/core/queue/redisQueue --external @getstrata/core/queue/types --external @getstrata/core/runtime/appKeyPrefix --external @getstrata/core/runtime/applicationRegistry --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/safeFetch --external @getstrata/core/security/safeUrl --external @getstrata/core/security/scimTenantTokens --external @getstrata/core/security/securityEvents --external @getstrata/core/security/stripeWebhook --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/tenantContext --external @getstrata/core/tenant/tenantDatabaseScope --external @getstrata/core/tenant/databaseTenantContext --external @getstrata/core/tenant/tenantMiddleware --external @getstrata/core/terminal/runShell --external @getstrata/core/tracing/traceContext --external @getstrata/core/tracing/tracingMiddleware --external @getstrata/core/validation/rules --external @getstrata/core/view",
176
+ "build:subpaths": "bun build entries/applicationRegistry.ts entries/buildModuleRoutes.ts entries/buildWebModuleRoutes.ts entries/cache/modelCacheTags.ts entries/config.ts entries/context.ts entries/contracts.ts entries/createWebRoutes.ts entries/createRoutes.ts entries/createSpaRoutes.ts entries/dependencies.ts entries/discoverModules.ts entries/health.ts entries/http/securedRouteModelBinding.ts entries/httpKernel.ts entries/listeners/invalidateCacheOnModelWrite.ts entries/membershipService.ts entries/metricsRoutes.ts entries/queue/defaultJobs.ts entries/providers.ts entries/providers/view.ts entries/routeRegistry.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 @getstrata/core --external @getstrata/bootstrap --external @getstrata/bootstrap/applicationRegistry --external @getstrata/bootstrap/buildModuleRoutes --external @getstrata/bootstrap/buildWebModuleRoutes --external @getstrata/bootstrap/cache/modelCacheTags --external @getstrata/bootstrap/config --external @getstrata/bootstrap/context --external @getstrata/bootstrap/contracts --external @getstrata/bootstrap/createWebRoutes --external @getstrata/bootstrap/createRoutes --external @getstrata/bootstrap/createSpaRoutes --external @getstrata/bootstrap/dependencies --external @getstrata/bootstrap/discoverModules --external @getstrata/bootstrap/health --external @getstrata/bootstrap/http/securedRouteModelBinding --external @getstrata/bootstrap/httpKernel --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/routeRegistry --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/auth/accessControl --external @getstrata/core/auth/abilityChecker --external @getstrata/core/auth/authContext --external @getstrata/core/auth/guard --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/password --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/createCacheStore --external @getstrata/core/cache/repository --external @getstrata/core/cache/simpleCache --external @getstrata/core/cache/simpleCacheStore --external @getstrata/core/config/envSchema --external @getstrata/core/contracts/serviceTokens --external @getstrata/core/contracts/container --external @getstrata/core/contracts/di --external @getstrata/core/crypto/fieldEncryption --external @getstrata/core/crypto/mfaSecret --external @getstrata/core/database --external @getstrata/core/database/baseRepository --external @getstrata/core/database/bindConnection --external @getstrata/core/database/boundConnection --external @getstrata/core/database/bunSql --external @getstrata/core/database/connection --external @getstrata/core/database/defaultConnection --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/repositoryConnection --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/table --external @getstrata/core/database/transaction --external @getstrata/core/database/types --external @getstrata/core/database/whereBuilder --external @getstrata/core/errors/http --external @getstrata/core/events --external @getstrata/core/facades --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/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/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/validation --external @getstrata/core/jobs/dispatchWebhookJob --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/queueMetrics --external @getstrata/core/queue/publicQueue --external @getstrata/core/queue/redisQueue --external @getstrata/core/queue/types --external @getstrata/core/runtime/appKeyPrefix --external @getstrata/core/runtime/frontendMode --external @getstrata/core/runtime/applicationRegistry --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/safeFetch --external @getstrata/core/security/safeUrl --external @getstrata/core/security/scimTenantTokens --external @getstrata/core/security/securityEvents --external @getstrata/core/security/stripeWebhook --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/tenantContext --external @getstrata/core/tenant/tenantDatabaseScope --external @getstrata/core/tenant/databaseTenantContext --external @getstrata/core/tenant/tenantMiddleware --external @getstrata/core/terminal/runShell --external @getstrata/core/tracing/traceContext --external @getstrata/core/tracing/tracingMiddleware --external @getstrata/core/validation/rules --external @getstrata/core/view",
177
177
  "build:shims": "true"
178
178
  },
179
179
  "publishConfig": {
180
180
  "access": "public"
181
181
  },
182
182
  "peerDependencies": {
183
- "@getstrata/core": "^0.5.66",
183
+ "@getstrata/core": "^0.5.69",
184
184
  "typescript": "^5.9.0"
185
185
  }
186
186
  }