mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
Fix lint errors
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { Request, Response } from "express";
|
import { Request, Response } from "express";
|
||||||
import { PipelineStage, trusted, Types } from "mongoose";
|
import { PipelineStage, Types } from "mongoose";
|
||||||
import { Secret } from "../../../models";
|
import { Secret } from "../../../models";
|
||||||
import {
|
import {
|
||||||
FolderVersion,
|
FolderVersion,
|
||||||
@@ -15,7 +15,7 @@ import { getLatestSecretVersionIds } from "../../helpers/secretVersion";
|
|||||||
import Folder, { TFolderSchema } from "../../../models/folder";
|
import Folder, { TFolderSchema } from "../../../models/folder";
|
||||||
import { searchByFolderId } from "../../../services/FolderService";
|
import { searchByFolderId } from "../../../services/FolderService";
|
||||||
import { EELicenseService } from "../../services";
|
import { EELicenseService } from "../../services";
|
||||||
import { isValidIpOrCidr, extractIPDetails } from "../../../utils/ip";
|
import { extractIPDetails, isValidIpOrCidr } from "../../../utils/ip";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return secret snapshots for workspace with id [workspaceId]
|
* Return secret snapshots for workspace with id [workspaceId]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const router = express.Router();
|
|||||||
import {
|
import {
|
||||||
requireAuth
|
requireAuth
|
||||||
} from "../../../middleware";
|
} from "../../../middleware";
|
||||||
import { AUTH_MODE_JWT, AUTH_MODE_API_KEY } from "../../../variables";
|
import { AUTH_MODE_API_KEY, AUTH_MODE_JWT } from "../../../variables";
|
||||||
import { usersController } from "../../controllers/v1";
|
import { usersController } from "../../controllers/v1";
|
||||||
|
|
||||||
router.get(
|
router.get(
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export const isValidCidr = (cidr: string): boolean => {
|
|||||||
*/
|
*/
|
||||||
export const isValidIpOrCidr = (ip: string): boolean => {
|
export const isValidIpOrCidr = (ip: string): boolean => {
|
||||||
// if the string contains a slash, treat it as a CIDR block
|
// if the string contains a slash, treat it as a CIDR block
|
||||||
if (ip.includes('/')) {
|
if (ip.includes("/")) {
|
||||||
return isValidCidr(ip);
|
return isValidCidr(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import { Types } from "mongoose";
|
|||||||
import { encryptSymmetric128BitHexKeyUTF8 } from "../crypto";
|
import { encryptSymmetric128BitHexKeyUTF8 } from "../crypto";
|
||||||
import { EESecretService } from "../../ee/services";
|
import { EESecretService } from "../../ee/services";
|
||||||
import {
|
import {
|
||||||
|
IPType,
|
||||||
ISecretVersion,
|
ISecretVersion,
|
||||||
SecretSnapshot,
|
SecretSnapshot,
|
||||||
SecretVersion,
|
SecretVersion,
|
||||||
TrustedIP,
|
TrustedIP
|
||||||
IPType
|
|
||||||
} from "../../ee/models";
|
} from "../../ee/models";
|
||||||
import {
|
import {
|
||||||
BackupPrivateKey,
|
BackupPrivateKey,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export * from "./serviceTokens";
|
|||||||
export * from "./ssoConfig";
|
export * from "./ssoConfig";
|
||||||
export * from "./subscriptions";
|
export * from "./subscriptions";
|
||||||
export * from "./tags";
|
export * from "./tags";
|
||||||
|
export * from "./trustedIps";
|
||||||
export * from "./users";
|
export * from "./users";
|
||||||
export * from "./webhooks";
|
export * from "./webhooks";
|
||||||
export * from "./workspace";
|
export * from "./workspace";
|
||||||
export * from "./trustedIps";
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
import { apiRequest } from "@app/config/request";
|
import { apiRequest } from "@app/config/request";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
export {
|
export {
|
||||||
useGetTrustedIps,
|
|
||||||
useAddTrustedIp,
|
useAddTrustedIp,
|
||||||
useUpdateTrustedIp,
|
useDeleteTrustedIp,
|
||||||
useDeleteTrustedIp
|
useGetTrustedIps,
|
||||||
} from "./queries";
|
useUpdateTrustedIp} from "./queries";
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
import { apiRequest } from "@app/config/request";
|
import { apiRequest } from "@app/config/request";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
TrustedIp
|
TrustedIp
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ export {
|
|||||||
useCreateAPIKey,
|
useCreateAPIKey,
|
||||||
useDeleteAPIKey,
|
useDeleteAPIKey,
|
||||||
useDeleteOrgMembership,
|
useDeleteOrgMembership,
|
||||||
useGetMyIp,
|
|
||||||
useGetMyAPIKeys,
|
useGetMyAPIKeys,
|
||||||
|
useGetMyIp,
|
||||||
useGetMySessions,
|
useGetMySessions,
|
||||||
useGetOrgUsers,
|
useGetOrgUsers,
|
||||||
useGetUser,
|
useGetUser,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
|
||||||
import { IPAllowlistPage } from "@app/views/Project/IPAllowListPage";
|
import { IPAllowlistPage } from "@app/views/Project/IPAllowListPage";
|
||||||
|
|
||||||
const ProjectAllowlist = () => {
|
const ProjectAllowlist = () => {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { useEffect } from "react";
|
|||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
import { yupResolver } from "@hookform/resolvers/yup";
|
import { yupResolver } from "@hookform/resolvers/yup";
|
||||||
import * as yup from "yup";
|
import * as yup from "yup";
|
||||||
|
|
||||||
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -10,13 +11,13 @@ import {
|
|||||||
Modal,
|
Modal,
|
||||||
ModalContent
|
ModalContent
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
|
||||||
import { useWorkspace } from "@app/context";
|
import { useWorkspace } from "@app/context";
|
||||||
import {
|
import {
|
||||||
useGetMyIp,
|
|
||||||
useAddTrustedIp,
|
useAddTrustedIp,
|
||||||
|
useGetMyIp,
|
||||||
useUpdateTrustedIp
|
useUpdateTrustedIp
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
const schema = yup.object({
|
const schema = yup.object({
|
||||||
ipAddress: yup.string().required("IP address is required"),
|
ipAddress: yup.string().required("IP address is required"),
|
||||||
|
|||||||
@@ -1,18 +1,20 @@
|
|||||||
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
|
||||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
|
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
DeleteActionModal,
|
DeleteActionModal,
|
||||||
UpgradePlanModal
|
UpgradePlanModal
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
|
import { useSubscription,useWorkspace } from "@app/context";
|
||||||
import {
|
import {
|
||||||
useDeleteTrustedIp
|
useDeleteTrustedIp
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { useSubscription,useWorkspace } from "@app/context";
|
|
||||||
import { usePopUp } from "@app/hooks/usePopUp";
|
import { usePopUp } from "@app/hooks/usePopUp";
|
||||||
import { IPAllowlistTable } from "./IPAllowlistTable";
|
|
||||||
import { IPAllowlistModal } from "./IPAllowlistModal";
|
import { IPAllowlistModal } from "./IPAllowlistModal";
|
||||||
|
import { IPAllowlistTable } from "./IPAllowlistTable";
|
||||||
|
|
||||||
export const IPAllowlistSection = () => {
|
export const IPAllowlistSection = () => {
|
||||||
const { createNotification } = useNotificationContext();
|
const { createNotification } = useNotificationContext();
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
|
import { faGlobe, faPencil, faXmark } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
TableContainer,
|
EmptyState,
|
||||||
|
IconButton,
|
||||||
Table,
|
Table,
|
||||||
THead,
|
TableContainer,
|
||||||
Tr,
|
TableSkeleton,
|
||||||
Th,
|
|
||||||
TBody,
|
TBody,
|
||||||
Td,
|
Td,
|
||||||
EmptyState,
|
Th,
|
||||||
TableSkeleton,
|
THead,
|
||||||
IconButton,
|
Tr,
|
||||||
UpgradePlanModal
|
UpgradePlanModal
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { useSubscription, useWorkspace } from "@app/context";
|
import { useSubscription, useWorkspace } from "@app/context";
|
||||||
import {
|
import {
|
||||||
useGetTrustedIps
|
useGetTrustedIps
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
||||||
import { faGlobe, faPencil, faXmark } from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@@ -56,7 +57,7 @@ export const IPAllowlistTable = ({
|
|||||||
<Th className="flex-1">Format</Th>
|
<Th className="flex-1">Format</Th>
|
||||||
<Th className="flex-1">Comment</Th>
|
<Th className="flex-1">Comment</Th>
|
||||||
{/* <Th className="flex-1">Status</Th> */}
|
{/* <Th className="flex-1">Status</Th> */}
|
||||||
<Th className="w-5"></Th>
|
<Th className="w-5" />
|
||||||
</Tr>
|
</Tr>
|
||||||
</THead>
|
</THead>
|
||||||
<TBody>
|
<TBody>
|
||||||
|
|||||||
+1
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Button
|
Button
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
|
|||||||
+1
@@ -1,5 +1,6 @@
|
|||||||
import { faCreditCard, faXmark } from "@fortawesome/free-solid-svg-icons";
|
import { faCreditCard, faXmark } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
EmptyState,
|
EmptyState,
|
||||||
IconButton,
|
IconButton,
|
||||||
|
|||||||
+1
@@ -1,6 +1,7 @@
|
|||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useForm } from "react-hook-form";
|
||||||
import { yupResolver } from "@hookform/resolvers/yup";
|
import { yupResolver } from "@hookform/resolvers/yup";
|
||||||
import * as yup from "yup";
|
import * as yup from "yup";
|
||||||
|
|
||||||
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
|||||||
+1
@@ -1,5 +1,6 @@
|
|||||||
import { faDownload, faFileInvoice } from "@fortawesome/free-solid-svg-icons";
|
import { faDownload, faFileInvoice } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
EmptyState,
|
EmptyState,
|
||||||
IconButton,
|
IconButton,
|
||||||
|
|||||||
+2
@@ -1,5 +1,6 @@
|
|||||||
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
import { faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -11,6 +12,7 @@ import {
|
|||||||
useDeleteWsEnvironment
|
useDeleteWsEnvironment
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { usePopUp } from "@app/hooks/usePopUp";
|
import { usePopUp } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
import { AddEnvironmentModal } from "./AddEnvironmentModal";
|
import { AddEnvironmentModal } from "./AddEnvironmentModal";
|
||||||
import { EnvironmentTable } from "./EnvironmentTable";
|
import { EnvironmentTable } from "./EnvironmentTable";
|
||||||
import { UpdateEnvironmentModal } from "./UpdateEnvironmentModal";
|
import { UpdateEnvironmentModal } from "./UpdateEnvironmentModal";
|
||||||
|
|||||||
Reference in New Issue
Block a user