UNPKG

@forzalabs/remora

Version:

A powerful CLI tool for seamless data translation.

24 lines (23 loc) 960 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const ProcessENVManager_1 = __importDefault(require("./ProcessENVManager")); class SecretManagerClass { constructor() { /** * If the value is a secret (or .env setting), replace it with the value inside the .env configuration file * Starts with "{" and ends with "}". * e.g. {AWS_ID} */ this.replaceSecret = (value) => { if (!value || value.length <= 2 || !value.startsWith('{') || !value.endsWith('}')) return value; const parsedValue = value.slice(1, value.length - 1); return ProcessENVManager_1.default.getEnvVariable(parsedValue); }; } } const SecretManager = new SecretManagerClass(); exports.default = SecretManager;