Compare commits

...

6 commits

Author SHA1 Message Date
87dac36860 Merge pull request '2024.11.0-yumechinokuni.7' (#41) from develop into master
Some checks failed
Lint / pnpm_install (push) Successful in 1m27s
Test (production install and build) / production (22.11.0) (push) Successful in 58s
Publish Docker image / Build (push) Successful in 4m39s
Lint / lint (backend) (push) Successful in 2m7s
Lint / lint (frontend) (push) Successful in 1m59s
Lint / lint (frontend-embed) (push) Successful in 1m59s
Test (backend) / unit (22.11.0) (push) Failing after 7m27s
Lint / lint (frontend-shared) (push) Successful in 1m59s
Lint / lint (misskey-bubble-game) (push) Successful in 2m11s
Lint / lint (misskey-js) (push) Successful in 2m8s
Lint / lint (misskey-reversi) (push) Successful in 2m8s
Lint / lint (sw) (push) Successful in 2m9s
Lint / typecheck (misskey-js) (push) Successful in 1m18s
Lint / typecheck (backend) (push) Successful in 2m1s
Lint / typecheck (sw) (push) Successful in 1m23s
Reviewed-on: #41
2024-11-22 10:16:03 -06:00
d591282f5e
2024.11.0-yumechinokuni.7
Some checks failed
Lint / pnpm_install (push) Successful in 1m48s
Test (production install and build) / production (22.11.0) (push) Successful in 1m6s
Publish Docker image / Build (push) Successful in 4m43s
Lint / lint (backend) (push) Successful in 2m4s
Lint / lint (frontend) (push) Successful in 1m56s
Lint / lint (frontend-embed) (push) Successful in 1m58s
Test (backend) / unit (22.11.0) (push) Failing after 7m27s
Lint / lint (frontend-shared) (push) Successful in 2m8s
Lint / lint (misskey-bubble-game) (push) Successful in 2m5s
Lint / lint (misskey-js) (push) Successful in 2m3s
Lint / lint (misskey-reversi) (push) Successful in 1m59s
Lint / lint (sw) (push) Successful in 2m9s
Lint / typecheck (backend) (push) Successful in 1m50s
Lint / typecheck (misskey-js) (push) Successful in 1m35s
Lint / typecheck (sw) (push) Successful in 1m47s
Lint / pnpm_install (pull_request) Successful in 1m21s
Test (production install and build) / production (22.11.0) (pull_request) Successful in 58s
Publish Docker image / Build (pull_request) Successful in 4m25s
Lint / lint (backend) (pull_request) Successful in 2m11s
Lint / lint (frontend) (pull_request) Successful in 1m55s
Lint / lint (frontend-embed) (pull_request) Successful in 1m56s
Lint / lint (frontend-shared) (pull_request) Successful in 1m56s
Test (backend) / unit (22.11.0) (pull_request) Failing after 7m25s
Lint / lint (misskey-bubble-game) (pull_request) Successful in 2m4s
Lint / lint (misskey-js) (pull_request) Successful in 2m34s
Lint / lint (misskey-reversi) (pull_request) Successful in 2m5s
Lint / lint (sw) (pull_request) Successful in 2m23s
Lint / typecheck (misskey-js) (pull_request) Successful in 1m32s
Lint / typecheck (backend) (pull_request) Successful in 2m12s
Lint / typecheck (sw) (pull_request) Successful in 1m31s
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-22 09:55:32 -06:00
FLY_MC
873ef89e42
retry pick pari sw.ts
Some checks failed
Lint / pnpm_install (push) Successful in 1m51s
Test (production install and build) / production (22.11.0) (push) Successful in 1m0s
Publish Docker image / Build (push) Successful in 4m27s
Lint / lint (backend) (push) Successful in 2m22s
Lint / lint (frontend) (push) Successful in 1m56s
Lint / lint (frontend-embed) (push) Successful in 1m59s
Test (backend) / unit (22.11.0) (push) Failing after 7m32s
Lint / lint (frontend-shared) (push) Successful in 2m0s
Lint / lint (misskey-bubble-game) (push) Successful in 2m19s
Lint / lint (misskey-js) (push) Successful in 1m59s
Lint / lint (misskey-reversi) (push) Successful in 2m2s
Lint / lint (sw) (push) Successful in 2m14s
Lint / typecheck (misskey-js) (push) Successful in 1m22s
Lint / typecheck (backend) (push) Successful in 2m5s
Lint / typecheck (sw) (push) Successful in 1m10s
2024-11-22 09:38:18 -06:00
d7a8660952
set connect-src for sw.js
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-22 09:37:41 -06:00
eec5ce1a99
Remove trademarked branding
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-22 09:35:51 -06:00
f7cdb9df70
bump fedivet
Some checks failed
Lint / pnpm_install (push) Successful in 1m35s
Publish Docker image / Build (push) Successful in 3m55s
Test (production install and build) / production (22.11.0) (push) Successful in 1m15s
Lint / lint (backend) (push) Successful in 2m14s
Lint / lint (frontend) (push) Successful in 1m55s
Lint / lint (frontend-embed) (push) Successful in 1m59s
Lint / lint (frontend-shared) (push) Successful in 2m1s
Test (backend) / unit (22.11.0) (push) Failing after 7m56s
Lint / lint (misskey-bubble-game) (push) Successful in 2m12s
Lint / lint (misskey-js) (push) Successful in 2m9s
Lint / lint (misskey-reversi) (push) Successful in 2m12s
Lint / typecheck (backend) (push) Successful in 2m19s
Lint / lint (sw) (push) Successful in 2m33s
Lint / typecheck (misskey-js) (push) Successful in 1m29s
Lint / typecheck (sw) (push) Successful in 1m12s
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-22 08:57:48 -06:00
22 changed files with 269 additions and 474 deletions

View file

@ -1,97 +0,0 @@
name: 🐛 Bug Report
description: Create a report to help us improve
labels: ["⚠bug?"]
body:
- type: markdown
attributes:
value: |
Thanks for reporting!
First, in order to avoid duplicate Issues, please search to see if the problem you found has already been reported.
Also, If you are NOT owner/admin of server, PLEASE DONT REPORT SERVER SPECIFIC ISSUES TO HERE! (e.g. feature XXX is not working in misskey.example) Please try with another misskey servers, and if your issue is only reproducible with specific server, contact your server's owner/admin first.
- type: textarea
attributes:
label: 💡 Summary
description: Tell us what the bug is
validations:
required: true
- type: textarea
attributes:
label: 🥰 Expected Behavior
description: Tell us what should happen
validations:
required: true
- type: textarea
attributes:
label: 🤬 Actual Behavior
description: |
Tell us what happens instead of the expected behavior.
Please include errors from the developer console and/or server log files if you have access to them.
validations:
required: true
- type: textarea
attributes:
label: 📝 Steps to Reproduce
placeholder: |
1.
2.
3.
validations:
required: false
- type: textarea
attributes:
label: 💻 Frontend Environment
description: |
Tell us where on the platform it happens
DO NOT WRITE "latest". Please provide the specific version.
Examples:
* Model and OS of the device(s): MacBook Pro (14inch, 2021), macOS Ventura 13.4
* Browser: Chrome 113.0.5672.126
* Server URL: misskey.example.com
* Misskey: 2024.x.x
value: |
* Model and OS of the device(s):
* Browser:
* Server URL:
* Misskey:
render: markdown
validations:
required: false
- type: textarea
attributes:
label: 🛰 Backend Environment (for server admin)
description: |
Tell us where on the platform it happens
DO NOT WRITE "latest". Please provide the specific version.
If you are using a managed service, put that after the version.
Examples:
* Installation Method or Hosting Service: docker compose, k8s/docker, systemd, "Misskey install shell script", development environment
* Misskey: 2024.x.x
* Node: 20.x.x
* PostgreSQL: 15.x.x
* Redis: 7.x.x
* OS and Architecture: Ubuntu 24.04.2 LTS aarch64
value: |
* Installation Method or Hosting Service:
* Misskey:
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:
render: markdown
validations:
required: false
- type: checkboxes
attributes:
label: Do you want to address this bug yourself?
options:
- label: Yes, I will patch the bug myself and send a pull request

View file

@ -1,22 +0,0 @@
name: ✨ Feature Request
description: Suggest an idea for this project
labels: ["✨Feature"]
body:
- type: textarea
attributes:
label: Summary
description: Tell us what the suggestion is
validations:
required: true
- type: textarea
attributes:
label: Purpose
description: Describe the specific problem or need you think this feature will solve, and who it will help.
validations:
required: true
- type: checkboxes
attributes:
label: Do you want to implement this feature yourself?
options:
- label: Yes, I will implement this by myself and send a pull request

View file

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

View file

@ -1,23 +0,0 @@
<!-- お読みください / README
PRありがとうございます PRを作成する前に、コントリビューションガイドをご確認ください:
Thank you for your PR! Before creating a PR, please check the contribution guide:
https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md
-->
## What
<!-- このPRで何をしたのか どう変わるのか? -->
<!-- What did you do with this PR? How will it change things? -->
## Why
<!-- なぜそうするのか? どういう意図なのか? 何が困っているのか? -->
<!-- Why do you do it? What are your intentions? What is the problem? -->
## Additional info (optional)
<!-- テスト観点など -->
<!-- Test perspective, etc -->
## Checklist
- [ ] Read the [contribution guide](https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md)
- [ ] Test working in a local environment
- [ ] (If needed) Update CHANGELOG.md
- [ ] (If possible) Add tests

View file

@ -1,23 +0,0 @@
<!-- お読みください / README
PRありがとうございます PRを作成する前に、コントリビューションガイドをご確認ください:
Thank you for your PR! Before creating a PR, please check the contribution guide:
https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md
-->
## What
<!-- このPRで何をしたのか どう変わるのか? -->
<!-- What did you do with this PR? How will it change things? -->
## Why
<!-- なぜそうするのか? どういう意図なのか? 何が困っているのか? -->
<!-- Why do you do it? What are your intentions? What is the problem? -->
## Additional info (optional)
<!-- テスト観点など -->
<!-- Test perspective, etc -->
## Checklist
- [ ] Read the [contribution guide](https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md)
- [ ] Test working in a local environment
- [ ] (If needed) Update CHANGELOG.md
- [ ] (If possible) Add tests

View file

@ -1,20 +0,0 @@
## Summary
This is a release PR.
For more information on the release instructions, please see:
https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md#release
## For reviewers
- CHANGELOGに抜け漏れは無いか
- バージョンの上げ方は適切か
- 他にこのリリースに含めなければならない変更は無いか
- 全体的な変更内容を俯瞰し問題は無いか
- レビューされていないコミットがある場合は、それが問題ないか
- 最終的な動作確認を行い問題は無いか
などを確認し、リリースする準備が整っていると思われる場合は approve してください。
## Checklist
- [ ] package.jsonのバージョンが正しく更新されている
- [ ] CHANGELOGが過不足無く更新されている
- [ ] CIが全て通っている

View file

@ -1,7 +1,7 @@
<!-- お読みください / README <!-- お読みください / README
PRありがとうございます PRを作成する前に、コントリビューションガイドをご確認ください: PRありがとうございます PRを作成する前に、コントリビューションガイドをご確認ください:
Thank you for your PR! Before creating a PR, please check the contribution guide: Thank you for your PR! Before creating a PR, please check the contribution guide:
https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md https://forge.yumechi.jp/yume/yumechi-no-kuni/src/branch/master/CONTRIBUTING.md
--> -->
## What ## What
@ -17,7 +17,7 @@ https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md
<!-- Test perspective, etc --> <!-- Test perspective, etc -->
## Checklist ## Checklist
- [ ] Read the [contribution guide](https://github.com/misskey-dev/misskey/blob/develop/CONTRIBUTING.md) - [ ] Read the [contribution guide](https://forge.yumechi.jp/yume/yumechi-no-kuni/src/branch/master/CONTRIBUTING.md)
- [ ] Test working in a local environment - [ ] Test working in a local environment
- [ ] (If needed) Add story of storybook - [ ] (If needed) Add story of storybook
- [ ] (If needed) Update CHANGELOG.md - [ ] (If needed) Update CHANGELOG.md

View file

@ -1,6 +0,0 @@
build:
misskey:
args:
- NODE_ENV=development
deploy:
- helm upgrade --install misskey chart --set image=${OKTETO_BUILD_MISSKEY_IMAGE} --set url="https://misskey-$(kubectl config view --minify -o jsonpath='{..namespace}').cloud.okteto.net" --set environment=development

View file

@ -1,3 +1,8 @@
## 2024.11.0-yumechinokuni.7
- Misskey Trademark内容をWebUIから削除
- Service Worker キャッシュが正しく動作しない問題を修正
## 2024.11.0-yumechinokuni.6 ## 2024.11.0-yumechinokuni.6
- Upstream: 2024.11.0-alpha.4 タッグをマージする - Upstream: 2024.11.0-alpha.4 タッグをマージする

View file

@ -1,49 +1,31 @@
<div align="center"> # ゆめちのくに
<a href="https://misskey-hub.net">
<img src="./assets/title_float.svg" alt="Misskey logo" style="border-radius:50%" width="300"/>
</a>
**🌎 **Misskey** is an open source, federated social media platform that's free forever! 🚀** YumechiNoKuni is a fork of Misskey, with a focus on security, observability and reliability.
[Learn more](https://misskey-hub.net/) [mi.yumechi.jp](https://mi.yumechi.jp) is running this version.
--- [Learn more about Misskey](https://misskey-hub.net/)
<a href="https://misskey-hub.net/servers/"> ## Main differences
<img src="https://custom-icon-badges.herokuapp.com/badge/find_an-instance-acea31?logoColor=acea31&style=for-the-badge&logo=misskey&labelColor=363B40" alt="find an instance"/></a>
<a href="https://misskey-hub.net/docs/for-admin/install/guides/"> ### Unique features
<img src="https://custom-icon-badges.herokuapp.com/badge/create_an-instance-FBD53C?logoColor=FBD53C&style=for-the-badge&logo=server&labelColor=363B40" alt="create an instance"/></a>
<a href="./CONTRIBUTING.md"> - Strict ActivityPub sanitization by whitelisting properties and normalizing all referential properties.
<img src="https://custom-icon-badges.herokuapp.com/badge/become_a-contributor-A371F7?logoColor=A371F7&style=for-the-badge&logo=git-merge&labelColor=363B40" alt="become a contributor"/></a> - Strict Content Security Policy.
- Require TLSv1.2+ over port 443 for all ActivityPub requests.
- Strongly-typed inbox filtering in Rust.
- Reduce needless retries by marking more errors as permanent.
- Detailed prometheus metrics for slow requests, DB queries, AP processing, failed auths, etc.
- Disable unauthenticated media processing and use custom AppArmored media proxy.
- Enable active users in nodeinfo back.
- Advertise Git information over nodeinfo for better observability and easy tracking of the actual code running.
- Logical replication for the database over mTLS.
- More atomic operations in API handlers.
<a href="https://discord.gg/Wp8gVStHW3"> ### Picked from github.com/paricafe/misskey
<img src="https://custom-icon-badges.herokuapp.com/badge/join_the-community-5865F2?logoColor=5865F2&style=for-the-badge&logo=discord&labelColor=363B40" alt="join the community"/></a>
<a href="https://www.patreon.com/syuilo"> - pgroonga full-text search (with modifications).
<img src="https://custom-icon-badges.herokuapp.com/badge/become_a-patron-F96854?logoColor=F96854&style=for-the-badge&logo=patreon&labelColor=363B40" alt="become a patron"/></a> - Better Service Worker caching.
- Better hashtag statistics.
- Better handling of deep recursive AP objects.
</div>
## Thanks
<a href="https://sentry.io/"><img src="https://github.com/misskey-dev/misskey/assets/4439005/98576556-222f-467a-94be-e98dbda1d852" height="30" alt="Sentry" /></a>
Thanks to [Sentry](https://sentry.io/) for providing the error tracking platform that helps us catch unexpected errors.
<a href="https://www.chromatic.com/"><img src="https://user-images.githubusercontent.com/321738/84662277-e3db4f80-af1b-11ea-88f5-91d67a5e59f6.png" height="30" alt="Chromatic" /></a>
Thanks to [Chromatic](https://www.chromatic.com/) for providing the visual testing platform that helps us review UI changes and catch visual regressions.
<a href="https://about.codecov.io/for/open-source/"><img src="https://about.codecov.io/wp-content/themes/codecov/assets/brand/sentry-cobranding/logos/codecov-by-sentry-logo.svg" height="30" alt="Codecov" /></a>
Thanks to [Codecov](https://about.codecov.io/for/open-source/) for providing the code coverage platform that helps us improve our test coverage.
<a href="https://crowdin.com/"><img src="https://user-images.githubusercontent.com/20679825/230709597-1299a011-171a-4294-a91e-355a9b37c672.svg" height="30" alt="Crowdin" /></a>
Thanks to [Crowdin](https://crowdin.com/) for providing the localization platform that helps us translate Misskey into many languages.
<a href="https://hub.docker.com/"><img src="https://user-images.githubusercontent.com/20679825/230148221-f8e73a32-a49b-47c3-9029-9a15c3824f92.png" height="30" alt="Docker" /></a>
Thanks to [Docker](https://hub.docker.com/) for providing the container platform that helps us run Misskey in production.

View file

@ -1,15 +1,12 @@
# Reporting Security Issues # Reporting Security Issues
If you discover a security issue in Misskey, please report it by **[this form](https://github.com/misskey-dev/misskey/security/advisories/new)**. If you discover a security issue in this project, please use the `git blame` command to identify the source of the issue,
if it was introduced by this fork please contact me at secity<at>yumechi.jp.
This will allow us to assess the risk, and make a fix available before we add a For upstream issues please report by **[this form](https://github.com/misskey-dev/misskey/security/advisories/new)**.
bug report to the GitHub repository.
Thanks for helping make Misskey safe for everyone. Thanks for helping make YumechiNoKuni safe for everyone.
## When create a patch ## When create a patch
If you can also create a patch to fix the vulnerability, please create a PR on the private fork. If you can also create a patch to fix the vulnerability, please send a diff file with the report.
> [!note]
> There is a GitHub bug that prevents merging if a PR not following the develop branch of upstream, so please keep follow the develop branch.

View file

@ -1,6 +1,6 @@
{ {
"name": "misskey", "name": "misskey",
"version": "2024.11.0-yumechinokuni.6p2", "version": "2024.11.0-yumechinokuni.7",
"codename": "nasubi", "codename": "nasubi",
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -503,6 +503,7 @@ export class ClientServerService {
// ServiceWorker // ServiceWorker
fastify.get('/sw.js', async (request, reply) => { fastify.get('/sw.js', async (request, reply) => {
reply.header('content-security-policy', `default-src \'self'; connect-src \'self\'${ this.config.mediaProxy ? ` ${new URL(this.config.mediaProxy).origin}` : '' }`);
return await reply.sendFile('/sw.js', swAssets, { return await reply.sendFile('/sw.js', swAssets, {
maxAge: ms('10 minutes'), maxAge: ms('10 minutes'),
}); });

View file

@ -9,17 +9,6 @@ block loadClientEntry
doctype html doctype html
// //
-
_____ _ _
| |_|___ ___| |_ ___ _ _
| | | | |_ -|_ -| '_| -_| | |
|_|_|_|_|___|___|_,_|___|_ |
|___|
Thank you for using Misskey!
If you are reading this message... how about joining the development?
https://github.com/misskey-dev/misskey
html html
head head

View file

@ -1,17 +1,6 @@
doctype html doctype html
// //
-
_____ _ _
| |_|___ ___| |_ ___ _ _
| | | | |_ -|_ -| '_| -_| | |
|_|_|_|_|___|___|_,_|___|_ |
|___|
Thank you for using Misskey!
If you are reading this message... how about joining the development?
https://github.com/misskey-dev/misskey
html html
head head

View file

@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
<FormLink to="/about-misskey"> <FormLink to="/about-misskey">
<template #icon><i class="ti ti-info-circle"></i></template> <template #icon><i class="ti ti-info-circle"></i></template>
{{ i18n.ts.aboutMisskey }} {{ i18n.ts.aboutMisskey }} (Upstream)
</FormLink> </FormLink>
<FormLink v-if="instance.repositoryUrl || instance.providesTarball" :to="instance.repositoryUrl || `/tarball/misskey-${version}.tar.gz`" external> <FormLink v-if="instance.repositoryUrl || instance.providesTarball" :to="instance.repositoryUrl || `/tarball/misskey-${version}.tar.gz`" external>
<template #icon><i class="ti ti-code"></i></template> <template #icon><i class="ti ti-code"></i></template>

View file

@ -5,8 +5,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<div class="mk-app"> <div class="mk-app">
<a v-if="isRoot" href="https://github.com/misskey-dev/misskey" target="_blank" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:var(--MI_THEME-panel); color:var(--MI_THEME-fg); position: fixed; z-index: 10; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
<div v-if="!narrow && !isRoot" class="side"> <div v-if="!narrow && !isRoot" class="side">
<div class="banner" :style="{ backgroundImage: instance.backgroundImageUrl ? `url(${ instance.backgroundImageUrl })` : 'none' }"></div> <div class="banner" :style="{ backgroundImage: instance.backgroundImageUrl ? `url(${ instance.backgroundImageUrl })` : 'none' }"></div>
<div class="dashboard"> <div class="dashboard">

View file

@ -15,7 +15,7 @@ Issueを作成する前に、以下をご確認ください:
- 重複を防ぐため、既に同様の内容のIssueが作成されていないか検索してから新しいIssueを作ってください。 - 重複を防ぐため、既に同様の内容のIssueが作成されていないか検索してから新しいIssueを作ってください。
- Issueを質問に使わないでください。 - Issueを質問に使わないでください。
- Issueは、要望、提案、問題の報告にのみ使用してください。 - Issueは、要望、提案、問題の報告にのみ使用してください。
- 質問は、[GitHub Discussions](https://github.com/misskey-dev/misskey/discussions)や[Discord](https://discord.gg/Wp8gVStHW3)でお願いします。 - 質問は、@yume@mi.yumechi.jp / yume@mi.yumechi.jp でお願いします。
## PRの作成 ## PRの作成
PRを作成する前に、以下をご確認ください: PRを作成する前に、以下をご確認ください:

View file

@ -1,7 +1,7 @@
{ {
"type": "module", "type": "module",
"name": "misskey-js", "name": "misskey-js",
"version": "2024.11.0-yumechinokuni.6p2", "version": "2024.11.0-yumechinokuni.7",
"description": "Misskey SDK for JavaScript", "description": "Misskey SDK for JavaScript",
"license": "MIT", "license": "MIT",
"main": "./built/index.js", "main": "./built/index.js",
@ -31,7 +31,7 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/misskey-dev/misskey.git", "url": "https://forge.yumechi.jp/yume/yumechi-no-kuni.git",
"directory": "packages/misskey-js" "directory": "packages/misskey-js"
}, },
"devDependencies": { "devDependencies": {

View file

@ -12,17 +12,34 @@ import { createEmptyNotification, createNotification } from '@/scripts/create-no
import { swLang } from '@/scripts/lang.js'; import { swLang } from '@/scripts/lang.js';
import * as swos from '@/scripts/operations.js'; import * as swos from '@/scripts/operations.js';
globalThis.addEventListener('install', () => { const STATIC_CACHE_NAME = `misskey-static-${_VERSION_}`;
// ev.waitUntil(globalThis.skipWaiting()); const PATHS_TO_CACHE = ['/assets/', '/static-assets/', '/emoji/', '/twemoji/', '/fluent-emoji/', '/vite/'];
async function cacheWithFallback(cache, paths) {
for (const path of paths) {
try {
await cache.add(new Request(path, { credentials: 'same-origin' }));
} catch (error) {
// eslint-disable-next-line no-empty
}
}
}
globalThis.addEventListener('install', (ev) => {
ev.waitUntil((async () => {
const cache = await caches.open(STATIC_CACHE_NAME);
await cacheWithFallback(cache, PATHS_TO_CACHE);
await globalThis.skipWaiting();
})());
}); });
globalThis.addEventListener('activate', ev => { globalThis.addEventListener('activate', (ev) => {
ev.waitUntil( ev.waitUntil(
caches.keys() caches.keys()
.then(cacheNames => Promise.all( .then((cacheNames) => Promise.all(
cacheNames cacheNames
.filter((v) => v !== swLang.cacheName) .filter((v) => v !== STATIC_CACHE_NAME && v !== swLang.cacheName)
.map(name => caches.delete(name)), .map((name) => caches.delete(name)),
)) ))
.then(() => globalThis.clients.claim()), .then(() => globalThis.clients.claim()),
); );
@ -36,10 +53,32 @@ async function offlineContentHTML() {
reload: i18n.ts?.reload ?? 'Reload', reload: i18n.ts?.reload ?? 'Reload',
}; };
return `<!DOCTYPE html><html lang="ja"><head><meta charset="UTF-8"><meta content="width=device-width,initial-scale=1"name="viewport"><title>${messages.title}</title><style>body{background-color:#0c1210;color:#dee7e4;font-family:Hiragino Maru Gothic Pro,BIZ UDGothic,Roboto,HelveticaNeue,Arial,sans-serif;line-height:1.35;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;margin:0;padding:24px;box-sizing:border-box}.icon{max-width:120px;width:100%;height:auto;margin-bottom:20px;}.message{text-align:center;font-size:20px;font-weight:700;margin-bottom:20px}.version{text-align:center;font-size:90%;margin-bottom:20px}button{padding:7px 14px;min-width:100px;font-weight:700;font-family:Hiragino Maru Gothic Pro,BIZ UDGothic,Roboto,HelveticaNeue,Arial,sans-serif;line-height:1.35;border-radius:99rem;background-color:#b4e900;color:#192320;border:none;cursor:pointer;-webkit-tap-highlight-color:transparent}button:hover{background-color:#c6ff03}</style></head><body><svg class="icon"fill="none"height="24"stroke="currentColor"stroke-linecap="round"stroke-linejoin="round"stroke-width="2"viewBox="0 0 24 24"width="24"xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z"fill="none"stroke="none"/><path d="M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62"/><path d="M3 3l18 18"/></svg><div class="message">${messages.header}</div><div class="version">v${_VERSION_}</div><button onclick="reloadPage()">${messages.reload}</button><script>function reloadPage(){location.reload(!0)}</script></body></html>`; return `<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta content="width=device-width,initial-scale=1" name="viewport"><title>${messages.title}</title><style>body{background-color:#0c1210;color:#dee7e4;font-family:Hiragino Maru Gothic Pro,BIZ UDGothic,Roboto,HelveticaNeue,Arial,sans-serif;line-height:1.35;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh;margin:0;padding:24px;box-sizing:border-box}.icon{max-width:120px;width:100%;height:auto;margin-bottom:20px;}.message{text-align:center;font-size:20px;font-weight:700;margin-bottom:20px}.version{text-align:center;font-size:90%;margin-bottom:20px}button{padding:7px 14px;min-width:100px;font-weight:700;font-family:Hiragino Maru Gothic Pro,BIZ UDGothic,Roboto,HelveticaNeue,Arial,sans-serif;line-height:1.35;border-radius:99rem;background-color:#ff82ab;color:#192320;border:none;cursor:pointer;-webkit-tap-highlight-color:transparent}button:hover{background-color:#fac5eb}</style></head><body><svg class="icon" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none" stroke="none"/><path d="M9.58 5.548c.24 -.11 .492 -.207 .752 -.286c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 .957 -.383 1.824 -1.003 2.454m-2.997 1.033h-11.343c-2.572 -.004 -4.657 -2.011 -4.657 -4.487c0 -2.475 2.085 -4.482 4.657 -4.482c.13 -.582 .37 -1.128 .7 -1.62"/><path d="M3 3l18 18"/></svg><div class="message">${messages.header}</div><div class="version">v${_VERSION_}</div><button onclick="reloadPage()">${messages.reload}</button><script>function reloadPage(){location.reload(true)}</script></body></html>`;
} }
globalThis.addEventListener('fetch', ev => { globalThis.addEventListener('fetch', (ev) => {
const shouldCache = PATHS_TO_CACHE.some((path) => ev.request.url.includes(path));
if (shouldCache) {
ev.respondWith(
caches.match(ev.request)
.then((response) => {
if (response) return response;
return fetch(ev.request).then((response) => {
if (!response || response.status !== 200 || response.type !== 'basic') return response;
const responseToCache = response.clone();
caches.open(STATIC_CACHE_NAME)
.then((cache) => {
cache.put(ev.request, responseToCache);
});
return response;
});
}),
);
return;
}
let isHTMLRequest = false; let isHTMLRequest = false;
if (ev.request.headers.get('sec-fetch-dest') === 'document') { if (ev.request.headers.get('sec-fetch-dest') === 'document') {
isHTMLRequest = true; isHTMLRequest = true;
@ -64,8 +103,7 @@ globalThis.addEventListener('fetch', ev => {
); );
}); });
globalThis.addEventListener('push', ev => { globalThis.addEventListener('push', (ev) => {
// クライアント取得
ev.waitUntil(globalThis.clients.matchAll({ ev.waitUntil(globalThis.clients.matchAll({
includeUncontrolled: true, includeUncontrolled: true,
type: 'window', type: 'window',
@ -73,16 +111,14 @@ globalThis.addEventListener('push', ev => {
const data: PushNotificationDataMap[keyof PushNotificationDataMap] = ev.data?.json(); const data: PushNotificationDataMap[keyof PushNotificationDataMap] = ev.data?.json();
switch (data.type) { switch (data.type) {
// case 'driveFileCreated':
case 'notification': case 'notification':
case 'unreadAntennaNote': case 'unreadAntennaNote':
// 1日以上経過している場合は無視
if (Date.now() - data.dateTime > 1000 * 60 * 60 * 24) break; if (Date.now() - data.dateTime > 1000 * 60 * 60 * 24) break;
return createNotification(data); return createNotification(data);
case 'readAllNotifications': case 'readAllNotifications':
await globalThis.registration.getNotifications() await globalThis.registration.getNotifications()
.then(notifications => notifications.forEach(n => n.tag !== 'read_notification' && n.close())); .then((notifications) => notifications.forEach((n) => n.tag !== 'read_notification' && n.close()));
break; break;
} }
@ -159,9 +195,9 @@ globalThis.addEventListener('notificationclick', (ev: ServiceWorkerGlobalScopeEv
switch (action) { switch (action) {
case 'markAllAsRead': case 'markAllAsRead':
await globalThis.registration.getNotifications() await globalThis.registration.getNotifications()
.then(notifications => notifications.forEach(n => n.tag !== 'read_notification' && n.close())); .then((notifications) => notifications.forEach((n) => n.tag !== 'read_notification' && n.close()));
await get<Pick<Misskey.entities.SignupResponse, 'id' | 'token'>[]>('accounts').then(accounts => { await get<Pick<Misskey.entities.SignupResponse, 'id' | 'token'>[]>('accounts').then((accounts) => {
return Promise.all((accounts ?? []).map(async account => { return Promise.all((accounts ?? []).map(async (account) => {
await swos.sendMarkAllAsRead(account.id); await swos.sendMarkAllAsRead(account.id);
})); }));
}); });
@ -196,18 +232,15 @@ globalThis.addEventListener('notificationclose', (ev: ServiceWorkerGlobalScopeEv
globalThis.addEventListener('message', (ev: ServiceWorkerGlobalScopeEventMap['message']) => { globalThis.addEventListener('message', (ev: ServiceWorkerGlobalScopeEventMap['message']) => {
ev.waitUntil((async (): Promise<void> => { ev.waitUntil((async (): Promise<void> => {
switch (ev.data) { if (ev.data === 'clear') {
case 'clear':
// Cache Storage全削除
await caches.keys() await caches.keys()
.then(cacheNames => Promise.all( .then((cacheNames) => Promise.all(
cacheNames.map(name => caches.delete(name)), cacheNames.map((name) => caches.delete(name)),
)); ));
return; // TODO return;
} }
if (typeof ev.data === 'object') { if (typeof ev.data === 'object') {
// E.g. '[object Array]' → 'array'
const otype = Object.prototype.toString.call(ev.data).slice(8, -1).toLowerCase(); const otype = Object.prototype.toString.call(ev.data).slice(8, -1).toLowerCase();
if (otype === 'object') { if (otype === 'object') {

View file

@ -139,7 +139,7 @@ dependencies = [
"serde_json", "serde_json",
"serde_path_to_error", "serde_path_to_error",
"serde_urlencoded", "serde_urlencoded",
"sync_wrapper 1.0.1", "sync_wrapper 1.0.2",
"tokio", "tokio",
"tower 0.5.1", "tower 0.5.1",
"tower-layer", "tower-layer",
@ -162,7 +162,7 @@ dependencies = [
"mime", "mime",
"pin-project-lite", "pin-project-lite",
"rustversion", "rustversion",
"sync_wrapper 1.0.1", "sync_wrapper 1.0.2",
"tower-layer", "tower-layer",
"tower-service", "tower-service",
"tracing", "tracing",
@ -421,7 +421,7 @@ checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4"
[[package]] [[package]]
name = "fedivet" name = "fedivet"
version = "0.1.0" version = "0.1.0"
source = "git+https://forge.yumechi.jp/yume/fedivet?tag=testing-audit%2Brelay%2Bfilter#b1b051dc2f1319a3948d7afcecfd3ac8f92a07de" source = "git+https://forge.yumechi.jp/yume/fedivet?tag=v0.0.1#46456b0a61b449dad7bbe85e0342bdd5e3b6e031"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"axum", "axum",
@ -588,9 +588,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]] [[package]]
name = "h2" name = "h2"
version = "0.4.6" version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e"
dependencies = [ dependencies = [
"atomic-waker", "atomic-waker",
"bytes", "bytes",
@ -683,9 +683,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
[[package]] [[package]]
name = "hyper" name = "hyper"
version = "1.5.0" version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f"
dependencies = [ dependencies = [
"bytes", "bytes",
"futures-channel", "futures-channel",
@ -940,9 +940,9 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]] [[package]]
name = "itoa" name = "itoa"
version = "1.0.11" version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" checksum = "540654e97a3f4470a492cd30ff187bc95d89557a903a2bbf112e2fae98104ef2"
[[package]] [[package]]
name = "js-sys" name = "js-sys"
@ -1192,9 +1192,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.89" version = "1.0.92"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@ -1307,7 +1307,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
"sync_wrapper 1.0.1", "sync_wrapper 1.0.2",
"system-configuration", "system-configuration",
"tokio", "tokio",
"tokio-native-tls", "tokio-native-tls",
@ -1408,9 +1408,9 @@ checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
[[package]] [[package]]
name = "schannel" name = "schannel"
version = "0.1.26" version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d"
dependencies = [ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
@ -1564,9 +1564,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.87" version = "2.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1581,9 +1581,9 @@ checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
[[package]] [[package]]
name = "sync_wrapper" name = "sync_wrapper"
version = "1.0.1" version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"
dependencies = [ dependencies = [
"futures-core", "futures-core",
] ]
@ -1814,9 +1814,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]] [[package]]
name = "unicode-ident" name = "unicode-ident"
version = "1.0.13" version = "1.0.14"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
[[package]] [[package]]
name = "untrusted" name = "untrusted"

View file

@ -7,7 +7,7 @@ edition = "2021"
axum = "0.7" axum = "0.7"
clap = { version = "4.5.20", features = ["derive"] } clap = { version = "4.5.20", features = ["derive"] }
env_logger = "0.11.5" env_logger = "0.11.5"
fedivet = { git = "https://forge.yumechi.jp/yume/fedivet", tag = "testing-audit+relay+filter" } fedivet = { git = "https://forge.yumechi.jp/yume/fedivet", tag = "v0.0.1" }
rand = "0.8.5" rand = "0.8.5"
serde = { version = "1.0.210", features = ["derive"] } serde = { version = "1.0.210", features = ["derive"] }
tokio = { version = "1" } tokio = { version = "1" }