1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-06-26 23:45:57 -04:00

add typings to pages/api/hits.ts

This commit is contained in:
2022-02-10 19:56:26 -05:00
parent d598f5023f
commit 3f08782cab
6 changed files with 152 additions and 141 deletions
+1 -3
View File
@@ -13,9 +13,7 @@ import { NOTES_DIR, baseUrl } from "./config";
// remark/rehype markdown plugins // remark/rehype markdown plugins
import remarkGfm from "remark-gfm"; import remarkGfm from "remark-gfm";
import rehypeSlug from "rehype-slug"; import rehypeSlug from "rehype-slug";
// note: 'common' only exports these languages: https://github.com/wooorm/refractor/blob/main/lib/common.js import rehypePrism from "rehype-prism-plus";
// eslint-disable-next-line import/no-unresolved
import rehypePrism from "rehype-prism-plus/common";
import type { MinifyOptions } from "terser"; import type { MinifyOptions } from "terser";
import type { NoteMetaType, NoteType } from "../types"; import type { NoteMetaType, NoteType } from "../types";
+2 -2
View File
@@ -47,7 +47,7 @@
"is-absolute-url": "^4.0.1", "is-absolute-url": "^4.0.1",
"markdown-to-jsx": "^7.1.6", "markdown-to-jsx": "^7.1.6",
"modern-normalize": "^1.1.0", "modern-normalize": "^1.1.0",
"next": "12.0.11-canary.11", "next": "12.0.11-canary.12",
"next-compose-plugins": "^2.2.1", "next-compose-plugins": "^2.2.1",
"next-mdx-remote": "4.0.0-rc.1", "next-mdx-remote": "4.0.0-rc.1",
"next-seo": "^5.1.0", "next-seo": "^5.1.0",
@@ -104,7 +104,7 @@
"postcss-preset-env": "^7.3.1", "postcss-preset-env": "^7.3.1",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"simple-git-hooks": "^2.7.0", "simple-git-hooks": "^2.7.0",
"stylelint": "~14.4.0", "stylelint": "~14.5.0",
"stylelint-config-prettier": "~9.0.3", "stylelint-config-prettier": "~9.0.3",
"stylelint-prettier": "~2.0.0", "stylelint-prettier": "~2.0.0",
"typescript": "^4.5.5" "typescript": "^4.5.5"
+5 -4
View File
@@ -24,7 +24,8 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
res.setHeader("Pragma", "no-cache"); res.setHeader("Pragma", "no-cache");
if (req.method !== "POST") { if (req.method !== "POST") {
return res.status(405).end(); // 405 Method Not Allowed // 405 Method Not Allowed
return res.status(405).end();
} }
const { body } = req; const { body } = req;
@@ -52,7 +53,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
throw new Error("AIRTABLE_API_ERROR"); throw new Error("AIRTABLE_API_ERROR");
} }
// return in JSON format // success! let the client know
return res.status(200).json({ success: true }); return res.status(200).json({ success: true });
} catch (error) { } catch (error) {
console.error(error); console.error(error);
@@ -84,9 +85,9 @@ const validateCaptcha = async (formResponse) => {
}), }),
}); });
const result = await response.json(); // eslint-disable-next-line @typescript-eslint/no-explicit-any
const result: any = await response.json();
// @ts-ignore
return result.success; return result.success;
}; };
+52 -29
View File
@@ -1,8 +1,7 @@
import * as Sentry from "@sentry/node"; import * as Sentry from "@sentry/node";
import { getAllNotes } from "../../lib/parse-notes";
import pRetry from "p-retry"; import pRetry from "p-retry";
import faunadb from "faunadb"; import faunadb from "faunadb";
const q = faunadb.query; import { getAllNotes } from "../../lib/parse-notes";
import type { NextApiRequest, NextApiResponse } from "next"; import type { NextApiRequest, NextApiResponse } from "next";
Sentry.init({ Sentry.init({
@@ -10,10 +9,19 @@ Sentry.init({
environment: process.env.NODE_ENV || process.env.VERCEL_ENV || process.env.NEXT_PUBLIC_VERCEL_ENV || "", environment: process.env.NODE_ENV || process.env.VERCEL_ENV || process.env.NEXT_PUBLIC_VERCEL_ENV || "",
}); });
type PageStats = {
slug: string;
hits: number;
title?: string;
url?: string;
date?: string;
};
const handler = async (req: NextApiRequest, res: NextApiResponse) => { const handler = async (req: NextApiRequest, res: NextApiResponse) => {
try { try {
if (req.method !== "GET") { if (req.method !== "GET") {
return res.status(405).end(); // 405 Method Not Allowed // 405 Method Not Allowed
return res.status(405).end();
} }
const client = new faunadb.Client({ const client = new faunadb.Client({
@@ -21,18 +29,11 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
checkNewVersion: false, // https://github.com/fauna/faunadb-js/pull/504 checkNewVersion: false, // https://github.com/fauna/faunadb-js/pull/504
}); });
const { slug } = req.query; const { slug } = req.query;
let result;
if (!slug || slug === "/") { if (slug) {
// return overall site stats if slug not specified
result = await getSiteStats(client);
// let Vercel edge cache results for 15 mins
res.setHeader("Cache-Control", "s-maxage=900, stale-while-revalidate");
} else {
// increment this page's hits. retry 3 times in case of Fauna "contended transaction" error: // increment this page's hits. retry 3 times in case of Fauna "contended transaction" error:
// https://sentry.io/share/issue/9c60a58211954ed7a8dfbe289bd107b5/ // https://sentry.io/share/issue/9c60a58211954ed7a8dfbe289bd107b5/
result = await pRetry(() => incrementPageHits(slug, client), { const pageStats = await pRetry(() => incrementPageHits(slug, client), {
onFailedAttempt: (error) => { onFailedAttempt: (error) => {
console.warn(`Attempt ${error.attemptNumber} failed, trying again...`); console.warn(`Attempt ${error.attemptNumber} failed, trying again...`);
}, },
@@ -42,9 +43,19 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
// disable caching on both ends // disable caching on both ends
res.setHeader("Cache-Control", "private, no-cache, no-store, must-revalidate"); res.setHeader("Cache-Control", "private, no-cache, no-store, must-revalidate");
res.setHeader("Pragma", "no-cache"); res.setHeader("Pragma", "no-cache");
}
return res.status(200).json(result); // return in JSON format
return res.status(200).json(pageStats);
} else {
// return overall site stats if slug not specified
const siteStats = await getSiteStats(client);
// let Vercel edge cache results for 15 mins
res.setHeader("Cache-Control", "s-maxage=900, stale-while-revalidate");
// return in JSON format
return res.status(200).json(siteStats);
}
} catch (error) { } catch (error) {
console.error(error); console.error(error);
@@ -59,10 +70,13 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
} }
}; };
const incrementPageHits = async (slug, client) => { const incrementPageHits = async (slug: string | string[], client: faunadb.Client) => {
const result = await client.query( const q = faunadb.query;
const result: { data: PageStats } = await client.query(
q.Let( q.Let(
{ match: q.Match(q.Index("hits_by_slug"), slug) }, {
match: q.Match(q.Index("hits_by_slug"), slug),
},
q.If( q.If(
q.Exists(q.Var("match")), q.Exists(q.Var("match")),
q.Let( q.Let(
@@ -70,9 +84,18 @@ const incrementPageHits = async (slug, client) => {
ref: q.Select("ref", q.Get(q.Var("match"))), ref: q.Select("ref", q.Get(q.Var("match"))),
hits: q.ToInteger(q.Select("hits", q.Select("data", q.Get(q.Var("match"))))), hits: q.ToInteger(q.Select("hits", q.Select("data", q.Get(q.Var("match"))))),
}, },
q.Update(q.Var("ref"), { data: { hits: q.Add(q.Var("hits"), 1) } }) q.Update(q.Var("ref"), {
data: {
hits: q.Add(q.Var("hits"), 1),
},
})
), ),
q.Create(q.Collection("hits"), { data: { slug, hits: 1 } }) q.Create(q.Collection("hits"), {
data: {
slug,
hits: 1,
},
})
) )
) )
); );
@@ -81,25 +104,25 @@ const incrementPageHits = async (slug, client) => {
return result.data; return result.data;
}; };
const getSiteStats = async (client) => { const getSiteStats = async (client: faunadb.Client) => {
const notes = getAllNotes(); const notes = getAllNotes();
const { data: pages } = await client.query( const q = faunadb.query;
const { data: pages }: { data: PageStats[] } = await client.query(
q.Map( q.Map(
q.Paginate(q.Documents(q.Collection("hits")), { size: 99 }), q.Paginate(q.Documents(q.Collection("hits")), { size: 99 }),
q.Lambda((x) => q.Select("data", q.Get(x))) q.Lambda((x) => q.Select("data", q.Get(x)))
) )
); );
const stats = { const siteStats = {
total: { hits: 0 }, total: { hits: 0 },
pages, pages,
}; };
// eslint-disable-next-line @typescript-eslint/no-explicit-any pages.map((page) => {
pages.map((page: any) => {
// match URLs from RSS feed with db to populate some metadata // match URLs from RSS feed with db to populate some metadata
// eslint-disable-next-line @typescript-eslint/no-explicit-any const match = notes.find((note) => `notes/${note.slug}` === page.slug);
const match: any = notes.find((note) => `notes/${note.slug}` === page.slug);
if (match) { if (match) {
page.title = match.title; page.title = match.title;
page.url = match.permalink; page.url = match.permalink;
@@ -107,15 +130,15 @@ const getSiteStats = async (client) => {
} }
// add these hits to running tally // add these hits to running tally
stats.total.hits += page.hits; siteStats.total.hits += page.hits;
return page; return page;
}); });
// sort by hits (descending) // sort by hits (descending)
stats.pages.sort((a, b) => (a.hits > b.hits ? -1 : 1)); siteStats.pages.sort((a, b) => (a.hits > b.hits ? -1 : 1));
return stats; return siteStats;
}; };
export default handler; export default handler;
+2 -1
View File
@@ -32,7 +32,8 @@ export const getServerSideProps: GetServerSideProps = async (context) => {
]; ];
// push notes separately and use their metadata // push notes separately and use their metadata
getAllNotes().map((note) => const notes = getAllNotes();
notes.map((note) =>
pages.push({ pages.push({
relUrl: `/notes/${note.slug}/`, relUrl: `/notes/${note.slug}/`,
// pull lastMod from front matter date // pull lastMod from front matter date
+90 -102
View File
@@ -1177,10 +1177,10 @@
dependencies: dependencies:
webpack-bundle-analyzer "4.3.0" webpack-bundle-analyzer "4.3.0"
"@next/env@12.0.11-canary.11": "@next/env@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.0.11-canary.11.tgz#73149540a5b3acc91db42073bb67671fad77662d" resolved "https://registry.yarnpkg.com/@next/env/-/env-12.0.11-canary.12.tgz#f606e1c1c69ff459cb508648333b621a49c84c4b"
integrity sha512-DAVIhMosbWK5gU01h2LjLFHK+TRHfIaaloOGzVkZiKcxB1BsHbTXMXKZuehPqdzxdE80zqdwdvCWZlAoud4j0g== integrity sha512-ilNufwwCQ9cAGoVrqqopdFRUQn3N772vVD4gn51Eof/cyChOSiMQZ2cjGdev2VoV6ZeJYJ9ccZf2asOs5wpbnQ==
"@next/eslint-plugin-next@12.0.10": "@next/eslint-plugin-next@12.0.10":
version "12.0.10" version "12.0.10"
@@ -1189,60 +1189,60 @@
dependencies: dependencies:
glob "7.1.7" glob "7.1.7"
"@next/swc-android-arm64@12.0.11-canary.11": "@next/swc-android-arm64@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.0.11-canary.11.tgz#30d0f80940a68fb1825ab4b1ce93507bc6edb457" resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.0.11-canary.12.tgz#1f8c316948c5ad798c58c5e45a88bb897270d9cd"
integrity sha512-oDLYehrMGyqni1GsfQxSSBRnr3CN+Itx6+3K2kovWIB7XzCnB7vw4zx9axRVSzajnxp1pacxNBM8bI6kxGQFuA== integrity sha512-iABj77NAq2d2W5ZYnPaYMm1R92nxaXPKvKCWXnrD/4w3pKc+n2FCXKrzyQhEnAoMmlecNPe55RG/u4ohLhkN1w==
"@next/swc-darwin-arm64@12.0.11-canary.11": "@next/swc-darwin-arm64@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.0.11-canary.11.tgz#3041c440dfd15fc85f87576920830ed2d6945dda" resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.0.11-canary.12.tgz#5f01c7f24f4f6442b77985504c108e65bcca6928"
integrity sha512-k/f+n+IaiOF8dzRlbWQLuOH0MDroIRXl8G7CNiet5PECb1eZgxuDLCX5HvDWtbP45IVlERr9BGGeYykRDtdJ7Q== integrity sha512-VDs1EZCXauf+Bs7eoQ/UT9xKmkH+tQdW4bSktPNF3AbzrFuaF16he1e87gyllx0g8FifKDSUrD8XInz8E+/Tzw==
"@next/swc-darwin-x64@12.0.11-canary.11": "@next/swc-darwin-x64@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.0.11-canary.11.tgz#726234abb3c47a24d9b83e842d9e2e0bc7242b00" resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.0.11-canary.12.tgz#f5863651a91fe91f9bea64f4700388401e08868e"
integrity sha512-nZnXrW/rtn0QcxIKcbAmfPKeh4QeXibJFK1G+nRgfF4wDCJAQ2ZR6Tts9kdixcE/kN4D1j5jHuGJeY7MK5nyVQ== integrity sha512-G9VVSnX5EjOQjt2kQHJfYEXhwWcSMsl1GjByBiQhaHgwdPMRSxpPq0JEnBfxnxqIrJytw94kqeymYV3B4JL9wA==
"@next/swc-linux-arm-gnueabihf@12.0.11-canary.11": "@next/swc-linux-arm-gnueabihf@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.0.11-canary.11.tgz#d6f0c1875fcb9afc780a2bdf0abdc918f37f7463" resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.0.11-canary.12.tgz#7c45a39dbb18c1f265cfb4dd7bec86ebc574b024"
integrity sha512-ymIaVeokz4apuqL2UIckF/8zkqLFp7A7vQXGMFF4BDzJc5FSe2tNKVvgE/fKpg/2fiu2OJ7y00vklLZqd7qyBQ== integrity sha512-jAjlNVS5ZM01HjeahGsl0qqq+xxlLNJhjS48Sruqh4aI4ADiFOQcOxLurnLmz2xDNOTEb9BQFd4rg2Wq035FYw==
"@next/swc-linux-arm64-gnu@12.0.11-canary.11": "@next/swc-linux-arm64-gnu@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.0.11-canary.11.tgz#f5578c423595ae65030af912b2e4b89166ac81b6" resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.0.11-canary.12.tgz#2ac90db029c74ba5f81493ee6d4ac1da870b8d8f"
integrity sha512-j8FGh0Z6xrLxP0oBQhr3hcCvm44jaJkjo7w7B1IF95ZmAN/rPbqoDfBa5RsUF5WuWzF83K1ZCxt9bMnMh9r9sQ== integrity sha512-8aNPCwT1PjAppQPWs9Dq4tvBiw2pbGxY9xhQ+Rk+yYMECFRZPPvcUpdIrf2CPQV8neU+X+ZDN4YV+DeoinOWOw==
"@next/swc-linux-arm64-musl@12.0.11-canary.11": "@next/swc-linux-arm64-musl@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.0.11-canary.11.tgz#e8decd2e477f8ce6e9969c89833b55fee00724fa" resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.0.11-canary.12.tgz#25b73c17ada82158f8d53ce2fd89684349dd5c0d"
integrity sha512-hcS3SAZjAO92W4LLQwSRqmJyZ8smbObes1+uAUKABySaup9qbJLwfyMMZhz8aZrAu2WX+WWwKvLsMqQlMzEIEA== integrity sha512-jNCP8jAr6VNS1oqDfief3ZeRtdbrBqZDx2Hz1guua151/+nLyxfZmoOHca/ftUUBSgBJ0XcXqAvwxNiyqt5HeQ==
"@next/swc-linux-x64-gnu@12.0.11-canary.11": "@next/swc-linux-x64-gnu@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.0.11-canary.11.tgz#a3351cdb42e856e6fc1ac110a02621c99e87fa8f" resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.0.11-canary.12.tgz#fb3aa0b69282bd17d88f0dee250616b498d77e6a"
integrity sha512-LcnG4JgI0YH4C2re9Od35baJRw5PZ+462PX+IhpzMd1iiDSICwDT1Zw+tZctREU1J6m28d+EeHS1E15KYrGFaA== integrity sha512-+pjNhxCvtbqdzteIFdwvywJUWKLCKYFDMOGE5TaCMsiFgHVjkQUmMdlTlyGAoQPz5pB2QSusa9PmflxMB+4S3w==
"@next/swc-linux-x64-musl@12.0.11-canary.11": "@next/swc-linux-x64-musl@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.0.11-canary.11.tgz#885016a148c16aa1e7312bc6272630de449cfb61" resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.0.11-canary.12.tgz#b97db86145baecdf5bd6fed9f3c5fca7d3ad05c3"
integrity sha512-IaNFJyYg4UIfZ4swC9+heXq2OXOwzilkWFt6Ej7B/7eF7hkeihlNqqFm0LXbcy6NxrGLo+ORiDxgKIY8nKaCNA== integrity sha512-yQmE6JKyF0tPHkl5Mf9cqWSIfqSreo1qYVMA/aaEnJGy+CfGLboQ4uJLx+QeE0/Hz7XHSpvwwmVKcVoYvue4rw==
"@next/swc-win32-arm64-msvc@12.0.11-canary.11": "@next/swc-win32-arm64-msvc@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.0.11-canary.11.tgz#11d09cac5f596992c5b723dc5853a4aa89e09e9b" resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.0.11-canary.12.tgz#731c408067d3da7027782dd095d6085c2f9b4005"
integrity sha512-6T5TcJr3uG6dVbQQtqxxV3wNuFQWV+OQHpCuRtB6Fvr00+im8w1CDDY3eu+wAvRgx40u+0cKVOSaTZE9VRRv8w== integrity sha512-wS43Kys8MVfSMkE9yXgoGucSmtVKPYZ6a6AupU81ZIG6XLLJHOnYlsDjfkwzNqhrGewck+qsI7tMF6Y8l6Y+mw==
"@next/swc-win32-ia32-msvc@12.0.11-canary.11": "@next/swc-win32-ia32-msvc@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.0.11-canary.11.tgz#0d666087549604374c30847102864622a9daa82d" resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.0.11-canary.12.tgz#df679789dadcfb99eb85bbf86a8108b8a6235113"
integrity sha512-lMBV+WK2TYmT4OYl33X45bLdPp/6SDCqUdxWWfZVFX5QR+BjMsdM7ORf24ZSpSQTm9EPqmSjT2q0uQ7oRGxcew== integrity sha512-BxKnP+woY1J7QU8A4Jrg9BirCSeIxq4BJIwhfHYTdRvLTLFvvTcWDTmWLS7JzR0gxYjstf8cfEoIv/20kGLzEw==
"@next/swc-win32-x64-msvc@12.0.11-canary.11": "@next/swc-win32-x64-msvc@12.0.11-canary.12":
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.0.11-canary.11.tgz#e8ec640685b4395bb46ab96143c3d0080824b3bf" resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.0.11-canary.12.tgz#4dfc6d7a937be9a471a38e1db0565ac8533e5383"
integrity sha512-mWW1JR83xTO22CGUiLexvuwM2Ez7G1/uXJwhfZ1rpc3kKVCeckapslR3i1x+k/dvjhd9lSomvGRbwP3+Zc+/IQ== integrity sha512-d4l3dLmiPQ/0JmhiFGMAsl4wm01GFogppcKba3aj09KStFFaEmxYZtMqSl6sIZAKauOVkhxDXgJer8Xn/Nyv4w==
"@nodelib/fs.scandir@2.1.5": "@nodelib/fs.scandir@2.1.5":
version "2.1.5" version "2.1.5"
@@ -1601,9 +1601,9 @@
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
"@types/node@*": "@types/node@*":
version "17.0.16" version "17.0.17"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.16.tgz#e3733f46797b9df9e853ca9f719c8a6f7b84cd26" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.17.tgz#a8ddf6e0c2341718d74ee3dc413a13a042c45a0c"
integrity sha512-ydLaGVfQOQ6hI1xK2A5nVh8bl0OGoIfYMxPWHqqYe9bTkWCfqiVvZoh2I/QF2sNSkZzZyROBoTefIEI+PB6iIA== integrity sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw==
"@types/normalize-package-data@^2.4.0": "@types/normalize-package-data@^2.4.0":
version "2.4.1" version "2.4.1"
@@ -2093,9 +2093,9 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001286, caniuse-lite@^1.0.30001297: caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001286, caniuse-lite@^1.0.30001297:
version "1.0.30001310" version "1.0.30001311"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001310.tgz#da02cd07432c9eece6992689d1b84ca18139eea8" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001311.tgz#682ef3f4e617f1a177ad943de59775ed3032e511"
integrity sha512-cb9xTV8k9HTIUA3GnPUJCk0meUnrHL5gy5QePfDjxHyNBcnzPzrHFv5GqfP7ue5b1ZyzZL0RJboD6hQlPXjhjg== integrity sha512-mleTFtFKfykEeW34EyfhGIFjGCqzhh38Y0LhdQ9aWF+HorZTtdgKV/1hEE0NlFkG2ubvisPV6l400tlbPys98A==
ccount@^1.0.0: ccount@^1.0.0:
version "1.1.0" version "1.1.0"
@@ -2421,9 +2421,9 @@ css-what@^5.1.0:
integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==
cssdb@^6.1.0: cssdb@^6.1.0:
version "6.2.0" version "6.2.1"
resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-6.2.0.tgz#dea14422e3084b9e2da54d439e310a46e9e36107" resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-6.2.1.tgz#8904c3f8005bfc334009ee20ddb201330d5a5199"
integrity sha512-OP1owHiK7IkCPSmNvWGMOEbfMcPZ8HA1TkzUXzB2SA708Y4pFGXWtLAVxds2QJI/0FA3mCNwRkEA9B4U4fW2Dw== integrity sha512-TBIhtDCOeYjwr44Vpl1g/224/18lI0jW+PKdA5ZP30dhre3eEutVUb2mnqUnpRPiPWQB7BQf8CWiUGOa966Fnw==
cssesc@^3.0.0: cssesc@^3.0.0:
version "3.0.0" version "3.0.0"
@@ -2607,9 +2607,9 @@ eastasianwidth@^0.2.0:
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
electron-to-chromium@^1.4.17: electron-to-chromium@^1.4.17:
version "1.4.67" version "1.4.68"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.67.tgz#699e59d6959d05f87865e12b3055bbcf492bbbee" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.68.tgz#d79447b6bd1bec9183f166bb33d4bef0d5e4e568"
integrity sha512-A6a2jEPLueEDfb7kvh7/E94RKKnIb01qL+4I7RFxtajmo+G9F5Ei7HgY5PRbQ4RDrh6DGDW66P0hD5XI2nRAcg== integrity sha512-cId+QwWrV8R1UawO6b9BR1hnkJ4EJPCPAr4h315vliHUtVUJDk39Sg1PMNnaWKfj5x+93ssjeJ9LKL6r8LaMiA==
emoji-regex@^8.0.0: emoji-regex@^8.0.0:
version "8.0.0" version "8.0.0"
@@ -3802,11 +3802,6 @@ is-symbol@^1.0.2, is-symbol@^1.0.3:
dependencies: dependencies:
has-symbols "^1.0.2" has-symbols "^1.0.2"
is-typedarray@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
is-weakref@^1.0.1: is-weakref@^1.0.1:
version "1.0.2" version "1.0.2"
resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2"
@@ -3987,16 +3982,16 @@ lint-staged@^12.3.3:
yaml "^1.10.2" yaml "^1.10.2"
listr2@^4.0.1: listr2@^4.0.1:
version "4.0.2" version "4.0.4"
resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.2.tgz#04d66f8c8694a14920d7df08ebe01568948fb500" resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.4.tgz#d098a1c419284fb26e184b5d5889b235e8912245"
integrity sha512-YcgwfCWpvPbj9FLUGqvdFvd3hrFWKpOeuXznRgfWEJ7RNr8b/IKKIKZABHx3aU+4CWN/iSAFFSReziQG6vTeIA== integrity sha512-vJOm5KD6uZXjSsrwajr+mNacIjf87gWvlBEltPWLbTkslUscWAzquyK4xfe9Zd4RDgO5nnwFyV06FC+uVR+5mg==
dependencies: dependencies:
cli-truncate "^2.1.0" cli-truncate "^2.1.0"
colorette "^2.0.16" colorette "^2.0.16"
log-update "^4.0.0" log-update "^4.0.0"
p-map "^4.0.0" p-map "^4.0.0"
rfdc "^1.3.0" rfdc "^1.3.0"
rxjs "^7.5.2" rxjs "^7.5.4"
through "^2.3.8" through "^2.3.8"
wrap-ansi "^7.0.0" wrap-ansi "^7.0.0"
@@ -4861,28 +4856,28 @@ next-transpile-modules@^9.0.0:
enhanced-resolve "^5.7.0" enhanced-resolve "^5.7.0"
escalade "^3.1.1" escalade "^3.1.1"
next@12.0.11-canary.11: next@12.0.11-canary.12:
version "12.0.11-canary.11" version "12.0.11-canary.12"
resolved "https://registry.yarnpkg.com/next/-/next-12.0.11-canary.11.tgz#5a41a0c00af11491a2fd0541b45e4f66843e9f4b" resolved "https://registry.yarnpkg.com/next/-/next-12.0.11-canary.12.tgz#615d10a6c73c4317ecab658fb4f4bad9768d6011"
integrity sha512-GKH2Zj8lbuozlEcKsu08eC6n3aLMhhY4MUGmQ6iwOII5s3/AuFArJlp3Tuhn9Is4jeb8EOGedBQOPraal/75UQ== integrity sha512-RuFclfTRPr2OViDWkI4XIwVUVsPGQafKfaayUoMjp00YszuOF4oYvB2eWUoZAW+EUKWmcbWZZ5Q/86mxQuKyuQ==
dependencies: dependencies:
"@next/env" "12.0.11-canary.11" "@next/env" "12.0.11-canary.12"
caniuse-lite "^1.0.30001283" caniuse-lite "^1.0.30001283"
postcss "8.4.5" postcss "8.4.5"
styled-jsx "5.0.0" styled-jsx "5.0.0"
use-subscription "1.5.1" use-subscription "1.5.1"
optionalDependencies: optionalDependencies:
"@next/swc-android-arm64" "12.0.11-canary.11" "@next/swc-android-arm64" "12.0.11-canary.12"
"@next/swc-darwin-arm64" "12.0.11-canary.11" "@next/swc-darwin-arm64" "12.0.11-canary.12"
"@next/swc-darwin-x64" "12.0.11-canary.11" "@next/swc-darwin-x64" "12.0.11-canary.12"
"@next/swc-linux-arm-gnueabihf" "12.0.11-canary.11" "@next/swc-linux-arm-gnueabihf" "12.0.11-canary.12"
"@next/swc-linux-arm64-gnu" "12.0.11-canary.11" "@next/swc-linux-arm64-gnu" "12.0.11-canary.12"
"@next/swc-linux-arm64-musl" "12.0.11-canary.11" "@next/swc-linux-arm64-musl" "12.0.11-canary.12"
"@next/swc-linux-x64-gnu" "12.0.11-canary.11" "@next/swc-linux-x64-gnu" "12.0.11-canary.12"
"@next/swc-linux-x64-musl" "12.0.11-canary.11" "@next/swc-linux-x64-musl" "12.0.11-canary.12"
"@next/swc-win32-arm64-msvc" "12.0.11-canary.11" "@next/swc-win32-arm64-msvc" "12.0.11-canary.12"
"@next/swc-win32-ia32-msvc" "12.0.11-canary.11" "@next/swc-win32-ia32-msvc" "12.0.11-canary.12"
"@next/swc-win32-x64-msvc" "12.0.11-canary.11" "@next/swc-win32-x64-msvc" "12.0.11-canary.12"
nice-try@^1.0.4: nice-try@^1.0.4:
version "1.0.5" version "1.0.5"
@@ -6001,7 +5996,7 @@ run-parallel@^1.1.9:
dependencies: dependencies:
queue-microtask "^1.2.2" queue-microtask "^1.2.2"
rxjs@^7.5.2: rxjs@^7.5.4:
version "7.5.4" version "7.5.4"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.4.tgz#3d6bd407e6b7ce9a123e76b1e770dc5761aa368d" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.4.tgz#3d6bd407e6b7ce9a123e76b1e770dc5761aa368d"
integrity sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ== integrity sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==
@@ -6113,7 +6108,7 @@ side-channel@^1.0.4:
get-intrinsic "^1.0.2" get-intrinsic "^1.0.2"
object-inspect "^1.9.0" object-inspect "^1.9.0"
signal-exit@^3.0.2, signal-exit@^3.0.3: signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7:
version "3.0.7" version "3.0.7"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
@@ -6406,10 +6401,10 @@ stylelint-prettier@~2.0.0:
dependencies: dependencies:
prettier-linter-helpers "^1.0.0" prettier-linter-helpers "^1.0.0"
stylelint@~14.4.0: stylelint@~14.5.0:
version "14.4.0" version "14.5.0"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.4.0.tgz#9ac2fb3681c5e84046cc0d08b6c60a115d61b5a7" resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.5.0.tgz#d94252027164bc918303a6b782652931421d8871"
integrity sha512-F6H2frcmdpB5ZXPjvHKSZRmszuYz7bsbl2NXyE+Pn+1P6PMD3dYMKjXci6yEzj9+Yf2ZinxBMaXYvSzYjaHtog== integrity sha512-4dvQjrhAz2njLoE1OvUEZpryNWcmx2w5Lq5jlibxFv6b5W6O8/vob12M2ZzhX3Ndzs5f67F+BEYmhnQXOwfVYQ==
dependencies: dependencies:
balanced-match "^2.0.0" balanced-match "^2.0.0"
colord "^2.9.2" colord "^2.9.2"
@@ -6686,11 +6681,6 @@ type-fest@^0.8.1:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
typedarray-to-buffer@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz#cdd2933c61dd3f5f02eda5d012d441f95bfeb50a"
integrity sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ==
typescript@^4.5.5: typescript@^4.5.5:
version "4.5.5" version "4.5.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3"
@@ -7111,14 +7101,12 @@ wrappy@1:
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
write-file-atomic@^4.0.0: write-file-atomic@^4.0.0:
version "4.0.0" version "4.0.1"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.0.tgz#0eff5dc687d3e22535ca3fca8558124645a4b053" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.1.tgz#9faa33a964c1c85ff6f849b80b42a88c2c537c8f"
integrity sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA== integrity sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==
dependencies: dependencies:
imurmurhash "^0.1.4" imurmurhash "^0.1.4"
is-typedarray "^1.0.0" signal-exit "^3.0.7"
signal-exit "^3.0.2"
typedarray-to-buffer "^4.0.0"
ws@^7.3.1: ws@^7.3.1:
version "7.5.7" version "7.5.7"