ssm-params
Version:
Obtain from AWS SSM Parameter Store
20 lines (19 loc) • 607 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ssmToEnv = void 0;
const ssmToObj_1 = require("./ssmToObj");
const ssmToObjByPath_1 = require("./ssmToObjByPath");
async function ssmToEnv(prefix, recursive) {
if (prefix[0] === '/') {
return ssmToObjByPath_1.ssmToObjByPath({
Path: prefix,
Recursive: recursive,
WithDecryption: true,
target: process.env,
});
}
else {
return ssmToObj_1.ssmToObj({ prefix, target: process.env, withDecryption: true });
}
}
exports.ssmToEnv = ssmToEnv;