From ff7105674af14095b8cb323344f09e675a9bb8e6 Mon Sep 17 00:00:00 2001 From: TheLazySquid <76746384+TheLazySquid@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:09:33 -0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74076=20[Gimlo?= =?UTF-8?q?ader]=20Update=20net=20api=20types=20by=20@TheLazySquid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/gimloader/gimloader-tests.ts | 3 +++ types/gimloader/index.d.ts | 26 ++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/types/gimloader/gimloader-tests.ts b/types/gimloader/gimloader-tests.ts index a55282e7d39dc2..381fa2f717018f 100644 --- a/types/gimloader/gimloader-tests.ts +++ b/types/gimloader/gimloader-tests.ts @@ -44,6 +44,9 @@ api.patcher.before({}, "foo", () => true); GL.net.gamemode; // $ExpectType string api.net.gamemode; // $ExpectType string api.net.onLoad((type, gamemode) => {}); +api.net.modifyFetchRequest("/path/*/thing", (options) => null); +api.net.modifyFetchRequest("/path/*/thing", (options) => options); +api.net.modifyFetchResponse("/path/*/thing", (response) => response); GL.stores.phaser; // $ExpectType Phaser window.stores.phaser; // $ExpectType Phaser diff --git a/types/gimloader/index.d.ts b/types/gimloader/index.d.ts index c1f310343351f7..3c19ae8a0bb881 100644 --- a/types/gimloader/index.d.ts +++ b/types/gimloader/index.d.ts @@ -2248,9 +2248,9 @@ declare global { webpage: string | null; needsLib: string[]; optionalLib: string[]; - syncEval: string; deprecated: string | null; gamemode: string[]; + changelog: string[]; hasSettings: string; }; /** Gets the exported values of a plugin, if it has been enabled */ @@ -2281,9 +2281,9 @@ declare global { webpage: string | null; needsLib: string[]; optionalLib: string[]; - syncEval: string; deprecated: string | null; gamemode: string[]; + changelog: string[]; hasSettings: string; }; /** Gets the exported values of a library */ @@ -2477,6 +2477,10 @@ declare global { callback: (type: ConnectionType, gamemode: string) => void, gamemode?: string | string[], ): () => void; + /** Runs a callback when a request is made that matches a certain path (can have wildcards) */ + modifyFetchRequest(path: string, callback: (options: RequesterOptions) => any): () => void; + /** Runs a callback when a response is recieved for a request under a certain path (can have wildcards) */ + modifyFetchResponse(path: string, callback: (response: any) => any): () => void; } type ConnectionType = "None" | "Colyseus" | "Blueboat"; @@ -2495,6 +2499,16 @@ declare global { send(channel: string, message: any): void; } + interface RequesterOptions { + url: string; + method?: string; + data?: any; + cacheKey?: string; + success?: (response: any, cached: boolean) => void; + both?: () => void; + error?: (error: any) => void; + } + interface NetApi extends BaseNetApi { new(): this; /** @@ -2508,6 +2522,14 @@ declare global { ): () => void; /** Cancels any calls to {@link onLoad} with the same id */ offLoad(id: string): void; + /** Runs a callback when a request is made that matches a certain path (can have wildcards) */ + modifyFetchRequest(id: string, path: string, callback: (options: RequesterOptions) => any): () => void; + /** Runs a callback when a response is recieved for a request under a certain path (can have wildcards) */ + modifyFetchResponse(id: string, path: string, callback: (response: any) => any): () => void; + /** Stops any modifications made by {@link modifyFetchRequest} with the same id */ + stopModifyRequest(id: string): void; + /** Stops any modifications made by {@link modifyFetchResponse} with the same id */ + stopModifyResponse(id: string): void; /** * @deprecated Methods for both transports are now on the base net api * @hidden From ff41535d2d84f62f459fa56a9c462182ed9d1ab3 Mon Sep 17 00:00:00 2001 From: Matthias Klass Date: Thu, 13 Nov 2025 15:08:11 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74078=20Update?= =?UTF-8?q?=20types=20for=20migrate-mongo=2012=20by=20@klassm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/migrate-mongo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/migrate-mongo/package.json b/types/migrate-mongo/package.json index bc285b7b73ebb6..6d108a5b1b3f7b 100644 --- a/types/migrate-mongo/package.json +++ b/types/migrate-mongo/package.json @@ -7,7 +7,7 @@ ], "dependencies": { "@types/node": "*", - "mongodb": "^6.1.0" + "mongodb": "^7.0.0" }, "devDependencies": { "@types/migrate-mongo": "workspace:."