Skip to content

Commit

Permalink
Merge pull request #273 from carolinaisslaying/resolve-commits
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaisslaying authored Apr 15, 2024
2 parents c7a014c + 089740f commit 034f4b0
Show file tree
Hide file tree
Showing 168 changed files with 10,414 additions and 18,439 deletions.
22 changes: 0 additions & 22 deletions .env.production.sample

This file was deleted.

30 changes: 18 additions & 12 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ jobs:
name: node v18 - tsc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install node v18
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: installs pnpm
uses: pnpm/action-setup@v2
with:
node-version: 18
cache: 'npm'
version: 8.15.5
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- name: dependencies
run: npm ci
run: pnpm i
- name: settings
run: cp settings.example.json settings.json
- name: tsc
Expand All @@ -29,14 +32,17 @@ jobs:
name: node v20 - tsc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install node v20
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: installs pnpm
uses: pnpm/action-setup@v2
with:
version: 8.15.5
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
node-version: '20'
cache: 'pnpm'
- name: dependencies
run: npm ci
run: pnpm i
- name: settings
run: cp settings.example.json settings.json
- name: tsc
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,6 @@ dump.rdb
# Sitemap
src/Assets/Public/sitemap.xml

# Yarn is disgusting
# We only use pnpm
yarn.lock
package-lock.json
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shamefully-hoist=true
7 changes: 6 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
node_modules
node_modules
assets
dist
docs
scripts
views
8 changes: 2 additions & 6 deletions @types/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Discord Extreme List - Discord's unbiased list.
Copyright (C) 2020 Carolina Mitchell, John Burke, Advaith Jagathesan
Copyright (C) 2020-2024 Carolina Mitchell, John Burke, Advaith Jagathesan
t
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
Expand All @@ -17,17 +17,16 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import { BrowserDetectInfo } from "browser-detect/dist/types/browser-detect.interface";
import { Db } from "mongodb";
import { Redis } from "ioredis";
import strings from "del-i18n/website/en-NZ.json"

declare global {
var redis: Redis;
var announcement: announcement;
var ddosMode: ddosMode;
var libs: library[];
var db: Db;
var env_prod: boolean;
}

declare module "sanitize-html" {
Expand All @@ -52,14 +51,11 @@ declare module "express-serve-static-core" {
user?: authUser;
locale: any;
setLocale(language: string): any;
browser: BrowserDetectInfo;
device: {
type: string;
};
del: {
version: string;
channel: string;
cssVersion: string;
node: string;
};
}
Expand Down
3 changes: 2 additions & 1 deletion @types/del.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Discord Extreme List - Discord's unbiased list.
Copyright (C) 2020 Carolina Mitchell, John Burke, Advaith Jagathesan
Copyright (C) 2020-2024 Carolina Mitchell, John Burke, Advaith Jagathesan
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
Expand Down Expand Up @@ -202,6 +202,7 @@ declare global {
longDesc: string;
modNotes: string;
reviewNotes: reviewNote[];
lastDenyReason: string;
editors: string[];
commands: APIApplicationCommand[];
userFlags?: UserFlags;
Expand Down
2 changes: 1 addition & 1 deletion @types/enums.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Discord Extreme List - Discord's unbiased list.
Copyright (C) 2020 Carolina Mitchell, John Burke, Advaith Jagathesan
Copyright (C) 2020-2024 Carolina Mitchell, John Burke, Advaith Jagathesan
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
Expand Down
15 changes: 0 additions & 15 deletions @types/express-device.d.ts

This file was deleted.

90 changes: 0 additions & 90 deletions @types/fetch.d.ts

This file was deleted.

9 changes: 1 addition & 8 deletions @types/webOptions.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Discord Extreme List - Discord's unbiased list.
Copyright (C) 2020 Carolina Mitchell, John Burke, Advaith Jagathesan
Copyright (C) 2020-2024 Carolina Mitchell, John Burke, Advaith Jagathesan
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
Expand All @@ -26,13 +26,6 @@ interface announcement {
foreground: string;
}

interface ddosMode {
_id?: string;
id?: string;
active: boolean;
requests: number;
}

interface botStats {
_id: string;
id?: string;
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
![GitHub Licence](https://img.shields.io/github/license/discordextremelist/website?logo=gnu&label=licence)
[![Code style](https://img.shields.io/badge/code%20style-prettier-ff69b4?logo=prettier&logoColor=white)](https://prettier.io)
[![Crowdin](https://badges.crowdin.net/delly/localized.svg)](https://translate.discordextremelist.xyz/project/delly)
[![DeepScan grade](https://deepscan.io/api/teams/8370/projects/12889/branches/206397/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=8370&pid=12889&bid=206397)

## Issues
* **Security vulnerabilities:** Please do not open up an issue to report a security vulnerability with DEL. Have a look at our security policy located in [SECURITY.md](https://github.com/discordextremelist/website/blob/main/.github/SECURITY.md)
Expand Down
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# syntax=docker/dockerfile:1.4
# NOTE: You should have made a settings.json file before running docker compose.
# Node v17 is EOL, Node v18 is current
ARG NODE_VERSION="18.15.0-alpine3.16"
ARG NODE_VERSION="20.11.1-alpine3.19"
FROM node:${NODE_VERSION}
# Copy to-be-compiled files to container filesystem
COPY . /opt/del
Expand All @@ -10,11 +9,15 @@ WORKDIR /opt/del
# Run apt update & add needed packages
RUN apk update && \
apk add git ca-certificates
# Enable pnpm
RUN corepack enable pnpm
# Install node modules
RUN npm ci --production
RUN CI=true pnpm i
# Compile new dist file
RUN npx tsc-transpile-only
# Compile library module so it is readable by src
RUN pnpm run lib-compile
# Remove non-dist files
RUN rm -rf src/ @types/ .env.production
# Start the process within the container
CMD ["npm", "start"]
CMD ["pnpm", "start"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
[![Discord](https://img.shields.io/discord/568567800910839811?color=5865f2&logo=discord&logoColor=white)](https://discord.gg/WeCer3J)
[![Code style](https://img.shields.io/badge/code%20style-prettier-ff69b4?logo=prettier&logoColor=white)](https://prettier.io)
[![Crowdin](https://badges.crowdin.net/delly/localized.svg)](https://translate.discordextremelist.xyz/project/delly)
[![DeepScan grade](https://deepscan.io/api/teams/8370/projects/12889/branches/206397/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=8370&pid=12889&bid=206397)

Licensing information viewable in the [LICENSE](https://github.com/discordextremelist/website/blob/main/LICENSE) file.

Expand All @@ -22,7 +21,7 @@ Note that we do not support running public clones of the project: you are allowe

### Node.js

DEL requires [Node.js](https://nodejs.org) v18.15.0+.
DEL requires [Node.js](https://nodejs.org) v18.15.0+. We recommend using the latest v20 LTS version.

### MongoDB

Expand Down
Loading

0 comments on commit 034f4b0

Please sign in to comment.