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 linter/type issues
Matheus Nogueiraf5618a5b1de9
diff --git a/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsx b/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsxindex ad891a66ae..12f08a6d37 100644--- a/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsx+++ b/frontend/src/components/honey-tokens/DeleteHoneyTokenModal.tsx@@ -17,7 +17,7 @@ import {FieldLabel,Input} from "@app/components/v3";-import { useDeleteHoneyToken } from "@app/hooks/api/honeyTokens";+import { useRevokeHoneyToken } from "@app/hooks/api/honeyTokens";import { TDashboardHoneyToken } from "@app/hooks/api/honeyTokens/types";type Props = {@@ -27,7 +27,7 @@ type Props = {};export const DeleteHoneyTokenModal = ({ isOpen, onOpenChange, honeyToken }: Props) => {- const deleteHoneyToken = useDeleteHoneyToken();+ const revokeHoneyToken = useRevokeHoneyToken();const [inputData, setInputData] = useState("");useEffect(() => {@@ -37,7 +37,7 @@ export const DeleteHoneyTokenModal = ({ isOpen, onOpenChange, honeyToken }: Propif (!honeyToken) return null;const handleDelete = async () => {- await deleteHoneyToken.mutateAsync({+ await revokeHoneyToken.mutateAsync({honeyTokenId: honeyToken.id,projectId: honeyToken.projectId});diff --git a/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsx b/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsxindex a6bfc6d121..32ee873641 100644--- a/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsx+++ b/frontend/src/components/honey-tokens/forms/HoneyTokenMappingFields/AwsHoneyTokenMappingFields.tsx@@ -47,7 +47,7 @@ export const AwsHoneyTokenMappingFields = () => {<table className="w-full table-auto"><thead><tr className="text-left">- <th className="whitespace-nowrap pb-3">+ <th className="pb-3 whitespace-nowrap"><Label className="text-xs">Decoy Credential</Label></th><th className="pb-3" />diff --git a/frontend/src/hooks/api/honeyTokens/types.ts b/frontend/src/hooks/api/honeyTokens/types.tsindex 6c71fe683e..340eb74d69 100644--- a/frontend/src/hooks/api/honeyTokens/types.ts+++ b/frontend/src/hooks/api/honeyTokens/types.ts@@ -13,5 +13,6 @@ export type {THoneyTokenEvent,THoneyTokenOption,THoneyTokenOptionMap,+ TRevokeHoneyTokenDTO,TUpdateHoneyTokenDTO} from "./types/index";diff --git a/frontend/src/pages/organization/SettingsPage/components/OrgProductSettingsTab/OrgProductSettingsTab.tsx b/frontend/src/pages/organization/SettingsPage/components/OrgProductSettingsTab/OrgProductSettingsTab.tsxindex c575d109a0..96c426683b 100644--- a/frontend/src/pages/organization/SettingsPage/components/OrgProductSettingsTab/OrgProductSettingsTab.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/OrgProductSettingsTab/OrgProductSettingsTab.tsx@@ -38,34 +38,32 @@ export const OrgProductSettingsTab = () => {};return (- <>- <div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-6">- <div className="mb-6">- <h2 className="text-xl font-medium text-mineshaft-100">Secrets Management</h2>- </div>- <div className="flex items-center justify-between">- <div>- <h3 className="mb-2 text-lg font-medium text-mineshaft-100">- Unique Secret Sync Destination Policy- </h3>- <p className="text-sm text-mineshaft-400">- When enabled, ensures each destination can only be used by one secret sync- configuration, preventing potential conflicts or overwrites.- </p>- </div>- <OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Settings}>- {(isAllowed) => (- <Switch- id="blockDuplicateSecretSyncDestinations"- isDisabled={!isAllowed || isLoading}- isChecked={currentOrg?.blockDuplicateSecretSyncDestinations ?? false}- onCheckedChange={(state) => handleToggle(state as boolean)}- />- )}- </OrgPermissionCan>+ <div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-6">+ <div className="mb-6">+ <h2 className="text-xl font-medium text-mineshaft-100">Secrets Management</h2>+ </div>+ <div className="flex items-center justify-between">+ <div>+ <h3 className="mb-2 text-lg font-medium text-mineshaft-100">+ Unique Secret Sync Destination Policy+ </h3>+ <p className="text-sm text-mineshaft-400">+ When enabled, ensures each destination can only be used by one secret sync+ configuration, preventing potential conflicts or overwrites.+ </p></div>- <HoneyTokenSection />+ <OrgPermissionCan I={OrgPermissionActions.Edit} a={OrgPermissionSubjects.Settings}>+ {(isAllowed) => (+ <Switch+ id="blockDuplicateSecretSyncDestinations"+ isDisabled={!isAllowed || isLoading}+ isChecked={currentOrg?.blockDuplicateSecretSyncDestinations ?? false}+ onCheckedChange={(state) => handleToggle(state as boolean)}+ />+ )}+ </OrgPermissionCan></div>- </>+ <HoneyTokenSection />+ </div>);};diff --git a/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsx b/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsxindex 43310dccfb..b14c253cef 100644--- a/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsx+++ b/frontend/src/pages/secret-manager/OverviewPage/components/AddResourceButtons/AddResourceButtons.tsx@@ -1,12 +1,12 @@import {ChevronDown,ClipboardPasteIcon,- SirenIcon,FingerprintIcon,FolderIcon,ImportIcon,PlusIcon,RefreshCwIcon,+ SirenIcon,UploadIcon} from "lucide-react";diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenListView.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenListView.tsxindex 80df069b62..978ef49654 100644--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenListView.tsx+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/HoneyTokenListView/HoneyTokenListView.tsx@@ -5,7 +5,7 @@ import {RevokeHoneyTokenModal,ViewHoneyTokenCredentialsModal} from "@app/components/honey-tokens";-import { useWorkspace } from "@app/context";+import { useProject } from "@app/context";import { TDashboardHoneyToken } from "@app/hooks/api/honeyTokens/types";import { HoneyTokenItem } from "./HoneyTokenItem";@@ -15,8 +15,7 @@ type Props = {};export const HoneyTokenListView = ({ honeyTokens }: Props) => {- const { currentWorkspace } = useWorkspace();- const projectId = currentWorkspace?.id || "";+ const { projectId } = useProject();const [revokeTarget, setRevokeTarget] = useState<TDashboardHoneyToken>();const [editTarget, setEditTarget] = useState<TDashboardHoneyToken>();