merge: Bump version (!635)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/635
This commit is contained in:
Julia 2024-09-23 19:33:41 +00:00
commit 674fd13807
23 changed files with 114 additions and 118 deletions

3
.gitignore vendored
View file

@ -23,6 +23,9 @@ packages/sw/.yarn/cache
# pnpm # pnpm
.pnpm-store .pnpm-store
# eslint
**/.eslintcache
# Cypress # Cypress
cypress/screenshots cypress/screenshots
cypress/videos cypress/videos

View file

@ -776,6 +776,7 @@ noCrawleDescription: "Ask search engines to not index your profile page, notes,
lockedAccountInfo: "Unless you set your note visiblity to \"Followers only\", your notes will be visible to anyone, even if you require followers to be manually approved." lockedAccountInfo: "Unless you set your note visiblity to \"Followers only\", your notes will be visible to anyone, even if you require followers to be manually approved."
alwaysMarkSensitive: "Mark as sensitive by default" alwaysMarkSensitive: "Mark as sensitive by default"
loadRawImages: "Load original images instead of showing thumbnails" loadRawImages: "Load original images instead of showing thumbnails"
showTickerOnReplies: "Show instance ticker on replies"
searchEngine: "Search Engine For Search MFM" searchEngine: "Search Engine For Search MFM"
searchEngineOther: "Other" searchEngineOther: "Other"
searchEngineCustomURIDescription: "The custom URI must be input in the format like \"https://www.google.com/search?q=\\{query}\" or \"https://www.google.com/search?q=%s\"." searchEngineCustomURIDescription: "The custom URI must be input in the format like \"https://www.google.com/search?q=\\{query}\" or \"https://www.google.com/search?q=%s\"."
@ -1089,6 +1090,8 @@ collapseRenotes: "Collapse boosts you've already seen"
collapseRenotesDescription: "Collapse boosts that you have boosted or reacted to" collapseRenotesDescription: "Collapse boosts that you have boosted or reacted to"
collapseNotesRepliedTo: "Collapse notes replied to" collapseNotesRepliedTo: "Collapse notes replied to"
collapseFiles: "Collapse files" collapseFiles: "Collapse files"
uncollapseCW: "Uncollapse CWs on notes"
expandLongNote: "Always expand long notes"
autoloadConversation: "Load conversation on replies" autoloadConversation: "Load conversation on replies"
internalServerError: "Internal Server Error" internalServerError: "Internal Server Error"
internalServerErrorDescription: "The server has run into an unexpected error." internalServerErrorDescription: "The server has run into an unexpected error."

12
locales/index.d.ts vendored
View file

@ -3120,6 +3120,10 @@ export interface Locale extends ILocale {
* *
*/ */
"loadRawImages": string; "loadRawImages": string;
/**
*
*/
"showTickerOnReplies": string;
/** /**
* MFMの検索エンジン * MFMの検索エンジン
*/ */
@ -4373,6 +4377,14 @@ export interface Locale extends ILocale {
* *
*/ */
"collapseFiles": string; "collapseFiles": string;
/**
* CWを展開する
*/
"uncollapseCW": string;
/**
* 稿
*/
"expandLongNote": string;
/** /**
* *
*/ */

View file

@ -776,6 +776,7 @@ noCrawleDescription: "外部の検索エンジンにあなたのユーザーペ
lockedAccountInfo: "フォローを承認制にしても、ノートの公開範囲を「フォロワー」にしない限り、誰でもあなたのノートを見ることができます。" lockedAccountInfo: "フォローを承認制にしても、ノートの公開範囲を「フォロワー」にしない限り、誰でもあなたのノートを見ることができます。"
alwaysMarkSensitive: "デフォルトでメディアをセンシティブ設定にする" alwaysMarkSensitive: "デフォルトでメディアをセンシティブ設定にする"
loadRawImages: "添付画像のサムネイルをオリジナル画質にする" loadRawImages: "添付画像のサムネイルをオリジナル画質にする"
showTickerOnReplies: "返信にサーバー情報を表示する"
searchEngine: "検索MFMの検索エンジン" searchEngine: "検索MFMの検索エンジン"
searchEngineOther: "カスタム" searchEngineOther: "カスタム"
searchEngineCustomURIDescription: "カスタム検索エンジンのURIは、\"https://www.google.com/search?q=\\{query}\" や \"https://www.google.com/search?q=%s\" のような形式で入力する必要があります。" searchEngineCustomURIDescription: "カスタム検索エンジンのURIは、\"https://www.google.com/search?q=\\{query}\" や \"https://www.google.com/search?q=%s\" のような形式で入力する必要があります。"
@ -1089,6 +1090,8 @@ collapseRenotes: "ブーストのスマート省略"
collapseRenotesDescription: "リアクションやブーストをしたことがあるノートをたたんで表示します。" collapseRenotesDescription: "リアクションやブーストをしたことがあるノートをたたんで表示します。"
collapseNotesRepliedTo: "返信元のノートを折りたたむ" collapseNotesRepliedTo: "返信元のノートを折りたたむ"
collapseFiles: "ファイルを折りたたむ" collapseFiles: "ファイルを折りたたむ"
uncollapseCW: "CWを展開する"
expandLongNote: "長い投稿を常に展開する"
autoloadConversation: "会話スレッドを自動で読み込む" autoloadConversation: "会話スレッドを自動で読み込む"
internalServerError: "サーバー内部エラー" internalServerError: "サーバー内部エラー"
internalServerErrorDescription: "サーバー内部で予期しないエラーが発生しました。" internalServerErrorDescription: "サーバー内部で予期しないエラーが発生しました。"

View file

@ -1,6 +1,6 @@
{ {
"name": "sharkey", "name": "sharkey",
"version": "2024.8.1", "version": "2024.8.2",
"codename": "shonk", "codename": "shonk",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -20,7 +20,7 @@
"restart": "pnpm build && pnpm start", "restart": "pnpm build && pnpm start",
"dev": "node ./scripts/dev.mjs", "dev": "node ./scripts/dev.mjs",
"typecheck": "pnpm --filter megalodon build && tsc --noEmit && tsc -p test --noEmit", "typecheck": "pnpm --filter megalodon build && tsc --noEmit && tsc -p test --noEmit",
"eslint": "eslint --quiet \"src/**/*.ts\"", "eslint": "eslint --quiet \"src/**/*.ts\" --cache",
"lint": "pnpm typecheck && pnpm eslint", "lint": "pnpm typecheck && pnpm eslint",
"jest": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.unit.cjs", "jest": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.unit.cjs",
"jest:e2e": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.e2e.cjs", "jest:e2e": "cross-env NODE_ENV=test node --experimental-vm-modules --experimental-import-meta-resolve node_modules/jest/bin/jest.js --forceExit --config jest.config.e2e.cjs",
@ -120,9 +120,9 @@
"file-type": "19.3.0", "file-type": "19.3.0",
"fluent-ffmpeg": "2.1.3", "fluent-ffmpeg": "2.1.3",
"form-data": "4.0.0", "form-data": "4.0.0",
"glob": "10.3.10", "glob": "11.0.0",
"got": "14.4.2", "got": "14.4.2",
"happy-dom": "15.6.1", "happy-dom": "15.7.4",
"hpagent": "1.2.0", "hpagent": "1.2.0",
"htmlescape": "1.1.1", "htmlescape": "1.1.1",
"http-link-header": "1.1.3", "http-link-header": "1.1.3",

View file

@ -245,7 +245,7 @@ export class MfmService {
return null; return null;
} }
const { window } = new Window(); const { happyDOM, window } = new Window();
const doc = window.document; const doc = window.document;
@ -463,7 +463,11 @@ export class MfmService {
appendChildren(nodes, body); appendChildren(nodes, body);
return new XMLSerializer().serializeToString(body); const serialized = new XMLSerializer().serializeToString(body);
happyDOM.close().catch(e => {});
return serialized;
} }
// the toMastoApiHtml function was taken from Iceshrimp and written by zotan and modified by marie to work with the current MK version // the toMastoApiHtml function was taken from Iceshrimp and written by zotan and modified by marie to work with the current MK version
@ -474,7 +478,7 @@ export class MfmService {
return null; return null;
} }
const { window } = new Window(); const { happyDOM, window } = new Window();
const doc = window.document; const doc = window.document;
@ -681,6 +685,8 @@ export class MfmService {
result = result.replace(/^<p>/, '').replace(/<\/p>$/, ''); result = result.replace(/^<p>/, '').replace(/<\/p>$/, '');
} }
happyDOM.close().catch(e => {});
return result; return result;
} }
} }

View file

@ -8,6 +8,8 @@ import { Injectable } from '@nestjs/common';
import { XMLParser } from 'fast-xml-parser'; import { XMLParser } from 'fast-xml-parser';
import { HttpRequestService } from '@/core/HttpRequestService.js'; import { HttpRequestService } from '@/core/HttpRequestService.js';
import { bindThis } from '@/decorators.js'; import { bindThis } from '@/decorators.js';
import type Logger from '@/logger.js';
import { RemoteLoggerService } from './RemoteLoggerService.js';
export type ILink = { export type ILink = {
href: string; href: string;
@ -28,9 +30,13 @@ const defaultProtocol = process.env.MISSKEY_WEBFINGER_USE_HTTP?.toLowerCase() ==
@Injectable() @Injectable()
export class WebfingerService { export class WebfingerService {
private logger: Logger;
constructor( constructor(
private httpRequestService: HttpRequestService, private httpRequestService: HttpRequestService,
private remoteLoggerService: RemoteLoggerService,
) { ) {
this.logger = this.remoteLoggerService.logger.createSubLogger('webfinger');
} }
@bindThis @bindThis
@ -103,7 +109,7 @@ export class WebfingerService {
const template = (hostMeta['XRD']['Link'] as Array<any>).filter(p => p['@_rel'] === 'lrdd')[0]['@_template']; const template = (hostMeta['XRD']['Link'] as Array<any>).filter(p => p['@_rel'] === 'lrdd')[0]['@_template'];
return template.indexOf('{uri}') < 0 ? null : template; return template.indexOf('{uri}') < 0 ? null : template;
} catch (err) { } catch (err) {
console.error(`error while request host-meta for ${url}: ${err}`); this.logger.error(`error while request host-meta for ${url}: ${err}`);
return null; return null;
} }
} }

View file

@ -207,7 +207,11 @@ export class ApRequestService {
//#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき //#region リクエスト先がhtmlかつactivity+jsonへのalternate linkタグがあるとき
const contentType = res.headers.get('content-type'); const contentType = res.headers.get('content-type');
if ((contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html' && _followAlternate === true) { if (
res.ok
&& (contentType ?? '').split(';')[0].trimEnd().toLowerCase() === 'text/html'
&& _followAlternate === true
) {
const html = await res.text(); const html = await res.text();
const window = new Window({ const window = new Window({
settings: { settings: {
@ -242,6 +246,8 @@ 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 {
await window.happyDOM.close();
} }
} }
//#endregion //#endregion

View file

@ -64,15 +64,6 @@ export class ApiCallService implements OnApplicationShutdown {
let statusCode = err.httpStatusCode; let statusCode = err.httpStatusCode;
if (err.httpStatusCode === 401) { if (err.httpStatusCode === 401) {
reply.header('WWW-Authenticate', 'Bearer realm="Misskey"'); reply.header('WWW-Authenticate', 'Bearer realm="Misskey"');
} else if (err.kind === 'client') {
reply.header('WWW-Authenticate', `Bearer realm="Misskey", error="invalid_request", error_description="${err.message}"`);
statusCode = statusCode ?? 400;
} else if (err.kind === 'permission') {
// (ROLE_PERMISSION_DENIEDは関係ない)
if (err.code === 'PERMISSION_DENIED') {
reply.header('WWW-Authenticate', `Bearer realm="Misskey", error="insufficient_scope", error_description="${err.message}"`);
}
statusCode = statusCode ?? 403;
} else if (err.code === 'RATE_LIMIT_EXCEEDED') { } else if (err.code === 'RATE_LIMIT_EXCEEDED') {
const info: unknown = err.info; const info: unknown = err.info;
const unixEpochInSeconds = Date.now(); const unixEpochInSeconds = Date.now();
@ -83,6 +74,15 @@ export class ApiCallService implements OnApplicationShutdown {
} else { } else {
this.logger.warn(`rate limit information has unexpected type ${typeof(err.info?.reset)}`); this.logger.warn(`rate limit information has unexpected type ${typeof(err.info?.reset)}`);
} }
} else if (err.kind === 'client') {
reply.header('WWW-Authenticate', `Bearer realm="Misskey", error="invalid_request", error_description="${err.message}"`);
statusCode = statusCode ?? 400;
} else if (err.kind === 'permission') {
// (ROLE_PERMISSION_DENIEDは関係ない)
if (err.code === 'PERMISSION_DENIED') {
reply.header('WWW-Authenticate', `Bearer realm="Misskey", error="insufficient_scope", error_description="${err.message}"`);
}
statusCode = statusCode ?? 403;
} else if (!statusCode) { } else if (!statusCode) {
statusCode = 500; statusCode = 500;
} }

View file

@ -32,18 +32,11 @@ export class RateLimiterService {
@bindThis @bindThis
public limit(limitation: IEndpointMeta['limit'] & { key: NonNullable<string> }, actor: string, factor = 1) { public limit(limitation: IEndpointMeta['limit'] & { key: NonNullable<string> }, actor: string, factor = 1) {
{ return new Promise<void>((ok, reject) => {
if (this.disabled) { if (this.disabled) ok();
return Promise.resolve();
}
// those lines with the "wrong" brace style / indentation are
// done that way so that the *other* lines stay identical to
// Misskey, simplifying merges
// Short-term limit // Short-term limit
// eslint-disable-next-line brace-style const minP = (): void => {
const minP = () => { return new Promise<void>((ok, reject) => {
const minIntervalLimiter = new Limiter({ const minIntervalLimiter = new Limiter({
id: `${actor}:${limitation.key}:min`, id: `${actor}:${limitation.key}:min`,
duration: limitation.minInterval! * factor, duration: limitation.minInterval! * factor,
@ -62,18 +55,16 @@ export class RateLimiterService {
return reject({ code: 'BRIEF_REQUEST_INTERVAL', info }); return reject({ code: 'BRIEF_REQUEST_INTERVAL', info });
} else { } else {
if (hasLongTermLimit) { if (hasLongTermLimit) {
return maxP().then(ok, reject); return maxP();
} else { } else {
return ok(); return ok();
} }
} }
}); });
// eslint-disable-next-line brace-style };
}); };
// Long term limit // Long term limit
// eslint-disable-next-line brace-style const maxP = (): void => {
const maxP = () => { return new Promise<void>((ok, reject) => {
const limiter = new Limiter({ const limiter = new Limiter({
id: `${actor}:${limitation.key}`, id: `${actor}:${limitation.key}`,
duration: limitation.duration! * factor, duration: limitation.duration! * factor,
@ -94,8 +85,7 @@ export class RateLimiterService {
return ok(); return ok();
} }
}); });
// eslint-disable-next-line brace-style };
}); };
const hasShortTermLimit = typeof limitation.minInterval === 'number'; const hasShortTermLimit = typeof limitation.minInterval === 'number';
@ -104,12 +94,12 @@ export class RateLimiterService {
typeof limitation.max === 'number'; typeof limitation.max === 'number';
if (hasShortTermLimit) { if (hasShortTermLimit) {
return minP(); minP();
} else if (hasLongTermLimit) { } else if (hasLongTermLimit) {
return maxP(); maxP();
} else { } else {
return Promise.resolve(); ok();
}
} }
});
} }
} }

View file

@ -10,7 +10,7 @@ import { DI } from '@/di-symbols.js';
export const meta = { export const meta = {
tags: ['meta'], tags: ['meta'],
description: 'Get Sharkey GH Sponsors', description: 'Get Sharkey Sponsors',
requireCredential: false, requireCredential: false,
requireCredentialPrivateMode: false, requireCredentialPrivateMode: false,
@ -30,29 +30,28 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
@Inject(DI.redis) private redisClient: Redis.Redis, @Inject(DI.redis) private redisClient: Redis.Redis,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
let sponsors; let totalSponsors;
const cachedSponsors = await this.redisClient.get('sponsors'); const cachedSponsors = await this.redisClient.get('sponsors');
if (!ps.forceUpdate && cachedSponsors) { if (!ps.forceUpdate && cachedSponsors) {
sponsors = JSON.parse(cachedSponsors); totalSponsors = JSON.parse(cachedSponsors);
} else { } else {
AbortSignal.timeout ??= function timeout(ms) {
const ctrl = new AbortController();
setTimeout(() => ctrl.abort(), ms);
return ctrl.signal;
};
try { try {
sponsors = await fetch('https://kaifa.ch/transfem-sponsors.json', { signal: AbortSignal.timeout(2000) }) const backers = await fetch('https://opencollective.com/sharkey/tiers/backer/all.json').then((response) => response.json());
.then((response) => response.json()); const sponsorsOC = await fetch('https://opencollective.com/sharkey/tiers/sponsor/all.json').then((response) => response.json());
await this.redisClient.set('sponsors', JSON.stringify(sponsors), 'EX', 3600); // Merge both together into one array and make sure it only has Active subscriptions
const allSponsors = [...sponsorsOC, ...backers].filter(sponsor => sponsor.isActive === true);
// Remove possible duplicates
totalSponsors = [...new Map(allSponsors.map(v => [v.profile, v])).values()];
await this.redisClient.set('sponsors', JSON.stringify(totalSponsors), 'EX', 3600);
} catch (error) { } catch (error) {
sponsors = { totalSponsors = [];
sponsors: [],
};
} }
} }
return { sponsor_data: sponsors['sponsors'] }; return { sponsor_data: totalSponsors };
}); });
} }
} }

View file

@ -13,7 +13,7 @@
"test": "vitest --run --globals", "test": "vitest --run --globals",
"test-and-coverage": "vitest --run --coverage --globals", "test-and-coverage": "vitest --run --coverage --globals",
"typecheck": "vue-tsc --noEmit", "typecheck": "vue-tsc --noEmit",
"eslint": "eslint --quiet \"src/**/*.{ts,vue}\"", "eslint": "eslint --quiet \"src/**/*.{ts,vue}\" --cache",
"lint": "pnpm typecheck && pnpm eslint" "lint": "pnpm typecheck && pnpm eslint"
}, },
"dependencies": { "dependencies": {

View file

@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkWindow ref="window" :initialWidth="600" :initialHeight="450" :canResize="true" @closed="emit('closed')"> <MkWindow ref="window" :initialWidth="600" :initialHeight="450" :canResize="true" @closed="emit('closed')">
<template #header> <template #header>
<i class="ph-magnifying-glass ph-bold ph-lg" style="margin-right: 0.5em;"></i> <i class="ph-magnifying-glass ph-bold ph-lg" style="margin-right: 0.5em;"></i>
<b>Result</b> <b>{{ i18n.ts.searchResult }}</b>
</template> </template>
<MkNotes :key="props.noteKey" :pagination="props.notePagination"/> <MkNotes :key="props.noteKey" :pagination="props.notePagination"/>
</MkWindow> </MkWindow>
@ -18,6 +18,7 @@ import { } from 'vue';
import type { Paging } from '@/components/MkPagination.vue'; import type { Paging } from '@/components/MkPagination.vue';
import MkNotes from '@/components/MkNotes.vue'; import MkNotes from '@/components/MkNotes.vue';
import MkWindow from '@/components/MkWindow.vue'; import MkWindow from '@/components/MkWindow.vue';
import { i18n } from '@/i18n.js';
const props = defineProps<{ const props = defineProps<{
noteKey: string | number | symbol | undefined; noteKey: string | number | symbol | undefined;

View file

@ -170,9 +170,9 @@ SPDX-License-Identifier: AGPL-3.0-only
:key="sponsor" :key="sponsor"
style="margin-bottom: 0.5rem;" style="margin-bottom: 0.5rem;"
> >
<a :href="sponsor.profile" target="_blank" :class="$style.contributor"> <a :href="sponsor.website || sponsor.profile" target="_blank" :class="$style.contributor">
<img :src="sponsor.avatar" :class="$style.contributorAvatar"> <img :src="sponsor.image || `https://ui-avatars.com/api/?background=0D8ABC&color=fff&name=${sponsor.name}`" :class="$style.contributorAvatar">
<span :class="$style.contributorUsername">{{ sponsor.details.name }}</span> <span :class="$style.contributorUsername">{{ sponsor.name }}</span>
</a> </a>
</span> </span>
</div> </div>
@ -209,7 +209,7 @@ const easterEggEngine = ref(null);
const sponsors = ref([]); const sponsors = ref([]);
const containerEl = shallowRef<HTMLElement>(); const containerEl = shallowRef<HTMLElement>();
await misskeyApi('sponsors', { forceUpdate: true }).then((res) => sponsors.value.push(res.sponsor_data)); await misskeyApi('sponsors', { forceUpdate: false }).then((res) => sponsors.value.push(res.sponsor_data));
function iconLoaded() { function iconLoaded() {
const emojis = defaultStore.state.reactions; const emojis = defaultStore.state.reactions;

View file

@ -56,8 +56,8 @@ SPDX-License-Identifier: AGPL-3.0-only
</MkSwitch> </MkSwitch>
<MkSwitch v-model="collapseNotesRepliedTo">{{ i18n.ts.collapseNotesRepliedTo }}</MkSwitch> <MkSwitch v-model="collapseNotesRepliedTo">{{ i18n.ts.collapseNotesRepliedTo }}</MkSwitch>
<MkSwitch v-model="collapseFiles">{{ i18n.ts.collapseFiles }}</MkSwitch> <MkSwitch v-model="collapseFiles">{{ i18n.ts.collapseFiles }}</MkSwitch>
<MkSwitch v-model="uncollapseCW">Uncollapse CWs on notes</MkSwitch> <MkSwitch v-model="uncollapseCW">{{ i18n.ts.uncollapseCW }}</MkSwitch>
<MkSwitch v-model="expandLongNote">Always expand long notes</MkSwitch> <MkSwitch v-model="expandLongNote">{{ i18n.ts.expandLongNote }}</MkSwitch>
<MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch> <MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch>
<MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch> <MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch>
<MkSwitch v-model="autoloadConversation">{{ i18n.ts.autoloadConversation }}</MkSwitch> <MkSwitch v-model="autoloadConversation">{{ i18n.ts.autoloadConversation }}</MkSwitch>
@ -67,7 +67,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSwitch v-model="showReactionsCount">{{ i18n.ts.showReactionsCount }}</MkSwitch> <MkSwitch v-model="showReactionsCount">{{ i18n.ts.showReactionsCount }}</MkSwitch>
<MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch> <MkSwitch v-model="showGapBetweenNotesInTimeline">{{ i18n.ts.showGapBetweenNotesInTimeline }}</MkSwitch>
<MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch> <MkSwitch v-model="loadRawImages">{{ i18n.ts.loadRawImages }}</MkSwitch>
<MkSwitch v-model="showTickerOnReplies">Show instance ticker on replies</MkSwitch> <MkSwitch v-model="showTickerOnReplies">{{ i18n.ts.showTickerOnReplies }}</MkSwitch>
<MkSelect v-model="searchEngine" placeholder="Other"> <MkSelect v-model="searchEngine" placeholder="Other">
<template #label>{{ i18n.ts.searchEngine }}</template> <template #label>{{ i18n.ts.searchEngine }}</template>
<option <option

View file

@ -6,7 +6,7 @@
"typings": "./lib/src/index.d.ts", "typings": "./lib/src/index.d.ts",
"scripts": { "scripts": {
"build": "tsc -p ./", "build": "tsc -p ./",
"lint": "eslint --ext .js,.ts src", "lint": "eslint --ext .js,.ts src --cache",
"doc": "typedoc --out ../docs ./src", "doc": "typedoc --out ../docs ./src",
"test": "NODE_ENV=test jest -u --maxWorkers=3" "test": "NODE_ENV=test jest -u --maxWorkers=3"
}, },

View file

@ -17,7 +17,7 @@
"scripts": { "scripts": {
"build": "node ./build.js", "build": "node ./build.js",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"", "watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'", "eslint": "eslint './**/*.{js,jsx,ts,tsx}' --cache",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && pnpm eslint" "lint": "pnpm typecheck && pnpm eslint"
}, },

View file

@ -4,7 +4,7 @@
"description": "Misskey TypeGenerator", "description": "Misskey TypeGenerator",
"type": "module", "type": "module",
"scripts": { "scripts": {
"generate": "tsx src/generator.ts && eslint ./built/**/*.ts --fix" "generate": "tsx src/generator.ts && eslint ./built/**/*.ts --fix --cache"
}, },
"devDependencies": { "devDependencies": {
"@readme/openapi-parser": "2.5.0", "@readme/openapi-parser": "2.5.0",

View file

@ -22,7 +22,7 @@
"tsd": "tsd", "tsd": "tsd",
"api": "pnpm api-extractor run --local --verbose", "api": "pnpm api-extractor run --local --verbose",
"api-prod": "pnpm api-extractor run --verbose", "api-prod": "pnpm api-extractor run --verbose",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'", "eslint": "eslint './**/*.{js,jsx,ts,tsx}' --cache",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && pnpm eslint", "lint": "pnpm typecheck && pnpm eslint",
"jest": "jest --coverage --detectOpenHandles", "jest": "jest --coverage --detectOpenHandles",

View file

@ -17,7 +17,7 @@
"scripts": { "scripts": {
"build": "node ./build.js", "build": "node ./build.js",
"watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"", "watch": "nodemon -w package.json -e json --exec \"node ./build.js --watch\"",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'", "eslint": "eslint './**/*.{js,jsx,ts,tsx}' --cache",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"lint": "pnpm typecheck && pnpm eslint" "lint": "pnpm typecheck && pnpm eslint"
}, },

View file

@ -5,7 +5,7 @@
"watch": "nodemon -w ../../package.json -e json --exec \"node build.js watch\"", "watch": "nodemon -w ../../package.json -e json --exec \"node build.js watch\"",
"build": "node build.js", "build": "node build.js",
"typecheck": "tsc --noEmit", "typecheck": "tsc --noEmit",
"eslint": "eslint --quiet src/**/*.ts", "eslint": "eslint --quiet src/**/*.ts --cache",
"lint": "pnpm typecheck && pnpm eslint" "lint": "pnpm typecheck && pnpm eslint"
}, },
"dependencies": { "dependencies": {

View file

@ -251,14 +251,14 @@ importers:
specifier: 4.0.0 specifier: 4.0.0
version: 4.0.0 version: 4.0.0
glob: glob:
specifier: 10.3.10 specifier: 11.0.0
version: 10.3.10 version: 11.0.0
got: got:
specifier: 14.4.2 specifier: 14.4.2
version: 14.4.2 version: 14.4.2
happy-dom: happy-dom:
specifier: 15.6.1 specifier: 15.7.4
version: 15.6.1 version: 15.7.4
hpagent: hpagent:
specifier: 1.2.0 specifier: 1.2.0
version: 1.2.0 version: 1.2.0
@ -7580,11 +7580,6 @@ packages:
engines: {node: '>=16 || 14 >=14.17'} engines: {node: '>=16 || 14 >=14.17'}
hasBin: true hasBin: true
glob@10.4.2:
resolution: {integrity: sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==}
engines: {node: '>=16 || 14 >=14.18'}
hasBin: true
glob@11.0.0: glob@11.0.0:
resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==}
engines: {node: 20 || >=22} engines: {node: 20 || >=22}
@ -7671,8 +7666,8 @@ packages:
happy-dom@10.0.3: happy-dom@10.0.3:
resolution: {integrity: sha512-WkCP+Z5fX6U5PY+yHP3ElV5D9PoxRAHRWPFq3pG9rg/6Hjf5ak7dozAgSCywsTRUq2qfa8vV8OQvUy5pRXy8EQ==} resolution: {integrity: sha512-WkCP+Z5fX6U5PY+yHP3ElV5D9PoxRAHRWPFq3pG9rg/6Hjf5ak7dozAgSCywsTRUq2qfa8vV8OQvUy5pRXy8EQ==}
happy-dom@15.6.1: happy-dom@15.7.4:
resolution: {integrity: sha512-dsMHLsJHZYhXeExP47B2siAfKNVxptlwFss3/bq/9sG3iBt0P2WYFBq68JgMR5vB5gsN2Ev0feTTPD/+rosUNQ==} resolution: {integrity: sha512-r1vadDYGMtsHAAsqhDuk4IpPvr6N8MGKy5ntBo7tSdim+pWDxus2PNqOcOt8LuDZ4t3KJHE+gCuzupcx/GKnyQ==}
engines: {node: '>=18.0.0'} engines: {node: '>=18.0.0'}
hard-rejection@2.1.0: hard-rejection@2.1.0:
@ -7902,6 +7897,7 @@ packages:
inflight@1.0.6: inflight@1.0.6:
resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
inherits@2.0.4: inherits@2.0.4:
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
@ -8220,10 +8216,6 @@ packages:
resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==}
engines: {node: '>=14'} engines: {node: '>=14'}
jackspeak@3.4.0:
resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==}
engines: {node: '>=14'}
jackspeak@4.0.1: jackspeak@4.0.1:
resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==}
engines: {node: 20 || >=22} engines: {node: 20 || >=22}
@ -9538,10 +9530,6 @@ packages:
resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==}
engines: {node: '>=16 || 14 >=14.17'} engines: {node: '>=16 || 14 >=14.17'}
path-scurry@1.11.1:
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
engines: {node: '>=16 || 14 >=14.18'}
path-scurry@2.0.0: path-scurry@2.0.0:
resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==}
engines: {node: 20 || >=22} engines: {node: 20 || >=22}
@ -11121,7 +11109,6 @@ packages:
ts-case-convert@2.0.2: ts-case-convert@2.0.2:
resolution: {integrity: sha512-vdKfx1VAdpvEBOBv5OpVu5ZFqRg9HdTI4sYt6qqMeICBeNyXvitrarCnFWNDAki51IKwCyx+ZssY46Q9jH5otA==} resolution: {integrity: sha512-vdKfx1VAdpvEBOBv5OpVu5ZFqRg9HdTI4sYt6qqMeICBeNyXvitrarCnFWNDAki51IKwCyx+ZssY46Q9jH5otA==}
bundledDependencies: []
ts-dedent@2.2.0: ts-dedent@2.2.0:
resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==}
@ -11633,8 +11620,8 @@ packages:
vue-component-type-helpers@2.0.29: vue-component-type-helpers@2.0.29:
resolution: {integrity: sha512-58i+ZhUAUpwQ+9h5Hck0D+jr1qbYl4voRt5KffBx8qzELViQ4XdT/Tuo+mzq8u63teAG8K0lLaOiL5ofqW38rg==} resolution: {integrity: sha512-58i+ZhUAUpwQ+9h5Hck0D+jr1qbYl4voRt5KffBx8qzELViQ4XdT/Tuo+mzq8u63teAG8K0lLaOiL5ofqW38rg==}
vue-component-type-helpers@2.1.2: vue-component-type-helpers@2.1.6:
resolution: {integrity: sha512-URuxnrOhO9lUG4LOAapGWBaa/WOLDzzyAbL+uKZqT7RS+PFy0cdXI2mUSh7GaMts6vtHaeVbGk7trd0FPJi65Q==} resolution: {integrity: sha512-ng11B8B/ZADUMMOsRbqv0arc442q7lifSubD0v8oDXIFoMg/mXwAPUunrroIDkY+mcD0dHKccdaznSVp8EoX3w==}
vue-demi@0.14.7: vue-demi@0.14.7:
resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==}
@ -14082,7 +14069,7 @@ snapshots:
content-disposition: 0.5.4 content-disposition: 0.5.4
fastify-plugin: 4.5.0 fastify-plugin: 4.5.0
fastq: 1.17.1 fastq: 1.17.1
glob: 10.4.2 glob: 10.3.10
'@fastify/view@8.2.0': '@fastify/view@8.2.0':
dependencies: dependencies:
@ -16281,7 +16268,7 @@ snapshots:
ts-dedent: 2.2.0 ts-dedent: 2.2.0
type-fest: 2.19.0 type-fest: 2.19.0
vue: 3.4.37(typescript@5.5.4) vue: 3.4.37(typescript@5.5.4)
vue-component-type-helpers: 2.1.2 vue-component-type-helpers: 2.1.6
transitivePeerDependencies: transitivePeerDependencies:
- encoding - encoding
- prettier - prettier
@ -16300,7 +16287,7 @@ snapshots:
ts-dedent: 2.2.0 ts-dedent: 2.2.0
type-fest: 2.19.0 type-fest: 2.19.0
vue: 3.4.37(typescript@5.5.4) vue: 3.4.37(typescript@5.5.4)
vue-component-type-helpers: 2.1.2 vue-component-type-helpers: 2.1.6
'@swc/cli@0.3.12(@swc/core@1.6.6)(chokidar@3.5.3)': '@swc/cli@0.3.12(@swc/core@1.6.6)(chokidar@3.5.3)':
dependencies: dependencies:
@ -20034,15 +20021,6 @@ snapshots:
minipass: 7.0.4 minipass: 7.0.4
path-scurry: 1.10.1 path-scurry: 1.10.1
glob@10.4.2:
dependencies:
foreground-child: 3.1.1
jackspeak: 3.4.0
minimatch: 9.0.4
minipass: 7.1.2
package-json-from-dist: 1.0.0
path-scurry: 1.11.1
glob@11.0.0: glob@11.0.0:
dependencies: dependencies:
foreground-child: 3.1.1 foreground-child: 3.1.1
@ -20179,7 +20157,7 @@ snapshots:
whatwg-encoding: 2.0.0 whatwg-encoding: 2.0.0
whatwg-mimetype: 3.0.0 whatwg-mimetype: 3.0.0
happy-dom@15.6.1: happy-dom@15.7.4:
dependencies: dependencies:
entities: 4.5.0 entities: 4.5.0
webidl-conversions: 7.0.0 webidl-conversions: 7.0.0
@ -20694,12 +20672,6 @@ snapshots:
optionalDependencies: optionalDependencies:
'@pkgjs/parseargs': 0.11.0 '@pkgjs/parseargs': 0.11.0
jackspeak@3.4.0:
dependencies:
'@isaacs/cliui': 8.0.2
optionalDependencies:
'@pkgjs/parseargs': 0.11.0
jackspeak@4.0.1: jackspeak@4.0.1:
dependencies: dependencies:
'@isaacs/cliui': 8.0.2 '@isaacs/cliui': 8.0.2
@ -22434,11 +22406,6 @@ snapshots:
lru-cache: 10.2.2 lru-cache: 10.2.2
minipass: 7.0.4 minipass: 7.0.4
path-scurry@1.11.1:
dependencies:
lru-cache: 10.2.2
minipass: 7.1.2
path-scurry@2.0.0: path-scurry@2.0.0:
dependencies: dependencies:
lru-cache: 11.0.0 lru-cache: 11.0.0
@ -24597,7 +24564,7 @@ snapshots:
vue-component-type-helpers@2.0.29: {} vue-component-type-helpers@2.0.29: {}
vue-component-type-helpers@2.1.2: {} vue-component-type-helpers@2.1.6: {}
vue-demi@0.14.7(vue@3.4.37(typescript@5.5.4)): vue-demi@0.14.7(vue@3.4.37(typescript@5.5.4)):
dependencies: dependencies: