mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 21:51:56 +00:00
review fixes
This commit is contained in:
@@ -145,7 +145,9 @@ export const SecretSyncFns = {
|
||||
case SecretSync.TeamCity:
|
||||
return TeamCitySyncFns.syncSecrets(secretSync, secretMap);
|
||||
default:
|
||||
throw new Error(`Unhandled sync destination for sync secrets fns: ${secretSync.destination}`);
|
||||
throw new Error(
|
||||
`Unhandled sync destination for sync secrets fns: ${(secretSync as TSecretSyncWithCredentials).destination}`
|
||||
);
|
||||
}
|
||||
},
|
||||
getSecrets: async (
|
||||
@@ -205,7 +207,9 @@ export const SecretSyncFns = {
|
||||
secretMap = await TeamCitySyncFns.getSecrets(secretSync);
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unhandled sync destination for get secrets fns: ${secretSync.destination}`);
|
||||
throw new Error(
|
||||
`Unhandled sync destination for get secrets fns: ${(secretSync as TSecretSyncWithCredentials).destination}`
|
||||
);
|
||||
}
|
||||
|
||||
return secretMap;
|
||||
@@ -258,7 +262,9 @@ export const SecretSyncFns = {
|
||||
case SecretSync.TeamCity:
|
||||
return TeamCitySyncFns.removeSecrets(secretSync, secretMap);
|
||||
default:
|
||||
throw new Error(`Unhandled sync destination for remove secrets fns: ${secretSync.destination}`);
|
||||
throw new Error(
|
||||
`Unhandled sync destination for remove secrets fns: ${(secretSync as TSecretSyncWithCredentials).destination}`
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { request } from "@app/lib/config/request";
|
||||
import { removeTrailingSlash } from "@app/lib/fn";
|
||||
import { getTeamCityInstanceUrl } from "@app/services/app-connection/teamcity";
|
||||
import { SecretSyncError } from "@app/services/secret-sync/secret-sync-errors";
|
||||
import { TSecretMap } from "@app/services/secret-sync/secret-sync-types";
|
||||
import {
|
||||
@@ -89,7 +89,7 @@ export const TeamCitySyncFns = {
|
||||
destinationConfig: { project, buildConfig }
|
||||
} = secretSync;
|
||||
|
||||
const instanceUrl = removeTrailingSlash(connection.credentials.instanceUrl);
|
||||
const instanceUrl = await getTeamCityInstanceUrl(connection);
|
||||
const { accessToken } = connection.credentials;
|
||||
|
||||
for await (const entry of Object.entries(secretMap)) {
|
||||
@@ -145,7 +145,7 @@ export const TeamCitySyncFns = {
|
||||
destinationConfig: { project, buildConfig }
|
||||
} = secretSync;
|
||||
|
||||
const instanceUrl = removeTrailingSlash(connection.credentials.instanceUrl);
|
||||
const instanceUrl = await getTeamCityInstanceUrl(connection);
|
||||
const { accessToken } = connection.credentials;
|
||||
|
||||
const variables = await listTeamCityVariables({ instanceUrl, accessToken, project, buildConfig });
|
||||
@@ -175,7 +175,7 @@ export const TeamCitySyncFns = {
|
||||
destinationConfig: { project, buildConfig }
|
||||
} = secretSync;
|
||||
|
||||
const instanceUrl = removeTrailingSlash(connection.credentials.instanceUrl);
|
||||
const instanceUrl = await getTeamCityInstanceUrl(connection);
|
||||
const { accessToken } = connection.credentials;
|
||||
|
||||
return listTeamCityVariables({ instanceUrl, accessToken, project, buildConfig });
|
||||
|
||||
Reference in New Issue
Block a user