Added automatic secret sorting on the first pull

This commit is contained in:
Vladyslav Matsiiako
2022-12-11 21:28:59 -05:00
parent 11e0790f13
commit 95a1e9560e
4 changed files with 54 additions and 44 deletions
@@ -81,17 +81,19 @@ const getSecretsForProject = async ({
key: line['key'],
value: line['value'],
type: line['type']
}
};
})
);
return tempFileState.map((line, index) => [
guidGenerator(),
index,
line['key'],
line['value'],
line['type']
]);
return tempFileState.map((line, index) => {
return {
id: guidGenerator(),
pos: index,
key: line['key'],
value: line['value'],
type: line['type']
};
});
} catch (error) {
console.log('Something went wrong during accessing or decripting secrets.');
}