mirror of
https://github.com/discordjs/discord.js.git
synced 2024-07-08 02:31:18 +12:00
chore: deps
This commit is contained in:
parent
899bc5f78b
commit
5d7c59c301
1
apps/guide/.env.development
Normal file
1
apps/guide/.env.development
Normal file
|
@ -0,0 +1 @@
|
|||
METADATA_BASE_URL=http://localhost:3000
|
|
@ -13,12 +13,13 @@ module.exports = withBundleAnalyzer(
|
|||
withContentlayer({
|
||||
reactStrictMode: true,
|
||||
experimental: {
|
||||
appDir: true,
|
||||
typedRoutes: true,
|
||||
},
|
||||
images: {
|
||||
dangerouslyAllowSVG: true,
|
||||
contentDispositionType: 'attachment',
|
||||
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
|
||||
},
|
||||
poweredByHeader: false,
|
||||
}),
|
||||
);
|
||||
|
|
|
@ -52,9 +52,9 @@
|
|||
"@vercel/og": "^0.5.11",
|
||||
"ariakit": "^2.0.0-next.44",
|
||||
"cmdk": "^0.2.0",
|
||||
"contentlayer": "0.3.1",
|
||||
"next": "^13.4.17",
|
||||
"next-contentlayer": "0.3.1",
|
||||
"contentlayer": "^0.3.4",
|
||||
"next": "^13.4.19",
|
||||
"next-contentlayer": "^0.3.4",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
"react-custom-scrollbars-2": "^4.5.0",
|
||||
|
@ -65,16 +65,16 @@
|
|||
"sharp": "^0.32.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^13.4.17",
|
||||
"@next/bundle-analyzer": "^13.4.19",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/html-escaper": "^3.0.0",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@unocss/cli": "^0.55.1",
|
||||
"@unocss/eslint-config": "^0.55.1",
|
||||
"@unocss/reset": "^0.55.1",
|
||||
"@unocss/cli": "^0.55.2",
|
||||
"@unocss/eslint-config": "^0.55.2",
|
||||
"@unocss/reset": "^0.55.2",
|
||||
"@vitejs/plugin-react": "^4.0.4",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"concurrently": "^8.2.0",
|
||||
|
@ -82,16 +82,16 @@
|
|||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"happy-dom": "^10.10.2",
|
||||
"happy-dom": "^10.10.4",
|
||||
"hast-util-to-string": "^2.0.0",
|
||||
"hastscript": "^7.2.0",
|
||||
"hastscript": "^8.0.0",
|
||||
"html-escaper": "^3.0.3",
|
||||
"lighthouse": "^10.4.0",
|
||||
"prettier": "^2.8.8",
|
||||
"lighthouse": "^11.0.0",
|
||||
"prettier": "^3.0.2",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"unocss": "^0.55.1",
|
||||
"vercel": "^31.4.0",
|
||||
"unocss": "^0.55.2",
|
||||
"vercel": "^32.0.0",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -13,6 +13,9 @@ import '~/styles/ch.css';
|
|||
import '~/styles/main.css';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(
|
||||
process.env.METADATA_BASE_URL ? process.env.METADATA_BASE_URL : `http://localhost:${process.env.PORT ?? 3_000}`,
|
||||
),
|
||||
title: 'discord.js',
|
||||
description: DESCRIPTION,
|
||||
viewport: {
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
import { VscGithubInverted } from '@react-icons/all-files/vsc/VscGithubInverted';
|
||||
import { VscMenu } from '@react-icons/all-files/vsc/VscMenu';
|
||||
import { Button } from 'ariakit/button';
|
||||
import type { Route } from 'next';
|
||||
import dynamic from 'next/dynamic';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
@ -23,7 +24,7 @@ export default function Header() {
|
|||
.map((path, idx, original) => (
|
||||
<Link
|
||||
className="rounded outline-none hover:underline focus:ring focus:ring-width-2 focus:ring-blurple"
|
||||
href={`/${original.slice(0, idx + 1).join('/')}`}
|
||||
href={`/${original.slice(0, idx + 1).join('/')}` as Route}
|
||||
key={`${path}-${idx}`}
|
||||
>
|
||||
{path}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import { allContents } from 'contentlayer/generated';
|
||||
import type { Route } from 'next';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { Section } from './Section';
|
||||
|
@ -45,7 +46,7 @@ export function Sidebar() {
|
|||
? 'bg-blurple text-white'
|
||||
: 'dark:hover:bg-dark-200 dark:active:bg-dark-100 hover:bg-light-700 active:bg-light-800'
|
||||
}`}
|
||||
href={member.href}
|
||||
href={member.href as Route}
|
||||
key={`${member.title}-${index}`}
|
||||
onClick={() => setOpened(false)}
|
||||
title={member.title}
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
NEXT_PUBLIC_LOCAL_DEV=true
|
||||
METADATA_BASE_URL=http://localhost:3000
|
||||
|
|
|
@ -7,7 +7,7 @@ const withBundleAnalyzer = bundleAnalyzer({
|
|||
export default withBundleAnalyzer({
|
||||
reactStrictMode: true,
|
||||
experimental: {
|
||||
appDir: true,
|
||||
typedRoutes: true,
|
||||
serverComponentsExternalPackages: ['@microsoft/api-extractor-model', 'jju'],
|
||||
},
|
||||
images: {
|
||||
|
@ -15,6 +15,7 @@ export default withBundleAnalyzer({
|
|||
contentDispositionType: 'attachment',
|
||||
contentSecurityPolicy: "default-src 'self'; frame-src 'none'; sandbox;",
|
||||
},
|
||||
poweredByHeader: false,
|
||||
async redirects() {
|
||||
return [
|
||||
{
|
||||
|
|
|
@ -49,9 +49,9 @@
|
|||
"@discordjs/api-extractor-utils": "workspace:^",
|
||||
"@discordjs/scripts": "workspace:^",
|
||||
"@discordjs/ui": "workspace:^",
|
||||
"@microsoft/api-extractor-model": "7.27.6",
|
||||
"@microsoft/tsdoc": "0.14.2",
|
||||
"@planetscale/database": "1.7.0",
|
||||
"@microsoft/api-extractor-model": "^7.27.6",
|
||||
"@microsoft/tsdoc": "^0.14.2",
|
||||
"@planetscale/database": "^1.11.0",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@vercel/analytics": "^1.0.2",
|
||||
"@vercel/edge-config": "^0.2.1",
|
||||
|
@ -61,7 +61,7 @@
|
|||
"class-variance-authority": "^0.7.0",
|
||||
"cmdk": "^0.2.0",
|
||||
"meilisearch": "^0.34.1",
|
||||
"next": "^13.4.17",
|
||||
"next": "^13.4.19",
|
||||
"next-mdx-remote": "^4.4.1",
|
||||
"next-themes": "^0.2.1",
|
||||
"react": "^18.2.0",
|
||||
|
@ -75,15 +75,15 @@
|
|||
"swr": "^2.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/bundle-analyzer": "^13.4.17",
|
||||
"@next/bundle-analyzer": "^13.4.19",
|
||||
"@testing-library/react": "^14.0.0",
|
||||
"@testing-library/user-event": "^14.4.3",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@unocss/cli": "^0.55.1",
|
||||
"@unocss/eslint-config": "^0.55.1",
|
||||
"@unocss/reset": "^0.55.1",
|
||||
"@unocss/cli": "^0.55.2",
|
||||
"@unocss/eslint-config": "^0.55.2",
|
||||
"@unocss/reset": "^0.55.2",
|
||||
"@vitejs/plugin-react": "^4.0.4",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"concurrently": "^8.2.0",
|
||||
|
@ -92,12 +92,12 @@
|
|||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"happy-dom": "^10.10.2",
|
||||
"lighthouse": "^10.4.0",
|
||||
"prettier": "^2.8.8",
|
||||
"happy-dom": "^10.10.4",
|
||||
"lighthouse": "^11.0.0",
|
||||
"prettier": "^3.0.2",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"vercel": "^31.4.0",
|
||||
"vercel": "^32.0.0",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
'use client';
|
||||
|
||||
import { Analytics } from '@vercel/analytics/react';
|
||||
import type { Metadata } from 'next';
|
||||
import { Providers } from './providers';
|
||||
import { DESCRIPTION } from '~/util/constants';
|
||||
import { inter } from '~/util/fonts';
|
||||
|
||||
import '@unocss/reset/tailwind-compat.css';
|
||||
|
@ -11,68 +9,6 @@ import '~/styles/unocss.css';
|
|||
import '~/styles/cmdk.css';
|
||||
import '~/styles/main.css';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'discord.js',
|
||||
description: DESCRIPTION,
|
||||
viewport: {
|
||||
minimumScale: 1,
|
||||
initialScale: 1,
|
||||
width: 'device-width',
|
||||
},
|
||||
icons: {
|
||||
other: [
|
||||
{
|
||||
url: '/favicon-32x32.png',
|
||||
sizes: '32x32',
|
||||
type: 'image/png',
|
||||
},
|
||||
{
|
||||
url: '/favicon-16x16.png',
|
||||
sizes: '16x16',
|
||||
type: 'image/png',
|
||||
},
|
||||
],
|
||||
apple: [
|
||||
'/apple-touch-icon.png',
|
||||
{
|
||||
url: '/safari-pinned-tab.svg',
|
||||
rel: 'mask-icon',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
manifest: '/site.webmanifest',
|
||||
|
||||
themeColor: [
|
||||
{ media: '(prefers-color-scheme: light)', color: '#f1f3f5' },
|
||||
{ media: '(prefers-color-scheme: dark)', color: '#1c1c1e' },
|
||||
],
|
||||
colorScheme: 'light dark',
|
||||
|
||||
appleWebApp: {
|
||||
title: 'discord.js',
|
||||
},
|
||||
|
||||
applicationName: 'discord.js',
|
||||
|
||||
openGraph: {
|
||||
siteName: 'discord.js',
|
||||
type: 'website',
|
||||
title: 'discord.js',
|
||||
description: DESCRIPTION,
|
||||
images: 'https://discordjs.dev/api/open-graph.png',
|
||||
},
|
||||
|
||||
twitter: {
|
||||
card: 'summary_large_image',
|
||||
creator: '@iCrawlToGo',
|
||||
},
|
||||
|
||||
other: {
|
||||
'msapplication-TileColor': '#1c1c1e',
|
||||
},
|
||||
};
|
||||
|
||||
export default function GlobalError({ error }: { readonly error: Error }) {
|
||||
console.error(error);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
'use client';
|
||||
|
||||
import type { Route } from 'next';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
|
@ -13,7 +14,7 @@ export default function NotFound() {
|
|||
<h2 className="text-[2rem] md:text-[3rem]">Not found.</h2>
|
||||
<Link
|
||||
className="h-11 flex flex-row transform-gpu cursor-pointer select-none appearance-none place-items-center border-0 rounded bg-blurple px-6 text-base font-semibold leading-none text-white no-underline outline-none active:translate-y-px focus:ring focus:ring-width-2 focus:ring-white"
|
||||
href={href}
|
||||
href={href as Route}
|
||||
>
|
||||
Take me back
|
||||
</Link>
|
||||
|
|
|
@ -11,6 +11,9 @@ import '~/styles/cmdk.css';
|
|||
import '~/styles/main.css';
|
||||
|
||||
export const metadata: Metadata = {
|
||||
metadataBase: new URL(
|
||||
process.env.METADATA_BASE_URL ? process.env.METADATA_BASE_URL : `http://localhost:${process.env.PORT ?? 3_000}`,
|
||||
),
|
||||
title: 'discord.js',
|
||||
description: DESCRIPTION,
|
||||
viewport: {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { Route } from 'next';
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function NotFound() {
|
||||
|
@ -7,7 +8,7 @@ export default function NotFound() {
|
|||
<h2 className="text-[2rem] md:text-[3rem]">Not found.</h2>
|
||||
<Link
|
||||
className="h-11 flex flex-row transform-gpu cursor-pointer select-none appearance-none place-items-center border-0 rounded bg-blurple px-6 text-base font-semibold leading-none text-white no-underline outline-none active:translate-y-px focus:ring focus:ring-width-2 focus:ring-white"
|
||||
href="/docs"
|
||||
href={'/docs' as Route}
|
||||
>
|
||||
Take me back
|
||||
</Link>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { FiExternalLink } from '@react-icons/all-files/fi/FiExternalLink';
|
||||
import type { Route } from 'next';
|
||||
import Image from 'next/image';
|
||||
import Link from 'next/link';
|
||||
import vercelLogo from '~/assets/powered-by-vercel.svg';
|
||||
|
@ -24,7 +25,7 @@ export default function Page() {
|
|||
<a className={buttonVariants()} href="https://old.discordjs.dev/#/docs" rel="noopener noreferrer">
|
||||
Docs
|
||||
</a>
|
||||
<Link className={buttonVariants()} href="/docs">
|
||||
<Link className={buttonVariants()} href={'/docs' as Route}>
|
||||
Module docs
|
||||
</Link>
|
||||
<a
|
||||
|
|
|
@ -5,6 +5,7 @@ import { VscGithubInverted } from '@react-icons/all-files/vsc/VscGithubInverted'
|
|||
import { VscMenu } from '@react-icons/all-files/vsc/VscMenu';
|
||||
import { VscSearch } from '@react-icons/all-files/vsc/VscSearch';
|
||||
import { Button } from 'ariakit/button';
|
||||
import type { Route } from 'next';
|
||||
import dynamic from 'next/dynamic';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
@ -27,7 +28,7 @@ export default function Header() {
|
|||
.map((path, idx, original) => (
|
||||
<Link
|
||||
className="rounded outline-none hover:underline focus:ring focus:ring-width-2 focus:ring-blurple"
|
||||
href={`/${original.slice(0, idx + 1).join('/')}`}
|
||||
href={`/${original.slice(0, idx + 1).join('/')}` as Route}
|
||||
key={`${path}-${idx}`}
|
||||
>
|
||||
{path}
|
||||
|
|
|
@ -3,15 +3,11 @@
|
|||
import type { LinkProps } from 'next/link';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import type { AnchorHTMLAttributes, PropsWithChildren, RefAttributes } from 'react';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { useCurrentPathMeta } from '~/hooks/useCurrentPathMeta';
|
||||
|
||||
export interface ItemLinkProps
|
||||
extends Omit<LinkProps, 'href'>,
|
||||
RefAttributes<HTMLAnchorElement>,
|
||||
Omit<AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps> {
|
||||
export interface ItemLinkProps<T extends string> extends Omit<LinkProps<T>, 'href'> {
|
||||
readonly className?: string;
|
||||
|
||||
/**
|
||||
* The URI of the api item to link to. (e.g. `/RestManager`)
|
||||
*/
|
||||
|
@ -30,7 +26,7 @@ export interface ItemLinkProps
|
|||
* This component only needs the relative path to the item, and will automatically
|
||||
* generate the full path to the item client-side.
|
||||
*/
|
||||
export function ItemLink(props: PropsWithChildren<ItemLinkProps>) {
|
||||
export function ItemLink<T extends string>(props: PropsWithChildren<ItemLinkProps<T>>) {
|
||||
const pathname = usePathname();
|
||||
const { packageName, version } = useCurrentPathMeta();
|
||||
|
||||
|
@ -40,5 +36,5 @@ export function ItemLink(props: PropsWithChildren<ItemLinkProps>) {
|
|||
|
||||
const { itemURI, packageName: pkgName, ...linkProps } = props;
|
||||
|
||||
return <Link href={`/docs/packages/${pkgName ?? packageName}/${version}/${itemURI}`} {...linkProps} />;
|
||||
return <Link {...linkProps} href={`/docs/packages/${pkgName ?? packageName}/${version}/${itemURI}`} />;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import type { ApiItem } from '@microsoft/api-extractor-model';
|
||||
import type { DocComment, DocFencedCode, DocLinkTag, DocNode, DocNodeContainer, DocPlainText } from '@microsoft/tsdoc';
|
||||
import { DocNodeKind, StandardTags } from '@microsoft/tsdoc';
|
||||
import type { Route } from 'next';
|
||||
import Link from 'next/link';
|
||||
import { Fragment, useCallback, type ReactNode } from 'react';
|
||||
import { ItemLink } from '../../ItemLink';
|
||||
|
@ -31,9 +32,8 @@ export function TSDoc({ item, tsdoc }: { readonly item: ApiItem; readonly tsdoc:
|
|||
const { codeDestination, urlDestination, linkText } = tsdoc as DocLinkTag;
|
||||
|
||||
if (codeDestination) {
|
||||
const foundItem = item
|
||||
.getAssociatedModel()
|
||||
?.resolveDeclarationReference(codeDestination, item).resolvedApiItem;
|
||||
const foundItem = item.getAssociatedModel()?.resolveDeclarationReference(codeDestination, item)
|
||||
.resolvedApiItem;
|
||||
|
||||
if (!foundItem) return null;
|
||||
|
||||
|
@ -52,7 +52,7 @@ export function TSDoc({ item, tsdoc }: { readonly item: ApiItem; readonly tsdoc:
|
|||
return (
|
||||
<Link
|
||||
className="rounded font-mono text-blurple outline-none focus:ring focus:ring-width-2 focus:ring-blurple"
|
||||
href={urlDestination}
|
||||
href={urlDestination as Route}
|
||||
key={idx}
|
||||
>
|
||||
{linkText ?? urlDestination}
|
||||
|
|
12
package.json
12
package.json
|
@ -53,15 +53,21 @@
|
|||
"conventional-changelog-cli": "^3.0.0",
|
||||
"husky": "^8.0.3",
|
||||
"is-ci": "^3.0.1",
|
||||
"lint-staged": "^13.3.0",
|
||||
"lint-staged": "^14.0.1",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"unocss": "^0.55.1",
|
||||
"vercel": "^31.4.0",
|
||||
"unocss": "^0.55.2",
|
||||
"vercel": "^32.0.0",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"resolutions": {
|
||||
"@contentlayer/utils/@opentelemetry/core": "^1.15.1",
|
||||
"@contentlayer/utils/@opentelemetry/exporter-trace-otlp-grpc": "^0.41.1",
|
||||
"@contentlayer/utils/@opentelemetry/resources": "^1.15.1",
|
||||
"@contentlayer/utils/@opentelemetry/sdk-trace-base": "^1.15.1",
|
||||
"@contentlayer/utils/@opentelemetry/sdk-trace-node": "^1.15.1",
|
||||
"@contentlayer/utils/@opentelemetry/semantic-conventions": "^1.15.1",
|
||||
"@microsoft/tsdoc-config@~0.16.1": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
||||
"@microsoft/tsdoc-config@0.16.2": "patch:@microsoft/tsdoc-config@npm%3A0.16.2#./.yarn/patches/@microsoft-tsdoc-config-npm-0.16.2-30fd115d09.patch",
|
||||
"yaml@2.2.2": "patch:yaml@npm%3A2.2.2#./.yarn/patches/yaml-npm-2.2.2-6e3cddb343.patch",
|
||||
|
|
|
@ -43,18 +43,18 @@
|
|||
"dependencies": {
|
||||
"@actions/core": "^1.10.0",
|
||||
"@actions/glob": "^0.4.0",
|
||||
"@planetscale/database": "^1.10.0",
|
||||
"tslib": "^2.6.1",
|
||||
"@planetscale/database": "^1.11.0",
|
||||
"tslib": "^2.6.2",
|
||||
"undici": "5.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -2,6 +2,9 @@ import { createTsupConfig } from '../../tsup.config.js';
|
|||
|
||||
export default createTsupConfig({
|
||||
entry: ['src/index.ts', 'src/formatTag/index.ts', 'src/uploadDocumentation/index.ts'],
|
||||
format: ['esm'],
|
||||
minify: true,
|
||||
dts: false,
|
||||
format: 'esm',
|
||||
minify: 'terser',
|
||||
keepNames: false,
|
||||
sourcemap: false,
|
||||
});
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
"@microsoft/tsdoc": "0.14.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { createTsupConfig } from '../../tsup.config.js';
|
||||
|
||||
export default createTsupConfig({
|
||||
minify: true,
|
||||
minify: 'terser',
|
||||
keepNames: false,
|
||||
});
|
||||
|
|
|
@ -65,13 +65,13 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -62,12 +62,12 @@
|
|||
"discord-api-types": "0.37.54",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"ts-mixer": "^6.0.3",
|
||||
"tslib": "^2.6.1"
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"downlevel-dts": "^0.11.0",
|
||||
|
@ -75,7 +75,7 @@
|
|||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -54,14 +54,14 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -64,14 +64,14 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -13,7 +13,10 @@ import type {
|
|||
import type { WebhooksAPI } from './webhook.js';
|
||||
|
||||
export class InteractionsAPI {
|
||||
public constructor(private readonly rest: REST, private readonly webhooks: WebhooksAPI) {}
|
||||
public constructor(
|
||||
private readonly rest: REST,
|
||||
private readonly webhooks: WebhooksAPI,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Replies to an interaction
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@types/prompts": "^2.4.4",
|
||||
"@types/validate-npm-package-name": "^4.0.0",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
|
@ -62,7 +62,7 @@
|
|||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"terser": "^5.19.2",
|
||||
"tsup": "^7.2.0",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
"lint": "deno lint",
|
||||
"deploy": "deno run --allow-read --allow-env --allow-net src/util/deploy.ts",
|
||||
"format": "deno fmt",
|
||||
"fmt": "deno fmt",
|
||||
"start": "deno run --allow-read --allow-env --allow-net src/index.ts"
|
||||
},
|
||||
"lint": {
|
||||
|
|
|
@ -56,28 +56,28 @@
|
|||
"@discordjs/rest": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"@discordjs/ws": "workspace:^",
|
||||
"@sapphire/snowflake": "^3.5.1",
|
||||
"@types/ws": "^8.5.5",
|
||||
"@sapphire/snowflake": "3.5.1",
|
||||
"@types/ws": "8.5.5",
|
||||
"discord-api-types": "0.37.54",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"lodash.snakecase": "^4.1.1",
|
||||
"tslib": "^2.6.1",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"lodash.snakecase": "4.1.1",
|
||||
"tslib": "2.6.2",
|
||||
"undici": "5.23.0",
|
||||
"ws": "^8.13.0"
|
||||
"ws": "8.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@discordjs/docgen": "workspace:^",
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@types/node": "16.18.40",
|
||||
"dtslint": "^4.2.1",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"jest": "^29.6.2",
|
||||
"prettier": "^2.8.8",
|
||||
"tsd": "^0.28.1",
|
||||
"tslint": "^6.1.3",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6"
|
||||
"@favware/cliff-jumper": "2.1.1",
|
||||
"@types/node": "16.18.41",
|
||||
"dtslint": "4.2.1",
|
||||
"eslint": "8.47.0",
|
||||
"eslint-formatter-pretty": "5.0.0",
|
||||
"jest": "29.6.3",
|
||||
"prettier": "3.0.2",
|
||||
"tsd": "0.28.1",
|
||||
"tslint": "6.1.3",
|
||||
"turbo": "1.10.12",
|
||||
"typescript": "5.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
|
|
22
packages/discord.js/typings/index.d.ts
vendored
22
packages/discord.js/typings/index.d.ts
vendored
|
@ -1945,21 +1945,17 @@ export class LimitedCollection<K, V> extends Collection<K, V> {
|
|||
|
||||
export type MessageComponentType = Exclude<ComponentType, ComponentType.TextInput | ComponentType.ActionRow>;
|
||||
|
||||
export type MessageCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> =
|
||||
| {
|
||||
componentType?: T;
|
||||
} & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
||||
export type MessageCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> = {
|
||||
componentType?: T;
|
||||
} & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
||||
|
||||
export type MessageChannelCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> =
|
||||
| {
|
||||
componentType?: T;
|
||||
} & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
||||
export type MessageChannelCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> = {
|
||||
componentType?: T;
|
||||
} & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
||||
|
||||
export type AwaitMessageCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> =
|
||||
| { componentType?: T } & Pick<
|
||||
InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
|
||||
keyof AwaitMessageComponentOptions<any>
|
||||
>;
|
||||
export type AwaitMessageCollectorOptionsParams<T extends MessageComponentType, Cached extends boolean = boolean> = {
|
||||
componentType?: T;
|
||||
} & Pick<InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>, keyof AwaitMessageComponentOptions<any>>;
|
||||
|
||||
export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
|
||||
Button: ButtonInteraction<Cached>;
|
||||
|
|
|
@ -43,18 +43,18 @@
|
|||
"dependencies": {
|
||||
"commander": "^11.0.0",
|
||||
"jsdoc-to-markdown": "^8.0.0",
|
||||
"tslib": "^2.6.1",
|
||||
"tslib": "^2.6.2",
|
||||
"typedoc": "^0.24.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@types/jsdoc-to-markdown": "^7.0.3",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6"
|
||||
|
|
|
@ -2,7 +2,10 @@ import type { DeclarationReflection } from 'typedoc';
|
|||
import type { Config, Item } from '../interfaces/index.js';
|
||||
|
||||
export class DocumentedItem<T = DeclarationReflection | Item> {
|
||||
public constructor(public readonly data: T, public readonly config: Config) {}
|
||||
public constructor(
|
||||
public readonly data: T,
|
||||
public readonly config: Config,
|
||||
) {}
|
||||
|
||||
public serialize(): unknown {
|
||||
try {
|
||||
|
|
|
@ -2,6 +2,9 @@ import { createTsupConfig } from '../../tsup.config.js';
|
|||
|
||||
export default createTsupConfig({
|
||||
entry: ['src/index.ts', 'src/cli.ts'],
|
||||
minify: true,
|
||||
dts: false,
|
||||
format: 'esm',
|
||||
minify: 'terser',
|
||||
keepNames: false,
|
||||
sourcemap: false,
|
||||
});
|
||||
|
|
|
@ -51,13 +51,13 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -65,14 +65,14 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -46,15 +46,15 @@
|
|||
"dependencies": {
|
||||
"@discordjs/proxy": "workspace:^",
|
||||
"@discordjs/rest": "workspace:^",
|
||||
"tslib": "^2.6.1"
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import { createTsupConfig } from '../../tsup.config.js';
|
||||
|
||||
export default createTsupConfig({
|
||||
format: ['esm'],
|
||||
minify: true,
|
||||
dts: false,
|
||||
format: 'esm',
|
||||
minify: 'terser',
|
||||
keepNames: false,
|
||||
});
|
||||
|
|
|
@ -58,20 +58,20 @@
|
|||
"dependencies": {
|
||||
"@discordjs/rest": "workspace:^",
|
||||
"@discordjs/util": "workspace:^",
|
||||
"tslib": "^2.6.1",
|
||||
"tslib": "^2.6.2",
|
||||
"undici": "5.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"@types/supertest": "^2.0.12",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"supertest": "^6.3.3",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
|
|
|
@ -73,20 +73,20 @@
|
|||
"@vladfrangu/async_event_emitter": "^2.2.2",
|
||||
"discord-api-types": "0.37.54",
|
||||
"magic-bytes.js": "^1.0.15",
|
||||
"tslib": "^2.6.1",
|
||||
"tslib": "^2.6.2",
|
||||
"undici": "5.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -50,19 +50,19 @@
|
|||
"@microsoft/tsdoc-config": "0.16.2",
|
||||
"commander": "^11.0.0",
|
||||
"fs-extra": "^11.1.1",
|
||||
"tslib": "^2.6.1",
|
||||
"tslib": "^2.6.2",
|
||||
"undici": "5.23.0",
|
||||
"yaml": "2.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^11.0.1",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -45,21 +45,21 @@
|
|||
"homepage": "https://discord.js.org",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.0.0",
|
||||
"@microsoft/api-extractor": "^7.34.4",
|
||||
"@types/node": "16.18.23",
|
||||
"@vitest/coverage-c8": "^0.30.1",
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.38.0",
|
||||
"eslint-config-neon": "^0.1.42",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.7",
|
||||
"tsup": "^6.7.0",
|
||||
"typescript": "^5.0.4",
|
||||
"vitest": "^0.29.8"
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"typescript": "^5.1.6",
|
||||
"vitest": "^0.34.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.11.0"
|
||||
"node": ">=18.16.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { createTsupConfig } from '../../tsup.config.js';
|
||||
|
||||
export default createTsupConfig({
|
||||
minify: true,
|
||||
minify: 'terser',
|
||||
keepNames: false,
|
||||
});
|
||||
|
|
|
@ -54,19 +54,19 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@react-icons/all-files": "^4.1.0",
|
||||
"@storybook/addon-essentials": "^7.3.1",
|
||||
"@storybook/addon-interactions": "^7.3.1",
|
||||
"@storybook/addon-links": "^7.3.1",
|
||||
"@storybook/addon-essentials": "^7.3.2",
|
||||
"@storybook/addon-interactions": "^7.3.2",
|
||||
"@storybook/addon-links": "^7.3.2",
|
||||
"@storybook/addon-styling": "^1.3.6",
|
||||
"@storybook/blocks": "^7.3.1",
|
||||
"@storybook/react": "^7.3.1",
|
||||
"@storybook/react-vite": "^7.3.1",
|
||||
"@storybook/blocks": "^7.3.2",
|
||||
"@storybook/react": "^7.3.2",
|
||||
"@storybook/react-vite": "^7.3.2",
|
||||
"@storybook/testing-library": "^0.2.0",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@types/react": "^18.2.20",
|
||||
"@types/react-dom": "^18.2.7",
|
||||
"@unocss/eslint-config": "^0.55.1",
|
||||
"@unocss/reset": "^0.55.1",
|
||||
"@unocss/eslint-config": "^0.55.2",
|
||||
"@unocss/reset": "^0.55.2",
|
||||
"@vitejs/plugin-react": "^4.0.4",
|
||||
"@vitest/coverage-c8": "^0.33.0",
|
||||
"chromatic": "^6.22.0",
|
||||
|
@ -75,12 +75,12 @@
|
|||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"eslint-plugin-storybook": "^0.6.13",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"prop-types": "^15.8.1",
|
||||
"storybook": "^7.3.1",
|
||||
"storybook": "^7.3.2",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
"unocss": "^0.55.1",
|
||||
"unocss": "^0.55.2",
|
||||
"vite": "^4.4.9",
|
||||
"vite-plugin-dts": "^3.5.2",
|
||||
"vitest": "^0.34.2"
|
||||
|
|
|
@ -55,13 +55,13 @@
|
|||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsd": "^0.28.1",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as VoiceConnection from '../src/VoiceConnection';
|
||||
import { joinVoiceChannel } from '../src/joinVoiceChannel';
|
||||
|
||||
const adapterCreator = () => ({ destroy: jest.fn(), send: jest.fn() } as any);
|
||||
const adapterCreator = () => ({ destroy: jest.fn(), send: jest.fn() }) as any;
|
||||
const createVoiceConnection = jest.spyOn(VoiceConnection, 'createVoiceConnection');
|
||||
|
||||
beforeAll(() => {
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
"@types/ws": "^8.5.5",
|
||||
"discord-api-types": "0.37.54",
|
||||
"prism-media": "^1.3.5",
|
||||
"tslib": "^2.6.1",
|
||||
"tslib": "^2.6.2",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -67,16 +67,16 @@
|
|||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/jest": "^29.5.3",
|
||||
"@types/node": "16.18.40",
|
||||
"@types/node": "16.18.41",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
"eslint": "^8.47.0",
|
||||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"jest": "^29.6.2",
|
||||
"jest": "^29.6.3",
|
||||
"jest-websocket-mock": "^2.4.1",
|
||||
"mock-socket": "^9.2.1",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"tweetnacl": "^1.0.3",
|
||||
|
|
|
@ -68,13 +68,13 @@
|
|||
"@types/ws": "^8.5.5",
|
||||
"@vladfrangu/async_event_emitter": "^2.2.2",
|
||||
"discord-api-types": "0.37.54",
|
||||
"tslib": "^2.6.1",
|
||||
"tslib": "^2.6.2",
|
||||
"ws": "^8.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@favware/cliff-jumper": "^2.1.1",
|
||||
"@microsoft/api-extractor": "^7.36.4",
|
||||
"@types/node": "18.17.5",
|
||||
"@types/node": "18.17.6",
|
||||
"@vitest/coverage-v8": "^0.34.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"esbuild-plugin-version-injector": "^1.2.0",
|
||||
|
@ -82,7 +82,7 @@
|
|||
"eslint-config-neon": "^0.1.47",
|
||||
"eslint-formatter-pretty": "^5.0.0",
|
||||
"mock-socket": "^9.2.1",
|
||||
"prettier": "^2.8.8",
|
||||
"prettier": "^3.0.2",
|
||||
"tsup": "^7.2.0",
|
||||
"turbo": "^1.10.12",
|
||||
"typescript": "^5.1.6",
|
||||
|
|
|
@ -19,7 +19,10 @@ export class SimpleContextFetchingStrategy implements IContextFetchingStrategy {
|
|||
return newThrottler;
|
||||
}
|
||||
|
||||
public constructor(private readonly manager: WebSocketManager, public readonly options: FetchingStrategyOptions) {}
|
||||
public constructor(
|
||||
private readonly manager: WebSocketManager,
|
||||
public readonly options: FetchingStrategyOptions,
|
||||
) {}
|
||||
|
||||
public async retrieveSessionInfo(shardId: number): Promise<SessionInfo | null> {
|
||||
return this.manager.options.retrieveSessionInfo(shardId);
|
||||
|
|
|
@ -17,6 +17,7 @@ export function createTsupConfig({
|
|||
dts = true,
|
||||
sourcemap = true,
|
||||
esbuildPlugins = [],
|
||||
treeshake = false,
|
||||
}: Options = {}) {
|
||||
return defineConfig({
|
||||
entry,
|
||||
|
@ -34,5 +35,6 @@ export function createTsupConfig({
|
|||
dts,
|
||||
sourcemap,
|
||||
esbuildPlugins,
|
||||
treeshake,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue