diff --git a/hashes.json b/hashes.json index 2926160..3f314bf 100644 --- a/hashes.json +++ b/hashes.json @@ -1,3 +1,3 @@ { - "npmDepsHash": "sha256-JolEhCK62tYUQN2ID5g3e/sKDBXAat3Ek5yg7uu7RqY=" + "npmDepsHash": "sha256-GgNaRWT7ZD5iUgWcKqCwzBuPgJDamsPh9SLB2aiQFgY=" } diff --git a/package-lock.json b/package-lock.json index 1c6a213..f06df1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "body-parser": "^2.2.0", "cheerio": "^1.1.2", "cookie-parser": "^1.4.7", + "discord-protos": "^1.2.69", "dotenv": "^17.2.2", "email-providers": "^2.15.0", "exif-be-gone": "^1.5.1", @@ -76,7 +77,6 @@ "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.45.0", "@typescript-eslint/parser": "^8.45.0", - "discord-protos": "^1.2.69", "eslint": "^9.36.0", "express": "^5.1.0", "globals": "^16.4.0", @@ -2535,7 +2535,6 @@ "version": "2.11.1", "resolved": "https://registry.npmjs.org/@protobuf-ts/runtime/-/runtime-2.11.1.tgz", "integrity": "sha512-KuDaT1IfHkugM2pyz+FwiY80ejWrkH1pAtOBOZFuR6SXEFTsnb/jiQWQ1rCIrcKx2BtyxnxW6BWwsVSA/Ie+WQ==", - "dev": true, "license": "(Apache-2.0 AND BSD-3-Clause)" }, "node_modules/@sendgrid/client": { @@ -5250,7 +5249,6 @@ "version": "1.2.69", "resolved": "https://registry.npmjs.org/discord-protos/-/discord-protos-1.2.69.tgz", "integrity": "sha512-Fl045qSG5dSYIyZJ7X0Hkx8vreTtzaz+jLp4VMvC1igxb91+4Xq7s+J6sLQRcGsMMHbR7qj7+KVsAQmp6SYctQ==", - "dev": true, "license": "MIT", "dependencies": { "@protobuf-ts/runtime": "^2.9.6" diff --git a/package.json b/package.json index 246c561..52b6da2 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,6 @@ "@types/ws": "^8.18.1", "@typescript-eslint/eslint-plugin": "^8.45.0", "@typescript-eslint/parser": "^8.45.0", - "discord-protos": "^1.2.69", "eslint": "^9.36.0", "express": "^5.1.0", "globals": "^16.4.0", @@ -82,6 +81,7 @@ "cheerio": "^1.1.2", "cookie-parser": "^1.4.7", "dotenv": "^17.2.2", + "discord-protos": "^1.2.69", "email-providers": "^2.15.0", "exif-be-gone": "^1.5.1", "fast-zlib": "^2.0.1", diff --git a/patches/body-parser+1.20.3.patch b/patches/body-parser+1.20.3.patch deleted file mode 100644 index 8f44efd..0000000 --- a/patches/body-parser+1.20.3.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 59f3f7e..604f8b1 100644 ---- a/node_modules/body-parser/lib/types/json.js -+++ b/node_modules/body-parser/lib/types/json.js -@@ -18,6 +18,7 @@ var createError = require('http-errors') - var debug = require('debug')('body-parser:json') - var read = require('../read') - var typeis = require('type-is') -+var JSONbig = require("json-bigint"); - - /** - * Module exports. -@@ -89,7 +90,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, -@@ -166,7 +167,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) { -@@ -227,7 +228,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.0.patch b/patches/body-parser+2.2.0.patch new file mode 100644 index 0000000..a339901 --- /dev/null +++ b/patches/body-parser+2.2.0.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 078ce71..af121b3 100644 +--- a/node_modules/body-parser/lib/types/json.js ++++ b/node_modules/body-parser/lib/types/json.js +@@ -17,6 +17,7 @@ var debug = require('debug')('body-parser:json') + var isFinished = require('on-finished').isFinished + var read = require('../read') + var typeis = require('type-is') ++var JSONbig = require("json-bigint"); + var { getCharset, normalizeOptions } = require('../utils') + + /** +@@ -74,7 +75,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, +@@ -153,7 +154,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) { +@@ -199,7 +200,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/express+4.21.2.patch b/patches/express+4.21.2.patch deleted file mode 100644 index c2d2355..0000000 --- a/patches/express+4.21.2.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git a/node_modules/express/lib/response.js b/node_modules/express/lib/response.js -index 2b654f4..f09c95e 100644 ---- a/node_modules/express/lib/response.js -+++ b/node_modules/express/lib/response.js -@@ -27,7 +27,6 @@ var merge = require('utils-merge'); - var sign = require('cookie-signature').sign; - var normalizeType = require('./utils').normalizeType; - var normalizeTypes = require('./utils').normalizeTypes; --var setCharset = require('./utils').setCharset; - var cookie = require('cookie'); - var send = require('send'); - var extname = path.extname; -@@ -54,8 +53,6 @@ module.exports = res - * @private - */ - --var charsetRegExp = /;\s*charset\s*=/; -- - /** - * Set status `code`. - * -@@ -164,16 +161,6 @@ res.send = function send(body) { - break; - } - -- // write strings in utf-8 -- if (typeof chunk === 'string') { -- encoding = 'utf8'; -- type = this.get('Content-Type'); -- -- // reflect this in content-type -- if (typeof type === 'string') { -- this.set('Content-Type', setCharset(type, 'utf-8')); -- } -- } - - // determine if ETag should be generated - var etagFn = app.get('etag fn') -@@ -780,17 +767,6 @@ res.header = function header(field, val) { - ? val.map(String) - : String(val); - -- // add charset to content-type -- if (field.toLowerCase() === 'content-type') { -- if (Array.isArray(value)) { -- throw new TypeError('Content-Type cannot be set to an Array'); -- } -- if (!charsetRegExp.test(value)) { -- var charset = mime.charsets.lookup(value.split(';')[0]); -- if (charset) value += '; charset=' + charset.toLowerCase(); -- } -- } -- - this.setHeader(field, value); - } else { - for (var key in field) { diff --git a/patches/express+5.1.0.patch b/patches/express+5.1.0.patch new file mode 100644 index 0000000..70d9947 --- /dev/null +++ b/patches/express+5.1.0.patch @@ -0,0 +1,45 @@ +diff --git a/node_modules/express/lib/response.js b/node_modules/express/lib/response.js +index 9362d0e..0f3ed6d 100644 +--- a/node_modules/express/lib/response.js ++++ b/node_modules/express/lib/response.js +@@ -25,7 +25,6 @@ var statuses = require('statuses') + var sign = require('cookie-signature').sign; + var normalizeType = require('./utils').normalizeType; + var normalizeTypes = require('./utils').normalizeTypes; +-var setCharset = require('./utils').setCharset; + var cookie = require('cookie'); + var send = require('send'); + var extname = path.extname; +@@ -151,17 +150,6 @@ res.send = function send(body) { + break; + } + +- // write strings in utf-8 +- if (typeof chunk === 'string') { +- encoding = 'utf8'; +- type = this.get('Content-Type'); +- +- // reflect this in content-type +- if (typeof type === 'string') { +- this.set('Content-Type', setCharset(type, 'utf-8')); +- } +- } +- + // determine if ETag should be generated + var etagFn = app.get('etag fn') + var generateETag = !this.get('ETag') && typeof etagFn === 'function' +@@ -673,14 +661,6 @@ res.header = function header(field, val) { + ? val.map(String) + : String(val); + +- // add charset to content-type +- if (field.toLowerCase() === 'content-type') { +- if (Array.isArray(value)) { +- throw new TypeError('Content-Type cannot be set to an Array'); +- } +- value = mime.contentType(value) +- } +- + this.setHeader(field, value); + } else { + for (var key in field) { diff --git a/patches/typescript-json-schema+0.50.1.patch b/patches/typescript-json-schema+0.50.1.patch deleted file mode 100644 index a0d479d..0000000 --- a/patches/typescript-json-schema+0.50.1.patch +++ /dev/null @@ -1,14 +0,0 @@ -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 ---- 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 () { - else if (flags & ts.TypeFlags.Boolean) { - definition.type = "boolean"; - } -+ else if (flags & ts.TypeFlags.BigInt) { -+ definition.type = "bigint"; -+ } - else if (flags & ts.TypeFlags.Null) { - definition.type = "null"; - } diff --git a/patches/typescript-json-schema+0.65.1.patch b/patches/typescript-json-schema+0.65.1.patch new file mode 100644 index 0000000..2164d4a --- /dev/null +++ b/patches/typescript-json-schema+0.65.1.patch @@ -0,0 +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 3eab401..69658a4 100644 +--- a/node_modules/typescript-json-schema/dist/typescript-json-schema.js ++++ b/node_modules/typescript-json-schema/dist/typescript-json-schema.js +@@ -470,6 +470,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.ESSymbol) { + definition.type = "object"; + }