Skip to content

Commit

Permalink
Merge branch 'develop' into lem-ann
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Mar 21, 2024
2 parents 8450a80 + 831c74a commit 318af6a
Show file tree
Hide file tree
Showing 115 changed files with 2,077 additions and 354 deletions.
2 changes: 1 addition & 1 deletion .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# Option 3: If neither of the above applies to you.
# (In this case, the source code should be published
# on the Misskey interface. IT IS NOT ENOUGH TO
# DISCLOSE THE SOURCE CODE WEHN A USER REQUESTS IT BY
# DISCLOSE THE SOURCE CODE WHEN A USER REQUESTS IT BY
# E-MAIL OR OTHER MEANS. If you are not satisfied
# with this, it is recommended that you read the
# license again carefully. Anyway, enabling this
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/check-spdx-license-id.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Check SPDX-License-Identifier

on:
push:
branches:
- master
- develop
pull_request:

jobs:
check-spdx-license-id:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Check
run: |
counter=0
search() {
local directory="$1"
find "$directory" -type f \
'(' \
-name "*.cjs" -and -not -name '*.config.cjs' -o \
-name "*.html" -o \
-name "*.js" -and -not -name '*.config.js' -o \
-name "*.mjs" -and -not -name '*.config.mjs' -o \
-name "*.scss" -o \
-name "*.ts" -and -not -name '*.config.ts' -o \
-name "*.vue" \
')' -and \
-not -name '*eslint*'
}
check() {
local file="$1"
if ! (
grep -q "SPDX-FileCopyrightText: syuilo and misskey-project" "$file" ||
grep -q "SPDX-License-Identifier: AGPL-3.0-only" "$file"
); then
echo "Missing: $file"
((counter++))
fi
}
directories=(
"cypress/e2e"
"packages/backend/migration"
"packages/backend/src"
"packages/backend/test"
"packages/frontend/.storybook"
"packages/frontend/@types"
"packages/frontend/lib"
"packages/frontend/public"
"packages/frontend/src"
"packages/frontend/test"
"packages/misskey-bubble-game/src"
"packages/misskey-reversi/src"
"packages/sw/src"
"scripts"
)
for directory in "${directories[@]}"; do
for file in $(search $directory); do
check "$file"
done
done
if [ $counter -gt 0 ]; then
echo "SPDX-License-Identifier is missing in $counter files."
exit 1
else
echo "SPDX-License-Identifier is certainly described in all target files!"
exit 0
fi
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"dbaeumer.vscode-eslint",
"Vue.volar",
"Orta.vscode-jest",
"dbaeumer.vscode-eslint",
"mrmlnc.vscode-json5"
]
}
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"*.test.ts": "typescript"
},
"jest.jestCommandLine": "pnpm run jest",
"jest.autoRun": "off",
"jest.runMode": "on-demand",
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
},
Expand Down
23 changes: 21 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
## Unreleased

### Note
- コントロールパネル内にあるサマリープロキシの設定個所がセキュリティから全般へ変更となります。

### General
-
- Enhance: URLプレビューの有効化・無効化を設定できるように #13569
- Enhance: アンテナでBotによるノートを除外できるように
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/545)
- Fix: Play作成時に設定した公開範囲が機能していない問題を修正

### Client
- Enhance: 自分のノートの添付ファイルから直接ファイルの詳細ページに飛べるように
- Enhance: 広告がMisskeyと同一ドメインの場合はRouterで遷移するように
- Enhance: リアクション・いいねの総数を表示するように
- Enhance: リアクション受け入れが「いいねのみ」の場合はリアクション絵文字一覧を表示しないように
- Enhance: 設定>プラグインのページからプラグインの簡易的なログやエラーを見られるように
- 実装の都合により、プラグインは1つエラーを起こした時に即時停止するようになりました
- Enhance: ページのデザインを変更
- Fix: 一部のページ内リンクが正しく動作しない問題を修正
- Fix: 周年の実績が閏年を考慮しない問題を修正
- Fix: ローカルURLのプレビューポップアップが左上に表示される
- Fix: WebGL2をサポートしないブラウザで「季節に応じた画面の演出」が有効になっているとき、Misskeyが起動できなくなる問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/459)
- Fix: ページタイトルでローカルユーザーとリモートユーザーの区別がつかない問題を修正
(Cherry-picked from https://github.com/MisskeyIO/misskey/pull/528)
- Fix: コードブロックのシンタックスハイライトで使用される定義ファイルをCDNから取得するように #13177
- CDNから取得せずMisskey本体にバンドルする場合は`pacakges/frontend/vite.config.ts`を修正してください。

### Server
-
- Enhance: エンドポイント`antennas/update`の必須項目を`antennaId`のみに
- Enhance: misskey-dev/[email protected]の取り込み(プレビュー生成処理の効率化)
- Fix: フォローリクエストを作成する際に既存のものは削除するように
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/440)

## 2024.3.1

Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/basic.cy.js → cypress/e2e/basic.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

describe('Before setup instance', () => {
beforeEach(() => {
cy.resetState();
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/router.cy.js → cypress/e2e/router.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

describe('Router transition', () => {
describe('Redirect', () => {
// サーバの初期化。ルートのテストに関しては各describeごとに1度だけ実行で十分だと思う(使いまわした方が早い)
Expand Down
5 changes: 5 additions & 0 deletions cypress/e2e/widgets.cy.js → cypress/e2e/widgets.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

/* flaky
describe('After user signed in', () => {
beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Cypress.Commands.add('visitHome', () => {
})

Cypress.Commands.add('resetState', () => {
cy.window(win => {
cy.window().then(win => {
win.indexedDB.deleteDatabase('keyval-store');
});
cy.request('POST', '/api/reset-db', {}).as('reset');
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
declare global {
namespace Cypress {
interface Chainable {
login(username: string, password: string): Chainable<void>;

registerUser(
username: string,
password: string,
isAdmin?: boolean
): Chainable<void>;

resetState(): Chainable<void>;

visitHome(): Chainable<void>;
}
}
}

export {}
8 changes: 8 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"lib": ["dom", "es5"],
"target": "es5",
"types": ["cypress", "node"]
},
"include": ["./**/*.ts"]
}
70 changes: 70 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,10 @@ export interface Locale extends ILocale {
* 除外キーワード
*/
"antennaExcludeKeywords": string;
/**
* Botアカウントを除外
*/
"antennaExcludeBots": string;
/**
* スペースで区切るとAND指定になり、改行で区切るとOR指定になります
*/
Expand Down Expand Up @@ -4912,6 +4916,10 @@ export interface Locale extends ILocale {
* リトライ
*/
"gameRetry": string;
/**
* 使用しない場合は空欄にしてください
*/
"notUsePleaseLeaveBlank": string;
"_bubbleGame": {
/**
* 遊び方
Expand Down Expand Up @@ -6805,6 +6813,10 @@ export interface Locale extends ILocale {
* ソースを表示
*/
"viewSource": string;
/**
* ログを表示
*/
"viewLog": string;
};
"_preferencesBackups": {
/**
Expand Down Expand Up @@ -8631,6 +8643,10 @@ export interface Locale extends ILocale {
* 説明
*/
"summary": string;
/**
* 非公開に設定するとプロフィールに表示されなくなりますが、URLを知っている人は引き続きアクセスできます。
*/
"visibilityDescription": string;
};
"_pages": {
/**
Expand Down Expand Up @@ -9756,6 +9772,60 @@ export interface Locale extends ILocale {
*/
"header": string;
};
"_urlPreviewSetting": {
/**
* URLプレビューの設定
*/
"title": string;
/**
* URLプレビューを有効にする
*/
"enable": string;
/**
* プレビュー取得時のタイムアウト(ms)
*/
"timeout": string;
/**
* プレビュー取得の所要時間がこの値を超えた場合、プレビューは生成されません。
*/
"timeoutDescription": string;
/**
* Content-Lengthの最大値(byte)
*/
"maximumContentLength": string;
/**
* Content-Lengthがこの値を超えた場合、プレビューは生成されません。
*/
"maximumContentLengthDescription": string;
/**
* Content-Lengthが取得できた場合のみプレビューを生成
*/
"requireContentLength": string;
/**
* 相手サーバがContent-Lengthを返さない場合、プレビューは生成されません。
*/
"requireContentLengthDescription": string;
/**
* User-Agent
*/
"userAgent": string;
/**
* プレビュー取得時に使用されるUser-Agentを設定します。空欄の場合、デフォルトのUser-Agentが使用されます。
*/
"userAgentDescription": string;
/**
* プレビューを生成するプロキシのエンドポイント
*/
"summaryProxy": string;
/**
* Misskey本体ではなく、サマリープロキシを使用してプレビューを生成します。
*/
"summaryProxyDescription": string;
/**
* プロキシには下記パラメータがクエリ文字列として連携されます。プロキシ側がこれらをサポートしない場合、設定値は無視されます。
*/
"summaryProxyDescription2": string;
};
}
declare const locales: {
[lang: string]: Locale;
Expand Down
18 changes: 18 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ name: "名前"
antennaSource: "受信ソース"
antennaKeywords: "受信キーワード"
antennaExcludeKeywords: "除外キーワード"
antennaExcludeBots: "Botアカウントを除外"
antennaKeywordsDescription: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります"
notifyAntenna: "新しいノートを通知する"
withFileAntenna: "ファイルが添付されたノートのみ"
Expand Down Expand Up @@ -1224,6 +1225,7 @@ enableHorizontalSwipe: "スワイプしてタブを切り替える"
loading: "読み込み中"
surrender: "やめる"
gameRetry: "リトライ"
notUsePleaseLeaveBlank: "使用しない場合は空欄にしてください"

_bubbleGame:
howToPlay: "遊び方"
Expand Down Expand Up @@ -1772,6 +1774,7 @@ _plugin:
installWarn: "信頼できないプラグインはインストールしないでください。"
manage: "プラグインの管理"
viewSource: "ソースを表示"
viewLog: "ログを表示"

_preferencesBackups:
list: "作成したバックアップ"
Expand Down Expand Up @@ -2279,6 +2282,7 @@ _play:
title: "タイトル"
script: "スクリプト"
summary: "説明"
visibilityDescription: "非公開に設定するとプロフィールに表示されなくなりますが、URLを知っている人は引き続きアクセスできます。"

_pages:
newPage: "ページの作成"
Expand Down Expand Up @@ -2599,3 +2603,17 @@ _offlineScreen:
title: "オフライン - サーバーに接続できません"
header: "サーバーに接続できません"

_urlPreviewSetting:
title: "URLプレビューの設定"
enable: "URLプレビューを有効にする"
timeout: "プレビュー取得時のタイムアウト(ms)"
timeoutDescription: "プレビュー取得の所要時間がこの値を超えた場合、プレビューは生成されません。"
maximumContentLength: "Content-Lengthの最大値(byte)"
maximumContentLengthDescription: "Content-Lengthがこの値を超えた場合、プレビューは生成されません。"
requireContentLength: "Content-Lengthが取得できた場合のみプレビューを生成"
requireContentLengthDescription: "相手サーバがContent-Lengthを返さない場合、プレビューは生成されません。"
userAgent: "User-Agent"
userAgentDescription: "プレビュー取得時に使用されるUser-Agentを設定します。空欄の場合、デフォルトのUser-Agentが使用されます。"
summaryProxy: "プレビューを生成するプロキシのエンドポイント"
summaryProxyDescription: "Misskey本体ではなく、サマリープロキシを使用してプレビューを生成します。"
summaryProxyDescription2: "プロキシには下記パラメータがクエリ文字列として連携されます。プロキシ側がこれらをサポートしない場合、設定値は無視されます。"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"typescript": "5.3.3"
},
"devDependencies": {
"@types/node": "^20.11.28",
"@typescript-eslint/eslint-plugin": "7.1.0",
"@typescript-eslint/parser": "7.1.0",
"cross-env": "7.0.3",
Expand Down
7 changes: 6 additions & 1 deletion packages/backend/generate_api_json.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

import { loadConfig } from './built/config.js'
import { genOpenapiSpec } from './built/server/api/openapi/gen-spec.js'
import { writeFileSync } from "node:fs";

const config = loadConfig();
const spec = genOpenapiSpec(config, true);

writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8');
writeFileSync('./built/api.json', JSON.stringify(spec), 'utf-8');
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/

export class UserBlacklistAnntena1689325027964 {
name = 'UserBlacklistAnntena1689325027964'

Expand Down
Loading

0 comments on commit 318af6a

Please sign in to comment.