Update packages

This commit is contained in:
TheArcaneBrony
2022-08-09 23:28:27 +02:00
parent 14e0842dfb
commit 4ccae56210
28 changed files with 99 additions and 102 deletions
BIN
View File
Binary file not shown.
+19 -21
View File
@@ -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",
@@ -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";
}
@@ -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);
@@ -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) {
+1 -1
View File
@@ -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);
});
+1 -1
View File
@@ -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);
});
+2 -2
View File
@@ -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 })),
+1 -1
View File
@@ -65,7 +65,7 @@ export async function IPAnalysis(ip: string): Promise<typeof exampleData> {
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) {
+1 -1
View File
@@ -69,7 +69,7 @@
"paths": {
"@fosscord/api": ["src/index"]
},
"plugins": [{ "transform": "@zerollup/ts-transform-paths" }],
"plugins": [{ "transform": "@ovos-media/ts-transform-paths" }],
"experimentalDecorators": true
}
}
BIN
View File
Binary file not shown.
+24 -25
View File
@@ -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"
}
}
+2 -2
View File
@@ -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
}
BIN
View File
Binary file not shown.
+7 -7
View File
@@ -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"
},
+1 -1
View File
@@ -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)) {
+3 -3
View File
@@ -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");
+1 -1
View File
@@ -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);
+3 -3
View File
@@ -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");
+3 -3
View File
@@ -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" }]
}
}
BIN
View File
Binary file not shown.
+9 -9
View File
@@ -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"
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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" }]
}
}
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+9 -9
View File
@@ -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": [
+1 -1
View File
@@ -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);