Compare commits

...

7 Commits

Author SHA1 Message Date
copilot-swe-agent[bot] 4abf885705 Initial plan 2025-11-29 05:41:50 +00:00
syuilo fff881810a clean up 2025-11-29 13:55:33 +09:00
syuilo b70e14ccab コミット漏れ 2025-11-29 13:54:48 +09:00
syuilo 18ad790ed7 remove some packages 2025-11-29 13:54:30 +09:00
syuilo 9dd56a8c27
Update packages/backend/src/core/FetchInstanceMetadataService.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-29 11:27:15 +09:00
syuilo 1496f4164a
Update packages/backend/src/server/api/endpoints/i/update.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-29 11:26:40 +09:00
syuilo 2a112ffe5b wip 2025-11-29 09:43:55 +09:00
11 changed files with 155 additions and 258 deletions

View File

@ -7,7 +7,7 @@
- -
### Server ### Server
- - Enhance: メモリ使用量を削減しました
## 2025.11.1 ## 2025.11.1

View File

@ -121,16 +121,13 @@
"fluent-ffmpeg": "2.1.3", "fluent-ffmpeg": "2.1.3",
"form-data": "4.0.5", "form-data": "4.0.5",
"got": "14.6.4", "got": "14.6.4",
"happy-dom": "20.0.10",
"hpagent": "1.2.0", "hpagent": "1.2.0",
"htmlescape": "1.1.1",
"http-link-header": "1.1.3", "http-link-header": "1.1.3",
"ioredis": "5.8.2", "ioredis": "5.8.2",
"ip-cidr": "4.0.2", "ip-cidr": "4.0.2",
"ipaddr.js": "2.2.0", "ipaddr.js": "2.2.0",
"is-svg": "5.1.0", "is-svg": "5.1.0",
"js-yaml": "4.1.1", "js-yaml": "4.1.1",
"jsdom": "26.1.0",
"json5": "2.2.3", "json5": "2.2.3",
"jsonld": "8.3.3", "jsonld": "8.3.3",
"jsrsasign": "11.1.0", "jsrsasign": "11.1.0",
@ -145,6 +142,7 @@
"nanoid": "5.1.6", "nanoid": "5.1.6",
"nested-property": "4.0.0", "nested-property": "4.0.0",
"node-fetch": "3.3.2", "node-fetch": "3.3.2",
"node-html-parser": "7.0.1",
"nodemailer": "7.0.10", "nodemailer": "7.0.10",
"nsfwjs": "4.2.0", "nsfwjs": "4.2.0",
"oauth": "0.10.2", "oauth": "0.10.2",
@ -201,7 +199,6 @@
"@types/color-convert": "2.0.4", "@types/color-convert": "2.0.4",
"@types/content-disposition": "0.5.9", "@types/content-disposition": "0.5.9",
"@types/fluent-ffmpeg": "2.1.28", "@types/fluent-ffmpeg": "2.1.28",
"@types/htmlescape": "1.1.3",
"@types/http-link-header": "1.0.7", "@types/http-link-header": "1.0.7",
"@types/jest": "29.5.14", "@types/jest": "29.5.14",
"@types/js-yaml": "4.0.9", "@types/js-yaml": "4.0.9",
@ -240,6 +237,7 @@
"fkill": "9.0.0", "fkill": "9.0.0",
"jest": "29.7.0", "jest": "29.7.0",
"jest-mock": "29.7.0", "jest-mock": "29.7.0",
"jsdom": "26.1.0",
"nodemon": "3.1.11", "nodemon": "3.1.11",
"pid-port": "1.0.2", "pid-port": "1.0.2",
"simple-oauth2": "5.1.0", "simple-oauth2": "5.1.0",

View File

@ -5,9 +5,9 @@
import { URL } from 'node:url'; import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { JSDOM } from 'jsdom';
import tinycolor from 'tinycolor2'; import tinycolor from 'tinycolor2';
import * as Redis from 'ioredis'; import * as Redis from 'ioredis';
import * as htmlParser from 'node-html-parser';
import type { MiInstance } from '@/models/Instance.js'; import type { MiInstance } from '@/models/Instance.js';
import type Logger from '@/logger.js'; import type Logger from '@/logger.js';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
@ -15,7 +15,6 @@ import { LoggerService } from '@/core/LoggerService.js';
import { HttpRequestService } from '@/core/HttpRequestService.js'; import { HttpRequestService } from '@/core/HttpRequestService.js';
import { bindThis } from '@/decorators.js'; import { bindThis } from '@/decorators.js';
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js'; import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
import type { DOMWindow } from 'jsdom';
type NodeInfo = { type NodeInfo = {
openRegistrations?: unknown; openRegistrations?: unknown;
@ -59,7 +58,7 @@ export class FetchInstanceMetadataService {
return await this.redisClient.set( return await this.redisClient.set(
`fetchInstanceMetadata:mutex:v2:${host}`, '1', `fetchInstanceMetadata:mutex:v2:${host}`, '1',
'EX', 30, // 30秒したら自動でロック解除 https://github.com/misskey-dev/misskey/issues/13506#issuecomment-1975375395 'EX', 30, // 30秒したら自動でロック解除 https://github.com/misskey-dev/misskey/issues/13506#issuecomment-1975375395
'GET' // 古い値を返すなかったらnull 'GET', // 古い値を返すなかったらnull
); );
} }
@ -181,15 +180,14 @@ export class FetchInstanceMetadataService {
} }
@bindThis @bindThis
private async fetchDom(instance: MiInstance): Promise<Document> { private async fetchDom(instance: MiInstance): Promise<htmlParser.HTMLElement> {
this.logger.info(`Fetching HTML of ${instance.host} ...`); this.logger.info(`Fetching HTML of ${instance.host} ...`);
const url = 'https://' + instance.host; const url = 'https://' + instance.host;
const html = await this.httpRequestService.getHtml(url); const html = await this.httpRequestService.getHtml(url);
const { window } = new JSDOM(html); const doc = htmlParser.parse(html);
const doc = window.document;
return doc; return doc;
} }
@ -206,12 +204,12 @@ export class FetchInstanceMetadataService {
} }
@bindThis @bindThis
private async fetchFaviconUrl(instance: MiInstance, doc: Document | null): Promise<string | null> { private async fetchFaviconUrl(instance: MiInstance, doc: htmlParser.HTMLElement | null): Promise<string | null> {
const url = 'https://' + instance.host; const url = 'https://' + instance.host;
if (doc) { if (doc) {
// https://github.com/misskey-dev/misskey/pull/8220#issuecomment-1025104043 // https://github.com/misskey-dev/misskey/pull/8220#issuecomment-1025104043
const href = Array.from(doc.getElementsByTagName('link')).reverse().find(link => link.relList.contains('icon'))?.href; const href = Array.from(doc.getElementsByTagName('link')).reverse().find(link => link.attributes.rel === 'icon')?.attributes.href;
if (href) { if (href) {
return (new URL(href, url)).href; return (new URL(href, url)).href;
@ -232,7 +230,7 @@ export class FetchInstanceMetadataService {
} }
@bindThis @bindThis
private async fetchIconUrl(instance: MiInstance, doc: Document | null, manifest: Record<string, any> | null): Promise<string | null> { private async fetchIconUrl(instance: MiInstance, doc: htmlParser.HTMLElement | null, manifest: Record<string, any> | null): Promise<string | null> {
if (manifest && manifest.icons && manifest.icons.length > 0 && manifest.icons[0].src) { if (manifest && manifest.icons && manifest.icons.length > 0 && manifest.icons[0].src) {
const url = 'https://' + instance.host; const url = 'https://' + instance.host;
return (new URL(manifest.icons[0].src, url)).href; return (new URL(manifest.icons[0].src, url)).href;
@ -246,9 +244,9 @@ export class FetchInstanceMetadataService {
// https://github.com/misskey-dev/misskey/pull/8220/files/0ec4eba22a914e31b86874f12448f88b3e58dd5a#r796487559 // https://github.com/misskey-dev/misskey/pull/8220/files/0ec4eba22a914e31b86874f12448f88b3e58dd5a#r796487559
const href = const href =
[ [
links.find(link => link.relList.contains('apple-touch-icon-precomposed'))?.href, links.find(link => link.attributes.rel?.split(/\s+/).includes('apple-touch-icon-precomposed'))?.attributes.href,
links.find(link => link.relList.contains('apple-touch-icon'))?.href, links.find(link => link.attributes.rel?.split(/\s+/).includes('apple-touch-icon'))?.attributes.href,
links.find(link => link.relList.contains('icon'))?.href, links.find(link => link.attributes.rel?.split(/\s+/).includes('icon'))?.attributes.href,
] ]
.find(href => href); .find(href => href);
@ -261,7 +259,7 @@ export class FetchInstanceMetadataService {
} }
@bindThis @bindThis
private async getThemeColor(info: NodeInfo | null, doc: Document | null, manifest: Record<string, any> | null): Promise<string | null> { private async getThemeColor(info: NodeInfo | null, doc: htmlParser.HTMLElement | null, manifest: Record<string, any> | null): Promise<string | null> {
const themeColor = info?.metadata?.themeColor ?? doc?.querySelector('meta[name="theme-color"]')?.getAttribute('content') ?? manifest?.theme_color; const themeColor = info?.metadata?.themeColor ?? doc?.querySelector('meta[name="theme-color"]')?.getAttribute('content') ?? manifest?.theme_color;
if (themeColor) { if (themeColor) {
@ -273,7 +271,7 @@ export class FetchInstanceMetadataService {
} }
@bindThis @bindThis
private async getSiteName(info: NodeInfo | null, doc: Document | null, manifest: Record<string, any> | null): Promise<string | null> { private async getSiteName(info: NodeInfo | null, doc: htmlParser.HTMLElement | null, manifest: Record<string, any> | null): Promise<string | null> {
if (info && info.metadata) { if (info && info.metadata) {
if (typeof info.metadata.nodeName === 'string') { if (typeof info.metadata.nodeName === 'string') {
return info.metadata.nodeName; return info.metadata.nodeName;
@ -298,7 +296,7 @@ export class FetchInstanceMetadataService {
} }
@bindThis @bindThis
private async getDescription(info: NodeInfo | null, doc: Document | null, manifest: Record<string, any> | null): Promise<string | null> { private async getDescription(info: NodeInfo | null, doc: htmlParser.HTMLElement | null, manifest: Record<string, any> | null): Promise<string | null> {
if (info && info.metadata) { if (info && info.metadata) {
if (typeof info.metadata.nodeDescription === 'string') { if (typeof info.metadata.nodeDescription === 'string') {
return info.metadata.nodeDescription; return info.metadata.nodeDescription;

View File

@ -6,7 +6,6 @@
import { URL } from 'node:url'; import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import * as parse5 from 'parse5'; import * as parse5 from 'parse5';
import { type Document, type HTMLParagraphElement, Window, XMLSerializer } from 'happy-dom';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js'; import type { Config } from '@/config.js';
import { intersperse } from '@/misc/prelude/array.js'; import { intersperse } from '@/misc/prelude/array.js';
@ -23,8 +22,6 @@ type ChildNode = DefaultTreeAdapterMap['childNode'];
const urlRegex = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+/; const urlRegex = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+/;
const urlRegexFull = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+$/; const urlRegexFull = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+$/;
export type Appender = (document: Document, body: HTMLParagraphElement) => void;
@Injectable() @Injectable()
export class MfmService { export class MfmService {
constructor( constructor(
@ -269,52 +266,44 @@ export class MfmService {
} }
@bindThis @bindThis
public toHtml(nodes: mfm.MfmNode[] | null, mentionedRemoteUsers: IMentionedRemoteUsers = [], additionalAppenders: Appender[] = []) { public toHtml(nodes: mfm.MfmNode[] | null, mentionedRemoteUsers: IMentionedRemoteUsers = [], extraHtml: string | null = null) {
if (nodes == null) { if (nodes == null) {
return null; return null;
} }
const { happyDOM, window } = new Window(); function escapeHtml(text: string): string {
return text
const doc = window.document; .replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
const body = doc.createElement('p'); .replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
function appendChildren(children: mfm.MfmNode[], targetElement: any): void { .replace(/'/g, '&#039;');
if (children) {
for (const child of children.map(x => (handlers as any)[x.type](x))) targetElement.appendChild(child);
} }
function toHtml(children?: mfm.MfmNode[]): string {
if (children == null) return '';
return children.map(x => (handlers as any)[x.type](x)).join('');
} }
function fnDefault(node: mfm.MfmFn) { function fnDefault(node: mfm.MfmFn) {
const el = doc.createElement('i'); return `<i>${toHtml(node.children)}</i>`;
appendChildren(node.children, el);
return el;
} }
const handlers: { [K in mfm.MfmNode['type']]: (node: mfm.NodeType<K>) => any } = { const handlers: { [K in mfm.MfmNode['type']]: (node: mfm.NodeType<K>) => any } = {
bold: (node) => { bold: (node) => {
const el = doc.createElement('b'); return `<b>${toHtml(node.children)}</b>`;
appendChildren(node.children, el);
return el;
}, },
small: (node) => { small: (node) => {
const el = doc.createElement('small'); return `<small>${toHtml(node.children)}</small>`;
appendChildren(node.children, el);
return el;
}, },
strike: (node) => { strike: (node) => {
const el = doc.createElement('del'); return `<del>${toHtml(node.children)}</del>`;
appendChildren(node.children, el);
return el;
}, },
italic: (node) => { italic: (node) => {
const el = doc.createElement('i'); return `<i>${toHtml(node.children)}</i>`;
appendChildren(node.children, el);
return el;
}, },
fn: (node) => { fn: (node) => {
@ -323,10 +312,7 @@ export class MfmService {
const text = node.children[0].type === 'text' ? node.children[0].props.text : ''; const text = node.children[0].type === 'text' ? node.children[0].props.text : '';
try { try {
const date = new Date(parseInt(text, 10) * 1000); const date = new Date(parseInt(text, 10) * 1000);
const el = doc.createElement('time'); return `<time datetime="${date.toISOString()}">${date.toISOString()}</time>`;
el.setAttribute('datetime', date.toISOString());
el.textContent = date.toISOString();
return el;
} catch (err) { } catch (err) {
return fnDefault(node); return fnDefault(node);
} }
@ -336,21 +322,9 @@ export class MfmService {
if (node.children.length === 1) { if (node.children.length === 1) {
const child = node.children[0]; const child = node.children[0];
const text = child.type === 'text' ? child.props.text : ''; const text = child.type === 'text' ? child.props.text : '';
const rubyEl = doc.createElement('ruby');
const rtEl = doc.createElement('rt');
// ruby未対応のHTMLサニタイザーを通したときにルビが「劉備りゅうび」となるようにする // ruby未対応のHTMLサニタイザーを通したときにルビが「対象テキストルビテキスト」にフォールバックするようにする
const rpStartEl = doc.createElement('rp'); return `<ruby>${escapeHtml(text.split(' ')[0])}<rp>(</rp><rt>${escapeHtml(text.split(' ')[1])}</rt><rp>)</rp></ruby>`;
rpStartEl.appendChild(doc.createTextNode('('));
const rpEndEl = doc.createElement('rp');
rpEndEl.appendChild(doc.createTextNode(')'));
rubyEl.appendChild(doc.createTextNode(text.split(' ')[0]));
rtEl.appendChild(doc.createTextNode(text.split(' ')[1]));
rubyEl.appendChild(rpStartEl);
rubyEl.appendChild(rtEl);
rubyEl.appendChild(rpEndEl);
return rubyEl;
} else { } else {
const rt = node.children.at(-1); const rt = node.children.at(-1);
@ -359,21 +333,9 @@ export class MfmService {
} }
const text = rt.type === 'text' ? rt.props.text : ''; const text = rt.type === 'text' ? rt.props.text : '';
const rubyEl = doc.createElement('ruby');
const rtEl = doc.createElement('rt');
// ruby未対応のHTMLサニタイザーを通したときにルビが「劉備りゅうび」となるようにする // ruby未対応のHTMLサニタイザーを通したときにルビが「対象テキストルビテキスト」にフォールバックするようにする
const rpStartEl = doc.createElement('rp'); return `<ruby>${toHtml(node.children.slice(0, node.children.length - 1))}<rp>(</rp><rt>${escapeHtml(text.trim())}</rt><rp>)</rp></ruby>`;
rpStartEl.appendChild(doc.createTextNode('('));
const rpEndEl = doc.createElement('rp');
rpEndEl.appendChild(doc.createTextNode(')'));
appendChildren(node.children.slice(0, node.children.length - 1), rubyEl);
rtEl.appendChild(doc.createTextNode(text.trim()));
rubyEl.appendChild(rpStartEl);
rubyEl.appendChild(rtEl);
rubyEl.appendChild(rpEndEl);
return rubyEl;
} }
} }
@ -384,125 +346,83 @@ export class MfmService {
}, },
blockCode: (node) => { blockCode: (node) => {
const pre = doc.createElement('pre'); return `<pre><code>${escapeHtml(node.props.code)}</code></pre>`;
const inner = doc.createElement('code');
inner.textContent = node.props.code;
pre.appendChild(inner);
return pre;
}, },
center: (node) => { center: (node) => {
const el = doc.createElement('div'); return `<div style="text-align: center;">${toHtml(node.children)}</div>`;
appendChildren(node.children, el);
return el;
}, },
emojiCode: (node) => { emojiCode: (node) => {
return doc.createTextNode(`\u200B:${node.props.name}:\u200B`); return `\u200B:${node.props.name}:\u200B`;
}, },
unicodeEmoji: (node) => { unicodeEmoji: (node) => {
return doc.createTextNode(node.props.emoji); return node.props.emoji;
}, },
hashtag: (node) => { hashtag: (node) => {
const a = doc.createElement('a'); return `<a href="${this.config.url}/tags/${encodeURIComponent(escapeHtml(node.props.hashtag))}" rel="tag">#${escapeHtml(node.props.hashtag)}</a>`;
a.setAttribute('href', `${this.config.url}/tags/${node.props.hashtag}`);
a.textContent = `#${node.props.hashtag}`;
a.setAttribute('rel', 'tag');
return a;
}, },
inlineCode: (node) => { inlineCode: (node) => {
const el = doc.createElement('code'); return `<code>${escapeHtml(node.props.code)}</code>`;
el.textContent = node.props.code;
return el;
}, },
mathInline: (node) => { mathInline: (node) => {
const el = doc.createElement('code'); return `<code>${escapeHtml(node.props.formula)}</code>`;
el.textContent = node.props.formula;
return el;
}, },
mathBlock: (node) => { mathBlock: (node) => {
const el = doc.createElement('code'); return `<pre><code>${escapeHtml(node.props.formula)}</code></pre>`;
el.textContent = node.props.formula;
return el;
}, },
link: (node) => { link: (node) => {
const a = doc.createElement('a'); return `<a href="${encodeURIComponent(escapeHtml(node.props.url))}">${toHtml(node.children)}</a>`;
a.setAttribute('href', node.props.url);
appendChildren(node.children, a);
return a;
}, },
mention: (node) => { mention: (node) => {
const a = doc.createElement('a');
const { username, host, acct } = node.props; const { username, host, acct } = node.props;
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username.toLowerCase() === username.toLowerCase() && remoteUser.host?.toLowerCase() === host?.toLowerCase()); const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username.toLowerCase() === username.toLowerCase() && remoteUser.host?.toLowerCase() === host?.toLowerCase());
a.setAttribute('href', remoteUserInfo const href = remoteUserInfo
? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri) ? (remoteUserInfo.url ? remoteUserInfo.url : remoteUserInfo.uri)
: `${this.config.url}/${acct.endsWith(`@${this.config.url}`) ? acct.substring(0, acct.length - this.config.url.length - 1) : acct}`); : `${this.config.url}/${acct.endsWith(`@${this.config.url}`) ? acct.substring(0, acct.length - this.config.url.length - 1) : acct}`;
a.className = 'u-url mention'; return `<a href="${encodeURIComponent(escapeHtml(href))}" class="u-url mention">${escapeHtml(acct)}</a>`;
a.textContent = acct;
return a;
}, },
quote: (node) => { quote: (node) => {
const el = doc.createElement('blockquote'); return `<blockquote>${toHtml(node.children)}</blockquote>`;
appendChildren(node.children, el);
return el;
}, },
text: (node) => { text: (node) => {
if (!node.props.text.match(/[\r\n]/)) { if (!node.props.text.match(/[\r\n]/)) {
return doc.createTextNode(node.props.text); return escapeHtml(node.props.text);
} }
const el = doc.createElement('span'); let html = '';
const nodes = node.props.text.split(/\r\n|\r|\n/).map(x => doc.createTextNode(x));
for (const x of intersperse<FIXME | 'br'>('br', nodes)) { const lines = node.props.text.split(/\r\n|\r|\n/).map(x => escapeHtml(x));
el.appendChild(x === 'br' ? doc.createElement('br') : x);
for (const x of intersperse<FIXME | 'br'>('br', lines)) {
html += x === 'br' ? '<br>' : x;
} }
return el; return `<p>${html}</p>`;
}, },
url: (node) => { url: (node) => {
const a = doc.createElement('a'); return `<a href="${encodeURIComponent(escapeHtml(node.props.url))}">${escapeHtml(node.props.url)}</a>`;
a.setAttribute('href', node.props.url);
a.textContent = node.props.url;
return a;
}, },
search: (node) => { search: (node) => {
const a = doc.createElement('a'); return `<a href="https://www.google.com/search?q=${encodeURIComponent(escapeHtml(node.props.query))}">${escapeHtml(node.props.content)}</a>`;
a.setAttribute('href', `https://www.google.com/search?q=${node.props.query}`);
a.textContent = node.props.content;
return a;
}, },
plain: (node) => { plain: (node) => {
const el = doc.createElement('span'); return `<span>${toHtml(node.children)}</span>`;
appendChildren(node.children, el);
return el;
}, },
}; };
appendChildren(nodes, body); return `<p>${toHtml(nodes)}${extraHtml ?? ''}</p>`;
for (const additionalAppender of additionalAppenders) {
additionalAppender(doc, body);
}
// Remove the unnecessary namespace
const serialized = new XMLSerializer().serializeToString(body).replace(/^\s*<p xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">/, '<p>');
happyDOM.close().catch(err => {});
return serialized;
} }
} }

View File

@ -5,7 +5,7 @@
import { Injectable } from '@nestjs/common'; import { Injectable } from '@nestjs/common';
import * as mfm from 'mfm-js'; import * as mfm from 'mfm-js';
import { MfmService, Appender } from '@/core/MfmService.js'; import { MfmService } from '@/core/MfmService.js';
import type { MiNote } from '@/models/Note.js'; import type { MiNote } from '@/models/Note.js';
import { bindThis } from '@/decorators.js'; import { bindThis } from '@/decorators.js';
import { extractApHashtagObjects } from './models/tag.js'; import { extractApHashtagObjects } from './models/tag.js';
@ -25,17 +25,17 @@ export class ApMfmService {
} }
@bindThis @bindThis
public getNoteHtml(note: Pick<MiNote, 'text' | 'mentionedRemoteUsers'>, additionalAppender: Appender[] = []) { public getNoteHtml(note: Pick<MiNote, 'text' | 'mentionedRemoteUsers'>, extraHtml: string | null = null) {
let noMisskeyContent = false; let noMisskeyContent = false;
const srcMfm = (note.text ?? ''); const srcMfm = (note.text ?? '');
const parsed = mfm.parse(srcMfm); const parsed = mfm.parse(srcMfm);
if (!additionalAppender.length && parsed.every(n => ['text', 'unicodeEmoji', 'emojiCode', 'mention', 'hashtag', 'url'].includes(n.type))) { if (extraHtml == null && parsed.every(n => ['text', 'unicodeEmoji', 'emojiCode', 'mention', 'hashtag', 'url'].includes(n.type))) {
noMisskeyContent = true; noMisskeyContent = true;
} }
const content = this.mfmService.toHtml(parsed, JSON.parse(note.mentionedRemoteUsers), additionalAppender); const content = this.mfmService.toHtml(parsed, JSON.parse(note.mentionedRemoteUsers), extraHtml);
return { return {
content, content,

View File

@ -19,7 +19,7 @@ import type { MiEmoji } from '@/models/Emoji.js';
import type { MiPoll } from '@/models/Poll.js'; import type { MiPoll } from '@/models/Poll.js';
import type { MiPollVote } from '@/models/PollVote.js'; import type { MiPollVote } from '@/models/PollVote.js';
import { UserKeypairService } from '@/core/UserKeypairService.js'; import { UserKeypairService } from '@/core/UserKeypairService.js';
import { MfmService, type Appender } from '@/core/MfmService.js'; import { MfmService } from '@/core/MfmService.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js'; import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js'; import { DriveFileEntityService } from '@/core/entities/DriveFileEntityService.js';
import type { MiUserKeypair } from '@/models/UserKeypair.js'; import type { MiUserKeypair } from '@/models/UserKeypair.js';
@ -384,7 +384,7 @@ export class ApRendererService {
inReplyTo = null; inReplyTo = null;
} }
let quote; let quote: string | undefined;
if (note.renoteId) { if (note.renoteId) {
const renote = await this.notesRepository.findOneBy({ id: note.renoteId }); const renote = await this.notesRepository.findOneBy({ id: note.renoteId });
@ -430,29 +430,18 @@ export class ApRendererService {
poll = await this.pollsRepository.findOneBy({ noteId: note.id }); poll = await this.pollsRepository.findOneBy({ noteId: note.id });
} }
const apAppend: Appender[] = []; let extraHtml: string | null = null;
if (quote) { if (quote != null) {
// Append quote link as `<br><br><span class="quote-inline">RE: <a href="...">...</a></span>` // Append quote link as `<br><br><span class="quote-inline">RE: <a href="...">...</a></span>`
// the claas name `quote-inline` is used in non-misskey clients for styling quote notes. // the claas name `quote-inline` is used in non-misskey clients for styling quote notes.
// For compatibility, the span part should be kept as possible. // For compatibility, the span part should be kept as possible.
apAppend.push((doc, body) => { extraHtml = `<br><br><span class="quote-inline">RE: <a href="${quote}">${quote}</a></span>`;
body.appendChild(doc.createElement('br'));
body.appendChild(doc.createElement('br'));
const span = doc.createElement('span');
span.className = 'quote-inline';
span.appendChild(doc.createTextNode('RE: '));
const link = doc.createElement('a');
link.setAttribute('href', quote);
link.textContent = quote;
span.appendChild(link);
body.appendChild(span);
});
} }
const summary = note.cw === '' ? String.fromCharCode(0x200B) : note.cw; const summary = note.cw === '' ? String.fromCharCode(0x200B) : note.cw;
const { content, noMisskeyContent } = this.apMfmService.getNoteHtml(note, apAppend); const { content, noMisskeyContent } = this.apMfmService.getNoteHtml(note, extraHtml);
const emojis = await this.getEmojis(note.emojis); const emojis = await this.getEmojis(note.emojis);
const apemojis = emojis.filter(emoji => !emoji.localOnly).map(emoji => this.renderEmoji(emoji)); const apemojis = emojis.filter(emoji => !emoji.localOnly).map(emoji => this.renderEmoji(emoji));

View File

@ -6,7 +6,7 @@
import * as crypto from 'node:crypto'; import * as crypto from 'node:crypto';
import { URL } from 'node:url'; import { URL } from 'node:url';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { Window } from 'happy-dom'; import * as htmlParser from 'node-html-parser';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js'; import type { Config } from '@/config.js';
import type { MiUser } from '@/models/User.js'; import type { MiUser } from '@/models/User.js';
@ -215,29 +215,9 @@ export class ApRequestService {
_followAlternate === true _followAlternate === true
) { ) {
const html = await res.text(); const html = await res.text();
const { window, happyDOM } = new Window({
settings: {
disableJavaScriptEvaluation: true,
disableJavaScriptFileLoading: true,
disableCSSFileLoading: true,
disableComputedStyleRendering: true,
handleDisabledFileLoadingAsSuccess: true,
navigation: {
disableMainFrameNavigation: true,
disableChildFrameNavigation: true,
disableChildPageNavigation: true,
disableFallbackToSetURL: true,
},
timer: {
maxTimeout: 0,
maxIntervalTime: 0,
maxIntervalIterations: 0,
},
},
});
const document = window.document;
try { try {
document.documentElement.innerHTML = html; const document = htmlParser.parse(html);
const alternate = document.querySelector('head > link[rel="alternate"][type="application/activity+json"]'); const alternate = document.querySelector('head > link[rel="alternate"][type="application/activity+json"]');
if (alternate) { if (alternate) {
@ -248,8 +228,6 @@ export class ApRequestService {
} }
} catch (e) { } catch (e) {
// something went wrong parsing the HTML, ignore the whole thing // something went wrong parsing the HTML, ignore the whole thing
} finally {
happyDOM.close().catch(err => {});
} }
} }
//#endregion //#endregion

View File

@ -7,7 +7,7 @@ import RE2 from 're2';
import * as mfm from 'mfm-js'; import * as mfm from 'mfm-js';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import ms from 'ms'; import ms from 'ms';
import { JSDOM } from 'jsdom'; import * as htmlParser from 'node-html-parser';
import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js'; import { extractCustomEmojisFromMfm } from '@/misc/extract-custom-emojis-from-mfm.js';
import { extractHashtags } from '@/misc/extract-hashtags.js'; import { extractHashtags } from '@/misc/extract-hashtags.js';
import * as Acct from '@/misc/acct.js'; import * as Acct from '@/misc/acct.js';
@ -569,16 +569,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
try { try {
const html = await this.httpRequestService.getHtml(url); const html = await this.httpRequestService.getHtml(url);
const { window } = new JSDOM(html); const doc = htmlParser.parse(html);
const doc: Document = window.document;
const myLink = `${this.config.url}/@${user.username}`; const myLink = `${this.config.url}/@${user.username}`;
const aEls = Array.from(doc.getElementsByTagName('a')); const aEls = Array.from(doc.getElementsByTagName('a'));
const linkEls = Array.from(doc.getElementsByTagName('link')); const linkEls = Array.from(doc.getElementsByTagName('link'));
const includesMyLink = aEls.some(a => a.href === myLink); const includesMyLink = aEls.some(a => a.attributes.href === myLink);
const includesRelMeLinks = [...aEls, ...linkEls].some(link => link.rel === 'me' && link.href === myLink); const includesRelMeLinks = [...aEls, ...linkEls].some(link => link.attributes.rel?.split(/\s+/).includes('me') && link.attributes.href === myLink);
if (includesMyLink || includesRelMeLinks) { if (includesMyLink || includesRelMeLinks) {
await this.userProfilesRepository.createQueryBuilder('profile').update() await this.userProfilesRepository.createQueryBuilder('profile').update()
@ -588,8 +587,6 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}) })
.execute(); .execute();
} }
window.close();
} catch (err) { } catch (err) {
// なにもしない // なにもしない
} }

View File

@ -6,7 +6,7 @@
import dns from 'node:dns/promises'; import dns from 'node:dns/promises';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { JSDOM } from 'jsdom'; import * as htmlParser from 'node-html-parser';
import httpLinkHeader from 'http-link-header'; import httpLinkHeader from 'http-link-header';
import ipaddr from 'ipaddr.js'; import ipaddr from 'ipaddr.js';
import oauth2orize, { type OAuth2, AuthorizationError, ValidateFunctionArity2, OAuth2Req, MiddlewareRequest } from 'oauth2orize'; import oauth2orize, { type OAuth2, AuthorizationError, ValidateFunctionArity2, OAuth2Req, MiddlewareRequest } from 'oauth2orize';
@ -120,9 +120,9 @@ async function discoverClientInformation(logger: Logger, httpRequestService: Htt
} }
const text = await res.text(); const text = await res.text();
const fragment = JSDOM.fragment(text); const fragment = htmlParser.parse(text);
redirectUris.push(...[...fragment.querySelectorAll<HTMLLinkElement>('link[rel=redirect_uri][href]')].map(el => el.href)); redirectUris.push(...[...fragment.querySelectorAll('link[rel=redirect_uri][href]')].map(el => el.attributes.href));
let name = id; let name = id;
let logo: string | null = null; let logo: string | null = null;

View File

@ -15,7 +15,6 @@ import fastifyStatic from '@fastify/static';
import fastifyView from '@fastify/view'; import fastifyView from '@fastify/view';
import fastifyProxy from '@fastify/http-proxy'; import fastifyProxy from '@fastify/http-proxy';
import vary from 'vary'; import vary from 'vary';
import htmlSafeJsonStringify from 'htmlescape';
import type { Config } from '@/config.js'; import type { Config } from '@/config.js';
import { getNoteSummary } from '@/misc/get-note-summary.js'; import { getNoteSummary } from '@/misc/get-note-summary.js';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
@ -63,6 +62,20 @@ const frontendViteOut = `${_dirname}/../../../../../built/_frontend_vite_/`;
const frontendEmbedViteOut = `${_dirname}/../../../../../built/_frontend_embed_vite_/`; const frontendEmbedViteOut = `${_dirname}/../../../../../built/_frontend_embed_vite_/`;
const tarball = `${_dirname}/../../../../../built/tarball/`; const tarball = `${_dirname}/../../../../../built/tarball/`;
const ESCAPE_LOOKUP = {
'&': '\\u0026',
'>': '\\u003e',
'<': '\\u003c',
'\u2028': '\\u2028',
'\u2029': '\\u2029',
} as Record<string, string>;
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
function htmlSafeJsonStringify(obj: any): string {
return JSON.stringify(obj).replace(ESCAPE_REGEX, x => ESCAPE_LOOKUP[x]);
}
@Injectable() @Injectable()
export class ClientServerService { export class ClientServerService {
private logger: Logger; private logger: Logger;

View File

@ -246,15 +246,9 @@ importers:
got: got:
specifier: 14.6.4 specifier: 14.6.4
version: 14.6.4 version: 14.6.4
happy-dom:
specifier: 20.0.10
version: 20.0.10
hpagent: hpagent:
specifier: 1.2.0 specifier: 1.2.0
version: 1.2.0 version: 1.2.0
htmlescape:
specifier: 1.1.1
version: 1.1.1
http-link-header: http-link-header:
specifier: 1.1.3 specifier: 1.1.3
version: 1.1.3 version: 1.1.3
@ -273,9 +267,6 @@ importers:
js-yaml: js-yaml:
specifier: 4.1.1 specifier: 4.1.1
version: 4.1.1 version: 4.1.1
jsdom:
specifier: 26.1.0
version: 26.1.0(bufferutil@4.0.9)(utf-8-validate@6.0.5)
json5: json5:
specifier: 2.2.3 specifier: 2.2.3
version: 2.2.3 version: 2.2.3
@ -318,6 +309,9 @@ importers:
node-fetch: node-fetch:
specifier: 3.3.2 specifier: 3.3.2
version: 3.3.2 version: 3.3.2
node-html-parser:
specifier: 7.0.1
version: 7.0.1
nodemailer: nodemailer:
specifier: 7.0.10 specifier: 7.0.10
version: 7.0.10 version: 7.0.10
@ -481,9 +475,6 @@ importers:
'@types/fluent-ffmpeg': '@types/fluent-ffmpeg':
specifier: 2.1.28 specifier: 2.1.28
version: 2.1.28 version: 2.1.28
'@types/htmlescape':
specifier: 1.1.3
version: 1.1.3
'@types/http-link-header': '@types/http-link-header':
specifier: 1.0.7 specifier: 1.0.7
version: 1.0.7 version: 1.0.7
@ -598,6 +589,9 @@ importers:
jest-mock: jest-mock:
specifier: 29.7.0 specifier: 29.7.0
version: 29.7.0 version: 29.7.0
jsdom:
specifier: 26.1.0
version: 26.1.0(bufferutil@4.0.9)(utf-8-validate@6.0.5)
nodemon: nodemon:
specifier: 3.1.11 specifier: 3.1.11
version: 3.1.11 version: 3.1.11
@ -4671,9 +4665,6 @@ packages:
'@types/hast@3.0.4': '@types/hast@3.0.4':
resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==}
'@types/htmlescape@1.1.3':
resolution: {integrity: sha512-tuC81YJXGUe0q8WRtBNW+uyx79rkkzWK651ALIXXYq5/u/IxjX4iHneGF2uUqzsNp+F+9J2mFZOv9jiLTtIq0w==}
'@types/http-cache-semantics@4.0.4': '@types/http-cache-semantics@4.0.4':
resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==} resolution: {integrity: sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==}
@ -7280,10 +7271,6 @@ packages:
html-void-elements@3.0.0: html-void-elements@3.0.0:
resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==}
htmlescape@1.1.1:
resolution: {integrity: sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==}
engines: {node: '>=0.10'}
htmlparser2@10.0.0: htmlparser2@10.0.0:
resolution: {integrity: sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==} resolution: {integrity: sha512-TwAZM+zE5Tq3lrEHvOlvwgj1XLWQCtaaibSN11Q+gGBAS7Y1uZSWwXXRe4iF6OXnaq1riyQAPFOBtYc77Mxq0g==}
@ -8669,6 +8656,9 @@ packages:
engines: {node: ^18.17.0 || >=20.5.0} engines: {node: ^18.17.0 || >=20.5.0}
hasBin: true hasBin: true
node-html-parser@7.0.1:
resolution: {integrity: sha512-KGtmPY2kS0thCWGK0VuPyOS+pBKhhe8gXztzA2ilAOhbUbxa9homF1bOyKvhGzMLXUoRds9IOmr/v5lr/lqNmA==}
node-int64@0.4.0: node-int64@0.4.0:
resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==}
@ -11407,7 +11397,7 @@ snapshots:
'@apm-js-collab/tracing-hooks@0.3.1': '@apm-js-collab/tracing-hooks@0.3.1':
dependencies: dependencies:
'@apm-js-collab/code-transformer': 0.8.2 '@apm-js-collab/code-transformer': 0.8.2
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
module-details-from-path: 1.0.4 module-details-from-path: 1.0.4
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -11997,7 +11987,7 @@ snapshots:
'@babel/types': 7.28.5 '@babel/types': 7.28.5
'@jridgewell/remapping': 2.3.5 '@jridgewell/remapping': 2.3.5
convert-source-map: 2.0.0 convert-source-map: 2.0.0
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
gensync: 1.0.0-beta.2 gensync: 1.0.0-beta.2
json5: 2.2.3 json5: 2.2.3
semver: 6.3.1 semver: 6.3.1
@ -12156,7 +12146,7 @@ snapshots:
'@babel/parser': 7.28.5 '@babel/parser': 7.28.5
'@babel/template': 7.27.2 '@babel/template': 7.27.2
'@babel/types': 7.28.5 '@babel/types': 7.28.5
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -12486,7 +12476,7 @@ snapshots:
'@eslint/config-array@0.21.1': '@eslint/config-array@0.21.1':
dependencies: dependencies:
'@eslint/object-schema': 2.1.7 '@eslint/object-schema': 2.1.7
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
minimatch: 3.1.2 minimatch: 3.1.2
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -12506,7 +12496,7 @@ snapshots:
'@eslint/eslintrc@3.3.1': '@eslint/eslintrc@3.3.1':
dependencies: dependencies:
ajv: 6.12.6 ajv: 6.12.6
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
espree: 10.4.0 espree: 10.4.0
globals: 14.0.0 globals: 14.0.0
ignore: 5.3.2 ignore: 5.3.2
@ -13341,7 +13331,7 @@ snapshots:
dependencies: dependencies:
agent-base: 7.1.4 agent-base: 7.1.4
http-proxy-agent: 7.0.2 http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.6(supports-color@10.2.2) https-proxy-agent: 7.0.6
lru-cache: 10.4.3 lru-cache: 10.4.3
socks-proxy-agent: 8.0.5 socks-proxy-agent: 8.0.5
transitivePeerDependencies: transitivePeerDependencies:
@ -15011,7 +15001,7 @@ snapshots:
'@tokenizer/inflate@0.2.7': '@tokenizer/inflate@0.2.7':
dependencies: dependencies:
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
fflate: 0.8.2 fflate: 0.8.2
token-types: 6.1.1 token-types: 6.1.1
transitivePeerDependencies: transitivePeerDependencies:
@ -15019,7 +15009,7 @@ snapshots:
'@tokenizer/inflate@0.3.1': '@tokenizer/inflate@0.3.1':
dependencies: dependencies:
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
fflate: 0.8.2 fflate: 0.8.2
token-types: 6.1.1 token-types: 6.1.1
transitivePeerDependencies: transitivePeerDependencies:
@ -15027,7 +15017,7 @@ snapshots:
'@tokenizer/inflate@0.4.1': '@tokenizer/inflate@0.4.1':
dependencies: dependencies:
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
token-types: 6.1.1 token-types: 6.1.1
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -15153,8 +15143,6 @@ snapshots:
dependencies: dependencies:
'@types/unist': 3.0.3 '@types/unist': 3.0.3
'@types/htmlescape@1.1.3': {}
'@types/http-cache-semantics@4.0.4': {} '@types/http-cache-semantics@4.0.4': {}
'@types/http-errors@2.0.5': {} '@types/http-errors@2.0.5': {}
@ -15432,7 +15420,7 @@ snapshots:
'@typescript-eslint/types': 8.47.0 '@typescript-eslint/types': 8.47.0
'@typescript-eslint/typescript-estree': 8.47.0(typescript@5.9.3) '@typescript-eslint/typescript-estree': 8.47.0(typescript@5.9.3)
'@typescript-eslint/visitor-keys': 8.47.0 '@typescript-eslint/visitor-keys': 8.47.0
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
eslint: 9.39.1 eslint: 9.39.1
typescript: 5.9.3 typescript: 5.9.3
transitivePeerDependencies: transitivePeerDependencies:
@ -15442,7 +15430,7 @@ snapshots:
dependencies: dependencies:
'@typescript-eslint/tsconfig-utils': 8.47.0(typescript@5.9.3) '@typescript-eslint/tsconfig-utils': 8.47.0(typescript@5.9.3)
'@typescript-eslint/types': 8.47.0 '@typescript-eslint/types': 8.47.0
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
typescript: 5.9.3 typescript: 5.9.3
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -15461,7 +15449,7 @@ snapshots:
'@typescript-eslint/types': 8.47.0 '@typescript-eslint/types': 8.47.0
'@typescript-eslint/typescript-estree': 8.47.0(typescript@5.9.3) '@typescript-eslint/typescript-estree': 8.47.0(typescript@5.9.3)
'@typescript-eslint/utils': 8.47.0(eslint@9.39.1)(typescript@5.9.3) '@typescript-eslint/utils': 8.47.0(eslint@9.39.1)(typescript@5.9.3)
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
eslint: 9.39.1 eslint: 9.39.1
ts-api-utils: 2.1.0(typescript@5.9.3) ts-api-utils: 2.1.0(typescript@5.9.3)
typescript: 5.9.3 typescript: 5.9.3
@ -15476,7 +15464,7 @@ snapshots:
'@typescript-eslint/tsconfig-utils': 8.47.0(typescript@5.9.3) '@typescript-eslint/tsconfig-utils': 8.47.0(typescript@5.9.3)
'@typescript-eslint/types': 8.47.0 '@typescript-eslint/types': 8.47.0
'@typescript-eslint/visitor-keys': 8.47.0 '@typescript-eslint/visitor-keys': 8.47.0
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
fast-glob: 3.3.3 fast-glob: 3.3.3
is-glob: 4.0.3 is-glob: 4.0.3
minimatch: 9.0.5 minimatch: 9.0.5
@ -15933,7 +15921,7 @@ snapshots:
agent-base@6.0.2: agent-base@6.0.2:
dependencies: dependencies:
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
optional: true optional: true
@ -16230,7 +16218,7 @@ snapshots:
axios@0.24.0: axios@0.24.0:
dependencies: dependencies:
follow-redirects: 1.15.11(debug@4.4.3) follow-redirects: 1.15.11
transitivePeerDependencies: transitivePeerDependencies:
- debug - debug
@ -17059,6 +17047,10 @@ snapshots:
dependencies: dependencies:
ms: 2.0.0 ms: 2.0.0
debug@3.2.7:
dependencies:
ms: 2.1.3
debug@3.2.7(supports-color@8.1.1): debug@3.2.7(supports-color@8.1.1):
dependencies: dependencies:
ms: 2.1.3 ms: 2.1.3
@ -17547,7 +17539,7 @@ snapshots:
eslint-import-resolver-node@0.3.9: eslint-import-resolver-node@0.3.9:
dependencies: dependencies:
debug: 3.2.7(supports-color@8.1.1) debug: 3.2.7
is-core-module: 2.16.1 is-core-module: 2.16.1
resolve: 1.22.11 resolve: 1.22.11
transitivePeerDependencies: transitivePeerDependencies:
@ -17555,7 +17547,7 @@ snapshots:
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.47.0(eslint@9.39.1)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.1): eslint-module-utils@2.12.1(@typescript-eslint/parser@8.47.0(eslint@9.39.1)(typescript@5.9.3))(eslint-import-resolver-node@0.3.9)(eslint@9.39.1):
dependencies: dependencies:
debug: 3.2.7(supports-color@8.1.1) debug: 3.2.7
optionalDependencies: optionalDependencies:
'@typescript-eslint/parser': 8.47.0(eslint@9.39.1)(typescript@5.9.3) '@typescript-eslint/parser': 8.47.0(eslint@9.39.1)(typescript@5.9.3)
eslint: 9.39.1 eslint: 9.39.1
@ -17570,7 +17562,7 @@ snapshots:
array.prototype.findlastindex: 1.2.6 array.prototype.findlastindex: 1.2.6
array.prototype.flat: 1.3.3 array.prototype.flat: 1.3.3
array.prototype.flatmap: 1.3.3 array.prototype.flatmap: 1.3.3
debug: 3.2.7(supports-color@8.1.1) debug: 3.2.7
doctrine: 2.1.0 doctrine: 2.1.0
eslint: 9.39.1 eslint: 9.39.1
eslint-import-resolver-node: 0.3.9 eslint-import-resolver-node: 0.3.9
@ -17634,7 +17626,7 @@ snapshots:
ajv: 6.12.6 ajv: 6.12.6
chalk: 4.1.2 chalk: 4.1.2
cross-spawn: 7.0.6 cross-spawn: 7.0.6
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
escape-string-regexp: 4.0.0 escape-string-regexp: 4.0.0
eslint-scope: 8.4.0 eslint-scope: 8.4.0
eslint-visitor-keys: 4.2.1 eslint-visitor-keys: 4.2.1
@ -18064,6 +18056,8 @@ snapshots:
async: 0.2.10 async: 0.2.10
which: 1.3.1 which: 1.3.1
follow-redirects@1.15.11: {}
follow-redirects@1.15.11(debug@4.4.3): follow-redirects@1.15.11(debug@4.4.3):
optionalDependencies: optionalDependencies:
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@10.2.2)
@ -18416,8 +18410,6 @@ snapshots:
html-void-elements@3.0.0: {} html-void-elements@3.0.0: {}
htmlescape@1.1.1: {}
htmlparser2@10.0.0: htmlparser2@10.0.0:
dependencies: dependencies:
domelementtype: 2.3.0 domelementtype: 2.3.0
@ -18461,7 +18453,7 @@ snapshots:
http-proxy-agent@7.0.2: http-proxy-agent@7.0.2:
dependencies: dependencies:
agent-base: 7.1.4 agent-base: 7.1.4
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -18481,7 +18473,7 @@ snapshots:
https-proxy-agent@2.2.4: https-proxy-agent@2.2.4:
dependencies: dependencies:
agent-base: 4.3.0 agent-base: 4.3.0
debug: 3.2.7(supports-color@8.1.1) debug: 3.2.7
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
optional: true optional: true
@ -18489,11 +18481,18 @@ snapshots:
https-proxy-agent@5.0.1: https-proxy-agent@5.0.1:
dependencies: dependencies:
agent-base: 6.0.2 agent-base: 6.0.2
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
optional: true optional: true
https-proxy-agent@7.0.6:
dependencies:
agent-base: 7.1.4
debug: 4.4.3(supports-color@5.5.0)
transitivePeerDependencies:
- supports-color
https-proxy-agent@7.0.6(supports-color@10.2.2): https-proxy-agent@7.0.6(supports-color@10.2.2):
dependencies: dependencies:
agent-base: 7.1.4 agent-base: 7.1.4
@ -18597,7 +18596,7 @@ snapshots:
dependencies: dependencies:
'@ioredis/commands': 1.4.0 '@ioredis/commands': 1.4.0
cluster-key-slot: 1.1.2 cluster-key-slot: 1.1.2
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
denque: 2.1.0 denque: 2.1.0
lodash.defaults: 4.2.0 lodash.defaults: 4.2.0
lodash.isarguments: 3.1.0 lodash.isarguments: 3.1.0
@ -18837,7 +18836,7 @@ snapshots:
istanbul-lib-source-maps@4.0.1: istanbul-lib-source-maps@4.0.1:
dependencies: dependencies:
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
istanbul-lib-coverage: 3.2.2 istanbul-lib-coverage: 3.2.2
source-map: 0.6.1 source-map: 0.6.1
transitivePeerDependencies: transitivePeerDependencies:
@ -19238,7 +19237,7 @@ snapshots:
decimal.js: 10.6.0 decimal.js: 10.6.0
html-encoding-sniffer: 4.0.0 html-encoding-sniffer: 4.0.0
http-proxy-agent: 7.0.2 http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.6(supports-color@10.2.2) https-proxy-agent: 7.0.6
is-potential-custom-element-name: 1.0.1 is-potential-custom-element-name: 1.0.1
nwsapi: 2.2.22 nwsapi: 2.2.22
parse5: 7.3.0 parse5: 7.3.0
@ -20125,7 +20124,7 @@ snapshots:
needle@2.9.1: needle@2.9.1:
dependencies: dependencies:
debug: 3.2.7(supports-color@8.1.1) debug: 3.2.7
iconv-lite: 0.4.24 iconv-lite: 0.4.24
sax: 1.4.3 sax: 1.4.3
transitivePeerDependencies: transitivePeerDependencies:
@ -20199,6 +20198,11 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
node-html-parser@7.0.1:
dependencies:
css-select: 5.2.2
he: 1.2.0
node-int64@0.4.0: {} node-int64@0.4.0: {}
node-releases@2.0.27: {} node-releases@2.0.27: {}
@ -21241,7 +21245,7 @@ snapshots:
require-in-the-middle@7.5.2: require-in-the-middle@7.5.2:
dependencies: dependencies:
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
module-details-from-path: 1.0.4 module-details-from-path: 1.0.4
resolve: 1.22.11 resolve: 1.22.11
transitivePeerDependencies: transitivePeerDependencies:
@ -21575,7 +21579,7 @@ snapshots:
dependencies: dependencies:
'@hapi/hoek': 11.0.7 '@hapi/hoek': 11.0.7
'@hapi/wreck': 18.1.0 '@hapi/wreck': 18.1.0
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
joi: 17.13.3 joi: 17.13.3
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -21675,7 +21679,7 @@ snapshots:
socks-proxy-agent@8.0.5: socks-proxy-agent@8.0.5:
dependencies: dependencies:
agent-base: 7.1.4 agent-base: 7.1.4
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
socks: 2.8.7 socks: 2.8.7
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -21970,7 +21974,7 @@ snapshots:
dependencies: dependencies:
component-emitter: 1.3.1 component-emitter: 1.3.1
cookiejar: 2.1.4 cookiejar: 2.1.4
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
fast-safe-stringify: 2.1.1 fast-safe-stringify: 2.1.1
form-data: 4.0.5 form-data: 4.0.5
formidable: 3.5.4 formidable: 3.5.4
@ -22318,7 +22322,7 @@ snapshots:
app-root-path: 3.1.0 app-root-path: 3.1.0
buffer: 6.0.3 buffer: 6.0.3
dayjs: 1.11.19 dayjs: 1.11.19
debug: 4.4.3(supports-color@10.2.2) debug: 4.4.3(supports-color@5.5.0)
dedent: 1.7.0 dedent: 1.7.0
dotenv: 16.6.1 dotenv: 16.6.1
glob: 10.5.0 glob: 10.5.0
@ -22760,7 +22764,7 @@ snapshots:
dependencies: dependencies:
asn1.js: 5.4.1 asn1.js: 5.4.1
http_ece: 1.2.0 http_ece: 1.2.0
https-proxy-agent: 7.0.6(supports-color@10.2.2) https-proxy-agent: 7.0.6
jws: 4.0.0 jws: 4.0.0
minimist: 1.2.8 minimist: 1.2.8
transitivePeerDependencies: transitivePeerDependencies: