diff --git a/api/package-lock.json b/api/package-lock.json index 4e65e8860..bb7f725f9 100644 Binary files a/api/package-lock.json and b/api/package-lock.json differ diff --git a/api/package.json b/api/package.json index 48a857b18..8f9d1c8f3 100644 --- a/api/package.json +++ b/api/package.json @@ -36,14 +36,14 @@ }, "homepage": "https://fosscord.com", "devDependencies": { - "@babel/core": "^7.15.5", - "@babel/preset-env": "^7.15.8", + "@babel/core": "^7.18.9", + "@babel/preset-env": "^7.18.9", "@babel/preset-typescript": "^7.15.0", "@types/amqplib": "^0.8.1", "@types/bcrypt": "^5.0.0", "@types/express": "^4.17.9", "@types/i18next-node-fs-backend": "^2.1.0", - "@types/jest": "^27.0.1", + "@types/jest": "^28.1.6", "@types/jest-expect-message": "^1.0.3", "@types/jsonwebtoken": "^8.5.0", "@types/morgan": "^1.9.3", @@ -51,34 +51,32 @@ "@types/node": "^14.18.22", "@types/node-fetch": "^2.5.5", "@types/supertest": "^2.0.11", - "@zerollup/ts-transform-paths": "^1.7.18", - "jest": "^27.2.5", + "@ovos-media/ts-transform-paths": "^1.7.18-1", + "jest": "^28.1.3", "jest-expect-message": "^1.0.2", - "jest-runtime": "^27.2.1", - "ts-node": "^9.1.1", - "ts-node-dev": "^1.1.6", - "ts-patch": "^1.4.4", + "jest-runtime": "^28.1.3", + "ts-node": "^10.9.1", + "ts-node-dev": "^2.0.0", + "ts-patch": "^2.0.1", "typescript": "^4.4.2", - "typescript-json-schema": "0.50.1" + "typescript-json-schema": "^0.54.0" }, "dependencies": { - "@babel/preset-env": "^7.15.8", "@babel/preset-typescript": "^7.15.0", "@fosscord/util": "file:../util", - "@sentry/node": "^6.16.1", - "@sentry/tracing": "^6.16.1", - "@yukikaze-bot/erlpack": "^1.0.1", + "@sentry/node": "^7.7.0", + "@sentry/tracing": "^7.7.0", "ajv": "8.6.2", "ajv-formats": "^2.1.1", - "amqplib": "^0.8.0", - "assert": "^1.5.0", + "amqplib": "^0.10.0", + "assert": "^2.0.0", "bcrypt": "^5.0.1", "body-parser": "^1.19.0", "cheerio": "^1.0.0-rc.10", - "dotenv": "^8.2.0", + "dotenv": "^16.0.1", "express": "^4.17.1", - "form-data": "^3.0.0", - "i18next": "^19.9.2", + "form-data": "^4.0.0", + "i18next": "^21.8.14", "i18next-http-middleware": "^3.1.3", "i18next-node-fs-backend": "^2.1.3", "image-size": "^1.0.0", @@ -86,9 +84,9 @@ "lambert-server": "^1.2.12", "missing-native-js-functions": "^1.2.18", "morgan": "^1.10.0", - "multer": "^1.4.2", + "multer": "^1.4.5-lts.1", "node-2fa": "^2.0.3", - "node-fetch": "^2.6.2", + "node-fetch": "^3.2.9", "patch-package": "^6.4.7", "picocolors": "^1.0.0", "proxy-agent": "^5.0.0", diff --git a/api/patches/typescript-json-schema+0.50.1.patch b/api/patches/typescript-json-schema+0.54.0.patch similarity index 71% rename from api/patches/typescript-json-schema+0.50.1.patch rename to api/patches/typescript-json-schema+0.54.0.patch index a0d479de6..2a319ec48 100644 --- a/api/patches/typescript-json-schema+0.50.1.patch +++ b/api/patches/typescript-json-schema+0.54.0.patch @@ -1,14 +1,14 @@ diff --git a/node_modules/typescript-json-schema/dist/typescript-json-schema.js b/node_modules/typescript-json-schema/dist/typescript-json-schema.js -index 47e1598..8397b9d 100644 +index 78f97ba..790c516 100644 --- a/node_modules/typescript-json-schema/dist/typescript-json-schema.js +++ b/node_modules/typescript-json-schema/dist/typescript-json-schema.js -@@ -432,6 +432,9 @@ var JsonSchemaGenerator = (function () { +@@ -453,6 +453,9 @@ var JsonSchemaGenerator = (function () { else if (flags & ts.TypeFlags.Boolean) { definition.type = "boolean"; } -+ else if (flags & ts.TypeFlags.BigInt) { -+ definition.type = "bigint"; -+ } ++ else if (flags & ts.TypeFlags.BigInt) { ++ definition.type = "bigint"; ++ } else if (flags & ts.TypeFlags.Null) { definition.type = "null"; } diff --git a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts index 1f5b68c2f..b7f1e1307 100644 --- a/api/src/routes/channels/#channel_id/messages/#message_id/index.ts +++ b/api/src/routes/channels/#channel_id/messages/#message_id/index.ts @@ -116,7 +116,7 @@ router.put( if (req.file) { try { - const file = await uploadFile(`/attachments/${req.params.channel_id}`, req.file); + const file: any = await uploadFile(`/attachments/${req.params.channel_id}`, req.file); attachments.push({ ...file, proxy_url: file.url }); } catch (error) { return res.status(400).json(error); diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts index 1ed6080e5..6d4d57941 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts @@ -200,7 +200,7 @@ router.post( const files = req.files as Express.Multer.File[] ?? []; for (let currFile of files) { try { - const file = await uploadFile(`/attachments/${channel.id}`, currFile); + const file: any = await uploadFile(`/attachments/${channel.id}`, currFile); attachments.push({ ...file, proxy_url: file.url }); } catch (error) { diff --git a/api/src/routes/gifs/search.ts b/api/src/routes/gifs/search.ts index 9ad7a5928..1099dc4a7 100644 --- a/api/src/routes/gifs/search.ts +++ b/api/src/routes/gifs/search.ts @@ -20,7 +20,7 @@ router.get("/", route({}), async (req: Request, res: Response) => { headers: { "Content-Type": "application/json" } }); - const { results } = await response.json(); + const { results } = await response.json() as any; res.json(results.map(parseGifResult)).status(200); }); diff --git a/api/src/routes/gifs/trending-gifs.ts b/api/src/routes/gifs/trending-gifs.ts index 6d97bf7cc..2b28d9d2e 100644 --- a/api/src/routes/gifs/trending-gifs.ts +++ b/api/src/routes/gifs/trending-gifs.ts @@ -20,7 +20,7 @@ router.get("/", route({}), async (req: Request, res: Response) => { headers: { "Content-Type": "application/json" } }); - const { results } = await response.json(); + const { results } = await response.json() as any; res.json(results.map(parseGifResult)).status(200); }); diff --git a/api/src/routes/gifs/trending.ts b/api/src/routes/gifs/trending.ts index c81b4c082..bc143f005 100644 --- a/api/src/routes/gifs/trending.ts +++ b/api/src/routes/gifs/trending.ts @@ -50,8 +50,8 @@ router.get("/", route({}), async (req: Request, res: Response) => { }) ]); - const { tags } = await responseSource.json(); - const { results } = await trendGifSource.json(); + const { tags } = await responseSource.json() as any; + const { results } = await trendGifSource.json() as any; res.json({ categories: tags.map((x: any) => ({ name: x.searchterm, src: x.image })), diff --git a/api/src/util/utility/ipAddress.ts b/api/src/util/utility/ipAddress.ts index 13cc9603a..8d986b268 100644 --- a/api/src/util/utility/ipAddress.ts +++ b/api/src/util/utility/ipAddress.ts @@ -65,7 +65,7 @@ export async function IPAnalysis(ip: string): Promise { const { ipdataApiKey } = Config.get().security; if (!ipdataApiKey) return { ...exampleData, ip }; - return (await fetch(`https://api.ipdata.co/${ip}?api-key=${ipdataApiKey}`)).json(); + return (await fetch(`https://api.ipdata.co/${ip}?api-key=${ipdataApiKey}`)).json() as any; } export function isProxy(data: typeof exampleData) { diff --git a/api/tsconfig.json b/api/tsconfig.json index 80d7251ff..91396aa8e 100644 --- a/api/tsconfig.json +++ b/api/tsconfig.json @@ -69,7 +69,7 @@ "paths": { "@fosscord/api": ["src/index"] }, - "plugins": [{ "transform": "@zerollup/ts-transform-paths" }], + "plugins": [{ "transform": "@ovos-media/ts-transform-paths" }], "experimentalDecorators": true } } diff --git a/bundle/package-lock.json b/bundle/package-lock.json index b9277e0b8..fd388bd2e 100644 Binary files a/bundle/package-lock.json and b/bundle/package-lock.json differ diff --git a/bundle/package.json b/bundle/package.json index 8c638f3af..670569e50 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -26,8 +26,8 @@ }, "homepage": "https://fosscord.com", "devDependencies": { - "@babel/core": "^7.15.5", - "@babel/preset-env": "^7.15.8", + "@babel/core": "^7.18.9", + "@babel/preset-env": "^7.18.9", "@babel/preset-typescript": "^7.15.0", "@types/amqplib": "^0.8.1", "@types/bcrypt": "^5.0.0", @@ -37,7 +37,7 @@ "@types/express": "^4.17.12", "@types/fs-extra": "^9.0.12", "@types/i18next-node-fs-backend": "^2.1.0", - "@types/jest": "^27.0.1", + "@types/jest": "^28.1.6", "@types/jest-expect-message": "^1.0.3", "@types/jsonwebtoken": "^8.5.0", "@types/morgan": "^1.9.3", @@ -46,17 +46,17 @@ "@types/node-fetch": "^2.5.12", "@types/node-os-utils": "^1.2.0", "@types/supertest": "^2.0.11", - "@types/ws": "^7.4.0", - "@zerollup/ts-transform-paths": "^1.7.18", - "jest": "^27.0.6", + "@types/ws": "^8.5.3", + "@ovos-media/ts-transform-paths": "^1.7.18-1", + "jest": "^28.1.3", "jest-expect-message": "^1.0.2", - "jest-runtime": "^27.2.1", + "jest-runtime": "^28.1.3", "ts-node": "^10.2.1", - "ts-node-dev": "^1.1.6", - "ts-patch": "^1.4.4", + "ts-node-dev": "^2.0.0", + "ts-patch": "^2.0.1", "tsconfig-paths": "^3.12.0", "typescript": "^4.2.3", - "typescript-json-schema": "0.50.1" + "typescript-json-schema": "^0.54.0" }, "dependencies": { "@aws-sdk/client-s3": "^3.36.1", @@ -66,42 +66,42 @@ "@fosscord/api": "file:../api", "@fosscord/cdn": "file:../cdn", "@fosscord/gateway": "file:../gateway", - "@sentry/node": "^6.16.1", - "@sentry/tracing": "^6.16.1", - "@yukikaze-bot/erlpack": "^1.0.1", + "@sentry/node": "^7.7.0", + "@sentry/tracing": "^7.7.0", "ajv": "8.6.2", "ajv-formats": "^2.1.1", - "amqplib": "^0.8.0", - "assert": "^1.5.0", + "amqplib": "^0.10.0", + "assert": "^2.0.0", "async-exit-hook": "^2.0.1", "bcrypt": "^5.0.1", "body-parser": "^1.19.0", "btoa": "^1.2.1", "cheerio": "^1.0.0-rc.10", - "dotenv": "^8.2.0", + "dotenv": "^16.0.1", "exif-be-gone": "^1.2.0", "express": "^4.17.1", "express-async-errors": "^3.1.1", - "file-type": "^16.5.4", + "file-type": "^17.1.2", "form-data": "^4.0.0", "fs-extra": "^10.0.0", - "i18next": "^19.9.2", + "i18next": "^21.8.14", "i18next-http-middleware": "^3.1.3", "i18next-node-fs-backend": "^2.1.3", "image-size": "^1.0.0", - "jest": "^27.0.6", + "jest": "^28.1.3", "jsonwebtoken": "^8.5.1", "lambert-db": "^1.2.3", "lambert-server": "^1.2.11", "missing-native-js-functions": "^1.2.18", "morgan": "^1.10.0", - "multer": "^1.4.2", + "multer": "^1.4.5-lts.1", "nan": "^2.15.0", "nanocolors": "^0.2.12", - "node-fetch": "^2.6.2", + "node-2fa": "^2.0.3", + "node-fetch": "^3.2.9", "node-os-utils": "^1.3.5", "patch-package": "^6.4.7", - "pg": "^8.7.1", + "pg": "^8.7.3", "picocolors": "^1.0.0", "proxy-agent": "^5.0.0", "reflect-metadata": "^0.1.13", @@ -111,8 +111,7 @@ "typeorm": "^0.2.37", "typescript": "^4.1.2", "typescript-cached-transpile": "^0.0.6", - "typescript-json-schema": "^0.50.1", - "ws": "^7.4.2", - "node-2fa": "^2.0.3" + "typescript-json-schema": "^0.54.0", + "ws": "^8.8.1" } } diff --git a/bundle/tsconfig.json b/bundle/tsconfig.json index 563ff4445..5fa811741 100644 --- a/bundle/tsconfig.json +++ b/bundle/tsconfig.json @@ -5,7 +5,7 @@ /* Basic Options */ "incremental": false /* Enable incremental compilation */, - "target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "target": "ESNext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": [ "ES2021" @@ -78,7 +78,7 @@ "@fosscord/cdn": ["cdn/src/index"], "@fosscord/util": ["util/src/index"] }, - "plugins": [{ "transform": "@zerollup/ts-transform-paths" }], + "plugins": [{ "transform": "@ovos-media/ts-transform-paths" }], "noEmitHelpers": true, "importHelpers": true } diff --git a/cdn/package-lock.json b/cdn/package-lock.json index 62c2cdc87..08d49abfb 100644 Binary files a/cdn/package-lock.json and b/cdn/package-lock.json differ diff --git a/cdn/package.json b/cdn/package.json index 57ee89d1f..b9aaea69e 100644 --- a/cdn/package.json +++ b/cdn/package.json @@ -31,8 +31,8 @@ "@types/multer": "^1.4.7", "@types/node": "^14.17.0", "@types/node-fetch": "^2.5.7", - "@zerollup/ts-transform-paths": "^1.7.18", - "ts-patch": "^1.4.4" + "@ovos-media/ts-transform-paths": "^1.7.18-1", + "ts-patch": "^2.0.1" }, "dependencies": { "@aws-sdk/client-s3": "^3.36.1", @@ -40,21 +40,21 @@ "@fosscord/util": "file:../util", "body-parser": "^1.19.0", "btoa": "^1.2.1", - "dotenv": "^10.0.0", + "dotenv": "^16.0.1", "exif-be-gone": "^1.2.0", "express": "^4.17.1", "express-async-errors": "^3.1.1", - "file-type": "^16.5.4", + "file-type": "^17.1.2", "form-data": "^4.0.0", "fs-extra": "^10.0.0", "image-size": "^1.0.0", - "jest": "^27.0.6", + "jest": "^28.1.3", "lambert-db": "^1.2.3", "lambert-server": "^1.2.12", "missing-native-js-functions": "^1.2.17", - "multer": "^1.4.2", + "multer": "^1.4.5-lts.1", "nanocolors": "^0.2.12", - "node-fetch": "^2.6.2", + "node-fetch": "^3.2.9", "supertest": "^6.1.6", "typescript": "^4.1.2" }, diff --git a/cdn/src/routes/attachments.ts b/cdn/src/routes/attachments.ts index 33801932a..2aed752eb 100644 --- a/cdn/src/routes/attachments.ts +++ b/cdn/src/routes/attachments.ts @@ -68,7 +68,7 @@ router.get( `attachments/${channel_id}/${id}/${filename}` ); if (!file) throw new HTTPError("File not found"); - const type = await FileType.fromBuffer(file); + const type = await FileType.fileTypeFromBuffer(file); let content_type = type?.mime || "application/octet-stream"; if (SANITIZED_CONTENT_TYPE.includes(content_type)) { diff --git a/cdn/src/routes/avatars.ts b/cdn/src/routes/avatars.ts index 0b7661444..3b521cc3b 100644 --- a/cdn/src/routes/avatars.ts +++ b/cdn/src/routes/avatars.ts @@ -38,7 +38,7 @@ router.post( .update(Snowflake.generate()) .digest("hex"); - const type = await FileType.fromBuffer(buffer); + const type = await FileType.fileTypeFromBuffer(buffer); if (!type || !ALLOWED_MIME_TYPES.includes(type.mime)) throw new HTTPError("Invalid file type"); if (ANIMATED_MIME_TYPES.includes(type.mime)) hash = `a_${hash}`; // animated icons have a_ infront of the hash @@ -65,7 +65,7 @@ router.get("/:user_id", async (req: Request, res: Response) => { const file = await storage.get(path); if (!file) throw new HTTPError("not found", 404); - const type = await FileType.fromBuffer(file); + const type = await FileType.fileTypeFromBuffer(file); res.set("Content-Type", type?.mime); res.set("Cache-Control", "public, max-age=31536000"); @@ -80,7 +80,7 @@ router.get("/:user_id/:hash", async (req: Request, res: Response) => { const file = await storage.get(path); if (!file) throw new HTTPError("not found", 404); - const type = await FileType.fromBuffer(file); + const type = await FileType.fileTypeFromBuffer(file); res.set("Content-Type", type?.mime); res.set("Cache-Control", "public, max-age=31536000"); diff --git a/cdn/src/routes/external.ts b/cdn/src/routes/external.ts index dc90e3c80..ed44c9054 100644 --- a/cdn/src/routes/external.ts +++ b/cdn/src/routes/external.ts @@ -49,7 +49,7 @@ router.get("/:id", async (req: Request, res: Response) => { const file = await storage.get(`/external/${id}`); if (!file) throw new HTTPError("File not found"); - const result = await FileType.fromBuffer(file); + const result = await FileType.fileTypeFromBuffer(file); res.set("Content-Type", result?.mime); diff --git a/cdn/src/routes/role-icons.ts b/cdn/src/routes/role-icons.ts index 1d92d6389..a850db886 100644 --- a/cdn/src/routes/role-icons.ts +++ b/cdn/src/routes/role-icons.ts @@ -38,7 +38,7 @@ router.post( .update(Snowflake.generate()) .digest("hex"); - const type = await FileType.fromBuffer(buffer); + const type = await FileType.fileTypeFromBuffer(buffer); if (!type || !ALLOWED_MIME_TYPES.includes(type.mime)) throw new HTTPError("Invalid file type"); @@ -64,7 +64,7 @@ router.get("/:role_id", async (req: Request, res: Response) => { const file = await storage.get(path); if (!file) throw new HTTPError("not found", 404); - const type = await FileType.fromBuffer(file); + const type = await FileType.fileTypeFromBuffer(file); res.set("Content-Type", type?.mime); res.set("Cache-Control", "public, max-age=31536000, must-revalidate"); @@ -79,7 +79,7 @@ router.get("/:role_id/:hash", async (req: Request, res: Response) => { const file = await storage.get(path); if (!file) throw new HTTPError("not found", 404); - const type = await FileType.fromBuffer(file); + const type = await FileType.fileTypeFromBuffer(file); res.set("Content-Type", type?.mime); res.set("Cache-Control", "public, max-age=31536000, must-revalidate"); diff --git a/cdn/tsconfig.json b/cdn/tsconfig.json index 64ab18f4f..1ad037c60 100644 --- a/cdn/tsconfig.json +++ b/cdn/tsconfig.json @@ -8,7 +8,7 @@ "target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": [ - "ES2015", + "ES2021", "dom" ] /* Specify library files to be included in the compilation. */, "allowJs": true /* Allow javascript files to be compiled. */, @@ -65,7 +65,7 @@ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ /* Advanced Options */ @@ -76,6 +76,6 @@ "@fosscord/cdn": ["src/index"], "@fosscord/cdn/*": ["src/*"] }, - "plugins": [{ "transform": "@zerollup/ts-transform-paths" }] + "plugins": [{ "transform": "@ovos-media/ts-transform-paths" }] } } diff --git a/gateway/package-lock.json b/gateway/package-lock.json index 38bdab908..cbad96dc2 100644 Binary files a/gateway/package-lock.json and b/gateway/package-lock.json differ diff --git a/gateway/package.json b/gateway/package.json index a062ac9b7..fe59527f4 100644 --- a/gateway/package.json +++ b/gateway/package.json @@ -19,23 +19,23 @@ "@types/jsonwebtoken": "^8.5.0", "@types/node": "^14.17.9", "@types/node-fetch": "^2.5.12", - "@types/ws": "^7.4.0", - "@zerollup/ts-transform-paths": "^1.7.18", - "ts-node-dev": "^1.1.6", - "ts-patch": "^1.4.4", + "@types/ws": "^8.5.3", + "@ovos-media/ts-transform-paths": "^1.7.18-1", + "ts-node-dev": "^2.0.0", + "ts-patch": "^2.0.1", "typescript": "^4.2.3" }, "dependencies": { "@fosscord/util": "file:../util", - "amqplib": "^0.8.0", - "dotenv": "^8.2.0", + "amqplib": "^0.10.0", + "dotenv": "^16.0.1", "jsonwebtoken": "^8.5.1", "lambert-server": "^1.2.11", "missing-native-js-functions": "^1.2.18", - "node-fetch": "^2.6.2", + "node-fetch": "^3.2.9", "proxy-agent": "^5.0.0", - "typeorm": "^0.2.45", - "ws": "^7.4.2" + "typeorm": "^0.3.7", + "ws": "^8.8.1" }, "optionalDependencies": { "@yukikaze-bot/erlpack": "^1.0.1" diff --git a/gateway/src/opcodes/Identify.ts b/gateway/src/opcodes/Identify.ts index 2559624e0..bfe748f1a 100644 --- a/gateway/src/opcodes/Identify.ts +++ b/gateway/src/opcodes/Identify.ts @@ -231,7 +231,7 @@ export async function onIdentify(this: WebSocket, data: Payload) { const d: ReadyEventData = { v: 8, - application, + application: {id: application?.id??'', flags: application?.flags??''}, //TODO: check this code! user: privateUser, user_settings: user.settings, // @ts-ignore diff --git a/gateway/tsconfig.json b/gateway/tsconfig.json index 5ecb21e14..56b9ca7d0 100644 --- a/gateway/tsconfig.json +++ b/gateway/tsconfig.json @@ -9,7 +9,7 @@ "target": "ES2020" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": [ - "ES2015", + "ES2019", "ES2020.BigInt", "DOM" ] /* Specify library files to be included in the compilation. */, @@ -67,7 +67,7 @@ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ /* Advanced Options */ @@ -79,6 +79,6 @@ "@fosscord/gateway": ["src/index.ts"], "@fosscord/gateway/*": ["src/*"] }, - "plugins": [{ "transform": "@zerollup/ts-transform-paths" }] + "plugins": [{ "transform": "@ovos-media/ts-transform-paths" }] } } diff --git a/package-lock.json b/package-lock.json index 11edcc9cb..6de2acb6e 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/util/package-lock.json b/util/package-lock.json index 2405456ee..51b6016cb 100644 Binary files a/util/package-lock.json and b/util/package-lock.json differ diff --git a/util/package.json b/util/package.json index e6dc8e2df..55f10106e 100644 --- a/util/package.json +++ b/util/package.json @@ -30,29 +30,29 @@ "homepage": "https://docs.fosscord.com/", "devDependencies": { "@types/amqplib": "^0.8.1", - "@types/jsonwebtoken": "^8.5.0", + "@types/jsonwebtoken": "^8.5.8", "@types/multer": "^1.4.7", "@types/node": "^14.18.22", - "@types/node-fetch": "^2.5.12", - "jest": "^27.0.6", + "@types/node-fetch": "^2.6.2", + "jest": "^28.1.3", "ts-node": "^10.2.1" }, "dependencies": { - "amqplib": "^0.8.0", + "amqplib": "^0.10.0", "form-data": "^4.0.0", "jsonwebtoken": "^8.5.1", "lambert-server": "^1.2.12", "missing-native-js-functions": "^1.2.18", - "multer": "^1.4.3", - "node-fetch": "^2.6.2", + "multer": "^1.4.5-lts.1", + "node-fetch": "^3.2.9", "patch-package": "^6.4.7", - "pg": "^8.7.1", + "pg": "^8.7.3", "picocolors": "^1.0.0", "proxy-agent": "^5.0.0", "reflect-metadata": "^0.1.13", "typeorm": "^0.3.7", - "typescript": "^4.4.2", - "typescript-json-schema": "^0.50.1" + "typescript": "^4.7.4", + "typescript-json-schema": "^0.54.0" }, "jest": { "setupFilesAfterEnv": [ diff --git a/util/src/util/AutoUpdate.ts b/util/src/util/AutoUpdate.ts index 6a594fd5b..62ce8d79f 100644 --- a/util/src/util/AutoUpdate.ts +++ b/util/src/util/AutoUpdate.ts @@ -76,7 +76,7 @@ async function getLatestVersion(url: string) { try { const agent = new ProxyAgent(); const response = await fetch(url, { agent }); - const content = await response.json(); + const content: any = await response.json(); return content.version; } catch (error) { throw new Error("[Auto update] check failed for " + url);