mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 21:37:59 +00:00
Merge branch 'main' into feat/showWarningOnImportedSecretDeletion
This commit is contained in:
@@ -159,7 +159,8 @@ export const fnSecretsV2FromImports = async ({
|
||||
decryptor,
|
||||
expandSecretReferences,
|
||||
hasSecretAccess,
|
||||
viewSecretValue
|
||||
viewSecretValue,
|
||||
projectId
|
||||
}: {
|
||||
secretImports: (Omit<TSecretImports, "importEnv"> & {
|
||||
importEnv: { id: string; slug: string; name: string };
|
||||
@@ -176,6 +177,7 @@ export const fnSecretsV2FromImports = async ({
|
||||
environment: string;
|
||||
}) => Promise<string | undefined>;
|
||||
hasSecretAccess: (environment: string, secretPath: string, secretName: string, secretTagSlugs: string[]) => boolean;
|
||||
projectId: string;
|
||||
}) => {
|
||||
const cyclicDetector = new Set();
|
||||
const stack: {
|
||||
@@ -216,7 +218,8 @@ export const fnSecretsV2FromImports = async ({
|
||||
type: SecretType.Shared
|
||||
},
|
||||
{
|
||||
sort: [["id", "asc"]]
|
||||
sort: [["id", "asc"]],
|
||||
useCache: { projectId }
|
||||
}
|
||||
);
|
||||
const importedSecretsGroupByFolderId = groupBy(importedSecrets, (i) => i.folderId);
|
||||
|
||||
@@ -44,7 +44,7 @@ type TSecretImportServiceFactoryDep = {
|
||||
secretImportDAL: TSecretImportDALFactory;
|
||||
folderDAL: TSecretFolderDALFactory;
|
||||
secretDAL: Pick<TSecretDALFactory, "find">;
|
||||
secretV2BridgeDAL: Pick<TSecretV2BridgeDALFactory, "find">;
|
||||
secretV2BridgeDAL: Pick<TSecretV2BridgeDALFactory, "find" | "invalidateSecretCacheByProjectId">;
|
||||
projectBotService: Pick<TProjectBotServiceFactory, "getBotKey">;
|
||||
projectDAL: Pick<TProjectDALFactory, "checkProjectUpgradeStatus">;
|
||||
projectEnvDAL: TProjectEnvDALFactory;
|
||||
@@ -185,6 +185,7 @@ export const secretImportServiceFactory = ({
|
||||
});
|
||||
}
|
||||
|
||||
await secretV2BridgeDAL.invalidateSecretCacheByProjectId(projectId);
|
||||
return { ...secImport, importEnv };
|
||||
};
|
||||
|
||||
@@ -282,6 +283,8 @@ export const secretImportServiceFactory = ({
|
||||
);
|
||||
return doc;
|
||||
});
|
||||
|
||||
await secretV2BridgeDAL.invalidateSecretCacheByProjectId(projectId);
|
||||
return { ...updatedSecImport, importEnv: importedEnv };
|
||||
};
|
||||
|
||||
@@ -356,6 +359,7 @@ export const secretImportServiceFactory = ({
|
||||
actorId
|
||||
});
|
||||
|
||||
await secretV2BridgeDAL.invalidateSecretCacheByProjectId(projectId);
|
||||
return secImport;
|
||||
};
|
||||
|
||||
@@ -694,6 +698,7 @@ export const secretImportServiceFactory = ({
|
||||
projectId
|
||||
});
|
||||
const importedSecrets = await fnSecretsV2FromImports({
|
||||
projectId,
|
||||
secretImports,
|
||||
folderDAL,
|
||||
viewSecretValue: true,
|
||||
|
||||
Reference in New Issue
Block a user