diff --git a/.gitignore b/.gitignore index 3ff083c3ff..92b8e4b3d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ ## Compiled JavaScript files -lib/**/*.js +dist/**/*.js **/*.js.map # Typescript v1 declaration files @@ -26,7 +26,7 @@ public/* !public/logo.png coverage -lib +dist artifacts generated.gql diff --git a/BUCK b/BUCK index a7aeaa58ac..2b1e63fa2d 100644 --- a/BUCK +++ b/BUCK @@ -5,7 +5,8 @@ pnpm_workspace( child_packages = [ "//core/api:package.json", "//apps/consent:package.json", - "//apps/dashboard:package.json" + "//apps/dashboard:package.json", + "//lib/eslint-config:package.json" ], visibility = ["PUBLIC"], ) diff --git a/apps/dashboard/.eslintrc.cjs b/apps/dashboard/.eslintrc.cjs new file mode 100644 index 0000000000..d64adcaec3 --- /dev/null +++ b/apps/dashboard/.eslintrc.cjs @@ -0,0 +1,3 @@ +module.exports = { + "extends": ["next/core-web-vitals", "@galoy/eslint-config/base"] +} diff --git a/apps/dashboard/.eslintrc.json b/apps/dashboard/.eslintrc.json deleted file mode 100644 index bffb357a71..0000000000 --- a/apps/dashboard/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/apps/dashboard/BUCK b/apps/dashboard/BUCK index 7359243dda..27471b9f6c 100644 --- a/apps/dashboard/BUCK +++ b/apps/dashboard/BUCK @@ -1,4 +1,10 @@ -load("@toolchains//workspace-pnpm:macros.bzl", "build_node_modules", "next_build", "next_build_bin") +load( + "@toolchains//workspace-pnpm:macros.bzl", + "build_node_modules", + "next_build", + "next_build_bin", + "eslint" +) export_file( name = "package.json", @@ -33,7 +39,21 @@ next_build_bin( name = "dashboard", ) +dev_deps_srcs = { + "lib/eslint-config": "//lib/eslint-config:src", +} + +eslint( + name = "check-lint", + srcs = [":src"] + glob([".eslint*"]), + extensions = [".ts", ".tsx"], + allow_warnings = True, + dev_deps_srcs = dev_deps_srcs, +) + test_suite( name = "test", - tests = [], + tests = [ + ":check-lint", + ], ) diff --git a/apps/dashboard/app/api/auth/[...nextauth]/route.ts b/apps/dashboard/app/api/auth/[...nextauth]/route.ts index 988e3a4785..fa3c1e1fed 100644 --- a/apps/dashboard/app/api/auth/[...nextauth]/route.ts +++ b/apps/dashboard/app/api/auth/[...nextauth]/route.ts @@ -1,21 +1,23 @@ -import NextAuth, { AuthOptions } from "next-auth"; -import { fetchUserData } from "@/services/graphql/queries/me-data"; -import { env } from "@/env"; -import { ApolloQueryResult } from "@apollo/client"; -import { MeQuery } from "@/services/graphql/generated"; +import NextAuth, { AuthOptions } from "next-auth" + +import { ApolloQueryResult } from "@apollo/client" + +import { fetchUserData } from "@/services/graphql/queries/me-data" +import { env } from "@/env" +import { MeQuery } from "@/services/graphql/generated" declare module "next-auth" { interface Profile { - id: string; + id: string } interface Session { - sub: string | null; - accessToken: string; - userData: ApolloQueryResult; + sub: string | null + accessToken: string + userData: ApolloQueryResult } } -const type = "oauth" as const; +const type = "oauth" as const export const authOptions: AuthOptions = { providers: [ { @@ -32,7 +34,7 @@ export const authOptions: AuthOptions = { profile(profile) { return { id: profile.sub, - }; + } }, }, ], @@ -42,32 +44,32 @@ export const authOptions: AuthOptions = { async jwt({ token, account, profile }) { // Persist the OAuth access_token and or the user id to the token right after signin if (account) { - token.accessToken = account.access_token; - token.expiresAt = account.expires_at; - token.refreshToken = account.refresh_token; - token.id = profile?.id; + token.accessToken = account.access_token + token.expiresAt = account.expires_at + token.refreshToken = account.refresh_token + token.id = profile?.id } - return token; + return token }, - async session({ session, token, user }) { + async session({ session, token }) { if ( !token.accessToken || !token.sub || typeof token.accessToken !== "string" || typeof token.sub !== "string" ) { - throw new Error("Invalid token"); + throw new Error("Invalid token") } - const userData = await fetchUserData(token.accessToken); - session.sub = token.sub; - session.accessToken = token.accessToken; - session.userData = userData; - return session; + const userData = await fetchUserData(token.accessToken) + session.sub = token.sub + session.accessToken = token.accessToken + session.userData = userData + return session }, }, -}; +} -const handler = NextAuth(authOptions); +const handler = NextAuth(authOptions) -export { handler as GET, handler as POST }; +export { handler as GET, handler as POST } diff --git a/apps/dashboard/app/layout.tsx b/apps/dashboard/app/layout.tsx index eece3b229e..6fe2ae2cf8 100644 --- a/apps/dashboard/app/layout.tsx +++ b/apps/dashboard/app/layout.tsx @@ -1,23 +1,24 @@ -import SessionProvider from "@/components/session-provider"; -import "./globals.css"; -import type { Metadata } from "next"; -import { authOptions } from "./api/auth/[...nextauth]/route"; -import Header from "@/components/header"; -import Sidebar from "@/components/side-bar"; -import { getServerSession } from "next-auth"; -import ThemeRegistry from "@/theme/theme-registry"; +import type { Metadata } from "next" +import { getServerSession } from "next-auth" + +// eslint-disable-next-line import/no-unassigned-import +import "./globals.css" + +import { authOptions } from "./api/auth/[...nextauth]/route" + +import Header from "@/components/header" +import SessionProvider from "@/components/session-provider" +import Sidebar from "@/components/side-bar" + +import ThemeRegistry from "@/theme/theme-registry" export const metadata: Metadata = { title: "Create Next App", description: "Generated by create next app", -}; +} -export default async function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - const session = await getServerSession(authOptions); +export default async function RootLayout({ children }: { children: React.ReactNode }) { + const session = await getServerSession(authOptions) return ( @@ -39,5 +40,5 @@ export default async function RootLayout({ - ); + ) } diff --git a/apps/dashboard/app/loading.tsx b/apps/dashboard/app/loading.tsx index f44878b9b6..22f878d53e 100644 --- a/apps/dashboard/app/loading.tsx +++ b/apps/dashboard/app/loading.tsx @@ -1,12 +1,12 @@ -import { CircularProgress } from "@mui/joy"; -import React from "react"; +import { CircularProgress } from "@mui/joy" +import React from "react" function Loading() { return (
- ); + ) } -export default Loading; +export default Loading diff --git a/apps/dashboard/app/page.tsx b/apps/dashboard/app/page.tsx index ea89a3c23f..fffead6d66 100644 --- a/apps/dashboard/app/page.tsx +++ b/apps/dashboard/app/page.tsx @@ -1,12 +1,13 @@ -import { getServerSession } from "next-auth"; -import { authOptions } from "./api/auth/[...nextauth]/route"; -import PriceContainer from "@/components/price-container/price-container"; -import ContentContainer from "@/components/content-container"; +import { getServerSession } from "next-auth" + +import { authOptions } from "./api/auth/[...nextauth]/route" + +import PriceContainer from "@/components/price-container/price-container" +import ContentContainer from "@/components/content-container" export default async function Home() { - const session = await getServerSession(authOptions); - const walletDetails = - session?.userData?.data?.me?.defaultAccount?.wallets || []; + const session = await getServerSession(authOptions) + const walletDetails = session?.userData?.data?.me?.defaultAccount?.wallets || [] return (
@@ -14,5 +15,5 @@ export default async function Home() {
- ); + ) } diff --git a/apps/dashboard/app/transactions/page.tsx b/apps/dashboard/app/transactions/page.tsx index b21b17253c..ea7044c0eb 100644 --- a/apps/dashboard/app/transactions/page.tsx +++ b/apps/dashboard/app/transactions/page.tsx @@ -1,47 +1,49 @@ -import { getServerSession } from "next-auth"; -import React from "react"; -import { authOptions } from "../api/auth/[...nextauth]/route"; -import TransactionDetails from "@/components/transaction-details/transaction-details-table"; -import ContentContainer from "@/components/content-container"; +import { getServerSession } from "next-auth" +import React from "react" + +import { authOptions } from "../api/auth/[...nextauth]/route" + +import TransactionDetails from "@/components/transaction-details/transaction-details-table" +import ContentContainer from "@/components/content-container" import { fetchFirstTransactions, fetchPaginatedTransactions, -} from "@/services/graphql/queries/get-transactions"; -import TransactionCard from "@/components/transaction-details/transaction-card-item"; -import PageNumber from "@/components/transaction-details/page-number"; +} from "@/services/graphql/queries/get-transactions" +import TransactionCard from "@/components/transaction-details/transaction-card-item" +import PageNumber from "@/components/transaction-details/page-number" interface TransactionDetailsSearchParams { - cursor: string; - direction: "next" | "previous"; + cursor: string + direction: "next" | "previous" } export default async function page({ searchParams, }: { - searchParams: TransactionDetailsSearchParams; + searchParams: TransactionDetailsSearchParams }) { - const { cursor, direction } = searchParams; - const session = await getServerSession(authOptions); - const token = session?.accessToken; + const { cursor, direction } = searchParams + const session = await getServerSession(authOptions) + const token = session?.accessToken if (!token || typeof token !== "string") { - throw new Error("invalid token"); + throw new Error("invalid token") } - const numberOfTransactions = 50; - let response; + const numberOfTransactions = 50 + let response if (cursor && direction) { response = await fetchPaginatedTransactions( token, direction, cursor, numberOfTransactions, - ); + ) } else { - response = await fetchFirstTransactions(token, numberOfTransactions); + response = await fetchFirstTransactions(token, numberOfTransactions) } - const rows = response?.edges?.map((edge) => ({ node: edge.node })) ?? []; - const pageInfo = response?.pageInfo; + const rows = response?.edges?.map((edge) => ({ node: edge.node })) ?? [] + const pageInfo = response?.pageInfo return ( {rows.length > 0 ? ( @@ -54,5 +56,5 @@ export default async function page({ No Transactions Found )} - ); + ) } diff --git a/apps/dashboard/app/url.ts b/apps/dashboard/app/url.ts index 327e0d3def..b35eeaad50 100644 --- a/apps/dashboard/app/url.ts +++ b/apps/dashboard/app/url.ts @@ -1,9 +1,9 @@ interface UrlInfo { - title: string; - protected: boolean; + title: string + protected: boolean } export const URLS: Record = { "/": { title: "Home", protected: true }, "/transactions": { title: "Transactions", protected: true }, -}; +} diff --git a/apps/dashboard/components/color-toggle.tsx b/apps/dashboard/components/color-toggle.tsx index ceb4101710..f311e74c6b 100644 --- a/apps/dashboard/components/color-toggle.tsx +++ b/apps/dashboard/components/color-toggle.tsx @@ -1,21 +1,17 @@ -"use client"; -import * as React from "react"; -import { useColorScheme } from "@mui/joy/styles"; -import IconButton, { IconButtonProps } from "@mui/joy/IconButton"; +"use client" +import * as React from "react" +import { useColorScheme } from "@mui/joy/styles" +import IconButton, { IconButtonProps } from "@mui/joy/IconButton" -import DarkModeRoundedIcon from "@mui/icons-material/DarkModeRounded"; -import LightModeIcon from "@mui/icons-material/LightMode"; +import DarkModeRoundedIcon from "@mui/icons-material/DarkModeRounded" +import LightModeIcon from "@mui/icons-material/LightMode" -export default function ColorSchemeToggle({ - onClick, - sx, - ...props -}: IconButtonProps) { - const { mode, setMode } = useColorScheme(); - const [mounted, setMounted] = React.useState(false); +export default function ColorSchemeToggle({ onClick, sx, ...props }: IconButtonProps) { + const { mode, setMode } = useColorScheme() + const [mounted, setMounted] = React.useState(false) React.useEffect(() => { - setMounted(true); - }, []); + setMounted(true) + }, []) if (!mounted) { return ( - ); + ) } return ( { if (mode === "light") { - setMode("dark"); + setMode("dark") } else { - setMode("light"); + setMode("light") } - onClick?.(event); + onClick?.(event) }} sx={[ { @@ -58,5 +54,5 @@ export default function ColorSchemeToggle({ - ); + ) } diff --git a/apps/dashboard/components/content-container.tsx b/apps/dashboard/components/content-container.tsx index a8196c1487..fbc6737c85 100644 --- a/apps/dashboard/components/content-container.tsx +++ b/apps/dashboard/components/content-container.tsx @@ -1,8 +1,8 @@ -import { Box } from "@mui/joy"; -import React from "react"; +import { Box } from "@mui/joy" +import React from "react" interface ContentContainerProps { - children: React.ReactNode; + children: React.ReactNode } function ContentContainer({ children }: ContentContainerProps) { @@ -34,7 +34,7 @@ function ContentContainer({ children }: ContentContainerProps) { > {children} - ); + ) } -export default ContentContainer; +export default ContentContainer diff --git a/apps/dashboard/components/header.tsx b/apps/dashboard/components/header.tsx index b3acde08ba..c078314ed3 100644 --- a/apps/dashboard/components/header.tsx +++ b/apps/dashboard/components/header.tsx @@ -1,32 +1,24 @@ -"use client"; -import * as React from "react"; -import GlobalStyles from "@mui/joy/GlobalStyles"; -import IconButton from "@mui/joy/IconButton"; -import Sheet from "@mui/joy/Sheet"; -import MenuRoundedIcon from "@mui/icons-material/MenuRounded"; +"use client" +import * as React from "react" +import GlobalStyles from "@mui/joy/GlobalStyles" +import IconButton from "@mui/joy/IconButton" +import Sheet from "@mui/joy/Sheet" +import MenuRoundedIcon from "@mui/icons-material/MenuRounded" -import LogoutOutlinedIcon from "@mui/icons-material/LogoutOutlined"; -import { - Avatar, - Box, - Menu, - MenuItem, - Dropdown, - MenuButton, - Typography, -} from "@mui/joy"; -import { signOut, useSession } from "next-auth/react"; +import LogoutOutlinedIcon from "@mui/icons-material/LogoutOutlined" +import { Avatar, Box, Menu, MenuItem, Dropdown, MenuButton, Typography } from "@mui/joy" +import { signOut, useSession } from "next-auth/react" -import Heading from "./heading"; -import { toggleSidebar } from "./utils"; -import ColorSchemeToggle from "./color-toggle"; +import Heading from "./heading" +import { toggleSidebar } from "./utils" +import ColorSchemeToggle from "./color-toggle" export default function Header() { - const session = useSession(); - const userData = session?.data?.userData?.data.me; + const session = useSession() + const userData = session?.data?.userData?.data.me if (!userData) { - return null; + return null } return ( @@ -49,7 +41,7 @@ export default function Header() { }} > ({ + styles={() => ({ ":root": { "--Header-height": "4em", }, @@ -139,5 +131,5 @@ export default function Header() { - ); + ) } diff --git a/apps/dashboard/components/heading.tsx b/apps/dashboard/components/heading.tsx index 8add70c762..1a7e6534f0 100644 --- a/apps/dashboard/components/heading.tsx +++ b/apps/dashboard/components/heading.tsx @@ -1,20 +1,21 @@ -"use client"; -import React from "react"; -import { Box, Typography } from "@mui/joy"; -import { usePathname } from "next/navigation"; -import { URLS } from "@/app/url"; +"use client" +import React from "react" +import { Box, Typography } from "@mui/joy" +import { usePathname } from "next/navigation" + +import { URLS } from "@/app/url" export function getTitle(path: string): string { - const urlInfo = URLS[path]; + const urlInfo = URLS[path] if (urlInfo) { - return urlInfo.title; + return urlInfo.title } - return "Path not found"; + return "Path not found" } const Heading = () => { - const pathName = usePathname(); - const title = getTitle(pathName); + const pathName = usePathname() + const title = getTitle(pathName) return ( { > {title} - ); -}; + ) +} -export default Heading; +export default Heading diff --git a/apps/dashboard/components/logo.tsx b/apps/dashboard/components/logo.tsx index c8d168fa97..85f7ad385a 100644 --- a/apps/dashboard/components/logo.tsx +++ b/apps/dashboard/components/logo.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from "react" const Logo: React.FC = () => { return ( @@ -53,7 +53,7 @@ const Logo: React.FC = () => { className="st1" /> - ); -}; + ) +} -export default Logo; +export default Logo diff --git a/apps/dashboard/components/price-container/price-card-container.tsx b/apps/dashboard/components/price-container/price-card-container.tsx index 509130e77d..73b972ddfe 100644 --- a/apps/dashboard/components/price-container/price-card-container.tsx +++ b/apps/dashboard/components/price-container/price-card-container.tsx @@ -1,15 +1,15 @@ -import React from "react"; -import Card from "@mui/joy/Card"; -import CardContent from "@mui/joy/CardContent"; -import Typography from "@mui/joy/Typography"; -import { Box, Chip } from "@mui/joy"; +import React from "react" +import Card from "@mui/joy/Card" +import CardContent from "@mui/joy/CardContent" +import Typography from "@mui/joy/Typography" +import { Box } from "@mui/joy" export interface PriceContainerCardProps { - id: string; - walletCurrency: string; - balance: number; - pendingIncomingBalance: number; - currencySymbol: string; + id: string + walletCurrency: string + balance: number + pendingIncomingBalance: number + currencySymbol: string } const PriceContainerCard: React.FC = ({ @@ -42,9 +42,7 @@ const PriceContainerCard: React.FC = ({ {balance} {currencySymbol} - - Pending Amount {pendingIncomingBalance} - + Pending Amount {pendingIncomingBalance} = ({ -); +) -export default PriceContainerCard; +export default PriceContainerCard diff --git a/apps/dashboard/components/price-container/price-container.tsx b/apps/dashboard/components/price-container/price-container.tsx index 0f14fba1e4..53932e2b1e 100644 --- a/apps/dashboard/components/price-container/price-container.tsx +++ b/apps/dashboard/components/price-container/price-container.tsx @@ -1,26 +1,23 @@ -import React from "react"; -import { Box } from "@mui/joy"; -import PriceContainerCard from "./price-card-container"; +import React from "react" +import { Box } from "@mui/joy" + +import PriceContainerCard from "./price-card-container" export interface WalletData { - __typename: string; - accountId: string; - balance: number; - id: string; - pendingIncomingBalance: number; - walletCurrency: "BTC" | "USD"; + __typename: string + accountId: string + balance: number + id: string + pendingIncomingBalance: number + walletCurrency: "BTC" | "USD" } export interface PriceContainerProps { - walletDetails: ReadonlyArray; + walletDetails: ReadonlyArray } const PriceContainer: React.FC = ({ walletDetails }) => { - const btcWallet = walletDetails.find( - (wallet) => wallet.walletCurrency === "BTC", - ); - const usdWallet = walletDetails.find( - (wallet) => wallet.walletCurrency === "USD", - ); + const btcWallet = walletDetails.find((wallet) => wallet.walletCurrency === "BTC") + const usdWallet = walletDetails.find((wallet) => wallet.walletCurrency === "USD") return ( = ({ walletDetails }) => { id={btcWallet.id} walletCurrency={btcWallet.walletCurrency} balance={btcWallet.balance / 100000000} - pendingIncomingBalance={ - btcWallet.pendingIncomingBalance / 100000000 - } + pendingIncomingBalance={btcWallet.pendingIncomingBalance / 100000000} currencySymbol="BTC" /> )} @@ -59,7 +54,7 @@ const PriceContainer: React.FC = ({ walletDetails }) => { )} - ); -}; + ) +} -export default PriceContainer; +export default PriceContainer diff --git a/apps/dashboard/components/session-provider.tsx b/apps/dashboard/components/session-provider.tsx index a2a7c2173d..257b16ffa6 100644 --- a/apps/dashboard/components/session-provider.tsx +++ b/apps/dashboard/components/session-provider.tsx @@ -1,3 +1,3 @@ -"use client"; -import { SessionProvider } from "next-auth/react"; -export default SessionProvider; +"use client" +import { SessionProvider } from "next-auth/react" +export default SessionProvider diff --git a/apps/dashboard/components/side-bar.tsx b/apps/dashboard/components/side-bar.tsx index f043d6f539..cc74febbc6 100644 --- a/apps/dashboard/components/side-bar.tsx +++ b/apps/dashboard/components/side-bar.tsx @@ -1,22 +1,23 @@ -"use client"; -import GlobalStyles from "@mui/joy/GlobalStyles"; -import Box from "@mui/joy/Box"; -import List from "@mui/joy/List"; -import ListItem from "@mui/joy/ListItem"; -import ListItemButton, { listItemButtonClasses } from "@mui/joy/ListItemButton"; -import Sheet from "@mui/joy/Sheet"; -import Divider from "@mui/material/Divider"; -import Link from "next/link"; -import ReceiptLongIcon from "@mui/icons-material/ReceiptLong"; -import HomeOutlinedIcon from "@mui/icons-material/HomeOutlined"; -import { Typography } from "@mui/joy"; -import { usePathname } from "next/navigation"; -import Logo from "./logo"; -import { closeSidebar } from "./utils"; +"use client" +import GlobalStyles from "@mui/joy/GlobalStyles" +import Box from "@mui/joy/Box" +import List from "@mui/joy/List" +import ListItem from "@mui/joy/ListItem" +import ListItemButton, { listItemButtonClasses } from "@mui/joy/ListItemButton" +import Sheet from "@mui/joy/Sheet" +import Divider from "@mui/material/Divider" +import Link from "next/link" +import ReceiptLongIcon from "@mui/icons-material/ReceiptLong" +import HomeOutlinedIcon from "@mui/icons-material/HomeOutlined" +import { Typography } from "@mui/joy" +import { usePathname } from "next/navigation" + +import Logo from "./logo" +import { closeSidebar } from "./utils" export default function Sidebar() { - const path = usePathname(); - const isCurrentPath = (href: string) => path === href; + const path = usePathname() + const isCurrentPath = (href: string) => path === href return ( { - closeSidebar(); + closeSidebar() }} sx={{ - backgroundColor: isCurrentPath("/") + "backgroundColor": isCurrentPath("/") ? "rgba(0, 0, 0, 0.08)" : "transparent", "&:hover": { @@ -143,10 +144,10 @@ export default function Sidebar() { { - closeSidebar(); + closeSidebar() }} sx={{ - backgroundColor: isCurrentPath("/transactions") + "backgroundColor": isCurrentPath("/transactions") ? "rgba(0, 0, 0, 0.08)" : "transparent", "&:hover": { @@ -171,5 +172,5 @@ export default function Sidebar() { - ); + ) } diff --git a/apps/dashboard/components/transaction-details/index.types.ts b/apps/dashboard/components/transaction-details/index.types.ts index 09554501dc..7a26785941 100644 --- a/apps/dashboard/components/transaction-details/index.types.ts +++ b/apps/dashboard/components/transaction-details/index.types.ts @@ -1,13 +1,13 @@ export interface RowNode { - __typename: "Transaction"; - id: string; - createdAt: number; - settlementDisplayAmount: string; - settlementDisplayCurrency: string; - status: string; - settlementFee: number; + __typename: "Transaction" + id: string + createdAt: number + settlementDisplayAmount: string + settlementDisplayCurrency: string + status: string + settlementFee: number } export interface TransactionDetailsProps { - rows: ReadonlyArray<{ node: RowNode }>; + rows: ReadonlyArray<{ node: RowNode }> } diff --git a/apps/dashboard/components/transaction-details/page-number.tsx b/apps/dashboard/components/transaction-details/page-number.tsx index 73d94d5617..f5b0e260d6 100644 --- a/apps/dashboard/components/transaction-details/page-number.tsx +++ b/apps/dashboard/components/transaction-details/page-number.tsx @@ -1,28 +1,26 @@ -"use client"; -import * as React from "react"; -import Box from "@mui/joy/Box"; -import Button from "@mui/joy/Button"; -import { iconButtonClasses } from "@mui/joy/IconButton"; -import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight"; -import KeyboardArrowLeftIcon from "@mui/icons-material/KeyboardArrowLeft"; -import { useRouter } from "next/navigation"; +"use client" +import * as React from "react" +import Box from "@mui/joy/Box" +import Button from "@mui/joy/Button" +import { iconButtonClasses } from "@mui/joy/IconButton" +import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight" +import KeyboardArrowLeftIcon from "@mui/icons-material/KeyboardArrowLeft" +import { useRouter } from "next/navigation" interface PageInfo { - readonly __typename?: "PageInfo"; - readonly endCursor?: string | null; - readonly hasNextPage: boolean; - readonly hasPreviousPage: boolean; - readonly startCursor?: string | null; + readonly __typename?: "PageInfo" + readonly endCursor?: string | null + readonly hasNextPage: boolean + readonly hasPreviousPage: boolean + readonly startCursor?: string | null } function PageNumber({ pageInfo }: { pageInfo?: PageInfo }) { - const router = useRouter(); + const router = useRouter() if (!pageInfo) { - return null; + return null } - const endCursor = pageInfo.endCursor; - const startCursor = pageInfo.startCursor; - const hasNextPage = pageInfo.hasNextPage; - const hasPreviousPage = pageInfo.hasPreviousPage; + const endCursor = pageInfo.endCursor + const hasNextPage = pageInfo.hasNextPage return ( } - onClick={(e) => { - router.push(`/transactions`); + onClick={() => { + router.push(`/transactions`) }} > Previous @@ -53,14 +51,14 @@ function PageNumber({ pageInfo }: { pageInfo?: PageInfo }) { variant="outlined" color="neutral" endDecorator={} - onClick={(e) => { - router.push(`/transactions?cursor=${endCursor}&direction=next`); + onClick={() => { + router.push(`/transactions?cursor=${endCursor}&direction=next`) }} > Next - ); + ) } -export default PageNumber; +export default PageNumber diff --git a/apps/dashboard/components/transaction-details/transaction-card-item.tsx b/apps/dashboard/components/transaction-details/transaction-card-item.tsx index 2703708e26..9100fb9a41 100644 --- a/apps/dashboard/components/transaction-details/transaction-card-item.tsx +++ b/apps/dashboard/components/transaction-details/transaction-card-item.tsx @@ -1,15 +1,15 @@ -import * as React from "react"; -import Card from "@mui/joy/Card"; -import CardContent from "@mui/joy/CardContent"; -import Typography from "@mui/joy/Typography"; -import { Sheet } from "@mui/joy"; -import Chip from "@mui/joy/Chip"; -import { TransactionDetailsProps } from "./index.types"; -import { getTransactionStatusColor } from "@/components/utils"; +import * as React from "react" +import Card from "@mui/joy/Card" +import CardContent from "@mui/joy/CardContent" +import Typography from "@mui/joy/Typography" +import { Sheet } from "@mui/joy" +import Chip from "@mui/joy/Chip" -export default function TransactionCardComponent({ - rows, -}: TransactionDetailsProps) { +import { TransactionDetailsProps } from "./index.types" + +import { getTransactionStatusColor } from "@/components/utils" + +export default function TransactionCardComponent({ rows }: TransactionDetailsProps) { return ( - {row.node.settlementDisplayAmount}{" "} - {row.node.settlementDisplayCurrency} + {row.node.settlementDisplayAmount} {row.node.settlementDisplayCurrency}
Fees - - {row.node.settlementFee} stats - + {row.node.settlementFee} stats
))}
- ); + ) } diff --git a/apps/dashboard/components/transaction-details/transaction-details-table.tsx b/apps/dashboard/components/transaction-details/transaction-details-table.tsx index d2244f7996..b188babbbc 100644 --- a/apps/dashboard/components/transaction-details/transaction-details-table.tsx +++ b/apps/dashboard/components/transaction-details/transaction-details-table.tsx @@ -1,14 +1,14 @@ -import * as React from "react"; -import Table from "@mui/joy/Table"; -import Typography from "@mui/joy/Typography"; -import { Sheet } from "@mui/joy"; -import Chip from "@mui/joy/Chip"; -import { TransactionDetailsProps } from "./index.types"; -import { getTransactionStatusColor } from "@/components/utils"; +import * as React from "react" +import Table from "@mui/joy/Table" +import Typography from "@mui/joy/Typography" +import { Sheet } from "@mui/joy" +import Chip from "@mui/joy/Chip" -export default function TransactionTableComponent({ - rows, -}: TransactionDetailsProps) { +import { TransactionDetailsProps } from "./index.types" + +import { getTransactionStatusColor } from "@/components/utils" + +export default function TransactionTableComponent({ rows }: TransactionDetailsProps) { return ( - {row.node.settlementDisplayAmount}{" "} - {row.node.settlementDisplayCurrency} + {row.node.settlementDisplayAmount} {row.node.settlementDisplayCurrency} @@ -112,14 +111,12 @@ export default function TransactionTableComponent({ - - {row.node.settlementFee} stats - + {row.node.settlementFee} stats ))} - ); + ) } diff --git a/apps/dashboard/components/utils.ts b/apps/dashboard/components/utils.ts index 57a344178e..5d2a6b6709 100644 --- a/apps/dashboard/components/utils.ts +++ b/apps/dashboard/components/utils.ts @@ -1,47 +1,47 @@ export const openSidebar = () => { if (typeof document !== "undefined") { - document.body.style.overflow = "hidden"; - document.documentElement.style.setProperty("--SideNavigation-slideIn", "1"); + document.body.style.overflow = "hidden" + document.documentElement.style.setProperty("--SideNavigation-slideIn", "1") } -}; +} export const closeSidebar = () => { if (typeof document !== "undefined") { - document.documentElement.style.removeProperty("--SideNavigation-slideIn"); - document.body.style.removeProperty("overflow"); + document.documentElement.style.removeProperty("--SideNavigation-slideIn") + document.body.style.removeProperty("overflow") } -}; +} export const toggleSidebar = () => { if (typeof window !== "undefined" && typeof document !== "undefined") { const slideIn = window .getComputedStyle(document.documentElement) - .getPropertyValue("--SideNavigation-slideIn"); + .getPropertyValue("--SideNavigation-slideIn") if (slideIn) { - closeSidebar(); + closeSidebar() } else { - openSidebar(); + openSidebar() } } -}; +} -type ColorType = "success" | "danger" | "neutral"; +type ColorType = "success" | "danger" | "neutral" export const colorMap: Record = { success: "success", danger: "danger", neutral: "neutral", -}; +} export const getTransactionStatusColor = (status: string): ColorType => { switch (status) { case "ALREADY_PAID": case "SUCCESS": - return colorMap.success; + return colorMap.success case "FAILURE": - return colorMap.danger; + return colorMap.danger case "PENDING": default: - return colorMap.neutral; + return colorMap.neutral } -}; +} diff --git a/apps/dashboard/env.ts b/apps/dashboard/env.ts index 02ca5547b8..99626d2219 100644 --- a/apps/dashboard/env.ts +++ b/apps/dashboard/env.ts @@ -1,5 +1,5 @@ -import { createEnv } from "@t3-oss/env-nextjs"; -import { z } from "zod"; +import { createEnv } from "@t3-oss/env-nextjs" +import { z } from "zod" export const env = createEnv({ server: { @@ -18,4 +18,4 @@ export const env = createEnv({ CLIENT_SECRET: process.env.CLIENT_SECRET, HYDRA_PUBLIC: process.env.HYDRA_PUBLIC, }, -}); +}) diff --git a/apps/dashboard/middleware.ts b/apps/dashboard/middleware.ts index 3d743e65f6..2a370c2f06 100644 --- a/apps/dashboard/middleware.ts +++ b/apps/dashboard/middleware.ts @@ -1 +1 @@ -export { default } from "next-auth/middleware"; +export { default } from "next-auth/middleware" diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index 2993688b30..780d85c8bd 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -12,9 +12,9 @@ "dependencies": { "@apollo/client": "^3.8.4", "@apollo/experimental-nextjs-app-support": "^0.4.3", + "@emotion/cache": "^11.11.0", "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", - "@emotion/cache": "^11.11.0", "@mui/icons-material": "^5.14.13", "@mui/joy": "^5.0.0-beta.10", "@mui/material": "^5.14.13", @@ -28,6 +28,7 @@ "zod": "^3.22.4" }, "devDependencies": { + "@galoy/eslint-config": "workspace:^", "@graphql-codegen/add": "^5.0.0", "@graphql-codegen/cli": "^5.0.0", "@graphql-codegen/client-preset": "^4.1.0", diff --git a/apps/dashboard/services/graphql/index.ts b/apps/dashboard/services/graphql/index.ts index 5acf0ef4a8..73707d3343 100644 --- a/apps/dashboard/services/graphql/index.ts +++ b/apps/dashboard/services/graphql/index.ts @@ -1,6 +1,7 @@ -import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client"; -import { registerApolloClient } from "@apollo/experimental-nextjs-app-support/rsc"; -import { env } from "@/env"; +import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client" +import { registerApolloClient } from "@apollo/experimental-nextjs-app-support/rsc" + +import { env } from "@/env" export const apollo = (token: string) => registerApolloClient(() => { @@ -13,5 +14,5 @@ export const apollo = (token: string) => uri: env.CORE_URL, fetchOptions: { cache: "no-store" }, }), - }); - }); + }) + }) diff --git a/apps/dashboard/services/graphql/queries/get-transactions.ts b/apps/dashboard/services/graphql/queries/get-transactions.ts index 642fc82623..9ac447ad88 100644 --- a/apps/dashboard/services/graphql/queries/get-transactions.ts +++ b/apps/dashboard/services/graphql/queries/get-transactions.ts @@ -1,12 +1,12 @@ -import { gql } from "@apollo/client"; +import { gql } from "@apollo/client" -import { apollo } from ".."; +import { apollo } from ".." import { GetFirstTransactionsDocument, GetFirstTransactionsQuery, GetPaginatedTransactionsDocument, GetPaginatedTransactionsQuery, -} from "../generated"; +} from "../generated" // TODO remove not used fields gql` @@ -73,7 +73,7 @@ gql` } } } -`; +` gql` query GetFirstTransactions($first: Int) { @@ -139,26 +139,23 @@ gql` } } } -`; +` -export async function fetchFirstTransactions( - token: string, - first: number = 10, -) { - const client = apollo(token).getClient(); +export async function fetchFirstTransactions(token: string, first: number = 10) { + const client = apollo(token).getClient() try { const data = await client.query({ query: GetFirstTransactionsDocument, variables: { first }, - }); - return data.data.me?.defaultAccount.transactions; + }) + return data.data.me?.defaultAccount.transactions } catch (err) { - console.error("error in getting Transaction details", err); + console.error("error in getting Transaction details", err) if (err instanceof Error) { - throw new Error(err.message); + throw new Error(err.message) } - throw new Error("Unknown error"); + throw new Error("Unknown error") } } @@ -168,33 +165,33 @@ export async function fetchPaginatedTransactions( cursor: string | null = null, first: number = 10, ) { - const client = apollo(token).getClient(); + const client = apollo(token).getClient() let variables: { - first: number; - after?: string | null; - before?: string | null; - }; + first: number + after?: string | null + before?: string | null + } if (direction === "next") { - variables = { first, after: cursor }; + variables = { first, after: cursor } } else if (direction === "previous") { - variables = { first, before: cursor }; + variables = { first, before: cursor } } else { - throw new Error("Invalid direction provided. Use 'next' or 'previous'."); + throw new Error("Invalid direction provided. Use 'next' or 'previous'.") } try { const data = await client.query({ query: GetPaginatedTransactionsDocument, variables, - }); - return data.data.me?.defaultAccount.transactions; + }) + return data.data.me?.defaultAccount.transactions } catch (err) { - console.error("error in fetchPaginatedTransactions ", err); + console.error("error in fetchPaginatedTransactions ", err) if (err instanceof Error) { - throw new Error(err.message); + throw new Error(err.message) } - throw new Error("Unknown error"); + throw new Error("Unknown error") } } diff --git a/apps/dashboard/services/graphql/queries/me-data.ts b/apps/dashboard/services/graphql/queries/me-data.ts index c57648956a..77c678eee1 100644 --- a/apps/dashboard/services/graphql/queries/me-data.ts +++ b/apps/dashboard/services/graphql/queries/me-data.ts @@ -1,7 +1,7 @@ -import { gql } from "@apollo/client"; +import { gql } from "@apollo/client" -import { apollo } from ".."; -import { MeDocument, MeQuery } from "../generated"; +import { apollo } from ".." +import { MeDocument, MeQuery } from "../generated" gql` query me { @@ -25,23 +25,23 @@ gql` } } } -`; +` export async function fetchUserData(token: string) { - const client = apollo(token).getClient(); + const client = apollo(token).getClient() try { const data = await client.query({ query: MeDocument, - }); - return data; + }) + return data } catch (err) { if (err instanceof Error) { - console.error("error", err); - throw new Error(err.message); + console.error("error", err) + throw new Error(err.message) } else { - console.error("Unknown error"); - throw new Error("Unknown error"); + console.error("Unknown error") + throw new Error("Unknown error") } } } diff --git a/apps/dashboard/tailwind.config.ts b/apps/dashboard/tailwind.config.ts index 7e4bd91a03..cbe78788c1 100644 --- a/apps/dashboard/tailwind.config.ts +++ b/apps/dashboard/tailwind.config.ts @@ -1,4 +1,4 @@ -import type { Config } from "tailwindcss"; +import type { Config } from "tailwindcss" const config: Config = { content: [ @@ -16,5 +16,5 @@ const config: Config = { }, }, plugins: [], -}; -export default config; +} +export default config diff --git a/apps/dashboard/theme/emotion-cache.tsx b/apps/dashboard/theme/emotion-cache.tsx index 1fe100b095..de66893c02 100644 --- a/apps/dashboard/theme/emotion-cache.tsx +++ b/apps/dashboard/theme/emotion-cache.tsx @@ -1,78 +1,77 @@ -"use client"; -import * as React from "react"; -import createCache from "@emotion/cache"; -import { useServerInsertedHTML } from "next/navigation"; -import { CacheProvider as DefaultCacheProvider } from "@emotion/react"; -import type { - EmotionCache, - Options as OptionsOfCreateCache, -} from "@emotion/cache"; +"use client" +import * as React from "react" +import { useServerInsertedHTML } from "next/navigation" +import createCache, { + type EmotionCache, + type Options as OptionsOfCreateCache, +} from "@emotion/cache" +import { CacheProvider as DefaultCacheProvider } from "@emotion/react" export type NextAppDirEmotionCacheProviderProps = { /** This is the options passed to createCache() from 'import createCache from "@emotion/cache"' */ - options: Omit; + options: Omit /** By default from 'import { CacheProvider } from "@emotion/react"' */ CacheProvider?: (props: { - value: EmotionCache; - children: React.ReactNode; - }) => React.JSX.Element | null; - children: React.ReactNode; -}; + value: EmotionCache + children: React.ReactNode + }) => React.JSX.Element | null + children: React.ReactNode +} // Adapted from https://github.com/garronej/tss-react/blob/main/src/next/appDir.tsx export default function NextAppDirEmotionCacheProvider( props: NextAppDirEmotionCacheProviderProps, ) { - const { options, CacheProvider = DefaultCacheProvider, children } = props; + const { options, CacheProvider = DefaultCacheProvider, children } = props const [registry] = React.useState(() => { - const cache = createCache(options); - cache.compat = true; - const prevInsert = cache.insert; - let inserted: { name: string; isGlobal: boolean }[] = []; + const cache = createCache(options) + cache.compat = true + const prevInsert = cache.insert + let inserted: { name: string; isGlobal: boolean }[] = [] cache.insert = (...args) => { - const [selector, serialized] = args; + const [selector, serialized] = args if (cache.inserted[serialized.name] === undefined) { inserted.push({ name: serialized.name, isGlobal: !selector, - }); + }) } - return prevInsert(...args); - }; + return prevInsert(...args) + } const flush = () => { - const prevInserted = inserted; - inserted = []; - return prevInserted; - }; - return { cache, flush }; - }); + const prevInserted = inserted + inserted = [] + return prevInserted + } + return { cache, flush } + }) useServerInsertedHTML(() => { - const inserted = registry.flush(); + const inserted = registry.flush() if (inserted.length === 0) { - return null; + return null } - let styles = ""; - let dataEmotionAttribute = registry.cache.key; + let styles = "" + let dataEmotionAttribute = registry.cache.key const globals: { - name: string; - style: string; - }[] = []; + name: string + style: string + }[] = [] inserted.forEach(({ name, isGlobal }) => { - const style = registry.cache.inserted[name]; + const style = registry.cache.inserted[name] if (typeof style !== "boolean") { if (isGlobal) { - globals.push({ name, style }); + globals.push({ name, style }) } else { - styles += style; - dataEmotionAttribute += ` ${name}`; + styles += style + dataEmotionAttribute += ` ${name}` } } - }); + }) return ( @@ -92,8 +91,8 @@ export default function NextAppDirEmotionCacheProvider( /> )} - ); - }); + ) + }) - return {children}; + return {children} } diff --git a/apps/dashboard/theme/theme-registry.tsx b/apps/dashboard/theme/theme-registry.tsx index b28a56ec13..69bf5b8614 100644 --- a/apps/dashboard/theme/theme-registry.tsx +++ b/apps/dashboard/theme/theme-registry.tsx @@ -1,15 +1,12 @@ -"use client"; -import * as React from "react"; -import { CssVarsProvider, getInitColorSchemeScript } from "@mui/joy/styles"; -import CssBaseline from "@mui/joy/CssBaseline"; -import NextAppDirEmotionCacheProvider from "./emotion-cache"; -import theme from "./theme"; +"use client" +import * as React from "react" +import { CssVarsProvider, getInitColorSchemeScript } from "@mui/joy/styles" +import CssBaseline from "@mui/joy/CssBaseline" -export default function ThemeRegistry({ - children, -}: { - children: React.ReactNode; -}) { +import NextAppDirEmotionCacheProvider from "./emotion-cache" +import theme from "./theme" + +export default function ThemeRegistry({ children }: { children: React.ReactNode }) { return ( {getInitColorSchemeScript()} @@ -18,5 +15,5 @@ export default function ThemeRegistry({ {children} - ); + ) } diff --git a/apps/dashboard/theme/theme.ts b/apps/dashboard/theme/theme.ts index fba4853fba..6c53576d9f 100644 --- a/apps/dashboard/theme/theme.ts +++ b/apps/dashboard/theme/theme.ts @@ -1,9 +1,9 @@ -import { extendTheme } from "@mui/joy/styles"; -import { Inter_Tight } from "next/font/google"; +import { extendTheme } from "@mui/joy/styles" +import { Inter_Tight } from "next/font/google" const inter = Inter_Tight({ subsets: ["latin"], -}); +}) const theme = extendTheme({ fontFamily: { @@ -11,6 +11,6 @@ const theme = extendTheme({ display: inter.style.fontFamily, code: inter.style.fontFamily, }, -}); +}) -export default theme; +export default theme diff --git a/core/api/Dockerfile-debug b/core/api/Dockerfile-debug index 22e1d20c6e..1724a46f82 100644 --- a/core/api/Dockerfile-debug +++ b/core/api/Dockerfile-debug @@ -17,8 +17,8 @@ RUN touch .env FROM gcr.io/distroless/nodejs20-debian11:debug COPY --from=BUILD_IMAGE /app/.env /app/.env -COPY --from=BUILD_IMAGE /app/lib /app/lib -COPY --from=BUILD_IMAGE /app/src/config/locales /app/lib/config/locales +COPY --from=BUILD_IMAGE /app/dist /app/dist +COPY --from=BUILD_IMAGE /app/src/config/locales /app/dist/config/locales COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules WORKDIR /app diff --git a/core/api/Dockerfile-migrate b/core/api/Dockerfile-migrate index debc1ee621..f01d486ee2 100644 --- a/core/api/Dockerfile-migrate +++ b/core/api/Dockerfile-migrate @@ -16,8 +16,8 @@ RUN yarn build COPY ./scripts ./scripts FROM node:20-alpine -COPY --from=BUILD_IMAGE /app/lib /app/lib -COPY --from=BUILD_IMAGE /app/src/config/locales /app/lib/config/locales +COPY --from=BUILD_IMAGE /app/dist /app/dist +COPY --from=BUILD_IMAGE /app/src/config/locales /app/dist/config/locales COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules COPY --from=BUILD_IMAGE /app/scripts /app/scripts diff --git a/core/api/Dockerfile-websocket b/core/api/Dockerfile-websocket index 551055ea5b..e98a268147 100644 --- a/core/api/Dockerfile-websocket +++ b/core/api/Dockerfile-websocket @@ -18,8 +18,8 @@ RUN touch .env FROM gcr.io/distroless/nodejs20-debian11 COPY --from=BUILD_IMAGE /app/.env /app/.env -COPY --from=BUILD_IMAGE /app/lib /app/lib -COPY --from=BUILD_IMAGE /app/src/config/locales /app/lib/config/locales +COPY --from=BUILD_IMAGE /app/dist /app/dist +COPY --from=BUILD_IMAGE /app/src/config/locales /app/dist/config/locales COPY --from=BUILD_IMAGE /app/node_modules /app/node_modules WORKDIR /app diff --git a/core/api/Makefile b/core/api/Makefile index 3eec2eef1f..c301a5f4a6 100644 --- a/core/api/Makefile +++ b/core/api/Makefile @@ -35,13 +35,13 @@ start: start-deps make start-main & make start-trigger & make start-ws start-main-ci: - node lib/servers/graphql-main-server.js + node dist/servers/graphql-main-server.js start-trigger-ci: - node lib/servers/trigger.js + node dist/servers/trigger.js start-ws-ci: - node lib/servers/ws-server.js + node dist/servers/ws-server.js exporter: start-deps . ./.env && yarn tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ diff --git a/core/api/package.json b/core/api/package.json index 76031e8860..e437f90c94 100644 --- a/core/api/package.json +++ b/core/api/package.json @@ -7,17 +7,17 @@ "madge-check-tests": "madge --circular --extensions ts ./test", "eslint-check": "eslint src test --ext .ts", "eslint-fix": "eslint src test --ext .ts --fix", - "build": "tsc -p tsconfig-build.json && cp -R src/services/price/protos lib/services/price/ && cp -R src/services/dealer-price/proto lib/services/dealer-price/ && cp -R src/services/loopd/protos lib/services/loopd/ && cp -R src/services/bria/proto lib/services/bria/ && tscpaths --silent -p tsconfig.json -s ./src -o ./lib", - "trigger": "yarn build && node lib/servers/trigger.js | pino-pretty -c -l", + "build": "tsc -p tsconfig-build.json && cp -R src/services/price/protos dist/services/price/ && cp -R src/services/dealer-price/proto dist/services/dealer-price/ && cp -R src/services/loopd/protos dist/services/loopd/ && cp -R src/services/bria/proto dist/services/bria/ && tscpaths --silent -p tsconfig.json -s ./src -o ./dist", + "trigger": "yarn build && node dist/servers/trigger.js | pino-pretty -c -l", "check:sdl": ". ../../.env && yarn write-sdl && if git diff --name-only | grep -q 'core/api/src/graphql/admin/schema.graphql'; then echo 'Error: core/api/src/graphql/admin/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi && if git diff --name-only | grep -q 'core/api/src/graphql/public/schema.graphql'; then echo 'Error: core/api/src/graphql/public/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi", - "write-sdl": "yarn build && node lib/servers/write-sdl.js write-sdl.yaml && rover supergraph compose --config dev/apollo-federation/supergraph-config.yaml --elv2-license accept > dev/apollo-federation/supergraph.graphql", - "ws": "yarn build && node lib/servers/ws-server.js | pino-pretty -c -l", + "write-sdl": "yarn build && node dist/servers/write-sdl.js write-sdl.yaml && rover supergraph compose --config dev/apollo-federation/supergraph-config.yaml --elv2-license accept > dev/apollo-federation/supergraph.graphql", + "ws": "yarn build && node dist/servers/ws-server.js | pino-pretty -c -l", "watch": "nodemon -V -e ts,graphql -w ./src -x yarn run start", "watch-trigger": "nodemon -V -e ts,graphql -w ./src -x yarn trigger", "graphql-check": "curl -fsS https://raw.githubusercontent.com/GaloyMoney/galoy-mobile/main/app/graphql/generated.gql -o generated.gql && npx @graphql-inspector/cli validate ./generated.gql src/graphql/public/schema.graphql --apollo --noStrictFragments", - "cron": ". ../../.env && yarn build && node lib/servers/cron.js", - "exporter": "yarn build && node lib/servers/exporter.js", - "daily-notif": "yarn build && node lib/servers/daily-balance-notification.js", + "cron": ". ../../.env && yarn build && node dist/servers/cron.js", + "exporter": "yarn build && node dist/servers/exporter.js", + "daily-notif": "yarn build && node dist/servers/daily-balance-notification.js", "test": "export JEST_JUNIT_OUTPUT_DIR=\"./artifacts\" && jest --ci --reporters=default --reporters=jest-junit", "test:unit": ". ../../.env && LOGLEVEL=warn jest --config ./test/unit/jest.config.js --bail --verbose $TEST | yarn pino-pretty -c -l", "test:legacy-integration": ". ../../.env && LOGLEVEL=warn jest --config ./test/legacy-integration/jest.config.js --bail --runInBand --verbose $TEST | yarn pino-pretty -c -l", @@ -26,7 +26,7 @@ "fix-yaml": "prettier --write '**/*.(yaml|yml)'", "check-yaml": "prettier --check '**/*.(yaml|yml)'", "watch-main": ". ../../.env && nodemon -V -e ts,graphql -w ./src --exec yarn run start-main", - "start-main": ". ../../.env && yarn run build && node --inspect -r ./lib/services/tracing.js ./lib/servers/graphql-main-server.js", + "start-main": ". ../../.env && yarn run build && node --inspect -r ./dist/services/tracing.js ./dist/servers/graphql-main-server.js", "migrate-mongo-up": "migrate-mongo up -f './src/migrations/migrate-mongo-config.js'", "gen-test-jwt": "ts-node dev/bin/gen-test-jwt.ts" }, diff --git a/core/api/test/bats/helpers/setup-and-teardown.bash b/core/api/test/bats/helpers/setup-and-teardown.bash index 2894e2f5ff..906445347f 100644 --- a/core/api/test/bats/helpers/setup-and-teardown.bash +++ b/core/api/test/bats/helpers/setup-and-teardown.bash @@ -25,7 +25,7 @@ mongo_cli() { start_server() { stop_server > /dev/null 2>&1 || true - background node lib/servers/graphql-main-server.js > .e2e-server.log + background node dist/servers/graphql-main-server.js > .e2e-server.log echo $! > $SERVER_PID_FILE server_is_up() { @@ -71,25 +71,25 @@ add_callback() { start_ws_server() { stop_ws_server > /dev/null 2>&1 || true - background node lib/servers/ws-server.js > .e2e-ws-server.log + background node dist/servers/ws-server.js > .e2e-ws-server.log echo $! > $WS_SERVER_PID_FILE } start_trigger() { stop_trigger > /dev/null 2>&1 || true - background node lib/servers/trigger.js > .e2e-trigger.log + background node dist/servers/trigger.js > .e2e-trigger.log echo $! > $TRIGGER_PID_FILE } run_cron() { - node lib/servers/cron.js > .e2e-cron.log + node dist/servers/cron.js > .e2e-cron.log } start_exporter() { stop_exporter > /dev/null 2>&1 || true - background node lib/servers/exporter.js > .e2e-exporter.log + background node dist/servers/exporter.js > .e2e-exporter.log echo $! > $EXPORTER_PID_FILE } diff --git a/core/api/tsconfig.json b/core/api/tsconfig.json index eace11abbe..fa0828c882 100644 --- a/core/api/tsconfig.json +++ b/core/api/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "module": "CommonJS", - "outDir": "lib", + "outDir": "dist", "sourceMap": true, "strict": true, "target": "es2020", diff --git a/lib/eslint-config/.eslintrc.base.js b/lib/eslint-config/.eslintrc.base.js new file mode 100644 index 0000000000..3dc12ecd6e --- /dev/null +++ b/lib/eslint-config/.eslintrc.base.js @@ -0,0 +1,80 @@ +const { execSync } = require('child_process'); +const actualProjectDir = execSync('npm prefix').toString().replace(/\n/g, ''); + +module.exports = { + env: { + browser: true, + es6: true, + node: true + }, + ignorePatterns: ["/*.js", "lib", "coverage", "generated", "protos"], + parser: "@typescript-eslint/parser", + parserOptions: { + project: [`${actualProjectDir}/tsconfig.json`], + tsconfigRootDir: __dirname, + }, + plugins: ["eslint-plugin-import", "@typescript-eslint", "prettier", "jest"], + extends: [ + "plugin:jest/recommended", + "eslint:recommended", + "plugin:import/recommended", + "plugin:import/typescript", + "plugin:@typescript-eslint/recommended", + "prettier" + ], + rules: { + // Customized rules + "@typescript-eslint/no-extra-semi": "off", // Prettier work + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/unified-signatures": "error", + + "import/no-deprecated": "error", + "import/no-extraneous-dependencies": "error", + "import/no-unassigned-import": "error", + "import/no-unresolved": "off", + "import/order": ["error", { "newlines-between": "always-and-inside-groups" }], + + "prettier/prettier": [ + "error", + { + semi: false, + trailingComma: "all", + printWidth: 90, + quoteProps: "consistent", + singleQuote: false, + tabWidth: 2, + useTabs: false, + bracketSpacing: true, + arrowParens: "always", + proseWrap: "preserve", + endOfLine: "lf" + } + ], + + "arrow-body-style": "off", + + "prefer-arrow-callback": "error", + "no-duplicate-imports": "error", + "no-empty-function": "error", + "no-empty": ["error", { allowEmptyCatch: true }], + "no-new-wrappers": "error", + "no-param-reassign": "error", + "no-return-await": "error", + "no-sequences": "error", + "no-throw-literal": "error", + "no-void": "error", + + // Temporarily disabled recommended rules + "@typescript-eslint/explicit-module-boundary-types": "off", + "no-async-promise-executor": "off", + "jest/no-disabled-tests": "off" + }, + settings: { + "import/resolver": { + node: { + paths: ["."] + } + } + } + } diff --git a/lib/eslint-config/BUCK b/lib/eslint-config/BUCK new file mode 100644 index 0000000000..54b852e306 --- /dev/null +++ b/lib/eslint-config/BUCK @@ -0,0 +1,12 @@ +export_file( + name = "package.json", + visibility = ["PUBLIC"], +) + +filegroup( + name = "src", + srcs = [ + ".eslintrc.base.js", + ], + visibility = ["PUBLIC"], +) diff --git a/lib/eslint-config/package.json b/lib/eslint-config/package.json new file mode 100644 index 0000000000..44936be537 --- /dev/null +++ b/lib/eslint-config/package.json @@ -0,0 +1,22 @@ +{ + "name": "@galoy/eslint-config", + "private": true, + "version": "0.0.0", + "scripts": { + "preinstall": "npx only-allow pnpm" + }, + "exports": { + "./base": "./.eslintrc.base.js" + }, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^6.8.0", + "@typescript-eslint/parser": "^6.8.0", + "eslint": "^8.51.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-import": "^2.28.1", + "eslint-plugin-jest": "^27.4.2", + "eslint-plugin-prettier": "^5.0.1", + "prettier": "^3.0.3", + "typescript": "^5.2.2" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e24426d1ea..6a1f068c48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,7 +35,7 @@ importers: version: 16.3.1 edge-csrf: specifier: ^1.0.4 - version: 1.0.5(next@13.5.5) + version: 1.0.5(next@13.5.4) graphql: specifier: ^16.8.1 version: 16.8.1 @@ -44,7 +44,7 @@ importers: version: 1.10.47 next: specifier: latest - version: 13.5.5(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + version: 13.5.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) react: specifier: latest version: 18.2.0 @@ -66,7 +66,7 @@ importers: version: 5.0.0(graphql@16.8.1) '@graphql-codegen/cli': specifier: ^5.0.0 - version: 5.0.0(@types/node@20.8.7)(graphql@16.8.1)(typescript@5.2.2) + version: 5.0.0(@types/node@20.8.5)(graphql@16.8.1)(typescript@5.2.2) '@graphql-codegen/client-preset': specifier: ^4.1.0 version: 4.1.0(graphql@16.8.1) @@ -81,10 +81,10 @@ importers: version: 4.0.0(graphql-tag@2.12.6)(graphql@16.8.1) '@types/node': specifier: latest - version: 20.8.7 + version: 20.8.5 '@types/react': specifier: latest - version: 18.2.29 + version: 18.2.28 '@types/react-dom': specifier: latest version: 18.2.13 @@ -102,7 +102,7 @@ importers: version: 8.51.0 eslint-config-next: specifier: latest - version: 13.5.5(eslint@8.51.0)(typescript@5.2.2) + version: 13.5.4(eslint@8.51.0)(typescript@5.2.2) postcss: specifier: latest version: 8.4.31 @@ -120,25 +120,25 @@ importers: version: 3.8.5(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0) '@apollo/experimental-nextjs-app-support': specifier: ^0.4.3 - version: 0.4.3(@apollo/client@3.8.5)(next@13.5.5)(react@18.2.0) + version: 0.4.3(@apollo/client@3.8.5)(next@13.5.4)(react@18.2.0) '@emotion/cache': specifier: ^11.11.0 version: 11.11.0 '@emotion/react': specifier: ^11.11.1 - version: 11.11.1(@types/react@18.2.29)(react@18.2.0) + version: 11.11.1(@types/react@18.2.28)(react@18.2.0) '@emotion/styled': specifier: ^11.11.0 - version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.29)(react@18.2.0) + version: 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.28)(react@18.2.0) '@mui/icons-material': specifier: ^5.14.13 - version: 5.14.13(@mui/material@5.14.13)(@types/react@18.2.29)(react@18.2.0) + version: 5.14.13(@mui/material@5.14.13)(@types/react@18.2.28)(react@18.2.0) '@mui/joy': specifier: ^5.0.0-beta.10 - version: 5.0.0-beta.10(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0) + version: 5.0.0-beta.10(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) '@mui/material': specifier: ^5.14.13 - version: 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0) + version: 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) '@t3-oss/env-core': specifier: ^0.7.0 version: 0.7.0(typescript@5.2.2)(zod@3.22.4) @@ -150,10 +150,10 @@ importers: version: 16.8.1 next: specifier: latest - version: 13.5.5(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + version: 13.5.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) next-auth: specifier: ^4.23.1 - version: 4.23.2(next@13.5.5)(react-dom@18.2.0)(react@18.2.0) + version: 4.23.2(next@13.5.4)(react-dom@18.2.0)(react@18.2.0) react: specifier: latest version: 18.2.0 @@ -164,12 +164,15 @@ importers: specifier: ^3.22.4 version: 3.22.4 devDependencies: + '@galoy/eslint-config': + specifier: workspace:^ + version: link:../../lib/eslint-config '@graphql-codegen/add': specifier: ^5.0.0 version: 5.0.0(graphql@16.8.1) '@graphql-codegen/cli': specifier: ^5.0.0 - version: 5.0.0(@types/node@20.8.7)(graphql@16.8.1)(typescript@5.2.2) + version: 5.0.0(@types/node@20.8.5)(graphql@16.8.1)(typescript@5.2.2) '@graphql-codegen/client-preset': specifier: ^4.1.0 version: 4.1.0(graphql@16.8.1) @@ -187,13 +190,13 @@ importers: version: 4.0.1(graphql@16.8.1) '@graphql-inspector/cli': specifier: ^4.0.2 - version: 4.0.2(@types/node@20.8.7)(graphql@16.8.1) + version: 4.0.2(@types/node@20.8.5)(graphql@16.8.1) '@types/node': specifier: latest - version: 20.8.7 + version: 20.8.5 '@types/react': specifier: latest - version: 18.2.29 + version: 18.2.28 '@types/react-dom': specifier: latest version: 18.2.13 @@ -205,7 +208,7 @@ importers: version: 8.51.0 eslint-config-next: specifier: latest - version: 13.5.5(eslint@8.51.0)(typescript@5.2.2) + version: 13.5.4(eslint@8.51.0)(typescript@5.2.2) postcss: specifier: latest version: 8.4.31 @@ -682,6 +685,36 @@ importers: specifier: ^1.1.0 version: 1.1.0 + lib/eslint-config: + devDependencies: + '@typescript-eslint/eslint-plugin': + specifier: ^6.8.0 + version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': + specifier: ^6.8.0 + version: 6.8.0(eslint@8.51.0)(typescript@5.2.2) + eslint: + specifier: ^8.51.0 + version: 8.51.0 + eslint-config-prettier: + specifier: ^9.0.0 + version: 9.0.0(eslint@8.51.0) + eslint-plugin-import: + specifier: ^2.28.1 + version: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint@8.51.0) + eslint-plugin-jest: + specifier: ^27.4.2 + version: 27.4.2(@typescript-eslint/eslint-plugin@6.8.0)(eslint@8.51.0)(jest@29.7.0)(typescript@5.2.2) + eslint-plugin-prettier: + specifier: ^5.0.1 + version: 5.0.1(@types/eslint@8.44.6)(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) + prettier: + specifier: ^3.0.3 + version: 3.0.3 + typescript: + specifier: ^5.2.2 + version: 5.2.2 + packages: /@aashutoshrathi/word-wrap@1.2.6: @@ -821,7 +854,7 @@ packages: zen-observable-ts: 1.2.5 dev: true - /@apollo/experimental-nextjs-app-support@0.4.3(@apollo/client@3.8.5)(next@13.5.5)(react@18.2.0): + /@apollo/experimental-nextjs-app-support@0.4.3(@apollo/client@3.8.5)(next@13.5.4)(react@18.2.0): resolution: {integrity: sha512-UrgLMUIW7SFmeJyLvqh0E8KRvo6Nd/zzbUFt0ENT3BRa7z7kGsCk7I+kZEZEAn13nqlTC3M4VPS6tOfvtLFhxQ==} peerDependencies: '@apollo/client': '>=3.8.0-rc || ^3.8.0' @@ -829,7 +862,7 @@ packages: react: ^18 dependencies: '@apollo/client': 3.8.5(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0) - next: 13.5.5(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + next: 13.5.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) react: 18.2.0 server-only: 0.0.1 superjson: 1.13.3 @@ -2433,7 +2466,7 @@ packages: resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} dev: false - /@emotion/react@11.11.1(@types/react@18.2.29)(react@18.2.0): + /@emotion/react@11.11.1(@types/react@18.2.28)(react@18.2.0): resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' @@ -2449,7 +2482,7 @@ packages: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 - '@types/react': 18.2.29 + '@types/react': 18.2.28 hoist-non-react-statics: 3.3.2 react: 18.2.0 dev: false @@ -2468,7 +2501,7 @@ packages: resolution: {integrity: sha512-0QBtGvaqtWi+nx6doRwDdBIzhNdZrXUppvTM4dtZZWEGTXL/XE/yJxLMGlDT1Gt+UHH5IX1n+jkXyytE/av7OA==} dev: false - /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.29)(react@18.2.0): + /@emotion/styled@11.11.0(@emotion/react@11.11.1)(@types/react@18.2.28)(react@18.2.0): resolution: {integrity: sha512-hM5Nnvu9P3midq5aaXj4I+lnSfNi7Pmd4EWk1fOZ3pxookaQTNew6bp4JaCBYM4HVFZF9g7UjJmsUmC2JlxOng==} peerDependencies: '@emotion/react': ^11.0.0-rc.0 @@ -2481,11 +2514,11 @@ packages: '@babel/runtime': 7.23.1 '@emotion/babel-plugin': 11.11.0 '@emotion/is-prop-valid': 1.2.1 - '@emotion/react': 11.11.1(@types/react@18.2.29)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.28)(react@18.2.0) '@emotion/serialize': 1.1.2 '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 - '@types/react': 18.2.29 + '@types/react': 18.2.28 react: 18.2.0 dev: false @@ -2779,7 +2812,7 @@ packages: tslib: 2.5.3 dev: true - /@graphql-codegen/cli@5.0.0(@types/node@20.8.7)(graphql@16.8.1)(typescript@5.2.2): + /@graphql-codegen/cli@5.0.0(@types/node@20.8.5)(graphql@16.8.1)(typescript@5.2.2): resolution: {integrity: sha512-A7J7+be/a6e+/ul2KI5sfJlpoqeqwX8EzktaKCeduyVKgOLA6W5t+NUGf6QumBDXU8PEOqXk3o3F+RAwCWOiqA==} hasBin: true peerDependencies: @@ -2797,12 +2830,12 @@ packages: '@graphql-tools/apollo-engine-loader': 8.0.0(graphql@16.8.1) '@graphql-tools/code-file-loader': 8.0.2(graphql@16.8.1) '@graphql-tools/git-loader': 8.0.2(graphql@16.8.1) - '@graphql-tools/github-loader': 8.0.0(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/github-loader': 8.0.0(@types/node@20.8.5)(graphql@16.8.1) '@graphql-tools/graphql-file-loader': 8.0.0(graphql@16.8.1) '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.1) '@graphql-tools/load': 8.0.0(graphql@16.8.1) - '@graphql-tools/prisma-loader': 8.0.1(@types/node@20.8.7)(graphql@16.8.1) - '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/prisma-loader': 8.0.1(@types/node@20.8.5)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.5)(graphql@16.8.1) '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@whatwg-node/fetch': 0.8.8 chalk: 4.1.2 @@ -2810,7 +2843,7 @@ packages: debounce: 1.2.1 detect-indent: 6.1.0 graphql: 16.8.1 - graphql-config: 5.0.3(@types/node@20.8.7)(graphql@16.8.1)(typescript@5.2.2) + graphql-config: 5.0.3(@types/node@20.8.5)(graphql@16.8.1)(typescript@5.2.2) inquirer: 8.2.6 is-glob: 4.0.3 jiti: 1.20.0 @@ -3085,7 +3118,7 @@ packages: - yargs dev: true - /@graphql-inspector/cli@4.0.2(@types/node@20.8.7)(graphql@16.8.1): + /@graphql-inspector/cli@4.0.2(@types/node@20.8.5)(graphql@16.8.1): resolution: {integrity: sha512-0dNrsyQ04LpMmg/jnfaIpj/3MDKWSz6be7ONL+T/EI4oXLvc0j3UU3IzkfZUb5x9ORPYfu4nbYVKSQ1ZdR5oNQ==} engines: {node: '>=16.0.0'} hasBin: true @@ -3101,14 +3134,14 @@ packages: '@graphql-inspector/diff-command': 4.0.2(@graphql-inspector/config@4.0.1)(@graphql-inspector/loaders@4.0.2)(graphql@16.8.1)(yargs@17.7.2) '@graphql-inspector/docs-command': 4.0.2(@graphql-inspector/config@4.0.1)(@graphql-inspector/loaders@4.0.2)(graphql@16.8.1)(yargs@17.7.2) '@graphql-inspector/git-loader': 4.0.1(@babel/core@7.22.8)(graphql@16.8.1) - '@graphql-inspector/github-loader': 4.0.1(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-inspector/github-loader': 4.0.1(@types/node@20.8.5)(graphql@16.8.1) '@graphql-inspector/graphql-loader': 4.0.1(graphql@16.8.1) '@graphql-inspector/introspect-command': 4.0.2(@graphql-inspector/config@4.0.1)(@graphql-inspector/loaders@4.0.2)(graphql@16.8.1)(yargs@17.7.2) '@graphql-inspector/json-loader': 4.0.1(graphql@16.8.1) '@graphql-inspector/loaders': 4.0.2(@babel/core@7.23.2)(@graphql-inspector/config@4.0.1)(graphql@16.8.1) '@graphql-inspector/serve-command': 4.0.2(@graphql-inspector/config@4.0.1)(@graphql-inspector/loaders@4.0.2)(graphql@16.8.1)(yargs@17.7.2) '@graphql-inspector/similar-command': 4.0.2(@graphql-inspector/config@4.0.1)(@graphql-inspector/loaders@4.0.2)(graphql@16.8.1)(yargs@17.7.2) - '@graphql-inspector/url-loader': 4.0.1(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-inspector/url-loader': 4.0.1(@types/node@20.8.5)(graphql@16.8.1) '@graphql-inspector/validate-command': 4.0.2(@graphql-inspector/config@4.0.1)(@graphql-inspector/loaders@4.0.2)(graphql@16.8.1)(yargs@17.7.2) graphql: 16.8.1 tslib: 2.6.0 @@ -3238,13 +3271,13 @@ packages: - supports-color dev: true - /@graphql-inspector/github-loader@4.0.1(@types/node@20.8.7)(graphql@16.8.1): + /@graphql-inspector/github-loader@4.0.1(@types/node@20.8.5)(graphql@16.8.1): resolution: {integrity: sha512-PGtBgN5HErSPPxQ5U7Wnf7dBmxXtVyj4Tpi/5eDZEn9MdaqBH1MUy8HopNfv5KocgXork/CHNsroqbffSw6i+w==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-tools/github-loader': 8.0.0(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/github-loader': 8.0.0(@types/node@20.8.5)(graphql@16.8.1) graphql: 16.8.1 tslib: 2.6.0 transitivePeerDependencies: @@ -3356,13 +3389,13 @@ packages: - yargs dev: true - /@graphql-inspector/url-loader@4.0.1(@types/node@20.8.7)(graphql@16.8.1): + /@graphql-inspector/url-loader@4.0.1(@types/node@20.8.5)(graphql@16.8.1): resolution: {integrity: sha512-9Vl6mEUmS6RcKsKVbVLUPNA0PG0Efhvcq8EgbAXK3vdYn/+nZKpTuS2rKFh5Fxd0MrR4+JbqaGRdicEyXHB8sg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.5)(graphql@16.8.1) graphql: 16.8.1 tslib: 2.6.0 transitivePeerDependencies: @@ -3538,7 +3571,7 @@ packages: - utf-8-validate dev: true - /@graphql-tools/executor-http@1.0.3(@types/node@20.8.7)(graphql@16.8.1): + /@graphql-tools/executor-http@1.0.3(@types/node@20.8.5)(graphql@16.8.1): resolution: {integrity: sha512-5WZIMBevRaxMabZ8U2Ty0dTUPy/PpeYSlMNEmC/YJjKKykgSfc/AwSejx2sE4FFKZ0I2kxRKRenyoWMHRAV49Q==} engines: {node: '>=16.0.0'} peerDependencies: @@ -3549,7 +3582,7 @@ packages: '@whatwg-node/fetch': 0.9.13 extract-files: 11.0.0 graphql: 16.8.1 - meros: 1.3.0(@types/node@20.8.7) + meros: 1.3.0(@types/node@20.8.5) tslib: 2.6.2 value-or-promise: 1.0.12 transitivePeerDependencies: @@ -3622,14 +3655,14 @@ packages: - supports-color dev: true - /@graphql-tools/github-loader@8.0.0(@types/node@20.8.7)(graphql@16.8.1): + /@graphql-tools/github-loader@8.0.0(@types/node@20.8.5)(graphql@16.8.1): resolution: {integrity: sha512-VuroArWKcG4yaOWzV0r19ElVIV6iH6UKDQn1MXemND0xu5TzrFme0kf3U9o0YwNo0kUYEk9CyFM0BYg4he17FA==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/executor-http': 1.0.3(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/executor-http': 1.0.3(@types/node@20.8.5)(graphql@16.8.1) '@graphql-tools/graphql-tag-pluck': 8.0.2(graphql@16.8.1) '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@whatwg-node/fetch': 0.9.13 @@ -3834,13 +3867,13 @@ packages: tslib: 2.6.2 dev: true - /@graphql-tools/prisma-loader@8.0.1(@types/node@20.8.7)(graphql@16.8.1): + /@graphql-tools/prisma-loader@8.0.1(@types/node@20.8.5)(graphql@16.8.1): resolution: {integrity: sha512-bl6e5sAYe35Z6fEbgKXNrqRhXlCJYeWKBkarohgYA338/SD9eEhXtg3Cedj7fut3WyRLoQFpHzfiwxKs7XrgXg==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.5)(graphql@16.8.1) '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@types/js-yaml': 4.0.8 '@types/json-stable-stringify': 1.0.34 @@ -3931,7 +3964,7 @@ packages: tslib: 2.6.2 value-or-promise: 1.0.12 - /@graphql-tools/url-loader@8.0.0(@types/node@20.8.7)(graphql@16.8.1): + /@graphql-tools/url-loader@8.0.0(@types/node@20.8.5)(graphql@16.8.1): resolution: {integrity: sha512-rPc9oDzMnycvz+X+wrN3PLrhMBQkG4+sd8EzaFN6dypcssiefgWKToXtRKI8HHK68n2xEq1PyrOpkjHFJB+GwA==} engines: {node: '>=16.0.0'} peerDependencies: @@ -3940,7 +3973,7 @@ packages: '@ardatan/sync-fetch': 0.0.1 '@graphql-tools/delegate': 10.0.3(graphql@16.8.1) '@graphql-tools/executor-graphql-ws': 1.1.0(graphql@16.8.1) - '@graphql-tools/executor-http': 1.0.3(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/executor-http': 1.0.3(@types/node@20.8.5)(graphql@16.8.1) '@graphql-tools/executor-legacy-ws': 1.0.4(graphql@16.8.1) '@graphql-tools/utils': 10.0.6(graphql@16.8.1) '@graphql-tools/wrap': 10.0.1(graphql@16.8.1) @@ -4472,7 +4505,7 @@ packages: dependencies: sparse-bitfield: 3.0.3 - /@mui/base@5.0.0-beta.19(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0): + /@mui/base@5.0.0-beta.19(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-maNBgAscddyPNzFZQUJDF/puxM27Li+NqSBsr/lAP8TLns2VvWS2SoL3OKFOIoRnAMKGY/Ic6Aot6gCYeQnssA==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4485,10 +4518,10 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@floating-ui/react-dom': 2.0.2(react-dom@18.2.0)(react@18.2.0) - '@mui/types': 7.2.6(@types/react@18.2.29) - '@mui/utils': 5.14.13(@types/react@18.2.29)(react@18.2.0) + '@mui/types': 7.2.6(@types/react@18.2.28) + '@mui/utils': 5.14.13(@types/react@18.2.28)(react@18.2.0) '@popperjs/core': 2.11.8 - '@types/react': 18.2.29 + '@types/react': 18.2.28 clsx: 2.0.0 prop-types: 15.8.1 react: 18.2.0 @@ -4499,7 +4532,7 @@ packages: resolution: {integrity: sha512-3ZUbzcH4yloLKlV6Y+S0Edn2wef9t+EGHSfEkwVCn8E0ULdshifEFgfEroKRegQifDIwcKS/ofccxuZ8njTAYg==} dev: false - /@mui/icons-material@5.14.13(@mui/material@5.14.13)(@types/react@18.2.29)(react@18.2.0): + /@mui/icons-material@5.14.13(@mui/material@5.14.13)(@types/react@18.2.28)(react@18.2.0): resolution: {integrity: sha512-fxKE1UrjI4xVxHe9IAGuVQZrc18dSBJg0P+Sqi2SZmcDUCShmgRq6Jq7l7GduvuMIkOSqAJdNgLtXmtmZkjtLg==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4511,12 +4544,12 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@mui/material': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0) - '@types/react': 18.2.29 + '@mui/material': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) + '@types/react': 18.2.28 react: 18.2.0 dev: false - /@mui/joy@5.0.0-beta.10(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0): + /@mui/joy@5.0.0-beta.10(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-HntqF/z2q8QM8bMwfS19ok9qoarQFaJCvm1AsFYB8ndxODTMj5gpSJ6YzjM0i5MT/vGurIAU96xVx8R7jok8tg==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4534,21 +4567,21 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@emotion/react': 11.11.1(@types/react@18.2.29)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.29)(react@18.2.0) - '@mui/base': 5.0.0-beta.19(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.28)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.28)(react@18.2.0) + '@mui/base': 5.0.0-beta.19(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) '@mui/core-downloads-tracker': 5.14.13 - '@mui/system': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react@18.2.0) - '@mui/types': 7.2.6(@types/react@18.2.29) - '@mui/utils': 5.14.13(@types/react@18.2.29)(react@18.2.0) - '@types/react': 18.2.29 + '@mui/system': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react@18.2.0) + '@mui/types': 7.2.6(@types/react@18.2.28) + '@mui/utils': 5.14.13(@types/react@18.2.28)(react@18.2.0) + '@types/react': 18.2.28 clsx: 2.0.0 prop-types: 15.8.1 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: false - /@mui/material@5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0): + /@mui/material@5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-iPEFwhoVG789UVsXX4gqd1eJUlcLW1oceqwJYQN8Z4MpcAKfL9Lv3fda65AwG7pQ5lf+d7IbHzm4m48SWZxI2g==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4566,14 +4599,14 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@emotion/react': 11.11.1(@types/react@18.2.29)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.29)(react@18.2.0) - '@mui/base': 5.0.0-beta.19(@types/react@18.2.29)(react-dom@18.2.0)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.28)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.28)(react@18.2.0) + '@mui/base': 5.0.0-beta.19(@types/react@18.2.28)(react-dom@18.2.0)(react@18.2.0) '@mui/core-downloads-tracker': 5.14.13 - '@mui/system': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react@18.2.0) - '@mui/types': 7.2.6(@types/react@18.2.29) - '@mui/utils': 5.14.13(@types/react@18.2.29)(react@18.2.0) - '@types/react': 18.2.29 + '@mui/system': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react@18.2.0) + '@mui/types': 7.2.6(@types/react@18.2.28) + '@mui/utils': 5.14.13(@types/react@18.2.28)(react@18.2.0) + '@types/react': 18.2.28 '@types/react-transition-group': 4.4.7 clsx: 2.0.0 csstype: 3.1.2 @@ -4584,7 +4617,7 @@ packages: react-transition-group: 4.4.5(react-dom@18.2.0)(react@18.2.0) dev: false - /@mui/private-theming@5.14.13(@types/react@18.2.29)(react@18.2.0): + /@mui/private-theming@5.14.13(@types/react@18.2.28)(react@18.2.0): resolution: {integrity: sha512-5EFqk4tqiSwPguj4NW/6bUf4u1qoUWXy9lrKfNh9H6oAohM+Ijv/7qSxFjnxPGBctj469/Sc5aKAR35ILBKZLQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4595,8 +4628,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@mui/utils': 5.14.13(@types/react@18.2.29)(react@18.2.0) - '@types/react': 18.2.29 + '@mui/utils': 5.14.13(@types/react@18.2.28)(react@18.2.0) + '@types/react': 18.2.28 prop-types: 15.8.1 react: 18.2.0 dev: false @@ -4616,14 +4649,14 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@emotion/cache': 11.11.0 - '@emotion/react': 11.11.1(@types/react@18.2.29)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.29)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.28)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.28)(react@18.2.0) csstype: 3.1.2 prop-types: 15.8.1 react: 18.2.0 dev: false - /@mui/system@5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.29)(react@18.2.0): + /@mui/system@5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.28)(react@18.2.0): resolution: {integrity: sha512-+5+Dx50lG4csbx2sGjrKLozXQJeCpJ4dIBZolyFLkZ+XphD1keQWouLUvJkPQ3MSglLLKuD37pp52YjMncZMEQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4640,20 +4673,20 @@ packages: optional: true dependencies: '@babel/runtime': 7.23.1 - '@emotion/react': 11.11.1(@types/react@18.2.29)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.29)(react@18.2.0) - '@mui/private-theming': 5.14.13(@types/react@18.2.29)(react@18.2.0) + '@emotion/react': 11.11.1(@types/react@18.2.28)(react@18.2.0) + '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.28)(react@18.2.0) + '@mui/private-theming': 5.14.13(@types/react@18.2.28)(react@18.2.0) '@mui/styled-engine': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(react@18.2.0) - '@mui/types': 7.2.6(@types/react@18.2.29) - '@mui/utils': 5.14.13(@types/react@18.2.29)(react@18.2.0) - '@types/react': 18.2.29 + '@mui/types': 7.2.6(@types/react@18.2.28) + '@mui/utils': 5.14.13(@types/react@18.2.28)(react@18.2.0) + '@types/react': 18.2.28 clsx: 2.0.0 csstype: 3.1.2 prop-types: 15.8.1 react: 18.2.0 dev: false - /@mui/types@7.2.6(@types/react@18.2.29): + /@mui/types@7.2.6(@types/react@18.2.28): resolution: {integrity: sha512-7sjLQrUmBwufm/M7jw/quNiPK/oor2+pGUQP2CULRcFCArYTq78oJ3D5esTaL0UMkXKJvDqXn6Ike69yAOBQng==} peerDependencies: '@types/react': ^17.0.0 || ^18.0.0 @@ -4661,10 +4694,10 @@ packages: '@types/react': optional: true dependencies: - '@types/react': 18.2.29 + '@types/react': 18.2.28 dev: false - /@mui/utils@5.14.13(@types/react@18.2.29)(react@18.2.0): + /@mui/utils@5.14.13(@types/react@18.2.28)(react@18.2.0): resolution: {integrity: sha512-2AFpyXWw7uDCIqRu7eU2i/EplZtks5LAMzQvIhC79sPV9IhOZU2qwOWVnPtdctRXiQJOAaXulg+A37pfhEueQw==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4676,24 +4709,24 @@ packages: dependencies: '@babel/runtime': 7.23.1 '@types/prop-types': 15.7.8 - '@types/react': 18.2.29 + '@types/react': 18.2.28 prop-types: 15.8.1 react: 18.2.0 react-is: 18.2.0 dev: false - /@next/env@13.5.5: - resolution: {integrity: sha512-agvIhYWp+ilbScg81s/sLueZo8CNEYLjNOqhISxheLmD/AQI4/VxV7bV76i/KzxH4iHy/va0YS9z0AOwGnw4Fg==} + /@next/env@13.5.4: + resolution: {integrity: sha512-LGegJkMvRNw90WWphGJ3RMHMVplYcOfRWf2Be3td3sUa+1AaxmsYyANsA+znrGCBjXJNi4XAQlSoEfUxs/4kIQ==} dev: false - /@next/eslint-plugin-next@13.5.5: - resolution: {integrity: sha512-S/32s4S+SCOpW58lHKdmILAAPRdnsSei7Y3L1oZSoe5Eh0QSlzbG1nYyIpnpwWgz3T7qe3imdq7cJ6Hf29epRA==} + /@next/eslint-plugin-next@13.5.4: + resolution: {integrity: sha512-vI94U+D7RNgX6XypSyjeFrOzxGlZyxOplU0dVE5norIfZGn/LDjJYPHdvdsR5vN1eRtl6PDAsOHmycFEOljK5A==} dependencies: glob: 7.1.7 dev: true - /@next/swc-darwin-arm64@13.5.5: - resolution: {integrity: sha512-FvTdcJdTA7H1FGY8dKPPbf/O0oDC041/znHZwXA7liiGUhgw5hOQ+9z8tWvuz0M5a/SDjY/IRPBAb5FIFogYww==} + /@next/swc-darwin-arm64@13.5.4: + resolution: {integrity: sha512-Df8SHuXgF1p+aonBMcDPEsaahNo2TCwuie7VXED4FVyECvdXfRT9unapm54NssV9tF3OQFKBFOdlje4T43VO0w==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -4701,8 +4734,8 @@ packages: dev: false optional: true - /@next/swc-darwin-x64@13.5.5: - resolution: {integrity: sha512-mTqNIecaojmyia7appVO2QggBe1Z2fdzxgn6jb3x9qlAk8yY2sy4MAcsj71kC9RlenCqDmr9vtC/ESFf110TPA==} + /@next/swc-darwin-x64@13.5.4: + resolution: {integrity: sha512-siPuUwO45PnNRMeZnSa8n/Lye5ZX93IJom9wQRB5DEOdFrw0JjOMu1GINB8jAEdwa7Vdyn1oJ2xGNaQpdQQ9Pw==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -4710,8 +4743,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-gnu@13.5.5: - resolution: {integrity: sha512-U9e+kNkfvwh/T8yo+xcslvNXgyMzPPX1IbwCwnHHFmX5ckb1Uc3XZSInNjFQEQR5xhJpB5sFdal+IiBIiLYkZA==} + /@next/swc-linux-arm64-gnu@13.5.4: + resolution: {integrity: sha512-l/k/fvRP/zmB2jkFMfefmFkyZbDkYW0mRM/LB+tH5u9pB98WsHXC0WvDHlGCYp3CH/jlkJPL7gN8nkTQVrQ/2w==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -4719,8 +4752,8 @@ packages: dev: false optional: true - /@next/swc-linux-arm64-musl@13.5.5: - resolution: {integrity: sha512-h7b58eIoNCSmKVC5fr167U0HWZ/yGLbkKD9wIller0nGdyl5zfTji0SsPKJvrG8jvKPFt2xOkVBmXlFOtuKynw==} + /@next/swc-linux-arm64-musl@13.5.4: + resolution: {integrity: sha512-YYGb7SlLkI+XqfQa8VPErljb7k9nUnhhRrVaOdfJNCaQnHBcvbT7cx/UjDQLdleJcfyg1Hkn5YSSIeVfjgmkTg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -4728,8 +4761,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-gnu@13.5.5: - resolution: {integrity: sha512-6U4y21T1J6FfcpM9uqzBJicxycpB5gJKLyQ3g6KOfBzT8H1sMwfHTRrvHKB09GIn1BCRy5YJHrA1G26DzqR46w==} + /@next/swc-linux-x64-gnu@13.5.4: + resolution: {integrity: sha512-uE61vyUSClnCH18YHjA8tE1prr/PBFlBFhxBZis4XBRJoR+txAky5d7gGNUIbQ8sZZ7LVkSVgm/5Fc7mwXmRAg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -4737,8 +4770,8 @@ packages: dev: false optional: true - /@next/swc-linux-x64-musl@13.5.5: - resolution: {integrity: sha512-OuqWSAQHJQM2EsapPFTSU/FLQ0wKm7UeRNatiR/jLeCe1V02aB9xmzuWYo2Neaxxag4rss3S8fj+lvMLzwDaFA==} + /@next/swc-linux-x64-musl@13.5.4: + resolution: {integrity: sha512-qVEKFYML/GvJSy9CfYqAdUexA6M5AklYcQCW+8JECmkQHGoPxCf04iMh7CPR7wkHyWWK+XLt4Ja7hhsPJtSnhg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -4746,8 +4779,8 @@ packages: dev: false optional: true - /@next/swc-win32-arm64-msvc@13.5.5: - resolution: {integrity: sha512-+yLrOZIIZDY4uGn9bLOc0wTgs+M8RuOUFSUK3BhmcLav9e+tcAj0jyBHD4aXv2qWhppUeuYMsyBo1I58/eE6Dg==} + /@next/swc-win32-arm64-msvc@13.5.4: + resolution: {integrity: sha512-mDSQfqxAlfpeZOLPxLymZkX0hYF3juN57W6vFHTvwKlnHfmh12Pt7hPIRLYIShk8uYRsKPtMTth/EzpwRI+u8w==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -4755,8 +4788,8 @@ packages: dev: false optional: true - /@next/swc-win32-ia32-msvc@13.5.5: - resolution: {integrity: sha512-SyMxXyJtf9ScMH0Dh87THJMXNFvfkRAk841xyW9SeOX3KxM1buXX3hN7vof4kMGk0Yg996OGsX+7C9ueS8ugsw==} + /@next/swc-win32-ia32-msvc@13.5.4: + resolution: {integrity: sha512-aoqAT2XIekIWoriwzOmGFAvTtVY5O7JjV21giozBTP5c6uZhpvTWRbmHXbmsjZqY4HnEZQRXWkSAppsIBweKqw==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -4764,8 +4797,8 @@ packages: dev: false optional: true - /@next/swc-win32-x64-msvc@13.5.5: - resolution: {integrity: sha512-n5KVf2Ok0BbLwofAaHiiKf+BQCj1M8WmTujiER4/qzYAVngnsNSjqEWvJ03raeN9eURqxDO+yL5VRoDrR33H9A==} + /@next/swc-win32-x64-msvc@13.5.4: + resolution: {integrity: sha512-cyRvlAxwlddlqeB9xtPSfNSCRy8BOa4wtMo0IuI9P7Y0XT2qpDrpFKRyZ7kUngZis59mPVla5k8X1oOJ8RxDYg==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -5848,6 +5881,12 @@ packages: undici-types: 5.25.3 dev: false + /@types/node@20.8.5: + resolution: {integrity: sha512-SPlobFgbidfIeOYlzXiEjSYeIJiOCthv+9tSQVpvk4PAdIIc+2SmjNVzWXk9t0Y7dl73Zdf+OgXKHX9XtkqUpw==} + dependencies: + undici-types: 5.25.3 + dev: true + /@types/node@20.8.7: resolution: {integrity: sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==} dependencies: @@ -5879,13 +5918,13 @@ packages: /@types/react-dom@18.2.13: resolution: {integrity: sha512-eJIUv7rPP+EC45uNYp/ThhSpE16k22VJUknt5OLoH9tbXoi8bMhwLf5xRuWMywamNbWzhrSmU7IBJfPup1+3fw==} dependencies: - '@types/react': 18.2.29 + '@types/react': 18.2.28 dev: true /@types/react-phone-number-input@3.0.15: resolution: {integrity: sha512-3XMPAkfWXcs8tJoyhz4WCxl48cLXi3LPK/8Cg+Pu+2bh8qPIVsvCLcDaTmCffBqhLQOvAiQTlt57gTzwKnb3LA==} dependencies: - '@types/react': 18.2.29 + '@types/react': 18.2.28 dev: true /@types/react-transition-group@4.4.7: @@ -5894,6 +5933,13 @@ packages: '@types/react': 18.2.29 dev: false + /@types/react@18.2.28: + resolution: {integrity: sha512-ad4aa/RaaJS3hyGz0BGegdnSRXQBkd1CCYDCdNjBPg90UUpLgo+WlJqb9fMYUxtehmzF3PJaTWqRZjko6BRzBg==} + dependencies: + '@types/prop-types': 15.7.8 + '@types/scheduler': 0.16.4 + csstype: 3.1.2 + /@types/react@18.2.29: resolution: {integrity: sha512-Z+ZrIRocWtdD70j45izShRwDuiB4JZqDegqMFW/I8aG5DxxLKOzVNoq62UIO82v9bdgi+DO1jvsb9sTEZUSm+Q==} dependencies: @@ -6061,6 +6107,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@6.7.4(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-I5zVZFY+cw4IMZUeNCU7Sh2PO5O57F7Lr0uyhgCJmhN/BuTlnc55KxPonR4+EM3GBdfiCyGZye6DgMjtubQkmA==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.7.4 + '@typescript-eslint/types': 6.7.4 + '@typescript-eslint/typescript-estree': 6.7.4(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.4 + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.51.0 + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@6.8.0(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6090,6 +6157,14 @@ packages: '@typescript-eslint/visitor-keys': 5.62.0 dev: true + /@typescript-eslint/scope-manager@6.7.4: + resolution: {integrity: sha512-SdGqSLUPTXAXi7c3Ob7peAGVnmMoGzZ361VswK2Mqf8UOYcODiYvs8rs5ILqEdfvX1lE7wEZbLyELCW+Yrql1A==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.7.4 + '@typescript-eslint/visitor-keys': 6.7.4 + dev: true + /@typescript-eslint/scope-manager@6.8.0: resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6128,6 +6203,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@typescript-eslint/types@6.7.4: + resolution: {integrity: sha512-o9XWK2FLW6eSS/0r/tgjAGsYasLAnOWg7hvZ/dGYSSNjCh+49k5ocPN8OmG5aZcSJ8pclSOyVKP2x03Sj+RrCA==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/types@6.8.0: resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6196,6 +6276,27 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@6.7.4(typescript@5.2.2): + resolution: {integrity: sha512-ty8b5qHKatlNYd9vmpHooQz3Vki3gG+3PchmtsA4TgrZBKWHNjWfkQid7K7xQogBqqc7/BhGazxMD5vr6Ha+iQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.7.4 + '@typescript-eslint/visitor-keys': 6.7.4 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.2.2) + typescript: 5.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree@6.8.0(typescript@5.2.2): resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -6272,6 +6373,14 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@6.7.4: + resolution: {integrity: sha512-pOW37DUhlTZbvph50x5zZCkFn3xzwkGtNoJHzIM3svpiSkJzwOYr/kVBaXmf+RAQiUDs1AHEZVNPg6UJCJpwRA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 6.7.4 + eslint-visitor-keys: 3.4.3 + dev: true + /@typescript-eslint/visitor-keys@6.8.0: resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -8858,12 +8967,12 @@ packages: wif: 2.0.6 dev: false - /edge-csrf@1.0.5(next@13.5.5): + /edge-csrf@1.0.5(next@13.5.4): resolution: {integrity: sha512-1RhkCG0lmph+5WoE9/AYc1H4y6wCCfkUFvXe0j1/rwg16jIU1m+frWlzNWTj8aLYb1/Qq/3usB+vqlEZiava4g==} peerDependencies: next: ^13.0.0 dependencies: - next: 13.5.5(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + next: 13.5.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) dev: false /editorconfig@1.0.4: @@ -9083,8 +9192,8 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-next@13.5.5(eslint@8.51.0)(typescript@5.2.2): - resolution: {integrity: sha512-kQr/eevFyzeVt0yCKTchQp3MTIx8ZmBsAKLW+7bzmAXHcf2vvxIqAt2N/afb9SZpuXXhSb/8yrKQGVUVpYmafQ==} + /eslint-config-next@13.5.4(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-FzQGIj4UEszRX7fcRSJK6L1LrDiVZvDFW320VVntVKh3BSU8Fb9kpaoxQx0cdFgf3MQXdeSbrCXJ/5Z/NndDkQ==} peerDependencies: eslint: ^7.23.0 || ^8.0.0 typescript: '>=3.3.1' @@ -9092,13 +9201,13 @@ packages: typescript: optional: true dependencies: - '@next/eslint-plugin-next': 13.5.5 + '@next/eslint-plugin-next': 13.5.4 '@rushstack/eslint-patch': 1.5.1 - '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.51.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.51.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) eslint-plugin-jsx-a11y: 6.7.1(eslint@8.51.0) eslint-plugin-react: 7.33.2(eslint@8.51.0) eslint-plugin-react-hooks: 4.6.0(eslint@8.51.0) @@ -9127,7 +9236,7 @@ packages: - supports-color dev: true - /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.51.0): + /eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.51.0): resolution: {integrity: sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -9137,8 +9246,8 @@ packages: debug: 4.3.4(supports-color@8.1.1) enhanced-resolve: 5.15.0 eslint: 8.51.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) fast-glob: 3.3.1 get-tsconfig: 4.7.2 is-core-module: 2.13.0 @@ -9150,7 +9259,37 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): + resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' + peerDependenciesMeta: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + dependencies: + '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) + debug: 3.2.7(supports-color@5.5.0) + eslint: 8.51.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.51.0) + transitivePeerDependencies: + - supports-color + dev: true + + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -9175,12 +9314,11 @@ packages: debug: 3.2.7(supports-color@5.5.0) eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.51.0) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): + /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0): resolution: {integrity: sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==} engines: {node: '>=4'} peerDependencies: @@ -9190,7 +9328,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 @@ -9199,7 +9337,7 @@ packages: doctrine: 2.1.0 eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) has: 1.0.4 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -9234,7 +9372,7 @@ packages: doctrine: 2.1.0 eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1)(eslint@8.51.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.8.0)(eslint-import-resolver-node@0.3.9)(eslint@8.51.0) has: 1.0.4 is-core-module: 2.13.0 is-glob: 4.0.3 @@ -10614,7 +10752,7 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /graphql-config@5.0.3(@types/node@20.8.7)(graphql@16.8.1)(typescript@5.2.2): + /graphql-config@5.0.3(@types/node@20.8.5)(graphql@16.8.1)(typescript@5.2.2): resolution: {integrity: sha512-BNGZaoxIBkv9yy6Y7omvsaBUHOzfFcII3UN++tpH8MGOKFPFkCPZuwx09ggANMt8FgyWP1Od8SWPmrUEZca4NQ==} engines: {node: '>= 16.0.0'} peerDependencies: @@ -10628,7 +10766,7 @@ packages: '@graphql-tools/json-file-loader': 8.0.0(graphql@16.8.1) '@graphql-tools/load': 8.0.0(graphql@16.8.1) '@graphql-tools/merge': 9.0.0(graphql@16.8.1) - '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.7)(graphql@16.8.1) + '@graphql-tools/url-loader': 8.0.0(@types/node@20.8.5)(graphql@16.8.1) '@graphql-tools/utils': 10.0.6(graphql@16.8.1) cosmiconfig: 8.3.6(typescript@5.2.2) graphql: 16.8.1 @@ -13296,7 +13434,7 @@ packages: engines: {node: '>= 8'} dev: true - /meros@1.3.0(@types/node@20.8.7): + /meros@1.3.0(@types/node@20.8.5): resolution: {integrity: sha512-2BNGOimxEz5hmjUG2FwoxCt5HN7BXdaWyFqEwxPTrJzVdABtrL4TiHTcsWSFAxPQ/tOnEaQEJh3qWq71QRMY+w==} engines: {node: '>=13'} peerDependencies: @@ -13305,7 +13443,7 @@ packages: '@types/node': optional: true dependencies: - '@types/node': 20.8.7 + '@types/node': 20.8.5 dev: true /methods@1.1.2: @@ -13642,7 +13780,7 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /next-auth@4.23.2(next@13.5.5)(react-dom@18.2.0)(react@18.2.0): + /next-auth@4.23.2(next@13.5.4)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-VRmInu0r/yZNFQheDFeOKtiugu3bt90Po3owAQDnFQ3YLQFmUKgFjcE2+3L0ny5jsJpBXaKbm7j7W2QTc6Ye2A==} peerDependencies: next: ^12.2.5 || ^13 @@ -13657,7 +13795,7 @@ packages: '@panva/hkdf': 1.1.1 cookie: 0.5.0 jose: 4.15.2 - next: 13.5.5(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) + next: 13.5.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0) oauth: 0.9.15 openid-client: 5.6.1 preact: 10.18.1 @@ -13667,8 +13805,8 @@ packages: uuid: 8.3.2 dev: false - /next@13.5.5(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-LddFJjpfrtrMMw8Q9VLhIURuSidiCNcMQjRqcPtrKd+Fx07MsG7hYndJb/f2d3I+mTbTotsTJfCnn0eZ/YPk8w==} + /next@13.5.4(@babel/core@7.23.2)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-+93un5S779gho8y9ASQhb/bTkQF17FNQOtXLKAj3lsNgltEcF0C5PMLLncDmH+8X1EnJH1kbqAERa29nRXqhjA==} engines: {node: '>=16.14.0'} hasBin: true peerDependencies: @@ -13682,7 +13820,7 @@ packages: sass: optional: true dependencies: - '@next/env': 13.5.5 + '@next/env': 13.5.4 '@swc/helpers': 0.5.2 busboy: 1.6.0 caniuse-lite: 1.0.30001546 @@ -13692,15 +13830,15 @@ packages: styled-jsx: 5.1.1(@babel/core@7.23.2)(react@18.2.0) watchpack: 2.4.0 optionalDependencies: - '@next/swc-darwin-arm64': 13.5.5 - '@next/swc-darwin-x64': 13.5.5 - '@next/swc-linux-arm64-gnu': 13.5.5 - '@next/swc-linux-arm64-musl': 13.5.5 - '@next/swc-linux-x64-gnu': 13.5.5 - '@next/swc-linux-x64-musl': 13.5.5 - '@next/swc-win32-arm64-msvc': 13.5.5 - '@next/swc-win32-ia32-msvc': 13.5.5 - '@next/swc-win32-x64-msvc': 13.5.5 + '@next/swc-darwin-arm64': 13.5.4 + '@next/swc-darwin-x64': 13.5.4 + '@next/swc-linux-arm64-gnu': 13.5.4 + '@next/swc-linux-arm64-musl': 13.5.4 + '@next/swc-linux-x64-gnu': 13.5.4 + '@next/swc-linux-x64-musl': 13.5.4 + '@next/swc-win32-arm64-msvc': 13.5.4 + '@next/swc-win32-ia32-msvc': 13.5.4 + '@next/swc-win32-x64-msvc': 13.5.4 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index e092da29c4..d89441edad 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,3 +3,4 @@ packages: - core/api - apps/consent - apps/dashboard + - lib/eslint-config diff --git a/toolchains/workspace-pnpm/macros.bzl b/toolchains/workspace-pnpm/macros.bzl index 35ec3840dc..2acf226cff 100644 --- a/toolchains/workspace-pnpm/macros.bzl +++ b/toolchains/workspace-pnpm/macros.bzl @@ -554,6 +554,10 @@ def prepare_build_context(ctx: AnalysisContext) -> BuildContext: for src in ctx.attrs.srcs: cmd.add("--src") cmd.add(cmd_args(src, format = ctx.label.package + "={}")) + if hasattr(ctx.attrs, 'dev_deps_srcs'): + for (name, src) in ctx.attrs.dev_deps_srcs.items(): + cmd.add("--src") + cmd.add(cmd_args(src, format = name + "={}")) cmd.add(workspace_root.as_output()) ctx.actions.run(cmd, category = "prepare_build_context", identifier = ctx.label.package) @@ -626,6 +630,12 @@ _eslint = rule( default = [], doc = """List of package source files to track.""", ), + "dev_deps_srcs": attrs.dict( + attrs.string(), + attrs.source(allow_directory = True), + default = {}, + doc = """Mapping of dependent dev package paths to source files from to track.""", + ), "eslint": attrs.dep( providers = [RunInfo], doc = """eslint dependency.""",