@getstrata/core 2.2.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/core/contracts/serviceTokens.d.ts +3 -2
- package/dist/core/http/requestMetaContext.d.ts +2 -0
- package/dist/core/queue/createAppQueue.d.ts +2 -1
- package/dist/core/queue/failedJobService.d.ts +3 -1
- package/dist/core/queue/index.d.ts +10 -2
- package/dist/core/queue/jobRunner.d.ts +7 -1
- package/dist/core/queue/publicQueue.d.ts +2 -1
- package/dist/core/queue/queueConfig.d.ts +3 -0
- package/dist/core/queue/redisQueue.d.ts +5 -7
- package/dist/core/queue/redisQueueKeys.d.ts +8 -0
- package/dist/core/queue/redisStreams.d.ts +73 -0
- package/dist/core/queue/types.d.ts +1 -0
- package/dist/core/tenant/publicTenantHost.d.ts +11 -0
- package/dist/core/tenant/tenantMiddleware.d.ts +4 -0
- package/dist/entries/auth/basicAuthGuard.js +1 -0
- package/dist/entries/auth/jwtGuard.js +1 -0
- package/dist/entries/auth/sessionGuard.js +1 -0
- package/dist/entries/contracts/serviceTokens.js +2 -0
- package/dist/entries/queue/createAppQueue.js +681 -66
- package/dist/entries/queue/failedJobRepository.js +1 -1
- package/dist/entries/queue/failedJobService.js +5 -1
- package/dist/entries/queue/jobRunner.js +67 -2
- package/dist/entries/queue/publicQueue.js +679 -65
- package/dist/entries/queue/queueMetrics.js +694 -72
- package/dist/entries/queue/redisQueue.js +765 -148
- package/dist/framework/public-api.d.ts +2 -2
- package/dist/index.js +711 -67
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @getstrata/core changelog
|
|
2
2
|
|
|
3
|
+
## 2.2.1
|
|
4
|
+
|
|
5
|
+
F02 — complete queue durability. Queues have leased reservations, recovery and fenced acknowledgement, but still use Redis lists. Persisted retry schedules, execution deadlines, cancellation and the planned Streams migration remain unfinished. Retries currently wait inside the running worker.
|
|
6
|
+
F10 — production public-route tenancy. Separate anonymous access from development tenant headers, support a trusted-host resolver, reject unknown hosts, and accept forwarded hosts only through configured trusted proxies. The shop still lacks the approved-domain mapping.
|
|
7
|
+
F12 — initial administrator provisioning and migration guidance. Automatic demo seeding is fixed. Secure initial-admin provisioning and a consolidated upgrade/operations guide remain.
|
|
8
|
+
Distributed qualification. Cache generations/fill leases, scheduler ownership, OpenTelemetry, body limits and lifecycle controls now exist. Their implementation should no longer be described as entirely pending, but broader failure and capacity qualification is still required.
|
|
9
|
+
|
|
3
10
|
## 2.2.0
|
|
4
11
|
|
|
5
12
|
Consistent model scopes.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { AbilityChecker } from "../auth/abilityChecker";
|
|
2
2
|
import type { ThrottleQuotaPolicy } from "../http/throttleMiddleware";
|
|
3
|
-
import type { TenantResolver } from "../tenant/tenantMiddleware";
|
|
3
|
+
import type { PublicTenancyOptions, TenantResolver } from "../tenant/tenantMiddleware";
|
|
4
4
|
import type { AuthUserDirectory } from "./authUserDirectory";
|
|
5
5
|
import type { ServiceContainerLike } from "./container";
|
|
6
6
|
declare const CORE_THROTTLE_QUOTA_POLICY_TOKEN: import("./container").ServiceToken<ThrottleQuotaPolicy>;
|
|
7
|
+
declare const CORE_PUBLIC_TENANCY_TOKEN: import("./container").ServiceToken<PublicTenancyOptions>;
|
|
7
8
|
declare const CORE_TENANT_RESOLVER_TOKEN: import("./container").ServiceToken<TenantResolver>;
|
|
8
9
|
declare const CORE_HTTP_CLEANUP_TOKEN: import("./container").ServiceToken<(cleanup: () => void) => void>;
|
|
9
10
|
declare const CORE_CONFIG_TOKEN = "core.config";
|
|
@@ -19,4 +20,4 @@ declare function isAbilityChecker(value: unknown): value is AbilityChecker;
|
|
|
19
20
|
declare function isAuthUserDirectory(value: unknown): value is AuthUserDirectory;
|
|
20
21
|
declare function resolveAbilityChecker(container: ServiceContainerLike): AbilityChecker;
|
|
21
22
|
declare function resolveAuthUserDirectory(container: ServiceContainerLike): AuthUserDirectory | null;
|
|
22
|
-
export { CORE_ABILITY_CHECKER_TOKEN, CORE_AUTH_TOKEN, CORE_AUTH_USER_DIRECTORY_TOKEN, CORE_CACHE_TOKEN, CORE_CONFIG_TOKEN, CORE_EVENT_BUS_TOKEN, CORE_HTTP_CLEANUP_TOKEN, CORE_POLICY_GATE_TOKEN, CORE_QUEUE_TOKEN, CORE_TENANT_RESOLVER_TOKEN, CORE_THROTTLE_QUOTA_POLICY_TOKEN, CORE_TOKEN_SERVICE_TOKEN, isAbilityChecker, isAuthUserDirectory, resolveAbilityChecker, resolveAuthUserDirectory, };
|
|
23
|
+
export { CORE_ABILITY_CHECKER_TOKEN, CORE_AUTH_TOKEN, CORE_AUTH_USER_DIRECTORY_TOKEN, CORE_CACHE_TOKEN, CORE_CONFIG_TOKEN, CORE_EVENT_BUS_TOKEN, CORE_HTTP_CLEANUP_TOKEN, CORE_POLICY_GATE_TOKEN, CORE_PUBLIC_TENANCY_TOKEN, CORE_QUEUE_TOKEN, CORE_TENANT_RESOLVER_TOKEN, CORE_THROTTLE_QUOTA_POLICY_TOKEN, CORE_TOKEN_SERVICE_TOKEN, isAbilityChecker, isAuthUserDirectory, resolveAbilityChecker, resolveAuthUserDirectory, };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type RequestMeta = {
|
|
2
2
|
ipAddress: string | null;
|
|
3
|
+
/** Immediate socket peer recorded by the transport; never a forwarded client header. */
|
|
4
|
+
peerAddress?: string | null;
|
|
3
5
|
userAgent: string | null;
|
|
4
6
|
request?: Request;
|
|
5
7
|
/** Registered route template; never a URL supplied by the client. */
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Queue } from "./index";
|
|
2
2
|
import { createFailedJobService, createQueueWorker, createTrackedJob, type FailedJobService } from "./publicQueue";
|
|
3
|
+
import { resolveQueueConfig } from "./queueConfig";
|
|
3
4
|
declare const FAILED_JOB_SERVICE_TOKEN = "core.failedJobs";
|
|
4
5
|
declare function createAppQueue(driver: "sync" | "async" | "redis", redisUrl?: string, failedJobs?: FailedJobService, registerJobs?: () => void): Queue;
|
|
5
|
-
export { createAppQueue, createFailedJobService, createQueueWorker, createTrackedJob, FAILED_JOB_SERVICE_TOKEN, };
|
|
6
|
+
export { createAppQueue, createFailedJobService, createQueueWorker, createTrackedJob, FAILED_JOB_SERVICE_TOKEN, resolveQueueConfig, };
|
|
@@ -5,11 +5,13 @@ declare class FailedJobService {
|
|
|
5
5
|
constructor(repository: FailedJobRepository);
|
|
6
6
|
recordFailure(input: {
|
|
7
7
|
jobName: string;
|
|
8
|
+
jobId?: string;
|
|
8
9
|
payload: Record<string, unknown>;
|
|
9
10
|
exception: string;
|
|
10
11
|
}): Promise<FailedJobRecord>;
|
|
11
12
|
listRecent(limit?: number): Promise<FailedJobRecord[]>;
|
|
12
|
-
|
|
13
|
+
/** Admit the replay before deleting its recovery record. Delivery remains at least once. */
|
|
14
|
+
retry(id: number, enqueue: (record: FailedJobRecord) => Promise<void>): Promise<FailedJobRecord>;
|
|
13
15
|
delete(id: number): Promise<void>;
|
|
14
16
|
flush(): Promise<number>;
|
|
15
17
|
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
type QueuePriority = "high" | "default" | "low";
|
|
2
|
+
/** Logical identity is stable across automatic recovery and supported manual replay. */
|
|
3
|
+
interface JobContext {
|
|
4
|
+
readonly jobId: string;
|
|
5
|
+
readonly signal: AbortSignal;
|
|
6
|
+
readonly deadlineAtMs?: number;
|
|
7
|
+
}
|
|
2
8
|
declare abstract class Job<TPayload extends object = object> {
|
|
3
9
|
static readonly jobName?: string;
|
|
4
10
|
readonly maxAttempts?: number;
|
|
5
11
|
readonly backoffMs?: number;
|
|
6
12
|
readonly priority?: QueuePriority;
|
|
7
13
|
constructor();
|
|
8
|
-
abstract handle(payload: TPayload): Promise<void>;
|
|
14
|
+
abstract handle(payload: TPayload, context?: JobContext): Promise<void>;
|
|
9
15
|
}
|
|
10
16
|
interface Queue {
|
|
11
17
|
close?(): void | Promise<void>;
|
|
18
|
+
/** Preserve a stored logical identity on deliberate replay; reset execution controls. */
|
|
19
|
+
replay?<TPayload extends object>(job: Job<TPayload>, payload: TPayload, jobId: string): Promise<void>;
|
|
12
20
|
dispatch<TPayload extends object>(job: Job<TPayload>, payload: TPayload): Promise<void>;
|
|
13
21
|
}
|
|
14
22
|
declare class SyncQueue implements Queue {
|
|
@@ -24,5 +32,5 @@ declare class AsyncQueue implements Queue {
|
|
|
24
32
|
close(): Promise<void>;
|
|
25
33
|
}
|
|
26
34
|
declare function createQueue(driver: "sync" | "async"): Queue;
|
|
27
|
-
export type { Queue, QueuePriority };
|
|
35
|
+
export type { JobContext, Queue, QueuePriority };
|
|
28
36
|
export { AsyncQueue, createQueue, Job, SyncQueue };
|
|
@@ -3,9 +3,15 @@ interface QueueJobEnvelope {
|
|
|
3
3
|
name: string;
|
|
4
4
|
payload: Record<string, unknown>;
|
|
5
5
|
attempts?: number;
|
|
6
|
+
jobId?: string;
|
|
7
|
+
deadlineAtMs?: number;
|
|
8
|
+
cancellable?: boolean;
|
|
6
9
|
}
|
|
10
|
+
declare function parseQueueJobEnvelope(rawPayload: string): QueueJobEnvelope | null;
|
|
7
11
|
declare function runQueueJob(envelope: QueueJobEnvelope, failedJobs: FailedJobService, options?: {
|
|
8
12
|
onFailureRecorded?: () => void;
|
|
13
|
+
context?: import("./index").JobContext;
|
|
14
|
+
deferRetry?: (envelope: QueueJobEnvelope, delayMs: number) => Promise<void>;
|
|
9
15
|
}): Promise<void>;
|
|
10
16
|
export type { QueueJobEnvelope };
|
|
11
|
-
export { runQueueJob };
|
|
17
|
+
export { parseQueueJobEnvelope, runQueueJob };
|
|
@@ -4,6 +4,7 @@ import type { Job, Queue } from "./index.ts";
|
|
|
4
4
|
import { jobRegistry } from "./jobRegistry.ts";
|
|
5
5
|
import { runQueueJob } from "./jobRunner.ts";
|
|
6
6
|
import { QueueWorker, RedisQueue } from "./redisQueue.ts";
|
|
7
|
+
import { RedisStreamsWorker } from "./redisStreams";
|
|
7
8
|
import { ResilientQueue } from "./resilientQueue.ts";
|
|
8
9
|
declare function createFailedJobService(): FailedJobService;
|
|
9
10
|
declare function createTrackedJob<TPayload extends object>(name: string, job: Job<TPayload>): Job<TPayload>;
|
|
@@ -12,5 +13,5 @@ declare function createProductionQueue(driver: "sync" | "async" | "redis", optio
|
|
|
12
13
|
failedJobs?: FailedJobService;
|
|
13
14
|
registerJobs?: () => void;
|
|
14
15
|
}): Queue;
|
|
15
|
-
declare function createQueueWorker(redisUrl: string, failedJobs?: FailedJobService): QueueWorker;
|
|
16
|
+
declare function createQueueWorker(redisUrl: string, failedJobs?: FailedJobService): QueueWorker | RedisStreamsWorker;
|
|
16
17
|
export { createFailedJobService, createProductionQueue, createQueueWorker, createTrackedJob, FailedJobRepository, FailedJobService, jobRegistry, QueueWorker, RedisQueue, ResilientQueue, runQueueJob, };
|
|
@@ -7,3 +7,6 @@ declare function resolveQueueConfig(): QueueConfig;
|
|
|
7
7
|
declare const queueConfig: QueueConfig;
|
|
8
8
|
export type { QueueConfig };
|
|
9
9
|
export { queueConfig, resolveQueueConfig };
|
|
10
|
+
declare function resolveRedisQueueTransport(): "lists" | "streams";
|
|
11
|
+
declare function readQueueVisibilityMs(): number;
|
|
12
|
+
export { readQueueVisibilityMs, resolveRedisQueueTransport };
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { RedisClient } from "bun";
|
|
2
2
|
import type FailedJobService from "./failedJobService";
|
|
3
|
-
import type { Job, Queue
|
|
4
|
-
import { type QueueJobEnvelope } from "./jobRunner";
|
|
5
|
-
|
|
6
|
-
declare const QUEUE_HIGH_KEY: string;
|
|
7
|
-
declare const QUEUE_LOW_KEY: string;
|
|
3
|
+
import type { Job, Queue } from "./index";
|
|
4
|
+
import { parseQueueJobEnvelope, type QueueJobEnvelope } from "./jobRunner";
|
|
5
|
+
import { QUEUE_HIGH_KEY, QUEUE_LIST_KEY, QUEUE_LOW_KEY, queueKeyForPriority } from "./redisQueueKeys";
|
|
8
6
|
declare function queueProcessingKey(queueKey: string): string;
|
|
9
7
|
declare function queueProcessingLeaseKey(queueKey: string): string;
|
|
10
8
|
declare function reservationExpired(lease: string | null, now: number, visibilityMs: number): boolean;
|
|
11
|
-
declare function queueKeyForPriority(priority?: QueuePriority): string;
|
|
12
|
-
declare function parseQueueJobEnvelope(rawPayload: string): QueueJobEnvelope | null;
|
|
13
9
|
type QueueReservation = {
|
|
14
10
|
id: string;
|
|
15
11
|
owner: string;
|
|
@@ -43,5 +39,7 @@ declare class QueueWorker {
|
|
|
43
39
|
close(): void;
|
|
44
40
|
}
|
|
45
41
|
declare function countPendingQueueJobs(redisUrl: string): Promise<number>;
|
|
42
|
+
export type { StreamReservation, StreamsEnqueueOptions } from "./redisStreams";
|
|
43
|
+
export { migrateLegacyQueueToStreams, RedisStreamsQueue, RedisStreamsWorker, STREAM_GROUP, streamDeadLetterKey, streamQueueKey, updateStreamReservation, } from "./redisStreams";
|
|
46
44
|
export type { QueueJobEnvelope, QueueReservation };
|
|
47
45
|
export { countPendingQueueJobs, parseQueueJobEnvelope, QUEUE_HIGH_KEY, QUEUE_LIST_KEY, QUEUE_LOW_KEY, QueueWorker, queueInvalidKey, queueKeyForPriority, queueProcessingKey, queueProcessingLeaseKey, RedisQueue, reclaimExpiredQueueReservations, reservationExpired, reserveQueueJob, updateQueueReservation, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { QueuePriority } from "./index";
|
|
2
|
+
declare const QUEUE_LIST_KEY: string;
|
|
3
|
+
declare const QUEUE_HIGH_KEY: string;
|
|
4
|
+
declare const QUEUE_LOW_KEY: string;
|
|
5
|
+
declare function defaultQueueKeys(): readonly [string, string, string];
|
|
6
|
+
declare const QUEUE_KEYS: readonly [string, string, string];
|
|
7
|
+
declare function queueKeyForPriority(priority?: QueuePriority): string;
|
|
8
|
+
export { defaultQueueKeys, QUEUE_HIGH_KEY, QUEUE_KEYS, QUEUE_LIST_KEY, QUEUE_LOW_KEY, queueKeyForPriority, };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { RedisClient } from "bun";
|
|
2
|
+
import type FailedJobService from "./failedJobService";
|
|
3
|
+
import type { Job, Queue } from "./index";
|
|
4
|
+
import { type QueueJobEnvelope } from "./jobRunner";
|
|
5
|
+
declare const STREAM_GROUP = "strata-workers-v1";
|
|
6
|
+
declare function streamQueueKey(queueKey: string): string;
|
|
7
|
+
declare function streamDeadLetterKey(queueKey: string): string;
|
|
8
|
+
declare function streamRetryKey(queueKey: string): string;
|
|
9
|
+
interface StreamsEnqueueOptions {
|
|
10
|
+
/** Total lifetime including time waiting and retries, measured from Redis server time. */
|
|
11
|
+
timeoutMs?: number;
|
|
12
|
+
cancellable?: boolean;
|
|
13
|
+
}
|
|
14
|
+
declare function streamControlKey(key: string, jobId: string): string;
|
|
15
|
+
declare function cancelStreamJob(client: RedisClient, key: string, jobId: string): Promise<boolean>;
|
|
16
|
+
declare function readStreamCancellation(client: RedisClient, controlKey: string): Promise<boolean>;
|
|
17
|
+
declare function readStreamTime(client: RedisClient): Promise<number>;
|
|
18
|
+
declare function watchStreamDeadline(client: RedisClient, deadlineAtMs: number, remainingMs: number, expire: () => void, fail: (error: unknown) => void): () => void;
|
|
19
|
+
declare function scheduleStreamRetry(client: RedisClient, key: string, reservation: StreamReservation, envelope: QueueJobEnvelope, delayMs: number): Promise<void>;
|
|
20
|
+
declare function promoteStreamRetries(client: RedisClient, key: string): Promise<number>;
|
|
21
|
+
declare function readStreamQueueDepth(client: RedisClient, key: string): Promise<number>;
|
|
22
|
+
type StreamReservation = {
|
|
23
|
+
id: string;
|
|
24
|
+
owner: string;
|
|
25
|
+
payload: string;
|
|
26
|
+
};
|
|
27
|
+
declare function ensureStreamGroup(client: RedisClient, key: string): Promise<void>;
|
|
28
|
+
declare function readStreamEntry(value: unknown, owner: string): StreamReservation | null;
|
|
29
|
+
declare function updateStreamReservation(client: RedisClient, key: string, reservation: StreamReservation, action: "renew" | "ack" | "quarantine", controlKey?: string): Promise<boolean>;
|
|
30
|
+
declare function reserveStreamJob(client: RedisClient, key: string, owner: string, cursor?: string): Promise<{
|
|
31
|
+
reservation: StreamReservation | null;
|
|
32
|
+
cursor: string;
|
|
33
|
+
}>;
|
|
34
|
+
declare class RedisStreamsQueue implements Queue {
|
|
35
|
+
private readonly client;
|
|
36
|
+
constructor(redisUrl: string);
|
|
37
|
+
close(): void;
|
|
38
|
+
dispatch<TPayload extends object>(job: Job<TPayload>, payload: TPayload): Promise<void>;
|
|
39
|
+
enqueue<TPayload extends object>(job: Job<TPayload>, payload: TPayload, options?: StreamsEnqueueOptions): Promise<string>;
|
|
40
|
+
replay<TPayload extends object>(job: Job<TPayload>, payload: TPayload, jobId: string): Promise<void>;
|
|
41
|
+
private admit;
|
|
42
|
+
cancel(jobId: string): Promise<boolean>;
|
|
43
|
+
}
|
|
44
|
+
declare class RedisStreamsWorker {
|
|
45
|
+
private readonly failedJobs;
|
|
46
|
+
private readonly timeoutSeconds;
|
|
47
|
+
private readonly queueKeys;
|
|
48
|
+
private readonly client;
|
|
49
|
+
private readonly owner;
|
|
50
|
+
private readonly cursors;
|
|
51
|
+
private processing;
|
|
52
|
+
private initialized;
|
|
53
|
+
private running;
|
|
54
|
+
private stopping;
|
|
55
|
+
private active?;
|
|
56
|
+
constructor(redisUrl: string, failedJobs: FailedJobService, timeoutSeconds?: number, queueKeys?: readonly string[]);
|
|
57
|
+
requestStop(): void;
|
|
58
|
+
isRunning(): boolean;
|
|
59
|
+
close(): void;
|
|
60
|
+
private initialize;
|
|
61
|
+
private reserve;
|
|
62
|
+
processNext(): Promise<boolean>;
|
|
63
|
+
private processOne;
|
|
64
|
+
private handle;
|
|
65
|
+
run(): Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
declare function migrateLegacyQueueToStreams(client: RedisClient, options: {
|
|
68
|
+
maintenance: true;
|
|
69
|
+
batchSize?: number;
|
|
70
|
+
queueKeys?: readonly string[];
|
|
71
|
+
}): Promise<number>;
|
|
72
|
+
export type { StreamReservation, StreamsEnqueueOptions };
|
|
73
|
+
export { cancelStreamJob, ensureStreamGroup, migrateLegacyQueueToStreams, promoteStreamRetries, RedisStreamsQueue, RedisStreamsWorker, readStreamCancellation, readStreamEntry, readStreamQueueDepth, readStreamTime, reserveStreamJob, STREAM_GROUP, scheduleStreamRetry, streamControlKey, streamDeadLetterKey, streamQueueKey, streamRetryKey, updateStreamReservation, watchStreamDeadline, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface PublicTenancyOptions {
|
|
2
|
+
/** Application-owned lookup of approved normalized hostnames; unknown hosts return null. */
|
|
3
|
+
resolveTenantId(hostname: string): Promise<number | null>;
|
|
4
|
+
/** Exact immediate socket-peer IP addresses. The proxy must overwrite X-Forwarded-Host. */
|
|
5
|
+
trustedProxyAddresses?: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
/** Normalize an HTTP authority for approved-domain storage and lookup, without its port. */
|
|
8
|
+
declare function normalizeTenantHostname(authority: string): string;
|
|
9
|
+
declare function createPublicTenantSelector(options: PublicTenancyOptions): (request: Request) => Promise<number>;
|
|
10
|
+
export type { PublicTenancyOptions };
|
|
11
|
+
export { createPublicTenantSelector, normalizeTenantHostname };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type PublicTenancyOptions } from "./publicTenantHost";
|
|
1
2
|
import { type TenantContext } from "./tenantContext";
|
|
2
3
|
declare const DEFAULT_TENANT: TenantContext;
|
|
3
4
|
declare function resolveUserTenantId(userId: number): Promise<number>;
|
|
@@ -6,7 +7,10 @@ type TenantResolver = (id: number) => Promise<TenantContext | null>;
|
|
|
6
7
|
interface TenantMiddlewareOptions {
|
|
7
8
|
/** Load trusted application metadata after the framework selects the tenant ID. */
|
|
8
9
|
resolveTenant?: TenantResolver;
|
|
10
|
+
publicTenancy?: PublicTenancyOptions;
|
|
9
11
|
}
|
|
10
12
|
declare function createTenantMiddleware(options?: TenantMiddlewareOptions): (request: Request, next: () => Promise<Response>) => Promise<Response>;
|
|
13
|
+
export type { PublicTenancyOptions } from "./publicTenantHost";
|
|
14
|
+
export { normalizeTenantHostname } from "./publicTenantHost";
|
|
11
15
|
export type { TenantMiddlewareOptions, TenantResolver };
|
|
12
16
|
export { auditChecksum, createTenantMiddleware, DEFAULT_TENANT, resolveUserTenantId };
|
|
@@ -379,6 +379,7 @@ class ConfigStore {
|
|
|
379
379
|
|
|
380
380
|
// ../../src/core/contracts/serviceTokens.ts
|
|
381
381
|
var CORE_THROTTLE_QUOTA_POLICY_TOKEN = createServiceToken("core.throttleQuotaPolicy");
|
|
382
|
+
var CORE_PUBLIC_TENANCY_TOKEN = createServiceToken("core.publicTenancy");
|
|
382
383
|
var CORE_TENANT_RESOLVER_TOKEN = createServiceToken("core.tenantResolver");
|
|
383
384
|
var CORE_HTTP_CLEANUP_TOKEN = createServiceToken("core.httpCleanup");
|
|
384
385
|
var CORE_CONFIG_TOKEN = "core.config";
|
|
@@ -78,6 +78,7 @@ class ConfigStore {
|
|
|
78
78
|
|
|
79
79
|
// ../../src/core/contracts/serviceTokens.ts
|
|
80
80
|
var CORE_THROTTLE_QUOTA_POLICY_TOKEN = createServiceToken("core.throttleQuotaPolicy");
|
|
81
|
+
var CORE_PUBLIC_TENANCY_TOKEN = createServiceToken("core.publicTenancy");
|
|
81
82
|
var CORE_TENANT_RESOLVER_TOKEN = createServiceToken("core.tenantResolver");
|
|
82
83
|
var CORE_HTTP_CLEANUP_TOKEN = createServiceToken("core.httpCleanup");
|
|
83
84
|
var CORE_CONFIG_TOKEN = "core.config";
|
|
@@ -78,6 +78,7 @@ class ConfigStore {
|
|
|
78
78
|
|
|
79
79
|
// ../../src/core/contracts/serviceTokens.ts
|
|
80
80
|
var CORE_THROTTLE_QUOTA_POLICY_TOKEN = createServiceToken("core.throttleQuotaPolicy");
|
|
81
|
+
var CORE_PUBLIC_TENANCY_TOKEN = createServiceToken("core.publicTenancy");
|
|
81
82
|
var CORE_TENANT_RESOLVER_TOKEN = createServiceToken("core.tenantResolver");
|
|
82
83
|
var CORE_HTTP_CLEANUP_TOKEN = createServiceToken("core.httpCleanup");
|
|
83
84
|
var CORE_CONFIG_TOKEN = "core.config";
|
|
@@ -78,6 +78,7 @@ class ConfigStore {
|
|
|
78
78
|
|
|
79
79
|
// ../../src/core/contracts/serviceTokens.ts
|
|
80
80
|
var CORE_THROTTLE_QUOTA_POLICY_TOKEN = createServiceToken("core.throttleQuotaPolicy");
|
|
81
|
+
var CORE_PUBLIC_TENANCY_TOKEN = createServiceToken("core.publicTenancy");
|
|
81
82
|
var CORE_TENANT_RESOLVER_TOKEN = createServiceToken("core.tenantResolver");
|
|
82
83
|
var CORE_HTTP_CLEANUP_TOKEN = createServiceToken("core.httpCleanup");
|
|
83
84
|
var CORE_CONFIG_TOKEN = "core.config";
|
|
@@ -132,6 +133,7 @@ export {
|
|
|
132
133
|
CORE_EVENT_BUS_TOKEN,
|
|
133
134
|
CORE_HTTP_CLEANUP_TOKEN,
|
|
134
135
|
CORE_POLICY_GATE_TOKEN,
|
|
136
|
+
CORE_PUBLIC_TENANCY_TOKEN,
|
|
135
137
|
CORE_QUEUE_TOKEN,
|
|
136
138
|
CORE_TENANT_RESOLVER_TOKEN,
|
|
137
139
|
CORE_THROTTLE_QUOTA_POLICY_TOKEN,
|