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
fix(migration): fix lint errors — import sort, unsafe any access, no-await-in-loop, floating promises
Igor Correa8c6ce94ebdf2
diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.tsindex e89e72e2ac..9e437d735d 100644--- a/backend/src/server/routes/index.ts+++ b/backend/src/server/routes/index.ts@@ -269,9 +269,9 @@ import { apiEnrollmentConfigDALFactory } from "@app/services/enrollment-config/aimport { estEnrollmentConfigDALFactory } from "@app/services/enrollment-config/est-enrollment-config-dal";import { externalGroupOrgRoleMappingDALFactory } from "@app/services/external-group-org-role-mapping/external-group-org-role-mapping-dal";import { externalGroupOrgRoleMappingServiceFactory } from "@app/services/external-group-org-role-mapping/external-group-org-role-mapping-service";+import { externalMigrationConfigDALFactory } from "@app/services/external-migration/external-migration-config-dal";import { externalMigrationQueueFactory } from "@app/services/external-migration/external-migration-queue";import { externalMigrationServiceFactory } from "@app/services/external-migration/external-migration-service";-import { externalMigrationConfigDALFactory } from "@app/services/external-migration/external-migration-config-dal";import { folderCheckpointDALFactory } from "@app/services/folder-checkpoint/folder-checkpoint-dal";import { folderCheckpointResourcesDALFactory } from "@app/services/folder-checkpoint-resources/folder-checkpoint-resources-dal";import { folderCommitDALFactory } from "@app/services/folder-commit/folder-commit-dal";diff --git a/backend/src/services/app-connection/doppler/doppler-connection-fns.ts b/backend/src/services/app-connection/doppler/doppler-connection-fns.tsindex 450e62736f..3fae455534 100644--- a/backend/src/services/app-connection/doppler/doppler-connection-fns.ts+++ b/backend/src/services/app-connection/doppler/doppler-connection-fns.ts@@ -34,8 +34,9 @@ export const validateDopplerConnectionCredentials = async (config: TDopplerConne});} catch (error: unknown) {if (error instanceof AxiosError) {+ const responseData = error.response?.data as { messages?: string[] } | undefined;throw new BadRequestError({- message: `Failed to validate Doppler credentials: ${error.response?.data?.messages?.join(", ") || error.message || "Unknown error"}`+ message: `Failed to validate Doppler credentials: ${responseData?.messages?.join(", ") || error.message || "Unknown error"}`});}throw new BadRequestError({@@ -58,6 +59,7 @@ export const listDopplerProjects = async (appConnection: TDopplerConnection): Prlet hasMore = true;while (hasMore && page <= maxPages) {+ // eslint-disable-next-line no-await-in-loopconst res = await request.get<{ projects: TDopplerProject[]; page: number }>(`${DOPPLER_API_URL}/v3/projects`, {params: { page, per_page: perPage },headers: { Authorization: `Bearer ${apiToken}` }@@ -90,6 +92,7 @@ export const listDopplerEnvironments = async (let hasMore = true;while (hasMore && page <= maxPages) {+ // eslint-disable-next-line no-await-in-loopconst res = await request.get<{ environments: TDopplerEnvironment[] }>(`${DOPPLER_API_URL}/v3/environments`, {params: { project: projectSlug, page, per_page: perPage },headers: { Authorization: `Bearer ${apiToken}` }diff --git a/backend/src/services/external-migration/external-migration-config-dal.ts b/backend/src/services/external-migration/external-migration-config-dal.tsindex f989e51c7f..90308f032b 100644--- a/backend/src/services/external-migration/external-migration-config-dal.ts+++ b/backend/src/services/external-migration/external-migration-config-dal.ts@@ -63,9 +63,10 @@ export const externalMigrationConfigDALFactory = (db: TDbClient) => {tx?: Knex) => {try {- const qb = (tx || db?.replicaNode?.() || db)(TableName.ExternalMigrationConfig);- buildConnectionJoin(qb, db);- qb.where(buildFindFilter(prependTableNameToFindFilter(TableName.ExternalMigrationConfig, filter)));+ const qb = buildConnectionJoin(+ (tx || db?.replicaNode?.() || db)(TableName.ExternalMigrationConfig),+ db+ ).where(buildFindFilter(prependTableNameToFindFilter(TableName.ExternalMigrationConfig, filter)));const result = await qb.first();if (!result) return undefined;@@ -78,9 +79,10 @@ export const externalMigrationConfigDALFactory = (db: TDbClient) => {const findWithConnection = async (filter: { orgId: string; provider?: string }, tx?: Knex) => {try {- const qb = (tx || db?.replicaNode?.() || db)(TableName.ExternalMigrationConfig);- buildConnectionJoin(qb, db);- qb.where(buildFindFilter(prependTableNameToFindFilter(TableName.ExternalMigrationConfig, filter)));+ const qb = buildConnectionJoin(+ (tx || db?.replicaNode?.() || db)(TableName.ExternalMigrationConfig),+ db+ ).where(buildFindFilter(prependTableNameToFindFilter(TableName.ExternalMigrationConfig, filter)));const results = await qb;return (results as Record<string, unknown>[]).map(mapResultToConnection);