apps/web: detect telegram/browser

support browser (dev only)
This commit is contained in:
vchikalkin 2024-12-25 22:50:43 +03:00
parent 37d9112515
commit 30455c3285
7 changed files with 398 additions and 51 deletions

View File

@ -0,0 +1,42 @@
/* eslint-disable promise/prefer-await-to-then */
'use client';
import { getTelegramUser } from '@/mocks/get-telegram-user';
import { signIn, useSession } from 'next-auth/react';
import { redirect } from 'next/navigation';
import { useEffect } from 'react';
export default function Auth() {
const { data: session, status } = useSession();
useEffect(() => {
if (status === 'authenticated') {
redirect('/profile');
}
if (status === 'unauthenticated' && process.env.NODE_ENV === 'development') {
getTelegramUser().then((user) => {
signIn('telegram', {
callbackUrl: '/profile',
redirect: false,
telegramId: String(user?.id),
});
});
}
}, [status]);
if (status === 'loading') {
return <div>Loading Browser Auth...</div>;
}
return (
<div>
{session ? (
<div>
Browser Hello, {JSON.stringify(session)} <br />
</div>
) : (
<div>Not authenticated</div>
)}
</div>
);
}

View File

@ -1,42 +1,16 @@
'use client';
import { initData, isMiniAppDark, useSignal } from '@telegram-apps/sdk-react';
import { signIn, useSession } from 'next-auth/react';
import { useClientOnce } from '@/hooks/telegram';
import { isTMA } from '@telegram-apps/sdk-react';
import { redirect } from 'next/navigation';
import { useEffect } from 'react';
import { useState } from 'react';
export default function Auth() {
const initDataState = useSignal(initData.state);
const isDark = isMiniAppDark();
const { data: session, status } = useSession();
export default function Page() {
const [isTG, setIsTG] = useState(false);
useClientOnce(() => {
setIsTG(isTMA('simple'));
useEffect(() => {
if (status === 'authenticated') {
redirect('/profile');
}
redirect(isTG ? '/telegram' : '/browser');
});
if (status === 'unauthenticated' && initDataState?.user?.id) {
signIn('telegram', {
callbackUrl: '/profile',
redirect: false,
telegramId: String(initDataState.user.id),
});
}
}, [initDataState, status]);
if (status === 'loading') {
return <div>Loading Auth...</div>;
}
return (
<div>
{session ? (
<div>
Hello, {JSON.stringify(session)} <br />
Dark: {JSON.stringify(isDark)}
</div>
) : (
<div>Not authenticated</div>
)}
</div>
);
return <div>{isTG ? 'Telegram Mode' : 'Browser Mode'}</div>;
}

View File

@ -1,6 +1,6 @@
import { TelegramProvider } from '@/providers';
import { type PropsWithChildren } from 'react';
export default async function RootLayout({ children }: Readonly<PropsWithChildren>) {
export default async function Layout({ children }: Readonly<PropsWithChildren>) {
return <TelegramProvider>{children}</TelegramProvider>;
}

View File

@ -0,0 +1,42 @@
'use client';
import { initData, isMiniAppDark, useSignal } from '@telegram-apps/sdk-react';
import { signIn, useSession } from 'next-auth/react';
import { redirect } from 'next/navigation';
import { useEffect } from 'react';
export default function Auth() {
const initDataUser = useSignal(initData.user);
const isDark = isMiniAppDark();
const { data: session, status } = useSession();
useEffect(() => {
if (status === 'authenticated') {
redirect('/profile');
}
if (status === 'unauthenticated' && initDataUser?.id) {
signIn('telegram', {
callbackUrl: '/profile',
redirect: false,
telegramId: String(initDataUser.id),
});
}
}, [initDataUser, status]);
if (status === 'loading') {
return <div>Loading Auth...</div>;
}
return (
<div>
{session ? (
<div>
Hello, {JSON.stringify(session)} <br />
Dark: {JSON.stringify(isDark)}
</div>
) : (
<div>Not authenticated</div>
)}
</div>
);
}

View File

@ -2,7 +2,6 @@
import { z } from 'zod';
export const envSchema = z.object({
NEXTAUTH_SECRET: z.string(),
__DEV_TELEGRAM_ID: z.string(),
});
export const env = envSchema.parse(process.env);

View File

@ -0,0 +1,12 @@
'use server';
import { env } from '@/config/env';
export async function getTelegramUser() {
if (process.env.NODE_ENV !== 'production')
return {
id: env.__DEV_TELEGRAM_ID,
};
return null;
}

302
pnpm-lock.yaml generated
View File

@ -303,13 +303,13 @@ importers:
version: 5.1.4(typescript@5.7.2)(vite@5.4.11(@types/node@20.17.8))
vitest:
specifier: 'catalog:'
version: 2.1.8(@types/node@20.17.8)(jsdom@25.0.1)
version: 2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2))
packages/eslint-config:
devDependencies:
'@vchikalkin/eslint-config-awesome':
specifier: 'catalog:'
version: 2.0.6(@babel/core@7.26.0)(@next/eslint-plugin-next@15.0.3)(@types/node@20.17.8)(eslint-plugin-canonical@5.0.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1))
version: 2.0.6(@babel/core@7.26.0)(@next/eslint-plugin-next@15.0.3)(@types/node@20.17.8)(eslint-plugin-canonical@5.0.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2)))
eslint:
specifier: 'catalog:'
version: 9.15.0(jiti@2.4.1)
@ -361,7 +361,7 @@ importers:
version: 5.1.4(typescript@5.7.2)(vite@5.4.11(@types/node@20.17.8))
vitest:
specifier: 'catalog:'
version: 2.1.8(@types/node@20.17.8)(jsdom@25.0.1)
version: 2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2))
packages/lint-staged-config: {}
@ -1075,6 +1075,15 @@ packages:
resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==}
engines: {node: '>=6.9.0'}
'@bundled-es-modules/cookie@2.0.1':
resolution: {integrity: sha512-8o+5fRPLNbjbdGRRmJj3h6Hh1AQJf2dk3qQ/5ZFb+PXkRNiSoMGGUKlsgLfrxneb72axVJyIYji64E2+nNfYyw==}
'@bundled-es-modules/statuses@1.0.1':
resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==}
'@bundled-es-modules/tough-cookie@0.1.6':
resolution: {integrity: sha512-dvMHbL464C0zI+Yqxbz6kZ5TOEp7GLW+pry/RWndAR8MJQAXZ2rPmIs8tziTZjeIyhSNZgZbCePtfSbdWqStJw==}
'@emnapi/runtime@1.3.1':
resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==}
@ -1846,6 +1855,26 @@ packages:
cpu: [x64]
os: [win32]
'@inquirer/confirm@5.1.1':
resolution: {integrity: sha512-vVLSbGci+IKQvDOtzpPTCOiEJCNidHcAq9JYVoWTW0svb5FiwSLotkM+JXNXejfjnzVYV9n0DTBythl9+XgTxg==}
engines: {node: '>=18'}
peerDependencies:
'@types/node': '>=18'
'@inquirer/core@10.1.2':
resolution: {integrity: sha512-bHd96F3ezHg1mf/J0Rb4CV8ndCN0v28kUlrHqP7+ECm1C/A+paB7Xh2lbMk6x+kweQC+rZOxM/YeKikzxco8bQ==}
engines: {node: '>=18'}
'@inquirer/figures@1.0.9':
resolution: {integrity: sha512-BXvGj0ehzrngHTPTDqUoDT3NXL8U0RxUk2zJm2A66RhCEIWdtU1v6GuUqNAgArW4PQ9CinqIWyHdQgdwOj06zQ==}
engines: {node: '>=18'}
'@inquirer/type@3.0.2':
resolution: {integrity: sha512-ZhQ4TvhwHZF+lGhQ2O/rsjo80XoZR5/5qhOY3t6FJuX5XBg5Be8YzYTvaUGJnc12AUGI2nr4QSUE4PhKSigx7g==}
engines: {node: '>=18'}
peerDependencies:
'@types/node': '>=18'
'@isaacs/cliui@8.0.2':
resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==}
engines: {node: '>=12'}
@ -1871,6 +1900,10 @@ packages:
'@kamilkisiela/fast-url-parser@1.1.4':
resolution: {integrity: sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==}
'@mswjs/interceptors@0.37.3':
resolution: {integrity: sha512-USvgCL/uOGFtVa6SVyRrC8kIAedzRohxIXN5LISlg5C5vLZCn7dgMFVSNhSF9cuBEFrm/O2spDWEZeMnw4ZXYg==}
engines: {node: '>=18'}
'@next/env@15.1.0':
resolution: {integrity: sha512-UcCO481cROsqJuszPPXJnb7GGuLq617ve4xuAyyNG4VSSocJNtMU5Fsx+Lp6mlN8c7W58aZLc5y6D/2xNmaK+w==}
@ -1947,6 +1980,15 @@ packages:
resolution: {integrity: sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==}
engines: {node: '>=12.4.0'}
'@open-draft/deferred-promise@2.2.0':
resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==}
'@open-draft/logger@0.3.0':
resolution: {integrity: sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==}
'@open-draft/until@2.1.0':
resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==}
'@panva/hkdf@1.2.1':
resolution: {integrity: sha512-6oclG6Y3PiDFcoyk8srjLfVKyMfVCKJ27JwNPViuXziFpmdz+MZnZN/aKY0JGXgYuO/VghU0jcOAZgWXZ1Dmrw==}
@ -2238,6 +2280,9 @@ packages:
'@types/babel__traverse@7.20.6':
resolution: {integrity: sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==}
'@types/cookie@0.6.0':
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
'@types/estree@1.0.6':
resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==}
@ -2265,6 +2310,12 @@ packages:
'@types/react@19.0.1':
resolution: {integrity: sha512-YW6614BDhqbpR5KtUYzTA+zlA7nayzJRA9ljz9CQoxthR0sDisYZLuvSMsil36t4EH/uAt8T52Xb4sVw17G+SQ==}
'@types/statuses@2.0.5':
resolution: {integrity: sha512-jmIUGWrAiwu3dZpxntxieC+1n/5c3mjrImkmOSQ2NC5uP6cYO4aAZDdSmRcI5C1oiTmqlZGHC+/NmJrKogbP5A==}
'@types/tough-cookie@4.0.5':
resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==}
'@types/ws@8.5.13':
resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==}
@ -2820,6 +2871,10 @@ packages:
resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==}
engines: {node: '>= 10'}
cli-width@4.1.0:
resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==}
engines: {node: '>= 12'}
client-only@0.0.1:
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
@ -3810,6 +3865,9 @@ packages:
header-case@2.0.4:
resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==}
headers-polyfill@4.0.3:
resolution: {integrity: sha512-IScLbePpkvO846sIwOtOTDjutRMWdXdJmXdMvk6gCBHxFO8d+QKOQedyZSxFTTFYRSmlgSTDtXqqq4pcenBXLQ==}
hoist-non-react-statics@3.3.2:
resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==}
@ -3998,6 +4056,9 @@ packages:
resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==}
engines: {node: '>= 0.4'}
is-node-process@1.2.0:
resolution: {integrity: sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==}
is-number-object@1.0.7:
resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==}
engines: {node: '>= 0.4'}
@ -4418,9 +4479,23 @@ packages:
ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
msw@2.7.0:
resolution: {integrity: sha512-BIodwZ19RWfCbYTxWTUfTXc+sg4OwjCAgxU1ZsgmggX/7S3LdUifsbUPJs61j0rWb19CZRGY5if77duhc0uXzw==}
engines: {node: '>=18'}
hasBin: true
peerDependencies:
typescript: '>= 4.8.x'
peerDependenciesMeta:
typescript:
optional: true
mute-stream@0.0.8:
resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==}
mute-stream@2.0.0:
resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==}
engines: {node: ^18.17.0 || >=20.5.0}
mz@2.7.0:
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
@ -4604,6 +4679,9 @@ packages:
resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
engines: {node: '>=0.10.0'}
outvariant@1.4.3:
resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==}
p-limit@2.3.0:
resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
engines: {node: '>=6'}
@ -4698,6 +4776,9 @@ packages:
resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==}
engines: {node: 20 || >=22}
path-to-regexp@6.3.0:
resolution: {integrity: sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==}
path-type@4.0.0:
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
engines: {node: '>=8'}
@ -4861,6 +4942,9 @@ packages:
resolution: {integrity: sha512-2yma2tog9VaRZY2mn3Wq51uiSW4NcPYT1cQdBagwyrznrilKSZwIZ0UG3ZPL/mx+axEns0hE35T5ufOYZXEnBQ==}
engines: {node: '>=4'}
psl@1.15.0:
resolution: {integrity: sha512-JZd3gMVBAVQkSs6HdNZo9Sdo0LNcQeMNP3CozBJb3JYC/QUYZTnKxP+f8oWRX4rHP5EurWxqAHTSwUCjlNKa1w==}
punycode@1.4.1:
resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==}
@ -4875,6 +4959,9 @@ packages:
resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==}
engines: {node: '>=6.0.0'}
querystringify@2.2.0:
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
queue-microtask@1.2.3:
resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==}
@ -5012,6 +5099,9 @@ packages:
resolution: {integrity: sha512-LBnkqsDE7BZKvqylbmn7lTIVdpx4K/QCduRATpO5R+wtPmky/a8pN1bO2D6wXppn1497AJF9mNjqAXr6bdl9jg==}
engines: {node: '>=0.10.5'}
requires-port@1.0.0:
resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==}
resolve-from@4.0.0:
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
engines: {node: '>=4'}
@ -5243,6 +5333,10 @@ packages:
stackback@0.0.2:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
statuses@2.0.1:
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
engines: {node: '>= 0.8'}
std-env@3.8.0:
resolution: {integrity: sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==}
@ -5250,6 +5344,9 @@ packages:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
strict-event-emitter@0.5.1:
resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==}
string-argv@0.3.2:
resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==}
engines: {node: '>=0.6.19'}
@ -5433,6 +5530,10 @@ packages:
resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
engines: {node: '>=8.0'}
tough-cookie@4.1.4:
resolution: {integrity: sha512-Loo5UUvLD9ScZ6jh8beX1T6sO1w2/MpCRpEP7V280GKMVUQ0Jzar2U3UJPsrdbziLEMMhu3Ujnq//rhiFuIeag==}
engines: {node: '>=6'}
tough-cookie@5.0.0:
resolution: {integrity: sha512-FRKsF7cz96xIIeMZ82ehjC3xW2E+O2+v11udrDYewUbszngYhsGa8z6YUMMzO9QJZzzyd0nGGXnML/TReX6W8Q==}
engines: {node: '>=16'}
@ -5544,6 +5645,10 @@ packages:
resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==}
engines: {node: '>=8'}
type-fest@4.30.2:
resolution: {integrity: sha512-UJShLPYi1aWqCdq9HycOL/gwsuqda1OISdBO3t8RlXQC4QvtuIz4b5FCfe2dQIWEpmlRExKmcTBfP1r9bhY7ig==}
engines: {node: '>=16'}
typed-array-buffer@1.0.2:
resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==}
engines: {node: '>= 0.4'}
@ -5595,6 +5700,10 @@ packages:
resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==}
engines: {node: '>=4'}
universalify@0.2.0:
resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==}
engines: {node: '>= 4.0.0'}
unixify@1.0.0:
resolution: {integrity: sha512-6bc58dPYhCMHHuwxldQxO3RRNZ4eCogZ/st++0+fcC1nr0jiGUtAdBJ2qzmLQWSxbtz42pWt4QQMiZ9HvZf5cg==}
engines: {node: '>=0.10.0'}
@ -5614,6 +5723,9 @@ packages:
uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
url-parse@1.5.10:
resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==}
urlpattern-polyfill@10.0.0:
resolution: {integrity: sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==}
@ -5879,6 +5991,10 @@ packages:
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
engines: {node: '>=10'}
yoctocolors-cjs@2.1.2:
resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==}
engines: {node: '>=18'}
zen-observable-ts@1.2.5:
resolution: {integrity: sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==}
@ -6736,6 +6852,22 @@ snapshots:
'@babel/helper-string-parser': 7.25.9
'@babel/helper-validator-identifier': 7.25.9
'@bundled-es-modules/cookie@2.0.1':
dependencies:
cookie: 0.7.2
optional: true
'@bundled-es-modules/statuses@1.0.1':
dependencies:
statuses: 2.0.1
optional: true
'@bundled-es-modules/tough-cookie@0.1.6':
dependencies:
'@types/tough-cookie': 4.0.5
tough-cookie: 4.1.4
optional: true
'@emnapi/runtime@1.3.1':
dependencies:
tslib: 2.8.1
@ -7666,6 +7798,36 @@ snapshots:
'@img/sharp-win32-x64@0.33.5':
optional: true
'@inquirer/confirm@5.1.1(@types/node@20.17.8)':
dependencies:
'@inquirer/core': 10.1.2(@types/node@20.17.8)
'@inquirer/type': 3.0.2(@types/node@20.17.8)
'@types/node': 20.17.8
optional: true
'@inquirer/core@10.1.2(@types/node@20.17.8)':
dependencies:
'@inquirer/figures': 1.0.9
'@inquirer/type': 3.0.2(@types/node@20.17.8)
ansi-escapes: 4.3.2
cli-width: 4.1.0
mute-stream: 2.0.0
signal-exit: 4.1.0
strip-ansi: 6.0.1
wrap-ansi: 6.2.0
yoctocolors-cjs: 2.1.2
transitivePeerDependencies:
- '@types/node'
optional: true
'@inquirer/figures@1.0.9':
optional: true
'@inquirer/type@3.0.2(@types/node@20.17.8)':
dependencies:
'@types/node': 20.17.8
optional: true
'@isaacs/cliui@8.0.2':
dependencies:
string-width: 5.1.2
@ -7694,6 +7856,16 @@ snapshots:
'@kamilkisiela/fast-url-parser@1.1.4': {}
'@mswjs/interceptors@0.37.3':
dependencies:
'@open-draft/deferred-promise': 2.2.0
'@open-draft/logger': 0.3.0
'@open-draft/until': 2.1.0
is-node-process: 1.2.0
outvariant: 1.4.3
strict-event-emitter: 0.5.1
optional: true
'@next/env@15.1.0': {}
'@next/eslint-plugin-next@14.2.18':
@ -7746,6 +7918,18 @@ snapshots:
'@nolyfill/is-core-module@1.0.39': {}
'@open-draft/deferred-promise@2.2.0':
optional: true
'@open-draft/logger@0.3.0':
dependencies:
is-node-process: 1.2.0
outvariant: 1.4.3
optional: true
'@open-draft/until@2.1.0':
optional: true
'@panva/hkdf@1.2.1': {}
'@peculiar/asn1-schema@2.3.13':
@ -8000,6 +8184,9 @@ snapshots:
dependencies:
'@babel/types': 7.26.0
'@types/cookie@0.6.0':
optional: true
'@types/estree@1.0.6': {}
'@types/js-yaml@4.0.9': {}
@ -8026,6 +8213,12 @@ snapshots:
dependencies:
csstype: 3.1.3
'@types/statuses@2.0.5':
optional: true
'@types/tough-cookie@4.0.5':
optional: true
'@types/ws@8.5.13':
dependencies:
'@types/node': 20.17.8
@ -8189,10 +8382,10 @@ snapshots:
'@typescript-eslint/types': 8.17.0
eslint-visitor-keys: 4.2.0
'@vchikalkin/eslint-config-awesome@2.0.6(@babel/core@7.26.0)(@next/eslint-plugin-next@15.0.3)(@types/node@20.17.8)(eslint-plugin-canonical@5.0.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1))':
'@vchikalkin/eslint-config-awesome@2.0.6(@babel/core@7.26.0)(@next/eslint-plugin-next@15.0.3)(@types/node@20.17.8)(eslint-plugin-canonical@5.0.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2)))':
dependencies:
'@next/eslint-plugin-next': 15.0.3
eslint-config-canonical: 44.3.33(@babel/core@7.26.0)(@types/node@20.17.8)(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1))
eslint-config-canonical: 44.3.33(@babel/core@7.26.0)(@types/node@20.17.8)(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2)))
eslint-plugin-canonical: 5.0.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)
eslint-plugin-sonarjs: 3.0.1(eslint@9.15.0(jiti@2.4.1))
transitivePeerDependencies:
@ -8231,12 +8424,13 @@ snapshots:
chai: 5.1.2
tinyrainbow: 1.2.0
'@vitest/mocker@2.1.8(vite@5.4.11(@types/node@20.17.8))':
'@vitest/mocker@2.1.8(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2))(vite@5.4.11(@types/node@20.17.8))':
dependencies:
'@vitest/spy': 2.1.8
estree-walker: 3.0.3
magic-string: 0.30.15
optionalDependencies:
msw: 2.7.0(@types/node@20.17.8)(typescript@5.7.2)
vite: 5.4.11(@types/node@20.17.8)
'@vitest/pretty-format@2.1.8':
@ -8735,6 +8929,9 @@ snapshots:
cli-width@3.0.0: {}
cli-width@4.1.0:
optional: true
client-only@0.0.1: {}
cliui@6.0.0:
@ -9163,7 +9360,7 @@ snapshots:
eslint: 9.15.0(jiti@2.4.1)
semver: 7.6.3
eslint-config-canonical@44.3.33(@babel/core@7.26.0)(@types/node@20.17.8)(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)):
eslint-config-canonical@44.3.33(@babel/core@7.26.0)(@types/node@20.17.8)(eslint-plugin-import-x@4.5.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2))):
dependencies:
'@graphql-eslint/eslint-plugin': 3.20.1(@babel/core@7.26.0)(@types/node@20.17.8)(graphql@16.9.0)
'@next/eslint-plugin-next': 14.2.18
@ -9194,7 +9391,7 @@ snapshots:
eslint-plugin-react-hooks: 5.1.0-rc-fb9a90fa48-20240614(eslint@9.15.0(jiti@2.4.1))
eslint-plugin-regexp: 2.7.0(eslint@9.15.0(jiti@2.4.1))
eslint-plugin-unicorn: 56.0.1(eslint@9.15.0(jiti@2.4.1))
eslint-plugin-vitest: 0.5.4(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1))
eslint-plugin-vitest: 0.5.4(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2)))
eslint-plugin-yml: 1.16.0(eslint@9.15.0(jiti@2.4.1))
eslint-plugin-zod: 1.4.0(eslint@9.15.0(jiti@2.4.1))
globals: 15.12.0
@ -9551,13 +9748,13 @@ snapshots:
semver: 7.6.3
strip-indent: 3.0.0
eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)):
eslint-plugin-vitest@0.5.4(@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)(vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2))):
dependencies:
'@typescript-eslint/utils': 7.18.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)
eslint: 9.15.0(jiti@2.4.1)
optionalDependencies:
'@typescript-eslint/eslint-plugin': 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.15.0(jiti@2.4.1))(typescript@5.7.2)
vitest: 2.1.8(@types/node@20.17.8)(jsdom@25.0.1)
vitest: 2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2))
transitivePeerDependencies:
- supports-color
- typescript
@ -10016,6 +10213,9 @@ snapshots:
capital-case: 1.0.4
tslib: 2.8.1
headers-polyfill@4.0.3:
optional: true
hoist-non-react-statics@3.3.2:
dependencies:
react-is: 16.13.1
@ -10208,6 +10408,9 @@ snapshots:
is-negative-zero@2.0.3: {}
is-node-process@1.2.0:
optional: true
is-number-object@1.0.7:
dependencies:
has-tostringtag: 1.0.2
@ -10622,8 +10825,37 @@ snapshots:
ms@2.1.3: {}
msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2):
dependencies:
'@bundled-es-modules/cookie': 2.0.1
'@bundled-es-modules/statuses': 1.0.1
'@bundled-es-modules/tough-cookie': 0.1.6
'@inquirer/confirm': 5.1.1(@types/node@20.17.8)
'@mswjs/interceptors': 0.37.3
'@open-draft/deferred-promise': 2.2.0
'@open-draft/until': 2.1.0
'@types/cookie': 0.6.0
'@types/statuses': 2.0.5
graphql: 16.9.0
headers-polyfill: 4.0.3
is-node-process: 1.2.0
outvariant: 1.4.3
path-to-regexp: 6.3.0
picocolors: 1.1.1
strict-event-emitter: 0.5.1
type-fest: 4.30.2
yargs: 17.7.2
optionalDependencies:
typescript: 5.7.2
transitivePeerDependencies:
- '@types/node'
optional: true
mute-stream@0.0.8: {}
mute-stream@2.0.0:
optional: true
mz@2.7.0:
dependencies:
any-promise: 1.3.0
@ -10818,6 +11050,9 @@ snapshots:
os-tmpdir@1.0.2: {}
outvariant@1.4.3:
optional: true
p-limit@2.3.0:
dependencies:
p-try: 2.2.0
@ -10911,6 +11146,9 @@ snapshots:
lru-cache: 11.0.2
minipass: 7.1.2
path-to-regexp@6.3.0:
optional: true
path-type@4.0.0: {}
pathe@1.1.2: {}
@ -11034,6 +11272,11 @@ snapshots:
proto-props@2.0.0: {}
psl@1.15.0:
dependencies:
punycode: 2.3.1
optional: true
punycode@1.4.1: {}
punycode@2.3.1: {}
@ -11044,6 +11287,9 @@ snapshots:
pvutils@1.1.3: {}
querystringify@2.2.0:
optional: true
queue-microtask@1.2.3: {}
rambda@7.5.0: {}
@ -11184,6 +11430,9 @@ snapshots:
requireindex@1.1.0: {}
requires-port@1.0.0:
optional: true
resolve-from@4.0.0: {}
resolve-from@5.0.0: {}
@ -11456,10 +11705,16 @@ snapshots:
stackback@0.0.2: {}
statuses@2.0.1:
optional: true
std-env@3.8.0: {}
streamsearch@1.1.0: {}
strict-event-emitter@0.5.1:
optional: true
string-argv@0.3.2: {}
string-env-interpolation@1.0.1: {}
@ -11678,6 +11933,14 @@ snapshots:
dependencies:
is-number: 7.0.0
tough-cookie@4.1.4:
dependencies:
psl: 1.15.0
punycode: 2.3.1
universalify: 0.2.0
url-parse: 1.5.10
optional: true
tough-cookie@5.0.0:
dependencies:
tldts: 6.1.66
@ -11767,6 +12030,9 @@ snapshots:
type-fest@0.8.1: {}
type-fest@4.30.2:
optional: true
typed-array-buffer@1.0.2:
dependencies:
call-bind: 1.0.7
@ -11826,6 +12092,9 @@ snapshots:
unicode-property-aliases-ecmascript@2.1.0: {}
universalify@0.2.0:
optional: true
unixify@1.0.0:
dependencies:
normalize-path: 2.1.1
@ -11848,6 +12117,12 @@ snapshots:
dependencies:
punycode: 2.3.1
url-parse@1.5.10:
dependencies:
querystringify: 2.2.0
requires-port: 1.0.0
optional: true
urlpattern-polyfill@10.0.0: {}
urlpattern-polyfill@8.0.2: {}
@ -11907,10 +12182,10 @@ snapshots:
'@types/node': 20.17.8
fsevents: 2.3.3
vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1):
vitest@2.1.8(@types/node@20.17.8)(jsdom@25.0.1)(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2)):
dependencies:
'@vitest/expect': 2.1.8
'@vitest/mocker': 2.1.8(vite@5.4.11(@types/node@20.17.8))
'@vitest/mocker': 2.1.8(msw@2.7.0(@types/node@20.17.8)(typescript@5.7.2))(vite@5.4.11(@types/node@20.17.8))
'@vitest/pretty-format': 2.1.8
'@vitest/runner': 2.1.8
'@vitest/snapshot': 2.1.8
@ -12124,6 +12399,9 @@ snapshots:
yocto-queue@0.1.0: {}
yoctocolors-cjs@2.1.2:
optional: true
zen-observable-ts@1.2.5:
dependencies:
zen-observable: 0.8.15