diff --git a/packages/backend/package.json b/packages/backend/package.json index 83c49459b5..3827257760 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -39,6 +39,7 @@ "@sinonjs/fake-timers": "9.1.2", "@syuilo/aiscript": "0.11.1", "@tensorflow/tfjs": "^4.2.0", + "@types/superagent": "^4.1.18", "adm-zip": "^0.5.10", "ajv": "8.12.0", "archiver": "6.0.0", @@ -65,7 +66,6 @@ "file-type": "18.5.0", "firefish-js": "workspace:*", "fluent-ffmpeg": "2.1.2", - "got": "13.0.0", "gunzip-maybe": "^1.4.2", "happy-dom": "^11.0.2", "hpagent": "1.2.0", @@ -126,6 +126,7 @@ "sonic-channel": "^1.3.1", "stringz": "2.1.0", "summaly": "2.7.0", + "superagent": "^8.1.2", "syslog-pro": "1.0.0", "systeminformation": "5.21.3", "tar-stream": "^3.1.6", diff --git a/packages/backend/src/misc/download-url.ts b/packages/backend/src/misc/download-url.ts index 83680c175f..7dfe13a123 100644 --- a/packages/backend/src/misc/download-url.ts +++ b/packages/backend/src/misc/download-url.ts @@ -1,7 +1,5 @@ import * as fs from "node:fs"; -import * as stream from "node:stream"; -import * as util from "node:util"; -import got, * as Got from "got"; +import superagent from "superagent"; import { httpAgent, httpsAgent, StatusError } from "./fetch.js"; import config from "@/config/index.js"; import chalk from "chalk"; @@ -9,80 +7,41 @@ import Logger from "@/services/logger.js"; import IPCIDR from "ip-cidr"; import PrivateIp from "private-ip"; -const pipeline = util.promisify(stream.pipeline); - export async function downloadUrl(url: string, path: string): Promise { const logger = new Logger("download"); logger.info(`Downloading ${chalk.cyan(url)} ...`); const timeout = 30 * 1000; - const operationTimeout = 60 * 1000; - const maxSize = config.maxFileSize || 262144000; - - const req = got - .stream(url, { - headers: { - "User-Agent": config.userAgent, - Host: new URL(url).hostname, - }, - timeout: { - lookup: timeout, - connect: timeout, - secureConnect: timeout, - socket: timeout, // read timeout - response: timeout, - send: timeout, - request: operationTimeout, // whole operation timeout - }, - agent: { - http: httpAgent, - https: httpsAgent, - }, - http2: false, // default - retry: { - limit: 0, - }, - }) - .on("response", (res: Got.Response) => { - if ( - (process.env.NODE_ENV === "production" || - process.env.NODE_ENV === "test") && - !config.proxy && - res.ip - ) { - if (isPrivateIp(res.ip)) { - logger.warn(`Blocked address: ${res.ip}`); - req.destroy(); - } - } - - const contentLength = res.headers["content-length"]; - if (contentLength != null) { - const size = Number(contentLength); - if (size > maxSize) { - logger.warn(`maxSize exceeded (${size} > ${maxSize}) on response`); - req.destroy(); - } - } - }) - .on("downloadProgress", (progress: Got.Progress) => { - if (progress.transferred > maxSize) { - logger.warn( - `maxSize exceeded (${progress.transferred} > ${maxSize}) on downloadProgress`, - ); - req.destroy(); - } - }); try { - await pipeline(req, fs.createWriteStream(path)); + const response = await superagent + .get(url) + .set("User-Agent", config.userAgent) + .set("Host", new URL(url).hostname) + .timeout({ + response: timeout, // Wait for server to start sending. + deadline: timeout * 2, // Time the entire request. + }) + .agent(new URL(url).protocol === "https:" ? httpsAgent : httpAgent); + + const contentLength = response.headers["content-length"]; + if ( + contentLength && + Number(contentLength) > (config.maxFileSize || 262144000) + ) { + throw new Error( + `maxSize exceeded: ${contentLength} > ${config.maxFileSize}`, + ); + } + + fs.writeFileSync(path, response.body); } catch (e) { - if (e instanceof Got.HTTPError) { + if (e.response) { throw new StatusError( - `${e.response.statusCode} ${e.response.statusMessage}`, + `${e.response.statusCode} ${e.response.text}`, e.response.statusCode, - e.response.statusMessage, + e.response.text, ); } else { throw e; @@ -100,5 +59,5 @@ export function isPrivateIp(ip: string): boolean { } } - return PrivateIp(ip); + return PrivateIp(ip) || false; } diff --git a/packages/backend/src/misc/fetch.ts b/packages/backend/src/misc/fetch.ts index e47ef0d47a..08242f0b52 100644 --- a/packages/backend/src/misc/fetch.ts +++ b/packages/backend/src/misc/fetch.ts @@ -1,8 +1,7 @@ import * as http from "node:http"; import * as https from "node:https"; -import type { URL } from "node:url"; -import CacheableLookup from "cacheable-lookup"; -import fetch from "node-fetch"; +import { URL } from "node:url"; +import request from "superagent"; import { HttpProxyAgent, HttpsProxyAgent } from "hpagent"; import config from "@/config/index.js"; @@ -12,20 +11,15 @@ export async function getJson( timeout = 10000, headers?: Record, ) { - const res = await getResponse({ - url, - method: "GET", - headers: Object.assign( - { - "User-Agent": config.userAgent, - Accept: accept, - }, - headers || {}, - ), - timeout, - }); + const response = await request + .get(url) + .set("User-Agent", config.userAgent) + .set("Accept", accept) + .set(headers || {}) + .timeout(timeout) + .agent(getAgentByUrl(new URL(url))); - return await res.json(); + return response.body; } export async function getHtml( @@ -34,71 +28,19 @@ export async function getHtml( timeout = 10000, headers?: Record, ) { - const res = await getResponse({ - url, - method: "GET", - headers: Object.assign( - { - "User-Agent": config.userAgent, - Accept: accept, - }, - headers || {}, - ), - timeout, - }); + const response = await request + .get(url) + .set("User-Agent", config.userAgent) + .set("Accept", accept) + .set(headers || {}) + .timeout(timeout) + .agent(getAgentByUrl(new URL(url))); - return await res.text(); + return response.text; } - -export async function getResponse(args: { - url: string; - method: string; - body?: string; - headers: Record; - timeout?: number; - size?: number; -}) { - const timeout = args.timeout || 10 * 1000; - - const controller = new AbortController(); - setTimeout(() => { - controller.abort(); - }, timeout * 6); - - const res = await fetch(args.url, { - method: args.method, - headers: args.headers, - body: args.body, - timeout, - size: args.size || 10 * 1024 * 1024, - agent: getAgentByUrl, - signal: controller.signal, - }); - - if (!res.ok) { - throw new StatusError( - `${res.status} ${res.statusText}`, - res.status, - res.statusText, - ); - } - - return res; -} - -const cache = new CacheableLookup({ - maxTtl: 3600, // 1hours - errorTtl: 30, // 30secs - lookup: false, // nativeのdns.lookupにfallbackしない -}); - -/** - * Get http non-proxy agent - */ const _http = new http.Agent({ keepAlive: true, keepAliveMsecs: 30 * 1000, - lookup: cache.lookup, localAddress: config.outgoingAddress, } as http.AgentOptions); @@ -108,7 +50,6 @@ const _http = new http.Agent({ const _https = new https.Agent({ keepAlive: true, keepAliveMsecs: 30 * 1000, - lookup: cache.lookup, localAddress: config.outgoingAddress, } as https.AgentOptions); @@ -167,9 +108,6 @@ export class StatusError extends Error { this.name = "StatusError"; this.statusCode = statusCode; this.statusMessage = statusMessage; - this.isClientError = - typeof this.statusCode === "number" && - this.statusCode >= 400 && - this.statusCode < 500; + this.isClientError = this.statusCode >= 400 && this.statusCode < 500; } } diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index 79d622b54b..52fecfd06f 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -6,13 +6,13 @@ import * as childProcess from "child_process"; import * as http from "node:http"; import { SIGKILL } from "constants"; import WebSocket from "ws"; -import * as misskey from "firefish-js"; +import * as firefish from "firefish-js"; import fetch from "node-fetch"; import FormData from "form-data"; import { DataSource } from "typeorm"; import loadConfig from "../src/config/load.js"; import { entities } from "../src/db/postgre.js"; -import got from "got"; +import superagent from "superagent"; const _filename = fileURLToPath(import.meta.url); const _dirname = dirname(_filename); @@ -34,39 +34,24 @@ export const async = (fn: Function) => (done: Function) => { export const api = async (endpoint: string, params: any, me?: any) => { endpoint = endpoint.replace(/^\//, ""); - const auth = me - ? { - i: me.token, - } - : {}; + const auth = me ? { i: me.token } : {}; - const res = await got(`http://localhost:${port}/api/${endpoint}`, { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify(Object.assign(auth, params)), - retry: { - limit: 0, - }, - hooks: { - beforeError: [ - (error) => { - const { response } = error; - if (response && response.body) console.warn(response.body); - return error; - }, - ], - }, - }); + try { + const res = await superagent + .post(`http://localhost:${port}/api/${endpoint}`) + .set("Content-Type", "application/json") + .send(Object.assign(auth, params)); - const status = res.statusCode; - const body = res.statusCode !== 204 ? await JSON.parse(res.body) : null; + const status = res.status; + const body = res.status !== 204 ? res.body : null; - return { - status, - body, - }; + return { status, body }; + } catch (error) { + if (error.response?.body) { + console.warn(error.response.body); + } + throw error; + } }; export const request = async ( @@ -113,8 +98,8 @@ export const signup = async (params?: any): Promise => { export const post = async ( user: any, - params?: misskey.Endpoints["notes/create"]["req"], -): Promise => { + params?: firefish.Endpoints["notes/create"]["req"], +): Promise => { const q = Object.assign( { text: "test", @@ -150,30 +135,27 @@ export const react = async ( export const uploadFile = async (user: any, _path?: string): Promise => { const absPath = _path == null - ? `${_dirname}/resources/Lenna.jpg` + ? path.join(__dirname, "resources", "Lenna.jpg") : path.isAbsolute(_path) ? _path - : `${_dirname}/resources/${_path}`; + : path.join(__dirname, "resources", _path); - const formData = new FormData() as any; - formData.append("i", user.token); - formData.append("file", fs.createReadStream(absPath)); - formData.append("force", "true"); + try { + const res = await superagent + .post(`http://localhost:${port}/api/drive/files/create`) + .attach("file", absPath) + .field("i", user.token) + .field("force", "true"); - const res = await got( - `http://localhost:${port}/api/drive/files/create`, - { - method: "POST", - body: formData, - retry: { - limit: 0, - }, - }, - ); + const body = res.status !== 204 ? res.body : null; - const body = res.statusCode !== 204 ? await JSON.parse(res.body) : null; - - return body; + return body; + } catch (error) { + if (error.response?.body) { + console.warn(error.response.body); + } + throw error; + } }; export const uploadUrl = async (user: any, url: string) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d05a92fed2..e71b59de68 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -135,6 +135,9 @@ importers: '@tensorflow/tfjs': specifier: ^4.2.0 version: 4.11.0(seedrandom@3.0.5) + '@types/superagent': + specifier: ^4.1.18 + version: 4.1.18 adm-zip: specifier: ^0.5.10 version: 0.5.10 @@ -213,9 +216,6 @@ importers: fluent-ffmpeg: specifier: 2.1.2 version: 2.1.2 - got: - specifier: 13.0.0 - version: 13.0.0 gunzip-maybe: specifier: ^1.4.2 version: 1.4.2 @@ -396,6 +396,9 @@ importers: summaly: specifier: 2.7.0 version: 2.7.0 + superagent: + specifier: ^8.1.2 + version: 8.1.2 syslog-pro: specifier: 1.0.0 version: 1.0.0 @@ -613,7 +616,7 @@ importers: version: 5.1.6 webpack: specifier: ^5.88.2 - version: 5.88.2(@swc/core@1.3.78)(webpack-cli@5.1.4) + version: 5.88.2(@swc/core@1.3.78) ws: specifier: 8.13.0 version: 8.13.0 @@ -3239,11 +3242,6 @@ packages: resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} engines: {node: '>=10'} - /@sindresorhus/is@5.6.0: - resolution: {integrity: sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g==} - engines: {node: '>=14.16'} - dev: false - /@sinonjs/commons@1.8.6: resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==} dependencies: @@ -3303,6 +3301,7 @@ packages: engines: {node: '>=10'} cpu: [arm64] os: [android] + requiresBuild: true dependencies: '@swc/wasm': 1.2.130 @@ -3409,6 +3408,7 @@ packages: /@swc/wasm@1.2.130: resolution: {integrity: sha512-rNcJsBxS70+pv8YUWwf5fRlWX6JoY/HJc25HD/F8m6Kv7XhJdqPPMhyX6TKkUBPAG7TWlZYoxa+rHAjPy4Cj3Q==} + requiresBuild: true /@syuilo/aiscript@0.11.1: resolution: {integrity: sha512-chwOIA3yLUKvOB0G611hjLArKTeOWNmTm3lHERSaDW1d+dS6do56naX6Lkwy2UpnwWC0qzeNSgg35elk6t2gZg==} @@ -3425,13 +3425,6 @@ packages: dependencies: defer-to-connect: 2.0.1 - /@szmarczak/http-timer@5.0.1: - resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} - engines: {node: '>=14.16'} - dependencies: - defer-to-connect: 2.0.1 - dev: false - /@tensorflow/tfjs-backend-cpu@3.21.0(@tensorflow/tfjs-core@3.21.0): resolution: {integrity: sha512-88S21UAdzyK0CsLUrH17GPTD+26E85OP9CqmLZslaWjWUmBkeTQ5Zqyp6iK+gELnLxPx6q7JsNEeFuPv4254lQ==} engines: {yarn: '>= 1.3.2'} @@ -3759,6 +3752,10 @@ packages: /@types/content-disposition@0.5.6: resolution: {integrity: sha512-GmShTb4qA9+HMPPaV2+Up8tJafgi38geFi7vL4qAM7k8BwjoelgHZqEUKJZLvughUw22h6vD/wvwN4IUCaWpDA==} + /@types/cookiejar@2.1.2: + resolution: {integrity: sha512-t73xJJrvdTjXrn4jLS9VSGRbz0nUY3cl2DMGDU48lKl+HR9dbbjW2A9r3g40VA++mQpy6uuHg33gy7du2BKpog==} + dev: false + /@types/cookies@0.7.8: resolution: {integrity: sha512-y6KhF1GtsLERUpqOV+qZJrjUGzc0GE6UTa0b5Z/LZ7Nm2mKSdCXmS6Kdnl7fctPNnMSouHjxqEWI12/YqQfk5w==} dependencies: @@ -4296,6 +4293,13 @@ packages: '@types/node': 20.5.8 dev: true + /@types/superagent@4.1.18: + resolution: {integrity: sha512-LOWgpacIV8GHhrsQU+QMZuomfqXiqzz3ILLkCtKx3Us6AmomFViuzKT9D693QTKgyut2oCytMG8/efOop+DB+w==} + dependencies: + '@types/cookiejar': 2.1.2 + '@types/node': 20.5.8 + dev: false + /@types/throttle-debounce@5.0.0: resolution: {integrity: sha512-Pb7k35iCGFcGPECoNE4DYp3Oyf2xcTd3FbFQxXUI9hEYKUl6YX+KLf7HrBmgVcD05nl50LIH6i+80js4iYmWbw==} dev: true @@ -5733,7 +5737,7 @@ packages: /axios@0.24.0: resolution: {integrity: sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==} dependencies: - follow-redirects: 1.15.2(debug@4.3.4) + follow-redirects: 1.15.2 transitivePeerDependencies: - debug dev: false @@ -5759,7 +5763,7 @@ packages: /axios@1.5.0: resolution: {integrity: sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==} dependencies: - follow-redirects: 1.15.2(debug@4.3.4) + follow-redirects: 1.15.2 form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -6268,24 +6272,6 @@ packages: resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} engines: {node: '>=10.6.0'} - /cacheable-lookup@7.0.0: - resolution: {integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==} - engines: {node: '>=14.16'} - dev: false - - /cacheable-request@10.2.13: - resolution: {integrity: sha512-3SD4rrMu1msNGEtNSt8Od6enwdo//U9s4ykmXfA2TD58kcLkCobtCDiby7kNyj7a/Q7lz/mAesAFI54rTdnvBA==} - engines: {node: '>=14.16'} - dependencies: - '@types/http-cache-semantics': 4.0.2 - get-stream: 6.0.1 - http-cache-semantics: 4.1.1 - keyv: 4.5.3 - mimic-response: 4.0.0 - normalize-url: 8.0.0 - responselike: 3.0.0 - dev: false - /cacheable-request@7.0.4: resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} engines: {node: '>=8'} @@ -6918,7 +6904,6 @@ packages: /component-emitter@1.3.0: resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} - dev: true /compress-commons@4.1.2: resolution: {integrity: sha512-D3uMHtGc/fcO1Gt1/L7i1e33VOvD4A9hfQLP+6ewd+BvG/gQ84Yh4oftEhAdjSMgBgwGL+jsppT7JYNpo6MHHg==} @@ -7173,6 +7158,10 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true + /cookiejar@2.1.4: + resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} + dev: false + /cookies@0.8.0: resolution: {integrity: sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==} engines: {node: '>= 0.8'} @@ -7519,6 +7508,17 @@ packages: dependencies: ms: 2.0.0 + /debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + dev: false + /debug@3.2.7(supports-color@8.1.1): resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -7529,6 +7529,7 @@ packages: dependencies: ms: 2.1.3 supports-color: 8.1.1 + dev: true /debug@4.3.3: resolution: {integrity: sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==} @@ -9276,6 +9277,10 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + dev: false + /fast-xml-parser@4.2.7: resolution: {integrity: sha512-J8r6BriSLO1uj2miOk1NW0YVm8AGOOu3Si2HQp/cSmo6EA4m3fcwu2WKjJ4RK9wMLBtg69y1kS8baDiQBR41Ig==} hasBin: true @@ -9551,6 +9556,16 @@ packages: tabbable: 6.2.0 dev: true + /follow-redirects@1.15.2: + resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dev: false + /follow-redirects@1.15.2(debug@4.3.4): resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} engines: {node: '>=4.0'} @@ -9590,11 +9605,6 @@ packages: /forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - /form-data-encoder@2.1.4: - resolution: {integrity: sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==} - engines: {node: '>= 14.17'} - dev: false - /form-data@2.3.3: resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} engines: {node: '>= 0.12'} @@ -9861,6 +9871,7 @@ packages: /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + dev: true /get-symbol-description@1.0.0: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} @@ -10121,23 +10132,6 @@ packages: responselike: 2.0.1 dev: true - /got@13.0.0: - resolution: {integrity: sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA==} - engines: {node: '>=16'} - dependencies: - '@sindresorhus/is': 5.6.0 - '@szmarczak/http-timer': 5.0.1 - cacheable-lookup: 7.0.0 - cacheable-request: 10.2.13 - decompress-response: 6.0.0 - form-data-encoder: 2.1.4 - get-stream: 6.0.1 - http2-wrapper: 2.2.0 - lowercase-keys: 3.0.0 - p-cancelable: 3.0.0 - responselike: 3.0.0 - dev: false - /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -10531,14 +10525,6 @@ packages: quick-lru: 5.1.1 resolve-alpn: 1.2.1 - /http2-wrapper@2.2.0: - resolution: {integrity: sha512-kZB0wxMo0sh1PehyjJUWRFEd99KC5TLjZ2cULC4f9iqJBAmKQQXEICjxl5iPJRwP40dpeHFqqhm7tYCvODpqpQ==} - engines: {node: '>=10.19.0'} - dependencies: - quick-lru: 5.1.1 - resolve-alpn: 1.2.1 - dev: false - /http_ece@1.1.0: resolution: {integrity: sha512-bptAfCDdPJxOs5zYSe7Y3lpr772s1G346R4Td5LgRUeCwIGpCGDUTJxRrhTNcAXbx37spge0kWEIH7QAYWNTlA==} engines: {node: '>=4'} @@ -10552,7 +10538,7 @@ packages: requiresBuild: true dependencies: agent-base: 4.3.0 - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7 transitivePeerDependencies: - supports-color dev: false @@ -12537,7 +12523,7 @@ packages: json5: 2.2.3 loader-utils: 2.0.4 schema-utils: 3.3.0 - webpack: 5.88.2(@swc/core@1.3.78)(webpack-cli@5.1.4) + webpack: 5.88.2(@swc/core@1.3.78) dev: true /json5@1.0.2: @@ -12802,7 +12788,7 @@ packages: resolution: {integrity: sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==} engines: {node: '>= 7.6.0'} dependencies: - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7 koa-send: 5.0.1 transitivePeerDependencies: - supports-color @@ -12890,7 +12876,7 @@ packages: content-disposition: 0.5.4 content-type: 1.0.5 cookies: 0.8.0 - debug: 4.3.3 + debug: 4.3.4(supports-color@8.1.1) delegates: 1.0.0 depd: 2.0.0 destroy: 1.2.0 @@ -13227,11 +13213,6 @@ packages: resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} engines: {node: '>=8'} - /lowercase-keys@3.0.0: - resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: false - /lru-cache@10.0.1: resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} engines: {node: 14 || >=16.14} @@ -13535,6 +13516,12 @@ packages: dependencies: mime-db: 1.52.0 + /mime@2.6.0: + resolution: {integrity: sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==} + engines: {node: '>=4.0.0'} + hasBin: true + dev: false + /mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -13553,11 +13540,6 @@ packages: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} - /mimic-response@4.0.0: - resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: false - /min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -13915,7 +13897,7 @@ packages: engines: {node: '>= 4.4.x'} hasBin: true dependencies: - debug: 3.2.7(supports-color@8.1.1) + debug: 3.2.7 iconv-lite: 0.4.24 sax: 1.2.4 transitivePeerDependencies: @@ -14111,11 +14093,6 @@ packages: resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} engines: {node: '>=10'} - /normalize-url@8.0.0: - resolution: {integrity: sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw==} - engines: {node: '>=14.16'} - dev: false - /now-and-later@2.0.1: resolution: {integrity: sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==} engines: {node: '>= 0.10'} @@ -14439,11 +14416,6 @@ packages: resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} engines: {node: '>=8'} - /p-cancelable@3.0.0: - resolution: {integrity: sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw==} - engines: {node: '>=12.20'} - dev: false - /p-defer@1.0.0: resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} engines: {node: '>=4'} @@ -16094,13 +16066,6 @@ packages: dependencies: lowercase-keys: 2.0.0 - /responselike@3.0.0: - resolution: {integrity: sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg==} - engines: {node: '>=14.16'} - dependencies: - lowercase-keys: 3.0.0 - dev: false - /restore-cursor@3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} engines: {node: '>=8'} @@ -17014,6 +16979,24 @@ packages: - supports-color dev: false + /superagent@8.1.2: + resolution: {integrity: sha512-6WTxW1EB6yCxV5VFOIPQruWGHqc3yI7hEmZK6h+pyk69Lk/Ut7rLUY6W/ONF2MjBuGjvmMiIpsrVJ2vjrHlslA==} + engines: {node: '>=6.4.0 <13 || >=14'} + dependencies: + component-emitter: 1.3.0 + cookiejar: 2.1.4 + debug: 4.3.4(supports-color@8.1.1) + fast-safe-stringify: 2.1.1 + form-data: 4.0.0 + formidable: 2.1.2 + methods: 1.1.2 + mime: 2.6.0 + qs: 6.11.2 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + dev: false + /supertap@3.0.1: resolution: {integrity: sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -17095,7 +17078,7 @@ packages: webpack: '>=2' dependencies: '@swc/core': 1.3.78 - webpack: 5.88.2(@swc/core@1.3.78)(webpack-cli@5.1.4) + webpack: 5.88.2(@swc/core@1.3.78) dev: true /swiper@10.2.0: @@ -17253,7 +17236,7 @@ packages: schema-utils: 3.3.0 serialize-javascript: 6.0.1 terser: 5.19.4 - webpack: 5.88.2(@swc/core@1.3.78)(webpack-cli@5.1.4) + webpack: 5.88.2(@swc/core@1.3.78) dev: true /terser@5.19.4: @@ -17600,7 +17583,7 @@ packages: micromatch: 4.0.5 semver: 7.5.4 typescript: 5.1.6 - webpack: 5.88.2(@swc/core@1.3.78)(webpack-cli@5.1.4) + webpack: 5.88.2(@swc/core@1.3.78) dev: true /ts-node@10.4.0(@swc/core@1.3.78)(@types/node@20.3.1)(typescript@5.1.3): @@ -18589,6 +18572,46 @@ packages: engines: {node: '>=10.13.0'} dev: true + /webpack@5.88.2(@swc/core@1.3.78): + resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} + engines: {node: '>=10.13.0'} + hasBin: true + peerDependencies: + webpack-cli: '*' + peerDependenciesMeta: + webpack-cli: + optional: true + dependencies: + '@types/eslint-scope': 3.7.4 + '@types/estree': 1.0.1 + '@webassemblyjs/ast': 1.11.6 + '@webassemblyjs/wasm-edit': 1.11.6 + '@webassemblyjs/wasm-parser': 1.11.6 + acorn: 8.10.0 + acorn-import-assertions: 1.9.0(acorn@8.10.0) + browserslist: 4.21.10 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.15.0 + es-module-lexer: 1.3.1 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + json-parse-even-better-errors: 2.3.1 + loader-runner: 4.3.0 + mime-types: 2.1.35 + neo-async: 2.6.2 + schema-utils: 3.3.0 + tapable: 2.2.1 + terser-webpack-plugin: 5.3.9(@swc/core@1.3.78)(webpack@5.88.2) + watchpack: 2.4.0 + webpack-sources: 3.2.3 + transitivePeerDependencies: + - '@swc/core' + - esbuild + - uglify-js + dev: true + /webpack@5.88.2(@swc/core@1.3.78)(webpack-cli@5.1.4): resolution: {integrity: sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==} engines: {node: '>=10.13.0'}