Merge remote-tracking branch 'refs/remotes/misskey-original/develop' into develop

This commit is contained in:
mattyatea 2024-06-20 13:49:25 +09:00
commit 72aaffdd37
29 changed files with 256 additions and 136 deletions

View File

@ -2,3 +2,7 @@ contact_links:
- name: 💬 Misskey official Discord - name: 💬 Misskey official Discord
url: https://discord.gg/Wp8gVStHW3 url: https://discord.gg/Wp8gVStHW3
about: Chat freely about Misskey about: Chat freely about Misskey
# 仮
- name: 💬 Start discussion
url: https://github.com/misskey-dev/misskey/discussions
about: The official forum to join conversation and ask question

View File

@ -13,10 +13,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
DOCKER_CONTENT_TRUST: 1 DOCKER_CONTENT_TRUST: 1
DOCKLE_VERSION: 0.4.14
steps: steps:
- uses: actions/checkout@v4.1.1 - uses: actions/checkout@v4.1.1
- run: | - name: Download and install dockle v${{ env.DOCKLE_VERSION }}
curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v0.4.10/dockle_0.4.10_Linux-64bit.deb" run: |
curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v${DOCKLE_VERSION}/dockle_${DOCKLE_VERSION}_Linux-64bit.deb"
sudo dpkg -i dockle.deb sudo dpkg -i dockle.deb
- run: | - run: |
cp .config/docker_example.env .config/docker.env cp .config/docker_example.env .config/docker.env

View File

@ -5,11 +5,13 @@
- Fix: 配信停止したインスタンス一覧が見れなくなる問題を修正 - Fix: 配信停止したインスタンス一覧が見れなくなる問題を修正
### Client ### Client
- Fix: `/about#federation` ページなどで各インスタンスのチャートが表示されなくなっていた問題を修正
- Fix: ユーザーページの追加情報のラベルを投稿者のサーバーの絵文字で表示する (#13968) - Fix: ユーザーページの追加情報のラベルを投稿者のサーバーの絵文字で表示する (#13968)
### Server ### Server
- チャート生成時にinstance.suspentionStateに置き換えられたinstance.isSuspendedが参照されてしまう問題を修正 - チャート生成時にinstance.suspentionStateに置き換えられたinstance.isSuspendedが参照されてしまう問題を修正
- Feat: レートリミット制限に引っかかったときに`Retry-After`ヘッダーを返すように (#13949)
- Fix: アンテナ・クリップ・リスト・ウェブフックがロールポリシーの上限より一つ多く作れてしまうのを修正 (#14036)
## 2024.5.0 ## 2024.5.0

View File

@ -4,7 +4,7 @@
"private": true, "private": true,
"type": "module", "type": "module",
"engines": { "engines": {
"node": "^20.10.0" "node": "^20.10.0 || ^22.0.0"
}, },
"scripts": { "scripts": {
"start": "node ./built/boot/entry.js", "start": "node ./built/boot/entry.js",
@ -160,7 +160,7 @@
"qrcode": "1.5.3", "qrcode": "1.5.3",
"random-seed": "0.3.0", "random-seed": "0.3.0",
"ratelimiter": "3.4.1", "ratelimiter": "3.4.1",
"re2": "1.20.10", "re2": "1.21.2",
"redis-lock": "0.1.4", "redis-lock": "0.1.4",
"reflect-metadata": "0.2.2", "reflect-metadata": "0.2.2",
"rename": "1.0.4", "rename": "1.0.4",

View File

@ -41,7 +41,7 @@ export class ClipService {
const currentCount = await this.clipsRepository.countBy({ const currentCount = await this.clipsRepository.countBy({
userId: me.id, userId: me.id,
}); });
if (currentCount > (await this.roleService.getUserPolicies(me.id)).clipLimit) { if (currentCount >= (await this.roleService.getUserPolicies(me.id)).clipLimit) {
throw new ClipService.TooManyClipsError(); throw new ClipService.TooManyClipsError();
} }
@ -102,7 +102,7 @@ export class ClipService {
const currentCount = await this.clipNotesRepository.countBy({ const currentCount = await this.clipNotesRepository.countBy({
clipId: clip.id, clipId: clip.id,
}); });
if (currentCount > (await this.roleService.getUserPolicies(me.id)).noteEachClipsLimit) { if (currentCount >= (await this.roleService.getUserPolicies(me.id)).noteEachClipsLimit) {
throw new ClipService.TooManyClipNotesError(); throw new ClipService.TooManyClipNotesError();
} }

View File

@ -95,7 +95,7 @@ export class UserListService implements OnApplicationShutdown, OnModuleInit {
const currentCount = await this.userListMembershipsRepository.countBy({ const currentCount = await this.userListMembershipsRepository.countBy({
userListId: list.id, userListId: list.id,
}); });
if (currentCount > (await this.roleService.getUserPolicies(me.id)).userEachUserListsLimit) { if (currentCount >= (await this.roleService.getUserPolicies(me.id)).userEachUserListsLimit) {
throw new UserListService.TooManyUsersError(); throw new UserListService.TooManyUsersError();
} }

View File

@ -84,34 +84,14 @@ import type { QueryDeepPartialEntity } from 'typeorm/query-builder/QueryPartialE
import { MiScheduledNote } from './ScheduledNote.js'; import { MiScheduledNote } from './ScheduledNote.js';
export interface MiRepository<T extends ObjectLiteral> { export interface MiRepository<T extends ObjectLiteral> {
createTableColumnNames(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>): string[]; createTableColumnNames(this: Repository<T> & MiRepository<T>): string[];
createTableColumnNamesWithPrimaryKey(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>): string[];
insertOne(this: Repository<T> & MiRepository<T>, entity: QueryDeepPartialEntity<T>, findOptions?: Pick<FindOneOptions<T>, 'relations'>): Promise<T>; insertOne(this: Repository<T> & MiRepository<T>, entity: QueryDeepPartialEntity<T>, findOptions?: Pick<FindOneOptions<T>, 'relations'>): Promise<T>;
selectAliasColumnNames(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>, builder: SelectQueryBuilder<T>): void; selectAliasColumnNames(this: Repository<T> & MiRepository<T>, queryBuilder: InsertQueryBuilder<T>, builder: SelectQueryBuilder<T>): void;
} }
export const miRepository = { export const miRepository = {
createTableColumnNames(queryBuilder) { createTableColumnNames() {
// @ts-expect-error -- protected return this.metadata.columns.filter(column => column.isSelect && !column.isVirtual).map(column => column.databaseName);
const insertedColumns = queryBuilder.getInsertedColumns();
if (insertedColumns.length) {
return insertedColumns.map(column => column.databaseName);
}
if (!queryBuilder.expressionMap.mainAlias?.hasMetadata && !queryBuilder.expressionMap.insertColumns.length) {
// @ts-expect-error -- protected
const valueSets = queryBuilder.getValueSets();
if (valueSets.length === 1) {
return Object.keys(valueSets[0]);
}
}
return queryBuilder.expressionMap.insertColumns;
},
createTableColumnNamesWithPrimaryKey(queryBuilder) {
const columnNames = this.createTableColumnNames(queryBuilder);
if (!columnNames.includes('id')) {
columnNames.unshift('id');
}
return columnNames;
}, },
async insertOne(entity, findOptions?) { async insertOne(entity, findOptions?) {
const queryBuilder = this.createQueryBuilder().insert().values(entity); const queryBuilder = this.createQueryBuilder().insert().values(entity);
@ -119,7 +99,7 @@ export const miRepository = {
const mainAlias = queryBuilder.expressionMap.mainAlias!; const mainAlias = queryBuilder.expressionMap.mainAlias!;
const name = mainAlias.name; const name = mainAlias.name;
mainAlias.name = 't'; mainAlias.name = 't';
const columnNames = this.createTableColumnNamesWithPrimaryKey(queryBuilder); const columnNames = this.createTableColumnNames();
queryBuilder.returning(columnNames.reduce((a, c) => `${a}, ${queryBuilder.escape(c)}`, '').slice(2)); queryBuilder.returning(columnNames.reduce((a, c) => `${a}, ${queryBuilder.escape(c)}`, '').slice(2));
const builder = this.createQueryBuilder().addCommonTableExpression(queryBuilder, 'cte', { columnNames }); const builder = this.createQueryBuilder().addCommonTableExpression(queryBuilder, 'cte', { columnNames });
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
@ -140,7 +120,7 @@ export const miRepository = {
selectOrAddSelect = (selection, selectionAliasName) => builder.addSelect(selection, selectionAliasName); selectOrAddSelect = (selection, selectionAliasName) => builder.addSelect(selection, selectionAliasName);
return builder.select(selection, selectionAliasName); return builder.select(selection, selectionAliasName);
}; };
for (const columnName of this.createTableColumnNamesWithPrimaryKey(queryBuilder)) { for (const columnName of this.createTableColumnNames()) {
selectOrAddSelect(`${builder.alias}.${columnName}`, `${builder.alias}_${columnName}`); selectOrAddSelect(`${builder.alias}.${columnName}`, `${builder.alias}_${columnName}`);
} }
}, },

View File

@ -73,6 +73,16 @@ export class ApiCallService implements OnApplicationShutdown {
reply.header('WWW-Authenticate', `Bearer realm="Misskey", error="insufficient_scope", error_description="${err.message}"`); reply.header('WWW-Authenticate', `Bearer realm="Misskey", error="insufficient_scope", error_description="${err.message}"`);
} }
statusCode = statusCode ?? 403; statusCode = statusCode ?? 403;
} else if (err.code === 'RATE_LIMIT_EXCEEDED') {
const info: unknown = err.info;
const unixEpochInSeconds = Date.now();
if (typeof(info) === 'object' && info && 'resetMs' in info && typeof(info.resetMs) === 'number') {
const cooldownInSeconds = Math.ceil((info.resetMs - unixEpochInSeconds) / 1000);
// もしかするとマイナスになる可能性がなくはないのでマイナスだったら0にしておく
reply.header('Retry-After', Math.max(cooldownInSeconds, 0).toString(10));
} else {
this.logger.warn(`rate limit information has unexpected type ${typeof(err.info?.reset)}`);
}
} else if (!statusCode) { } else if (!statusCode) {
statusCode = 500; statusCode = 500;
} }
@ -308,12 +318,17 @@ export class ApiCallService implements OnApplicationShutdown {
if (factor > 0) { if (factor > 0) {
// Rate limit // Rate limit
await this.rateLimiterService.limit(limit as IEndpointMeta['limit'] & { key: NonNullable<string> }, limitActor, factor).catch(err => { await this.rateLimiterService.limit(limit as IEndpointMeta['limit'] & { key: NonNullable<string> }, limitActor, factor).catch(err => {
if ('info' in err) {
// errはLimiter.LimiterInfoであることが期待される
throw new ApiError({ throw new ApiError({
message: 'Rate limit exceeded. Please try again later.', message: 'Rate limit exceeded. Please try again later.',
code: 'RATE_LIMIT_EXCEEDED', code: 'RATE_LIMIT_EXCEEDED',
id: 'd5826d14-3982-4d2e-8011-b9e9f02499ef', id: 'd5826d14-3982-4d2e-8011-b9e9f02499ef',
httpStatusCode: 429, httpStatusCode: 429,
}); }, err.info);
} else {
throw new TypeError('information must be a rate-limiter information.');
}
}); });
} }
} }

View File

@ -32,11 +32,13 @@ 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) ok(); if (this.disabled) {
return Promise.resolve();
}
// Short-term limit // Short-term limit
const min = (): void => { const min = 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,
@ -46,25 +48,25 @@ export class RateLimiterService {
minIntervalLimiter.get((err, info) => { minIntervalLimiter.get((err, info) => {
if (err) { if (err) {
return reject('ERR'); return reject({ code: 'ERR', info });
} }
this.logger.debug(`${actor} ${limitation.key} min remaining: ${info.remaining}`); this.logger.debug(`${actor} ${limitation.key} min remaining: ${info.remaining}`);
if (info.remaining === 0) { if (info.remaining === 0) {
reject('BRIEF_REQUEST_INTERVAL'); return reject({ code: 'BRIEF_REQUEST_INTERVAL', info });
} else { } else {
if (hasLongTermLimit) { if (hasLongTermLimit) {
max(); return max.then(ok, reject);
} else { } else {
ok(); return ok();
} }
} }
}); });
}; });
// Long term limit // Long term limit
const max = (): void => { const max = 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,
@ -74,18 +76,18 @@ export class RateLimiterService {
limiter.get((err, info) => { limiter.get((err, info) => {
if (err) { if (err) {
return reject('ERR'); return reject({ code: 'ERR', info });
} }
this.logger.debug(`${actor} ${limitation.key} max remaining: ${info.remaining}`); this.logger.debug(`${actor} ${limitation.key} max remaining: ${info.remaining}`);
if (info.remaining === 0) { if (info.remaining === 0) {
reject('RATE_LIMIT_EXCEEDED'); return reject({ code: 'RATE_LIMIT_EXCEEDED', info });
} else { } else {
ok(); return ok();
} }
}); });
}; });
const hasShortTermLimit = typeof limitation.minInterval === 'number'; const hasShortTermLimit = typeof limitation.minInterval === 'number';
@ -94,12 +96,12 @@ export class RateLimiterService {
typeof limitation.max === 'number'; typeof limitation.max === 'number';
if (hasShortTermLimit) { if (hasShortTermLimit) {
min(); return min;
} else if (hasLongTermLimit) { } else if (hasLongTermLimit) {
max(); return max;
} else { } else {
ok(); return Promise.resolve();
}
} }
});
} }
} }

View File

@ -93,7 +93,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const currentAntennasCount = await this.antennasRepository.countBy({ const currentAntennasCount = await this.antennasRepository.countBy({
userId: me.id, userId: me.id,
}); });
if (currentAntennasCount > (await this.roleService.getUserPolicies(me.id)).antennaLimit) { if (currentAntennasCount >= (await this.roleService.getUserPolicies(me.id)).antennaLimit) {
throw new ApiError(meta.errors.tooManyAntennas); throw new ApiError(meta.errors.tooManyAntennas);
} }

View File

@ -78,7 +78,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
if (file.size === 0) throw new ApiError(meta.errors.emptyFile); if (file.size === 0) throw new ApiError(meta.errors.emptyFile);
const antennas: (_Antenna & { userListAccts: string[] | null })[] = JSON.parse(await this.downloadService.downloadTextFile(file.url)); const antennas: (_Antenna & { userListAccts: string[] | null })[] = JSON.parse(await this.downloadService.downloadTextFile(file.url));
const currentAntennasCount = await this.antennasRepository.countBy({ userId: me.id }); const currentAntennasCount = await this.antennasRepository.countBy({ userId: me.id });
if (currentAntennasCount + antennas.length > (await this.roleService.getUserPolicies(me.id)).antennaLimit) { if (currentAntennasCount + antennas.length >= (await this.roleService.getUserPolicies(me.id)).antennaLimit) {
throw new ApiError(meta.errors.tooManyAntennas); throw new ApiError(meta.errors.tooManyAntennas);
} }
this.queueService.createImportAntennasJob(me, antennas); this.queueService.createImportAntennasJob(me, antennas);

View File

@ -85,7 +85,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const currentWebhooksCount = await this.webhooksRepository.countBy({ const currentWebhooksCount = await this.webhooksRepository.countBy({
userId: me.id, userId: me.id,
}); });
if (currentWebhooksCount > (await this.roleService.getUserPolicies(me.id)).webhookLimit) { if (currentWebhooksCount >= (await this.roleService.getUserPolicies(me.id)).webhookLimit) {
throw new ApiError(meta.errors.tooManyWebhooks); throw new ApiError(meta.errors.tooManyWebhooks);
} }

View File

@ -100,7 +100,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const currentCount = await this.userListsRepository.countBy({ const currentCount = await this.userListsRepository.countBy({
userId: me.id, userId: me.id,
}); });
if (currentCount > (await this.roleService.getUserPolicies(me.id)).userListLimit) { if (currentCount >= (await this.roleService.getUserPolicies(me.id)).userListLimit) {
throw new ApiError(meta.errors.tooManyUserLists); throw new ApiError(meta.errors.tooManyUserLists);
} }

View File

@ -61,7 +61,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const currentCount = await this.userListsRepository.countBy({ const currentCount = await this.userListsRepository.countBy({
userId: me.id, userId: me.id,
}); });
if (currentCount > (await this.roleService.getUserPolicies(me.id)).userListLimit) { if (currentCount >= (await this.roleService.getUserPolicies(me.id)).userListLimit) {
throw new ApiError(meta.errors.tooManyUserLists); throw new ApiError(meta.errors.tooManyUserLists);
} }

View File

@ -163,8 +163,7 @@ describe('アンテナ', () => {
}); });
test('が上限いっぱいまで作成できること', async () => { test('が上限いっぱいまで作成できること', async () => {
// antennaLimit + 1まで作れるのがキモ const response = await Promise.all([...Array(DEFAULT_POLICIES.antennaLimit)].map(() => successfulApiCall({
const response = await Promise.all([...Array(DEFAULT_POLICIES.antennaLimit + 1)].map(() => successfulApiCall({
endpoint: 'antennas/create', endpoint: 'antennas/create',
parameters: { ...defaultParam }, parameters: { ...defaultParam },
user: alice, user: alice,

View File

@ -153,8 +153,7 @@ describe('クリップ', () => {
}); });
test('の作成はポリシーで定められた数以上はできない。', async () => { test('の作成はポリシーで定められた数以上はできない。', async () => {
// ポリシー + 1まで作れるという所がミソ const clipLimit = DEFAULT_POLICIES.clipLimit;
const clipLimit = DEFAULT_POLICIES.clipLimit + 1;
for (let i = 0; i < clipLimit; i++) { for (let i = 0; i < clipLimit; i++) {
await create(); await create();
} }
@ -327,7 +326,7 @@ describe('クリップ', () => {
}); });
test('の一覧(clips/list)が取得できる(上限いっぱい)', async () => { test('の一覧(clips/list)が取得できる(上限いっぱい)', async () => {
const clipLimit = DEFAULT_POLICIES.clipLimit + 1; const clipLimit = DEFAULT_POLICIES.clipLimit;
const clips = await createMany({}, clipLimit); const clips = await createMany({}, clipLimit);
const res = await list({ const res = await list({
parameters: { limit: 1 }, // FIXME: 無視されて11全部返ってくる parameters: { limit: 1 }, // FIXME: 無視されて11全部返ってくる
@ -705,7 +704,7 @@ describe('クリップ', () => {
// TODO: 17000msくらいかかる... // TODO: 17000msくらいかかる...
test('をポリシーで定められた上限いっぱい(200)を超えて追加はできない。', async () => { test('をポリシーで定められた上限いっぱい(200)を超えて追加はできない。', async () => {
const noteLimit = DEFAULT_POLICIES.noteEachClipsLimit + 1; const noteLimit = DEFAULT_POLICIES.noteEachClipsLimit;
const noteList = await Promise.all([...Array(noteLimit)].map((_, i) => post(alice, { const noteList = await Promise.all([...Array(noteLimit)].map((_, i) => post(alice, {
text: `test ${i}`, text: `test ${i}`,
}) as unknown)) as Misskey.entities.Note[]; }) as unknown)) as Misskey.entities.Note[];

View File

@ -125,6 +125,35 @@ export function file(isSensitive = false) {
}; };
} }
export function federationInstance(): entities.FederationInstance {
return {
id: 'someinstanceid',
firstRetrievedAt: '2021-01-01T00:00:00.000Z',
host: 'misskey-hub.net',
usersCount: 10,
notesCount: 20,
followingCount: 5,
followersCount: 15,
isNotResponding: false,
isSuspended: false,
suspensionState: 'none',
isBlocked: false,
softwareName: 'misskey',
softwareVersion: '2024.5.0',
openRegistrations: false,
name: 'Misskey Hub',
description: '',
maintainerName: '',
maintainerEmail: '',
isSilenced: false,
iconUrl: 'https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true',
faviconUrl: '',
themeColor: '',
infoUpdatedAt: '',
latestRequestReceivedAt: '',
};
}
export function userDetailed(id = 'someuserid', username = 'miskist', host = 'misskey-hub.net', name = 'Misskey User'): entities.UserDetailed { export function userDetailed(id = 'someuserid', username = 'miskist', host = 'misskey-hub.net', name = 'Misskey User'): entities.UserDetailed {
return { return {
id, id,

View File

@ -403,6 +403,7 @@ function toStories(component: string): Promise<string> {
glob('src/components/MkSignupServerRules.vue'), glob('src/components/MkSignupServerRules.vue'),
glob('src/components/MkUserSetupDialog.vue'), glob('src/components/MkUserSetupDialog.vue'),
glob('src/components/MkUserSetupDialog.*.vue'), glob('src/components/MkUserSetupDialog.*.vue'),
glob('src/components/MkInstanceCardMini.vue'),
glob('src/components/MkInviteCode.vue'), glob('src/components/MkInviteCode.vue'),
glob('src/pages/user/home.vue'), glob('src/pages/user/home.vue'),
]); ]);

View File

@ -29,7 +29,7 @@ function getChartArray(seed: string, limit: number, option?: { accumulate?: bool
return array; return array;
} }
function getChartResolver(fields: string[], option?: { accumulate?: boolean, mulMap?: Record<string, number> }): HttpResponseResolver<PathParams, DefaultBodyType, JsonBodyType> { export function getChartResolver(fields: string[], option?: { accumulate?: boolean, mulMap?: Record<string, number> }): HttpResponseResolver<PathParams, DefaultBodyType, JsonBodyType> {
return ({ request }) => { return ({ request }) => {
action(`GET ${request.url}`)(); action(`GET ${request.url}`)();
const limitParam = new URL(request.url).searchParams.get('limit'); const limitParam = new URL(request.url).searchParams.get('limit');
@ -76,6 +76,7 @@ const Base = {
args: { args: {
src: 'federation', src: 'federation',
span: 'hour', span: 'hour',
nowForChromatic: 1716263640000,
}, },
parameters: { parameters: {
layout: 'centered', layout: 'centered',
@ -100,18 +101,21 @@ const Base = {
export const FederationChart = { export const FederationChart = {
...Base, ...Base,
args: { args: {
...Base.args,
src: 'federation', src: 'federation',
}, },
} satisfies StoryObj<typeof MkChart>; } satisfies StoryObj<typeof MkChart>;
export const NotesTotalChart = { export const NotesTotalChart = {
...Base, ...Base,
args: { args: {
...Base.args,
src: 'notes-total', src: 'notes-total',
}, },
} satisfies StoryObj<typeof MkChart>; } satisfies StoryObj<typeof MkChart>;
export const DriveChart = { export const DriveChart = {
...Base, ...Base,
args: { args: {
...Base.args,
src: 'drive', src: 'drive',
}, },
} satisfies StoryObj<typeof MkChart>; } satisfies StoryObj<typeof MkChart>;

View File

@ -77,6 +77,7 @@ const props = withDefaults(defineProps<{
stacked?: boolean; stacked?: boolean;
bar?: boolean; bar?: boolean;
aspectRatio?: number | null; aspectRatio?: number | null;
nowForChromatic?: number;
}>(), { }>(), {
args: undefined, args: undefined,
limit: 90, limit: 90,
@ -84,6 +85,13 @@ const props = withDefaults(defineProps<{
stacked: false, stacked: false,
bar: false, bar: false,
aspectRatio: null, aspectRatio: null,
/**
* @desc Overwrites current date to fix background lines of chart.
* @ignore Only used for Chromatic. Don't use this for production.
* @see https://github.com/misskey-dev/misskey/pull/13830#issuecomment-2155886151
*/
nowForChromatic: undefined,
}); });
const legendEl = shallowRef<InstanceType<typeof MkChartLegend>>(); const legendEl = shallowRef<InstanceType<typeof MkChartLegend>>();
@ -106,7 +114,8 @@ const getColor = (i) => {
return colorSets[i % colorSets.length]; return colorSets[i % colorSets.length];
}; };
const now = new Date(); // eslint-disable-next-line vue/no-setup-props-destructure
const now = props.nowForChromatic != null ? new Date(props.nowForChromatic) : new Date();
let chartInstance: Chart | null = null; let chartInstance: Chart | null = null;
let chartData: { let chartData: {
series: { series: {

View File

@ -0,0 +1,64 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { StoryObj } from '@storybook/vue3';
import { HttpResponse, http } from 'msw';
import { federationInstance } from '../../.storybook/fakes.js';
import { commonHandlers } from '../../.storybook/mocks.js';
import MkInstanceCardMini from './MkInstanceCardMini.vue';
import { getChartResolver } from './MkChart.stories.impl.js';
export const Default = {
render(args) {
return {
components: {
MkInstanceCardMini,
},
setup() {
return {
args,
};
},
computed: {
props() {
return {
...this.args,
};
},
},
template: '<MkInstanceCardMini v-bind="props" />',
};
},
args: {
instance: federationInstance(),
},
parameters: {
layout: 'centered',
msw: {
handlers: [
...commonHandlers,
http.get('/undefined/preview.webp', async ({ request }) => {
const urlStr = new URL(request.url).searchParams.get('url');
if (urlStr == null) {
return new HttpResponse(null, { status: 404 });
}
const url = new URL(urlStr);
if (url.href.startsWith('https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/')) {
const image = await (await fetch(`client-assets/${url.pathname.split('/').pop()}`)).blob();
return new HttpResponse(image, {
headers: {
'Content-Type': 'image/jpeg',
},
});
} else {
return new HttpResponse(null, { status: 404 });
}
}),
http.get('/api/charts/instance', getChartResolver(['requests.received'])),
],
},
},
} satisfies StoryObj<typeof MkInstanceCardMini>;

View File

@ -29,8 +29,8 @@ const chartValues = ref<number[] | null>(null);
misskeyApiGet('charts/instance', { host: props.instance.host, limit: 16 + 1, span: 'day' }).then(res => { misskeyApiGet('charts/instance', { host: props.instance.host, limit: 16 + 1, span: 'day' }).then(res => {
// //
res['requests.received'].splice(0, 1); res.requests.received.splice(0, 1);
chartValues.value = res['requests.received']; chartValues.value = res.requests.received;
}); });
function getInstanceIcon(instance): string { function getInstanceIcon(instance): string {

View File

@ -109,6 +109,15 @@ definePageMetadata(() => ({
</script> </script>
<style lang="scss" module> <style lang="scss" module>
.fadeEnterActive,
.fadeLeaveActive {
transition: opacity 0.125s ease;
}
.fadeEnterFrom,
.fadeLeaveTo {
opacity: 0;
}
.announcement { .announcement {
padding: 16px; padding: 16px;
} }

View File

@ -37,7 +37,8 @@
], ],
"lib": [ "lib": [
"esnext", "esnext",
"dom" "dom",
"dom.iterable"
], ],
"jsx": "preserve" "jsx": "preserve"
}, },

View File

@ -5,7 +5,7 @@ import {type UserConfig, defineConfig} from 'vite';
import locales from '../../locales/index.js'; import locales from '../../locales/index.js';
import meta from '../../package.json'; import meta from '../../package.json';
import packageInfo from './package.json' assert { type: 'json' }; import packageInfo from './package.json' with { type: 'json' };
import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name.js'; import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name.js';
import pluginJson5 from './vite.json5.js'; import pluginJson5 from './vite.json5.js';

View File

@ -8,7 +8,7 @@
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import * as esbuild from 'esbuild'; import * as esbuild from 'esbuild';
import locales from '../../locales/index.js'; import locales from '../../locales/index.js';
import meta from '../../package.json' assert { type: "json" }; import meta from '../../package.json' with { type: "json" };
const watch = process.argv[2]?.includes('watch'); const watch = process.argv[2]?.includes('watch');
const __dirname = fileURLToPath(new URL('.', import.meta.url)) const __dirname = fileURLToPath(new URL('.', import.meta.url))

View File

@ -363,8 +363,8 @@ importers:
specifier: 3.4.1 specifier: 3.4.1
version: 3.4.1 version: 3.4.1
re2: re2:
specifier: 1.20.10 specifier: 1.21.2
version: 1.20.10 version: 1.21.2
redis-lock: redis-lock:
specifier: 0.1.4 specifier: 0.1.4
version: 0.1.4 version: 0.1.4
@ -8617,8 +8617,8 @@ packages:
mz@2.7.0: mz@2.7.0:
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
nan@2.18.0: nan@2.20.0:
resolution: {integrity: sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==} resolution: {integrity: sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==}
nanoid@3.3.7: nanoid@3.3.7:
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
@ -8730,8 +8730,8 @@ packages:
resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==} resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==}
hasBin: true hasBin: true
node-gyp@10.0.1: node-gyp@10.1.0:
resolution: {integrity: sha512-gg3/bHehQfZivQVfqIyy8wTdSymF9yTyP4CJifK73imyNMU8AIGQE2pUa7dNWfmMeG9cDVF2eehiRMv0LC1iAg==} resolution: {integrity: sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==}
engines: {node: ^16.14.0 || >=18.0.0} engines: {node: ^16.14.0 || >=18.0.0}
hasBin: true hasBin: true
@ -9686,8 +9686,8 @@ packages:
resolution: {integrity: sha512-fUeWjrkOO0t1rg7B2fdyDTvngj+9RlUyL92vOdiB7c0FPguWVsniIMjEtHH+meLBO9rzkUlUzBVXgWrjI8P9LA==} resolution: {integrity: sha512-fUeWjrkOO0t1rg7B2fdyDTvngj+9RlUyL92vOdiB7c0FPguWVsniIMjEtHH+meLBO9rzkUlUzBVXgWrjI8P9LA==}
engines: {node: '>=12'} engines: {node: '>=12'}
re2@1.20.10: re2@1.21.2:
resolution: {integrity: sha512-/5JjSPXobSDaKFL6rD5Gb4qD4CVBITQb7NAxfQ/NA7o0HER3SJAPV3lPO2kvzw0/PN1pVJNVATEUk4y9j7oIIA==} resolution: {integrity: sha512-f8jqI0vCbwDhzY66Fgx1V2RoNDdmAupKkqRqR/AEF+2/MZNRbtEOjax6oHSht95MU40vx6+2ITsJr/9esukckg==}
react-colorful@5.6.1: react-colorful@5.6.1:
resolution: {integrity: sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==} resolution: {integrity: sha512-1exovf0uGTGyq5mXQT0zgQ80uvj2PCwvF8zY1RN9/vbJVSjSo3fsB/4L3ObbF7u70NduSiK4xu4Y6q1MHoUGEw==}
@ -11172,8 +11172,8 @@ packages:
vue-component-type-helpers@2.0.16: vue-component-type-helpers@2.0.16:
resolution: {integrity: sha512-qisL/iAfdO++7w+SsfYQJVPj6QKvxp4i1MMxvsNO41z/8zu3KuAw9LkhKUfP/kcOWGDxESp+pQObWppXusejCA==} resolution: {integrity: sha512-qisL/iAfdO++7w+SsfYQJVPj6QKvxp4i1MMxvsNO41z/8zu3KuAw9LkhKUfP/kcOWGDxESp+pQObWppXusejCA==}
vue-component-type-helpers@2.0.19: vue-component-type-helpers@2.0.21:
resolution: {integrity: sha512-cN3f1aTxxKo4lzNeQAkVopswuImUrb5Iurll9Gaw5cqpnbTAxtEMM1mgi6ou4X79OCyqYv1U1mzBHJkzmiK82w==} resolution: {integrity: sha512-3NaicyZ7N4B6cft4bfb7dOnPbE9CjLcx+6wZWAg5zwszfO4qXRh+U52dN5r5ZZfc6iMaxKCEcoH9CmxxoFZHLg==}
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==}
@ -11968,7 +11968,7 @@ snapshots:
'@babel/traverse': 7.23.5 '@babel/traverse': 7.23.5
'@babel/types': 7.23.5 '@babel/types': 7.23.5
convert-source-map: 2.0.0 convert-source-map: 2.0.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
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
@ -11988,7 +11988,7 @@ snapshots:
'@babel/traverse': 7.24.0 '@babel/traverse': 7.24.0
'@babel/types': 7.24.0 '@babel/types': 7.24.0
convert-source-map: 2.0.0 convert-source-map: 2.0.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
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
@ -12058,7 +12058,7 @@ snapshots:
'@babel/core': 7.24.0 '@babel/core': 7.24.0
'@babel/helper-compilation-targets': 7.23.6 '@babel/helper-compilation-targets': 7.23.6
'@babel/helper-plugin-utils': 7.22.5 '@babel/helper-plugin-utils': 7.22.5
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
lodash.debounce: 4.0.8 lodash.debounce: 4.0.8
resolve: 1.22.8 resolve: 1.22.8
transitivePeerDependencies: transitivePeerDependencies:
@ -12829,7 +12829,7 @@ snapshots:
'@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-split-export-declaration': 7.22.6
'@babel/parser': 7.23.9 '@babel/parser': 7.23.9
'@babel/types': 7.23.5 '@babel/types': 7.23.5
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
globals: 11.12.0 globals: 11.12.0
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -12844,7 +12844,7 @@ snapshots:
'@babel/helper-split-export-declaration': 7.22.6 '@babel/helper-split-export-declaration': 7.22.6
'@babel/parser': 7.24.0 '@babel/parser': 7.24.0
'@babel/types': 7.24.0 '@babel/types': 7.24.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
globals: 11.12.0 globals: 11.12.0
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -13236,7 +13236,7 @@ snapshots:
'@eslint/eslintrc@2.1.4': '@eslint/eslintrc@2.1.4':
dependencies: dependencies:
ajv: 6.12.6 ajv: 6.12.6
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
espree: 9.6.1 espree: 9.6.1
globals: 13.19.0 globals: 13.19.0
ignore: 5.2.4 ignore: 5.2.4
@ -13387,7 +13387,7 @@ snapshots:
'@humanwhocodes/config-array@0.11.13': '@humanwhocodes/config-array@0.11.13':
dependencies: dependencies:
'@humanwhocodes/object-schema': 2.0.1 '@humanwhocodes/object-schema': 2.0.1
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
minimatch: 3.1.2 minimatch: 3.1.2
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -13395,7 +13395,7 @@ snapshots:
'@humanwhocodes/config-array@0.11.14': '@humanwhocodes/config-array@0.11.14':
dependencies: dependencies:
'@humanwhocodes/object-schema': 2.0.2 '@humanwhocodes/object-schema': 2.0.2
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
minimatch: 3.1.2 minimatch: 3.1.2
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -14007,7 +14007,7 @@ snapshots:
agent-base: 7.1.0 agent-base: 7.1.0
http-proxy-agent: 7.0.0 http-proxy-agent: 7.0.0
https-proxy-agent: 7.0.2 https-proxy-agent: 7.0.2
lru-cache: 10.0.2 lru-cache: 10.2.2
socks-proxy-agent: 8.0.2 socks-proxy-agent: 8.0.2
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -15541,7 +15541,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.26(typescript@5.4.5) vue: 3.4.26(typescript@5.4.5)
vue-component-type-helpers: 2.0.19 vue-component-type-helpers: 2.0.21
transitivePeerDependencies: transitivePeerDependencies:
- encoding - encoding
- supports-color - supports-color
@ -16258,7 +16258,7 @@ snapshots:
'@typescript-eslint/type-utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3) '@typescript-eslint/type-utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3)
'@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3) '@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.11.0 '@typescript-eslint/visitor-keys': 6.11.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.53.0 eslint: 8.53.0
graphemer: 1.4.0 graphemer: 1.4.0
ignore: 5.2.4 ignore: 5.2.4
@ -16278,7 +16278,7 @@ snapshots:
'@typescript-eslint/type-utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3) '@typescript-eslint/type-utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3)
'@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3) '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 7.1.0 '@typescript-eslint/visitor-keys': 7.1.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.57.0 eslint: 8.57.0
graphemer: 1.4.0 graphemer: 1.4.0
ignore: 5.2.4 ignore: 5.2.4
@ -16298,7 +16298,7 @@ snapshots:
'@typescript-eslint/type-utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/type-utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
'@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
'@typescript-eslint/visitor-keys': 7.7.1 '@typescript-eslint/visitor-keys': 7.7.1
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.57.0 eslint: 8.57.0
graphemer: 1.4.0 graphemer: 1.4.0
ignore: 5.3.1 ignore: 5.3.1
@ -16316,7 +16316,7 @@ snapshots:
'@typescript-eslint/types': 6.11.0 '@typescript-eslint/types': 6.11.0
'@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.3) '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 6.11.0 '@typescript-eslint/visitor-keys': 6.11.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.53.0 eslint: 8.53.0
optionalDependencies: optionalDependencies:
typescript: 5.3.3 typescript: 5.3.3
@ -16329,7 +16329,7 @@ snapshots:
'@typescript-eslint/types': 7.1.0 '@typescript-eslint/types': 7.1.0
'@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3)
'@typescript-eslint/visitor-keys': 7.1.0 '@typescript-eslint/visitor-keys': 7.1.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.57.0 eslint: 8.57.0
optionalDependencies: optionalDependencies:
typescript: 5.3.3 typescript: 5.3.3
@ -16342,7 +16342,7 @@ snapshots:
'@typescript-eslint/types': 7.7.1 '@typescript-eslint/types': 7.7.1
'@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5)
'@typescript-eslint/visitor-keys': 7.7.1 '@typescript-eslint/visitor-keys': 7.7.1
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.57.0 eslint: 8.57.0
optionalDependencies: optionalDependencies:
typescript: 5.4.5 typescript: 5.4.5
@ -16368,7 +16368,7 @@ snapshots:
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.3) '@typescript-eslint/typescript-estree': 6.11.0(typescript@5.3.3)
'@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3) '@typescript-eslint/utils': 6.11.0(eslint@8.53.0)(typescript@5.3.3)
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.53.0 eslint: 8.53.0
ts-api-utils: 1.0.1(typescript@5.3.3) ts-api-utils: 1.0.1(typescript@5.3.3)
optionalDependencies: optionalDependencies:
@ -16380,7 +16380,7 @@ snapshots:
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3)
'@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3) '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3)
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.57.0 eslint: 8.57.0
ts-api-utils: 1.0.1(typescript@5.3.3) ts-api-utils: 1.0.1(typescript@5.3.3)
optionalDependencies: optionalDependencies:
@ -16392,7 +16392,7 @@ snapshots:
dependencies: dependencies:
'@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5) '@typescript-eslint/typescript-estree': 7.7.1(typescript@5.4.5)
'@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5) '@typescript-eslint/utils': 7.7.1(eslint@8.57.0)(typescript@5.4.5)
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.57.0 eslint: 8.57.0
ts-api-utils: 1.3.0(typescript@5.4.5) ts-api-utils: 1.3.0(typescript@5.4.5)
optionalDependencies: optionalDependencies:
@ -16410,7 +16410,7 @@ snapshots:
dependencies: dependencies:
'@typescript-eslint/types': 6.11.0 '@typescript-eslint/types': 6.11.0
'@typescript-eslint/visitor-keys': 6.11.0 '@typescript-eslint/visitor-keys': 6.11.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
semver: 7.5.4 semver: 7.5.4
@ -16424,7 +16424,7 @@ snapshots:
dependencies: dependencies:
'@typescript-eslint/types': 7.1.0 '@typescript-eslint/types': 7.1.0
'@typescript-eslint/visitor-keys': 7.1.0 '@typescript-eslint/visitor-keys': 7.1.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
minimatch: 9.0.3 minimatch: 9.0.3
@ -16439,7 +16439,7 @@ snapshots:
dependencies: dependencies:
'@typescript-eslint/types': 7.7.1 '@typescript-eslint/types': 7.7.1
'@typescript-eslint/visitor-keys': 7.7.1 '@typescript-eslint/visitor-keys': 7.7.1
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
globby: 11.1.0 globby: 11.1.0
is-glob: 4.0.3 is-glob: 4.0.3
minimatch: 9.0.4 minimatch: 9.0.4
@ -16774,13 +16774,13 @@ snapshots:
agent-base@6.0.2: agent-base@6.0.2:
dependencies: dependencies:
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
agent-base@7.1.0: agent-base@7.1.0:
dependencies: dependencies:
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -17010,7 +17010,7 @@ snapshots:
dependencies: dependencies:
'@fastify/error': 3.4.0 '@fastify/error': 3.4.0
archy: 1.0.0 archy: 1.0.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
fastq: 1.17.1 fastq: 1.17.1
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -17318,7 +17318,7 @@ snapshots:
'@npmcli/fs': 3.1.0 '@npmcli/fs': 3.1.0
fs-minipass: 3.0.2 fs-minipass: 3.0.2
glob: 10.3.12 glob: 10.3.12
lru-cache: 10.0.2 lru-cache: 10.2.2
minipass: 7.0.4 minipass: 7.0.4
minipass-collect: 1.0.2 minipass-collect: 1.0.2
minipass-flush: 1.0.5 minipass-flush: 1.0.5
@ -18133,7 +18133,7 @@ snapshots:
detect-port@1.5.1: detect-port@1.5.1:
dependencies: dependencies:
address: 1.2.2 address: 1.2.2
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -18349,7 +18349,7 @@ snapshots:
esbuild-register@3.5.0(esbuild@0.20.2): esbuild-register@3.5.0(esbuild@0.20.2):
dependencies: dependencies:
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
esbuild: 0.20.2 esbuild: 0.20.2
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -18619,7 +18619,7 @@ snapshots:
ajv: 6.12.6 ajv: 6.12.6
chalk: 4.1.2 chalk: 4.1.2
cross-spawn: 7.0.3 cross-spawn: 7.0.3
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
doctrine: 3.0.0 doctrine: 3.0.0
escape-string-regexp: 4.0.0 escape-string-regexp: 4.0.0
eslint-scope: 7.2.2 eslint-scope: 7.2.2
@ -18662,7 +18662,7 @@ snapshots:
ajv: 6.12.6 ajv: 6.12.6
chalk: 4.1.2 chalk: 4.1.2
cross-spawn: 7.0.3 cross-spawn: 7.0.3
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
doctrine: 3.0.0 doctrine: 3.0.0
escape-string-regexp: 4.0.0 escape-string-regexp: 4.0.0
eslint-scope: 7.2.2 eslint-scope: 7.2.2
@ -19124,7 +19124,7 @@ snapshots:
follow-redirects@1.15.2(debug@4.3.4): follow-redirects@1.15.2(debug@4.3.4):
optionalDependencies: optionalDependencies:
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
for-each@0.3.3: for-each@0.3.3:
dependencies: dependencies:
@ -19579,7 +19579,7 @@ snapshots:
http-proxy-agent@7.0.0: http-proxy-agent@7.0.0:
dependencies: dependencies:
agent-base: 7.1.0 agent-base: 7.1.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -19618,14 +19618,14 @@ 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.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
https-proxy-agent@7.0.2: https-proxy-agent@7.0.2:
dependencies: dependencies:
agent-base: 7.1.0 agent-base: 7.1.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -19721,7 +19721,7 @@ snapshots:
dependencies: dependencies:
'@ioredis/commands': 1.2.0 '@ioredis/commands': 1.2.0
cluster-key-slot: 1.1.2 cluster-key-slot: 1.1.2
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
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
@ -19974,7 +19974,7 @@ snapshots:
istanbul-lib-source-maps@4.0.1: istanbul-lib-source-maps@4.0.1:
dependencies: dependencies:
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
istanbul-lib-coverage: 3.2.2 istanbul-lib-coverage: 3.2.2
source-map: 0.6.1 source-map: 0.6.1
transitivePeerDependencies: transitivePeerDependencies:
@ -21040,7 +21040,7 @@ snapshots:
micromark@4.0.0: micromark@4.0.0:
dependencies: dependencies:
'@types/debug': 4.1.12 '@types/debug': 4.1.12
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
decode-named-character-reference: 1.0.2 decode-named-character-reference: 1.0.2
devlop: 1.1.0 devlop: 1.1.0
micromark-core-commonmark: 2.0.0 micromark-core-commonmark: 2.0.0
@ -21273,7 +21273,7 @@ snapshots:
object-assign: 4.1.1 object-assign: 4.1.1
thenify-all: 1.6.0 thenify-all: 1.6.0
nan@2.18.0: {} nan@2.20.0: {}
nanoid@3.3.7: {} nanoid@3.3.7: {}
@ -21375,7 +21375,7 @@ snapshots:
node-gyp-build@4.6.0: node-gyp-build@4.6.0:
optional: true optional: true
node-gyp@10.0.1: node-gyp@10.1.0:
dependencies: dependencies:
env-paths: 2.2.1 env-paths: 2.2.1
exponential-backoff: 3.1.1 exponential-backoff: 3.1.1
@ -22351,11 +22351,11 @@ snapshots:
dependencies: dependencies:
setimmediate: 1.0.5 setimmediate: 1.0.5
re2@1.20.10: re2@1.21.2:
dependencies: dependencies:
install-artifact-from-github: 1.3.5 install-artifact-from-github: 1.3.5
nan: 2.18.0 nan: 2.20.0
node-gyp: 10.0.1 node-gyp: 10.1.0
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -22910,7 +22910,7 @@ snapshots:
dependencies: dependencies:
'@hapi/hoek': 10.0.1 '@hapi/hoek': 10.0.1
'@hapi/wreck': 18.0.1 '@hapi/wreck': 18.0.1
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
joi: 17.11.0 joi: 17.11.0
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -23008,7 +23008,7 @@ snapshots:
socks-proxy-agent@8.0.2: socks-proxy-agent@8.0.2:
dependencies: dependencies:
agent-base: 7.1.0 agent-base: 7.1.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
socks: 2.7.1 socks: 2.7.1
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -23105,7 +23105,7 @@ snapshots:
arg: 5.0.2 arg: 5.0.2
bluebird: 3.7.2 bluebird: 3.7.2
check-more-types: 2.24.0 check-more-types: 2.24.0
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
execa: 5.1.1 execa: 5.1.1
lazy-ass: 1.6.0 lazy-ass: 1.6.0
ps-tree: 1.2.0 ps-tree: 1.2.0
@ -23618,7 +23618,7 @@ snapshots:
chalk: 4.1.2 chalk: 4.1.2
cli-highlight: 2.1.11 cli-highlight: 2.1.11
dayjs: 1.11.10 dayjs: 1.11.10
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
dotenv: 16.0.3 dotenv: 16.0.3
glob: 10.3.10 glob: 10.3.10
mkdirp: 2.1.6 mkdirp: 2.1.6
@ -23828,7 +23828,7 @@ snapshots:
vite-node@0.34.6(@types/node@20.12.7)(sass@1.76.0)(terser@5.30.3): vite-node@0.34.6(@types/node@20.12.7)(sass@1.76.0)(terser@5.30.3):
dependencies: dependencies:
cac: 6.7.14 cac: 6.7.14
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
mlly: 1.5.0 mlly: 1.5.0
pathe: 1.1.2 pathe: 1.1.2
picocolors: 1.0.0 picocolors: 1.0.0
@ -23877,7 +23877,7 @@ snapshots:
acorn-walk: 8.3.2 acorn-walk: 8.3.2
cac: 6.7.14 cac: 6.7.14
chai: 4.3.10 chai: 4.3.10
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
local-pkg: 0.4.3 local-pkg: 0.4.3
magic-string: 0.30.7 magic-string: 0.30.7
pathe: 1.1.2 pathe: 1.1.2
@ -23937,7 +23937,7 @@ snapshots:
vue-component-type-helpers@2.0.16: {} vue-component-type-helpers@2.0.16: {}
vue-component-type-helpers@2.0.19: {} vue-component-type-helpers@2.0.21: {}
vue-demi@0.14.7(vue@3.4.26(typescript@5.4.5)): vue-demi@0.14.7(vue@3.4.26(typescript@5.4.5)):
dependencies: dependencies:
@ -23960,7 +23960,7 @@ snapshots:
vue-eslint-parser@9.4.2(eslint@8.57.0): vue-eslint-parser@9.4.2(eslint@8.57.0):
dependencies: dependencies:
debug: 4.3.4(supports-color@5.5.0) debug: 4.3.4(supports-color@8.1.1)
eslint: 8.57.0 eslint: 8.57.0
eslint-scope: 7.2.2 eslint-scope: 7.2.2
eslint-visitor-keys: 3.4.3 eslint-visitor-keys: 3.4.3

View File

@ -13,7 +13,7 @@ import * as terser from 'terser';
import { build as buildLocales } from '../locales/index.js'; import { build as buildLocales } from '../locales/index.js';
import generateDTS from '../locales/generateDTS.js'; import generateDTS from '../locales/generateDTS.js';
import meta from '../package.json' assert { type: "json" }; import meta from '../package.json' with { type: "json" };
import buildTarball from './tarball.mjs'; import buildTarball from './tarball.mjs';
const configDir = fileURLToPath(new URL('../.config', import.meta.url)); const configDir = fileURLToPath(new URL('../.config', import.meta.url));

View File

@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url';
import glob from 'fast-glob'; import glob from 'fast-glob';
import walk from 'ignore-walk'; import walk from 'ignore-walk';
import Pack from 'tar/lib/pack.js'; import Pack from 'tar/lib/pack.js';
import meta from '../package.json' assert { type: "json" }; import meta from '../package.json' with { type: "json" };
const cwd = fileURLToPath(new URL('..', import.meta.url)); const cwd = fileURLToPath(new URL('..', import.meta.url));
const ignore = [ const ignore = [