Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mvarendorff committed Oct 5, 2024
1 parent 0dcd69e commit 38a9a85
Show file tree
Hide file tree
Showing 13 changed files with 202 additions and 206 deletions.
4 changes: 1 addition & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
node_modules
.yarn/cache/
.yarn/build-state.yml
.yarn/install-state.gz
.yarn

packages/server/dist
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,6 @@ modules.xml
# Yarn 2
.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

# Env
*.env
7 changes: 3 additions & 4 deletions packages/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ FROM base AS deps
WORKDIR /app

# Copy yarn data
COPY .yarn/ ./.yarn/
COPY .yarnrc.yml ./
COPY yarn.lock package.json ./

# Copy package.jsons of all related packages
COPY packages/server/package.json ./packages/server/
COPY packages/server/prisma ./packages/server/prisma

# Install dependencies for the workspace
WORKDIR /app/packages/server
Expand All @@ -27,12 +27,11 @@ COPY --from=deps /app/packages/server /app/packages/server
COPY --from=deps /app/node_modules /app/node_modules

# Copy dependency information and source, then build
COPY yarn.lock .
COPY package.json .
COPY yarn.lock package.json .yarnrc.yml .
COPY packages/server /app/packages/server
WORKDIR /app/packages/server

RUN yarn prisma generate && yarn build
RUN yarn build

# Build the actual running server
FROM base
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@koa/cors": "^5.0.0",
"@koa/router": "13.1.0",
"@prisma/client": "5.20.0",
"discord.js": "14.16.2",
"discord.js": "14.16.3",
"dotenv": "16.4.5",
"glob": "11.0.0",
"grant": "5.4.23",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ export class MatchingCron {

private static async explainUnfortunateCircumstances(firstMessage: Message) {
await firstMessage.delete();
if (!firstMessage.channel.isSendable()) return;

await firstMessage.channel.send(
'Right, this one is going to be disappointing... I had already matched you ' +
'but your match had their DMs disabled, so I had to rollback everything.\n\n' +
Expand Down
8 changes: 2 additions & 6 deletions packages/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ RUN apk add --no-cache libc6-compat && \

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Copy yarn data
COPY .yarn/ ./.yarn/
COPY .yarnrc.yml ./
COPY yarn.lock package.json ./

Expand All @@ -31,8 +28,7 @@ COPY --from=deps /app/packages/web/ ./packages/web/
COPY --from=deps /app/node_modules/ ./node_modules/

# Copy dependency information and source, then build
COPY yarn.lock .
COPY package.json .
COPY package.json yarn.lock .yarnrc.yml ./
COPY packages/web/ ./packages/web
WORKDIR /app/packages/web

Expand All @@ -52,7 +48,7 @@ COPY --from=builder /app/packages/web/public/ ./packages/web/public/
COPY --from=builder /app/packages/web/build/ ./packages/web/build/
COPY --from=builder /app/packages/web/package.json ./packages/web/

COPY yarn.lock package.json ./
COPY yarn.lock .yarnrc.yml package.json ./

EXPOSE 3000

Expand Down
2 changes: 1 addition & 1 deletion packages/web/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
27 changes: 13 additions & 14 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"@graphql-codegen/near-operation-file-preset": "3.0.0",
"@graphql-codegen/typescript-graphql-request": "^6.2.0",
"@graphql-codegen/typescript-operations": "^4.2.3",
"@next/bundle-analyzer": "^15.0.0-canary.104",
"@next/eslint-plugin-next": "^15.0.0-canary.104",
"@next/bundle-analyzer": "^15.0.0-canary.173",
"@next/eslint-plugin-next": "^15.0.0-canary.173",
"@parcel/watcher": "^2.4.1",
"@storybook/addon-essentials": "^8.3.3",
"@storybook/addon-interactions": "^8.3.3",
Expand All @@ -45,15 +45,15 @@
"@types/cookie": "0.6.0",
"@types/eslint": "^8.56.12",
"@types/node-cron": "^3.0.11",
"@types/pg": "^8.11.10",
"@types/pg": "8.10.2",
"@types/prettier": "^3.0.0",
"autoprefixer": "^10.4.20",
"chromatic": "^11.10.4",
"concurrently": "^8.2.2",
"cross-env": "^7.0.3",
"env-cmd": "^10.1.0",
"eslint": "^8.57.1",
"eslint-config-next": "^15.0.0-canary.104",
"eslint-config-next": "^15.0.0-canary.173",
"eslint-plugin-storybook": "^0.9.0",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
Expand All @@ -67,26 +67,25 @@
"@ebay/nice-modal-react": "^1.2.13",
"@heroicons/react": "^2.1.5",
"@icons-pack/react-simple-icons": "^10.0.0",
"@payloadcms/db-postgres": "3.0.0-beta.109",
"@payloadcms/next": "3.0.0-beta.109",
"@payloadcms/richtext-slate": "3.0.0-beta.109",
"@payloadcms/ui": "3.0.0-beta.109",
"@payloadcms/db-postgres": "3.0.0-beta.111",
"@payloadcms/next": "3.0.0-beta.111",
"@payloadcms/richtext-slate": "3.0.0-beta.111",
"@payloadcms/ui": "3.0.0-beta.111",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"cookie": "0.6.0",
"drizzle-orm": "0.32.1",
"framer-motion": "^11.8.0",
"graphql": "16.9.0",
"graphql-request": "^7.1.0",
"graphql-scalars": "1.23.0",
"next": "15.0.0-canary.104",
"next": "15.0.0-canary.173",
"node-cron": "^3.0.3",
"payload": "3.0.0-beta.109",
"pg": "^8.13.0",
"payload": "3.0.0-beta.111",
"pg": "8.11.3",
"pg-connection-string": "^2.7.0",
"react": "^19.0.0-rc-06d0b89e-20240801",
"react": "^19.0.0-rc-3edc000d-20240926",
"react-animate-height": "^3.2.3",
"react-dom": "^19.0.0-rc-06d0b89e-20240801",
"react-dom": "^19.0.0-rc-3edc000d-20240926",
"react-hook-form": "^7.53.0",
"react-ssr-prepass": "1.5.0",
"sharp": "0.33.5",
Expand Down
3 changes: 3 additions & 0 deletions packages/web/src/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import {Providers} from './providers';

import '../../../styles/globals.css';

// TODO see if we can get rid of this again in the future
export const dynamic = 'force-dynamic';

const roboto = Roboto({
weight: ['400', '900'],
subsets: ['latin'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import config from '@payload-config';
import {importMap} from '../importMap';

type Args = {
params: {
params: Promise<{
segments: string[];
};
searchParams: {
}>;
searchParams: Promise<{
[key: string]: string | string[];
};
}>;
};

const NotFound = ({params, searchParams}: Args) =>
Expand Down
8 changes: 4 additions & 4 deletions packages/web/src/app/(payload)/admin/[[...segments]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import {importMap} from '../importMap';
/* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */

type Args = {
params: {
params: Promise<{
segments: string[];
};
searchParams: {
}>;
searchParams: Promise<{
[key: string]: string | string[];
};
}>;
};

export const generateMetadata = ({
Expand Down
4 changes: 2 additions & 2 deletions packages/web/src/app/(payload)/collections/groupchats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const Groupchats: CollectionConfig = {
type: 'text',
required: true,
validate: async (
nameValue,
nameValue: string | string[] | undefined | null,
{
data,
req,
Expand Down Expand Up @@ -120,7 +120,7 @@ export const Groupchats: CollectionConfig = {
],
},
validate: (
url,
url: string | string[] | undefined | null,
{
data,
}: ValidateOptions<
Expand Down
Loading

0 comments on commit 38a9a85

Please sign in to comment.