From 179ee92f6ce71ebb5ec1f552b41f8903aee639b0 Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sun, 8 Oct 2023 21:38:09 -0400 Subject: [PATCH] edge functions didn't make sense for database calls --- lib/helpers/compile-note.ts | 12 +- lib/helpers/parse-notes.ts | 50 ++--- lib/helpers/prisma.ts | 5 +- lib/helpers/remark-rehype-plugins.ts | 9 + lib/styles/stitches.config.ts | 1 - package.json | 11 +- pages/api/count.ts | 41 ++-- pages/api/hits.ts | 23 +-- pnpm-lock.yaml | 275 ++++++++++++--------------- prisma/schema.prisma | 2 +- types/stats.d.ts | 13 +- 11 files changed, 203 insertions(+), 239 deletions(-) create mode 100644 lib/helpers/remark-rehype-plugins.ts diff --git a/lib/helpers/compile-note.ts b/lib/helpers/compile-note.ts index 9ee3facc..505a4527 100644 --- a/lib/helpers/compile-note.ts +++ b/lib/helpers/compile-note.ts @@ -2,18 +2,16 @@ import { serialize } from "next-mdx-remote/serialize"; import { minify } from "uglify-js"; import { getNoteData } from "./parse-notes"; -// remark/rehype markdown plugins -import remarkGfm from "remark-gfm"; -import remarkSmartypants from "remark-smartypants"; -import remarkUnwrapImages from "remark-unwrap-images"; -import rehypeSlug from "rehype-slug"; -import rehypePrism from "rehype-prism-plus"; - import type { NoteWithSource } from "../../types"; // fully parses MDX into JS and returns *everything* about a note export const compileNote = async (slug: string): Promise => { const { frontMatter, content } = await getNoteData(slug); + + const { remarkGfm, remarkSmartypants, remarkUnwrapImages, rehypeSlug, rehypePrism } = await import( + "./remark-rehype-plugins" + ); + const source = await serialize(content, { parseFrontmatter: false, mdxOptions: { diff --git a/lib/helpers/parse-notes.ts b/lib/helpers/parse-notes.ts index 14382d7c..6dd50fa1 100644 --- a/lib/helpers/parse-notes.ts +++ b/lib/helpers/parse-notes.ts @@ -4,13 +4,6 @@ import glob from "fast-glob"; import pMap from "p-map"; import pMemoize from "p-memoize"; import matter from "gray-matter"; -import removeMarkdown from "remove-markdown"; -import { unified } from "unified"; -import remarkParse from "remark-parse"; -import remarkRehype from "remark-rehype"; -import rehypeSanitize from "rehype-sanitize"; -import remarkSmartypants from "remark-smartypants"; -import rehypeStringify from "rehype-stringify"; import { formatDate } from "./format-date"; import type { NoteFrontMatter } from "../../types"; @@ -39,28 +32,41 @@ export const getNoteData = async ( const rawContent = await fs.readFile(fullPath, "utf8"); const { data, content } = matter(rawContent); - // allow *very* limited markdown to be used in post titles - const htmlTitle = String( - await unified() - .use(remarkParse) - .use(remarkRehype) - .use(rehypeSanitize, { tagNames: ["code", "em", "strong"] }) - .use(remarkSmartypants, { - quotes: true, - dashes: "oldschool", - backticks: false, - ellipses: false, - }) - .use(rehypeStringify, { allowDangerousHtml: true }) - .process(data.title) + const { unified } = await import("unified"); + const { remarkParse, remarkSmartypants, remarkRehype, rehypeSanitize, rehypeStringify } = await import( + "./remark-rehype-plugins" ); + // allow *very* limited markdown to be used in post titles + const parseTitle = async (title: string, allowedTags: string[] = []): Promise => { + return String( + await unified() + .use(remarkParse) + .use(remarkSmartypants, { + quotes: true, + dashes: "oldschool", + backticks: false, + ellipses: false, + }) + .use(remarkRehype) + .use(rehypeSanitize, { tagNames: allowedTags }) + .use(rehypeStringify) + .process(title) + ); + }; + + // process title as both plain and stylized + const [title, htmlTitle] = await Promise.all([ + parseTitle(data.title), + parseTitle(data.title, ["code", "em", "strong"]), + ]); + // return both the parsed YAML front matter (with a few amendments) and the raw, unparsed markdown content return { frontMatter: { ...(data as Partial), // zero markdown title: - title: removeMarkdown(data.title), + title, htmlTitle, slug, permalink: `${process.env.BASE_URL}/notes/${slug}/`, diff --git a/lib/helpers/prisma.ts b/lib/helpers/prisma.ts index 58a77c1b..538802cc 100644 --- a/lib/helpers/prisma.ts +++ b/lib/helpers/prisma.ts @@ -1,12 +1,11 @@ -import { PrismaClient } from "@prisma/client/edge"; -import { withAccelerate } from "@prisma/extension-accelerate"; +import { PrismaClient } from "@prisma/client"; // creating PrismaClient here prevents next.js from starting too many concurrent prisma instances and exhausting the // number of connection pools available (especially when hot reloading from `next dev`). // https://www.prisma.io/docs/guides/other/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices const prismaClientSingleton = () => { - return new PrismaClient().$extends(withAccelerate()); + return new PrismaClient(); }; type PrismaClientSingleton = ReturnType; diff --git a/lib/helpers/remark-rehype-plugins.ts b/lib/helpers/remark-rehype-plugins.ts new file mode 100644 index 00000000..485fd537 --- /dev/null +++ b/lib/helpers/remark-rehype-plugins.ts @@ -0,0 +1,9 @@ +export { default as rehypePrism } from "rehype-prism-plus"; +export { default as rehypeSanitize } from "rehype-sanitize"; +export { default as rehypeSlug } from "rehype-slug"; +export { default as rehypeStringify } from "rehype-stringify"; +export { default as remarkGfm } from "remark-gfm"; +export { default as remarkParse } from "remark-parse"; +export { default as remarkRehype } from "remark-rehype"; +export { default as remarkSmartypants } from "remark-smartypants"; +export { default as remarkUnwrapImages } from "remark-unwrap-images"; diff --git a/lib/styles/stitches.config.ts b/lib/styles/stitches.config.ts index d0d57c6f..682fb0c7 100644 --- a/lib/styles/stitches.config.ts +++ b/lib/styles/stitches.config.ts @@ -132,7 +132,6 @@ export const darkTheme = createTheme({ }, }); -// @ts-ignore export const globalStyles = globalCss( // @ts-ignore ...normalizeCss({ diff --git a/package.json b/package.json index 96aec758..5a31a815 100644 --- a/package.json +++ b/package.json @@ -15,16 +15,15 @@ "build": "next build", "start": "next start", "lint": "eslint . --ext js,jsx,ts,tsx,md,mdx", - "postinstall": "prisma generate --no-engine" + "postinstall": "prisma generate" }, "dependencies": { "@giscus/react": "^2.3.0", "@hcaptcha/react-hcaptcha": "^1.8.1", "@novnc/novnc": "1.4.0", "@octokit/graphql": "^7.0.2", - "@octokit/graphql-schema": "^14.33.1", + "@octokit/graphql-schema": "^14.34.0", "@prisma/client": "^5.4.1", - "@prisma/extension-accelerate": "^0.6.2", "@react-spring/web": "^9.7.3", "@stitches/react": "1.3.1-1", "@vercel/edge": "^1.1.0", @@ -66,7 +65,6 @@ "remark-rehype": "^10.1.0", "remark-smartypants": "^2.0.0", "remark-unwrap-images": "^3.0.1", - "remove-markdown": "^0.5.0", "sitemap": "^7.1.1", "stitches-normalize": "^3.0.1", "swr": "^2.2.4", @@ -79,14 +77,13 @@ "@types/novnc__novnc": "^1.3.2", "@types/prop-types": "^15.7.8", "@types/react": "^18.2.25", - "@types/react-dom": "^18.2.10", + "@types/react-dom": "^18.2.11", "@types/react-is": "^18.2.2", - "@types/remove-markdown": "^0.3.2", "@types/uglify-js": "^3.17.2", "@typescript-eslint/eslint-plugin": "^6.7.4", "@typescript-eslint/parser": "^6.7.4", "cross-env": "^7.0.3", - "eslint": "~8.50.0", + "eslint": "~8.51.0", "eslint-config-next": "13.5.4", "eslint-config-prettier": "~9.0.0", "eslint-plugin-mdx": "~2.2.0", diff --git a/pages/api/count.ts b/pages/api/count.ts index 78267a90..352ec987 100644 --- a/pages/api/count.ts +++ b/pages/api/count.ts @@ -1,33 +1,16 @@ -import { NextResponse } from "next/server"; import { prisma } from "../../lib/helpers/prisma"; -import type { NextRequest } from "next/server"; +import type { NextApiHandler } from "next"; import type { PageStats } from "../../types"; -export const config = { - runtime: "edge", - regions: ["iad1"], // the vercel postgres database lives in DC -}; +const handler: NextApiHandler = async (req, res) => { + const { slug } = req.query; -// eslint-disable-next-line import/no-anonymous-default-export -export default async (req: NextRequest) => { - const slug = req.nextUrl.searchParams.get("slug"); - - if (!slug) { - return NextResponse.json({ message: "Missing `slug` parameter." }, { status: 400 }); + if (typeof slug !== "string" || slug === "") { + // @ts-expect-error + return res.status(400).json({ message: "Missing `slug` parameter." }); } - // add one to this page's count and return the new number - return NextResponse.json(await incrementPageHits(slug), { - status: 200, - headers: { - // disable caching on both ends. see: - // https://vercel.com/docs/concepts/functions/edge-functions/edge-caching - "Cache-Control": "private, no-cache, no-store, must-revalidate", - }, - }); -}; - -const incrementPageHits = async (slug: string): Promise => { + // +1 hit! const { hits } = await prisma.hits.upsert({ where: { slug }, create: { slug }, @@ -38,6 +21,12 @@ const incrementPageHits = async (slug: string): Promise => { }, }); - // send client the *new* hit count - return { hits }; + // disable caching on both ends. see: + // https://vercel.com/docs/concepts/functions/edge-functions/edge-caching + res.setHeader("Cache-Control", "private, no-cache, no-store, must-revalidate"); + + // add one to this page's count and return the new number + return res.status(200).json({ hits }); }; + +export default handler; diff --git a/pages/api/hits.ts b/pages/api/hits.ts index fc63cadd..e48d808f 100644 --- a/pages/api/hits.ts +++ b/pages/api/hits.ts @@ -1,23 +1,15 @@ import { prisma } from "../../lib/helpers/prisma"; -import { NextResponse } from "next/server"; +import type { NextApiHandler } from "next"; +import type { SiteStats } from "../../types"; -export const config = { - runtime: "edge", - regions: ["iad1"], // the vercel postgres database lives in DC -}; - -// eslint-disable-next-line import/no-anonymous-default-export -export default async () => { - // simultaneously fetch the entire hits db and notes from the filesystem +const handler: NextApiHandler = async (req, res) => { + // fetch all rows from db sorted by most hits const pages = await prisma.hits.findMany({ orderBy: [ { hits: "desc", }, ], - // cache db results for 5 minutes. prisma accelerate only: - // https://www.prisma.io/docs/data-platform/accelerate/concepts#cache-strategies - cacheStrategy: { swr: 300, ttl: 60 }, }); const total = { hits: 0 }; @@ -28,5 +20,10 @@ export default async () => { total.hits += page.hits; }); - return NextResponse.json({ total, pages }, { status: 200 }); + // let Vercel edge cache results for 15 mins + res.setHeader("Cache-Control", "public, max-age=0, s-maxage=900, stale-while-revalidate"); + + return res.status(200).json({ total, pages }); }; + +export default handler; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 079167ab..75f7e0a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,14 +18,11 @@ dependencies: specifier: ^7.0.2 version: 7.0.2 '@octokit/graphql-schema': - specifier: ^14.33.1 - version: 14.33.1 + specifier: ^14.34.0 + version: 14.34.0 '@prisma/client': specifier: ^5.4.1 version: 5.4.1(prisma@5.4.1) - '@prisma/extension-accelerate': - specifier: ^0.6.2 - version: 0.6.2(@prisma/client@5.4.1) '@react-spring/web': specifier: ^9.7.3 version: 9.7.3(react-dom@18.2.0)(react@18.2.0) @@ -149,9 +146,6 @@ dependencies: remark-unwrap-images: specifier: ^3.0.1 version: 3.0.1 - remove-markdown: - specifier: ^0.5.0 - version: 0.5.0 sitemap: specifier: ^7.1.1 version: 7.1.1 @@ -173,13 +167,13 @@ optionalDependencies: devDependencies: '@jakejarvis/eslint-config': specifier: ^3.1.0 - version: 3.1.0(eslint@8.50.0) + version: 3.1.0(eslint@8.51.0) '@types/comma-number': specifier: ^2.1.0 version: 2.1.0 '@types/node': specifier: ^18.17.14 - version: 18.18.3 + version: 18.18.4 '@types/novnc__novnc': specifier: ^1.3.2 version: 1.3.2 @@ -190,41 +184,38 @@ devDependencies: specifier: ^18.2.25 version: 18.2.25 '@types/react-dom': - specifier: ^18.2.10 - version: 18.2.10 + specifier: ^18.2.11 + version: 18.2.11 '@types/react-is': specifier: ^18.2.2 version: 18.2.2 - '@types/remove-markdown': - specifier: ^0.3.2 - version: 0.3.2 '@types/uglify-js': specifier: ^3.17.2 version: 3.17.2 '@typescript-eslint/eslint-plugin': specifier: ^6.7.4 - version: 6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.50.0)(typescript@5.2.2) + version: 6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^6.7.4 - version: 6.7.4(eslint@8.50.0)(typescript@5.2.2) + version: 6.7.4(eslint@8.51.0)(typescript@5.2.2) cross-env: specifier: ^7.0.3 version: 7.0.3 eslint: - specifier: ~8.50.0 - version: 8.50.0 + specifier: ~8.51.0 + version: 8.51.0 eslint-config-next: specifier: 13.5.4 - version: 13.5.4(eslint@8.50.0)(typescript@5.2.2) + version: 13.5.4(eslint@8.51.0)(typescript@5.2.2) eslint-config-prettier: specifier: ~9.0.0 - version: 9.0.0(eslint@8.50.0) + version: 9.0.0(eslint@8.51.0) eslint-plugin-mdx: specifier: ~2.2.0 - version: 2.2.0(eslint@8.50.0) + version: 2.2.0(eslint@8.51.0) eslint-plugin-prettier: specifier: ~5.0.0 - version: 5.0.0(eslint-config-prettier@9.0.0)(eslint@8.50.0)(prettier@3.0.3) + version: 5.0.0(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3) lint-staged: specifier: ^14.0.1 version: 14.0.1 @@ -279,13 +270,13 @@ packages: dependencies: regenerator-runtime: 0.14.0 - /@eslint-community/eslint-utils@4.4.0(eslint@8.50.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.51.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.50.0 + eslint: 8.51.0 eslint-visitor-keys: 3.4.3 dev: true @@ -301,7 +292,7 @@ packages: ajv: 6.12.6 debug: 4.3.4 espree: 9.6.1 - globals: 13.22.0 + globals: 13.23.0 ignore: 5.2.4 import-fresh: 3.3.0 js-yaml: 4.1.0 @@ -311,8 +302,8 @@ packages: - supports-color dev: true - /@eslint/js@8.50.0: - resolution: {integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==} + /@eslint/js@8.51.0: + resolution: {integrity: sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -370,12 +361,12 @@ packages: wrap-ansi-cjs: /wrap-ansi@7.0.0 dev: true - /@jakejarvis/eslint-config@3.1.0(eslint@8.50.0): + /@jakejarvis/eslint-config@3.1.0(eslint@8.51.0): resolution: {integrity: sha512-H9kFtFjqwj0fjsztLUDbsz6mR6SMQ1qRtOPL/sAGrToMJxD5Kq1CEPwxZ6TiGT9h1gQpzqVVk496rtYi/QcqJw==} peerDependencies: eslint: ^7 || >=8 dependencies: - eslint: 8.50.0 + eslint: 8.51.0 dev: true /@lit-labs/ssr-dom-shim@1.1.1: @@ -541,12 +532,12 @@ packages: resolution: {integrity: sha512-kW6ALMc5BuH08e/ond/I1naYcfjc19JYMN1EdtmgjjjzPGCjW8fMtVM3MwM6q7YLRjPlQ3orEvoKMgSS7RkEVQ==} dev: false - /@npmcli/config@6.3.0: - resolution: {integrity: sha512-gV64pm5cQ7F2oeoSJ5HTfaKxjFsvC4dAbCsQbtbOkEOymM6iZI62yNGCOLjcq/rfYX9+wVn34ThxK7GZpUwWFg==} + /@npmcli/config@6.4.0: + resolution: {integrity: sha512-/fQjIbuNVIT/PbXvw178Tm97bxV0E0nVUFKHivMKtSI2pcs8xKdaWkHJxf9dTI0G/y5hp/KuCvgcUu5HwAtI1w==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} dependencies: '@npmcli/map-workspaces': 3.0.4 - ci-info: 3.8.0 + ci-info: 3.9.0 ini: 4.1.1 nopt: 7.2.0 proc-log: 3.0.0 @@ -579,8 +570,8 @@ packages: universal-user-agent: 6.0.0 dev: false - /@octokit/graphql-schema@14.33.1: - resolution: {integrity: sha512-PPWDlxT5UUtmy0cTfVEsLXhyX/EQZh6ve+5j3oJQSZ5klhJMDl1ZtVrB6v163bbkdLsoDZBdHeBJKvDBvFXadQ==} + /@octokit/graphql-schema@14.34.0: + resolution: {integrity: sha512-uMqWDCnDbR7cuTlZZ0hDv14W8NftDcZoVxJidAm8QCqo7d7RaLWlDSf6x52P7Tw3tS4QySkbl0NpDySOnZPwJw==} dependencies: graphql: 16.8.1 graphql-tag: 2.12.6(graphql@16.8.1) @@ -590,7 +581,7 @@ packages: resolution: {integrity: sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==} engines: {node: '>= 18'} dependencies: - '@octokit/request': 8.1.2 + '@octokit/request': 8.1.3 '@octokit/types': 12.0.0 universal-user-agent: 6.0.0 dev: false @@ -608,8 +599,8 @@ packages: once: 1.4.0 dev: false - /@octokit/request@8.1.2: - resolution: {integrity: sha512-A0RJJfzjlZQwb+39eDm5UM23dkxbp28WEG4p2ueH+Q2yY4p349aRK/vcUlEuIB//ggcrHJceoYYkBP/LYCoXEg==} + /@octokit/request@8.1.3: + resolution: {integrity: sha512-iUvXP4QmysS8kyE/a4AGwR0A+tHDVxgW6TmPd2ci8/Xc8KjlBtTKSDpZlUT5Y4S4Nu+eM8LvbOYjVAp/sz3Gpg==} engines: {node: '>= 18'} dependencies: '@octokit/endpoint': 9.0.1 @@ -666,15 +657,6 @@ packages: resolution: {integrity: sha512-vJTdY4la/5V3N7SFvWRmSMUh4mIQnyb/MNoDjzVbh9iLmEC+uEykj/1GPviVsorvfz7DbYSQC4RiwmlEpTEvGA==} requiresBuild: true - /@prisma/extension-accelerate@0.6.2(@prisma/client@5.4.1): - resolution: {integrity: sha512-KIBVPeWt8qaSg7wQ+TXmCVeUDoW75whtXcdS9dbHxRoO2OWFH5I9+qbkHBhx5Wj/h1wQpS8usuxGnsZqiBjUpQ==} - engines: {node: '>=16'} - peerDependencies: - '@prisma/client': '>=4.16.1' - dependencies: - '@prisma/client': 5.4.1(prisma@5.4.1) - dev: false - /@react-spring/animated@9.7.3(react@18.2.0): resolution: {integrity: sha512-5CWeNJt9pNgyvuSzQH+uy2pvTg8Y4/OisoscZIR8/ZNLIOI+CatFBhGZpDGTF/OzdNFsAoGk3wiUYTwoJ0YIvw==} peerDependencies: @@ -741,6 +723,12 @@ packages: tslib: 2.6.2 dev: false + /@swc/helpers@0.5.3: + resolution: {integrity: sha512-FaruWX6KdudYloq1AHD/4nU+UsMTdNE8CKyrseXWEcgjDAbvkwJg2QGPAnfIJLIWsjZOSPLOAykK6fuYp4vp4A==} + dependencies: + tslib: 2.6.2 + dev: false + /@types/acorn@4.0.6: resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} dependencies: @@ -753,7 +741,7 @@ packages: /@types/concat-stream@2.0.0: resolution: {integrity: sha512-t3YCerNM7NTVjLuICZo5gYAXYoDvpuuTceCcFQWcDQz26kxUR5uIWolxbIR5jRNIXpMqhOpW/b8imCR1LEmuJw==} dependencies: - '@types/node': 18.18.3 + '@types/node': 18.18.4 dev: true /@types/debug@4.1.9: @@ -819,8 +807,8 @@ packages: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: false - /@types/node@18.18.3: - resolution: {integrity: sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==} + /@types/node@18.18.4: + resolution: {integrity: sha512-t3rNFBgJRugIhackit2mVcLfF6IRc0JE4oeizPQL8Zrm8n2WY/0wOdpOPhdtG0V9Q2TlW/axbF1MJ6z+Yj/kKQ==} /@types/novnc__novnc@1.3.2: resolution: {integrity: sha512-3xZmiuSUjoh1LMBusrN2MFlMpQFDelX5M7nabF1kHfEn7/izUx98Gce2k4/7VsN5j0duqEvc2i5zXxlugdRp4g==} @@ -833,7 +821,7 @@ packages: /@types/pg@8.6.6: resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==} dependencies: - '@types/node': 18.18.3 + '@types/node': 18.18.4 pg-protocol: 1.6.0 pg-types: 2.2.0 dev: false @@ -845,8 +833,8 @@ packages: /@types/prop-types@15.7.8: resolution: {integrity: sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==} - /@types/react-dom@18.2.10: - resolution: {integrity: sha512-5VEC5RgXIk1HHdyN1pHlg0cOqnxHzvPGpMMyGAP5qSaDRmyZNDaQ0kkVAkK6NYlDhP6YBID3llaXlmAS/mdgCA==} + /@types/react-dom@18.2.11: + resolution: {integrity: sha512-zq6Dy0EiCuF9pWFW6I6k6W2LdpUixLE4P6XjXU1QHLfak3GPACQfLwEuHzY5pOYa4hzj1d0GxX/P141aFjZsyg==} dependencies: '@types/react': 18.2.25 dev: true @@ -864,14 +852,10 @@ packages: '@types/scheduler': 0.16.4 csstype: 3.1.2 - /@types/remove-markdown@0.3.2: - resolution: {integrity: sha512-XlpidYPjaOU6Te0Sfw8xfMudk3k8i8MQsTBw9JZ9MPuTRpqP4mYc2PWibr5T5VAdxEVbd++qXkCGuNVtNype8g==} - dev: true - /@types/sax@1.2.5: resolution: {integrity: sha512-9jWta97bBVC027/MShr3gLab8gPhKy4l6qpb+UJLF5pDm3501NvA7uvqVCW+REFtx00oTi6Cq9JzLwgq6evVgw==} dependencies: - '@types/node': 18.18.3 + '@types/node': 18.18.4 dev: false /@types/scheduler@0.16.4: @@ -898,7 +882,7 @@ packages: /@types/unist@2.0.8: resolution: {integrity: sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==} - /@typescript-eslint/eslint-plugin@6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.50.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@6.7.4(@typescript-eslint/parser@6.7.4)(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-DAbgDXwtX+pDkAHwiGhqP3zWUGpW49B7eqmgpPtg+BKJXwdct79ut9+ifqOFPJGClGKSHXn2PTBatCnldJRUoA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -910,13 +894,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 6.7.4 - '@typescript-eslint/type-utils': 6.7.4(eslint@8.50.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.7.4(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 6.7.4(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.4(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.7.4 debug: 4.3.4 - eslint: 8.50.0 + eslint: 8.51.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 @@ -927,7 +911,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.7.4(eslint@8.50.0)(typescript@5.2.2): + /@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: @@ -942,7 +926,7 @@ packages: '@typescript-eslint/typescript-estree': 6.7.4(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.7.4 debug: 4.3.4 - eslint: 8.50.0 + eslint: 8.51.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -956,7 +940,7 @@ packages: '@typescript-eslint/visitor-keys': 6.7.4 dev: true - /@typescript-eslint/type-utils@6.7.4(eslint@8.50.0)(typescript@5.2.2): + /@typescript-eslint/type-utils@6.7.4(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-n+g3zi1QzpcAdHFP9KQF+rEFxMb2KxtnJGID3teA/nxKHOVi3ylKovaqEzGBbVY2pBttU6z85gp0D00ufLzViQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -967,9 +951,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 6.7.4(typescript@5.2.2) - '@typescript-eslint/utils': 6.7.4(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.4(eslint@8.51.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.50.0 + eslint: 8.51.0 ts-api-utils: 1.0.3(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -1002,19 +986,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.7.4(eslint@8.50.0)(typescript@5.2.2): + /@typescript-eslint/utils@6.7.4(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-PRQAs+HUn85Qdk+khAxsVV+oULy3VkbH3hQ8hxLRJXWBEd7iI+GbQxH5SEUSH7kbEoTp6oT1bOwyga24ELALTA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) '@types/json-schema': 7.0.13 '@types/semver': 7.5.3 '@typescript-eslint/scope-manager': 6.7.4 '@typescript-eslint/types': 6.7.4 '@typescript-eslint/typescript-estree': 6.7.4(typescript@5.2.2) - eslint: 8.50.0 + eslint: 8.51.0 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -1343,8 +1327,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001543: - resolution: {integrity: sha512-qxdO8KPWPQ+Zk6bvNpPeQIOH47qZSYdFZd6dXQzb2KzhnSXju4Kd7H1PkSJx6NICSMgo/IhRZRhhfPTHYpJUCA==} + /caniuse-lite@1.0.30001546: + resolution: {integrity: sha512-zvtSJwuQFpewSyRrI3AsftF6rM0X80mZkChIt1spBGEvRglCrjTniXvinc8JKRoqTwXAgvqTImaN9igfSMtUBw==} dev: false /ccount@2.0.1: @@ -1402,8 +1386,8 @@ packages: dev: false optional: true - /ci-info@3.8.0: - resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} + /ci-info@3.9.0: + resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} dev: true @@ -1734,7 +1718,7 @@ packages: get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 - has: 1.0.3 + has: 1.0.4 has-property-descriptors: 1.0.0 has-proto: 1.0.1 has-symbols: 1.0.3 @@ -1788,14 +1772,14 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 - has: 1.0.3 + has: 1.0.4 has-tostringtag: 1.0.0 dev: true /es-shim-unscopables@1.0.0: resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} dependencies: - has: 1.0.3 + has: 1.0.4 dev: true /es-to-primitive@1.2.1: @@ -1822,7 +1806,7 @@ packages: engines: {node: '>=12'} dev: false - /eslint-config-next@13.5.4(eslint@8.50.0)(typescript@5.2.2): + /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 @@ -1833,27 +1817,27 @@ packages: dependencies: '@next/eslint-plugin-next': 13.5.4 '@rushstack/eslint-patch': 1.5.1 - '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@5.2.2) - eslint: 8.50.0 + '@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.7.4)(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.28.1)(eslint@8.50.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.50.0) - eslint-plugin-react: 7.33.2(eslint@8.50.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.50.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) typescript: 5.2.2 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color dev: true - /eslint-config-prettier@9.0.0(eslint@8.50.0): + /eslint-config-prettier@9.0.0(eslint@8.51.0): resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.50.0 + eslint: 8.51.0 dev: true /eslint-import-resolver-node@0.3.9: @@ -1866,7 +1850,7 @@ packages: - supports-color dev: true - /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.50.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: @@ -1875,9 +1859,9 @@ packages: dependencies: debug: 4.3.4 enhanced-resolve: 5.15.0 - eslint: 8.50.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.50.0) - eslint-plugin-import: 2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.0) + 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 @@ -1889,7 +1873,7 @@ packages: - supports-color dev: true - /eslint-mdx@2.2.0(eslint@8.50.0): + /eslint-mdx@2.2.0(eslint@8.51.0): resolution: {integrity: sha512-AriN6lCW6KhWQ9GEiXapR1DokKHefOUqKvCmHxnE9puCWYhWiycU2SNKH8jmrasDBreZ+RtJDLi+RcUNLJatjg==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: @@ -1897,7 +1881,7 @@ packages: dependencies: acorn: 8.10.0 acorn-jsx: 5.3.2(acorn@8.10.0) - eslint: 8.50.0 + eslint: 8.51.0 espree: 9.6.1 estree-util-visit: 1.2.1 remark-mdx: 2.3.0 @@ -1914,7 +1898,7 @@ packages: - supports-color dev: true - /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.50.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: @@ -1935,16 +1919,16 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.7.4(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.7.4(eslint@8.51.0)(typescript@5.2.2) debug: 3.2.7 - eslint: 8.50.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.50.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) transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.28.1(@typescript-eslint/parser@6.7.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.50.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: @@ -1954,17 +1938,17 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.7.4(eslint@8.50.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 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.50.0 + eslint: 8.51.0 eslint-import-resolver-node: 0.3.9 - 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.50.0) - has: 1.0.3 + 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 minimatch: 3.1.2 @@ -1979,7 +1963,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.50.0): + /eslint-plugin-jsx-a11y@6.7.1(eslint@8.51.0): resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} engines: {node: '>=4.0'} peerDependencies: @@ -1994,8 +1978,8 @@ packages: axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.50.0 - has: 1.0.3 + eslint: 8.51.0 + has: 1.0.4 jsx-ast-utils: 3.3.5 language-tags: 1.0.5 minimatch: 3.1.2 @@ -2004,27 +1988,27 @@ packages: semver: 6.3.1 dev: true - /eslint-plugin-markdown@3.0.1(eslint@8.50.0): + /eslint-plugin-markdown@3.0.1(eslint@8.51.0): resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.50.0 + eslint: 8.51.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-mdx@2.2.0(eslint@8.50.0): + /eslint-plugin-mdx@2.2.0(eslint@8.51.0): resolution: {integrity: sha512-OseoMXUIr8iy3E0me+wJLVAxuB0kxHP1plxuYAJDynzorzOj2OKv8Fhr+rIOJ32zfl3bnEWsqFnUiCnyznr1JQ==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8.0.0' dependencies: - eslint: 8.50.0 - eslint-mdx: 2.2.0(eslint@8.50.0) - eslint-plugin-markdown: 3.0.1(eslint@8.50.0) + eslint: 8.51.0 + eslint-mdx: 2.2.0(eslint@8.51.0) + eslint-plugin-markdown: 3.0.1(eslint@8.51.0) remark-mdx: 2.3.0 remark-parse: 10.0.2 remark-stringify: 10.0.3 @@ -2035,7 +2019,7 @@ packages: - supports-color dev: true - /eslint-plugin-prettier@5.0.0(eslint-config-prettier@9.0.0)(eslint@8.50.0)(prettier@3.0.3): + /eslint-plugin-prettier@5.0.0(eslint-config-prettier@9.0.0)(eslint@8.51.0)(prettier@3.0.3): resolution: {integrity: sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: @@ -2049,23 +2033,23 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.50.0 - eslint-config-prettier: 9.0.0(eslint@8.50.0) + eslint: 8.51.0 + eslint-config-prettier: 9.0.0(eslint@8.51.0) prettier: 3.0.3 prettier-linter-helpers: 1.0.0 synckit: 0.8.5 dev: true - /eslint-plugin-react-hooks@4.6.0(eslint@8.50.0): + /eslint-plugin-react-hooks@4.6.0(eslint@8.51.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.50.0 + eslint: 8.51.0 dev: true - /eslint-plugin-react@7.33.2(eslint@8.50.0): + /eslint-plugin-react@7.33.2(eslint@8.51.0): resolution: {integrity: sha512-73QQMKALArI8/7xGLNI/3LylrEYrlKZSb5C9+q3OtOewTnMQi5cT+aE9E41sLCmli3I9PGGmD1yiZydyo4FEPw==} engines: {node: '>=4'} peerDependencies: @@ -2076,7 +2060,7 @@ packages: array.prototype.tosorted: 1.1.2 doctrine: 2.1.0 es-iterator-helpers: 1.0.15 - eslint: 8.50.0 + eslint: 8.51.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -2103,15 +2087,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.50.0: - resolution: {integrity: sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==} + /eslint@8.51.0: + resolution: {integrity: sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) '@eslint-community/regexpp': 4.9.1 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.50.0 + '@eslint/js': 8.51.0 '@humanwhocodes/config-array': 0.11.11 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -2130,7 +2114,7 @@ packages: file-entry-cache: 6.0.1 find-up: 5.0.0 glob-parent: 6.0.2 - globals: 13.22.0 + globals: 13.23.0 graphemer: 1.4.0 ignore: 5.2.4 imurmurhash: 0.1.4 @@ -2334,7 +2318,7 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.1.0 + flat-cache: 3.1.1 dev: true /fill-range@7.0.1: @@ -2356,12 +2340,12 @@ packages: path-exists: 4.0.0 dev: true - /flat-cache@3.1.0: - resolution: {integrity: sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==} + /flat-cache@3.1.1: + resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} engines: {node: '>=12.0.0'} dependencies: flatted: 3.2.9 - keyv: 4.5.3 + keyv: 4.5.4 rimraf: 3.0.2 dev: true @@ -2436,7 +2420,7 @@ packages: resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} dependencies: function-bind: 1.1.1 - has: 1.0.3 + has: 1.0.4 has-proto: 1.0.1 has-symbols: 1.0.3 dev: true @@ -2538,8 +2522,8 @@ packages: once: 1.4.0 dev: true - /globals@13.22.0: - resolution: {integrity: sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==} + /globals@13.23.0: + resolution: {integrity: sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==} engines: {node: '>=8'} dependencies: type-fest: 0.20.2 @@ -2639,11 +2623,9 @@ packages: has-symbols: 1.0.3 dev: true - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + /has@1.0.4: + resolution: {integrity: sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==} engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 dev: true /hast-util-from-parse5@7.1.2: @@ -2843,7 +2825,7 @@ packages: engines: {node: '>= 0.4'} dependencies: get-intrinsic: 1.2.1 - has: 1.0.3 + has: 1.0.4 side-channel: 1.0.4 dev: true @@ -2918,7 +2900,7 @@ packages: /is-core-module@2.13.0: resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: - has: 1.0.3 + has: 1.0.4 dev: true /is-date-object@1.0.5: @@ -3199,8 +3181,8 @@ packages: object.values: 1.1.7 dev: true - /keyv@4.5.3: - resolution: {integrity: sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==} + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} dependencies: json-buffer: 3.0.1 dev: true @@ -3304,7 +3286,7 @@ packages: /load-plugin@5.1.0: resolution: {integrity: sha512-Lg1CZa1CFj2CbNaxijTL6PCbzd4qGTlZov+iH2p5Xwy/ApcZJh+i6jMN2cYePouTfjJfrNu3nXFdEw8LvbjPFQ==} dependencies: - '@npmcli/config': 6.3.0 + '@npmcli/config': 6.4.0 import-meta-resolve: 2.2.2 dev: true @@ -4023,7 +4005,7 @@ packages: '@next/env': 13.5.4 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001543 + caniuse-lite: 1.0.30001546 postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) @@ -4616,7 +4598,7 @@ packages: react: '>= 18.0.0' react-dom: '>= 18.0.0' dependencies: - '@swc/helpers': 0.5.2 + '@swc/helpers': 0.5.3 clsx: 1.2.1 date-fns: 2.30.0 react: 18.2.0 @@ -4791,10 +4773,6 @@ packages: unist-util-visit: 4.1.2 dev: false - /remove-markdown@0.5.0: - resolution: {integrity: sha512-x917M80K97K5IN1L8lUvFehsfhR8cYjGQ/yAMRI9E7JIKivtl5Emo5iD13DhMr+VojzMCiYk8V2byNPwT/oapg==} - dev: false - /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -4910,7 +4888,6 @@ packages: /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - requiresBuild: true /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} @@ -5176,7 +5153,6 @@ packages: /string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - requiresBuild: true dependencies: safe-buffer: 5.2.1 @@ -5507,7 +5483,7 @@ packages: '@types/concat-stream': 2.0.0 '@types/debug': 4.1.9 '@types/is-empty': 1.2.1 - '@types/node': 18.18.3 + '@types/node': 18.18.4 '@types/unist': 2.0.8 concat-stream: 2.0.0 debug: 4.3.4 @@ -5686,7 +5662,6 @@ packages: /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - requiresBuild: true /uvu@0.5.6: resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} diff --git a/prisma/schema.prisma b/prisma/schema.prisma index ac30e36c..403283c6 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -4,7 +4,7 @@ generator client { datasource db { provider = "postgresql" - url = env("DATABASE_URL") + url = env("POSTGRES_PRISMA_URL") directUrl = env("POSTGRES_URL_NON_POOLING") } diff --git a/types/stats.d.ts b/types/stats.d.ts index 509ee076..6a3ac927 100644 --- a/types/stats.d.ts +++ b/types/stats.d.ts @@ -1,15 +1,10 @@ -import type { NoteFrontMatter } from "./note"; +// a silly file, but this ensures that /api/count returns exactly what expects. -export type PageStats = { - hits: number; -}; +import type { hits as Hits } from "@prisma/client"; -export type DetailedPageStats = PageStats & - Pick & { - url: string; - }; +export type PageStats = Pick; export type SiteStats = { total: PageStats; - pages: DetailedPageStats[]; + pages: Hits[]; };