Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
manquer committed Sep 16, 2024
2 parents c935d2a + e9eef3c commit 36b4115
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -82115,9 +82115,10 @@ class KeyVaultClient {


async function setup(prefix) {
const items = (0,lodash.filter)(Object.keys(process.env), (i) => (0,lodash.startsWith)(i, `${prefix}_`) && !(0,lodash.startsWith)(i, 'AZURE_'));
const items = (0,lodash.filter)(Object.keys(process.env), (i) => (0,lodash.startsWith)(i, `${prefix}_`));
const res = await PromiseExtended.map(items, async (k) => {
const key = k.split(`${prefix}_`)[1];
console.log(key);
const value = await kv.getSecret(prefix, key);
return `\n${key}=${value}`;
});
Expand Down
3 changes: 2 additions & 1 deletion src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { reduce, filter, startsWith } from 'lodash'
import { PromiseExtended } from './promise'
import Kv from './kv'
export async function setup(prefix: string): Promise<void> {
const items = filter(Object.keys(process.env), (i: string) => startsWith(i, `${prefix}_`) && !startsWith(i, 'AZURE_'))
const items = filter(Object.keys(process.env), (i: string) => startsWith(i, `${prefix}_`))
const res = await PromiseExtended.map(items, async (k: string): Promise<string> => {
const key = k.split(`${prefix}_`)[1]
console.log(key)
const value: string = await Kv.getSecret(prefix, key)
return `\n${key}=${value}`
})
Expand Down

0 comments on commit 36b4115

Please sign in to comment.