Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

run lint autofix

Matheus Nogueirac6b1881216a5
diff --git a/backend/src/services/app-connection/azure-app-configuration/azure-app-configuration-connection-schemas.ts b/backend/src/services/app-connection/azure-app-configuration/azure-app-configuration-connection-schemas.ts
index f684db8c6e..ec3d0c2623 100644
--- a/backend/src/services/app-connection/azure-app-configuration/azure-app-configuration-connection-schemas.ts
+++ b/backend/src/services/app-connection/azure-app-configuration/azure-app-configuration-connection-schemas.ts
@@ -74,20 +74,19 @@ export const ValidateAzureAppConfigurationConnectionCredentialsSchema = z.discri
})
]);
-export const CreateAzureAppConfigurationConnectionSchema =
- ValidateAzureAppConfigurationConnectionCredentialsSchema.and(
- GenericCreateAppConnectionFieldsSchema(AppConnection.AzureAppConfiguration, {
- supportsCredentialRotation: true
- })
- ).superRefine((data, ctx) => {
- if (data.method !== AzureAppConfigurationConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
- ctx.addIssue({
- code: z.ZodIssueCode.custom,
- message: "Credential rotation is only supported for the client-secret method",
- path: ["isAutoRotationEnabled"]
- });
- }
- });
+export const CreateAzureAppConfigurationConnectionSchema = ValidateAzureAppConfigurationConnectionCredentialsSchema.and(
+ GenericCreateAppConnectionFieldsSchema(AppConnection.AzureAppConfiguration, {
+ supportsCredentialRotation: true
+ })
+).superRefine((data, ctx) => {
+ if (data.method !== AzureAppConfigurationConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Credential rotation is only supported for the client-secret method",
+ path: ["isAutoRotationEnabled"]
+ });
+ }
+});
export const UpdateAzureAppConfigurationConnectionSchema = z
.object({
diff --git a/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-schemas.ts b/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-schemas.ts
index 47d3274016..d90800f830 100644
--- a/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-schemas.ts
+++ b/backend/src/services/app-connection/azure-client-secrets/azure-client-secrets-connection-schemas.ts
@@ -126,18 +126,17 @@ export const ValidateAzureClientSecretsConnectionCredentialsSchema = z.discrimin
})
]);
-export const CreateAzureClientSecretsConnectionSchema =
- ValidateAzureClientSecretsConnectionCredentialsSchema.and(
- GenericCreateAppConnectionFieldsSchema(AppConnection.AzureClientSecrets, { supportsCredentialRotation: true })
- ).superRefine((data, ctx) => {
- if (data.method !== AzureClientSecretsConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
- ctx.addIssue({
- code: z.ZodIssueCode.custom,
- message: "Credential rotation is only supported for the client-secret method",
- path: ["isAutoRotationEnabled"]
- });
- }
- });
+export const CreateAzureClientSecretsConnectionSchema = ValidateAzureClientSecretsConnectionCredentialsSchema.and(
+ GenericCreateAppConnectionFieldsSchema(AppConnection.AzureClientSecrets, { supportsCredentialRotation: true })
+).superRefine((data, ctx) => {
+ if (data.method !== AzureClientSecretsConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Credential rotation is only supported for the client-secret method",
+ path: ["isAutoRotationEnabled"]
+ });
+ }
+});
export const UpdateAzureClientSecretsConnectionSchema = z
.object({
diff --git a/backend/src/services/app-connection/azure-devops/azure-devops-schemas.ts b/backend/src/services/app-connection/azure-devops/azure-devops-schemas.ts
index 092f1e6df0..f1330af2d1 100644
--- a/backend/src/services/app-connection/azure-devops/azure-devops-schemas.ts
+++ b/backend/src/services/app-connection/azure-devops/azure-devops-schemas.ts
@@ -111,20 +111,19 @@ export const ValidateAzureDevOpsConnectionCredentialsSchema = z.discriminatedUni
})
]);
-export const CreateAzureDevOpsConnectionSchema =
- ValidateAzureDevOpsConnectionCredentialsSchema.and(
- GenericCreateAppConnectionFieldsSchema(AppConnection.AzureDevOps, {
- supportsCredentialRotation: true
- })
- ).superRefine((data, ctx) => {
- if (data.method !== AzureDevOpsConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
- ctx.addIssue({
- code: z.ZodIssueCode.custom,
- message: "Credential rotation is only supported for the client-secret method",
- path: ["isAutoRotationEnabled"]
- });
- }
- });
+export const CreateAzureDevOpsConnectionSchema = ValidateAzureDevOpsConnectionCredentialsSchema.and(
+ GenericCreateAppConnectionFieldsSchema(AppConnection.AzureDevOps, {
+ supportsCredentialRotation: true
+ })
+).superRefine((data, ctx) => {
+ if (data.method !== AzureDevOpsConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Credential rotation is only supported for the client-secret method",
+ path: ["isAutoRotationEnabled"]
+ });
+ }
+});
export const UpdateAzureDevOpsConnectionSchema = z
.object({
diff --git a/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-schemas.ts b/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-schemas.ts
index 38631cab86..b2af69b188 100644
--- a/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-schemas.ts
+++ b/backend/src/services/app-connection/azure-key-vault/azure-key-vault-connection-schemas.ts
@@ -98,21 +98,20 @@ export const ValidateAzureKeyVaultConnectionCredentialsSchema = z.discriminatedU
})
]);
-export const CreateAzureKeyVaultConnectionSchema =
- ValidateAzureKeyVaultConnectionCredentialsSchema.and(
- GenericCreateAppConnectionFieldsSchema(AppConnection.AzureKeyVault, {
- supportsCredentialRotation: true,
- supportsGateways: true
- })
- ).superRefine((data, ctx) => {
- if (data.method !== AzureKeyVaultConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
- ctx.addIssue({
- code: z.ZodIssueCode.custom,
- message: "Credential rotation is only supported for the client-secret method",
- path: ["isAutoRotationEnabled"]
- });
- }
- });
+export const CreateAzureKeyVaultConnectionSchema = ValidateAzureKeyVaultConnectionCredentialsSchema.and(
+ GenericCreateAppConnectionFieldsSchema(AppConnection.AzureKeyVault, {
+ supportsCredentialRotation: true,
+ supportsGateways: true
+ })
+).superRefine((data, ctx) => {
+ if (data.method !== AzureKeyVaultConnectionMethod.ClientSecret && data.isAutoRotationEnabled) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: "Credential rotation is only supported for the client-secret method",
+ path: ["isAutoRotationEnabled"]
+ });
+ }
+});
export const UpdateAzureKeyVaultConnectionSchema = z
.object({