Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -2,9 +2,11 @@ import { getEnvVariableDefinition, validateEnv } from "./index.js";
import { getDomainRoutingConfig } from "./routing.js";
import type { ApiConfig, ApiConfigDiagnostic, ApiConfigErrorDetails, ApiConfigOptions, ApiConfigResult, EnvRecord, RequiredApiConfigOptions } from "./types.js";
const DEFAULT_APP_NAME = "ToolController";
const DEFAULT_APP_NAME = "HiveGrid";
const DEFAULT_NODE_ENV = "development";
const DEFAULT_LISTEN_PORT = 3001;
const DEFAULT_LAGO_TIMEOUT_MS = 10_000;
const DEFAULT_MOLLIE_TIMEOUT_MS = 10_000;
const MIN_PORT = 1;
const MAX_PORT = 65535;
@@ -72,9 +74,16 @@ export function loadApiConfig(env: EnvRecord = process.env, options: ApiConfigOp
mailjet: {
webhookSecret: present(env.MAILJET_WEBHOOK_SECRET),
},
stripe: {
secretKey: present(env.STRIPE_SK),
webhookSigningSecret: present(env.STRIPE_WEBHOOK_SIGNING_SECRET),
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),
},
storage: {
endpoint: present(env.STORAGE_ENDPOINT),
@@ -115,6 +124,15 @@ function parseBooleanFlag(value: string | undefined, defaultValue: boolean): boo
return defaultValue;
}
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(apiPort: string | undefined, port: string | undefined): { port: number; diagnostic?: ApiConfigDiagnostic } {
const selected = present(apiPort) !== undefined ? { name: "API_PORT", value: apiPort } : { name: "PORT", value: port };
const trimmed = selected.value?.trim();