@forwardimpact/libconfig
Advanced tools
+1
-1
| { | ||
| "name": "@forwardimpact/libconfig", | ||
| "version": "0.1.79", | ||
| "version": "0.1.80", | ||
| "description": "Environment-aware application settings — services and CLIs load configuration without custom plumbing.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+24
-7
@@ -66,2 +66,5 @@ import { execSync } from "node:child_process"; | ||
| "MCP_TOKEN", | ||
| "MICROSOFT_APP_ID", | ||
| "MICROSOFT_APP_PASSWORD", | ||
| "MICROSOFT_APP_TENANT_ID", | ||
| "PRODUCT_LANDMARK_TOKEN", | ||
@@ -170,7 +173,17 @@ "SUPABASE_ANON_KEY", | ||
| /** @returns {string} Embedding API base URL with trailing slashes removed */ | ||
| embeddingBaseUrl() { | ||
| return this.#resolve(["EMBEDDING_BASE_URL"], stripTrailingSlashes); | ||
| /** @returns {string} Microsoft App registration ID (MICROSOFT_APP_ID) */ | ||
| msAppId() { | ||
| return this.#resolve(["MICROSOFT_APP_ID"]); | ||
| } | ||
| /** @returns {string} Microsoft App client secret (MICROSOFT_APP_PASSWORD) */ | ||
| msAppPassword() { | ||
| return this.#resolve(["MICROSOFT_APP_PASSWORD"]); | ||
| } | ||
| /** @returns {string} Microsoft App tenant/directory ID (MICROSOFT_APP_TENANT_ID) */ | ||
| msAppTenantId() { | ||
| return this.#resolve(["MICROSOFT_APP_TENANT_ID"]); | ||
| } | ||
| /** @returns {string} MCP bearer token */ | ||
@@ -455,6 +468,10 @@ mcpToken() { | ||
| this.#envOverrides[key] = value; | ||
| } else if (this.#process.env[key] === undefined) { | ||
| // Non-credentials → process.env so that service URL | ||
| // resolution and child processes can see them. | ||
| // Shell env takes precedence (only set if undefined). | ||
| } else { | ||
| // Non-credentials → process.env unconditionally. The .env file | ||
| // is the persistent source of truth for SERVICE_* URLs and other | ||
| // runtime config. Supervised processes (svscan children) inherit | ||
| // their parent's process.env, so a stale inherited value is | ||
| // indistinguishable from an explicit shell export — always | ||
| // applying the .env value ensures that editing .env and | ||
| // restarting the service picks up the change. | ||
| this.#process.env[key] = value; | ||
@@ -461,0 +478,0 @@ } |
45598
1.39%807
1.89%6
-14.29%