@getstrata/bootstrap 0.2.22 → 0.2.23
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/dist/bootstrap/applicationRegistry.d.ts +1 -1
- package/dist/bootstrap/buildModuleRoutes.d.ts +10 -0
- package/dist/bootstrap/config.d.ts +1 -1
- package/dist/bootstrap/contracts.d.ts +4 -4
- package/dist/bootstrap/public-api.d.ts +2 -0
- package/dist/entries/applicationRegistry.js +12 -115
- package/dist/entries/buildModuleRoutes.js +626 -0
- package/dist/entries/config.js +9 -9
- package/dist/entries/context.js +114 -178
- package/dist/entries/contracts.js +10 -85
- package/dist/entries/createWebRoutes.js +9 -9
- package/dist/entries/dependencies.js +114 -178
- package/dist/entries/http/securedRouteModelBinding.js +4 -34
- package/dist/entries/httpKernel.js +9 -9
- package/dist/entries/membershipService.js +0 -34
- package/dist/entries/providers/view.js +9 -9
- package/dist/entries/providers.js +104 -115
- package/dist/entries/queue/defaultJobs.js +0 -34
- package/dist/entries/web/routing.js +20 -41
- package/dist/index.js +1670 -1659
- package/package.json +9 -4
- package/dist/cli/commands/scheduleRun.d.ts +0 -3
- package/dist/config/app.d.ts +0 -10
- package/dist/config/auth.d.ts +0 -7
- package/dist/config/contentSecurityPolicy.d.ts +0 -5
- package/dist/config/cors.d.ts +0 -9
- package/dist/config/database.d.ts +0 -10
- package/dist/config/features.d.ts +0 -18
- package/dist/config/frontend.d.ts +0 -6
- package/dist/config/queue.d.ts +0 -8
- package/dist/config/rateLimit.d.ts +0 -10
- package/dist/config/uploads.d.ts +0 -5
- package/dist/core/admin/formatValue.d.ts +0 -3
- package/dist/core/admin/index.d.ts +0 -3
- package/dist/core/admin/registry.d.ts +0 -11
- package/dist/core/admin/types.d.ts +0 -24
- package/dist/core/audit/exportAuditLogs.d.ts +0 -8
- package/dist/core/audit/siemFormatter.d.ts +0 -30
- package/dist/core/auth/abilityChecker.d.ts +0 -6
- package/dist/core/auth/accessControl.d.ts +0 -8
- package/dist/core/auth/authContext.d.ts +0 -11
- package/dist/core/auth/guard.d.ts +0 -36
- package/dist/core/auth/membershipContext.d.ts +0 -15
- package/dist/core/auth/membershipContextMiddleware.d.ts +0 -3
- package/dist/core/auth/membershipMiddleware.d.ts +0 -2
- package/dist/core/auth/membershipScope.d.ts +0 -16
- package/dist/core/auth/membershipService.d.ts +0 -23
- package/dist/core/auth/oauth/oidcProvider.d.ts +0 -18
- package/dist/core/auth/oauth/providers.d.ts +0 -22
- package/dist/core/auth/oauth/samlProvider.d.ts +0 -9
- package/dist/core/auth/oauth/types.d.ts +0 -11
- package/dist/core/auth/password.d.ts +0 -3
- package/dist/core/auth/policy.d.ts +0 -15
- package/dist/core/auth/resolveMembershipService.d.ts +0 -3
- package/dist/core/auth/scimAuthMiddleware.d.ts +0 -3
- package/dist/core/auth/sessionCookie.d.ts +0 -6
- package/dist/core/auth/sessionGuard.d.ts +0 -9
- package/dist/core/auth/tokenHash.d.ts +0 -3
- package/dist/core/cache/createCacheStore.d.ts +0 -11
- package/dist/core/cache/redisCacheStore.d.ts +0 -23
- package/dist/core/cache/repository.d.ts +0 -17
- package/dist/core/cache/simpleCache.d.ts +0 -23
- package/dist/core/cache/simpleCacheStore.d.ts +0 -16
- package/dist/core/cache/store.d.ts +0 -12
- package/dist/core/cache/taggedCache.d.ts +0 -9
- package/dist/core/cache/tags.d.ts +0 -11
- package/dist/core/config/envSchema.d.ts +0 -12
- package/dist/core/contracts/container.d.ts +0 -30
- package/dist/core/contracts/di.d.ts +0 -31
- package/dist/core/contracts/serviceContainer.d.ts +0 -1
- package/dist/core/contracts/serviceTokens.d.ts +0 -8
- package/dist/core/crypto/fieldEncryption.d.ts +0 -13
- package/dist/core/crypto/mfaSecret.d.ts +0 -3
- package/dist/core/crypto/nonCryptographicHash.d.ts +0 -2
- package/dist/core/database/baseRepository.d.ts +0 -67
- package/dist/core/database/bindConnection.d.ts +0 -3
- package/dist/core/database/boundConnection.d.ts +0 -5
- package/dist/core/database/connection.d.ts +0 -7
- package/dist/core/database/connectionContext.d.ts +0 -8
- package/dist/core/database/defaultConnection.d.ts +0 -6
- package/dist/core/database/errors.d.ts +0 -12
- package/dist/core/database/index.d.ts +0 -18
- package/dist/core/database/migrations/advisoryLock.d.ts +0 -6
- package/dist/core/database/migrations/runner.d.ts +0 -25
- package/dist/core/database/migrations/types.d.ts +0 -15
- package/dist/core/database/model.d.ts +0 -57
- package/dist/core/database/query.d.ts +0 -63
- package/dist/core/database/queryProxy.d.ts +0 -3
- package/dist/core/database/relationships.d.ts +0 -100
- package/dist/core/database/repositoryConnection.d.ts +0 -4
- package/dist/core/database/repositoryQuery.d.ts +0 -38
- package/dist/core/database/schema/blueprint.d.ts +0 -47
- package/dist/core/database/schema/columnDefinition.d.ts +0 -36
- package/dist/core/database/schema/driver.d.ts +0 -8
- package/dist/core/database/schema/errors.d.ts +0 -4
- package/dist/core/database/schema/grammars/compileStatements.d.ts +0 -8
- package/dist/core/database/schema/grammars/createGrammar.d.ts +0 -4
- package/dist/core/database/schema/grammars/grammar.d.ts +0 -10
- package/dist/core/database/schema/grammars/index.d.ts +0 -7
- package/dist/core/database/schema/grammars/mysqlGrammar.d.ts +0 -2
- package/dist/core/database/schema/grammars/postgresGrammar.d.ts +0 -2
- package/dist/core/database/schema/grammars/sqliteGrammar.d.ts +0 -2
- package/dist/core/database/schema/index.d.ts +0 -12
- package/dist/core/database/schema/schema.d.ts +0 -21
- package/dist/core/database/seeders/runner.d.ts +0 -6
- package/dist/core/database/seeders/types.d.ts +0 -8
- package/dist/core/database/table.d.ts +0 -13
- package/dist/core/database/transaction.d.ts +0 -3
- package/dist/core/database/types.d.ts +0 -66
- package/dist/core/database/whereBuilder.d.ts +0 -17
- package/dist/core/errors/http.d.ts +0 -33
- package/dist/core/events/eventBus.d.ts +0 -10
- package/dist/core/events/index.d.ts +0 -4
- package/dist/core/facades/index.d.ts +0 -10
- package/dist/core/http/authMiddleware.d.ts +0 -5
- package/dist/core/http/authorizeMiddleware.d.ts +0 -5
- package/dist/core/http/bodySizeLimitMiddleware.d.ts +0 -4
- package/dist/core/http/conditionalResponse.d.ts +0 -2
- package/dist/core/http/contentNegotiation.d.ts +0 -2
- package/dist/core/http/cookies.d.ts +0 -4
- package/dist/core/http/corsMiddleware.d.ts +0 -3
- package/dist/core/http/csrfMiddleware.d.ts +0 -3
- package/dist/core/http/csrfProtection.d.ts +0 -12
- package/dist/core/http/csrfToken.d.ts +0 -14
- package/dist/core/http/etag.d.ts +0 -18
- package/dist/core/http/flashMiddleware.d.ts +0 -3
- package/dist/core/http/flashSession.d.ts +0 -12
- package/dist/core/http/formRequest.d.ts +0 -10
- package/dist/core/http/index.d.ts +0 -27
- package/dist/core/http/loginThrottleMiddleware.d.ts +0 -11
- package/dist/core/http/memoryThrottleMiddleware.d.ts +0 -9
- package/dist/core/http/metricsMiddleware.d.ts +0 -4
- package/dist/core/http/middleware.d.ts +0 -8
- package/dist/core/http/pagination.d.ts +0 -11
- package/dist/core/http/parseFormBody.d.ts +0 -6
- package/dist/core/http/parseMultipartUpload.d.ts +0 -10
- package/dist/core/http/requestMetaContext.d.ts +0 -15
- package/dist/core/http/requireAbilityMiddleware.d.ts +0 -4
- package/dist/core/http/requireAuthMiddleware.d.ts +0 -4
- package/dist/core/http/requireGlobalAdminMiddleware.d.ts +0 -3
- package/dist/core/http/requireWebAuthMiddleware.d.ts +0 -4
- package/dist/core/http/resources.d.ts +0 -7
- package/dist/core/http/route.d.ts +0 -6
- package/dist/core/http/routeMiddleware.d.ts +0 -3
- package/dist/core/http/routeModelBinding.d.ts +0 -3
- package/dist/core/http/scimThrottleMiddleware.d.ts +0 -9
- package/dist/core/http/securedRouteModelBinding.d.ts +0 -11
- package/dist/core/http/securityHeadersMiddleware.d.ts +0 -3
- package/dist/core/http/throttleMiddleware.d.ts +0 -11
- package/dist/core/http/validation.d.ts +0 -23
- package/dist/core/http/webErrorResponse.d.ts +0 -5
- package/dist/core/http/webFormRequest.d.ts +0 -7
- package/dist/core/jobs/dispatchWebhookJob.d.ts +0 -13
- package/dist/core/jobs/invalidateCacheTagsJob.d.ts +0 -12
- package/dist/core/lifecycle/gracefulShutdown.d.ts +0 -6
- package/dist/core/logging/logger.d.ts +0 -17
- package/dist/core/logging/requestLoggingMiddleware.d.ts +0 -3
- package/dist/core/mail/mailer.d.ts +0 -38
- package/dist/core/mail/markdownMail.d.ts +0 -15
- package/dist/core/mail/markdownMailable.d.ts +0 -12
- package/dist/core/metrics/prometheus.d.ts +0 -26
- package/dist/core/notifications/dispatcher.d.ts +0 -13
- package/dist/core/notifications/index.d.ts +0 -3
- package/dist/core/notifications/notification.d.ts +0 -7
- package/dist/core/notifications/types.d.ts +0 -25
- package/dist/core/openapi/registeredRoute.d.ts +0 -6
- package/dist/core/pagination/index.d.ts +0 -27
- package/dist/core/queue/createAppQueue.d.ts +0 -5
- package/dist/core/queue/failedJobRepository.d.ts +0 -6
- package/dist/core/queue/failedJobService.d.ts +0 -16
- package/dist/core/queue/failedJobTable.d.ts +0 -3
- package/dist/core/queue/index.d.ts +0 -19
- package/dist/core/queue/jobRegistry.d.ts +0 -13
- package/dist/core/queue/jobRunner.d.ts +0 -9
- package/dist/core/queue/publicQueue.d.ts +0 -16
- package/dist/core/queue/queueMetrics.d.ts +0 -15
- package/dist/core/queue/redisQueue.d.ts +0 -29
- package/dist/core/queue/resilientQueue.d.ts +0 -9
- package/dist/core/queue/types.d.ts +0 -8
- package/dist/core/runtime/applicationRegistry.d.ts +0 -17
- package/dist/core/runtime/asyncContextStore.d.ts +0 -3
- package/dist/core/scheduler/schedule.d.ts +0 -15
- package/dist/core/security/publicReads.d.ts +0 -3
- package/dist/core/security/safeFetch.d.ts +0 -10
- package/dist/core/security/safeUrl.d.ts +0 -20
- package/dist/core/security/scimTenantTokens.d.ts +0 -3
- package/dist/core/security/securityEvents.d.ts +0 -6
- package/dist/core/security/timingSafeCompare.d.ts +0 -2
- package/dist/core/security/tokenExpiry.d.ts +0 -2
- package/dist/core/security/totp.d.ts +0 -3
- package/dist/core/storage/storage.d.ts +0 -44
- package/dist/core/tenant/databaseTenantContext.d.ts +0 -2
- package/dist/core/tenant/resolveTenant.d.ts +0 -3
- package/dist/core/tenant/tenantContext.d.ts +0 -13
- package/dist/core/tenant/tenantDatabaseScope.d.ts +0 -8
- package/dist/core/tenant/tenantMiddleware.d.ts +0 -6
- package/dist/core/tracing/otel.d.ts +0 -26
- package/dist/core/tracing/traceContext.d.ts +0 -9
- package/dist/core/tracing/tracingMiddleware.d.ts +0 -3
- package/dist/core/validation/rules.d.ts +0 -17
- package/dist/core/view/etaViewEngine.d.ts +0 -15
- package/dist/core/view/htmlResponse.d.ts +0 -6
- package/dist/core/view/index.d.ts +0 -5
- package/dist/core/view/viewEngine.d.ts +0 -6
- package/dist/core/view/webLayoutData.d.ts +0 -17
- package/dist/db/connection/createConnection.d.ts +0 -6
- package/dist/db/connection/index.d.ts +0 -11
- package/dist/domain/abilities.d.ts +0 -5
- package/dist/domain/auth.d.ts +0 -4
- package/dist/domain/scim.d.ts +0 -9
- package/dist/domain/workhub.d.ts +0 -35
- package/dist/framework/public-api.d.ts +0 -116
- package/dist/modules/organization/memberRepository.d.ts +0 -14
- package/dist/modules/organization/memberTypes.d.ts +0 -9
- package/dist/modules/organization/repository.d.ts +0 -14
- package/dist/modules/organization/table.d.ts +0 -3
- package/dist/modules/organization/types.d.ts +0 -10
- package/dist/modules/scim/controller.d.ts +0 -16
- package/dist/modules/scim/scimResponse.d.ts +0 -10
- package/dist/modules/scim/service.d.ts +0 -214
- package/dist/modules/user/apiTokenRepository.d.ts +0 -8
- package/dist/modules/user/apiTokenTable.d.ts +0 -3
- package/dist/modules/user/authService.d.ts +0 -23
- package/dist/modules/user/notificationRepository.d.ts +0 -6
- package/dist/modules/user/notificationService.d.ts +0 -25
- package/dist/modules/user/notificationTable.d.ts +0 -3
- package/dist/modules/user/notificationTypes.d.ts +0 -12
- package/dist/modules/user/oauthIdentityRepository.d.ts +0 -9
- package/dist/modules/user/provider.d.ts +0 -11
- package/dist/modules/user/repository.d.ts +0 -13
- package/dist/modules/user/table.d.ts +0 -3
- package/dist/modules/user/tokenService.d.ts +0 -29
- package/dist/modules/user/types.d.ts +0 -46
- package/dist/types/services.d.ts +0 -16
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ColumnDefinition, ForeignIdColumnDefinition } from "./columnDefinition.ts";
|
|
2
|
-
type IndexKind = "index" | "unique" | "partial" | "uniquePartial" | "fullText" | "gin";
|
|
3
|
-
interface IndexDefinition {
|
|
4
|
-
name?: string;
|
|
5
|
-
columns: string[];
|
|
6
|
-
kind: IndexKind;
|
|
7
|
-
where?: string;
|
|
8
|
-
order?: "asc" | "desc";
|
|
9
|
-
}
|
|
10
|
-
type BlueprintAction = "create" | "alter" | "drop";
|
|
11
|
-
declare class Blueprint {
|
|
12
|
-
readonly table: string;
|
|
13
|
-
readonly action: BlueprintAction;
|
|
14
|
-
readonly columns: ColumnDefinition[];
|
|
15
|
-
readonly indexes: IndexDefinition[];
|
|
16
|
-
readonly droppedColumns: string[];
|
|
17
|
-
readonly droppedIndexes: string[];
|
|
18
|
-
constructor(table: string, action: BlueprintAction);
|
|
19
|
-
id(name?: string): ColumnDefinition;
|
|
20
|
-
string(name: string, length?: number): ColumnDefinition;
|
|
21
|
-
text(name: string): ColumnDefinition;
|
|
22
|
-
boolean(name: string): ColumnDefinition;
|
|
23
|
-
integer(name: string): ColumnDefinition;
|
|
24
|
-
bigInteger(name: string): ColumnDefinition;
|
|
25
|
-
timestamp(name: string): ColumnDefinition;
|
|
26
|
-
json(name: string): ColumnDefinition;
|
|
27
|
-
jsonb(name: string): ColumnDefinition;
|
|
28
|
-
foreignId(name: string): ForeignIdColumnDefinition;
|
|
29
|
-
timestamps(): void;
|
|
30
|
-
softDeletes(): void;
|
|
31
|
-
dropColumn(name: string): void;
|
|
32
|
-
dropSoftDeletes(): void;
|
|
33
|
-
dropIndex(name: string): void;
|
|
34
|
-
unique(columns: string | string[], name?: string): void;
|
|
35
|
-
index(columns: string | string[], options?: {
|
|
36
|
-
name?: string;
|
|
37
|
-
order?: "asc" | "desc";
|
|
38
|
-
}): void;
|
|
39
|
-
partialIndex(columns: string | string[], where: string, nameOrOptions?: string | {
|
|
40
|
-
name?: string;
|
|
41
|
-
unique?: boolean;
|
|
42
|
-
}): void;
|
|
43
|
-
fullText(columns: string | string[], name?: string): void;
|
|
44
|
-
ginIndex(column: string, name?: string): void;
|
|
45
|
-
}
|
|
46
|
-
export type { BlueprintAction, IndexDefinition, IndexKind };
|
|
47
|
-
export { Blueprint };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
type ColumnKind = "id" | "string" | "text" | "boolean" | "integer" | "bigInteger" | "timestamp" | "json" | "jsonb" | "foreignId";
|
|
2
|
-
interface ForeignKeyOptions {
|
|
3
|
-
referencesTable: string;
|
|
4
|
-
referencesColumn: string;
|
|
5
|
-
onDelete?: "cascade" | "set null" | "restrict";
|
|
6
|
-
}
|
|
7
|
-
declare class ColumnDefinition {
|
|
8
|
-
readonly name: string;
|
|
9
|
-
kind: ColumnKind;
|
|
10
|
-
length?: number;
|
|
11
|
-
isNullable: boolean;
|
|
12
|
-
isPrimary: boolean;
|
|
13
|
-
isUnique: boolean;
|
|
14
|
-
autoIncrement: boolean;
|
|
15
|
-
defaultValue?: string;
|
|
16
|
-
checkExpression?: string;
|
|
17
|
-
foreignKey?: ForeignKeyOptions;
|
|
18
|
-
constructor(name: string, kind: ColumnKind);
|
|
19
|
-
nullable(): this;
|
|
20
|
-
notNullable(): this;
|
|
21
|
-
default(value: string | number | boolean): this;
|
|
22
|
-
defaultRaw(expression: string): this;
|
|
23
|
-
unique(): this;
|
|
24
|
-
primary(): this;
|
|
25
|
-
check(expression: string): this;
|
|
26
|
-
}
|
|
27
|
-
declare class ForeignIdColumnDefinition extends ColumnDefinition {
|
|
28
|
-
constructor(name: string);
|
|
29
|
-
references(table: string, column?: string): this;
|
|
30
|
-
constrained(table?: string): this;
|
|
31
|
-
cascadeOnDelete(): this;
|
|
32
|
-
nullOnDelete(): this;
|
|
33
|
-
}
|
|
34
|
-
declare function inferReferencedTable(columnName: string): string;
|
|
35
|
-
export type { ColumnKind, ForeignKeyOptions };
|
|
36
|
-
export { ColumnDefinition, ForeignIdColumnDefinition, inferReferencedTable };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type DatabaseDriver = "pgsql" | "mysql" | "sqlite";
|
|
2
|
-
interface ResolveDatabaseDriverOptions {
|
|
3
|
-
url?: string;
|
|
4
|
-
connection?: string;
|
|
5
|
-
}
|
|
6
|
-
declare function resolveDatabaseDriver(options?: ResolveDatabaseDriverOptions): DatabaseDriver;
|
|
7
|
-
export type { DatabaseDriver, ResolveDatabaseDriverOptions };
|
|
8
|
-
export { resolveDatabaseDriver };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Blueprint, IndexDefinition } from "../blueprint.ts";
|
|
2
|
-
import type { ColumnDefinition } from "../columnDefinition.ts";
|
|
3
|
-
import type { DatabaseDriver } from "../driver.ts";
|
|
4
|
-
declare function compileDropTable(driver: DatabaseDriver, tableName: string): string[];
|
|
5
|
-
declare function compileColumn(driver: DatabaseDriver, column: ColumnDefinition, mode: "create" | "alter"): string;
|
|
6
|
-
declare function compileIndex(_driver: DatabaseDriver, tableName: string, index: IndexDefinition): string;
|
|
7
|
-
declare function compileBlueprint(driver: DatabaseDriver, blueprint: Blueprint): string[];
|
|
8
|
-
export { compileBlueprint, compileColumn, compileDropTable, compileIndex };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Blueprint } from "../blueprint.ts";
|
|
2
|
-
import type { ColumnDefinition } from "../columnDefinition.ts";
|
|
3
|
-
import type { DatabaseDriver } from "../driver.ts";
|
|
4
|
-
interface Grammar {
|
|
5
|
-
readonly driver: DatabaseDriver;
|
|
6
|
-
compile(blueprint: Blueprint): string[];
|
|
7
|
-
}
|
|
8
|
-
declare function compileColumnType(driver: DatabaseDriver, column: ColumnDefinition): string;
|
|
9
|
-
export type { Grammar };
|
|
10
|
-
export { compileColumnType };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DatabaseDriver } from "../driver.ts";
|
|
2
|
-
import type { Grammar } from "./grammar.ts";
|
|
3
|
-
import { MySqlGrammar } from "./mysqlGrammar.ts";
|
|
4
|
-
import { PostgresGrammar } from "./postgresGrammar.ts";
|
|
5
|
-
import { SqliteGrammar } from "./sqliteGrammar.ts";
|
|
6
|
-
declare function grammarForDriver(driver: DatabaseDriver): Grammar;
|
|
7
|
-
export { grammarForDriver, MySqlGrammar, PostgresGrammar, SqliteGrammar };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type { BlueprintAction, IndexDefinition, IndexKind } from "./blueprint.ts";
|
|
2
|
-
export { Blueprint } from "./blueprint.ts";
|
|
3
|
-
export type { ColumnKind, ForeignKeyOptions } from "./columnDefinition.ts";
|
|
4
|
-
export { ColumnDefinition, ForeignIdColumnDefinition, inferReferencedTable, } from "./columnDefinition.ts";
|
|
5
|
-
export type { DatabaseDriver, ResolveDatabaseDriverOptions } from "./driver.ts";
|
|
6
|
-
export { resolveDatabaseDriver } from "./driver.ts";
|
|
7
|
-
export { UnsupportedSchemaFeatureError } from "./errors.ts";
|
|
8
|
-
export { compileBlueprint } from "./grammars/compileStatements.ts";
|
|
9
|
-
export type { Grammar } from "./grammars/grammar.ts";
|
|
10
|
-
export { grammarForDriver, MySqlGrammar, PostgresGrammar, SqliteGrammar, } from "./grammars/index.ts";
|
|
11
|
-
export type { BlueprintCallback } from "./schema.ts";
|
|
12
|
-
export { createSchemaBuilder, Schema, SchemaBuilder } from "./schema.ts";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { MigrationDatabase } from "../migrations/types.ts";
|
|
2
|
-
import { Blueprint } from "./blueprint.ts";
|
|
3
|
-
import type { DatabaseDriver } from "./driver.ts";
|
|
4
|
-
import { resolveDatabaseDriver } from "./driver.ts";
|
|
5
|
-
type BlueprintCallback = (table: Blueprint) => void;
|
|
6
|
-
declare class SchemaBuilder {
|
|
7
|
-
#private;
|
|
8
|
-
constructor(driver: DatabaseDriver);
|
|
9
|
-
create(table: string, callback: BlueprintCallback): this;
|
|
10
|
-
table(table: string, callback: BlueprintCallback): this;
|
|
11
|
-
drop(table: string): this;
|
|
12
|
-
toSql(): string[];
|
|
13
|
-
execute(db: MigrationDatabase): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
declare class Schema {
|
|
16
|
-
static builder(driver?: DatabaseDriver): SchemaBuilder;
|
|
17
|
-
static run(db: MigrationDatabase, driver: DatabaseDriver, callback: (schema: SchemaBuilder) => void | Promise<void>): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
declare function createSchemaBuilder(db: MigrationDatabase, driver?: DatabaseDriver): SchemaBuilder;
|
|
20
|
-
export type { BlueprintCallback };
|
|
21
|
-
export { createSchemaBuilder, resolveDatabaseDriver, Schema, SchemaBuilder };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Seeder, SeederDatabase } from "./types.ts";
|
|
2
|
-
declare function loadSeedersFromDirectory(directory: string): Promise<Seeder[]>;
|
|
3
|
-
declare function runSeedersFromDirectory(directory: string, db: SeederDatabase, options?: {
|
|
4
|
-
onSeeder?: (name: string) => void;
|
|
5
|
-
}): Promise<number>;
|
|
6
|
-
export { loadSeedersFromDirectory, runSeedersFromDirectory };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { QueryOrder } from "./types.ts";
|
|
2
|
-
interface TableDefinition<TEntity, PrimaryKey extends keyof TEntity & string = keyof TEntity & string> {
|
|
3
|
-
name: string;
|
|
4
|
-
primaryKey: PrimaryKey;
|
|
5
|
-
columns: readonly (keyof TEntity & string)[];
|
|
6
|
-
defaultOrderBy?: QueryOrder<TEntity> | QueryOrder<TEntity>[];
|
|
7
|
-
softDeletes?: boolean | {
|
|
8
|
-
column?: keyof TEntity & string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
declare function defineTable<TEntity, PrimaryKey extends keyof TEntity & string = keyof TEntity & string>(definition: TableDefinition<TEntity, PrimaryKey>): TableDefinition<TEntity, PrimaryKey>;
|
|
12
|
-
export type { TableDefinition };
|
|
13
|
-
export { defineTable };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
type DatabaseComparable = string | number | Date;
|
|
2
|
-
type DatabaseScalar = DatabaseComparable | boolean | null;
|
|
3
|
-
type QueryOperator = {
|
|
4
|
-
eq?: DatabaseScalar;
|
|
5
|
-
in?: readonly DatabaseScalar[];
|
|
6
|
-
gt?: DatabaseComparable;
|
|
7
|
-
gte?: DatabaseComparable;
|
|
8
|
-
lt?: DatabaseComparable;
|
|
9
|
-
lte?: DatabaseComparable;
|
|
10
|
-
isNull?: boolean;
|
|
11
|
-
ilike?: string;
|
|
12
|
-
tsMatch?: string;
|
|
13
|
-
};
|
|
14
|
-
type QueryFilterValue = DatabaseScalar | readonly DatabaseScalar[] | QueryOperator;
|
|
15
|
-
type QueryWhere<TEntity> = Partial<Record<keyof TEntity & string, QueryFilterValue>> & Partial<Record<string, QueryFilterValue>>;
|
|
16
|
-
type QueryOrder<TEntity> = {
|
|
17
|
-
column: keyof TEntity & string;
|
|
18
|
-
direction?: "ASC" | "DESC" | "asc" | "desc";
|
|
19
|
-
};
|
|
20
|
-
type QueryOrderShorthand<TEntity> = Partial<Record<keyof TEntity & string, "ASC" | "DESC" | "asc" | "desc">>;
|
|
21
|
-
type QueryJoinOn = {
|
|
22
|
-
left: {
|
|
23
|
-
table: string;
|
|
24
|
-
column: string;
|
|
25
|
-
};
|
|
26
|
-
right: {
|
|
27
|
-
table: string;
|
|
28
|
-
column: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
type QueryJoin = {
|
|
32
|
-
type: "inner" | "left";
|
|
33
|
-
table: string;
|
|
34
|
-
on: QueryJoinOn[];
|
|
35
|
-
};
|
|
36
|
-
type QuerySelectItem = {
|
|
37
|
-
kind: "column";
|
|
38
|
-
table: string;
|
|
39
|
-
column: string;
|
|
40
|
-
as?: string;
|
|
41
|
-
} | {
|
|
42
|
-
kind: "literalText";
|
|
43
|
-
value: string;
|
|
44
|
-
as: string;
|
|
45
|
-
} | {
|
|
46
|
-
kind: "tsRank";
|
|
47
|
-
table: string;
|
|
48
|
-
column: string;
|
|
49
|
-
query: string;
|
|
50
|
-
as: string;
|
|
51
|
-
};
|
|
52
|
-
interface QueryOptions<TEntity> {
|
|
53
|
-
where?: QueryWhere<TEntity>;
|
|
54
|
-
orderBy?: QueryOrder<TEntity> | QueryOrder<TEntity>[] | QueryOrderShorthand<TEntity>;
|
|
55
|
-
limit?: number;
|
|
56
|
-
offset?: number;
|
|
57
|
-
withTrashed?: boolean;
|
|
58
|
-
onlyTrashed?: boolean;
|
|
59
|
-
joins?: QueryJoin[];
|
|
60
|
-
groupBy?: string | string[];
|
|
61
|
-
having?: QueryWhere<TEntity>;
|
|
62
|
-
select?: QuerySelectItem[];
|
|
63
|
-
}
|
|
64
|
-
type MutationValues<TEntity> = Partial<TEntity>;
|
|
65
|
-
type UpdateValues<TEntity, PrimaryKey extends keyof TEntity & string = keyof TEntity & string> = Partial<Omit<TEntity, PrimaryKey>>;
|
|
66
|
-
export type { DatabaseComparable, DatabaseScalar, MutationValues, QueryFilterValue, QueryJoin, QueryJoinOn, QueryOperator, QueryOptions, QueryOrder, QuerySelectItem, QueryWhere, UpdateValues, };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { QueryWhere } from "./types.ts";
|
|
2
|
-
type WhereNode<TEntity extends object> = {
|
|
3
|
-
kind: "and" | "or";
|
|
4
|
-
where: QueryWhere<TEntity>;
|
|
5
|
-
} | {
|
|
6
|
-
kind: "and" | "or";
|
|
7
|
-
group: WhereNode<TEntity>[];
|
|
8
|
-
};
|
|
9
|
-
declare class WhereBuilder<TEntity extends object> {
|
|
10
|
-
readonly nodes: WhereNode<TEntity>[];
|
|
11
|
-
where(where: QueryWhere<TEntity>): this;
|
|
12
|
-
orWhere(where: QueryWhere<TEntity>): this;
|
|
13
|
-
whereGroup(fn: (builder: WhereBuilder<TEntity>) => void): this;
|
|
14
|
-
orWhereGroup(fn: (builder: WhereBuilder<TEntity>) => void): this;
|
|
15
|
-
}
|
|
16
|
-
export type { WhereNode };
|
|
17
|
-
export { WhereBuilder };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare class HttpError extends Error {
|
|
2
|
-
readonly status: number;
|
|
3
|
-
readonly details?: unknown;
|
|
4
|
-
constructor(status: number, message: string, details?: unknown);
|
|
5
|
-
}
|
|
6
|
-
declare class BadRequestError extends HttpError {
|
|
7
|
-
constructor(message?: string, details?: unknown);
|
|
8
|
-
}
|
|
9
|
-
declare class NotFoundError extends HttpError {
|
|
10
|
-
constructor(message?: string, details?: unknown);
|
|
11
|
-
}
|
|
12
|
-
declare class ConflictError extends HttpError {
|
|
13
|
-
constructor(message?: string, details?: unknown);
|
|
14
|
-
}
|
|
15
|
-
declare class UnprocessableEntityError extends HttpError {
|
|
16
|
-
constructor(message?: string, details?: unknown);
|
|
17
|
-
}
|
|
18
|
-
declare class ValidationError extends HttpError {
|
|
19
|
-
constructor(message?: string, details?: unknown);
|
|
20
|
-
}
|
|
21
|
-
declare class ForbiddenError extends HttpError {
|
|
22
|
-
constructor(message?: string, details?: unknown);
|
|
23
|
-
}
|
|
24
|
-
declare class UnauthorizedError extends HttpError {
|
|
25
|
-
constructor(message?: string, details?: unknown);
|
|
26
|
-
}
|
|
27
|
-
declare class PayloadTooLargeError extends HttpError {
|
|
28
|
-
constructor(message?: string, details?: unknown);
|
|
29
|
-
}
|
|
30
|
-
declare class PreconditionFailedError extends HttpError {
|
|
31
|
-
constructor(message?: string, details?: unknown);
|
|
32
|
-
}
|
|
33
|
-
export { BadRequestError, ConflictError, ForbiddenError, HttpError, NotFoundError, PayloadTooLargeError, PreconditionFailedError, UnauthorizedError, UnprocessableEntityError, ValidationError, };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type EventListener = (payload: unknown) => void | Promise<void>;
|
|
2
|
-
declare class EventBus {
|
|
3
|
-
constructor();
|
|
4
|
-
private readonly listeners;
|
|
5
|
-
listen(event: string, listener: EventListener): () => void;
|
|
6
|
-
dispatch(event: string, payload: unknown): Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
declare const eventBus: EventBus;
|
|
9
|
-
export type { EventListener };
|
|
10
|
-
export { EventBus, eventBus };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare function cache(): import("../../types/services").CacheLike;
|
|
2
|
-
declare function auth(): import("../auth/guard").AuthManager;
|
|
3
|
-
declare function policyGate(): import("../auth/policy").PolicyGate;
|
|
4
|
-
declare function queue(): import("../queue").Queue;
|
|
5
|
-
declare function events(): import("../events").EventBus;
|
|
6
|
-
declare function config<T>(key: string): T | undefined;
|
|
7
|
-
declare function log(): import("../logging/logger").Logger;
|
|
8
|
-
declare function mail(): import("../mail/mailer").Mailer;
|
|
9
|
-
declare function storageFacade(): import("../storage/storage").StorageManager;
|
|
10
|
-
export { auth, cache, config, events, log, mail, policyGate, queue, storageFacade as storage };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type AuthUser, authContext } from "../auth/authContext";
|
|
2
|
-
import type { AuthManager } from "../auth/guard";
|
|
3
|
-
declare function createAuthMiddleware(auth: AuthManager): (request: Request, next: () => Promise<Response>) => Promise<Response>;
|
|
4
|
-
export type { AuthUser };
|
|
5
|
-
export { authContext, createAuthMiddleware };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { AuthManager } from "../auth/guard";
|
|
2
|
-
import type { Policy, PolicyGate } from "../auth/policy";
|
|
3
|
-
import type { Middleware } from "./middleware";
|
|
4
|
-
declare function createAuthorizeMiddleware(gate: PolicyGate, auth: AuthManager, resource: string, action: keyof Policy): Middleware;
|
|
5
|
-
export { createAuthorizeMiddleware };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
declare const DEFAULT_CSRF_TTL_MS: number;
|
|
2
|
-
interface CsrfProtectionOptions {
|
|
3
|
-
expiresIn?: number;
|
|
4
|
-
maxAge?: number;
|
|
5
|
-
}
|
|
6
|
-
declare function createCsrfProtection(secret: string, options?: CsrfProtectionOptions): {
|
|
7
|
-
generate(_sessionKey?: string): string;
|
|
8
|
-
verify(token: string | undefined, _sessionKey?: string): boolean;
|
|
9
|
-
secret: string;
|
|
10
|
-
};
|
|
11
|
-
export type { CsrfProtectionOptions };
|
|
12
|
-
export { createCsrfProtection, DEFAULT_CSRF_TTL_MS };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const CSRF_COOKIE = "workhub_csrf";
|
|
2
|
-
declare function createCsrfTokenCookie(): {
|
|
3
|
-
token: string;
|
|
4
|
-
cookie: string;
|
|
5
|
-
};
|
|
6
|
-
declare function resolveCsrfToken(request: Request): {
|
|
7
|
-
token: string;
|
|
8
|
-
cookie?: string;
|
|
9
|
-
};
|
|
10
|
-
declare function readSubmittedCsrfToken(request: Request): string | null;
|
|
11
|
-
declare function readSubmittedCsrfTokenFromBody(request: Request): Promise<string | null>;
|
|
12
|
-
declare function verifyCsrfToken(request: Request, submittedToken: string | null): boolean;
|
|
13
|
-
declare function resolveCsrfTokenForRequest(request: Request): string;
|
|
14
|
-
export { CSRF_COOKIE, createCsrfTokenCookie, readSubmittedCsrfToken, readSubmittedCsrfTokenFromBody, resolveCsrfToken, resolveCsrfTokenForRequest, verifyCsrfToken, };
|
package/dist/core/http/etag.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface EtagVersioned {
|
|
2
|
-
id?: number | string;
|
|
3
|
-
updated_at?: Date | string | null;
|
|
4
|
-
created_at?: Date | string | null;
|
|
5
|
-
}
|
|
6
|
-
declare function isEtagEnabled(): boolean;
|
|
7
|
-
declare function computeEtagFromJson(data: unknown): string;
|
|
8
|
-
declare function etagFromResource(resource: EtagVersioned): string;
|
|
9
|
-
declare function etagValuesMatch(left: string, right: string): boolean;
|
|
10
|
-
declare function ifNoneMatchSatisfied(request: Request, etag: string): boolean;
|
|
11
|
-
declare function ifMatchSatisfied(request: Request, etag: string): boolean;
|
|
12
|
-
declare function assertIfMatch(request: Request, etag: string, options?: {
|
|
13
|
-
required?: boolean;
|
|
14
|
-
}): void;
|
|
15
|
-
declare function notModifiedResponse(etag: string): Response;
|
|
16
|
-
declare function applyConditionalGet(request: Request, response: Response, etag: string): Response;
|
|
17
|
-
export type { EtagVersioned };
|
|
18
|
-
export { applyConditionalGet, assertIfMatch, computeEtagFromJson, etagFromResource, etagValuesMatch, ifMatchSatisfied, ifNoneMatchSatisfied, isEtagEnabled, notModifiedResponse, };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
type FlashLevel = "success" | "error" | "info";
|
|
2
|
-
interface FlashMessage {
|
|
3
|
-
level: FlashLevel;
|
|
4
|
-
message: string;
|
|
5
|
-
}
|
|
6
|
-
declare function createFlashCookie(message: FlashMessage): string;
|
|
7
|
-
declare function clearFlashCookie(): string;
|
|
8
|
-
declare function pullFlash(request: Request): FlashMessage | null;
|
|
9
|
-
declare function flashResponse(response: Response, message: FlashMessage): Response;
|
|
10
|
-
declare function withFlashClear(response: Response): Response;
|
|
11
|
-
export type { FlashLevel, FlashMessage };
|
|
12
|
-
export { clearFlashCookie, createFlashCookie, flashResponse, pullFlash, withFlashClear };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
declare abstract class FormRequest<TOutput> {
|
|
2
|
-
authorize(_request: Request): boolean | Promise<boolean>;
|
|
3
|
-
protected abstract parse(payload: unknown): TOutput;
|
|
4
|
-
validate(request: Request): Promise<TOutput>;
|
|
5
|
-
}
|
|
6
|
-
declare abstract class QueryFormRequest<TOutput> {
|
|
7
|
-
validate(request?: Request): TOutput;
|
|
8
|
-
protected abstract parseQuery(request?: Request): TOutput;
|
|
9
|
-
}
|
|
10
|
-
export { FormRequest, QueryFormRequest };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export { BadRequestError, ConflictError, ForbiddenError, HttpError, NotFoundError, PayloadTooLargeError, PreconditionFailedError, UnauthorizedError, UnprocessableEntityError, ValidationError, } from "../errors/http";
|
|
2
|
-
export type { PaginatedResult, PaginationMeta } from "../pagination";
|
|
3
|
-
export { createAuthMiddleware } from "./authMiddleware";
|
|
4
|
-
export { createAuthorizeMiddleware } from "./authorizeMiddleware";
|
|
5
|
-
export { conditionalJsonResponse } from "./conditionalResponse";
|
|
6
|
-
export type { EtagVersioned } from "./etag";
|
|
7
|
-
export { applyConditionalGet, assertIfMatch, computeEtagFromJson, etagFromResource, etagValuesMatch, ifMatchSatisfied, ifNoneMatchSatisfied, isEtagEnabled, notModifiedResponse, } from "./etag";
|
|
8
|
-
export { FormRequest, QueryFormRequest } from "./formRequest";
|
|
9
|
-
export type { Middleware, RouteHandler } from "./middleware";
|
|
10
|
-
export { applyMiddlewareToRoutes, composeMiddleware, requestIdMiddleware, wrapRouteHandler, } from "./middleware";
|
|
11
|
-
export { buildPaginationMeta, DEFAULT_PER_PAGE, MAX_PER_PAGE, paginatedResponse, parsePaginationQuery, } from "./pagination";
|
|
12
|
-
export { createRequireAuthMiddleware } from "./requireAuthMiddleware";
|
|
13
|
-
export { serializeDate, toPaginatedResourceCollection, toResourceCollection } from "./resources";
|
|
14
|
-
export { withMiddleware } from "./routeMiddleware";
|
|
15
|
-
export { bindRouteModel } from "./routeModelBinding";
|
|
16
|
-
export { securedBindRouteModel, securedBindRouteModelByKey, } from "./securedRouteModelBinding";
|
|
17
|
-
export { buildRequestCacheKey, expectObject, getQueryParams, parseJsonBody, parseOptionalBooleanQueryParam, parseOptionalEnumQueryParam, parseOptionalPositiveIntQueryParam, parsePositiveIntParam, readOptionalEnum, readOptionalPositiveInt, readOptionalString, readRequiredEnum, readRequiredPositiveInt, readRequiredString, } from "./validation";
|
|
18
|
-
declare function jsonResponse(data: unknown, init?: ResponseInit): Response;
|
|
19
|
-
declare function createdResponse(data: unknown, init?: ResponseInit): Response;
|
|
20
|
-
declare function noContentResponse(): Response;
|
|
21
|
-
declare function errorResponse(error: unknown): Response;
|
|
22
|
-
declare function withErrorHandling<TArgs extends unknown[]>(handler: (...args: TArgs) => Response | Promise<Response>): (...args: TArgs) => Promise<Response>;
|
|
23
|
-
export type { ParsedUpload } from "./parseMultipartUpload";
|
|
24
|
-
export { parseMultipartUpload, sanitizeUploadFileName } from "./parseMultipartUpload";
|
|
25
|
-
export type { RouteRequest } from "./route";
|
|
26
|
-
export { getRouteParams } from "./route";
|
|
27
|
-
export { createdResponse, errorResponse, jsonResponse, noContentResponse, withErrorHandling };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Middleware } from "./middleware";
|
|
2
|
-
interface LoginThrottleOptions {
|
|
3
|
-
redisUrl: string;
|
|
4
|
-
maxAttempts: number;
|
|
5
|
-
decaySeconds: number;
|
|
6
|
-
keyPrefix?: string;
|
|
7
|
-
}
|
|
8
|
-
declare function resolveLoginIdentity(request: Request): string;
|
|
9
|
-
declare function createLoginThrottleMiddleware(options: LoginThrottleOptions): Middleware;
|
|
10
|
-
export type { LoginThrottleOptions };
|
|
11
|
-
export { createLoginThrottleMiddleware, resolveLoginIdentity };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Middleware } from "./middleware";
|
|
2
|
-
interface MemoryThrottleOptions {
|
|
3
|
-
maxAttempts: number;
|
|
4
|
-
decaySeconds: number;
|
|
5
|
-
keyPrefix?: string;
|
|
6
|
-
}
|
|
7
|
-
declare function createMemoryThrottleMiddleware(options: MemoryThrottleOptions): Middleware;
|
|
8
|
-
export type { MemoryThrottleOptions };
|
|
9
|
-
export { createMemoryThrottleMiddleware };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
type Middleware = (request: Request, next: () => Promise<Response>) => Promise<Response>;
|
|
2
|
-
type RouteHandler = (request: Request) => Response | Promise<Response>;
|
|
3
|
-
declare function composeMiddleware(...middleware: Middleware[]): (handler: RouteHandler) => RouteHandler;
|
|
4
|
-
declare function requestIdMiddleware(request: Request, next: () => Promise<Response>): Promise<Response>;
|
|
5
|
-
declare function wrapRouteHandler<T>(handler: T, middleware: Middleware[]): T;
|
|
6
|
-
declare function applyMiddlewareToRoutes<T extends Record<string, unknown>>(routes: T, middleware: Middleware[]): T;
|
|
7
|
-
export type { Middleware, RouteHandler };
|
|
8
|
-
export { applyMiddlewareToRoutes, composeMiddleware, requestIdMiddleware, wrapRouteHandler };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { buildPaginationMeta, type PaginatedResult, type PaginationMeta } from "../pagination";
|
|
2
|
-
declare const DEFAULT_PER_PAGE = 15;
|
|
3
|
-
declare const MAX_PER_PAGE = 100;
|
|
4
|
-
interface PaginationQuery {
|
|
5
|
-
page: number;
|
|
6
|
-
perPage: number;
|
|
7
|
-
}
|
|
8
|
-
declare function parsePaginationQuery(request?: Request): PaginationQuery;
|
|
9
|
-
declare function paginatedResponse<T>(data: T[], meta: PaginationMeta, init?: ResponseInit): Response;
|
|
10
|
-
export type { PaginatedResult, PaginationMeta, PaginationQuery };
|
|
11
|
-
export { buildPaginationMeta, DEFAULT_PER_PAGE, MAX_PER_PAGE, paginatedResponse, parsePaginationQuery, };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
interface FormDataLike {
|
|
2
|
-
entries(): Iterable<[string, unknown]>;
|
|
3
|
-
}
|
|
4
|
-
declare function parseFormBody(request: Request): Promise<Record<string, string>>;
|
|
5
|
-
declare function formDataToRecord(formData: FormDataLike): Record<string, string>;
|
|
6
|
-
export { formDataToRecord, parseFormBody };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
interface ParsedUpload {
|
|
2
|
-
fileName: string;
|
|
3
|
-
mimeType: string;
|
|
4
|
-
size: number;
|
|
5
|
-
contents: Uint8Array;
|
|
6
|
-
}
|
|
7
|
-
declare function sanitizeUploadFileName(name: string): string;
|
|
8
|
-
declare function parseMultipartUpload(request: Request, fieldName?: string): Promise<ParsedUpload>;
|
|
9
|
-
export type { ParsedUpload };
|
|
10
|
-
export { parseMultipartUpload, sanitizeUploadFileName };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
type RequestMeta = {
|
|
2
|
-
ipAddress: string | null;
|
|
3
|
-
userAgent: string | null;
|
|
4
|
-
request?: Request;
|
|
5
|
-
flash?: {
|
|
6
|
-
level: string;
|
|
7
|
-
message: string;
|
|
8
|
-
} | null;
|
|
9
|
-
csrfToken?: string;
|
|
10
|
-
};
|
|
11
|
-
declare const requestMetaContext: import("node:async_hooks").AsyncLocalStorage<RequestMeta>;
|
|
12
|
-
declare function runWithRequestMeta<T>(meta: RequestMeta, callback: () => T | Promise<T>): T | Promise<T>;
|
|
13
|
-
declare function currentRequestMeta(): RequestMeta;
|
|
14
|
-
export type { RequestMeta };
|
|
15
|
-
export { currentRequestMeta, requestMetaContext, runWithRequestMeta };
|