diff --git a/.github/workflows/deploy-test-environment.yml b/.github/workflows/deploy-test-environment.yml new file mode 100644 index 0000000000..cd7a8f328e --- /dev/null +++ b/.github/workflows/deploy-test-environment.yml @@ -0,0 +1,66 @@ +name: Deploy test environment + +on: + push: + workflow_dispatch: + inputs: + repository: + description: 'Repository to deploy (optional)' + required: false + branch: + description: 'Branch to deploy (optional)' + required: false + +jobs: + deploy-test-environment: + runs-on: ubuntu-latest + steps: + - name: Set environment variable (for tput command & pnpm) + run: | + echo "TERM=xterm" >> $GITHUB_ENV + REPOSITORY=${{ github.event.inputs.repository || github.repository }} + echo "REPOSITORY=$REPOSITORY" >> $GITHUB_ENV + BRANCH=${{ github.event.inputs.branch || github.ref_name }} + echo "BRANCH=$BRANCH" >> $GITHUB_ENV + + - name: Checkout + uses: actions/checkout@v4 + with: + repository: ${{ env.REPOSITORY }} + ref: ${{ env.BRANCH }} + + - name: Get the latest commit SHA + run: | + SHA=$(git log -1 --format="%H") + echo "SHA=$SHA" >> $GITHUB_ENV + + - name: Start cloudflare tunnel (quick) + run: | + wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb + sudo dpkg -i cloudflared-linux-amd64.deb + sudo cloudflared tunnel --metrics localhost:55555 --url localhost:3000 > /dev/null 2>&1 & + sleep 15 + TUNNEL_RESPONSE=$(curl http://localhost:55555/quicktunnel) + TUNNEL_DOMAIN=$(echo $TUNNEL_RESPONSE | grep -o '"hostname":"[^"]*' | grep -o '[^"]*$') + echo "::add-mask::$TUNNEL_DOMAIN" + echo "TUNNEL_DOMAIN=$TUNNEL_DOMAIN" >> $GITHUB_ENV + + - name: Install misskey + run: | + wget https://raw.githubusercontent.com/joinmisskey/bash-install/v4/misskey-install.sh + wget https://raw.githubusercontent.com/joinmisskey/bash-install/v4/testenv_githubactions.txt + sed -i "s/host=127.0.0.1/host=$TUNNEL_DOMAIN/g" testenv_githubactions.txt + sed -i "s|git_repository=https://github.com/misskey-dev/misskey|git_repository=https://github.com/$REPOSITORY|g" testenv_githubactions.txt + sed -i "s|git_branch=master|git_branch=$BRANCH|g" testenv_githubactions.txt + sudo chmod 555 ./misskey-install.sh + sudo bash -x ./misskey-install.sh -c ./testenv_githubactions.txt + + - name: Post tunnel info to Discord + run: | + CURRENT_TIME=$(TZ=Asia/Tokyo date +'%Y-%m-%d %H:%M:%S JST') + COMMIT_URL="https://github.com/$REPOSITORY/commit/$SHA" + curl -X POST -H "Content-Type: application/json" -d "{\"content\": \"==============================\nURL: https://$TUNNEL_DOMAIN\nRepository: $REPOSITORY\nBranch: $BRANCH\nCommit: $COMMIT_URL\nTime: $CURRENT_TIME\n==============================\"}" ${{ secrets.DISCORD_WEBHOOK_URL }} + + - name: Wait + run: | + timeout 3600 tail -f /var/log/syslog || true diff --git a/package.json b/package.json index 58140d96c3..40635fa00c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "misskey", - "version": "2024.2.0-beta.7", + "version": "2024.2.0-beta.8", "codename": "nasubi", "repository": { "type": "git", diff --git a/packages/backend/package.json b/packages/backend/package.json index 65b5cbcb36..8f04ac38fc 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -67,9 +67,9 @@ "dependencies": { "@aws-sdk/client-s3": "3.412.0", "@aws-sdk/lib-storage": "3.412.0", - "@bull-board/api": "5.10.2", - "@bull-board/fastify": "5.10.2", - "@bull-board/ui": "5.10.2", + "@bull-board/api": "5.14.0", + "@bull-board/fastify": "5.14.0", + "@bull-board/ui": "5.14.0", "@discordapp/twemoji": "15.0.2", "@fastify/accepts": "4.3.0", "@fastify/cookie": "9.3.1", @@ -85,11 +85,11 @@ "@nestjs/core": "10.2.10", "@nestjs/testing": "10.2.10", "@peertube/http-signature": "1.7.0", - "@simplewebauthn/server": "9.0.0", + "@simplewebauthn/server": "9.0.1", "@sinonjs/fake-timers": "11.2.2", "@smithy/node-http-handler": "2.1.10", "@swc/cli": "0.1.63", - "@swc/core": "1.3.105", + "@swc/core": "1.3.107", "@twemoji/parser": "15.0.0", "accepts": "1.3.8", "ajv": "8.12.0", @@ -98,7 +98,7 @@ "bcryptjs": "2.4.3", "blurhash": "2.0.5", "body-parser": "1.20.2", - "bullmq": "5.1.4", + "bullmq": "5.1.5", "cacheable-lookup": "7.0.0", "cbor": "9.0.1", "chalk": "5.3.0", @@ -115,7 +115,7 @@ "file-type": "19.0.0", "fluent-ffmpeg": "2.1.2", "form-data": "4.0.0", - "got": "14.0.0", + "got": "14.1.0", "happy-dom": "10.0.3", "hpagent": "1.2.0", "http-link-header": "1.1.1", @@ -148,7 +148,7 @@ "otpauth": "9.2.2", "parse5": "7.1.2", "pg": "8.11.3", - "pkce-challenge": "4.0.1", + "pkce-challenge": "4.1.0", "probe-image-size": "7.2.3", "promise-limit": "2.7.0", "pug": "3.0.2", @@ -169,12 +169,12 @@ "slacc": "0.0.10", "strict-event-emitter-types": "2.0.0", "stringz": "2.1.0", - "systeminformation": "5.21.23", + "systeminformation": "5.21.24", "tinycolor2": "1.6.0", "tmp": "0.2.1", "tsc-alias": "1.8.8", "tsconfig-paths": "4.2.0", - "typeorm": "0.3.19", + "typeorm": "0.3.20", "typescript": "5.3.3", "ulid": "2.3.0", "vary": "1.1.2", @@ -185,7 +185,7 @@ "devDependencies": { "@jest/globals": "29.7.0", "@misskey-dev/eslint-plugin": "1.0.0", - "@nestjs/platform-express": "10.3.0", + "@nestjs/platform-express": "10.3.1", "@simplewebauthn/typescript-types": "8.3.4", "@swc/jest": "0.2.31", "@types/accepts": "1.3.7", @@ -204,13 +204,13 @@ "@types/jsrsasign": "10.5.12", "@types/mime-types": "2.1.4", "@types/ms": "0.7.34", - "@types/node": "20.11.5", + "@types/node": "20.11.10", "@types/node-fetch": "3.0.3", "@types/nodemailer": "6.4.14", "@types/oauth": "0.9.4", "@types/oauth2orize": "1.11.3", "@types/oauth2orize-pkce": "0.1.2", - "@types/pg": "8.10.9", + "@types/pg": "8.11.0", "@types/pug": "2.0.10", "@types/punycode": "2.1.3", "@types/qrcode": "1.5.5", diff --git a/packages/frontend/package.json b/packages/frontend/package.json index f3a923d327..c0cfc4a160 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -27,8 +27,8 @@ "@syuilo/aiscript": "0.17.0", "@tabler/icons-webfont": "2.44.0", "@twemoji/parser": "15.0.0", - "@vitejs/plugin-vue": "5.0.2", - "@vue/compiler-sfc": "3.4.3", + "@vitejs/plugin-vue": "5.0.3", + "@vue/compiler-sfc": "3.4.15", "aiscript-vscode": "github:aiscript-dev/aiscript-vscode#v0.0.6", "astring": "1.8.6", "broadcast-channel": "7.0.0", @@ -39,7 +39,7 @@ "chartjs-chart-matrix": "2.0.1", "chartjs-plugin-gradient": "0.6.1", "chartjs-plugin-zoom": "2.0.1", - "chromatic": "10.3.1", + "chromatic": "10.6.1", "compare-versions": "6.1.0", "cropperjs": "2.0.0-beta.4", "date-fns": "2.30.0", @@ -64,7 +64,7 @@ "shiki": "0.14.7", "strict-event-emitter-types": "2.0.0", "textarea-caret": "3.1.0", - "three": "0.160.0", + "three": "0.160.1", "throttle-debounce": "5.0.0", "tinycolor2": "1.6.0", "tsc-alias": "1.8.8", @@ -77,8 +77,8 @@ "vuedraggable": "next" }, "devDependencies": { - "@misskey-dev/eslint-plugin": "^1.0.0", - "@misskey-dev/summaly": "^5.0.3", + "@misskey-dev/eslint-plugin": "1.0.0", + "@misskey-dev/summaly": "5.0.3", "@storybook/addon-actions": "7.6.10", "@storybook/addon-essentials": "7.6.10", "@storybook/addon-interactions": "7.6.10", @@ -102,12 +102,12 @@ "@types/estree": "1.0.5", "@types/matter-js": "0.19.6", "@types/micromatch": "4.0.6", - "@types/node": "20.11.5", + "@types/node": "20.11.10", "@types/punycode": "2.1.3", "@types/sanitize-html": "2.9.5", "@types/throttle-debounce": "5.0.2", "@types/tinycolor2": "1.4.6", - "@types/uuid": "9.0.7", + "@types/uuid": "9.0.8", "@types/ws": "8.5.10", "@typescript-eslint/eslint-plugin": "6.18.1", "@typescript-eslint/parser": "6.18.1", @@ -135,7 +135,7 @@ "vite-plugin-turbosnap": "1.0.3", "vitest": "0.34.6", "vitest-fetch-mock": "0.2.2", - "vue-eslint-parser": "9.4.0", + "vue-eslint-parser": "9.4.2", "vue-tsc": "1.8.27" } } diff --git a/packages/frontend/src/boot/common.ts b/packages/frontend/src/boot/common.ts index c67911c9c3..fd5a03a70d 100644 --- a/packages/frontend/src/boot/common.ts +++ b/packages/frontend/src/boot/common.ts @@ -22,7 +22,7 @@ import { getAccountFromId } from '@/scripts/get-account-from-id.js'; import { deckStore } from '@/ui/deck/deck-store.js'; import { miLocalStorage } from '@/local-storage.js'; import { fetchCustomEmojis } from '@/custom-emojis.js'; -import { setupRouter } from '@/global/router/definition.js'; +import { setupRouter } from '@/router/definition.js'; export async function common(createVue: () => App) { console.info(`Misskey v${version}`); diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index eb0ac43da7..5a62fd65ee 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -19,7 +19,7 @@ import { claimAchievement, claimedAchievements } from '@/scripts/achievements.js import { initializeSw } from '@/scripts/initialize-sw.js'; import { deckStore } from '@/ui/deck/deck-store.js'; import { emojiPicker } from '@/scripts/emoji-picker.js'; -import { mainRouter } from '@/global/router/main.js'; +import { mainRouter } from '@/router/main.js'; export async function mainBoot() { const { isClientUpdated } = await common(() => createApp( diff --git a/packages/frontend/src/components/MkDrive.file.vue b/packages/frontend/src/components/MkDrive.file.vue index 8a74319f29..4ff1ae30ab 100644 --- a/packages/frontend/src/components/MkDrive.file.vue +++ b/packages/frontend/src/components/MkDrive.file.vue @@ -47,7 +47,7 @@ import { i18n } from '@/i18n.js'; import { $i } from '@/account.js'; import { getDriveFileMenu } from '@/scripts/get-drive-file-menu.js'; import { deviceKind } from '@/scripts/device-kind.js'; -import { useRouter } from '@/global/router/supplier.js'; +import { useRouter } from '@/router/supplier.js'; const router = useRouter(); diff --git a/packages/frontend/src/components/MkPageWindow.vue b/packages/frontend/src/components/MkPageWindow.vue index 67fc3e3186..f9f2d78312 100644 --- a/packages/frontend/src/components/MkPageWindow.vue +++ b/packages/frontend/src/components/MkPageWindow.vue @@ -41,8 +41,8 @@ import { PageMetadata, provideMetadataReceiver } from '@/scripts/page-metadata.j import { openingWindowsCount } from '@/os.js'; import { claimAchievement } from '@/scripts/achievements.js'; import { getScrollContainer } from '@/scripts/scroll.js'; -import { useRouterFactory } from '@/global/router/supplier.js'; -import { mainRouter } from '@/global/router/main.js'; +import { useRouterFactory } from '@/router/supplier.js'; +import { mainRouter } from '@/router/main.js'; const props = defineProps<{ initialPath: string; diff --git a/packages/frontend/src/components/MkUserSelectDialog.vue b/packages/frontend/src/components/MkUserSelectDialog.vue index d7bd73aa8a..1846361108 100644 --- a/packages/frontend/src/components/MkUserSelectDialog.vue +++ b/packages/frontend/src/components/MkUserSelectDialog.vue @@ -16,7 +16,11 @@ SPDX-License-Identifier: AGPL-3.0-only
- + + + + + @@ -66,7 +70,7 @@ import { misskeyApi } from '@/scripts/misskey-api.js'; import { defaultStore } from '@/store.js'; import { i18n } from '@/i18n.js'; import { $i } from '@/account.js'; -import { hostname } from '@/config.js'; +import { host as currentHost, hostname } from '@/config.js'; const emit = defineEmits<{ (ev: 'ok', selected: Misskey.entities.UserDetailed): void; @@ -76,6 +80,7 @@ const emit = defineEmits<{ const props = defineProps<{ includeSelf?: boolean; + localOnly?: boolean; }>(); const username = ref(''); @@ -92,7 +97,7 @@ function search() { } misskeyApi('users/search-by-username-and-host', { username: username.value, - host: host.value, + host: props.localOnly ? '.' : host.value, limit: 10, detail: false, }).then(_users => { @@ -125,11 +130,18 @@ function cancel() { onMounted(() => { misskeyApi('users/show', { userIds: defaultStore.state.recentlyUsedUsers, - }).then(users => { - if (props.includeSelf && users.find(x => $i ? x.id === $i.id : true) == null) { - recentUsers.value = [$i!, ...users]; + }).then(foundUsers => { + const _users = foundUsers.filter((u) => { + if (props.localOnly) { + return u.host == null; + } else { + return true; + } + }); + if (props.includeSelf && _users.find(x => $i ? x.id === $i.id : true) == null) { + recentUsers.value = [$i!, ..._users]; } else { - recentUsers.value = users; + recentUsers.value = _users; } }); }); @@ -138,7 +150,7 @@ onMounted(() => {