diff --git a/package-lock.json b/package-lock.json index 30429fd..9032a85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@citizenfx/server": "^2.0.9780-1", - "@types/node": "16.9.1", + "@types/node": "^22.5.4", "esbuild": "^0.23.1", "patch-package": "^8.0.0", "prettier": "^3.3.3", @@ -570,10 +570,13 @@ } }, "node_modules/@types/node": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz", - "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==", - "license": "MIT" + "version": "22.5.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.4.tgz", + "integrity": "sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==", + "license": "MIT", + "dependencies": { + "undici-types": "~6.19.2" + } }, "node_modules/@types/ws": { "version": "8.5.12", @@ -1780,6 +1783,12 @@ "node": ">=14.0" } }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "license": "MIT" + }, "node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", diff --git a/package.json b/package.json index e28ddbf..6b96688 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "devDependencies": { "@citizenfx/server": "^2.0.9780-1", - "@types/node": "16.9.1", + "@types/node": "^22.5.4", "esbuild": "^0.23.1", "patch-package": "^8.0.0", "prettier": "^3.3.3", diff --git a/patches/@citizenfx+server+2.0.9780-1.patch b/patches/@citizenfx+server+2.0.9780-1.patch new file mode 100644 index 0000000..a28cb96 --- /dev/null +++ b/patches/@citizenfx+server+2.0.9780-1.patch @@ -0,0 +1,20 @@ +diff --git a/node_modules/@citizenfx/server/index.d.ts b/node_modules/@citizenfx/server/index.d.ts +index c46d22f..a8c6421 100644 +--- a/node_modules/@citizenfx/server/index.d.ts ++++ b/node_modules/@citizenfx/server/index.d.ts +@@ -130,15 +130,6 @@ declare var GlobalState : StateBagInterface + declare function Player(entity: number|string): EntityInterface + declare var LocalPlayer : EntityInterface + +-interface CitizenExports { +- (exportKey: string | number, exportFunction: Function): void; +- [resourceName: string] : { +- [exportKey: string | number]: Function +- }; +-} +- +-declare var exports: CitizenExports; +- + declare var source: number; + + // Commented methods are not implemented yet diff --git a/server/components/types.ts b/server/components/types.d.ts similarity index 100% rename from server/components/types.ts rename to server/components/types.d.ts diff --git a/server/tsconfig.json b/server/tsconfig.json index 8f25171..ebaa9dc 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -7,9 +7,7 @@ "types": ["node", "@citizenfx/server"], - "lib": ["ES2021"], - - "skipLibCheck": true + "lib": ["ES2021"] }, "include": ["."] }