diff --git a/assets/openapi.json b/assets/openapi.json index dc5a675..89e190b 100644 --- a/assets/openapi.json +++ b/assets/openapi.json @@ -157,7 +157,7 @@ "pattern": "^.*Response$" }, "headers": { - "$ref": "#/components/schemas/Record" + "$ref": "#/components/schemas/Record%3Cstring%2Cstring%3E" } } }, @@ -3714,7 +3714,9 @@ "additionalProperties": false }, "intents": { - "type": "number" + "type": "number", + "properties": {}, + "additionalProperties": false }, "presence": { "$ref": "#/components/schemas/ActivitySchema" @@ -3733,7 +3735,9 @@ "maxItems": 2, "type": "array", "items": { - "type": "number" + "type": "number", + "properties": {}, + "additionalProperties": false } }, "guild_subscriptions": { @@ -7495,10 +7499,10 @@ "type": "boolean" }, "roles": { - "$ref": "#/components/schemas/Record" + "$ref": "#/components/schemas/Record%3Cstring%2Cboolean%3E" }, "channels": { - "$ref": "#/components/schemas/Record" + "$ref": "#/components/schemas/Record%3Cstring%2Cboolean%3E" } } }, @@ -13389,7 +13393,7 @@ "length": { "type": "integer" }, - "__@unscopables@699": { + "__@unscopables@698": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -13515,17 +13519,17 @@ "with": { "type": "boolean" }, - "__@iterator@697": { + "__@iterator@696": { "type": "boolean" }, - "__@unscopables@699": { + "__@unscopables@698": { "type": "boolean" } } } }, "required": [ - "__@unscopables@699", + "__@unscopables@698", "length" ] }, diff --git a/assets/schemas.json b/assets/schemas.json index 24b2ea6..56f7849 100644 --- a/assets/schemas.json +++ b/assets/schemas.json @@ -136,7 +136,7 @@ "pattern": "^.*Response$" }, "headers": { - "$ref": "#/definitions/Record" + "$ref": "#/definitions/Record%3Cstring%2Cstring%3E" } }, "additionalProperties": false, @@ -3936,7 +3936,9 @@ "additionalProperties": false }, "intents": { - "type": "bigint" + "type": "number", + "properties": {}, + "additionalProperties": false }, "presence": { "$ref": "#/definitions/ActivitySchema" @@ -3955,7 +3957,9 @@ "maxItems": 2, "type": "array", "items": { - "type": "bigint" + "type": "number", + "properties": {}, + "additionalProperties": false } }, "guild_subscriptions": { @@ -7975,10 +7979,10 @@ "type": "boolean" }, "roles": { - "$ref": "#/definitions/Record" + "$ref": "#/definitions/Record%3Cstring%2Cboolean%3E" }, "channels": { - "$ref": "#/definitions/Record" + "$ref": "#/definitions/Record%3Cstring%2Cboolean%3E" } }, "additionalProperties": false, @@ -14302,7 +14306,7 @@ "length": { "type": "integer" }, - "__@unscopables@699": { + "__@unscopables@698": { "type": "object", "additionalProperties": false, "patternProperties": { @@ -14428,17 +14432,17 @@ "with": { "type": "boolean" }, - "__@iterator@697": { + "__@iterator@696": { "type": "boolean" }, - "__@unscopables@699": { + "__@unscopables@698": { "type": "boolean" } } } }, "required": [ - "__@unscopables@699", + "__@unscopables@698", "length" ] }, diff --git a/package-lock.json b/package-lock.json index 6534011..d30245e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,9 +28,9 @@ "express": "^5.2.1", "fast-zlib": "^2.0.1", "fido2-lib": "^3.5.9", - "file-type": "^21.3.4", + "file-type": "^22.0.1", "form-data": "^4.0.5", - "i18next": "^25.10.10", + "i18next": "^26.0.6", "i18next-fs-backend": "^2.6.3", "i18next-http-middleware": "^3.9.3", "image-size": "^2.0.2", @@ -49,7 +49,7 @@ "reflect-metadata": "^0.2.2", "tslib": "^2.8.1", "typeorm": "^0.3.28", - "wretch": "^2.11.1", + "wretch": "^3.0.7", "ws": "^8.20.0" }, "devDependencies": { @@ -68,8 +68,8 @@ "@types/morgan": "^1.9.10", "@types/multer": "^2.1.0", "@types/murmurhash-js": "^1.0.7", - "@types/node": "^24.12.2", - "@types/nodemailer": "^7.0.11", + "@types/node": "^25.6.0", + "@types/nodemailer": "^8.0.0", "@types/probe-image-size": "^7.2.5", "@types/sharp": "^0.31.1", "@types/ws": "^8.18.1", @@ -77,22 +77,22 @@ "@typescript-eslint/parser": "^8.58.2", "@typescript/native-preview": "^7.0.0-dev.20260119.1", "eslint": "^9.39.4", - "globals": "^16.5.0", + "globals": "^17.5.0", "husky": "^9.1.7", "patch-package": "^8.0.1", "prettier": "^3.8.3", "pretty-quick": "^4.2.2", "ts-node": "^10.9.2", "typescript": "^5.9.3", - "typescript-json-schema": "^0.65.1" + "typescript-json-schema": "^0.67.1" }, "optionalDependencies": { "@sendgrid/mail": "^8.1.6", "@yukikaze-bot/erlpack": "^1.0.1", "jimp": "^1.6.1", - "mailgun.js": "^12.9.0", + "mailgun.js": "^13.0.0", "node-mailjet": "^6.0.11", - "nodemailer": "^7.0.13" + "nodemailer": "^8.0.5" } }, "node_modules/@babel/runtime": { @@ -560,6 +560,25 @@ "node": ">=18" } }, + "node_modules/@jimp/core/node_modules/file-type": { + "version": "21.3.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.4.tgz", + "integrity": "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==", + "license": "MIT", + "optional": true, + "dependencies": { + "@tokenizer/inflate": "^0.4.1", + "strtok3": "^10.3.4", + "token-types": "^6.1.1", + "uint8array-extras": "^1.4.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sindresorhus/file-type?sponsor=1" + } + }, "node_modules/@jimp/diff": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/@jimp/diff/-/diff-1.6.1.tgz", @@ -1550,18 +1569,18 @@ } }, "node_modules/@types/node": { - "version": "24.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz", - "integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==", + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", "license": "MIT", "dependencies": { - "undici-types": "~7.16.0" + "undici-types": "~7.19.0" } }, "node_modules/@types/nodemailer": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-7.0.11.tgz", - "integrity": "sha512-E+U4RzR2dKrx+u3N4DlsmLaDC6mMZOM/TPROxA0UAPiTgI0y4CEFBmZE+coGWTjakDriRsXG368lNk1u9Q0a2g==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-8.0.0.tgz", + "integrity": "sha512-fyf8jWULsCo0d0BuoQ75i6IeoHs47qcqxWc7yUdUcV0pOZGjUTTOvwdG1PRXUDqN/8A64yQdQdnA2pZgcdi+cA==", "dev": true, "license": "MIT", "dependencies": { @@ -3694,18 +3713,18 @@ } }, "node_modules/file-type": { - "version": "21.3.4", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-21.3.4.tgz", - "integrity": "sha512-Ievi/yy8DS3ygGvT47PjSfdFoX+2isQueoYP1cntFW1JLYAuS4GD7NUPGg4zv2iZfV52uDyk5w5Z0TdpRS6Q1g==", + "version": "22.0.1", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-22.0.1.tgz", + "integrity": "sha512-ww5Mhre0EE+jmBvOXTmXAbEMuZE7uX4a3+oRCQFNj8w++g3ev913N6tXQz0XTXbueQ5TWQfm6BdaViEHHn8bhA==", "license": "MIT", "dependencies": { "@tokenizer/inflate": "^0.4.1", - "strtok3": "^10.3.4", - "token-types": "^6.1.1", - "uint8array-extras": "^1.4.0" + "strtok3": "^10.3.5", + "token-types": "^6.1.2", + "uint8array-extras": "^1.5.0" }, "engines": { - "node": ">=20" + "node": ">=22" }, "funding": { "url": "https://github.com/sindresorhus/file-type?sponsor=1" @@ -4084,9 +4103,9 @@ } }, "node_modules/globals": { - "version": "16.5.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.5.0.tgz", - "integrity": "sha512-c/c15i26VrJ4IRt5Z89DnIzCGDn9EcebibhAOjw5ibqEHsE1wLUgkPn9RDmNcUKyU87GeaL633nyJ+pplFR2ZQ==", + "version": "17.5.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.5.0.tgz", + "integrity": "sha512-qoV+HK2yFl/366t2/Cb3+xxPUo5BuMynomoDmiaZBIdbs+0pYbjfZU+twLhGKp4uCZ/+NbtpVepH5bGCxRyy2g==", "dev": true, "license": "MIT", "engines": { @@ -4265,9 +4284,9 @@ } }, "node_modules/i18next": { - "version": "25.10.10", - "resolved": "https://registry.npmjs.org/i18next/-/i18next-25.10.10.tgz", - "integrity": "sha512-cqUW2Z3EkRx7NqSyywjkgCLK7KLCL6IFVFcONG7nVYIJ3ekZ1/N5jUsihHV6Bq37NfhgtczxJcxduELtjTwkuQ==", + "version": "26.0.6", + "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.0.6.tgz", + "integrity": "sha512-A4U6eCXodIbrhf8EarRurB9/4ebyaurH4+fu4gig9bqxmpSt+fCAFm/GpRQDcN1Xzu/LdFCx4nYHsnM1edIIbg==", "funding": [ { "type": "individual", @@ -4855,9 +4874,9 @@ "license": "ISC" }, "node_modules/mailgun.js": { - "version": "12.9.0", - "resolved": "https://registry.npmjs.org/mailgun.js/-/mailgun.js-12.9.0.tgz", - "integrity": "sha512-eUoZnMEfC3+lKmRt/h8CaxtIJSlm6QRSQM7FjQKSV4AqH4/9MmHL9o2IvtHVUj46KuJLn1iUqzjy48W/9iUEpw==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/mailgun.js/-/mailgun.js-13.0.0.tgz", + "integrity": "sha512-q59DjkjjN6Q8S6BBiY3aAXv5kdbgwp3JBffa/IFRo2FaaVodrDzRUrvuGyafKYMQXhIPnoVQ2i0f/hOlj4GEBA==", "license": "MIT", "optional": true, "dependencies": { @@ -5326,9 +5345,9 @@ } }, "node_modules/nodemailer": { - "version": "7.0.13", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.13.tgz", - "integrity": "sha512-PNDFSJdP+KFgdsG3ZzMXCgquO7I6McjY2vlqILjtJd0hy8wEvtugS9xKRF2NWlPNGxvLCXlTNIae4serI7dinw==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-8.0.5.tgz", + "integrity": "sha512-0PF8Yb1yZuQfQbq+5/pZJrtF6WQcjTd5/S4JOHs9PGFxuTqoB/icwuB44pOdURHJbRKX1PPoJZtY7R4VUoCC8w==", "license": "MIT-0", "optional": true, "engines": { @@ -7189,9 +7208,9 @@ } }, "node_modules/typescript-json-schema": { - "version": "0.65.1", - "resolved": "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.65.1.tgz", - "integrity": "sha512-tuGH7ff2jPaUYi6as3lHyHcKpSmXIqN7/mu50x3HlYn0EHzLpmt3nplZ7EuhUkO0eqDRc9GqWNkfjgBPIS9kxg==", + "version": "0.67.1", + "resolved": "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.67.1.tgz", + "integrity": "sha512-vKTZB/RoYTIBdVP7E7vrgHMCssBuhja91wQy498QIVhvfRimaOgjc98uwAXmZ7mbLUytJmOSbF11wPz+ByQeXg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { @@ -7202,6 +7221,7 @@ "safe-stable-stringify": "^2.2.0", "ts-node": "^10.9.1", "typescript": "~5.5.0", + "vm2": "^3.10.0", "yargs": "^17.1.1" }, "bin": { @@ -7261,9 +7281,9 @@ } }, "node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", "license": "MIT" }, "node_modules/universalify": { @@ -7357,6 +7377,23 @@ "node": ">= 0.8" } }, + "node_modules/vm2": { + "version": "3.10.5", + "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.10.5.tgz", + "integrity": "sha512-3P/2QDccVFBcujfCOeP8vVNuGfuBJHEuvGR8eMmI10p/iwLL2UwF5PDaNaoOS2pRGQEDmJRyeEcc8kmm2Z59RA==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.15.0", + "acorn-walk": "^8.3.4" + }, + "bin": { + "vm2": "bin/vm2" + }, + "engines": { + "node": ">=6.0" + } + }, "node_modules/webcrypto-core": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.8.1.tgz", @@ -7520,12 +7557,12 @@ "license": "ISC" }, "node_modules/wretch": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/wretch/-/wretch-2.11.1.tgz", - "integrity": "sha512-rJejp30zE8Igs4Mvo4pxXaiOKdSIGYLxyVaY+jZTlAMfQyi/hZsDwMRa9R09N0iS9Q8cLvplKfHwwyBv6XRWsg==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/wretch/-/wretch-3.0.7.tgz", + "integrity": "sha512-1zvhHLcwjGx5OMGHcdkuVmHWd/8NQ0gS4oV6+Er1YTnav4QTMTDl7ZI5QklELNVsX1BDNQk2kUrhoUSILomelg==", "license": "MIT", "engines": { - "node": ">=14" + "node": ">=22" } }, "node_modules/ws": { diff --git a/package.json b/package.json index fa7d2d4..e2fbeb1 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "@types/morgan": "^1.9.10", "@types/multer": "^2.1.0", "@types/murmurhash-js": "^1.0.7", - "@types/node": "^24.12.2", - "@types/nodemailer": "^7.0.11", + "@types/node": "^25.6.0", + "@types/nodemailer": "^8.0.0", "@types/probe-image-size": "^7.2.5", "@types/sharp": "^0.31.1", "@types/ws": "^8.18.1", @@ -67,14 +67,14 @@ "@typescript-eslint/parser": "^8.58.2", "@typescript/native-preview": "^7.0.0-dev.20260119.1", "eslint": "^9.39.4", - "globals": "^16.5.0", + "globals": "^17.5.0", "husky": "^9.1.7", "patch-package": "^8.0.1", "prettier": "^3.8.3", "pretty-quick": "^4.2.2", "ts-node": "^10.9.2", "typescript": "^5.9.3", - "typescript-json-schema": "^0.65.1" + "typescript-json-schema": "^0.67.1" }, "dependencies": { "@spacebarchat/pion-webrtc": "^0.0.4", @@ -95,9 +95,9 @@ "express": "^5.2.1", "fast-zlib": "^2.0.1", "fido2-lib": "^3.5.9", - "file-type": "^21.3.4", + "file-type": "^22.0.1", "form-data": "^4.0.5", - "i18next": "^25.10.10", + "i18next": "^26.0.6", "i18next-fs-backend": "^2.6.3", "i18next-http-middleware": "^3.9.3", "image-size": "^2.0.2", @@ -116,7 +116,7 @@ "reflect-metadata": "^0.2.2", "tslib": "^2.8.1", "typeorm": "^0.3.28", - "wretch": "^2.11.1", + "wretch": "^3.0.7", "ws": "^8.20.0" }, "_moduleAliases": { @@ -132,9 +132,9 @@ "@sendgrid/mail": "^8.1.6", "@yukikaze-bot/erlpack": "^1.0.1", "jimp": "^1.6.1", - "mailgun.js": "^12.9.0", + "mailgun.js": "^13.0.0", "node-mailjet": "^6.0.11", - "nodemailer": "^7.0.13" + "nodemailer": "^8.0.5" }, "overrides": { "typeorm": { diff --git a/patches/ajv+8.17.1.patch b/patches/ajv+8.17.1.patch deleted file mode 100644 index 9cf6c1c..0000000 --- a/patches/ajv+8.17.1.patch +++ /dev/null @@ -1,249 +0,0 @@ -diff --git a/node_modules/ajv/dist/compile/jtd/parse.js b/node_modules/ajv/dist/compile/jtd/parse.js -index 8fc94fd..abeeda9 100644 ---- a/node_modules/ajv/dist/compile/jtd/parse.js -+++ b/node_modules/ajv/dist/compile/jtd/parse.js -@@ -239,6 +239,9 @@ function parseType(cxt) { - gen.if(fail, () => parsingError(cxt, (0, codegen_1.str) `invalid timestamp`)); - break; - } -+ case "bigint": -+ parseBigInt(cxt); -+ break - case "float32": - case "float64": - parseNumber(cxt); -@@ -284,6 +287,15 @@ function parseNumber(cxt, maxDigits) { - skipWhitespace(cxt); - gen.if((0, codegen_1._) `"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJson_1.parseJsonNumber, maxDigits)); - } -+function parseBigInt(cxt, maxDigits) { -+ const {gen} = cxt -+ skipWhitespace(cxt) -+ gen.if( -+ _`"-0123456789".indexOf(${jsonSlice(1)}) < 0`, -+ () => jsonSyntaxError(cxt), -+ () => parseWith(cxt, parseJson_1.parseJsonBigInt, maxDigits) -+ ) -+} - function parseBooleanToken(bool, fail) { - return (cxt) => { - const { gen, data } = cxt; -diff --git a/node_modules/ajv/dist/compile/rules.js b/node_modules/ajv/dist/compile/rules.js -index 82a591f..1ebd8fe 100644 ---- a/node_modules/ajv/dist/compile/rules.js -+++ b/node_modules/ajv/dist/compile/rules.js -@@ -1,7 +1,7 @@ - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.getRules = exports.isJSONType = void 0; --const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; -+const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array","bigint"]; - const jsonTypes = new Set(_jsonTypes); - function isJSONType(x) { - return typeof x == "string" && jsonTypes.has(x); -@@ -13,10 +13,11 @@ function getRules() { - string: { type: "string", rules: [] }, - array: { type: "array", rules: [] }, - object: { type: "object", rules: [] }, -+ bigint: {type: "bigint", rules: []} - }; - return { -- types: { ...groups, integer: true, boolean: true, null: true }, -- rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], -+ types: { ...groups, integer: true, boolean: true, null: true, bigint: true }, -+ rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object, groups.bigint], - post: { rules: [] }, - all: {}, - keywords: {}, -diff --git a/node_modules/ajv/dist/compile/validate/dataType.js b/node_modules/ajv/dist/compile/validate/dataType.js -index 6d03e0d..a35a428 100644 ---- a/node_modules/ajv/dist/compile/validate/dataType.js -+++ b/node_modules/ajv/dist/compile/validate/dataType.js -@@ -53,7 +53,7 @@ function coerceAndCheckDataType(it, types) { - return checkTypes; - } - exports.coerceAndCheckDataType = coerceAndCheckDataType; --const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]); -+const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null","bigint"]); - function coerceToTypes(types, coerceTypes) { - return coerceTypes - ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array")) -@@ -84,6 +84,14 @@ function coerceData(it, types, coerceTo) { - }); - function coerceSpecificType(t) { - switch (t) { -+ case "bigint": -+ gen -+ .elseIf( -+ codegen_1._`${dataType} == "boolean" || ${data} === null -+ || (${dataType} == "string" && ${data} && ${data} == BigInt(${data}))` -+ ) -+ .assign(coerced, codegen_1._`BigInt(${data})`) -+ return - case "string": - gen - .elseIf((0, codegen_1._) `${dataType} == "number" || ${dataType} == "boolean"`) -@@ -144,6 +152,9 @@ function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { - case "number": - cond = numCond(); - break; -+ case "bigint": -+ cond = codegen_1._`typeof ${data} == "bigint" && isFinite(${data})` -+ break - default: - return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`; - } -diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json -index 7027a12..25679c8 100644 ---- a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json -+++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json -@@ -78,7 +78,7 @@ - "default": 0 - }, - "simpleTypes": { -- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] -+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] - }, - "stringArray": { - "type": "array", -diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json -index e0ae13d..57c9036 100644 ---- a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json -+++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json -@@ -78,7 +78,7 @@ - "default": 0 - }, - "simpleTypes": { -- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] -+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] - }, - "stringArray": { - "type": "array", -diff --git a/node_modules/ajv/dist/refs/json-schema-draft-06.json b/node_modules/ajv/dist/refs/json-schema-draft-06.json -index 5410064..774435b 100644 ---- a/node_modules/ajv/dist/refs/json-schema-draft-06.json -+++ b/node_modules/ajv/dist/refs/json-schema-draft-06.json -@@ -16,7 +16,7 @@ - "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}] - }, - "simpleTypes": { -- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] -+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] - }, - "stringArray": { - "type": "array", -diff --git a/node_modules/ajv/dist/refs/json-schema-draft-07.json b/node_modules/ajv/dist/refs/json-schema-draft-07.json -index 6a74851..fc6dd7d 100644 ---- a/node_modules/ajv/dist/refs/json-schema-draft-07.json -+++ b/node_modules/ajv/dist/refs/json-schema-draft-07.json -@@ -16,7 +16,7 @@ - "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}] - }, - "simpleTypes": { -- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] -+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] - }, - "stringArray": { - "type": "array", -diff --git a/node_modules/ajv/dist/refs/jtd-schema.js b/node_modules/ajv/dist/refs/jtd-schema.js -index 1ee940a..1148887 100644 ---- a/node_modules/ajv/dist/refs/jtd-schema.js -+++ b/node_modules/ajv/dist/refs/jtd-schema.js -@@ -38,6 +38,7 @@ const typeForm = (root) => ({ - "uint16", - "int32", - "uint32", -+ "bigint", - ], - }, - }, -diff --git a/node_modules/ajv/dist/runtime/parseJson.js b/node_modules/ajv/dist/runtime/parseJson.js -index eaa2838..02ad708 100644 ---- a/node_modules/ajv/dist/runtime/parseJson.js -+++ b/node_modules/ajv/dist/runtime/parseJson.js -@@ -97,6 +97,71 @@ exports.parseJsonNumber = parseJsonNumber; - parseJsonNumber.message = undefined; - parseJsonNumber.position = 0; - parseJsonNumber.code = 'require("ajv/dist/runtime/parseJson").parseJsonNumber'; -+ -+function parseJsonBigInt(s, pos, maxDigits) { -+ let numStr = ""; -+ let c; -+ parseJsonBigInt.message = undefined; -+ if (s[pos] === "-") { -+ numStr += "-"; -+ pos++; -+ } -+ if (s[pos] === "0") { -+ numStr += "0"; -+ pos++; -+ } -+ else { -+ if (!parseDigits(maxDigits)) { -+ errorMessage(); -+ return undefined; -+ } -+ } -+ if (maxDigits) { -+ parseJsonBigInt.position = pos; -+ return BigInt(numStr); -+ } -+ if (s[pos] === ".") { -+ numStr += "."; -+ pos++; -+ if (!parseDigits()) { -+ errorMessage(); -+ return undefined; -+ } -+ } -+ if (((c = s[pos]), c === "e" || c === "E")) { -+ numStr += "e"; -+ pos++; -+ if (((c = s[pos]), c === "+" || c === "-")) { -+ numStr += c; -+ pos++; -+ } -+ if (!parseDigits()) { -+ errorMessage(); -+ return undefined; -+ } -+ } -+ parseJsonBigInt.position = pos; -+ return BigInt(numStr); -+ function parseDigits(maxLen) { -+ let digit = false; -+ while (((c = s[pos]), c >= "0" && c <= "9" && (maxLen === undefined || maxLen-- > 0))) { -+ digit = true; -+ numStr += c; -+ pos++; -+ } -+ return digit; -+ } -+ function errorMessage() { -+ parseJsonBigInt.position = pos; -+ parseJsonBigInt.message = pos < s.length ? `unexpected token ${s[pos]}` : "unexpected end"; -+ } -+} -+exports.parseJsonBigInt = parseJsonBigInt; -+parseJsonBigInt.message = undefined; -+parseJsonBigInt.position = 0; -+parseJsonBigInt.code = 'require("ajv/dist/runtime/parseJson").parseJsonBigInt'; -+ -+ - const escapedChars = { - b: "\b", - f: "\f", -diff --git a/node_modules/ajv/dist/vocabularies/jtd/type.js b/node_modules/ajv/dist/vocabularies/jtd/type.js -index 17a0b51..bc54aad 100644 ---- a/node_modules/ajv/dist/vocabularies/jtd/type.js -+++ b/node_modules/ajv/dist/vocabularies/jtd/type.js -@@ -45,6 +45,9 @@ const def = { - cond = timestampCode(cxt); - break; - } -+ case "bigint": -+ cond = codegen_1._`typeof ${data} == "bigint" || typeof ${data} == "string"` -+ break - case "float32": - case "float64": - cond = (0, codegen_1._) `typeof ${data} == "number"`; diff --git a/patches/ajv+8.18.0.patch b/patches/ajv+8.18.0.patch new file mode 100644 index 0000000..9cf6c1c --- /dev/null +++ b/patches/ajv+8.18.0.patch @@ -0,0 +1,249 @@ +diff --git a/node_modules/ajv/dist/compile/jtd/parse.js b/node_modules/ajv/dist/compile/jtd/parse.js +index 8fc94fd..abeeda9 100644 +--- a/node_modules/ajv/dist/compile/jtd/parse.js ++++ b/node_modules/ajv/dist/compile/jtd/parse.js +@@ -239,6 +239,9 @@ function parseType(cxt) { + gen.if(fail, () => parsingError(cxt, (0, codegen_1.str) `invalid timestamp`)); + break; + } ++ case "bigint": ++ parseBigInt(cxt); ++ break + case "float32": + case "float64": + parseNumber(cxt); +@@ -284,6 +287,15 @@ function parseNumber(cxt, maxDigits) { + skipWhitespace(cxt); + gen.if((0, codegen_1._) `"-0123456789".indexOf(${jsonSlice(1)}) < 0`, () => jsonSyntaxError(cxt), () => parseWith(cxt, parseJson_1.parseJsonNumber, maxDigits)); + } ++function parseBigInt(cxt, maxDigits) { ++ const {gen} = cxt ++ skipWhitespace(cxt) ++ gen.if( ++ _`"-0123456789".indexOf(${jsonSlice(1)}) < 0`, ++ () => jsonSyntaxError(cxt), ++ () => parseWith(cxt, parseJson_1.parseJsonBigInt, maxDigits) ++ ) ++} + function parseBooleanToken(bool, fail) { + return (cxt) => { + const { gen, data } = cxt; +diff --git a/node_modules/ajv/dist/compile/rules.js b/node_modules/ajv/dist/compile/rules.js +index 82a591f..1ebd8fe 100644 +--- a/node_modules/ajv/dist/compile/rules.js ++++ b/node_modules/ajv/dist/compile/rules.js +@@ -1,7 +1,7 @@ + "use strict"; + Object.defineProperty(exports, "__esModule", { value: true }); + exports.getRules = exports.isJSONType = void 0; +-const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"]; ++const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array","bigint"]; + const jsonTypes = new Set(_jsonTypes); + function isJSONType(x) { + return typeof x == "string" && jsonTypes.has(x); +@@ -13,10 +13,11 @@ function getRules() { + string: { type: "string", rules: [] }, + array: { type: "array", rules: [] }, + object: { type: "object", rules: [] }, ++ bigint: {type: "bigint", rules: []} + }; + return { +- types: { ...groups, integer: true, boolean: true, null: true }, +- rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object], ++ types: { ...groups, integer: true, boolean: true, null: true, bigint: true }, ++ rules: [{ rules: [] }, groups.number, groups.string, groups.array, groups.object, groups.bigint], + post: { rules: [] }, + all: {}, + keywords: {}, +diff --git a/node_modules/ajv/dist/compile/validate/dataType.js b/node_modules/ajv/dist/compile/validate/dataType.js +index 6d03e0d..a35a428 100644 +--- a/node_modules/ajv/dist/compile/validate/dataType.js ++++ b/node_modules/ajv/dist/compile/validate/dataType.js +@@ -53,7 +53,7 @@ function coerceAndCheckDataType(it, types) { + return checkTypes; + } + exports.coerceAndCheckDataType = coerceAndCheckDataType; +-const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null"]); ++const COERCIBLE = new Set(["string", "number", "integer", "boolean", "null","bigint"]); + function coerceToTypes(types, coerceTypes) { + return coerceTypes + ? types.filter((t) => COERCIBLE.has(t) || (coerceTypes === "array" && t === "array")) +@@ -84,6 +84,14 @@ function coerceData(it, types, coerceTo) { + }); + function coerceSpecificType(t) { + switch (t) { ++ case "bigint": ++ gen ++ .elseIf( ++ codegen_1._`${dataType} == "boolean" || ${data} === null ++ || (${dataType} == "string" && ${data} && ${data} == BigInt(${data}))` ++ ) ++ .assign(coerced, codegen_1._`BigInt(${data})`) ++ return + case "string": + gen + .elseIf((0, codegen_1._) `${dataType} == "number" || ${dataType} == "boolean"`) +@@ -144,6 +152,9 @@ function checkDataType(dataType, data, strictNums, correct = DataType.Correct) { + case "number": + cond = numCond(); + break; ++ case "bigint": ++ cond = codegen_1._`typeof ${data} == "bigint" && isFinite(${data})` ++ break + default: + return (0, codegen_1._) `typeof ${data} ${EQ} ${dataType}`; + } +diff --git a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +index 7027a12..25679c8 100644 +--- a/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json ++++ b/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +@@ -78,7 +78,7 @@ + "default": 0 + }, + "simpleTypes": { +- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] ++ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] + }, + "stringArray": { + "type": "array", +diff --git a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +index e0ae13d..57c9036 100644 +--- a/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json ++++ b/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +@@ -78,7 +78,7 @@ + "default": 0 + }, + "simpleTypes": { +- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] ++ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] + }, + "stringArray": { + "type": "array", +diff --git a/node_modules/ajv/dist/refs/json-schema-draft-06.json b/node_modules/ajv/dist/refs/json-schema-draft-06.json +index 5410064..774435b 100644 +--- a/node_modules/ajv/dist/refs/json-schema-draft-06.json ++++ b/node_modules/ajv/dist/refs/json-schema-draft-06.json +@@ -16,7 +16,7 @@ + "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}] + }, + "simpleTypes": { +- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] ++ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] + }, + "stringArray": { + "type": "array", +diff --git a/node_modules/ajv/dist/refs/json-schema-draft-07.json b/node_modules/ajv/dist/refs/json-schema-draft-07.json +index 6a74851..fc6dd7d 100644 +--- a/node_modules/ajv/dist/refs/json-schema-draft-07.json ++++ b/node_modules/ajv/dist/refs/json-schema-draft-07.json +@@ -16,7 +16,7 @@ + "allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}] + }, + "simpleTypes": { +- "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] ++ "enum": ["array", "boolean", "integer", "null", "number", "object", "string","bigint"] + }, + "stringArray": { + "type": "array", +diff --git a/node_modules/ajv/dist/refs/jtd-schema.js b/node_modules/ajv/dist/refs/jtd-schema.js +index 1ee940a..1148887 100644 +--- a/node_modules/ajv/dist/refs/jtd-schema.js ++++ b/node_modules/ajv/dist/refs/jtd-schema.js +@@ -38,6 +38,7 @@ const typeForm = (root) => ({ + "uint16", + "int32", + "uint32", ++ "bigint", + ], + }, + }, +diff --git a/node_modules/ajv/dist/runtime/parseJson.js b/node_modules/ajv/dist/runtime/parseJson.js +index eaa2838..02ad708 100644 +--- a/node_modules/ajv/dist/runtime/parseJson.js ++++ b/node_modules/ajv/dist/runtime/parseJson.js +@@ -97,6 +97,71 @@ exports.parseJsonNumber = parseJsonNumber; + parseJsonNumber.message = undefined; + parseJsonNumber.position = 0; + parseJsonNumber.code = 'require("ajv/dist/runtime/parseJson").parseJsonNumber'; ++ ++function parseJsonBigInt(s, pos, maxDigits) { ++ let numStr = ""; ++ let c; ++ parseJsonBigInt.message = undefined; ++ if (s[pos] === "-") { ++ numStr += "-"; ++ pos++; ++ } ++ if (s[pos] === "0") { ++ numStr += "0"; ++ pos++; ++ } ++ else { ++ if (!parseDigits(maxDigits)) { ++ errorMessage(); ++ return undefined; ++ } ++ } ++ if (maxDigits) { ++ parseJsonBigInt.position = pos; ++ return BigInt(numStr); ++ } ++ if (s[pos] === ".") { ++ numStr += "."; ++ pos++; ++ if (!parseDigits()) { ++ errorMessage(); ++ return undefined; ++ } ++ } ++ if (((c = s[pos]), c === "e" || c === "E")) { ++ numStr += "e"; ++ pos++; ++ if (((c = s[pos]), c === "+" || c === "-")) { ++ numStr += c; ++ pos++; ++ } ++ if (!parseDigits()) { ++ errorMessage(); ++ return undefined; ++ } ++ } ++ parseJsonBigInt.position = pos; ++ return BigInt(numStr); ++ function parseDigits(maxLen) { ++ let digit = false; ++ while (((c = s[pos]), c >= "0" && c <= "9" && (maxLen === undefined || maxLen-- > 0))) { ++ digit = true; ++ numStr += c; ++ pos++; ++ } ++ return digit; ++ } ++ function errorMessage() { ++ parseJsonBigInt.position = pos; ++ parseJsonBigInt.message = pos < s.length ? `unexpected token ${s[pos]}` : "unexpected end"; ++ } ++} ++exports.parseJsonBigInt = parseJsonBigInt; ++parseJsonBigInt.message = undefined; ++parseJsonBigInt.position = 0; ++parseJsonBigInt.code = 'require("ajv/dist/runtime/parseJson").parseJsonBigInt'; ++ ++ + const escapedChars = { + b: "\b", + f: "\f", +diff --git a/node_modules/ajv/dist/vocabularies/jtd/type.js b/node_modules/ajv/dist/vocabularies/jtd/type.js +index 17a0b51..bc54aad 100644 +--- a/node_modules/ajv/dist/vocabularies/jtd/type.js ++++ b/node_modules/ajv/dist/vocabularies/jtd/type.js +@@ -45,6 +45,9 @@ const def = { + cond = timestampCode(cxt); + break; + } ++ case "bigint": ++ cond = codegen_1._`typeof ${data} == "bigint" || typeof ${data} == "string"` ++ break + case "float32": + case "float64": + cond = (0, codegen_1._) `typeof ${data} == "number"`; diff --git a/patches/body-parser+2.2.1.patch b/patches/body-parser+2.2.1.patch deleted file mode 100644 index d61629e..0000000 --- a/patches/body-parser+2.2.1.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/node_modules/body-parser/lib/types/json.js b/node_modules/body-parser/lib/types/json.js -index 15c54bb..90f8507 100644 ---- a/node_modules/body-parser/lib/types/json.js -+++ b/node_modules/body-parser/lib/types/json.js -@@ -15,6 +15,7 @@ - var debug = require('debug')('body-parser:json') - var read = require('../read') - var { normalizeOptions } = require('../utils') -+var JSONbig = require("json-bigint"); - - /** - * Module exports. -@@ -71,7 +72,7 @@ function json (options) { - - try { - debug('parse json') -- return JSON.parse(body, reviver) -+ return JSONbig.parse(body, reviver) - } catch (e) { - throw normalizeJsonSyntaxError(e, { - message: e.message, -@@ -113,7 +114,7 @@ function createStrictSyntaxError (str, char) { - } - - try { -- JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') -+ JSONbig.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') - } catch (e) { - return normalizeJsonSyntaxError(e, { - message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) { -@@ -159,7 +160,7 @@ function normalizeJsonSyntaxError (error, obj) { - } - - // replace stack before message for Node.js 0.10 and below -- error.stack = obj.stack.replace(error.message, obj.message) -+ error.stack = obj.stack?.replace(error.message, obj.message) - error.message = obj.message - - return error diff --git a/patches/body-parser+2.2.2.patch b/patches/body-parser+2.2.2.patch new file mode 100644 index 0000000..6d4f5dd --- /dev/null +++ b/patches/body-parser+2.2.2.patch @@ -0,0 +1,39 @@ +diff --git a/node_modules/body-parser/lib/types/json.js b/node_modules/body-parser/lib/types/json.js +index 23c7357..0243133 100644 +--- a/node_modules/body-parser/lib/types/json.js ++++ b/node_modules/body-parser/lib/types/json.js +@@ -15,6 +15,7 @@ + var debug = require('debug')('body-parser:json') + var read = require('../read') + var { normalizeOptions } = require('../utils') ++var JSONbig = require("json-bigint"); + + /** + * Module exports. +@@ -69,7 +70,7 @@ function json (options) { + + try { + debug('parse json') +- return JSON.parse(body, reviver) ++ return JSONbig.parse(body, reviver) + } catch (e) { + throw normalizeJsonSyntaxError(e, { + message: e.message, +@@ -106,7 +107,7 @@ function createStrictSyntaxError (str, char) { + } + + try { +- JSON.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') ++ JSONbig.parse(partial); /* istanbul ignore next */ throw new SyntaxError('strict violation') + } catch (e) { + return normalizeJsonSyntaxError(e, { + message: e.message.replace(JSON_SYNTAX_REGEXP, function (placeholder) { +@@ -151,7 +152,7 @@ function normalizeJsonSyntaxError (error, obj) { + } + + // replace stack before message for Node.js 0.10 and below +- error.stack = obj.stack.replace(error.message, obj.message) ++ error.stack = obj.stack?.replace(error.message, obj.message) + error.message = obj.message + + return error diff --git a/src/api/middlewares/Translation.ts b/src/api/middlewares/Translation.ts index 5e698c4..3ca204b 100644 --- a/src/api/middlewares/Translation.ts +++ b/src/api/middlewares/Translation.ts @@ -42,7 +42,6 @@ loadPath: path.join(ASSET_FOLDER_PATH, "locales") + "/{{lng}}/{{ns}}.json", }, load: "all", - showSupportNotice: false, }); router.use(i18nextMiddleware.handle(i18next, {}));