mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 08:28:22 +00:00
lint & a few fixes
This commit is contained in:
Vendored
+5
-5
@@ -597,16 +597,16 @@ import {
|
||||
TWorkflowIntegrationsInsert,
|
||||
TWorkflowIntegrationsUpdate
|
||||
} from "@app/db/schemas";
|
||||
import {
|
||||
TCertificateRequests,
|
||||
TCertificateRequestsInsert,
|
||||
TCertificateRequestsUpdate
|
||||
} from "@app/db/schemas/certificate-requests";
|
||||
import {
|
||||
TAccessApprovalPoliciesEnvironments,
|
||||
TAccessApprovalPoliciesEnvironmentsInsert,
|
||||
TAccessApprovalPoliciesEnvironmentsUpdate
|
||||
} from "@app/db/schemas/access-approval-policies-environments";
|
||||
import {
|
||||
TCertificateRequests,
|
||||
TCertificateRequestsInsert,
|
||||
TCertificateRequestsUpdate
|
||||
} from "@app/db/schemas/certificate-requests";
|
||||
import {
|
||||
TIdentityAuthTemplates,
|
||||
TIdentityAuthTemplatesInsert,
|
||||
|
||||
@@ -12,7 +12,6 @@ import { registerDynamicSecretLeaseRouter } from "./dynamic-secret-lease-router"
|
||||
import { registerKubernetesDynamicSecretLeaseRouter } from "./dynamic-secret-lease-routers/kubernetes-lease-router";
|
||||
import { registerDynamicSecretRouter } from "./dynamic-secret-router";
|
||||
import { registerExternalKmsRouter } from "./external-kms-router";
|
||||
|
||||
import { EXTERNAL_KMS_REGISTER_ROUTER_MAP } from "./external-kms-routers";
|
||||
import { registerGatewayRouter } from "./gateway-router";
|
||||
import { registerGithubOrgSyncRouter } from "./github-org-sync-router";
|
||||
|
||||
@@ -219,7 +219,7 @@ export const approvalRequestDALFactory = (db: TDbClient) => {
|
||||
.whereIn("requestId", requestIds)
|
||||
.orderBy("stepNumber", "asc");
|
||||
|
||||
const stepsByRequestId: Record<string, any[]> = {};
|
||||
const stepsByRequestId: Record<string, ApprovalPolicyStep[]> = {};
|
||||
|
||||
if (steps.length) {
|
||||
const stepIds = steps.map((step) => step.id);
|
||||
|
||||
@@ -6,9 +6,9 @@ import {
|
||||
ApprovalRequestsSchema,
|
||||
ApprovalRequestStepsSchema
|
||||
} from "@app/db/schemas";
|
||||
import { ms } from "@app/lib/ms";
|
||||
|
||||
import { ApproverType } from "./approval-policy-enums";
|
||||
import { ms } from "@app/lib/ms";
|
||||
|
||||
const ApprovalPolicyStepSchema = z.object({
|
||||
name: z.string().min(1).max(128).nullable().optional(),
|
||||
|
||||
@@ -2,6 +2,7 @@ import { ActionProjectType, ProjectMembershipRole, TApprovalPolicies, TApprovalR
|
||||
import { TUserGroupMembershipDALFactory } from "@app/ee/services/group/user-group-membership-dal";
|
||||
import { TPermissionServiceFactory } from "@app/ee/services/permission/permission-service-types";
|
||||
import { BadRequestError, ForbiddenRequestError } from "@app/lib/errors";
|
||||
import { ms } from "@app/lib/ms";
|
||||
import { OrgServiceActor } from "@app/lib/types";
|
||||
import { TNotificationServiceFactory } from "@app/services/notification/notification-service";
|
||||
import { NotificationType } from "@app/services/notification/notification-types";
|
||||
@@ -31,7 +32,6 @@ import {
|
||||
TCreateRequestDTO,
|
||||
TUpdatePolicyDTO
|
||||
} from "./approval-policy-types";
|
||||
import { ms } from "@app/lib/ms";
|
||||
|
||||
type TApprovalPolicyServiceFactoryDep = {
|
||||
approvalPolicyDAL: TApprovalPolicyDALFactory;
|
||||
@@ -66,7 +66,7 @@ export const approvalPolicyServiceFactory = ({
|
||||
|
||||
const userIdsToNotify = new Set<string>();
|
||||
|
||||
for (const approver of step.approvers) {
|
||||
for await (const approver of step.approvers) {
|
||||
if (approver.type === ApproverType.User) {
|
||||
userIdsToNotify.add(approver.id);
|
||||
} else if (approver.type === ApproverType.Group) {
|
||||
@@ -519,7 +519,7 @@ export const approvalPolicyServiceFactory = ({
|
||||
}
|
||||
|
||||
const { updatedRequest, nextStepToNotify } = await approvalRequestDAL.transaction(async (tx) => {
|
||||
let nextStepToNotify = null;
|
||||
let nextStepToNotifyInner = null;
|
||||
|
||||
// Create approval
|
||||
await approvalRequestApprovalsDAL.create(
|
||||
@@ -565,7 +565,7 @@ export const approvalPolicyServiceFactory = ({
|
||||
);
|
||||
|
||||
if (nextStep.notifyApprovers) {
|
||||
nextStepToNotify = nextStep;
|
||||
nextStepToNotifyInner = nextStep;
|
||||
}
|
||||
} else {
|
||||
// All steps completed
|
||||
@@ -581,7 +581,7 @@ export const approvalPolicyServiceFactory = ({
|
||||
}
|
||||
}
|
||||
|
||||
return { updatedRequest: request, nextStepToNotify };
|
||||
return { updatedRequest: request, nextStepToNotify: nextStepToNotifyInner };
|
||||
});
|
||||
|
||||
if (nextStepToNotify) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import picomatch from "picomatch";
|
||||
|
||||
import { ms } from "@app/lib/ms";
|
||||
|
||||
import { ApprovalRequestGrantStatus } from "../approval-policy-enums";
|
||||
import {
|
||||
TApprovalRequestFactoryCanAccess,
|
||||
@@ -9,7 +11,6 @@ import {
|
||||
TApprovalResourceFactory
|
||||
} from "../approval-policy-types";
|
||||
import { TPamAccessPolicy, TPamAccessPolicyInputs, TPamAccessRequestData } from "./pam-access-policy-types";
|
||||
import { ms } from "@app/lib/ms";
|
||||
|
||||
export const pamAccessPolicyFactory: TApprovalResourceFactory<
|
||||
TPamAccessPolicyInputs,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import { ms } from "@app/lib/ms";
|
||||
|
||||
import {
|
||||
|
||||
@@ -19,8 +19,8 @@ import {
|
||||
CertExtendedKeyUsageType,
|
||||
CertIncludeType,
|
||||
CertKeyUsageType,
|
||||
CertSubjectAttributeType,
|
||||
CertSubjectAlternativeNameType
|
||||
CertSubjectAlternativeNameType,
|
||||
CertSubjectAttributeType
|
||||
} from "@app/services/certificate-common/certificate-constants";
|
||||
import { TCertificateProfileDALFactory } from "@app/services/certificate-profile/certificate-profile-dal";
|
||||
import { EnrollmentType, IssuerType } from "@app/services/certificate-profile/certificate-profile-types";
|
||||
|
||||
Reference in New Issue
Block a user