UNPKG

@freemework/hosting

Version:

Hosting library of the Freemework Project.

19 lines 718 B
import { FConfigurationDictionary } from "@freemework/common"; export class FConfigurationEnv extends FConfigurationDictionary { constructor() { const sourceURI = new URL("configuration:env"); const dict = {}; Object.entries(process.env).forEach(([name, value]) => { // A little bit magic for double underscore "__" (translate it to ".") if (!name.startsWith("__") && name.includes("__")) { name = name.split("__").join("."); } if (value === undefined) { value = ""; } dict[name] = value; }); super(sourceURI, dict); } } //# sourceMappingURL=FConfigurationEnv.js.map