//#region src/libs/environment-parser.ts
/** Parses the active environment variables and extracts key-value pairs. */
function parseEnvVariables(activeEnvVariables) {
	return activeEnvVariables.flatMap((variable) => {
		if (variable.key === "value") try {
			const parsedValue = JSON.parse(variable.value);
			return Object.keys(parsedValue).map((key) => ({
				key,
				value: parsedValue[key],
				source: variable.source
			}));
		} catch (_e) {}
		return [variable];
	});
}
//#endregion
export { parseEnvVariables };

//# sourceMappingURL=environment-parser.js.map