@getstrata/bootstrap 0.2.10 → 0.2.13
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 -16
- package/dist/bootstrap/cache/modelCacheTags.d.ts +3 -0
- package/dist/bootstrap/config.d.ts +2 -7
- package/dist/bootstrap/discoverModules.d.ts +3 -2
- package/dist/bootstrap/modules.d.ts +1 -1
- package/dist/bootstrap/preloadModules.d.ts +1 -0
- package/dist/bootstrap/public-api.d.ts +2 -1
- package/dist/bootstrap/routeRegistry.d.ts +1 -5
- package/dist/bootstrap/server.d.ts +1 -1
- package/dist/core/auth/guard.d.ts +2 -2
- package/dist/core/auth/sessionGuard.d.ts +2 -2
- package/dist/core/cache/modelCacheTags.d.ts +1 -3
- package/dist/core/contracts/applicationContext.d.ts +18 -0
- package/dist/core/contracts/serviceContainer.d.ts +5 -0
- package/dist/core/contracts/serviceTokens.d.ts +7 -0
- package/dist/core/openapi/registeredRoute.d.ts +6 -0
- package/dist/core/runtime/applicationRegistry.d.ts +15 -0
- package/dist/core/view/webLayoutData.d.ts +2 -2
- package/dist/entries/applicationRegistry.js +18 -107
- package/dist/entries/config.js +8 -6
- package/dist/entries/context.js +130 -65
- package/dist/entries/createWebRoutes.js +13 -29
- package/dist/entries/http/securedRouteModelBinding.js +98 -3
- package/dist/entries/httpKernel.js +8 -6
- package/dist/entries/membershipService.js +98 -3
- package/dist/entries/providers/view.js +8 -6
- package/dist/entries/providers.js +126 -57
- package/dist/entries/queue/defaultJobs.js +98 -3
- package/dist/framework/public-api.d.ts +2 -1
- package/dist/index.js +108 -96
- package/package.json +2 -2
|
@@ -1,16 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { PolicyGate } from "../core/auth/policy";
|
|
3
|
-
import { type Logger } from "../core/logging/logger";
|
|
4
|
-
import type { Queue } from "../core/queue";
|
|
5
|
-
import type { CacheLike } from "../types/services";
|
|
6
|
-
import type { AppContext } from "./contracts";
|
|
7
|
-
import { type ConfigStore } from "./contracts";
|
|
8
|
-
declare function setActiveApplicationContext(context: AppContext): void;
|
|
9
|
-
declare function resolveApplicationCache(): CacheLike;
|
|
10
|
-
declare function resolveApplicationQueue(): Queue;
|
|
11
|
-
declare function resolveApplicationAuth(): AuthManager;
|
|
12
|
-
declare function resolveApplicationPolicyGate(): PolicyGate;
|
|
13
|
-
declare function resolveApplicationConfig(): ConfigStore;
|
|
14
|
-
declare function resolveApplicationLogger(): Logger;
|
|
15
|
-
declare function resolveApplicationDependencies(): import("./contracts").AppDependencies;
|
|
16
|
-
export { resolveApplicationAuth, resolveApplicationCache, resolveApplicationConfig, resolveApplicationDependencies, resolveApplicationLogger, resolveApplicationPolicyGate, resolveApplicationQueue, setActiveApplicationContext, };
|
|
1
|
+
export { resolveApplicationAuth, resolveApplicationCache, resolveApplicationConfig, resolveApplicationDependencies, resolveApplicationLogger, resolveApplicationPolicyGate, resolveApplicationQueue, setActiveApplicationContext, } from "../core/runtime/applicationRegistry.ts";
|
|
@@ -4,12 +4,7 @@ declare const CACHE_MAX_ENTRIES_CONFIG_KEY = "cache.maxEntries";
|
|
|
4
4
|
declare const CACHE_DRIVER_CONFIG_KEY = "cache.driver";
|
|
5
5
|
declare const REDIS_URL_CONFIG_KEY = "cache.redisUrl";
|
|
6
6
|
declare const DATABASE_URL_CONFIG_KEY = "database.url";
|
|
7
|
-
|
|
8
|
-
declare const CORE_CACHE_TOKEN = "core.cache";
|
|
9
|
-
declare const CORE_QUEUE_TOKEN = "core.queue";
|
|
10
|
-
declare const CORE_POLICY_GATE_TOKEN = "core.policyGate";
|
|
11
|
-
declare const CORE_AUTH_TOKEN = "core.auth";
|
|
12
|
-
declare const CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
|
|
7
|
+
export { CORE_AUTH_TOKEN, CORE_CACHE_TOKEN, CORE_CONFIG_TOKEN, CORE_POLICY_GATE_TOKEN, CORE_QUEUE_TOKEN, CORE_TOKEN_SERVICE_TOKEN, } from "../core/contracts/serviceTokens.ts";
|
|
13
8
|
declare const AUTH_DEV_HEADERS_CONFIG_KEY = "auth.allowDevHeaders";
|
|
14
9
|
declare const DEFAULT_APP_PORT = 3000;
|
|
15
10
|
declare const DEFAULT_CACHE_TTL_MS = 3600000;
|
|
@@ -17,4 +12,4 @@ declare const DEFAULT_CACHE_MAX_ENTRIES = 100;
|
|
|
17
12
|
declare const DEFAULT_CACHE_DRIVER = "array";
|
|
18
13
|
declare const DEFAULT_API_TOKEN = "";
|
|
19
14
|
declare const DEFAULT_QUEUE_DRIVER = "sync";
|
|
20
|
-
export { APP_PORT_CONFIG_KEY, AUTH_DEV_HEADERS_CONFIG_KEY, CACHE_DRIVER_CONFIG_KEY, CACHE_MAX_ENTRIES_CONFIG_KEY, CACHE_TTL_MS_CONFIG_KEY,
|
|
15
|
+
export { APP_PORT_CONFIG_KEY, AUTH_DEV_HEADERS_CONFIG_KEY, CACHE_DRIVER_CONFIG_KEY, CACHE_MAX_ENTRIES_CONFIG_KEY, CACHE_TTL_MS_CONFIG_KEY, DATABASE_URL_CONFIG_KEY, DEFAULT_API_TOKEN, DEFAULT_APP_PORT, DEFAULT_CACHE_DRIVER, DEFAULT_CACHE_MAX_ENTRIES, DEFAULT_CACHE_TTL_MS, DEFAULT_QUEUE_DRIVER, REDIS_URL_CONFIG_KEY, };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppModule } from "./contracts";
|
|
2
|
-
declare
|
|
2
|
+
declare let appModules: AppModule[];
|
|
3
|
+
declare function ensureModulesLoaded(): Promise<AppModule[]>;
|
|
3
4
|
declare function discoverModules(): AppModule[];
|
|
4
|
-
export { appModules, discoverModules };
|
|
5
|
+
export { appModules, discoverModules, ensureModulesLoaded };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { appModules, discoverModules } from "./discoverModules";
|
|
1
|
+
export { appModules, discoverModules, ensureModulesLoaded } from "./discoverModules";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @getstrata/bootstrap — application shell for Strata sibling apps.
|
|
3
3
|
*/
|
|
4
|
-
export { resolveApplicationAuth, resolveApplicationCache, resolveApplicationConfig, resolveApplicationDependencies, resolveApplicationLogger, resolveApplicationPolicyGate, resolveApplicationQueue, setActiveApplicationContext, } from "@getstrata/core";
|
|
5
4
|
export { scheduleRunCommand } from "../cli/commands/scheduleRun.ts";
|
|
6
5
|
export type { ScheduledTask } from "../core/scheduler/schedule.ts";
|
|
7
6
|
export { appSchedule, runDueScheduledTasks, Schedule } from "../core/scheduler/schedule.ts";
|
|
7
|
+
export { resolveApplicationAuth, resolveApplicationCache, resolveApplicationConfig, resolveApplicationDependencies, resolveApplicationLogger, resolveApplicationPolicyGate, resolveApplicationQueue, setActiveApplicationContext, } from "./applicationRegistry.ts";
|
|
8
|
+
export { cacheTagsForModelWrite, discoverModelTableNames } from "./cache/modelCacheTags.ts";
|
|
8
9
|
export { APP_PORT_CONFIG_KEY, CORE_AUTH_TOKEN, CORE_CACHE_TOKEN, CORE_CONFIG_TOKEN, CORE_POLICY_GATE_TOKEN, CORE_QUEUE_TOKEN, CORE_TOKEN_SERVICE_TOKEN, DATABASE_URL_CONFIG_KEY, DEFAULT_APP_PORT, REDIS_URL_CONFIG_KEY, } from "./config.ts";
|
|
9
10
|
export { collectProviders, createAppContext, runProviderPhase } from "./context.ts";
|
|
10
11
|
export type { AppContext, AppDependencies, AppModule, AppRouteMap, CachedJson, ConfigStore, ModuleRouteContext, MutableAppDependencies, ProviderContext, ServiceFactory, ServiceProvider, } from "./contracts.ts";
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
method: string;
|
|
3
|
-
path: string;
|
|
4
|
-
middleware: string[];
|
|
5
|
-
}
|
|
1
|
+
import type { RegisteredRoute } from "../core/openapi/registeredRoute";
|
|
6
2
|
declare class RouteRegistry {
|
|
7
3
|
private readonly routes;
|
|
8
4
|
register(route: RegisteredRoute): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import "./preloadModules.ts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ServiceContainerLike } from "../contracts/serviceContainer";
|
|
2
2
|
import type { AuthUser } from "./authContext";
|
|
3
3
|
interface AuthGuard {
|
|
4
4
|
resolve(request: Request): AuthUser | null | Promise<AuthUser | null>;
|
|
@@ -16,7 +16,7 @@ declare class ApiTokenGuard implements AuthGuard {
|
|
|
16
16
|
}
|
|
17
17
|
declare class DatabaseTokenGuard implements AuthGuard {
|
|
18
18
|
private readonly container;
|
|
19
|
-
constructor(container:
|
|
19
|
+
constructor(container: ServiceContainerLike);
|
|
20
20
|
resolve(request: Request): Promise<AuthUser | null>;
|
|
21
21
|
}
|
|
22
22
|
declare class CompositeGuard implements AuthGuard {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ServiceContainerLike } from "../contracts/serviceContainer";
|
|
2
2
|
import type { AuthUser } from "./authContext";
|
|
3
3
|
import type { AuthGuard } from "./guard";
|
|
4
4
|
declare class SessionGuard implements AuthGuard {
|
|
5
5
|
private readonly container;
|
|
6
|
-
constructor(container:
|
|
6
|
+
constructor(container: ServiceContainerLike);
|
|
7
7
|
resolve(request: Request): Promise<AuthUser | null>;
|
|
8
8
|
}
|
|
9
9
|
export { SessionGuard };
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
declare function discoverModelTableNames(): string[];
|
|
3
|
-
export { cacheTagsForModelWrite, discoverModelTableNames };
|
|
1
|
+
export { cacheTagsForModelWrite, discoverModelTableNames, } from "../../bootstrap/cache/modelCacheTags.ts";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { CacheLike } from "../../types/services";
|
|
2
|
+
import type { ServiceContainerLike } from "./serviceContainer";
|
|
3
|
+
interface ConfigStoreLike {
|
|
4
|
+
get<T>(key: string): T | undefined;
|
|
5
|
+
}
|
|
6
|
+
interface ApplicationDependenciesLike {
|
|
7
|
+
container: ServiceContainerLike;
|
|
8
|
+
cache: CacheLike;
|
|
9
|
+
storage?: unknown;
|
|
10
|
+
}
|
|
11
|
+
interface ApplicationContext {
|
|
12
|
+
container: ServiceContainerLike;
|
|
13
|
+
config: ConfigStoreLike;
|
|
14
|
+
dependencies: ApplicationDependenciesLike;
|
|
15
|
+
}
|
|
16
|
+
declare function getRequiredDependency<K extends keyof ApplicationDependenciesLike>(dependencies: Partial<ApplicationDependenciesLike>, key: K): ApplicationDependenciesLike[K];
|
|
17
|
+
export type { ApplicationContext, ApplicationDependenciesLike, ConfigStoreLike };
|
|
18
|
+
export { getRequiredDependency };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const CORE_CONFIG_TOKEN = "core.config";
|
|
2
|
+
declare const CORE_CACHE_TOKEN = "core.cache";
|
|
3
|
+
declare const CORE_QUEUE_TOKEN = "core.queue";
|
|
4
|
+
declare const CORE_POLICY_GATE_TOKEN = "core.policyGate";
|
|
5
|
+
declare const CORE_AUTH_TOKEN = "core.auth";
|
|
6
|
+
declare const CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
|
|
7
|
+
export { CORE_AUTH_TOKEN, CORE_CACHE_TOKEN, CORE_CONFIG_TOKEN, CORE_POLICY_GATE_TOKEN, CORE_QUEUE_TOKEN, CORE_TOKEN_SERVICE_TOKEN, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CacheLike } from "../../types/services";
|
|
2
|
+
import type { AuthManager } from "../auth/guard";
|
|
3
|
+
import type { PolicyGate } from "../auth/policy";
|
|
4
|
+
import type { ApplicationContext } from "../contracts/applicationContext";
|
|
5
|
+
import { type Logger } from "../logging/logger";
|
|
6
|
+
import type { Queue } from "../queue";
|
|
7
|
+
declare function setActiveApplicationContext(context: ApplicationContext): void;
|
|
8
|
+
declare function resolveApplicationCache(): CacheLike;
|
|
9
|
+
declare function resolveApplicationQueue(): Queue;
|
|
10
|
+
declare function resolveApplicationAuth(): AuthManager;
|
|
11
|
+
declare function resolveApplicationPolicyGate(): PolicyGate;
|
|
12
|
+
declare function resolveApplicationConfig(): import("../contracts/applicationContext").ConfigStoreLike;
|
|
13
|
+
declare function resolveApplicationLogger(): Logger;
|
|
14
|
+
declare function resolveApplicationDependencies(): import("../contracts/applicationContext").ApplicationDependenciesLike;
|
|
15
|
+
export { resolveApplicationAuth, resolveApplicationCache, resolveApplicationConfig, resolveApplicationDependencies, resolveApplicationLogger, resolveApplicationPolicyGate, resolveApplicationQueue, setActiveApplicationContext, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ServiceContainerLike } from "../contracts/serviceContainer";
|
|
2
2
|
interface WebLayoutAuthUser {
|
|
3
3
|
id: number;
|
|
4
4
|
email: string;
|
|
@@ -12,6 +12,6 @@ interface WebLayoutData {
|
|
|
12
12
|
message: string;
|
|
13
13
|
} | null;
|
|
14
14
|
}
|
|
15
|
-
declare function resolveWebLayoutData(container:
|
|
15
|
+
declare function resolveWebLayoutData(container: ServiceContainerLike, request?: Request): Promise<Record<string, unknown>>;
|
|
16
16
|
export type { WebLayoutAuthUser, WebLayoutData };
|
|
17
17
|
export { resolveWebLayoutData };
|
|
@@ -1,4 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
// ../../src/core/contracts/applicationContext.ts
|
|
3
|
+
function getRequiredDependency(dependencies, key) {
|
|
4
|
+
const dependency = dependencies[key];
|
|
5
|
+
if (dependency === undefined) {
|
|
6
|
+
throw new Error(`Required dependency "${String(key)}" is not registered.`);
|
|
7
|
+
}
|
|
8
|
+
return dependency;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// ../../src/core/contracts/serviceTokens.ts
|
|
12
|
+
var CORE_CONFIG_TOKEN = "core.config";
|
|
13
|
+
var CORE_CACHE_TOKEN = "core.cache";
|
|
14
|
+
var CORE_QUEUE_TOKEN = "core.queue";
|
|
15
|
+
var CORE_POLICY_GATE_TOKEN = "core.policyGate";
|
|
16
|
+
var CORE_AUTH_TOKEN = "core.auth";
|
|
17
|
+
var CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
|
|
18
|
+
|
|
2
19
|
// ../../src/core/logging/logger.ts
|
|
3
20
|
class Logger {
|
|
4
21
|
channel;
|
|
@@ -35,113 +52,7 @@ class Logger {
|
|
|
35
52
|
}
|
|
36
53
|
var appLogger = new Logger("app");
|
|
37
54
|
|
|
38
|
-
// ../../src/
|
|
39
|
-
var APP_PORT_CONFIG_KEY = "app.port";
|
|
40
|
-
var CACHE_TTL_MS_CONFIG_KEY = "cache.ttlMs";
|
|
41
|
-
var CACHE_MAX_ENTRIES_CONFIG_KEY = "cache.maxEntries";
|
|
42
|
-
var CACHE_DRIVER_CONFIG_KEY = "cache.driver";
|
|
43
|
-
var REDIS_URL_CONFIG_KEY = "cache.redisUrl";
|
|
44
|
-
var DATABASE_URL_CONFIG_KEY = "database.url";
|
|
45
|
-
var CORE_CONFIG_TOKEN = "core.config";
|
|
46
|
-
var CORE_CACHE_TOKEN = "core.cache";
|
|
47
|
-
var CORE_QUEUE_TOKEN = "core.queue";
|
|
48
|
-
var CORE_POLICY_GATE_TOKEN = "core.policyGate";
|
|
49
|
-
var CORE_AUTH_TOKEN = "core.auth";
|
|
50
|
-
var CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
|
|
51
|
-
var AUTH_DEV_HEADERS_CONFIG_KEY = "auth.allowDevHeaders";
|
|
52
|
-
var DEFAULT_APP_PORT = 3000;
|
|
53
|
-
var DEFAULT_CACHE_TTL_MS = 3600000;
|
|
54
|
-
var DEFAULT_CACHE_MAX_ENTRIES = 100;
|
|
55
|
-
var DEFAULT_CACHE_DRIVER = "array";
|
|
56
|
-
var DEFAULT_API_TOKEN = "";
|
|
57
|
-
var DEFAULT_QUEUE_DRIVER = "sync";
|
|
58
|
-
|
|
59
|
-
// ../../src/bootstrap/contracts.ts
|
|
60
|
-
class ServiceContainer {
|
|
61
|
-
services = new Map;
|
|
62
|
-
singletonFactories = new Map;
|
|
63
|
-
bindings = new Map;
|
|
64
|
-
set(key, value) {
|
|
65
|
-
this.singletonFactories.delete(key);
|
|
66
|
-
this.bindings.delete(key);
|
|
67
|
-
this.services.set(key, value);
|
|
68
|
-
return value;
|
|
69
|
-
}
|
|
70
|
-
singleton(key, factory) {
|
|
71
|
-
this.bindings.delete(key);
|
|
72
|
-
this.services.delete(key);
|
|
73
|
-
this.singletonFactories.set(key, factory);
|
|
74
|
-
}
|
|
75
|
-
bind(key, factory) {
|
|
76
|
-
this.singletonFactories.delete(key);
|
|
77
|
-
this.services.delete(key);
|
|
78
|
-
this.bindings.set(key, factory);
|
|
79
|
-
}
|
|
80
|
-
get(key) {
|
|
81
|
-
if (this.services.has(key)) {
|
|
82
|
-
return this.services.get(key);
|
|
83
|
-
}
|
|
84
|
-
const singletonFactory = this.singletonFactories.get(key);
|
|
85
|
-
if (singletonFactory) {
|
|
86
|
-
const value = singletonFactory(this);
|
|
87
|
-
this.services.set(key, value);
|
|
88
|
-
return value;
|
|
89
|
-
}
|
|
90
|
-
const binding = this.bindings.get(key);
|
|
91
|
-
if (binding) {
|
|
92
|
-
return binding(this);
|
|
93
|
-
}
|
|
94
|
-
throw new Error(`Service "${key}" is not registered.`);
|
|
95
|
-
}
|
|
96
|
-
resolve(key) {
|
|
97
|
-
return this.get(key);
|
|
98
|
-
}
|
|
99
|
-
has(key) {
|
|
100
|
-
return this.services.has(key) || this.singletonFactories.has(key) || this.bindings.has(key);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
class ConfigStore {
|
|
105
|
-
values = new Map;
|
|
106
|
-
set(key, value) {
|
|
107
|
-
this.values.set(key, value);
|
|
108
|
-
return value;
|
|
109
|
-
}
|
|
110
|
-
get(key) {
|
|
111
|
-
return this.values.get(key);
|
|
112
|
-
}
|
|
113
|
-
require(key) {
|
|
114
|
-
if (!this.values.has(key)) {
|
|
115
|
-
throw new Error(`Config key "${key}" is not defined.`);
|
|
116
|
-
}
|
|
117
|
-
return this.values.get(key);
|
|
118
|
-
}
|
|
119
|
-
has(key) {
|
|
120
|
-
return this.values.has(key);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
var requiredDependencyKeys = [
|
|
124
|
-
"container",
|
|
125
|
-
"cache",
|
|
126
|
-
"storage"
|
|
127
|
-
];
|
|
128
|
-
function getRequiredDependency(dependencies, key) {
|
|
129
|
-
const dependency = dependencies[key];
|
|
130
|
-
if (dependency === undefined) {
|
|
131
|
-
throw new Error(`Required dependency "${key}" is not registered.`);
|
|
132
|
-
}
|
|
133
|
-
return dependency;
|
|
134
|
-
}
|
|
135
|
-
function assertAppDependenciesComplete(dependencies) {
|
|
136
|
-
for (const key of requiredDependencyKeys) {
|
|
137
|
-
getRequiredDependency(dependencies, key);
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
function resolveService(dependencies, token) {
|
|
141
|
-
return dependencies.container.resolve(token);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// ../../src/bootstrap/applicationRegistry.ts
|
|
55
|
+
// ../../src/core/runtime/applicationRegistry.ts
|
|
145
56
|
var APPLICATION_CONTEXT_KEY = Symbol.for("@getstrata/applicationContext");
|
|
146
57
|
var activeContext;
|
|
147
58
|
function readStoredApplicationContext() {
|
package/dist/entries/config.js
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
// ../../src/core/contracts/serviceTokens.ts
|
|
3
|
+
var CORE_CONFIG_TOKEN = "core.config";
|
|
4
|
+
var CORE_CACHE_TOKEN = "core.cache";
|
|
5
|
+
var CORE_QUEUE_TOKEN = "core.queue";
|
|
6
|
+
var CORE_POLICY_GATE_TOKEN = "core.policyGate";
|
|
7
|
+
var CORE_AUTH_TOKEN = "core.auth";
|
|
8
|
+
var CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
|
|
9
|
+
|
|
2
10
|
// ../../src/bootstrap/config.ts
|
|
3
11
|
var APP_PORT_CONFIG_KEY = "app.port";
|
|
4
12
|
var CACHE_TTL_MS_CONFIG_KEY = "cache.ttlMs";
|
|
@@ -6,12 +14,6 @@ var CACHE_MAX_ENTRIES_CONFIG_KEY = "cache.maxEntries";
|
|
|
6
14
|
var CACHE_DRIVER_CONFIG_KEY = "cache.driver";
|
|
7
15
|
var REDIS_URL_CONFIG_KEY = "cache.redisUrl";
|
|
8
16
|
var DATABASE_URL_CONFIG_KEY = "database.url";
|
|
9
|
-
var CORE_CONFIG_TOKEN = "core.config";
|
|
10
|
-
var CORE_CACHE_TOKEN = "core.cache";
|
|
11
|
-
var CORE_QUEUE_TOKEN = "core.queue";
|
|
12
|
-
var CORE_POLICY_GATE_TOKEN = "core.policyGate";
|
|
13
|
-
var CORE_AUTH_TOKEN = "core.auth";
|
|
14
|
-
var CORE_TOKEN_SERVICE_TOKEN = "core.tokenService";
|
|
15
17
|
var AUTH_DEV_HEADERS_CONFIG_KEY = "auth.allowDevHeaders";
|
|
16
18
|
var DEFAULT_APP_PORT = 3000;
|
|
17
19
|
var DEFAULT_CACHE_TTL_MS = 3600000;
|