Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
refactor(api): consolidate deletedSecretKeys population and remove TSyncSecretsResult annotation in AWS PS sync
Igor Correa942e38604b9b
diff --git a/backend/src/services/secret-sync/aws-parameter-store/aws-parameter-store-sync-fns.ts b/backend/src/services/secret-sync/aws-parameter-store/aws-parameter-store-sync-fns.tsindex af2aee922d..f4c1968801 100644--- a/backend/src/services/secret-sync/aws-parameter-store/aws-parameter-store-sync-fns.ts+++ b/backend/src/services/secret-sync/aws-parameter-store/aws-parameter-store-sync-fns.ts@@ -334,10 +334,7 @@ const deleteParametersBatch = async (};export const AwsParameterStoreSyncFns = {- syncSecrets: async (- secretSync: TAwsParameterStoreSyncWithCredentials,- secretMap: TSecretMap- ): Promise<TSyncSecretsResult> => {+ syncSecrets: async (secretSync: TAwsParameterStoreSyncWithCredentials, secretMap: TSecretMap) => {const { destinationConfig, syncOptions, environment } = secretSync;const ssm = await getSSM(secretSync);@@ -454,15 +451,12 @@ export const AwsParameterStoreSyncFns = {if (!(key in secretMap) || !secretMap[key].value) {parametersToDelete.push(parameter);+ deletedSecretKeys.push(parameter.Name!);}}await deleteParametersBatch(ssm, parametersToDelete);- for (const param of parametersToDelete) {- deletedSecretKeys.push(param.Name!);- }-return { createdSecretKeys, updatedSecretKeys, deletedSecretKeys };},getSecrets: async (secretSync: TAwsParameterStoreSyncWithCredentials): Promise<TSecretMap> => {