Merge upstream
This commit is contained in:
commit
9c40d0edda
36 changed files with 5749 additions and 4582 deletions
4
.github/unused/test-backend.yml
vendored
4
.github/unused/test-backend.yml
vendored
|
@ -57,7 +57,7 @@ jobs:
|
||||||
- name: Install FFmpeg
|
- name: Install FFmpeg
|
||||||
uses: FedericoCarboni/setup-ffmpeg@v3
|
uses: FedericoCarboni/setup-ffmpeg@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.4
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
@ -117,7 +117,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.4
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
2
.github/workflows/api-misskey-js.yml
vendored
2
.github/workflows/api-misskey-js.yml
vendored
|
@ -20,7 +20,7 @@ jobs:
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v4.0.4
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
|
@ -29,7 +29,7 @@ jobs:
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- uses: actions/setup-node@v4.0.4
|
- uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
@ -55,7 +55,7 @@ jobs:
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- uses: actions/setup-node@v4.0.4
|
- uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
@ -80,7 +80,7 @@ jobs:
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- uses: actions/setup-node@v4.0.4
|
- uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
2
.github/workflows/test-frontend.yml
vendored
2
.github/workflows/test-frontend.yml
vendored
|
@ -37,7 +37,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.4
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
2
.github/workflows/test-misskey-js.yml
vendored
2
.github/workflows/test-misskey-js.yml
vendored
|
@ -30,7 +30,7 @@ jobs:
|
||||||
- run: corepack enable
|
- run: corepack enable
|
||||||
|
|
||||||
- name: Setup Node.js ${{ matrix.node-version }}
|
- name: Setup Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.4
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
2
.github/workflows/test-production.yml
vendored
2
.github/workflows/test-production.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.4
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
2
.github/workflows/validate-api-json.yml
vendored
2
.github/workflows/validate-api-json.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
run_install: false
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v4.0.4
|
uses: actions/setup-node@v4.1.0
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: 'pnpm'
|
cache: 'pnpm'
|
||||||
|
|
|
@ -28,7 +28,8 @@ const primaries = {
|
||||||
const clean = (text) => text.replace(new RegExp(String.fromCodePoint(0x08), 'g'), '');
|
const clean = (text) => text.replace(new RegExp(String.fromCodePoint(0x08), 'g'), '');
|
||||||
|
|
||||||
export function build() {
|
export function build() {
|
||||||
const locales = languages.reduce((a, c) => (a[c] = yaml.load(clean(fs.readFileSync(new URL(`${c}.yml`, import.meta.url), 'utf-8'))) || {}, a), {});
|
const metaUrl = import.meta.url;
|
||||||
|
const locales = languages.reduce((a, c) => (a[c] = yaml.load(clean(fs.readFileSync(new URL(`${c}.yml`, metaUrl), 'utf-8'))) || {}, a), {});
|
||||||
|
|
||||||
// 空文字列が入ることがあり、フォールバックが動作しなくなるのでプロパティごと消す
|
// 空文字列が入ることがあり、フォールバックが動作しなくなるのでプロパティごと消す
|
||||||
const removeEmpty = (obj) => {
|
const removeEmpty = (obj) => {
|
||||||
|
|
|
@ -34,20 +34,18 @@
|
||||||
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
"generate-api-json": "pnpm build && node ./scripts/generate_api_json.js"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"@swc/core-android-arm64": "1.3.11",
|
"@swc/core-darwin-arm64": "1.7.39",
|
||||||
"@swc/core-darwin-arm64": "1.5.7",
|
"@swc/core-darwin-x64": "1.7.39",
|
||||||
"@swc/core-darwin-x64": "1.5.7",
|
"@swc/core-linux-arm-gnueabihf": "1.7.39",
|
||||||
"@swc/core-freebsd-x64": "1.3.11",
|
"@swc/core-linux-arm64-gnu": "1.7.39",
|
||||||
"@swc/core-linux-arm-gnueabihf": "1.5.7",
|
"@swc/core-linux-arm64-musl": "1.7.39",
|
||||||
"@swc/core-linux-arm64-gnu": "1.5.7",
|
"@swc/core-linux-x64-gnu": "1.7.39",
|
||||||
"@swc/core-linux-arm64-musl": "1.5.7",
|
"@swc/core-linux-x64-musl": "1.7.39",
|
||||||
"@swc/core-linux-x64-gnu": "1.5.7",
|
"@swc/core-win32-arm64-msvc": "1.7.39",
|
||||||
"@swc/core-linux-x64-musl": "1.5.7",
|
"@swc/core-win32-ia32-msvc": "1.7.39",
|
||||||
"@swc/core-win32-arm64-msvc": "1.5.7",
|
"@swc/core-win32-x64-msvc": "1.7.39",
|
||||||
"@swc/core-win32-ia32-msvc": "1.5.7",
|
"@tensorflow/tfjs": "4.22.0",
|
||||||
"@swc/core-win32-x64-msvc": "1.5.7",
|
"@tensorflow/tfjs-node": "4.22.0",
|
||||||
"@tensorflow/tfjs": "4.19.0",
|
|
||||||
"@tensorflow/tfjs-node": "4.19.0",
|
|
||||||
"bufferutil": "4.0.8",
|
"bufferutil": "4.0.8",
|
||||||
"slacc-android-arm-eabi": "0.0.10",
|
"slacc-android-arm-eabi": "0.0.10",
|
||||||
"slacc-android-arm64": "0.0.10",
|
"slacc-android-arm64": "0.0.10",
|
||||||
|
@ -66,34 +64,34 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@authenio/samlify-node-xmllint": "2.0.0",
|
"@authenio/samlify-node-xmllint": "2.0.0",
|
||||||
"@aws-sdk/client-s3": "3.627.0",
|
"@aws-sdk/client-s3": "3.676.0",
|
||||||
"@aws-sdk/lib-storage": "3.627.0",
|
"@aws-sdk/lib-storage": "3.676.0",
|
||||||
"@bull-board/api": "5.21.3",
|
"@bull-board/api": "6.2.4",
|
||||||
"@bull-board/fastify": "5.21.3",
|
"@bull-board/fastify": "6.2.4",
|
||||||
"@bull-board/ui": "5.21.3",
|
"@bull-board/ui": "6.2.4",
|
||||||
"@discordapp/twemoji": "15.0.3",
|
"@discordapp/twemoji": "15.1.0",
|
||||||
"@elastic/elasticsearch": "^8.14.0",
|
"@elastic/elasticsearch": "8.15.1",
|
||||||
"@fastify/accepts": "4.3.0",
|
"@fastify/accepts": "5.0.1",
|
||||||
"@fastify/cookie": "9.3.1",
|
"@fastify/cookie": "11.0.1",
|
||||||
"@fastify/cors": "9.0.1",
|
"@fastify/cors": "10.0.1",
|
||||||
"@fastify/express": "3.0.0",
|
"@fastify/express": "4.0.1",
|
||||||
"@fastify/formbody": "7.4.0",
|
"@fastify/formbody": "8.0.1",
|
||||||
"@fastify/http-proxy": "9.5.0",
|
"@fastify/http-proxy": "10.0.1",
|
||||||
"@fastify/multipart": "8.3.0",
|
"@fastify/multipart": "9.0.1",
|
||||||
"@fastify/static": "7.0.4",
|
"@fastify/static": "8.0.2",
|
||||||
"@fastify/view": "9.1.0",
|
"@fastify/view": "10.0.1",
|
||||||
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
"@misskey-dev/sharp-read-bmp": "1.2.0",
|
||||||
"@misskey-dev/summaly": "5.1.0",
|
"@misskey-dev/summaly": "5.1.0",
|
||||||
"@napi-rs/canvas": "0.1.53",
|
"@napi-rs/canvas": "0.1.58",
|
||||||
"@nestjs/common": "10.3.10",
|
"@nestjs/common": "10.4.5",
|
||||||
"@nestjs/core": "10.3.10",
|
"@nestjs/core": "10.4.5",
|
||||||
"@nestjs/testing": "10.3.10",
|
"@nestjs/testing": "10.4.5",
|
||||||
"@peertube/http-signature": "1.7.0",
|
"@peertube/http-signature": "1.7.0",
|
||||||
"@simplewebauthn/server": "10.0.1",
|
"@simplewebauthn/server": "11.0.0",
|
||||||
"@sinonjs/fake-timers": "11.2.2",
|
"@sinonjs/fake-timers": "11.3.1",
|
||||||
"@smithy/node-http-handler": "3.1.4",
|
"@smithy/node-http-handler": "3.2.5",
|
||||||
"@swc/cli": "0.3.12",
|
"@swc/cli": "0.4.0",
|
||||||
"@swc/core": "1.5.7",
|
"@swc/core": "1.7.39",
|
||||||
"@twemoji/parser": "15.1.1",
|
"@twemoji/parser": "15.1.1",
|
||||||
"accepts": "1.3.8",
|
"accepts": "1.3.8",
|
||||||
"ajv": "8.17.1",
|
"ajv": "8.17.1",
|
||||||
|
@ -101,41 +99,41 @@
|
||||||
"async-mutex": "0.5.0",
|
"async-mutex": "0.5.0",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"blurhash": "2.0.5",
|
"blurhash": "2.0.5",
|
||||||
"body-parser": "1.20.2",
|
"body-parser": "1.20.3",
|
||||||
"bullmq": "5.12.3",
|
"bullmq": "5.21.2",
|
||||||
"cacheable-lookup": "7.0.0",
|
"cacheable-lookup": "7.0.0",
|
||||||
"cbor": "9.0.2",
|
"cbor": "9.0.2",
|
||||||
"chalk": "5.3.0",
|
"chalk": "5.3.0",
|
||||||
"chalk-template": "1.1.0",
|
"chalk-template": "1.1.0",
|
||||||
"chokidar": "3.6.0",
|
"chokidar": "4.0.1",
|
||||||
"cli-highlight": "2.1.11",
|
"cli-highlight": "2.1.11",
|
||||||
"color-convert": "2.0.1",
|
"color-convert": "2.0.1",
|
||||||
"content-disposition": "0.5.4",
|
"content-disposition": "0.5.4",
|
||||||
"date-fns": "3.6.0",
|
"date-fns": "4.1.0",
|
||||||
"deep-email-validator": "0.1.21",
|
"deep-email-validator": "0.1.21",
|
||||||
"fastify": "4.28.1",
|
"fastify": "5.0.0",
|
||||||
"fastify-http-errors-enhanced": "5.0.4",
|
"fastify-http-errors-enhanced": "6.0.0",
|
||||||
"fastify-raw-body": "4.3.0",
|
"fastify-raw-body": "5.0.0",
|
||||||
"feed": "4.2.2",
|
"feed": "4.2.2",
|
||||||
"file-type": "19.4.0",
|
"file-type": "19.6.0",
|
||||||
"fluent-ffmpeg": "2.1.3",
|
"fluent-ffmpeg": "2.1.3",
|
||||||
"form-data": "4.0.0",
|
"form-data": "4.0.1",
|
||||||
"got": "14.4.2",
|
"got": "14.4.3",
|
||||||
"happy-dom": "14.12.3",
|
"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",
|
||||||
"ioredis": "5.4.1",
|
"ioredis": "5.4.1",
|
||||||
"ip-cidr": "3.1.0",
|
"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",
|
||||||
"jose": "5.6.3",
|
"jose": "5.9.6",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"jsdom": "24.1.1",
|
"jsdom": "25.0.1",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"jsonld": "8.3.2",
|
"jsonld": "8.3.2",
|
||||||
"jsrsasign": "11.1.0",
|
"jsrsasign": "11.1.0",
|
||||||
"meilisearch": "0.41.0",
|
"meilisearch": "0.44.1",
|
||||||
"mfm-js": "0.24.0",
|
"mfm-js": "0.24.0",
|
||||||
"microformats-parser": "2.0.2",
|
"microformats-parser": "2.0.2",
|
||||||
"mime-types": "2.1.35",
|
"mime-types": "2.1.35",
|
||||||
|
@ -146,17 +144,17 @@
|
||||||
"nested-property": "4.0.0",
|
"nested-property": "4.0.0",
|
||||||
"node-fetch": "3.3.2",
|
"node-fetch": "3.3.2",
|
||||||
"node-forge": "1.3.1",
|
"node-forge": "1.3.1",
|
||||||
"nodemailer": "6.9.14",
|
"nodemailer": "6.9.15",
|
||||||
"nsfwjs": "2.4.2",
|
"nsfwjs": "2.4.2",
|
||||||
"oauth": "0.10.0",
|
"oauth": "0.10.0",
|
||||||
"oauth2orize": "1.12.0",
|
"oauth2orize": "1.12.0",
|
||||||
"oauth2orize-pkce": "0.1.2",
|
"oauth2orize-pkce": "0.1.2",
|
||||||
"os-utils": "0.0.14",
|
"os-utils": "0.0.14",
|
||||||
"otpauth": "9.3.1",
|
"otpauth": "9.3.4",
|
||||||
"parse5": "7.1.2",
|
"parse5": "7.2.0",
|
||||||
"pg": "8.12.0",
|
"pg": "8.13.0",
|
||||||
"pino": "9.3.2",
|
"pino": "9.5.0",
|
||||||
"pino-pretty": "11.2.2",
|
"pino-pretty": "11.3.0",
|
||||||
"pkce-challenge": "4.1.0",
|
"pkce-challenge": "4.1.0",
|
||||||
"probe-image-size": "7.2.3",
|
"probe-image-size": "7.2.3",
|
||||||
"promise-limit": "2.7.0",
|
"promise-limit": "2.7.0",
|
||||||
|
@ -165,26 +163,26 @@
|
||||||
"qrcode": "1.5.4",
|
"qrcode": "1.5.4",
|
||||||
"random-seed": "0.3.0",
|
"random-seed": "0.3.0",
|
||||||
"ratelimiter": "3.4.1",
|
"ratelimiter": "3.4.1",
|
||||||
"re2": "1.21.3",
|
"re2": "1.21.4",
|
||||||
"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",
|
||||||
"rss-parser": "3.13.0",
|
"rss-parser": "3.13.0",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.1",
|
||||||
"samlify": "2.8.11",
|
"samlify": "2.8.11",
|
||||||
"sanitize-html": "2.13.0",
|
"sanitize-html": "2.13.1",
|
||||||
"secure-json-parse": "2.7.0",
|
"secure-json-parse": "2.7.0",
|
||||||
"sharp": "0.33.4",
|
"sharp": "0.33.5",
|
||||||
"slacc": "0.0.10",
|
"slacc": "0.0.10",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"stringz": "2.1.0",
|
"stringz": "2.1.0",
|
||||||
"systeminformation": "5.23.4",
|
"systeminformation": "5.23.5",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tmp": "0.2.3",
|
"tmp": "0.2.3",
|
||||||
"tsc-alias": "1.8.10",
|
"tsc-alias": "1.8.10",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typeorm": "0.3.20",
|
"typeorm": "0.3.20",
|
||||||
"typescript": "5.5.4",
|
"typescript": "5.6.3",
|
||||||
"ulid": "2.3.0",
|
"ulid": "2.3.0",
|
||||||
"vary": "1.1.2",
|
"vary": "1.1.2",
|
||||||
"web-push": "3.6.7",
|
"web-push": "3.6.7",
|
||||||
|
@ -195,58 +193,58 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/globals": "29.7.0",
|
"@jest/globals": "29.7.0",
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@nestjs/platform-express": "10.3.10",
|
"@nestjs/platform-express": "10.4.5",
|
||||||
"@simplewebauthn/types": "10.0.0",
|
"@simplewebauthn/types": "11.0.0",
|
||||||
"@swc/jest": "0.2.36",
|
"@swc/jest": "0.2.36",
|
||||||
"@types/accepts": "1.3.7",
|
"@types/accepts": "1.3.7",
|
||||||
"@types/archiver": "6.0.2",
|
"@types/archiver": "6.0.2",
|
||||||
"@types/bcryptjs": "2.4.6",
|
"@types/bcryptjs": "2.4.6",
|
||||||
"@types/body-parser": "1.19.5",
|
"@types/body-parser": "1.19.5",
|
||||||
"@types/color-convert": "2.0.3",
|
"@types/color-convert": "2.0.4",
|
||||||
"@types/content-disposition": "0.5.8",
|
"@types/content-disposition": "0.5.8",
|
||||||
"@types/fluent-ffmpeg": "2.1.25",
|
"@types/fluent-ffmpeg": "2.1.26",
|
||||||
"@types/htmlescape": "^1.1.3",
|
"@types/htmlescape": "^1.1.3",
|
||||||
"@types/http-link-header": "1.0.7",
|
"@types/http-link-header": "1.0.7",
|
||||||
"@types/jest": "29.5.12",
|
"@types/jest": "29.5.13",
|
||||||
"@types/js-yaml": "4.0.9",
|
"@types/js-yaml": "4.0.9",
|
||||||
"@types/jsdom": "21.1.7",
|
"@types/jsdom": "21.1.7",
|
||||||
"@types/jsonld": "1.5.15",
|
"@types/jsonld": "1.5.15",
|
||||||
"@types/jsrsasign": "10.5.14",
|
"@types/jsrsasign": "10.5.14",
|
||||||
"@types/mime-types": "2.1.4",
|
"@types/mime-types": "2.1.4",
|
||||||
"@types/ms": "0.7.34",
|
"@types/ms": "0.7.34",
|
||||||
"@types/node": "22.2.0",
|
"@types/node": "22.7.8",
|
||||||
"@types/node-forge": "1.3.11",
|
"@types/node-forge": "1.3.11",
|
||||||
"@types/nodemailer": "6.4.15",
|
"@types/nodemailer": "6.4.16",
|
||||||
"@types/oauth": "0.9.5",
|
"@types/oauth": "0.9.6",
|
||||||
"@types/oauth2orize": "1.11.5",
|
"@types/oauth2orize": "1.11.5",
|
||||||
"@types/oauth2orize-pkce": "0.1.2",
|
"@types/oauth2orize-pkce": "0.1.2",
|
||||||
"@types/pg": "8.11.6",
|
"@types/pg": "8.11.10",
|
||||||
"@types/pug": "2.0.10",
|
"@types/pug": "2.0.10",
|
||||||
"@types/punycode": "2.1.4",
|
"@types/punycode": "2.1.4",
|
||||||
"@types/qrcode": "1.5.5",
|
"@types/qrcode": "1.5.5",
|
||||||
"@types/random-seed": "0.3.5",
|
"@types/random-seed": "0.3.5",
|
||||||
"@types/ratelimiter": "3.4.6",
|
"@types/ratelimiter": "3.4.6",
|
||||||
"@types/rename": "1.0.7",
|
"@types/rename": "1.0.7",
|
||||||
"@types/sanitize-html": "2.11.0",
|
"@types/sanitize-html": "2.13.0",
|
||||||
"@types/semver": "7.5.8",
|
"@types/semver": "7.5.8",
|
||||||
"@types/simple-oauth2": "5.0.7",
|
"@types/simple-oauth2": "5.0.7",
|
||||||
"@types/sinonjs__fake-timers": "8.1.5",
|
"@types/sinonjs__fake-timers": "8.1.5",
|
||||||
"@types/tinycolor2": "1.4.6",
|
"@types/tinycolor2": "1.4.6",
|
||||||
"@types/tmp": "0.2.6",
|
"@types/tmp": "0.2.6",
|
||||||
"@types/vary": "1.1.3",
|
"@types/vary": "1.1.3",
|
||||||
"@types/web-push": "3.6.3",
|
"@types/web-push": "3.6.4",
|
||||||
"@types/ws": "8.5.12",
|
"@types/ws": "8.5.12",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"aws-sdk-client-mock": "4.0.1",
|
"aws-sdk-client-mock": "4.1.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-import": "2.29.1",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"execa": "9.3.0",
|
"execa": "9.4.1",
|
||||||
"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",
|
||||||
"nodemon": "3.1.4",
|
"nodemon": "3.1.7",
|
||||||
"pid-port": "1.0.0",
|
"pid-port": "1.0.0",
|
||||||
"simple-oauth2": "5.1.0"
|
"simple-oauth2": "5.1.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,10 +266,7 @@ export class FileInfoService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async *asyncIterateFrames(cwd: string, command: FFmpeg.FfmpegCommand): AsyncGenerator<string, void> {
|
private async *asyncIterateFrames(cwd: string, command: FFmpeg.FfmpegCommand): AsyncGenerator<string, void> {
|
||||||
const watcher = new FSWatcher({
|
const watcher = new FSWatcher({ cwd });
|
||||||
cwd,
|
|
||||||
disableGlobbing: true,
|
|
||||||
});
|
|
||||||
let finished = false;
|
let finished = false;
|
||||||
command.once('end', () => {
|
command.once('end', () => {
|
||||||
finished = true;
|
finished = true;
|
||||||
|
|
|
@ -96,8 +96,8 @@ export class WebAuthnService {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async verifyRegistration(userId: MiUser['id'], response: RegistrationResponseJSON): Promise<{
|
public async verifyRegistration(userId: MiUser['id'], response: RegistrationResponseJSON): Promise<{
|
||||||
credentialID: string;
|
id: string;
|
||||||
credentialPublicKey: Uint8Array;
|
publicKey: Uint8Array;
|
||||||
attestationObject: Uint8Array;
|
attestationObject: Uint8Array;
|
||||||
fmt: AttestationFormat;
|
fmt: AttestationFormat;
|
||||||
counter: number;
|
counter: number;
|
||||||
|
@ -139,15 +139,15 @@ export class WebAuthnService {
|
||||||
const { registrationInfo } = verification;
|
const { registrationInfo } = verification;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
credentialID: registrationInfo.credentialID,
|
id: registrationInfo.credential.id,
|
||||||
credentialPublicKey: registrationInfo.credentialPublicKey,
|
publicKey: registrationInfo.credential.publicKey,
|
||||||
attestationObject: registrationInfo.attestationObject,
|
attestationObject: registrationInfo.attestationObject,
|
||||||
fmt: registrationInfo.fmt,
|
fmt: registrationInfo.fmt,
|
||||||
counter: registrationInfo.counter,
|
counter: registrationInfo.credential.counter,
|
||||||
userVerified: registrationInfo.userVerified,
|
userVerified: registrationInfo.userVerified,
|
||||||
credentialDeviceType: registrationInfo.credentialDeviceType,
|
credentialDeviceType: registrationInfo.credentialDeviceType,
|
||||||
credentialBackedUp: registrationInfo.credentialBackedUp,
|
credentialBackedUp: registrationInfo.credentialBackedUp,
|
||||||
transports: response.response.transports,
|
transports: registrationInfo.credential.transports,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,9 +228,9 @@ export class WebAuthnService {
|
||||||
expectedChallenge: challenge,
|
expectedChallenge: challenge,
|
||||||
expectedOrigin: relyingParty.origin,
|
expectedOrigin: relyingParty.origin,
|
||||||
expectedRPID: relyingParty.rpId,
|
expectedRPID: relyingParty.rpId,
|
||||||
authenticator: {
|
credential: {
|
||||||
credentialID: key.id,
|
id: key.id,
|
||||||
credentialPublicKey: Buffer.from(key.publicKey, 'base64url'),
|
publicKey: Buffer.from(key.publicKey, 'base64url'),
|
||||||
counter: key.counter,
|
counter: key.counter,
|
||||||
transports: key.transports ? key.transports as AuthenticatorTransportFuture[] : undefined,
|
transports: key.transports ? key.transports as AuthenticatorTransportFuture[] : undefined,
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,7 @@ import type { onRequestHookHandler } from 'fastify';
|
||||||
export const handleRequestRedirectToOmitSearch: onRequestHookHandler = (request, reply, done) => {
|
export const handleRequestRedirectToOmitSearch: onRequestHookHandler = (request, reply, done) => {
|
||||||
const index = request.url.indexOf('?');
|
const index = request.url.indexOf('?');
|
||||||
if (~index) {
|
if (~index) {
|
||||||
reply.redirect(301, request.url.slice(0, index));
|
reply.redirect(request.url.slice(0, index), 301);
|
||||||
}
|
}
|
||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
|
|
|
@ -82,7 +82,7 @@ export class FileServerService {
|
||||||
.catch(err => this.errorHandler(request, reply, err));
|
.catch(err => this.errorHandler(request, reply, err));
|
||||||
});
|
});
|
||||||
fastify.get<{ Params: { key: string; } }>('/files/:key/*', async (request, reply) => {
|
fastify.get<{ Params: { key: string; } }>('/files/:key/*', async (request, reply) => {
|
||||||
return await reply.redirect(301, `${this.config.url}/files/${request.params.key}`);
|
return reply.redirect(`${this.config.url}/files/${request.params.key}`, 301);
|
||||||
});
|
});
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
@ -147,12 +147,12 @@ export class FileServerService {
|
||||||
url.searchParams.set('static', '1');
|
url.searchParams.set('static', '1');
|
||||||
|
|
||||||
file.cleanup();
|
file.cleanup();
|
||||||
return await reply.redirect(301, url.toString());
|
return await reply.redirect(url.toString(), 301);
|
||||||
} else if (file.mime.startsWith('video/')) {
|
} else if (file.mime.startsWith('video/')) {
|
||||||
const externalThumbnail = this.videoProcessingService.getExternalVideoThumbnailUrl(file.url);
|
const externalThumbnail = this.videoProcessingService.getExternalVideoThumbnailUrl(file.url);
|
||||||
if (externalThumbnail) {
|
if (externalThumbnail) {
|
||||||
file.cleanup();
|
file.cleanup();
|
||||||
return await reply.redirect(301, externalThumbnail);
|
return await reply.redirect(externalThumbnail, 301);
|
||||||
}
|
}
|
||||||
|
|
||||||
image = await this.videoProcessingService.generateVideoThumbnail(file.path);
|
image = await this.videoProcessingService.generateVideoThumbnail(file.path);
|
||||||
|
@ -167,7 +167,7 @@ export class FileServerService {
|
||||||
url.searchParams.set('url', file.url);
|
url.searchParams.set('url', file.url);
|
||||||
|
|
||||||
file.cleanup();
|
file.cleanup();
|
||||||
return await reply.redirect(301, url.toString());
|
return await reply.redirect(url.toString(), 301);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,12 +313,18 @@ export class FileServerService {
|
||||||
url.searchParams.append(key, value);
|
url.searchParams.append(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return await reply.redirect(
|
return reply.redirect(
|
||||||
301,
|
|
||||||
url.toString(),
|
url.toString(),
|
||||||
|
301,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!request.headers['user-agent']) {
|
||||||
|
throw new StatusError('User-Agent is required', 400, 'User-Agent is required');
|
||||||
|
} else if (request.headers['user-agent'].toLowerCase().indexOf('misskey/') !== -1) {
|
||||||
|
throw new StatusError('Refusing to proxy a request from another proxy', 403, 'Proxy is recursive');
|
||||||
|
}
|
||||||
|
|
||||||
// Create temp file
|
// Create temp file
|
||||||
const file = await this.getStreamAndTypeFromUrl(url);
|
const file = await this.getStreamAndTypeFromUrl(url);
|
||||||
if (file === '404') {
|
if (file === '404') {
|
||||||
|
|
|
@ -155,7 +155,7 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
|
|
||||||
if (emoji == null) {
|
if (emoji == null) {
|
||||||
if ('fallback' in request.query) {
|
if ('fallback' in request.query) {
|
||||||
return await reply.redirect('/static-assets/emoji-unknown.png');
|
return reply.redirect('/static-assets/emoji-unknown.png');
|
||||||
} else {
|
} else {
|
||||||
reply.code(404);
|
reply.code(404);
|
||||||
return;
|
return;
|
||||||
|
@ -176,9 +176,9 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
if ('static' in request.query) url.searchParams.set('static', '1');
|
if ('static' in request.query) url.searchParams.set('static', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
return await reply.redirect(
|
return reply.redirect(
|
||||||
301,
|
|
||||||
url.toString(),
|
url.toString(),
|
||||||
|
301,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -96,13 +96,13 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const keyInfo = await this.webAuthnService.verifyRegistration(me.id, ps.credential);
|
const keyInfo = await this.webAuthnService.verifyRegistration(me.id, ps.credential);
|
||||||
const keyId = keyInfo.credentialID;
|
const keyId = keyInfo.id;
|
||||||
|
|
||||||
await this.userSecurityKeysRepository.insert({
|
await this.userSecurityKeysRepository.insert({
|
||||||
id: keyId,
|
id: keyId,
|
||||||
userId: me.id,
|
userId: me.id,
|
||||||
name: ps.name,
|
name: ps.name,
|
||||||
publicKey: Buffer.from(keyInfo.credentialPublicKey).toString('base64url'),
|
publicKey: Buffer.from(keyInfo.publicKey).toString('base64url'),
|
||||||
counter: keyInfo.counter,
|
counter: keyInfo.counter,
|
||||||
credentialDeviceType: keyInfo.credentialDeviceType,
|
credentialDeviceType: keyInfo.credentialDeviceType,
|
||||||
credentialBackedUp: keyInfo.credentialBackedUp,
|
credentialBackedUp: keyInfo.credentialBackedUp,
|
||||||
|
|
|
@ -211,7 +211,10 @@ export function genOpenapiSpec(config: Config, includeSelfRef = false) {
|
||||||
|
|
||||||
spec.paths['/' + endpoint.name] = {
|
spec.paths['/' + endpoint.name] = {
|
||||||
...(endpoint.meta.allowGet ? {
|
...(endpoint.meta.allowGet ? {
|
||||||
get: info,
|
get: {
|
||||||
|
...info,
|
||||||
|
operationId: info.operationId + '_get',
|
||||||
|
},
|
||||||
} : {}),
|
} : {}),
|
||||||
post: info,
|
post: info,
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,34 +17,34 @@
|
||||||
"lint": "pnpm typecheck && pnpm eslint"
|
"lint": "pnpm typecheck && pnpm eslint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordapp/twemoji": "15.0.3",
|
"@discordapp/twemoji": "15.1.0",
|
||||||
"@github/webauthn-json": "2.1.1",
|
"@github/webauthn-json": "2.1.1",
|
||||||
"@isaacs/ttlcache": "1.4.1",
|
"@isaacs/ttlcache": "1.4.1",
|
||||||
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
|
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
|
||||||
"@misskey-dev/browser-image-resizer": "2024.1.0",
|
"@misskey-dev/browser-image-resizer": "2024.1.0",
|
||||||
"@rollup/plugin-json": "6.1.0",
|
"@rollup/plugin-json": "6.1.0",
|
||||||
"@rollup/plugin-replace": "5.0.7",
|
"@rollup/plugin-replace": "6.0.1",
|
||||||
"@rollup/plugin-typescript": "11.1.6",
|
"@rollup/plugin-typescript": "12.1.1",
|
||||||
"@rollup/pluginutils": "5.1.0",
|
"@rollup/pluginutils": "5.1.2",
|
||||||
"@syuilo/aiscript": "0.18.0",
|
"@syuilo/aiscript": "0.19.0",
|
||||||
"@tabler/icons-webfont": "3.12.0",
|
"@tabler/icons-webfont": "3.19.0",
|
||||||
"@twemoji/parser": "15.1.1",
|
"@twemoji/parser": "15.1.1",
|
||||||
"@vitejs/plugin-vue": "5.1.2",
|
"@vitejs/plugin-vue": "5.1.4",
|
||||||
"@vue/compiler-sfc": "3.4.15",
|
"@vue/compiler-sfc": "3.5.12",
|
||||||
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.9",
|
"aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.1.9",
|
||||||
"astring": "1.8.6",
|
"astring": "1.9.0",
|
||||||
"broadcast-channel": "7.0.0",
|
"broadcast-channel": "7.0.0",
|
||||||
"buraha": "0.0.1",
|
"buraha": "0.0.1",
|
||||||
"canvas-confetti": "1.9.3",
|
"canvas-confetti": "1.9.3",
|
||||||
"chart.js": "4.4.3",
|
"chart.js": "4.4.5",
|
||||||
"chartjs-adapter-date-fns": "3.0.0",
|
"chartjs-adapter-date-fns": "3.0.0",
|
||||||
"chartjs-chart-matrix": "2.0.1",
|
"chartjs-chart-matrix": "2.0.1",
|
||||||
"chartjs-plugin-gradient": "0.6.1",
|
"chartjs-plugin-gradient": "0.6.1",
|
||||||
"chartjs-plugin-zoom": "2.0.1",
|
"chartjs-plugin-zoom": "2.0.1",
|
||||||
"chromatic": "11.7.0",
|
"chromatic": "11.14.0",
|
||||||
"compare-versions": "6.1.1",
|
"compare-versions": "6.1.1",
|
||||||
"cropperjs": "2.0.0-rc.0",
|
"cropperjs": "2.0.0-rc.0",
|
||||||
"date-fns": "3.6.0",
|
"date-fns": "4.1.0",
|
||||||
"escape-regexp": "0.0.1",
|
"escape-regexp": "0.0.1",
|
||||||
"estree-walker": "3.0.3",
|
"estree-walker": "3.0.3",
|
||||||
"eventemitter3": "5.0.1",
|
"eventemitter3": "5.0.1",
|
||||||
|
@ -59,86 +59,86 @@
|
||||||
"misskey-reversi": "workspace:*",
|
"misskey-reversi": "workspace:*",
|
||||||
"photoswipe": "5.4.4",
|
"photoswipe": "5.4.4",
|
||||||
"punycode": "2.3.1",
|
"punycode": "2.3.1",
|
||||||
"rollup": "4.20.0",
|
"rollup": "4.24.0",
|
||||||
"sanitize-html": "2.13.0",
|
"sanitize-html": "2.13.1",
|
||||||
"sass": "1.77.8",
|
"sass": "1.80.3",
|
||||||
"shiki": "1.12.1",
|
"shiki": "1.22.0",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"textarea-caret": "3.1.0",
|
"textarea-caret": "3.1.0",
|
||||||
"three": "0.167.1",
|
"three": "0.169.0",
|
||||||
"throttle-debounce": "5.0.2",
|
"throttle-debounce": "5.0.2",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tsc-alias": "1.8.10",
|
"tsc-alias": "1.8.10",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"typescript": "5.5.4",
|
"typescript": "5.6.3",
|
||||||
"uuid": "10.0.0",
|
"uuid": "10.0.0",
|
||||||
"v-code-diff": "1.12.1",
|
"v-code-diff": "1.13.1",
|
||||||
"vite": "5.4.0",
|
"vite": "5.4.9",
|
||||||
"vue": "3.4.15",
|
"vue": "3.5.12",
|
||||||
"vuedraggable": "next"
|
"vuedraggable": "next"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@misskey-dev/summaly": "5.1.0",
|
"@misskey-dev/summaly": "5.1.0",
|
||||||
"@storybook/addon-actions": "8.2.8",
|
"@storybook/addon-actions": "8.3.6",
|
||||||
"@storybook/addon-essentials": "8.2.8",
|
"@storybook/addon-essentials": "8.3.6",
|
||||||
"@storybook/addon-interactions": "8.2.8",
|
"@storybook/addon-interactions": "8.3.6",
|
||||||
"@storybook/addon-links": "8.2.8",
|
"@storybook/addon-links": "8.3.6",
|
||||||
"@storybook/addon-mdx-gfm": "8.2.8",
|
"@storybook/addon-mdx-gfm": "8.3.6",
|
||||||
"@storybook/addon-storysource": "8.2.8",
|
"@storybook/addon-storysource": "8.3.6",
|
||||||
"@storybook/blocks": "8.2.8",
|
"@storybook/blocks": "8.3.6",
|
||||||
"@storybook/components": "8.2.8",
|
"@storybook/components": "8.3.6",
|
||||||
"@storybook/core-events": "8.2.8",
|
"@storybook/core-events": "8.3.6",
|
||||||
"@storybook/manager-api": "8.2.8",
|
"@storybook/manager-api": "8.3.6",
|
||||||
"@storybook/preview-api": "8.2.8",
|
"@storybook/preview-api": "8.3.6",
|
||||||
"@storybook/react": "8.2.8",
|
"@storybook/react": "8.3.6",
|
||||||
"@storybook/react-vite": "8.2.8",
|
"@storybook/react-vite": "8.3.6",
|
||||||
"@storybook/test": "8.2.8",
|
"@storybook/test": "8.3.6",
|
||||||
"@storybook/theming": "8.2.8",
|
"@storybook/theming": "8.3.6",
|
||||||
"@storybook/types": "8.2.8",
|
"@storybook/types": "8.3.6",
|
||||||
"@storybook/vue3": "8.2.8",
|
"@storybook/vue3": "8.3.6",
|
||||||
"@storybook/vue3-vite": "8.2.8",
|
"@storybook/vue3-vite": "8.3.6",
|
||||||
"@testing-library/vue": "8.1.0",
|
"@testing-library/vue": "8.1.0",
|
||||||
"@types/canvas-confetti": "^1.6.4",
|
"@types/canvas-confetti": "^1.6.4",
|
||||||
"@types/escape-regexp": "0.0.3",
|
"@types/escape-regexp": "0.0.3",
|
||||||
"@types/estree": "1.0.5",
|
"@types/estree": "1.0.6",
|
||||||
"@types/matter-js": "0.19.7",
|
"@types/matter-js": "0.19.7",
|
||||||
"@types/micromatch": "4.0.9",
|
"@types/micromatch": "4.0.9",
|
||||||
"@types/node": "22.2.0",
|
"@types/node": "22.7.8",
|
||||||
"@types/punycode": "2.1.4",
|
"@types/punycode": "2.1.4",
|
||||||
"@types/sanitize-html": "2.11.0",
|
"@types/sanitize-html": "2.13.0",
|
||||||
"@types/throttle-debounce": "5.0.2",
|
"@types/throttle-debounce": "5.0.2",
|
||||||
"@types/tinycolor2": "1.4.6",
|
"@types/tinycolor2": "1.4.6",
|
||||||
"@types/uuid": "10.0.0",
|
"@types/uuid": "10.0.0",
|
||||||
"@types/ws": "8.5.12",
|
"@types/ws": "8.5.12",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"@vitest/coverage-v8": "0.34.6",
|
"@vitest/coverage-v8": "2.1.3",
|
||||||
"@vue/runtime-core": "3.4.15",
|
"@vue/runtime-core": "3.5.12",
|
||||||
"acorn": "8.12.1",
|
"acorn": "8.13.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "13.13.2",
|
"cypress": "13.15.0",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-import": "2.29.1",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"eslint-plugin-vue": "9.27.0",
|
"eslint-plugin-vue": "9.29.1",
|
||||||
"fast-glob": "3.3.2",
|
"fast-glob": "3.3.2",
|
||||||
"happy-dom": "14.12.3",
|
"happy-dom": "15.7.4",
|
||||||
"intersection-observer": "0.12.2",
|
"intersection-observer": "0.12.2",
|
||||||
"micromatch": "4.0.7",
|
"micromatch": "4.0.8",
|
||||||
"msw": "2.3.5",
|
"msw": "2.5.0",
|
||||||
"msw-storybook-addon": "2.0.3",
|
"msw-storybook-addon": "2.0.3",
|
||||||
"nodemon": "3.1.4",
|
"nodemon": "3.1.7",
|
||||||
"prettier": "3.3.3",
|
"prettier": "3.3.3",
|
||||||
"react": "18.3.1",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.3.1",
|
"react-dom": "18.3.1",
|
||||||
"start-server-and-test": "2.0.5",
|
"start-server-and-test": "2.0.8",
|
||||||
"storybook": "8.2.8",
|
"storybook": "8.3.6",
|
||||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||||
"vite-plugin-turbosnap": "1.0.3",
|
"vite-plugin-turbosnap": "1.0.3",
|
||||||
"vitest": "0.34.6",
|
"vitest": "2.1.3",
|
||||||
"vitest-fetch-mock": "0.2.2",
|
"vitest-fetch-mock": "0.3.0",
|
||||||
"vue-component-type-helpers": "2.0.29",
|
"vue-component-type-helpers": "2.1.6",
|
||||||
"vue-eslint-parser": "9.4.3",
|
"vue-eslint-parser": "9.4.3",
|
||||||
"vue-tsc": "2.0.29"
|
"vue-tsc": "2.1.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,8 +100,8 @@ async function requestRender() {
|
||||||
sitekey: props.sitekey,
|
sitekey: props.sitekey,
|
||||||
theme: defaultStore.state.darkMode ? 'dark' : 'light',
|
theme: defaultStore.state.darkMode ? 'dark' : 'light',
|
||||||
callback: callback,
|
callback: callback,
|
||||||
'expired-callback': callback,
|
'expired-callback': () => callback(undefined),
|
||||||
'error-callback': callback,
|
'error-callback': () => callback(undefined),
|
||||||
});
|
});
|
||||||
} else if (props.provider === 'mcaptcha' && props.instanceUrl && props.sitekey) {
|
} else if (props.provider === 'mcaptcha' && props.instanceUrl && props.sitekey) {
|
||||||
const { default: Widget } = await import('@mcaptcha/vanilla-glue');
|
const { default: Widget } = await import('@mcaptcha/vanilla-glue');
|
||||||
|
|
|
@ -175,7 +175,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<MkButton v-if="reactionTabType" :class="$style.reactionMuteButton" @click="reactionMuteToggle(reactionTabTypeTrimLocal)">
|
<MkButton v-if="reactionTabType" :class="$style.reactionMuteButton" @click="reactionMuteToggle(reactionTabTypeTrimLocal)">
|
||||||
<i :class="!mutedReactions.includes(reactionTabTypeTrimLocal) ? 'ti ti-mood-happy' : 'ti ti-mood-off'"/>
|
<i :class="!mutedReactions.includes(reactionTabTypeTrimLocal) ? 'ti ti-mood-off' : 'ti ti-mood-happy'"/>
|
||||||
{{ !mutedReactions.includes(reactionTabTypeTrimLocal) ? i18n.ts.muteThisReaction : i18n.ts.unmuteThisReaction }}
|
{{ !mutedReactions.includes(reactionTabTypeTrimLocal) ? i18n.ts.muteThisReaction : i18n.ts.unmuteThisReaction }}
|
||||||
</MkButton>
|
</MkButton>
|
||||||
<MkPagination v-if="reactionTabType" :key="reactionTabType" :pagination="reactionsPagination" :disableAutoLoad="true">
|
<MkPagination v-if="reactionTabType" :key="reactionTabType" :pagination="reactionsPagination" :disableAutoLoad="true">
|
||||||
|
|
|
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkPullToRefresh :refresher="() => reload()">
|
<MkPullToRefresh :refresher="() => reload()">
|
||||||
<MkPagination ref="pagingComponent" :pagination="pagination">
|
<MkPagination ref="pagingComponent" :pagination="pagination" :filter="filterMutedNotification">
|
||||||
<template #empty>
|
<template #empty>
|
||||||
<div class="_fullinfo">
|
<div class="_fullinfo">
|
||||||
<img :src="infoImageUrl" class="_ghost"/>
|
<img :src="infoImageUrl" class="_ghost"/>
|
||||||
|
@ -34,6 +34,7 @@ import { i18n } from '@/i18n.js';
|
||||||
import { notificationTypes } from '@/const.js';
|
import { notificationTypes } from '@/const.js';
|
||||||
import { infoImageUrl } from '@/instance.js';
|
import { infoImageUrl } from '@/instance.js';
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
import { filterMutedNotification } from '@/scripts/filter-muted-notification.js';
|
||||||
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
|
|
||||||
|
@ -63,7 +64,7 @@ function onNotification(notification) {
|
||||||
useStream().send('readNotification');
|
useStream().send('readNotification');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isMuted) {
|
if (!isMuted && filterMutedNotification(notification)) {
|
||||||
pagingComponent.value?.prepend(notification);
|
pagingComponent.value?.prepend(notification);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,6 +84,7 @@ const props = withDefaults(defineProps<{
|
||||||
pagination: Paging;
|
pagination: Paging;
|
||||||
disableAutoLoad?: boolean;
|
disableAutoLoad?: boolean;
|
||||||
displayLimit?: number;
|
displayLimit?: number;
|
||||||
|
filter?: (item: MisskeyEntity) => boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
displayLimit: 20,
|
displayLimit: 20,
|
||||||
});
|
});
|
||||||
|
@ -178,6 +179,8 @@ async function init(): Promise<void> {
|
||||||
limit: props.pagination.limit ?? 10,
|
limit: props.pagination.limit ?? 10,
|
||||||
allowPartial: true,
|
allowPartial: true,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
res = res.filter(item => !props.filter || props.filter(item));
|
||||||
|
|
||||||
for (let i = 0; i < res.length; i++) {
|
for (let i = 0; i < res.length; i++) {
|
||||||
const item = res[i];
|
const item = res[i];
|
||||||
if (i === 3) item._shouldInsertAd_ = true;
|
if (i === 3) item._shouldInsertAd_ = true;
|
||||||
|
@ -219,6 +222,8 @@ const fetchMore = async (): Promise<void> => {
|
||||||
untilId: items.value[items.value.length - 1].id,
|
untilId: items.value[items.value.length - 1].id,
|
||||||
}),
|
}),
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
res = res.filter(item => !props.filter || props.filter(item));
|
||||||
|
|
||||||
for (let i = 0; i < res.length; i++) {
|
for (let i = 0; i < res.length; i++) {
|
||||||
const item = res[i];
|
const item = res[i];
|
||||||
if (i === 10) item._shouldInsertAd_ = true;
|
if (i === 10) item._shouldInsertAd_ = true;
|
||||||
|
@ -283,6 +288,8 @@ const fetchMoreAhead = async (): Promise<void> => {
|
||||||
sinceId: items.value[0].id,
|
sinceId: items.value[0].id,
|
||||||
}),
|
}),
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
res = res.filter(item => !props.filter || props.filter(item));
|
||||||
|
|
||||||
if (res.length === 0) {
|
if (res.length === 0) {
|
||||||
items.value = res.concat(items.value);
|
items.value = res.concat(items.value);
|
||||||
more.value = false;
|
more.value = false;
|
||||||
|
|
|
@ -4,7 +4,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<MkCustomEmoji v-if="reaction[0] === ':'" ref="elRef" :name="reaction" :normal="true" :noStyle="noStyle" :url="emojiUrl"/>
|
<MkCustomEmoji v-if="reaction[0] === ':'" ref="elRef" :name="reaction" :normal="true" :noStyle="noStyle" :url="emojiUrl" :fallbackToImage="true"/>
|
||||||
<MkEmoji v-else ref="elRef" :emoji="reaction" :normal="true" :noStyle="noStyle"/>
|
<MkEmoji v-else ref="elRef" :emoji="reaction" :normal="true" :noStyle="noStyle"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ async function done(): Promise<void> {
|
||||||
imageUrl: null,
|
imageUrl: null,
|
||||||
display: display.value,
|
display: display.value,
|
||||||
needConfirmationToRead: needConfirmationToRead.value,
|
needConfirmationToRead: needConfirmationToRead.value,
|
||||||
|
needEnrollmentTutorialToRead: needEnrollmentTutorialToRead.value,
|
||||||
closeDuration: closeDuration.value,
|
closeDuration: closeDuration.value,
|
||||||
displayOrder: displayOrder.value,
|
displayOrder: displayOrder.value,
|
||||||
silence: silence.value,
|
silence: silence.value,
|
||||||
|
|
|
@ -4,7 +4,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<img v-if="errored" src="/client-assets/dummy.png" :alt="alt" :title="alt" decoding="async" :class="[$style.root, { [$style.normal]: normal, [$style.noStyle]: noStyle }]"/>
|
<span v-if="errored && !fallbackToImage">:{{ customEmojiName }}:</span>
|
||||||
|
<img v-else-if="errored" src="/client-assets/dummy.png" :alt="alt" :title="alt" decoding="async" :class="[$style.root, { [$style.normal]: normal, [$style.noStyle]: noStyle }]"/>
|
||||||
<img
|
<img
|
||||||
v-else
|
v-else
|
||||||
:class="[$style.root, { [$style.normal]: normal, [$style.noStyle]: noStyle }]"
|
:class="[$style.root, { [$style.normal]: normal, [$style.noStyle]: noStyle }]"
|
||||||
|
@ -39,6 +40,7 @@ const props = defineProps<{
|
||||||
useOriginalSize?: boolean;
|
useOriginalSize?: boolean;
|
||||||
menu?: boolean;
|
menu?: boolean;
|
||||||
menuReaction?: boolean;
|
menuReaction?: boolean;
|
||||||
|
fallbackToImage?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const react = inject<((name: string) => void) | null>('react', null);
|
const react = inject<((name: string) => void) | null>('react', null);
|
||||||
|
|
16
packages/frontend/src/scripts/filter-muted-notification.ts
Normal file
16
packages/frontend/src/scripts/filter-muted-notification.ts
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
|
export function filterMutedNotification(notification: Misskey.entities.Notification): boolean {
|
||||||
|
switch (notification.type) {
|
||||||
|
case 'reaction':
|
||||||
|
if (defaultStore.state.mutedReactions.includes(notification.reaction.replace('@.', ''))) return false;
|
||||||
|
break;
|
||||||
|
case 'reaction:grouped':
|
||||||
|
notification.reactions = notification.reactions.filter(reaction => !defaultStore.state.mutedReactions.includes(reaction.reaction.replace('@.', '')));
|
||||||
|
if (notification.reactions.length === 0) return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
|
@ -51,6 +51,7 @@ import { swInject } from './sw-inject.js';
|
||||||
import XNotification from './notification.vue';
|
import XNotification from './notification.vue';
|
||||||
import { popups } from '@/os.js';
|
import { popups } from '@/os.js';
|
||||||
import { pendingApiRequestsCount } from '@/scripts/misskey-api.js';
|
import { pendingApiRequestsCount } from '@/scripts/misskey-api.js';
|
||||||
|
import { filterMutedNotification } from '@/scripts/filter-muted-notification.js';
|
||||||
import { uploads } from '@/scripts/upload.js';
|
import { uploads } from '@/scripts/upload.js';
|
||||||
import * as sound from '@/scripts/sound.js';
|
import * as sound from '@/scripts/sound.js';
|
||||||
import { $i } from '@/account.js';
|
import { $i } from '@/account.js';
|
||||||
|
@ -73,6 +74,8 @@ function onNotification(notification: Misskey.entities.Notification, isClient =
|
||||||
useStream().send('readNotification');
|
useStream().send('readNotification');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!filterMutedNotification(notification)) return;
|
||||||
|
|
||||||
notifications.value.unshift(notification);
|
notifications.value.unshift(notification);
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
if (notifications.value.length > 3) notifications.value.pop();
|
if (notifications.value.length > 3) notifications.value.pop();
|
||||||
|
|
|
@ -107,6 +107,11 @@ export function getConfig(): UserConfig {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
preprocessorOptions: {
|
||||||
|
scss: {
|
||||||
|
api: 'modern-compiler',
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
define: {
|
define: {
|
||||||
|
|
|
@ -26,19 +26,19 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/matter-js": "0.19.7",
|
"@types/matter-js": "0.19.7",
|
||||||
"@types/node": "22.2.0",
|
"@types/node": "22.7.8",
|
||||||
"@types/seedrandom": "3.0.8",
|
"@types/seedrandom": "3.0.8",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.1",
|
||||||
"nodemon": "3.1.4",
|
"nodemon": "3.1.7",
|
||||||
"typescript": "5.5.4"
|
"typescript": "5.6.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built"
|
"built"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "0.23.0",
|
"esbuild": "0.24.0",
|
||||||
"eventemitter3": "5.0.1",
|
"eventemitter3": "5.0.1",
|
||||||
"glob": "11.0.0",
|
"glob": "11.0.0",
|
||||||
"matter-js": "0.20.0",
|
"matter-js": "0.20.0",
|
||||||
|
|
|
@ -9,15 +9,15 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "^1.0.0",
|
"@misskey-dev/eslint-plugin": "^1.0.0",
|
||||||
"@readme/openapi-parser": "2.6.0",
|
"@readme/openapi-parser": "2.6.0",
|
||||||
"@types/node": "22.2.0",
|
"@types/node": "22.7.8",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.1",
|
||||||
"openapi-types": "12.1.3",
|
"openapi-types": "12.1.3",
|
||||||
"openapi-typescript": "6.7.6",
|
"openapi-typescript": "6.7.6",
|
||||||
"ts-case-convert": "2.0.7",
|
"ts-case-convert": "2.1.0",
|
||||||
"tsx": "4.17.0",
|
"tsx": "4.19.1",
|
||||||
"typescript": "5.5.4"
|
"typescript": "5.6.3"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"built"
|
"built"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "misskey-js",
|
"name": "misskey-js",
|
||||||
"version": "2024.5.0-oscar.16a`",
|
"version": "2024.5.0-oscar.16a",
|
||||||
"description": "Misskey SDK for JavaScript",
|
"description": "Misskey SDK for JavaScript",
|
||||||
"types": "./built/dts/index.d.ts",
|
"types": "./built/dts/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|
|
@ -58,7 +58,7 @@ export class APIClient {
|
||||||
this.fetch(`${this.origin}/api/${endpoint}`, {
|
this.fetch(`${this.origin}/api/${endpoint}`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
...params,
|
...(params ?? {}),
|
||||||
i: credential !== undefined ? credential : this.credential,
|
i: credential !== undefined ? credential : this.credential,
|
||||||
}),
|
}),
|
||||||
headers: {
|
headers: {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,16 +25,16 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/node": "22.2.0",
|
"@types/node": "22.7.8",
|
||||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.1",
|
||||||
"nodemon": "3.1.4",
|
"nodemon": "3.1.7",
|
||||||
"typescript": "5.5.4"
|
"typescript": "5.6.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"crc-32": "1.2.2",
|
"crc-32": "1.2.2",
|
||||||
"esbuild": "0.23.0",
|
"esbuild": "0.24.0",
|
||||||
"glob": "11.0.0"
|
"glob": "11.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -9,18 +9,18 @@
|
||||||
"lint": "pnpm typecheck && pnpm eslint"
|
"lint": "pnpm typecheck && pnpm eslint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "0.23.0",
|
"esbuild": "0.24.0",
|
||||||
"idb-keyval": "6.2.1",
|
"idb-keyval": "6.2.1",
|
||||||
"misskey-js": "workspace:*"
|
"misskey-js": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@misskey-dev/eslint-plugin": "1.0.0",
|
"@misskey-dev/eslint-plugin": "1.0.0",
|
||||||
"@types/serviceworker": "0.0.92",
|
"@types/serviceworker": "0.0.101",
|
||||||
"@typescript-eslint/parser": "7.10.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"eslint": "8.57.0",
|
"eslint": "8.57.1",
|
||||||
"eslint-plugin-import": "2.29.1",
|
"eslint-plugin-import": "2.31.0",
|
||||||
"nodemon": "3.1.4",
|
"nodemon": "3.1.7",
|
||||||
"typescript": "5.5.4"
|
"typescript": "5.6.3"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|
8112
pnpm-lock.yaml
generated
8112
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@
|
||||||
"mdast-util-to-string": "4.0.0",
|
"mdast-util-to-string": "4.0.0",
|
||||||
"remark": "15.0.1",
|
"remark": "15.0.1",
|
||||||
"remark-parse": "11.0.0",
|
"remark-parse": "11.0.0",
|
||||||
"typescript": "5.3.3",
|
"typescript": "5.6.3",
|
||||||
"unified": "11.0.4",
|
"unified": "11.0.4",
|
||||||
"vite": "5.0.12",
|
"vite": "5.0.12",
|
||||||
"vite-node": "1.1.3",
|
"vite-node": "1.1.3",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue