Skip to content

Commit 635f3dc

Browse files
committed
Merge branch 'master' into stock
2 parents eabfab3 + c8bffa0 commit 635f3dc

558 files changed

Lines changed: 7428 additions & 1097 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
**/node_modules
1010
**/dist
11+
**/.pnpm-store
12+
**/.docker
1113

1214
**/*.log
1315
**/npm-debug.log*
@@ -35,6 +37,7 @@
3537
# Debug files
3638
**/*.debug.ts
3739
**/*.debug.js
40+
/debug
3841

3942
**/.vscode
4043

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
package-lock.json binary
2+
pnpm-lock.yaml binary

.github/workflows/codequality.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88

9-
strategy:
10-
matrix:
11-
node-version: [22]
12-
139
steps:
14-
- uses: actions/checkout@v1
15-
- name: Use Node.js ${{ matrix.node-version }}
16-
uses: actions/setup-node@v1
10+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
11+
12+
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
1713
with:
18-
node-version: ${{ matrix.node-version }}
19-
- name: npm install, lint, code style check
20-
run: |
21-
npm ci
22-
npm run lint
23-
npm run codestyle-check
14+
node-version: 24
15+
16+
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
17+
with:
18+
version: 10.19.0
19+
run_install: true
20+
21+
- run: |
22+
pnpm run lint
23+
pnpm run codestyle-check

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ build/Release
4040
# Dependency directories
4141
node_modules/
4242
jspm_packages/
43+
.pnpm-store
4344

4445
# Typescript v1 declaration files
4546
typings/

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22
1+
24

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
The project is called Zeppelin. It's a Discord bot that uses Discord.js. The bot is built on the Knub framework.
1+
The project is called Zeppelin. It's a Discord bot that uses Discord.js. The bot is built on the Vety framework (formerly called Knub).
22

33
This repository is a monorepository that contains these projects:
44
1. **Backend**: The shared codebase of the bot and API. Located in `backend`.

Dockerfile

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
FROM node:22 AS build
1+
FROM node:24 AS build
2+
3+
ARG COMMIT_HASH
4+
ARG BUILD_TIME
25

36
RUN mkdir /zeppelin
47
RUN chown node:node /zeppelin
58

9+
# Install pnpm
10+
RUN npm install -g pnpm@10.19.0
11+
612
USER node
713

814
# Install dependencies before copying over any other files
9-
COPY --chown=node:node package.json package-lock.json /zeppelin
15+
COPY --chown=node:node package.json pnpm-workspace.yaml pnpm-lock.yaml /zeppelin
1016
RUN mkdir /zeppelin/backend
1117
COPY --chown=node:node backend/package.json /zeppelin/backend
1218
RUN mkdir /zeppelin/shared
@@ -15,23 +21,33 @@ RUN mkdir /zeppelin/dashboard
1521
COPY --chown=node:node dashboard/package.json /zeppelin/dashboard
1622

1723
WORKDIR /zeppelin
18-
RUN npm ci
24+
RUN CI=true pnpm install
1925

2026
COPY --chown=node:node . /zeppelin
2127

2228
# Build backend
2329
WORKDIR /zeppelin/backend
24-
RUN npm run build
30+
RUN pnpm run build
2531

2632
# Build dashboard
2733
WORKDIR /zeppelin/dashboard
28-
RUN npm run build
34+
RUN pnpm run build
2935

30-
# Prune dev dependencies
36+
# Only keep prod dependencies
3137
WORKDIR /zeppelin
32-
RUN npm prune --omit=dev
38+
RUN CI=true pnpm install --prod
39+
40+
# Add version info
41+
RUN echo "${COMMIT_HASH}" > /zeppelin/.commit-hash
42+
RUN echo "${BUILD_TIME}" > /zeppelin/.build-time
43+
44+
# --- Main image ---
3345

34-
FROM node:22-alpine AS main
46+
FROM node:24-alpine AS main
47+
48+
RUN npm install -g pnpm@10.19.0
3549

3650
USER node
3751
COPY --from=build --chown=node:node /zeppelin /zeppelin
52+
53+
WORKDIR /zeppelin

backend/package.json

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,78 +11,71 @@
1111
"watch": "tsc-watch --build --onSuccess \"node start-dev.js\"",
1212
"watch-yaml-parse-test": "tsc-watch --build --onSuccess \"node dist/yamlParseTest.js\"",
1313
"build": "tsc --build",
14-
"start-bot-dev": "node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/index.js",
15-
"start-bot-dev-debug": "DEBUG=true clinic heapprofiler --collect-only --dest .clinic-bot -- node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9229 dist/index.js",
16-
"start-bot-prod": "node --enable-source-maps --stack-trace-limit=30 dist/index.js",
17-
"start-bot-prod-debug": "DEBUG=true clinic heapprofiler --collect-only --dest .clinic-bot -- node --enable-source-maps --stack-trace-limit=30 dist/index.js",
18-
"watch-bot": "tsc-watch --build --onSuccess \"npm run start-bot-dev\"",
14+
"typecheck": "tsc --noEmit",
15+
"start-bot-dev": "node --enable-source-maps --stack-trace-limit=30 --trace-warnings --inspect=0.0.0.0:9229 dist/index.js",
16+
"start-bot-prod": "node --enable-source-maps --stack-trace-limit=30 --trace-warnings dist/index.js",
17+
"watch-bot": "tsc-watch --build --onSuccess \"pnpm run start-bot-dev\"",
1918
"start-api-dev": "node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/api/index.js",
20-
"start-api-dev-debug": "DEBUG=true clinic heapprofiler --collect-only --dest .clinic-api -- node --enable-source-maps --stack-trace-limit=30 --inspect=0.0.0.0:9239 dist/api/index.js",
2119
"start-api-prod": "node --enable-source-maps --stack-trace-limit=30 dist/api/index.js",
22-
"start-api-prod-debug": "clinic heapprofiler --collect-only --dest .clinic-api -- node --enable-source-maps --stack-trace-limit=30 dist/api/index.js",
23-
"watch-api": "tsc-watch --build --onSuccess \"npm run start-api-dev\"",
24-
"typeorm": "node ../node_modules/typeorm/cli.js",
25-
"migrate": "npm run typeorm -- migration:run -d dist/data/dataSource.js",
26-
"migrate-prod": "npm run migrate",
27-
"migrate-dev": "npm run build && npm run migrate",
28-
"migrate-rollback": "npm run typeorm -- migration:revert -d dist/data/dataSource.js",
29-
"migrate-rollback-prod": "npm run migrate-rollback",
30-
"migrate-rollback-dev": "npm run build && npm run migrate-rollback",
20+
"watch-api": "tsc-watch --build --onSuccess \"pnpm run start-api-dev\"",
21+
"migrate": "pnpm exec typeorm migration:run -d dist/data/dataSource.js",
22+
"migrate-prod": "pnpm run migrate",
23+
"migrate-dev": "pnpm run build && pnpm run migrate",
24+
"migrate-rollback": "pnpm exec typeorm migration:revert -d dist/data/dataSource.js",
25+
"migrate-rollback-prod": "pnpm run migrate-rollback",
26+
"migrate-rollback-dev": "pnpm run build && pnpm run migrate-rollback",
3127
"validate-active-configs": "node --enable-source-maps dist/validateActiveConfigs.js > ../config-errors.txt",
3228
"export-config-json-schema": "node --enable-source-maps dist/exportSchemas.js ../config-checker/public/config-schema.json",
33-
"test": "npm run build && npm run run-tests",
29+
"test": "pnpm run build && pnpm run run-tests",
3430
"run-tests": "ava",
35-
"test-watch": "tsc-watch --build --onSuccess \"npx ava\""
31+
"test-watch": "tsc-watch --build --onSuccess \"pnpm exec ava\""
3632
},
3733
"dependencies": {
3834
"@silvia-odwyer/photon-node": "^0.3.1",
35+
"@zeppelinbot/shared": "workspace:*",
3936
"bufferutil": "^4.0.3",
40-
"clinic": "^13.0.0",
4137
"cors": "^2.8.5",
4238
"cross-env": "^7.0.3",
4339
"deep-diff": "^1.0.2",
44-
"discord.js": "^14.19.3",
40+
"discord.js": "*",
4541
"emoji-regex": "^8.0.0",
4642
"escape-string-regexp": "^1.0.5",
4743
"express": "^4.20.0",
4844
"fp-ts": "^2.0.1",
4945
"humanize-duration": "^3.15.0",
5046
"js-yaml": "^4.1.0",
51-
"knub": "^32.0.0-next.25",
5247
"knub-command-manager": "^9.1.0",
53-
"last-commit-log": "^2.1.0",
5448
"lodash-es": "^4.17.21",
5549
"moment-timezone": "^0.5.21",
56-
"multer": "^1.4.5-lts.1",
50+
"multer": "^2.0.2",
5751
"mysql2": "^3.9.8",
5852
"parse-color": "^1.0.0",
5953
"passport": "^0.6.0",
6054
"passport-custom": "^1.0.5",
6155
"passport-oauth2": "^1.6.1",
6256
"pkg-up": "^3.1.0",
57+
"redis": "^5.9.0",
6358
"reflect-metadata": "^0.1.12",
6459
"regexp-worker": "^1.1.0",
6560
"safe-regex": "^2.0.2",
6661
"seedrandom": "^3.0.1",
6762
"strip-combining-marks": "^1.0.0",
6863
"threads": "^1.7.0",
6964
"tlds": "^1.221.1",
70-
"tmp": "0.0.33",
65+
"tmp": "0.2.5",
7166
"tsconfig-paths": "^3.9.0",
7267
"twemoji": "^12.1.4",
73-
"typeorm": "^0.3.17",
68+
"typeorm": "^0.3.27",
7469
"utf-8-validate": "^5.0.5",
7570
"uuid": "^9.0.0",
76-
"yawn-yaml": "github:dragory/yawn-yaml#string-number-fix-build",
77-
"zod": "^3.25.17"
71+
"vety": "1.0.0-rc2",
72+
"zod": "^4.1.12"
7873
},
7974
"devDependencies": {
8075
"@types/cors": "^2.8.5",
8176
"@types/express": "^4.16.1",
82-
"@types/jest": "^24.0.15",
8377
"@types/js-yaml": "^3.12.1",
8478
"@types/lodash-es": "^4.17.12",
85-
"@types/moment-timezone": "^0.5.6",
8679
"@types/multer": "^1.4.7",
8780
"@types/passport": "^1.0.0",
8881
"@types/passport-oauth2": "^1.4.8",
@@ -92,9 +85,7 @@
9285
"@types/twemoji": "^12.1.0",
9386
"@types/uuid": "^9.0.2",
9487
"ava": "^5.3.1",
95-
"rimraf": "^2.6.2",
96-
"source-map-support": "^0.5.16",
97-
"zod-to-json-schema": "^3.22.3"
88+
"source-map-support": "^0.5.16"
9889
},
9990
"ava": {
10091
"files": [

backend/src/RegExpRunner.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CooldownManager } from "knub";
1+
import { CooldownManager } from "vety";
22
import { EventEmitter } from "node:events";
33
import { RegExpWorker, TimeoutError } from "regexp-worker";
44
import { MINUTES, SECONDS } from "./utils.js";
@@ -9,7 +9,10 @@ const isTimeoutError = (a): a is TimeoutError => {
99
};
1010

1111
export class RegExpTimeoutError extends Error {
12-
constructor(message: string, public elapsedTimeMs: number) {
12+
constructor(
13+
message: string,
14+
public elapsedTimeMs: number,
15+
) {
1316
super(message);
1417
}
1518
}

backend/src/api/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import express, { Request, Response } from "express";
22
import https from "https";
3-
import pick from "lodash/pick.js";
3+
import { pick } from "lodash-es";
44
import passport from "passport";
55
import { Strategy as CustomStrategy } from "passport-custom";
66
import OAuth2Strategy from "passport-oauth2";

0 commit comments

Comments
 (0)