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
feat(migration): add projectId prop to SecretPathInput and use it in DopplerImportModal
Igor Correa6ae7911c2714
diff --git a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsxindex 81a25ea266..dd43033733 100644--- a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx+++ b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx@@ -17,6 +17,7 @@ type Props = Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> &isReadOnly?: boolean;isDisabled?: boolean;environment?: string;+ projectId?: string;containerClassName?: string;onChange?: (arg: string) => void;folderNames?: string[];@@ -26,6 +27,7 @@ export const SecretPathInput = ({containerClassName,onChange,environment,+ projectId: projectIdProp,value: propValue,folderNames: folderNamesProp,...props@@ -38,7 +40,7 @@ export const SecretPathInput = ({const [debouncedInputValue] = useDebounce(inputValue, 200);const { currentProject } = useProject();- const projectId = currentProject?.id || "";+ const projectId = projectIdProp || currentProject?.id || "";const { folderNames: folders } = useGetFoldersByEnv({path: secretPath,environments: [environment || currentProject?.environments?.[0].slug || ""],diff --git a/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/DopplerImportModal.tsx b/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/DopplerImportModal.tsxindex f98f9a096c..a9e3f1ea74 100644--- a/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/DopplerImportModal.tsx+++ b/frontend/src/pages/organization/SettingsPage/components/ExternalMigrationsTab/components/DopplerImportModal.tsx@@ -5,6 +5,7 @@ import { InfoIcon } from "lucide-react";import { z } from "zod";import { createNotification } from "@app/components/notifications";+import { SecretPathInput } from "@app/components/v2/SecretPathInput";import {Button,Dialog,@@ -19,8 +20,7 @@ import {FieldLabel,Tooltip,TooltipContent,- TooltipTrigger,- UnstableInput+ TooltipTrigger} from "@app/components/v3";import { FilterableSelect } from "@app/components/v3/generic/ReactSelect";import { useGetUserProjects } from "@app/hooks/api";@@ -72,6 +72,7 @@ export const DopplerImportModal = ({ isOpen, onOpenChange, config }: Props) => {const selectedDopplerProject = watch("dopplerProject");const selectedTargetProjectId = watch("targetProjectId");+ const selectedTargetEnvironment = watch("targetEnvironment");const { data: dopplerProjects = [], isPending: isLoadingProjects } = useGetDopplerProjects(config.id@@ -291,11 +292,11 @@ export const DopplerImportModal = ({ isOpen, onOpenChange, config }: Props) => {</Tooltip></FieldLabel><FieldContent>- <UnstableInput- {...field}- placeholder="e.g., /"- autoComplete="off"- isError={Boolean(error)}+ <SecretPathInput+ value={field.value}+ onChange={field.onChange}+ projectId={selectedTargetProjectId}+ environment={selectedTargetEnvironment}/></FieldContent><FieldError>{error?.message}</FieldError>