Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -2,10 +2,12 @@ import { getEnvVariableDefinition, validateEnv } from "./index.js";
|
||||
import { getDomainRoutingConfig } from "./routing.js";
|
||||
import type { EnvRecord, RequiredWebConfigOptions, WebConfig, WebConfigDiagnostic, WebConfigErrorDetails, WebConfigOptions, WebConfigResult } from "./types.js";
|
||||
|
||||
const DEFAULT_APP_NAME = "ToolController";
|
||||
const DEFAULT_APP_NAME = "HiveGrid";
|
||||
const DEFAULT_NODE_ENV = "development";
|
||||
const DEFAULT_LISTEN_HOST = "0.0.0.0";
|
||||
const DEFAULT_LISTEN_PORT = 3000;
|
||||
const DEFAULT_LAGO_TIMEOUT_MS = 10_000;
|
||||
const DEFAULT_MOLLIE_TIMEOUT_MS = 10_000;
|
||||
const MIN_PORT = 1;
|
||||
const MAX_PORT = 65535;
|
||||
const MIN_MAGIC_LINK_TOKEN_TTL_MINUTES = 1;
|
||||
@@ -69,16 +71,13 @@ export function loadWebConfig(env: EnvRecord = process.env, options: WebConfigOp
|
||||
},
|
||||
routing,
|
||||
webhooksUrl: present(env.WEBHOOKS_URL),
|
||||
stripe: {
|
||||
secretKey: present(env.STRIPE_SK),
|
||||
webhookSigningSecret: present(env.STRIPE_WEBHOOK_SIGNING_SECRET),
|
||||
},
|
||||
crisp: {
|
||||
chatWebsiteId: present(env.CRISP_CHAT_WEBSITE_ID),
|
||||
},
|
||||
captcha: {
|
||||
instanceUrl: present(env.MCAPTCHA_INSTANCE_URL),
|
||||
loginSiteKey: present(env.MCAPTCHA_SITEKEY_LOGIN),
|
||||
provider: present(env.CAPTCHA_PROVIDER)?.toLowerCase() === "cap" ? "cap" : "mcaptcha",
|
||||
instanceUrl: present(env.CAPTCHA_PROVIDER)?.toLowerCase() === "cap" ? present(env.CAP_INSTANCE_URL) : present(env.MCAPTCHA_INSTANCE_URL),
|
||||
loginSiteKey: present(env.CAPTCHA_PROVIDER)?.toLowerCase() === "cap" ? present(env.CAP_SITEKEY_LOGIN) : present(env.MCAPTCHA_SITEKEY_LOGIN),
|
||||
},
|
||||
analytics: {
|
||||
// EU-Sterilisation (R-P1a): Google-Analytics-Einbindung entfernt; nur First-Party-Analytics-Token bleibt.
|
||||
@@ -105,6 +104,17 @@ export function loadWebConfig(env: EnvRecord = process.env, options: WebConfigOp
|
||||
url: present(env.PORTAL_SERVER_URL),
|
||||
flyToken: present(env.PORTAL_SERVER_FLY_TOKEN),
|
||||
},
|
||||
lago: {
|
||||
apiUrl: present(env.LAGO_API_URL),
|
||||
apiKey: present(env.LAGO_API_KEY),
|
||||
webhookSecret: present(env.LAGO_WEBHOOK_SECRET),
|
||||
timeoutMs: normalizePositiveInteger(env.LAGO_TIMEOUT_MS, DEFAULT_LAGO_TIMEOUT_MS),
|
||||
},
|
||||
mollie: {
|
||||
apiKey: present(env.MOLLIE_API_KEY),
|
||||
profileId: present(env.MOLLIE_PROFILE_ID),
|
||||
timeoutMs: normalizePositiveInteger(env.MOLLIE_TIMEOUT_MS, DEFAULT_MOLLIE_TIMEOUT_MS),
|
||||
},
|
||||
magicLink: magicLinkResult.config,
|
||||
storage: {
|
||||
provider: normalizeStorageProvider(env.STORAGE_PROVIDER),
|
||||
@@ -153,6 +163,15 @@ function normalizeStorageFallbackProvider(value: string | undefined): "s3" | "lo
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function normalizePositiveInteger(value: string | undefined, defaultValue: number): number {
|
||||
const trimmed = present(value);
|
||||
if (trimmed === undefined) {
|
||||
return defaultValue;
|
||||
}
|
||||
const parsed = Number(trimmed);
|
||||
return Number.isInteger(parsed) && parsed > 0 ? parsed : defaultValue;
|
||||
}
|
||||
|
||||
function normalizeListenPort(value: string | undefined): { port: number; diagnostic?: WebConfigDiagnostic } {
|
||||
const trimmed = value?.trim();
|
||||
if (!trimmed) {
|
||||
|
||||
Reference in new issue
Block a user