@getstrata/core 0.5.44 → 0.5.46

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.
@@ -0,0 +1 @@
1
+ // @bun
@@ -1,22 +1 @@
1
- // @bun
2
- // ../../src/core/database/boundConnection.ts
3
- var boundConnectionHolder = {
4
- connection: null
5
- };
6
- function bindDatabaseConnection(connection) {
7
- boundConnectionHolder.connection = connection;
8
- }
9
- function getBoundDatabaseConnection() {
10
- return boundConnectionHolder.connection;
11
- }
12
- function resetBoundDatabaseConnection() {
13
- boundConnectionHolder.connection = null;
14
- }
15
-
16
- // ../../src/core/database/bindConnection.ts
17
- function bindDatabaseConnection2(connection) {
18
- bindDatabaseConnection(connection);
19
- }
20
- export {
21
- bindDatabaseConnection2 as bindDatabaseConnection
22
- };
1
+ export * from "../../index.js";
@@ -1,19 +1 @@
1
- // @bun
2
- // ../../src/core/database/boundConnection.ts
3
- var boundConnectionHolder = {
4
- connection: null
5
- };
6
- function bindDatabaseConnection(connection) {
7
- boundConnectionHolder.connection = connection;
8
- }
9
- function getBoundDatabaseConnection() {
10
- return boundConnectionHolder.connection;
11
- }
12
- function resetBoundDatabaseConnection() {
13
- boundConnectionHolder.connection = null;
14
- }
15
- export {
16
- resetBoundDatabaseConnection,
17
- getBoundDatabaseConnection,
18
- bindDatabaseConnection
19
- };
1
+ export * from "../../index.js";
@@ -1,12 +1 @@
1
- // @bun
2
- // ../../src/core/database/connection.ts
3
- function createDatabaseConnection(source) {
4
- return {
5
- async unsafe(query, params = []) {
6
- return await source.unsafe(query, params);
7
- }
8
- };
9
- }
10
- export {
11
- createDatabaseConnection
12
- };
1
+ export * from "../../index.js";
@@ -0,0 +1 @@
1
+ export * from "../../index.js";
@@ -0,0 +1 @@
1
+ export * from "../../index.js";
@@ -1,78 +1 @@
1
- // @bun
2
- // ../../src/core/errors/http.ts
3
- class HttpError extends Error {
4
- status;
5
- details;
6
- constructor(status, message, details) {
7
- super(message);
8
- this.name = new.target.name;
9
- this.status = status;
10
- this.details = details;
11
- }
12
- }
13
-
14
- class BadRequestError extends HttpError {
15
- constructor(message = "Bad Request", details) {
16
- super(400, message, details);
17
- }
18
- }
19
-
20
- class NotFoundError extends HttpError {
21
- constructor(message = "Not Found", details) {
22
- super(404, message, details);
23
- }
24
- }
25
-
26
- class ConflictError extends HttpError {
27
- constructor(message = "Conflict", details) {
28
- super(409, message, details);
29
- }
30
- }
31
-
32
- class UnprocessableEntityError extends HttpError {
33
- constructor(message = "Unprocessable Entity", details) {
34
- super(422, message, details);
35
- }
36
- }
37
-
38
- class ValidationError extends HttpError {
39
- constructor(message = "Validation failed", details) {
40
- super(422, message, details);
41
- }
42
- }
43
-
44
- class ForbiddenError extends HttpError {
45
- constructor(message = "Forbidden", details) {
46
- super(403, message, details);
47
- }
48
- }
49
-
50
- class UnauthorizedError extends HttpError {
51
- constructor(message = "Unauthorized", details) {
52
- super(401, message, details);
53
- }
54
- }
55
-
56
- class PayloadTooLargeError extends HttpError {
57
- constructor(message = "Payload Too Large", details) {
58
- super(413, message, details);
59
- }
60
- }
61
-
62
- class PreconditionFailedError extends HttpError {
63
- constructor(message = "Precondition Failed", details) {
64
- super(412, message, details);
65
- }
66
- }
67
- export {
68
- ValidationError,
69
- UnprocessableEntityError,
70
- UnauthorizedError,
71
- PreconditionFailedError,
72
- PayloadTooLargeError,
73
- NotFoundError,
74
- HttpError,
75
- ForbiddenError,
76
- ConflictError,
77
- BadRequestError
78
- };
1
+ export * from "../../index.js";
@@ -111,6 +111,12 @@ function rateLimitMultiplierForPlan(plan) {
111
111
  }
112
112
 
113
113
  // ../../src/core/http/validation.ts
114
+ function getQueryParams(request) {
115
+ if (!request) {
116
+ return new URLSearchParams;
117
+ }
118
+ return new URL(request.url).searchParams;
119
+ }
114
120
  async function parseJsonBody(request, validator) {
115
121
  let payload;
116
122
  try {
@@ -0,0 +1,185 @@
1
+ // @bun
2
+ // ../../src/core/errors/http.ts
3
+ class HttpError extends Error {
4
+ status;
5
+ details;
6
+ constructor(status, message, details) {
7
+ super(message);
8
+ this.name = new.target.name;
9
+ this.status = status;
10
+ this.details = details;
11
+ }
12
+ }
13
+
14
+ class BadRequestError extends HttpError {
15
+ constructor(message = "Bad Request", details) {
16
+ super(400, message, details);
17
+ }
18
+ }
19
+
20
+ class NotFoundError extends HttpError {
21
+ constructor(message = "Not Found", details) {
22
+ super(404, message, details);
23
+ }
24
+ }
25
+
26
+ class ConflictError extends HttpError {
27
+ constructor(message = "Conflict", details) {
28
+ super(409, message, details);
29
+ }
30
+ }
31
+
32
+ class UnprocessableEntityError extends HttpError {
33
+ constructor(message = "Unprocessable Entity", details) {
34
+ super(422, message, details);
35
+ }
36
+ }
37
+
38
+ class ValidationError extends HttpError {
39
+ constructor(message = "Validation failed", details) {
40
+ super(422, message, details);
41
+ }
42
+ }
43
+
44
+ class ForbiddenError extends HttpError {
45
+ constructor(message = "Forbidden", details) {
46
+ super(403, message, details);
47
+ }
48
+ }
49
+
50
+ class UnauthorizedError extends HttpError {
51
+ constructor(message = "Unauthorized", details) {
52
+ super(401, message, details);
53
+ }
54
+ }
55
+
56
+ class PayloadTooLargeError extends HttpError {
57
+ constructor(message = "Payload Too Large", details) {
58
+ super(413, message, details);
59
+ }
60
+ }
61
+
62
+ class PreconditionFailedError extends HttpError {
63
+ constructor(message = "Precondition Failed", details) {
64
+ super(412, message, details);
65
+ }
66
+ }
67
+
68
+ // ../../src/core/pagination/index.ts
69
+ function buildPaginationMeta(input) {
70
+ const lastPage = Math.max(1, Math.ceil(input.total / input.perPage));
71
+ return {
72
+ page: input.page,
73
+ per_page: input.perPage,
74
+ total: input.total,
75
+ last_page: lastPage
76
+ };
77
+ }
78
+
79
+ // ../../src/core/runtime/asyncContextStore.ts
80
+ import { AsyncLocalStorage } from "async_hooks";
81
+ function createAsyncContextStore(key) {
82
+ const symbol = Symbol.for(key);
83
+ const globalRecord = globalThis;
84
+ const existing = globalRecord[symbol];
85
+ if (existing) {
86
+ return existing;
87
+ }
88
+ const store = new AsyncLocalStorage;
89
+ globalRecord[symbol] = store;
90
+ return store;
91
+ }
92
+
93
+ // ../../src/core/auth/authContext.ts
94
+ var authContext = createAsyncContextStore("@getstrata/authContext");
95
+ function runWithAuthUser(user, callback) {
96
+ return authContext.run(user, callback);
97
+ }
98
+ function currentAuthUser() {
99
+ return authContext.getStore() ?? null;
100
+ }
101
+
102
+ // ../../src/core/tenant/tenantContext.ts
103
+ var tenantContext = createAsyncContextStore("@getstrata/tenantContext");
104
+ function runWithTenant(tenant, callback) {
105
+ return tenantContext.run(tenant, callback);
106
+ }
107
+ function currentTenant() {
108
+ return tenantContext.getStore() ?? null;
109
+ }
110
+ function currentTenantId() {
111
+ return currentTenant()?.id ?? 1;
112
+ }
113
+ function rateLimitMultiplierForPlan(plan) {
114
+ switch (plan) {
115
+ case "enterprise":
116
+ return 4;
117
+ case "pro":
118
+ return 2;
119
+ default:
120
+ return 1;
121
+ }
122
+ }
123
+
124
+ // ../../src/core/http/validation.ts
125
+ function getQueryParams(request) {
126
+ if (!request) {
127
+ return new URLSearchParams;
128
+ }
129
+ return new URL(request.url).searchParams;
130
+ }
131
+ async function parseJsonBody(request, validator) {
132
+ let payload;
133
+ try {
134
+ payload = await request.json();
135
+ } catch {
136
+ throw new BadRequestError("Request body must be valid JSON.");
137
+ }
138
+ return validator(payload);
139
+ }
140
+ function parsePositiveIntParam(value, name = "id") {
141
+ const parsed = Number.parseInt(value, 10);
142
+ if (!Number.isInteger(parsed) || parsed <= 0) {
143
+ throw new BadRequestError(`Invalid ${name}. Expected a positive integer.`);
144
+ }
145
+ return parsed;
146
+ }
147
+
148
+ // ../../src/core/http/pagination.ts
149
+ var DEFAULT_PER_PAGE = 15;
150
+ var MAX_PER_PAGE = 100;
151
+ function parseRequiredPositiveIntQueryParam(params, name) {
152
+ const value = params.get(name);
153
+ if (value === null || value.trim() === "") {
154
+ throw new BadRequestError(`Invalid query parameter "${name}". Expected a positive integer.`);
155
+ }
156
+ const parsed = Number.parseInt(value, 10);
157
+ if (!Number.isInteger(parsed) || parsed <= 0) {
158
+ throw new BadRequestError(`Invalid query parameter "${name}". Expected a positive integer.`);
159
+ }
160
+ return parsed;
161
+ }
162
+ function parsePaginationQuery(request) {
163
+ const params = getQueryParams(request);
164
+ const pageParam = params.get("page");
165
+ const perPageParam = params.get("per_page");
166
+ const page = pageParam === null || pageParam.trim() === "" ? 1 : parseRequiredPositiveIntQueryParam(params, "page");
167
+ if (perPageParam === null || perPageParam.trim() === "") {
168
+ return { page, perPage: DEFAULT_PER_PAGE };
169
+ }
170
+ const perPage = parseRequiredPositiveIntQueryParam(params, "per_page");
171
+ if (perPage > MAX_PER_PAGE) {
172
+ throw new BadRequestError(`Invalid query parameter "per_page". Maximum allowed value is ${MAX_PER_PAGE}.`);
173
+ }
174
+ return { page, perPage };
175
+ }
176
+ function paginatedResponse(data, meta, init = {}) {
177
+ return Response.json({ data, meta }, init);
178
+ }
179
+ export {
180
+ parsePaginationQuery,
181
+ paginatedResponse,
182
+ buildPaginationMeta,
183
+ MAX_PER_PAGE,
184
+ DEFAULT_PER_PAGE
185
+ };
@@ -111,6 +111,12 @@ function rateLimitMultiplierForPlan(plan) {
111
111
  }
112
112
 
113
113
  // ../../src/core/http/validation.ts
114
+ function getQueryParams(request) {
115
+ if (!request) {
116
+ return new URLSearchParams;
117
+ }
118
+ return new URL(request.url).searchParams;
119
+ }
114
120
  async function parseJsonBody(request, validator) {
115
121
  let payload;
116
122
  try {
@@ -300,6 +300,12 @@ function rateLimitMultiplierForPlan(plan) {
300
300
  }
301
301
 
302
302
  // ../../src/core/http/validation.ts
303
+ function getQueryParams(request) {
304
+ if (!request) {
305
+ return new URLSearchParams;
306
+ }
307
+ return new URL(request.url).searchParams;
308
+ }
303
309
  async function parseJsonBody(request, validator) {
304
310
  let payload;
305
311
  try {
@@ -152,6 +152,12 @@ function rateLimitMultiplierForPlan(plan) {
152
152
  }
153
153
 
154
154
  // ../../src/core/http/validation.ts
155
+ function getQueryParams(request) {
156
+ if (!request) {
157
+ return new URLSearchParams;
158
+ }
159
+ return new URL(request.url).searchParams;
160
+ }
155
161
  async function parseJsonBody(request, validator) {
156
162
  let payload;
157
163
  try {
@@ -1,152 +1 @@
1
- // @bun
2
- // ../../src/core/mail/markdownMail.ts
3
- function escapeHtml(value) {
4
- return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
5
- }
6
- function stripMarkdown(markdown) {
7
- return markdown.replace(/^#{1,6}\s+/gm, "").replace(/\*\*([^*]+)\*\*/g, "$1").replace(/\*([^*]+)\*/g, "$1").replace(/`([^`]+)`/g, "$1").replace(/\[([^\]]+)\]\(([^)]+)\)/g, "$1 ($2)").replace(/^[-*]\s+/gm, "\u2022 ").replace(/```[\s\S]*?```/g, "").replace(/\n{3,}/g, `
8
-
9
- `).trim();
10
- }
11
- function markdownToHtml(markdown) {
12
- const escaped = markdown.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
13
- return escaped.replace(/^### (.+)$/gm, "<h3>$1</h3>").replace(/^## (.+)$/gm, "<h2>$1</h2>").replace(/^# (.+)$/gm, "<h1>$1</h1>").replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>").replace(/\*([^*]+)\*/g, "<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2">$1</a>').replace(/^[-*]\s+(.+)$/gm, "<li>$1</li>").replace(/(<li>[\s\S]*?<\/li>\n?)+/g, (block) => `<ul>${block}</ul>`).replace(/```(\w+)?\n([\s\S]*?)```/g, "<pre><code>$2</code></pre>").split(/\n\n+/).map((block) => {
14
- if (block.startsWith("<")) {
15
- return block;
16
- }
17
- return `<p>${block.replace(/\n/g, " ")}</p>`;
18
- }).join(`
19
- `);
20
- }
21
- function wrapMarkdownMailLayout(bodyHtml, options = {}) {
22
- const title = escapeHtml(options.title ?? "GetStrata");
23
- const preview = escapeHtml(options.preview ?? "");
24
- const footer = escapeHtml(options.footer ?? "Sent by GetStrata");
25
- return `<!DOCTYPE html>
26
- <html lang="en">
27
- <head>
28
- <meta charset="utf-8">
29
- <meta name="viewport" content="width=device-width, initial-scale=1">
30
- <title>${title}</title>
31
- <style>
32
- body { font-family: system-ui, sans-serif; line-height: 1.5; color: #111827; background: #f9fafb; margin: 0; padding: 24px; }
33
- .container { max-width: 640px; margin: 0 auto; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
34
- .header { padding: 20px 24px; border-bottom: 1px solid #e5e7eb; font-weight: 600; }
35
- .content { padding: 24px; }
36
- .footer { padding: 16px 24px; border-top: 1px solid #e5e7eb; color: #6b7280; font-size: 14px; }
37
- a { color: #2563eb; }
38
- code { background: #f3f4f6; padding: 2px 4px; border-radius: 4px; }
39
- pre { background: #111827; color: #f9fafb; padding: 12px; border-radius: 6px; overflow-x: auto; }
40
- </style>
41
- </head>
42
- <body>
43
- ${preview ? `<span style="display:none;max-height:0;overflow:hidden;">${preview}</span>` : ""}
44
- <div class="container">
45
- <div class="header">${title}</div>
46
- <div class="content">${bodyHtml}</div>
47
- <div class="footer">${footer}</div>
48
- </div>
49
- </body>
50
- </html>`;
51
- }
52
- function renderMarkdownMail(markdown, options = {}) {
53
- const bodyHtml = markdownToHtml(markdown.trim());
54
- const html = wrapMarkdownMailLayout(bodyHtml, options);
55
- const text = stripMarkdown(markdown);
56
- return { html, text };
57
- }
58
-
59
- // ../../src/core/mail/markdownMailable.ts
60
- function buildMarkdownMailMessage(input) {
61
- const rendered = renderMarkdownMail(input.markdown, {
62
- title: input.layout?.title ?? input.subject,
63
- ...input.layout
64
- });
65
- return {
66
- to: input.to,
67
- subject: input.subject,
68
- body: rendered.text,
69
- html: rendered.html
70
- };
71
- }
72
- async function sendMarkdownMail(mailer, input) {
73
- await mailer.send(buildMarkdownMailMessage(input));
74
- }
75
-
76
- // ../../src/core/notifications/dispatcher.ts
77
- class NotificationDispatcher {
78
- mailer;
79
- databaseStore;
80
- constructor(mailer, databaseStore = null) {
81
- this.mailer = mailer;
82
- this.databaseStore = databaseStore;
83
- }
84
- async send(notifiable, notification) {
85
- for (const channel of notification.via(notifiable)) {
86
- if (channel === "mail") {
87
- await this.sendMail(notifiable, notification);
88
- continue;
89
- }
90
- if (channel === "database") {
91
- await this.sendDatabase(notifiable, notification);
92
- }
93
- }
94
- }
95
- async sendMail(notifiable, notification) {
96
- const routed = notifiable.routeNotificationFor("mail");
97
- if (routed === null) {
98
- return;
99
- }
100
- const message = notification.toMail(notifiable);
101
- if (!message) {
102
- return;
103
- }
104
- if (message.markdown) {
105
- await this.mailer.send(buildMarkdownMailMessage({
106
- to: String(routed),
107
- subject: message.subject,
108
- markdown: message.markdown
109
- }));
110
- return;
111
- }
112
- await this.mailer.send({
113
- to: String(routed),
114
- subject: message.subject,
115
- body: message.body ?? "",
116
- ...message.html ? { html: message.html } : {}
117
- });
118
- }
119
- async sendDatabase(notifiable, notification) {
120
- if (!this.databaseStore) {
121
- return;
122
- }
123
- const payload = notification.toDatabase(notifiable);
124
- if (!payload) {
125
- return;
126
- }
127
- await this.databaseStore.create({
128
- userId: Number(notifiable.getNotificationKey()),
129
- ...payload
130
- });
131
- }
132
- }
133
- function createNotificationDispatcher(mailer, databaseStore) {
134
- return new NotificationDispatcher(mailer, databaseStore ?? null);
135
- }
136
- // ../../src/core/notifications/notification.ts
137
- class Notification {
138
- via(_notifiable) {
139
- throw new Error("Notification subclasses must implement via().");
140
- }
141
- toMail(_notifiable) {
142
- return null;
143
- }
144
- toDatabase(_notifiable) {
145
- return null;
146
- }
147
- }
148
- export {
149
- createNotificationDispatcher,
150
- NotificationDispatcher,
151
- Notification
152
- };
1
+ export * from "../index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getstrata/core",
3
- "version": "0.5.44",
3
+ "version": "0.5.46",
4
4
  "description": "Strata — Laravel-inspired Bun framework public API",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -125,6 +125,11 @@
125
125
  "import": "./dist/entries/admin/registry.js",
126
126
  "default": "./dist/entries/admin/registry.js"
127
127
  },
128
+ "./admin/types": {
129
+ "types": "./dist/core/admin/types.d.ts",
130
+ "import": "./dist/entries/admin/types.js",
131
+ "default": "./dist/entries/admin/types.js"
132
+ },
128
133
  "./cache/tags": {
129
134
  "types": "./dist/core/cache/tags.d.ts",
130
135
  "import": "./dist/entries/cache/tags.js",
@@ -205,6 +210,11 @@
205
210
  "import": "./dist/entries/database/connection.js",
206
211
  "default": "./dist/entries/database/connection.js"
207
212
  },
213
+ "./database/defaultConnection": {
214
+ "types": "./dist/core/database/defaultConnection.d.ts",
215
+ "import": "./dist/entries/database/defaultConnection.js",
216
+ "default": "./dist/entries/database/defaultConnection.js"
217
+ },
208
218
  "./database/errors": {
209
219
  "types": "./dist/core/database/errors.d.ts",
210
220
  "import": "./dist/entries/database/errors.js",
@@ -240,6 +250,11 @@
240
250
  "import": "./dist/entries/database/relationships.js",
241
251
  "default": "./dist/entries/database/relationships.js"
242
252
  },
253
+ "./database/repositoryConnection": {
254
+ "types": "./dist/core/database/repositoryConnection.d.ts",
255
+ "import": "./dist/entries/database/repositoryConnection.js",
256
+ "default": "./dist/entries/database/repositoryConnection.js"
257
+ },
243
258
  "./database/seeders": {
244
259
  "types": "./dist/core/database/seeders/runner.d.ts",
245
260
  "import": "./dist/entries/database/seeders.js",
@@ -375,6 +390,11 @@
375
390
  "import": "./dist/entries/http/memoryThrottleMiddleware.js",
376
391
  "default": "./dist/entries/http/memoryThrottleMiddleware.js"
377
392
  },
393
+ "./http/pagination": {
394
+ "types": "./dist/core/http/pagination.d.ts",
395
+ "import": "./dist/entries/http/pagination.js",
396
+ "default": "./dist/entries/http/pagination.js"
397
+ },
378
398
  "./http/parseFormBody": {
379
399
  "types": "./dist/core/http/parseFormBody.d.ts",
380
400
  "import": "./dist/entries/http/parseFormBody.js",
@@ -702,7 +722,7 @@
702
722
  "build:bundle": "bun build index.ts --outdir dist --target bun --external bun --external eta",
703
723
  "build:types": "tsc -p tsconfig.types.json",
704
724
  "prepublishOnly": "bun run build && bun ../../scripts/prepare-core-package-publish.ts",
705
- "build:subpaths": "bun build entries/auth/abilityChecker.ts entries/auth/membershipMiddleware.ts entries/auth/oauth/oidcProvider.ts entries/auth/oauth/providers.ts entries/auth/oauth/samlProvider.ts entries/auth/oauth/types.ts entries/auth/password.ts entries/auth/scimAuthMiddleware.ts entries/auth/sessionCookie.ts entries/auth/sessionGuard.ts entries/auth/tokenHash.ts entries/audit/exportAuditLogs.ts entries/audit/siemFormatter.ts entries/admin/formatValue.ts entries/admin/registry.ts entries/cache/tags.ts entries/cache/createCacheStore.ts entries/cache/repository.ts entries/cache/simpleCache.ts entries/cache/simpleCacheStore.ts entries/config/envSchema.ts entries/contracts/serviceTokens.ts entries/contracts/container.ts entries/contracts/di.ts entries/crypto/fieldEncryption.ts entries/crypto/mfaSecret.ts entries/database/baseRepository.ts entries/database/bindConnection.ts entries/database/boundConnection.ts entries/database/connection.ts entries/database/errors.ts entries/database/factory.ts entries/database/migrations.ts entries/database/migrations/types.ts entries/database/model.ts entries/database/query.ts entries/database/relationships.ts entries/database/seeders.ts entries/database/seeders/types.ts entries/database/schema.ts entries/database/table.ts entries/database/transaction.ts entries/database/types.ts entries/errors/http.ts entries/http/authMiddleware.ts entries/http/authorizeMiddleware.ts entries/http/bodySizeLimitMiddleware.ts entries/http/cookies.ts entries/http/contentNegotiation.ts entries/http/conditionalResponse.ts entries/http/corsMiddleware.ts entries/http/csrfMiddleware.ts entries/http/csrfProtection.ts entries/http/csrfToken.ts entries/http/etag.ts entries/http/flashSession.ts entries/http/flashMiddleware.ts entries/http/formRequest.ts entries/http/metricsMiddleware.ts entries/http/loginThrottleMiddleware.ts entries/http/memoryThrottleMiddleware.ts entries/http/parseFormBody.ts entries/http/parseMultipartUpload.ts entries/http/requireAbilityMiddleware.ts entries/http/requireAuthMiddleware.ts entries/http/requireGlobalAdminMiddleware.ts entries/http/requireWebAuthMiddleware.ts entries/http/resources.ts entries/http/route.ts entries/http/routeMiddleware.ts entries/http/routeModelBinding.ts entries/http/scimThrottleMiddleware.ts entries/http/securityHeadersMiddleware.ts entries/http/securedRouteModelBinding.ts entries/http/webErrorResponse.ts entries/http/webFormRequest.ts entries/http/throttleMiddleware.ts entries/jobs/dispatchWebhookJob.ts entries/jobs/invalidateCacheTagsJob.ts entries/lifecycle/gracefulShutdown.ts entries/logging/logger.ts entries/logging/requestLoggingMiddleware.ts entries/mail/mailer.ts entries/mail/markdownMail.ts entries/mail/markdownMailable.ts entries/metrics/prometheus.ts entries/notifications.ts entries/openapi/generator.ts entries/openapi/registeredRoute.ts entries/openapi/validate.ts entries/pagination.ts entries/queue.ts entries/queue/createAppQueue.ts entries/queue/failedJobRepository.ts entries/queue/failedJobService.ts entries/queue/jobRunner.ts entries/queue/queueMetrics.ts entries/queue/publicQueue.ts entries/queue/redisQueue.ts entries/queue/types.ts entries/runtime/asyncContextStore.ts entries/scheduler/schedule.ts entries/security/oauthState.ts entries/security/publicReads.ts entries/security/safeFetch.ts entries/security/safeUrl.ts entries/security/scimTenantTokens.ts entries/security/stripeWebhook.ts entries/security/timingSafeCompare.ts entries/security/tokenExpiry.ts entries/security/totp.ts entries/storage/storage.ts entries/tenant/tenantDatabaseScope.ts entries/tenant/databaseTenantContext.ts entries/tracing/tracingMiddleware.ts entries/validation/rules.ts entries/view.ts --outdir dist --root . --target bun --external bun --external eta",
725
+ "build:subpaths": "bun build entries/auth/abilityChecker.ts entries/auth/membershipMiddleware.ts entries/auth/oauth/oidcProvider.ts entries/auth/oauth/providers.ts entries/auth/oauth/samlProvider.ts entries/auth/oauth/types.ts entries/auth/password.ts entries/auth/scimAuthMiddleware.ts entries/auth/sessionCookie.ts entries/auth/sessionGuard.ts entries/auth/tokenHash.ts entries/audit/exportAuditLogs.ts entries/audit/siemFormatter.ts entries/admin/formatValue.ts entries/admin/registry.ts entries/admin/types.ts entries/cache/tags.ts entries/cache/createCacheStore.ts entries/cache/repository.ts entries/cache/simpleCache.ts entries/cache/simpleCacheStore.ts entries/config/envSchema.ts entries/contracts/serviceTokens.ts entries/contracts/container.ts entries/contracts/di.ts entries/crypto/fieldEncryption.ts entries/crypto/mfaSecret.ts entries/database/baseRepository.ts entries/database/errors.ts entries/database/factory.ts entries/database/migrations.ts entries/database/migrations/types.ts entries/database/model.ts entries/database/query.ts entries/database/relationships.ts entries/database/seeders.ts entries/database/seeders/types.ts entries/database/schema.ts entries/database/table.ts entries/database/transaction.ts entries/database/types.ts entries/http/authMiddleware.ts entries/http/authorizeMiddleware.ts entries/http/bodySizeLimitMiddleware.ts entries/http/cookies.ts entries/http/contentNegotiation.ts entries/http/conditionalResponse.ts entries/http/corsMiddleware.ts entries/http/csrfMiddleware.ts entries/http/csrfProtection.ts entries/http/csrfToken.ts entries/http/etag.ts entries/http/flashSession.ts entries/http/flashMiddleware.ts entries/http/formRequest.ts entries/http/metricsMiddleware.ts entries/http/loginThrottleMiddleware.ts entries/http/memoryThrottleMiddleware.ts entries/http/pagination.ts entries/http/parseFormBody.ts entries/http/parseMultipartUpload.ts entries/http/requireAbilityMiddleware.ts entries/http/requireAuthMiddleware.ts entries/http/requireGlobalAdminMiddleware.ts entries/http/requireWebAuthMiddleware.ts entries/http/resources.ts entries/http/route.ts entries/http/routeMiddleware.ts entries/http/routeModelBinding.ts entries/http/scimThrottleMiddleware.ts entries/http/securityHeadersMiddleware.ts entries/http/securedRouteModelBinding.ts entries/http/webErrorResponse.ts entries/http/webFormRequest.ts entries/http/throttleMiddleware.ts entries/jobs/dispatchWebhookJob.ts entries/jobs/invalidateCacheTagsJob.ts entries/lifecycle/gracefulShutdown.ts entries/logging/logger.ts entries/logging/requestLoggingMiddleware.ts entries/mail/mailer.ts entries/mail/markdownMail.ts entries/mail/markdownMailable.ts entries/metrics/prometheus.ts entries/openapi/generator.ts entries/openapi/registeredRoute.ts entries/openapi/validate.ts entries/pagination.ts entries/queue.ts entries/queue/createAppQueue.ts entries/queue/failedJobRepository.ts entries/queue/failedJobService.ts entries/queue/jobRunner.ts entries/queue/queueMetrics.ts entries/queue/publicQueue.ts entries/queue/redisQueue.ts entries/queue/types.ts entries/runtime/asyncContextStore.ts entries/scheduler/schedule.ts entries/security/oauthState.ts entries/security/publicReads.ts entries/security/safeFetch.ts entries/security/safeUrl.ts entries/security/scimTenantTokens.ts entries/security/stripeWebhook.ts entries/security/timingSafeCompare.ts entries/security/tokenExpiry.ts entries/security/totp.ts entries/storage/storage.ts entries/tenant/tenantDatabaseScope.ts entries/tenant/databaseTenantContext.ts entries/tracing/tracingMiddleware.ts entries/validation/rules.ts entries/view.ts --outdir dist --root . --target bun --external bun --external eta",
706
726
  "build:shims": "bun ../../scripts/write-core-shared-shims.ts"
707
727
  },
708
728
  "publishConfig": {