@getstrata/core 0.5.6 → 0.5.8
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/discoverModules.d.ts +4 -0
- package/dist/bootstrap/modules.d.ts +1 -0
- package/dist/bootstrap/routeRegistry.d.ts +14 -0
- package/dist/core/audit/exportAuditLogs.d.ts +8 -0
- package/dist/core/audit/siemFormatter.d.ts +30 -0
- package/dist/core/auth/membershipScope.d.ts +16 -0
- package/dist/core/auth/membershipService.d.ts +20 -0
- package/dist/core/auth/scimAuthMiddleware.d.ts +3 -0
- package/dist/core/auth/sessionCookie.d.ts +6 -0
- package/dist/core/auth/sessionGuard.d.ts +9 -0
- package/dist/core/cache/createCacheStore.d.ts +11 -0
- package/dist/core/cache/keys.d.ts +2 -0
- package/dist/core/cache/modelCacheTags.d.ts +3 -0
- package/dist/core/cache/redisCacheStore.d.ts +23 -0
- package/dist/core/cache/simpleCache.d.ts +23 -0
- package/dist/core/cache/simpleCacheStore.d.ts +16 -0
- package/dist/core/config/envSchema.d.ts +12 -0
- package/dist/core/database/factory.d.ts +6 -0
- package/dist/core/http/scimThrottleMiddleware.d.ts +9 -0
- package/dist/core/jobs/dispatchWebhookJob.d.ts +14 -0
- package/dist/core/jobs/invalidateCacheTagsJob.d.ts +12 -0
- package/dist/core/openapi/generator.d.ts +22 -0
- package/dist/core/openapi/validate.d.ts +3 -0
- package/dist/core/queue/createAppQueue.d.ts +6 -0
- package/dist/core/queue/queueMetrics.d.ts +15 -0
- package/dist/core/security/oauthState.d.ts +8 -0
- package/dist/core/security/safeFetch.d.ts +8 -0
- package/dist/core/security/safeUrl.d.ts +5 -0
- package/dist/core/security/scimTenantTokens.d.ts +3 -0
- package/dist/core/security/stripeWebhook.d.ts +2 -0
- package/dist/core/security/timingSafeCompare.d.ts +2 -0
- package/dist/domain/scim.d.ts +9 -0
- package/dist/entries/auth/guard.js +6 -6
- package/dist/entries/database.js +6 -6
- package/dist/entries/http/webErrorResponse.js +6 -6
- package/dist/entries/http.js +6 -6
- package/dist/entries/queue/createAppQueue.js +6 -6
- package/dist/entries/queue/publicQueue.js +6 -6
- package/dist/entries/queue/queueMetrics.js +6 -6
- package/dist/entries/view.js +6 -6
- package/dist/index.js +6 -6
- package/package.json +58 -58
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { appModules, discoverModules } from "./discoverModules";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface RegisteredRoute {
|
|
2
|
+
method: string;
|
|
3
|
+
path: string;
|
|
4
|
+
middleware: string[];
|
|
5
|
+
}
|
|
6
|
+
declare class RouteRegistry {
|
|
7
|
+
private readonly routes;
|
|
8
|
+
register(route: RegisteredRoute): void;
|
|
9
|
+
clear(): void;
|
|
10
|
+
list(): RegisteredRoute[];
|
|
11
|
+
}
|
|
12
|
+
declare const routeRegistry: RouteRegistry;
|
|
13
|
+
export type { RegisteredRoute };
|
|
14
|
+
export { RouteRegistry, routeRegistry };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface AuditExportConfig {
|
|
2
|
+
endpoint: string;
|
|
3
|
+
format: "json" | "cef";
|
|
4
|
+
batchSize: number;
|
|
5
|
+
}
|
|
6
|
+
declare function resolveAuditExportConfig(): AuditExportConfig | null;
|
|
7
|
+
declare function exportPendingAuditLogs(): Promise<number>;
|
|
8
|
+
export { exportPendingAuditLogs, resolveAuditExportConfig };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
interface SiemAuditEvent {
|
|
2
|
+
timestamp: string;
|
|
3
|
+
event_type: string;
|
|
4
|
+
actor_user_id: number | null;
|
|
5
|
+
tenant_id: number | null;
|
|
6
|
+
trace_id: string | null;
|
|
7
|
+
action: string;
|
|
8
|
+
subject_type: string;
|
|
9
|
+
subject_id: number | null;
|
|
10
|
+
ip_address: string | null;
|
|
11
|
+
user_agent: string | null;
|
|
12
|
+
checksum: string | null;
|
|
13
|
+
payload: Record<string, unknown>;
|
|
14
|
+
}
|
|
15
|
+
declare function formatSiemAuditEvent(input: {
|
|
16
|
+
action: string;
|
|
17
|
+
subject_type: string;
|
|
18
|
+
subject_id: number | null;
|
|
19
|
+
user_id: number | null;
|
|
20
|
+
tenant_id?: number | null;
|
|
21
|
+
trace_id?: string | null;
|
|
22
|
+
ip_address?: string | null;
|
|
23
|
+
user_agent?: string | null;
|
|
24
|
+
checksum?: string | null;
|
|
25
|
+
payload?: Record<string, unknown>;
|
|
26
|
+
created_at: Date;
|
|
27
|
+
}): SiemAuditEvent;
|
|
28
|
+
declare function formatCefLine(event: SiemAuditEvent): string;
|
|
29
|
+
export type { SiemAuditEvent };
|
|
30
|
+
export { formatCefLine, formatSiemAuditEvent };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare function resolveOrganizationScope(): number[] | null;
|
|
2
|
+
declare function scopedOrganizationIds(requestedOrganizationId?: number): number[] | null;
|
|
3
|
+
declare function appendOrganizationScope<T extends object>(where: T, requestedOrganizationId?: number): T;
|
|
4
|
+
declare function appendProjectScope<T extends object>(where: T, accessibleProjectIds: number[] | null, requestedProjectId?: number): T;
|
|
5
|
+
declare function emptyPaginateResult<T>(page: number, perPage: number): {
|
|
6
|
+
data: T[];
|
|
7
|
+
meta: {
|
|
8
|
+
page: number;
|
|
9
|
+
per_page: number;
|
|
10
|
+
total: number;
|
|
11
|
+
last_page: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare function assertResourceInCurrentTenant(resourceTenantId: number, resourceLabel: string, resourceId: number): void;
|
|
15
|
+
declare function assertOrganizationReadable(organizationId: number): void;
|
|
16
|
+
export { appendOrganizationScope, appendProjectScope, assertOrganizationReadable, assertResourceInCurrentTenant, emptyPaginateResult, resolveOrganizationScope, scopedOrganizationIds, };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { OrganizationMemberRole } from "../../modules/organization/memberTypes";
|
|
2
|
+
import { type AuthUser } from "./authContext";
|
|
3
|
+
declare class MembershipService {
|
|
4
|
+
constructor();
|
|
5
|
+
listOrganizationIdsForUser(userId: number): Promise<number[]>;
|
|
6
|
+
getOrgRole(userId: number, organizationId: number): Promise<OrganizationMemberRole | null>;
|
|
7
|
+
requireOrgAccess(organizationId: number, minimumRole?: OrganizationMemberRole, user?: AuthUser | null): Promise<OrganizationMemberRole>;
|
|
8
|
+
filterAccessibleOrganizationIds(organizationIds: number[], user?: AuthUser | null): Promise<number[]>;
|
|
9
|
+
addOwnerOnOrganizationCreate(organizationId: number, userId: number): Promise<void>;
|
|
10
|
+
listMembersForOrganization(organizationId: number): Promise<import("../../modules/organization/memberTypes").OrganizationMemberRecord[]>;
|
|
11
|
+
addMember(input: {
|
|
12
|
+
organizationId: number;
|
|
13
|
+
userId: number;
|
|
14
|
+
role?: OrganizationMemberRole;
|
|
15
|
+
}): Promise<import("../../modules/organization/memberTypes").OrganizationMemberRecord>;
|
|
16
|
+
removeMember(organizationId: number, userId: number): Promise<boolean>;
|
|
17
|
+
}
|
|
18
|
+
declare function resolveMembershipService(): MembershipService;
|
|
19
|
+
export default MembershipService;
|
|
20
|
+
export { resolveMembershipService };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const SESSION_COOKIE = "workhub_session";
|
|
2
|
+
declare const SESSION_TTL_SECONDS: number;
|
|
3
|
+
declare function readSessionUserId(request: Request): number | null;
|
|
4
|
+
declare function createSessionCookie(userId: number): string;
|
|
5
|
+
declare function clearSessionCookie(): string;
|
|
6
|
+
export { clearSessionCookie, createSessionCookie, readSessionUserId, SESSION_COOKIE, SESSION_TTL_SECONDS, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ServiceContainer } from "../../bootstrap/contracts";
|
|
2
|
+
import type { AuthUser } from "./authContext";
|
|
3
|
+
import type { AuthGuard } from "./guard";
|
|
4
|
+
declare class SessionGuard implements AuthGuard {
|
|
5
|
+
private readonly container;
|
|
6
|
+
constructor(container: ServiceContainer);
|
|
7
|
+
resolve(request: Request): Promise<AuthUser | null>;
|
|
8
|
+
}
|
|
9
|
+
export { SessionGuard };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CacheStore } from "./store";
|
|
2
|
+
type CacheDriver = "array" | "redis";
|
|
3
|
+
interface CreateCacheStoreOptions {
|
|
4
|
+
driver: CacheDriver;
|
|
5
|
+
ttlMs: number;
|
|
6
|
+
maxEntries: number;
|
|
7
|
+
redisUrl?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function createCacheStore(options: CreateCacheStoreOptions): CacheStore;
|
|
10
|
+
export type { CacheDriver, CreateCacheStoreOptions };
|
|
11
|
+
export { createCacheStore };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CacheStore } from "./store";
|
|
2
|
+
declare class RedisCacheStore implements CacheStore {
|
|
3
|
+
private readonly ttlMs;
|
|
4
|
+
private readonly maxEntries;
|
|
5
|
+
private readonly client;
|
|
6
|
+
private readonly inflight;
|
|
7
|
+
private readonly keyTags;
|
|
8
|
+
constructor(redisUrl: string, ttlMs: number, maxEntries: number);
|
|
9
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
10
|
+
set<T>(key: string, value: T, ttlMs?: number): Promise<void>;
|
|
11
|
+
getOrSet<T>(key: string, loader: () => Promise<T>, ttlMs?: number): Promise<T>;
|
|
12
|
+
attachTags(key: string, tags: string[]): Promise<void>;
|
|
13
|
+
flushTags(tags: string[]): Promise<number>;
|
|
14
|
+
invalidate(key: string): Promise<boolean>;
|
|
15
|
+
invalidateByPrefix(prefix: string): Promise<number>;
|
|
16
|
+
clear(): Promise<void>;
|
|
17
|
+
size(): Promise<number>;
|
|
18
|
+
private storageKey;
|
|
19
|
+
private tagKey;
|
|
20
|
+
private detachKeyFromTags;
|
|
21
|
+
private enforceMaxEntries;
|
|
22
|
+
}
|
|
23
|
+
export default RedisCacheStore;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare class SimpleCache {
|
|
2
|
+
private readonly ttlMs;
|
|
3
|
+
private readonly maxEntries;
|
|
4
|
+
private readonly cache;
|
|
5
|
+
private readonly inflight;
|
|
6
|
+
private readonly tagIndex;
|
|
7
|
+
private readonly keyTags;
|
|
8
|
+
constructor(ttlMs?: number, maxEntries?: number);
|
|
9
|
+
get<T>(key: string): T | undefined;
|
|
10
|
+
set<T>(key: string, value: T, ttlMs?: number): void;
|
|
11
|
+
getOrSet<T>(key: string, loader: () => Promise<T>, ttlMs?: number): Promise<T>;
|
|
12
|
+
attachTags(key: string, tags: string[]): void;
|
|
13
|
+
flushTags(tags: string[]): number;
|
|
14
|
+
invalidate(key: string): boolean;
|
|
15
|
+
invalidateByPrefix(prefix: string): number;
|
|
16
|
+
clear(): void;
|
|
17
|
+
size(): number;
|
|
18
|
+
private detachKeyFromTags;
|
|
19
|
+
private getFreshEntry;
|
|
20
|
+
private pruneExpired;
|
|
21
|
+
private evictOverflow;
|
|
22
|
+
}
|
|
23
|
+
export default SimpleCache;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type SimpleCache from "./simpleCache";
|
|
2
|
+
import type { CacheStore } from "./store";
|
|
3
|
+
declare class SimpleCacheStore implements CacheStore {
|
|
4
|
+
private readonly cache;
|
|
5
|
+
constructor(cache: SimpleCache);
|
|
6
|
+
get<T>(key: string): Promise<T | undefined>;
|
|
7
|
+
set<T>(key: string, value: T, ttlMs?: number): Promise<void>;
|
|
8
|
+
getOrSet<T>(key: string, loader: () => Promise<T>, ttlMs?: number): Promise<T>;
|
|
9
|
+
attachTags(key: string, tags: string[]): Promise<void>;
|
|
10
|
+
flushTags(tags: string[]): Promise<number>;
|
|
11
|
+
invalidate(key: string): Promise<boolean>;
|
|
12
|
+
invalidateByPrefix(prefix: string): Promise<number>;
|
|
13
|
+
clear(): Promise<void>;
|
|
14
|
+
size(): Promise<number>;
|
|
15
|
+
}
|
|
16
|
+
export default SimpleCacheStore;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface EnvRule {
|
|
2
|
+
required?: boolean;
|
|
3
|
+
integer?: boolean;
|
|
4
|
+
minimum?: number;
|
|
5
|
+
default?: string;
|
|
6
|
+
pattern?: RegExp;
|
|
7
|
+
}
|
|
8
|
+
type EnvSchema = Record<string, EnvRule>;
|
|
9
|
+
declare function defineEnvSchema(schema: EnvSchema): EnvSchema;
|
|
10
|
+
declare function validateEnv(schema: EnvSchema, env?: Record<string, string | undefined>): Record<string, string>;
|
|
11
|
+
export type { EnvRule, EnvSchema };
|
|
12
|
+
export { defineEnvSchema, validateEnv };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Middleware } from "./middleware";
|
|
2
|
+
interface ScimThrottleOptions {
|
|
3
|
+
redisUrl?: string;
|
|
4
|
+
maxAttempts: number;
|
|
5
|
+
decaySeconds: number;
|
|
6
|
+
}
|
|
7
|
+
declare function createScimThrottleMiddleware(options: ScimThrottleOptions): Middleware;
|
|
8
|
+
export type { ScimThrottleOptions };
|
|
9
|
+
export { createScimThrottleMiddleware };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Job } from "../queue";
|
|
2
|
+
interface DispatchWebhookPayload {
|
|
3
|
+
webhookId: number;
|
|
4
|
+
event: string;
|
|
5
|
+
payload: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
declare class DispatchWebhookJob extends Job<DispatchWebhookPayload> {
|
|
8
|
+
constructor();
|
|
9
|
+
readonly maxAttempts = 3;
|
|
10
|
+
readonly backoffMs = 2000;
|
|
11
|
+
handle(payload: DispatchWebhookPayload): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export default DispatchWebhookJob;
|
|
14
|
+
export type { DispatchWebhookPayload };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { CacheLike } from "../../types/services";
|
|
2
|
+
import { Job } from "../queue";
|
|
3
|
+
interface InvalidateCacheTagsPayload {
|
|
4
|
+
tags: string[];
|
|
5
|
+
}
|
|
6
|
+
declare class InvalidateCacheTagsJob extends Job<InvalidateCacheTagsPayload> {
|
|
7
|
+
private readonly cache;
|
|
8
|
+
constructor(cache: CacheLike);
|
|
9
|
+
handle(payload: InvalidateCacheTagsPayload): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export default InvalidateCacheTagsJob;
|
|
12
|
+
export type { InvalidateCacheTagsPayload };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RegisteredRoute } from "../../bootstrap/routeRegistry";
|
|
2
|
+
interface OpenApiSpec {
|
|
3
|
+
openapi: string;
|
|
4
|
+
info: {
|
|
5
|
+
title: string;
|
|
6
|
+
version: string;
|
|
7
|
+
};
|
|
8
|
+
servers: Array<{
|
|
9
|
+
url: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
}>;
|
|
12
|
+
paths: Record<string, Record<string, unknown>>;
|
|
13
|
+
components: {
|
|
14
|
+
securitySchemes: Record<string, unknown>;
|
|
15
|
+
schemas?: Record<string, unknown>;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare function generateOpenApiSpec(routes: RegisteredRoute[]): OpenApiSpec;
|
|
19
|
+
declare function renderOpenApiDocument(spec: OpenApiSpec): string;
|
|
20
|
+
declare function renderTypeScriptSdk(spec: OpenApiSpec, apiPrefix?: string): string;
|
|
21
|
+
export type { OpenApiSpec };
|
|
22
|
+
export { generateOpenApiSpec, renderOpenApiDocument, renderTypeScriptSdk };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Queue } from "./index";
|
|
2
|
+
import { createFailedJobService, createQueueWorker, createTrackedJob, type FailedJobService } from "./publicQueue";
|
|
3
|
+
declare const FAILED_JOB_SERVICE_TOKEN = "core.failedJobs";
|
|
4
|
+
declare function registerDefaultJobs(): void;
|
|
5
|
+
declare function createAppQueue(driver: "sync" | "async" | "redis", redisUrl?: string, failedJobs?: FailedJobService): Queue;
|
|
6
|
+
export { createAppQueue, createFailedJobService, createQueueWorker, createTrackedJob, FAILED_JOB_SERVICE_TOKEN, registerDefaultJobs, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface QueueDepthMetrics {
|
|
2
|
+
high: number;
|
|
3
|
+
default: number;
|
|
4
|
+
low: number;
|
|
5
|
+
total: number;
|
|
6
|
+
}
|
|
7
|
+
interface QueueMetricsSnapshot {
|
|
8
|
+
driver: string;
|
|
9
|
+
pending: QueueDepthMetrics;
|
|
10
|
+
failedCount: number;
|
|
11
|
+
}
|
|
12
|
+
declare function readRedisQueueDepth(redisUrl: string): Promise<QueueDepthMetrics>;
|
|
13
|
+
declare function collectQueueMetrics(): Promise<QueueMetricsSnapshot>;
|
|
14
|
+
export type { QueueDepthMetrics, QueueMetricsSnapshot };
|
|
15
|
+
export { collectQueueMetrics, readRedisQueueDepth };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const OAUTH_STATE_COOKIE = "oauth_state";
|
|
2
|
+
declare function createOAuthStateCookie(): {
|
|
3
|
+
state: string;
|
|
4
|
+
cookie: string;
|
|
5
|
+
};
|
|
6
|
+
declare function verifyOAuthState(request: Request, returnedState: string | null): boolean;
|
|
7
|
+
declare function clearOAuthStateCookie(): string;
|
|
8
|
+
export { clearOAuthStateCookie, createOAuthStateCookie, OAUTH_STATE_COOKIE, verifyOAuthState };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const DEFAULT_FETCH_TIMEOUT_MS = 10000;
|
|
2
|
+
interface SafeFetchOptions {
|
|
3
|
+
timeoutMs?: number;
|
|
4
|
+
maxRedirects?: number;
|
|
5
|
+
}
|
|
6
|
+
declare function safeFetch(input: string, init?: RequestInit, options?: SafeFetchOptions): Promise<Response>;
|
|
7
|
+
export type { SafeFetchOptions };
|
|
8
|
+
export { DEFAULT_FETCH_TIMEOUT_MS, safeFetch };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const TEST_SCIM_BEARER_TOKEN = "workhub-scim-test-token";
|
|
2
|
+
export declare const DEFAULT_SCIM_BEARER_TOKEN = "workhub-scim-test-token";
|
|
3
|
+
export declare const SCIM_SCHEMAS: {
|
|
4
|
+
readonly user: "urn:ietf:params:scim:schemas:core:2.0:User";
|
|
5
|
+
readonly group: "urn:ietf:params:scim:schemas:core:2.0:Group";
|
|
6
|
+
readonly listResponse: "urn:ietf:params:scim:api:messages:2.0:ListResponse";
|
|
7
|
+
readonly patchOp: "urn:ietf:params:scim:api:messages:2.0:PatchOp";
|
|
8
|
+
readonly serviceProviderConfig: "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig";
|
|
9
|
+
};
|
|
@@ -1555,24 +1555,24 @@ class Model {
|
|
|
1555
1555
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1556
1556
|
}
|
|
1557
1557
|
static primaryKeyField() {
|
|
1558
|
-
return resolveModelRepository(
|
|
1558
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1559
1559
|
}
|
|
1560
1560
|
static hydrateAttributes(attributes) {
|
|
1561
|
-
const casts = modelStatics(
|
|
1561
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1562
1562
|
return applyCasts(attributes, casts, "hydrate");
|
|
1563
1563
|
}
|
|
1564
1564
|
static dehydrateAttributes(attributes) {
|
|
1565
|
-
const casts = modelStatics(
|
|
1565
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1566
1566
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1567
1567
|
}
|
|
1568
1568
|
static fromRecord(record, repository, exists = true) {
|
|
1569
|
-
const statics = modelStatics(
|
|
1569
|
+
const statics = modelStatics(this);
|
|
1570
1570
|
const hydrated = statics.hydrateAttributes(record);
|
|
1571
1571
|
return new statics(hydrated, repository, exists);
|
|
1572
1572
|
}
|
|
1573
1573
|
static boot() {}
|
|
1574
1574
|
static addGlobalScope(_name, scope) {
|
|
1575
|
-
ensureBooted(
|
|
1575
|
+
ensureBooted(this);
|
|
1576
1576
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1577
1577
|
modelGlobalScopes.set(Model, [
|
|
1578
1578
|
...existing,
|
|
@@ -1604,7 +1604,7 @@ class Model {
|
|
|
1604
1604
|
return statics.fromRecord(record, repository, true);
|
|
1605
1605
|
}
|
|
1606
1606
|
static async find(id) {
|
|
1607
|
-
const statics = modelStatics(
|
|
1607
|
+
const statics = modelStatics(this);
|
|
1608
1608
|
const repository = resolveModelRepository(Model);
|
|
1609
1609
|
const primaryKey = repository.getTable().primaryKey;
|
|
1610
1610
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
package/dist/entries/database.js
CHANGED
|
@@ -1353,24 +1353,24 @@ class Model {
|
|
|
1353
1353
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1354
1354
|
}
|
|
1355
1355
|
static primaryKeyField() {
|
|
1356
|
-
return resolveModelRepository(
|
|
1356
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1357
1357
|
}
|
|
1358
1358
|
static hydrateAttributes(attributes) {
|
|
1359
|
-
const casts = modelStatics(
|
|
1359
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1360
1360
|
return applyCasts(attributes, casts, "hydrate");
|
|
1361
1361
|
}
|
|
1362
1362
|
static dehydrateAttributes(attributes) {
|
|
1363
|
-
const casts = modelStatics(
|
|
1363
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1364
1364
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1365
1365
|
}
|
|
1366
1366
|
static fromRecord(record, repository, exists = true) {
|
|
1367
|
-
const statics = modelStatics(
|
|
1367
|
+
const statics = modelStatics(this);
|
|
1368
1368
|
const hydrated = statics.hydrateAttributes(record);
|
|
1369
1369
|
return new statics(hydrated, repository, exists);
|
|
1370
1370
|
}
|
|
1371
1371
|
static boot() {}
|
|
1372
1372
|
static addGlobalScope(_name, scope) {
|
|
1373
|
-
ensureBooted(
|
|
1373
|
+
ensureBooted(this);
|
|
1374
1374
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1375
1375
|
modelGlobalScopes.set(Model, [
|
|
1376
1376
|
...existing,
|
|
@@ -1402,7 +1402,7 @@ class Model {
|
|
|
1402
1402
|
return statics.fromRecord(record, repository, true);
|
|
1403
1403
|
}
|
|
1404
1404
|
static async find(id) {
|
|
1405
|
-
const statics = modelStatics(
|
|
1405
|
+
const statics = modelStatics(this);
|
|
1406
1406
|
const repository = resolveModelRepository(Model);
|
|
1407
1407
|
const primaryKey = repository.getTable().primaryKey;
|
|
1408
1408
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
|
@@ -1577,24 +1577,24 @@ class Model {
|
|
|
1577
1577
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1578
1578
|
}
|
|
1579
1579
|
static primaryKeyField() {
|
|
1580
|
-
return resolveModelRepository(
|
|
1580
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1581
1581
|
}
|
|
1582
1582
|
static hydrateAttributes(attributes) {
|
|
1583
|
-
const casts = modelStatics(
|
|
1583
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1584
1584
|
return applyCasts(attributes, casts, "hydrate");
|
|
1585
1585
|
}
|
|
1586
1586
|
static dehydrateAttributes(attributes) {
|
|
1587
|
-
const casts = modelStatics(
|
|
1587
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1588
1588
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1589
1589
|
}
|
|
1590
1590
|
static fromRecord(record, repository, exists = true) {
|
|
1591
|
-
const statics = modelStatics(
|
|
1591
|
+
const statics = modelStatics(this);
|
|
1592
1592
|
const hydrated = statics.hydrateAttributes(record);
|
|
1593
1593
|
return new statics(hydrated, repository, exists);
|
|
1594
1594
|
}
|
|
1595
1595
|
static boot() {}
|
|
1596
1596
|
static addGlobalScope(_name, scope) {
|
|
1597
|
-
ensureBooted(
|
|
1597
|
+
ensureBooted(this);
|
|
1598
1598
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1599
1599
|
modelGlobalScopes.set(Model, [
|
|
1600
1600
|
...existing,
|
|
@@ -1626,7 +1626,7 @@ class Model {
|
|
|
1626
1626
|
return statics.fromRecord(record, repository, true);
|
|
1627
1627
|
}
|
|
1628
1628
|
static async find(id) {
|
|
1629
|
-
const statics = modelStatics(
|
|
1629
|
+
const statics = modelStatics(this);
|
|
1630
1630
|
const repository = resolveModelRepository(Model);
|
|
1631
1631
|
const primaryKey = repository.getTable().primaryKey;
|
|
1632
1632
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
package/dist/entries/http.js
CHANGED
|
@@ -1577,24 +1577,24 @@ class Model {
|
|
|
1577
1577
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1578
1578
|
}
|
|
1579
1579
|
static primaryKeyField() {
|
|
1580
|
-
return resolveModelRepository(
|
|
1580
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1581
1581
|
}
|
|
1582
1582
|
static hydrateAttributes(attributes) {
|
|
1583
|
-
const casts = modelStatics(
|
|
1583
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1584
1584
|
return applyCasts(attributes, casts, "hydrate");
|
|
1585
1585
|
}
|
|
1586
1586
|
static dehydrateAttributes(attributes) {
|
|
1587
|
-
const casts = modelStatics(
|
|
1587
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1588
1588
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1589
1589
|
}
|
|
1590
1590
|
static fromRecord(record, repository, exists = true) {
|
|
1591
|
-
const statics = modelStatics(
|
|
1591
|
+
const statics = modelStatics(this);
|
|
1592
1592
|
const hydrated = statics.hydrateAttributes(record);
|
|
1593
1593
|
return new statics(hydrated, repository, exists);
|
|
1594
1594
|
}
|
|
1595
1595
|
static boot() {}
|
|
1596
1596
|
static addGlobalScope(_name, scope) {
|
|
1597
|
-
ensureBooted(
|
|
1597
|
+
ensureBooted(this);
|
|
1598
1598
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1599
1599
|
modelGlobalScopes.set(Model, [
|
|
1600
1600
|
...existing,
|
|
@@ -1626,7 +1626,7 @@ class Model {
|
|
|
1626
1626
|
return statics.fromRecord(record, repository, true);
|
|
1627
1627
|
}
|
|
1628
1628
|
static async find(id) {
|
|
1629
|
-
const statics = modelStatics(
|
|
1629
|
+
const statics = modelStatics(this);
|
|
1630
1630
|
const repository = resolveModelRepository(Model);
|
|
1631
1631
|
const primaryKey = repository.getTable().primaryKey;
|
|
1632
1632
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
|
@@ -1751,24 +1751,24 @@ class Model {
|
|
|
1751
1751
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1752
1752
|
}
|
|
1753
1753
|
static primaryKeyField() {
|
|
1754
|
-
return resolveModelRepository(
|
|
1754
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1755
1755
|
}
|
|
1756
1756
|
static hydrateAttributes(attributes) {
|
|
1757
|
-
const casts = modelStatics(
|
|
1757
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1758
1758
|
return applyCasts(attributes, casts, "hydrate");
|
|
1759
1759
|
}
|
|
1760
1760
|
static dehydrateAttributes(attributes) {
|
|
1761
|
-
const casts = modelStatics(
|
|
1761
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1762
1762
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1763
1763
|
}
|
|
1764
1764
|
static fromRecord(record, repository, exists = true) {
|
|
1765
|
-
const statics = modelStatics(
|
|
1765
|
+
const statics = modelStatics(this);
|
|
1766
1766
|
const hydrated = statics.hydrateAttributes(record);
|
|
1767
1767
|
return new statics(hydrated, repository, exists);
|
|
1768
1768
|
}
|
|
1769
1769
|
static boot() {}
|
|
1770
1770
|
static addGlobalScope(_name, scope) {
|
|
1771
|
-
ensureBooted(
|
|
1771
|
+
ensureBooted(this);
|
|
1772
1772
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1773
1773
|
modelGlobalScopes.set(Model, [
|
|
1774
1774
|
...existing,
|
|
@@ -1800,7 +1800,7 @@ class Model {
|
|
|
1800
1800
|
return statics.fromRecord(record, repository, true);
|
|
1801
1801
|
}
|
|
1802
1802
|
static async find(id) {
|
|
1803
|
-
const statics = modelStatics(
|
|
1803
|
+
const statics = modelStatics(this);
|
|
1804
1804
|
const repository = resolveModelRepository(Model);
|
|
1805
1805
|
const primaryKey = repository.getTable().primaryKey;
|
|
1806
1806
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
|
@@ -1353,24 +1353,24 @@ class Model {
|
|
|
1353
1353
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1354
1354
|
}
|
|
1355
1355
|
static primaryKeyField() {
|
|
1356
|
-
return resolveModelRepository(
|
|
1356
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1357
1357
|
}
|
|
1358
1358
|
static hydrateAttributes(attributes) {
|
|
1359
|
-
const casts = modelStatics(
|
|
1359
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1360
1360
|
return applyCasts(attributes, casts, "hydrate");
|
|
1361
1361
|
}
|
|
1362
1362
|
static dehydrateAttributes(attributes) {
|
|
1363
|
-
const casts = modelStatics(
|
|
1363
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1364
1364
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1365
1365
|
}
|
|
1366
1366
|
static fromRecord(record, repository, exists = true) {
|
|
1367
|
-
const statics = modelStatics(
|
|
1367
|
+
const statics = modelStatics(this);
|
|
1368
1368
|
const hydrated = statics.hydrateAttributes(record);
|
|
1369
1369
|
return new statics(hydrated, repository, exists);
|
|
1370
1370
|
}
|
|
1371
1371
|
static boot() {}
|
|
1372
1372
|
static addGlobalScope(_name, scope) {
|
|
1373
|
-
ensureBooted(
|
|
1373
|
+
ensureBooted(this);
|
|
1374
1374
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1375
1375
|
modelGlobalScopes.set(Model, [
|
|
1376
1376
|
...existing,
|
|
@@ -1402,7 +1402,7 @@ class Model {
|
|
|
1402
1402
|
return statics.fromRecord(record, repository, true);
|
|
1403
1403
|
}
|
|
1404
1404
|
static async find(id) {
|
|
1405
|
-
const statics = modelStatics(
|
|
1405
|
+
const statics = modelStatics(this);
|
|
1406
1406
|
const repository = resolveModelRepository(Model);
|
|
1407
1407
|
const primaryKey = repository.getTable().primaryKey;
|
|
1408
1408
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
|
@@ -1761,24 +1761,24 @@ class Model {
|
|
|
1761
1761
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1762
1762
|
}
|
|
1763
1763
|
static primaryKeyField() {
|
|
1764
|
-
return resolveModelRepository(
|
|
1764
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1765
1765
|
}
|
|
1766
1766
|
static hydrateAttributes(attributes) {
|
|
1767
|
-
const casts = modelStatics(
|
|
1767
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1768
1768
|
return applyCasts(attributes, casts, "hydrate");
|
|
1769
1769
|
}
|
|
1770
1770
|
static dehydrateAttributes(attributes) {
|
|
1771
|
-
const casts = modelStatics(
|
|
1771
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1772
1772
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1773
1773
|
}
|
|
1774
1774
|
static fromRecord(record, repository, exists = true) {
|
|
1775
|
-
const statics = modelStatics(
|
|
1775
|
+
const statics = modelStatics(this);
|
|
1776
1776
|
const hydrated = statics.hydrateAttributes(record);
|
|
1777
1777
|
return new statics(hydrated, repository, exists);
|
|
1778
1778
|
}
|
|
1779
1779
|
static boot() {}
|
|
1780
1780
|
static addGlobalScope(_name, scope) {
|
|
1781
|
-
ensureBooted(
|
|
1781
|
+
ensureBooted(this);
|
|
1782
1782
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1783
1783
|
modelGlobalScopes.set(Model, [
|
|
1784
1784
|
...existing,
|
|
@@ -1810,7 +1810,7 @@ class Model {
|
|
|
1810
1810
|
return statics.fromRecord(record, repository, true);
|
|
1811
1811
|
}
|
|
1812
1812
|
static async find(id) {
|
|
1813
|
-
const statics = modelStatics(
|
|
1813
|
+
const statics = modelStatics(this);
|
|
1814
1814
|
const repository = resolveModelRepository(Model);
|
|
1815
1815
|
const primaryKey = repository.getTable().primaryKey;
|
|
1816
1816
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
package/dist/entries/view.js
CHANGED
|
@@ -1562,24 +1562,24 @@ class Model {
|
|
|
1562
1562
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1563
1563
|
}
|
|
1564
1564
|
static primaryKeyField() {
|
|
1565
|
-
return resolveModelRepository(
|
|
1565
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1566
1566
|
}
|
|
1567
1567
|
static hydrateAttributes(attributes) {
|
|
1568
|
-
const casts = modelStatics(
|
|
1568
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1569
1569
|
return applyCasts(attributes, casts, "hydrate");
|
|
1570
1570
|
}
|
|
1571
1571
|
static dehydrateAttributes(attributes) {
|
|
1572
|
-
const casts = modelStatics(
|
|
1572
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1573
1573
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1574
1574
|
}
|
|
1575
1575
|
static fromRecord(record, repository, exists = true) {
|
|
1576
|
-
const statics = modelStatics(
|
|
1576
|
+
const statics = modelStatics(this);
|
|
1577
1577
|
const hydrated = statics.hydrateAttributes(record);
|
|
1578
1578
|
return new statics(hydrated, repository, exists);
|
|
1579
1579
|
}
|
|
1580
1580
|
static boot() {}
|
|
1581
1581
|
static addGlobalScope(_name, scope) {
|
|
1582
|
-
ensureBooted(
|
|
1582
|
+
ensureBooted(this);
|
|
1583
1583
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1584
1584
|
modelGlobalScopes.set(Model, [
|
|
1585
1585
|
...existing,
|
|
@@ -1611,7 +1611,7 @@ class Model {
|
|
|
1611
1611
|
return statics.fromRecord(record, repository, true);
|
|
1612
1612
|
}
|
|
1613
1613
|
static async find(id) {
|
|
1614
|
-
const statics = modelStatics(
|
|
1614
|
+
const statics = modelStatics(this);
|
|
1615
1615
|
const repository = resolveModelRepository(Model);
|
|
1616
1616
|
const primaryKey = repository.getTable().primaryKey;
|
|
1617
1617
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
package/dist/index.js
CHANGED
|
@@ -1747,24 +1747,24 @@ class Model {
|
|
|
1747
1747
|
throw new Error(`${this.constructor.name}.primaryKey() is not implemented.`);
|
|
1748
1748
|
}
|
|
1749
1749
|
static primaryKeyField() {
|
|
1750
|
-
return resolveModelRepository(
|
|
1750
|
+
return resolveModelRepository(this).getTable().primaryKey;
|
|
1751
1751
|
}
|
|
1752
1752
|
static hydrateAttributes(attributes) {
|
|
1753
|
-
const casts = modelStatics(
|
|
1753
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1754
1754
|
return applyCasts(attributes, casts, "hydrate");
|
|
1755
1755
|
}
|
|
1756
1756
|
static dehydrateAttributes(attributes) {
|
|
1757
|
-
const casts = modelStatics(
|
|
1757
|
+
const casts = modelStatics(this).$casts ?? {};
|
|
1758
1758
|
return applyCasts(attributes, casts, "dehydrate");
|
|
1759
1759
|
}
|
|
1760
1760
|
static fromRecord(record, repository, exists = true) {
|
|
1761
|
-
const statics = modelStatics(
|
|
1761
|
+
const statics = modelStatics(this);
|
|
1762
1762
|
const hydrated = statics.hydrateAttributes(record);
|
|
1763
1763
|
return new statics(hydrated, repository, exists);
|
|
1764
1764
|
}
|
|
1765
1765
|
static boot() {}
|
|
1766
1766
|
static addGlobalScope(_name, scope) {
|
|
1767
|
-
ensureBooted(
|
|
1767
|
+
ensureBooted(this);
|
|
1768
1768
|
const existing = modelGlobalScopes.get(Model) ?? [];
|
|
1769
1769
|
modelGlobalScopes.set(Model, [
|
|
1770
1770
|
...existing,
|
|
@@ -1796,7 +1796,7 @@ class Model {
|
|
|
1796
1796
|
return statics.fromRecord(record, repository, true);
|
|
1797
1797
|
}
|
|
1798
1798
|
static async find(id) {
|
|
1799
|
-
const statics = modelStatics(
|
|
1799
|
+
const statics = modelStatics(this);
|
|
1800
1800
|
const repository = resolveModelRepository(Model);
|
|
1801
1801
|
const primaryKey = repository.getTable().primaryKey;
|
|
1802
1802
|
const record = await Model.query.call(Model).where({ [primaryKey]: id }).first();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getstrata/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Strata — Laravel-inspired Bun framework public API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,287 +16,287 @@
|
|
|
16
16
|
"default": "./dist/index.js"
|
|
17
17
|
},
|
|
18
18
|
"./auth/accessControl": {
|
|
19
|
-
"types": "./dist/
|
|
19
|
+
"types": "./dist/core/auth/accessControl.d.ts",
|
|
20
20
|
"import": "./dist/entries/auth/accessControl.js",
|
|
21
21
|
"default": "./dist/entries/auth/accessControl.js"
|
|
22
22
|
},
|
|
23
23
|
"./auth/authContext": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/core/auth/authContext.d.ts",
|
|
25
25
|
"import": "./dist/entries/auth/authContext.js",
|
|
26
26
|
"default": "./dist/entries/auth/authContext.js"
|
|
27
27
|
},
|
|
28
28
|
"./auth/guard": {
|
|
29
|
-
"types": "./dist/
|
|
29
|
+
"types": "./dist/core/auth/guard.d.ts",
|
|
30
30
|
"import": "./dist/entries/auth/guard.js",
|
|
31
31
|
"default": "./dist/entries/auth/guard.js"
|
|
32
32
|
},
|
|
33
33
|
"./auth/membershipContext": {
|
|
34
|
-
"types": "./dist/
|
|
34
|
+
"types": "./dist/core/auth/membershipContext.d.ts",
|
|
35
35
|
"import": "./dist/entries/auth/membershipContext.js",
|
|
36
36
|
"default": "./dist/entries/auth/membershipContext.js"
|
|
37
37
|
},
|
|
38
38
|
"./auth/membershipScope": {
|
|
39
|
-
"types": "./dist/
|
|
39
|
+
"types": "./dist/core/auth/membershipScope.d.ts",
|
|
40
40
|
"import": "./dist/entries/auth/membershipScope.js",
|
|
41
41
|
"default": "./dist/entries/auth/membershipScope.js"
|
|
42
42
|
},
|
|
43
43
|
"./auth/membershipService": {
|
|
44
|
-
"types": "./dist/
|
|
44
|
+
"types": "./dist/core/auth/membershipService.d.ts",
|
|
45
45
|
"import": "./dist/entries/auth/membershipService.js",
|
|
46
46
|
"default": "./dist/entries/auth/membershipService.js"
|
|
47
47
|
},
|
|
48
48
|
"./auth/oauth/oidcProvider": {
|
|
49
|
-
"types": "./dist/
|
|
49
|
+
"types": "./dist/core/auth/oauth/oidcProvider.d.ts",
|
|
50
50
|
"import": "./dist/entries/auth/oauth/oidcProvider.js",
|
|
51
51
|
"default": "./dist/entries/auth/oauth/oidcProvider.js"
|
|
52
52
|
},
|
|
53
53
|
"./auth/oauth/providers": {
|
|
54
|
-
"types": "./dist/
|
|
54
|
+
"types": "./dist/core/auth/oauth/providers.d.ts",
|
|
55
55
|
"import": "./dist/entries/auth/oauth/providers.js",
|
|
56
56
|
"default": "./dist/entries/auth/oauth/providers.js"
|
|
57
57
|
},
|
|
58
58
|
"./auth/oauth/samlProvider": {
|
|
59
|
-
"types": "./dist/
|
|
59
|
+
"types": "./dist/core/auth/oauth/samlProvider.d.ts",
|
|
60
60
|
"import": "./dist/entries/auth/oauth/samlProvider.js",
|
|
61
61
|
"default": "./dist/entries/auth/oauth/samlProvider.js"
|
|
62
62
|
},
|
|
63
63
|
"./auth/oauth/types": {
|
|
64
|
-
"types": "./dist/
|
|
64
|
+
"types": "./dist/core/auth/oauth/types.d.ts",
|
|
65
65
|
"import": "./dist/entries/auth/oauth/types.js",
|
|
66
66
|
"default": "./dist/entries/auth/oauth/types.js"
|
|
67
67
|
},
|
|
68
68
|
"./auth/password": {
|
|
69
|
-
"types": "./dist/
|
|
69
|
+
"types": "./dist/core/auth/password.d.ts",
|
|
70
70
|
"import": "./dist/entries/auth/password.js",
|
|
71
71
|
"default": "./dist/entries/auth/password.js"
|
|
72
72
|
},
|
|
73
73
|
"./auth/policy": {
|
|
74
|
-
"types": "./dist/
|
|
74
|
+
"types": "./dist/core/auth/policy.d.ts",
|
|
75
75
|
"import": "./dist/entries/auth/policy.js",
|
|
76
76
|
"default": "./dist/entries/auth/policy.js"
|
|
77
77
|
},
|
|
78
78
|
"./auth/sessionCookie": {
|
|
79
|
-
"types": "./dist/
|
|
79
|
+
"types": "./dist/core/auth/sessionCookie.d.ts",
|
|
80
80
|
"import": "./dist/entries/auth/sessionCookie.js",
|
|
81
81
|
"default": "./dist/entries/auth/sessionCookie.js"
|
|
82
82
|
},
|
|
83
83
|
"./auth/tokenHash": {
|
|
84
|
-
"types": "./dist/
|
|
84
|
+
"types": "./dist/core/auth/tokenHash.d.ts",
|
|
85
85
|
"import": "./dist/entries/auth/tokenHash.js",
|
|
86
86
|
"default": "./dist/entries/auth/tokenHash.js"
|
|
87
87
|
},
|
|
88
88
|
"./cache/tags": {
|
|
89
|
-
"types": "./dist/
|
|
89
|
+
"types": "./dist/core/cache/tags.d.ts",
|
|
90
90
|
"import": "./dist/entries/cache/tags.js",
|
|
91
91
|
"default": "./dist/entries/cache/tags.js"
|
|
92
92
|
},
|
|
93
93
|
"./crypto/fieldEncryption": {
|
|
94
|
-
"types": "./dist/
|
|
94
|
+
"types": "./dist/core/crypto/fieldEncryption.d.ts",
|
|
95
95
|
"import": "./dist/entries/crypto/fieldEncryption.js",
|
|
96
96
|
"default": "./dist/entries/crypto/fieldEncryption.js"
|
|
97
97
|
},
|
|
98
98
|
"./crypto/mfaSecret": {
|
|
99
|
-
"types": "./dist/
|
|
99
|
+
"types": "./dist/core/crypto/mfaSecret.d.ts",
|
|
100
100
|
"import": "./dist/entries/crypto/mfaSecret.js",
|
|
101
101
|
"default": "./dist/entries/crypto/mfaSecret.js"
|
|
102
102
|
},
|
|
103
103
|
"./database": {
|
|
104
|
-
"types": "./dist/
|
|
104
|
+
"types": "./dist/core/database/index.d.ts",
|
|
105
105
|
"import": "./dist/entries/database.js",
|
|
106
106
|
"default": "./dist/entries/database.js"
|
|
107
107
|
},
|
|
108
108
|
"./database/factory": {
|
|
109
|
-
"types": "./dist/
|
|
109
|
+
"types": "./dist/core/database/factory.d.ts",
|
|
110
110
|
"import": "./dist/entries/database/factory.js",
|
|
111
111
|
"default": "./dist/entries/database/factory.js"
|
|
112
112
|
},
|
|
113
113
|
"./database/seeders": {
|
|
114
|
-
"types": "./dist/
|
|
114
|
+
"types": "./dist/core/database/seeders/runner.d.ts",
|
|
115
115
|
"import": "./dist/entries/database/seeders.js",
|
|
116
116
|
"default": "./dist/entries/database/seeders.js"
|
|
117
117
|
},
|
|
118
118
|
"./database/types": {
|
|
119
|
-
"types": "./dist/
|
|
119
|
+
"types": "./dist/core/database/types.d.ts",
|
|
120
120
|
"import": "./dist/entries/database/types.js",
|
|
121
121
|
"default": "./dist/entries/database/types.js"
|
|
122
122
|
},
|
|
123
123
|
"./errors/http": {
|
|
124
|
-
"types": "./dist/
|
|
124
|
+
"types": "./dist/core/errors/http.d.ts",
|
|
125
125
|
"import": "./dist/entries/errors/http.js",
|
|
126
126
|
"default": "./dist/entries/errors/http.js"
|
|
127
127
|
},
|
|
128
128
|
"./http": {
|
|
129
|
-
"types": "./dist/
|
|
129
|
+
"types": "./dist/core/http/index.d.ts",
|
|
130
130
|
"import": "./dist/entries/http.js",
|
|
131
131
|
"default": "./dist/entries/http.js"
|
|
132
132
|
},
|
|
133
133
|
"./http/contentNegotiation": {
|
|
134
|
-
"types": "./dist/
|
|
134
|
+
"types": "./dist/core/http/contentNegotiation.d.ts",
|
|
135
135
|
"import": "./dist/entries/http/contentNegotiation.js",
|
|
136
136
|
"default": "./dist/entries/http/contentNegotiation.js"
|
|
137
137
|
},
|
|
138
138
|
"./http/csrfToken": {
|
|
139
|
-
"types": "./dist/
|
|
139
|
+
"types": "./dist/core/http/csrfToken.d.ts",
|
|
140
140
|
"import": "./dist/entries/http/csrfToken.js",
|
|
141
141
|
"default": "./dist/entries/http/csrfToken.js"
|
|
142
142
|
},
|
|
143
143
|
"./http/etag": {
|
|
144
|
-
"types": "./dist/
|
|
144
|
+
"types": "./dist/core/http/etag.d.ts",
|
|
145
145
|
"import": "./dist/entries/http/etag.js",
|
|
146
146
|
"default": "./dist/entries/http/etag.js"
|
|
147
147
|
},
|
|
148
148
|
"./http/flashSession": {
|
|
149
|
-
"types": "./dist/
|
|
149
|
+
"types": "./dist/core/http/flashSession.d.ts",
|
|
150
150
|
"import": "./dist/entries/http/flashSession.js",
|
|
151
151
|
"default": "./dist/entries/http/flashSession.js"
|
|
152
152
|
},
|
|
153
153
|
"./http/middleware": {
|
|
154
|
-
"types": "./dist/
|
|
154
|
+
"types": "./dist/core/http/middleware.d.ts",
|
|
155
155
|
"import": "./dist/entries/http/middleware.js",
|
|
156
156
|
"default": "./dist/entries/http/middleware.js"
|
|
157
157
|
},
|
|
158
158
|
"./http/parseFormBody": {
|
|
159
|
-
"types": "./dist/
|
|
159
|
+
"types": "./dist/core/http/parseFormBody.d.ts",
|
|
160
160
|
"import": "./dist/entries/http/parseFormBody.js",
|
|
161
161
|
"default": "./dist/entries/http/parseFormBody.js"
|
|
162
162
|
},
|
|
163
163
|
"./http/resources": {
|
|
164
|
-
"types": "./dist/
|
|
164
|
+
"types": "./dist/core/http/resources.d.ts",
|
|
165
165
|
"import": "./dist/entries/http/resources.js",
|
|
166
166
|
"default": "./dist/entries/http/resources.js"
|
|
167
167
|
},
|
|
168
168
|
"./http/requestMetaContext": {
|
|
169
|
-
"types": "./dist/
|
|
169
|
+
"types": "./dist/core/http/requestMetaContext.d.ts",
|
|
170
170
|
"import": "./dist/entries/http/requestMetaContext.js",
|
|
171
171
|
"default": "./dist/entries/http/requestMetaContext.js"
|
|
172
172
|
},
|
|
173
173
|
"./http/webErrorResponse": {
|
|
174
|
-
"types": "./dist/
|
|
174
|
+
"types": "./dist/core/http/webErrorResponse.d.ts",
|
|
175
175
|
"import": "./dist/entries/http/webErrorResponse.js",
|
|
176
176
|
"default": "./dist/entries/http/webErrorResponse.js"
|
|
177
177
|
},
|
|
178
178
|
"./http/webFormRequest": {
|
|
179
|
-
"types": "./dist/
|
|
179
|
+
"types": "./dist/core/http/webFormRequest.d.ts",
|
|
180
180
|
"import": "./dist/entries/http/webFormRequest.js",
|
|
181
181
|
"default": "./dist/entries/http/webFormRequest.js"
|
|
182
182
|
},
|
|
183
183
|
"./jobs/dispatchWebhookJob": {
|
|
184
|
-
"types": "./dist/
|
|
184
|
+
"types": "./dist/core/jobs/dispatchWebhookJob.d.ts",
|
|
185
185
|
"import": "./dist/entries/jobs/dispatchWebhookJob.js",
|
|
186
186
|
"default": "./dist/entries/jobs/dispatchWebhookJob.js"
|
|
187
187
|
},
|
|
188
188
|
"./lifecycle/gracefulShutdown": {
|
|
189
|
-
"types": "./dist/
|
|
189
|
+
"types": "./dist/core/lifecycle/gracefulShutdown.d.ts",
|
|
190
190
|
"import": "./dist/entries/lifecycle/gracefulShutdown.js",
|
|
191
191
|
"default": "./dist/entries/lifecycle/gracefulShutdown.js"
|
|
192
192
|
},
|
|
193
193
|
"./metrics/prometheus": {
|
|
194
|
-
"types": "./dist/
|
|
194
|
+
"types": "./dist/core/metrics/prometheus.d.ts",
|
|
195
195
|
"import": "./dist/entries/metrics/prometheus.js",
|
|
196
196
|
"default": "./dist/entries/metrics/prometheus.js"
|
|
197
197
|
},
|
|
198
198
|
"./pagination": {
|
|
199
|
-
"types": "./dist/
|
|
199
|
+
"types": "./dist/core/pagination/index.d.ts",
|
|
200
200
|
"import": "./dist/entries/pagination.js",
|
|
201
201
|
"default": "./dist/entries/pagination.js"
|
|
202
202
|
},
|
|
203
203
|
"./queue/createAppQueue": {
|
|
204
|
-
"types": "./dist/
|
|
204
|
+
"types": "./dist/core/queue/createAppQueue.d.ts",
|
|
205
205
|
"import": "./dist/entries/queue/createAppQueue.js",
|
|
206
206
|
"default": "./dist/entries/queue/createAppQueue.js"
|
|
207
207
|
},
|
|
208
208
|
"./queue/failedJobService": {
|
|
209
|
-
"types": "./dist/
|
|
209
|
+
"types": "./dist/core/queue/failedJobService.d.ts",
|
|
210
210
|
"import": "./dist/entries/queue/failedJobService.js",
|
|
211
211
|
"default": "./dist/entries/queue/failedJobService.js"
|
|
212
212
|
},
|
|
213
213
|
"./queue/jobRegistry": {
|
|
214
|
-
"types": "./dist/
|
|
214
|
+
"types": "./dist/core/queue/jobRegistry.d.ts",
|
|
215
215
|
"import": "./dist/entries/queue/jobRegistry.js",
|
|
216
216
|
"default": "./dist/entries/queue/jobRegistry.js"
|
|
217
217
|
},
|
|
218
218
|
"./queue/jobRunner": {
|
|
219
|
-
"types": "./dist/
|
|
219
|
+
"types": "./dist/core/queue/jobRunner.d.ts",
|
|
220
220
|
"import": "./dist/entries/queue/jobRunner.js",
|
|
221
221
|
"default": "./dist/entries/queue/jobRunner.js"
|
|
222
222
|
},
|
|
223
223
|
"./queue/queueMetrics": {
|
|
224
|
-
"types": "./dist/
|
|
224
|
+
"types": "./dist/core/queue/queueMetrics.d.ts",
|
|
225
225
|
"import": "./dist/entries/queue/queueMetrics.js",
|
|
226
226
|
"default": "./dist/entries/queue/queueMetrics.js"
|
|
227
227
|
},
|
|
228
228
|
"./queue/publicQueue": {
|
|
229
|
-
"types": "./dist/
|
|
229
|
+
"types": "./dist/core/queue/publicQueue.d.ts",
|
|
230
230
|
"import": "./dist/entries/queue/publicQueue.js",
|
|
231
231
|
"default": "./dist/entries/queue/publicQueue.js"
|
|
232
232
|
},
|
|
233
233
|
"./queue/types": {
|
|
234
|
-
"types": "./dist/
|
|
234
|
+
"types": "./dist/core/queue/types.d.ts",
|
|
235
235
|
"import": "./dist/entries/queue/types.js",
|
|
236
236
|
"default": "./dist/entries/queue/types.js"
|
|
237
237
|
},
|
|
238
238
|
"./security/oauthState": {
|
|
239
|
-
"types": "./dist/
|
|
239
|
+
"types": "./dist/core/security/oauthState.d.ts",
|
|
240
240
|
"import": "./dist/entries/security/oauthState.js",
|
|
241
241
|
"default": "./dist/entries/security/oauthState.js"
|
|
242
242
|
},
|
|
243
243
|
"./security/publicReads": {
|
|
244
|
-
"types": "./dist/
|
|
244
|
+
"types": "./dist/core/security/publicReads.d.ts",
|
|
245
245
|
"import": "./dist/entries/security/publicReads.js",
|
|
246
246
|
"default": "./dist/entries/security/publicReads.js"
|
|
247
247
|
},
|
|
248
248
|
"./security/safeUrl": {
|
|
249
|
-
"types": "./dist/
|
|
249
|
+
"types": "./dist/core/security/safeUrl.d.ts",
|
|
250
250
|
"import": "./dist/entries/security/safeUrl.js",
|
|
251
251
|
"default": "./dist/entries/security/safeUrl.js"
|
|
252
252
|
},
|
|
253
253
|
"./security/securityEvents": {
|
|
254
|
-
"types": "./dist/
|
|
254
|
+
"types": "./dist/core/security/securityEvents.d.ts",
|
|
255
255
|
"import": "./dist/entries/security/securityEvents.js",
|
|
256
256
|
"default": "./dist/entries/security/securityEvents.js"
|
|
257
257
|
},
|
|
258
258
|
"./security/stripeWebhook": {
|
|
259
|
-
"types": "./dist/
|
|
259
|
+
"types": "./dist/core/security/stripeWebhook.d.ts",
|
|
260
260
|
"import": "./dist/entries/security/stripeWebhook.js",
|
|
261
261
|
"default": "./dist/entries/security/stripeWebhook.js"
|
|
262
262
|
},
|
|
263
263
|
"./security/tokenExpiry": {
|
|
264
|
-
"types": "./dist/
|
|
264
|
+
"types": "./dist/core/security/tokenExpiry.d.ts",
|
|
265
265
|
"import": "./dist/entries/security/tokenExpiry.js",
|
|
266
266
|
"default": "./dist/entries/security/tokenExpiry.js"
|
|
267
267
|
},
|
|
268
268
|
"./security/totp": {
|
|
269
|
-
"types": "./dist/
|
|
269
|
+
"types": "./dist/core/security/totp.d.ts",
|
|
270
270
|
"import": "./dist/entries/security/totp.js",
|
|
271
271
|
"default": "./dist/entries/security/totp.js"
|
|
272
272
|
},
|
|
273
273
|
"./storage/storage": {
|
|
274
|
-
"types": "./dist/
|
|
274
|
+
"types": "./dist/core/storage/storage.d.ts",
|
|
275
275
|
"import": "./dist/entries/storage/storage.js",
|
|
276
276
|
"default": "./dist/entries/storage/storage.js"
|
|
277
277
|
},
|
|
278
278
|
"./tenant/tenantContext": {
|
|
279
|
-
"types": "./dist/
|
|
279
|
+
"types": "./dist/core/tenant/tenantContext.d.ts",
|
|
280
280
|
"import": "./dist/entries/tenant/tenantContext.js",
|
|
281
281
|
"default": "./dist/entries/tenant/tenantContext.js"
|
|
282
282
|
},
|
|
283
283
|
"./tenant/tenantMiddleware": {
|
|
284
|
-
"types": "./dist/
|
|
284
|
+
"types": "./dist/core/tenant/tenantMiddleware.d.ts",
|
|
285
285
|
"import": "./dist/entries/tenant/tenantMiddleware.js",
|
|
286
286
|
"default": "./dist/entries/tenant/tenantMiddleware.js"
|
|
287
287
|
},
|
|
288
288
|
"./tracing/traceContext": {
|
|
289
|
-
"types": "./dist/
|
|
289
|
+
"types": "./dist/core/tracing/traceContext.d.ts",
|
|
290
290
|
"import": "./dist/entries/tracing/traceContext.js",
|
|
291
291
|
"default": "./dist/entries/tracing/traceContext.js"
|
|
292
292
|
},
|
|
293
293
|
"./validation/rules": {
|
|
294
|
-
"types": "./dist/
|
|
294
|
+
"types": "./dist/core/validation/rules.d.ts",
|
|
295
295
|
"import": "./dist/entries/validation/rules.js",
|
|
296
296
|
"default": "./dist/entries/validation/rules.js"
|
|
297
297
|
},
|
|
298
298
|
"./view": {
|
|
299
|
-
"types": "./dist/
|
|
299
|
+
"types": "./dist/core/view/index.d.ts",
|
|
300
300
|
"import": "./dist/entries/view.js",
|
|
301
301
|
"default": "./dist/entries/view.js"
|
|
302
302
|
}
|