@getstrata/core 0.5.55 → 0.5.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.
Files changed (77) hide show
  1. package/README.md +2 -0
  2. package/dist/core/media/imageTransform.d.ts +13 -0
  3. package/dist/core/scheduler/osCron.d.ts +14 -0
  4. package/dist/core/terminal/runShell.d.ts +6 -0
  5. package/dist/core/view/assertEtaHtmlSource.d.ts +5 -0
  6. package/dist/core/view/etaViewEngine.d.ts +4 -0
  7. package/dist/entries/audit/exportAuditLogs.js +2 -2
  8. package/dist/entries/audit/siemFormatter.js +2 -2
  9. package/dist/entries/auth/accessControl.js +4 -4
  10. package/dist/entries/auth/membershipScope.js +6 -6
  11. package/dist/entries/auth/oauth/providers.js +2 -2
  12. package/dist/entries/auth/password.js +2 -2
  13. package/dist/entries/auth/policy.js +2 -2
  14. package/dist/entries/auth/sessionCookie.js +4 -4
  15. package/dist/entries/auth/sessionGuard.js +0 -91
  16. package/dist/entries/auth/tokenHash.js +2 -2
  17. package/dist/entries/config/envSchema.js +2 -2
  18. package/dist/entries/contracts/container.js +2 -2
  19. package/dist/entries/contracts/di.js +2 -2
  20. package/dist/entries/contracts/serviceTokens.js +6 -6
  21. package/dist/entries/crypto/fieldEncryption.js +8 -8
  22. package/dist/entries/crypto/mfaSecret.js +2 -2
  23. package/dist/entries/database/errors.js +2 -2
  24. package/dist/entries/database/migrations.js +8 -8
  25. package/dist/entries/database/model.js +5 -5
  26. package/dist/entries/database/query.js +19 -19
  27. package/dist/entries/database/relationships.js +13 -13
  28. package/dist/entries/database/schema.js +13 -13
  29. package/dist/entries/database/seeders.js +2 -2
  30. package/dist/entries/facades.js +8 -8
  31. package/dist/entries/http/authMiddleware.js +2 -2
  32. package/dist/entries/http/bodySizeLimitMiddleware.js +2 -2
  33. package/dist/entries/http/cookies.js +2 -2
  34. package/dist/entries/http/csrfProtection.js +2 -2
  35. package/dist/entries/http/csrfToken.js +6 -6
  36. package/dist/entries/http/etag.js +8 -8
  37. package/dist/entries/http/flashSession.js +4 -4
  38. package/dist/entries/http/formRequest.js +2 -2
  39. package/dist/entries/http/loginThrottleMiddleware.js +2 -2
  40. package/dist/entries/http/metricsMiddleware.js +2 -2
  41. package/dist/entries/http/pagination.js +4 -4
  42. package/dist/entries/http/parseFormBody.js +2 -2
  43. package/dist/entries/http/parseMultipartUpload.js +2 -2
  44. package/dist/entries/http/resources.js +2 -2
  45. package/dist/entries/http/response.js +186 -98
  46. package/dist/entries/http/securedRouteModelBinding.js +2 -2
  47. package/dist/entries/http/throttleMiddleware.js +2 -2
  48. package/dist/entries/http/validation.js +13 -13
  49. package/dist/entries/http/webErrorResponse.js +184 -96
  50. package/dist/entries/lifecycle/gracefulShutdown.js +3 -3
  51. package/dist/entries/logging/logger.js +2 -2
  52. package/dist/entries/mail/mailer.js +6 -6
  53. package/dist/entries/mail/markdownMail.js +3 -3
  54. package/dist/entries/mail/markdownMailable.js +2 -2
  55. package/dist/entries/media/imageTransform.js +40 -0
  56. package/dist/entries/metrics/prometheus.js +2 -2
  57. package/dist/entries/openapi/generator.js +2 -2
  58. package/dist/entries/queue/createAppQueue.js +4 -4
  59. package/dist/entries/queue/publicQueue.js +10 -10
  60. package/dist/entries/queue/queueMetrics.js +2 -2
  61. package/dist/entries/queue/redisQueue.js +7 -7
  62. package/dist/entries/queue.js +3 -3
  63. package/dist/entries/scheduler/osCron.js +27 -0
  64. package/dist/entries/scheduler/schedule.js +2 -2
  65. package/dist/entries/security/oauthState.js +3 -3
  66. package/dist/entries/security/publicReads.js +2 -2
  67. package/dist/entries/security/safeFetch.js +2 -2
  68. package/dist/entries/security/safeUrl.js +5 -5
  69. package/dist/entries/security/scimTenantTokens.js +2 -2
  70. package/dist/entries/security/totp.js +2 -2
  71. package/dist/entries/storage/storage.js +7 -7
  72. package/dist/entries/tenant/tenantDatabaseScope.js +2 -2
  73. package/dist/entries/terminal/runShell.js +18 -0
  74. package/dist/entries/validation/rules.js +12 -12
  75. package/dist/entries/view.js +186 -98
  76. package/dist/index.js +431 -469
  77. package/package.json +17 -2
package/README.md CHANGED
@@ -26,6 +26,8 @@ import { storage } from "@getstrata/core/facades";
26
26
  import { EtaViewEngine } from "@getstrata/core/view";
27
27
  ```
28
28
 
29
+ `.eta` files are **HTML + Eta tags** (`<% %>`, `<%= %>`, `<%~ include() %>`), not Pug. Class/attribute shorthand such as `section.section` or `a href=` fails at render time with the template name.
30
+
29
31
  **Dependency:** `eta` is bundled as a direct dependency of `@getstrata/core`. Apps do not need to list it separately. The database driver is your app's choice. WorkHub and getstrata use **Bun's built-in `Bun.sql`** client; bind it with `bindDatabaseConnection()`.
30
32
 
31
33
  `orderBy` accepts explicit `{ column, direction }` objects or column shorthand such as `{ published_at: "desc" }`.
@@ -0,0 +1,13 @@
1
+ declare const IMAGE_MIME_TYPES: Set<string>;
2
+ declare function normalizeMimeType(mimeType: string): string;
3
+ declare function isImageMimeType(mimeType: string): boolean;
4
+ declare function parseThumbnailWidth(raw: string | null | undefined, options?: {
5
+ defaultWidth?: number;
6
+ minWidth?: number;
7
+ maxWidth?: number;
8
+ }): number;
9
+ declare function resizeImageContents(contents: Uint8Array, width: number, mimeType: string): Promise<{
10
+ body: Uint8Array;
11
+ contentType: string;
12
+ }>;
13
+ export { IMAGE_MIME_TYPES, isImageMimeType, normalizeMimeType, parseThumbnailWidth, resizeImageContents, };
@@ -0,0 +1,14 @@
1
+ declare const DEFAULT_SCHEDULE_RUN_EXPRESSION = "* * * * *";
2
+ declare const OS_CRON_JOB_TITLE = "getstrata-schedule-run";
3
+ interface InProcessCronJob {
4
+ readonly cron: string;
5
+ stop(): InProcessCronJob;
6
+ ref(): InProcessCronJob;
7
+ unref(): InProcessCronJob;
8
+ }
9
+ declare function parseScheduleExpression(expression: string, from?: Date): Date | null;
10
+ declare function registerInProcessScheduleRunner(run: () => void | Promise<void>, expression?: string): InProcessCronJob;
11
+ declare function installOsScheduleRunner(workerScriptPath: string, expression?: string, title?: string): Promise<void>;
12
+ declare function uninstallOsScheduleRunner(title?: string): Promise<void>;
13
+ export type { InProcessCronJob };
14
+ export { DEFAULT_SCHEDULE_RUN_EXPRESSION, installOsScheduleRunner, OS_CRON_JOB_TITLE, parseScheduleExpression, registerInProcessScheduleRunner, uninstallOsScheduleRunner, };
@@ -0,0 +1,6 @@
1
+ declare function runInteractiveShell(command: string[], options?: {
2
+ cwd?: string;
3
+ cols?: number;
4
+ rows?: number;
5
+ }): Promise<number>;
6
+ export { runInteractiveShell };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Throws when an .eta source still uses Pug shorthand instead of HTML + Eta tags.
3
+ */
4
+ declare function assertEtaHtmlSource(templateName: string, source: string): void;
5
+ export { assertEtaHtmlSource };
@@ -5,6 +5,10 @@ interface RenderOptions {
5
5
  layout?: string | false;
6
6
  }
7
7
  type LayoutDataResolver = () => Promise<Record<string, unknown>>;
8
+ /**
9
+ * Renders `.eta` files as HTML + Eta tags (`<% %>`, `<%= %>`, `<%~ include() %>`).
10
+ * Pug class/attribute shorthand is rejected at render time.
11
+ */
8
12
  declare class EtaViewEngine implements ViewEngine {
9
13
  private readonly eta;
10
14
  private readonly resolveLayoutData?;
@@ -262,6 +262,6 @@ async function exportPendingAuditLogs() {
262
262
  });
263
263
  }
264
264
  export {
265
- resolveAuditExportConfig,
266
- exportPendingAuditLogs
265
+ exportPendingAuditLogs,
266
+ resolveAuditExportConfig
267
267
  };
@@ -32,6 +32,6 @@ function formatCefLine(event) {
32
32
  return `CEF:0|WorkHub|API|1.0|${event.action}|${event.subject_type}|5|${extension}`;
33
33
  }
34
34
  export {
35
- formatSiemAuditEvent,
36
- formatCefLine
35
+ formatCefLine,
36
+ formatSiemAuditEvent
37
37
  };
@@ -52,9 +52,9 @@ function resolveUserId(user) {
52
52
  return userId;
53
53
  }
54
54
  export {
55
- resolveUserId,
56
- requireAuthenticatedUser,
57
- isGlobalAdmin,
55
+ ROLE_RANK,
58
56
  hasMinimumOrgRole,
59
- ROLE_RANK
57
+ isGlobalAdmin,
58
+ requireAuthenticatedUser,
59
+ resolveUserId
60
60
  };
@@ -326,11 +326,11 @@ function assertOrganizationReadable(organizationId) {
326
326
  }
327
327
  }
328
328
  export {
329
- scopedOrganizationIds,
330
- resolveOrganizationScope,
331
- emptyPaginateResult,
332
- assertResourceInCurrentTenant,
333
- assertOrganizationReadable,
329
+ appendOrganizationScope,
334
330
  appendProjectScope,
335
- appendOrganizationScope
331
+ assertOrganizationReadable,
332
+ assertResourceInCurrentTenant,
333
+ emptyPaginateResult,
334
+ resolveOrganizationScope,
335
+ scopedOrganizationIds
336
336
  };
@@ -66,6 +66,6 @@ class MockOAuthProvider {
66
66
  }
67
67
  }
68
68
  export {
69
- MockOAuthProvider,
70
- GitHubOAuthProvider
69
+ GitHubOAuthProvider,
70
+ MockOAuthProvider
71
71
  };
@@ -10,6 +10,6 @@ async function verifyPassword(password, passwordHash) {
10
10
  return await Bun.password.verify(password, passwordHash);
11
11
  }
12
12
  export {
13
- verifyPassword,
14
- hashPassword
13
+ hashPassword,
14
+ verifyPassword
15
15
  };
@@ -76,6 +76,6 @@ class PolicyGate {
76
76
  }
77
77
  }
78
78
  export {
79
- PolicyGate,
80
- Policy
79
+ Policy,
80
+ PolicyGate
81
81
  };
@@ -67,9 +67,9 @@ function clearSessionCookie() {
67
67
  return `${SESSION_COOKIE}=; Path=/; HttpOnly; SameSite=Lax; Max-Age=0${secure}`;
68
68
  }
69
69
  export {
70
- readSessionUserId,
71
- createSessionCookie,
72
- clearSessionCookie,
70
+ SESSION_COOKIE,
73
71
  SESSION_TTL_SECONDS,
74
- SESSION_COOKIE
72
+ clearSessionCookie,
73
+ createSessionCookie,
74
+ readSessionUserId
75
75
  };
@@ -227,97 +227,6 @@ import { logSecurityEvent } from "@getstrata/core/security/securityEvents";
227
227
  import { resolveDefaultTokenExpiryDays } from "@getstrata/core/security/tokenExpiry";
228
228
  import { verifyTotp } from "@getstrata/core/security/totp";
229
229
  import { currentTenantId } from "@getstrata/core/tenant/tenantContext";
230
- class AuthService {
231
- users;
232
- tokens;
233
- oauthIdentities;
234
- oauthProviders = new Map;
235
- constructor(users, tokens, oauthIdentities) {
236
- this.users = users;
237
- this.tokens = tokens;
238
- this.oauthIdentities = oauthIdentities;
239
- }
240
- registerOAuthProvider(provider) {
241
- this.oauthProviders.set(provider.name, provider);
242
- }
243
- getOAuthProvider(name) {
244
- return this.oauthProviders.get(name);
245
- }
246
- async loginWithPassword(email, password, options = {}) {
247
- const user = await this.users.findByEmail(email);
248
- if (!user?.password_hash) {
249
- logSecurityEvent("auth_login_failed", { reason: "unknown_user", email });
250
- throw new UnauthorizedError("Invalid credentials.");
251
- }
252
- const valid = await verifyPassword(password, user.password_hash);
253
- if (!valid) {
254
- logSecurityEvent("auth_login_failed", { reason: "invalid_password", user_id: user.id });
255
- throw new UnauthorizedError("Invalid credentials.");
256
- }
257
- if (isFeatureEnabled("emailVerification") && !user.email_verified_at) {
258
- logSecurityEvent("auth_login_blocked", { reason: "email_unverified", user_id: user.id });
259
- throw new UnauthorizedError("Email address is not verified.");
260
- }
261
- if (isFeatureEnabled("mfa") && user.mfa_enabled) {
262
- const mfaSecret = revealMfaSecret(user.mfa_secret);
263
- if (!mfaSecret || !options.mfaCode || !verifyTotp(mfaSecret, options.mfaCode)) {
264
- logSecurityEvent("auth_login_failed", { reason: "invalid_mfa", user_id: user.id });
265
- throw new UnauthorizedError("Invalid MFA code.");
266
- }
267
- }
268
- logSecurityEvent("auth_login_success", { user_id: user.id, method: "password" });
269
- return await this.tokens.createToken(user.id, {
270
- name: "password-login",
271
- abilities: resolveAbilitiesForRole(user.role),
272
- expiresInDays: resolveDefaultTokenExpiryDays() ?? undefined
273
- });
274
- }
275
- async loginWithOAuth(providerName, code) {
276
- const provider = this.oauthProviders.get(providerName);
277
- if (!provider) {
278
- throw new UnauthorizedError("Unsupported OAuth provider.");
279
- }
280
- const profile = await provider.exchangeCode(code);
281
- const user = await this.findOrCreateOAuthUser(providerName, profile);
282
- logSecurityEvent("auth_login_success", { user_id: user.id, method: `oauth:${providerName}` });
283
- return await this.tokens.createToken(user.id, {
284
- name: `${providerName}-oauth`,
285
- abilities: resolveAbilitiesForRole(user.role),
286
- expiresInDays: resolveDefaultTokenExpiryDays() ?? undefined
287
- });
288
- }
289
- buildOAuthAuthorizationUrl(providerName, state) {
290
- const provider = this.oauthProviders.get(providerName);
291
- if (!provider) {
292
- throw new UnauthorizedError("Unsupported OAuth provider.");
293
- }
294
- return provider.getAuthorizationUrl(state);
295
- }
296
- async findOrCreateOAuthUser(providerName, profile) {
297
- const existingIdentity = await this.oauthIdentities.findByProviderUser(providerName, profile.providerUserId);
298
- if (existingIdentity) {
299
- return await this.users.findByIdOrThrow(existingIdentity.user_id);
300
- }
301
- const existingUser = await this.users.findByEmail(profile.email);
302
- const user = existingUser ?? await this.users.create({
303
- name: profile.name,
304
- email: profile.email,
305
- role: "member",
306
- tenant_id: currentTenantId(),
307
- email_verified_at: new Date,
308
- created_at: new Date,
309
- updated_at: new Date
310
- });
311
- await this.oauthIdentities.create({
312
- user_id: user.id,
313
- provider: providerName,
314
- provider_user_id: profile.providerUserId,
315
- email: profile.email,
316
- created_at: new Date
317
- });
318
- return user;
319
- }
320
- }
321
230
 
322
231
  // ../../src/modules/user/notificationRepository.ts
323
232
  import { BaseRepository as BaseRepository2 } from "@getstrata/core/database/baseRepository";
@@ -12,6 +12,6 @@ function hashApiToken(token) {
12
12
  return createHash("sha256").update(token).digest("hex");
13
13
  }
14
14
  export {
15
- resolveTokenPepper,
16
- hashApiToken
15
+ hashApiToken,
16
+ resolveTokenPepper
17
17
  };
@@ -30,6 +30,6 @@ function validateEnv(schema, env = process.env) {
30
30
  return resolved;
31
31
  }
32
32
  export {
33
- validateEnv,
34
- defineEnvSchema
33
+ defineEnvSchema,
34
+ validateEnv
35
35
  };
@@ -64,6 +64,6 @@ class ConfigStore {
64
64
  }
65
65
  }
66
66
  export {
67
- ServiceContainer,
68
- ConfigStore
67
+ ConfigStore,
68
+ ServiceContainer
69
69
  };
@@ -21,7 +21,7 @@ function resolveService(dependencies, token) {
21
21
  return dependencies.container.resolve(token);
22
22
  }
23
23
  export {
24
- resolveService,
24
+ assertAppDependenciesComplete,
25
25
  getRequiredDependency,
26
- assertAppDependenciesComplete
26
+ resolveService
27
27
  };
@@ -8,11 +8,11 @@ var CORE_POLICY_GATE_TOKEN = "core.policyGate";
8
8
  var CORE_AUTH_TOKEN = "core.auth";
9
9
  var CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
10
10
  export {
11
- CORE_TOKEN_SERVICE_TOKEN,
12
- CORE_QUEUE_TOKEN,
13
- CORE_POLICY_GATE_TOKEN,
14
- CORE_EVENT_BUS_TOKEN,
15
- CORE_CONFIG_TOKEN,
11
+ CORE_AUTH_TOKEN,
16
12
  CORE_CACHE_TOKEN,
17
- CORE_AUTH_TOKEN
13
+ CORE_CONFIG_TOKEN,
14
+ CORE_EVENT_BUS_TOKEN,
15
+ CORE_POLICY_GATE_TOKEN,
16
+ CORE_QUEUE_TOKEN,
17
+ CORE_TOKEN_SERVICE_TOKEN
18
18
  };
@@ -81,13 +81,13 @@ function emailLookupForQuery(email) {
81
81
  return hashLookupValue(normalized, key);
82
82
  }
83
83
  export {
84
- revealEmail,
85
- resolveEncryptionKey,
86
- protectEmail,
87
- normalizeEmail,
88
- isFieldEncryptionEnabled,
89
- hashLookupValue,
90
- encryptField,
84
+ decryptField,
91
85
  emailLookupForQuery,
92
- decryptField
86
+ encryptField,
87
+ hashLookupValue,
88
+ isFieldEncryptionEnabled,
89
+ normalizeEmail,
90
+ protectEmail,
91
+ resolveEncryptionKey,
92
+ revealEmail
93
93
  };
@@ -100,6 +100,6 @@ function revealMfaSecret(stored) {
100
100
  return decryptField(stored, key);
101
101
  }
102
102
  export {
103
- revealMfaSecret,
104
- protectMfaSecret
103
+ protectMfaSecret,
104
+ revealMfaSecret
105
105
  };
@@ -62,7 +62,7 @@ async function withDatabaseErrorHandling(operation) {
62
62
  }
63
63
  }
64
64
  export {
65
- withDatabaseErrorHandling,
65
+ isPostgresError,
66
66
  mapDatabaseError,
67
- isPostgresError
67
+ withDatabaseErrorHandling
68
68
  };
@@ -115,13 +115,13 @@ async function freshDatabase(db, migrations, options = {}) {
115
115
  await runFresh();
116
116
  }
117
117
  export {
118
- withMigrationLock,
119
- runPendingMigrations,
120
- rollbackDatabase,
121
- migrateDatabase,
122
- loadMigrationsFromDirectory,
123
- getMigrationStatus,
124
- getAppliedMigrations,
118
+ ensureMigrationsTable,
125
119
  freshDatabase,
126
- ensureMigrationsTable
120
+ getAppliedMigrations,
121
+ getMigrationStatus,
122
+ loadMigrationsFromDirectory,
123
+ migrateDatabase,
124
+ rollbackDatabase,
125
+ runPendingMigrations,
126
+ withMigrationLock
127
127
  };
@@ -876,10 +876,10 @@ function registerModelRepository(model, repository) {
876
876
  return model;
877
877
  }
878
878
  export {
879
- registerModelRepository,
880
- hydrateValue,
881
- filterMassAssignable,
882
- dehydrateValue,
879
+ Model,
883
880
  applyCasts,
884
- Model
881
+ dehydrateValue,
882
+ filterMassAssignable,
883
+ hydrateValue,
884
+ registerModelRepository
885
885
  };
@@ -413,24 +413,24 @@ function buildDeleteByIdQuery(table, id) {
413
413
  };
414
414
  }
415
415
  export {
416
- resolveSoftDeleteColumn,
417
- resolveQualifiedColumn,
418
- quoteIdentifier,
419
- qualifyColumn,
420
- parseQualifiedColumn,
421
- buildWhereClause,
422
- buildUpdateQuery,
423
- buildSoftDeleteByIdQuery,
424
- buildSelectQuery,
425
- buildRestoreByIdQuery,
426
- buildQueryWhereClause,
427
- buildProjectionQuery,
428
- buildOrderByClause,
429
- buildJoinClause,
430
- buildInsertQuery,
431
- buildGroupedCountQuery,
432
- buildDeleteByIdQuery,
433
- buildCountQuery,
416
+ assertSafeProjectionExpression,
434
417
  buildAdvancedWhereClause,
435
- assertSafeProjectionExpression
418
+ buildCountQuery,
419
+ buildDeleteByIdQuery,
420
+ buildGroupedCountQuery,
421
+ buildInsertQuery,
422
+ buildJoinClause,
423
+ buildOrderByClause,
424
+ buildProjectionQuery,
425
+ buildQueryWhereClause,
426
+ buildRestoreByIdQuery,
427
+ buildSelectQuery,
428
+ buildSoftDeleteByIdQuery,
429
+ buildUpdateQuery,
430
+ buildWhereClause,
431
+ parseQualifiedColumn,
432
+ qualifyColumn,
433
+ quoteIdentifier,
434
+ resolveQualifiedColumn,
435
+ resolveSoftDeleteColumn
436
436
  };
@@ -145,18 +145,18 @@ function indexMorphToRelation(children, parentsByType, relation) {
145
145
  return result;
146
146
  }
147
147
  export {
148
- morphTo,
149
- morphOne,
150
- morphMany,
151
- indexMorphToRelation,
152
- indexMorphOneRelation,
153
- indexMorphManyRelation,
154
- indexHasOneRelation,
155
- indexHasManyRelation,
156
- indexBelongsToRelation,
157
- indexBelongsToManyRelation,
158
- hasOne,
159
- hasMany,
148
+ belongsTo,
160
149
  belongsToMany,
161
- belongsTo
150
+ hasMany,
151
+ hasOne,
152
+ indexBelongsToManyRelation,
153
+ indexBelongsToRelation,
154
+ indexHasManyRelation,
155
+ indexHasOneRelation,
156
+ indexMorphManyRelation,
157
+ indexMorphOneRelation,
158
+ indexMorphToRelation,
159
+ morphMany,
160
+ morphOne,
161
+ morphTo
162
162
  };
@@ -1037,18 +1037,18 @@ function createSchemaBuilder(db, driver) {
1037
1037
  });
1038
1038
  }
1039
1039
  export {
1040
- resolveDatabaseDriver,
1041
- inferReferencedTable,
1042
- grammarForDriver,
1043
- createSchemaBuilder,
1044
- compileBlueprint,
1045
- UnsupportedSchemaFeatureError,
1046
- SqliteGrammar,
1047
- SchemaBuilder,
1048
- Schema,
1049
- PostgresGrammar,
1050
- MySqlGrammar,
1051
- ForeignIdColumnDefinition,
1040
+ Blueprint,
1052
1041
  ColumnDefinition,
1053
- Blueprint
1042
+ ForeignIdColumnDefinition,
1043
+ MySqlGrammar,
1044
+ PostgresGrammar,
1045
+ Schema,
1046
+ SchemaBuilder,
1047
+ SqliteGrammar,
1048
+ UnsupportedSchemaFeatureError,
1049
+ compileBlueprint,
1050
+ createSchemaBuilder,
1051
+ grammarForDriver,
1052
+ inferReferencedTable,
1053
+ resolveDatabaseDriver
1054
1054
  };
@@ -25,6 +25,6 @@ async function runSeedersFromDirectory(directory, db, options) {
25
25
  return seeders.length;
26
26
  }
27
27
  export {
28
- runSeedersFromDirectory,
29
- loadSeedersFromDirectory
28
+ loadSeedersFromDirectory,
29
+ runSeedersFromDirectory
30
30
  };
@@ -366,13 +366,13 @@ function storageFacade() {
366
366
  return storage();
367
367
  }
368
368
  export {
369
- storageFacade as storage,
370
- queue,
371
- policyGate,
372
- mail,
373
- log,
374
- events,
375
- config,
369
+ auth,
376
370
  cache,
377
- auth
371
+ config,
372
+ events,
373
+ log,
374
+ mail,
375
+ policyGate,
376
+ queue,
377
+ storageFacade as storage
378
378
  };
@@ -20,6 +20,6 @@ function createAuthMiddleware(auth) {
20
20
  };
21
21
  }
22
22
  export {
23
- createAuthMiddleware,
24
- authContext
23
+ authContext,
24
+ createAuthMiddleware
25
25
  };
@@ -27,6 +27,6 @@ function createBodySizeLimitMiddleware(maxBytes = resolveMaxBodyBytes()) {
27
27
  };
28
28
  }
29
29
  export {
30
- resolveMaxBodyBytes,
31
- createBodySizeLimitMiddleware
30
+ createBodySizeLimitMiddleware,
31
+ resolveMaxBodyBytes
32
32
  };
@@ -27,6 +27,6 @@ function readBunRequestCookie(request, name) {
27
27
  return request.cookies.get(name) ?? readRequestCookie(request, name);
28
28
  }
29
29
  export {
30
- readRequestCookie,
31
- readBunRequestCookie
30
+ readBunRequestCookie,
31
+ readRequestCookie
32
32
  };
@@ -18,6 +18,6 @@ function createCsrfProtection(secret, options = {}) {
18
18
  };
19
19
  }
20
20
  export {
21
- createCsrfProtection,
22
- DEFAULT_CSRF_TTL_MS
21
+ DEFAULT_CSRF_TTL_MS,
22
+ createCsrfProtection
23
23
  };
@@ -134,11 +134,11 @@ function resolveCsrfTokenForRequest(request) {
134
134
  return resolveCsrfToken(request).token;
135
135
  }
136
136
  export {
137
- verifyCsrfToken,
138
- resolveCsrfTokenForRequest,
139
- resolveCsrfToken,
140
- readSubmittedCsrfTokenFromBody,
141
- readSubmittedCsrfToken,
137
+ CSRF_COOKIE,
142
138
  createCsrfTokenCookie,
143
- CSRF_COOKIE
139
+ readSubmittedCsrfToken,
140
+ readSubmittedCsrfTokenFromBody,
141
+ resolveCsrfToken,
142
+ resolveCsrfTokenForRequest,
143
+ verifyCsrfToken
144
144
  };
@@ -97,13 +97,13 @@ function applyConditionalGet(request, response, etag) {
97
97
  });
98
98
  }
99
99
  export {
100
- notModifiedResponse,
101
- isEtagEnabled,
102
- ifNoneMatchSatisfied,
103
- ifMatchSatisfied,
104
- etagValuesMatch,
105
- etagFromResource,
106
- computeEtagFromJson,
100
+ applyConditionalGet,
107
101
  assertIfMatch,
108
- applyConditionalGet
102
+ computeEtagFromJson,
103
+ etagFromResource,
104
+ etagValuesMatch,
105
+ ifMatchSatisfied,
106
+ ifNoneMatchSatisfied,
107
+ isEtagEnabled,
108
+ notModifiedResponse
109
109
  };
@@ -98,9 +98,9 @@ function withFlashClear(response) {
98
98
  });
99
99
  }
100
100
  export {
101
- withFlashClear,
102
- pullFlash,
103
- flashResponse,
101
+ clearFlashCookie,
104
102
  createFlashCookie,
105
- clearFlashCookie
103
+ flashResponse,
104
+ pullFlash,
105
+ withFlashClear
106
106
  };
@@ -150,6 +150,6 @@ class QueryFormRequest {
150
150
  }
151
151
  }
152
152
  export {
153
- QueryFormRequest,
154
- FormRequest
153
+ FormRequest,
154
+ QueryFormRequest
155
155
  };
@@ -41,6 +41,6 @@ function createLoginThrottleMiddleware(options) {
41
41
  };
42
42
  }
43
43
  export {
44
- resolveLoginIdentity,
45
- createLoginThrottleMiddleware
44
+ createLoginThrottleMiddleware,
45
+ resolveLoginIdentity
46
46
  };