Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update deps and code as a result #813

Merged
merged 2 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions apps/bot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,51 +18,51 @@
"node": ">=v18.16.1"
},
"dependencies": {
"@discordjs/collection": "^1.5.2",
"@discordjs/collection": "^2.0.0",
"@lavaclient/spotify": "^3.1.0",
"@lavalink/encoding": "^0.1.2",
"@master-bot/api": "^0.1.0",
"@napi-rs/canvas": "^0.1.41",
"@prisma/client": "^5.1.1",
"@napi-rs/canvas": "^0.1.44",
"@prisma/client": "^5.6.0",
"@sapphire/decorators": "^6.0.2",
"@sapphire/discord.js-utilities": "^7.0.1",
"@sapphire/framework": "^4.5.1",
"@sapphire/plugin-hmr": "^2.0.1",
"@sapphire/discord.js-utilities": "^7.1.2",
"@sapphire/framework": "^4.8.2",
"@sapphire/plugin-hmr": "^2.0.3",
"@sapphire/time-utilities": "^1.7.10",
"@sapphire/utilities": "^3.13.0",
"@t3-oss/env-core": "^0.6.0",
"@trpc/client": "^10.37.1",
"@trpc/server": "^10.37.1",
"axios": "^1.4.0",
"@t3-oss/env-core": "^0.7.1",
"@trpc/client": "next",
"@trpc/server": "next",
"axios": "^1.6.2",
"colorette": "^2.0.20",
"discord.js": "^14.12.1",
"discord.js": "^14.14.1",
"genius-discord-lyrics": "1.0.5",
"google-translate-api-x": "^10.6.7",
"ioredis": "^5.3.2",
"iso-639-1": "^2.1.15",
"iso-639-1": "^3.1.0",
"lavaclient": "^4.1.1",
"metadata-filter": "^1.3.0",
"ncp": "^2.0.0",
"node-fetch": "^3.3.2",
"npm-run-all": "^4.1.5",
"string-progressbar": "^1.0.4",
"superjson": "1.13.1",
"winston": "^3.10.0",
"superjson": "1.13.3",
"winston": "^3.11.0",
"winston-daily-rotate-file": "^4.7.1",
"zod": "^3.21.4"
"zod": "^3.22.4"
},
"devDependencies": {
"@lavaclient/types": "^2.1.1",
"@sapphire/ts-config": "^4.0.1",
"@sapphire/ts-config": "^5.0.0",
"@types/ioredis": "^4.28.10",
"@types/node": "^20.4.6",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"@types/node": "^20.9.3",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"dotenv": "^16.3.1",
"dotenv-cli": "^7.2.1",
"prettier": "^3.0.1",
"tslib": "^2.6.1",
"typescript": "^5.1.6"
"dotenv-cli": "^7.3.0",
"prettier": "^3.1.0",
"tslib": "^2.6.2",
"typescript": "^5.3.2"
},
"eslintConfig": {
"root": true,
Expand Down
2 changes: 1 addition & 1 deletion apps/bot/src/lib/music/buttonsCollector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default async function buttonsCollector(message: Message, song: Song) {
if (!channel) return;

const maxLimit = Time.Minute * 30;
let timer: NodeJS.Timer;
let timer;

collector.on('collect', async (i: MessageComponentInteraction) => {
if (!message.member?.voice.channel?.members.has(i.user.id)) {
Expand Down
4 changes: 2 additions & 2 deletions apps/bot/src/lib/structures/ExtendedClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { deletePlayerEmbed } from '../music/buttonsCollector';

export class ExtendedClient extends SapphireClient {
readonly music: QueueClient;
leaveTimers: { [key: string]: NodeJS.Timer };
leaveTimers: { [key: string]: NodeJS.Timeout };
public constructor() {
super({
intents: [
Expand Down Expand Up @@ -65,7 +65,7 @@ export class ExtendedClient extends SapphireClient {
declare module '@sapphire/framework' {
interface SapphireClient {
readonly music: QueueClient;
leaveTimers: { [key: string]: NodeJS.Timer };
leaveTimers: { [key: string]: NodeJS.Timeout };
}
}

Expand Down
3 changes: 0 additions & 3 deletions apps/dashboard/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const config = {
typescript: { ignoreBuildErrors: true },
images: {
domains: ['cdn.discordapp.com']
},
experimental: {
serverActions: true
}
};

Expand Down
54 changes: 27 additions & 27 deletions apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,44 +16,44 @@
"@master-bot/api": "^0.1.0",
"@master-bot/auth": "^0.1.0",
"@master-bot/db": "^0.1.0",
"@radix-ui/react-dropdown-menu": "^2.0.5",
"@radix-ui/react-select": "^1.2.2",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-toast": "^1.1.4",
"@t3-oss/env-nextjs": "^0.6.0",
"@tanstack/react-query": "^4.32.1",
"@tanstack/react-query-devtools": "^4.32.1",
"@tanstack/react-query-next-experimental": "5.0.0-alpha.80",
"@trpc/client": "^10.37.1",
"@trpc/next": "^10.37.1",
"@trpc/react-query": "^10.37.1",
"@trpc/server": "^10.37.1",
"@radix-ui/react-toast": "^1.1.5",
"@t3-oss/env-nextjs": "^0.7.1",
"@tanstack/react-query": "^5.8.4",
"@tanstack/react-query-devtools": "^5.8.4",
"@tanstack/react-query-next-experimental": "5.8.4",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
"@trpc/server": "next",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"discord-api-types": "^0.37.51",
"lucide-react": "^0.263.1",
"next": "^13.4.12",
"discord-api-types": "^0.37.64",
"lucide-react": "^0.292.0",
"next": "^14.0.3",
"next-themes": "^0.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"superjson": "1.13.1",
"tailwind-merge": "^1.14.0",
"tailwindcss-animate": "^1.0.6",
"zod": "^3.21.4"
"superjson": "1.13.3",
"tailwind-merge": "^2.0.0",
"tailwindcss-animate": "^1.0.7",
"zod": "^3.22.4"
},
"devDependencies": {
"@master-bot/eslint-config": "^0.2.0",
"@master-bot/tailwind-config": "^0.1.0",
"@types/node": "^20.4.6",
"@types/react": "^18.2.18",
"@types/react-dom": "^18.2.7",
"autoprefixer": "^10.4.14",
"dotenv-cli": "^7.2.1",
"eslint": "^8.46.0",
"postcss": "^8.4.27",
"tailwindcss": "^3.3.3",
"typescript": "^5.1.6"
"@types/node": "^20.9.3",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.16",
"autoprefixer": "^10.4.16",
"dotenv-cli": "^7.3.0",
"eslint": "^8.54.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5",
"typescript": "^5.3.2"
},
"eslintConfig": {
"root": true,
Expand Down
38 changes: 6 additions & 32 deletions apps/dashboard/src/app/api/trpc/[trpc]/route.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,12 @@
import { appRouter, createTRPCContext } from '@master-bot/api';
import { fetchRequestHandler } from '@trpc/server/adapters/fetch';
import { auth } from '@master-bot/auth';

export const runtime = 'nodejs';

/**
* Configure basic CORS headers
* You should extend this to match your needs
*/
function setCorsHeaders(res: Response) {
res.headers.set('Access-Control-Allow-Origin', '*');
res.headers.set('Access-Control-Request-Method', '*');
res.headers.set('Access-Control-Allow-Methods', 'OPTIONS, GET, POST');
res.headers.set('Access-Control-Allow-Headers', '*');
}

export function OPTIONS() {
const response = new Response(null, {
status: 204
});
setCorsHeaders(response);
return response;
}
import { appRouter, createTRPCContext } from '@master-bot/api';

const handler = auth(async req => {
const response = await fetchRequestHandler({
endpoint: '/api/trpc',
router: appRouter,
const handler = (req: Request) =>
fetchRequestHandler({
req,
createContext: () => createTRPCContext({ auth: req.auth, req })
router: appRouter,
endpoint: '/api/trpc',
createContext: createTRPCContext
});

setCorsHeaders(response);
return response;
});

export { handler as GET, handler as POST };
3 changes: 0 additions & 3 deletions apps/dashboard/src/components/auth.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { ComponentProps } from 'react';
import type { OAuthProviders } from '@master-bot/auth';
import { CSRF_experimental } from '@master-bot/auth';

export function SignIn({
provider,
Expand All @@ -9,7 +8,6 @@ export function SignIn({
return (
<form action={`/api/auth/signin/${provider}`} method="post">
<button {...props} />
<CSRF_experimental />
</form>
);
}
Expand All @@ -18,7 +16,6 @@ export function SignOut(props: ComponentProps<'button'>) {
return (
<form action="/api/auth/signout" method="post">
<button {...props} />
<CSRF_experimental />
</form>
);
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "master-bot-turbo",
"private": true,
"engines": {
"node": ">=v18.16.1"
"node": ">=v20.0.0"
},
"packageManager": "[email protected]",
"scripts": {
Expand All @@ -22,11 +22,11 @@
"docker-compose": "docker compose --env-file docker.env up -d --build"
},
"dependencies": {
"@ianvs/prettier-plugin-sort-imports": "^4.1.0",
"@ianvs/prettier-plugin-sort-imports": "^4.1.1",
"@manypkg/cli": "^0.21.0",
"prettier": "^3.0.1",
"prettier-plugin-tailwindcss": "^0.4.1",
"turbo": "^1.10.12",
"typescript": "^5.1.6"
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7",
"turbo": "^1.10.16",
"typescript": "^5.3.2"
}
}
18 changes: 9 additions & 9 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
"dependencies": {
"@master-bot/auth": "^0.1.0",
"@master-bot/db": "^0.1.0",
"@t3-oss/env-core": "^0.6.0",
"@trpc/client": "^10.37.1",
"@trpc/server": "^10.37.1",
"axios": "^1.4.0",
"discord-api-types": "^0.37.51",
"superjson": "1.13.1",
"zod": "^3.21.4"
"@t3-oss/env-core": "^0.7.1",
"@trpc/client": "next",
"@trpc/server": "next",
"axios": "^1.6.2",
"discord-api-types": "^0.37.64",
"superjson": "1.13.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@master-bot/eslint-config": "^0.2.0",
"dotenv": "^16.3.1",
"eslint": "^8.46.0",
"typescript": "^5.1.6"
"eslint": "^8.54.0",
"typescript": "^5.3.2"
},
"eslintConfig": {
"root": true,
Expand Down
3 changes: 1 addition & 2 deletions packages/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const scope = ['identify', 'guilds', 'email'].join(' ');

export const {
handlers: { GET, POST },
auth,
CSRF_experimental
auth
} = NextAuth({
adapter: {
...PrismaAdapter(prisma),
Expand Down
16 changes: 8 additions & 8 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@auth/core": "^0.10.0",
"@auth/prisma-adapter": "^1.0.1",
"@auth/core": "^0.18.3",
"@auth/prisma-adapter": "^1.0.8",
"@master-bot/db": "^0.1.0",
"@t3-oss/env-nextjs": "^0.6.0",
"next": "^13.4.12",
"next-auth": "^0.0.0-manual.b53ca00b",
"@t3-oss/env-nextjs": "^0.7.1",
"next": "^14.0.3",
"next-auth": "5.0.0-beta.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"zod": "^3.21.4"
"zod": "^3.22.4"
},
"devDependencies": {
"@master-bot/eslint-config": "^0.2.0",
"eslint": "^8.46.0",
"typescript": "^5.1.6"
"eslint": "^8.54.0",
"typescript": "^5.3.2"
},
"eslintConfig": {
"root": true,
Expand Down
22 changes: 11 additions & 11 deletions packages/config/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
"./react.js"
],
"dependencies": {
"@next/eslint-plugin-next": "^13.4.12",
"@types/eslint": "^8.44.1",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"eslint-config-prettier": "^8.10.0",
"eslint-config-turbo": "^1.10.12",
"eslint-plugin-import": "^2.28.0",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.1",
"@next/eslint-plugin-next": "^14.0.3",
"@types/eslint": "^8.44.7",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-turbo": "^1.10.16",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0"
},
"devDependencies": {
"eslint": "^8.46.0",
"typescript": "^5.1.6"
"eslint": "^8.54.0",
"typescript": "^5.3.2"
}
}
6 changes: 3 additions & 3 deletions packages/config/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"postcss.js"
],
"devDependencies": {
"autoprefixer": "^10.4.14",
"postcss": "^8.4.27",
"tailwindcss": "^3.3.3"
"autoprefixer": "^10.4.16",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.5"
}
}
Loading