Skip to content

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

chore(pam): fix lint and prettier formatting

bernie-g74716e361c09
diff --git a/frontend/src/hooks/api/pam/mutations.tsx b/frontend/src/hooks/api/pam/mutations.tsx
index 48b8dcb7de..e259d3c150 100644
--- a/frontend/src/hooks/api/pam/mutations.tsx
+++ b/frontend/src/hooks/api/pam/mutations.tsx
@@ -151,10 +151,10 @@ export const useCreatePamAccountTemplate = () => {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async (params: TCreatePamAccountTemplateDTO) => {
- const { data } = await apiRequest.post<{ template: TPamAccountTemplate; corsProbeUrl?: string | null }>(
- "/api/v1/pam/account-templates",
- params
- );
+ const { data } = await apiRequest.post<{
+ template: TPamAccountTemplate;
+ corsProbeUrl?: string | null;
+ }>("/api/v1/pam/account-templates", params);
return { ...data.template, corsProbeUrl: data.corsProbeUrl };
},
onSuccess: () => {
@@ -167,10 +167,10 @@ export const useUpdatePamAccountTemplate = () => {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async ({ templateId, ...params }: TUpdatePamAccountTemplateDTO) => {
- const { data } = await apiRequest.patch<{ template: TPamAccountTemplate; corsProbeUrl?: string | null }>(
- `/api/v1/pam/account-templates/${templateId}`,
- params
- );
+ const { data } = await apiRequest.patch<{
+ template: TPamAccountTemplate;
+ corsProbeUrl?: string | null;
+ }>(`/api/v1/pam/account-templates/${templateId}`, params);
return { ...data.template, corsProbeUrl: data.corsProbeUrl };
},
onSuccess: () => {
diff --git a/frontend/src/hooks/api/pam/session-playback/queries.tsx b/frontend/src/hooks/api/pam/session-playback/queries.tsx
index 3e1ee1b95b..3b46a759a6 100644
--- a/frontend/src/hooks/api/pam/session-playback/queries.tsx
+++ b/frontend/src/hooks/api/pam/session-playback/queries.tsx
@@ -3,6 +3,7 @@ import { useQuery } from "@tanstack/react-query";
import { apiRequest } from "@app/config/request";
+import { TSessionEvent } from "../types";
import {
decryptOneChunk,
detectChunkGaps,
@@ -10,7 +11,6 @@ import {
PAM_PLAYBACK_MAX_CHUNKS,
PAM_PLAYBACK_MAX_TOTAL_EVENTS
} from "./decrypt";
-import { TSessionEvent } from "../types";
import { TBrokenChunkMarker, TPamSessionPlayback } from "./types";
export const pamPlaybackKeys = {
diff --git a/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsx b/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsx
index 2a42bdaeef..b60ef2cb51 100644
--- a/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsx
+++ b/frontend/src/pages/pam/PamAccountsPage/components/AccountDetailSheet.tsx
@@ -584,7 +584,12 @@ const SettingsTab = ({
type: "warning",
text: "Session playback requires the bucket to allow GET requests from this origin.",
callToAction: (
- <a href="https://infisical.com/docs/documentation/platform/pam/recording-storage" target="_blank" rel="noopener noreferrer" className="text-xs underline">
+ <a
+ href="https://infisical.com/docs/documentation/platform/pam/recording-storage"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-xs underline"
+ >
CORS setup docs
</a>
)
diff --git a/frontend/src/pages/pam/PamSessionsPage/components/SessionDetailSheet.tsx b/frontend/src/pages/pam/PamSessionsPage/components/SessionDetailSheet.tsx
index 49ad34d453..0e01f1ea0e 100644
--- a/frontend/src/pages/pam/PamSessionsPage/components/SessionDetailSheet.tsx
+++ b/frontend/src/pages/pam/PamSessionsPage/components/SessionDetailSheet.tsx
@@ -40,12 +40,12 @@ import { useDecryptedSessionLogs } from "@app/hooks/api/pam/session-playback/que
import { isBrokenChunkMarker } from "@app/hooks/api/pam/session-playback/types";
import { TPamSession, TPamSessionLog, TSessionEvent } from "@app/hooks/api/pam/types";
-const RdpReplayView = lazy(() => import("./RdpReplayView/RdpReplayView"));
-
import { LiveDot } from "../../components/LiveDot";
import { PamDetailSheet } from "../../components/PamDetailSheet";
import { capitalize, formatDuration, STATUS_BADGE } from "../constants";
+const RdpReplayView = lazy(() => import("./RdpReplayView/RdpReplayView"));
+
type Props = {
sessionId?: string;
isOpen: boolean;
@@ -320,7 +320,9 @@ export const SessionDetailSheet = ({ sessionId, isOpen, onOpenChange, onTerminat
}
>
<RdpReplayView
- events={filteredEvents.filter((e): e is TSessionEvent => !isBrokenChunkMarker(e))}
+ events={filteredEvents.filter(
+ (e): e is TSessionEvent => !isBrokenChunkMarker(e)
+ )}
isStreaming={isActive}
/>
</Suspense>
diff --git a/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx b/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx
index e76f996ce1..eb49e931a1 100644
--- a/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx
+++ b/frontend/src/pages/pam/PamTemplatesPage/components/TemplateDetailSheet.tsx
@@ -46,7 +46,6 @@ import { POLICY_EDITORS } from "../../components/policyEditors";
import { SheetSaveBar } from "../../components/SheetSaveBar";
import { AccountPlatformIcon } from "../../PamAccessPage/components/AccountPlatformIcon";
-
const configSchema = z.object({
name: z.string().min(1, "Name is required").max(64),
description: z.string().max(256).optional(),
@@ -89,8 +88,7 @@ const ConfigurationTab = ({
currentProject.id
);
- const isWindows =
- template?.type && template.type === PamAccountType.Windows;
+ const isWindows = template?.type && template.type === PamAccountType.Windows;
const {
control,
@@ -178,7 +176,12 @@ const ConfigurationTab = ({
type: "warning",
text: "Session playback requires the bucket to allow GET requests from this origin.",
callToAction: (
- <a href="https://infisical.com/docs/documentation/platform/pam/recording-storage" target="_blank" rel="noopener noreferrer" className="text-xs underline">
+ <a
+ href="https://infisical.com/docs/documentation/platform/pam/recording-storage"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-xs underline"
+ >
CORS setup docs
</a>
)
@@ -259,7 +262,9 @@ const ConfigurationTab = ({
<SelectValue />
</SelectTrigger>
<SelectContent>
- {!isWindows && <SelectItem value="postgres">Internal Database (default)</SelectItem>}
+ {!isWindows && (
+ <SelectItem value="postgres">Internal Database (default)</SelectItem>
+ )}
<SelectItem value="aws-s3">AWS S3</SelectItem>
</SelectContent>
</Select>
@@ -500,8 +505,6 @@ const SettingsTab = ({
</FieldDescription>
</FieldContent>
</Field>
-
-
</CardContent>
</Card>
diff --git a/frontend/src/pages/pam/layout.tsx b/frontend/src/pages/pam/layout.tsx
index 68c8ea317a..259b9d5d90 100644
--- a/frontend/src/pages/pam/layout.tsx
+++ b/frontend/src/pages/pam/layout.tsx
@@ -1,54 +1,51 @@
-import { createFileRoute, redirect } from '@tanstack/react-router'
+import { createFileRoute, redirect } from "@tanstack/react-router";
-import { BreadcrumbTypes } from '@app/components/v2'
-import { projectKeys } from '@app/hooks/api'
-import { organizationKeys } from '@app/hooks/api/organization/queries'
-import { Organization } from '@app/hooks/api/organization/types'
-import { fetchProjectById } from '@app/hooks/api/projects/queries'
-import {
- fetchUserProjectPermissions,
- roleQueryKeys,
-} from '@app/hooks/api/roles/queries'
-import { PamLayout } from '@app/layouts/PamLayout'
-import { ProjectSelect } from '@app/layouts/ProjectLayout/components/ProjectSelect'
+import { BreadcrumbTypes } from "@app/components/v2";
+import { projectKeys } from "@app/hooks/api";
+import { organizationKeys } from "@app/hooks/api/organization/queries";
+import { Organization } from "@app/hooks/api/organization/types";
+import { fetchProjectById } from "@app/hooks/api/projects/queries";
+import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
+import { PamLayout } from "@app/layouts/PamLayout";
+import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
export const Route = createFileRoute(
- '/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout',
+ "/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/pam/_pam-layout"
)({
component: PamLayout,
beforeLoad: async ({ params, context }) => {
const org = context.queryClient.getQueryData<Organization>(
- organizationKeys.getOrgById(params.orgId),
- )
+ organizationKeys.getOrgById(params.orgId)
+ );
- const pamProjectId = org?.pamProjectId
+ const pamProjectId = org?.pamProjectId;
if (!pamProjectId) {
throw redirect({
- to: '/organizations/$orgId/projects',
- params: { orgId: params.orgId },
- })
+ to: "/organizations/$orgId/projects",
+ params: { orgId: params.orgId }
+ });
}
await Promise.all([
context.queryClient.ensureQueryData({
queryKey: projectKeys.getProjectById(pamProjectId),
- queryFn: () => fetchProjectById(pamProjectId),
+ queryFn: () => fetchProjectById(pamProjectId)
}),
context.queryClient.ensureQueryData({
queryKey: roleQueryKeys.getUserProjectPermissions({
- projectId: pamProjectId,
+ projectId: pamProjectId
}),
- queryFn: () => fetchUserProjectPermissions({ projectId: pamProjectId }),
- }),
- ])
+ queryFn: () => fetchUserProjectPermissions({ projectId: pamProjectId })
+ })
+ ]);
return {
breadcrumbs: [
{
type: BreadcrumbTypes.Component,
- component: ProjectSelect,
- },
- ],
- }
- },
-})
+ component: ProjectSelect
+ }
+ ]
+ };
+ }
+});