From 75da7ab484d827203fd87ac57da823b2d1616596 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 28 Mar 2022 13:38:05 +0900 Subject: [PATCH 01/66] Update ROADMAP.md --- ROADMAP.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ROADMAP.md b/ROADMAP.md index c12526bbce..3ccc098d32 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -26,3 +26,11 @@ Once Phase 1 is complete and an environment conducive to the development of a st Once the development of the feature has settled down, this may be an opportunity to make larger modifications. - Rewriting in Rust? + +## (4) Change the world +It is time to promote Misskey and change the world. + +- Become more major than services such as Twitter and become critical infrastructure for the world +- MiOS will be developed and integrated into various systems - What is MiOS? +- Letting Ai-chan interfere with the real world +- Make Misskey a member of GAFA; Misskey's office must be a reinforced concrete brutalist building with a courtyard. From 4e63022a490ea298f7255f498b6ffd25c9f1d669 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 29 Mar 2022 18:46:59 +0900 Subject: [PATCH 02/66] fix(server): add missing import --- .../backend/src/server/api/endpoints/admin/moderators/remove.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts index b85a677e81..a01e9f3c69 100644 --- a/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts +++ b/packages/backend/src/server/api/endpoints/admin/moderators/remove.ts @@ -1,5 +1,6 @@ import define from '../../../define.js'; import { Users } from '@/models/index.js'; +import { publishInternalEvent } from '@/services/stream.js'; export const meta = { tags: ['admin'], From 11ccb98c939d29b1ff382bf6ee4940036979dec0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 1 Apr 2022 19:13:40 +0900 Subject: [PATCH 03/66] update deps --- package.json | 4 +- packages/backend/package.json | 10 +- packages/backend/yarn.lock | 140 +++++++-------- packages/client/package.json | 14 +- packages/client/src/components/media-list.vue | 6 +- packages/client/yarn.lock | 169 ++++++++---------- yarn.lock | 68 +++---- 7 files changed, 200 insertions(+), 211 deletions(-) diff --git a/package.json b/package.json index cc49d1ffa4..41856363c3 100644 --- a/package.json +++ b/package.json @@ -41,9 +41,9 @@ "js-yaml": "4.1.0" }, "devDependencies": { - "@typescript-eslint/parser": "5.16.0", + "@typescript-eslint/parser": "5.17.0", "cross-env": "7.0.3", - "cypress": "9.5.2", + "cypress": "9.5.3", "start-server-and-test": "1.14.0", "typescript": "4.6.3" } diff --git a/packages/backend/package.json b/packages/backend/package.json index 91c099e9f2..d6490f1cb6 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -65,15 +65,15 @@ "@types/web-push": "3.3.2", "@types/websocket": "1.0.5", "@types/ws": "8.5.3", - "@typescript-eslint/eslint-plugin": "5.16.0", - "@typescript-eslint/parser": "5.16.0", - "@bull-board/koa": "3.10.1", + "@typescript-eslint/eslint-plugin": "5.17.0", + "@typescript-eslint/parser": "5.17.0", + "@bull-board/koa": "3.10.2", "abort-controller": "3.0.0", "ajv": "8.11.0", "archiver": "5.3.0", "autobind-decorator": "2.4.0", "autwh": "0.1.0", - "aws-sdk": "2.1100.0", + "aws-sdk": "2.1105.0", "bcryptjs": "2.4.3", "blurhash": "1.1.5", "broadcast-channel": "4.10.0", @@ -173,7 +173,7 @@ "xev": "2.0.1" }, "devDependencies": { - "@redocly/openapi-core": "1.0.0-beta.90", + "@redocly/openapi-core": "1.0.0-beta.91", "@types/fluent-ffmpeg": "2.1.20", "cross-env": "7.0.3", "execa": "6.1.0" diff --git a/packages/backend/yarn.lock b/packages/backend/yarn.lock index 3d5d38d695..970a3f8b5c 100644 --- a/packages/backend/yarn.lock +++ b/packages/backend/yarn.lock @@ -35,20 +35,20 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@bull-board/api@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@bull-board/api/-/api-3.10.1.tgz#c9608d501c887abcfa8f1907bc3dedee179bdea3" - integrity sha512-ZYjNBdoBQu+UVbLAHQuEhJL96C+i7vYioc2n7FL/XoVea44XIw2WiKFcFxq0LnActPErja26QyZBQht23ph1lg== +"@bull-board/api@3.10.2": + version "3.10.2" + resolved "https://registry.yarnpkg.com/@bull-board/api/-/api-3.10.2.tgz#382450b703c671bb64eeb4d76f139b5e172d1fde" + integrity sha512-jufgsRvAZpUoq/IbmNhwRPQKav6oFUTMjgq0Z200cvNgyFkVDexPhNKNrXdhxaKhBOass4CWvgyQQntDlvCaoQ== dependencies: redis-info "^3.0.8" -"@bull-board/koa@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@bull-board/koa/-/koa-3.10.1.tgz#205641ae9721ec71303c4f16dc27eca1f71ca131" - integrity sha512-+mxdnu7idjd75WqUklJbPzrQU6NJzgQCT+BLKCyqOBsWzpfEwaac6QaIXOiuPwgwG2VjH90HWIcWr+2BQB9c1w== +"@bull-board/koa@3.10.2": + version "3.10.2" + resolved "https://registry.yarnpkg.com/@bull-board/koa/-/koa-3.10.2.tgz#b50049355913eb049471169faec278d30bb44559" + integrity sha512-SJu+yoE/823sjif003X7030Cj8FmbQ+shUN3LPcUlQ9+0tIQ6ao0+FifJ4uhFnp1CN6FWpn+DCAf4vlC771PNQ== dependencies: - "@bull-board/api" "3.10.1" - "@bull-board/ui" "3.10.1" + "@bull-board/api" "3.10.2" + "@bull-board/ui" "3.10.2" ejs "^3.1.6" koa "^2.13.1" koa-mount "^4.0.0" @@ -56,12 +56,12 @@ koa-static "^5.0.0" koa-views "^7.0.1" -"@bull-board/ui@3.10.1": - version "3.10.1" - resolved "https://registry.yarnpkg.com/@bull-board/ui/-/ui-3.10.1.tgz#edf7c7752a78d9829f7a944bb87a0e70812b749f" - integrity sha512-K2qEAvTuyHZxUdK31HaBb9sdTFSOSKAZkxsl/LeiT4FGNF/h54iYGmWF9+HSFytggcnGdM0XnK3wLihCaIQAOQ== +"@bull-board/ui@3.10.2": + version "3.10.2" + resolved "https://registry.yarnpkg.com/@bull-board/ui/-/ui-3.10.2.tgz#ab6400b1cbd459604b9e8afeaef9e3cc235d1dd9" + integrity sha512-XFFbnJjZZDoMxntNdmgJoyTlEvMcCfNqeC/QPiqTJU0X/k0cxWDx36tw83PKjN+lKxPjzN/WNpTebYZPKV78Yg== dependencies: - "@bull-board/api" "3.10.1" + "@bull-board/api" "3.10.2" "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" @@ -244,10 +244,10 @@ require-from-string "^2.0.2" uri-js "^4.2.2" -"@redocly/openapi-core@1.0.0-beta.90": - version "1.0.0-beta.90" - resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.90.tgz#edf53b23314368e190b005e1958c1f4a7dfaa2c3" - integrity sha512-MvkME+AWCBexyJyNp/sVFRUBjxCSk5CQ+CAozkwm0t/HusXp9G+kH26+e9giD6Fms129smr1qp3pCAUbwJZzZA== +"@redocly/openapi-core@1.0.0-beta.91": + version "1.0.0-beta.91" + resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.91.tgz#58dbd8c3cad9ef82f2437c6bbeb6a14dd1bc537d" + integrity sha512-8RhZGn5jSoy3oZE0sAdXxhPPHrqKgy2JVJzLqjgX9LDjNf7cXOTYOXkXIkjv1tfZHFBV/H7c08rRLEdxnzn0dg== dependencies: "@redocly/ajv" "^8.6.4" "@types/node" "^14.11.8" @@ -850,14 +850,14 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz#78f246dd8d1b528fc5bfca99a8a64d4023a3d86d" - integrity sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw== +"@typescript-eslint/eslint-plugin@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz#704eb4e75039000531255672bf1c85ee85cf1d67" + integrity sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ== dependencies: - "@typescript-eslint/scope-manager" "5.16.0" - "@typescript-eslint/type-utils" "5.16.0" - "@typescript-eslint/utils" "5.16.0" + "@typescript-eslint/scope-manager" "5.17.0" + "@typescript-eslint/type-utils" "5.17.0" + "@typescript-eslint/utils" "5.17.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -865,69 +865,69 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/parser@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.16.0.tgz#e4de1bde4b4dad5b6124d3da227347616ed55508" - integrity sha512-fkDq86F0zl8FicnJtdXakFs4lnuebH6ZADDw6CYQv0UZeIjHvmEw87m9/29nk2Dv5Lmdp0zQ3zDQhiMWQf/GbA== +"@typescript-eslint/parser@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.17.0.tgz#7def77d5bcd8458d12d52909118cf3f0a45f89d5" + integrity sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig== dependencies: - "@typescript-eslint/scope-manager" "5.16.0" - "@typescript-eslint/types" "5.16.0" - "@typescript-eslint/typescript-estree" "5.16.0" + "@typescript-eslint/scope-manager" "5.17.0" + "@typescript-eslint/types" "5.17.0" + "@typescript-eslint/typescript-estree" "5.17.0" debug "^4.3.2" -"@typescript-eslint/scope-manager@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz#7e7909d64bd0c4d8aef629cdc764b9d3e1d3a69a" - integrity sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ== +"@typescript-eslint/scope-manager@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz#4cea7d0e0bc0e79eb60cad431c89120987c3f952" + integrity sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w== dependencies: - "@typescript-eslint/types" "5.16.0" - "@typescript-eslint/visitor-keys" "5.16.0" + "@typescript-eslint/types" "5.17.0" + "@typescript-eslint/visitor-keys" "5.17.0" -"@typescript-eslint/type-utils@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz#b482bdde1d7d7c0c7080f7f2f67ea9580b9e0692" - integrity sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ== +"@typescript-eslint/type-utils@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz#1c4549d68c89877662224aabb29fbbebf5fc9672" + integrity sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg== dependencies: - "@typescript-eslint/utils" "5.16.0" + "@typescript-eslint/utils" "5.17.0" debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.16.0.tgz#5827b011982950ed350f075eaecb7f47d3c643ee" - integrity sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g== +"@typescript-eslint/types@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f" + integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw== -"@typescript-eslint/typescript-estree@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz#32259459ec62f5feddca66adc695342f30101f61" - integrity sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ== +"@typescript-eslint/typescript-estree@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488" + integrity sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg== dependencies: - "@typescript-eslint/types" "5.16.0" - "@typescript-eslint/visitor-keys" "5.16.0" + "@typescript-eslint/types" "5.17.0" + "@typescript-eslint/visitor-keys" "5.17.0" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.16.0.tgz#42218b459d6d66418a4eb199a382bdc261650679" - integrity sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ== +"@typescript-eslint/utils@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.17.0.tgz#549a9e1d491c6ccd3624bc3c1b098f5cfb45f306" + integrity sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.16.0" - "@typescript-eslint/types" "5.16.0" - "@typescript-eslint/typescript-estree" "5.16.0" + "@typescript-eslint/scope-manager" "5.17.0" + "@typescript-eslint/types" "5.17.0" + "@typescript-eslint/typescript-estree" "5.17.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.16.0": - version "5.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz#f27dc3b943e6317264c7492e390c6844cd4efbbb" - integrity sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g== +"@typescript-eslint/visitor-keys@5.17.0": + version "5.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz#52daae45c61b0211b4c81b53a71841911e479128" + integrity sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA== dependencies: - "@typescript-eslint/types" "5.16.0" + "@typescript-eslint/types" "5.17.0" eslint-visitor-keys "^3.0.0" "@ungap/promise-all-settled@1.1.2": @@ -1271,10 +1271,10 @@ autwh@0.1.0: dependencies: oauth "0.9.15" -aws-sdk@2.1100.0: - version "2.1100.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1100.0.tgz#20bbabc12fbc316067ba02af66bf371a455af9e3" - integrity sha512-StLSQCYFmFPxjoMntIb+8jUZ0vzmq3xkrwG5e/4qU1bSGWCmhhjvz6c+4j38AnIy8MFV1+tV8RArbhLUEV2dGw== +aws-sdk@2.1105.0: + version "2.1105.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1105.0.tgz#3e63129f2aca254f1d6d5a1580b988bb786e98fa" + integrity sha512-YZ6IbKvtiw8noD/Iuyp3hXNX5NmhJ2xSU4598pZr55CfnIQ0oU5ZwtQqLPG8E07ouA363/moCYddIAVGYSkQ+A== dependencies: buffer "4.9.2" events "1.1.1" diff --git a/packages/client/package.json b/packages/client/package.json index 6551b6aca0..c6b0363adb 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -34,7 +34,7 @@ "@types/webpack-stream": "3.2.12", "@types/websocket": "1.0.5", "@types/ws": "8.5.3", - "@typescript-eslint/parser": "5.16.0", + "@typescript-eslint/parser": "5.17.0", "@vue/compiler-sfc": "3.2.31", "abort-controller": "3.0.0", "autobind-decorator": "2.4.0", @@ -49,10 +49,10 @@ "compare-versions": "4.1.3", "content-disposition": "0.5.4", "css-loader": "6.7.1", - "cssnano": "5.1.5", + "cssnano": "5.1.6", "date-fns": "2.28.0", "escape-regexp": "0.0.1", - "eslint": "8.11.0", + "eslint": "8.12.0", "eslint-plugin-vue": "8.5.0", "eventemitter3": "4.0.7", "feed": "4.2.2", @@ -70,7 +70,7 @@ "ms": "2.1.3", "nested-property": "4.0.0", "parse5": "6.0.1", - "photoswipe": "git+https://github.com/dimsemenov/photoswipe#v5-beta", + "photoswipe": "5.2.2", "portscanner": "2.2.0", "postcss": "8.4.12", "postcss-loader": "6.2.1", @@ -85,7 +85,7 @@ "reflect-metadata": "0.1.13", "rndstr": "1.0.0", "s-age": "1.1.2", - "sass": "1.49.9", + "sass": "1.49.10", "sass-loader": "12.6.0", "seedrandom": "3.0.5", "strict-event-emitter-types": "2.0.0", @@ -117,9 +117,9 @@ "ws": "8.5.0" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "5.16.0", + "@typescript-eslint/eslint-plugin": "5.17.0", "cross-env": "7.0.3", - "cypress": "9.5.2", + "cypress": "9.5.3", "eslint-plugin-import": "2.25.4", "start-server-and-test": "1.14.0" } diff --git a/packages/client/src/components/media-list.vue b/packages/client/src/components/media-list.vue index 532627edbd..7e330575e1 100644 --- a/packages/client/src/components/media-list.vue +++ b/packages/client/src/components/media-list.vue @@ -15,9 +15,9 @@ diff --git a/packages/client/src/pages/settings/webhook.new.vue b/packages/client/src/pages/settings/webhook.new.vue new file mode 100644 index 0000000000..9bb492c49e --- /dev/null +++ b/packages/client/src/pages/settings/webhook.new.vue @@ -0,0 +1,81 @@ + + + diff --git a/packages/client/src/pages/settings/webhook.vue b/packages/client/src/pages/settings/webhook.vue new file mode 100644 index 0000000000..c9af8b6766 --- /dev/null +++ b/packages/client/src/pages/settings/webhook.vue @@ -0,0 +1,52 @@ + + + From 4fdfbfd5c45846dbd894fb715c55793ee553757f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2022 15:29:24 +0900 Subject: [PATCH 11/66] New Crowdin updates (#8409) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Dutch) * New translations ja-JP.yml (Dutch) * New translations ja-JP.yml (Dutch) * New translations ja-JP.yml (Dutch) * New translations ja-JP.yml (Dutch) * New translations ja-JP.yml (Dutch) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (French) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Slovak) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (German) * New translations ja-JP.yml (English) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Slovak) * New translations ja-JP.yml (Chinese Simplified) * New translations ja-JP.yml (Indonesian) * New translations ja-JP.yml (Indonesian) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Portuguese) * New translations ja-JP.yml (Portuguese) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) --- locales/ar-SA.yml | 42 ++++++++++++++++++++++++++++++++++++-- locales/de-DE.yml | 8 +++++--- locales/en-US.yml | 4 +++- locales/eo-UY.yml | 51 +++++++++++++++++++++++++++++------------------ locales/fr-FR.yml | 2 +- locales/id-ID.yml | 15 ++++++++++++++ locales/nl-NL.yml | 46 ++++++++++++++++++++++++++++++++++++++++++ locales/pt-PT.yml | 6 ++++++ locales/ro-RO.yml | 51 +++++++++++++++++++++++++++++++++++++++++++++++ locales/sk-SK.yml | 2 ++ locales/zh-CN.yml | 28 ++++++++++++++------------ 11 files changed, 216 insertions(+), 39 deletions(-) diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml index def791f9d4..69d9327837 100644 --- a/locales/ar-SA.yml +++ b/locales/ar-SA.yml @@ -189,7 +189,7 @@ clearCachedFiles: "امسح التخزين المؤقت" clearCachedFilesConfirm: "أتريد حذف التخزين المؤقت للملفات البعيدة؟" blockedInstances: "المثلاء المحجوبون" blockedInstancesDescription: "قائمة بالمثلاء التي تريد حظرها بحيث كل نطاق في سطر لوحده. بعد إدراجهم لن يتمكنوا من التفاعل مع هذا المثيل." -muteAndBlock: "تم كتمها / تم حجبها" +muteAndBlock: "المكتومون والمحجوبون" mutedUsers: "الحسابات المكتومة" blockedUsers: "الحسابات المحجوبة" noUsers: "ليس هناك مستخدمون" @@ -490,7 +490,7 @@ none: "لا شيء" showInPage: "اعرض في الصفحة" popout: "منبثقة" volume: "مستوى الصوت" -masterVolume: "القرص الرئيسي" +masterVolume: "حجم الصوت الرئيس" details: "التفاصيل" chooseEmoji: "اختر إيموجي" unableToProcess: "يتعذر إكمال العملية" @@ -521,6 +521,7 @@ divider: "فاصل" addItem: "إضافة عنصر" relays: "المُرَحلات" addRelay: "إضافة مُرحّل" +inboxUrl: "رابط صندوق الوارد" addedRelays: "المرحلات المضافة" serviceworkerInfo: "يجب أن يفعل لإرسال الإشعارات." deletedNote: "ملاحظة محذوفة" @@ -533,6 +534,8 @@ enablePlayer: "افتح مشغل الفيديو" disablePlayer: "أغلق مشغل الفيديو" themeEditor: "مصمم القوالب" description: "الوصف" +describeFile: "أضف تعليقًا توضيحيًا" +enterFileDescription: "أدخل تعليقًا توضيحيًا" author: "الكاتب" leaveConfirm: "لديك تغييرات غير محفوظة. أتريد المتابعة دون حفظها؟" manage: "إدارة " @@ -564,6 +567,9 @@ smtpPass: "الكلمة السرية" emptyToDisableSmtpAuth: "اترك اسم المستخدم وكلمة المرور فارغين لتعطيل التحقق من SMTP" smtpSecureInfo: "عطل هذا الخيار عند استخدام STARTTLS" wordMute: "حظر الكلمات" +regexpError: "خطأ في التعبير النمطي" +instanceMute: "المثلاء المكتومون" +userSaysSomething: "كتب {name} شيءً" makeActive: "تفعيل" display: "المظهر" copy: "نسخ" @@ -590,10 +596,16 @@ reportAbuse: "أبلغ" reportAbuseOf: "أبلغ عن {name}" fillAbuseReportDescription: "أكتب بالتفصيل سبب البلاغ، إذا كنت تبلغ عن ملاحظة أرفق رابط لها." abuseReported: "أُرسل البلاغ، شكرًا لك" +reporter: "المُبلّغ" +reporteeOrigin: "أصل البلاغ" +reporterOrigin: "أصل المُبلّغ" +forwardReport: "وجّه البلاغ إلى المثيل البعيد" +forwardReportIsAnonymous: "في المثيل البعيد سيظهر المبلّغ كحساب مجهول." send: "أرسل" abuseMarkAsResolved: "علّم البلاغ كمحلول" openInNewTab: "افتح في لسان جديد" defaultNavigationBehaviour: "سلوك الملاحة الافتراضي" +editTheseSettingsMayBreakAccount: "تعديل هذه الإعدادات قد يسبب عطبًا لحسابك" instanceTicker: "معلومات المثيل الأصلي للملاحظات" waitingFor: "في انتظار {x}" random: "عشوائي" @@ -624,10 +636,15 @@ no: "لا" driveFilesCount: "عدد الملفات في قرص التخزين" driveUsage: "المستغل من قرص التخزين" noCrawleDescription: "يطلب من محركات البحث ألّا يُفهرسوا ملفك الشخصي وملاحظات وصفحاتك وما شابه." +alwaysMarkSensitive: "علّم افتراضيًا جميع ملاحظاتي كذات محتوى حساس" +loadRawImages: "حمّل الصور الأصلية بدلًا من المصغرات" disableShowingAnimatedImages: "لا تشغّل الصور المتحركة" +verificationEmailSent: "أُرسل بريد التحقق. أنقر على الرابط المضمن لإكمال التحقق." notSet: "لم يعيّن" emailVerified: "تُحقّق من بريدك الإلكتروني" noteFavoritesCount: "عدد الملاحظات المفضلة" +pageLikesCount: "عدد الصفحات التي أعجبت بها" +pageLikedCount: "عدد صفحاتك المُعجب بها" contact: "التواصل" useSystemFont: "استخدم الخط الافتراضية للنظام" clips: "مشابك" @@ -635,6 +652,7 @@ experimentalFeatures: "ميّزات اختبارية" developer: "المطور" makeExplorable: "أظهر الحساب في صفحة \"استكشاف\"" makeExplorableDescription: "بتعطيل هذا الخيار لن يظهر حسابك في صفحة \"استكشاف\"" +showGapBetweenNotesInTimeline: "أظهر فجوات بين المشاركات في الخيط الزمني" wide: "عريض" narrow: "رفيع" reloadToApplySetting: "سيُطبق هذا الإعداد بعد إعادة تحميل الصفحة، أتريد إعادة تحميلها الآن؟" @@ -782,6 +800,7 @@ tenMinutes: "10 دقائق" oneHour: "ساعة" oneDay: "يوم" oneWeek: "أسبوع" +failedToFetchAccountInformation: "تعذر جلب معلومات الحساب" _emailUnavailable: used: "هذا البريد الإلكتروني مستخدم" format: "صيغة البريد الإلكتروني غير صالحة" @@ -860,6 +879,7 @@ _mfm: centerDescription: "يمركز المحتوى في الوَسَط." quote: "اقتبس" emoji: "إيموجي مخصص" + emojiDescription: "إحاطة اسم الإيموجي بنقطتي تفسير سيستبدله بصورة الإيموجي." search: "البحث" flip: "اقلب" flipDescription: "يقلب المحتوى عموديًا أو أفقيًا" @@ -871,15 +891,27 @@ _mfm: jumpDescription: "يمنح للمحتوى حركة قفز." bounce: "تأثير (ارتداد)" bounceDescription: "يمنح للمحتوى حركة ارتدادية" + shake: "تأثير (اهتزاز)" + shakeDescription: "يمنح المحتوى حركة اهتزازية." + spin: "تأثير (دوران)" + spinDescription: "يمنح المحتوى حركة دورانية." x2: "كبير" + x2Description: "يُكبر المحتوى" x3: "كبير جداً" + x3Description: "يُضخم المحتوى" + x4: "هائل" + x4Description: "يُضخم المحتوى أكثر مما سبق." blur: "طمس" + blurDescription: "يطمس المحتوى، لكن بالتمرير فوقه سيظهر بوضوح." font: "الخط" + fontDescription: "الخط المستخدم لعرض المحتوى." rainbow: "قوس قزح" rainbowDescription: "اجعل المحتوى يظهر بألوان الطيف" rotate: "تدوير" _instanceTicker: + none: "لا تظهره بتاتًا" remote: "أظهر للمستخدمين البِعاد" + always: "أظهره دائمًا" _serverDisconnectedBehavior: reload: "إعادة تحميل تلقائية" dialog: "أظهر مربع حوار التحذيرات" @@ -899,12 +931,18 @@ _menuDisplay: hide: "إخفاء" _wordMute: muteWords: "الكلمات المحظورة" + muteWordsDescription: "افصل بينهم بمسافة لاستخدام معامل \"و\" أو بسطر لاستخدام معامل \"أو\"." muteWordsDescription2: "احصر الكلمات المفتاحية بين بين شرطتين مائلتين لاستخدامها كتعابير نمطية" softDescription: "اخف الملاحظات التي تستوف الشروط من الخيط الزمني." hardDescription: "اخف الملاحظات التي تستوف الشروط من الخيط الزمني.بالإضافة إلى أن هذه الملاحظات ستبقى مخفية حتى وإن تغيرت الشروط." soft: "لينة" hard: "قاسية" mutedNotes: "الملاحظات المكتومة" +_instanceMute: + instanceMuteDescription: "هذه سيحجب كل ملاحظات الخوادم المحجوبة ومشاركاتها والردود على تلك الملاحظات حتى وإن كانت من خادم غير محجوب." + instanceMuteDescription2: "مدخلة لكل سطر" + title: "يخفي ملاحظات الخوادم المسرودة." + heading: "قائمة الخوادم المحجوبة" _theme: explore: "استكشف قوالب المظهر" install: "تنصيب قالب" diff --git a/locales/de-DE.yml b/locales/de-DE.yml index e70249da16..1f558787ab 100644 --- a/locales/de-DE.yml +++ b/locales/de-DE.yml @@ -478,8 +478,8 @@ promote: "Werbung schalten" numberOfDays: "Anzahl der Tage" hideThisNote: "Diese Notiz verstecken" showFeaturedNotesInTimeline: "Beliebte Notizen in der Chronik anzeigen" -objectStorage: "Objektspeicher" -useObjectStorage: "Objektspeicher verwenden" +objectStorage: "Object Storage" +useObjectStorage: "Object Storage verwenden" objectStorageBaseUrl: "Basis-URL" objectStorageBaseUrlDesc: "Die als Referenz verwendete URL. Verwendest du einen CDN oder Proxy, gib dessen URL an. Für S3 verwende 'https://.s3.amazonaws.com'. Für GCS o.ä. verwende 'https://storage.googleapis.com/'." objectStorageBucket: "Bucket" @@ -827,7 +827,7 @@ overridedDeviceKind: "Gerätetyp" smartphone: "Smartphone" tablet: "Tablet" auto: "Automatisch" -themeColor: "Instanzfarbe" +themeColor: "Farbe der Instanz-Information" size: "Größe" numberOfColumn: "Spaltenanzahl" searchByGoogle: "Googlen" @@ -840,6 +840,8 @@ tenMinutes: "10 Minuten" oneHour: "Eine Stunde" oneDay: "Einen Tag" oneWeek: "Eine Woche" +reflectMayTakeTime: "Es kann etwas dauern, bis sich dies widerspiegelt." +failedToFetchAccountInformation: "Benutzerkontoinformationen konnten nicht abgefragt werden" _emailUnavailable: used: "Diese Email-Adresse wird bereits verwendet" format: "Das Format dieser Email-Adresse ist ungültig" diff --git a/locales/en-US.yml b/locales/en-US.yml index 5ec97f05f5..99fe05375b 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -827,7 +827,7 @@ overridedDeviceKind: "Device type" smartphone: "Smartphone" tablet: "Tablet" auto: "Auto" -themeColor: "Theme Color" +themeColor: "Instance Ticker Color" size: "Size" numberOfColumn: "Number of columns" searchByGoogle: "Google" @@ -840,6 +840,8 @@ tenMinutes: "10 minutes" oneHour: "One hour" oneDay: "One day" oneWeek: "One week" +reflectMayTakeTime: "It may take some time for this to be reflected." +failedToFetchAccountInformation: "Could not fetch account information" _emailUnavailable: used: "This email address is already being used" format: "The format of this email address is invalid" diff --git a/locales/eo-UY.yml b/locales/eo-UY.yml index 934ffd2d43..72d81b4ac1 100644 --- a/locales/eo-UY.yml +++ b/locales/eo-UY.yml @@ -7,7 +7,7 @@ search: "Serĉi" notifications: "Sciigoj" username: "Uzantnomo" password: "Pasvorto" -forgotPassword: "Ĉu vi forgesis pasvorton?" +forgotPassword: "Ĉu vi forgesis vian pasvorton?" fetchingAsApObject: "Informpetado de la Fediverso…" ok: "Okej" gotIt: "Kompreni" @@ -71,7 +71,7 @@ lists: "Listoj" noLists: "Neniu listo" note: "Noti" notes: "Notoj" -following: "Sekvatoj" +following: "Sekvi" followers: "Sekvantoj" followsYou: "Sekvas vin" createList: "Krei liston" @@ -138,7 +138,7 @@ cacheRemoteFiles: "Stapli forajn dosierojn" flagAsBot: "Marki kiel esti uzanto de roboto" flagAsCat: "Marki kiel esti kato" flagAsCatDescription: "Flagu por montri ke la konton havas kato." -flagShowTimelineReplies: "Montri respondon de notoj en templinio." +flagShowTimelineReplies: "Montri la respondojn en la templinio" autoAcceptFollowed: "Aŭtomate akcepti la peton de sekvado far uzantoj kiujn vi sekvas" addAccount: "Aldoni konton" loginFailed: "Saluto malsukcesis" @@ -239,7 +239,7 @@ agreeTo: "Mi akceptas {0}" tos: "Kondiĉoj de uzado" start: "Komenciĝi" home: "Hejma" -remoteUserCaution: "Pro fora uzanto, la infomoj ne estas tuto." +remoteUserCaution: "La informoj eblas nekompletaj ĉar estas fora uzanto." activity: "Aktiveco" images: "Bildoj" birthday: "Naskiĝdato" @@ -412,7 +412,7 @@ usernameInvalidFormat: "La uzantnomo povas enhavi minusklajn kaj majusklajn lite tooShort: "Tro mallonga" tooLong: "Tro longa" weakPassword: "Malforta pasvorto" -normalPassword: "Normala pasvorto" +normalPassword: "Meza pasvorto" strongPassword: "Forta pasvorto" passwordMatched: "Konforma" passwordNotMatched: "Nekonforma" @@ -493,11 +493,11 @@ deletedNote: "Forviŝita noto" invisibleNote: "Malpublikigita noto" enableInfiniteScroll: "Ebligi infinitan rulumon" visibility: "Videbleco" -poll: "Enketo" +poll: "Balot-enketo" useCw: "Kaŝi enhavo" enablePlayer: "Vidigi la filmeton" disablePlayer: "Malfermi la filmeton" -expandTweet: "Disvolvi pepon" +expandTweet: "Disvolvi la pepon" themeEditor: "Redaktilo de koloraroj" description: "Priskribo" describeFile: "Priskribi la bildon" @@ -506,7 +506,7 @@ author: "Aŭtoro" manage: "Bonteni" plugins: "Kromaĵoj" deck: "Kartaro" -useFullReactionPicker: "Uzi la tuton de la elektilon de reagoj" +useFullReactionPicker: "Uzi la tuton de la elektilo de reagoj" width: "Larĝeco" height: "Alteco" large: "Granda" @@ -530,6 +530,7 @@ smtpPort: "Pordo" smtpUser: "Uzantnomo" smtpPass: "Pasvorto" wordMute: "Silentigi specifajn vortojn" +instanceMute: "Nodoj silentigitaj" userSaysSomething: "{name} diras ion" makeActive: "Aktivigi" display: "Vidi" @@ -548,7 +549,11 @@ regenerateLoginToken: "Regeneri la aŭtentikigan pecon" fileIdOrUrl: "Dosiera identigilo aŭ URL" behavior: "Konduto" sample: "Ekzemplo" +abuseReports: "Raportoj" +reportAbuse: "Raportoj" +reportAbuseOf: "raporti {name}n" reporter: "Informanto" +reporterOrigin: "Raportanto" send: "Sendi" openInNewTab: "Malfermi en nova langeto" editTheseSettingsMayBreakAccount: "Redakti tiujn agordojn povas damaĝi vian konton." @@ -634,6 +639,7 @@ offline: "Forkonektita" notRecommended: "Evitindaj" instanceBlocking: "Bloki specifajn nodojn" selectAccount: "Elekti konton" +switchAccount: "Ŝanĝi konton" user: "Uzantoj" administration: "Bontenado" accounts: "Kontoj" @@ -644,6 +650,7 @@ shareWithNote: "Kundividi en noto" ads: "Reklamaĵo" expiration: "Limtempo" memo: "Memorigilo" +priority: "Prioritato" high: "Alta" middle: "Meza" low: "Malalta" @@ -677,6 +684,7 @@ unmuteThread: "Malsilentigi la mesaĝaron" ffVisibility: "Videbleco de viaj sekvatoj/sekvantoj" ffVisibilityDescription: "Oni permesas agordi tiuln kiuj povas vidi la homojn kiujn vi sekvas, kaj la homojn kiuj sekvas vin." continueThread: "Pli vidi la mesaĝaron" +deleteAccountConfirm: "La konto estos forviŝita. Ĉu vi daŭrigas fari?" incorrectPassword: "Nevalida pasvorto" voteConfirm: "Ĉu vi voĉdonas {choice}n?" hide: "Kaŝi" @@ -684,14 +692,19 @@ leaveGroup: "Eliĝi el la grupo" leaveGroupConfirm: "Ĉu vi certas ke vi volas eliĝi el la grupo {name}?" welcomeBackWithName: "Bonrevenon, {name}!" clickToFinishEmailVerification: "Volu klaki [{ok}] por fini konfirmon de via retadreso." +overridedDeviceKind: "tipo de aparato" smartphone: "Saĝtelefono" tablet: "Platkomputilo" auto: "Aŭtomate" +size: "Grandeco" searchByGoogle: "Serĉi en Google-Serĉo" -tenMinutes: "10 minutoj" -oneHour: "1 horo" -oneDay: "1 tago" -oneWeek: "1 semajno" +mutePeriod: "Daŭro de silentigo" +indefinitely: "Sen limdato" +tenMinutes: "Je 10 minutoj" +oneHour: "Je 1 horo" +oneDay: "Je 1 tago" +oneWeek: "Je 1 semajno" +failedToFetchAccountInformation: "Malsukcesas akiri informon de konto" _emailUnavailable: used: "La retpoŝto jam estas uzita." format: "Nevalida formato." @@ -834,7 +847,6 @@ _ago: _time: second: "sek" minute: "min" - hour: "hor" day: "Tago" _tutorial: title: "Uzado de Misskey" @@ -893,16 +905,15 @@ _cw: chars: "{count} literoj" files: "{count} dosiero(j)" _poll: - choiceN: "Ebla voĉdono {n}" + choiceN: "Balotilo {n}" noMore: "Oni ne povas aldoni pli" canMultipleVote: "Permesi plurelekton" expiration: "Limtempo" - deadlineTime: "hor" - duration: "Daŭro" + infinite: "Por ĉiam" votesCount: "{n} voĉoj" totalVotes: "Sume {n} voĉoj" vote: "Voĉdoni" - showResult: "Vidi la rezultojn" + showResult: "Vidi rezultojn" voted: "Voĉdonita" closed: "Finita" _visibility: @@ -923,7 +934,7 @@ _postForm: _placeholders: a: "Kiel vi fartas?" b: "Kio okazis ĉirkaŭ vi?" - c: "Kio estas sur via penso?" + c: "Kion vi pensas?" d: "Kion vi volas diri?" e: "Komencu skribi tie" _profile: @@ -1115,6 +1126,7 @@ _notification: youReceivedFollowRequest: "Vi ricevis peton de sekvado" yourFollowRequestAccepted: "Via peto de sekvado estis akceptita." youWereInvitedToGroup: "Invitita al grupo" + pollEnded: "La rezulto de la balot-enketo estas disponebla" _types: all: "Ĉio" follow: "Novaj sekvantoj" @@ -1123,7 +1135,8 @@ _notification: renote: "Plusendoj" quote: "Citi" reaction: "Reagoj" - pollVote: "Voĉdonoj en balotoj" + pollVote: "Voĉdonoj en balot-enketo" + pollEnded: "Enketo finiĝis" receiveFollowRequest: "Ricevi peton de sekvado" followRequestAccepted: "Akceptita peto de sekvado" groupInvited: "Invitita al grupo" diff --git a/locales/fr-FR.yml b/locales/fr-FR.yml index 5ccf1b2b6e..1fe74fa9ab 100644 --- a/locales/fr-FR.yml +++ b/locales/fr-FR.yml @@ -1216,7 +1216,7 @@ _poll: votesCount: "{n} votes" totalVotes: "{n} votes au total" vote: "Voter" - showResult: "Voir les résultats" + showResult: "Voir résultats" voted: "Déjà voté" closed: "Terminé" remainingDays: "{d} jours, {h} heures restantes" diff --git a/locales/id-ID.yml b/locales/id-ID.yml index cf89158676..11dff184cd 100644 --- a/locales/id-ID.yml +++ b/locales/id-ID.yml @@ -592,6 +592,7 @@ smtpSecure: "Gunakan SSL/TLS implisit untuk koneksi SMTP" smtpSecureInfo: "Matikan ini ketika menggunakan STARTTLS" testEmail: "Tes pengiriman surel" wordMute: "Bisukan kata" +regexpError: "Kesalahan ekspresi reguler" instanceMute: "Bisuka instansi" userSaysSomething: "{name} mengatakan sesuatu" makeActive: "Aktifkan" @@ -825,8 +826,20 @@ overridedDeviceKind: "Tipe perangkat" smartphone: "Ponsel" tablet: "Tablet" auto: "Otomatis" +themeColor: "Warna Tema" +size: "Ukuran" +numberOfColumn: "Jumlah per kolom" searchByGoogle: "Penelusuran" +instanceDefaultLightTheme: "Bawaan instan tema terang" +instanceDefaultDarkTheme: "Bawaan instan tema gelap" +instanceDefaultThemeDescription: "Masukkan kode tema di format obyek." +mutePeriod: "Batas waktu bisu" indefinitely: "Selamanya" +tenMinutes: "10 Menit" +oneHour: "1 Jam" +oneDay: "1 Hari" +oneWeek: "1 Bulan" +failedToFetchAccountInformation: "Gagal untuk mendapatkan informasi akun" _emailUnavailable: used: "Alamat surel ini telah digunakan" format: "Format tidak valid." @@ -1599,6 +1612,7 @@ _notification: youReceivedFollowRequest: "Kamu menerima permintaan mengikuti" yourFollowRequestAccepted: "Permintaan mengikuti kamu telah diterima" youWereInvitedToGroup: "Telah diundang ke grup" + pollEnded: "Hasil Kuesioner telah keluar" _types: all: "Semua" follow: "Ikuti" @@ -1608,6 +1622,7 @@ _notification: quote: "Kutip" reaction: "Reaksi" pollVote: "Memilih di angket" + pollEnded: "Jajak pendapat berakhir" receiveFollowRequest: "Permintaan mengikuti diterima" followRequestAccepted: "Permintaan mengikuti disetujui" groupInvited: "Diundang ke grup" diff --git a/locales/nl-NL.yml b/locales/nl-NL.yml index a00716fe05..f4e4a62182 100644 --- a/locales/nl-NL.yml +++ b/locales/nl-NL.yml @@ -119,6 +119,23 @@ unblock: "Deblokkeren" suspend: "Opschorten" unsuspend: "Heractiveren" blockConfirm: "Weet je zeker dat je dit account wil blokkeren?" +unblockConfirm: "Ben je zeker dat je deze account wil blokkeren?" +suspendConfirm: "Ben je zeker dat je deze account wil suspenderen?" +unsuspendConfirm: "Ben je zeker dat je deze account wil opnieuw aanstellen?" +flagAsBot: "Markeer dit account als een robot." +flagAsBotDescription: "Als dit account van een programma wordt beheerd, zet deze vlag aan. Het aanzetten helpt andere ontwikkelaars om bijvoorbeeld onbedoelde feedback loops te doorbreken of om Misskey meer geschikt te maken." +flagAsCat: "Markeer dit account als een kat." +flagAsCatDescription: "Zet deze vlag aan als je wilt aangeven dat dit account een kat is." +flagShowTimelineReplies: "Toon antwoorden op de tijdlijn." +flagShowTimelineRepliesDescription: "Als je dit vlag aanzet, toont de tijdlijn ook antwoorden op andere en niet alleen jouw eigen notities." +autoAcceptFollowed: "Accepteer verzoeken om jezelf te volgen vanzelf als je de verzoeker al volgt." +addAccount: "Account toevoegen" +loginFailed: "Aanmelding mislukt." +showOnRemote: "Toon op de externe instantie." +general: "Algemeen" +wallpaper: "Achtergrond" +setWallpaper: "Achtergrond instellen" +removeWallpaper: "Achtergrond verwijderen" searchWith: "Zoeken: {q}" youHaveNoLists: "Je hebt geen lijsten" followConfirm: "Weet je zeker dat je {name} wilt volgen?" @@ -205,6 +222,8 @@ resetAreYouSure: "Resetten?" saved: "Opgeslagen" messaging: "Chat" upload: "Uploaden" +keepOriginalUploading: "Origineel beeld behouden." +keepOriginalUploadingDescription: "Bewaar de originele versie bij het uploaden van afbeeldingen. Indien uitgeschakeld, wordt bij het uploaden een alternatieve versie voor webpublicatie genereert." fromDrive: "Van schijf" fromUrl: "Van URL" uploadFromUrl: "Uploaden vanaf een URL" @@ -245,9 +264,36 @@ renameFile: "Wijzig bestandsnaam" folderName: "Mapnaam" createFolder: "Map aanmaken" renameFolder: "Map hernoemen" +deleteFolder: "Map verwijderen" +addFile: "Bestand toevoegen" +emptyDrive: "Jouw Drive is leeg." +emptyFolder: "Deze map is leeg" +unableToDelete: "Kan niet worden verwijderd" +inputNewFileName: "Voer een nieuwe naam in" +copyUrl: "URL kopiëren" +rename: "Hernoemen" +avatar: "Avatar" +banner: "Banner" nsfw: "NSFW" +whenServerDisconnected: "Wanneer de verbinding met de server wordt onderbroken" +disconnectedFromServer: "Verbinding met de server onderbroken." +inMb: "in megabytes" pinnedNotes: "Vastgemaakte notitie" userList: "Lijsten" +aboutMisskey: "Over Misskey" +administrator: "Beheerder" +token: "Token" +securityKeyName: "Sleutelnaam" +registerSecurityKey: "Zekerheids-Sleutel registreren" +lastUsed: "Laatst gebruikt" +unregister: "Uitschrijven" +passwordLessLogin: "Inloggen zonder wachtwoord" +resetPassword: "Wachtwoord terugzetten" +newPasswordIs: "Het nieuwe wachtwoord is „{password}”." +reduceUiAnimation: "Verminder beweging in de UI" +share: "Delen" +notFound: "Niet gevonden" +cacheClear: "Cache verwijderen" smtpHost: "Server" smtpUser: "Gebruikersnaam" smtpPass: "Wachtwoord" diff --git a/locales/pt-PT.yml b/locales/pt-PT.yml index 0f12155e33..104e4ceb7c 100644 --- a/locales/pt-PT.yml +++ b/locales/pt-PT.yml @@ -1,6 +1,7 @@ --- _lang_: "Português" headlineMisskey: "Rede conectada por notas" +introMisskey: "Bem-vindo! Misskey é um serviço de microblogue descentralizado de código aberto.\nCria \"notas\" e partilha o que te ocorre com todos à tua volta. 📡\nCom \"reações\" podes também expressar logo o que sentes às notas de todos. 👍\nExploremos um novo mundo! 🚀" monthAndDay: "{day}/{month}" search: "Pesquisar" notifications: "Notificações" @@ -22,6 +23,7 @@ otherSettings: "Outras configurações" openInWindow: "Abrir numa janela" profile: "Perfil" timeline: "Timeline" +noAccountDescription: "Este usuário não tem uma descrição." login: "Iniciar sessão" loggingIn: "Iniciando sessão…" logout: "Sair" @@ -29,8 +31,12 @@ signup: "Registrar-se" uploading: "Enviando…" save: "Guardar" users: "Usuários" +addUser: "Adicionar usuário" favorite: "Favoritar" favorites: "Favoritar" +unfavorite: "Remover dos favoritos" +favorited: "Adicionado aos favoritos." +alreadyFavorited: "Já adicionado aos favoritos." showMore: "Ver mais" youGotNewFollower: "Você tem um novo seguidor" followRequestAccepted: "Pedido de seguir aceito" diff --git a/locales/ro-RO.yml b/locales/ro-RO.yml index 7f8ed82b8d..8909a72ec7 100644 --- a/locales/ro-RO.yml +++ b/locales/ro-RO.yml @@ -449,6 +449,45 @@ groupInvited: "Ai fost invitat într-un grup" aboutX: "Despre {x}" useOsNativeEmojis: "Folosește emojiuri native OS-ului" disableDrawer: "Nu folosi meniuri în stil sertar" +youHaveNoGroups: "Nu ai niciun grup" +joinOrCreateGroup: "Primește o invitație într-un grup sau creează unul nou." +noHistory: "Nu există istoric" +signinHistory: "Istoric autentificări" +disableAnimatedMfm: "Dezactivează MFM cu animații" +doing: "Se procesează..." +category: "Categorie" +tags: "Etichete" +docSource: "Sursa acestui document" +createAccount: "Creează un cont" +existingAccount: "Cont existent" +regenerate: "Regenerează" +fontSize: "Mărimea fontului" +noFollowRequests: "Nu ai nicio cerere de urmărire în așteptare" +openImageInNewTab: "Deschide imaginile în taburi noi" +dashboard: "Panou de control" +local: "Local" +remote: "Extern" +total: "Total" +weekOverWeekChanges: "Schimbări până săptămâna trecută" +dayOverDayChanges: "Schimbări până ieri" +appearance: "Aspect" +clientSettings: "Setări client" +accountSettings: "Setări cont" +promotion: "Promovat" +promote: "Promovează" +numberOfDays: "Numărul zilelor" +hideThisNote: "Ascunde această notă" +showFeaturedNotesInTimeline: "Arată notele recomandate în cronologii" +objectStorage: "Object Storage" +useObjectStorage: "Folosește Object Storage" +objectStorageBaseUrl: "URL de bază" +objectStorageBucket: "Bucket" +objectStorageBucketDesc: "Te rog specifică numele bucket-ului furnizorului tău." +objectStoragePrefix: "Prefix" +objectStoragePrefixDesc: "Fișierele vor fi stocate sub directoare cu acest prefix." +objectStorageEndpoint: "Endpoint" +objectStorageRegion: "Regiune" +objectStorageUseSSL: "Folosește SSl" sounds: "Sunete" listen: "Ascultă" none: "Nimic" @@ -471,6 +510,18 @@ sort: "Sortează" ascendingOrder: "Crescător" descendingOrder: "Descrescător" scratchpad: "Scratchpad" +scratchpadDescription: "Scratchpad-ul oferă un mediu de experimentare în AiScript. Poți scrie, executa și verifica rezultatele acestuia interacționând cu Misskey în el." +output: "Ieșire" +script: "Script" +disablePagesScript: "Dezactivează AiScript în Pagini" +updateRemoteUser: "Actualizează informațiile utilizatorului extern" +deleteAllFiles: "Șterge toate fișierele" +deleteAllFilesConfirm: "Ești sigur că vrei să ștergi toate fișierele?" +removeAllFollowing: "Dezurmărește toți utilizatorii urmăriți" +removeAllFollowingDescription: "Asta va dez-urmări toate conturile din {host}. Te rog execută asta numai dacă instanța, de ex., nu mai există." +userSuspended: "Acest utilizator a fost suspendat." +userSilenced: "Acest utilizator a fost setat silențios." +yourAccountSuspendedTitle: "Acest cont a fost suspendat" smtpHost: "Gazdă" smtpUser: "Nume de utilizator" smtpPass: "Parolă" diff --git a/locales/sk-SK.yml b/locales/sk-SK.yml index db45365a51..c6f2f59bdf 100644 --- a/locales/sk-SK.yml +++ b/locales/sk-SK.yml @@ -839,6 +839,8 @@ tenMinutes: "10 minút" oneHour: "1 hodina" oneDay: "1 deň" oneWeek: "1 týždeň" +reflectMayTakeTime: "Zmeny môžu chvíľu trvať kým sa prejavia." +failedToFetchAccountInformation: "Nepodarilo sa načítať informácie o účte." _emailUnavailable: used: "Táto emailová adresa sa už používa" format: "Formát emailovej adresy je nesprávny" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index 483faba0d1..f644585835 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -8,12 +8,12 @@ notifications: "通知" username: "用户名" password: "密码" forgotPassword: "忘记密码" -fetchingAsApObject: "联合查询" +fetchingAsApObject: "在联邦宇宙查询中..." ok: "OK" gotIt: "我明白了" cancel: "取消" enterUsername: "输入用户名" -renotedBy: "由 {user} 转推" +renotedBy: "由 {user} 转贴" noNotes: "没有帖文" noNotifications: "无通知" instance: "实例" @@ -69,7 +69,7 @@ exportRequested: "导出请求已提交,这可能需要花一些时间,导 importRequested: "导入请求已提交,这可能需要花一点时间。" lists: "列表" noLists: "列表为空" -note: "帖子" +note: "发帖" notes: "帖子" following: "关注中" followers: "关注者" @@ -85,7 +85,7 @@ serverIsDead: "服务器没有响应。 请稍等片刻,然后重试。" youShouldUpgradeClient: "请重新加载并使用新版本的客户端查看此页面。" enterListName: "输入列表名称" privacy: "隐私" -makeFollowManuallyApprove: "关注者的关注请求需要批准" +makeFollowManuallyApprove: "关注请求需要批准" defaultNoteVisibility: "默认可见性" follow: "关注" followRequest: "关注申请" @@ -143,7 +143,7 @@ flagAsCat: "将这个账户设定为一只猫" flagAsCatDescription: "如果您想表明此帐户是一只猫,请打开此标志。" flagShowTimelineReplies: "在时间线上显示帖子的回复" flagShowTimelineRepliesDescription: "启用时,时间线除了显示用户的帖子外,还会显示其他用户对帖子的回复。" -autoAcceptFollowed: "自动允许关注" +autoAcceptFollowed: "自动允许关注者的关注" addAccount: "添加账户" loginFailed: "登录失败" showOnRemote: "转到所在实例显示" @@ -162,7 +162,7 @@ recipient: "收件人" annotation: "注解" federation: "联合" instances: "实例" -registeredAt: "初次观察" +registeredAt: "初次观测" latestRequestSentAt: "上次发送的请求" latestRequestReceivedAt: "上次收到的请求" latestStatus: "最后状态" @@ -254,7 +254,7 @@ agreeTo: "{0}人同意" tos: "服务条款" start: "开始" home: "首页" -remoteUserCaution: "由于是远程用户,信息不完整。" +remoteUserCaution: "由于此用户来自其它实例,显示的信息可能不完整。" activity: "活动" images: "图片" birthday: "生日" @@ -372,7 +372,7 @@ recentlyUpdatedUsers: "最近投稿的用户" recentlyRegisteredUsers: "最近登录的用户" recentlyDiscoveredUsers: "最近发现的用户" exploreUsersCount: "有{count}个用户" -exploreFediverse: "探索Fediverse" +exploreFediverse: "探索联邦宇宙" popularTags: "热门标签" userList: "列表" about: "关于" @@ -561,7 +561,7 @@ manage: "管理" plugins: "插件" deck: "Deck" undeck: "取消Deck" -useBlurEffectForModal: "模态框使用模糊效果" +useBlurEffectForModal: "对话框使用模糊效果" useFullReactionPicker: "使用全功能的回应工具栏" width: "宽度" height: "高度" @@ -840,6 +840,8 @@ tenMinutes: "10分钟" oneHour: "1小时" oneDay: "1天" oneWeek: "1周" +reflectMayTakeTime: "可能需要一些时间才能体现出效果。" +failedToFetchAccountInformation: "获取账户信息失败" _emailUnavailable: used: "已经被使用过" format: "无效的格式" @@ -904,7 +906,7 @@ _nsfw: _mfm: cheatSheet: "MFM代码速查表" intro: "MFM是一种在Misskey中的各个位置使用的专用标记语言。在这里您可以看到MFM中可用的语法列表。" - dummy: "通过Misskey扩展Fediverse的世界" + dummy: "通过Misskey扩展联邦宇宙的世界" mention: "提及" mentionDescription: "可以使用 @+用户名 来指示特定用户" hashtag: "话题标签" @@ -967,7 +969,7 @@ _mfm: rotateDescription: "旋转指定的角度。" _instanceTicker: none: "不显示" - remote: "仅显示远程用户的" + remote: "仅远程用户" always: "始终显示" _serverDisconnectedBehavior: reload: "自动重载" @@ -1051,7 +1053,7 @@ _theme: mention: "提及" mentionMe: "提及" renote: "转发" - modalBg: "模态框背景" + modalBg: "对话框背景" divider: "分割线" scrollbarHandle: "滚动条" scrollbarHandleHover: "滚动条(悬停)" @@ -1238,7 +1240,7 @@ _visibility: publicDescription: "您的帖子将出现在全局时间线上" home: "首页" homeDescription: "仅发送至首页的时间线" - followers: "关注者" + followers: "仅关注者" followersDescription: "仅发送至关注者" specified: "指定用户" specifiedDescription: "仅发送至指定用户" From 6b6464a6598414eec8bbffac12b3ebfb4ec30830 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2022 15:31:11 +0900 Subject: [PATCH 12/66] fix syntax error --- packages/backend/src/remote/activitypub/deliver-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/remote/activitypub/deliver-manager.ts b/packages/backend/src/remote/activitypub/deliver-manager.ts index c63437116b..f95f64f77c 100644 --- a/packages/backend/src/remote/activitypub/deliver-manager.ts +++ b/packages/backend/src/remote/activitypub/deliver-manager.ts @@ -85,7 +85,7 @@ export default class DeliverManager { Process follower recipes first to avoid duplication when processing direct recipes later. */ - if (this.recipes.some(r => isFollowers(r)) { + if (this.recipes.some(r => isFollowers(r))) { // followers deliver // TODO: SELECT DISTINCT ON ("followerSharedInbox") "followerSharedInbox" みたいな問い合わせにすればよりパフォーマンス向上できそう // ただ、sharedInboxがnullなリモートユーザーも稀におり、その対応ができなさそう? From 68d462b3017bdb77de3161158e04528567164d8f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2022 15:33:51 +0900 Subject: [PATCH 13/66] 12.109.0 --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9326fb8459..f538a41060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ You should also include the user name that made the change. --> -## 12.x.x (unreleased) +## 12.109.0 (2022/04/02) ### Improvements - Webhooks @syuilo diff --git a/package.json b/package.json index 41856363c3..77c822bf2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.108.1", + "version": "12.109.0", "codename": "indigo", "repository": { "type": "git", From c03b70c949923b830a6d0361d1aa4d5f5614b7b7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2022 16:47:53 +0900 Subject: [PATCH 14/66] revert 484e023c0 --- packages/backend/src/models/schema/emoji.ts | 1 - packages/backend/src/models/schema/user.ts | 1 - .../server/api/endpoints/admin/drive/files.ts | 7 +- .../api/endpoints/admin/drive/show-file.ts | 20 ++---- .../api/endpoints/admin/emoji/list-remote.ts | 8 +-- .../server/api/endpoints/admin/emoji/list.ts | 5 +- .../admin/emoji/set-category-bulk.ts | 6 +- .../api/endpoints/admin/emoji/update.ts | 6 +- .../server/api/endpoints/admin/show-users.ts | 9 +-- .../server/api/endpoints/channels/pin-note.ts | 0 .../src/server/api/endpoints/clips/create.ts | 2 +- .../server/api/endpoints/drive/files/show.ts | 27 ++++--- .../api/endpoints/federation/instances.ts | 2 +- .../api/endpoints/messaging/messages.ts | 19 ++--- .../endpoints/messaging/messages/create.ts | 17 +---- .../backend/src/server/api/endpoints/meta.ts | 1 - .../src/server/api/endpoints/mute/create.ts | 6 +- .../backend/src/server/api/endpoints/notes.ts | 2 +- .../src/server/api/endpoints/notes/create.ts | 72 +++++++------------ .../api/endpoints/notes/global-timeline.ts | 6 +- .../api/endpoints/notes/hybrid-timeline.ts | 6 +- .../api/endpoints/notes/local-timeline.ts | 6 +- .../api/endpoints/notes/search-by-tag.ts | 39 +++------- .../src/server/api/endpoints/notes/search.ts | 6 +- .../server/api/endpoints/notes/timeline.ts | 6 +- .../api/endpoints/notes/user-list-timeline.ts | 6 +- .../src/server/api/endpoints/pages/show.ts | 21 ++---- .../server/api/endpoints/users/followers.ts | 23 ++---- .../server/api/endpoints/users/following.ts | 23 ++---- .../users/search-by-username-and-host.ts | 5 +- .../src/server/api/endpoints/users/show.ts | 36 +++------- 31 files changed, 100 insertions(+), 294 deletions(-) create mode 100644 packages/backend/src/server/api/endpoints/channels/pin-note.ts diff --git a/packages/backend/src/models/schema/emoji.ts b/packages/backend/src/models/schema/emoji.ts index e97fdd5ef6..5f9af88db4 100644 --- a/packages/backend/src/models/schema/emoji.ts +++ b/packages/backend/src/models/schema/emoji.ts @@ -27,7 +27,6 @@ export const packedEmojiSchema = { host: { type: 'string', optional: false, nullable: true, - description: 'The local host is represented with `null`.', }, url: { type: 'string', diff --git a/packages/backend/src/models/schema/user.ts b/packages/backend/src/models/schema/user.ts index 253681695d..616bedc0dc 100644 --- a/packages/backend/src/models/schema/user.ts +++ b/packages/backend/src/models/schema/user.ts @@ -21,7 +21,6 @@ export const packedUserLiteSchema = { type: 'string', nullable: true, optional: false, example: 'misskey.example.com', - description: 'The local host is represented with `null`.', }, avatarUrl: { type: 'string', diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts index 119c4db19b..646d85a1e0 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -27,12 +27,7 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, type: { type: 'string', nullable: true, pattern: /^[a-zA-Z0-9\/\-*]+$/.toString().slice(1, -1) }, origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: "local" }, - hostname: { - type: 'string', - nullable: true, - default: null, - description: 'The local host is represented with `null`.', - }, + hostname: { type: 'string', nullable: true, default: null }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index 039df74f1b..4b27fc0188 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -40,7 +40,6 @@ export const meta = { userHost: { type: 'string', optional: false, nullable: true, - description: 'The local host is represented with `null`.', }, md5: { type: 'string', @@ -152,20 +151,11 @@ export const meta = { export const paramDef = { type: 'object', - anyOf: [ - { - properties: { - fileId: { type: 'string', format: 'misskey:id' }, - }, - required: ['fileId'], - }, - { - properties: { - url: { type: 'string' }, - }, - required: ['url'], - }, - ], + properties: { + fileId: { type: 'string', format: 'misskey:id' }, + url: { type: 'string' }, + }, + required: [], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index d16689a280..f19c3ddbd8 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -40,7 +40,6 @@ export const meta = { host: { type: 'string', optional: false, nullable: true, - description: 'The local host is represented with `null`.', }, url: { type: 'string', @@ -55,12 +54,7 @@ export const paramDef = { type: 'object', properties: { query: { type: 'string', nullable: true, default: null }, - host: { - type: 'string', - nullable: true, - default: null, - description: 'Use `null` to represent the local host.', - }, + host: { type: 'string', nullable: true, default: null }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index 6192978fad..f488a71a00 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -38,9 +38,8 @@ export const meta = { optional: false, nullable: true, }, host: { - type: 'null', - optional: false, - description: 'The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files.', + type: 'string', + optional: false, nullable: true, }, url: { type: 'string', diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts index cff58d6170..6063f3e3be 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts @@ -17,11 +17,7 @@ export const paramDef = { ids: { type: 'array', items: { type: 'string', format: 'misskey:id', } }, - category: { - type: 'string', - nullable: true, - description: 'Use `null` to reset the category.', - }, + category: { type: 'string', nullable: true }, }, required: ['ids'], } as const; diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index 5b547b3b79..e26514e0ca 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -23,11 +23,7 @@ export const paramDef = { properties: { id: { type: 'string', format: 'misskey:id' }, name: { type: 'string' }, - category: { - type: 'string', - nullable: true, - description: 'Use `null` to reset the category.', - }, + category: { type: 'string', nullable: true }, aliases: { type: 'array', items: { type: 'string', } }, diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index 2703b4b9db..1ec86fef2e 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -26,13 +26,8 @@ export const paramDef = { sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] }, state: { type: 'string', enum: ['all', 'available', 'admin', 'moderator', 'adminOrModerator', 'silenced', 'suspended'], default: "all" }, origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: "local" }, - username: { type: 'string', nullable: true, default: null }, - hostname: { - type: 'string', - nullable: true, - default: null, - description: 'The local host is represented with `null`.', - }, + username: { type: 'string', default: null }, + hostname: { type: 'string', default: null }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/channels/pin-note.ts b/packages/backend/src/server/api/endpoints/channels/pin-note.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index 4afe4222a1..a2dbef12e0 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -20,7 +20,7 @@ export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, - isPublic: { type: 'boolean', default: false }, + isPublic: { type: 'boolean' }, description: { type: 'string', nullable: true, minLength: 1, maxLength: 2048 }, }, required: ['name'], diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index a2bc0c7aa4..c8e9d3dd93 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -28,25 +28,22 @@ export const meta = { code: 'ACCESS_DENIED', id: '25b73c73-68b1-41d0-bad1-381cfdf6579f', }, + + fileIdOrUrlRequired: { + message: 'fileId or url required.', + code: 'INVALID_PARAM', + id: '89674805-722c-440c-8d88-5641830dc3e4', + }, }, } as const; export const paramDef = { type: 'object', - anyOf: [ - { - properties: { - fileId: { type: 'string', format: 'misskey:id' }, - }, - required: ['fileId'], - }, - { - properties: { - url: { type: 'string' }, - }, - required: ['url'], - }, - ], + properties: { + fileId: { type: 'string', format: 'misskey:id' }, + url: { type: 'string' }, + }, + required: [], } as const; // eslint-disable-next-line import/no-default-export @@ -65,6 +62,8 @@ export default define(meta, paramDef, async (ps, user) => { thumbnailUrl: ps.url, }], }); + } else { + throw new ApiError(meta.errors.fileIdOrUrlRequired); } if (file == null) { diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index 07e5c07c6a..e272971763 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -22,7 +22,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { - host: { type: 'string', nullable: true, description: 'Omit or use `null` to not filter by host.' }, + host: { type: 'string', nullable: true }, blocked: { type: 'boolean', nullable: true }, notResponding: { type: 'boolean', nullable: true }, suspended: { type: 'boolean', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index dbf1f6c868..9760709c29 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -47,25 +47,14 @@ export const meta = { export const paramDef = { type: 'object', properties: { + userId: { type: 'string', format: 'misskey:id' }, + groupId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, markAsRead: { type: 'boolean', default: true }, }, - anyOf: [ - { - properties: { - userId: { type: 'string', format: 'misskey:id' }, - }, - required: ['userId'], - }, - { - properties: { - groupId: { type: 'string', format: 'misskey:id' }, - }, - required: ['groupId'], - }, - ], + required: [], } as const; // eslint-disable-next-line import/no-default-export @@ -137,5 +126,7 @@ export default define(meta, paramDef, async (ps, user) => { return await Promise.all(messages.map(message => MessagingMessages.pack(message, user, { populateGroup: false, }))); + } else { + throw new Error(); } }); diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index 405af5ec17..8c1226b0f4 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -67,23 +67,12 @@ export const meta = { export const paramDef = { type: 'object', properties: { + userId: { type: 'string', format: 'misskey:id' }, + groupId: { type: 'string', format: 'misskey:id' }, text: { type: 'string', nullable: true, maxLength: 3000 }, fileId: { type: 'string', format: 'misskey:id' }, }, - anyOf: [ - { - properties: { - userId: { type: 'string', format: 'misskey:id' }, - }, - required: ['userId'], - }, - { - properties: { - groupId: { type: 'string', format: 'misskey:id' }, - }, - required: ['groupId'], - }, - ], + required: [], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index e1ae282a97..057d22f33b 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -169,7 +169,6 @@ export const meta = { host: { type: 'string', optional: false, nullable: true, - description: 'The local host is represented with `null`.', }, url: { type: 'string', diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index 7e857e6731..0c3a3453f1 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -38,11 +38,7 @@ export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, - expiresAt: { - type: 'integer', - nullable: true, - description: 'A Unix Epoch timestamp that must lie in the future. `null` means an indefinite mute.', - }, + expiresAt: { type: 'integer', nullable: true }, }, required: ['userId'], } as const; diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 99c8b973f6..96657f8d3f 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -19,7 +19,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { - local: { type: 'boolean', default: false }, + local: { type: 'boolean' }, reply: { type: 'boolean' }, renote: { type: 'boolean' }, withFiles: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 4b18ab6023..961983f5f4 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -59,6 +59,12 @@ export const meta = { id: '3ac74a84-8fd5-4bb0-870f-01804f82ce15', }, + contentRequired: { + message: 'Content required. You need to set text, fileIds, renoteId or poll.', + code: 'CONTENT_REQUIRED', + id: '6f57e42b-c348-439b-bc45-993995cc515a', + }, + cannotCreateAlreadyExpiredPoll: { message: 'Poll is already expired.', code: 'CANNOT_CREATE_ALREADY_EXPIRED_POLL', @@ -86,41 +92,29 @@ export const paramDef = { visibleUserIds: { type: 'array', uniqueItems: true, items: { type: 'string', format: 'misskey:id', } }, - text: { type: 'string', maxLength: MAX_NOTE_TEXT_LENGTH, nullable: true }, + text: { type: 'string', nullable: true, maxLength: MAX_NOTE_TEXT_LENGTH, default: null }, cw: { type: 'string', nullable: true, maxLength: 100 }, localOnly: { type: 'boolean', default: false }, noExtractMentions: { type: 'boolean', default: false }, noExtractHashtags: { type: 'boolean', default: false }, noExtractEmojis: { type: 'boolean', default: false }, - fileIds: { - type: 'array', - uniqueItems: true, - minItems: 1, - maxItems: 16, - items: { type: 'string', format: 'misskey:id' }, - }, - mediaIds: { - deprecated: true, - description: 'Use `fileIds` instead. If both are specified, this property is discarded.', - type: 'array', - uniqueItems: true, - minItems: 1, - maxItems: 16, - items: { type: 'string', format: 'misskey:id' }, - }, + fileIds: { type: 'array', uniqueItems: true, minItems: 1, maxItems: 16, items: { + type: 'string', format: 'misskey:id', + } }, + mediaIds: { type: 'array', uniqueItems: true, minItems: 1, maxItems: 16, items: { + type: 'string', format: 'misskey:id', + } }, replyId: { type: 'string', format: 'misskey:id', nullable: true }, renoteId: { type: 'string', format: 'misskey:id', nullable: true }, channelId: { type: 'string', format: 'misskey:id', nullable: true }, poll: { - type: 'object', - nullable: true, + type: 'object', nullable: true, properties: { choices: { - type: 'array', - uniqueItems: true, - minItems: 2, - maxItems: 10, - items: { type: 'string', minLength: 1, maxLength: 50 }, + type: 'array', uniqueItems: true, minItems: 2, maxItems: 10, + items: { + type: 'string', minLength: 1, maxLength: 50, + }, }, multiple: { type: 'boolean', default: false }, expiresAt: { type: 'integer', nullable: true }, @@ -129,30 +123,7 @@ export const paramDef = { required: ['choices'], }, }, - anyOf: [ - { - // (re)note with text, files and poll are optional - properties: { - text: { type: 'string', maxLength: MAX_NOTE_TEXT_LENGTH, nullable: false }, - }, - required: ['text'], - }, - { - // (re)note with files, text and poll are optional - required: ['fileIds'], - }, - { - // (re)note with files, text and poll are optional - required: ['mediaIds'], - }, - { - // (re)note with poll, text and files are optional - properties: { - poll: { type: 'object', nullable: false, }, - }, - required: ['poll'], - }, - ], + required: [], } as const; // eslint-disable-next-line import/no-default-export @@ -233,6 +204,11 @@ export default define(meta, paramDef, async (ps, user) => { } } + // テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー + if (!(ps.text || files.length || renote || ps.poll)) { + throw new ApiError(meta.errors.contentRequired); + } + let channel: Channel | undefined; if (ps.channelId != null) { channel = await Channels.findOneBy({ id: ps.channelId }); diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index cb402ecaa1..09a8194665 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -35,11 +35,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { - withFiles: { - type: 'boolean', - default: false, - description: 'Only show notes that have attached files.', - }, + withFiles: { type: 'boolean' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index f9893527e0..7c9c122963 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -48,11 +48,7 @@ export const paramDef = { includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, - withFiles: { - type: 'boolean', - default: false, - description: 'Only show notes that have attached files.', - }, + withFiles: { type: 'boolean' }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index 03edf30b31..bb0bbe2a20 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -37,11 +37,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { - withFiles: { - type: 'boolean', - default: false, - description: 'Only show notes that have attached files.', - }, + withFiles: { type: 'boolean' }, fileType: { type: 'array', items: { type: 'string', } }, diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index bb85c92008..c6503eb057 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -25,44 +25,21 @@ export const meta = { export const paramDef = { type: 'object', properties: { + tag: { type: 'string' }, + query: { type: 'array', items: { + type: 'array', items: { + type: 'string', + }, + } }, reply: { type: 'boolean', nullable: true, default: null }, renote: { type: 'boolean', nullable: true, default: null }, - withFiles: { - type: 'boolean', - default: false, - description: 'Only show notes that have attached files.', - }, + withFiles: { type: 'boolean' }, poll: { type: 'boolean', nullable: true, default: null }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, }, - anyOf: [ - { - properties: { - tag: { type: 'string', minLength: 1 }, - }, - required: ['tag'], - }, - { - properties: { - query: { - type: 'array', - description: 'The outer arrays are chained with OR, the inner arrays are chained with AND.', - items: { - type: 'array', - items: { - type: 'string', - minLength: 1, - }, - minItems: 1, - }, - minItems: 1, - }, - }, - required: ['query'], - }, - ], + required: [], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index af9b5f0a10..e77892b150 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -35,11 +35,7 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, offset: { type: 'integer', default: 0 }, - host: { - type: 'string', - nullable: true, - description: 'The local host is represented with `null`.', - }, + host: { type: 'string', nullable: true }, userId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, channelId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index 0f976d18be..fde66b241b 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -38,11 +38,7 @@ export const paramDef = { includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, - withFiles: { - type: 'boolean', - default: false, - description: 'Only show notes that have attached files.', - }, + withFiles: { type: 'boolean' }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 6c6402603a..866e306d8d 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -42,11 +42,7 @@ export const paramDef = { includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, - withFiles: { - type: 'boolean', - default: false, - description: 'Only show notes that have attached files.', - }, + withFiles: { type: 'boolean' }, }, required: ['listId'], } as const; diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 3dcce8550f..1c218acfd4 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -26,21 +26,12 @@ export const meta = { export const paramDef = { type: 'object', - anyOf: [ - { - properties: { - pageId: { type: 'string', format: 'misskey:id' }, - }, - required: ['pageId'], - }, - { - properties: { - name: { type: 'string' }, - username: { type: 'string' }, - }, - required: ['name', 'username'], - }, - ], + properties: { + pageId: { type: 'string', format: 'misskey:id' }, + name: { type: 'string' }, + username: { type: 'string' }, + }, + required: [], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index 26b1f20df0..5de624312a 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -38,29 +38,14 @@ export const meta = { export const paramDef = { type: 'object', properties: { + userId: { type: 'string', format: 'misskey:id' }, + username: { type: 'string' }, + host: { type: 'string', nullable: true }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, }, - anyOf: [ - { - properties: { - userId: { type: 'string', format: 'misskey:id' }, - }, - required: ['userId'], - }, - { - properties: { - username: { type: 'string' }, - host: { - type: 'string', - nullable: true, - description: 'The local host is represented with `null`.', - }, - }, - required: ['username', 'host'], - }, - ], + required: [], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 42cf5216e8..55460f7c67 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -38,29 +38,14 @@ export const meta = { export const paramDef = { type: 'object', properties: { + userId: { type: 'string', format: 'misskey:id' }, + username: { type: 'string' }, + host: { type: 'string', nullable: true }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, }, - anyOf: [ - { - properties: { - userId: { type: 'string', format: 'misskey:id' }, - }, - required: ['userId'], - }, - { - properties: { - username: { type: 'string' }, - host: { - type: 'string', - nullable: true, - description: 'The local host is represented with `null`.', - }, - }, - required: ['username', 'host'], - }, - ], + required: [], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index f74d80e2ae..897b5de3fe 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -28,10 +28,7 @@ export const paramDef = { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, detail: { type: 'boolean', default: true }, }, - anyOf: [ - { required: ['username'] }, - { required: ['host'] }, - ], + required: [], } as const; // TODO: avatar,bannerをJOINしたいけどエラーになる diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index b1a568145a..775a4b29ff 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -46,33 +46,15 @@ export const meta = { export const paramDef = { type: 'object', - anyOf: [ - { - properties: { - userId: { type: 'string', format: 'misskey:id' }, - }, - required: ['userId'], - }, - { - properties: { - userIds: { type: 'array', uniqueItems: true, items: { - type: 'string', format: 'misskey:id', - } }, - }, - required: ['userIds'], - }, - { - properties: { - username: { type: 'string' }, - host: { - type: 'string', - nullable: true, - description: 'The local host is represented with `null`.', - }, - }, - required: ['username', 'host'], - }, - ], + properties: { + userId: { type: 'string', format: 'misskey:id' }, + userIds: { type: 'array', uniqueItems: true, items: { + type: 'string', format: 'misskey:id', + } }, + username: { type: 'string' }, + host: { type: 'string', nullable: true }, + }, + required: [], } as const; // eslint-disable-next-line import/no-default-export From 6a379b463ffad0d3c61b647909950d0a2ef2d739 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2022 16:49:54 +0900 Subject: [PATCH 15/66] Update CHANGELOG.md --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f538a41060..453552ea98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ You should also include the user name that made the change. --> +## 12.x.x (unreleased) + +### Improvements +- + +### Bugfixes +- API: Renoteが行えない問題を修正 + ## 12.109.0 (2022/04/02) ### Improvements From 7722fc4d3fc64b0bba72b9426e4c05b3a330655b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2022 16:56:24 +0900 Subject: [PATCH 16/66] 12.109.1 --- CHANGELOG.md | 5 +---- package.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 453552ea98..a98c9b5f69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,7 @@ You should also include the user name that made the change. --> -## 12.x.x (unreleased) - -### Improvements -- +## 12.109.1 (2022/04/02) ### Bugfixes - API: Renoteが行えない問題を修正 diff --git a/package.json b/package.json index 77c822bf2a..425d2b1e53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.109.0", + "version": "12.109.1", "codename": "indigo", "repository": { "type": "git", From 61dfa6d598dadf93c8a080222c80f524b82731c9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 2 Apr 2022 21:40:49 +0900 Subject: [PATCH 17/66] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a98c9b5f69..18f8ede2ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,9 @@ You should also include the user name that made the change. ## 12.109.1 (2022/04/02) +### Known issues +- two-factor authentication is not working + ### Bugfixes - API: Renoteが行えない問題を修正 From f9b5d921767567718595f691d55f9efade1fe338 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 2 Apr 2022 15:52:26 +0200 Subject: [PATCH 18/66] Fix: Adjust ESLint calls to properly interpret globs (#8462) * fix(backend): rename .eslintrc.js to .eslintrc.cjs * fix(backend): wrap lint path glob in quotation marks * fix(client): wrap lint path glob in quotation marks * chore(workflow): make lint workflow use Node 16 --- .github/workflows/lint.yml | 2 +- packages/backend/{.eslintrc.js => .eslintrc.cjs} | 0 packages/backend/package.json | 2 +- packages/client/package.json | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename packages/backend/{.eslintrc.js => .eslintrc.cjs} (100%) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9ba110f776..74f9a4e532 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,7 +16,7 @@ jobs: submodules: true - uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: 16.x - uses: actions/cache@v2 with: path: '**/node_modules' diff --git a/packages/backend/.eslintrc.js b/packages/backend/.eslintrc.cjs similarity index 100% rename from packages/backend/.eslintrc.js rename to packages/backend/.eslintrc.cjs diff --git a/packages/backend/package.json b/packages/backend/package.json index d6490f1cb6..99f78afae9 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json", "watch": "node watch.mjs", - "lint": "eslint --quiet src/**/*.ts", + "lint": "eslint --quiet 'src/**/*.ts'", "mocha": "cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", "test": "npm run mocha" }, diff --git a/packages/client/package.json b/packages/client/package.json index c6b0363adb..d44df92d7b 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -3,7 +3,7 @@ "scripts": { "watch": "webpack --watch", "build": "webpack", - "lint": "eslint --quiet src/**/*.{ts,vue}" + "lint": "eslint --quiet 'src/**/*.{ts,vue}'" }, "resolutions": { "chokidar": "^3.3.1", From 408d54f2eb22aecfc64c066c78149d48ca51c2e6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 13:54:22 +0900 Subject: [PATCH 19/66] fix(api): admin/update-meta was not working --- CHANGELOG.md | 11 ++++++++--- .../src/server/api/endpoints/admin/update-meta.ts | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18f8ede2ed..e1240b6368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,15 @@ You should also include the user name that made the change. --> -## 12.109.1 (2022/04/02) +## 12.x.x (unreleased) -### Known issues -- two-factor authentication is not working +### Improvements +- + +### Bugfixes +- API: admin/update-meta was not working + +## 12.109.1 (2022/04/02) ### Bugfixes - API: Renoteが行えない問題を修正 diff --git a/packages/backend/src/server/api/endpoints/admin/update-meta.ts b/packages/backend/src/server/api/endpoints/admin/update-meta.ts index 3c39bf0f30..b23ee9e3df 100644 --- a/packages/backend/src/server/api/endpoints/admin/update-meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/update-meta.ts @@ -397,12 +397,14 @@ export default define(meta, paramDef, async (ps, me) => { } await db.transaction(async transactionalEntityManager => { - const meta = await transactionalEntityManager.findOne(Meta, { + const metas = await transactionalEntityManager.find(Meta, { order: { id: 'DESC', }, }); + const meta = metas[0]; + if (meta) { await transactionalEntityManager.update(Meta, meta.id, set); } else { From e47a8bf666168737e7c9b00bd8330d5624c7cc60 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 3 Apr 2022 13:56:00 +0900 Subject: [PATCH 20/66] fix theme-color apply (#8464) --- packages/client/src/scripts/theme.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/client/src/scripts/theme.ts b/packages/client/src/scripts/theme.ts index 45743d0ffa..2cb78fae5c 100644 --- a/packages/client/src/scripts/theme.ts +++ b/packages/client/src/scripts/theme.ts @@ -51,14 +51,14 @@ export function applyTheme(theme: Theme, persist = true) { if (_theme.base) { const base = [lightTheme, darkTheme].find(x => x.id === _theme.base); - _theme.props = Object.assign({}, base.props, _theme.props); + if (base) _theme.props = Object.assign({}, base.props, _theme.props); } const props = compile(_theme); for (const tag of document.head.children) { if (tag.tagName === 'META' && tag.getAttribute('name') === 'theme-color') { - tag.setAttribute('content', props['html']); + tag.setAttribute('content', props['htmlThemeColor']); break; } } From ebb687cde4f58392b911efad5dd04099faa5ac26 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 13:56:44 +0900 Subject: [PATCH 21/66] Update CHANGELOG.md --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1240b6368..20a3aed277 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,8 @@ You should also include the user name that made the change. - ### Bugfixes -- API: admin/update-meta was not working +- API: admin/update-meta was not working @syuilo +- Client: テーマを切り替えたり読み込んだりするとmeta[name="theme-color"]のcontentがundefinedになる問題を修正 @tamaina ## 12.109.1 (2022/04/02) From c8935b32f889165782844a709c79df4325bbee58 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Sun, 3 Apr 2022 06:57:26 +0200 Subject: [PATCH 22/66] fix: validation (better #8456) (#8461) * Revert "revert 484e023c0" This reverts commit c03b70c949923b830a6d0361d1aa4d5f5614b7b7. * also allow pure renote * fix checks for pure renote --- packages/backend/src/models/schema/emoji.ts | 1 + packages/backend/src/models/schema/user.ts | 1 + .../server/api/endpoints/admin/drive/files.ts | 7 +- .../api/endpoints/admin/drive/show-file.ts | 20 +++-- .../api/endpoints/admin/emoji/list-remote.ts | 8 +- .../server/api/endpoints/admin/emoji/list.ts | 5 +- .../admin/emoji/set-category-bulk.ts | 6 +- .../api/endpoints/admin/emoji/update.ts | 6 +- .../server/api/endpoints/admin/show-users.ts | 9 +- .../server/api/endpoints/channels/pin-note.ts | 0 .../src/server/api/endpoints/clips/create.ts | 2 +- .../server/api/endpoints/drive/files/show.ts | 27 +++--- .../api/endpoints/federation/instances.ts | 2 +- .../api/endpoints/messaging/messages.ts | 19 +++-- .../endpoints/messaging/messages/create.ts | 17 +++- .../backend/src/server/api/endpoints/meta.ts | 1 + .../src/server/api/endpoints/mute/create.ts | 6 +- .../backend/src/server/api/endpoints/notes.ts | 2 +- .../src/server/api/endpoints/notes/create.ts | 83 ++++++++++++------- .../api/endpoints/notes/global-timeline.ts | 6 +- .../api/endpoints/notes/hybrid-timeline.ts | 6 +- .../api/endpoints/notes/local-timeline.ts | 6 +- .../api/endpoints/notes/search-by-tag.ts | 39 +++++++-- .../src/server/api/endpoints/notes/search.ts | 6 +- .../server/api/endpoints/notes/timeline.ts | 6 +- .../api/endpoints/notes/user-list-timeline.ts | 6 +- .../src/server/api/endpoints/pages/show.ts | 21 +++-- .../server/api/endpoints/users/followers.ts | 23 ++++- .../server/api/endpoints/users/following.ts | 23 ++++- .../users/search-by-username-and-host.ts | 5 +- .../src/server/api/endpoints/users/show.ts | 36 ++++++-- 31 files changed, 300 insertions(+), 105 deletions(-) delete mode 100644 packages/backend/src/server/api/endpoints/channels/pin-note.ts diff --git a/packages/backend/src/models/schema/emoji.ts b/packages/backend/src/models/schema/emoji.ts index 5f9af88db4..e97fdd5ef6 100644 --- a/packages/backend/src/models/schema/emoji.ts +++ b/packages/backend/src/models/schema/emoji.ts @@ -27,6 +27,7 @@ export const packedEmojiSchema = { host: { type: 'string', optional: false, nullable: true, + description: 'The local host is represented with `null`.', }, url: { type: 'string', diff --git a/packages/backend/src/models/schema/user.ts b/packages/backend/src/models/schema/user.ts index 616bedc0dc..253681695d 100644 --- a/packages/backend/src/models/schema/user.ts +++ b/packages/backend/src/models/schema/user.ts @@ -21,6 +21,7 @@ export const packedUserLiteSchema = { type: 'string', nullable: true, optional: false, example: 'misskey.example.com', + description: 'The local host is represented with `null`.', }, avatarUrl: { type: 'string', diff --git a/packages/backend/src/server/api/endpoints/admin/drive/files.ts b/packages/backend/src/server/api/endpoints/admin/drive/files.ts index 646d85a1e0..119c4db19b 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/files.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/files.ts @@ -27,7 +27,12 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, type: { type: 'string', nullable: true, pattern: /^[a-zA-Z0-9\/\-*]+$/.toString().slice(1, -1) }, origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: "local" }, - hostname: { type: 'string', nullable: true, default: null }, + hostname: { + type: 'string', + nullable: true, + default: null, + description: 'The local host is represented with `null`.', + }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts index 4b27fc0188..039df74f1b 100644 --- a/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts +++ b/packages/backend/src/server/api/endpoints/admin/drive/show-file.ts @@ -40,6 +40,7 @@ export const meta = { userHost: { type: 'string', optional: false, nullable: true, + description: 'The local host is represented with `null`.', }, md5: { type: 'string', @@ -151,11 +152,20 @@ export const meta = { export const paramDef = { type: 'object', - properties: { - fileId: { type: 'string', format: 'misskey:id' }, - url: { type: 'string' }, - }, - required: [], + anyOf: [ + { + properties: { + fileId: { type: 'string', format: 'misskey:id' }, + }, + required: ['fileId'], + }, + { + properties: { + url: { type: 'string' }, + }, + required: ['url'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index f19c3ddbd8..d16689a280 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -40,6 +40,7 @@ export const meta = { host: { type: 'string', optional: false, nullable: true, + description: 'The local host is represented with `null`.', }, url: { type: 'string', @@ -54,7 +55,12 @@ export const paramDef = { type: 'object', properties: { query: { type: 'string', nullable: true, default: null }, - host: { type: 'string', nullable: true, default: null }, + host: { + type: 'string', + nullable: true, + default: null, + description: 'Use `null` to represent the local host.', + }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index f488a71a00..6192978fad 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -38,8 +38,9 @@ export const meta = { optional: false, nullable: true, }, host: { - type: 'string', - optional: false, nullable: true, + type: 'null', + optional: false, + description: 'The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files.', }, url: { type: 'string', diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts index 6063f3e3be..cff58d6170 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/set-category-bulk.ts @@ -17,7 +17,11 @@ export const paramDef = { ids: { type: 'array', items: { type: 'string', format: 'misskey:id', } }, - category: { type: 'string', nullable: true }, + category: { + type: 'string', + nullable: true, + description: 'Use `null` to reset the category.', + }, }, required: ['ids'], } as const; diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index e26514e0ca..5b547b3b79 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -23,7 +23,11 @@ export const paramDef = { properties: { id: { type: 'string', format: 'misskey:id' }, name: { type: 'string' }, - category: { type: 'string', nullable: true }, + category: { + type: 'string', + nullable: true, + description: 'Use `null` to reset the category.', + }, aliases: { type: 'array', items: { type: 'string', } }, diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index 1ec86fef2e..2703b4b9db 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -26,8 +26,13 @@ export const paramDef = { sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] }, state: { type: 'string', enum: ['all', 'available', 'admin', 'moderator', 'adminOrModerator', 'silenced', 'suspended'], default: "all" }, origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: "local" }, - username: { type: 'string', default: null }, - hostname: { type: 'string', default: null }, + username: { type: 'string', nullable: true, default: null }, + hostname: { + type: 'string', + nullable: true, + default: null, + description: 'The local host is represented with `null`.', + }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/channels/pin-note.ts b/packages/backend/src/server/api/endpoints/channels/pin-note.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/backend/src/server/api/endpoints/clips/create.ts b/packages/backend/src/server/api/endpoints/clips/create.ts index a2dbef12e0..4afe4222a1 100644 --- a/packages/backend/src/server/api/endpoints/clips/create.ts +++ b/packages/backend/src/server/api/endpoints/clips/create.ts @@ -20,7 +20,7 @@ export const paramDef = { type: 'object', properties: { name: { type: 'string', minLength: 1, maxLength: 100 }, - isPublic: { type: 'boolean' }, + isPublic: { type: 'boolean', default: false }, description: { type: 'string', nullable: true, minLength: 1, maxLength: 2048 }, }, required: ['name'], diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index c8e9d3dd93..a2bc0c7aa4 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -28,22 +28,25 @@ export const meta = { code: 'ACCESS_DENIED', id: '25b73c73-68b1-41d0-bad1-381cfdf6579f', }, - - fileIdOrUrlRequired: { - message: 'fileId or url required.', - code: 'INVALID_PARAM', - id: '89674805-722c-440c-8d88-5641830dc3e4', - }, }, } as const; export const paramDef = { type: 'object', - properties: { - fileId: { type: 'string', format: 'misskey:id' }, - url: { type: 'string' }, - }, - required: [], + anyOf: [ + { + properties: { + fileId: { type: 'string', format: 'misskey:id' }, + }, + required: ['fileId'], + }, + { + properties: { + url: { type: 'string' }, + }, + required: ['url'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export @@ -62,8 +65,6 @@ export default define(meta, paramDef, async (ps, user) => { thumbnailUrl: ps.url, }], }); - } else { - throw new ApiError(meta.errors.fileIdOrUrlRequired); } if (file == null) { diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index e272971763..07e5c07c6a 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -22,7 +22,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { - host: { type: 'string', nullable: true }, + host: { type: 'string', nullable: true, description: 'Omit or use `null` to not filter by host.' }, blocked: { type: 'boolean', nullable: true }, notResponding: { type: 'boolean', nullable: true }, suspended: { type: 'boolean', nullable: true }, diff --git a/packages/backend/src/server/api/endpoints/messaging/messages.ts b/packages/backend/src/server/api/endpoints/messaging/messages.ts index 9760709c29..dbf1f6c868 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages.ts @@ -47,14 +47,25 @@ export const meta = { export const paramDef = { type: 'object', properties: { - userId: { type: 'string', format: 'misskey:id' }, - groupId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, markAsRead: { type: 'boolean', default: true }, }, - required: [], + anyOf: [ + { + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], + }, + { + properties: { + groupId: { type: 'string', format: 'misskey:id' }, + }, + required: ['groupId'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export @@ -126,7 +137,5 @@ export default define(meta, paramDef, async (ps, user) => { return await Promise.all(messages.map(message => MessagingMessages.pack(message, user, { populateGroup: false, }))); - } else { - throw new Error(); } }); diff --git a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts index 8c1226b0f4..405af5ec17 100644 --- a/packages/backend/src/server/api/endpoints/messaging/messages/create.ts +++ b/packages/backend/src/server/api/endpoints/messaging/messages/create.ts @@ -67,12 +67,23 @@ export const meta = { export const paramDef = { type: 'object', properties: { - userId: { type: 'string', format: 'misskey:id' }, - groupId: { type: 'string', format: 'misskey:id' }, text: { type: 'string', nullable: true, maxLength: 3000 }, fileId: { type: 'string', format: 'misskey:id' }, }, - required: [], + anyOf: [ + { + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], + }, + { + properties: { + groupId: { type: 'string', format: 'misskey:id' }, + }, + required: ['groupId'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 057d22f33b..e1ae282a97 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -169,6 +169,7 @@ export const meta = { host: { type: 'string', optional: false, nullable: true, + description: 'The local host is represented with `null`.', }, url: { type: 'string', diff --git a/packages/backend/src/server/api/endpoints/mute/create.ts b/packages/backend/src/server/api/endpoints/mute/create.ts index 0c3a3453f1..7e857e6731 100644 --- a/packages/backend/src/server/api/endpoints/mute/create.ts +++ b/packages/backend/src/server/api/endpoints/mute/create.ts @@ -38,7 +38,11 @@ export const paramDef = { type: 'object', properties: { userId: { type: 'string', format: 'misskey:id' }, - expiresAt: { type: 'integer', nullable: true }, + expiresAt: { + type: 'integer', + nullable: true, + description: 'A Unix Epoch timestamp that must lie in the future. `null` means an indefinite mute.', + }, }, required: ['userId'], } as const; diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 96657f8d3f..99c8b973f6 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -19,7 +19,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { - local: { type: 'boolean' }, + local: { type: 'boolean', default: false }, reply: { type: 'boolean' }, renote: { type: 'boolean' }, withFiles: { type: 'boolean' }, diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 961983f5f4..24d0c8134f 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -59,12 +59,6 @@ export const meta = { id: '3ac74a84-8fd5-4bb0-870f-01804f82ce15', }, - contentRequired: { - message: 'Content required. You need to set text, fileIds, renoteId or poll.', - code: 'CONTENT_REQUIRED', - id: '6f57e42b-c348-439b-bc45-993995cc515a', - }, - cannotCreateAlreadyExpiredPoll: { message: 'Poll is already expired.', code: 'CANNOT_CREATE_ALREADY_EXPIRED_POLL', @@ -92,29 +86,41 @@ export const paramDef = { visibleUserIds: { type: 'array', uniqueItems: true, items: { type: 'string', format: 'misskey:id', } }, - text: { type: 'string', nullable: true, maxLength: MAX_NOTE_TEXT_LENGTH, default: null }, + text: { type: 'string', maxLength: MAX_NOTE_TEXT_LENGTH, nullable: true }, cw: { type: 'string', nullable: true, maxLength: 100 }, localOnly: { type: 'boolean', default: false }, noExtractMentions: { type: 'boolean', default: false }, noExtractHashtags: { type: 'boolean', default: false }, noExtractEmojis: { type: 'boolean', default: false }, - fileIds: { type: 'array', uniqueItems: true, minItems: 1, maxItems: 16, items: { - type: 'string', format: 'misskey:id', - } }, - mediaIds: { type: 'array', uniqueItems: true, minItems: 1, maxItems: 16, items: { - type: 'string', format: 'misskey:id', - } }, + fileIds: { + type: 'array', + uniqueItems: true, + minItems: 1, + maxItems: 16, + items: { type: 'string', format: 'misskey:id' }, + }, + mediaIds: { + deprecated: true, + description: 'Use `fileIds` instead. If both are specified, this property is discarded.', + type: 'array', + uniqueItems: true, + minItems: 1, + maxItems: 16, + items: { type: 'string', format: 'misskey:id' }, + }, replyId: { type: 'string', format: 'misskey:id', nullable: true }, renoteId: { type: 'string', format: 'misskey:id', nullable: true }, channelId: { type: 'string', format: 'misskey:id', nullable: true }, poll: { - type: 'object', nullable: true, + type: 'object', + nullable: true, properties: { choices: { - type: 'array', uniqueItems: true, minItems: 2, maxItems: 10, - items: { - type: 'string', minLength: 1, maxLength: 50, - }, + type: 'array', + uniqueItems: true, + minItems: 2, + maxItems: 10, + items: { type: 'string', minLength: 1, maxLength: 50 }, }, multiple: { type: 'boolean', default: false }, expiresAt: { type: 'integer', nullable: true }, @@ -123,7 +129,34 @@ export const paramDef = { required: ['choices'], }, }, - required: [], + anyOf: [ + { + // (re)note with text, files and poll are optional + properties: { + text: { type: 'string', maxLength: MAX_NOTE_TEXT_LENGTH, nullable: false }, + }, + required: ['text'], + }, + { + // (re)note with files, text and poll are optional + required: ['fileIds'], + }, + { + // (re)note with files, text and poll are optional + required: ['mediaIds'], + }, + { + // (re)note with poll, text and files are optional + properties: { + poll: { type: 'object', nullable: false, }, + }, + required: ['poll'], + }, + { + // pure renote + required: ['renoteId'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export @@ -152,7 +185,7 @@ export default define(meta, paramDef, async (ps, user) => { if (renote == null) { throw new ApiError(meta.errors.noSuchRenoteTarget); - } else if (renote.renoteId && !renote.text && !renote.fileIds) { + } else if (renote.renoteId && !renote.text && !renote.fileIds && !renote.poll) { throw new ApiError(meta.errors.cannotReRenote); } @@ -175,10 +208,7 @@ export default define(meta, paramDef, async (ps, user) => { if (reply == null) { throw new ApiError(meta.errors.noSuchReplyTarget); - } - - // 返信対象が引用でないRenoteだったらエラー - if (reply.renoteId && !reply.text && !reply.fileIds) { + } else if (reply.renoteId && !reply.text && !reply.fileIds && !renote.poll) { throw new ApiError(meta.errors.cannotReplyToPureRenote); } @@ -204,11 +234,6 @@ export default define(meta, paramDef, async (ps, user) => { } } - // テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー - if (!(ps.text || files.length || renote || ps.poll)) { - throw new ApiError(meta.errors.contentRequired); - } - let channel: Channel | undefined; if (ps.channelId != null) { channel = await Channels.findOneBy({ id: ps.channelId }); diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts index 09a8194665..cb402ecaa1 100644 --- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts @@ -35,7 +35,11 @@ export const meta = { export const paramDef = { type: 'object', properties: { - withFiles: { type: 'boolean' }, + withFiles: { + type: 'boolean', + default: false, + description: 'Only show notes that have attached files.', + }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 7c9c122963..f9893527e0 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -48,7 +48,11 @@ export const paramDef = { includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, - withFiles: { type: 'boolean' }, + withFiles: { + type: 'boolean', + default: false, + description: 'Only show notes that have attached files.', + }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts index bb0bbe2a20..03edf30b31 100644 --- a/packages/backend/src/server/api/endpoints/notes/local-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/local-timeline.ts @@ -37,7 +37,11 @@ export const meta = { export const paramDef = { type: 'object', properties: { - withFiles: { type: 'boolean' }, + withFiles: { + type: 'boolean', + default: false, + description: 'Only show notes that have attached files.', + }, fileType: { type: 'array', items: { type: 'string', } }, diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index c6503eb057..bb85c92008 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -25,21 +25,44 @@ export const meta = { export const paramDef = { type: 'object', properties: { - tag: { type: 'string' }, - query: { type: 'array', items: { - type: 'array', items: { - type: 'string', - }, - } }, reply: { type: 'boolean', nullable: true, default: null }, renote: { type: 'boolean', nullable: true, default: null }, - withFiles: { type: 'boolean' }, + withFiles: { + type: 'boolean', + default: false, + description: 'Only show notes that have attached files.', + }, poll: { type: 'boolean', nullable: true, default: null }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, }, - required: [], + anyOf: [ + { + properties: { + tag: { type: 'string', minLength: 1 }, + }, + required: ['tag'], + }, + { + properties: { + query: { + type: 'array', + description: 'The outer arrays are chained with OR, the inner arrays are chained with AND.', + items: { + type: 'array', + items: { + type: 'string', + minLength: 1, + }, + minItems: 1, + }, + minItems: 1, + }, + }, + required: ['query'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index e77892b150..af9b5f0a10 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -35,7 +35,11 @@ export const paramDef = { untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, offset: { type: 'integer', default: 0 }, - host: { type: 'string', nullable: true }, + host: { + type: 'string', + nullable: true, + description: 'The local host is represented with `null`.', + }, userId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, channelId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, }, diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index fde66b241b..0f976d18be 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -38,7 +38,11 @@ export const paramDef = { includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, - withFiles: { type: 'boolean' }, + withFiles: { + type: 'boolean', + default: false, + description: 'Only show notes that have attached files.', + }, }, required: [], } as const; diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 866e306d8d..6c6402603a 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -42,7 +42,11 @@ export const paramDef = { includeMyRenotes: { type: 'boolean', default: true }, includeRenotedMyNotes: { type: 'boolean', default: true }, includeLocalRenotes: { type: 'boolean', default: true }, - withFiles: { type: 'boolean' }, + withFiles: { + type: 'boolean', + default: false, + description: 'Only show notes that have attached files.', + }, }, required: ['listId'], } as const; diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 1c218acfd4..3dcce8550f 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -26,12 +26,21 @@ export const meta = { export const paramDef = { type: 'object', - properties: { - pageId: { type: 'string', format: 'misskey:id' }, - name: { type: 'string' }, - username: { type: 'string' }, - }, - required: [], + anyOf: [ + { + properties: { + pageId: { type: 'string', format: 'misskey:id' }, + }, + required: ['pageId'], + }, + { + properties: { + name: { type: 'string' }, + username: { type: 'string' }, + }, + required: ['name', 'username'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index 5de624312a..26b1f20df0 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -38,14 +38,29 @@ export const meta = { export const paramDef = { type: 'object', properties: { - userId: { type: 'string', format: 'misskey:id' }, - username: { type: 'string' }, - host: { type: 'string', nullable: true }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, }, - required: [], + anyOf: [ + { + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], + }, + { + properties: { + username: { type: 'string' }, + host: { + type: 'string', + nullable: true, + description: 'The local host is represented with `null`.', + }, + }, + required: ['username', 'host'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 55460f7c67..42cf5216e8 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -38,14 +38,29 @@ export const meta = { export const paramDef = { type: 'object', properties: { - userId: { type: 'string', format: 'misskey:id' }, - username: { type: 'string' }, - host: { type: 'string', nullable: true }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, }, - required: [], + anyOf: [ + { + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], + }, + { + properties: { + username: { type: 'string' }, + host: { + type: 'string', + nullable: true, + description: 'The local host is represented with `null`.', + }, + }, + required: ['username', 'host'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index 897b5de3fe..f74d80e2ae 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -28,7 +28,10 @@ export const paramDef = { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, detail: { type: 'boolean', default: true }, }, - required: [], + anyOf: [ + { required: ['username'] }, + { required: ['host'] }, + ], } as const; // TODO: avatar,bannerをJOINしたいけどエラーになる diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index 775a4b29ff..b1a568145a 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -46,15 +46,33 @@ export const meta = { export const paramDef = { type: 'object', - properties: { - userId: { type: 'string', format: 'misskey:id' }, - userIds: { type: 'array', uniqueItems: true, items: { - type: 'string', format: 'misskey:id', - } }, - username: { type: 'string' }, - host: { type: 'string', nullable: true }, - }, - required: [], + anyOf: [ + { + properties: { + userId: { type: 'string', format: 'misskey:id' }, + }, + required: ['userId'], + }, + { + properties: { + userIds: { type: 'array', uniqueItems: true, items: { + type: 'string', format: 'misskey:id', + } }, + }, + required: ['userIds'], + }, + { + properties: { + username: { type: 'string' }, + host: { + type: 'string', + nullable: true, + description: 'The local host is represented with `null`.', + }, + }, + required: ['username', 'host'], + }, + ], } as const; // eslint-disable-next-line import/no-default-export From 395fe7eb4b376a2e76d914e7f26de3535e6d4f40 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 14:01:12 +0900 Subject: [PATCH 23/66] 12.109.2 --- CHANGELOG.md | 5 +---- package.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 20a3aed277..c874648efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,10 +10,7 @@ You should also include the user name that made the change. --> -## 12.x.x (unreleased) - -### Improvements -- +## 12.109.2 (2022/04/03) ### Bugfixes - API: admin/update-meta was not working @syuilo diff --git a/package.json b/package.json index 425d2b1e53..9ab8f1eccc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.109.1", + "version": "12.109.2", "codename": "indigo", "repository": { "type": "git", From 433505df48b55642aa41195db8f94679534415a4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 15:14:26 +0900 Subject: [PATCH 24/66] fix e2e test --- packages/backend/src/db/postgre.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/db/postgre.ts b/packages/backend/src/db/postgre.ts index f7638a53d0..eb5fc2e186 100644 --- a/packages/backend/src/db/postgre.ts +++ b/packages/backend/src/db/postgre.ts @@ -209,7 +209,11 @@ export const db = new DataSource({ }); export async function initDb() { - await db.connect(); + if (db.isInitialized) { + // nop + } else { + await db.connect(); + } } export async function resetDb() { From 403b82277c80d5015ad90b32ec15a2bf0b56936c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 15:21:46 +0900 Subject: [PATCH 25/66] refactor actions --- .github/workflows/lint.yml | 10 +++++----- .github/workflows/test.yml | 16 ++++++++++------ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 74f9a4e532..25082f82ed 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,12 +14,12 @@ jobs: - uses: actions/checkout@v2 with: submodules: true - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v3 with: node-version: 16.x - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + cache: 'yarn' + cache-dependency-path: | + src/packages/backend/yarn.lock + src/packages/client/yarn.lock - run: yarn install - run: yarn lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e9585f96d..0203995ac9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,9 +33,13 @@ jobs: with: submodules: true - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + cache: 'yarn' + cache-dependency-path: | + src/packages/backend/yarn.lock + src/packages/client/yarn.lock - name: Install dependencies run: yarn install - name: Check yarn.lock @@ -80,13 +84,13 @@ jobs: #- uses: browser-actions/setup-firefox@latest # if: ${{ matrix.browser == 'firefox' }} - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - uses: actions/cache@v2 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + cache: 'yarn' + cache-dependency-path: | + src/packages/backend/yarn.lock + src/packages/client/yarn.lock - name: Install dependencies run: yarn install - name: Check yarn.lock From b8360313e8e88c2dc85e313ac0d805a7bc69e0ef Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 15:24:29 +0900 Subject: [PATCH 26/66] chore: fix paths --- .github/workflows/lint.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 25082f82ed..da2c73a656 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: node-version: 16.x cache: 'yarn' cache-dependency-path: | - src/packages/backend/yarn.lock - src/packages/client/yarn.lock + packages/backend/yarn.lock + packages/client/yarn.lock - run: yarn install - run: yarn lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0203995ac9..d57d85c874 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,8 +38,8 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'yarn' cache-dependency-path: | - src/packages/backend/yarn.lock - src/packages/client/yarn.lock + packages/backend/yarn.lock + packages/client/yarn.lock - name: Install dependencies run: yarn install - name: Check yarn.lock @@ -89,8 +89,8 @@ jobs: node-version: ${{ matrix.node-version }} cache: 'yarn' cache-dependency-path: | - src/packages/backend/yarn.lock - src/packages/client/yarn.lock + packages/backend/yarn.lock + packages/client/yarn.lock - name: Install dependencies run: yarn install - name: Check yarn.lock From 41c2aed7dc760d8a89cd09c32cfbee620596fb61 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 15:33:22 +0900 Subject: [PATCH 27/66] chore: fix lint --- packages/backend/src/misc/fetch.ts | 4 +-- packages/backend/src/misc/get-note-summary.ts | 2 +- .../src/remote/activitypub/ap-request.ts | 2 +- .../src/remote/activitypub/deliver-manager.ts | 6 ++-- .../src/remote/activitypub/kernel/read.ts | 2 +- .../remote/activitypub/kernel/undo/accept.ts | 2 +- .../src/remote/activitypub/models/question.ts | 2 +- packages/backend/src/server/api/2fa.ts | 34 +++++++++---------- .../api/endpoints/drive/files/create.ts | 1 - .../server/api/endpoints/i/2fa/key-done.ts | 6 ++-- .../server/api/endpoints/i/authorized-apps.ts | 2 +- .../backend/src/server/api/endpoints/notes.ts | 8 ++--- .../api/endpoints/notes/conversation.ts | 2 +- .../server/api/endpoints/notes/polls/vote.ts | 2 +- .../backend/src/server/api/private/signin.ts | 6 ++-- .../src/services/drive/upload-from-url.ts | 4 +-- .../backend/src/services/following/create.ts | 2 +- 17 files changed, 43 insertions(+), 44 deletions(-) diff --git a/packages/backend/src/misc/fetch.ts b/packages/backend/src/misc/fetch.ts index 47a5cd471a..4b1013c9f5 100644 --- a/packages/backend/src/misc/fetch.ts +++ b/packages/backend/src/misc/fetch.ts @@ -120,9 +120,9 @@ export const httpsAgent = config.proxy */ export function getAgentByUrl(url: URL, bypassProxy = false) { if (bypassProxy || (config.proxyBypassHosts || []).includes(url.hostname)) { - return url.protocol == 'http:' ? _http : _https; + return url.protocol === 'http:' ? _http : _https; } else { - return url.protocol == 'http:' ? httpAgent : httpsAgent; + return url.protocol === 'http:' ? httpAgent : httpsAgent; } } diff --git a/packages/backend/src/misc/get-note-summary.ts b/packages/backend/src/misc/get-note-summary.ts index 93783873da..3f35ccee82 100644 --- a/packages/backend/src/misc/get-note-summary.ts +++ b/packages/backend/src/misc/get-note-summary.ts @@ -23,7 +23,7 @@ export const getNoteSummary = (note: Packed<'Note'>): string => { } // ファイルが添付されているとき - if ((note.files || []).length != 0) { + if ((note.files || []).length !== 0) { summary += ` (📎${note.files!.length})`; } diff --git a/packages/backend/src/remote/activitypub/ap-request.ts b/packages/backend/src/remote/activitypub/ap-request.ts index 96bfec3b11..8b55f22477 100644 --- a/packages/backend/src/remote/activitypub/ap-request.ts +++ b/packages/backend/src/remote/activitypub/ap-request.ts @@ -95,7 +95,7 @@ function genSigningString(request: Request, includeHeaders: string[]) { function lcObjectKey(src: Record) { const dst: Record = {}; - for (const key of Object.keys(src).filter(x => x != '__proto__' && typeof src[x] === 'string')) dst[key.toLowerCase()] = src[key]; + for (const key of Object.keys(src).filter(x => x !== '__proto__' && typeof src[x] === 'string')) dst[key.toLowerCase()] = src[key]; return dst; } diff --git a/packages/backend/src/remote/activitypub/deliver-manager.ts b/packages/backend/src/remote/activitypub/deliver-manager.ts index f95f64f77c..142486f82b 100644 --- a/packages/backend/src/remote/activitypub/deliver-manager.ts +++ b/packages/backend/src/remote/activitypub/deliver-manager.ts @@ -109,14 +109,14 @@ export default class DeliverManager { } } - this.recipes.filter((recipe): recipe is IDirectRecipe => { + this.recipes.filter((recipe): recipe is IDirectRecipe => // followers recipes have already been processed isDirect(recipe) // check that shared inbox has not been added yet && !(recipe.to.sharedInbox && inboxes.has(recipe.to.sharedInbox)) // check that they actually have an inbox - && recipe.to.inbox - }) + && recipe.to.inbox != null, + ) .forEach(recipe => inboxes.add(recipe.to.inbox)); // deliver diff --git a/packages/backend/src/remote/activitypub/kernel/read.ts b/packages/backend/src/remote/activitypub/kernel/read.ts index 7f1519ac2e..f7b0bcecdf 100644 --- a/packages/backend/src/remote/activitypub/kernel/read.ts +++ b/packages/backend/src/remote/activitypub/kernel/read.ts @@ -18,7 +18,7 @@ export const performReadActivity = async (actor: CacheableRemoteUser, activity: return `skip: message not found`; } - if (actor.id != message.recipientId) { + if (actor.id !== message.recipientId) { return `skip: actor is not a message recipient`; } diff --git a/packages/backend/src/remote/activitypub/kernel/undo/accept.ts b/packages/backend/src/remote/activitypub/kernel/undo/accept.ts index 8f6eab6858..a6e3929b0f 100644 --- a/packages/backend/src/remote/activitypub/kernel/undo/accept.ts +++ b/packages/backend/src/remote/activitypub/kernel/undo/accept.ts @@ -1,6 +1,6 @@ import unfollow from '@/services/following/delete.js'; import cancelRequest from '@/services/following/requests/cancel.js'; -import {IAccept} from '../../type.js'; +import { IAccept } from '../../type.js'; import { CacheableRemoteUser } from '@/models/entities/user.js'; import { Followings } from '@/models/index.js'; import DbResolver from '../../db-resolver.js'; diff --git a/packages/backend/src/remote/activitypub/models/question.ts b/packages/backend/src/remote/activitypub/models/question.ts index 9e75864c63..034501572a 100644 --- a/packages/backend/src/remote/activitypub/models/question.ts +++ b/packages/backend/src/remote/activitypub/models/question.ts @@ -69,7 +69,7 @@ export async function updateQuestion(value: any) { const oldCount = poll.votes[poll.choices.indexOf(choice)]; const newCount = apChoices!.filter(ap => ap.name === choice)[0].replies!.totalItems; - if (oldCount != newCount) { + if (oldCount !== newCount) { changed = true; poll.votes[poll.choices.indexOf(choice)] = newCount; } diff --git a/packages/backend/src/server/api/2fa.ts b/packages/backend/src/server/api/2fa.ts index e1c226979a..dce8accaac 100644 --- a/packages/backend/src/server/api/2fa.ts +++ b/packages/backend/src/server/api/2fa.ts @@ -121,14 +121,14 @@ export function verifyLogin({ signature: Buffer, challenge: string }) { - if (clientData.type != 'webauthn.get') { + if (clientData.type !== 'webauthn.get') { throw new Error('type is not webauthn.get'); } - if (hash(clientData.challenge).toString('hex') != challenge) { + if (hash(clientData.challenge).toString('hex') !== challenge) { throw new Error('challenge mismatch'); } - if (clientData.origin != config.scheme + '://' + config.host) { + if (clientData.origin !== config.scheme + '://' + config.host) { throw new Error('origin mismatch'); } @@ -148,11 +148,11 @@ export const procedures = { verify({ publicKey }: {publicKey: Map}) { const negTwo = publicKey.get(-2); - if (!negTwo || negTwo.length != 32) { + if (!negTwo || negTwo.length !== 32) { throw new Error('invalid or no -2 key given'); } const negThree = publicKey.get(-3); - if (!negThree || negThree.length != 32) { + if (!negThree || negThree.length !== 32) { throw new Error('invalid or no -3 key given'); } @@ -183,7 +183,7 @@ export const procedures = { rpIdHash: Buffer, credentialId: Buffer, }) { - if (attStmt.alg != -7) { + if (attStmt.alg !== -7) { throw new Error('alg mismatch'); } @@ -196,11 +196,11 @@ export const procedures = { const negTwo = publicKey.get(-2); - if (!negTwo || negTwo.length != 32) { + if (!negTwo || negTwo.length !== 32) { throw new Error('invalid or no -2 key given'); } const negThree = publicKey.get(-3); - if (!negThree || negThree.length != 32) { + if (!negThree || negThree.length !== 32) { throw new Error('invalid or no -3 key given'); } @@ -263,7 +263,7 @@ export const procedures = { .map((key: any) => PEMString(key)) .concat([GSR2]); - if (getCertSubject(certificateChain[0]).CN != 'attest.android.com') { + if (getCertSubject(certificateChain[0]).CN !== 'attest.android.com') { throw new Error('invalid common name'); } @@ -283,11 +283,11 @@ export const procedures = { const negTwo = publicKey.get(-2); - if (!negTwo || negTwo.length != 32) { + if (!negTwo || negTwo.length !== 32) { throw new Error('invalid or no -2 key given'); } const negThree = publicKey.get(-3); - if (!negThree || negThree.length != 32) { + if (!negThree || negThree.length !== 32) { throw new Error('invalid or no -3 key given'); } @@ -332,11 +332,11 @@ export const procedures = { const negTwo = publicKey.get(-2); - if (!negTwo || negTwo.length != 32) { + if (!negTwo || negTwo.length !== 32) { throw new Error('invalid or no -2 key given'); } const negThree = publicKey.get(-3); - if (!negThree || negThree.length != 32) { + if (!negThree || negThree.length !== 32) { throw new Error('invalid or no -3 key given'); } @@ -353,7 +353,7 @@ export const procedures = { // https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-ecdaa-algorithm-v2.0-id-20180227.html#ecdaa-verify-operation throw new Error('ECDAA-Verify is not supported'); } else { - if (attStmt.alg != -7) throw new Error('alg mismatch'); + if (attStmt.alg !== -7) throw new Error('alg mismatch'); throw new Error('self attestation is not supported'); } @@ -377,7 +377,7 @@ export const procedures = { credentialId: Buffer }) { const x5c: Buffer[] = attStmt.x5c; - if (x5c.length != 1) { + if (x5c.length !== 1) { throw new Error('x5c length does not match expectation'); } @@ -387,11 +387,11 @@ export const procedures = { const negTwo: Buffer = publicKey.get(-2); - if (!negTwo || negTwo.length != 32) { + if (!negTwo || negTwo.length !== 32) { throw new Error('invalid or no -2 key given'); } const negThree: Buffer = publicKey.get(-3); - if (!negThree || negThree.length != 32) { + if (!negThree || negThree.length !== 32) { throw new Error('invalid or no -3 key given'); } diff --git a/packages/backend/src/server/api/endpoints/drive/files/create.ts b/packages/backend/src/server/api/endpoints/drive/files/create.ts index b6a2cf7200..0939ae3365 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/create.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/create.ts @@ -48,7 +48,6 @@ export const paramDef = { } as const; // eslint-disable-next-line import/no-default-export -// @ts-ignore export default define(meta, paramDef, async (ps, user, _, file, cleanup) => { // Get 'name' parameter let name = ps.name || file.originalname; diff --git a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts index 0116a55fb7..1afb34bfda 100644 --- a/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts +++ b/packages/backend/src/server/api/endpoints/i/2fa/key-done.ts @@ -50,10 +50,10 @@ export default define(meta, paramDef, async (ps, user) => { const clientData = JSON.parse(ps.clientDataJSON); - if (clientData.type != 'webauthn.create') { + if (clientData.type !== 'webauthn.create') { throw new Error('not a creation attestation'); } - if (clientData.origin != config.scheme + '://' + config.host) { + if (clientData.origin !== config.scheme + '://' + config.host) { throw new Error('origin mismatch'); } @@ -78,7 +78,7 @@ export default define(meta, paramDef, async (ps, user) => { const credentialId = authData.slice(55, 55 + credentialIdLength); const publicKeyData = authData.slice(55 + credentialIdLength); const publicKey: Map = await cborDecodeFirst(publicKeyData); - if (publicKey.get(3) != -7) { + if (publicKey.get(3) !== -7) { throw new Error('alg mismatch'); } diff --git a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts index 3301808e75..68bd103a6d 100644 --- a/packages/backend/src/server/api/endpoints/i/authorized-apps.ts +++ b/packages/backend/src/server/api/endpoints/i/authorized-apps.ts @@ -27,7 +27,7 @@ export default define(meta, paramDef, async (ps, user) => { take: ps.limit, skip: ps.offset, order: { - id: ps.sort == 'asc' ? 1 : -1, + id: ps.sort === 'asc' ? 1 : -1, }, }); diff --git a/packages/backend/src/server/api/endpoints/notes.ts b/packages/backend/src/server/api/endpoints/notes.ts index 99c8b973f6..2733c826e9 100644 --- a/packages/backend/src/server/api/endpoints/notes.ts +++ b/packages/backend/src/server/api/endpoints/notes.ts @@ -52,19 +52,19 @@ export default define(meta, paramDef, async (ps) => { query.andWhere('note.userHost IS NULL'); } - if (ps.reply != undefined) { + if (ps.reply !== undefined) { query.andWhere(ps.reply ? 'note.replyId IS NOT NULL' : 'note.replyId IS NULL'); } - if (ps.renote != undefined) { + if (ps.renote !== undefined) { query.andWhere(ps.renote ? 'note.renoteId IS NOT NULL' : 'note.renoteId IS NULL'); } - if (ps.withFiles != undefined) { + if (ps.withFiles !== undefined) { query.andWhere(ps.withFiles ? `note.fileIds != '{}'` : `note.fileIds = '{}'`); } - if (ps.poll != undefined) { + if (ps.poll !== undefined) { query.andWhere(ps.poll ? 'note.hasPoll = TRUE' : 'note.hasPoll = FALSE'); } diff --git a/packages/backend/src/server/api/endpoints/notes/conversation.ts b/packages/backend/src/server/api/endpoints/notes/conversation.ts index 8f5d21db60..b991a495f2 100644 --- a/packages/backend/src/server/api/endpoints/notes/conversation.ts +++ b/packages/backend/src/server/api/endpoints/notes/conversation.ts @@ -57,7 +57,7 @@ export default define(meta, paramDef, async (ps, user) => { conversation.push(p); } - if (conversation.length == ps.limit) { + if (conversation.length === ps.limit) { return; } diff --git a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts index 6380b331f2..6244b55cf2 100644 --- a/packages/backend/src/server/api/endpoints/notes/polls/vote.ts +++ b/packages/backend/src/server/api/endpoints/notes/polls/vote.ts @@ -110,7 +110,7 @@ export default define(meta, paramDef, async (ps, user) => { if (exist.length) { if (poll.multiple) { - if (exist.some(x => x.choice == ps.choice)) { + if (exist.some(x => x.choice === ps.choice)) { throw new ApiError(meta.errors.alreadyVoted); } } else { diff --git a/packages/backend/src/server/api/private/signin.ts b/packages/backend/src/server/api/private/signin.ts index 3f7118ad22..7b66657ad8 100644 --- a/packages/backend/src/server/api/private/signin.ts +++ b/packages/backend/src/server/api/private/signin.ts @@ -24,17 +24,17 @@ export default async (ctx: Koa.Context) => { ctx.body = { error }; } - if (typeof username != 'string') { + if (typeof username !== 'string') { ctx.status = 400; return; } - if (typeof password != 'string') { + if (typeof password !== 'string') { ctx.status = 400; return; } - if (token != null && typeof token != 'string') { + if (token != null && typeof token !== 'string') { ctx.status = 400; return; } diff --git a/packages/backend/src/services/drive/upload-from-url.ts b/packages/backend/src/services/drive/upload-from-url.ts index 5007fff6ee..79b1b8c2e1 100644 --- a/packages/backend/src/services/drive/upload-from-url.ts +++ b/packages/backend/src/services/drive/upload-from-url.ts @@ -29,7 +29,7 @@ export async function uploadFromUrl({ sensitive = false, force = false, isLink = false, - comment = null + comment = null, }: Args): Promise { let name = new URL(url).pathname.split('/').pop() || null; if (name == null || !DriveFiles.validateFileName(name)) { @@ -38,7 +38,7 @@ export async function uploadFromUrl({ // If the comment is same as the name, skip comment // (image.name is passed in when receiving attachment) - if (comment !== null && name == comment) { + if (comment !== null && name === comment) { comment = null; } diff --git a/packages/backend/src/services/following/create.ts b/packages/backend/src/services/following/create.ts index d243317d97..7bc839c62e 100644 --- a/packages/backend/src/services/following/create.ts +++ b/packages/backend/src/services/following/create.ts @@ -108,7 +108,7 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[ // Publish followed event if (Users.isLocalUser(followee)) { Users.pack(follower.id, followee).then(async packed => { - publishMainStream(followee.id, 'followed', packed) + publishMainStream(followee.id, 'followed', packed); const webhooks = (await getActiveWebhooks()).filter(x => x.userId === followee.id && x.on.includes('followed')); for (const webhook of webhooks) { From 91f4ec3747e814b941051b665645aae2433e6c1c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 16:30:22 +0900 Subject: [PATCH 28/66] fix types --- packages/backend/src/misc/captcha.ts | 3 ++- .../src/remote/activitypub/misc/ld-signature.ts | 3 ++- .../src/server/api/endpoints/notes/translate.ts | 3 ++- .../backend/src/services/fetch-instance-metadata.ts | 11 ++++++----- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/misc/captcha.ts b/packages/backend/src/misc/captcha.ts index 293cbdcd37..9a87a4a3c8 100644 --- a/packages/backend/src/misc/captcha.ts +++ b/packages/backend/src/misc/captcha.ts @@ -42,7 +42,8 @@ async function getCaptchaResponse(url: string, secret: string, response: string) headers: { 'User-Agent': config.userAgent, }, - timeout: 10 * 1000, + // TODO + //timeout: 10 * 1000, agent: getAgentByUrl, }).catch(e => { throw `${e.message || e}`; diff --git a/packages/backend/src/remote/activitypub/misc/ld-signature.ts b/packages/backend/src/remote/activitypub/misc/ld-signature.ts index 5132c6ef96..362a543ece 100644 --- a/packages/backend/src/remote/activitypub/misc/ld-signature.ts +++ b/packages/backend/src/remote/activitypub/misc/ld-signature.ts @@ -113,7 +113,8 @@ export class LdSignature { headers: { Accept: 'application/ld+json, application/json', }, - timeout: this.loderTimeout, + // TODO + //timeout: this.loderTimeout, agent: u => u.protocol === 'http:' ? httpAgent : httpsAgent, }).then(res => { if (!res.ok) { diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index 068df6940b..c602981b30 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -75,7 +75,8 @@ export default define(meta, paramDef, async (ps, user) => { Accept: 'application/json, */*', }, body: params, - timeout: 10000, + // TODO + //timeout: 10000, agent: getAgentByUrl, }); diff --git a/packages/backend/src/services/fetch-instance-metadata.ts b/packages/backend/src/services/fetch-instance-metadata.ts index 2b6f82a910..d5294c5fe8 100644 --- a/packages/backend/src/services/fetch-instance-metadata.ts +++ b/packages/backend/src/services/fetch-instance-metadata.ts @@ -97,7 +97,7 @@ async function fetchNodeinfo(instance: Instance): Promise { } else { throw e.statusCode || e.message; } - }); + }) as Record; if (wellknown.links == null || !Array.isArray(wellknown.links)) { throw 'No wellknown links'; @@ -121,7 +121,7 @@ async function fetchNodeinfo(instance: Instance): Promise { logger.succ(`Successfuly fetched nodeinfo of ${instance.host}`); - return info; + return info as NodeInfo; } catch (e) { logger.error(`Failed to fetch nodeinfo of ${instance.host}: ${e}`); @@ -142,12 +142,12 @@ async function fetchDom(instance: Instance): Promise { return doc; } -async function fetchManifest(instance: Instance): Promise | null> { +async function fetchManifest(instance: Instance): Promise | null> { const url = 'https://' + instance.host; const manifestUrl = url + '/manifest.json'; - const manifest = await getJson(manifestUrl); + const manifest = await getJson(manifestUrl) as Record; return manifest; } @@ -167,7 +167,8 @@ async function fetchFaviconUrl(instance: Instance, doc: DOMWindow['document'] | const faviconUrl = url + '/favicon.ico'; const favicon = await fetch(faviconUrl, { - timeout: 10000, + // TODO + //timeout: 10000, agent: getAgentByUrl, }); From ff9a074ab645739288e4ca2b155c075abf6693e9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 16:35:36 +0900 Subject: [PATCH 29/66] fix type --- packages/backend/src/remote/webfinger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/remote/webfinger.ts b/packages/backend/src/remote/webfinger.ts index 9d3bfab24b..337df34c2d 100644 --- a/packages/backend/src/remote/webfinger.ts +++ b/packages/backend/src/remote/webfinger.ts @@ -15,7 +15,7 @@ type IWebFinger = { export default async function(query: string): Promise { const url = genUrl(query); - return await getJson(url, 'application/jrd+json, application/json'); + return await getJson(url, 'application/jrd+json, application/json') as IWebFinger; } function genUrl(query: string) { From 7f5d189528d37f7dd48f5421176685bd2eab36e0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 16:40:47 +0900 Subject: [PATCH 30/66] fix type --- packages/backend/src/remote/activitypub/deliver-manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/remote/activitypub/deliver-manager.ts b/packages/backend/src/remote/activitypub/deliver-manager.ts index 142486f82b..4c1999e4cb 100644 --- a/packages/backend/src/remote/activitypub/deliver-manager.ts +++ b/packages/backend/src/remote/activitypub/deliver-manager.ts @@ -117,7 +117,7 @@ export default class DeliverManager { // check that they actually have an inbox && recipe.to.inbox != null, ) - .forEach(recipe => inboxes.add(recipe.to.inbox)); + .forEach(recipe => inboxes.add(recipe.to.inbox!)); // deliver for (const inbox of inboxes) { From f8e6f3cc73b041acd7c8e8186090a297db3100a9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 22:36:30 +0900 Subject: [PATCH 31/66] improve webhook --- CHANGELOG.md | 9 +++++++++ packages/backend/src/queue/index.ts | 8 ++++++-- .../src/queue/processors/webhook-deliver.ts | 14 ++++++++------ packages/backend/src/queue/types.ts | 3 +++ packages/backend/src/services/blocking/create.ts | 6 ++---- packages/backend/src/services/following/create.ts | 6 ++---- packages/backend/src/services/following/delete.ts | 3 +-- packages/backend/src/services/following/reject.ts | 3 +-- packages/backend/src/services/note/create.ts | 12 ++++-------- 9 files changed, 36 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c874648efd..5b233f0a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,15 @@ You should also include the user name that made the change. --> +## 12.x.x (unreleased) + +### Improvements +- Improve webhook @syuilo + +### Bugfixes +- + + ## 12.109.2 (2022/04/03) ### Bugfixes diff --git a/packages/backend/src/queue/index.ts b/packages/backend/src/queue/index.ts index a570400b7b..5bd922468d 100644 --- a/packages/backend/src/queue/index.ts +++ b/packages/backend/src/queue/index.ts @@ -1,4 +1,5 @@ import httpSignature from 'http-signature'; +import { v4 as uuid } from 'uuid'; import config from '@/config/index.js'; import { envOption } from '../env.js'; @@ -16,7 +17,7 @@ import { getJobInfo } from './get-job-info.js'; import { systemQueue, dbQueue, deliverQueue, inboxQueue, objectStorageQueue, endedPollNotificationQueue, webhookDeliverQueue } from './queues.js'; import { ThinUser } from './types.js'; import { IActivity } from '@/remote/activitypub/type.js'; -import { Webhook } from '@/models/entities/webhook.js'; +import { Webhook, webhookEventTypes } from '@/models/entities/webhook.js'; function renderError(e: Error): any { return { @@ -262,12 +263,15 @@ export function createCleanRemoteFilesJob() { }); } -export function webhookDeliver(webhook: Webhook, content: unknown) { +export function webhookDeliver(webhook: Webhook, type: typeof webhookEventTypes[number], content: unknown) { const data = { + type, content, webhookId: webhook.id, to: webhook.url, secret: webhook.secret, + createdAt: Date.now(), + eventId: uuid(), }; return webhookDeliverQueue.add(data, { diff --git a/packages/backend/src/queue/processors/webhook-deliver.ts b/packages/backend/src/queue/processors/webhook-deliver.ts index a4d39d86e4..01d779311e 100644 --- a/packages/backend/src/queue/processors/webhook-deliver.ts +++ b/packages/backend/src/queue/processors/webhook-deliver.ts @@ -8,13 +8,9 @@ import config from '@/config/index.js'; const logger = new Logger('webhook'); -let latest: string | null = null; - export default async (job: Bull.Job) => { try { - if (latest !== (latest = JSON.stringify(job.data.content, null, 2))) { - logger.debug(`delivering ${latest}`); - } + logger.debug(`delivering ${job.data.webhookId}`); const res = await getResponse({ url: job.data.to, @@ -25,7 +21,13 @@ export default async (job: Bull.Job) => { 'X-Misskey-Hook-Id': job.data.webhookId, 'X-Misskey-Hook-Secret': job.data.secret, }, - body: JSON.stringify(job.data.content), + body: JSON.stringify({ + hookId: job.data.webhookId, + eventId: job.data.eventId, + createdAt: job.data.createdAt, + type: job.data.type, + body: job.data.content, + }), }); Webhooks.update({ id: job.data.webhookId }, { diff --git a/packages/backend/src/queue/types.ts b/packages/backend/src/queue/types.ts index 8aeacf4625..c005f78ec2 100644 --- a/packages/backend/src/queue/types.ts +++ b/packages/backend/src/queue/types.ts @@ -48,10 +48,13 @@ export type EndedPollNotificationJobData = { }; export type WebhookDeliverJobData = { + type: string; content: unknown; webhookId: Webhook['id']; to: string; secret: string; + createdAt: number; + eventId: string; }; export type ThinUser = { diff --git a/packages/backend/src/services/blocking/create.ts b/packages/backend/src/services/blocking/create.ts index 5c67190079..5e96e5037f 100644 --- a/packages/backend/src/services/blocking/create.ts +++ b/packages/backend/src/services/blocking/create.ts @@ -65,8 +65,7 @@ async function cancelRequest(follower: User, followee: User) { const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('unfollow')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'unfollow', + webhookDeliver(webhook, 'unfollow', { user: packed, }); } @@ -118,8 +117,7 @@ async function unFollow(follower: User, followee: User) { const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('unfollow')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'unfollow', + webhookDeliver(webhook, 'unfollow', { user: packed, }); } diff --git a/packages/backend/src/services/following/create.ts b/packages/backend/src/services/following/create.ts index 7bc839c62e..7491c44f83 100644 --- a/packages/backend/src/services/following/create.ts +++ b/packages/backend/src/services/following/create.ts @@ -97,8 +97,7 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[ const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('follow')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'follow', + webhookDeliver(webhook, 'follow', { user: packed, }); } @@ -112,8 +111,7 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[ const webhooks = (await getActiveWebhooks()).filter(x => x.userId === followee.id && x.on.includes('followed')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'followed', + webhookDeliver(webhook, 'followed', { user: packed, }); } diff --git a/packages/backend/src/services/following/delete.ts b/packages/backend/src/services/following/delete.ts index 85e40f1365..241f9606e5 100644 --- a/packages/backend/src/services/following/delete.ts +++ b/packages/backend/src/services/following/delete.ts @@ -38,8 +38,7 @@ export default async function(follower: { id: User['id']; host: User['host']; ur const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('unfollow')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'unfollow', + webhookDeliver(webhook, 'unfollow', { user: packed, }); } diff --git a/packages/backend/src/services/following/reject.ts b/packages/backend/src/services/following/reject.ts index e1744e05be..691fca2456 100644 --- a/packages/backend/src/services/following/reject.ts +++ b/packages/backend/src/services/following/reject.ts @@ -115,8 +115,7 @@ async function publishUnfollow(followee: Both, follower: Local) { const webhooks = (await getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('unfollow')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'unfollow', + webhookDeliver(webhook, 'unfollow', { user: packedFollowee, }); } diff --git a/packages/backend/src/services/note/create.ts b/packages/backend/src/services/note/create.ts index 6f373aaf45..f14bc2059b 100644 --- a/packages/backend/src/services/note/create.ts +++ b/packages/backend/src/services/note/create.ts @@ -350,8 +350,7 @@ export default async (user: { id: User['id']; username: User['username']; host: getActiveWebhooks().then(webhooks => { webhooks = webhooks.filter(x => x.userId === user.id && x.on.includes('note')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'note', + webhookDeliver(webhook, 'note', { note: noteObj, }); } @@ -380,8 +379,7 @@ export default async (user: { id: User['id']; username: User['username']; host: const webhooks = (await getActiveWebhooks()).filter(x => x.userId === data.reply!.userId && x.on.includes('reply')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'reply', + webhookDeliver(webhook, 'reply', { note: noteObj, }); } @@ -407,8 +405,7 @@ export default async (user: { id: User['id']; username: User['username']; host: const webhooks = (await getActiveWebhooks()).filter(x => x.userId === data.renote!.userId && x.on.includes('renote')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'renote', + webhookDeliver(webhook, 'renote', { note: noteObj, }); } @@ -650,8 +647,7 @@ async function createMentionedEvents(mentionedUsers: MinimumUser[], note: Note, const webhooks = (await getActiveWebhooks()).filter(x => x.userId === u.id && x.on.includes('mention')); for (const webhook of webhooks) { - webhookDeliver(webhook, { - type: 'mention', + webhookDeliver(webhook, 'mention', { note: detailPackedNote, }); } From ec3be7e4d362464a40722240e6210dfb45caed5f Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 3 Apr 2022 22:42:01 +0900 Subject: [PATCH 32/66] enhance(webhook): add userId to payload --- packages/backend/src/queue/index.ts | 1 + packages/backend/src/queue/processors/webhook-deliver.ts | 1 + packages/backend/src/queue/types.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/backend/src/queue/index.ts b/packages/backend/src/queue/index.ts index 5bd922468d..2d40290e4c 100644 --- a/packages/backend/src/queue/index.ts +++ b/packages/backend/src/queue/index.ts @@ -268,6 +268,7 @@ export function webhookDeliver(webhook: Webhook, type: typeof webhookEventTypes[ type, content, webhookId: webhook.id, + userId: webhook.userId, to: webhook.url, secret: webhook.secret, createdAt: Date.now(), diff --git a/packages/backend/src/queue/processors/webhook-deliver.ts b/packages/backend/src/queue/processors/webhook-deliver.ts index 01d779311e..d49206f68f 100644 --- a/packages/backend/src/queue/processors/webhook-deliver.ts +++ b/packages/backend/src/queue/processors/webhook-deliver.ts @@ -23,6 +23,7 @@ export default async (job: Bull.Job) => { }, body: JSON.stringify({ hookId: job.data.webhookId, + userId: job.data.userId, eventId: job.data.eventId, createdAt: job.data.createdAt, type: job.data.type, diff --git a/packages/backend/src/queue/types.ts b/packages/backend/src/queue/types.ts index c005f78ec2..6c0b9d9bf6 100644 --- a/packages/backend/src/queue/types.ts +++ b/packages/backend/src/queue/types.ts @@ -51,6 +51,7 @@ export type WebhookDeliverJobData = { type: string; content: unknown; webhookId: Webhook['id']; + userId: User['id']; to: string; secret: string; createdAt: number; From 45c457b8b30028c9955f0a1c9236aa0c7409b1ea Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 5 Apr 2022 21:32:14 +0900 Subject: [PATCH 33/66] chore: fix lint on windows --- packages/backend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 99f78afae9..73e937b7ff 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -5,7 +5,7 @@ "scripts": { "build": "tsc -p tsconfig.json || echo done. && tsc-alias -p tsconfig.json", "watch": "node watch.mjs", - "lint": "eslint --quiet 'src/**/*.ts'", + "lint": "eslint --quiet \"src/**/*.ts\"", "mocha": "cross-env TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha", "test": "npm run mocha" }, From 67fc39b8dba2b7555ff96797e7c338c5ccc5a2ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Apr 2022 21:34:33 +0900 Subject: [PATCH 34/66] chore(deps): bump axios from 0.21.1 to 0.21.4 (#8471) Bumps [axios](https://github.com/axios/axios) from 0.21.1 to 0.21.4. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/master/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v0.21.1...v0.21.4) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9168176339..943e3352be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -510,11 +510,11 @@ aws4@^1.8.0: integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug== axios@^0.21.1: - version "0.21.1" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8" - integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA== + version "0.21.4" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.4.tgz#c67b90dc0568e5c1cf2b0b858c43ba28e2eda575" + integrity sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg== dependencies: - follow-redirects "^1.10.0" + follow-redirects "^1.14.0" bach@^1.0.0: version "1.2.0" @@ -1617,10 +1617,10 @@ flush-write-stream@^1.0.2: inherits "^2.0.3" readable-stream "^2.3.6" -follow-redirects@^1.10.0: - version "1.14.8" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc" - integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== +follow-redirects@^1.14.0: + version "1.14.9" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7" + integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" From daa0ca72a718ed4f80b4f7321ad808d6a7d3c436 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 6 Apr 2022 00:04:25 +0900 Subject: [PATCH 35/66] fix(api): parameter validation of users/show was wrong --- CHANGELOG.md | 3 +-- packages/backend/src/server/api/endpoints/users/show.ts | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b233f0a77..ee91d43446 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,8 +16,7 @@ You should also include the user name that made the change. - Improve webhook @syuilo ### Bugfixes -- - +- API: parameter validation of users/show was wrong ## 12.109.2 (2022/04/03) diff --git a/packages/backend/src/server/api/endpoints/users/show.ts b/packages/backend/src/server/api/endpoints/users/show.ts index b1a568145a..183ff1b8bb 100644 --- a/packages/backend/src/server/api/endpoints/users/show.ts +++ b/packages/backend/src/server/api/endpoints/users/show.ts @@ -23,9 +23,9 @@ export const meta = { items: { type: 'object', ref: 'UserDetailed', - } + }, }, - ] + ], }, errors: { @@ -70,7 +70,7 @@ export const paramDef = { description: 'The local host is represented with `null`.', }, }, - required: ['username', 'host'], + required: ['username'], }, ], } as const; From 9f7cdb4bc734e02be0acc03bfae5abe94ac7466c Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 8 Apr 2022 19:01:38 +0900 Subject: [PATCH 36/66] refactor --- .../src/server/api/endpoints/notes/create.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 24d0c8134f..9de05918c0 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -9,6 +9,7 @@ import { Note } from '@/models/entities/note.js'; import { noteVisibilities } from '../../../../types.js'; import { Channel } from '@/models/entities/channel.js'; import { MAX_NOTE_TEXT_LENGTH } from '@/const.js'; +import { In } from 'typeorm'; export const meta = { tags: ['notes'], @@ -163,19 +164,18 @@ export const paramDef = { export default define(meta, paramDef, async (ps, user) => { let visibleUsers: User[] = []; if (ps.visibleUserIds) { - visibleUsers = (await Promise.all(ps.visibleUserIds.map(id => Users.findOneBy({ id })))) - .filter(x => x != null) as User[]; + visibleUsers = await Users.findBy({ + id: In(ps.visibleUserIds), + }); } let files: DriveFile[] = []; const fileIds = ps.fileIds != null ? ps.fileIds : ps.mediaIds != null ? ps.mediaIds : null; if (fileIds != null) { - files = (await Promise.all(fileIds.map(fileId => - DriveFiles.findOneBy({ - id: fileId, - userId: user.id, - }) - ))).filter(file => file != null) as DriveFile[]; + files = await DriveFiles.findBy({ + userId: user.id, + id: In(fileIds), + }); } let renote: Note | null; From 9c33e6eef79b2ac6b9ae59eff249064ee5b1b07c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 9 Apr 2022 19:33:13 +0900 Subject: [PATCH 37/66] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee91d43446..efd1c15ecc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ You should also include the user name that made the change. ### Bugfixes - API: parameter validation of users/show was wrong +- Federation: リモートインスタンスへのダイレクト投稿が届かない問題を修正 @syuilo ## 12.109.2 (2022/04/03) From fd4ec81bcbda13c0742ee01b5cff2f31367f74d7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Apr 2022 22:48:04 +0900 Subject: [PATCH 38/66] update deps --- package.json | 2 +- packages/backend/package.json | 22 ++- packages/backend/yarn.lock | 265 ++++++++++++++++++---------------- packages/client/package.json | 24 +-- packages/client/yarn.lock | 255 ++++++++++++++++---------------- yarn.lock | 56 +++---- 6 files changed, 323 insertions(+), 301 deletions(-) diff --git a/package.json b/package.json index 9ab8f1eccc..60d24e82d1 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "js-yaml": "4.1.0" }, "devDependencies": { - "@typescript-eslint/parser": "5.17.0", + "@typescript-eslint/parser": "5.18.0", "cross-env": "7.0.3", "cypress": "9.5.3", "start-server-and-test": "1.14.0", diff --git a/packages/backend/package.json b/packages/backend/package.json index 73e937b7ff..314818f80b 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -55,25 +55,24 @@ "@types/redis": "4.0.11", "@types/rename": "1.0.4", "@types/sanitize-html": "2.6.2", - "@types/sharp": "0.30.0", + "@types/sharp": "0.30.1", "@types/sinonjs__fake-timers": "8.1.2", "@types/speakeasy": "2.0.7", - "@types/throttle-debounce": "2.1.0", "@types/tinycolor2": "1.4.3", "@types/tmp": "0.2.3", "@types/uuid": "8.3.4", "@types/web-push": "3.3.2", "@types/websocket": "1.0.5", "@types/ws": "8.5.3", - "@typescript-eslint/eslint-plugin": "5.17.0", - "@typescript-eslint/parser": "5.17.0", - "@bull-board/koa": "3.10.2", + "@typescript-eslint/eslint-plugin": "5.18.0", + "@typescript-eslint/parser": "5.18.0", + "@bull-board/koa": "3.10.3", "abort-controller": "3.0.0", "ajv": "8.11.0", "archiver": "5.3.0", "autobind-decorator": "2.4.0", "autwh": "0.1.0", - "aws-sdk": "2.1105.0", + "aws-sdk": "2.1111.0", "bcryptjs": "2.4.3", "blurhash": "1.1.5", "broadcast-channel": "4.10.0", @@ -89,8 +88,8 @@ "date-fns": "2.28.0", "deep-email-validator": "0.1.21", "escape-regexp": "0.0.1", - "eslint": "8.12.0", - "eslint-plugin-import": "2.25.4", + "eslint": "8.13.0", + "eslint-plugin-import": "2.26.0", "feed": "4.2.2", "file-type": "17.1.1", "fluent-ffmpeg": "2.1.2", @@ -145,7 +144,7 @@ "rndstr": "1.0.0", "s-age": "1.1.2", "sanitize-html": "2.7.0", - "semver": "7.3.5", + "semver": "7.3.6", "sharp": "0.30.3", "speakeasy": "2.0.0", "strict-event-emitter-types": "2.0.0", @@ -154,7 +153,6 @@ "summaly": "2.5.0", "syslog-pro": "1.0.0", "systeminformation": "5.11.9", - "throttle-debounce": "3.0.1", "tinycolor2": "1.4.2", "tmp": "0.2.1", "ts-loader": "9.2.8", @@ -162,7 +160,7 @@ "tsc-alias": "1.4.1", "tsconfig-paths": "3.14.1", "twemoji-parser": "14.0.0", - "typeorm": "0.3.4", + "typeorm": "0.3.5", "typescript": "4.6.3", "ulid": "2.3.0", "unzipper": "0.10.11", @@ -173,7 +171,7 @@ "xev": "2.0.1" }, "devDependencies": { - "@redocly/openapi-core": "1.0.0-beta.91", + "@redocly/openapi-core": "1.0.0-beta.93", "@types/fluent-ffmpeg": "2.1.20", "cross-env": "7.0.3", "execa": "6.1.0" diff --git a/packages/backend/yarn.lock b/packages/backend/yarn.lock index 970a3f8b5c..5cd71acf9c 100644 --- a/packages/backend/yarn.lock +++ b/packages/backend/yarn.lock @@ -35,20 +35,20 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@bull-board/api@3.10.2": - version "3.10.2" - resolved "https://registry.yarnpkg.com/@bull-board/api/-/api-3.10.2.tgz#382450b703c671bb64eeb4d76f139b5e172d1fde" - integrity sha512-jufgsRvAZpUoq/IbmNhwRPQKav6oFUTMjgq0Z200cvNgyFkVDexPhNKNrXdhxaKhBOass4CWvgyQQntDlvCaoQ== +"@bull-board/api@3.10.3": + version "3.10.3" + resolved "https://registry.yarnpkg.com/@bull-board/api/-/api-3.10.3.tgz#c6aad9f5cfb3acbe02c57e823ee81c1ae575849d" + integrity sha512-kV6EPwi9j71qBmozvDmtT01j986r4cFqNmBgq7HApYXW0G2U8Brmv0Ut0iMQZRc/X7aA5KYL3qXcEsriFnq+jw== dependencies: redis-info "^3.0.8" -"@bull-board/koa@3.10.2": - version "3.10.2" - resolved "https://registry.yarnpkg.com/@bull-board/koa/-/koa-3.10.2.tgz#b50049355913eb049471169faec278d30bb44559" - integrity sha512-SJu+yoE/823sjif003X7030Cj8FmbQ+shUN3LPcUlQ9+0tIQ6ao0+FifJ4uhFnp1CN6FWpn+DCAf4vlC771PNQ== +"@bull-board/koa@3.10.3": + version "3.10.3" + resolved "https://registry.yarnpkg.com/@bull-board/koa/-/koa-3.10.3.tgz#b9f02629f96f056d6a038c3c58fc339d58e55abb" + integrity sha512-DK8m09MwcRwUR3tz3xI0iSK/Ih2huQ2MAWm8krYjO5deswP2yBaCWE4OtpiULLfVpf8z4zB3Oqa0xNJrKRHTOQ== dependencies: - "@bull-board/api" "3.10.2" - "@bull-board/ui" "3.10.2" + "@bull-board/api" "3.10.3" + "@bull-board/ui" "3.10.3" ejs "^3.1.6" koa "^2.13.1" koa-mount "^4.0.0" @@ -56,12 +56,12 @@ koa-static "^5.0.0" koa-views "^7.0.1" -"@bull-board/ui@3.10.2": - version "3.10.2" - resolved "https://registry.yarnpkg.com/@bull-board/ui/-/ui-3.10.2.tgz#ab6400b1cbd459604b9e8afeaef9e3cc235d1dd9" - integrity sha512-XFFbnJjZZDoMxntNdmgJoyTlEvMcCfNqeC/QPiqTJU0X/k0cxWDx36tw83PKjN+lKxPjzN/WNpTebYZPKV78Yg== +"@bull-board/ui@3.10.3": + version "3.10.3" + resolved "https://registry.yarnpkg.com/@bull-board/ui/-/ui-3.10.3.tgz#b921199d42b32d8ddd9bbf0e35c25be0d64403e9" + integrity sha512-6zYW3FqySg+4IKEeM1jt/5ixNVBKQjtZLG9W81ADVcHk8YceQ++7URWzDb8nQEct3rEW4bjR6nicVWNXMSN7Lw== dependencies: - "@bull-board/api" "3.10.2" + "@bull-board/api" "3.10.3" "@cspotcode/source-map-consumer@0.8.0": version "0.8.0" @@ -244,10 +244,10 @@ require-from-string "^2.0.2" uri-js "^4.2.2" -"@redocly/openapi-core@1.0.0-beta.91": - version "1.0.0-beta.91" - resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.91.tgz#58dbd8c3cad9ef82f2437c6bbeb6a14dd1bc537d" - integrity sha512-8RhZGn5jSoy3oZE0sAdXxhPPHrqKgy2JVJzLqjgX9LDjNf7cXOTYOXkXIkjv1tfZHFBV/H7c08rRLEdxnzn0dg== +"@redocly/openapi-core@1.0.0-beta.93": + version "1.0.0-beta.93" + resolved "https://registry.yarnpkg.com/@redocly/openapi-core/-/openapi-core-1.0.0-beta.93.tgz#882db8684598217f621adc7349288229253a0038" + integrity sha512-xQj7UnjPj3mKtkyRrm+bjzEoyo0CVNjGP4pV6BzQ0vgKf0Jqq7apFC703psyBH+JscYr7NKK1hPQU76ylhFDdg== dependencies: "@redocly/ajv" "^8.6.4" "@types/node" "^14.11.8" @@ -785,10 +785,10 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" -"@types/sharp@0.30.0": - version "0.30.0" - resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.30.0.tgz#58cb016c8fdc558b4c5771ad1f3668336685c843" - integrity sha512-bZ0Y/JVlrOyqwlBMJ2taEgnwFavjLnyZmLOLecmOesuG5kR2Lx9b2fM4osgfVjLJi8UlE+t3R1JzRVMxF6MbfA== +"@types/sharp@0.30.1": + version "0.30.1" + resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.30.1.tgz#31bd128f2437e8fc31424eb23d8284aa127bfa8d" + integrity sha512-LxzQsKo2YtvA2DlqACNXmlbLGMVJCSU/HhV4N9RrStClUEf02iN+AakD/zUOpZkbo1OG+lHk2LeqoHedLwln2w== dependencies: "@types/node" "*" @@ -804,11 +804,6 @@ dependencies: "@types/node" "*" -"@types/throttle-debounce@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz#1c3df624bfc4b62f992d3012b84c56d41eab3776" - integrity sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ== - "@types/tinycolor2@1.4.3": version "1.4.3" resolved "https://registry.yarnpkg.com/@types/tinycolor2/-/tinycolor2-1.4.3.tgz#ed4a0901f954b126e6a914b4839c77462d56e706" @@ -850,14 +845,14 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz#704eb4e75039000531255672bf1c85ee85cf1d67" - integrity sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ== +"@typescript-eslint/eslint-plugin@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz#950df411cec65f90d75d6320a03b2c98f6c3af7d" + integrity sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A== dependencies: - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/type-utils" "5.17.0" - "@typescript-eslint/utils" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/type-utils" "5.18.0" + "@typescript-eslint/utils" "5.18.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -865,69 +860,69 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/parser@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.17.0.tgz#7def77d5bcd8458d12d52909118cf3f0a45f89d5" - integrity sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig== +"@typescript-eslint/parser@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.18.0.tgz#2bcd4ff21df33621df33e942ccb21cb897f004c6" + integrity sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ== dependencies: - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/typescript-estree" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/typescript-estree" "5.18.0" debug "^4.3.2" -"@typescript-eslint/scope-manager@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz#4cea7d0e0bc0e79eb60cad431c89120987c3f952" - integrity sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w== +"@typescript-eslint/scope-manager@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505" + integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ== dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" -"@typescript-eslint/type-utils@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz#1c4549d68c89877662224aabb29fbbebf5fc9672" - integrity sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg== +"@typescript-eslint/type-utils@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz#62dbfc8478abf36ba94a90ddf10be3cc8e471c74" + integrity sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA== dependencies: - "@typescript-eslint/utils" "5.17.0" + "@typescript-eslint/utils" "5.18.0" debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f" - integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw== +"@typescript-eslint/types@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" + integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== -"@typescript-eslint/typescript-estree@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488" - integrity sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg== +"@typescript-eslint/typescript-estree@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" + integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ== dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.17.0.tgz#549a9e1d491c6ccd3624bc3c1b098f5cfb45f306" - integrity sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA== +"@typescript-eslint/utils@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.18.0.tgz#27fc84cf95c1a96def0aae31684cb43a37e76855" + integrity sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/typescript-estree" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/typescript-estree" "5.18.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz#52daae45c61b0211b4c81b53a71841911e479128" - integrity sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA== +"@typescript-eslint/visitor-keys@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" + integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg== dependencies: - "@typescript-eslint/types" "5.17.0" + "@typescript-eslint/types" "5.18.0" eslint-visitor-keys "^3.0.0" "@ungap/promise-all-settled@1.1.2": @@ -1271,10 +1266,10 @@ autwh@0.1.0: dependencies: oauth "0.9.15" -aws-sdk@2.1105.0: - version "2.1105.0" - resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1105.0.tgz#3e63129f2aca254f1d6d5a1580b988bb786e98fa" - integrity sha512-YZ6IbKvtiw8noD/Iuyp3hXNX5NmhJ2xSU4598pZr55CfnIQ0oU5ZwtQqLPG8E07ouA363/moCYddIAVGYSkQ+A== +aws-sdk@2.1111.0: + version "2.1111.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.1111.0.tgz#02b1e5c530ef8140235ee7c48c710bb2dbd7dc84" + integrity sha512-WRyNcCckzmu1djTAWfR2r+BuI/PbuLrhG3oa+oH39v4NZ4EecYWFL1CoCPlC2kRUML4maSba5T4zlxjcNl7ELQ== dependencies: buffer "4.9.2" events "1.1.1" @@ -2650,32 +2645,32 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-module-utils@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz#1d0aa455dcf41052339b63cada8ab5fd57577129" - integrity sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg== +eslint-module-utils@^2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" + integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== dependencies: debug "^3.2.7" find-up "^2.1.0" -eslint-plugin-import@2.25.4: - version "2.25.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" - integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA== +eslint-plugin-import@2.26.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== dependencies: array-includes "^3.1.4" array.prototype.flat "^1.2.5" debug "^2.6.9" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.2" + eslint-module-utils "^2.7.3" has "^1.0.3" - is-core-module "^2.8.0" + is-core-module "^2.8.1" is-glob "^4.0.3" - minimatch "^3.0.4" + minimatch "^3.1.2" object.values "^1.1.5" - resolve "^1.20.0" - tsconfig-paths "^3.12.0" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" eslint-scope@^5.1.1: version "5.1.1" @@ -2715,10 +2710,10 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.12.0.tgz#c7a5bd1cfa09079aae64c9076c07eada66a46e8e" - integrity sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q== +eslint@8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.13.0.tgz#6fcea43b6811e655410f5626cfcf328016badcd7" + integrity sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ== dependencies: "@eslint/eslintrc" "^1.2.1" "@humanwhocodes/config-array" "^0.9.2" @@ -3777,10 +3772,10 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" -is-core-module@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" - integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== +is-core-module@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== dependencies: has "^1.0.3" @@ -4578,6 +4573,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.4.0: + version "7.8.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.1.tgz#68ee3f4807a57d2ba185b7fd90827d5c21ce82bb" + integrity sha512-E1v547OCgJvbvevfjgK9sNKIVXO96NnsTsFPBlg4ZxjhsJSODoH9lk8Bm0OxvHNm6Vm5Yqkl/1fErDxhYL8Skg== + luxon@^1.28.0: version "1.28.0" resolved "https://registry.yarnpkg.com/luxon/-/luxon-1.28.0.tgz#e7f96daad3938c06a62de0fb027115d251251fbf" @@ -4718,6 +4718,13 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" @@ -5419,7 +5426,7 @@ path-key@^4.0.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -6075,6 +6082,15 @@ resolve@^1.15.1, resolve@^1.20.0: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.22.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + responselike@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" @@ -6197,12 +6213,12 @@ seedrandom@3.0.5: resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.5.tgz#54edc85c95222525b0c7a6f6b3543d8e0b3aa0a7" integrity sha512-8OwmbklUNzwezjGInmZ+2clQmExQPvomqjL7LFqOYqtmuxRgQYqOD3mHaU+MvZn5FLUeVxVfQjwLZW/n/JFuqg== -semver@7.3.5, semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +semver@7.3.6: + version "7.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.6.tgz#5d73886fb9c0c6602e79440b97165c29581cbb2b" + integrity sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w== dependencies: - lru-cache "^6.0.0" + lru-cache "^7.4.0" semver@^5.6.0: version "5.7.1" @@ -6216,6 +6232,13 @@ semver@^7.3.2, semver@^7.3.4: dependencies: lru-cache "^6.0.0" +semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -6602,6 +6625,11 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" @@ -6697,11 +6725,6 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -throttle-debounce@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb" - integrity sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg== - through@2: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" @@ -6821,7 +6844,7 @@ tsc-alias@1.4.1: mylas "^2.1.4" normalize-path "^3.0.0" -tsconfig-paths@3.14.1: +tsconfig-paths@3.14.1, tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== @@ -6831,16 +6854,6 @@ tsconfig-paths@3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tsconfig-paths@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" - integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - tslib@^1.8.1: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" @@ -6939,10 +6952,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typeorm@0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.3.4.tgz#6608f7efb15c40f3fa2863cefb45ff78a208c40c" - integrity sha512-6v3HH12viDhIQwQDod/B0Plt1o7IYIVDxP7zwatD6fzN+IDdqTTinW/sWNw84Edpbhh2t7XILTaQEqj0NXFP/Q== +typeorm@0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.3.5.tgz#8fe50d517de5ec6f4b38856ea0f180e4a60cf7e4" + integrity sha512-KL4c8nQqouHaXs4m1J3xh7oXWqX4+A9poExbceLxBRtlavpJQYqiSnqt3JYGpy7Tl9vD5DG5DrmZrSslTkkW5Q== dependencies: "@sqltools/formatter" "^1.2.2" app-root-path "^3.0.0" diff --git a/packages/client/package.json b/packages/client/package.json index d44df92d7b..9de500f3ab 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -18,7 +18,7 @@ "@types/gulp": "4.0.9", "@types/gulp-rename": "2.0.1", "@types/is-url": "1.2.30", - "@types/katex": "0.11.1", + "@types/katex": "0.14.0", "@types/matter-js": "0.17.7", "@types/mocha": "9.1.0", "@types/oauth": "0.9.1", @@ -34,7 +34,7 @@ "@types/webpack-stream": "3.2.12", "@types/websocket": "1.0.5", "@types/ws": "8.5.3", - "@typescript-eslint/parser": "5.17.0", + "@typescript-eslint/parser": "5.18.0", "@vue/compiler-sfc": "3.2.31", "abort-controller": "3.0.0", "autobind-decorator": "2.4.0", @@ -49,11 +49,11 @@ "compare-versions": "4.1.3", "content-disposition": "0.5.4", "css-loader": "6.7.1", - "cssnano": "5.1.6", + "cssnano": "5.1.7", "date-fns": "2.28.0", "escape-regexp": "0.0.1", - "eslint": "8.12.0", - "eslint-plugin-vue": "8.5.0", + "eslint": "8.13.0", + "eslint-plugin-vue": "8.6.0", "eventemitter3": "4.0.7", "feed": "4.2.2", "glob": "7.2.0", @@ -70,7 +70,7 @@ "ms": "2.1.3", "nested-property": "4.0.0", "parse5": "6.0.1", - "photoswipe": "5.2.2", + "photoswipe": "5.2.4", "portscanner": "2.2.0", "postcss": "8.4.12", "postcss-loader": "6.2.1", @@ -85,7 +85,7 @@ "reflect-metadata": "0.1.13", "rndstr": "1.0.0", "s-age": "1.1.2", - "sass": "1.49.10", + "sass": "1.50.0", "sass-loader": "12.6.0", "seedrandom": "3.0.5", "strict-event-emitter-types": "2.0.0", @@ -93,8 +93,8 @@ "style-loader": "3.3.1", "syuilo-password-strength": "0.0.1", "textarea-caret": "3.1.0", - "three": "0.139.0", - "throttle-debounce": "3.0.1", + "three": "0.139.2", + "throttle-debounce": "4.0.0", "tinycolor2": "1.4.2", "ts-loader": "9.2.8", "tsc-alias": "1.5.0", @@ -111,16 +111,16 @@ "vue-style-loader": "4.1.3", "vue-svg-loader": "0.17.0-beta.2", "vuedraggable": "4.0.1", - "webpack": "5.70.0", + "webpack": "5.72.0", "webpack-cli": "4.9.2", "websocket": "1.0.34", "ws": "8.5.0" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "5.17.0", + "@typescript-eslint/eslint-plugin": "5.18.0", "cross-env": "7.0.3", "cypress": "9.5.3", - "eslint-plugin-import": "2.25.4", + "eslint-plugin-import": "2.26.0", "start-server-and-test": "1.14.0" } } diff --git a/packages/client/yarn.lock b/packages/client/yarn.lock index ca93735b43..a4ac6d8712 100644 --- a/packages/client/yarn.lock +++ b/packages/client/yarn.lock @@ -334,10 +334,10 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/katex@0.11.1": - version "0.11.1" - resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.11.1.tgz#34de04477dcf79e2ef6c8d23b41a3d81f9ebeaf5" - integrity sha512-DUlIj2nk0YnJdlWgsFuVKcX27MLW0KbKmGVoUHmFr+74FYYNUDAaj9ZqTADvsbE8rfxuVmSFc7KczYn5Y09ozg== +"@types/katex@0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.14.0.tgz#b84c0afc3218069a5ad64fe2a95321881021b5fe" + integrity sha512-+2FW2CcT0K3P+JMR8YG846bmDwplKUTsWgT2ENwdQ1UdVfRk3GQrh6Mi4sTopy30gI8Uau5CEqHTDZ6YvWIUPA== "@types/matter-js@0.17.7": version "0.17.7" @@ -538,14 +538,14 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.17.0.tgz#704eb4e75039000531255672bf1c85ee85cf1d67" - integrity sha512-qVstvQilEd89HJk3qcbKt/zZrfBZ+9h2ynpAGlWjWiizA7m/MtLT9RoX6gjtpE500vfIg8jogAkDzdCxbsFASQ== +"@typescript-eslint/eslint-plugin@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz#950df411cec65f90d75d6320a03b2c98f6c3af7d" + integrity sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A== dependencies: - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/type-utils" "5.17.0" - "@typescript-eslint/utils" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/type-utils" "5.18.0" + "@typescript-eslint/utils" "5.18.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -553,69 +553,69 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/parser@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.17.0.tgz#7def77d5bcd8458d12d52909118cf3f0a45f89d5" - integrity sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig== +"@typescript-eslint/parser@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.18.0.tgz#2bcd4ff21df33621df33e942ccb21cb897f004c6" + integrity sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ== dependencies: - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/typescript-estree" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/typescript-estree" "5.18.0" debug "^4.3.2" -"@typescript-eslint/scope-manager@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz#4cea7d0e0bc0e79eb60cad431c89120987c3f952" - integrity sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w== +"@typescript-eslint/scope-manager@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505" + integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ== dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" -"@typescript-eslint/type-utils@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.17.0.tgz#1c4549d68c89877662224aabb29fbbebf5fc9672" - integrity sha512-3hU0RynUIlEuqMJA7dragb0/75gZmwNwFf/QJokWzPehTZousP/MNifVSgjxNcDCkM5HI2K22TjQWUmmHUINSg== +"@typescript-eslint/type-utils@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz#62dbfc8478abf36ba94a90ddf10be3cc8e471c74" + integrity sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA== dependencies: - "@typescript-eslint/utils" "5.17.0" + "@typescript-eslint/utils" "5.18.0" debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f" - integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw== +"@typescript-eslint/types@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" + integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== -"@typescript-eslint/typescript-estree@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488" - integrity sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg== +"@typescript-eslint/typescript-estree@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" + integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ== dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.17.0.tgz#549a9e1d491c6ccd3624bc3c1b098f5cfb45f306" - integrity sha512-DVvndq1QoxQH+hFv+MUQHrrWZ7gQ5KcJzyjhzcqB1Y2Xes1UQQkTRPUfRpqhS8mhTWsSb2+iyvDW1Lef5DD7vA== +"@typescript-eslint/utils@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.18.0.tgz#27fc84cf95c1a96def0aae31684cb43a37e76855" + integrity sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/typescript-estree" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/typescript-estree" "5.18.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz#52daae45c61b0211b4c81b53a71841911e479128" - integrity sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA== +"@typescript-eslint/visitor-keys@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" + integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg== dependencies: - "@typescript-eslint/types" "5.17.0" + "@typescript-eslint/types" "5.18.0" eslint-visitor-keys "^3.0.0" "@ungap/promise-all-settled@1.1.2": @@ -1772,10 +1772,10 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssnano-preset-default@^5.2.6: - version "5.2.6" - resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.6.tgz#3a2a17b7bccdbf27dbc6d4b9a8ae2c1f1720d50c" - integrity sha512-QwnYv/ZuNH0eWOxs3ME7w5uXXdWZKKXVGn1c6P877nPLl7SR8pAQQNe1CKbcPc+qpIbb2cq554Cv3QYG0MxTSQ== +cssnano-preset-default@^5.2.7: + version "5.2.7" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.7.tgz#791e3603fb8f1b46717ac53b47e3c418e950f5f3" + integrity sha512-JiKP38ymZQK+zVKevphPzNSGHSlTI+AOwlasoSRtSVMUU285O7/6uZyd5NbW92ZHp41m0sSHe6JoZosakj63uA== dependencies: css-declaration-sorter "^6.2.2" cssnano-utils "^3.1.0" @@ -1786,7 +1786,7 @@ cssnano-preset-default@^5.2.6: postcss-discard-duplicates "^5.1.0" postcss-discard-empty "^5.1.1" postcss-discard-overridden "^5.1.0" - postcss-merge-longhand "^5.1.3" + postcss-merge-longhand "^5.1.4" postcss-merge-rules "^5.1.1" postcss-minify-font-values "^5.1.0" postcss-minify-gradients "^5.1.1" @@ -1812,12 +1812,12 @@ cssnano-utils@^3.1.0: resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz#95684d08c91511edfc70d2636338ca37ef3a6861" integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== -cssnano@5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.6.tgz#8133722e93049ac5c284bbe5c32cbf7fc829ceca" - integrity sha512-A7oX6Vxgpc/VzyKDTLEFpv6M0n06foVSWPAb+Xg0k6ikgSaI04SnGUKOQeBdvrXZCqhp3xdlii0cp+bUCgbCRQ== +cssnano@5.1.7: + version "5.1.7" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.7.tgz#99858bef6c76c9240f0cdc9239570bc7db8368be" + integrity sha512-pVsUV6LcTXif7lvKKW9ZrmX+rGRzxkEdJuVJcp5ftUjWITgwam5LMZOgaTvUrWPkcORBey6he7JKb4XAJvrpKg== dependencies: - cssnano-preset-default "^5.2.6" + cssnano-preset-default "^5.2.7" lilconfig "^2.0.3" yaml "^1.10.2" @@ -2288,37 +2288,37 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-module-utils@^2.7.2: - version "2.7.2" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz#1d0aa455dcf41052339b63cada8ab5fd57577129" - integrity sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg== +eslint-module-utils@^2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" + integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== dependencies: debug "^3.2.7" find-up "^2.1.0" -eslint-plugin-import@2.25.4: - version "2.25.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" - integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA== +eslint-plugin-import@2.26.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== dependencies: array-includes "^3.1.4" array.prototype.flat "^1.2.5" debug "^2.6.9" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.2" + eslint-module-utils "^2.7.3" has "^1.0.3" - is-core-module "^2.8.0" + is-core-module "^2.8.1" is-glob "^4.0.3" - minimatch "^3.0.4" + minimatch "^3.1.2" object.values "^1.1.5" - resolve "^1.20.0" - tsconfig-paths "^3.12.0" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" -eslint-plugin-vue@8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-8.5.0.tgz#65832bba43ca713fa5da16bdfcf55d0095677f6f" - integrity sha512-i1uHCTAKOoEj12RDvdtONWrGzjFm/djkzqfhmQ0d6M/W8KM81mhswd/z+iTZ0jCpdUedW3YRgcVfQ37/J4zoYQ== +eslint-plugin-vue@8.6.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-8.6.0.tgz#fbdf0f13f8d208a4cba752bf54042661a1aec5c3" + integrity sha512-abXiF2J18n/7ZPy9foSlJyouKf54IqpKlNvNmzhM93N0zs3QUxZG/oBd3tVPOJTKg7SlhBUtPxugpqzNbgGpQQ== dependencies: eslint-utils "^3.0.0" natural-compare "^1.4.0" @@ -2371,10 +2371,10 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.12.0.tgz#c7a5bd1cfa09079aae64c9076c07eada66a46e8e" - integrity sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q== +eslint@8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.13.0.tgz#6fcea43b6811e655410f5626cfcf328016badcd7" + integrity sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ== dependencies: "@eslint/eslintrc" "^1.2.1" "@humanwhocodes/config-array" "^0.9.2" @@ -3243,10 +3243,10 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" -is-core-module@^2.8.0: - version "2.8.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" - integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== +is-core-module@^2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" + integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== dependencies: has "^1.0.3" @@ -3845,6 +3845,13 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" @@ -4235,7 +4242,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -4262,10 +4269,10 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -photoswipe@5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/photoswipe/-/photoswipe-5.2.2.tgz#3960b953c504a67d1b074f60a31229ada2ed5c07" - integrity sha512-es0AEX4zgzzcrr8ztdPWRODSARCLqCm/5H/aSwFtZwovokGtzBf/y/HXJxHMnNx6h4650DkKVIVFYILXJhmMhw== +photoswipe@5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/photoswipe/-/photoswipe-5.2.4.tgz#918fd64c6b41b6a693743e5d70ee1a59747f491d" + integrity sha512-7p+VH7ELUnW9/3rCULCmyXcUCEuZwcsxvxPQYzR4wk3EaXcLCiINMCspc9Qq9AJYNsqYo1qGVL1y1Tch8uKAjw== picocolors@^1.0.0: version "1.0.0" @@ -4356,10 +4363,10 @@ postcss-loader@6.2.1: klona "^2.0.5" semver "^7.3.5" -postcss-merge-longhand@^5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.1.3.tgz#a49e2be6237316e3b55e329e0a8da15d1f9f47ab" - integrity sha512-lX8GPGvZ0iGP/IboM7HXH5JwkXvXod1Rr8H8ixwiA372hArk0zP4ZcCy4z4Prg/bfNlbbTf0KCOjCF9kKnpP/w== +postcss-merge-longhand@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-5.1.4.tgz#0f46f8753989a33260efc47de9a0cdc571f2ec5c" + integrity sha512-hbqRRqYfmXoGpzYKeW0/NCZhvNyQIlQeWVSao5iKWdyx7skLvCfQFGIUsP9NUs3dSbPac2IC4Go85/zG+7MlmA== dependencies: postcss-value-parser "^4.2.0" stylehacks "^5.1.0" @@ -4896,6 +4903,15 @@ resolve@^1.15.1, resolve@^1.20.0: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.22.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@^1.9.0: version "1.18.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" @@ -4984,10 +5000,10 @@ sass-loader@12.6.0: klona "^2.0.4" neo-async "^2.6.2" -sass@1.49.10: - version "1.49.10" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.49.10.tgz#7b83cee0f03bbba443111b3f94944fde2b0c7a6b" - integrity sha512-w37zfWJwKu4I78U4z63u1mmgoncq+v3iOB4yzQMPyAPVHHawaQSnu9C9ysGQnZEhW609jkcLioJcMCqm75JMdg== +sass@1.50.0: + version "1.50.0" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.50.0.tgz#3e407e2ebc53b12f1e35ce45efb226ea6063c7c8" + integrity sha512-cLsD6MEZ5URXHStxApajEh7gW189kkjn4Rc8DQweMyF+o5HF5nfEz8QYLMlPsTOD88DknatTmBWkOcw5/LnJLQ== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" @@ -5349,6 +5365,11 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + svgo@^1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.3.2.tgz#b6dc511c063346c9e415b81e43401145b96d4167" @@ -5443,15 +5464,15 @@ textarea-caret@3.1.0: resolved "https://registry.yarnpkg.com/textarea-caret/-/textarea-caret-3.1.0.tgz#5d5a35bb035fd06b2ff0e25d5359e97f2655087f" integrity sha512-cXAvzO9pP5CGa6NKx0WYHl+8CHKZs8byMkt3PCJBCmq2a34YA9pO1NrQET5pzeqnBjBdToF5No4rrmkDUgQC2Q== -three@0.139.0: - version "0.139.0" - resolved "https://registry.yarnpkg.com/three/-/three-0.139.0.tgz#4805eeb4cde85d8a82b6048088230f8ce5b75375" - integrity sha512-hZ4LkCjgoEM82WLaOVptDKGpB3SkEyuJP2OHe36AFO8hS2I6CrEiNanXj7wwR3wIPT7V5wi5Y5pFnncS5SVHgQ== +three@0.139.2: + version "0.139.2" + resolved "https://registry.yarnpkg.com/three/-/three-0.139.2.tgz#b110799a15736df673b9293e31653a4ac73648dd" + integrity sha512-gV7q7QY8rogu7HLFZR9cWnOQAUedUhu2WXAnpr2kdXZP9YDKsG/0ychwQvWkZN5PlNw9mv5MoCTin6zNTXoONg== -throttle-debounce@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-3.0.1.tgz#32f94d84dfa894f786c9a1f290e7a645b6a19abb" - integrity sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg== +throttle-debounce@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/throttle-debounce/-/throttle-debounce-4.0.0.tgz#ec763b1c050c3a8f73eddd2e853a720893102a40" + integrity sha512-bO2OiH++k8Z3cTNZccOJRlxY5Sk3Tx3Kz6cQl3VY5pTRcEgqbPxwEKtrC00whFAo2jIBQlaH1ZG5mtfrBef3qw== throttleit@^1.0.0: version "1.0.0" @@ -5522,7 +5543,7 @@ tsc-alias@1.5.0: mylas "^2.1.6" normalize-path "^3.0.0" -tsconfig-paths@3.14.1: +tsconfig-paths@3.14.1, tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== @@ -5532,16 +5553,6 @@ tsconfig-paths@3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tsconfig-paths@^3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" - integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== - dependencies: - "@types/json5" "^0.0.29" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - tslib@^1.8.1, tslib@^1.9.0: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" @@ -5866,10 +5877,10 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.70.0: - version "5.70.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.70.0.tgz#3461e6287a72b5e6e2f4872700bc8de0d7500e6d" - integrity sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw== +webpack@5.72.0: + version "5.72.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.72.0.tgz#f8bc40d9c6bb489a4b7a8a685101d6022b8b6e28" + integrity sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" diff --git a/yarn.lock b/yarn.lock index 943e3352be..2dc0d12ecf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -194,48 +194,48 @@ dependencies: "@types/node" "*" -"@typescript-eslint/parser@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.17.0.tgz#7def77d5bcd8458d12d52909118cf3f0a45f89d5" - integrity sha512-aRzW9Jg5Rlj2t2/crzhA2f23SIYFlF9mchGudyP0uiD6SenIxzKoLjwzHbafgHn39dNV/TV7xwQkLfFTZlJ4ig== +"@typescript-eslint/parser@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.18.0.tgz#2bcd4ff21df33621df33e942ccb21cb897f004c6" + integrity sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ== dependencies: - "@typescript-eslint/scope-manager" "5.17.0" - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/typescript-estree" "5.17.0" + "@typescript-eslint/scope-manager" "5.18.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/typescript-estree" "5.18.0" debug "^4.3.2" -"@typescript-eslint/scope-manager@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.17.0.tgz#4cea7d0e0bc0e79eb60cad431c89120987c3f952" - integrity sha512-062iCYQF/doQ9T2WWfJohQKKN1zmmXVfAcS3xaiialiw8ZUGy05Em6QVNYJGO34/sU1a7a+90U3dUNfqUDHr3w== +"@typescript-eslint/scope-manager@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505" + integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ== dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" -"@typescript-eslint/types@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.17.0.tgz#861ec9e669ffa2aa9b873dd4d28d9b1ce26d216f" - integrity sha512-AgQ4rWzmCxOZLioFEjlzOI3Ch8giDWx8aUDxyNw9iOeCvD3GEYAB7dxWGQy4T/rPVe8iPmu73jPHuaSqcjKvxw== +"@typescript-eslint/types@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" + integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== -"@typescript-eslint/typescript-estree@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.17.0.tgz#a7cba7dfc8f9cc2ac78c18584e684507df4f2488" - integrity sha512-X1gtjEcmM7Je+qJRhq7ZAAaNXYhTgqMkR10euC4Si6PIjb+kwEQHSxGazXUQXFyqfEXdkGf6JijUu5R0uceQzg== +"@typescript-eslint/typescript-estree@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" + integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ== dependencies: - "@typescript-eslint/types" "5.17.0" - "@typescript-eslint/visitor-keys" "5.17.0" + "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/visitor-keys" "5.18.0" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/visitor-keys@5.17.0": - version "5.17.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.17.0.tgz#52daae45c61b0211b4c81b53a71841911e479128" - integrity sha512-6K/zlc4OfCagUu7Am/BD5k8PSWQOgh34Nrv9Rxe2tBzlJ7uOeJ/h7ugCGDCeEZHT6k2CJBhbk9IsbkPI0uvUkA== +"@typescript-eslint/visitor-keys@5.18.0": + version "5.18.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" + integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg== dependencies: - "@typescript-eslint/types" "5.17.0" + "@typescript-eslint/types" "5.18.0" eslint-visitor-keys "^3.0.0" aggregate-error@^3.0.0: From a7015e6f09a7d9dd8390e48db315ccf5a4bcaa51 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Apr 2022 22:50:53 +0900 Subject: [PATCH 39/66] refactor --- packages/client/src/account.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index 4772c0baa5..f4dcab319c 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -72,7 +72,7 @@ export async function addAccount(id: Account['id'], token: Account['token']) { } } -function fetchAccount(token): Promise { +function fetchAccount(token: string): Promise { return new Promise((done, fail) => { // Fetch user fetch(`${apiUrl}/i`, { From 08ff4926c7684a5f0c37ae4aec8bdb5b75721cc4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Apr 2022 23:11:11 +0900 Subject: [PATCH 40/66] enhance(client): show loading icon on splash screen Close #8481 --- CHANGELOG.md | 1 + packages/backend/src/server/web/style.css | 47 ++++++++++++++++++- .../backend/src/server/web/views/base.pug | 3 +- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efd1c15ecc..f6fafad14c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ You should also include the user name that made the change. ### Improvements - Improve webhook @syuilo +- Client: Show loading icon on splash screen @syuilo ### Bugfixes - API: parameter validation of users/show was wrong diff --git a/packages/backend/src/server/web/style.css b/packages/backend/src/server/web/style.css index 43fbe1ab06..9c4cd4b9bf 100644 --- a/packages/backend/src/server/web/style.css +++ b/packages/backend/src/server/web/style.css @@ -16,7 +16,7 @@ html { transition: opacity 0.5s ease; } -#splash > img { +#splashIcon { position: absolute; top: 0; right: 0; @@ -27,3 +27,48 @@ html { height: 64px; pointer-events: none; } + +#splashSpinner { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + margin: auto; + display: inline-block; + width: 28px; + height: 28px; + transform: translateY(70px); +} + +#splashSpinner:before, +#splashSpinner:after { + content: " "; + display: block; + box-sizing: border-box; + width: 28px; + height: 28px; + border-radius: 50%; + border: solid 4px; +} + +#splashSpinner:before { + border-color: currentColor; + opacity: 0.3; +} + +#splashSpinner:after { + position: absolute; + top: 0; + border-color: currentColor transparent transparent transparent; + animation: splashSpinner 0.5s linear infinite; +} + +@keyframes splashSpinner { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index abacb1ccfc..1513208310 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -59,5 +59,6 @@ html br | Please turn on your JavaScript div#splash - img(src= icon || '/static-assets/splash.png') + img#splashIcon(src= icon || '/static-assets/splash.png') + div#splashSpinner block content From 6e50579f9f1b9ce56eae928d202580ba06bad90a Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Apr 2022 23:12:27 +0900 Subject: [PATCH 41/66] New Crowdin updates (#8469) * New translations ja-JP.yml (Bengali) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Romanian) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Arabic) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (Chinese Traditional) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) * New translations ja-JP.yml (Esperanto) --- locales/ar-SA.yml | 4 + locales/bn-BD.yml | 4 + locales/eo-UY.yml | 1037 +-------------------------------------------- locales/ro-RO.yml | 43 ++ locales/zh-TW.yml | 29 ++ 5 files changed, 86 insertions(+), 1031 deletions(-) diff --git a/locales/ar-SA.yml b/locales/ar-SA.yml index 69d9327837..f3f8b45777 100644 --- a/locales/ar-SA.yml +++ b/locales/ar-SA.yml @@ -908,6 +908,7 @@ _mfm: rainbow: "قوس قزح" rainbowDescription: "اجعل المحتوى يظهر بألوان الطيف" rotate: "تدوير" + rotateDescription: "يُدير المحتوى بزاوية معيّنة." _instanceTicker: none: "لا تظهره بتاتًا" remote: "أظهر للمستخدمين البِعاد" @@ -1236,6 +1237,8 @@ _pages: font: "الخط" fontSerif: "Serif" fontSansSerif: "Sans Serif" + eyeCatchingImageSet: "عيّن صورة مصغّرة" + eyeCatchingImageRemove: "احذف صورة مصغّرة" chooseBlock: "إضافة كتلة" selectType: "اختر النوع" enterVariableName: "أدخل اسم المتغيّر" @@ -1496,6 +1499,7 @@ _notification: pollVote: "مصوِت شارك في الاستطلاع" receiveFollowRequest: "طلبات المتابعة المتلقاة" followRequestAccepted: "طلبات المتابعة المقبولة" + groupInvited: "دعوات الفريق" app: "إشعارات التطبيقات المرتبطة" _deck: alwaysShowMainColumn: "أظهر العمود الرئيسي دائمًا" diff --git a/locales/bn-BD.yml b/locales/bn-BD.yml index 870a16bc09..b2ba236fd5 100644 --- a/locales/bn-BD.yml +++ b/locales/bn-BD.yml @@ -832,6 +832,10 @@ size: "আকার" numberOfColumn: "কলামের সংখ্যা" searchByGoogle: "গুগল" indefinitely: "অনির্দিষ্ট" +tenMinutes: "১০ মিনিট" +oneHour: "১ ঘণ্টা" +oneDay: "একদিন" +oneWeek: "এক সপ্তাহ" _emailUnavailable: used: "এই ইমেইল ঠিকানাটি ইতোমধ্যে ব্যবহৃত হয়েছে" format: "এই ইমেল ঠিকানাটি সঠিকভাবে লিখা হয়নি" diff --git a/locales/eo-UY.yml b/locales/eo-UY.yml index 72d81b4ac1..65a5931574 100644 --- a/locales/eo-UY.yml +++ b/locales/eo-UY.yml @@ -1,703 +1,48 @@ --- -_lang_: "Esperanto" -headlineMisskey: "Reto konektita per notoj" -introMisskey: "Bonvenon! Misskey estas malfermitkoda malcentraliza etbloga servo.\nKreu \"noto\"n por diskonigi nunan aferon, aŭ por paroli vian penson al ĉiuj ĉirkaŭ vi. 📡\nLa funkcio \"reago\" ebligas esprimi rapide vian senton pri la noto de la alia en la Fediverso. 👍\nBonvole esploru novan mondon. 🚀" -monthAndDay: "La {day}a de l' {month}a" -search: "Serĉi" -notifications: "Sciigoj" -username: "Uzantnomo" -password: "Pasvorto" -forgotPassword: "Ĉu vi forgesis vian pasvorton?" -fetchingAsApObject: "Informpetado de la Fediverso…" -ok: "Okej" -gotIt: "Kompreni" -cancel: "Nuligi" -enterUsername: "Entajpu uzantnomon" -renotedBy: "Plusendita de {user}" -noNotes: "Neniu noto!" -noNotifications: "Vi ne havas sciigojn." -instance: "Nodo" -settings: "Agordoj" -basicSettings: "Ĝeneralaj agordoj" -otherSettings: "Aliaj agordoj" -openInWindow: "Malfermi en nova fenestro" -profile: "Profilo" -timeline: "Templinio" -noAccountDescription: "La uzanto ankoraŭ ne skribis la prion de sia profilo." -login: "Saluti" -loggingIn: "Salutado…" -logout: "Adiaŭi" -signup: "Registriĝi" -uploading: "Alŝutado…" -save: "Konservi" -users: "Uzantoj" -addUser: "Aldoni uzanton" -favorite: "Preferi" -favorites: "Preferaĵoj" -unfavorite: "Malpreferi" -favorited: "Aldonita al viaj preferaĵoj." -alreadyFavorited: "Jam aldonita al viaj preferaĵoj." -cantFavorite: "Oni ne povis aldoni al viaj preferaĵoj." -pin: "Alpingli" -unpin: "Depingli" -copyContent: "Kopii enhavon" -copyLink: "Kopii la ligilon" -delete: "Forviŝi" -deleteAndEdit: "Forviŝi kaj redakti" -deleteAndEditConfirm: "Ĉu vi certas ke vi volas foriginte redakti la noton? Vi perdos ĉiujn reagojn, plusendojn, kaj respondojn je ĝi." -addToList: "Aldoni al listo" -sendMessage: "Sendi mesaĝon" -copyUsername: "Kopii uzantnomon" -searchUser: "Serĉi uzanton" -reply: "Respondi" -loadMore: "Vidi pli" -showMore: "Vidi pli" -youGotNewFollower: "eksekvis vin" -receiveFollowRequest: "Peto de sekvado estas ricevita" -followRequestAccepted: "La peto de sekvado akceptita" -mention: "Mencioj" -mentions: "Mencioj" -directNotes: "Rekte senditaj" -importAndExport: "Enporti kaj elporti" -import: "Enporti" -export: "Elporti" -files: "Dosieroj" -download: "Elŝuti" -driveFileDeleteConfirm: "Ĉu vi certas, ke vi volas forviŝi la dosieron \"{name}\"? Tio ankaŭ forviŝos la notojn kiuj citas ĝin." -unfollowConfirm: "Ĉu vi certas, ke vi volas ĉesi sekvi {name}?" +ok: "Bone" exportRequested: "Vi petis elporton. Ĝi povas bezoni longan tempon. Elportaĵo estos aldonita al disko post elportado." importRequested: "Vi petis enportadon. Ĝi povas bezoni longan tempon. " -lists: "Listoj" -noLists: "Neniu listo" -note: "Noti" -notes: "Notoj" -following: "Sekvi" -followers: "Sekvantoj" -followsYou: "Sekvas vin" -createList: "Krei liston" -manageLists: "Bonteni la listojn" -error: "Eraro" -somethingHappened: "Problemo okazis" -retry: "Provi denove" pageLoadError: "Fuŝiĝis enlegi paĝon." pageLoadErrorDescription: "Ordinare tio okazas pro la retkondiĉo aŭ la staplo de retumilo.\nPurigu la staplon, aŭ refaru poste. " -serverIsDead: "La servilo ne respondas. Vole atendu iom kaj penu denove." youShouldUpgradeClient: "Por montri ĉi paĝon, bonvolu enlegi refoje kaj uzi klienton novversian." -enterListName: "Entajpu nomon de la listo" -privacy: "Privateco" -makeFollowManuallyApprove: "Eksekvi vin devas peti al vi" -defaultNoteVisibility: "Implicita videbleco de la noto" -follow: "Sekvi" -followRequest: "Peti de sekvado" -followRequests: "Petoj de sekvado" -unfollow: "Ne plu sekvi" -followRequestPending: "Atendado akcepti vian peton de eksekvado" -enterEmoji: "Entajpu emoĵion" -renote: "Plusendi la noton" -unrenote: "Malfari plusendon" -renoted: "Sukcese plusendita" -cantRenote: "Oni ne povas plusendi la noton." -cantReRenote: "Plusendo ne estas plusendebla." -quote: "Citi" -pinnedNote: "Alpinglita noto" -pinned: "Alpingli" -you: "Vi" -clickToShow: "Klaki por malkaŝi" -sensitive: "Enhavo ne estas deca por laborejo (NSFW)" -add: "Aldoni" -reaction: "Reagoj" -reactionSetting: "Reagoj aperontaj en la elektilo de reagoj" -rememberNoteVisibility: "Rememori la agordon de videbleco de la lasta afiŝado" -attachCancel: "Deigi aldonaĵon" -markAsSensitive: "Troviĝi NSFW" -unmarkAsSensitive: "Ne troviĝi NSFW" -enterFileName: "Entajpu nomon de la dosiero" -mute: "Silentigi" -unmute: "Malsilentigi" -block: "Bloki" -unblock: "Malbloki" -suspend: "Flostigi" -unsuspend: "Fandi" -blockConfirm: "Ĉu vi certas ke vi volas bloki la uzanton?" -unblockConfirm: "Ĉu vi certas ke vi volas malbloki la uzanton?" -suspendConfirm: "Ĉu vi certas ke vi volas frostigi la uzanton?" -unsuspendConfirm: "Ĉu vi certas ke vi volas fandi la uzanton?" -selectList: "Elekti liston" -selectAntenna: "Elekti antenon" -selectWidget: "Elekti enestraĵon" -editWidgets: "Redakti fenestraĵon" -editWidgetsExit: "Fini la redaktadon" -customEmojis: "Propraj emoĝioj" -emoji: "Emoĵio" -emojis: "Emoĵio" -emojiName: "Nomo de la emoĵio" -emojiUrl: "URL de la emoĵio" -addEmoji: "Aldoni emoĵion" -settingGuide: "Agordaj rekomendoj" -cacheRemoteFiles: "Stapli forajn dosierojn" -flagAsBot: "Marki kiel esti uzanto de roboto" -flagAsCat: "Marki kiel esti kato" flagAsCatDescription: "Flagu por montri ke la konton havas kato." -flagShowTimelineReplies: "Montri la respondojn en la templinio" -autoAcceptFollowed: "Aŭtomate akcepti la peton de sekvado far uzantoj kiujn vi sekvas" -addAccount: "Aldoni konton" -loginFailed: "Saluto malsukcesis" -showOnRemote: "Vidi pli al la originala profilo" -general: "Ĝenerala" -wallpaper: "Ekranfonoj" -setWallpaper: "Apliki ekranfonon" -removeWallpaper: "Forviŝi ekranfonon. " -searchWith: "Serĉi: {q}" -youHaveNoLists: "Vi ne havas listojn." -followConfirm: "Ĉu vi certas ke vi volas sekvi {name}?" -proxyAccount: "Retperanta konto" -host: "Nodo" -selectUser: "Elekti uzanton" -recipient: "Ricevonton" -annotation: "Komentarioj" -federation: "Federaĵo" -instances: "Nodoj" -registeredAt: "Registrita je" -latestRequestSentAt: "La laste sendita peto" -latestRequestReceivedAt: "La laste ricevita peto " -latestStatus: "Laŭstato" -charts: "Diagramoj" -perHour: "por horo" -perDay: "por tago" -blockThisInstance: "Bloki la nodon" -operations: "Agoj" -software: "Programaro" -version: "Versio" -metadata: "Pridatumoj" -withNFiles: "{n} dosiero(j)" -monitor: "Monitoro" -network: "Reto" -disk: "Disko" -instanceInfo: "Informoj sur la nodo" -statistics: "Statistikoj" -clearCachedFiles: "Malplenigi la staplon" -clearCachedFilesConfirm: "Ĉu vi certas, ke vi volas forviŝi ĉiujn forajn dosierojn en la staplo?" -blockedInstances: "Blokitaj nodoj" -muteAndBlock: "Silentigi / Bloki" -mutedUsers: "Silentigitaj uzantoj" -blockedUsers: "Blokitaj uzantoj" -noUsers: "Neniu uzanto" -editProfile: "Redakti profilon" -noteDeleteConfirm: "Ĉu vi certas ke vi volas forviŝi la noton?" -pinLimitExceeded: "Vi ne povas alpingli pli" -intro: "La instalado de Misskey finiĝis! Volu krei administran konton." -done: "Fini" -processing: "Prilaborado…" -preview: "Antaŭmontro" -default: "Implicitaĵo" -noCustomEmojis: "Neniu emoĵio" -noJobs: "Neniu laboro" -federating: "Federantaj" -blocked: "Blokitaj" -suspended: "Suspenditaj" -all: "Ĉiuj" -subscribing: "Abonitaj" -publishing: "Abonintaj" -notResponding: "Alvokato ne disponeblas" -instanceFollowing: "Sekvatoj en la nodo" -instanceFollowers: "Sekvantoj el la nodo" -instanceUsers: "Uzantoj de la nodo" -changePassword: "Ŝanĝi pasvorton" -security: "Sekureco" -retypedNotMatch: "La enigitoj ne estas konformaj." -currentPassword: "Aktuala pasvorto" -newPassword: "Nova pasvorto" -newPasswordRetype: "Reentajpu la novan pasvorton" -attachFile: "Aldoni dosieron" -more: "Pli!" -featured: "Maksimumi" -usernameOrUserId: "Uzantnomo aŭ identigilo de uzanto" -noSuchUser: "Neniuj uzantoj trovitaj" -lookup: "Informpeti" -announcements: "Novaĵoj" -imageUrl: "URL de la bildo" -remove: "Forigi" -removed: "Forigita" -removeAreYouSure: "Ĉu vi certas ke vi volas forigi \"{x}\"n?" -deleteAreYouSure: "Ĉu vi certas ke vi volas forviŝi \"{x}\"'?" -resetAreYouSure: "Ĉu vi certas restarigi?" -saved: "Konservita" -messaging: "Retbabili" -upload: "Alŝuti" -keepOriginalUploading: "Konservi originalon" -fromDrive: "De la disko" -fromUrl: "De URL" -uploadFromUrl: "Alŝuti de URL" -uploadFromUrlDescription: "URL de la dosiero kiun vi volas alŝuti" -uploadFromUrlRequested: "La alŝutado estis patita" -explore: "Esplori" -messageRead: "Legita" -noMoreHistory: "Ne plu de la historio" -startMessaging: "Komenci babiladon" -nUsersRead: "Legita de {n} homoj" -agreeTo: "Mi akceptas {0}" -tos: "Kondiĉoj de uzado" -start: "Komenciĝi" -home: "Hejma" -remoteUserCaution: "La informoj eblas nekompletaj ĉar estas fora uzanto." -activity: "Aktiveco" -images: "Bildoj" -birthday: "Naskiĝdato" -yearsOld: "{age} jaroj aĝa" -registeredDate: "Dato de registriĝo" -location: "Kie" -theme: "Koloraro" -themeForLightMode: "Koloraro uzita en la luma modo" -themeForDarkMode: "Koloraro uzita en la malluma modo" -light: "Luma" -dark: "Malluma" -lightThemes: "Luma koloraro" -darkThemes: "Malluma koloraro" -syncDeviceDarkMode: "Speguli la luman modon de via aparato" -drive: "Disko" -fileName: "Dosiernomo" -selectFile: "Elekti dosieron" -selectFiles: "Elekti dosieron" -selectFolder: "Elekti dosierujon" -selectFolders: "Elekti dosierujon" -renameFile: "Alinomi la dosieron" -folderName: "Nomo de la dosierujo" -createFolder: "Krei dosierujon" -renameFolder: "Alinomi la dosierujon" -deleteFolder: "Forviŝi dosierujon" -addFile: "Aldoni dosieron" -emptyDrive: "La disko malplenas" -emptyFolder: "La dosierujo malplenas" -unableToDelete: "Ne forviŝebla" -inputNewFileName: "Entajpu novan nomon de la dosiero" -inputNewDescription: "Entajpu novan priskribon" -inputNewFolderName: "Entajpu novan nomon de la dosierujo" -hasChildFilesOrFolders: "La dosierujo ne estas forviŝebla, ĉar ĝi ne malplenas." -copyUrl: "Kopii URL" -rename: "Alinomi" -avatar: "Bildsimbolo" -banner: "Standardo" -nsfw: "Enhavo ne estas deca por laborejo (NSFW)" +flagShowTimelineReplies: "Montri respondon de notoj en templinio." +intro: "Instalado de Misskey finiĝis! Kreu administran konton." whenServerDisconnected: "Kiam vi malligiĝas de servilo" -disconnectedFromServer: "Malkonektita de servilo" -reload: "Reŝargi" -doNothing: "Ignori" -reloadConfirm: "Ĉu vi volas reŝargi?" -watch: "Observi" -unwatch: "Malobservi" -accept: "Permesi" -reject: "Malakcepti" -normal: "Normala" -instanceName: "Nomo de la nodo" -instanceDescription: "Priskribo de la nodo " -maintainerName: "Nomo de la administranto" -maintainerEmail: "Retpoŝtadreso de la administranto" -tosUrl: "URL de kondiĉoj de uzado" -thisYear: "Ĉi-jare" -thisMonth: "Ĉi-monate" -today: "Hodiaŭ" -dayX: "{day}a" -monthX: "La {month}a monato" -yearX: "La jaro {year}" -pages: "Paĝoj" -integration: "Integri" -connectService: "Konekti" -disconnectService: "Farkonektiĝi" -enableLocalTimeline: "Ebligi lokan templinion" -enableGlobalTimeline: "Ebligi mallokan templinion" -registration: "Registri" -enableRegistration: "Ebligi novan uzanton registriĝon" -invite: "Inviti" -driveCapacityPerLocalAccount: "Volumo de disko po unu loka uzanto" -driveCapacityPerRemoteAccount: "Volumo de disko po unu fora uzanto" -iconUrl: "URL de la bildsimbolo (retpaĝsimbolo, ktp.)" -bannerUrl: "URL de standardo" -backgroundImageUrl: "URL de la fona bildo" -basicInfo: "Baza informo" -pinnedUsers: "Alpinglita uzanto" -pinnedUsersDescription: "Laŭlinigu uzantnomojn en ĉiu linio, por alpingli al la paĝoj ekz \"Esplori\"." -pinnedPages: "Alpinglitaj paĝoj" -pinnedPagesDescription: "Laŭlinigu dosierindikojn de paĝo en ĉiu linio, por alpingli al la ĉefpaĝo de la nodo." -pinnedNotes: "Alpinglita noto" -hcaptcha: "hCaptcha" -enableHcaptcha: "Ebligi hCaptcha" -hcaptchaSiteKey: "Reteja ŝlosilo" -hcaptchaSecretKey: "Sekreta ŝlosilo" -recaptcha: "reCAPTCHA" -enableRecaptcha: "Ebligi reCAPTCHA" -recaptchaSiteKey: "Reteja ŝlosilo" -recaptchaSecretKey: "Sekreta ŝlosilo" -antennas: "Antenoj" -manageAntennas: "Administri antenojn" -name: "Nomo" -antennaSource: "Fonto de la anteno" -antennaKeywords: "Ricevi per ĉefterminoj" -antennaExcludeKeywords: "Krom ĉefterminoj" -notifyAntenna: "Oni sciigos novajn notojn" -withFileAntenna: "Nur kun aldonaĵo" -enableServiceworker: "Aktivigi ServiceWorker" caseSensitive: "Distingi usklecon" -withReplies: "Inkluzive respondoj" -connectedTo: "Sekva konto estas konektita" -notesAndReplies: "Kun respondoj" -withFiles: "Kun aldonaĵo" -silence: "Mutigi" -silenceConfirm: "Ĉu vi certas ke vi volas mutigi la uzanton?" -unsilence: "Malmutigi" -unsilenceConfirm: "Ĉu vi certas ke vi volas malmutigi la uzanton?" -popularUsers: "Popularaj uzantoj" -recentlyUpdatedUsers: "Lastatempe afiŝintaj uzantoj" -recentlyRegisteredUsers: "Lastatempe aniĝintaj uzantoj" -recentlyDiscoveredUsers: "Lastatempe eltrovitaj uzantoj" -exploreUsersCount: "Jen {count} uzantoj" -exploreFediverse: "Esplori la Fediverson" -popularTags: "Popularaj kradvortoj" -userList: "Listoj" -about: "Informoj" -aboutMisskey: "Pri Misskey" -administrator: "Administranto" -token: "Peco" -twoStepAuthentication: "Dua-faktora aŭtentiko" -moderator: "Kontrolisto" -nUsersMentioned: "{n} uzanto(j) menciis" -securityKey: "Sekureca ŝlosilo" -securityKeyName: "Nomo de la ŝlosilo" -registerSecurityKey: "Registri ŝlosilon de sekureco" -lastUsed: "La plej malnove uzita" -unregister: "Malregistriĝi" -passwordLessLogin: "Saluti sen pasvorto" -resetPassword: "Restarigi pasvorton" -newPasswordIs: "La nova pasvorto estas {password}." -reduceUiAnimation: "Redukti la animaciojn de la fasado" -share: "Kundividi" -notFound: "Ne trovita" -uploadFolder: "Dosierujo implicita por alŝuto" -cacheClear: "Malplenigi staplon" -markAsReadAllNotifications: "Marki ĉiujn sciigojn kiel legita" markAsReadAllUnreadNotes: "Marki ĉiujn afiŝojn kiel legita" -markAsReadAllTalkMessages: "Marki ĉiujn retbabiladojn kiel legita" -help: "Manlibro de uzado" -inputMessageHere: "Entajpu mesaĝon tie" -close: "Fermi" -group: "Grupo" -groups: "Grupoj" -createGroup: "Krei grupon" -ownedGroups: "Administrataj grupoj" -joinedGroups: "Grupoj al kiuj vi aliĝis" -invites: "Inviti" -groupName: "Grupa nomo" -members: "Membroj" -transfer: "Movi" -messagingWithUser: "Private babili " -messagingWithGroup: "Babili grupe" -title: "Titolo" -text: "Teksto" -enable: "Ebligi" -next: "Sekve" -retype: "Retajpu" -noteOf: "Noto de {user}" -inviteToGroup: "Inviti al grupo" -quoteAttached: "Kun citaĵo" -quoteQuestion: "Ĉu vi volas aldoni citaĵon?" -noMessagesYet: "Ankoraŭ neniu mesaĝo" -newMessageExists: "Vi ricevis novan mesaĝon." -onlyOneFileCanBeAttached: "Oni povas aldoni nur unu dosieron po mesaĝo." -signinRequired: "Bonvolu saluti" -invitations: "Inviti" -invitationCode: "Kodo de invito" checking: "kontrolante..." -available: "Disposabla" -unavailable: "Ne disponebla" -usernameInvalidFormat: "La uzantnomo povas enhavi minusklajn kaj majusklajn literojn, numerojn, nur kaj '_'." -tooShort: "Tro mallonga" -tooLong: "Tro longa" -weakPassword: "Malforta pasvorto" -normalPassword: "Meza pasvorto" -strongPassword: "Forta pasvorto" -passwordMatched: "Konforma" -passwordNotMatched: "Nekonforma" -signinWith: "Saluti kun {x}" signinFailed: "Fuŝiĝis ensaluti. Bonvolu kontroli uzantnomon kaj pasvorton." -or: "Aŭ" -language: "Lingvo" -uiLanguage: "Lingvo de la fasado" -groupInvited: "Invitita al grupo" -aboutX: "Pri {x}" -useOsNativeEmojis: "Uzi la emoĵiojn implicitan de la operaciumo" -youHaveNoGroups: "Neniuj grupoj" -noHistory: "Neniom historio" -signinHistory: "Historio de aliroj al la konto" -doing: "Traktado..." -category: "Kategorio" -tags: "Etikedoj" -docSource: "Fonto de la dokumento" -createAccount: "Krei konton" -existingAccount: "Ekzistan konton" -regenerate: "Regeneri" -fontSize: "Tipara grando" -noFollowRequests: "Vi ne havas peto de sekvado" -openImageInNewTab: "Malfermi la bildojn en nova tablo" -dashboard: "Stirpanelo" -local: "Loka" -remote: "Fora" -total: "Entute" -appearance: "Eksteraĵo" -clientSettings: "Agordoj de kliento" -accountSettings: "Agordoj de konto" promote: "Reklamata" -numberOfDays: "Nombro de tagoj" -hideThisNote: "Kaŝi la noton" -showFeaturedNotesInTimeline: "Montri en via templinio notojn de la tendenco" -objectStorageBaseUrl: "Baza URL" -objectStoragePrefix: "Prefix" -objectStorageRegion: "Regiono" -objectStorageUseSSL: "Oni uzas SSL" -objectStorageUseProxy: "Uzi retperilon" -serverLogs: "Servila protokolo" -deleteAll: "Forviŝi ĉiujn" -newNoteRecived: "Jen novaj notoj" -sounds: "Sonoj" -listen: "Aŭdi" -none: "Neniu" -showInPage: "Vidi en paĝo" -popout: "Superigi" -volume: "Laŭteco" -masterVolume: "Baza laŭteco" -details: "Detaloj" -chooseEmoji: "Elekti emoĵion" -recentUsed: "Lastatempe uzitaj" -install: "Instali" -uninstall: "Malinstali" -installedApps: "Instalita programo" -nothing: "Neniu" -installedDate: "Dato de instalado" -lastUsedDate: "Lastfoje uzita je" -state: "Stato" -sort: "Ordigi laŭ" -ascendingOrder: "Kreska ordo" -descendingOrder: "Malkreska ordo" -scratchpad: "Malneta redaktilo" -output: "Elmeto" -script: "Skripto" -disablePagesScript: "Malebligi AiScript en la paĝoj" updateRemoteUser: "Aktualigi informon de foraj uzantoj" -deleteAllFiles: "Forviŝi ĉiujn dosierojn" -deleteAllFilesConfirm: "Ĉu vi certas, ke vi volas forviŝi ĉiujn dosierojn?" -removeAllFollowing: "Ĉesi sekvi ĉiujn sekvatojn" -userSuspended: "La uzanto estas flostigita." -userSilenced: "La uzanto estas mutigita." yourAccountSuspendedTitle: "La konto estas frostigita." -menu: "Menuo" -addItem: "Aldoni novaĵon" -deletedNote: "Forviŝita noto" -invisibleNote: "Malpublikigita noto" -enableInfiniteScroll: "Ebligi infinitan rulumon" -visibility: "Videbleco" -poll: "Balot-enketo" -useCw: "Kaŝi enhavo" -enablePlayer: "Vidigi la filmeton" -disablePlayer: "Malfermi la filmeton" -expandTweet: "Disvolvi la pepon" -themeEditor: "Redaktilo de koloraroj" -description: "Priskribo" -describeFile: "Priskribi la bildon" -enterFileDescription: "Priskribu" -author: "Aŭtoro" -manage: "Bonteni" -plugins: "Kromaĵoj" -deck: "Kartaro" -useFullReactionPicker: "Uzi la tuton de la elektilo de reagoj" -width: "Larĝeco" -height: "Alteco" -large: "Granda" -medium: "Meza" -small: "Malgranda" -generateAccessToken: "Generi aŭtentikigan pecon" -permission: "Permesoj" -enableAll: "Ebligi ĉiujn" -disableAll: "Malebligi ĉiujn" tokenRequested: "Alirpermeso al konto" -notificationType: "Tipo de sciigoj" -edit: "Redakti" -emailServer: "Retpoŝta servilo" -enableEmail: "Ebligi dissendon de retpoŝto" -emailConfigInfo: "Uzata por konfirmi vian retadreson kiam registri kaj por restarigi vian pasvorton" -email: "Retpoŝto" -emailAddress: "Retpoŝtadreso" -smtpConfig: "Agordoj de SMTP servilo" -smtpHost: "Transa servilo" -smtpPort: "Pordo" -smtpUser: "Uzantnomo" -smtpPass: "Pasvorto" -wordMute: "Silentigi specifajn vortojn" -instanceMute: "Nodoj silentigitaj" -userSaysSomething: "{name} diras ion" -makeActive: "Aktivigi" -display: "Vidi" -copy: "Kopii" -metrics: "mezurciferoj" -overview: "Resumo" -logs: "Protokoloj" -delayed: "Prokrasto " -database: "Datumbazo" -channel: "Kanaloj" -create: "Krei" -notificationSetting: "Agordoj de sciigoj" -useGlobalSetting: "Oni uzas malloka agordo" -other: "Aliaj" -regenerateLoginToken: "Regeneri la aŭtentikigan pecon" -fileIdOrUrl: "Dosiera identigilo aŭ URL" -behavior: "Konduto" -sample: "Ekzemplo" abuseReports: "Raportoj" reportAbuse: "Raportoj" reportAbuseOf: "raporti {name}n" reporter: "Informanto" reporterOrigin: "Raportanto" -send: "Sendi" -openInNewTab: "Malfermi en nova langeto" -editTheseSettingsMayBreakAccount: "Redakti tiujn agordojn povas damaĝi vian konton." -instanceTicker: "Nomo de la nodo sendinta notojn" -waitingFor: "Atendado pro {x}" -random: "Hazarde" -system: "Sistemo" -switchUi: "Modifi la aspektigon" -desktop: "Labortablo" -createNew: "Krei novan" -optional: "Opciaj" -public: "Publika" -i18nInfo: "Misskey estas tradukata en diversaj lingvoj de volontuloj. Oni povas kontribui ĉe {link}." -manageAccessTokens: "Bonteni la aŭtentikigajn pecojn" -accountInfo: "Kontaj Informoj" -notesCount: "La nombro de notoj" -repliesCount: "La nombro de respondoj senditaj" -renotesCount: "La nombro de notoj plusenditaj de la uzanto" -repliedCount: "La nombro de respondoj ricevitaj" -renotedCount: "La nombro de plusendoj de la notoj skribitaj de la uzanto" -followingCount: "La nombro de sekvatoj" -followersCount: "La nombro de sekvantoj" -sentReactionsCount: "La nombro de la reagoj senditaj" -receivedReactionsCount: "La nombro de la reagoj ricevitaj" pollVotesCount: "Nombro de voĉdonado" -pollVotedCount: "La nombro de la voĉoj ricevitaj en siaj enketoj" -yes: "Jes" -no: "Ne" -driveFilesCount: "La nombro de la dosieroj sur la disko" -notSet: "Ne elektita" -emailVerified: "Via retpoŝtadreso estis kontrolita." -noteFavoritesCount: "La nombro de notoj preferataj" -pageLikesCount: "La nombro de paĝa plaĉon" -pageLikedCount: "La nombro de la ricevita \"Mi plaĉas\"" -contact: "Kontakto" -useSystemFont: "Uzi la tiparon implicitan de la sistemo" -developer: "Evoluiganto" -makeExplorable: "La konton videbligi sur la paĝo \"Esplori\"" -makeExplorableDescription: "Se vi elŝaltas tiun, via konto ne montros sur la paĝo \"Esplori\"." -duplicate: "Duobligi" -left: "Maldekstra" -center: "Centra" -wide: "Vasta" -narrow: "Malvasta" -needReloadToApply: "Tiu agordo estos aplikita nur poste reŝargi." -showTitlebar: "Videbligi titolan stangon" -clearCache: "Malplenigi staplon" -onlineUsersCount: "{n} uzantoj estas surlineaj" -nUsers: "{n} uzanto(j)" -nNotes: "{n} notoj" -myTheme: "Miaj koloraroj" -backgroundColor: "Fona koloro" -textColor: "Teksto" -saveAs: "Konservi kiel…" -advanced: "Altnivela" -value: "Valoro" -createdAt: "Kreita je" -updatedAt: "Laste ĝisdatigita" -saveConfirm: "Ĉu vi konservas la ŝanĝon?" -deleteConfirm: "Ĉu certas forviŝi?" invalidValue: "Nevalida valoro" -closeAccount: "Forigi konton" -currentVersion: "La aktuala versio" -latestVersion: "La plej nova versio" -youAreRunningUpToDateClient: "Vi uzas la plej novan version de via kliento." -newVersionOfClientAvailable: "Nova versio de via kliento estas disponebla." -inUse: "Uzata" -editCode: "Redakti kodon" -receiveAnnouncementFromInstance: "Ricevi informojn sciigintajn de la nodo" -emailNotification: "Sciigoj per retpoŝto" -inChannelSearch: "Serĉi en la kanalo" -useReactionPickerForContextMenu: "Dekstre-klaki por malfermi la elektilon de reagoj" -typingUsers: "{users} nun skribas…" -clear: "Vakigi" -markAllAsRead: "Marki ĉiujn kiel legito" -goBack: "Reiri antaŭ" -addDescription: "Priskribi" -info: "Informoj" -userInfo: "Informoj de uzanto" -unknown: "Nekonata" -online: "Surkonektita" -offline: "Forkonektita" notRecommended: "Evitindaj" -instanceBlocking: "Bloki specifajn nodojn" -selectAccount: "Elekti konton" switchAccount: "Ŝanĝi konton" -user: "Uzantoj" -administration: "Bontenado" -accounts: "Kontoj" configure: "Agordi" -recentPosts: "Novaj afiŝoj" -popularPosts: "Plej viditaj" -shareWithNote: "Kundividi en noto" -ads: "Reklamaĵo" +popularPosts: "Populara noto" expiration: "Limtempo" -memo: "Memorigilo" priority: "Prioritato" -high: "Alta" -middle: "Meza" -low: "Malalta" -emailNotConfiguredWarning: "Vi ne agordis retpoŝtadreso." -customCss: "Propra CSS" -global: "Malloka" squareAvatars: "Montri bildsimbolon kiel kvadrata" -sent: "Sendi" -received: "Ricevita" -searchResult: "Serĉorezultoj" -hashtags: "Kradvorto" -troubleshooting: "Problemsolvi" -learnMore: "Lernu pli" misskeyUpdated: "Misskey ĝisdatiĝis!" whatIsNew: "Montri novaĵojn" -translate: "Traduki" -translatedFrom: "Tradukita el {x}" accountDeletionInProgress: "La konto estas forviŝanta." resolved: "Solvita" unresolved: "Nesolvita" -breakFollow: "Ĉesigi la sekvadon al vi" -itsOn: "Ŝaltita" -emailRequiredForSignup: "Registri konton devas konformi retpoŝtadreson" -unread: "Nelegita" filter: "Filtrilo" -controlPanel: "Ŝaltpodio" -manageAccounts: "Bonteni la kontojn" -classic: "Klasika" -muteThread: "Silentigi la mesaĝaron" -unmuteThread: "Malsilentigi la mesaĝaron" -ffVisibility: "Videbleco de viaj sekvatoj/sekvantoj" -ffVisibilityDescription: "Oni permesas agordi tiuln kiuj povas vidi la homojn kiujn vi sekvas, kaj la homojn kiuj sekvas vin." -continueThread: "Pli vidi la mesaĝaron" deleteAccountConfirm: "La konto estos forviŝita. Ĉu vi daŭrigas fari?" -incorrectPassword: "Nevalida pasvorto" voteConfirm: "Ĉu vi voĉdonas {choice}n?" hide: "Kaŝi" -leaveGroup: "Eliĝi el la grupo" -leaveGroupConfirm: "Ĉu vi certas ke vi volas eliĝi el la grupo {name}?" -welcomeBackWithName: "Bonrevenon, {name}!" -clickToFinishEmailVerification: "Volu klaki [{ok}] por fini konfirmon de via retadreso." overridedDeviceKind: "tipo de aparato" -smartphone: "Saĝtelefono" -tablet: "Platkomputilo" -auto: "Aŭtomate" size: "Grandeco" -searchByGoogle: "Serĉi en Google-Serĉo" +searchByGoogle: "Serĉi en Guglo-Serĉilo" mutePeriod: "Daŭro de silentigo" indefinitely: "Sen limdato" tenMinutes: "Je 10 minutoj" @@ -706,341 +51,37 @@ oneDay: "Je 1 tago" oneWeek: "Je 1 semajno" failedToFetchAccountInformation: "Malsukcesas akiri informon de konto" _emailUnavailable: - used: "La retpoŝto jam estas uzita." - format: "Nevalida formato." - disposable: "Dumtempa retpoŝto ne estas uzebla." mx: "Ĉi retpoŝto-servilo ne estas uzebla." - smtp: "Tiu retpoŝta servilo ne respondas" -_ffVisibility: - public: "Publika" - followers: "Nur al sekvantoj" - private: "Malpublikigita" _signup: almostThere: "Preskaŭ plenumita" - emailAddressInfo: "Entajpu vian retpoŝton" _accountDelete: - accountDelete: "Forigi konton" requestAccountDelete: "Peti forviŝi konton" started: "Forviŝado komenciĝis." -_ad: - back: "Nuligi" -_forgotPassword: - enterEmail: "Entajpu la retpoŝton kiun vi registrigis al via konto. Ligilo por restarigi pasvorton estos sendita al la retadreso." _gallery: - my: "Miaj afiŝoj" - liked: "Ŝatitaj notoj" - like: "Ŝati" -_email: - _follow: - title: "Eksekvis vin" - _receiveFollowRequest: - title: "Vi ricevis peton de sekvado" -_plugin: - install: "Instali kromaĵon" - manage: "Bonteni kromaĵojn" -_registry: - key: "Ŝlosilo" - keys: "Ŝlosiloj" - domain: "Nomregno" - createKey: "Krei ŝlosilon" + my: "Mia afiŝo" _aboutMisskey: - about: "Misskey estas malfermitkoda programo evoluigata de syuilo ekde la 2014." - contributors: "Precipaj kontribuantoj" - allContributors: "Ĉiuj kontribuantoj" - source: "Fontkodo" - translation: "Traduki Misskey" donate: "Mondonaci al Misskey" - patrons: "Mecenatoj" -_mfm: - dummy: "Misskey evoluigas la mondon de Fediverso" - mention: "Mencioj" - hashtag: "Kradvorto" - url: "URL" - link: "Ligilo" - bold: "Grasa" - small: "Malgrande" - center: "Centrigi" - inlineCode: "Kodo (en linio)" - blockCode: "Kodo (bloko)" - inlineMath: "Formulo (en linio)" - blockMath: "Formulo (bloko)" - quote: "Citi" - emoji: "Propraj emoĝioj" - search: "Serĉi" - flip: "Inversa" - x2: "Granda" - x3: "Grandega" - x4: "Pli grandega" - font: "Presliteraro" - rotate: "Orientiĝo" -_instanceTicker: - none: "Ne montri" - remote: "Montri al foraj uzantoj" - always: "Ĉiam montri" -_serverDisconnectedBehavior: - reload: "Aŭtomate reŝargi" _channel: - create: "Krei kanalon" - edit: "Redakti kanalon" - setBanner: "Apliki standardan bildon" - removeBanner: "Forviŝi la standardan bildon" - owned: "Bontenitaj de vi" - following: "Sekvado" - usersCount: "{n} partoprenantoj" notesCount: "{n} notoj" -_menuDisplay: - sideFull: "Sur la flanko" - sideIcon: "Sur la flanko (bildsimbolo)" - top: "Sur la supro" - hide: "Kaŝi" -_wordMute: - muteWords: "Silentigitaj vortoj" - soft: "Per la kliento" - hard: "Per la servilo" - mutedNotes: "Silentigitaj notoj" _theme: explore: "Serĉi koloraron" install: "Instali koloraron" - manage: "Bonteni kolorarojn" - code: "Kolorara kodo" - description: "Priskribo" installedThemes: "Instalita koloraro" make: "Krei koloraron" addConstant: "Aldoni konstanton" constant: "Konstanto" - defaultValue: "Implicitaĵa valoro" - color: "Koloro" - func: "Funkcio" - darken: "Malbrileco" - lighten: "Brileco" keys: - bg: "Fono" shadow: "Ombro" - navBg: "Fono de flanka stango" - link: "Ligilo" - hashtag: "Kradvorto" - mention: "Mencioj" - mentionMe: "Mencio al vi" - renote: "Plusendita" infoBg: "Fono de informo" - buttonBg: "Fono de butono" - driveFolderBg: "Fono de dosierujo de la disko" - messageBg: "Fono de la retbabilejo" -_sfx: - note: "Nova noto" - noteMy: "Mia noto" - notification: "Sciigoj" - chat: "Retbabili" - chatBg: "Retbabili (BG)" - antenna: "Ricevo de la anteno" - channel: "Sciigoj de kanalo" -_ago: - future: "Futuro" - justNow: "Ĵus" - secondsAgo: "Antaŭ {n} sekundoj" - minutesAgo: "Antaŭ {n} minutoj" - hoursAgo: "Antaŭ {n} horo(j)" - daysAgo: "Antaŭ {n} tago(j)" - weeksAgo: "Antaŭ {n} semajnoj" - monthsAgo: "Antaŭ {n} monatoj" - yearsAgo: "Antaŭ {n} jaroj" -_time: - second: "sek" - minute: "min" - day: "Tago" -_tutorial: - title: "Uzado de Misskey" - step1_1: "Bonvenon." - step7_2: "Se vi volas pli scii pri Misskey, vidu la fakon {help}." - step7_3: "Do, bonvolu amuziĝi sur Misskey🚀" -_2fa: - registerKey: "Nove registri ŝlosilon" -_permissions: - "read:account": "Vidi la informojn de via konto" - "write:account": "Redatado de la informoj de via konto" - "read:blocks": "Vidi vian liston de uzantoj blokitaj" - "write:blocks": "Redakti vian liston de blokitoj" - "read:drive": "Legi vian diskon" - "write:drive": "Ĉia operacio por skribi, forviŝi, aŭ alimaniere ŝanĝi la informon de dosiero en via disko de Misskey" - "read:favorites": "Vidi vian liston de preferaĵoj" - "write:favorites": "Redakti vian liston de preferaĵoj" - "read:following": "Vidi la informojn de sekvo" - "write:following": "Sekvi/ Ĉesi sekvi alian uzanton" - "read:messaging": "Vidi viajn retbabiladojn" - "write:messaging": "Administri viajn retbabiladojn" - "read:mutes": "Vidi vian liston de silentigitoj" - "write:mutes": "Redakti vian liston de silentigitoj" - "write:notes": "Krei / Forviŝi noton" - "read:notifications": "Vidi sciigojn" - "write:notifications": "Manipulado por viaj sciigoj" - "read:reactions": "Vidi reagojn" - "write:reactions": "Redakti viajn reagojn" - "read:page-likes": "Vidi ŝatojn de paĝo" - "read:user-groups": "Vidi viajn grupojn de uzantoj" - "read:channels": "Vidi kanalojn" -_antennaSources: - all: "Ĉiuj notoj" - homeTimeline: "Notoj de la uzantoj kiujn vi sekvas" -_weekday: - sunday: "Dimanĉo" - monday: "Lundo" - tuesday: "Mardo" - wednesday: "Merkredo" - thursday: "Ĵaŭdo" - friday: "Vendredo" - saturday: "Sabato" _widgets: - notifications: "Sciigoj" - timeline: "Templinio" - clock: "Horloĝo" - activity: "Aktiveco" photos: "Fotoj" - federation: "Federaĵo" - slideshow: "Bildoprezento" - button: "Butono" - onlineUsers: "Surkonektitaj uzantoj" - aichan: "Ai" _cw: - show: "Vidi pli" chars: "{count} literoj" - files: "{count} dosiero(j)" _poll: - choiceN: "Balotilo {n}" - noMore: "Oni ne povas aldoni pli" - canMultipleVote: "Permesi plurelekton" expiration: "Limtempo" - infinite: "Por ĉiam" - votesCount: "{n} voĉoj" - totalVotes: "Sume {n} voĉoj" - vote: "Voĉdoni" - showResult: "Vidi rezultojn" - voted: "Voĉdonita" - closed: "Finita" -_visibility: - public: "Publika" - publicDescription: "Publikigi al ĉiuj en la Fediverso" - home: "Hejma" - homeDescription: "Dissendi nur sur hejma templinio" - followers: "Nur al sekvantoj" - followersDescription: "Videbligi nur al sekvantoj" - specified: "Rekte montrita" - specifiedDescription: "Montri nur al specifaj uzantoj" - localOnly: "Nur loka" - localOnlyDescription: "Ne videbligi al foraj uzantoj" -_postForm: - replyPlaceholder: "Respondi la noton…" - quotePlaceholder: "Citi la noton…" - channelPlaceholder: "Afiŝi en la kanalo…" - _placeholders: - a: "Kiel vi fartas?" - b: "Kio okazis ĉirkaŭ vi?" - c: "Kion vi pensas?" - d: "Kion vi volas diri?" - e: "Komencu skribi tie" -_profile: - name: "Nomo" - username: "Uzantnomo" - description: "Sinprezento" - metadata: "Kromaj Informoj" - metadataEdit: "Redakti kromajn informojn" - changeAvatar: "Ŝanĝi profilbildon" - changeBanner: "Ŝanĝi standardon" -_exportOrImport: - allNotes: "Ĉiuj notoj" - followingList: "Sekvatoj" - muteList: "Silentigoj" - blockingList: "Blokitoj" - userLists: "Listoj" -_charts: - federation: "Federaĵo" - usersTotal: "La totala nombro de la uzantoj" - activeUsers: "La nombro de la uzantoj aktivaj" - notesTotal: "La totala nombro de notoj" - filesTotal: "La totala nombro de la dosieroj" -_timelines: - home: "Hejma" - local: "Loka" - social: "Sociala" - global: "Malloka" _pages: - newPage: "Krei novan paĝon" - editPage: "Redakti paĝon" - deleted: "Oni forviŝis la paĝon." - editThisPage: "Redakti la paĝon" - viewPage: "Vidi paĝojn" - my: "Miaj paĝoj" - featured: "Ravaĵoj" - contents: "Enhavo" - content: "Bloko de paĝo" - title: "Temlinio" - url: "URL de la paĝo" - alignCenter: "Centrigi" - hideTitleWhenPinned: "Kaŝi la titolon de la paĝo kiam alpinglita" - chooseBlock: "Aldoni blokon" - contentBlocks: "Enhavo" - inputBlocks: "Enigo" - blocks: - text: "Teksto" - textarea: "Areo de teksto" - image: "Bildo" - button: "Butono" - _post: - canvasId: "Kanvasa identigilo" - textInput: "Enmeto el teksto" - _textInput: - text: "Titolo" - default: "Implicitaĵa valoro" - textareaInput: "Enmeto el teksto en multaj linioj" - _textareaInput: - text: "Titolo" - default: "Implicitaĵa valoro" - numberInput: "Nombra enmeto" - _numberInput: - text: "Titolo" - default: "Implicitaĵa valoro" - _canvas: - id: "Kanvasa identigilo" - width: "Larĝeco" - _note: - id: "Identigilo de noto" - _switch: - text: "Titolo" - default: "Implicitaĵa valoro" - _counter: - text: "Titolo" - _button: - text: "Titolo" - _action: - _dialog: - content: "Enhavo" - _pushEvent: - event: "Nomo de la evento" - no-variable: "Neniu" - _radioButton: - title: "Titolo" - default: "Implicitaĵa valoro" script: - categories: - random: "Hazardo" - value: "Valoro" - fn: "Funkcio" - text: "Manipulo de teksto" - list: "Listoj" blocks: - text: "Teksto" - multiLineText: "Teksto (multaj linioj)" - textList: "List de teksto" - _strLen: - arg1: "Teksto" - _strPick: - arg1: "Teksto" - _strReplace: - arg1: "Teksto" - _strReverse: - arg1: "Teksto" - _join: - arg1: "Listoj" - arg2: "apartigilo" _add: arg1: "A" arg2: "B" @@ -1080,72 +121,6 @@ _pages: _gtEq: arg1: "A" arg2: "B" - random: "Hazardo" - _randomPick: - arg1: "Listoj" - _dailyRandomPick: - arg1: "Listoj" - _seedRandomPick: - arg2: "Listoj" - _DRPWPM: - arg1: "List de teksto" - pick: "Elekti de la listo" - _pick: - arg1: "Listoj" - _listLen: - arg1: "Listoj" - _stringToNumber: - arg1: "Teksto" - _splitStrByLine: - arg1: "Teksto" - fn: "Funkcio" - _fn: - slots: "Juntoj" - arg1: "Elmeto" - thereIsEmptySlot: "La junto {slot} estas malplena!" - types: - string: "Teksto" - array: "Listoj" - stringArray: "List de teksto" - emptySlot: "Malplena junto" - argVariables: "Eniga junto" -_relayStatus: - requesting: "Atendado de aprobon" - accepted: "Konfirmita" - rejected: "Malakceptita" _notification: - fileUploaded: "La dosiero sukcese alŝutiĝis." - youGotMention: "{name} mencis" - youGotReply: "{name} respondis" - youGotQuote: "{name} citis" - youRenoted: "{name} plusendis" - youGotPoll: "{name} voĉdonis" - youGotMessagingMessageFromUser: "{name} sendis al vi mesaĝon" - youGotMessagingMessageFromGroup: "Oni sendis al la grupo {name} mesaĝon" - youWereFollowed: "Eksekvis vin" - youReceivedFollowRequest: "Vi ricevis peton de sekvado" - yourFollowRequestAccepted: "Via peto de sekvado estis akceptita." - youWereInvitedToGroup: "Invitita al grupo" - pollEnded: "La rezulto de la balot-enketo estas disponebla" _types: - all: "Ĉio" - follow: "Novaj sekvantoj" - mention: "Mencioj" - reply: "Respondoj" - renote: "Plusendoj" - quote: "Citi" - reaction: "Reagoj" - pollVote: "Voĉdonoj en balot-enketo" pollEnded: "Enketo finiĝis" - receiveFollowRequest: "Ricevi peton de sekvado" - followRequestAccepted: "Akceptita peto de sekvado" - groupInvited: "Invitita al grupo" -_deck: - profile: "Agordaro" - _columns: - notifications: "Sciigoj" - tl: "Templinio" - antenna: "Antenoj" - list: "Listoj" - mentions: "Mencioj" - direct: "Rekte" diff --git a/locales/ro-RO.yml b/locales/ro-RO.yml index 8909a72ec7..6b2ff19e8e 100644 --- a/locales/ro-RO.yml +++ b/locales/ro-RO.yml @@ -481,13 +481,24 @@ showFeaturedNotesInTimeline: "Arată notele recomandate în cronologii" objectStorage: "Object Storage" useObjectStorage: "Folosește Object Storage" objectStorageBaseUrl: "URL de bază" +objectStorageBaseUrlDesc: "URL-ul este folosit pentru referință. Specifică URL-ul CDN-ului sau Proxy-ului tău dacă folosești unul. Pentru S3 folosește 'https://.s3.amazonaws.com' și pentru GCS sau servicii echivalente folosește 'https://storage.googleapis.com/', etc." objectStorageBucket: "Bucket" objectStorageBucketDesc: "Te rog specifică numele bucket-ului furnizorului tău." objectStoragePrefix: "Prefix" objectStoragePrefixDesc: "Fișierele vor fi stocate sub directoare cu acest prefix." objectStorageEndpoint: "Endpoint" +objectStorageEndpointDesc: "Lasă acest câmp gol dacă folosești AWS S3, dacă nu specifică endpoint-ul ca '' sau ':', depinzând de ce serviciu folosești." objectStorageRegion: "Regiune" +objectStorageRegionDesc: "Specifică o regiune precum 'xx-east-1'. Dacă serviciul tău nu face distincția între regiuni lasă acest câmp gol sau introdu 'us-east-1'." objectStorageUseSSL: "Folosește SSl" +objectStorageUseSSLDesc: "Oprește această opțiune dacă nu vei folosi HTTPS pentru conexiunile API-ului" +objectStorageUseProxy: "Conectează-te prin Proxy" +objectStorageUseProxyDesc: "Oprește această opțiune dacă vei nu folosi un Proxy pentru conexiunile API-ului" +objectStorageSetPublicRead: "Setează \"public-read\" pentru încărcare" +serverLogs: "Loguri server" +deleteAll: "Șterge tot" +showFixedPostForm: "Arată caseta de postare în vârful cronologie" +newNoteRecived: "Sunt note noi" sounds: "Sunete" listen: "Ascultă" none: "Nimic" @@ -522,12 +533,42 @@ removeAllFollowingDescription: "Asta va dez-urmări toate conturile din {host}. userSuspended: "Acest utilizator a fost suspendat." userSilenced: "Acest utilizator a fost setat silențios." yourAccountSuspendedTitle: "Acest cont a fost suspendat" +yourAccountSuspendedDescription: "Acest cont a fost suspendat din cauza încălcării termenilor de serviciu al serverului sau ceva similar. Contactează administratorul dacă ai dori să afli un motiv mai detaliat. Te rog nu crea un cont nou." +menu: "Meniu" +divider: "Separator" +addItem: "Adaugă element" +relays: "Relee" +addRelay: "Adaugă Releu" +inboxUrl: "URL-ul inbox-ului" +addedRelays: "Relee adăugate" +serviceworkerInfo: "Trebuie să fie activat pentru notificări push." +deletedNote: "Notă ștearsă" +invisibleNote: "Note ascunse" +enableInfiniteScroll: "Încarcă mai mult automat" +visibility: "Vizibilitate" +poll: "Sondaj" +useCw: "Ascunde conținutul" +enablePlayer: "Deschide player-ul video" +disablePlayer: "Închide player-ul video" +expandTweet: "Expandează tweet" +themeEditor: "Editor de teme" +description: "Descriere" +describeFile: "Adaugă titrări" +enterFileDescription: "Introdu titrările" +author: "Autor" +leaveConfirm: "Ai schimbări nesalvate. Vrei să renunți la ele?" +manage: "Gestionare" +plugins: "Pluginuri" +deck: "Deck" +undeck: "Părăsește Deck" +useBlurEffectForModal: "Folosește efect de blur pentru modale" smtpHost: "Gazdă" smtpUser: "Nume de utilizator" smtpPass: "Parolă" clearCache: "Golește cache-ul" info: "Despre" user: "Utilizatori" +administration: "Gestionare" searchByGoogle: "Caută" _email: _follow: @@ -538,9 +579,11 @@ _mfm: emoji: "Emoji personalizat" search: "Caută" _theme: + description: "Descriere" keys: mention: "Mențiune" renote: "Re-notează" + divider: "Separator" _sfx: note: "Note" notification: "Notificări" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index a1e0a830cd..18c6f17154 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -81,6 +81,8 @@ somethingHappened: "發生錯誤" retry: "重試" pageLoadError: "載入頁面失敗" pageLoadErrorDescription: "這通常是因為網路錯誤或是瀏覽器快取殘留的原因。請先清除瀏覽器快取,稍後再重試" +serverIsDead: "伺服器沒有回應。請稍等片刻,然後重試。" +youShouldUpgradeClient: "請重新載入以使用新版本的客戶端顯示此頁面" enterListName: "輸入清單名稱" privacy: "隱私" makeFollowManuallyApprove: "手動審核追隨請求" @@ -104,6 +106,7 @@ clickToShow: "按一下以顯示" sensitive: "敏感內容" add: "新增" reaction: "情感" +reactionSetting: "在選擇器中顯示反應" reactionSettingDescription2: "拖動以重新列序,點擊以刪除,按下 + 添加。" rememberNoteVisibility: "記住貼文可見性" attachCancel: "移除附件" @@ -138,6 +141,7 @@ flagAsBot: "此使用者是機器人" flagAsBotDescription: "如果本帳戶是由程式控制,請啟用此選項。啟用後,會作為標示幫助其他開發者防止機器人之間產生無限互動的行為,並會調整Misskey內部系統將本帳戶識別為機器人" flagAsCat: "此使用者是貓" flagAsCatDescription: "如果想將本帳戶標示為一隻貓,請開啟此標示" +flagShowTimelineReplies: "在時間軸上顯示貼文的回覆" autoAcceptFollowed: "自動追隨中使用者的追隨請求" addAccount: "添加帳戶" loginFailed: "登入失敗" @@ -599,6 +603,9 @@ reportAbuse: "檢舉" reportAbuseOf: "檢舉{name}" fillAbuseReportDescription: "請填寫檢舉的詳細理由。可以的話,請附上針對的URL網址。" abuseReported: "回報已送出。感謝您的報告。" +reporter: "檢舉者" +reporteeOrigin: "檢舉來源" +reporterOrigin: "檢舉者來源" send: "發送" abuseMarkAsResolved: "處理完畢" openInNewTab: "在新分頁中開啟" @@ -734,6 +741,7 @@ postToGallery: "發佈到相簿" gallery: "相簿" recentPosts: "最新貼文" popularPosts: "熱門的貼文" +shareWithNote: "在貼文中分享" ads: "廣告" expiration: "期限" memo: "備忘錄" @@ -743,14 +751,35 @@ middle: "中" low: "低" emailNotConfiguredWarning: "沒有設定電子郵件地址" ratio: "%" +previewNoteText: "預覽文本" +customCss: "自定義 CSS" global: "公開" sent: "發送" +received: "收取" +searchResult: "搜尋結果" hashtags: "#tag" +troubleshooting: "故障排除" +useBlurEffect: "在 UI 上使用模糊效果" +misskeyUpdated: "Misskey 更新完成!" +translate: "翻譯" +translatedFrom: "從 {x} 翻譯" +accountDeletionInProgress: "正在刪除帳戶" +pubSub: "Pub/Sub 帳戶" +resolved: "已解決" +unresolved: "未解決" +breakFollow: "移除追蹤者" hide: "隱藏" +leaveGroupConfirm: "確定離開「{name}」?" +auto: "自動" searchByGoogle: "搜尋" indefinitely: "無期限" _ffVisibility: public: "發佈" + private: "私密" +_signup: + almostThere: "即將完成" +_accountDelete: + inProgress: "正在刪除" _ad: back: "返回" reduceFrequencyOfThisAd: "降低此廣告的頻率 " From 16c7ef41fbb440c2c3df680fe17507666472c5d9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Apr 2022 23:13:09 +0900 Subject: [PATCH 42/66] 12.110.0 --- CHANGELOG.md | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6fafad14c..2117101347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ You should also include the user name that made the change. --> -## 12.x.x (unreleased) +## 12.110.0 (2022/04/11) ### Improvements - Improve webhook @syuilo diff --git a/package.json b/package.json index 60d24e82d1..13d70929bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "12.109.2", + "version": "12.110.0", "codename": "indigo", "repository": { "type": "git", From 2c1689c7989b2d02b52c95049a93c9c576c9ad13 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 15 Apr 2022 15:05:43 +0900 Subject: [PATCH 43/66] chore: add import/order rule for eslint --- packages/backend/.eslintrc.cjs | 12 ++++++++++++ packages/shared/.eslintrc.js | 3 +++ 2 files changed, 15 insertions(+) diff --git a/packages/backend/.eslintrc.cjs b/packages/backend/.eslintrc.cjs index e2e31e9e33..dfc9d04950 100644 --- a/packages/backend/.eslintrc.cjs +++ b/packages/backend/.eslintrc.cjs @@ -6,4 +6,16 @@ module.exports = { extends: [ '../shared/.eslintrc.js', ], + rules: { + 'import/order': ['warn', { + 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'], + 'pathGroups': [ + { + 'pattern': '@/**', + 'group': 'external', + 'position': 'after' + } + ], + }] + }, }; diff --git a/packages/shared/.eslintrc.js b/packages/shared/.eslintrc.js index 2d3356c3a6..4d9d6f2c85 100644 --- a/packages/shared/.eslintrc.js +++ b/packages/shared/.eslintrc.js @@ -68,5 +68,8 @@ module.exports = { }], 'import/no-unresolved': ['off'], 'import/no-default-export': ['warn'], + 'import/order': ['warn', { + 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'], + }] }, }; From e598d46c3191be107dfafdd2cd0c1e65348e6a3c Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 15 Apr 2022 21:33:00 +0900 Subject: [PATCH 44/66] Update settings.json --- packages/backend/.vscode/settings.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/.vscode/settings.json b/packages/backend/.vscode/settings.json index df3bf05071..9fb3b29d4a 100644 --- a/packages/backend/.vscode/settings.json +++ b/packages/backend/.vscode/settings.json @@ -2,5 +2,9 @@ "typescript.tsdk": "node_modules\\typescript\\lib", "path-intellisense.mappings": { "@": "${workspaceRoot}/packages/backend/src/" + }, + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll": true } } From 1d193b9a04cd766362336abbd67d05830f70f28c Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Sat, 16 Apr 2022 01:28:59 +0900 Subject: [PATCH 45/66] refactor: move typings to devDependencies (#8500) --- package.json | 4 +- packages/backend/package.json | 86 +++++++++++++++++------------------ packages/client/package.json | 42 ++++++++--------- 3 files changed, 66 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index 13d70929bc..361c4096da 100644 --- a/package.json +++ b/package.json @@ -30,8 +30,6 @@ "cleanall": "npm run clean-all" }, "dependencies": { - "@types/gulp": "4.0.9", - "@types/gulp-rename": "2.0.1", "execa": "5.1.1", "gulp": "4.0.2", "gulp-cssnano": "2.1.3", @@ -41,6 +39,8 @@ "js-yaml": "4.1.0" }, "devDependencies": { + "@types/gulp": "4.0.9", + "@types/gulp-rename": "2.0.1", "@typescript-eslint/parser": "5.18.0", "cross-env": "7.0.3", "cypress": "9.5.3", diff --git a/packages/backend/package.json b/packages/backend/package.json index 314818f80b..7fe3757eb3 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -21,49 +21,6 @@ "@koa/router": "9.0.1", "@sinonjs/fake-timers": "9.1.1", "@syuilo/aiscript": "0.11.1", - "@types/bcryptjs": "2.4.2", - "@types/bull": "3.15.8", - "@types/cbor": "6.0.0", - "@types/escape-regexp": "0.0.1", - "@types/is-url": "1.2.30", - "@types/js-yaml": "4.0.5", - "@types/jsdom": "16.2.14", - "@types/jsonld": "1.5.6", - "@types/koa": "2.13.4", - "@types/koa-bodyparser": "4.3.7", - "@types/koa-cors": "0.0.2", - "@types/koa-favicon": "2.0.21", - "@types/koa-logger": "3.1.2", - "@types/koa-mount": "4.0.1", - "@types/koa-send": "4.1.3", - "@types/koa-views": "7.0.0", - "@types/koa__cors": "3.1.1", - "@types/koa__multer": "2.0.4", - "@types/koa__router": "8.0.11", - "@types/mocha": "9.1.0", - "@types/node": "17.0.23", - "@types/node-fetch": "3.0.3", - "@types/nodemailer": "6.4.4", - "@types/oauth": "0.9.1", - "@types/parse5": "6.0.3", - "@types/portscanner": "2.1.1", - "@types/pug": "2.0.6", - "@types/punycode": "2.1.0", - "@types/qrcode": "1.4.2", - "@types/random-seed": "0.3.3", - "@types/ratelimiter": "3.4.3", - "@types/redis": "4.0.11", - "@types/rename": "1.0.4", - "@types/sanitize-html": "2.6.2", - "@types/sharp": "0.30.1", - "@types/sinonjs__fake-timers": "8.1.2", - "@types/speakeasy": "2.0.7", - "@types/tinycolor2": "1.4.3", - "@types/tmp": "0.2.3", - "@types/uuid": "8.3.4", - "@types/web-push": "3.3.2", - "@types/websocket": "1.0.5", - "@types/ws": "8.5.3", "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", "@bull-board/koa": "3.10.3", @@ -172,7 +129,50 @@ }, "devDependencies": { "@redocly/openapi-core": "1.0.0-beta.93", + "@types/bcryptjs": "2.4.2", + "@types/bull": "3.15.8", + "@types/cbor": "6.0.0", + "@types/escape-regexp": "0.0.1", "@types/fluent-ffmpeg": "2.1.20", + "@types/is-url": "1.2.30", + "@types/js-yaml": "4.0.5", + "@types/jsdom": "16.2.14", + "@types/jsonld": "1.5.6", + "@types/koa": "2.13.4", + "@types/koa-bodyparser": "4.3.7", + "@types/koa-cors": "0.0.2", + "@types/koa-favicon": "2.0.21", + "@types/koa-logger": "3.1.2", + "@types/koa-mount": "4.0.1", + "@types/koa-send": "4.1.3", + "@types/koa-views": "7.0.0", + "@types/koa__cors": "3.1.1", + "@types/koa__multer": "2.0.4", + "@types/koa__router": "8.0.11", + "@types/mocha": "9.1.0", + "@types/node": "17.0.23", + "@types/node-fetch": "3.0.3", + "@types/nodemailer": "6.4.4", + "@types/oauth": "0.9.1", + "@types/parse5": "6.0.3", + "@types/portscanner": "2.1.1", + "@types/pug": "2.0.6", + "@types/punycode": "2.1.0", + "@types/qrcode": "1.4.2", + "@types/random-seed": "0.3.3", + "@types/ratelimiter": "3.4.3", + "@types/redis": "4.0.11", + "@types/rename": "1.0.4", + "@types/sanitize-html": "2.6.2", + "@types/sharp": "0.30.1", + "@types/sinonjs__fake-timers": "8.1.2", + "@types/speakeasy": "2.0.7", + "@types/tinycolor2": "1.4.3", + "@types/tmp": "0.2.3", + "@types/uuid": "8.3.4", + "@types/web-push": "3.3.2", + "@types/websocket": "1.0.5", + "@types/ws": "8.5.3", "cross-env": "7.0.3", "execa": "6.1.0" } diff --git a/packages/client/package.json b/packages/client/package.json index 9de500f3ab..7b8ee0cf37 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -13,27 +13,6 @@ "@discordapp/twemoji": "13.1.1", "@fortawesome/fontawesome-free": "6.1.1", "@syuilo/aiscript": "0.11.1", - "@types/escape-regexp": "0.0.1", - "@types/glob": "7.2.0", - "@types/gulp": "4.0.9", - "@types/gulp-rename": "2.0.1", - "@types/is-url": "1.2.30", - "@types/katex": "0.14.0", - "@types/matter-js": "0.17.7", - "@types/mocha": "9.1.0", - "@types/oauth": "0.9.1", - "@types/parse5": "6.0.3", - "@types/punycode": "2.1.0", - "@types/qrcode": "1.4.2", - "@types/random-seed": "0.3.3", - "@types/seedrandom": "3.0.2", - "@types/throttle-debounce": "2.1.0", - "@types/tinycolor2": "1.4.3", - "@types/uuid": "8.3.4", - "@types/webpack": "5.28.0", - "@types/webpack-stream": "3.2.12", - "@types/websocket": "1.0.5", - "@types/ws": "8.5.3", "@typescript-eslint/parser": "5.18.0", "@vue/compiler-sfc": "3.2.31", "abort-controller": "3.0.0", @@ -117,6 +96,27 @@ "ws": "8.5.0" }, "devDependencies": { + "@types/escape-regexp": "0.0.1", + "@types/glob": "7.2.0", + "@types/gulp": "4.0.9", + "@types/gulp-rename": "2.0.1", + "@types/is-url": "1.2.30", + "@types/katex": "0.14.0", + "@types/matter-js": "0.17.7", + "@types/mocha": "9.1.0", + "@types/oauth": "0.9.1", + "@types/parse5": "6.0.3", + "@types/punycode": "2.1.0", + "@types/qrcode": "1.4.2", + "@types/random-seed": "0.3.3", + "@types/seedrandom": "3.0.2", + "@types/throttle-debounce": "2.1.0", + "@types/tinycolor2": "1.4.3", + "@types/uuid": "8.3.4", + "@types/webpack": "5.28.0", + "@types/webpack-stream": "3.2.12", + "@types/websocket": "1.0.5", + "@types/ws": "8.5.3", "@typescript-eslint/eslint-plugin": "5.18.0", "cross-env": "7.0.3", "cypress": "9.5.3", From 0d9f5306cdfbf60dad7e8228891b237a293b16a4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 16 Apr 2022 13:31:12 +0900 Subject: [PATCH 46/66] remove unused locale --- locales/eo-UY.yml | 126 ---------------------------------------------- locales/index.js | 1 - 2 files changed, 127 deletions(-) delete mode 100644 locales/eo-UY.yml diff --git a/locales/eo-UY.yml b/locales/eo-UY.yml deleted file mode 100644 index 65a5931574..0000000000 --- a/locales/eo-UY.yml +++ /dev/null @@ -1,126 +0,0 @@ ---- -ok: "Bone" -exportRequested: "Vi petis elporton. Ĝi povas bezoni longan tempon. Elportaĵo estos aldonita al disko post elportado." -importRequested: "Vi petis enportadon. Ĝi povas bezoni longan tempon. " -pageLoadError: "Fuŝiĝis enlegi paĝon." -pageLoadErrorDescription: "Ordinare tio okazas pro la retkondiĉo aŭ la staplo de retumilo.\nPurigu la staplon, aŭ refaru poste. " -youShouldUpgradeClient: "Por montri ĉi paĝon, bonvolu enlegi refoje kaj uzi klienton novversian." -flagAsCatDescription: "Flagu por montri ke la konton havas kato." -flagShowTimelineReplies: "Montri respondon de notoj en templinio." -intro: "Instalado de Misskey finiĝis! Kreu administran konton." -whenServerDisconnected: "Kiam vi malligiĝas de servilo" -caseSensitive: "Distingi usklecon" -markAsReadAllUnreadNotes: "Marki ĉiujn afiŝojn kiel legita" -checking: "kontrolante..." -signinFailed: "Fuŝiĝis ensaluti. Bonvolu kontroli uzantnomon kaj pasvorton." -promote: "Reklamata" -updateRemoteUser: "Aktualigi informon de foraj uzantoj" -yourAccountSuspendedTitle: "La konto estas frostigita." -tokenRequested: "Alirpermeso al konto" -abuseReports: "Raportoj" -reportAbuse: "Raportoj" -reportAbuseOf: "raporti {name}n" -reporter: "Informanto" -reporterOrigin: "Raportanto" -pollVotesCount: "Nombro de voĉdonado" -invalidValue: "Nevalida valoro" -notRecommended: "Evitindaj" -switchAccount: "Ŝanĝi konton" -configure: "Agordi" -popularPosts: "Populara noto" -expiration: "Limtempo" -priority: "Prioritato" -squareAvatars: "Montri bildsimbolon kiel kvadrata" -misskeyUpdated: "Misskey ĝisdatiĝis!" -whatIsNew: "Montri novaĵojn" -accountDeletionInProgress: "La konto estas forviŝanta." -resolved: "Solvita" -unresolved: "Nesolvita" -filter: "Filtrilo" -deleteAccountConfirm: "La konto estos forviŝita. Ĉu vi daŭrigas fari?" -voteConfirm: "Ĉu vi voĉdonas {choice}n?" -hide: "Kaŝi" -overridedDeviceKind: "tipo de aparato" -size: "Grandeco" -searchByGoogle: "Serĉi en Guglo-Serĉilo" -mutePeriod: "Daŭro de silentigo" -indefinitely: "Sen limdato" -tenMinutes: "Je 10 minutoj" -oneHour: "Je 1 horo" -oneDay: "Je 1 tago" -oneWeek: "Je 1 semajno" -failedToFetchAccountInformation: "Malsukcesas akiri informon de konto" -_emailUnavailable: - mx: "Ĉi retpoŝto-servilo ne estas uzebla." -_signup: - almostThere: "Preskaŭ plenumita" -_accountDelete: - requestAccountDelete: "Peti forviŝi konton" - started: "Forviŝado komenciĝis." -_gallery: - my: "Mia afiŝo" -_aboutMisskey: - donate: "Mondonaci al Misskey" -_channel: - notesCount: "{n} notoj" -_theme: - explore: "Serĉi koloraron" - install: "Instali koloraron" - installedThemes: "Instalita koloraro" - make: "Krei koloraron" - addConstant: "Aldoni konstanton" - constant: "Konstanto" - keys: - shadow: "Ombro" - infoBg: "Fono de informo" -_widgets: - photos: "Fotoj" -_cw: - chars: "{count} literoj" -_poll: - expiration: "Limtempo" -_pages: - script: - blocks: - _add: - arg1: "A" - arg2: "B" - _subtract: - arg1: "A" - arg2: "B" - _multiply: - arg1: "A" - arg2: "B" - _divide: - arg1: "A" - arg2: "B" - _mod: - arg1: "A" - arg2: "B" - _eq: - arg1: "A" - arg2: "B" - _notEq: - arg1: "A" - arg2: "B" - _and: - arg1: "A" - arg2: "B" - _or: - arg1: "A" - arg2: "B" - _lt: - arg1: "A" - arg2: "B" - _gt: - arg1: "A" - arg2: "B" - _ltEq: - arg1: "A" - arg2: "B" - _gtEq: - arg1: "A" - arg2: "B" -_notification: - _types: - pollEnded: "Enketo finiĝis" diff --git a/locales/index.js b/locales/index.js index b271b79b73..98c30fe016 100644 --- a/locales/index.js +++ b/locales/index.js @@ -19,7 +19,6 @@ const languages = [ 'da-DK', 'de-DE', 'en-US', - 'eo-UY', 'es-ES', 'fr-FR', 'id-ID', From 4907dc91f7ebad802d29b5d42483b02f6702eb16 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 16 Apr 2022 17:18:51 +0900 Subject: [PATCH 47/66] lint --- .../src/remote/activitypub/models/person.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index 88661865da..4267f46fb3 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -3,15 +3,7 @@ import promiseLimit from 'promise-limit'; import $, { Context } from 'cafy'; import config from '@/config/index.js'; -import Resolver from '../resolver.js'; -import { resolveImage } from './image.js'; -import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue, getApType, isActor } from '../type.js'; -import { fromHtml } from '../../../mfm/from-html.js'; -import { htmlToMfm } from '../misc/html-to-mfm.js'; -import { resolveNote, extractEmojis } from './note.js'; import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; -import { extractApHashtags } from './tag.js'; -import { apLogger } from '../logger.js'; import { Note } from '@/models/entities/note.js'; import { updateUsertags } from '@/services/update-hashtag.js'; import { Users, Instances, DriveFiles, Followings, UserProfiles, UserPublickeys } from '@/models/index.js'; @@ -32,6 +24,14 @@ import { StatusError } from '@/misc/fetch.js'; import { uriPersonCache } from '@/services/user-cache.js'; import { publishInternalEvent } from '@/services/stream.js'; import { db } from '@/db/postgre.js'; +import { apLogger } from '../logger.js'; +import { htmlToMfm } from '../misc/html-to-mfm.js'; +import { fromHtml } from '../../../mfm/from-html.js'; +import { isCollectionOrOrderedCollection, isCollection, IActor, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue, getApType, isActor } from '../type.js'; +import Resolver from '../resolver.js'; +import { extractApHashtags } from './tag.js'; +import { resolveNote, extractEmojis } from './note.js'; +import { resolveImage } from './image.js'; const logger = apLogger; @@ -400,10 +400,10 @@ export async function resolvePerson(uri: string, resolver?: Resolver): Promise any } = { - 'misskey:authentication:twitter': (userId, screenName) => ({ userId, screenName }), - 'misskey:authentication:github': (id, login) => ({ id, login }), - 'misskey:authentication:discord': (id, name) => $discord(id, name), -}; + 'misskey:authentication:twitter': (userId, screenName) => ({ userId, screenName }), + 'misskey:authentication:github': (id, login) => ({ id, login }), + 'misskey:authentication:discord': (id, name) => $discord(id, name), + }; const $discord = (id: string, name: string) => { if (typeof name !== 'string') { @@ -461,7 +461,7 @@ export async function updateFeatured(userId: User['id']) { // Resolve to (Ordered)Collection Object const collection = await resolver.resolveCollection(user.featured); - if (!isCollectionOrOrderedCollection(collection)) throw new Error(`Object is not Collection or OrderedCollection`); + if (!isCollectionOrOrderedCollection(collection)) throw new Error('Object is not Collection or OrderedCollection'); // Resolve to Object(may be Note) arrays const unresolvedItems = isCollection(collection) ? collection.items : collection.orderedItems; From 44a01c4b5a46d2b8b27cb6315babac8484051f7b Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 16 Apr 2022 17:19:30 +0900 Subject: [PATCH 48/66] refactoe --- packages/backend/src/@types/http-signature.d.ts | 2 +- packages/backend/src/misc/fetch.ts | 10 +++++----- packages/backend/src/server/api/streaming.ts | 2 +- packages/backend/src/server/index.ts | 2 +- packages/backend/test/utils.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/backend/src/@types/http-signature.d.ts b/packages/backend/src/@types/http-signature.d.ts index 8d484312dc..0426cb8bcd 100644 --- a/packages/backend/src/@types/http-signature.d.ts +++ b/packages/backend/src/@types/http-signature.d.ts @@ -1,5 +1,5 @@ declare module 'http-signature' { - import { IncomingMessage, ClientRequest } from 'http'; + import { IncomingMessage, ClientRequest } from 'node:http'; interface ISignature { keyId: string; diff --git a/packages/backend/src/misc/fetch.ts b/packages/backend/src/misc/fetch.ts index 4b1013c9f5..af6bf2fca7 100644 --- a/packages/backend/src/misc/fetch.ts +++ b/packages/backend/src/misc/fetch.ts @@ -1,10 +1,10 @@ -import * as http from 'http'; -import * as https from 'https'; +import * as http from 'node:http'; +import * as https from 'node:https'; +import { URL } from 'node:url'; import CacheableLookup from 'cacheable-lookup'; import fetch from 'node-fetch'; import { HttpProxyAgent, HttpsProxyAgent } from 'hpagent'; import config from '@/config/index.js'; -import { URL } from 'node:url'; export async function getJson(url: string, accept = 'application/json, */*', timeout = 10000, headers?: Record) { const res = await getResponse({ @@ -35,7 +35,7 @@ export async function getHtml(url: string, accept = 'text/html, */*', timeout = } export async function getResponse(args: { url: string, method: string, body?: string, headers: Record, timeout?: number, size?: number }) { - const timeout = args?.timeout || 10 * 1000; + const timeout = args.timeout || 10 * 1000; const controller = new AbortController(); setTimeout(() => { @@ -47,7 +47,7 @@ export async function getResponse(args: { url: string, method: string, body?: st headers: args.headers, body: args.body, timeout, - size: args?.size || 10 * 1024 * 1024, + size: args.size || 10 * 1024 * 1024, agent: getAgentByUrl, signal: controller.signal, }); diff --git a/packages/backend/src/server/api/streaming.ts b/packages/backend/src/server/api/streaming.ts index 2a34edac67..f8e42d27fe 100644 --- a/packages/backend/src/server/api/streaming.ts +++ b/packages/backend/src/server/api/streaming.ts @@ -1,4 +1,4 @@ -import * as http from 'http'; +import * as http from 'node:http'; import * as websocket from 'websocket'; import MainStreamConnection from './stream/index.js'; diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index a68cebfeb2..d00bf8996f 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -3,7 +3,7 @@ */ import * as fs from 'node:fs'; -import * as http from 'http'; +import * as http from 'node:http'; import Koa from 'koa'; import Router from '@koa/router'; import mount from 'koa-mount'; diff --git a/packages/backend/test/utils.ts b/packages/backend/test/utils.ts index 32a030f933..09e812f437 100644 --- a/packages/backend/test/utils.ts +++ b/packages/backend/test/utils.ts @@ -4,7 +4,7 @@ import * as misskey from 'misskey-js'; import fetch from 'node-fetch'; import FormData from 'form-data'; import * as childProcess from 'child_process'; -import * as http from 'http'; +import * as http from 'node:http'; import loadConfig from '../src/config/load.js'; import { SIGKILL } from 'constants'; import { entities } from '../src/db/postgre.js'; From d39465085c86919c54a2defb8c0cb1f79e5e0ff8 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 12:59:41 +0900 Subject: [PATCH 49/66] refactor: fix type --- .../src/models/repositories/drive-file.ts | 45 ++++++++++++++++--- .../backend/src/models/repositories/page.ts | 6 +-- .../src/remote/activitypub/models/mention.ts | 10 ++--- .../api/endpoints/drive/files/find-by-hash.ts | 2 +- .../server/api/endpoints/drive/files/show.ts | 6 +-- 5 files changed, 51 insertions(+), 18 deletions(-) diff --git a/packages/backend/src/models/repositories/drive-file.ts b/packages/backend/src/models/repositories/drive-file.ts index 69dc1721c2..c15f5b6058 100644 --- a/packages/backend/src/models/repositories/drive-file.ts +++ b/packages/backend/src/models/repositories/drive-file.ts @@ -1,6 +1,5 @@ import { db } from '@/db/postgre.js'; import { DriveFile } from '@/models/entities/drive-file.js'; -import { Users, DriveFolders } from '../index.js'; import { User } from '@/models/entities/user.js'; import { toPuny } from '@/misc/convert-host.js'; import { awaitAll, Promiseable } from '@/prelude/await-all.js'; @@ -9,6 +8,7 @@ import config from '@/config/index.js'; import { query, appendQuery } from '@/prelude/url.js'; import { Meta } from '@/models/entities/meta.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; +import { Users, DriveFolders } from '../index.js'; type PackOptions = { detail?: boolean, @@ -111,7 +111,40 @@ export const DriveFileRepository = db.getRepository(DriveFile).extend({ async pack( src: DriveFile['id'] | DriveFile, - options?: PackOptions + options?: PackOptions, + ): Promise> { + const opts = Object.assign({ + detail: false, + self: false, + }, options); + + const file = typeof src === 'object' ? src : await this.findOneByOrFail({ id: src }); + + return await awaitAll>({ + id: file.id, + createdAt: file.createdAt.toISOString(), + name: file.name, + type: file.type, + md5: file.md5, + size: file.size, + isSensitive: file.isSensitive, + blurhash: file.blurhash, + properties: opts.self ? file.properties : this.getPublicProperties(file), + url: opts.self ? file.url : this.getPublicUrl(file, false), + thumbnailUrl: this.getPublicUrl(file, true), + comment: file.comment, + folderId: file.folderId, + folder: opts.detail && file.folderId ? DriveFolders.pack(file.folderId, { + detail: true, + }) : null, + userId: opts.withUser ? file.userId : null, + user: (opts.withUser && file.userId) ? Users.pack(file.userId) : null, + }); + }, + + async packNullable( + src: DriveFile['id'] | DriveFile, + options?: PackOptions, ): Promise | null> { const opts = Object.assign({ detail: false, @@ -145,9 +178,9 @@ export const DriveFileRepository = db.getRepository(DriveFile).extend({ async packMany( files: (DriveFile['id'] | DriveFile)[], - options?: PackOptions - ) { - const items = await Promise.all(files.map(f => this.pack(f, options))); - return items.filter(x => x != null); + options?: PackOptions, + ): Promise[]> { + const items = await Promise.all(files.map(f => this.packNullable(f, options))); + return items.filter((x): x is Packed<'DriveFile'> => x != null); }, }); diff --git a/packages/backend/src/models/repositories/page.ts b/packages/backend/src/models/repositories/page.ts index 1bffb23fa2..092b26b396 100644 --- a/packages/backend/src/models/repositories/page.ts +++ b/packages/backend/src/models/repositories/page.ts @@ -1,10 +1,10 @@ import { db } from '@/db/postgre.js'; import { Page } from '@/models/entities/page.js'; import { Packed } from '@/misc/schema.js'; -import { Users, DriveFiles, PageLikes } from '../index.js'; import { awaitAll } from '@/prelude/await-all.js'; import { DriveFile } from '@/models/entities/drive-file.js'; import { User } from '@/models/entities/user.js'; +import { Users, DriveFiles, PageLikes } from '../index.js'; export const PageRepository = db.getRepository(Page).extend({ async pack( @@ -14,7 +14,7 @@ export const PageRepository = db.getRepository(Page).extend({ const meId = me ? me.id : null; const page = typeof src === 'object' ? src : await this.findOneByOrFail({ id: src }); - const attachedFiles: Promise[] = []; + const attachedFiles: Promise[] = []; const collectFile = (xs: any[]) => { for (const x of xs) { if (x.type === 'image') { @@ -73,7 +73,7 @@ export const PageRepository = db.getRepository(Page).extend({ script: page.script, eyeCatchingImageId: page.eyeCatchingImageId, eyeCatchingImage: page.eyeCatchingImageId ? await DriveFiles.pack(page.eyeCatchingImageId) : null, - attachedFiles: DriveFiles.packMany(await Promise.all(attachedFiles)), + attachedFiles: DriveFiles.packMany((await Promise.all(attachedFiles)).filter((x): x is DriveFile => x != null)), likedCount: page.likedCount, isLiked: meId ? await PageLikes.findOneBy({ pageId: page.id, userId: meId }).then(x => x != null) : undefined, }); diff --git a/packages/backend/src/remote/activitypub/models/mention.ts b/packages/backend/src/remote/activitypub/models/mention.ts index a160092969..13f77424ec 100644 --- a/packages/backend/src/remote/activitypub/models/mention.ts +++ b/packages/backend/src/remote/activitypub/models/mention.ts @@ -1,9 +1,9 @@ -import { toArray, unique } from '@/prelude/array.js'; -import { IObject, isMention, IApMention } from '../type.js'; -import { resolvePerson } from './person.js'; import promiseLimit from 'promise-limit'; -import Resolver from '../resolver.js'; +import { toArray, unique } from '@/prelude/array.js'; import { CacheableUser, User } from '@/models/entities/user.js'; +import { IObject, isMention, IApMention } from '../type.js'; +import Resolver from '../resolver.js'; +import { resolvePerson } from './person.js'; export async function extractApMentions(tags: IObject | IObject[] | null | undefined) { const hrefs = unique(extractApMentionObjects(tags).map(x => x.href as string)); @@ -12,7 +12,7 @@ export async function extractApMentions(tags: IObject | IObject[] | null | undef const limit = promiseLimit(2); const mentionedUsers = (await Promise.all( - hrefs.map(x => limit(() => resolvePerson(x, resolver).catch(() => null))) + hrefs.map(x => limit(() => resolvePerson(x, resolver).catch(() => null))), )).filter((x): x is CacheableUser => x != null); return mentionedUsers; diff --git a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts index f9b4ea89ea..0b74cb9f01 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/find-by-hash.ts @@ -1,5 +1,5 @@ -import define from '../../../define.js'; import { DriveFiles } from '@/models/index.js'; +import define from '../../../define.js'; export const meta = { tags: ['drive'], diff --git a/packages/backend/src/server/api/endpoints/drive/files/show.ts b/packages/backend/src/server/api/endpoints/drive/files/show.ts index a2bc0c7aa4..fb19345fee 100644 --- a/packages/backend/src/server/api/endpoints/drive/files/show.ts +++ b/packages/backend/src/server/api/endpoints/drive/files/show.ts @@ -1,7 +1,7 @@ -import define from '../../../define.js'; -import { ApiError } from '../../../error.js'; import { DriveFile } from '@/models/entities/drive-file.js'; import { DriveFiles, Users } from '@/models/index.js'; +import define from '../../../define.js'; +import { ApiError } from '../../../error.js'; export const meta = { tags: ['drive'], @@ -51,7 +51,7 @@ export const paramDef = { // eslint-disable-next-line import/no-default-export export default define(meta, paramDef, async (ps, user) => { - let file: DriveFile | undefined; + let file: DriveFile | null = null; if (ps.fileId) { file = await DriveFiles.findOneBy({ id: ps.fileId }); From e0a4864bea2cad19c4baf4b986bec8c6edd481ff Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 13:01:30 +0900 Subject: [PATCH 50/66] refactor: fix type --- .../backend/src/server/api/endpoints/notes/reactions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/reactions.ts b/packages/backend/src/server/api/endpoints/notes/reactions.ts index 3555424fa6..fbb065329c 100644 --- a/packages/backend/src/server/api/endpoints/notes/reactions.ts +++ b/packages/backend/src/server/api/endpoints/notes/reactions.ts @@ -1,8 +1,8 @@ +import { DeepPartial, FindOptionsWhere } from 'typeorm'; +import { NoteReactions } from '@/models/index.js'; +import { NoteReaction } from '@/models/entities/note-reaction.js'; import define from '../../define.js'; import { ApiError } from '../../error.js'; -import { NoteReactions } from '@/models/index.js'; -import { DeepPartial } from 'typeorm'; -import { NoteReaction } from '@/models/entities/note-reaction.js'; export const meta = { tags: ['notes', 'reactions'], @@ -45,7 +45,7 @@ export const paramDef = { export default define(meta, paramDef, async (ps, user) => { const query = { noteId: ps.noteId, - } as DeepPartial; + } as FindOptionsWhere; if (ps.type) { // ローカルリアクションはホスト名が . とされているが From ddd655c0c1c585fb367151191662af2afa8f35e9 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 13:14:29 +0900 Subject: [PATCH 51/66] refactor: fix type --- packages/backend/src/remote/activitypub/renderer/flag.ts | 2 +- packages/backend/src/remote/activitypub/type.ts | 4 ++-- packages/backend/src/server/api/endpoints/pages/show.ts | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/backend/src/remote/activitypub/renderer/flag.ts b/packages/backend/src/remote/activitypub/renderer/flag.ts index 6fbc11580f..58eadddbaa 100644 --- a/packages/backend/src/remote/activitypub/renderer/flag.ts +++ b/packages/backend/src/remote/activitypub/renderer/flag.ts @@ -5,7 +5,7 @@ import { getInstanceActor } from '@/services/instance-actor.js'; // to anonymise reporters, the reporting actor must be a system user // object has to be a uri or array of uris -export const renderFlag = (user: ILocalUser, object: [string], content: string): IActivity => { +export const renderFlag = (user: ILocalUser, object: [string], content: string) => { return { type: 'Flag', actor: `${config.url}/users/${user.id}`, diff --git a/packages/backend/src/remote/activitypub/type.ts b/packages/backend/src/remote/activitypub/type.ts index 2051d2624d..124f67cfb1 100644 --- a/packages/backend/src/remote/activitypub/type.ts +++ b/packages/backend/src/remote/activitypub/type.ts @@ -48,7 +48,7 @@ export function getOneApId(value: ApObject): string { export function getApId(value: string | IObject): string { if (typeof value === 'string') return value; if (typeof value.id === 'string') return value.id; - throw new Error(`cannot detemine id`); + throw new Error('cannot detemine id'); } /** @@ -57,7 +57,7 @@ export function getApId(value: string | IObject): string { export function getApType(value: IObject): string { if (typeof value.type === 'string') return value.type; if (Array.isArray(value.type) && typeof value.type[0] === 'string') return value.type[0]; - throw new Error(`cannot detect type`); + throw new Error('cannot detect type'); } export function getOneApHrefNullable(value: ApObject | undefined): string | undefined { diff --git a/packages/backend/src/server/api/endpoints/pages/show.ts b/packages/backend/src/server/api/endpoints/pages/show.ts index 3dcce8550f..5d37e86b91 100644 --- a/packages/backend/src/server/api/endpoints/pages/show.ts +++ b/packages/backend/src/server/api/endpoints/pages/show.ts @@ -1,8 +1,8 @@ -import define from '../../define.js'; -import { ApiError } from '../../error.js'; +import { IsNull } from 'typeorm'; import { Pages, Users } from '@/models/index.js'; import { Page } from '@/models/entities/page.js'; -import { IsNull } from 'typeorm'; +import define from '../../define.js'; +import { ApiError } from '../../error.js'; export const meta = { tags: ['pages'], @@ -45,7 +45,7 @@ export const paramDef = { // eslint-disable-next-line import/no-default-export export default define(meta, paramDef, async (ps, user) => { - let page: Page | undefined; + let page: Page | null = null; if (ps.pageId) { page = await Pages.findOneBy({ id: ps.pageId }); From 3770bb65768693334d0783265c67b419ed733814 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 13:19:05 +0900 Subject: [PATCH 52/66] =?UTF-8?q?Streaming=E7=B5=8C=E7=94=B1=E3=81=A7?= =?UTF-8?q?=E3=81=AEAPI=E3=83=AA=E3=82=AF=E3=82=A8=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../backend/src/server/api/stream/index.ts | 42 ++++--------------- 1 file changed, 7 insertions(+), 35 deletions(-) diff --git a/packages/backend/src/server/api/stream/index.ts b/packages/backend/src/server/api/stream/index.ts index b803478281..7077047b76 100644 --- a/packages/backend/src/server/api/stream/index.ts +++ b/packages/backend/src/server/api/stream/index.ts @@ -1,20 +1,18 @@ -import * as websocket from 'websocket'; -import { readNotification } from '../common/read-notification.js'; -import call from '../call.js'; -import readNote from '@/services/note/read.js'; -import Channel from './channel.js'; -import channels from './channels/index.js'; import { EventEmitter } from 'events'; +import * as websocket from 'websocket'; +import readNote from '@/services/note/read.js'; import { User } from '@/models/entities/user.js'; import { Channel as ChannelModel } from '@/models/entities/channel.js'; import { Users, Followings, Mutings, UserProfiles, ChannelFollowings, Blockings } from '@/models/index.js'; -import { ApiError } from '../error.js'; import { AccessToken } from '@/models/entities/access-token.js'; import { UserProfile } from '@/models/entities/user-profile.js'; import { publishChannelStream, publishGroupMessagingStream, publishMessagingStream } from '@/services/stream.js'; import { UserGroup } from '@/models/entities/user-group.js'; -import { StreamEventEmitter, StreamMessages } from './types.js'; import { Packed } from '@/misc/schema.js'; +import { readNotification } from '../common/read-notification.js'; +import channels from './channels/index.js'; +import Channel from './channel.js'; +import { StreamEventEmitter, StreamMessages } from './types.js'; /** * Main stream connection @@ -84,7 +82,7 @@ export default class Connection { this.muting.delete(data.body.id); break; - // TODO: block events + // TODO: block events case 'followChannel': this.followingChannels.add(data.body.id); @@ -126,7 +124,6 @@ export default class Connection { const { type, body } = obj; switch (type) { - case 'api': this.onApiRequest(body); break; case 'readNotification': this.onReadNotification(body); break; case 'subNote': this.onSubscribeNote(body); break; case 's': this.onSubscribeNote(body); break; // alias @@ -183,31 +180,6 @@ export default class Connection { } } - /** - * APIリクエスト要求時 - */ - private async onApiRequest(payload: any) { - // 新鮮なデータを利用するためにユーザーをフェッチ - const user = this.user ? await Users.findOneBy({ id: this.user.id }) : null; - - const endpoint = payload.endpoint || payload.ep; // alias - - // 呼び出し - call(endpoint, user, this.token, payload.data).then(res => { - this.sendMessageToWs(`api:${payload.id}`, { res }); - }).catch((e: ApiError) => { - this.sendMessageToWs(`api:${payload.id}`, { - error: { - message: e.message, - code: e.code, - id: e.id, - kind: e.kind, - ...(e.info ? { info: e.info } : {}), - }, - }); - }); - } - private onReadNotification(payload: any) { if (!payload.id) return; readNotification(this.user!.id, [payload.id]); From 1ee757cc5fbee24fa59b529a6fd022b5ec956e6e Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 13:21:07 +0900 Subject: [PATCH 53/66] refactor: fix type --- .../src/server/api/endpoints/notes/translate.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/translate.ts b/packages/backend/src/server/api/endpoints/notes/translate.ts index c602981b30..5e40e7106f 100644 --- a/packages/backend/src/server/api/endpoints/notes/translate.ts +++ b/packages/backend/src/server/api/endpoints/notes/translate.ts @@ -1,12 +1,12 @@ -import define from '../../define.js'; -import { getNote } from '../../common/getters.js'; -import { ApiError } from '../../error.js'; +import { URLSearchParams } from 'node:url'; import fetch from 'node-fetch'; import config from '@/config/index.js'; import { getAgentByUrl } from '@/misc/fetch.js'; -import { URLSearchParams } from 'node:url'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { Notes } from '@/models/index.js'; +import { ApiError } from '../../error.js'; +import { getNote } from '../../common/getters.js'; +import define from '../../define.js'; export const meta = { tags: ['notes'], @@ -80,7 +80,12 @@ export default define(meta, paramDef, async (ps, user) => { agent: getAgentByUrl, }); - const json = await res.json(); + const json = (await res.json()) as { + translations: { + detected_source_language: string; + text: string; + }[]; + }; return { sourceLang: json.translations[0].detected_source_language, From 2d2b3edaafeef5097eb34b45163c1966b54c42b0 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 13:26:31 +0900 Subject: [PATCH 54/66] refactor: fix type --- packages/backend/src/remote/activitypub/resolver.ts | 10 +++++----- packages/backend/src/remote/activitypub/type.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/remote/activitypub/resolver.ts b/packages/backend/src/remote/activitypub/resolver.ts index c1269c75c5..334eae9843 100644 --- a/packages/backend/src/remote/activitypub/resolver.ts +++ b/packages/backend/src/remote/activitypub/resolver.ts @@ -2,10 +2,10 @@ import config from '@/config/index.js'; import { getJson } from '@/misc/fetch.js'; import { ILocalUser } from '@/models/entities/user.js'; import { getInstanceActor } from '@/services/instance-actor.js'; -import { signedGet } from './request.js'; -import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { extractDbHost } from '@/misc/convert-host.js'; +import { signedGet } from './request.js'; +import { IObject, isCollectionOrOrderedCollection, ICollection, IOrderedCollection } from './type.js'; export default class Resolver { private history: Set; @@ -56,13 +56,13 @@ export default class Resolver { this.user = await getInstanceActor(); } - const object = this.user + const object = (this.user ? await signedGet(value, this.user) - : await getJson(value, 'application/activity+json, application/ld+json'); + : await getJson(value, 'application/activity+json, application/ld+json')) as IObject; if (object == null || ( Array.isArray(object['@context']) ? - !object['@context'].includes('https://www.w3.org/ns/activitystreams') : + !(object['@context'] as unknown[]).includes('https://www.w3.org/ns/activitystreams') : object['@context'] !== 'https://www.w3.org/ns/activitystreams' )) { throw new Error('invalid response'); diff --git a/packages/backend/src/remote/activitypub/type.ts b/packages/backend/src/remote/activitypub/type.ts index 124f67cfb1..ef5b98b59e 100644 --- a/packages/backend/src/remote/activitypub/type.ts +++ b/packages/backend/src/remote/activitypub/type.ts @@ -2,7 +2,7 @@ export type obj = { [x: string]: any }; export type ApObject = IObject | string | (IObject | string)[]; export interface IObject { - '@context': string | obj | obj[]; + '@context': string | string[] | obj | obj[]; type: string | string[]; id?: string; summary?: string; From a671f9102d5d3e212d1e621a435dd6a147c4e191 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 13:31:45 +0900 Subject: [PATCH 55/66] refactor: fix type --- .../api/endpoints/admin/announcements/list.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts index 1d8eb1d618..7a5758d75b 100644 --- a/packages/backend/src/server/api/endpoints/admin/announcements/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/announcements/list.ts @@ -1,5 +1,6 @@ -import define from '../../../define.js'; import { Announcements, AnnouncementReads } from '@/models/index.js'; +import { Announcement } from '@/models/entities/announcement.js'; +import define from '../../../define.js'; import { makePaginationQuery } from '../../../common/make-pagination-query.js'; export const meta = { @@ -68,11 +69,21 @@ export default define(meta, paramDef, async (ps) => { const announcements = await query.take(ps.limit).getMany(); + const reads = new Map(); + for (const announcement of announcements) { - (announcement as any).reads = await AnnouncementReads.countBy({ + reads.set(announcement, await AnnouncementReads.countBy({ announcementId: announcement.id, - }); + })); } - return announcements; + return announcements.map(announcement => ({ + id: announcement.id, + createdAt: announcement.createdAt.toISOString(), + updatedAt: announcement.updatedAt?.toISOString() ?? null, + title: announcement.title, + text: announcement.text, + imageUrl: announcement.imageUrl, + reads: reads.get(announcement)!, + })); }); From 31b216f66741aad3f63df0117aaeb31270265558 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 14:42:13 +0900 Subject: [PATCH 56/66] refactor: fix type --- packages/backend/package.json | 5 +++-- packages/backend/src/boot/index.ts | 4 ++-- packages/backend/src/daemons/queue-stats.ts | 4 ++-- packages/backend/src/daemons/server-stats.ts | 4 ++-- .../src/server/api/stream/channels/queue-stats.ts | 4 ++-- .../src/server/api/stream/channels/server-stats.ts | 4 ++-- packages/backend/yarn.lock | 13 +++++++++---- 7 files changed, 22 insertions(+), 16 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 7fe3757eb3..f07a15bc54 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -14,6 +14,7 @@ "lodash": "^4.17.21" }, "dependencies": { + "@bull-board/koa": "3.10.3", "@discordapp/twemoji": "13.1.1", "@elastic/elasticsearch": "7.11.0", "@koa/cors": "3.1.0", @@ -23,7 +24,6 @@ "@syuilo/aiscript": "0.11.1", "@typescript-eslint/eslint-plugin": "5.18.0", "@typescript-eslint/parser": "5.18.0", - "@bull-board/koa": "3.10.3", "abort-controller": "3.0.0", "ajv": "8.11.0", "archiver": "5.3.0", @@ -125,10 +125,11 @@ "web-push": "3.4.5", "websocket": "1.0.34", "ws": "8.5.0", - "xev": "2.0.1" + "xev": "3.0.2" }, "devDependencies": { "@redocly/openapi-core": "1.0.0-beta.93", + "@types/semver": "7.3.9", "@types/bcryptjs": "2.4.2", "@types/bull": "3.15.8", "@types/cbor": "6.0.0", diff --git a/packages/backend/src/boot/index.ts b/packages/backend/src/boot/index.ts index 5bb20a729f..c3d0592256 100644 --- a/packages/backend/src/boot/index.ts +++ b/packages/backend/src/boot/index.ts @@ -1,6 +1,6 @@ import cluster from 'node:cluster'; import chalk from 'chalk'; -import { default as Xev } from 'xev'; +import Xev from 'xev'; import Logger from '@/services/logger.js'; import { envOption } from '../env.js'; @@ -12,7 +12,7 @@ import { workerMain } from './worker.js'; const logger = new Logger('core', 'cyan'); const clusterLogger = logger.createSubLogger('cluster', 'orange', false); -const ev = new Xev.default(); +const ev = new Xev(); /** * Init process diff --git a/packages/backend/src/daemons/queue-stats.ts b/packages/backend/src/daemons/queue-stats.ts index bfef110545..1535abc6af 100644 --- a/packages/backend/src/daemons/queue-stats.ts +++ b/packages/backend/src/daemons/queue-stats.ts @@ -1,7 +1,7 @@ -import { default as Xev } from 'xev'; +import Xev from 'xev'; import { deliverQueue, inboxQueue } from '../queue/queues.js'; -const ev = new Xev.default(); +const ev = new Xev(); const interval = 10000; diff --git a/packages/backend/src/daemons/server-stats.ts b/packages/backend/src/daemons/server-stats.ts index 327305ccc5..faf4e6e4a4 100644 --- a/packages/backend/src/daemons/server-stats.ts +++ b/packages/backend/src/daemons/server-stats.ts @@ -1,8 +1,8 @@ import si from 'systeminformation'; -import { default as Xev } from 'xev'; +import Xev from 'xev'; import * as osUtils from 'os-utils'; -const ev = new Xev.default(); +const ev = new Xev(); const interval = 2000; diff --git a/packages/backend/src/server/api/stream/channels/queue-stats.ts b/packages/backend/src/server/api/stream/channels/queue-stats.ts index 043d03ab8d..b67600474b 100644 --- a/packages/backend/src/server/api/stream/channels/queue-stats.ts +++ b/packages/backend/src/server/api/stream/channels/queue-stats.ts @@ -1,7 +1,7 @@ -import { default as Xev } from 'xev'; +import Xev from 'xev'; import Channel from '../channel.js'; -const ev = new Xev.default(); +const ev = new Xev(); export default class extends Channel { public readonly chName = 'queueStats'; diff --git a/packages/backend/src/server/api/stream/channels/server-stats.ts b/packages/backend/src/server/api/stream/channels/server-stats.ts index 0da1895767..db75a6fa38 100644 --- a/packages/backend/src/server/api/stream/channels/server-stats.ts +++ b/packages/backend/src/server/api/stream/channels/server-stats.ts @@ -1,7 +1,7 @@ -import { default as Xev } from 'xev'; +import Xev from 'xev'; import Channel from '../channel.js'; -const ev = new Xev.default(); +const ev = new Xev(); export default class extends Channel { public readonly chName = 'serverStats'; diff --git a/packages/backend/yarn.lock b/packages/backend/yarn.lock index 5cd71acf9c..e4421db9d7 100644 --- a/packages/backend/yarn.lock +++ b/packages/backend/yarn.lock @@ -777,6 +777,11 @@ dependencies: htmlparser2 "^6.0.0" +"@types/semver@7.3.9": + version "7.3.9" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.9.tgz#152c6c20a7688c30b967ec1841d31ace569863fc" + integrity sha512-L/TMpyURfBkf+o/526Zb6kd/tchUP3iBDEPjqjb+U2MAJhVRxxrmr2fwpe08E7QsV7YLcpq0tUaQ9O9x97ZIxQ== + "@types/serve-static@*": version "1.13.3" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" @@ -7297,10 +7302,10 @@ ws@^8.2.3: resolved "https://registry.yarnpkg.com/ws/-/ws-8.4.2.tgz#18e749868d8439f2268368829042894b6907aa0b" integrity sha512-Kbk4Nxyq7/ZWqr/tarI9yIt/+iNNFOjBXEWgTb4ydaNHBNGgvf2QHbS9fdfsndfjFlFwEd4Al+mw83YkaD10ZA== -xev@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/xev/-/xev-2.0.1.tgz#24484173a22115bc8a990ef5d4d5129695b827a7" - integrity sha512-icDf9M67bDge0F2qf02WKZq+s7mMO/SbPv67ZQPym6JThLEOdlWWLdB7VTVgRJp3ekgaiVItCAyH6aoKCPvfIA== +xev@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/xev/-/xev-3.0.2.tgz#3f4080bd8bed0d3479c674050e3696da98d22a4d" + integrity sha512-8kxuH95iMXzHZj+fwqfA4UrPcYOy6bGIgfWzo9Ji23JoEc30ge/Z++Ubkiuy8c0+M64nXmmxrmJ7C8wnuBhluw== xml-js@^1.6.11: version "1.6.11" From 6b31ea19924d0defe5ddadcc088df5706a10ff97 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 17:30:27 +0900 Subject: [PATCH 57/66] refactor: fix type --- .../backend/src/server/api/service/discord.ts | 30 +++++++++---------- .../backend/src/server/api/service/github.ts | 30 +++++++++---------- .../backend/src/server/api/service/twitter.ts | 20 ++++++++----- 3 files changed, 43 insertions(+), 37 deletions(-) diff --git a/packages/backend/src/server/api/service/discord.ts b/packages/backend/src/server/api/service/discord.ts index 04197574c2..97cbcbecdb 100644 --- a/packages/backend/src/server/api/service/discord.ts +++ b/packages/backend/src/server/api/service/discord.ts @@ -1,16 +1,16 @@ import Koa from 'koa'; import Router from '@koa/router'; -import { getJson } from '@/misc/fetch.js'; import { OAuth2 } from 'oauth'; +import { v4 as uuid } from 'uuid'; +import { IsNull } from 'typeorm'; +import { getJson } from '@/misc/fetch.js'; import config from '@/config/index.js'; import { publishMainStream } from '@/services/stream.js'; -import { redisClient } from '../../../db/redis.js'; -import { v4 as uuid } from 'uuid'; -import signin from '../common/signin.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { Users, UserProfiles } from '@/models/index.js'; import { ILocalUser } from '@/models/entities/user.js'; -import { IsNull } from 'typeorm'; +import { redisClient } from '../../../db/redis.js'; +import signin from '../common/signin.js'; function getUserToken(ctx: Koa.BaseContext): string | null { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; @@ -54,7 +54,7 @@ router.get('/disconnect/discord', async ctx => { integrations: profile.integrations, }); - ctx.body = `Discordの連携を解除しました :v:`; + ctx.body = 'Discordの連携を解除しました :v:'; // Publish i updated event publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, { @@ -140,7 +140,7 @@ router.get('/dc/cb', async ctx => { const code = ctx.query.code; - if (!code) { + if (!code || typeof code !== 'string') { ctx.throw(400, 'invalid session'); return; } @@ -174,17 +174,17 @@ router.get('/dc/cb', async ctx => { } })); - const { id, username, discriminator } = await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, { + const { id, username, discriminator } = (await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, { 'Authorization': `Bearer ${accessToken}`, - }); + })) as Record; - if (!id || !username || !discriminator) { + if (typeof id !== 'string' || typeof username !== 'string' || typeof discriminator !== 'string') { ctx.throw(400, 'invalid session'); return; } const profile = await UserProfiles.createQueryBuilder() - .where(`"integrations"->'discord'->>'id' = :id`, { id: id }) + .where('"integrations"->\'discord\'->>\'id\' = :id', { id: id }) .andWhere('"userHost" IS NULL') .getOne(); @@ -211,7 +211,7 @@ router.get('/dc/cb', async ctx => { } else { const code = ctx.query.code; - if (!code) { + if (!code || typeof code !== 'string') { ctx.throw(400, 'invalid session'); return; } @@ -245,10 +245,10 @@ router.get('/dc/cb', async ctx => { } })); - const { id, username, discriminator } = await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, { + const { id, username, discriminator } = (await getJson('https://discord.com/api/users/@me', '*/*', 10 * 1000, { 'Authorization': `Bearer ${accessToken}`, - }); - if (!id || !username || !discriminator) { + })) as Record; + if (typeof id !== 'string' || typeof username !== 'string' || typeof discriminator !== 'string') { ctx.throw(400, 'invalid session'); return; } diff --git a/packages/backend/src/server/api/service/github.ts b/packages/backend/src/server/api/service/github.ts index 61bb768a63..04dbd1f7ab 100644 --- a/packages/backend/src/server/api/service/github.ts +++ b/packages/backend/src/server/api/service/github.ts @@ -1,16 +1,16 @@ import Koa from 'koa'; import Router from '@koa/router'; -import { getJson } from '@/misc/fetch.js'; import { OAuth2 } from 'oauth'; +import { v4 as uuid } from 'uuid'; +import { IsNull } from 'typeorm'; +import { getJson } from '@/misc/fetch.js'; import config from '@/config/index.js'; import { publishMainStream } from '@/services/stream.js'; -import { redisClient } from '../../../db/redis.js'; -import { v4 as uuid } from 'uuid'; -import signin from '../common/signin.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { Users, UserProfiles } from '@/models/index.js'; import { ILocalUser } from '@/models/entities/user.js'; -import { IsNull } from 'typeorm'; +import { redisClient } from '../../../db/redis.js'; +import signin from '../common/signin.js'; function getUserToken(ctx: Koa.BaseContext): string | null { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; @@ -54,7 +54,7 @@ router.get('/disconnect/github', async ctx => { integrations: profile.integrations, }); - ctx.body = `GitHubの連携を解除しました :v:`; + ctx.body = 'GitHubの連携を解除しました :v:'; // Publish i updated event publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, { @@ -138,7 +138,7 @@ router.get('/gh/cb', async ctx => { const code = ctx.query.code; - if (!code) { + if (!code || typeof code !== 'string') { ctx.throw(400, 'invalid session'); return; } @@ -167,16 +167,16 @@ router.get('/gh/cb', async ctx => { } })); - const { login, id } = await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, { + const { login, id } = (await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, { 'Authorization': `bearer ${accessToken}`, - }); - if (!login || !id) { + })) as Record; + if (typeof login !== 'string' || typeof id !== 'string') { ctx.throw(400, 'invalid session'); return; } const link = await UserProfiles.createQueryBuilder() - .where(`"integrations"->'github'->>'id' = :id`, { id: id }) + .where('"integrations"->\'github\'->>\'id\' = :id', { id: id }) .andWhere('"userHost" IS NULL') .getOne(); @@ -189,7 +189,7 @@ router.get('/gh/cb', async ctx => { } else { const code = ctx.query.code; - if (!code) { + if (!code || typeof code !== 'string') { ctx.throw(400, 'invalid session'); return; } @@ -219,11 +219,11 @@ router.get('/gh/cb', async ctx => { } })); - const { login, id } = await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, { + const { login, id } = (await getJson('https://api.github.com/user', 'application/vnd.github.v3+json', 10 * 1000, { 'Authorization': `bearer ${accessToken}`, - }); + })) as Record; - if (!login || !id) { + if (typeof login !== 'string' || typeof id !== 'string') { ctx.throw(400, 'invalid session'); return; } diff --git a/packages/backend/src/server/api/service/twitter.ts b/packages/backend/src/server/api/service/twitter.ts index e72b71e2f7..2b4f9f6daa 100644 --- a/packages/backend/src/server/api/service/twitter.ts +++ b/packages/backend/src/server/api/service/twitter.ts @@ -2,14 +2,14 @@ import Koa from 'koa'; import Router from '@koa/router'; import { v4 as uuid } from 'uuid'; import autwh from 'autwh'; -import { redisClient } from '../../../db/redis.js'; +import { IsNull } from 'typeorm'; import { publishMainStream } from '@/services/stream.js'; import config from '@/config/index.js'; -import signin from '../common/signin.js'; import { fetchMeta } from '@/misc/fetch-meta.js'; import { Users, UserProfiles } from '@/models/index.js'; import { ILocalUser } from '@/models/entities/user.js'; -import { IsNull } from 'typeorm'; +import signin from '../common/signin.js'; +import { redisClient } from '../../../db/redis.js'; function getUserToken(ctx: Koa.BaseContext): string | null { return ((ctx.headers['cookie'] || '').match(/igi=(\w+)/) || [null, null])[1]; @@ -53,7 +53,7 @@ router.get('/disconnect/twitter', async ctx => { integrations: profile.integrations, }); - ctx.body = `Twitterの連携を解除しました :v:`; + ctx.body = 'Twitterの連携を解除しました :v:'; // Publish i updated event publishMainStream(user.id, 'meUpdated', await Users.pack(user, user, { @@ -132,10 +132,16 @@ router.get('/tw/cb', async ctx => { const twCtx = await get; - const result = await twAuth!.done(JSON.parse(twCtx), ctx.query.oauth_verifier); + const verifier = ctx.query.oauth_verifier; + if (!verifier || typeof verifier !== 'string') { + ctx.throw(400, 'invalid session'); + return; + } + + const result = await twAuth!.done(JSON.parse(twCtx), verifier); const link = await UserProfiles.createQueryBuilder() - .where(`"integrations"->'twitter'->>'userId' = :id`, { id: result.userId }) + .where('"integrations"->\'twitter\'->>\'userId\' = :id', { id: result.userId }) .andWhere('"userHost" IS NULL') .getOne(); @@ -148,7 +154,7 @@ router.get('/tw/cb', async ctx => { } else { const verifier = ctx.query.oauth_verifier; - if (verifier == null) { + if (!verifier || typeof verifier !== 'string') { ctx.throw(400, 'invalid session'); return; } From 02bb36cdc47028bdd783b5ddc2a73ee31e8db068 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 20:44:21 +0900 Subject: [PATCH 58/66] refactor: fix type --- .../remote/activitypub/kernel/move/index.ts | 0 .../src/remote/activitypub/models/person.ts | 4 +- .../src/server/activitypub/followers.ts | 24 +++++------- .../src/server/activitypub/following.ts | 21 ++++------- .../backend/src/server/activitypub/outbox.ts | 37 ++++++++++--------- .../server/api/endpoints/admin/show-users.ts | 6 +-- .../backend/src/server/api/stream/index.ts | 2 +- 7 files changed, 41 insertions(+), 53 deletions(-) delete mode 100644 packages/backend/src/remote/activitypub/kernel/move/index.ts diff --git a/packages/backend/src/remote/activitypub/kernel/move/index.ts b/packages/backend/src/remote/activitypub/kernel/move/index.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index 4267f46fb3..f722e74702 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -271,7 +271,7 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise): Promise { +export async function updatePerson(uri: string, resolver?: Resolver | null, hint?: IObject): Promise { if (typeof uri !== 'string') throw new Error('uri is not string'); // URIがこのサーバーを指しているならスキップ @@ -289,7 +289,7 @@ export async function updatePerson(uri: string, resolver?: Resolver | null, hint if (resolver == null) resolver = new Resolver(); - const object = hint || await resolver.resolve(uri) as any; + const object = hint || await resolver.resolve(uri); const person = validateActor(object, uri); diff --git a/packages/backend/src/server/activitypub/followers.ts b/packages/backend/src/server/activitypub/followers.ts index 4d4f733162..beb48713a6 100644 --- a/packages/backend/src/server/activitypub/followers.ts +++ b/packages/backend/src/server/activitypub/followers.ts @@ -1,32 +1,26 @@ import Router from '@koa/router'; +import { FindOptionsWhere, IsNull, LessThan } from 'typeorm'; import config from '@/config/index.js'; -import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; import * as url from '@/prelude/url.js'; import { renderActivity } from '@/remote/activitypub/renderer/index.js'; import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; import renderFollowUser from '@/remote/activitypub/renderer/follow-user.js'; -import { setResponseType } from '../activitypub.js'; import { Users, Followings, UserProfiles } from '@/models/index.js'; -import { IsNull, LessThan } from 'typeorm'; +import { Following } from '@/models/entities/following.js'; +import { setResponseType } from '../activitypub.js'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; - // Get 'cursor' parameter - const [cursor, cursorErr] = $.default.optional.type(ID).get(ctx.request.query.cursor); - - // Get 'page' parameter - const pageErr = !$.default.optional.str.or(['true', 'false']).ok(ctx.request.query.page); - const page: boolean = ctx.request.query.page === 'true'; - - // Validate parameters - if (cursorErr || pageErr) { + const cursor = ctx.request.query.cursor; + if (cursor != null && typeof cursor !== 'string') { ctx.status = 400; return; } + const page = ctx.request.query.page === 'true'; + const user = await Users.findOneBy({ id: userId, host: IsNull(), @@ -57,7 +51,7 @@ export default async (ctx: Router.RouterContext) => { if (page) { const query = { followeeId: user.id, - } as any; + } as FindOptionsWhere; // カーソルが指定されている場合 if (cursor) { @@ -86,7 +80,7 @@ export default async (ctx: Router.RouterContext) => { inStock ? `${partOf}?${url.query({ page: 'true', cursor: followings[followings.length - 1].id, - })}` : undefined + })}` : undefined, ); ctx.body = renderActivity(rendered); diff --git a/packages/backend/src/server/activitypub/following.ts b/packages/backend/src/server/activitypub/following.ts index 0af1f424f9..3a25a6316c 100644 --- a/packages/backend/src/server/activitypub/following.ts +++ b/packages/backend/src/server/activitypub/following.ts @@ -1,33 +1,26 @@ import Router from '@koa/router'; +import { LessThan, IsNull, FindOptionsWhere } from 'typeorm'; import config from '@/config/index.js'; -import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; import * as url from '@/prelude/url.js'; import { renderActivity } from '@/remote/activitypub/renderer/index.js'; import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; import renderFollowUser from '@/remote/activitypub/renderer/follow-user.js'; -import { setResponseType } from '../activitypub.js'; import { Users, Followings, UserProfiles } from '@/models/index.js'; -import { LessThan, IsNull, FindOptionsWhere } from 'typeorm'; import { Following } from '@/models/entities/following.js'; +import { setResponseType } from '../activitypub.js'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; - // Get 'cursor' parameter - const [cursor, cursorErr] = $.default.optional.type(ID).get(ctx.request.query.cursor); - - // Get 'page' parameter - const pageErr = !$.default.optional.str.or(['true', 'false']).ok(ctx.request.query.page); - const page: boolean = ctx.request.query.page === 'true'; - - // Validate parameters - if (cursorErr || pageErr) { + const cursor = ctx.request.query.cursor; + if (cursor != null && typeof cursor !== 'string') { ctx.status = 400; return; } + const page = ctx.request.query.page === 'true'; + const user = await Users.findOneBy({ id: userId, host: IsNull(), @@ -87,7 +80,7 @@ export default async (ctx: Router.RouterContext) => { inStock ? `${partOf}?${url.query({ page: 'true', cursor: followings[followings.length - 1].id, - })}` : undefined + })}` : undefined, ); ctx.body = renderActivity(rendered); diff --git a/packages/backend/src/server/activitypub/outbox.ts b/packages/backend/src/server/activitypub/outbox.ts index 6b9592bcf3..7a2586998a 100644 --- a/packages/backend/src/server/activitypub/outbox.ts +++ b/packages/backend/src/server/activitypub/outbox.ts @@ -1,36 +1,37 @@ import Router from '@koa/router'; +import { Brackets, IsNull } from 'typeorm'; import config from '@/config/index.js'; -import $ from 'cafy'; -import { ID } from '@/misc/cafy-id.js'; import { renderActivity } from '@/remote/activitypub/renderer/index.js'; import renderOrderedCollection from '@/remote/activitypub/renderer/ordered-collection.js'; import renderOrderedCollectionPage from '@/remote/activitypub/renderer/ordered-collection-page.js'; -import { setResponseType } from '../activitypub.js'; import renderNote from '@/remote/activitypub/renderer/note.js'; import renderCreate from '@/remote/activitypub/renderer/create.js'; import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; import { countIf } from '@/prelude/array.js'; import * as url from '@/prelude/url.js'; import { Users, Notes } from '@/models/index.js'; -import { makePaginationQuery } from '../api/common/make-pagination-query.js'; -import { Brackets, IsNull } from 'typeorm'; import { Note } from '@/models/entities/note.js'; +import { makePaginationQuery } from '../api/common/make-pagination-query.js'; +import { setResponseType } from '../activitypub.js'; export default async (ctx: Router.RouterContext) => { const userId = ctx.params.user; - // Get 'sinceId' parameter - const [sinceId, sinceIdErr] = $.default.optional.type(ID).get(ctx.request.query.since_id); + const sinceId = ctx.request.query.since_id; + if (sinceId != null && typeof sinceId !== 'string') { + ctx.status = 400; + return; + } - // Get 'untilId' parameter - const [untilId, untilIdErr] = $.default.optional.type(ID).get(ctx.request.query.until_id); + const untilId = ctx.request.query.until_id; + if (untilId != null && typeof untilId !== 'string') { + ctx.status = 400; + return; + } - // Get 'page' parameter - const pageErr = !$.default.optional.str.or(['true', 'false']).ok(ctx.request.query.page); - const page: boolean = ctx.request.query.page === 'true'; + const page = ctx.request.query.page === 'true'; - // Validate parameters - if (sinceIdErr || untilIdErr || pageErr || countIf(x => x != null, [sinceId, untilId]) > 1) { + if (countIf(x => x != null, [sinceId, untilId]) > 1) { ctx.status = 400; return; } @@ -52,8 +53,8 @@ export default async (ctx: Router.RouterContext) => { const query = makePaginationQuery(Notes.createQueryBuilder('note'), sinceId, untilId) .andWhere('note.userId = :userId', { userId: user.id }) .andWhere(new Brackets(qb => { qb - .where(`note.visibility = 'public'`) - .orWhere(`note.visibility = 'home'`); + .where('note.visibility = \'public\'') + .orWhere('note.visibility = \'home\''); })) .andWhere('note.localOnly = FALSE'); @@ -76,7 +77,7 @@ export default async (ctx: Router.RouterContext) => { notes.length ? `${partOf}?${url.query({ page: 'true', until_id: notes[notes.length - 1].id, - })}` : undefined + })}` : undefined, ); ctx.body = renderActivity(rendered); @@ -85,7 +86,7 @@ export default async (ctx: Router.RouterContext) => { // index page const rendered = renderOrderedCollection(partOf, user.notesCount, `${partOf}?page=true`, - `${partOf}?page=true&since_id=000000000000000000000000` + `${partOf}?page=true&since_id=000000000000000000000000`, ); ctx.body = renderActivity(rendered); ctx.set('Cache-Control', 'public, max-age=180'); diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index 2703b4b9db..1575d81d5d 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -1,5 +1,5 @@ -import define from '../../define.js'; import { Users } from '@/models/index.js'; +import define from '../../define.js'; export const meta = { tags: ['admin'], @@ -24,8 +24,8 @@ export const paramDef = { limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, offset: { type: 'integer', default: 0 }, sort: { type: 'string', enum: ['+follower', '-follower', '+createdAt', '-createdAt', '+updatedAt', '-updatedAt'] }, - state: { type: 'string', enum: ['all', 'available', 'admin', 'moderator', 'adminOrModerator', 'silenced', 'suspended'], default: "all" }, - origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: "local" }, + state: { type: 'string', enum: ['all', 'alive', 'available', 'admin', 'moderator', 'adminOrModerator', 'silenced', 'suspended'], default: 'all' }, + origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' }, username: { type: 'string', nullable: true, default: null }, hostname: { type: 'string', diff --git a/packages/backend/src/server/api/stream/index.ts b/packages/backend/src/server/api/stream/index.ts index 7077047b76..2d23145f14 100644 --- a/packages/backend/src/server/api/stream/index.ts +++ b/packages/backend/src/server/api/stream/index.ts @@ -19,7 +19,7 @@ import { StreamEventEmitter, StreamMessages } from './types.js'; */ export default class Connection { public user?: User; - public userProfile?: UserProfile; + public userProfile?: UserProfile | null; public following: Set = new Set(); public muting: Set = new Set(); public blocking: Set = new Set(); // "被"blocking From ff8313b48b3838005c3c0430c4fa64fc5f1a30ef Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 20:51:59 +0900 Subject: [PATCH 59/66] refactor --- .../src/server/api/endpoints/notes/create.ts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 9de05918c0..40a3ba73ca 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -1,15 +1,15 @@ import ms from 'ms'; +import { In } from 'typeorm'; import create from '@/services/note/create.js'; -import define from '../../define.js'; -import { ApiError } from '../../error.js'; import { User } from '@/models/entities/user.js'; import { Users, DriveFiles, Notes, Channels, Blockings } from '@/models/index.js'; import { DriveFile } from '@/models/entities/drive-file.js'; import { Note } from '@/models/entities/note.js'; -import { noteVisibilities } from '../../../../types.js'; import { Channel } from '@/models/entities/channel.js'; import { MAX_NOTE_TEXT_LENGTH } from '@/const.js'; -import { In } from 'typeorm'; +import { noteVisibilities } from '../../../../types.js'; +import { ApiError } from '../../error.js'; +import define from '../../define.js'; export const meta = { tags: ['notes'], @@ -83,7 +83,7 @@ export const meta = { export const paramDef = { type: 'object', properties: { - visibility: { type: 'string', enum: ['public', 'home', 'followers', 'specified'], default: "public" }, + visibility: { type: 'string', enum: ['public', 'home', 'followers', 'specified'], default: 'public' }, visibleUserIds: { type: 'array', uniqueItems: true, items: { type: 'string', format: 'misskey:id', } }, @@ -149,7 +149,7 @@ export const paramDef = { { // (re)note with poll, text and files are optional properties: { - poll: { type: 'object', nullable: false, }, + poll: { type: 'object', nullable: false }, }, required: ['poll'], }, @@ -178,14 +178,14 @@ export default define(meta, paramDef, async (ps, user) => { }); } - let renote: Note | null; + let renote: Note | null = null; if (ps.renoteId != null) { // Fetch renote to note renote = await Notes.findOneBy({ id: ps.renoteId }); if (renote == null) { throw new ApiError(meta.errors.noSuchRenoteTarget); - } else if (renote.renoteId && !renote.text && !renote.fileIds && !renote.poll) { + } else if (renote.renoteId && !renote.text && !renote.fileIds && !renote.hasPoll) { throw new ApiError(meta.errors.cannotReRenote); } @@ -201,14 +201,14 @@ export default define(meta, paramDef, async (ps, user) => { } } - let reply: Note | null; + let reply: Note | null = null; if (ps.replyId != null) { // Fetch reply reply = await Notes.findOneBy({ id: ps.replyId }); if (reply == null) { throw new ApiError(meta.errors.noSuchReplyTarget); - } else if (reply.renoteId && !reply.text && !reply.fileIds && !renote.poll) { + } else if (reply.renoteId && !reply.text && !reply.fileIds && !reply.hasPoll) { throw new ApiError(meta.errors.cannotReplyToPureRenote); } @@ -234,7 +234,7 @@ export default define(meta, paramDef, async (ps, user) => { } } - let channel: Channel | undefined; + let channel: Channel | null = null; if (ps.channelId != null) { channel = await Channels.findOneBy({ id: ps.channelId }); From 31e5c5f69a565b6aaef3f79bcba4bf5e2beee170 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 20:58:37 +0900 Subject: [PATCH 60/66] refactor Resolve #8467 --- packages/backend/package.json | 1 - packages/backend/src/misc/cafy-id.ts | 33 ------------------- .../src/remote/activitypub/models/person.ts | 32 ++++++++++++------ packages/backend/yarn.lock | 5 --- 4 files changed, 22 insertions(+), 49 deletions(-) delete mode 100644 packages/backend/src/misc/cafy-id.ts diff --git a/packages/backend/package.json b/packages/backend/package.json index f07a15bc54..2354c95646 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -35,7 +35,6 @@ "broadcast-channel": "4.10.0", "bull": "4.8.1", "cacheable-lookup": "6.0.4", - "cafy": "15.2.1", "cbor": "8.1.0", "chalk": "5.0.1", "chalk-template": "0.4.0", diff --git a/packages/backend/src/misc/cafy-id.ts b/packages/backend/src/misc/cafy-id.ts deleted file mode 100644 index dd81c5c4cf..0000000000 --- a/packages/backend/src/misc/cafy-id.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Context } from 'cafy'; - -// eslint-disable-next-line @typescript-eslint/ban-types -export class ID extends Context { - public readonly name = 'ID'; - - constructor(optional = false, nullable = false) { - super(optional, nullable); - - this.push((v: any) => { - if (typeof v !== 'string') { - return new Error('must-be-an-id'); - } - return true; - }); - } - - public getType() { - return super.getType('String'); - } - - public makeOptional(): ID { - return new ID(true, false); - } - - public makeNullable(): ID { - return new ID(false, true); - } - - public makeOptionalNullable(): ID { - return new ID(true, true); - } -} diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index f722e74702..6097e3b6ed 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -1,7 +1,6 @@ import { URL } from 'node:url'; import promiseLimit from 'promise-limit'; -import $, { Context } from 'cafy'; import config from '@/config/index.js'; import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js'; import { Note } from '@/models/entities/note.js'; @@ -54,20 +53,33 @@ function validateActor(x: IObject, uri: string): IActor { throw new Error(`invalid Actor type '${x.type}'`); } - const validate = (name: string, value: any, validater: Context) => { - const e = validater.test(value); - if (e) throw new Error(`invalid Actor: ${name} ${e.message}`); - }; + if (!(typeof x.id === 'string' && x.id.length > 0)) { + throw new Error('invalid Actor: wrong id'); + } - validate('id', x.id, $.default.str.min(1)); - validate('inbox', x.inbox, $.default.str.min(1)); - validate('preferredUsername', x.preferredUsername, $.default.str.min(1).max(128).match(/^\w([\w-.]*\w)?$/)); + if (!(typeof x.inbox === 'string' && x.inbox.length > 0)) { + throw new Error('invalid Actor: wrong inbox'); + } + + if (!(typeof x.preferredUsername === 'string' && x.preferredUsername.length > 0 && x.preferredUsername.length <= 128 && /^\w([\w-.]*\w)?$/.test(x.preferredUsername))) { + throw new Error('invalid Actor: wrong username'); + } // These fields are only informational, and some AP software allows these // fields to be very long. If they are too long, we cut them off. This way // we can at least see these users and their activities. - validate('name', truncate(x.name, nameLength), $.default.optional.nullable.str); - validate('summary', truncate(x.summary, summaryLength), $.default.optional.nullable.str); + if (x.name) { + if (!(typeof x.name === 'string' && x.name.length > 0)) { + throw new Error('invalid Actor: wrong name'); + } + x.name = truncate(x.name, nameLength); + } + if (x.summary) { + if (!(typeof x.summary === 'string' && x.summary.length > 0)) { + throw new Error('invalid Actor: wrong summary'); + } + x.summary = truncate(x.summary, summaryLength); + } const idHost = toPuny(new URL(x.id!).hostname); if (idHost !== expectHost) { diff --git a/packages/backend/yarn.lock b/packages/backend/yarn.lock index e4421db9d7..981c359dd7 100644 --- a/packages/backend/yarn.lock +++ b/packages/backend/yarn.lock @@ -1591,11 +1591,6 @@ cacheable-request@^7.0.2: normalize-url "^6.0.1" responselike "^2.0.0" -cafy@15.2.1: - version "15.2.1" - resolved "https://registry.yarnpkg.com/cafy/-/cafy-15.2.1.tgz#5a55eaeb721c604c7dca652f3d555c392e5f995a" - integrity sha512-g2zOmFb63p6XcZ/zeMWKYP8YKQYNWnhJmi6K71Ql4EAFTAay31xF0PBPtdBCCfQ0fiETgWTMxKtySAVI/Od6aQ== - call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" From ce51ef5df531dc652ec73028bed1216ea49eea67 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 21:01:02 +0900 Subject: [PATCH 61/66] refactor --- .../src/remote/activitypub/renderer/note.ts | 16 ++++++++-------- packages/backend/src/services/note/delete.ts | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/backend/src/remote/activitypub/renderer/note.ts b/packages/backend/src/remote/activitypub/renderer/note.ts index 679c8bbfe4..e8d429e5de 100644 --- a/packages/backend/src/remote/activitypub/renderer/note.ts +++ b/packages/backend/src/remote/activitypub/renderer/note.ts @@ -1,15 +1,15 @@ -import renderDocument from './document.js'; -import renderHashtag from './hashtag.js'; -import renderMention from './mention.js'; -import renderEmoji from './emoji.js'; +import { In, IsNull } from 'typeorm'; import config from '@/config/index.js'; -import toHtml from '../misc/get-note-html.js'; import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; import { DriveFile } from '@/models/entities/drive-file.js'; import { DriveFiles, Notes, Users, Emojis, Polls } from '@/models/index.js'; -import { In, IsNull } from 'typeorm'; import { Emoji } from '@/models/entities/emoji.js'; import { Poll } from '@/models/entities/poll.js'; +import toHtml from '../misc/get-note-html.js'; +import renderEmoji from './emoji.js'; +import renderMention from './mention.js'; +import renderHashtag from './hashtag.js'; +import renderDocument from './document.js'; export default async function renderNote(note: Note, dive = true, isTalk = false): Promise> { const getPromisedFiles = async (ids: string[]) => { @@ -83,7 +83,7 @@ export default async function renderNote(note: Note, dive = true, isTalk = false const files = await getPromisedFiles(note.fileIds); const text = note.text; - let poll: Poll | null; + let poll: Poll | null = null; if (note.hasPoll) { poll = await Polls.findOneBy({ noteId: note.id }); @@ -159,7 +159,7 @@ export async function getEmojis(names: string[]): Promise { names.map(name => Emojis.findOneBy({ name, host: IsNull(), - })) + })), ); return emojis.filter(emoji => emoji != null) as Emoji[]; diff --git a/packages/backend/src/services/note/delete.ts b/packages/backend/src/services/note/delete.ts index ffd609dd84..4963200161 100644 --- a/packages/backend/src/services/note/delete.ts +++ b/packages/backend/src/services/note/delete.ts @@ -1,3 +1,4 @@ +import { Brackets, In } from 'typeorm'; import { publishNoteStream } from '@/services/stream.js'; import renderDelete from '@/remote/activitypub/renderer/delete.js'; import renderAnnounce from '@/remote/activitypub/renderer/announce.js'; @@ -5,15 +6,14 @@ import renderUndo from '@/remote/activitypub/renderer/undo.js'; import { renderActivity } from '@/remote/activitypub/renderer/index.js'; import renderTombstone from '@/remote/activitypub/renderer/tombstone.js'; import config from '@/config/index.js'; -import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; import { Note, IMentionedRemoteUsers } from '@/models/entities/note.js'; import { Notes, Users, Instances } from '@/models/index.js'; import { notesChart, perUserNotesChart, instanceChart } from '@/services/chart/index.js'; import { deliverToFollowers, deliverToUser } from '@/remote/activitypub/deliver-manager.js'; import { countSameRenotes } from '@/misc/count-same-renotes.js'; +import { registerOrFetchInstanceDoc } from '../register-or-fetch-instance-doc.js'; import { deliverToRelays } from '../relay.js'; -import { Brackets, In } from 'typeorm'; /** * 投稿を削除します。 @@ -40,7 +40,7 @@ export default async function(user: { id: User['id']; uri: User['uri']; host: Us //#region ローカルの投稿なら削除アクティビティを配送 if (Users.isLocalUser(user) && !note.localOnly) { - let renote: Note | null; + let renote: Note | null = null; // if deletd note is renote if (note.renoteId && note.text == null && !note.hasPoll && (note.fileIds == null || note.fileIds.length === 0)) { @@ -113,7 +113,7 @@ async function getMentionedRemoteUsers(note: Note) { const uris = (JSON.parse(note.mentionedRemoteUsers) as IMentionedRemoteUsers).map(x => x.uri); if (uris.length > 0) { where.push( - { uri: In(uris) } + { uri: In(uris) }, ); } From d338ea2591f724e485aa84c824268371e77a6ad4 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Apr 2022 21:18:18 +0900 Subject: [PATCH 62/66] fix ogp rendering and refactor --- packages/backend/src/models/entities/user.ts | 4 +-- .../backend/src/models/repositories/user.ts | 28 +++++++++++++------ .../backend/src/server/api/common/signin.ts | 2 +- packages/backend/src/server/index.ts | 20 ++++++------- packages/backend/src/server/web/feed.ts | 6 ++-- packages/backend/src/server/web/index.ts | 19 ++++++++----- .../backend/src/server/web/views/clip.pug | 2 +- .../backend/src/server/web/views/note.pug | 2 +- .../backend/src/server/web/views/page.pug | 2 +- .../backend/src/server/web/views/user.pug | 3 +- 10 files changed, 51 insertions(+), 37 deletions(-) diff --git a/packages/backend/src/models/entities/user.ts b/packages/backend/src/models/entities/user.ts index c76824c977..29d9a0c2ca 100644 --- a/packages/backend/src/models/entities/user.ts +++ b/packages/backend/src/models/entities/user.ts @@ -1,6 +1,6 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm'; -import { DriveFile } from './drive-file.js'; import { id } from '../id.js'; +import { DriveFile } from './drive-file.js'; @Entity() @Index(['usernameLower', 'host'], { unique: true }) @@ -207,7 +207,7 @@ export class User { @Column('boolean', { default: false, - comment: 'Whether to show users replying to other users in the timeline' + comment: 'Whether to show users replying to other users in the timeline', }) public showTimelineReplies: boolean; diff --git a/packages/backend/src/models/repositories/user.ts b/packages/backend/src/models/repositories/user.ts index 2f4b7d6787..541fbaf003 100644 --- a/packages/backend/src/models/repositories/user.ts +++ b/packages/backend/src/models/repositories/user.ts @@ -1,7 +1,6 @@ import { EntityRepository, Repository, In, Not } from 'typeorm'; import Ajv from 'ajv'; import { User, ILocalUser, IRemoteUser } from '@/models/entities/user.js'; -import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances, DriveFiles } from '../index.js'; import config from '@/config/index.js'; import { Packed } from '@/misc/schema.js'; import { awaitAll, Promiseable } from '@/prelude/await-all.js'; @@ -9,8 +8,9 @@ import { populateEmojis } from '@/misc/populate-emojis.js'; import { getAntennas } from '@/misc/antenna-cache.js'; import { USER_ACTIVE_THRESHOLD, USER_ONLINE_THRESHOLD } from '@/const.js'; import { Cache } from '@/misc/cache.js'; -import { Instance } from '../entities/instance.js'; import { db } from '@/db/postgre.js'; +import { Instance } from '../entities/instance.js'; +import { Notes, NoteUnreads, FollowRequests, Notifications, MessagingMessages, UserNotePinings, Followings, Blockings, Mutings, UserProfiles, UserSecurityKeys, UserGroupJoinings, Pages, Announcements, AnnouncementReads, Antennas, AntennaNotes, ChannelFollowings, Instances, DriveFiles } from '../index.js'; const userInstanceCache = new Cache(1000 * 60 * 60 * 3); @@ -112,7 +112,7 @@ export const UserRepository = db.getRepository(User).extend({ const joinings = await UserGroupJoinings.findBy({ userId: userId }); const groupQs = Promise.all(joinings.map(j => MessagingMessages.createQueryBuilder('message') - .where(`message.groupId = :groupId`, { groupId: j.userGroupId }) + .where('message.groupId = :groupId', { groupId: j.userGroupId }) .andWhere('message.userId != :userId', { userId: userId }) .andWhere('NOT (:userId = ANY(message.reads))', { userId: userId }) .andWhere('message.createdAt > :joinedAt', { joinedAt: j.createdAt }) // 自分が加入する前の会話については、未読扱いしない @@ -204,8 +204,18 @@ export const UserRepository = db.getRepository(User).extend({ ); }, - getAvatarUrl(user: User): string { - // TODO: avatarIdがあるがavatarがない(JOINされてない)場合のハンドリング + async getAvatarUrl(user: User): Promise { + if (user.avatar) { + return DriveFiles.getPublicUrl(user.avatar, true) || this.getIdenticonUrl(user.id); + } else if (user.avatarId) { + const avatar = await DriveFiles.findOneByOrFail({ id: user.avatarId }); + return DriveFiles.getPublicUrl(avatar, true) || this.getIdenticonUrl(user.id); + } else { + return this.getIdenticonUrl(user.id); + } + }, + + getAvatarUrlSync(user: User): string { if (user.avatar) { return DriveFiles.getPublicUrl(user.avatar, true) || this.getIdenticonUrl(user.id); } else { @@ -223,7 +233,7 @@ export const UserRepository = db.getRepository(User).extend({ options?: { detail?: D, includeSecrets?: boolean, - } + }, ): Promise> { const opts = Object.assign({ detail: false, @@ -274,7 +284,7 @@ export const UserRepository = db.getRepository(User).extend({ name: user.name, username: user.username, host: user.host, - avatarUrl: this.getAvatarUrl(user), + avatarUrl: this.getAvatarUrlSync(user), avatarBlurhash: user.avatar?.blurhash || null, avatarColor: null, // 後方互換性のため isAdmin: user.isAdmin || falsy, @@ -283,7 +293,7 @@ export const UserRepository = db.getRepository(User).extend({ isCat: user.isCat || falsy, instance: user.host ? userInstanceCache.fetch(user.host, () => Instances.findOneBy({ host: user.host! }), - v => v != null + v => v != null, ).then(instance => instance ? { name: instance.name, softwareName: instance.softwareName, @@ -403,7 +413,7 @@ export const UserRepository = db.getRepository(User).extend({ options?: { detail?: D, includeSecrets?: boolean, - } + }, ): Promise[]> { return Promise.all(users.map(u => this.pack(u, me, options))); }, diff --git a/packages/backend/src/server/api/common/signin.ts b/packages/backend/src/server/api/common/signin.ts index f1dccee2ce..038fd8d96e 100644 --- a/packages/backend/src/server/api/common/signin.ts +++ b/packages/backend/src/server/api/common/signin.ts @@ -9,7 +9,7 @@ import { publishMainStream } from '@/services/stream.js'; export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) { if (redirect) { //#region Cookie - ctx.cookies.set('igi', user.token, { + ctx.cookies.set('igi', user.token!, { path: '/', // SEE: https://github.com/koajs/koa/issues/974 // When using a SSL proxy it should be configured to add the "X-Forwarded-Proto: https" header diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index d00bf8996f..c1a2a6dfff 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -10,23 +10,23 @@ import mount from 'koa-mount'; import koaLogger from 'koa-logger'; import * as slow from 'koa-slow'; -import activityPub from './activitypub.js'; -import nodeinfo from './nodeinfo.js'; -import wellKnown from './well-known.js'; +import { IsNull } from 'typeorm'; import config from '@/config/index.js'; -import apiServer from './api/index.js'; -import fileServer from './file/index.js'; -import proxyServer from './proxy/index.js'; -import webServer from './web/index.js'; import Logger from '@/services/logger.js'; -import { envOption } from '../env.js'; import { UserProfiles, Users } from '@/models/index.js'; import { genIdenticon } from '@/misc/gen-identicon.js'; import { createTemp } from '@/misc/create-temp.js'; import { publishMainStream } from '@/services/stream.js'; import * as Acct from '@/misc/acct.js'; +import { envOption } from '../env.js'; +import activityPub from './activitypub.js'; +import nodeinfo from './nodeinfo.js'; +import wellKnown from './well-known.js'; +import apiServer from './api/index.js'; +import fileServer from './file/index.js'; +import proxyServer from './proxy/index.js'; +import webServer from './web/index.js'; import { initializeStreamingServer } from './api/streaming.js'; -import { IsNull } from 'typeorm'; export const serverLogger = new Logger('server', 'gray', false); @@ -81,7 +81,7 @@ router.get('/avatar/@:acct', async ctx => { }); if (user) { - ctx.redirect(Users.getAvatarUrl(user)); + ctx.redirect(Users.getAvatarUrlSync(user)); } else { ctx.redirect('/static-assets/user-unknown.png'); } diff --git a/packages/backend/src/server/web/feed.ts b/packages/backend/src/server/web/feed.ts index eba8dc58d4..4abe2885cf 100644 --- a/packages/backend/src/server/web/feed.ts +++ b/packages/backend/src/server/web/feed.ts @@ -1,8 +1,8 @@ import { Feed } from 'feed'; +import { In, IsNull } from 'typeorm'; import config from '@/config/index.js'; import { User } from '@/models/entities/user.js'; -import { Notes, DriveFiles, UserProfiles } from '@/models/index.js'; -import { In, IsNull } from 'typeorm'; +import { Notes, DriveFiles, UserProfiles, Users } from '@/models/index.js'; export default async function(user: User) { const author = { @@ -29,7 +29,7 @@ export default async function(user: User) { generator: 'Misskey', description: `${user.notesCount} Notes, ${profile.ffVisibility === 'public' ? user.followingCount : '?'} Following, ${profile.ffVisibility === 'public' ? user.followersCount : '?'} Followers${profile.description ? ` · ${profile.description}` : ''}`, link: author.link, - image: user.avatarUrl ? user.avatarUrl : undefined, + image: await Users.getAvatarUrl(user), feedLinks: { json: `${author.link}.json`, atom: `${author.link}.atom`, diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 48bf6f7338..34d56cfd0c 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -11,20 +11,20 @@ import send from 'koa-send'; import favicon from 'koa-favicon'; import views from 'koa-views'; import { createBullBoard } from '@bull-board/api'; -import { BullAdapter } from '@bull-board/api/bullAdapter.js'; +import { BullAdapter } from '@bull-board/api/bullAdapter.js'; import { KoaAdapter } from '@bull-board/koa'; -import packFeed from './feed.js'; +import { IsNull } from 'typeorm'; import { fetchMeta } from '@/misc/fetch-meta.js'; -import { genOpenapiSpec } from '../api/openapi/gen-spec.js'; import config from '@/config/index.js'; import { Users, Notes, UserProfiles, Pages, Channels, Clips, GalleryPosts } from '@/models/index.js'; import * as Acct from '@/misc/acct.js'; import { getNoteSummary } from '@/misc/get-note-summary.js'; +import { queues } from '@/queue/queues.js'; +import { genOpenapiSpec } from '../api/openapi/gen-spec.js'; import { urlPreviewHandler } from './url-preview.js'; import { manifestHandler } from './manifest.js'; -import { queues } from '@/queue/queues.js'; -import { IsNull } from 'typeorm'; +import packFeed from './feed.js'; const _filename = fileURLToPath(import.meta.url); const _dirname = dirname(_filename); @@ -127,7 +127,7 @@ router.get('/twemoji/(.*)', async ctx => { return; } - ctx.set('Content-Security-Policy', `default-src 'none'; style-src 'unsafe-inline'`); + ctx.set('Content-Security-Policy', 'default-src \'none\'; style-src \'unsafe-inline\''); await send(ctx as any, path, { root: `${_dirname}/../../../node_modules/@discordapp/twemoji/dist/svg/`, @@ -235,6 +235,7 @@ router.get(['/@:user', '/@:user/:sub'], async (ctx, next) => { await ctx.render('user', { user, profile, me, + avatarUrl: await Users.getAvatarUrl(user), sub: ctx.params.sub, instanceName: meta.name || 'Misskey', icon: meta.iconUrl, @@ -274,6 +275,7 @@ router.get('/notes/:note', async (ctx, next) => { await ctx.render('note', { note: _note, profile, + avatarUrl: await Users.getAvatarUrl(await Users.findOneByOrFail({ id: note.userId })), // TODO: Let locale changeable by instance setting summary: getNoteSummary(_note), instanceName: meta.name || 'Misskey', @@ -315,6 +317,7 @@ router.get('/@:user/pages/:page', async (ctx, next) => { await ctx.render('page', { page: _page, profile, + avatarUrl: await Users.getAvatarUrl(await Users.findOneByOrFail({ id: page.userId })), instanceName: meta.name || 'Misskey', icon: meta.iconUrl, themeColor: meta.themeColor, @@ -346,6 +349,7 @@ router.get('/clips/:clip', async (ctx, next) => { await ctx.render('clip', { clip: _clip, profile, + avatarUrl: await Users.getAvatarUrl(await Users.findOneByOrFail({ id: clip.userId })), instanceName: meta.name || 'Misskey', icon: meta.iconUrl, themeColor: meta.themeColor, @@ -370,6 +374,7 @@ router.get('/gallery/:post', async (ctx, next) => { await ctx.render('gallery-post', { post: _post, profile, + avatarUrl: await Users.getAvatarUrl(await Users.findOneByOrFail({ id: post.userId })), instanceName: meta.name || 'Misskey', icon: meta.iconUrl, themeColor: meta.themeColor, @@ -434,7 +439,7 @@ router.get('/cli', async ctx => { }); }); -const override = (source: string, target: string, depth: number = 0) => +const override = (source: string, target: string, depth = 0) => [, ...target.split('/').filter(x => x), ...source.split('/').filter(x => x).splice(depth)].join('/'); router.get('/flush', async ctx => { diff --git a/packages/backend/src/server/web/views/clip.pug b/packages/backend/src/server/web/views/clip.pug index 7a84d50f6c..4c692bf59b 100644 --- a/packages/backend/src/server/web/views/clip.pug +++ b/packages/backend/src/server/web/views/clip.pug @@ -16,7 +16,7 @@ block og meta(property='og:title' content= title) meta(property='og:description' content= clip.description) meta(property='og:url' content= url) - meta(property='og:image' content= user.avatarUrl) + meta(property='og:image' content= avatarUrl) block meta if profile.noCrawle diff --git a/packages/backend/src/server/web/views/note.pug b/packages/backend/src/server/web/views/note.pug index 34b03f9833..65696ea138 100644 --- a/packages/backend/src/server/web/views/note.pug +++ b/packages/backend/src/server/web/views/note.pug @@ -17,7 +17,7 @@ block og meta(property='og:title' content= title) meta(property='og:description' content= summary) meta(property='og:url' content= url) - meta(property='og:image' content= user.avatarUrl) + meta(property='og:image' content= avatarUrl) block meta if user.host || isRenote || profile.noCrawle diff --git a/packages/backend/src/server/web/views/page.pug b/packages/backend/src/server/web/views/page.pug index b6c9548025..4219e76a52 100644 --- a/packages/backend/src/server/web/views/page.pug +++ b/packages/backend/src/server/web/views/page.pug @@ -16,7 +16,7 @@ block og meta(property='og:title' content= title) meta(property='og:description' content= page.summary) meta(property='og:url' content= url) - meta(property='og:image' content= page.eyeCatchingImage ? page.eyeCatchingImage.thumbnailUrl : user.avatarUrl) + meta(property='og:image' content= page.eyeCatchingImage ? page.eyeCatchingImage.thumbnailUrl : avatarUrl) block meta if profile.noCrawle diff --git a/packages/backend/src/server/web/views/user.pug b/packages/backend/src/server/web/views/user.pug index 2adec0f889..119993fdb5 100644 --- a/packages/backend/src/server/web/views/user.pug +++ b/packages/backend/src/server/web/views/user.pug @@ -3,7 +3,6 @@ extends ./base block vars - const title = user.name ? `${user.name} (@${user.username})` : `@${user.username}`; - const url = `${config.url}/@${(user.host ? `${user.username}@${user.host}` : user.username)}`; - - const img = user.avatarUrl || null; block title = `${title} | ${instanceName}` @@ -16,7 +15,7 @@ block og meta(property='og:title' content= title) meta(property='og:description' content= profile.description) meta(property='og:url' content= url) - meta(property='og:image' content= img) + meta(property='og:image' content= avatarUrl) block meta if user.host || profile.noCrawle From 3cf226d534d10261c693ed51ba3db440fe8e8be9 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 19 Apr 2022 11:46:41 +0200 Subject: [PATCH 63/66] await promises (#8519) --- .../backend/src/services/blocking/create.ts | 17 ++++++----------- .../backend/src/services/following/create.ts | 6 ++++-- .../backend/src/services/following/delete.ts | 11 +++++------ 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/packages/backend/src/services/blocking/create.ts b/packages/backend/src/services/blocking/create.ts index 5e96e5037f..d4b28d8d77 100644 --- a/packages/backend/src/services/blocking/create.ts +++ b/packages/backend/src/services/blocking/create.ts @@ -95,17 +95,12 @@ async function unFollow(follower: User, followee: User) { return; } - Followings.delete(following.id); - - //#region Decrement following count - Users.decrement({ id: follower.id }, 'followingCount', 1); - //#endregion - - //#region Decrement followers count - Users.decrement({ id: followee.id }, 'followersCount', 1); - //#endregion - - perUserFollowingChart.update(follower, followee, false); + await Promises.all([ + Followings.delete(following.id), + Users.decrement({ id: follower.id }, 'followingCount', 1), + Users.decrement({ id: followee.id }, 'followersCount', 1), + perUserFollowingChart.update(follower, followee, false), + ]); // Publish unfollow event if (Users.isLocalUser(follower)) { diff --git a/packages/backend/src/services/following/create.ts b/packages/backend/src/services/following/create.ts index 7491c44f83..f521118d48 100644 --- a/packages/backend/src/services/following/create.ts +++ b/packages/backend/src/services/following/create.ts @@ -67,8 +67,10 @@ export async function insertFollowingDoc(followee: { id: User['id']; host: User[ if (alreadyFollowed) return; //#region Increment counts - Users.increment({ id: follower.id }, 'followingCount', 1); - Users.increment({ id: followee.id }, 'followersCount', 1); + await Promises.all([ + Users.increment({ id: follower.id }, 'followingCount', 1), + Users.increment({ id: followee.id }, 'followersCount', 1), + ]); //#endregion //#region Update instance stats diff --git a/packages/backend/src/services/following/delete.ts b/packages/backend/src/services/following/delete.ts index 241f9606e5..1e425c2689 100644 --- a/packages/backend/src/services/following/delete.ts +++ b/packages/backend/src/services/following/delete.ts @@ -58,12 +58,11 @@ export default async function(follower: { id: User['id']; host: User['host']; ur } export async function decrementFollowing(follower: { id: User['id']; host: User['host']; }, followee: { id: User['id']; host: User['host']; }) { - //#region Decrement following count - Users.decrement({ id: follower.id }, 'followingCount', 1); - //#endregion - - //#region Decrement followers count - Users.decrement({ id: followee.id }, 'followersCount', 1); + //#region Decrement following / followers counts + await Promises.all([ + Users.decrement({ id: follower.id }, 'followingCount', 1), + Users.decrement({ id: followee.id }, 'followersCount', 1), + ]); //#endregion //#region Update instance stats From 60620bdb2571749d66d847ad7baa5c377165e37a Mon Sep 17 00:00:00 2001 From: xianon Date: Tue, 19 Apr 2022 22:59:39 +0900 Subject: [PATCH 64/66] =?UTF-8?q?fix:=20=E3=82=A2=E3=83=B3=E3=83=86?= =?UTF-8?q?=E3=83=8A=E3=80=81=E3=82=AF=E3=83=AA=E3=83=83=E3=83=97=E3=80=81?= =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE=E8=A1=A8=E7=A4=BA=E3=82=92?= =?UTF-8?q?=E9=80=9F=E3=81=8F=E3=81=99=E3=82=8B=20(#8518)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * アンテナノートを取得するクエリがタイムアウトしないように速くする * テーブル名を直接指定しないようにする * クリップの取得を速くする * リストの取得を速くする --- .../backend/src/server/api/endpoints/antennas/notes.ts | 8 ++------ packages/backend/src/server/api/endpoints/clips/notes.ts | 8 ++------ .../src/server/api/endpoints/notes/user-list-timeline.ts | 8 ++------ 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/antennas/notes.ts b/packages/backend/src/server/api/endpoints/antennas/notes.ts index 004e4c131d..8aac55b4a0 100644 --- a/packages/backend/src/server/api/endpoints/antennas/notes.ts +++ b/packages/backend/src/server/api/endpoints/antennas/notes.ts @@ -57,13 +57,9 @@ export default define(meta, paramDef, async (ps, user) => { throw new ApiError(meta.errors.noSuchAntenna); } - const antennaQuery = AntennaNotes.createQueryBuilder('joining') - .select('joining.noteId') - .where('joining.antennaId = :antennaId', { antennaId: antenna.id }); - const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) - .andWhere(`note.id IN (${ antennaQuery.getQuery() })`) + .innerJoin(AntennaNotes.metadata.targetName, 'antennaNote', 'antennaNote.noteId = note.id') .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('user.avatar', 'avatar') .leftJoinAndSelect('user.banner', 'banner') @@ -75,7 +71,7 @@ export default define(meta, paramDef, async (ps, user) => { .leftJoinAndSelect('renote.user', 'renoteUser') .leftJoinAndSelect('renoteUser.avatar', 'renoteUserAvatar') .leftJoinAndSelect('renoteUser.banner', 'renoteUserBanner') - .setParameters(antennaQuery.getParameters()); + .andWhere('antennaNote.antennaId = :antennaId', { antennaId: antenna.id }); generateVisibilityQuery(query, user); generateMutedUserQuery(query, user); diff --git a/packages/backend/src/server/api/endpoints/clips/notes.ts b/packages/backend/src/server/api/endpoints/clips/notes.ts index 4b6782fca0..4ace747efe 100644 --- a/packages/backend/src/server/api/endpoints/clips/notes.ts +++ b/packages/backend/src/server/api/endpoints/clips/notes.ts @@ -57,12 +57,8 @@ export default define(meta, paramDef, async (ps, user) => { throw new ApiError(meta.errors.noSuchClip); } - const clipQuery = ClipNotes.createQueryBuilder('joining') - .select('joining.noteId') - .where('joining.clipId = :clipId', { clipId: clip.id }); - const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId) - .andWhere(`note.id IN (${ clipQuery.getQuery() })`) + .innerJoin(ClipNotes.metadata.targetName, 'clipNote', 'clipNote.noteId = note.id') .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('user.avatar', 'avatar') .leftJoinAndSelect('user.banner', 'banner') @@ -74,7 +70,7 @@ export default define(meta, paramDef, async (ps, user) => { .leftJoinAndSelect('renote.user', 'renoteUser') .leftJoinAndSelect('renoteUser.avatar', 'renoteUserAvatar') .leftJoinAndSelect('renoteUser.banner', 'renoteUserBanner') - .setParameters(clipQuery.getParameters()); + .andWhere('clipNote.clipId = :clipId', { clipId: clip.id }); if (user) { generateVisibilityQuery(query, user); diff --git a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts index 6c6402603a..fd4a879035 100644 --- a/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/user-list-timeline.ts @@ -63,12 +63,8 @@ export default define(meta, paramDef, async (ps, user) => { } //#region Construct query - const listQuery = UserListJoinings.createQueryBuilder('joining') - .select('joining.userId') - .where('joining.userListId = :userListId', { userListId: list.id }); - const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId) - .andWhere(`note.userId IN (${ listQuery.getQuery() })`) + .innerJoin(UserListJoinings.metadata.targetName, 'userListJoining', 'userListJoining.userId = note.userId') .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('user.avatar', 'avatar') .leftJoinAndSelect('user.banner', 'banner') @@ -80,7 +76,7 @@ export default define(meta, paramDef, async (ps, user) => { .leftJoinAndSelect('renote.user', 'renoteUser') .leftJoinAndSelect('renoteUser.avatar', 'renoteUserAvatar') .leftJoinAndSelect('renoteUser.banner', 'renoteUserBanner') - .setParameters(listQuery.getParameters()); + .andWhere('userListJoining.userListId = :userListId', { userListId: list.id }); generateVisibilityQuery(query, user); From e0c5401241a5cc3dcd3692a257a0da733c399927 Mon Sep 17 00:00:00 2001 From: Johann150 Date: Tue, 19 Apr 2022 22:03:15 +0200 Subject: [PATCH 65/66] make emoji stand out more on reaction button a slight shadow makes them easier to see --- packages/client/src/components/reactions-viewer.reaction.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/client/src/components/reactions-viewer.reaction.vue b/packages/client/src/components/reactions-viewer.reaction.vue index 7dc079fde6..0688887f17 100644 --- a/packages/client/src/components/reactions-viewer.reaction.vue +++ b/packages/client/src/components/reactions-viewer.reaction.vue @@ -144,6 +144,10 @@ export default defineComponent({ > span { color: var(--fgOnAccent); } + + > .mk-emoji { + filter: drop-shadow(0 0 3px var(--bg)); + } } > span { From f02508c25962dfa9190ffdf659b4b769bb528ca6 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 20 Apr 2022 09:30:29 +0900 Subject: [PATCH 66/66] Revert "make emoji stand out more on reaction button" This reverts commit e0c5401241a5cc3dcd3692a257a0da733c399927. --- packages/client/src/components/reactions-viewer.reaction.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/client/src/components/reactions-viewer.reaction.vue b/packages/client/src/components/reactions-viewer.reaction.vue index 0688887f17..7dc079fde6 100644 --- a/packages/client/src/components/reactions-viewer.reaction.vue +++ b/packages/client/src/components/reactions-viewer.reaction.vue @@ -144,10 +144,6 @@ export default defineComponent({ > span { color: var(--fgOnAccent); } - - > .mk-emoji { - filter: drop-shadow(0 0 3px var(--bg)); - } } > span {