Compare commits
7 Commits
master
...
refine-api
Author | SHA1 | Date | |
---|---|---|---|
|
6db7aef322 | ||
|
0039f5774d | ||
|
ec6c93b082 | ||
|
0ff714d11e | ||
|
10c1e8161f | ||
|
e5107f47cf | ||
|
b96651a478 |
3
.autogen/check_pr.jq
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
.[]
|
||||||
|
.head
|
||||||
|
.label
|
2
.autogen/next_url.jq
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.links
|
||||||
|
.next
|
39
.autogen/patreon.jq
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
(
|
||||||
|
.data |
|
||||||
|
map(
|
||||||
|
select(
|
||||||
|
.relationships
|
||||||
|
.currently_entitled_tiers
|
||||||
|
.data[]
|
||||||
|
)
|
||||||
|
) |
|
||||||
|
map(
|
||||||
|
.relationships
|
||||||
|
.user
|
||||||
|
.data
|
||||||
|
.id
|
||||||
|
)
|
||||||
|
) as $data |
|
||||||
|
.included |
|
||||||
|
map(
|
||||||
|
select(
|
||||||
|
.id as $id |
|
||||||
|
$data |
|
||||||
|
contains(
|
||||||
|
[
|
||||||
|
$id
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) |
|
||||||
|
map(
|
||||||
|
.attributes |
|
||||||
|
[
|
||||||
|
.full_name,
|
||||||
|
.thumb_url,
|
||||||
|
.url
|
||||||
|
] |
|
||||||
|
@tsv
|
||||||
|
) |
|
||||||
|
.[] |
|
||||||
|
@text
|
87
.autogen/update_readme_patreon.sh
Executable file
@ -0,0 +1,87 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# __MISSKEY_BEARER_TOKEN=
|
||||||
|
# __MISSKEY_CAMPAIGN_ID=
|
||||||
|
# __MISSKEY_GITHUB_TOKEN=
|
||||||
|
# __MISSKEY_HEAD=syuilo:patch-autogen
|
||||||
|
# __MISSKEY_REPO=syuilo/misskey
|
||||||
|
# __MISSKEY_BRANCH=develop
|
||||||
|
test "$(curl -LSs -w '\n' -- "https://api.github.com/repos/$REPO/pulls?access_token=$__MISSKEY_GITHUB_TOKEN" | jq -r -f check_pr.jq | grep $__MISSKEY_HEAD)" && exit 1
|
||||||
|
cd "$(dirname $0)/.." && \
|
||||||
|
touch null.cache && \
|
||||||
|
rm *.cache && \
|
||||||
|
git checkout $__MISSKEY_BRANCH && \
|
||||||
|
git pull origin $__MISSKEY_BRANCH && \
|
||||||
|
git pull upstream $__MISSKEY_BRANCH && \
|
||||||
|
git stash && \
|
||||||
|
git rebase -f upstream/$__MISSKEY_BRANCH && \
|
||||||
|
git branch patch-autogen && \
|
||||||
|
git checkout patch-autogen && \
|
||||||
|
git reset --hard HEAD || \
|
||||||
|
exit 1
|
||||||
|
touch patreon.md.cache && \
|
||||||
|
rm patreon.md.cache && \
|
||||||
|
echo '<!-- PATREON_START -->' > patreon.md.cache && \
|
||||||
|
url="https://www.patreon.com/api/oauth2/v2/campaigns/$__MISSKEY_CAMPAIGN_ID/members?include=currently_entitled_tiers,user&fields%5Btier%5D=title&fields%5Buser%5D=full_name,thumb_url,url,hide_pledges"
|
||||||
|
while :
|
||||||
|
do
|
||||||
|
touch patreon.raw.cache && \
|
||||||
|
rm patreon.raw.cache && \
|
||||||
|
curl -LSs -w '\n' -H "Authorization: Bearer $__MISSKEY_BEARER_TOKEN" -- $url > patreon.raw.cache && \
|
||||||
|
touch patreon.cache && \
|
||||||
|
rm patreon.cache && \
|
||||||
|
cat patreon.raw.cache | \
|
||||||
|
jq -r -f patreon.jq >> patreon.cache && \
|
||||||
|
echo '<table><tr>' >> patreon.md.cache && \
|
||||||
|
cat patreon.cache | \
|
||||||
|
awk -F'\t' '{print $2,$1}' | \
|
||||||
|
sed -e 's/ /\\" alt=\\"/' | \
|
||||||
|
xargs -I% echo '<td><img src="%" width="100"></td>' >> patreon.md.cache && \
|
||||||
|
echo '</tr><tr>' >> patreon.md.cache && \
|
||||||
|
cat patreon.cache | \
|
||||||
|
awk -F'\t' '{print $3,$1}' | \
|
||||||
|
sed -e 's/ /\\">/' | \
|
||||||
|
xargs -I% echo '<td><a href="%</a></td>' >> patreon.md.cache && \
|
||||||
|
echo '</tr></table>' >> patreon.md.cache || \
|
||||||
|
exit 1
|
||||||
|
new_url="$(cat patreon.raw.cache | jq -r -f next_url.jq)"
|
||||||
|
test "$new_url" = 'null' && \
|
||||||
|
break || \
|
||||||
|
URL="$url"
|
||||||
|
done
|
||||||
|
ignore= && \
|
||||||
|
echo -e "\n**Last updated:** $(date -uR | sed 's/\+0000/UTC/')\n<!-- PATREON_END -->" >> patreon.md.cache && \
|
||||||
|
touch README.md && \
|
||||||
|
touch .autogen/README.md && \
|
||||||
|
rm .autogen/README.md && \
|
||||||
|
mv README.md .autogen/README.md && \
|
||||||
|
cat .autogen/README.md | while IFS= read line;
|
||||||
|
do
|
||||||
|
if [[ -z "$ignore" ]]
|
||||||
|
then
|
||||||
|
if [[ "$line" = '<!-- PATREON_START -->' ]]
|
||||||
|
then
|
||||||
|
ignore='PATREON_INSIDE'
|
||||||
|
else
|
||||||
|
echo "$line" >> README.md
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ "$LINE" = '<!-- PATREON_END -->' ]]
|
||||||
|
then
|
||||||
|
ignore=
|
||||||
|
cat patreon.md.cache >> README.md
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cat patreon.md.cache
|
||||||
|
touch null.cache && \
|
||||||
|
rm *.cache && \
|
||||||
|
diff .autogen/README.md README.md > diff.cache
|
||||||
|
cat diff.cache && \
|
||||||
|
test 4 -lt $(cat diff.cache | wc -l) && \
|
||||||
|
git add README.md && \
|
||||||
|
git commit -m 'Update README.md [AUTOGEN]' && \
|
||||||
|
git push -f origin patch-autogen && \
|
||||||
|
curl -LSs -w '\n' -X POST -d '{"title":"[AUTOMATED] Update README.md","body":"*This pull request was created by a tool.*","head":"'$__MISSKEY_HEAD'","base":"'$__MISSKEY_BRANCH'"}' -- "https://api.github.com/repos/$__MISSKEY_REPO/pulls?access_token=$__MISSKEY_GITHUB_TOKEN"
|
||||||
|
git stash
|
||||||
|
git checkout $__MISSKEY_BRANCH
|
||||||
|
git branch -D patch-autogen
|
13
.babelrc
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"plugins": [
|
||||||
|
[
|
||||||
|
"@babel/plugin-transform-runtime",
|
||||||
|
{
|
||||||
|
"corejs": {
|
||||||
|
"version": 3,
|
||||||
|
"proposals": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
49
.circleci/config.yml
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
version: 2.1
|
||||||
|
|
||||||
|
executors:
|
||||||
|
docker:
|
||||||
|
working_directory: /tmp/workspace
|
||||||
|
docker:
|
||||||
|
- image: docker:latest
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
parameters:
|
||||||
|
with_deploy:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
executor: docker
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- setup_remote_docker:
|
||||||
|
version: 19.03.13
|
||||||
|
- run:
|
||||||
|
name: Build
|
||||||
|
command: |
|
||||||
|
docker build -t misskey/misskey .
|
||||||
|
- when:
|
||||||
|
condition: <<parameters.with_deploy>>
|
||||||
|
steps:
|
||||||
|
- run:
|
||||||
|
name: Deploy
|
||||||
|
command: |
|
||||||
|
if [ "$DOCKERHUB_USERNAME$DOCKERHUB_PASSWORD" ]
|
||||||
|
then
|
||||||
|
apk update && apk add jq
|
||||||
|
docker tag misskey/misskey misskey/misskey:$(cat package.json | jq -r .version)
|
||||||
|
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
|
||||||
|
docker push -a misskey/misskey
|
||||||
|
else
|
||||||
|
echo -e '\033[0;33mAborted deploying to Docker Hub\033[0;39m'
|
||||||
|
fi
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
docker:
|
||||||
|
jobs:
|
||||||
|
- docker:
|
||||||
|
name: auto-build
|
||||||
|
with_deploy: true
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: master
|
12
.circleci/misskey/default.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
url: 'http://misskey.local'
|
||||||
|
port: 8080
|
||||||
|
db:
|
||||||
|
host: localhost
|
||||||
|
port: 5432
|
||||||
|
db: test-misskey
|
||||||
|
user: postgres
|
||||||
|
pass: ''
|
||||||
|
redis:
|
||||||
|
host: localhost
|
||||||
|
port: 6379
|
||||||
|
id: aid
|
12
.circleci/misskey/test.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
url: 'http://misskey.local'
|
||||||
|
port: 8080
|
||||||
|
db:
|
||||||
|
host: localhost
|
||||||
|
port: 5432
|
||||||
|
db: test-misskey
|
||||||
|
user: postgres
|
||||||
|
pass: ''
|
||||||
|
redis:
|
||||||
|
host: localhost
|
||||||
|
port: 6379
|
||||||
|
id: aid
|
@ -1,224 +0,0 @@
|
|||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
# Misskey configuration
|
|
||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
|
|
||||||
# ┌────────────────────────┐
|
|
||||||
#───┘ Initial Setup Password └─────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
# Password to initiate setting up admin account.
|
|
||||||
# It will not be used after the initial setup is complete.
|
|
||||||
#
|
|
||||||
# Be sure to change this when you set up Misskey via the Internet.
|
|
||||||
#
|
|
||||||
# The provider of the service who sets up Misskey on behalf of the customer should
|
|
||||||
# set this value to something unique when generating the Misskey config file,
|
|
||||||
# and provide it to the customer.
|
|
||||||
setupPassword: example_password_please_change_this_or_you_will_get_hacked
|
|
||||||
|
|
||||||
# ┌─────┐
|
|
||||||
#───┘ URL └─────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
# Final accessible URL seen by a user.
|
|
||||||
url: 'http://misskey.local'
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# URL SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
# ┌───────────────────────┐
|
|
||||||
#───┘ Port and TLS settings └───────────────────────────────────
|
|
||||||
|
|
||||||
#
|
|
||||||
# Misskey requires a reverse proxy to support HTTPS connections.
|
|
||||||
#
|
|
||||||
# +----- https://example.tld/ ------------+
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# +---------------------------------------+
|
|
||||||
#
|
|
||||||
# You need to set up a reverse proxy. (e.g. nginx)
|
|
||||||
# An encrypted connection with HTTPS is highly recommended
|
|
||||||
# because tokens may be transferred in GET requests.
|
|
||||||
|
|
||||||
# The port that your Misskey server should listen on.
|
|
||||||
port: 61812
|
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
|
||||||
|
|
||||||
db:
|
|
||||||
host: db
|
|
||||||
port: 5432
|
|
||||||
|
|
||||||
# Database name
|
|
||||||
db: misskey
|
|
||||||
|
|
||||||
# Auth
|
|
||||||
user: postgres
|
|
||||||
pass: postgres
|
|
||||||
|
|
||||||
# Whether disable Caching queries
|
|
||||||
#disableCache: true
|
|
||||||
|
|
||||||
# Extra Connection options
|
|
||||||
#extra:
|
|
||||||
# ssl: true
|
|
||||||
|
|
||||||
dbReplications: false
|
|
||||||
|
|
||||||
# You can configure any number of replicas here
|
|
||||||
#dbSlaves:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Redis configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
redis:
|
|
||||||
host: redis
|
|
||||||
port: 6379
|
|
||||||
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
#pass: example-pass
|
|
||||||
#prefix: example-prefix
|
|
||||||
#db: 1
|
|
||||||
|
|
||||||
#redisForPubsub:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForJobQueue:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForTimelines:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForReactions:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
# ┌───────────────────────────┐
|
|
||||||
#───┘ MeiliSearch configuration └─────────────────────────────
|
|
||||||
|
|
||||||
#meilisearch:
|
|
||||||
# host: meilisearch
|
|
||||||
# port: 7700
|
|
||||||
# apiKey: ''
|
|
||||||
# ssl: true
|
|
||||||
# index: ''
|
|
||||||
|
|
||||||
# ┌───────────────┐
|
|
||||||
#───┘ ID generation └───────────────────────────────────────────
|
|
||||||
|
|
||||||
# You can select the ID generation method.
|
|
||||||
# You don't usually need to change this setting, but you can
|
|
||||||
# change it according to your preferences.
|
|
||||||
|
|
||||||
# Available methods:
|
|
||||||
# aid ... Short, Millisecond accuracy
|
|
||||||
# aidx ... Millisecond accuracy
|
|
||||||
# meid ... Similar to ObjectID, Millisecond accuracy
|
|
||||||
# ulid ... Millisecond accuracy
|
|
||||||
# objectid ... This is left for backward compatibility
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# ID SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
id: 'aidx'
|
|
||||||
|
|
||||||
# ┌────────────────┐
|
|
||||||
#───┘ Error tracking └──────────────────────────────────────────
|
|
||||||
|
|
||||||
# Sentry is available for error tracking.
|
|
||||||
# See the Sentry documentation for more details on options.
|
|
||||||
|
|
||||||
#sentryForBackend:
|
|
||||||
# enableNodeProfiling: true
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
#sentryForFrontend:
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Other configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
# Whether disable HSTS
|
|
||||||
#disableHsts: true
|
|
||||||
|
|
||||||
# Number of worker processes
|
|
||||||
#clusterLimit: 1
|
|
||||||
|
|
||||||
# Job concurrency per worker
|
|
||||||
# deliverJobConcurrency: 128
|
|
||||||
# inboxJobConcurrency: 16
|
|
||||||
|
|
||||||
# Job rate limiter
|
|
||||||
# deliverJobPerSec: 128
|
|
||||||
# inboxJobPerSec: 32
|
|
||||||
|
|
||||||
# Job attempts
|
|
||||||
# deliverJobMaxAttempts: 12
|
|
||||||
# inboxJobMaxAttempts: 8
|
|
||||||
|
|
||||||
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
|
||||||
#outgoingAddressFamily: ipv4
|
|
||||||
|
|
||||||
# Proxy for HTTP/HTTPS
|
|
||||||
#proxy: http://127.0.0.1:3128
|
|
||||||
|
|
||||||
proxyBypassHosts:
|
|
||||||
- api.deepl.com
|
|
||||||
- api-free.deepl.com
|
|
||||||
- www.recaptcha.net
|
|
||||||
- hcaptcha.com
|
|
||||||
- challenges.cloudflare.com
|
|
||||||
|
|
||||||
# Proxy for SMTP/SMTPS
|
|
||||||
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
|
|
||||||
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
|
|
||||||
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
|
|
||||||
|
|
||||||
# Media Proxy
|
|
||||||
#mediaProxy: https://example.com/proxy
|
|
||||||
|
|
||||||
# Proxy remote files (default: true)
|
|
||||||
proxyRemoteFiles: true
|
|
||||||
|
|
||||||
# Sign to ActivityPub GET request (default: true)
|
|
||||||
signToActivityPubGet: true
|
|
||||||
|
|
||||||
allowedPrivateNetworks: [
|
|
||||||
'127.0.0.1/32'
|
|
||||||
]
|
|
||||||
|
|
||||||
# Upload or download file size limits (bytes)
|
|
||||||
#maxFileSize: 262144000
|
|
@ -1,11 +1,4 @@
|
|||||||
# misskey settings
|
|
||||||
# MISSKEY_URL=https://example.tld/
|
|
||||||
|
|
||||||
# db settings
|
# db settings
|
||||||
POSTGRES_PASSWORD=example-misskey-pass
|
POSTGRES_PASSWORD=example-misskey-pass
|
||||||
# DATABASE_PASSWORD=${POSTGRES_PASSWORD}
|
|
||||||
POSTGRES_USER=example-misskey-user
|
POSTGRES_USER=example-misskey-user
|
||||||
# DATABASE_USER=${POSTGRES_USER}
|
|
||||||
POSTGRES_DB=misskey
|
POSTGRES_DB=misskey
|
||||||
# DATABASE_DB=${POSTGRES_DB}
|
|
||||||
DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}"
|
|
||||||
|
@ -1,221 +0,0 @@
|
|||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
# Misskey configuration
|
|
||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
|
|
||||||
# ┌─────┐
|
|
||||||
#───┘ URL └─────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
# Final accessible URL seen by a user.
|
|
||||||
# You can set url from an environment variable instead.
|
|
||||||
url: https://example.tld/
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# URL SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
# ┌───────────────────────┐
|
|
||||||
#───┘ Port and TLS settings └───────────────────────────────────
|
|
||||||
|
|
||||||
#
|
|
||||||
# Misskey requires a reverse proxy to support HTTPS connections.
|
|
||||||
#
|
|
||||||
# +----- https://example.tld/ ------------+
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# +---------------------------------------+
|
|
||||||
#
|
|
||||||
# You need to set up a reverse proxy. (e.g. nginx)
|
|
||||||
# An encrypted connection with HTTPS is highly recommended
|
|
||||||
# because tokens may be transferred in GET requests.
|
|
||||||
|
|
||||||
# The port that your Misskey server should listen on.
|
|
||||||
port: 3000
|
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
|
||||||
|
|
||||||
db:
|
|
||||||
host: db
|
|
||||||
port: 5432
|
|
||||||
|
|
||||||
# Database name
|
|
||||||
# You can set db from an environment variable instead.
|
|
||||||
db: misskey
|
|
||||||
|
|
||||||
# Auth
|
|
||||||
# You can set user and pass from environment variables instead.
|
|
||||||
user: example-misskey-user
|
|
||||||
pass: example-misskey-pass
|
|
||||||
|
|
||||||
# Whether disable Caching queries
|
|
||||||
#disableCache: true
|
|
||||||
|
|
||||||
# Extra Connection options
|
|
||||||
#extra:
|
|
||||||
# ssl: true
|
|
||||||
|
|
||||||
dbReplications: false
|
|
||||||
|
|
||||||
# You can configure any number of replicas here
|
|
||||||
#dbSlaves:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Redis configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
redis:
|
|
||||||
host: redis
|
|
||||||
port: 6379
|
|
||||||
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
#pass: example-pass
|
|
||||||
#prefix: example-prefix
|
|
||||||
#db: 1
|
|
||||||
|
|
||||||
#redisForPubsub:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForJobQueue:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForTimelines:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForReactions:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
# ┌───────────────────────────┐
|
|
||||||
#───┘ MeiliSearch configuration └─────────────────────────────
|
|
||||||
|
|
||||||
# You can set scope to local (default value) or global
|
|
||||||
# (include notes from remote).
|
|
||||||
|
|
||||||
#meilisearch:
|
|
||||||
# host: meilisearch
|
|
||||||
# port: 7700
|
|
||||||
# apiKey: ''
|
|
||||||
# ssl: true
|
|
||||||
# index: ''
|
|
||||||
# scope: local
|
|
||||||
|
|
||||||
# ┌───────────────┐
|
|
||||||
#───┘ ID generation └───────────────────────────────────────────
|
|
||||||
|
|
||||||
# You can select the ID generation method.
|
|
||||||
# You don't usually need to change this setting, but you can
|
|
||||||
# change it according to your preferences.
|
|
||||||
|
|
||||||
# Available methods:
|
|
||||||
# aid ... Short, Millisecond accuracy
|
|
||||||
# aidx ... Millisecond accuracy
|
|
||||||
# meid ... Similar to ObjectID, Millisecond accuracy
|
|
||||||
# ulid ... Millisecond accuracy
|
|
||||||
# objectid ... This is left for backward compatibility
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# ID SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
id: 'aidx'
|
|
||||||
|
|
||||||
# ┌────────────────┐
|
|
||||||
#───┘ Error tracking └──────────────────────────────────────────
|
|
||||||
|
|
||||||
# Sentry is available for error tracking.
|
|
||||||
# See the Sentry documentation for more details on options.
|
|
||||||
|
|
||||||
#sentryForBackend:
|
|
||||||
# enableNodeProfiling: true
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
#sentryForFrontend:
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Other configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
# Whether disable HSTS
|
|
||||||
#disableHsts: true
|
|
||||||
|
|
||||||
# Number of worker processes
|
|
||||||
#clusterLimit: 1
|
|
||||||
|
|
||||||
# Job concurrency per worker
|
|
||||||
# deliverJobConcurrency: 128
|
|
||||||
# inboxJobConcurrency: 16
|
|
||||||
|
|
||||||
# Job rate limiter
|
|
||||||
# deliverJobPerSec: 128
|
|
||||||
# inboxJobPerSec: 32
|
|
||||||
|
|
||||||
# Job attempts
|
|
||||||
# deliverJobMaxAttempts: 12
|
|
||||||
# inboxJobMaxAttempts: 8
|
|
||||||
|
|
||||||
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
|
||||||
#outgoingAddressFamily: ipv4
|
|
||||||
|
|
||||||
# Proxy for HTTP/HTTPS
|
|
||||||
#proxy: http://127.0.0.1:3128
|
|
||||||
|
|
||||||
proxyBypassHosts:
|
|
||||||
- api.deepl.com
|
|
||||||
- api-free.deepl.com
|
|
||||||
- www.recaptcha.net
|
|
||||||
- hcaptcha.com
|
|
||||||
- challenges.cloudflare.com
|
|
||||||
|
|
||||||
# Proxy for SMTP/SMTPS
|
|
||||||
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
|
|
||||||
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
|
|
||||||
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
|
|
||||||
|
|
||||||
# Media Proxy
|
|
||||||
#mediaProxy: https://example.com/proxy
|
|
||||||
|
|
||||||
# Proxy remote files (default: true)
|
|
||||||
proxyRemoteFiles: true
|
|
||||||
|
|
||||||
# Sign to ActivityPub GET request (default: true)
|
|
||||||
signToActivityPubGet: true
|
|
||||||
|
|
||||||
# For security reasons, uploading attachments from the intranet is prohibited,
|
|
||||||
# but exceptions can be made from the following settings. Default value is "undefined".
|
|
||||||
# Read changelog to learn more (Improvements of 12.90.0 (2021/09/04)).
|
|
||||||
#allowedPrivateNetworks: [
|
|
||||||
# '127.0.0.1/32'
|
|
||||||
#]
|
|
||||||
|
|
||||||
# Upload or download file size limits (bytes)
|
|
||||||
#maxFileSize: 262144000
|
|
@ -2,77 +2,6 @@
|
|||||||
# Misskey configuration
|
# Misskey configuration
|
||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
# ┌──────────────────────────────┐
|
|
||||||
#───┘ a boring but important thing └────────────────────────────
|
|
||||||
|
|
||||||
#
|
|
||||||
# First of all, let me tell you a story that may possibly be
|
|
||||||
# boring to you and possibly important to you.
|
|
||||||
#
|
|
||||||
# Misskey is licensed under the AGPLv3 license. This license is
|
|
||||||
# known to be often misunderstood. Please read the following
|
|
||||||
# instructions carefully and select the appropriate option so
|
|
||||||
# that you do not negligently cause a license violation.
|
|
||||||
#
|
|
||||||
|
|
||||||
# --------
|
|
||||||
# Option 1: If you host Misskey AS-IS (without any changes to
|
|
||||||
# the source code. forks are not included).
|
|
||||||
#
|
|
||||||
# Step 1: Congratulations! You don't need to do anything.
|
|
||||||
|
|
||||||
# --------
|
|
||||||
# Option 2: If you have made changes to the source code (forks
|
|
||||||
# are included) and publish a Git repository of source
|
|
||||||
# code. There should be no access restrictions on
|
|
||||||
# this repository. Strictly speaking, it doesn't have
|
|
||||||
# to be a Git repository, but you'll probably use Git!
|
|
||||||
#
|
|
||||||
# Step 1: Build and run the Misskey server first.
|
|
||||||
# Step 2: Open <https://your.misskey.example/admin/settings> in
|
|
||||||
# your browser with the administrator account.
|
|
||||||
# Step 3: Enter the URL of your Git repository in the
|
|
||||||
# "Repository URL" field.
|
|
||||||
|
|
||||||
# --------
|
|
||||||
# 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 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
|
|
||||||
# option will automatically generate and publish a
|
|
||||||
# tarball at build time, protecting you from
|
|
||||||
# inadvertent license violations. (There is no legal
|
|
||||||
# guarantee, of course.) The tarball will generated
|
|
||||||
# from the root directory of your codebase. So it is
|
|
||||||
# also recommended to check <built/tarball> directory
|
|
||||||
# once after building and before activating the server
|
|
||||||
# to avoid ACCIDENTAL LEAKING OF SENSITIVE INFORMATION.
|
|
||||||
# To prevent certain files from being included in the
|
|
||||||
# tarball, add a glob pattern after line 15 in
|
|
||||||
# <scripts/tarball.mjs>. DO NOT FORGET TO BUILD AFTER
|
|
||||||
# ENABLING THIS OPTION!)
|
|
||||||
#
|
|
||||||
# Step 1: Uncomment the following line.
|
|
||||||
#
|
|
||||||
# publishTarballInsteadOfProvideRepositoryUrl: true
|
|
||||||
|
|
||||||
# ┌────────────────────────┐
|
|
||||||
#───┘ Initial Setup Password └─────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
# Password to initiate setting up admin account.
|
|
||||||
# It will not be used after the initial setup is complete.
|
|
||||||
#
|
|
||||||
# Be sure to change this when you set up Misskey via the Internet.
|
|
||||||
#
|
|
||||||
# The provider of the service who sets up Misskey on behalf of the customer should
|
|
||||||
# set this value to something unique when generating the Misskey config file,
|
|
||||||
# and provide it to the customer.
|
|
||||||
#
|
|
||||||
# setupPassword: example_password_please_change_this_or_you_will_get_hacked
|
|
||||||
|
|
||||||
# ┌─────┐
|
# ┌─────┐
|
||||||
#───┘ URL └─────────────────────────────────────────────────────
|
#───┘ URL └─────────────────────────────────────────────────────
|
||||||
|
|
||||||
@ -86,7 +15,10 @@ url: https://example.tld/
|
|||||||
#───┘ Port and TLS settings └───────────────────────────────────
|
#───┘ Port and TLS settings └───────────────────────────────────
|
||||||
|
|
||||||
#
|
#
|
||||||
# Misskey requires a reverse proxy to support HTTPS connections.
|
# Misskey supports two deployment options for public.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Option 1: With Reverse Proxy
|
||||||
#
|
#
|
||||||
# +----- https://example.tld/ ------------+
|
# +----- https://example.tld/ ------------+
|
||||||
# +------+ |+-------------+ +----------------+|
|
# +------+ |+-------------+ +----------------+|
|
||||||
@ -94,16 +26,30 @@ url: https://example.tld/
|
|||||||
# +------+ |+-------------+ +----------------+|
|
# +------+ |+-------------+ +----------------+|
|
||||||
# +---------------------------------------+
|
# +---------------------------------------+
|
||||||
#
|
#
|
||||||
# You need to set up a reverse proxy. (e.g. nginx)
|
# You need to setup reverse proxy. (eg. nginx)
|
||||||
# An encrypted connection with HTTPS is highly recommended
|
# You do not define 'https' section.
|
||||||
# because tokens may be transferred in GET requests.
|
|
||||||
|
|
||||||
# The port that your Misskey server should listen on.
|
# Option 2: Standalone
|
||||||
port: 3000
|
#
|
||||||
|
# +- https://example.tld/ -+
|
||||||
|
# +------+ | +---------------+ |
|
||||||
|
# | User | ---> | | Misskey (443) | |
|
||||||
|
# +------+ | +---------------+ |
|
||||||
|
# +------------------------+
|
||||||
|
#
|
||||||
|
# You need to run Misskey as root.
|
||||||
|
# You need to set Certificate in 'https' section.
|
||||||
|
|
||||||
# You can also use UNIX domain socket.
|
# To use option 1, uncomment below line.
|
||||||
# socket: /path/to/misskey.sock
|
#port: 3000 # A port that your Misskey server should listen.
|
||||||
# chmodSocket: '777'
|
|
||||||
|
# To use option 2, uncomment below lines.
|
||||||
|
#port: 443
|
||||||
|
|
||||||
|
#https:
|
||||||
|
# # path for certification
|
||||||
|
# key: /etc/letsencrypt/live/example.tld/privkey.pem
|
||||||
|
# cert: /etc/letsencrypt/live/example.tld/fullchain.pem
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
# ┌──────────────────────────┐
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
#───┘ PostgreSQL configuration └────────────────────────────────
|
||||||
@ -126,89 +72,25 @@ db:
|
|||||||
#extra:
|
#extra:
|
||||||
# ssl: true
|
# ssl: true
|
||||||
|
|
||||||
dbReplications: false
|
|
||||||
|
|
||||||
# You can configure any number of replicas here
|
|
||||||
#dbSlaves:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
# ┌─────────────────────┐
|
||||||
#───┘ Redis configuration └─────────────────────────────────────
|
#───┘ Redis configuration └─────────────────────────────────────
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
host: localhost
|
host: localhost
|
||||||
port: 6379
|
port: 6379
|
||||||
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
#pass: example-pass
|
#pass: example-pass
|
||||||
#prefix: example-prefix
|
#prefix: example-prefix
|
||||||
#db: 1
|
#db: 1
|
||||||
# You can specify more ioredis options...
|
|
||||||
#username: example-username
|
|
||||||
|
|
||||||
#redisForPubsub:
|
# ┌─────────────────────────────┐
|
||||||
|
#───┘ Elasticsearch configuration └─────────────────────────────
|
||||||
|
|
||||||
|
#elasticsearch:
|
||||||
# host: localhost
|
# host: localhost
|
||||||
# port: 6379
|
# port: 9200
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
# ssl: false
|
||||||
# #pass: example-pass
|
# user:
|
||||||
# #prefix: example-prefix
|
# pass:
|
||||||
# #db: 1
|
|
||||||
# # You can specify more ioredis options...
|
|
||||||
# #username: example-username
|
|
||||||
|
|
||||||
#redisForJobQueue:
|
|
||||||
# host: localhost
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
# # You can specify more ioredis options...
|
|
||||||
# #username: example-username
|
|
||||||
|
|
||||||
#redisForTimelines:
|
|
||||||
# host: localhost
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
# # You can specify more ioredis options...
|
|
||||||
# #username: example-username
|
|
||||||
|
|
||||||
#redisForReactions:
|
|
||||||
# host: localhost
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
# # You can specify more ioredis options...
|
|
||||||
# #username: example-username
|
|
||||||
|
|
||||||
# ┌───────────────────────────┐
|
|
||||||
#───┘ MeiliSearch configuration └─────────────────────────────
|
|
||||||
|
|
||||||
# You can set scope to local (default value) or global
|
|
||||||
# (include notes from remote).
|
|
||||||
|
|
||||||
#meilisearch:
|
|
||||||
# host: localhost
|
|
||||||
# port: 7700
|
|
||||||
# apiKey: ''
|
|
||||||
# ssl: true
|
|
||||||
# index: ''
|
|
||||||
# scope: local
|
|
||||||
|
|
||||||
# ┌───────────────┐
|
# ┌───────────────┐
|
||||||
#───┘ ID generation └───────────────────────────────────────────
|
#───┘ ID generation └───────────────────────────────────────────
|
||||||
@ -219,7 +101,6 @@ redis:
|
|||||||
|
|
||||||
# Available methods:
|
# Available methods:
|
||||||
# aid ... Short, Millisecond accuracy
|
# aid ... Short, Millisecond accuracy
|
||||||
# aidx ... Millisecond accuracy
|
|
||||||
# meid ... Similar to ObjectID, Millisecond accuracy
|
# meid ... Similar to ObjectID, Millisecond accuracy
|
||||||
# ulid ... Millisecond accuracy
|
# ulid ... Millisecond accuracy
|
||||||
# objectid ... This is left for backward compatibility
|
# objectid ... This is left for backward compatibility
|
||||||
@ -227,22 +108,7 @@ redis:
|
|||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
||||||
# ID SETTINGS AFTER THAT!
|
# ID SETTINGS AFTER THAT!
|
||||||
|
|
||||||
id: 'aidx'
|
id: 'aid'
|
||||||
|
|
||||||
# ┌────────────────┐
|
|
||||||
#───┘ Error tracking └──────────────────────────────────────────
|
|
||||||
|
|
||||||
# Sentry is available for error tracking.
|
|
||||||
# See the Sentry documentation for more details on options.
|
|
||||||
|
|
||||||
#sentryForBackend:
|
|
||||||
# enableNodeProfiling: true
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
#sentryForFrontend:
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
# ┌─────────────────────┐
|
||||||
#───┘ Other configuration └─────────────────────────────────────
|
#───┘ Other configuration └─────────────────────────────────────
|
||||||
@ -254,36 +120,32 @@ id: 'aidx'
|
|||||||
#clusterLimit: 1
|
#clusterLimit: 1
|
||||||
|
|
||||||
# Job concurrency per worker
|
# Job concurrency per worker
|
||||||
#deliverJobConcurrency: 128
|
# deliverJobConcurrency: 128
|
||||||
#inboxJobConcurrency: 16
|
# inboxJobConcurrency: 16
|
||||||
#relationshipJobConcurrency: 16
|
|
||||||
# What's relationshipJob?:
|
|
||||||
# Follow, unfollow, block and unblock(ings) while following-imports, etc. or account migrations.
|
|
||||||
|
|
||||||
# Job rate limiter
|
# Job rate limiter
|
||||||
#deliverJobPerSec: 128
|
# deliverJobPerSec: 128
|
||||||
#inboxJobPerSec: 32
|
# inboxJobPerSec: 16
|
||||||
#relationshipJobPerSec: 64
|
|
||||||
|
|
||||||
# Job attempts
|
# Job attempts
|
||||||
#deliverJobMaxAttempts: 12
|
# deliverJobMaxAttempts: 12
|
||||||
#inboxJobMaxAttempts: 8
|
# inboxJobMaxAttempts: 8
|
||||||
|
|
||||||
# Local address used for outgoing requests
|
|
||||||
#outgoingAddress: 127.0.0.1
|
|
||||||
|
|
||||||
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
||||||
#outgoingAddressFamily: ipv4
|
#outgoingAddressFamily: ipv4
|
||||||
|
|
||||||
|
# Syslog option
|
||||||
|
#syslog:
|
||||||
|
# host: localhost
|
||||||
|
# port: 514
|
||||||
|
|
||||||
# Proxy for HTTP/HTTPS
|
# Proxy for HTTP/HTTPS
|
||||||
#proxy: http://127.0.0.1:3128
|
#proxy: http://127.0.0.1:3128
|
||||||
|
|
||||||
proxyBypassHosts:
|
#proxyBypassHosts: [
|
||||||
- api.deepl.com
|
# 'example.com',
|
||||||
- api-free.deepl.com
|
# '192.0.2.8'
|
||||||
- www.recaptcha.net
|
#]
|
||||||
- hcaptcha.com
|
|
||||||
- challenges.cloudflare.com
|
|
||||||
|
|
||||||
# Proxy for SMTP/SMTPS
|
# Proxy for SMTP/SMTPS
|
||||||
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
|
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
|
||||||
@ -291,33 +153,7 @@ proxyBypassHosts:
|
|||||||
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
|
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
|
||||||
|
|
||||||
# Media Proxy
|
# Media Proxy
|
||||||
# Reference Implementation: https://github.com/misskey-dev/media-proxy
|
|
||||||
# * Deliver a common cache between instances
|
|
||||||
# * Perform image compression (on a different server resource than the main process)
|
|
||||||
#mediaProxy: https://example.com/proxy
|
#mediaProxy: https://example.com/proxy
|
||||||
|
|
||||||
# Proxy remote files (default: true)
|
# Sign to ActivityPub GET request (default: false)
|
||||||
# Proxy remote files by this instance or mediaProxy to prevent remote files from running in remote domains.
|
#signToActivityPubGet: true
|
||||||
proxyRemoteFiles: true
|
|
||||||
|
|
||||||
# Movie Thumbnail Generation URL
|
|
||||||
# There is no reference implementation.
|
|
||||||
# For example, Misskey will point to the following URL:
|
|
||||||
# https://example.com/thumbnail.webp?thumbnail=1&url=https%3A%2F%2Fstorage.example.com%2Fpath%2Fto%2Fvideo.mp4
|
|
||||||
#videoThumbnailGenerator: https://example.com
|
|
||||||
|
|
||||||
# Sign to ActivityPub GET request (default: true)
|
|
||||||
signToActivityPubGet: true
|
|
||||||
|
|
||||||
# For security reasons, uploading attachments from the intranet is prohibited,
|
|
||||||
# but exceptions can be made from the following settings. Default value is "undefined".
|
|
||||||
# Read changelog to learn more (Improvements of 12.90.0 (2021/09/04)).
|
|
||||||
#allowedPrivateNetworks: [
|
|
||||||
# '127.0.0.1/32'
|
|
||||||
#]
|
|
||||||
|
|
||||||
# Upload or download file size limits (bytes)
|
|
||||||
#maxFileSize: 262144000
|
|
||||||
|
|
||||||
# PID File of master process
|
|
||||||
#pidFile: /tmp/misskey.pid
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
FROM mcr.microsoft.com/devcontainers/javascript-node:0-18
|
|
@ -1,53 +0,0 @@
|
|||||||
services:
|
|
||||||
app:
|
|
||||||
build:
|
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- ../:/workspace:cached
|
|
||||||
- node_modules:/workspace/node_modules
|
|
||||||
|
|
||||||
command: sleep infinity
|
|
||||||
|
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
- external_network
|
|
||||||
|
|
||||||
redis:
|
|
||||||
restart: unless-stopped
|
|
||||||
image: redis:7-alpine
|
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
volumes:
|
|
||||||
- redis-data:/data
|
|
||||||
healthcheck:
|
|
||||||
test: "redis-cli ping"
|
|
||||||
interval: 5s
|
|
||||||
retries: 20
|
|
||||||
|
|
||||||
db:
|
|
||||||
restart: unless-stopped
|
|
||||||
image: postgres:15-alpine
|
|
||||||
networks:
|
|
||||||
- internal_network
|
|
||||||
environment:
|
|
||||||
POSTGRES_USER: postgres
|
|
||||||
POSTGRES_PASSWORD: postgres
|
|
||||||
POSTGRES_DB: misskey
|
|
||||||
volumes:
|
|
||||||
- postgres-data:/var/lib/postgresql/data
|
|
||||||
healthcheck:
|
|
||||||
test: "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"
|
|
||||||
interval: 5s
|
|
||||||
retries: 20
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
postgres-data:
|
|
||||||
redis-data:
|
|
||||||
node_modules:
|
|
||||||
|
|
||||||
networks:
|
|
||||||
internal_network:
|
|
||||||
internal: true
|
|
||||||
external_network:
|
|
@ -1,26 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Misskey",
|
|
||||||
"dockerComposeFile": "compose.yml",
|
|
||||||
"service": "app",
|
|
||||||
"workspaceFolder": "/workspace",
|
|
||||||
"features": {
|
|
||||||
"ghcr.io/devcontainers/features/node:1": {
|
|
||||||
"version": "20.16.0"
|
|
||||||
},
|
|
||||||
"ghcr.io/devcontainers-contrib/features/corepack:1": {}
|
|
||||||
},
|
|
||||||
"forwardPorts": [3000],
|
|
||||||
"postCreateCommand": "/bin/bash .devcontainer/init.sh",
|
|
||||||
"customizations": {
|
|
||||||
"vscode": {
|
|
||||||
"extensions": [
|
|
||||||
"editorconfig.editorconfig",
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"Vue.volar",
|
|
||||||
"Orta.vscode-jest",
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"mrmlnc.vscode-json5"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,211 +0,0 @@
|
|||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
# Misskey configuration
|
|
||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
|
|
||||||
# ┌─────┐
|
|
||||||
#───┘ URL └─────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
# Final accessible URL seen by a user.
|
|
||||||
url: http://127.0.0.1:3000/
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# URL SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
# ┌───────────────────────┐
|
|
||||||
#───┘ Port and TLS settings └───────────────────────────────────
|
|
||||||
|
|
||||||
#
|
|
||||||
# Misskey requires a reverse proxy to support HTTPS connections.
|
|
||||||
#
|
|
||||||
# +----- https://example.tld/ ------------+
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# +---------------------------------------+
|
|
||||||
#
|
|
||||||
# You need to set up a reverse proxy. (e.g. nginx)
|
|
||||||
# An encrypted connection with HTTPS is highly recommended
|
|
||||||
# because tokens may be transferred in GET requests.
|
|
||||||
|
|
||||||
# The port that your Misskey server should listen on.
|
|
||||||
port: 3000
|
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
|
||||||
|
|
||||||
db:
|
|
||||||
host: db
|
|
||||||
port: 5432
|
|
||||||
|
|
||||||
# Database name
|
|
||||||
db: misskey
|
|
||||||
|
|
||||||
# Auth
|
|
||||||
user: postgres
|
|
||||||
pass: postgres
|
|
||||||
|
|
||||||
# Whether disable Caching queries
|
|
||||||
#disableCache: true
|
|
||||||
|
|
||||||
# Extra Connection options
|
|
||||||
#extra:
|
|
||||||
# ssl: true
|
|
||||||
|
|
||||||
dbReplications: false
|
|
||||||
|
|
||||||
# You can configure any number of replicas here
|
|
||||||
#dbSlaves:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Redis configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
redis:
|
|
||||||
host: redis
|
|
||||||
port: 6379
|
|
||||||
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
#pass: example-pass
|
|
||||||
#prefix: example-prefix
|
|
||||||
#db: 1
|
|
||||||
|
|
||||||
#redisForPubsub:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForJobQueue:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForTimelines:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForReactions:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
# ┌───────────────────────────┐
|
|
||||||
#───┘ MeiliSearch configuration └─────────────────────────────
|
|
||||||
|
|
||||||
#meilisearch:
|
|
||||||
# host: meilisearch
|
|
||||||
# port: 7700
|
|
||||||
# apiKey: ''
|
|
||||||
# ssl: true
|
|
||||||
# index: ''
|
|
||||||
|
|
||||||
# ┌───────────────┐
|
|
||||||
#───┘ ID generation └───────────────────────────────────────────
|
|
||||||
|
|
||||||
# You can select the ID generation method.
|
|
||||||
# You don't usually need to change this setting, but you can
|
|
||||||
# change it according to your preferences.
|
|
||||||
|
|
||||||
# Available methods:
|
|
||||||
# aid ... Short, Millisecond accuracy
|
|
||||||
# aidx ... Millisecond accuracy
|
|
||||||
# meid ... Similar to ObjectID, Millisecond accuracy
|
|
||||||
# ulid ... Millisecond accuracy
|
|
||||||
# objectid ... This is left for backward compatibility
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# ID SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
id: 'aidx'
|
|
||||||
|
|
||||||
# ┌────────────────┐
|
|
||||||
#───┘ Error tracking └──────────────────────────────────────────
|
|
||||||
|
|
||||||
# Sentry is available for error tracking.
|
|
||||||
# See the Sentry documentation for more details on options.
|
|
||||||
|
|
||||||
#sentryForBackend:
|
|
||||||
# enableNodeProfiling: true
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
#sentryForFrontend:
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Other configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
# Whether disable HSTS
|
|
||||||
#disableHsts: true
|
|
||||||
|
|
||||||
# Number of worker processes
|
|
||||||
#clusterLimit: 1
|
|
||||||
|
|
||||||
# Job concurrency per worker
|
|
||||||
# deliverJobConcurrency: 128
|
|
||||||
# inboxJobConcurrency: 16
|
|
||||||
|
|
||||||
# Job rate limiter
|
|
||||||
# deliverJobPerSec: 128
|
|
||||||
# inboxJobPerSec: 32
|
|
||||||
|
|
||||||
# Job attempts
|
|
||||||
# deliverJobMaxAttempts: 12
|
|
||||||
# inboxJobMaxAttempts: 8
|
|
||||||
|
|
||||||
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
|
||||||
#outgoingAddressFamily: ipv4
|
|
||||||
|
|
||||||
# Proxy for HTTP/HTTPS
|
|
||||||
#proxy: http://127.0.0.1:3128
|
|
||||||
|
|
||||||
proxyBypassHosts:
|
|
||||||
- api.deepl.com
|
|
||||||
- api-free.deepl.com
|
|
||||||
- www.recaptcha.net
|
|
||||||
- hcaptcha.com
|
|
||||||
- challenges.cloudflare.com
|
|
||||||
|
|
||||||
# Proxy for SMTP/SMTPS
|
|
||||||
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
|
|
||||||
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
|
|
||||||
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
|
|
||||||
|
|
||||||
# Media Proxy
|
|
||||||
#mediaProxy: https://example.com/proxy
|
|
||||||
|
|
||||||
# Proxy remote files (default: true)
|
|
||||||
proxyRemoteFiles: true
|
|
||||||
|
|
||||||
# Sign to ActivityPub GET request (default: true)
|
|
||||||
signToActivityPubGet: true
|
|
||||||
|
|
||||||
allowedPrivateNetworks: [
|
|
||||||
'127.0.0.1/32'
|
|
||||||
]
|
|
||||||
|
|
||||||
# Upload or download file size limits (bytes)
|
|
||||||
#maxFileSize: 262144000
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
|
|
||||||
sudo chown node node_modules
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb
|
|
||||||
git config --global --add safe.directory /workspace
|
|
||||||
git submodule update --init
|
|
||||||
corepack install
|
|
||||||
corepack enable
|
|
||||||
pnpm config set store-dir /home/node/.local/share/pnpm/store
|
|
||||||
pnpm install --frozen-lockfile
|
|
||||||
cp .devcontainer/devcontainer.yml .config/default.yml
|
|
||||||
pnpm build
|
|
||||||
pnpm migrate
|
|
||||||
pnpm exec cypress install
|
|
@ -1,30 +1,14 @@
|
|||||||
.autogen
|
.autogen
|
||||||
|
.git
|
||||||
.github
|
.github
|
||||||
.travis
|
.travis
|
||||||
.vscode
|
.vscode
|
||||||
.config
|
|
||||||
Dockerfile
|
Dockerfile
|
||||||
build/
|
build/
|
||||||
built/
|
built/
|
||||||
db/
|
db/
|
||||||
.devcontainer/compose.yml
|
docker-compose.yml
|
||||||
|
elasticsearch/
|
||||||
node_modules/
|
node_modules/
|
||||||
packages/*/node_modules
|
|
||||||
redis/
|
redis/
|
||||||
files/
|
files/
|
||||||
fluent-emojis/
|
|
||||||
.pnp.*
|
|
||||||
|
|
||||||
# .yarn関連
|
|
||||||
.yarn/*
|
|
||||||
!.yarn/patches
|
|
||||||
!.yarn/plugins
|
|
||||||
!.yarn/releases
|
|
||||||
!.yarn/sdks
|
|
||||||
!.yarn/versions
|
|
||||||
|
|
||||||
.pnpm-store
|
|
||||||
|
|
||||||
.idea/
|
|
||||||
packages/*/.vscode/
|
|
||||||
packages/backend/test/compose.yml
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
DKL-DI-0005
|
|
||||||
DKL-DI-0006
|
|
||||||
DKL-LI-0003
|
|
@ -5,11 +5,6 @@ indent_style = tab
|
|||||||
indent_size = 2
|
indent_size = 2
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
end_of_line = lf
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
[*.md]
|
[*.yml]
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{yml,yaml}]
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
31
.eslintrc
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"parserOptions": {
|
||||||
|
"parser": "@typescript-eslint/parser"
|
||||||
|
},
|
||||||
|
"extends": [
|
||||||
|
"eslint:recommended",
|
||||||
|
"plugin:vue/recommended"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"vue/require-v-for-key": 0,
|
||||||
|
"vue/max-attributes-per-line": 0,
|
||||||
|
"vue/html-indent": 0,
|
||||||
|
"vue/html-self-closing": 0,
|
||||||
|
"vue/no-unused-vars": 0,
|
||||||
|
"vue/attributes-order": 0,
|
||||||
|
"vue/require-prop-types": 0,
|
||||||
|
"vue/require-default-prop": 0,
|
||||||
|
"vue/html-closing-bracket-spacing": 0,
|
||||||
|
"vue/singleline-html-element-content-newline": 0,
|
||||||
|
"vue/no-v-html": 0,
|
||||||
|
"no-console": 0,
|
||||||
|
"no-unused-vars": 0,
|
||||||
|
"no-empty": 0
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"ENV": true,
|
||||||
|
"VERSION": true,
|
||||||
|
"API": true,
|
||||||
|
"LANGS": true
|
||||||
|
}
|
||||||
|
}
|
1
.gitattributes
vendored
@ -5,4 +5,3 @@
|
|||||||
*.glb -diff -text
|
*.glb -diff -text
|
||||||
*.blend -diff -text
|
*.blend -diff -text
|
||||||
*.afdesign -diff -text
|
*.afdesign -diff -text
|
||||||
* text=auto eol=lf
|
|
||||||
|
38
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# PATH OWNERS
|
||||||
|
/.autogen/ @acid-chicken
|
||||||
|
/.circleci/ @syuilo @acid-chicken
|
||||||
|
/.config/ @syuilo @AyaMorisawa @mei23 @acid-chicken @rinsuki
|
||||||
|
# /.config/mongo_initdb_example.js @khws4v1
|
||||||
|
/.github/ @syuilo @AyaMorisawa @acid-chicken
|
||||||
|
/.vscode/ @acid-chicken
|
||||||
|
/assets/ @syuilo # @tamaina
|
||||||
|
/docs/ @syuilo
|
||||||
|
/docs/*.en.md @AyaMorisawa # @skid9000
|
||||||
|
# /docs/*.fr.md @BoFFire
|
||||||
|
# /docs/docker.*.md @khws4v1
|
||||||
|
/locales/ @syuilo
|
||||||
|
/src/ @syuilo @AyaMorisawa @mei23 @acid-chicken @rinsuki
|
||||||
|
# /src/crypto_key.cc @akihikodaki
|
||||||
|
# /src/crypto_key.d.ts @akihikodaki
|
||||||
|
/.dockerignore @syuilo # @khws4v1
|
||||||
|
/.editorconfig @syuilo @AyaMorisawa
|
||||||
|
/.eslintrc @syuilo
|
||||||
|
/.gitattributes @syuilo
|
||||||
|
/.gitignore @syuilo
|
||||||
|
/.npmrc @syuilo
|
||||||
|
/.vsls.json @AyaMorisawa
|
||||||
|
/CHANGELOG.md @syuilo
|
||||||
|
/CODE_OF_CONDUCT.md @syuilo
|
||||||
|
/CONTRIBUTING.md @syuilo
|
||||||
|
/Dockerfile @syuilo @AyaMorisawa @acid-chicken # @khws4v1
|
||||||
|
/LICENSE @syuilo
|
||||||
|
/README.md @syuilo @AyaMorisawa @acid-chicken # @nikhiljha
|
||||||
|
# /binding.gyp @akihikodaki
|
||||||
|
/crowdin.yml @syuilo
|
||||||
|
# /docker-compose.yml @khws4v1
|
||||||
|
/gulpfile.ts @syuilo @AyaMorisawa
|
||||||
|
/jsconfig.json @syuilo @AyaMorisawa
|
||||||
|
/package.json @syuilo @AyaMorisawa
|
||||||
|
/tsconfig.json @syuilo @AyaMorisawa
|
||||||
|
/tslint.json @syuilo @AyaMorisawa
|
||||||
|
/webpack.config.ts @syuilo @AyaMorisawa
|
3
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
patreon: syuilo
|
30
.github/ISSUE_TEMPLATE/01_bug-report.md
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
name: 🐛 Bug Report
|
||||||
|
about: Create a report to help us improve
|
||||||
|
title: ''
|
||||||
|
labels: ⚠️bug?
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💡 Summary
|
||||||
|
|
||||||
|
<!-- Tell us what the bug is -->
|
||||||
|
|
||||||
|
## 🙂 Expected Behavior
|
||||||
|
|
||||||
|
<!--- Tell us what should happen -->
|
||||||
|
|
||||||
|
## ☹️ Actual Behavior
|
||||||
|
|
||||||
|
<!--- Tell us what happens instead of the expected behavior -->
|
||||||
|
|
||||||
|
## 📝 Steps to Reproduce
|
||||||
|
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
3.
|
||||||
|
|
||||||
|
## 📌 Environment
|
||||||
|
|
||||||
|
<!-- Tell us where on the platform it happens -->
|
97
.github/ISSUE_TEMPLATE/01_bug-report.yml
vendored
@ -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
|
|
12
.github/ISSUE_TEMPLATE/02_feature-request.md
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
name: ✨ Feature Request
|
||||||
|
about: Suggest an idea for this project
|
||||||
|
title: ''
|
||||||
|
labels: ✨Feature
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
<!-- Tell us what the suggestion is -->
|
22
.github/ISSUE_TEMPLATE/02_feature-request.yml
vendored
@ -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
|
|
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -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
|
|
13
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
## Summary
|
||||||
|
|
||||||
|
<!--
|
||||||
|
-
|
||||||
|
- * Please describe your changes here *
|
||||||
|
-
|
||||||
|
- If you are going to resolve some issue, please add this context.
|
||||||
|
- Resolve #ISSUE_NUMBER
|
||||||
|
-
|
||||||
|
- If you are going to fix some bug issue, please add this context.
|
||||||
|
- Fix #ISSUE_NUMBER
|
||||||
|
-
|
||||||
|
-->
|
23
.github/PULL_REQUEST_TEMPLATE/01_bug.md
vendored
@ -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
|
|
23
.github/PULL_REQUEST_TEMPLATE/02_enhance.md
vendored
@ -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
|
|
20
.github/PULL_REQUEST_TEMPLATE/03_release.md
vendored
@ -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が全て通っている
|
|
48
.github/dependabot.yml
vendored
@ -1,48 +0,0 @@
|
|||||||
# To get started with Dependabot version updates, you'll need to specify which
|
|
||||||
# package ecosystems to update and where the package manifests are located.
|
|
||||||
# Please see the documentation for all configuration options:
|
|
||||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: github-actions
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: daily
|
|
||||||
open-pull-requests-limit: 100
|
|
||||||
|
|
||||||
# Add only the root, not each workspace item
|
|
||||||
# https://github.com/dependabot/dependabot-core/issues/4993#issuecomment-1289133027
|
|
||||||
- package-ecosystem: npm
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: daily
|
|
||||||
open-pull-requests-limit: 10
|
|
||||||
# List dependencies required to be updated together, sharing the same version numbers.
|
|
||||||
# Those who simply have the common owner (e.g. @fastify) don't need to be listed.
|
|
||||||
groups:
|
|
||||||
aws-sdk:
|
|
||||||
patterns:
|
|
||||||
- "@aws-sdk/*"
|
|
||||||
bull-board:
|
|
||||||
patterns:
|
|
||||||
- "@bull-board/*"
|
|
||||||
nestjs:
|
|
||||||
patterns:
|
|
||||||
- "@nestjs/*"
|
|
||||||
slacc:
|
|
||||||
patterns:
|
|
||||||
- "slacc-*"
|
|
||||||
storybook:
|
|
||||||
patterns:
|
|
||||||
- "storybook*"
|
|
||||||
- "@storybook/*"
|
|
||||||
swc-core:
|
|
||||||
patterns:
|
|
||||||
- "@swc/core*"
|
|
||||||
typescript-eslint:
|
|
||||||
patterns:
|
|
||||||
- "@typescript-eslint/*"
|
|
||||||
tensorflow:
|
|
||||||
patterns:
|
|
||||||
- "@tensorflow/*"
|
|
34
.github/labeler.yml
vendored
@ -1,34 +0,0 @@
|
|||||||
'packages/backend':
|
|
||||||
- any:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['packages/backend/**/*']
|
|
||||||
|
|
||||||
'packages/backend:test':
|
|
||||||
- any:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['packages/backend/test/**/*']
|
|
||||||
|
|
||||||
'packages/frontend':
|
|
||||||
- any:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['packages/frontend/**/*']
|
|
||||||
|
|
||||||
'packages/frontend:test':
|
|
||||||
- any:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['cypress/**/*']
|
|
||||||
|
|
||||||
'packages/sw':
|
|
||||||
- any:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['packages/sw/**/*']
|
|
||||||
|
|
||||||
'packages/misskey-js':
|
|
||||||
- any:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['packages/misskey-js/**/*']
|
|
||||||
|
|
||||||
'packages/misskey-js:test':
|
|
||||||
- any:
|
|
||||||
- changed-files:
|
|
||||||
- any-glob-to-any-file: ['packages/misskey-js/test/**/*', 'packages/misskey-js/test-d/**/*']
|
|
17
.github/misskey/test.yml
vendored
@ -1,17 +0,0 @@
|
|||||||
url: 'http://misskey.local'
|
|
||||||
|
|
||||||
setupPassword: example_password_please_change_this_or_you_will_get_hacked
|
|
||||||
|
|
||||||
# ローカルでテストするときにポートを被らないようにするためデフォルトのものとは変える(以下同じ)
|
|
||||||
port: 61812
|
|
||||||
|
|
||||||
db:
|
|
||||||
host: 127.0.0.1
|
|
||||||
port: 54312
|
|
||||||
db: test-misskey
|
|
||||||
user: postgres
|
|
||||||
pass: ''
|
|
||||||
redis:
|
|
||||||
host: 127.0.0.1
|
|
||||||
port: 56312
|
|
||||||
id: aidx
|
|
24
.github/pull_request_template.md
vendored
@ -1,24 +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) Add story of storybook
|
|
||||||
- [ ] (If needed) Update CHANGELOG.md
|
|
||||||
- [ ] (If possible) Add tests
|
|
43
.github/workflows/api-misskey-js.yml
vendored
@ -1,43 +0,0 @@
|
|||||||
name: API report (misskey.js)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- .github/workflows/api-misskey-js.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- .github/workflows/api-misskey-js.yml
|
|
||||||
jobs:
|
|
||||||
report:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
|
|
||||||
- run: corepack enable
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm i --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter misskey-js build
|
|
||||||
|
|
||||||
- name: Check files
|
|
||||||
run: ls packages/misskey-js/built
|
|
||||||
|
|
||||||
- name: API report
|
|
||||||
run: pnpm --filter misskey-js api-prod
|
|
||||||
|
|
||||||
- name: Show report
|
|
||||||
if: always()
|
|
||||||
run: cat packages/misskey-js/temp/misskey-js.api.md
|
|
43
.github/workflows/changelog-check.yml
vendored
@ -1,43 +0,0 @@
|
|||||||
name: Check the description in CHANGELOG.md
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check-changelog:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout head
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
|
|
||||||
- name: Checkout base
|
|
||||||
run: |
|
|
||||||
mkdir _base
|
|
||||||
cp -r .git _base/.git
|
|
||||||
cd _base
|
|
||||||
git fetch --depth 1 origin ${{ github.base_ref }}
|
|
||||||
git checkout origin/${{ github.base_ref }} CHANGELOG.md
|
|
||||||
|
|
||||||
- name: Copy to Checker directory for CHANGELOG-base.md
|
|
||||||
run: cp _base/CHANGELOG.md scripts/changelog-checker/CHANGELOG-base.md
|
|
||||||
- name: Copy to Checker directory for CHANGELOG-head.md
|
|
||||||
run: cp CHANGELOG.md scripts/changelog-checker/CHANGELOG-head.md
|
|
||||||
- name: diff
|
|
||||||
continue-on-error: true
|
|
||||||
run: diff -u CHANGELOG-base.md CHANGELOG-head.md
|
|
||||||
working-directory: scripts/changelog-checker
|
|
||||||
|
|
||||||
- name: Setup Checker
|
|
||||||
run: npm install
|
|
||||||
working-directory: scripts/changelog-checker
|
|
||||||
- name: Run Checker
|
|
||||||
run: npm run run
|
|
||||||
working-directory: scripts/changelog-checker
|
|
139
.github/workflows/check-misskey-js-autogen.yml
vendored
@ -1,139 +0,0 @@
|
|||||||
name: Check Misskey JS autogen
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
- improve-misskey-js-autogen-check
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# pull_request_target safety: permissions: read-all, and there are no secrets used in this job
|
|
||||||
generate-misskey-js:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
if: ${{ github.event.pull_request.mergeable == null || github.event.pull_request.mergeable == true }}
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
persist-credentials: false
|
|
||||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
|
||||||
|
|
||||||
- name: setup pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
|
|
||||||
- name: setup node
|
|
||||||
id: setup-node
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: pnpm
|
|
||||||
|
|
||||||
- name: install dependencies
|
|
||||||
run: pnpm i --frozen-lockfile
|
|
||||||
|
|
||||||
# generate api.json
|
|
||||||
- name: Copy Config
|
|
||||||
run: cp .config/example.yml .config/default.yml
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Generate API JSON
|
|
||||||
run: pnpm --filter backend generate-api-json
|
|
||||||
|
|
||||||
# build misskey js
|
|
||||||
- name: Build misskey-js
|
|
||||||
run: |-
|
|
||||||
cp packages/backend/built/api.json packages/misskey-js/generator/api.json
|
|
||||||
pnpm run --filter misskey-js-type-generator generate
|
|
||||||
|
|
||||||
# packages/misskey-js/generator/built/autogen
|
|
||||||
- name: Upload Generated
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: generated-misskey-js
|
|
||||||
path: packages/misskey-js/generator/built/autogen
|
|
||||||
|
|
||||||
# pull_request_target safety: permissions: read-all, and no user codes are executed
|
|
||||||
get-actual-misskey-js:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
if: ${{ github.event.pull_request.mergeable == null || github.event.pull_request.mergeable == true }}
|
|
||||||
steps:
|
|
||||||
- name: checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
persist-credentials: false
|
|
||||||
ref: refs/pull/${{ github.event.pull_request.number }}/merge
|
|
||||||
|
|
||||||
- name: Upload From Merged
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: actual-misskey-js
|
|
||||||
path: packages/misskey-js/src/autogen
|
|
||||||
|
|
||||||
# pull_request_target safety: nothing is cloned from repository
|
|
||||||
comment-misskey-js-autogen:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [generate-misskey-js, get-actual-misskey-js]
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
steps:
|
|
||||||
- name: download generated-misskey-js
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: generated-misskey-js
|
|
||||||
path: misskey-js-generated
|
|
||||||
|
|
||||||
- name: download actual-misskey-js
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: actual-misskey-js
|
|
||||||
path: misskey-js-actual
|
|
||||||
|
|
||||||
- name: check misskey-js changes
|
|
||||||
id: check-changes
|
|
||||||
run: |
|
|
||||||
diff -r -u --label=generated --label=on-tree ./misskey-js-generated ./misskey-js-actual > misskey-js.diff || true
|
|
||||||
|
|
||||||
if [ -s misskey-js.diff ]; then
|
|
||||||
echo "changes=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "changes=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Print full diff
|
|
||||||
run: cat ./misskey-js.diff
|
|
||||||
|
|
||||||
- name: send message
|
|
||||||
if: steps.check-changes.outputs.changes == 'true'
|
|
||||||
uses: thollander/actions-comment-pull-request@v2
|
|
||||||
with:
|
|
||||||
comment_tag: check-misskey-js-autogen
|
|
||||||
message: |-
|
|
||||||
Thank you for sending us a great Pull Request! 👍
|
|
||||||
Please regenerate misskey-js type definitions! 🙏
|
|
||||||
|
|
||||||
example:
|
|
||||||
```sh
|
|
||||||
pnpm run build-misskey-js-with-types
|
|
||||||
```
|
|
||||||
|
|
||||||
- name: send message
|
|
||||||
if: steps.check-changes.outputs.changes == 'false'
|
|
||||||
uses: thollander/actions-comment-pull-request@v2
|
|
||||||
with:
|
|
||||||
comment_tag: check-misskey-js-autogen
|
|
||||||
mode: delete
|
|
||||||
message: "Thank you!"
|
|
||||||
create_if_not_exists: false
|
|
||||||
|
|
||||||
- name: Make failure if changes are detected
|
|
||||||
if: steps.check-changes.outputs.changes == 'true'
|
|
||||||
run: exit 1
|
|
29
.github/workflows/check-misskey-js-version.yml
vendored
@ -1,29 +0,0 @@
|
|||||||
name: Check Misskey JS version
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ develop ]
|
|
||||||
paths:
|
|
||||||
- packages/misskey-js/package.json
|
|
||||||
- package.json
|
|
||||||
- .github/workflows/check-misskey-js-version.yml
|
|
||||||
pull_request:
|
|
||||||
branches: [ develop ]
|
|
||||||
paths:
|
|
||||||
- packages/misskey-js/package.json
|
|
||||||
- package.json
|
|
||||||
- .github/workflows/check-misskey-js-version.yml
|
|
||||||
jobs:
|
|
||||||
check-version:
|
|
||||||
# ルートの package.json と packages/misskey-js/package.json のバージョンが一致しているかを確認する
|
|
||||||
name: Check version
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
- name: Check version
|
|
||||||
run: |
|
|
||||||
if [ "$(jq -r '.version' package.json)" != "$(jq -r '.version' packages/misskey-js/package.json)" ]; then
|
|
||||||
echo "Version mismatch!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
79
.github/workflows/check-spdx-license-id.yml
vendored
@ -1,79 +0,0 @@
|
|||||||
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/checkout@v4.1.1
|
|
||||||
- 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-shared/@types"
|
|
||||||
"packages/frontend-shared/js"
|
|
||||||
"packages/frontend/.storybook"
|
|
||||||
"packages/frontend/@types"
|
|
||||||
"packages/frontend/lib"
|
|
||||||
"packages/frontend/public"
|
|
||||||
"packages/frontend/src"
|
|
||||||
"packages/frontend/test"
|
|
||||||
"packages/frontend-embed/@types"
|
|
||||||
"packages/frontend-embed/src"
|
|
||||||
"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
|
|
18
.github/workflows/check_copyright_year.yml
vendored
@ -1,18 +0,0 @@
|
|||||||
name: Check copyright year
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check_copyright_year:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
- run: |
|
|
||||||
if [ "$(grep Copyright COPYING | sed -e 's/.*2014-\([0-9]*\) .*/\1/g')" -ne "$(date +%Y)" ]; then
|
|
||||||
echo "Please change copyright year!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
84
.github/workflows/deploy-test-environment.yml
vendored
@ -1,84 +0,0 @@
|
|||||||
name: deploy-test-environment
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created]
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
repository:
|
|
||||||
description: 'Repository to deploy (optional, use the repository where this workflow is stored by default)'
|
|
||||||
required: false
|
|
||||||
default: ''
|
|
||||||
branch_or_hash:
|
|
||||||
description: 'Branch or Commit hash to deploy (optional, use the branch where this workflow is stored by default)'
|
|
||||||
required: false
|
|
||||||
default: ''
|
|
||||||
wait_time:
|
|
||||||
description: 'Time to wait in seconds (optional, 1800 seconds by default)'
|
|
||||||
required: false
|
|
||||||
default: ''
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-pr-ref:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/preview')
|
|
||||||
outputs:
|
|
||||||
is-allowed-user: ${{ steps.check-allowed-users.outputs.is-allowed-user }}
|
|
||||||
pr-ref: ${{ steps.get-ref.outputs.pr-ref }}
|
|
||||||
wait_time: ${{ steps.get-wait-time.outputs.wait_time }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
|
|
||||||
- name: Check allowed users
|
|
||||||
id: check-allowed-users
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
ORG_ID: ${{ github.repository_owner_id }}
|
|
||||||
COMMENT_AUTHOR: ${{ github.event.comment.user.login }}
|
|
||||||
run: |
|
|
||||||
MEMBERSHIP_STATUS=$(curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
|
|
||||||
-H "Accept: application/vnd.github+json" \
|
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
||||||
"https://api.github.com/organizations/$ORG_ID/public_members/$COMMENT_AUTHOR" \
|
|
||||||
-o /dev/null -w '%{http_code}\n' -s)
|
|
||||||
if [ "$MEMBERSHIP_STATUS" -eq 204 ]; then
|
|
||||||
echo "is-allowed-user=true" > $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "is-allowed-user=false" > $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Get PR ref
|
|
||||||
id: get-ref
|
|
||||||
run: |
|
|
||||||
PR_REF="refs/pull/${{ github.event.issue.number }}/head"
|
|
||||||
echo "pr-ref=$PR_REF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Extract wait time
|
|
||||||
id: get-wait-time
|
|
||||||
env:
|
|
||||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
|
||||||
run: |
|
|
||||||
WAIT_TIME=$(echo "$COMMENT_BODY" | grep -oP '(?<=/preview\s)\d+' || echo "1800")
|
|
||||||
echo "wait_time=$WAIT_TIME" > $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
deploy-test-environment-pr-comment:
|
|
||||||
needs: get-pr-ref
|
|
||||||
if: needs.get-pr-ref.outputs.is-allowed-user == 'true'
|
|
||||||
uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
|
|
||||||
with:
|
|
||||||
repository: ${{ github.repository }}
|
|
||||||
branch_or_hash: ${{ needs.get-pr-ref.outputs.pr-ref }}
|
|
||||||
wait_time: ${{ needs.get-pr-ref.outputs.wait_time }}
|
|
||||||
secrets:
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
||||||
|
|
||||||
deploy-test-environment-wd:
|
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
uses: joinmisskey/misskey-tga/.github/workflows/deploy-test-environment.yml@main
|
|
||||||
with:
|
|
||||||
repository: ${{ inputs.repository || github.repository }}
|
|
||||||
branch_or_hash: ${{ inputs.branch_or_hash || github.ref_name }}
|
|
||||||
wait_time: ${{ inputs.wait_time || '1800' }}
|
|
||||||
secrets:
|
|
||||||
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
88
.github/workflows/docker-develop.yml
vendored
@ -1,88 +0,0 @@
|
|||||||
name: Publish Docker image (develop)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY_IMAGE: laoxong/misskey
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
- linux/arm64
|
|
||||||
if: github.repository == 'laoxong/misskey'
|
|
||||||
steps:
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
platform=${{ matrix.platform }}
|
|
||||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
|
||||||
- name: Check out the repo
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Log in to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Build and push by digest
|
|
||||||
id: build
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
platforms: ${{ matrix.platform }}
|
|
||||||
provenance: false
|
|
||||||
labels: develop
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
|
||||||
- name: Export digest
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/digests
|
|
||||||
digest="${{ steps.build.outputs.digest }}"
|
|
||||||
touch "/tmp/digests/${digest#sha256:}"
|
|
||||||
- name: Upload digest
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: digests-${{ env.PLATFORM_PAIR }}
|
|
||||||
path: /tmp/digests/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
steps:
|
|
||||||
- name: Download digests
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: /tmp/digests
|
|
||||||
pattern: digests-*
|
|
||||||
merge-multiple: true
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Create manifest list and push
|
|
||||||
working-directory: /tmp/digests
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools create --tag ${{ env.REGISTRY_IMAGE }}:develop \
|
|
||||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
|
||||||
- name: Inspect image
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:develop
|
|
105
.github/workflows/docker.yml
vendored
@ -1,105 +0,0 @@
|
|||||||
name: Publish Docker image
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
env:
|
|
||||||
REGISTRY_IMAGE: laoxong/misskey
|
|
||||||
TAGS: |
|
|
||||||
type=edge
|
|
||||||
type=ref,event=pr
|
|
||||||
type=ref,event=branch
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=semver,pattern={{major}}.{{minor}}
|
|
||||||
type=semver,pattern={{major}}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# see https://docs.docker.com/build/ci/github-actions/multi-platform/#distribute-build-across-multiple-runners
|
|
||||||
build:
|
|
||||||
name: Build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
platform:
|
|
||||||
- linux/amd64
|
|
||||||
# - linux/arm64
|
|
||||||
steps:
|
|
||||||
- name: Prepare
|
|
||||||
run: |
|
|
||||||
platform=${{ matrix.platform }}
|
|
||||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
|
||||||
- name: Check out the repo
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
tags: ${{ env.TAGS }}
|
|
||||||
- name: Log in to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Build and Push to Docker Hub
|
|
||||||
id: build
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
platforms: ${{ matrix.platform }}
|
|
||||||
provenance: false
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
|
||||||
- name: Export digest
|
|
||||||
run: |
|
|
||||||
mkdir -p /tmp/digests
|
|
||||||
digest="${{ steps.build.outputs.digest }}"
|
|
||||||
touch "/tmp/digests/${digest#sha256:}"
|
|
||||||
- name: Upload digest
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: digests-${{ env.PLATFORM_PAIR }}
|
|
||||||
path: /tmp/digests/*
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
merge:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- build
|
|
||||||
steps:
|
|
||||||
- name: Download digests
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: /tmp/digests
|
|
||||||
pattern: digests-*
|
|
||||||
merge-multiple: true
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
- name: Docker meta
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.REGISTRY_IMAGE }}
|
|
||||||
tags: ${{ env.TAGS }}
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
||||||
- name: Create manifest list and push
|
|
||||||
working-directory: /tmp/digests
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
||||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
|
||||||
- name: Inspect image
|
|
||||||
run: |
|
|
||||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
|
32
.github/workflows/dockle.yml
vendored
@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
name: Dockle
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
dockle:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
DOCKER_CONTENT_TRUST: 1
|
|
||||||
DOCKLE_VERSION: 0.4.14
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
- name: Download and install dockle v${{ env.DOCKLE_VERSION }}
|
|
||||||
run: |
|
|
||||||
curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v${DOCKLE_VERSION}/dockle_${DOCKLE_VERSION}_Linux-64bit.deb"
|
|
||||||
sudo dpkg -i dockle.deb
|
|
||||||
- run: |
|
|
||||||
cp .config/docker_example.env .config/docker.env
|
|
||||||
cp ./compose_example.yml ./compose.yml
|
|
||||||
- run: |
|
|
||||||
docker compose up -d web
|
|
||||||
docker tag "$(docker compose images web | awk 'OFS=":" {print $4}' | tail -n +2)" misskey-web:latest
|
|
||||||
- run: |
|
|
||||||
cmd="dockle --exit-code 1 misskey-web:latest ${image_name}"
|
|
||||||
echo "> ${cmd}"
|
|
||||||
eval "${cmd}"
|
|
69
.github/workflows/get-api-diff.yml
vendored
@ -1,69 +0,0 @@
|
|||||||
# this name is used in report-api-diff.yml so be careful when change name
|
|
||||||
name: Get api.json from Misskey
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
- .github/workflows/get-api-diff.yml
|
|
||||||
jobs:
|
|
||||||
get-from-misskey:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
api-json-name: [api-base.json, api-head.json]
|
|
||||||
include:
|
|
||||||
- api-json-name: api-base.json
|
|
||||||
ref: ${{ github.base_ref }}
|
|
||||||
- api-json-name: api-head.json
|
|
||||||
ref: refs/pull/${{ github.event.number }}/merge
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
ref: ${{ matrix.ref }}
|
|
||||||
submodules: true
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Copy Configure
|
|
||||||
run: cp .config/example.yml .config/default.yml
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Generate API JSON
|
|
||||||
run: pnpm --filter backend generate-api-json
|
|
||||||
- name: Copy API.json
|
|
||||||
run: cp packages/backend/built/api.json ${{ matrix.api-json-name }}
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: api-artifact-${{ matrix.api-json-name }}
|
|
||||||
path: ${{ matrix.api-json-name }}
|
|
||||||
|
|
||||||
save-pr-number:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Save PR number
|
|
||||||
env:
|
|
||||||
PR_NUMBER: ${{ github.event.number }}
|
|
||||||
run: |
|
|
||||||
echo "$PR_NUMBER" > ./pr_number
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: api-artifact-pr-number
|
|
||||||
path: pr_number
|
|
16
.github/workflows/labeler.yml
vendored
@ -1,16 +0,0 @@
|
|||||||
name: "Pull Request Labeler"
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
branches-ignore:
|
|
||||||
- 'l10n_develop'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
triage:
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: write
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/labeler@v5
|
|
||||||
with:
|
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
111
.github/workflows/lint.yml
vendored
@ -1,111 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
- packages/frontend/**
|
|
||||||
- packages/frontend-shared/**
|
|
||||||
- packages/frontend-embed/**
|
|
||||||
- packages/sw/**
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- packages/misskey-bubble-game/**
|
|
||||||
- packages/misskey-reversi/**
|
|
||||||
- packages/shared/eslint.config.js
|
|
||||||
- .github/workflows/lint.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
- packages/frontend/**
|
|
||||||
- packages/frontend-shared/**
|
|
||||||
- packages/frontend-embed/**
|
|
||||||
- packages/sw/**
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- packages/misskey-bubble-game/**
|
|
||||||
- packages/misskey-reversi/**
|
|
||||||
- packages/shared/eslint.config.js
|
|
||||||
- .github/workflows/lint.yml
|
|
||||||
jobs:
|
|
||||||
pnpm_install:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
|
|
||||||
lint:
|
|
||||||
needs: [pnpm_install]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
workspace:
|
|
||||||
- backend
|
|
||||||
- frontend
|
|
||||||
- frontend-shared
|
|
||||||
- frontend-embed
|
|
||||||
- sw
|
|
||||||
- misskey-js
|
|
||||||
- misskey-bubble-game
|
|
||||||
- misskey-reversi
|
|
||||||
env:
|
|
||||||
eslint-cache-version: v1
|
|
||||||
eslint-cache-path: ${{ github.workspace }}/node_modules/.cache/eslint-${{ matrix.workspace }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Restore eslint cache
|
|
||||||
uses: actions/cache@v4.1.0
|
|
||||||
with:
|
|
||||||
path: ${{ env.eslint-cache-path }}
|
|
||||||
key: eslint-${{ env.eslint-cache-version }}-${{ matrix.workspace }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.ref_name }}-${{ github.sha }}
|
|
||||||
restore-keys: eslint-${{ env.eslint-cache-version }}-${{ matrix.workspace }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
|
|
||||||
- run: pnpm --filter ${{ matrix.workspace }} run eslint --cache --cache-location ${{ env.eslint-cache-path }} --cache-strategy content
|
|
||||||
|
|
||||||
typecheck:
|
|
||||||
needs: [pnpm_install]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
workspace:
|
|
||||||
- backend
|
|
||||||
- sw
|
|
||||||
- misskey-js
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- run: pnpm --filter misskey-js run build
|
|
||||||
if: ${{ matrix.workspace == 'backend' || matrix.workspace == 'sw' }}
|
|
||||||
- run: pnpm --filter misskey-reversi run build
|
|
||||||
if: ${{ matrix.workspace == 'backend' }}
|
|
||||||
- run: pnpm --filter ${{ matrix.workspace }} run typecheck
|
|
28
.github/workflows/locale.yml
vendored
@ -1,28 +0,0 @@
|
|||||||
name: Lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- locales/**
|
|
||||||
- .github/workflows/locale.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- locales/**
|
|
||||||
- .github/workflows/locale.yml
|
|
||||||
jobs:
|
|
||||||
locale_verify:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
- uses: pnpm/action-setup@v4
|
|
||||||
- uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- run: cd locales && node verify.js
|
|
53
.github/workflows/nodejs.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
name: Node.js CI
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
node-version: [12.x, 14.x, 15.x]
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:10-alpine
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: test-misskey
|
||||||
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: ${{ matrix.node-version }}
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install
|
||||||
|
- name: Copy Configure
|
||||||
|
run: cp .circleci/misskey/*.yml .config
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
- name: Test
|
||||||
|
run: yarn test
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
- run: yarn install
|
||||||
|
- run: yarn lint
|
36
.github/workflows/ok-to-test.yml
vendored
@ -1,36 +0,0 @@
|
|||||||
# If someone with write access comments "/ok-to-test" on a pull request, emit a repository_dispatch event
|
|
||||||
name: Ok To Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
issue_comment:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ok-to-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
# Only run for PRs, not issue comments
|
|
||||||
if: ${{ github.event.issue.pull_request }}
|
|
||||||
steps:
|
|
||||||
# Generate a GitHub App installation access token from an App ID and private key
|
|
||||||
# To create a new GitHub App:
|
|
||||||
# https://developer.github.com/apps/building-github-apps/creating-a-github-app/
|
|
||||||
# See app.yml for an example app manifest
|
|
||||||
- name: Generate token
|
|
||||||
id: generate_token
|
|
||||||
uses: tibdex/github-app-token@v2
|
|
||||||
with:
|
|
||||||
app_id: ${{ secrets.DEPLOYBOT_APP_ID }}
|
|
||||||
private_key: ${{ secrets.DEPLOYBOT_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
- name: Slash Command Dispatch
|
|
||||||
uses: peter-evans/slash-command-dispatch@v4
|
|
||||||
env:
|
|
||||||
TOKEN: ${{ steps.generate_token.outputs.token }}
|
|
||||||
with:
|
|
||||||
token: ${{ env.TOKEN }} # GitHub App installation access token
|
|
||||||
# token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # PAT or OAuth token will also work
|
|
||||||
reaction-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
issue-type: pull-request
|
|
||||||
commands: deploy
|
|
||||||
named-args: true
|
|
||||||
permission: write
|
|
42
.github/workflows/on-release-created.yml
vendored
@ -1,42 +0,0 @@
|
|||||||
name: On Release Created (Publish misskey-js)
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [created]
|
|
||||||
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish-misskey-js:
|
|
||||||
name: Publish misskey-js
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
registry-url: 'https://registry.npmjs.org'
|
|
||||||
- name: Publish package
|
|
||||||
run: |
|
|
||||||
corepack enable
|
|
||||||
pnpm i --frozen-lockfile
|
|
||||||
pnpm build
|
|
||||||
pnpm --filter misskey-js publish --access public --no-git-checks --provenance
|
|
||||||
env:
|
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
|
||||||
NPM_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
|
|
92
.github/workflows/pr-preview-deploy.yml
vendored
@ -1,92 +0,0 @@
|
|||||||
# Run secret-dependent integration tests only after /deploy approval
|
|
||||||
on:
|
|
||||||
repository_dispatch:
|
|
||||||
types: [deploy-command]
|
|
||||||
|
|
||||||
name: Deploy preview environment
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Repo owner has commented /deploy on a (fork-based) pull request
|
|
||||||
deploy-preview-environment:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if:
|
|
||||||
github.event.client_payload.slash_command.sha != '' &&
|
|
||||||
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
|
|
||||||
steps:
|
|
||||||
- uses: actions/github-script@v7.0.1
|
|
||||||
id: check-id
|
|
||||||
env:
|
|
||||||
number: ${{ github.event.client_payload.pull_request.number }}
|
|
||||||
job: ${{ github.job }}
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
result-encoding: string
|
|
||||||
script: |
|
|
||||||
const { data: pull } = await github.rest.pulls.get({
|
|
||||||
...context.repo,
|
|
||||||
pull_number: process.env.number
|
|
||||||
});
|
|
||||||
const ref = pull.head.sha;
|
|
||||||
|
|
||||||
const { data: checks } = await github.rest.checks.listForRef({
|
|
||||||
...context.repo,
|
|
||||||
ref
|
|
||||||
});
|
|
||||||
|
|
||||||
const check = checks.check_runs.filter(c => c.name === process.env.job);
|
|
||||||
|
|
||||||
return check[0].id;
|
|
||||||
|
|
||||||
- uses: actions/github-script@v7.0.1
|
|
||||||
env:
|
|
||||||
check_id: ${{ steps.check-id.outputs.result }}
|
|
||||||
details_url: ${{ github.server_url }}/${{ github.repository }}/runs/${{ github.run_id }}
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
await github.rest.checks.update({
|
|
||||||
...context.repo,
|
|
||||||
check_run_id: process.env.check_id,
|
|
||||||
status: 'in_progress',
|
|
||||||
details_url: process.env.details_url
|
|
||||||
});
|
|
||||||
|
|
||||||
# Check out merge commit
|
|
||||||
- name: Fork based /deploy checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
|
|
||||||
|
|
||||||
# <insert integration tests needing secrets>
|
|
||||||
- name: Context
|
|
||||||
uses: okteto/context@latest
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.OKTETO_TOKEN }}
|
|
||||||
|
|
||||||
- name: Deploy preview environment
|
|
||||||
uses: ikuradon/deploy-preview@latest
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
name: pr-${{ github.event.client_payload.pull_request.number }}-syuilo
|
|
||||||
timeout: 15m
|
|
||||||
|
|
||||||
# Update check run called "integration-fork"
|
|
||||||
- uses: actions/github-script@v7.0.1
|
|
||||||
id: update-check-run
|
|
||||||
if: ${{ always() }}
|
|
||||||
env:
|
|
||||||
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
|
|
||||||
conclusion: ${{ job.status }}
|
|
||||||
check_id: ${{ steps.check-id.outputs.result }}
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
const { data: result } = await github.rest.checks.update({
|
|
||||||
...context.repo,
|
|
||||||
check_run_id: process.env.check_id,
|
|
||||||
status: 'completed',
|
|
||||||
conclusion: process.env.conclusion
|
|
||||||
});
|
|
||||||
|
|
||||||
return result;
|
|
54
.github/workflows/pr-preview-destroy.yml
vendored
@ -1,54 +0,0 @@
|
|||||||
# file: .github/workflows/preview-closed.yaml
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
|
|
||||||
name: Destroy preview environment
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
destroy-preview-environment:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/github-script@v7.0.1
|
|
||||||
id: check-conclusion
|
|
||||||
env:
|
|
||||||
number: ${{ github.event.number }}
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
result-encoding: string
|
|
||||||
script: |
|
|
||||||
const { data: pull } = await github.rest.pulls.get({
|
|
||||||
...context.repo,
|
|
||||||
pull_number: process.env.number
|
|
||||||
});
|
|
||||||
const ref = pull.head.sha;
|
|
||||||
|
|
||||||
const { data: checks } = await github.rest.checks.listForRef({
|
|
||||||
...context.repo,
|
|
||||||
ref
|
|
||||||
});
|
|
||||||
|
|
||||||
const check = checks.check_runs.filter(c => c.name === 'deploy-preview-environment');
|
|
||||||
|
|
||||||
if (check.length === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { data: result } = await github.rest.checks.get({
|
|
||||||
...context.repo,
|
|
||||||
check_run_id: check[0].id,
|
|
||||||
});
|
|
||||||
|
|
||||||
return result.conclusion;
|
|
||||||
- name: Context
|
|
||||||
if: steps.check-conclusion.outputs.result == 'success'
|
|
||||||
uses: okteto/context@latest
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.OKTETO_TOKEN }}
|
|
||||||
|
|
||||||
- name: Destroy preview environment
|
|
||||||
if: steps.check-conclusion.outputs.result == 'success'
|
|
||||||
uses: okteto/destroy-preview@latest
|
|
||||||
with:
|
|
||||||
name: pr-${{ github.event.number }}-syuilo
|
|
48
.github/workflows/release-edit-with-push.yml
vendored
@ -1,48 +0,0 @@
|
|||||||
name: "Release Manager: sync changelog with PR"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- 'CHANGELOG.md'
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
edit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
# headが$GITHUB_REF_NAME, baseが$STABLE_BRANCHかつopenのPRを1つ取得
|
|
||||||
- name: Get PR
|
|
||||||
run: |
|
|
||||||
echo "pr_number=$(gh pr list --limit 1 --search "head:$GITHUB_REF_NAME base:$STABLE_BRANCH is:open" --json number --jq '.[] | .number')" >> $GITHUB_OUTPUT
|
|
||||||
id: get_pr
|
|
||||||
env:
|
|
||||||
STABLE_BRANCH: ${{ vars.STABLE_BRANCH }}
|
|
||||||
- name: Get target version
|
|
||||||
if: steps.get_pr.outputs.pr_number != ''
|
|
||||||
uses: misskey-dev/release-manager-actions/.github/actions/get-target-version@v2
|
|
||||||
id: v
|
|
||||||
# CHANGELOG.mdの内容を取得
|
|
||||||
- name: Get changelog
|
|
||||||
if: steps.get_pr.outputs.pr_number != ''
|
|
||||||
uses: misskey-dev/release-manager-actions/.github/actions/get-changelog@v2
|
|
||||||
with:
|
|
||||||
version: ${{ steps.v.outputs.target_version }}
|
|
||||||
id: changelog
|
|
||||||
# PRのnotesを更新
|
|
||||||
- name: Update PR
|
|
||||||
if: steps.get_pr.outputs.pr_number != ''
|
|
||||||
run: |
|
|
||||||
gh pr edit "$PR_NUMBER" --body "$CHANGELOG"
|
|
||||||
env:
|
|
||||||
PR_NUMBER: ${{ steps.get_pr.outputs.pr_number }}
|
|
||||||
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
|
|
135
.github/workflows/release-with-dispatch.yml
vendored
@ -1,135 +0,0 @@
|
|||||||
name: "Release Manager [Dispatch]"
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
## Specify the type of the next release.
|
|
||||||
#version_increment_type:
|
|
||||||
# type: choice
|
|
||||||
# description: 'VERSION INCREMENT TYPE'
|
|
||||||
# default: 'patch'
|
|
||||||
# required: false
|
|
||||||
# options:
|
|
||||||
# - 'major'
|
|
||||||
# - 'minor'
|
|
||||||
# - 'patch'
|
|
||||||
merge:
|
|
||||||
type: boolean
|
|
||||||
description: 'MERGE RELEASE BRANCH TO MAIN'
|
|
||||||
default: false
|
|
||||||
start-rc:
|
|
||||||
type: boolean
|
|
||||||
description: 'Start Release Candidate'
|
|
||||||
default: false
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
get-pr:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
pr_number: ${{ steps.get_pr.outputs.pr_number }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
# headが$GITHUB_REF_NAME, baseが$STABLE_BRANCHかつopenのPRを1つ取得
|
|
||||||
- name: Get PRs
|
|
||||||
run: |
|
|
||||||
echo "pr_number=$(gh pr list --limit 1 --search "head:$GITHUB_REF_NAME base:$STABLE_BRANCH is:open" --json number --jq '.[] | .number')" >> $GITHUB_OUTPUT
|
|
||||||
id: get_pr
|
|
||||||
env:
|
|
||||||
STABLE_BRANCH: ${{ vars.STABLE_BRANCH }}
|
|
||||||
|
|
||||||
merge:
|
|
||||||
uses: misskey-dev/release-manager-actions/.github/workflows/merge.yml@v2
|
|
||||||
needs: get-pr
|
|
||||||
if: ${{ needs.get-pr.outputs.pr_number != '' && inputs.merge == true }}
|
|
||||||
with:
|
|
||||||
pr_number: ${{ needs.get-pr.outputs.pr_number }}
|
|
||||||
user: 'github-actions[bot]'
|
|
||||||
package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }}
|
|
||||||
# Text to prepend to the changelog
|
|
||||||
# The first line must be `## Unreleased`
|
|
||||||
changes_template: |
|
|
||||||
## Unreleased
|
|
||||||
|
|
||||||
### General
|
|
||||||
-
|
|
||||||
|
|
||||||
### Client
|
|
||||||
-
|
|
||||||
|
|
||||||
### Server
|
|
||||||
-
|
|
||||||
|
|
||||||
use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }}
|
|
||||||
indent: ${{ vars.INDENT }}
|
|
||||||
secrets:
|
|
||||||
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
|
|
||||||
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
create-prerelease:
|
|
||||||
uses: misskey-dev/release-manager-actions/.github/workflows/create-prerelease.yml@v2
|
|
||||||
needs: get-pr
|
|
||||||
if: ${{ needs.get-pr.outputs.pr_number != '' && inputs.merge != true }}
|
|
||||||
with:
|
|
||||||
pr_number: ${{ needs.get-pr.outputs.pr_number }}
|
|
||||||
user: 'github-actions[bot]'
|
|
||||||
package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }}
|
|
||||||
use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }}
|
|
||||||
indent: ${{ vars.INDENT }}
|
|
||||||
draft_prerelease_channel: alpha
|
|
||||||
ready_start_prerelease_channel: beta
|
|
||||||
prerelease_channel: ${{ inputs.start-rc && 'rc' || '' }}
|
|
||||||
secrets:
|
|
||||||
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
|
|
||||||
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
||||||
|
|
||||||
create-target:
|
|
||||||
uses: misskey-dev/release-manager-actions/.github/workflows/create-target.yml@v2
|
|
||||||
needs: get-pr
|
|
||||||
if: ${{ needs.get-pr.outputs.pr_number == '' }}
|
|
||||||
with:
|
|
||||||
user: 'github-actions[bot]'
|
|
||||||
# The script for version increment.
|
|
||||||
# process.env.CURRENT_VERSION: The current version.
|
|
||||||
#
|
|
||||||
# Misskey calender versioning (yyyy.MM.patch) example
|
|
||||||
version_increment_script: |
|
|
||||||
const now = new Date();
|
|
||||||
const year = now.toLocaleDateString('en-US', { year: 'numeric', timeZone: 'Asia/Tokyo' });
|
|
||||||
const month = now.toLocaleDateString('en-US', { month: 'numeric', timeZone: 'Asia/Tokyo' });
|
|
||||||
const [major, minor, _patch] = process.env.CURRENT_VERSION.split('.');
|
|
||||||
const patch = Number(_patch.split('-')[0]);
|
|
||||||
if (Number.isNaN(patch)) {
|
|
||||||
console.error('Invalid patch version', year, month, process.env.CURRENT_VERSION, major, minor, _patch);
|
|
||||||
throw new Error('Invalid patch version');
|
|
||||||
}
|
|
||||||
if (year !== major || month !== minor) {
|
|
||||||
return `${year}.${month}.0`;
|
|
||||||
} else {
|
|
||||||
return `${major}.${minor}.${patch + 1}`;
|
|
||||||
}
|
|
||||||
##Semver example
|
|
||||||
#version_increment_script: |
|
|
||||||
# const [major, minor, patch] = process.env.CURRENT_VERSION.split('.');
|
|
||||||
# if ("${{ inputs.version_increment_type }}" === "major") {
|
|
||||||
# return `${Number(major) + 1}.0.0`;
|
|
||||||
# } else if ("${{ inputs.version_increment_type }}" === "minor") {
|
|
||||||
# return `${major}.${Number(minor) + 1}.0`;
|
|
||||||
# } else {
|
|
||||||
# return `${major}.${minor}.${Number(patch) + 1}`;
|
|
||||||
# }
|
|
||||||
package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }}
|
|
||||||
use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }}
|
|
||||||
indent: ${{ vars.INDENT }}
|
|
||||||
stable_branch: ${{ vars.STABLE_BRANCH }}
|
|
||||||
draft_prerelease_channel: alpha
|
|
||||||
secrets:
|
|
||||||
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
|
|
||||||
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
46
.github/workflows/release-with-ready.yml
vendored
@ -1,46 +0,0 @@
|
|||||||
name: "Release Manager: release RC when ready for review"
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [ready_for_review]
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
head: ${{ steps.get_pr.outputs.head }}
|
|
||||||
base: ${{ steps.get_pr.outputs.base }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
# PR情報を取得
|
|
||||||
- name: Get PR
|
|
||||||
run: |
|
|
||||||
pr_json=$(gh pr view "$PR_NUMBER" --json isDraft,headRefName,baseRefName)
|
|
||||||
echo "head=$(echo $pr_json | jq -r '.headRefName')" >> $GITHUB_OUTPUT
|
|
||||||
echo "base=$(echo $pr_json | jq -r '.baseRefName')" >> $GITHUB_OUTPUT
|
|
||||||
id: get_pr
|
|
||||||
env:
|
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
release:
|
|
||||||
uses: misskey-dev/release-manager-actions/.github/workflows/create-prerelease.yml@v2
|
|
||||||
needs: check
|
|
||||||
if: needs.check.outputs.head == github.event.repository.default_branch && needs.check.outputs.base == vars.STABLE_BRANCH
|
|
||||||
with:
|
|
||||||
pr_number: ${{ github.event.pull_request.number }}
|
|
||||||
user: 'github-actions[bot]'
|
|
||||||
package_jsons_to_rewrite: ${{ vars.PACKAGE_JSONS_TO_REWRITE }}
|
|
||||||
use_external_app_to_release: ${{ vars.USE_RELEASE_APP == 'true' }}
|
|
||||||
indent: ${{ vars.INDENT }}
|
|
||||||
draft_prerelease_channel: alpha
|
|
||||||
ready_start_prerelease_channel: beta
|
|
||||||
secrets:
|
|
||||||
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
|
|
||||||
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
|
|
104
.github/workflows/report-api-diff.yml
vendored
@ -1,104 +0,0 @@
|
|||||||
name: Report API Diff
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_run:
|
|
||||||
types: [completed]
|
|
||||||
workflows:
|
|
||||||
- Get api.json from Misskey # get-api-diff.yml
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
compare-diff:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
# api-artifact
|
|
||||||
steps:
|
|
||||||
- name: Download artifact
|
|
||||||
uses: actions/github-script@v7.0.1
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
run_id: context.payload.workflow_run.id,
|
|
||||||
});
|
|
||||||
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
|
|
||||||
return artifact.name.startsWith("api-artifact-") || artifact.name == "api-artifact"
|
|
||||||
});
|
|
||||||
await Promise.all(matchArtifacts.map(async (artifact) => {
|
|
||||||
let download = await github.rest.actions.downloadArtifact({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
artifact_id: artifact.id,
|
|
||||||
archive_format: 'zip',
|
|
||||||
});
|
|
||||||
await fs.promises.writeFile(`${process.env.GITHUB_WORKSPACE}/${artifact.name}.zip`, Buffer.from(download.data));
|
|
||||||
}));
|
|
||||||
- name: Extract all artifacts
|
|
||||||
run: |
|
|
||||||
find . -mindepth 1 -maxdepth 1 -type f -name '*.zip' -exec unzip {} -d artifacts ';'
|
|
||||||
ls -la
|
|
||||||
- name: Load PR Number
|
|
||||||
id: load-pr-num
|
|
||||||
run: echo "pr-number=$(cat artifacts/pr_number)" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Output base
|
|
||||||
run: cat ./artifacts/api-base.json
|
|
||||||
- name: Output head
|
|
||||||
run: cat ./artifacts/api-head.json
|
|
||||||
- name: Arrange json files
|
|
||||||
run: |
|
|
||||||
jq '.' ./artifacts/api-base.json > ./api-base.json
|
|
||||||
jq '.' ./artifacts/api-head.json > ./api-head.json
|
|
||||||
- name: Get diff of 2 files
|
|
||||||
run: diff -u --label=base --label=head ./api-base.json ./api-head.json | cat > api.json.diff
|
|
||||||
- name: Get full diff
|
|
||||||
run: diff --label=base --label=head --new-line-format='+%L' --old-line-format='-%L' --unchanged-line-format=' %L' ./api-base.json ./api-head.json | cat > api-full.json.diff
|
|
||||||
- name: Echo full diff
|
|
||||||
run: cat ./api-full.json.diff
|
|
||||||
- name: Upload full diff to Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: api-artifact
|
|
||||||
path: |
|
|
||||||
api-full.json.diff
|
|
||||||
api-base.json
|
|
||||||
api-head.json
|
|
||||||
- id: out-diff
|
|
||||||
name: Build diff Comment
|
|
||||||
run: |
|
|
||||||
HEADER="このPRによるapi.jsonの差分"
|
|
||||||
FOOTER="[Get diff files from Workflow Page](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})"
|
|
||||||
DIFF_BYTES="$(stat ./api.json.diff -c '%s' | tr -d '\n')"
|
|
||||||
|
|
||||||
echo "$HEADER" > ./output.md
|
|
||||||
|
|
||||||
if (( "$DIFF_BYTES" <= 1 )); then
|
|
||||||
echo '差分はありません。' >> ./output.md
|
|
||||||
else
|
|
||||||
echo '<details>' >> ./output.md
|
|
||||||
echo '<summary>差分はこちら</summary>' >> ./output.md
|
|
||||||
echo >> ./output.md
|
|
||||||
echo '```diff' >> ./output.md
|
|
||||||
cat ./api.json.diff >> ./output.md
|
|
||||||
echo '```' >> ./output.md
|
|
||||||
echo '</details>' >> .output.md
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$FOOTER" >> ./output.md
|
|
||||||
- uses: thollander/actions-comment-pull-request@v2
|
|
||||||
with:
|
|
||||||
pr_number: ${{ steps.load-pr-num.outputs.pr-number }}
|
|
||||||
comment_tag: show_diff
|
|
||||||
filePath: ./output.md
|
|
||||||
- name: Tell error to PR
|
|
||||||
uses: thollander/actions-comment-pull-request@v2
|
|
||||||
if: failure() && steps.load-pr-num.outputs.pr-number
|
|
||||||
with:
|
|
||||||
pr_number: ${{ steps.load-pr-num.outputs.pr-number }}
|
|
||||||
comment_tag: show_diff_error
|
|
||||||
message: |
|
|
||||||
api.jsonの差分作成中にエラーが発生しました。詳細は[Workflowのログ](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})を確認してください。
|
|
116
.github/workflows/storybook.yml
vendored
@ -1,116 +0,0 @@
|
|||||||
name: Storybook
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
- dev/storybook8 # for testing
|
|
||||||
pull_request_target:
|
|
||||||
branches-ignore:
|
|
||||||
# Since pull requests targets master mostly is the "develop" branch.
|
|
||||||
# Storybook CI is checked on the "push" event of "develop" branch so it would cause a duplicate build.
|
|
||||||
# This is a waste of chromatic build quota, so we don't run storybook CI on pull requests targets master.
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
env:
|
|
||||||
NODE_OPTIONS: "--max_old_space_size=7168"
|
|
||||||
if: github.repository == 'misskey-dev/misskey'
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
if: github.event_name != 'pull_request_target'
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
if: github.event_name == 'pull_request_target'
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
- name: Checkout actual HEAD
|
|
||||||
if: github.event_name == 'pull_request_target'
|
|
||||||
id: rev
|
|
||||||
run: |
|
|
||||||
echo "base=$(git rev-list --parents -n1 HEAD | cut -d" " -f2)" >> $GITHUB_OUTPUT
|
|
||||||
git checkout $(git rev-list --parents -n1 HEAD | cut -d" " -f3)
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js 20.x
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Build misskey-js
|
|
||||||
run: pnpm --filter misskey-js build
|
|
||||||
- name: Build storybook
|
|
||||||
run: pnpm --filter frontend build-storybook
|
|
||||||
- name: Publish to Chromatic
|
|
||||||
if: github.event_name != 'pull_request_target' && github.ref == 'refs/heads/master'
|
|
||||||
run: pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static
|
|
||||||
env:
|
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
||||||
- name: Publish to Chromatic
|
|
||||||
if: github.event_name != 'pull_request_target' && github.ref != 'refs/heads/master'
|
|
||||||
id: chromatic_push
|
|
||||||
run: |
|
|
||||||
DIFF="${{ github.event.before }} HEAD"
|
|
||||||
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
|
|
||||||
DIFF="HEAD"
|
|
||||||
fi
|
|
||||||
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))"
|
|
||||||
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
|
|
||||||
echo "skip=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
if pnpm --filter frontend chromatic -d storybook-static $(echo "$CHROMATIC_PARAMETER"); then
|
|
||||||
echo "success=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "success=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
||||||
- name: Publish to Chromatic
|
|
||||||
if: github.event_name == 'pull_request_target'
|
|
||||||
id: chromatic_pull_request
|
|
||||||
run: |
|
|
||||||
DIFF="${{ steps.rev.outputs.base }} HEAD"
|
|
||||||
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
|
|
||||||
DIFF="HEAD"
|
|
||||||
fi
|
|
||||||
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))"
|
|
||||||
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
|
|
||||||
echo "skip=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
BRANCH="${{ github.event.pull_request.head.user.login }}:$HEAD_REF"
|
|
||||||
if [ "$BRANCH" = "misskey-dev:$HEAD_REF" ]; then
|
|
||||||
BRANCH="$HEAD_REF"
|
|
||||||
fi
|
|
||||||
pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static --branch-name "$BRANCH" $(echo "$CHROMATIC_PARAMETER")
|
|
||||||
env:
|
|
||||||
HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
||||||
- name: Notify that Chromatic detects changes
|
|
||||||
uses: actions/github-script@v7.0.1
|
|
||||||
if: github.event_name != 'pull_request_target' && steps.chromatic_push.outputs.success == 'false'
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
github.rest.repos.createCommitComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
commit_sha: context.sha,
|
|
||||||
body: 'Chromatic detects changes. Please [review the changes on Chromatic](https://www.chromatic.com/builds?appId=6428f7d7b962f0b79f97d6e4).'
|
|
||||||
})
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: storybook
|
|
||||||
path: packages/frontend/storybook-static
|
|
114
.github/workflows/test-backend.yml
vendored
@ -1,114 +0,0 @@
|
|||||||
name: Test (backend)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
# for permissions
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- .github/workflows/test-backend.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
# for permissions
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- .github/workflows/test-backend.yml
|
|
||||||
jobs:
|
|
||||||
unit:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:15
|
|
||||||
ports:
|
|
||||||
- 54312:5432
|
|
||||||
env:
|
|
||||||
POSTGRES_DB: test-misskey
|
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
||||||
redis:
|
|
||||||
image: redis:7
|
|
||||||
ports:
|
|
||||||
- 56312:6379
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Install FFmpeg
|
|
||||||
uses: FedericoCarboni/setup-ffmpeg@v3
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Copy Configure
|
|
||||||
run: cp .github/misskey/test.yml .config
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter backend test-and-coverage
|
|
||||||
- name: Upload to Codecov
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
files: ./packages/backend/coverage/coverage-final.json
|
|
||||||
|
|
||||||
e2e:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:15
|
|
||||||
ports:
|
|
||||||
- 54312:5432
|
|
||||||
env:
|
|
||||||
POSTGRES_DB: test-misskey
|
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
||||||
redis:
|
|
||||||
image: redis:7
|
|
||||||
ports:
|
|
||||||
- 56312:6379
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Copy Configure
|
|
||||||
run: cp .github/misskey/test.yml .config
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter backend test-and-coverage:e2e
|
|
||||||
- name: Upload to Codecov
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
files: ./packages/backend/coverage/coverage-final.json
|
|
128
.github/workflows/test-frontend.yml
vendored
@ -1,128 +0,0 @@
|
|||||||
name: Test (frontend)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- packages/frontend/**
|
|
||||||
# for permissions
|
|
||||||
- packages/misskey-js/**
|
|
||||||
# for e2e
|
|
||||||
- packages/backend/**
|
|
||||||
- .github/workflows/test-frontend.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/frontend/**
|
|
||||||
# for permissions
|
|
||||||
- packages/misskey-js/**
|
|
||||||
# for e2e
|
|
||||||
- packages/backend/**
|
|
||||||
- .github/workflows/test-frontend.yml
|
|
||||||
jobs:
|
|
||||||
vitest:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Copy Configure
|
|
||||||
run: cp .github/misskey/test.yml .config
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter frontend test-and-coverage
|
|
||||||
- name: Upload Coverage
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
files: ./packages/frontend/coverage/coverage-final.json
|
|
||||||
|
|
||||||
e2e:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
browser: [chrome]
|
|
||||||
|
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:15
|
|
||||||
ports:
|
|
||||||
- 54312:5432
|
|
||||||
env:
|
|
||||||
POSTGRES_DB: test-misskey
|
|
||||||
POSTGRES_HOST_AUTH_METHOD: trust
|
|
||||||
redis:
|
|
||||||
image: redis:7
|
|
||||||
ports:
|
|
||||||
- 56312:6379
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
# https://github.com/cypress-io/cypress-docker-images/issues/150
|
|
||||||
#- name: Install mplayer for FireFox
|
|
||||||
# run: sudo apt install mplayer -y
|
|
||||||
# if: ${{ matrix.browser == 'firefox' }}
|
|
||||||
#- uses: browser-actions/setup-firefox@latest
|
|
||||||
# if: ${{ matrix.browser == 'firefox' }}
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Copy Configure
|
|
||||||
run: cp .github/misskey/test.yml .config
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
||||||
# https://github.com/cypress-io/cypress/issues/4351#issuecomment-559489091
|
|
||||||
- name: ALSA Env
|
|
||||||
run: echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc
|
|
||||||
# XXX: This tries reinstalling Cypress if the binary is not cached
|
|
||||||
# Remove this when the cache issue is fixed
|
|
||||||
- name: Cypress install
|
|
||||||
run: pnpm exec cypress install
|
|
||||||
- name: Cypress run
|
|
||||||
uses: cypress-io/github-action@v6
|
|
||||||
timeout-minutes: 15
|
|
||||||
with:
|
|
||||||
install: false
|
|
||||||
start: pnpm start:test
|
|
||||||
wait-on: 'http://localhost:61812'
|
|
||||||
headed: true
|
|
||||||
browser: ${{ matrix.browser }}
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.browser }}-cypress-screenshots
|
|
||||||
path: cypress/screenshots
|
|
||||||
- uses: actions/upload-artifact@v4
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.browser }}-cypress-videos
|
|
||||||
path: cypress/videos
|
|
57
.github/workflows/test-misskey-js.yml
vendored
@ -1,57 +0,0 @@
|
|||||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
||||||
|
|
||||||
name: Test (misskey.js)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ develop ]
|
|
||||||
paths:
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- .github/workflows/test-misskey-js.yml
|
|
||||||
pull_request:
|
|
||||||
branches: [ develop ]
|
|
||||||
paths:
|
|
||||||
- packages/misskey-js/**
|
|
||||||
- .github/workflows/test-misskey-js.yml
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4.1.1
|
|
||||||
|
|
||||||
- run: corepack enable
|
|
||||||
|
|
||||||
- name: Setup Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: pnpm i --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: pnpm --filter misskey-js build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: pnpm --filter misskey-js test
|
|
||||||
env:
|
|
||||||
CI: true
|
|
||||||
|
|
||||||
- name: Upload Coverage
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
files: ./packages/misskey-js/coverage/coverage-final.json
|
|
39
.github/workflows/test-production.yml
vendored
@ -1,39 +0,0 @@
|
|||||||
name: Test (production install and build)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
NODE_ENV: production
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
production:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Copy Configure
|
|
||||||
run: cp .github/misskey/test.yml .config/default.yml
|
|
||||||
- name: Build
|
|
||||||
run: pnpm build
|
|
45
.github/workflows/validate-api-json.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: Test (backend)
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
- .github/workflows/validate-api-json.yml
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- packages/backend/**
|
|
||||||
- .github/workflows/validate-api-json.yml
|
|
||||||
jobs:
|
|
||||||
validate-api-json:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [20.16.0]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4.1.1
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4.0.4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'pnpm'
|
|
||||||
- name: Install Redocly CLI
|
|
||||||
run: npm i -g @redocly/cli
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Copy Configure
|
|
||||||
run: cp .config/example.yml .config/default.yml
|
|
||||||
- name: Build and generate
|
|
||||||
run: pnpm build && pnpm --filter backend generate-api-json
|
|
||||||
- name: Validation
|
|
||||||
run: npx @redocly/cli lint --extends=minimal ./packages/backend/built/api.json
|
|
48
.gitignore
vendored
@ -6,50 +6,21 @@
|
|||||||
/.idea
|
/.idea
|
||||||
|
|
||||||
# Node.js
|
# Node.js
|
||||||
node_modules
|
/node_modules
|
||||||
report.*.json
|
report.*.json
|
||||||
|
|
||||||
# Yarn
|
|
||||||
.yarn/*
|
|
||||||
!.yarn/patches
|
|
||||||
!.yarn/plugins
|
|
||||||
!.yarn/releases
|
|
||||||
!.yarn/sdks
|
|
||||||
!.yarn/versions
|
|
||||||
packages/frontend/.yarn/cache
|
|
||||||
packages/backend/.yarn/cache
|
|
||||||
packages/sw/.yarn/cache
|
|
||||||
|
|
||||||
# pnpm
|
|
||||||
.pnpm-store
|
|
||||||
|
|
||||||
# Cypress
|
|
||||||
cypress/screenshots
|
|
||||||
cypress/videos
|
|
||||||
|
|
||||||
# Coverage
|
|
||||||
coverage
|
|
||||||
|
|
||||||
# config
|
# config
|
||||||
/.config/*
|
/.config/*
|
||||||
!/.config/example.yml
|
!/.config/example.yml
|
||||||
!/.config/docker_example.yml
|
|
||||||
!/.config/docker_example.env
|
!/.config/docker_example.env
|
||||||
!/.config/cypress-devcontainer.yml
|
|
||||||
docker-compose.yml
|
|
||||||
compose.yml
|
|
||||||
.devcontainer/compose.yml
|
|
||||||
!/.devcontainer/compose.yml
|
|
||||||
|
|
||||||
# misskey
|
# misskey
|
||||||
/build
|
/build
|
||||||
built
|
/built
|
||||||
built-test
|
|
||||||
js-built
|
|
||||||
/data
|
/data
|
||||||
/.cache-loader
|
/.cache-loader
|
||||||
/db
|
/db
|
||||||
/meili_data
|
/elasticsearch
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
*.pem
|
*.pem
|
||||||
run.bat
|
run.bat
|
||||||
@ -60,14 +31,6 @@ api-docs.json
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
/files
|
/files
|
||||||
ormconfig.json
|
ormconfig.json
|
||||||
temp
|
|
||||||
/packages/frontend/src/**/*.stories.ts
|
|
||||||
tsdoc-metadata.json
|
|
||||||
misskey-assets
|
|
||||||
|
|
||||||
# Vite temporary files
|
|
||||||
vite.config.js.timestamp-*
|
|
||||||
vite.config.ts.timestamp-*
|
|
||||||
|
|
||||||
# blender backups
|
# blender backups
|
||||||
*.blend1
|
*.blend1
|
||||||
@ -75,8 +38,3 @@ vite.config.ts.timestamp-*
|
|||||||
*.blend3
|
*.blend3
|
||||||
*.blend4
|
*.blend4
|
||||||
*.blend5
|
*.blend5
|
||||||
|
|
||||||
# VSCode addon
|
|
||||||
.favorites.json
|
|
||||||
|
|
||||||
/dump.rdb
|
|
||||||
|
3
.gitmodules
vendored
@ -1,3 +0,0 @@
|
|||||||
[submodule "fluent-emojis"]
|
|
||||||
path = fluent-emojis
|
|
||||||
url = https://github.com/misskey-dev/emojis.git
|
|
5
.imgbotconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"ignoredFiles": [
|
||||||
|
"test/resources/*"
|
||||||
|
]
|
||||||
|
}
|
7
.mocharc.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"extension": ["ts","js","cjs","mjs"],
|
||||||
|
"require": "ts-node/register",
|
||||||
|
"slow": 1000,
|
||||||
|
"timeout": 30000,
|
||||||
|
"exit": true
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
20.16.0
|
v14.15.1
|
||||||
|
@ -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
|
|
11
.vscode/extensions.json
vendored
@ -1,9 +1,12 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
|
"ducksoupdev.vue2",
|
||||||
"editorconfig.editorconfig",
|
"editorconfig.editorconfig",
|
||||||
"dbaeumer.vscode-eslint",
|
"eg2.vscode-npm-script",
|
||||||
"Vue.volar",
|
"hollowtree.vue-snippets",
|
||||||
"Orta.vscode-jest",
|
"ms-vscode.typescript-javascript-grammar",
|
||||||
"mrmlnc.vscode-json5"
|
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||||
|
"octref.vetur",
|
||||||
|
"sysoev.language-stylus"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
15
.vscode/settings.json
vendored
@ -1,15 +0,0 @@
|
|||||||
{
|
|
||||||
"search.exclude": {
|
|
||||||
"**/node_modules": true
|
|
||||||
},
|
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
|
||||||
"files.associations": {
|
|
||||||
"*.test.ts": "typescript"
|
|
||||||
},
|
|
||||||
"jest.jestCommandLine": "pnpm run jest",
|
|
||||||
"jest.runMode": "on-demand",
|
|
||||||
"editor.codeActionsOnSave": {
|
|
||||||
"source.fixAll": "explicit"
|
|
||||||
},
|
|
||||||
"editor.formatOnSave": false
|
|
||||||
}
|
|
2723
CHANGELOG.md
@ -2,131 +2,45 @@
|
|||||||
|
|
||||||
## Our Pledge
|
## Our Pledge
|
||||||
|
|
||||||
We as members, contributors, and leaders pledge to make participation in our
|
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||||
community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
||||||
identity and expression, level of experience, education, socio-economic status,
|
|
||||||
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
||||||
identity and orientation.
|
|
||||||
|
|
||||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
||||||
diverse, inclusive, and healthy community.
|
|
||||||
|
|
||||||
## Our Standards
|
## Our Standards
|
||||||
|
|
||||||
Examples of behavior that contributes to a positive environment for our
|
Examples of behavior that contributes to creating a positive environment include:
|
||||||
community include:
|
|
||||||
|
|
||||||
* Demonstrating empathy and kindness toward other people
|
* Using welcoming and inclusive language
|
||||||
* Being respectful of differing opinions, viewpoints, and experiences
|
* Being respectful of differing viewpoints and experiences
|
||||||
* Giving and gracefully accepting constructive feedback
|
* Gracefully accepting constructive criticism
|
||||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
* Focusing on what is best for the community
|
||||||
and learning from the experience
|
* Showing empathy towards other community members
|
||||||
* Focusing on what is best not just for us as individuals, but for the overall
|
|
||||||
community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
Examples of unacceptable behavior by participants include:
|
||||||
|
|
||||||
* The use of sexualized language or imagery, and sexual attention or advances of
|
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||||
any kind
|
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
* Public or private harassment
|
||||||
* Publishing others' private information, such as a physical or email address,
|
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||||
without their explicit permission
|
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
## Our Responsibilities
|
||||||
|
|
||||||
Community leaders are responsible for clarifying and enforcing our standards of
|
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||||
acceptable behavior and will take appropriate and fair corrective action in
|
|
||||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
||||||
or harmful.
|
|
||||||
|
|
||||||
Community leaders have the right and responsibility to remove, edit, or reject
|
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
||||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
||||||
decisions when appropriate.
|
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
This Code of Conduct applies within all community spaces, and also applies when
|
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||||
an individual is officially representing the community in public spaces.
|
|
||||||
Examples of representing our community include using an official e-mail address,
|
|
||||||
posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event.
|
|
||||||
|
|
||||||
## Enforcement
|
## Enforcement
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at syuilotan@yahoo.co.jp. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||||
reported to the community leaders responsible for enforcement at
|
|
||||||
<syuilotan@yahoo.co.jp>.
|
|
||||||
All complaints will be reviewed and investigated promptly and fairly.
|
|
||||||
|
|
||||||
All community leaders are obligated to respect the privacy and security of the
|
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||||
reporter of any incident.
|
|
||||||
|
|
||||||
## Enforcement Guidelines
|
|
||||||
|
|
||||||
Community leaders will follow these Community Impact Guidelines in determining
|
|
||||||
the consequences for any action they deem in violation of this Code of Conduct:
|
|
||||||
|
|
||||||
### 1. Correction
|
|
||||||
|
|
||||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
||||||
unprofessional or unwelcome in the community.
|
|
||||||
|
|
||||||
**Consequence**: A private, written warning from community leaders, providing
|
|
||||||
clarity around the nature of the violation and an explanation of why the
|
|
||||||
behavior was inappropriate. A public apology may be requested.
|
|
||||||
|
|
||||||
### 2. Warning
|
|
||||||
|
|
||||||
**Community Impact**: A violation through a single incident or series of
|
|
||||||
actions.
|
|
||||||
|
|
||||||
**Consequence**: A warning with consequences for continued behavior. No
|
|
||||||
interaction with the people involved, including unsolicited interaction with
|
|
||||||
those enforcing the Code of Conduct, for a specified period of time. This
|
|
||||||
includes avoiding interactions in community spaces as well as external channels
|
|
||||||
like social media. Violating these terms may lead to a temporary or permanent
|
|
||||||
ban.
|
|
||||||
|
|
||||||
### 3. Temporary Ban
|
|
||||||
|
|
||||||
**Community Impact**: A serious violation of community standards, including
|
|
||||||
sustained inappropriate behavior.
|
|
||||||
|
|
||||||
**Consequence**: A temporary ban from any sort of interaction or public
|
|
||||||
communication with the community for a specified period of time. No public or
|
|
||||||
private interaction with the people involved, including unsolicited interaction
|
|
||||||
with those enforcing the Code of Conduct, is allowed during this period.
|
|
||||||
Violating these terms may lead to a permanent ban.
|
|
||||||
|
|
||||||
### 4. Permanent Ban
|
|
||||||
|
|
||||||
**Community Impact**: Demonstrating a pattern of violation of community
|
|
||||||
standards, including sustained inappropriate behavior, harassment of an
|
|
||||||
individual, or aggression toward or disparagement of classes of individuals.
|
|
||||||
|
|
||||||
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
||||||
community.
|
|
||||||
|
|
||||||
## Attribution
|
## Attribution
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||||
version 2.1, available at
|
|
||||||
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
||||||
|
|
||||||
Community Impact Guidelines were inspired by
|
[homepage]: http://contributor-covenant.org
|
||||||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
[version]: http://contributor-covenant.org/version/1/4/
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see the FAQ at
|
|
||||||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
||||||
[https://www.contributor-covenant.org/translations][translations].
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
||||||
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
||||||
[FAQ]: https://www.contributor-covenant.org/faq
|
|
||||||
[translations]: https://www.contributor-covenant.org/translations
|
|
||||||
|
621
CONTRIBUTING.md
@ -1,114 +1,22 @@
|
|||||||
# Contribution guide
|
# Contribution guide
|
||||||
We're glad you're interested in contributing Misskey! In this document you will find the information you need to contribute to the project.
|
:v: Thanks for your contributions :v:
|
||||||
|
|
||||||
> [!NOTE]
|
## When you contribute...
|
||||||
> This project uses Japanese as its major language, **but you do not need to translate and write the Issues/PRs in Japanese.**
|
- 任意のIssueについて、せっかく実装してくださっても、実装方法や設計の認識が揃ってないとマージできない/しないことになりかねないので、初めにそのIssue上で着手することを宣言し、必要に応じて他メンバーと実装方法や設計のすり合わせを行ってください。宣言することは作業が他の人と被るのを防止する効果もあります。
|
||||||
> Also, you might receive comments on your Issue/PR in Japanese, but you do not need to reply to them in Japanese as well.\
|
- 設計に迷った時はプロジェクトリーダーの判断を仰いでください。
|
||||||
> The accuracy of machine translation into Japanese is not high, so it will be easier for us to understand if you write it in the original language.
|
- 時間や優先度の都合上、提出してくださったPRが長期間放置されることもありますがご理解ください。
|
||||||
> It will also allow the reader to use the translation tool of their preference if necessary.
|
- 温度感高めで見てほしいものは責付いてください。
|
||||||
|
|
||||||
## Roadmap
|
|
||||||
See [ROADMAP.md](./ROADMAP.md)
|
|
||||||
|
|
||||||
## Issues
|
## Issues
|
||||||
Before creating an issue, please check the following:
|
Feature suggestions and bug reports are filed in https://github.com/syuilo/misskey/issues .
|
||||||
- To avoid duplication, please search for similar issues before creating a new issue.
|
|
||||||
- Do not use Issues to ask questions or troubleshooting.
|
|
||||||
- Issues should only be used to feature requests, suggestions, and bug tracking.
|
|
||||||
- Please ask questions or troubleshooting in [GitHub Discussions](https://github.com/misskey-dev/misskey/discussions) or [Discord](https://discord.gg/Wp8gVStHW3).
|
|
||||||
|
|
||||||
> [!WARNING]
|
* Please search existing issues to avoid duplication. If your issue is already filed, please add your reaction or comment to the existing one.
|
||||||
> Do not close issues that are about to be resolved. It should remain open until a commit that actually resolves it is merged.
|
* If you have multiple independent issues, please submit them separately.
|
||||||
|
|
||||||
### Recommended discussing before implementation
|
## Branches
|
||||||
We welcome your proposal.
|
* **master** branch is tracking the latest release and used for production purposes.
|
||||||
|
* **develop** branch is where we work for the next release.
|
||||||
When you want to add a feature or fix a bug, **first have the design and policy reviewed in an Issue** (if it is not there, please make one). Without this step, there is a high possibility that the PR will not be merged even if it is implemented.
|
* **l10n_develop** branch is reserved for localization management.
|
||||||
|
|
||||||
At this point, you also need to clarify the goals of the PR you will create, and make sure that the other members of the team are aware of them.
|
|
||||||
PRs that do not have a clear set of do's and don'ts tend to be bloated and difficult to review.
|
|
||||||
|
|
||||||
Also, when you start implementation, assign yourself to the Issue (if you cannot do it yourself, ask Committer to assign you).
|
|
||||||
By expressing your intention to work on the Issue, you can prevent conflicts in the work.
|
|
||||||
|
|
||||||
To the Committers: you should not assign someone on it before the Final Decision.
|
|
||||||
|
|
||||||
### How issues are triaged
|
|
||||||
|
|
||||||
The Committers may:
|
|
||||||
* close an issue that is not reproducible on latest stable release,
|
|
||||||
* merge an issue into another issue,
|
|
||||||
* split an issue into multiple issues,
|
|
||||||
* or re-open that has been closed for some reason which is not applicable anymore.
|
|
||||||
|
|
||||||
@syuilo reserves the Final Decision rights including whether the project will implement feature and how to implement, these rights are not always exercised.
|
|
||||||
|
|
||||||
## Well-known branches
|
|
||||||
- **`master`** branch is tracking the latest release and used for production purposes.
|
|
||||||
- **`develop`** branch is where we work for the next release.
|
|
||||||
- When you create a PR, basically target it to this branch.
|
|
||||||
- **`l10n_develop`** branch is reserved for localization management.
|
|
||||||
|
|
||||||
## Creating a PR
|
|
||||||
Thank you for your PR! Before creating a PR, please check the following:
|
|
||||||
- If possible, prefix the title with a keyword that identifies the type of this PR, as shown below.
|
|
||||||
- `fix` / `refactor` / `feat` / `enhance` / `perf` / `chore` etc
|
|
||||||
- Also, make sure that the granularity of this PR is appropriate. Please do not include more than one type of change or interest in a single PR.
|
|
||||||
- If there is an Issue which will be resolved by this PR, please include a reference to the Issue in the text.
|
|
||||||
- Please add the summary of the changes to [`CHANGELOG.md`](/CHANGELOG.md). However, this is not necessary for changes that do not affect the users, such as refactoring.
|
|
||||||
- Check if there are any documents that need to be created or updated due to this change.
|
|
||||||
- If you have added a feature or fixed a bug, please add a test case if possible.
|
|
||||||
- Please make sure that tests and Lint are passed in advance.
|
|
||||||
- You can run it with `pnpm test` and `pnpm lint`. [See more info](#testing)
|
|
||||||
- If this PR includes UI changes, please attach a screenshot in the text.
|
|
||||||
|
|
||||||
Thanks for your cooperation 🤗
|
|
||||||
|
|
||||||
## Reviewers guide
|
|
||||||
Be willing to comment on the good points and not just the things you want fixed 💯
|
|
||||||
|
|
||||||
### Review perspective
|
|
||||||
- Scope
|
|
||||||
- Are the goals of the PR clear?
|
|
||||||
- Is the granularity of the PR appropriate?
|
|
||||||
- Security
|
|
||||||
- Does merging this PR create a vulnerability?
|
|
||||||
- Performance
|
|
||||||
- Will merging this PR cause unexpected performance degradation?
|
|
||||||
- Is there a more efficient way?
|
|
||||||
- Testing
|
|
||||||
- Does the test ensure the expected behavior?
|
|
||||||
- Are there any omissions or gaps?
|
|
||||||
- Does it check for anomalies?
|
|
||||||
|
|
||||||
## Deploy
|
|
||||||
The `/deploy` command by issue comment can be used to deploy the contents of a PR to the preview environment.
|
|
||||||
```
|
|
||||||
/deploy sha=<commit hash>
|
|
||||||
```
|
|
||||||
An actual domain will be assigned so you can test the federation.
|
|
||||||
|
|
||||||
## Merge
|
|
||||||
|
|
||||||
## Release
|
|
||||||
### Release Instructions
|
|
||||||
1. Commit version changes in the `develop` branch ([package.json](package.json))
|
|
||||||
2. Create a release PR.
|
|
||||||
- Into `master` from `develop` branch.
|
|
||||||
- The title must be in the format `Release: x.y.z`.
|
|
||||||
- `x.y.z` is the new version you are trying to release.
|
|
||||||
3. Deploy and perform a simple QA check. Also verify that the tests passed.
|
|
||||||
4. Merge it. (Do not squash commit)
|
|
||||||
5. Create a [release of GitHub](https://github.com/misskey-dev/misskey/releases)
|
|
||||||
- The target branch must be `master`
|
|
||||||
- The tag name must be the version
|
|
||||||
|
|
||||||
> [!NOTE]
|
|
||||||
> Why this instruction is necessary:
|
|
||||||
> - To perform final QA checks
|
|
||||||
> - To distribute responsibility
|
|
||||||
> - To check direct commits to develop
|
|
||||||
> - To celebrate the release together 🎉
|
|
||||||
|
|
||||||
## Localization (l10n)
|
## Localization (l10n)
|
||||||
Misskey uses [Crowdin](https://crowdin.com/project/misskey) for localization management.
|
Misskey uses [Crowdin](https://crowdin.com/project/misskey) for localization management.
|
||||||
@ -120,333 +28,143 @@ If your language is not listed in Crowdin, please open an issue.
|
|||||||
|
|
||||||
![Crowdin](https://d322cqt584bo4o.cloudfront.net/misskey/localized.svg)
|
![Crowdin](https://d322cqt584bo4o.cloudfront.net/misskey/localized.svg)
|
||||||
|
|
||||||
## Development
|
## Internationalization (i18n)
|
||||||
### Setup
|
Misskey uses the Vue.js plugin [Vue I18n](https://github.com/kazupon/vue-i18n).
|
||||||
Before developing, you have to set up environment. Misskey requires Redis, PostgreSQL, and FFmpeg.
|
Documentation of Vue I18n is available at http://kazupon.github.io/vue-i18n/introduction.html .
|
||||||
|
|
||||||
You would want to install Meilisearch to experiment related features. Technically, meilisearch is not strict requirement, but some features and tests require it.
|
## Documentation
|
||||||
|
* Documents for contributors are located in [`/docs`](/docs).
|
||||||
|
* Documents for instance admins are located in [`/docs`](/docs).
|
||||||
|
* Documents for end users are located in [`/src/docs`](/src/docs).
|
||||||
|
|
||||||
There are a few ways to proceed.
|
## Test
|
||||||
|
* Test codes are located in [`/test`](/test).
|
||||||
#### Use system-wide software
|
|
||||||
You could install them in system-wide (such as from package manager).
|
|
||||||
|
|
||||||
#### Use `docker compose`
|
|
||||||
You could obtain middleware container by typing `docker compose -f $PROJECT_ROOT/compose.local-db.yml up -d`.
|
|
||||||
|
|
||||||
#### Use Devcontainer
|
|
||||||
Devcontainer also has necessary setting. This method can be done by connecting from VSCode.
|
|
||||||
|
|
||||||
Instead of running `pnpm` locally, you can use Dev Container to set up your development environment.
|
|
||||||
To use Dev Container, open the project directory on VSCode with Dev Containers installed.
|
|
||||||
**Note:** If you are using Windows, please clone the repository with WSL. Using Git for Windows will result in broken files due to the difference in how newlines are handled.
|
|
||||||
|
|
||||||
It will run the following command automatically inside the container.
|
|
||||||
``` bash
|
|
||||||
git submodule update --init
|
|
||||||
pnpm install --frozen-lockfile
|
|
||||||
cp .devcontainer/devcontainer.yml .config/default.yml
|
|
||||||
pnpm build
|
|
||||||
pnpm migrate
|
|
||||||
```
|
|
||||||
|
|
||||||
After finishing the migration, you can proceed.
|
|
||||||
|
|
||||||
### Start developing
|
|
||||||
During development, it is useful to use the
|
|
||||||
```
|
|
||||||
pnpm dev
|
|
||||||
```
|
|
||||||
command.
|
|
||||||
|
|
||||||
- Server-side source files and automatically builds them if they are modified. Automatically start the server process(es).
|
|
||||||
- Vite HMR (just the `vite` command) is available. The behavior may be different from production.
|
|
||||||
- Service Worker is watched by esbuild.
|
|
||||||
- The front end can be viewed by accessing `http://localhost:5173`.
|
|
||||||
- The backend listens on the port configured with `port` in .config/default.yml.
|
|
||||||
If you have not changed it from the default, it will be "http://localhost:3000".
|
|
||||||
If "port" in .config/default.yml is set to something other than 3000, you need to change the proxy settings in packages/frontend/vite.config.local-dev.ts.
|
|
||||||
|
|
||||||
### `MK_DEV_PREFER=backend pnpm dev`
|
|
||||||
pnpm dev has another mode with `MK_DEV_PREFER=backend`.
|
|
||||||
|
|
||||||
```
|
|
||||||
MK_DEV_PREFER=backend pnpm dev
|
|
||||||
```
|
|
||||||
|
|
||||||
- This mode is closer to the production environment than the default mode.
|
|
||||||
- Vite runs behind the backend (the backend will proxy Vite at /vite).
|
|
||||||
- You can see Misskey by accessing `http://localhost:3000` (Replace `3000` with the port configured with `port` in .config/default.yml).
|
|
||||||
- To change the port of Vite, specify with `VITE_PORT` environment variable.
|
|
||||||
- HMR may not work in some environments such as Windows.
|
|
||||||
|
|
||||||
## Testing
|
|
||||||
- Test codes are located in [`/packages/backend/test`](/packages/backend/test).
|
|
||||||
|
|
||||||
### Run test
|
|
||||||
Create a config file.
|
|
||||||
```
|
|
||||||
cp .github/misskey/test.yml .config/
|
|
||||||
```
|
|
||||||
Prepare DB/Redis for testing.
|
|
||||||
```
|
|
||||||
docker compose -f packages/backend/test/compose.yml up
|
|
||||||
```
|
|
||||||
Alternatively, prepare an empty (data can be erased) DB and edit `.config/test.yml`.
|
|
||||||
|
|
||||||
Run all test.
|
|
||||||
```
|
|
||||||
pnpm test
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Run specify test
|
|
||||||
```
|
|
||||||
pnpm jest -- foo.ts
|
|
||||||
```
|
|
||||||
|
|
||||||
### e2e tests
|
|
||||||
TODO
|
|
||||||
|
|
||||||
## Environment Variable
|
|
||||||
|
|
||||||
- `MISSKEY_CONFIG_YML`: Specify the file path of config.yml instead of default.yml (e.g. `2nd.yml`).
|
|
||||||
- `MISSKEY_WEBFINGER_USE_HTTP`: If it's set true, WebFinger requests will be http instead of https, useful for testing federation between servers in localhost. NEVER USE IN PRODUCTION.
|
|
||||||
|
|
||||||
## Continuous integration
|
## Continuous integration
|
||||||
Misskey uses GitHub Actions for executing automated tests.
|
Misskey uses CircleCI for executing automated tests.
|
||||||
Configuration files are located in [`/.github/workflows`](/.github/workflows).
|
Configuration files are located in [`/.circleci`](/.circleci).
|
||||||
|
|
||||||
## Vue
|
## Adding MisskeyRoom items
|
||||||
Misskey uses Vue(v3) as its front-end framework.
|
* Use English for material, object and texture names.
|
||||||
- Use TypeScript.
|
* Use meter for unit of length.
|
||||||
- **When creating a new component, please use the Composition API (with [setup sugar](https://v3.vuejs.org/api/sfc-script-setup.html) and [ref sugar](https://github.com/vuejs/rfcs/discussions/369)) instead of the Options API.**
|
* Your PR should include all source files (e.g. `.png`, `.blend`) of your models (for later editing).
|
||||||
- Some of the existing components are implemented in the Options API, but it is an old implementation. Refactors that migrate those components to the Composition API are also welcome.
|
* Your PR must include the glTF binary files (`.glb`) of your models.
|
||||||
|
* Add a locale key `room.furnitures.YOUR_ITEM` at [`/locales/ja-JP.yml`](/locales/ja-JP.yml).
|
||||||
|
* Add a furniture definition at [`/src/client/app/common/scripts/room/furnitures.json5`](/src/client/app/common/scripts/room/furnitures.json5).
|
||||||
|
|
||||||
## nirax
|
If you have no experience on 3D modeling, we suggest to use the free 3DCG software [Blender](https://www.blender.org/).
|
||||||
niraxは、Misskeyで使用しているオリジナルのフロントエンドルーティングシステムです。
|
You can find information on glTF 2.0 at [glTF 2.0 — Blender Manual]( https://docs.blender.org/manual/en/dev/addons/io_scene_gltf2.html).
|
||||||
**vue-routerから影響を多大に受けているので、まずはvue-routerについて学ぶことをお勧めします。**
|
|
||||||
|
|
||||||
### ルート定義
|
## FAQ
|
||||||
ルート定義は、以下の形式のオブジェクトの配列です。
|
### How to resolve conflictions occurred at yarn.lock?
|
||||||
|
|
||||||
```ts
|
Just execute `yarn` to fix it.
|
||||||
{
|
|
||||||
name?: string;
|
## Glossary
|
||||||
path: string;
|
### AP
|
||||||
component: Component;
|
Stands for _**A**ctivity**P**ub_.
|
||||||
query?: Record<string, string>;
|
|
||||||
loginRequired?: boolean;
|
### MFM
|
||||||
hash?: string;
|
Stands for _**M**isskey **F**lavored **M**arkdown_.
|
||||||
globalCacheKey?: string;
|
|
||||||
children?: RouteDef[];
|
### Mk
|
||||||
|
Stands for _**M**iss**k**ey_.
|
||||||
|
|
||||||
|
### SW
|
||||||
|
Stands for _**S**ervice**W**orker_.
|
||||||
|
|
||||||
|
### Nyaize
|
||||||
|
Convert な(na) to にゃ(nya)
|
||||||
|
|
||||||
|
#### Denyaize
|
||||||
|
Revert Nyaize
|
||||||
|
|
||||||
|
## TypeScript Coding Style
|
||||||
|
### Do not omit semicolons
|
||||||
|
This is to avoid Automatic Semicolon Insertion (ASI) hazard.
|
||||||
|
|
||||||
|
Ref:
|
||||||
|
* https://www.ecma-international.org/ecma-262/#sec-automatic-semicolon-insertion
|
||||||
|
* https://github.com/tc39/ecma262/pull/1062
|
||||||
|
|
||||||
|
### Do not omit curly brackets
|
||||||
|
Bad:
|
||||||
|
``` ts
|
||||||
|
if (foo)
|
||||||
|
bar;
|
||||||
|
else
|
||||||
|
baz;
|
||||||
|
```
|
||||||
|
|
||||||
|
Good:
|
||||||
|
``` ts
|
||||||
|
if (foo) {
|
||||||
|
bar;
|
||||||
|
} else {
|
||||||
|
baz;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!WARNING]
|
As a special case, you can omit the curly brackets if
|
||||||
> 現状、ルートは定義された順に評価されます。
|
|
||||||
> たとえば、`/foo/:id`ルート定義の次に`/foo/bar`ルート定義がされていた場合、後者がマッチすることはありません。
|
|
||||||
|
|
||||||
### 複数のルーター
|
* the body of the `if`-statement have only one statement and,
|
||||||
vue-routerとの最大の違いは、niraxは複数のルーターが存在することを許可している点です。
|
* the `if`-statement does not have `else`-clause.
|
||||||
これにより、アプリ内ウィンドウでブラウザとは個別にルーティングすることなどが可能になります。
|
|
||||||
|
|
||||||
## Storybook
|
Good:
|
||||||
|
``` ts
|
||||||
Misskey uses [Storybook](https://storybook.js.org/) for UI development.
|
if (foo) bar;
|
||||||
|
|
||||||
### Setup & Run
|
|
||||||
|
|
||||||
#### Setup
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm --filter misskey-js build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Run
|
Make sure that the condition and the body statement are on the same line.
|
||||||
|
|
||||||
```bash
|
### Do not use `==` when it can simply be replaced with `===`.
|
||||||
pnpm --filter frontend storybook-dev
|
🥰
|
||||||
|
|
||||||
|
### Use only boolean (or null related) values in the condition of an `if`-statement.
|
||||||
|
Bad:
|
||||||
|
``` ts
|
||||||
|
if (foo.length)
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage
|
Good:
|
||||||
|
``` ts
|
||||||
When you create a new component (in this example, `MyComponent.vue`), the story file (`MyComponent.stories.ts`) will be automatically generated by the `.storybook/generate.js` script.
|
if (foo.length > 0)
|
||||||
You can override the default story by creating a impl story file (`MyComponent.stories.impl.ts`).
|
|
||||||
|
|
||||||
```ts
|
|
||||||
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
||||||
import { StoryObj } from '@storybook/vue3';
|
|
||||||
import MyComponent from './MyComponent.vue';
|
|
||||||
export const Default = {
|
|
||||||
render(args) {
|
|
||||||
return {
|
|
||||||
components: {
|
|
||||||
MyComponent,
|
|
||||||
},
|
|
||||||
setup() {
|
|
||||||
return {
|
|
||||||
args,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
props() {
|
|
||||||
return {
|
|
||||||
...this.args,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
template: '<MyComponent v-bind="props" />',
|
|
||||||
};
|
|
||||||
},
|
|
||||||
args: {
|
|
||||||
foo: 'bar',
|
|
||||||
},
|
|
||||||
parameters: {
|
|
||||||
layout: 'centered',
|
|
||||||
},
|
|
||||||
} satisfies StoryObj<typeof MyComponent>;
|
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to opt-out from the automatic generation, create a `MyComponent.stories.impl.ts` file and add the following line to the file.
|
### Do not use `export default`
|
||||||
|
This is because the current language support does not work well with `export default`.
|
||||||
|
|
||||||
```ts
|
Ref:
|
||||||
import MyComponent from './MyComponent.vue';
|
* https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
|
||||||
void MyComponent;
|
* https://gfx.hatenablog.com/entry/2017/11/24/135343
|
||||||
|
|
||||||
|
Bad:
|
||||||
|
``` ts
|
||||||
|
export default function(foo: string): string {
|
||||||
```
|
```
|
||||||
|
|
||||||
You can override the component meta by creating a meta story file (`MyComponent.stories.meta.ts`).
|
Good:
|
||||||
|
``` ts
|
||||||
```ts
|
export function something(foo: string): string {
|
||||||
export const argTypes = {
|
|
||||||
scale: {
|
|
||||||
control: {
|
|
||||||
type: 'range',
|
|
||||||
min: 1,
|
|
||||||
max: 4,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Also, you can use msw to mock API requests in the storybook. Creating a `MyComponent.stories.msw.ts` file to define the mock handlers.
|
## Directory structure
|
||||||
|
|
||||||
```ts
|
|
||||||
import { HttpResponse, http } from 'msw';
|
|
||||||
export const handlers = [
|
|
||||||
http.post('/api/notes/timeline', ({ request }) => {
|
|
||||||
return HttpResponse.json([]);
|
|
||||||
}),
|
|
||||||
];
|
|
||||||
```
|
```
|
||||||
|
src ... Source code
|
||||||
|
@types ... Type definitions
|
||||||
|
prelude ... Independence utils for coding JavaScript without side effects
|
||||||
|
misc ... Independence utils for Misskey without side effects
|
||||||
|
service ... Common functions with side effects
|
||||||
|
queue ... Job queues and Jobs
|
||||||
|
server ... Web Server
|
||||||
|
client ... Client
|
||||||
|
mfm ... MFM
|
||||||
|
|
||||||
Don't forget to re-run the `.storybook/generate.js` script after adding, editing, or removing the above files.
|
test ... Test code
|
||||||
|
|
||||||
## Nest
|
|
||||||
|
|
||||||
### Nest Service Circular dependency / Nestでサービスの循環参照でエラーが起きた場合
|
|
||||||
|
|
||||||
#### forwardRef
|
|
||||||
まずは簡単に`forwardRef`を試してみる
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
export class FooService {
|
|
||||||
constructor(
|
|
||||||
@Inject(forwardRef(() => BarService))
|
|
||||||
private barService: BarService
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### OnModuleInit
|
|
||||||
できなければ`OnModuleInit`を使う
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
import { Injectable, OnModuleInit } from '@nestjs/common';
|
|
||||||
import { ModuleRef } from '@nestjs/core';
|
|
||||||
import { BarService } from '@/core/BarService';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class FooService implements OnModuleInit {
|
|
||||||
private barService: BarService // constructorから移動してくる
|
|
||||||
|
|
||||||
constructor(
|
|
||||||
private moduleRef: ModuleRef,
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
async onModuleInit() {
|
|
||||||
this.barService = this.moduleRef.get(BarService.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async niceMethod() {
|
|
||||||
return await this.barService.incredibleMethod({ hoge: 'fuga' });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
##### Service Unit Test
|
|
||||||
テストで`onModuleInit`を呼び出す必要がある
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
// import ...
|
|
||||||
|
|
||||||
describe('test', () => {
|
|
||||||
let app: TestingModule;
|
|
||||||
let fooService: FooService; // for test case
|
|
||||||
let barService: BarService; // for test case
|
|
||||||
|
|
||||||
beforeEach(async () => {
|
|
||||||
app = await Test.createTestingModule({
|
|
||||||
imports: ...,
|
|
||||||
providers: [
|
|
||||||
FooService,
|
|
||||||
{ // mockする (mockは必須ではないかもしれない)
|
|
||||||
provide: BarService,
|
|
||||||
useFactory: () => ({
|
|
||||||
incredibleMethod: jest.fn(),
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
{ // Provideにする
|
|
||||||
provide: BarService.name,
|
|
||||||
useExisting: BarService,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
.useMocker(...
|
|
||||||
.compile();
|
|
||||||
|
|
||||||
fooService = app.get<FooService>(FooService);
|
|
||||||
barService = app.get<BarService>(BarService) as jest.Mocked<BarService>;
|
|
||||||
|
|
||||||
// onModuleInitを実行する
|
|
||||||
await fooService.onModuleInit();
|
|
||||||
});
|
|
||||||
|
|
||||||
test('nice', () => {
|
|
||||||
await fooService.niceMethod();
|
|
||||||
|
|
||||||
expect(barService.incredibleMethod).toHaveBeenCalled();
|
|
||||||
expect(barService.incredibleMethod.mock.lastCall![0])
|
|
||||||
.toEqual({ hoge: 'fuga' });
|
|
||||||
});
|
|
||||||
})
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
### Misskeyのドメイン固有の概念は`Mi`をprefixする
|
|
||||||
例えばGoogleが自社サービスをMap、Earth、DriveではなくGoogle Map、Google Earth、Google Driveのように命名するのと同じ
|
|
||||||
コード上でMisskeyのドメイン固有の概念には`Mi`をprefixすることで、他のドメインの同様の概念と区別できるほか、名前の衝突を防ぐ。
|
|
||||||
ただし、文脈上Misskeyのものを指すことが明らかであり、名前の衝突の恐れがない場合は、一時的なローカル変数に限って`Mi`を省略してもよい。
|
|
||||||
|
|
||||||
### How to resolve conflictions occurred at pnpm-lock.yaml?
|
|
||||||
|
|
||||||
Just execute `pnpm` to fix it.
|
|
||||||
|
|
||||||
### INSERTするときにはsaveではなくinsertを使用する
|
|
||||||
#6441
|
|
||||||
|
|
||||||
### placeholder
|
### placeholder
|
||||||
SQLをクエリビルダで組み立てる際、使用するプレースホルダは重複してはならない
|
SQLをクエリビルダで組み立てる際、使用するプレースホルダは重複してはならない
|
||||||
例えば
|
例えば
|
||||||
@ -518,78 +236,47 @@ const users = userIds.length > 0 ? await Users.find({
|
|||||||
SQLでは配列のインデックスは**1始まり**。
|
SQLでは配列のインデックスは**1始まり**。
|
||||||
`[a, b, c]`の `a`にアクセスしたいなら`[0]`ではなく`[1]`と書く
|
`[a, b, c]`の `a`にアクセスしたいなら`[0]`ではなく`[1]`と書く
|
||||||
|
|
||||||
### null IN
|
### `undefined`にご用心
|
||||||
nullが含まれる可能性のあるカラムにINするときは、そのままだとおかしくなるのでORなどでnullのハンドリングをしよう。
|
MongoDBの時とは違い、findOneでレコードを取得する時に対象レコードが存在しない場合 **`undefined`** が返ってくるので注意。
|
||||||
|
MongoDBは`null`で返してきてたので、その感覚で`if (x === null)`とか書くとバグる。代わりに`if (x == null)`と書いてください
|
||||||
|
|
||||||
### enumの削除は気をつける
|
### 簡素な`undefined`チェック
|
||||||
enumの列挙の内容の削除は、その値をもつレコードを全て削除しないといけない
|
データベースからレコードを取得するときに、プログラムの流れ的に(ほぼ)絶対`undefined`にはならない場合でも、`undefined`チェックしないとTypeScriptに怒られます。
|
||||||
|
でもいちいち複数行を費やして、発生するはずのない`undefined`をチェックするのも面倒なので、`ensure`というユーティリティ関数を用意しています。
|
||||||
削除が重たかったり不可能だったりする場合は、削除しないでおく
|
例えば、
|
||||||
|
``` ts
|
||||||
|
const user = await Users.findOne(userId);
|
||||||
|
// この時点で user の型は User | undefined
|
||||||
|
if (user == null) {
|
||||||
|
throw 'missing user';
|
||||||
|
}
|
||||||
|
// この時点で user の型は User
|
||||||
|
```
|
||||||
|
という処理を`ensure`を使うと
|
||||||
|
``` ts
|
||||||
|
const user = await Users.findOne(userId).then(ensure);
|
||||||
|
// この時点で user の型は User
|
||||||
|
```
|
||||||
|
という風に書けます。
|
||||||
|
もちろん`ensure`内部でエラーを握りつぶすようなことはしておらず、万が一`undefined`だった場合はPromiseがRejectされ後続の処理は実行されません。
|
||||||
|
``` ts
|
||||||
|
const user = await Users.findOne(userId).then(ensure);
|
||||||
|
// 万が一 Users.findOne の結果が undefined だったら、ensure でエラーが発生するので
|
||||||
|
// この行に到達することは無い
|
||||||
|
// なので、.then(ensure) は
|
||||||
|
// if (user == null) {
|
||||||
|
// throw 'missing user';
|
||||||
|
// }
|
||||||
|
// の糖衣構文のような扱いです
|
||||||
|
```
|
||||||
|
|
||||||
### Migration作成方法
|
### Migration作成方法
|
||||||
packages/backendで:
|
```
|
||||||
```sh
|
npx ts-node ./node_modules/typeorm/cli.js migration:generate -n 変更の名前
|
||||||
pnpm dlx typeorm migration:generate -d ormconfig.js -o <migration name>
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- 生成後、ファイルをmigration下に移してください
|
作成されたスクリプトは不必要な変更を含むため除去してください。
|
||||||
- 作成されたスクリプトは不必要な変更を含むため除去してください
|
|
||||||
|
|
||||||
### JSON SchemaのobjectでanyOfを使うとき
|
|
||||||
JSON Schemaで、objectに対してanyOfを使う場合、anyOfの中でpropertiesを定義しないこと。
|
|
||||||
バリデーションが効かないため。(SchemaTypeもそのように作られており、objectのanyOf内のpropertiesは捨てられます)
|
|
||||||
https://github.com/misskey-dev/misskey/pull/10082
|
|
||||||
|
|
||||||
テキストhogeおよびfugaについて、片方を必須としつつ両方の指定もありうる場合:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
export const paramDef = {
|
|
||||||
type: 'object',
|
|
||||||
properties: {
|
|
||||||
hoge: { type: 'string', minLength: 1 },
|
|
||||||
fuga: { type: 'string', minLength: 1 },
|
|
||||||
},
|
|
||||||
anyOf: [
|
|
||||||
{ required: ['hoge'] },
|
|
||||||
{ required: ['fuga'] },
|
|
||||||
],
|
|
||||||
} as const;
|
|
||||||
```
|
|
||||||
|
|
||||||
### コネクションには`markRaw`せよ
|
|
||||||
**Vueのコンポーネントのdataオプションとして**misskey.jsのコネクションを設定するとき、必ず`markRaw`でラップしてください。インスタンスが不必要にリアクティブ化されることで、misskey.js内の処理で不具合が発生するとともに、パフォーマンス上の問題にも繋がる。なお、Composition APIを使う場合はこの限りではない(リアクティブ化はマニュアルなため)。
|
|
||||||
|
|
||||||
### JSONのimportに気を付けよう
|
|
||||||
TypeScriptでjsonをimportすると、tscでコンパイルするときにそのjsonファイルも一緒にdistディレクトリに吐き出されてしまう。この挙動により、意図せずファイルの書き換えが発生することがあるので、jsonをimportするときは書き換えられても良いものかどうか確認すること。書き換えされて欲しくない場合は、importで読み込むのではなく、`fs.readFileSync`などの関数を使って読み込むようにすればよい。
|
|
||||||
|
|
||||||
### コンポーネントのスタイル定義でmarginを持たせない
|
|
||||||
コンポーネント自身がmarginを設定するのは問題の元となることはよく知られている
|
|
||||||
marginはそのコンポーネントを使う側が設定する
|
|
||||||
|
|
||||||
## その他
|
## その他
|
||||||
### HTMLのクラス名で follow という単語は使わない
|
### HTMLのクラス名で follow という単語は使わない
|
||||||
広告ブロッカーで誤ってブロックされる
|
広告ブロッカーで誤ってブロックされる
|
||||||
|
|
||||||
### indexというファイル名を使うな
|
|
||||||
ESMではディレクトリインポートは廃止されているのと、ディレクトリインポートせずともファイル名が index だと何故か一部のライブラリ?でディレクトリインポートだと見做されてエラーになる
|
|
||||||
|
|
||||||
## CSS Recipe
|
|
||||||
|
|
||||||
### Lighten CSS vars
|
|
||||||
|
|
||||||
``` css
|
|
||||||
color: hsl(from var(--accent) h s calc(l + 10));
|
|
||||||
```
|
|
||||||
|
|
||||||
### Darken CSS vars
|
|
||||||
|
|
||||||
``` css
|
|
||||||
color: hsl(from var(--accent) h s calc(l - 10));
|
|
||||||
```
|
|
||||||
|
|
||||||
### Add alpha to CSS vars
|
|
||||||
|
|
||||||
``` css
|
|
||||||
color: color(from var(--accent) srgb r g b / 0.5);
|
|
||||||
```
|
|
||||||
|
|
||||||
|
10
COPYING
@ -1,11 +1,15 @@
|
|||||||
Unless otherwise stated this repository is
|
Unless otherwise stated this repository is
|
||||||
Copyright © 2014-2024 syuilo and contributors
|
Copyright © 2014-2020 syuilo and contributers
|
||||||
|
|
||||||
And is distributed under The GNU Affero General Public License Version 3, you should have received a copy of the license file as LICENSE.
|
And is distributed under The GNU Affero General Public License Version 3, you should have received a copy of the license file as LICENSE.
|
||||||
|
|
||||||
|
|
||||||
Misskey includes several third-party Open-Source softwares.
|
Misskey includes several third-party Open-Source softwares.
|
||||||
|
|
||||||
|
Unicode emoji regular expressions by Twitter, Inc.
|
||||||
|
License: MIT
|
||||||
|
https://github.com/twitter/twemoji-parser/blob/master/LICENSE.md
|
||||||
|
|
||||||
Emoji keywords for Unicode 11 and below by Mu-An Chiou
|
Emoji keywords for Unicode 11 and below by Mu-An Chiou
|
||||||
License: MIT
|
License: MIT
|
||||||
https://github.com/muan/emojilib/blob/master/LICENSE
|
https://github.com/muan/emojilib/blob/master/LICENSE
|
||||||
@ -13,7 +17,3 @@ https://github.com/muan/emojilib/blob/master/LICENSE
|
|||||||
RsaSignature2017 implementation by Transmute Industries Inc
|
RsaSignature2017 implementation by Transmute Industries Inc
|
||||||
License: MIT
|
License: MIT
|
||||||
https://github.com/transmute-industries/RsaSignature2017/blob/master/LICENSE
|
https://github.com/transmute-industries/RsaSignature2017/blob/master/LICENSE
|
||||||
|
|
||||||
Machine learning model for sensitive images by Infinite Red, Inc.
|
|
||||||
License: MIT
|
|
||||||
https://github.com/infinitered/nsfwjs/blob/master/LICENSE
|
|
||||||
|
145
Dockerfile
@ -1,108 +1,41 @@
|
|||||||
# syntax = docker/dockerfile:1.4
|
FROM node:14.15.1-alpine AS base
|
||||||
|
|
||||||
ARG NODE_VERSION=20.16.0-bullseye
|
|
||||||
|
|
||||||
# build assets & compile TypeScript
|
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
||||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
|
||||||
rm -f /etc/apt/apt.conf.d/docker-clean \
|
|
||||||
; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -yqq --no-install-recommends \
|
|
||||||
build-essential
|
|
||||||
|
|
||||||
RUN corepack enable
|
|
||||||
|
|
||||||
WORKDIR /misskey
|
|
||||||
|
|
||||||
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
|
|
||||||
COPY --link ["scripts", "./scripts"]
|
|
||||||
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
|
||||||
COPY --link ["packages/frontend-shared/package.json", "./packages/frontend-shared/"]
|
|
||||||
COPY --link ["packages/frontend/package.json", "./packages/frontend/"]
|
|
||||||
COPY --link ["packages/frontend-embed/package.json", "./packages/frontend-embed/"]
|
|
||||||
COPY --link ["packages/sw/package.json", "./packages/sw/"]
|
|
||||||
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
|
|
||||||
COPY --link ["packages/misskey-reversi/package.json", "./packages/misskey-reversi/"]
|
|
||||||
COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bubble-game/"]
|
|
||||||
|
|
||||||
ARG NODE_ENV=production
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
|
||||||
pnpm i --frozen-lockfile --aggregate-output
|
|
||||||
|
|
||||||
COPY --link . ./
|
|
||||||
|
|
||||||
RUN git submodule update --init
|
|
||||||
RUN pnpm build
|
|
||||||
RUN rm -rf .git/
|
|
||||||
|
|
||||||
# build native dependencies for target platform
|
|
||||||
|
|
||||||
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -yqq --no-install-recommends \
|
|
||||||
build-essential
|
|
||||||
|
|
||||||
RUN corepack enable
|
|
||||||
|
|
||||||
WORKDIR /misskey
|
|
||||||
|
|
||||||
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
|
|
||||||
COPY --link ["scripts", "./scripts"]
|
|
||||||
COPY --link ["packages/backend/package.json", "./packages/backend/"]
|
|
||||||
COPY --link ["packages/misskey-js/package.json", "./packages/misskey-js/"]
|
|
||||||
COPY --link ["packages/misskey-reversi/package.json", "./packages/misskey-reversi/"]
|
|
||||||
COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bubble-game/"]
|
|
||||||
|
|
||||||
ARG NODE_ENV=production
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
|
|
||||||
pnpm i --frozen-lockfile --aggregate-output
|
|
||||||
|
|
||||||
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
|
|
||||||
|
|
||||||
ARG UID="991"
|
|
||||||
ARG GID="991"
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends \
|
|
||||||
ffmpeg tini curl libjemalloc-dev libjemalloc2 \
|
|
||||||
&& ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so \
|
|
||||||
&& corepack enable \
|
|
||||||
&& groupadd -g "${GID}" misskey \
|
|
||||||
&& useradd -l -u "${UID}" -g "${GID}" -m -d /misskey misskey \
|
|
||||||
&& find / -type d -path /sys -prune -o -type d -path /proc -prune -o -type f -perm /u+s -ignore_readdir_race -exec chmod u-s {} \; \
|
|
||||||
&& find / -type d -path /sys -prune -o -type d -path /proc -prune -o -type f -perm /g+s -ignore_readdir_race -exec chmod g-s {} \; \
|
|
||||||
&& apt-get clean \
|
|
||||||
&& rm -rf /var/lib/apt/lists
|
|
||||||
|
|
||||||
USER misskey
|
|
||||||
WORKDIR /misskey
|
|
||||||
|
|
||||||
# add package.json to add pnpm
|
|
||||||
COPY --chown=misskey:misskey ./package.json ./package.json
|
|
||||||
RUN corepack install
|
|
||||||
|
|
||||||
COPY --chown=misskey:misskey --from=target-builder /misskey/node_modules ./node_modules
|
|
||||||
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/backend/node_modules ./packages/backend/node_modules
|
|
||||||
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/misskey-js/node_modules ./packages/misskey-js/node_modules
|
|
||||||
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/misskey-reversi/node_modules ./packages/misskey-reversi/node_modules
|
|
||||||
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/misskey-bubble-game/node_modules ./packages/misskey-bubble-game/node_modules
|
|
||||||
COPY --chown=misskey:misskey --from=native-builder /misskey/built ./built
|
|
||||||
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/misskey-js/built ./packages/misskey-js/built
|
|
||||||
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/misskey-reversi/built ./packages/misskey-reversi/built
|
|
||||||
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/misskey-bubble-game/built ./packages/misskey-bubble-game/built
|
|
||||||
COPY --chown=misskey:misskey --from=native-builder /misskey/packages/backend/built ./packages/backend/built
|
|
||||||
COPY --chown=misskey:misskey --from=native-builder /misskey/fluent-emojis /misskey/fluent-emojis
|
|
||||||
COPY --chown=misskey:misskey . ./
|
|
||||||
|
|
||||||
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
HEALTHCHECK --interval=5s --retries=20 CMD ["/bin/bash", "/misskey/healthcheck.sh"]
|
|
||||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
WORKDIR /misskey
|
||||||
CMD ["pnpm", "run", "migrateandstart"]
|
|
||||||
|
FROM base AS builder
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
file \
|
||||||
|
git \
|
||||||
|
g++ \
|
||||||
|
gcc \
|
||||||
|
libc-dev \
|
||||||
|
libtool \
|
||||||
|
make \
|
||||||
|
nasm \
|
||||||
|
pkgconfig \
|
||||||
|
python \
|
||||||
|
zlib-dev
|
||||||
|
|
||||||
|
COPY package.json yarn.lock ./
|
||||||
|
RUN yarn install
|
||||||
|
COPY . ./
|
||||||
|
RUN yarn build
|
||||||
|
|
||||||
|
FROM base AS runner
|
||||||
|
|
||||||
|
RUN apk add --no-cache \
|
||||||
|
ffmpeg \
|
||||||
|
tini
|
||||||
|
RUN npm i -g web-push
|
||||||
|
ENTRYPOINT ["/sbin/tini", "--"]
|
||||||
|
|
||||||
|
COPY --from=builder /misskey/node_modules ./node_modules
|
||||||
|
COPY --from=builder /misskey/built ./built
|
||||||
|
COPY . ./
|
||||||
|
|
||||||
|
CMD ["npm", "run", "migrateandstart"]
|
||||||
|
233
README.md
@ -1,49 +1,226 @@
|
|||||||
<div align="center">
|
<a href="https://xn--931a.moe/"><img src="https://github.com/syuilo/misskey/blob/develop/assets/ai-orig.png?raw=true" align="right" height="320px"/></a>
|
||||||
<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! 🚀**
|
[![Misskey](/assets/title.png)](https://join.misskey.page/)
|
||||||
|
================================================================
|
||||||
|
|
||||||
[Learn more](https://misskey-hub.net/)
|
[![CircleCI](https://img.shields.io/circleci/project/github/syuilo/misskey.svg?style=for-the-badge&logo=circleci)](https://circleci.com/gh/syuilo/misskey)
|
||||||
|
[![Dependencies](https://img.shields.io/david/syuilo/misskey.svg?style=for-the-badge&logo=npm)](https://david-dm.org/syuilo/misskey)
|
||||||
|
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge&logo=github)](http://makeapullrequest.com)
|
||||||
|
[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)
|
||||||
|
|
||||||
|
**A forever evolving, interplanetary microblogging platform.**
|
||||||
|
|
||||||
|
<p align="justify">
|
||||||
|
<a href="https://join.misskey.page/">Misskey</a> is a decentralized microblogging platform born on Earth.
|
||||||
|
Since it exists within the Fediverse (a universe where various social media platforms are organized),
|
||||||
|
it is mutually linked with other social media platforms.
|
||||||
|
Why don't you take a short break from the hustle and bustle of the city, and dive into a new Internet? <a href="https://join.misskey.page/">Find an instance!</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<a href="https://www.patreon.com/syuilo"><img src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" alt="Become a Patron!" width="160" /></a>
|
||||||
|
|
||||||
|
![](https://ja.mstdn.wiki/images/e/ed/Deck.jpg)
|
||||||
|
|
||||||
|
:sparkles: Features
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
<img src="/assets/about/post.png" align="left" height="200px"/>
|
||||||
|
|
||||||
|
<h3 align="left">Posting</h3>
|
||||||
|
<p align="justify">
|
||||||
|
Post your ideas, discussion topics, fun moments, or anything else you want to share! Misskey supports text, emoji, pictures, videos, and polls!
|
||||||
|
</p>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href="https://misskey-hub.net/servers/">
|
<img src="/assets/about/reaction.png" align="right" height="200px"/>
|
||||||
<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/">
|
<h3 align="right">Reactions</h3>
|
||||||
<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>
|
<p align="justify">
|
||||||
|
Reactions are the simplest way to respond to others' posts. Simply pick a reaction emote from the list! Reactions on Misskey are much more expressive than other social media services which only allow “liking”.
|
||||||
|
</p>
|
||||||
|
|
||||||
<a href="./CONTRIBUTING.md">
|
---
|
||||||
<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>
|
|
||||||
|
|
||||||
<a href="https://discord.gg/Wp8gVStHW3">
|
<img src="/assets/about/ui.png" align="left" height="200px"/>
|
||||||
<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">
|
<h3 align="left">Interface</h3>
|
||||||
<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>
|
<p align="justify">
|
||||||
|
Customize the UI to your own tastes! No UI will work for everyone, so Misskey is completely customizable. Make Misskey *yours* by editing the style, adjusting timeline layouts, and placing widgets.
|
||||||
|
</p>
|
||||||
|
|
||||||
</div>
|
---
|
||||||
|
|
||||||
## Thanks
|
<img src="/assets/about/drive.png" align="right" width="300px"/>
|
||||||
|
|
||||||
<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>
|
<h3 align="right">Misskey Drive</h3>
|
||||||
|
<p align="justify">
|
||||||
|
Organize and store your files! Want to post a picture you have already uploaded? Wish you could organize your files into folders? Misskey Drive is a solution!
|
||||||
|
</p>
|
||||||
|
|
||||||
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>
|
...and more! Experience Misskey with your own eyes at [misskey.io](https://misskey.io/) or join one of the [other instances](https://joinmisskey.github.io/) that are available.
|
||||||
|
|
||||||
Thanks to [Chromatic](https://www.chromatic.com/) for providing the visual testing platform that helps us review UI changes and catch visual regressions.
|
To recive updates of this repo, follow [@repo@misskey.io](https://misskey.io/@repo) on fediverse.
|
||||||
|
|
||||||
<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>
|
Screen shots
|
||||||
|
----------------------------------------------------------------
|
||||||
|
### Profile page
|
||||||
|
<img src="/assets/ss/user.jpg" width="500px"/>
|
||||||
|
|
||||||
Thanks to [Codecov](https://about.codecov.io/for/open-source/) for providing the code coverage platform that helps us improve our test coverage.
|
### Explore users
|
||||||
|
<img src="/assets/ss/explore.jpg" width="500px"/>
|
||||||
|
|
||||||
<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>
|
:new: What's new
|
||||||
|
----------------------------------------------------------------
|
||||||
|
Please see the [Release notes](./CHANGELOG.md).
|
||||||
|
|
||||||
Thanks to [Crowdin](https://crowdin.com/) for providing the localization platform that helps us translate Misskey into many languages.
|
:package: Create your own instance
|
||||||
|
----------------------------------------------------------------
|
||||||
|
Please see the [Setup and Installation Guide](./docs/setup.en.md).
|
||||||
|
|
||||||
<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>
|
:wrench: Contribution
|
||||||
|
----------------------------------------------------------------
|
||||||
|
Please see the [Contribution Guide](./CONTRIBUTING.md).
|
||||||
|
|
||||||
Thanks to [Docker](https://hub.docker.com/) for providing the container platform that helps us run Misskey in production.
|
### Collaborators
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td><img src="https://avatars3.githubusercontent.com/u/4439005?s=460&v=4" alt="syuilo" width="100"></td>
|
||||||
|
<td><img src="https://avatars0.githubusercontent.com/u/10798641?s=460&v=4" alt="AyaMorisawa" width="100"></td>
|
||||||
|
<td><img src="https://avatars1.githubusercontent.com/u/30769358?s=460&v=4" alt="mei23" width="100"></td>
|
||||||
|
<td><img src="https://avatars2.githubusercontent.com/u/20679825?s=460&v=4" alt="acid-chicken" width="100"></td>
|
||||||
|
<td><img src="https://avatars2.githubusercontent.com/u/6533808?s=460&v=4" alt="rinsuki" width="100"></td>
|
||||||
|
<td><img src="https://avatars0.githubusercontent.com/u/7973572?s=460&v=4" alt="tamaina" width="100"></td>
|
||||||
|
<td><img src="https://avatars1.githubusercontent.com/u/7106976?s=460&v=4" alt="Xeltica" width="100"></td>
|
||||||
|
<td><img src="https://avatars1.githubusercontent.com/u/17376330?s=460&v=4" alt="u1-liquid" width="100"></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center"><a href="https://github.com/syuilo">@syuilo</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/AyaMorisawa">@AyaMorisawa</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/mei23">@mei23</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/acid-chicken">@acid-chicken</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/rinsuki">@rinsuki</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/tamaina">@tamaina</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/Xeltica">@Xeltica</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/u1-liquid">@u1-liquid</a></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
:heart: Backers
|
||||||
|
----------------------------------------------------------------
|
||||||
|
<!-- PATREON_START -->
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/20832595" alt="Roujo " width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/27956229" alt="Oliver Maximilian Seidel" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12190916/fb7fa7983c14425f890369535b1506a4/3.png?token-time=2145916800&token-hash=oH_i7gJjNT7Ot6j9JiVwy7ZJIBqACVnzLqlz4YrDAZA%3D" alt="weepjp " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/19045173/cb91c0f345c24d4ebfd05f19906d5e26/1.png?token-time=2145916800&token-hash=o_zKBytJs_AxHwSYw_5R8eD0eSJe3RoTR3kR3Q0syN0%3D" alt="kiritan " width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/27648259" alt="みなしま " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/24430516/b1964ac5b9f746d2a12ff53dbc9aa40a/1.jpg?token-time=2145916800&token-hash=bmEiMGYpp3bS7hCCbymjGGsHBZM3AXuBOFO3Kro37PU%3D" alt="Eduardo Quiros" width="100"></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=20832595">Roujo </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=27956229">Oliver Maximilian Seidel</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/weepjp">weepjp </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=19045173">kiritan </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=27648259">みなしま </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=24430516">Eduardo Quiros</a></td>
|
||||||
|
</tr></table>
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/14215107/1cbe1912c26143919fa0faca16f12ce1/4.jpg?token-time=2145916800&token-hash=BslMqDjTjz8KYANLvxL87agHTugHa0dMPUzT-hwR6Vk%3D" alt="Nesakko" width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/776209" alt="Demogrognard" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/3075183/c2ae575c604e420297f000ccc396e395/1.jpeg?token-time=2145916800&token-hash=O9qmPtpo6wWb0OuvnkEekhk_1WO2MTdytLr7ZgsAr80%3D" alt="Liaizon Wakest" width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/557245" alt="mkatze " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/23915207/25428766ecd745478e600b3d7f871eb2/1.png?token-time=2145916800&token-hash=urCLLA4KjJZX92Y1CxcBP4d8bVTHGkiaPnQZp-Tqz68%3D" alt="kabo2468y " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/8249688/4aacf36b6b244ab1bc6653591b6640df/2.png?token-time=2145916800&token-hash=1ZEf2w6L34253cZXS_HlVevLEENWS9QqrnxGUAYblPo%3D" alt="AureoleArk " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5670915/ee175f0bfb6347ffa4ea101a8c097bff/1.jpg?token-time=2145916800&token-hash=mPLM9CA-riFHx-myr3bLZJuH2xBRHA9se5VbHhLIOuA%3D" alt="osapon " width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/16869916" alt="見当かなみ " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/36813045/29876ea679d443bcbba3c3f16edab8c2/2.jpeg?token-time=2145916800&token-hash=YCKWnIhrV9rjUCV9KqtJnEqjy_uGYF3WMXftjUdpi7o%3D" alt="Wataru Manji (manji0)" width="100"></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td><a href="https://www.patreon.com/Nesakko">Nesakko</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=776209">Demogrognard</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/wakest">Liaizon Wakest</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=557245">mkatze </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=23915207">kabo2468y </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/AureoleArk">AureoleArk </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/osapon">osapon </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=16869916">見当かなみ </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=36813045">Wataru Manji (manji0)</a></td>
|
||||||
|
</tr></table>
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/18899730/6a22797f68254034a854d69ea2445fc8/1.png?token-time=2145916800&token-hash=b_uj57yxo5VzkSOUS7oXE_762dyOTB_oxzbO6lFNG3k%3D" alt="YuzuRyo61 " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5788159/af42076ab3354bb49803cfba65f94bee/1.jpg?token-time=2145916800&token-hash=iSaxp_Yr2-ZiU2YVi9rcpZZj9mj3UvNSMrZr4CU4qtA%3D" alt="mewl hayabusa" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/28779508/3cd4cb7f017f4ee0864341e3464d42f9/1.png?token-time=2145916800&token-hash=eGQtR15be44kgvh8fw2Jx8Db4Bv15YBp2ldxh0EKRxA%3D" alt="S Y" width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/16542964" alt="Takumi Sugita" width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/17866454" alt="sikyosyounin " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5881381/6235ca5d3fb04c8e95ef5b4ff2abcc18/3.png?token-time=2145916800&token-hash=KjfQL8nf3AIf6WqzLshBYAyX44piAqOAZiYXgZS_H6A%3D" alt="YUKIMOCHI" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/38837364/9421361c54c645ac8f5fc442a40c32e9/1.png?token-time=2145916800&token-hash=TUZB48Nem3BeUPLBH6s3P6WyKBnQOy0xKaDSTBBUNzA%3D" alt="xianon" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/26340354/08834cf767b3449e93098ef73a434e2f/2.png?token-time=2145916800&token-hash=nyM8DnKRL8hR47HQ619mUzsqVRpkWZjgtgBU9RY15Uc%3D" alt="totokoro " width="100"></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td><a href="https://www.patreon.com/Yuzulia">YuzuRyo61 </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/hs_sh_net">mewl hayabusa</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=28779508">S Y</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=16542964">Takumi Sugita</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=17866454">sikyosyounin </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/yukimochi">YUKIMOCHI</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=38837364">xianon</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=26340354">totokoro </a></td>
|
||||||
|
</tr></table>
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/19356899/496b4681d33b4520bd7688e0fd19c04d/2.jpeg?token-time=2145916800&token-hash=_sTj3dUBOhn9qwiJ7F19Qd-yWWfUqJC_0jG1h0agEqQ%3D" alt="sheeta.s " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5827393/59893c191dda408f9cabd0f20a3a5627/1.jpeg?token-time=2145916800&token-hash=i9N05vOph-eP1LTLb9_npATjYOpntL0ZsHNaZFSsPmE%3D" alt="motcha " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/20494440/540beaf2445f408ea6597bc61e077bb3/1.png?token-time=2145916800&token-hash=UJ0JQge64Bx9XmN_qYA1inMQhrWf4U91fqz7VAKJeSg%3D" alt="axtuki1 " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/13737140/1adf7835017d479280d90fe8d30aade2/1.png?token-time=2145916800&token-hash=0pdle8h5pDZrww0BDOjdz6zO-HudeGTh36a3qi1biVU%3D" alt="Satsuki Yanagi" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/17880724/311738c8a48f4a6b9443c2445a75adde/1.jpg?token-time=2145916800&token-hash=nVAntpybQrznE0rg05keLrSE6ogPKJXB13rmrJng42c%3D" alt="takimura " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/13100201/fc5be4fa90444f09a9c8a06f72385272/1.png?token-time=2145916800&token-hash=i8PjlgfOB2LPEdbtWyx8ZPsBKhGcNZqcw_FQmH71UGU%3D" alt="aqz tamaina" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/9109588/e3cffc48d20a4e43afe04123e696781d/3.png?token-time=2145916800&token-hash=T_VIUA0IFIbleZv4pIjiszZGnQonwn34sLCYFIhakBo%3D" alt="nafuchoco " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/16900731/619ab87cc08448439222631ebb26802f/1.gif?token-time=2145916800&token-hash=o27K7M02s1z-LkDUEO5Oa7cu-GviRXeOXxryi4o_6VU%3D" alt="Atsuko Tominaga" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/4389829/9f709180ac714651a70f74a82f3ffdb9/3.png?token-time=2145916800&token-hash=FTm3WVom4dJ9NwWMU4OpCL_8Yc13WiwEbKrDPyTZTPs%3D" alt="natalie" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/26144593/9514b10a5c1b42a3af58621aee213d1d/1.png?token-time=2145916800&token-hash=v1PYRsjzu4c_mndN4Hvi_dlispZJsuGRCQeNS82pUSM%3D" alt="EBISUME" width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5923936/2a743cbfbff946c2af3f09026047c0da/2.png?token-time=2145916800&token-hash=h6yphW1qnM0n_NOWaf8qtszMRLXEwIxfk5beu4RxdT0%3D" alt="noellabo " width="100"></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=19356899">sheeta.s </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=5827393">motcha </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=20494440">axtuki1 </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=13737140">Satsuki Yanagi</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/takimura">takimura </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/aqz">aqz tamaina</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=9109588">nafuchoco </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=16900731">Atsuko Tominaga</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=4389829">natalie</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=26144593">EBISUME</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/noellabo">noellabo </a></td>
|
||||||
|
</tr></table>
|
||||||
|
<table><tr>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/2384390/5681180e1efb46a8b28e0e8d4c8b9037/1.jpg?token-time=2145916800&token-hash=SJcMy-Q1BcS940-LFUVOMfR7-5SgrzsEQGhYb3yowFk%3D" alt="CG " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/18072312/98e894d960314fa7bc236a72a39488fe/1.jpg?token-time=2145916800&token-hash=7bkMqTwHPRsJPGAq42PYdDXDZBVGLqdgr1ZmBxX8GFQ%3D" alt="Hekovic " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/24641572/b4fd175424814f15b0ca9178d2d2d2e4/1.png?token-time=2145916800&token-hash=e2fyqdbuJbpCckHcwux7rbuW6OPkKdERcus0u2wIEWU%3D" alt="uroco @99" width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/14661394" alt="Chandler " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/5731881/4b6038e6cda34c04b83a5fcce3806a93/1.png?token-time=2145916800&token-hash=hBayGfOmQH3kRMdNnDe4oCZD_9fsJWSt29xXR3KRMVk%3D" alt="Nokotaro Takeda" width="100"></td>
|
||||||
|
<td><img src="https://c8.patreon.com/2/200/23932002" alt="nenohi " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/9481273/7fa89168e72943859c3d3c96e424ed31/4.jpeg?token-time=2145916800&token-hash=5w1QV1qXe-NdWbdFmp1H7O_-QBsSiV0haumk3XTHIEg%3D" alt="Efertone " width="100"></td>
|
||||||
|
<td><img src="https://c10.patreonusercontent.com/3/eyJ3IjoyMDB9/patreon-media/p/user/12531784/93a45137841849329ba692da92ac7c60/1.jpeg?token-time=2145916800&token-hash=vGe7wXGqmA8Q7m-kDNb6fyGdwk-Dxk4F-ut8ZZu51RM%3D" alt="Takashi Shibuya" width="100"></td>
|
||||||
|
</tr><tr>
|
||||||
|
<td><a href="https://www.patreon.com/Corset">CG </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/hekovic">Hekovic </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=24641572">uroco @99</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=14661394">Chandler </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/takenoko">Nokotaro Takeda</a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=23932002">nenohi </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/efertone">Efertone </a></td>
|
||||||
|
<td><a href="https://www.patreon.com/user?u=12531784">Takashi Shibuya</a></td>
|
||||||
|
</tr></table>
|
||||||
|
|
||||||
|
**Last updated:** Sun, 26 Jul 2020 07:00:10 UTC
|
||||||
|
<!-- PATREON_END -->
|
||||||
|
|
||||||
|
[backer-url]: #backers
|
||||||
|
[backer-badge]: https://opencollective.com/misskey/backers/badge.svg
|
||||||
|
[backers-image]: https://opencollective.com/misskey/backers.svg
|
||||||
|
[sponsor-url]: #sponsors
|
||||||
|
[sponsor-badge]: https://opencollective.com/misskey/sponsors/badge.svg
|
||||||
|
[sponsors-image]: https://opencollective.com/misskey/sponsors.svg
|
||||||
|
[support-url]: https://opencollective.com/misskey#support
|
||||||
|
|
||||||
|
[syuilo-link]: https://syuilo.com
|
||||||
|
[syuilo-icon]: https://avatars2.githubusercontent.com/u/4439005?v=3&s=70
|
||||||
|
40
ROADMAP.md
@ -1,40 +0,0 @@
|
|||||||
# Roadmap
|
|
||||||
The order of individual tasks is a guide only and is subject to change depending on the situation.
|
|
||||||
Also, the later tasks are more indefinite and are subject to change as development progresses.
|
|
||||||
|
|
||||||
## (1) Improve maintainability \<current phase\>
|
|
||||||
This is the phase we are at now. We need to make a high-maintenance environment that can withstand future development.
|
|
||||||
|
|
||||||
- ~~Make the number of type errors zero (backend)~~ → Done ✔️
|
|
||||||
- Make the number of type errors zero (frontend)
|
|
||||||
- Improve CI
|
|
||||||
- ~~Fix tests~~ → Done ✔️
|
|
||||||
- Fix random test failures - https://github.com/misskey-dev/misskey/issues/7985 and https://github.com/misskey-dev/misskey/issues/7986
|
|
||||||
- Add more tests
|
|
||||||
- ~~May need to implement a mechanism that allows for DI~~ → Done ✔️
|
|
||||||
- https://github.com/misskey-dev/misskey/pull/9085
|
|
||||||
- ~~Measure coverage~~ → Done ✔️
|
|
||||||
- https://github.com/misskey-dev/misskey/pull/9081
|
|
||||||
- Improve documentation
|
|
||||||
- Refactoring
|
|
||||||
- Extract the logic of each endpoint definition into a service and just call it
|
|
||||||
|
|
||||||
## (2) Improve functionality
|
|
||||||
Once Phase 1 is complete and an environment conducive to the development of a stable system is in place, the implementation of new functions can begin gradually.
|
|
||||||
|
|
||||||
- Improve features for moderation
|
|
||||||
- ~~OAuth2 support https://github.com/misskey-dev/misskey/issues/8262~~ → Done ✔️
|
|
||||||
- GraphQL support?
|
|
||||||
|
|
||||||
## (3) Improve scalability
|
|
||||||
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.
|
|
@ -1,8 +0,0 @@
|
|||||||
# 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)**.
|
|
||||||
|
|
||||||
This will allow us to assess the risk, and make a fix available before we add a
|
|
||||||
bug report to the GitHub repository.
|
|
||||||
|
|
||||||
Thanks for helping make Misskey safe for everyone.
|
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
BIN
assets/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.1 KiB |
BIN
assets/icons/192.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
assets/icons/512.png
Normal file
After Width: | Height: | Size: 20 KiB |
4
assets/robots.txt
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
user-agent: *
|
||||||
|
allow: /
|
||||||
|
|
||||||
|
# todo: sitemap
|
@ -1,67 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
id="svg10"
|
|
||||||
version="1.1"
|
|
||||||
viewBox="0 0 162.642 54.261"
|
|
||||||
height="205.08"
|
|
||||||
width="614.71">
|
|
||||||
<metadata
|
|
||||||
id="metadata16">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<style>
|
|
||||||
#g8 {
|
|
||||||
animation-name: floating;
|
|
||||||
animation-duration: 3s;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-timing-function: ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes floating {
|
|
||||||
0% { transform: translate(0, 0px); }
|
|
||||||
50% { transform: translate(0, -5px); }
|
|
||||||
100% { transform: translate(0, 0px); }
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<linearGradient id="myGradient" gradientTransform="rotate(90)">
|
|
||||||
<stop offset="5%" stop-color="#A1CA03" />
|
|
||||||
<stop offset="95%" stop-color="#91BA03" />
|
|
||||||
</linearGradient>
|
|
||||||
<defs
|
|
||||||
id="defs14" />
|
|
||||||
<g
|
|
||||||
id="g8"
|
|
||||||
fill="url('#myGradient')"
|
|
||||||
word-spacing="0"
|
|
||||||
letter-spacing="0"
|
|
||||||
font-family="OTADESIGN Rounded"
|
|
||||||
font-weight="400">
|
|
||||||
<g
|
|
||||||
id="g4"
|
|
||||||
style="line-height:476.69509888px;-inkscape-font-specification:'OTADESIGN Rounded'">
|
|
||||||
<path
|
|
||||||
id="path2"
|
|
||||||
font-size="141.034"
|
|
||||||
aria-label="Mi"
|
|
||||||
d="m 27.595,34.59 c -1.676,0.006 -3.115,-1.004 -3.793,-2.179 -0.363,-0.513 -1.08,-0.696 -1.09,0 v 3.214 c 0,1.291 -0.47,2.408 -1.412,3.35 -0.915,0.914 -2.031,1.371 -3.35,1.371 -1.29,0 -2.407,-0.457 -3.349,-1.372 -0.914,-0.941 -1.372,-2.058 -1.372,-3.349 V 17.95 c 0,-0.995 0.283,-1.896 0.848,-2.703 0.591,-0.834 1.345,-1.413 2.26,-1.735 0.516591,-0.189385 1.062793,-0.285215 1.613,-0.283 1.453,0 2.664,0.565 3.632,1.695 l 4.832,5.608 c 0.108,0.08 0.424,0.697 1.18,0.697 0.758,0 1.115,-0.617 1.222,-0.698 l 4.791,-5.607 c 0.996,-1.13 2.22,-1.695 3.673,-1.695 0.538,0 1.076,0.094 1.614,0.283 0.914,0.322 1.654,0.9 2.22,1.735 0.591,0.807 0.887,1.708 0.887,2.703 v 17.675 c 0,1.291 -0.47,2.408 -1.412,3.35 -0.915,0.914 -2.032,1.371 -3.35,1.371 -1.291,0 -2.407,-0.457 -3.35,-1.372 -0.914,-0.941 -1.371,-2.058 -1.371,-3.349 v -3.214 c -0.08,-0.877 -0.855,-0.324 -1.13,0 -0.726,1.345 -2.118,2.173 -3.793,2.18 z M 47.806,21.38 c -1.13,0 -2.098333,-0.39 -2.905,-1.17 -0.78,-0.806667 -1.17,-1.775 -1.17,-2.905 0,-1.13 0.39,-2.085 1.17,-2.865 0.806667,-0.806667 1.775,-1.21 2.905,-1.21 1.13,0 2.098667,0.403333 2.906,1.21 0.806667,0.78 1.21,1.735 1.21,2.865 0,1.13 -0.403333,2.098333 -1.21,2.905 -0.807333,0.78 -1.776,1.17 -2.906,1.17 z m 0.04,0.808 c 1.13,0 2.085333,0.403333 2.866,1.21 0.806667,0.806667 1.21,1.775333 1.21,2.906 v 9.967 c 0,1.13 -0.403333,2.098333 -1.21,2.905 -0.78,0.78 -1.735333,1.17 -2.866,1.17 -1.129333,0 -2.097667,-0.39 -2.905,-1.17 -0.806667,-0.806667 -1.21,-1.775 -1.21,-2.905 v -9.967 c 0,-1.13 0.403333,-2.098667 1.21,-2.906 0.806667,-0.806667 1.775,-1.21 2.905,-1.21 z"
|
|
||||||
style="font-size:141.03399658px;-inkscape-font-specification:'OTADESIGN Rounded'" />
|
|
||||||
</g>
|
|
||||||
<path
|
|
||||||
id="path6"
|
|
||||||
d="M60.925 27.24q.968.243 2.42.525 2.42.403 3.792 1.29 2.582 1.695 2.582 5.083 0 2.743-1.815 4.478-2.098 2.017-5.85 2.017-2.742 0-6.13-.767-1.09-.242-1.776-1.089-.645-.847-.645-1.896 0-1.29.887-2.178.928-.928 2.179-.928.363 0 .685.081 1.17.242 4.478.605.444 0 .968-.04.202 0 .202-.242.04-.202-.242-.283-1.372-.242-2.542-.524-1.33-.282-1.896-.484-1.129-.323-1.895-.847-2.582-1.694-2.622-5.083 0-2.702 1.855-4.477 2.26-2.179 6.414-1.977 2.783.121 5.567.726 1.048.242 1.734 1.09.686.846.686 1.936 0 1.25-.928 2.178-.887.887-2.178.887-.323 0-.645-.08-1.17-.242-4.518-.565-.404-.04-.767 0-.323.04-.323.242.04.242.323.323zm17.555 0q.968.243 2.42.525 2.42.403 3.792 1.29 2.581 1.695 2.581 5.083 0 2.743-1.815 4.478-2.098 2.017-5.849 2.017-2.743 0-6.131-.767-1.09-.242-1.775-1.089-.646-.847-.646-1.896 0-1.29.888-2.178.927-.928 2.178-.928.363 0 .686.081 1.17.242 4.477.605.444 0 .968-.04.202 0 .202-.242.04-.202-.242-.283-1.371-.242-2.541-.524-1.331-.282-1.896-.484-1.13-.323-1.896-.847-2.582-1.694-2.622-5.083 0-2.702 1.855-4.477 2.26-2.179 6.414-1.977 2.784.121 5.567.726 1.049.242 1.735 1.09.685.846.685 1.936 0 1.25-.927 2.178-.888.887-2.179.887-.322 0-.645-.08-1.17-.242-4.518-.565-.403-.04-.767 0-.322.04-.322.242.04.242.322.323zm26.075 3.335q.12.08 2.864 2.783 1.25 1.21 1.25 2.945 0 1.613-1.17 2.864-1.17 1.21-2.904 1.21-1.654 0-2.864-1.17l-4.034-3.913q-.161-.12-.323-.12-.322 0-.322 1.21 0 1.694-1.21 2.904-1.21 1.17-2.905 1.17-1.694 0-2.904-1.17-1.17-1.21-1.17-2.905V17.586q0-1.694 1.17-2.864 1.21-1.21 2.904-1.21t2.904 1.21q1.21 1.17 1.21 2.864v6.293q0 .403.283.524.242.121.524-.08.162-.081 4.841-3.188 1.049-.645 2.259-.645 2.219 0 3.429 1.815.645 1.05.645 2.26 0 2.218-1.815 3.428l-2.541 1.614v.04l-.081.04q-.565.363-.04.888zm15.599 10.058q-4.195 0-7.18-2.945-2.945-2.985-2.945-7.18 0-4.155 2.945-7.1 2.985-2.985 7.18-2.985 4.155 0 6.979 2.784.928.927.928 2.259 0 1.33-.928 2.259l-4.68 4.639q-1.008 1.008-2.016 1.008-1.453 0-2.26-.807-.806-.807-.806-2.138 0-1.29.928-2.218l.806-.847q.162-.121.081-.243-.12-.08-.323-.04-.806.202-1.371.807-1.13 1.09-1.13 2.622 0 1.573 1.09 2.703 1.13 1.089 2.702 1.089 1.533 0 2.622-1.13.928-.927 2.26-.927 1.33 0 2.258.927.928.928.928 2.26 0 1.33-.928 2.258-2.985 2.945-7.14 2.945zm29.259-15.786v5.607q0 .564-.08 1.21v7.382q0 4.518-2.744 7.22-2.702 2.703-7.301 2.703-2.662 0-4.8-1.008-2.138-.968-2.138-3.348 0-.807.363-1.533.968-2.179 3.348-2.179.565 0 1.573.323 1.009.323 1.654.323 1.694 0 2.219-.726.201-.283.08-.444-.161-.242-.564-.161-.686.12-1.493.12-4.074 0-6.979-2.904-2.904-2.904-2.904-6.978v-5.607q0-1.695 1.17-2.864 1.21-1.21 2.904-1.21t2.905 1.21q1.21 1.17 1.21 2.864v5.607q0 .685.484 1.21.524.484 1.21.484.726 0 1.21-.484.484-.525.484-1.21v-5.607q0-1.695 1.21-2.864 1.21-1.21 2.905-1.21 1.694 0 2.864 1.21 1.21 1.17 1.21 2.864z"
|
|
||||||
style="line-height:136.34428406px;-inkscape-font-specification:'OTADESIGN Rounded'" />
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 6.1 KiB |
@ -1,4 +0,0 @@
|
|||||||
apiVersion: v2
|
|
||||||
name: misskey
|
|
||||||
version: 0.0.0
|
|
||||||
description: This chart is created for the purpose of previewing Pull Requests. Do not use this for production use.
|
|
@ -1,227 +0,0 @@
|
|||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
# Misskey configuration
|
|
||||||
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
||||||
|
|
||||||
# ┌─────┐
|
|
||||||
#───┘ URL └─────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
# Final accessible URL seen by a user.
|
|
||||||
# url: https://example.tld/
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# URL SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
# ┌───────────────────────┐
|
|
||||||
#───┘ Port and TLS settings └───────────────────────────────────
|
|
||||||
|
|
||||||
#
|
|
||||||
# Misskey supports two deployment options for public.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Option 1: With Reverse Proxy
|
|
||||||
#
|
|
||||||
# +----- https://example.tld/ ------------+
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
|
|
||||||
# +------+ |+-------------+ +----------------+|
|
|
||||||
# +---------------------------------------+
|
|
||||||
#
|
|
||||||
# You need to setup reverse proxy. (eg. nginx)
|
|
||||||
# You do not define 'https' section.
|
|
||||||
|
|
||||||
# Option 2: Standalone
|
|
||||||
#
|
|
||||||
# +- https://example.tld/ -+
|
|
||||||
# +------+ | +---------------+ |
|
|
||||||
# | User | ---> | | Misskey (443) | |
|
|
||||||
# +------+ | +---------------+ |
|
|
||||||
# +------------------------+
|
|
||||||
#
|
|
||||||
# You need to run Misskey as root.
|
|
||||||
# You need to set Certificate in 'https' section.
|
|
||||||
|
|
||||||
# To use option 1, uncomment below line.
|
|
||||||
port: 3000 # A port that your Misskey server should listen.
|
|
||||||
|
|
||||||
# To use option 2, uncomment below lines.
|
|
||||||
#port: 443
|
|
||||||
|
|
||||||
#https:
|
|
||||||
# # path for certification
|
|
||||||
# key: /etc/letsencrypt/live/example.tld/privkey.pem
|
|
||||||
# cert: /etc/letsencrypt/live/example.tld/fullchain.pem
|
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
|
||||||
|
|
||||||
db:
|
|
||||||
host: localhost
|
|
||||||
port: 5432
|
|
||||||
|
|
||||||
# Database name
|
|
||||||
db: misskey
|
|
||||||
|
|
||||||
# Auth
|
|
||||||
user: example-misskey-user
|
|
||||||
pass: example-misskey-pass
|
|
||||||
|
|
||||||
# Whether disable Caching queries
|
|
||||||
#disableCache: true
|
|
||||||
|
|
||||||
# Extra Connection options
|
|
||||||
#extra:
|
|
||||||
# ssl: true
|
|
||||||
|
|
||||||
dbReplications: false
|
|
||||||
|
|
||||||
# You can configure any number of replicas here
|
|
||||||
#dbSlaves:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
# -
|
|
||||||
# host:
|
|
||||||
# port:
|
|
||||||
# db:
|
|
||||||
# user:
|
|
||||||
# pass:
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Redis configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
redis:
|
|
||||||
host: localhost
|
|
||||||
port: 6379
|
|
||||||
#family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
#pass: example-pass
|
|
||||||
#prefix: example-prefix
|
|
||||||
#db: 1
|
|
||||||
|
|
||||||
#redisForPubsub:
|
|
||||||
# host: localhost
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForJobQueue:
|
|
||||||
# host: localhost
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForTimelines:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
#redisForReactions:
|
|
||||||
# host: redis
|
|
||||||
# port: 6379
|
|
||||||
# #family: 0 # 0=Both, 4=IPv4, 6=IPv6
|
|
||||||
# #pass: example-pass
|
|
||||||
# #prefix: example-prefix
|
|
||||||
# #db: 1
|
|
||||||
|
|
||||||
# ┌───────────────────────────┐
|
|
||||||
#───┘ MeiliSearch configuration └─────────────────────────────
|
|
||||||
|
|
||||||
#meilisearch:
|
|
||||||
# host: localhost
|
|
||||||
# port: 7700
|
|
||||||
# apiKey: ''
|
|
||||||
# ssl: true
|
|
||||||
# index: ''
|
|
||||||
|
|
||||||
# ┌───────────────┐
|
|
||||||
#───┘ ID generation └───────────────────────────────────────────
|
|
||||||
|
|
||||||
# You can select the ID generation method.
|
|
||||||
# You don't usually need to change this setting, but you can
|
|
||||||
# change it according to your preferences.
|
|
||||||
|
|
||||||
# Available methods:
|
|
||||||
# aid ... Short, Millisecond accuracy
|
|
||||||
# aidx ... Millisecond accuracy
|
|
||||||
# meid ... Similar to ObjectID, Millisecond accuracy
|
|
||||||
# ulid ... Millisecond accuracy
|
|
||||||
# objectid ... This is left for backward compatibility
|
|
||||||
|
|
||||||
# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
|
|
||||||
# ID SETTINGS AFTER THAT!
|
|
||||||
|
|
||||||
id: "aidx"
|
|
||||||
|
|
||||||
# ┌────────────────┐
|
|
||||||
#───┘ Error tracking └──────────────────────────────────────────
|
|
||||||
|
|
||||||
# Sentry is available for error tracking.
|
|
||||||
# See the Sentry documentation for more details on options.
|
|
||||||
|
|
||||||
#sentryForBackend:
|
|
||||||
# enableNodeProfiling: true
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
#sentryForFrontend:
|
|
||||||
# options:
|
|
||||||
# dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0'
|
|
||||||
|
|
||||||
# ┌─────────────────────┐
|
|
||||||
#───┘ Other configuration └─────────────────────────────────────
|
|
||||||
|
|
||||||
# Whether disable HSTS
|
|
||||||
#disableHsts: true
|
|
||||||
|
|
||||||
# Number of worker processes
|
|
||||||
#clusterLimit: 1
|
|
||||||
|
|
||||||
# Job concurrency per worker
|
|
||||||
# deliverJobConcurrency: 128
|
|
||||||
# inboxJobConcurrency: 16
|
|
||||||
|
|
||||||
# Job rate limiter
|
|
||||||
# deliverJobPerSec: 128
|
|
||||||
# inboxJobPerSec: 32
|
|
||||||
|
|
||||||
# Job attempts
|
|
||||||
# deliverJobMaxAttempts: 12
|
|
||||||
# inboxJobMaxAttempts: 8
|
|
||||||
|
|
||||||
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
|
||||||
#outgoingAddressFamily: ipv4
|
|
||||||
|
|
||||||
# Proxy for HTTP/HTTPS
|
|
||||||
#proxy: http://127.0.0.1:3128
|
|
||||||
|
|
||||||
#proxyBypassHosts: [
|
|
||||||
# 'example.com',
|
|
||||||
# '192.0.2.8'
|
|
||||||
#]
|
|
||||||
|
|
||||||
# Proxy for SMTP/SMTPS
|
|
||||||
#proxySmtp: http://127.0.0.1:3128 # use HTTP/1.1 CONNECT
|
|
||||||
#proxySmtp: socks4://127.0.0.1:1080 # use SOCKS4
|
|
||||||
#proxySmtp: socks5://127.0.0.1:1080 # use SOCKS5
|
|
||||||
|
|
||||||
# Media Proxy
|
|
||||||
#mediaProxy: https://example.com/proxy
|
|
||||||
|
|
||||||
# Sign to ActivityPub GET request (default: true)
|
|
||||||
signToActivityPubGet: true
|
|
||||||
|
|
||||||
#allowedPrivateNetworks: [
|
|
||||||
# '127.0.0.1/32'
|
|
||||||
#]
|
|
||||||
|
|
||||||
# Upload or download file size limits (bytes)
|
|
||||||
#maxFileSize: 262144000
|
|
@ -1,8 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ConfigMap
|
|
||||||
metadata:
|
|
||||||
name: {{ include "misskey.fullname" . }}-configuration
|
|
||||||
data:
|
|
||||||
default.yml: |-
|
|
||||||
{{ .Files.Get "files/default.yml"|nindent 4 }}
|
|
||||||
url: {{ .Values.url }}
|
|
@ -1,47 +0,0 @@
|
|||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: {{ include "misskey.fullname" . }}
|
|
||||||
labels:
|
|
||||||
{{- include "misskey.labels" . | nindent 4 }}
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
{{- include "misskey.selectorLabels" . | nindent 6 }}
|
|
||||||
replicas: 1
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
{{- include "misskey.selectorLabels" . | nindent 8 }}
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: misskey
|
|
||||||
image: {{ .Values.image }}
|
|
||||||
env:
|
|
||||||
- name: NODE_ENV
|
|
||||||
value: {{ .Values.environment }}
|
|
||||||
volumeMounts:
|
|
||||||
- name: {{ include "misskey.fullname" . }}-configuration
|
|
||||||
mountPath: /misskey/.config
|
|
||||||
readOnly: true
|
|
||||||
ports:
|
|
||||||
- containerPort: 3000
|
|
||||||
- name: postgres
|
|
||||||
image: postgres:15-alpine
|
|
||||||
env:
|
|
||||||
- name: POSTGRES_USER
|
|
||||||
value: "example-misskey-user"
|
|
||||||
- name: POSTGRES_PASSWORD
|
|
||||||
value: "example-misskey-pass"
|
|
||||||
- name: POSTGRES_DB
|
|
||||||
value: "misskey"
|
|
||||||
ports:
|
|
||||||
- containerPort: 5432
|
|
||||||
- name: redis
|
|
||||||
image: redis:7-alpine
|
|
||||||
ports:
|
|
||||||
- containerPort: 6379
|
|
||||||
volumes:
|
|
||||||
- name: {{ include "misskey.fullname" . }}-configuration
|
|
||||||
configMap:
|
|
||||||
name: {{ include "misskey.fullname" . }}-configuration
|
|
@ -1,14 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: {{ include "misskey.fullname" . }}
|
|
||||||
annotations:
|
|
||||||
dev.okteto.com/auto-ingress: "true"
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 3000
|
|
||||||
protocol: TCP
|
|
||||||
name: http
|
|
||||||
selector:
|
|
||||||
{{- include "misskey.selectorLabels" . | nindent 4 }}
|
|
@ -1,62 +0,0 @@
|
|||||||
{{/*
|
|
||||||
Expand the name of the chart.
|
|
||||||
*/}}
|
|
||||||
{{- define "misskey.name" -}}
|
|
||||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Create a default fully qualified app name.
|
|
||||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
|
||||||
If release name contains chart name it will be used as a full name.
|
|
||||||
*/}}
|
|
||||||
{{- define "misskey.fullname" -}}
|
|
||||||
{{- if .Values.fullnameOverride }}
|
|
||||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- else }}
|
|
||||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
|
||||||
{{- if contains $name .Release.Name }}
|
|
||||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- else }}
|
|
||||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Create chart name and version as used by the chart label.
|
|
||||||
*/}}
|
|
||||||
{{- define "misskey.chart" -}}
|
|
||||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Common labels
|
|
||||||
*/}}
|
|
||||||
{{- define "misskey.labels" -}}
|
|
||||||
helm.sh/chart: {{ include "misskey.chart" . }}
|
|
||||||
{{ include "misskey.selectorLabels" . }}
|
|
||||||
{{- if .Chart.AppVersion }}
|
|
||||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
|
||||||
{{- end }}
|
|
||||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Selector labels
|
|
||||||
*/}}
|
|
||||||
{{- define "misskey.selectorLabels" -}}
|
|
||||||
app.kubernetes.io/name: {{ include "misskey.name" . }}
|
|
||||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
Create the name of the service account to use
|
|
||||||
*/}}
|
|
||||||
{{- define "misskey.serviceAccountName" -}}
|
|
||||||
{{- if .Values.serviceAccount.create }}
|
|
||||||
{{- default (include "misskey.fullname" .) .Values.serviceAccount.name }}
|
|
||||||
{{- else }}
|
|
||||||
{{- default "default" .Values.serviceAccount.name }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
@ -1,3 +0,0 @@
|
|||||||
url: https://example.tld/
|
|
||||||
image: okteto.dev/misskey
|
|
||||||
environment: production
|
|
@ -1,4 +0,0 @@
|
|||||||
coverage:
|
|
||||||
status:
|
|
||||||
project: false
|
|
||||||
patch: false
|
|