Skip to content

Commit eb7898e

Browse files
authored
chore: upgrade dependencies (#35)
1 parent b685c49 commit eb7898e

12 files changed

Lines changed: 4230 additions & 3603 deletions

File tree

agents.md

Lines changed: 860 additions & 0 deletions
Large diffs are not rendered by default.

bun.lockb

71.2 KB
Binary file not shown.

package-lock.json

Lines changed: 3334 additions & 3576 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"dependencies": {
2222
"@sinclair/typebox": "^0.31.28",
23-
"bullmq": "5.41.0",
23+
"bullmq": "^5.65.1",
2424
"chalk": "^5.4.1",
2525
"ioredis": "^5.5.0",
2626
"semver": "^7.7.1"
@@ -29,19 +29,19 @@
2929
"@taskforcesh/message-broker"
3030
],
3131
"devDependencies": {
32-
"@commitlint/cli": "^19.7.1",
33-
"@commitlint/config-conventional": "^19.7.1",
32+
"@commitlint/cli": "^20.1.0",
33+
"@commitlint/config-conventional": "^20.0.0",
3434
"@semantic-release/changelog": "^6.0.3",
35-
"@semantic-release/commit-analyzer": "^9.0.2",
35+
"@semantic-release/commit-analyzer": "^13.0.1",
3636
"@semantic-release/git": "^10.0.1",
37-
"@semantic-release/github": "^8.1.0",
38-
"@semantic-release/npm": "^9.0.2",
37+
"@semantic-release/github": "^12.0.2",
38+
"@semantic-release/npm": "^13.1.2",
3939
"@tsconfig/node-lts": "^18.12.5",
40-
"@types/bun": "1.2.2",
41-
"@types/node": "^12.20.55",
40+
"@types/bun": "^1.3.3",
41+
"@types/node": "^24.10.1",
4242
"husky": "^9.1.7",
4343
"prettier": "^3.5.1",
44-
"semantic-release": "^19.0.5",
44+
"semantic-release": "^25.0.2",
4545
"typescript": "^5.7.3"
4646
},
4747
"release": {

src/e2e-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, jest, mock } from "bun:test";
2-
import { Server } from "bun";
32
import { cleanProxy, startProxy } from "./proxy";
43
import { Redis } from "ioredis";
54
import { config } from "./config";
@@ -51,7 +50,7 @@ describe("e2e", () => {
5150
const proxy = await startProxy(0, redisClient, redisClient.duplicate());
5251
const proxyPort = proxy.port;
5352

54-
let server: Server;
53+
let server: any;
5554
const processingJob = new Promise<void>((resolve, reject) => {
5655
server = Bun.serve({
5756
// Typescript requires this dummy websocket

src/fetch-handler.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { Redis, Cluster } from "ioredis";
2+
import { Server } from "bun";
23

34
import {
45
QueueController,
56
WorkerController,
67
QueueEventsController,
78
} from "./controllers";
9+
import { WebSocketData } from "./interfaces";
810
import { RouteMatcher } from "./utils/router-matcher";
911
import { warn } from "./utils/log";
10-
import { Server } from "bun";
1112
import queuesRoutes from "./routes/queues-routes";
1213
import asciiArt from "./ascii-art";
1314
import workersRoutes from "./routes/workers-routes";
@@ -35,7 +36,7 @@ routeMatcher.addWebSocketRoute<{ queueName: string }>(
3536

3637
export const fetchHandler = (
3738
connection: Redis | Cluster,
38-
workersConnection: Redis | Cluster) => async (req: Request, server: Server) => {
39+
workersConnection: Redis | Cluster) => async (req: Request, server: Server<WebSocketData>) => {
3940
const url = new URL(req.url);
4041
const { searchParams } = url;
4142
const { method } = req;

src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Server } from "bun";
21
import IORedis, { Cluster, Redis } from "ioredis";
32

43
import { startProxy } from "./proxy";
@@ -54,7 +53,7 @@ workersConnection.on("error", (err) => {
5453
}
5554
})
5655

57-
startProxy(config.port, connection, workersConnection).then((server: Server) => {
56+
startProxy(config.port, connection, workersConnection).then((server) => {
5857
info(`Running BullMQ Proxy on port ${server.port} (c) ${new Date().getFullYear()} Taskforce.sh Inc. v${pkg.version}`);
5958
}).catch((err) => {
6059
error(`Error starting server ${(<Error>err).message}`);

src/interfaces/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * from './http-handler-opts';
22
export * from './websocket-behaviour';
3+
export * from './websocket-data';
34
export * from './worker-endpoint';
45
export * from './worker-metadata';
56
export * from './buffer-source';

src/interfaces/websocket-data.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { WebSocketHandler } from "bun";
2+
import { ConnectionOptions } from "bullmq";
3+
4+
/**
5+
* Data associated with each WebSocket connection in the proxy.
6+
*/
7+
export type WebSocketData = {
8+
route: any;
9+
controller: WebSocketHandler<any>;
10+
queueName: string;
11+
concurrency: number;
12+
connection: ConnectionOptions;
13+
events: any;
14+
searchParams: URLSearchParams;
15+
};

src/proxy.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
import { Cluster, Redis } from "ioredis";
22
import chalk from "chalk";
33

4-
import { WebSocketBehaviour } from "./interfaces/websocket-behaviour";
4+
import { WebSocketData } from "./interfaces";
55
import { warn } from "./utils/log";
66
import { fetchHandler } from "./fetch-handler";
77
import asciiArt from "./ascii-art";
88
import { WorkerHttpController } from "./controllers/http/worker-http-controller";
99

10-
type WebSocketData = {
11-
createdAt: number;
12-
params: any;
13-
controller: WebSocketBehaviour;
14-
};
15-
1610
const websocket = {
1711
message(ws: any, message: any) {
1812
const { controller } = ws.data;

0 commit comments

Comments
 (0)