Skip to content

Commit e40be41

Browse files
committed
Revert "2024.5월 업데이트 분 (#3)"
This reverts commit a953dcf.
1 parent a953dcf commit e40be41

File tree

497 files changed

+16497
-28889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

497 files changed

+16497
-28889
lines changed

.config/docker_example.yml

+2-17
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ redis:
106106
# ┌───────────────────────────┐
107107
#───┘ MeiliSearch configuration └─────────────────────────────
108108

109-
# You can set scope to local (default value) or global
109+
# You can set scope to local (default value) or global
110110
# (include notes from remote).
111111

112112
#meilisearch:
@@ -136,21 +136,6 @@ redis:
136136

137137
id: 'aidx'
138138

139-
# ┌────────────────┐
140-
#───┘ Error tracking └──────────────────────────────────────────
141-
142-
# Sentry is available for error tracking.
143-
# See the Sentry documentation for more details on options.
144-
145-
#sentryForBackend:
146-
# enableNodeProfiling: true
147-
# options:
148-
# dsn: 'https://[email protected]/0'
149-
150-
#sentryForFrontend:
151-
# options:
152-
# dsn: 'https://[email protected]/0'
153-
154139
# ┌─────────────────────┐
155140
#───┘ Other configuration └─────────────────────────────────────
156141

@@ -200,7 +185,7 @@ proxyRemoteFiles: true
200185
signToActivityPubGet: true
201186

202187
# For security reasons, uploading attachments from the intranet is prohibited,
203-
# but exceptions can be made from the following settings. Default value is "undefined".
188+
# but exceptions can be made from the following settings. Default value is "undefined".
204189
# Read changelog to learn more (Improvements of 12.90.0 (2021/09/04)).
205190
#allowedPrivateNetworks: [
206191
# '127.0.0.1/32'

.config/example.yml

+1-16
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
# Option 3: If neither of the above applies to you.
3939
# (In this case, the source code should be published
4040
# on the Misskey interface. IT IS NOT ENOUGH TO
41-
# DISCLOSE THE SOURCE CODE WHEN A USER REQUESTS IT BY
41+
# DISCLOSE THE SOURCE CODE WEHN A USER REQUESTS IT BY
4242
# E-MAIL OR OTHER MEANS. If you are not satisfied
4343
# with this, it is recommended that you read the
4444
# license again carefully. Anyway, enabling this
@@ -205,21 +205,6 @@ redis:
205205

206206
id: 'aidx'
207207

208-
# ┌────────────────┐
209-
#───┘ Error tracking └──────────────────────────────────────────
210-
211-
# Sentry is available for error tracking.
212-
# See the Sentry documentation for more details on options.
213-
214-
#sentryForBackend:
215-
# enableNodeProfiling: true
216-
# options:
217-
# dsn: 'https://[email protected]/0'
218-
219-
#sentryForFrontend:
220-
# options:
221-
# dsn: 'https://[email protected]/0'
222-
223208
# ┌─────────────────────┐
224209
#───┘ Other configuration └─────────────────────────────────────
225210

.devcontainer/devcontainer.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"service": "app",
55
"workspaceFolder": "/workspace",
66
"features": {
7-
"ghcr.io/devcontainers/features/node:1": {
8-
"version": "20.12.2"
7+
"ghcr.io/devcontainers-contrib/features/pnpm:2": {
8+
"version": "8.9.2"
99
},
10-
"ghcr.io/devcontainers-contrib/features/corepack:1": {}
10+
"ghcr.io/devcontainers/features/node:1": {
11+
"version": "20.10.0"
12+
}
1113
},
1214
"forwardPorts": [3000],
1315
"postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh",
@@ -17,6 +19,7 @@
1719
"editorconfig.editorconfig",
1820
"dbaeumer.vscode-eslint",
1921
"Vue.volar",
22+
"Vue.vscode-typescript-vue-plugin",
2023
"Orta.vscode-jest",
2124
"dbaeumer.vscode-eslint",
2225
"mrmlnc.vscode-json5"

.devcontainer/devcontainer.yml

-15
Original file line numberDiff line numberDiff line change
@@ -132,21 +132,6 @@ redis:
132132

133133
id: 'aidx'
134134

135-
# ┌────────────────┐
136-
#───┘ Error tracking └──────────────────────────────────────────
137-
138-
# Sentry is available for error tracking.
139-
# See the Sentry documentation for more details on options.
140-
141-
#sentryForBackend:
142-
# enableNodeProfiling: true
143-
# options:
144-
# dsn: 'https://[email protected]/0'
145-
146-
#sentryForFrontend:
147-
# options:
148-
# dsn: 'https://[email protected]/0'
149-
150135
# ┌─────────────────────┐
151136
#───┘ Other configuration └─────────────────────────────────────
152137

.devcontainer/init.sh

-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ set -xe
44

55
sudo chown -R node /workspace
66
git submodule update --init
7-
corepack install
8-
corepack enable
97
pnpm config set store-dir /home/node/.local/share/pnpm/store
108
pnpm install --frozen-lockfile
119
cp .devcontainer/devcontainer.yml .config/default.yml

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
patreon: syuilo

.github/workflows/check-misskey-js-autogen.yml

+74-73
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,29 @@ on:
55
branches:
66
- master
77
- develop
8-
- improve-misskey-js-autogen-check
98
paths:
109
- packages/backend/**
1110

1211
jobs:
13-
# pull_request_target safety: permissions: read-all, and there are no secrets used in this job
14-
generate-misskey-js:
12+
check-misskey-js-autogen:
1513
runs-on: ubuntu-latest
1614
permissions:
17-
contents: read
18-
if: ${{ github.event.pull_request.mergeable == null || github.event.pull_request.mergeable == true }}
15+
pull-requests: write
16+
17+
env:
18+
api_json_name: "api-head.json"
19+
1920
steps:
2021
- name: checkout
2122
uses: actions/[email protected]
2223
with:
2324
submodules: true
24-
ref: refs/pull/${{ github.event.pull_request.number }}/merge
25+
ref: ${{ github.event.pull_request.head.sha }}
2526

2627
- name: setup pnpm
27-
uses: pnpm/action-setup@v4
28+
uses: pnpm/action-setup@v3
29+
with:
30+
version: 8
2831

2932
- name: setup node
3033
id: setup-node
@@ -36,81 +39,79 @@ jobs:
3639
- name: install dependencies
3740
run: pnpm i --frozen-lockfile
3841

39-
# generate api.json
40-
- name: Copy Config
41-
run: cp .config/example.yml .config/default.yml
42-
- name: Build
43-
run: pnpm build
44-
- name: Generate API JSON
45-
run: pnpm --filter backend generate-api-json
46-
47-
# build misskey js
48-
- name: Build misskey-js
49-
run: |-
50-
cp packages/backend/built/api.json packages/misskey-js/generator/api.json
51-
pnpm run --filter misskey-js-type-generator generate
52-
53-
# packages/misskey-js/generator/built/autogen
54-
- name: Upload Generated
55-
uses: actions/upload-artifact@v4
56-
with:
57-
name: generated-misskey-js
58-
path: packages/misskey-js/generator/built/autogen
59-
60-
# pull_request_target safety: permissions: read-all, and there are no secrets used in this job
61-
get-actual-misskey-js:
62-
runs-on: ubuntu-latest
63-
permissions:
64-
contents: read
65-
if: ${{ github.event.pull_request.mergeable == null || github.event.pull_request.mergeable == true }}
66-
steps:
67-
- name: checkout
68-
uses: actions/[email protected]
42+
- name: wait get-api-diff
43+
uses: lewagon/[email protected]
6944
with:
70-
submodules: true
71-
ref: refs/pull/${{ github.event.pull_request.number }}/merge
45+
ref: ${{ github.event.pull_request.head.sha }}
46+
check-regexp: get-from-misskey .+
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}
48+
wait-interval: 30
7249

73-
- name: Upload From Merged
74-
uses: actions/upload-artifact@v4
50+
- name: Download artifact
51+
uses: actions/[email protected]
7552
with:
76-
name: actual-misskey-js
77-
path: packages/misskey-js/src/autogen
53+
script: |
54+
const fs = require('fs');
55+
56+
const workflows = await github.rest.actions.listWorkflowRunsForRepo({
57+
owner: context.repo.owner,
58+
repo: context.repo.repo,
59+
head_sha: `${{ github.event.pull_request.head.sha }}`
60+
}).then(x => x.data.workflow_runs);
61+
62+
console.log(workflows.map(x => ({name: x.name, title: x.display_title})));
63+
64+
const run_id = workflows.find(x => x.name.includes("Get api.json from Misskey")).id;
65+
66+
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
67+
owner: context.repo.owner,
68+
repo: context.repo.repo,
69+
run_id: run_id,
70+
});
71+
72+
let matchArtifacts = allArtifacts.data.artifacts.filter((artifact) => {
73+
return artifact.name.startsWith("api-artifact-") || artifact.name == "api-artifact"
74+
});
75+
76+
await Promise.all(matchArtifacts.map(async (artifact) => {
77+
let download = await github.rest.actions.downloadArtifact({
78+
owner: context.repo.owner,
79+
repo: context.repo.repo,
80+
artifact_id: artifact.id,
81+
archive_format: 'zip',
82+
});
83+
await fs.promises.writeFile(`${process.env.GITHUB_WORKSPACE}/${artifact.name}.zip`, Buffer.from(download.data));
84+
}));
85+
86+
- name: unzip artifacts
87+
run: |-
88+
find . -mindepth 1 -maxdepth 1 -type f -name '*.zip' -exec unzip {} -d . ';'
89+
ls -la
7890
79-
# pull_request_target safety: nothing is cloned from repository
80-
comment-misskey-js-autogen:
81-
runs-on: ubuntu-latest
82-
needs: [generate-misskey-js, get-actual-misskey-js]
83-
permissions:
84-
pull-requests: write
85-
steps:
86-
- name: download generated-misskey-js
87-
uses: actions/download-artifact@v4
88-
with:
89-
name: generated-misskey-js
90-
path: misskey-js-generated
91+
- name: get head checksum
92+
run: |-
93+
checksum=$(realpath head_checksum)
9194
92-
- name: download actual-misskey-js
93-
uses: actions/download-artifact@v4
94-
with:
95-
name: actual-misskey-js
96-
path: misskey-js-actual
95+
cd packages/misskey-js/src
96+
find autogen -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
97+
cd ../../..
9798
98-
- name: check misskey-js changes
99-
id: check-changes
100-
run: |
101-
diff -r -u --label=generated --label=on-tree ./misskey-js-generated ./misskey-js-actual > misskey-js.diff || true
99+
- name: build autogen
100+
run: |-
101+
checksum=$(realpath ${api_json_name}_checksum)
102+
mv $api_json_name packages/misskey-js/generator/api.json
102103
103-
if [ -s misskey-js.diff ]; then
104-
echo "changes=true" >> $GITHUB_OUTPUT
105-
else
106-
echo "changes=false" >> $GITHUB_OUTPUT
107-
fi
104+
cd packages/misskey-js/generator
105+
pnpm run generate
106+
cd built
107+
find autogen -type f -exec sh -c 'echo $(sed -E "s/^\s+\*\s+generatedAt:.+$//" {} | sha256sum | cut -d" " -f 1) {}' \; > $checksum
108+
cd ../../../..
108109
109-
- name: Print full diff
110-
run: cat ./misskey-js.diff
110+
- name: check update for type definitions
111+
run: diff head_checksum ${api_json_name}_checksum
111112

112113
- name: send message
113-
if: steps.check-changes.outputs.changes == 'true'
114+
if: failure()
114115
uses: thollander/actions-comment-pull-request@v2
115116
with:
116117
comment_tag: check-misskey-js-autogen
@@ -124,7 +125,7 @@ jobs:
124125
```
125126
126127
- name: send message
127-
if: steps.check-changes.outputs.changes == 'false'
128+
if: success()
128129
uses: thollander/actions-comment-pull-request@v2
129130
with:
130131
comment_tag: check-misskey-js-autogen

.github/workflows/check-spdx-license-id.yml

-75
This file was deleted.

0 commit comments

Comments
 (0)