Merge branch 'develop' into pr/ThatOneCalculator/8764

This commit is contained in:
tamaina 2022-11-13 18:48:18 +09:00
commit 7c406ea97f
22 changed files with 107 additions and 17781 deletions

View file

@ -1 +1 @@
v16.15.0
v18.12.1

View file

@ -12,6 +12,7 @@ You should also include the user name that made the change.
## 12.x.x (unreleased)
### Changes
- Node.js 18.x or later is required
- Elasticsearchのサポートが削除されました
- 代わりに今後任意の検索プロバイダを設定できる仕組みを構想しています。その仕組みを使えば今まで通りElasticsearchも利用できます
- ノートのウォッチ機能が削除されました
@ -19,6 +20,8 @@ You should also include the user name that made the change.
### Improvements
### Bugfixes
- Server: Bug fix for Pinned Users lookup on instance @squidicuzz
- Client: インスタンスティッカーのfaviconを読み込む際に偽サイト警告が出ることがあるのを修正 @syuilo
## 12.119.0 (2022/09/10)

View file

@ -1,4 +1,4 @@
FROM node:16.15.1-bullseye AS builder
FROM node:18.12.1-bullseye AS builder
ARG NODE_ENV=production
@ -13,7 +13,7 @@ RUN yarn install
RUN yarn build
RUN rm -rf .git
FROM node:16.15.1-bullseye-slim AS runner
FROM node:18.12.1-bullseye-slim AS runner
WORKDIR /misskey

View file

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "12.120.0-alpha.7",
"version": "12.120.0-alpha.8",
"codename": "indigo",
"repository": {
"type": "git",
@ -54,9 +54,9 @@
"@types/gulp": "4.0.9",
"@types/gulp-rename": "2.0.1",
"@typescript-eslint/eslint-plugin": "latest",
"@typescript-eslint/parser": "5.41.0",
"@typescript-eslint/parser": "5.42.1",
"cross-env": "7.0.3",
"cypress": "10.11.0",
"cypress": "11.0.1",
"start-server-and-test": "1.14.0",
"typescript": "4.8.4"
}

View file

@ -29,17 +29,17 @@
"@koa/cors": "3.3.0",
"@koa/multer": "3.0.0",
"@koa/router": "9.0.1",
"@nestjs/common": "9.1.6",
"@nestjs/core": "9.1.6",
"@nestjs/testing": "9.1.6",
"@nestjs/common": "9.2.0",
"@nestjs/core": "9.2.0",
"@nestjs/testing": "9.2.0",
"@peertube/http-signature": "1.7.0",
"@sinonjs/fake-timers": "9.1.2",
"@sinonjs/fake-timers": "10.0.0",
"@syuilo/aiscript": "0.11.1",
"ajv": "8.11.0",
"archiver": "5.3.1",
"autobind-decorator": "2.4.0",
"autwh": "0.1.0",
"aws-sdk": "2.1242.0",
"aws-sdk": "2.1253.0",
"bcryptjs": "2.4.3",
"blurhash": "1.1.5",
"bull": "4.10.1",
@ -59,17 +59,17 @@
"fluent-ffmpeg": "2.1.2",
"form-data": "^4.0.0",
"got": "12.5.2",
"hpagent": "1.1.0",
"hpagent": "1.2.0",
"ioredis": "4.28.5",
"ip-cidr": "3.0.10",
"is-svg": "4.3.2",
"jest-mock": "^29.0.3",
"js-yaml": "4.1.0",
"jsdom": "20.0.1",
"jsdom": "20.0.2",
"json5": "2.2.1",
"json5-loader": "4.0.1",
"jsonld": "8.1.0",
"jsrsasign": "10.5.27",
"jsrsasign": "10.6.0",
"koa": "2.13.4",
"koa-bodyparser": "4.3.0",
"koa-favicon": "2.1.0",
@ -85,7 +85,7 @@
"ms": "3.0.0-canary.1",
"multer": "1.4.4",
"nested-property": "4.0.0",
"node-fetch": "3.2.10",
"node-fetch": "3.3.0",
"nodemailer": "6.8.0",
"nsfwjs": "2.4.2",
"oauth": "^0.10.0",
@ -118,12 +118,12 @@
"stringz": "2.1.0",
"summaly": "2.7.0",
"syslog-pro": "1.0.0",
"systeminformation": "5.12.11",
"systeminformation": "5.12.14",
"tinycolor2": "1.4.2",
"tmp": "0.2.1",
"ts-loader": "9.4.1",
"ts-node": "10.9.1",
"tsc-alias": "1.7.0",
"tsc-alias": "1.7.1",
"tsconfig-paths": "4.1.0",
"twemoji-parser": "14.0.0",
"typeorm": "0.3.10",
@ -132,12 +132,12 @@
"uuid": "9.0.0",
"web-push": "3.5.0",
"websocket": "1.0.34",
"ws": "8.10.0",
"ws": "8.11.0",
"xev": "3.0.2"
},
"devDependencies": {
"@redocly/openapi-core": "1.0.0-beta.108",
"@swc/core": "1.3.11",
"@redocly/openapi-core": "1.0.0-beta.112",
"@swc/core": "1.3.15",
"@swc/jest": "0.2.23",
"@types/archiver": "5.3.1",
"@types/bcryptjs": "2.4.2",
@ -145,9 +145,9 @@
"@types/cbor": "6.0.0",
"@types/escape-regexp": "0.0.1",
"@types/fluent-ffmpeg": "2.1.20",
"@types/jest": "29.2.0",
"@types/jest": "29.2.2",
"@types/js-yaml": "4.0.5",
"@types/jsdom": "20.0.0",
"@types/jsdom": "20.0.1",
"@types/jsonld": "1.5.7",
"@types/jsrsasign": "10.5.4",
"@types/koa": "2.13.5",
@ -162,7 +162,7 @@
"@types/koa__multer": "2.0.4",
"@types/koa__router": "8.0.11",
"@types/mime-types": "2.1.1",
"@types/node": "18.11.7",
"@types/node": "18.11.9",
"@types/node-fetch": "3.0.3",
"@types/nodemailer": "6.4.6",
"@types/oauth": "0.9.1",
@ -186,13 +186,13 @@
"@types/web-push": "3.3.2",
"@types/websocket": "1.0.5",
"@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "5.41.0",
"@typescript-eslint/parser": "5.41.0",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@typescript-eslint/parser": "5.42.1",
"cross-env": "7.0.3",
"eslint": "8.26.0",
"eslint": "8.27.0",
"eslint-plugin-import": "2.26.0",
"execa": "6.1.0",
"jest": "29.2.2",
"jest": "29.3.1",
"typescript": "4.8.4"
}
}

View file

@ -105,9 +105,7 @@ export class RelayService {
}));
if (relays.length === 0) return;
// TODO
//const copy = structuredClone(activity);
const copy = JSON.parse(JSON.stringify(activity));
const copy = structuredClone(activity);
if (!copy.to) copy.to = ['https://www.w3.org/ns/activitystreams#Public'];
const signed = await this.apRendererService.attachLdSignature(copy, user);

View file

@ -55,9 +55,7 @@ export class DriveFileEntityService {
public getPublicProperties(file: DriveFile): DriveFile['properties'] {
if (file.properties.orientation != null) {
// TODO
//const properties = structuredClone(file.properties);
const properties = JSON.parse(JSON.stringify(file.properties));
const properties = structuredClone(file.properties);
if (file.properties.orientation >= 5) {
[properties.width, properties.height] = [properties.height, properties.width];
}

View file

@ -37,11 +37,19 @@ export class QueueProcessorService {
public start() {
function renderError(e: Error): any {
return {
stack: e.stack,
message: e.message,
name: e.name,
};
if (e) { // 何故かeがundefinedで来ることがある
return {
stack: e.stack,
message: e.message,
name: e.name,
};
} else {
return {
stack: '?',
message: '?',
name: '?',
};
}
}
const systemLogger = this.logger.createSubLogger('system');

View file

@ -43,12 +43,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
super(meta, paramDef, async (ps, me) => {
const meta = await this.metaService.fetch();
const users = await Promise.all(meta.pinnedthis.usersRepository.map(acct => Acct.parse(acct)).map(acct => this.usersRepository.findOneBy({
const users = await Promise.all(meta.pinnedUsers.map(acct => Acct.parse(acct)).map(acct => this.usersRepository.findOneBy({
usernameLower: acct.username.toLowerCase(),
host: acct.host ?? IsNull(),
})));
return await this.userEntityService.packMany(users.filter(x => x !== undefined) as User[], me, { detail: true });
return await this.userEntityService.packMany(users.filter(x => x !== null) as User[], me, { detail: true });
});
}
}

View file

@ -86,9 +86,7 @@ export class ClientServerService {
}
private async manifestHandler(ctx: Koa.Context) {
// TODO
//const res = structuredClone(manifest);
const res = JSON.parse(JSON.stringify(manifest));
const res = structuredClone(manifest);
const instance = await this.metaService.fetch(true);

View file

@ -14,11 +14,11 @@
"@rollup/pluginutils": "5.0.2",
"@syuilo/aiscript": "0.11.1",
"@vitejs/plugin-vue": "3.2.0",
"@vue/compiler-sfc": "3.2.41",
"@vue/compiler-sfc": "3.2.45",
"autobind-decorator": "2.4.0",
"autosize": "5.0.1",
"blurhash": "1.1.5",
"broadcast-channel": "4.18.0",
"broadcast-channel": "4.18.1",
"browser-image-resizer": "git+https://github.com/misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
"chart.js": "3.9.1",
"chartjs-adapter-date-fns": "2.0.0",
@ -42,7 +42,7 @@
"querystring": "0.2.1",
"rndstr": "1.0.0",
"s-age": "1.1.2",
"sass": "1.55.0",
"sass": "1.56.1",
"seedrandom": "3.0.5",
"strict-event-emitter-types": "2.0.0",
"stringz": "2.1.0",
@ -51,14 +51,14 @@
"three": "0.146.0",
"throttle-debounce": "5.0.0",
"tinycolor2": "1.4.2",
"tsc-alias": "1.7.0",
"tsc-alias": "1.7.1",
"tsconfig-paths": "4.1.0",
"twemoji-parser": "14.0.0",
"typescript": "4.8.4",
"uuid": "9.0.0",
"vanilla-tilt": "1.7.2",
"vite": "3.2.0",
"vue": "3.2.41",
"vanilla-tilt": "1.7.3",
"vite": "3.2.3",
"vue": "3.2.45",
"vue-prism-editor": "2.0.0-alpha.2",
"vuedraggable": "4.0.1"
},
@ -76,14 +76,14 @@
"@types/uuid": "8.3.4",
"@types/websocket": "1.0.5",
"@types/ws": "8.5.3",
"@typescript-eslint/eslint-plugin": "5.41.0",
"@typescript-eslint/parser": "5.41.0",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@typescript-eslint/parser": "5.42.1",
"cross-env": "7.0.3",
"cypress": "10.11.0",
"eslint": "8.26.0",
"cypress": "11.0.1",
"eslint": "8.27.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-vue": "9.6.0",
"rollup": "3.2.3",
"eslint-plugin-vue": "9.7.0",
"rollup": "3.3.0",
"start-server-and-test": "1.14.0"
}
}

View file

@ -34,9 +34,9 @@ import XModalWindow from '@/components/MkModalWindow.vue';
import * as os from '@/os';
import { $i } from '@/account';
import { defaultStore } from '@/store';
import { apiUrl, url } from '@/config';
import { query } from '@/scripts/url';
import { apiUrl } from '@/config';
import { i18n } from '@/i18n';
import { getProxiedImageUrl } from '@/scripts/media-proxy';
const emit = defineEmits<{
(ev: 'ok', cropped: misskey.entities.DriveFile): void;
@ -49,9 +49,7 @@ const props = defineProps<{
aspectRatio: number;
}>();
const imgUrl = `${url}/proxy/image.webp?${query({
url: props.file.url,
})}`;
const imgUrl = getProxiedImageUrl(props.file.url);
let dialogEl = $ref<InstanceType<typeof XModalWindow>>();
let imgEl = $ref<HTMLImageElement>();
let cropper: Cropper | null = null;
@ -72,10 +70,10 @@ const ok = async () => {
method: 'POST',
body: formData,
})
.then(response => response.json())
.then(f => {
res(f);
});
.then(response => response.json())
.then(f => {
res(f);
});
});
});

View file

@ -9,6 +9,7 @@
import { } from 'vue';
import { instanceName } from '@/config';
import { instance as Instance } from '@/instance';
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy';
const props = defineProps<{
instance?: {
@ -20,15 +21,15 @@ const props = defineProps<{
// if no instance data is given, this is for the local instance
const instance = props.instance ?? {
faviconUrl: Instance.iconUrl || Instance.faviconUrl || '/favicon.ico',
faviconUrl: getProxiedImageUrlNullable(Instance.iconUrl) ?? getProxiedImageUrlNullable(Instance.faviconUrl) ?? '/favicon.ico',
name: instanceName,
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement)?.content
themeColor: (document.querySelector('meta[name="theme-color-orig"]') as HTMLMetaElement).content,
};
const themeColor = instance.themeColor ?? '#777777';
const bg = {
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`
background: `linear-gradient(90deg, ${themeColor}, ${themeColor}00)`,
};
</script>

View file

@ -82,16 +82,6 @@ import { getAccountFromId } from '@/scripts/get-account-from-id';
else location.reload();
});
//#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
// TODO: いつの日にか消したい
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
window.addEventListener('resize', () => {
const vh = window.innerHeight * 0.01;
document.documentElement.style.setProperty('--vh', `${vh}px`);
});
//#endregion
// If mobile, insert the viewport meta tag
if (['smartphone', 'tablet'].includes(deviceKind)) {
const viewport = document.getElementsByName('viewport').item(0);

View file

@ -8,6 +8,7 @@ import * as os from '@/os';
import copyToClipboard from '@/scripts/copy-to-clipboard';
import { url } from '@/config';
import { noteActions } from '@/store';
import { notePage } from '@/filters/note';
export function getNoteMenu(props: {
note: misskey.entities.Note;
@ -172,7 +173,9 @@ export function getNoteMenu(props: {
url: `${url}/notes/${appearNote.id}`,
});
}
function notedetails(): void {
os.pageWindow(`/notes/${appearNote.id}`);
}
async function translate(): Promise<void> {
if (props.translation.value != null) return;
props.translating.value = true;
@ -198,8 +201,11 @@ export function getNoteMenu(props: {
danger: true,
action: unclip,
}, null] : []
),
{
), {
icon: 'fas fa-external-link-alt',
text: i18n.ts.details,
action: notedetails,
}, {
icon: 'fas fa-copy',
text: i18n.ts.copyContent,
action: copyContent,
@ -300,6 +306,10 @@ export function getNoteMenu(props: {
.filter(x => x !== undefined);
} else {
menu = [{
icon: 'fas fa-external-link-alt',
text: i18n.ts.detailed,
action: openDetail,
}, {
icon: 'fas fa-copy',
text: i18n.ts.copyContent,
action: copyContent,

View file

@ -0,0 +1,13 @@
import { query } from '@/scripts/url';
import { url } from '@/config';
export function getProxiedImageUrl(imageUrl: string): string {
return `${url}/proxy/image.webp?${query({
url: imageUrl,
})}`;
}
export function getProxiedImageUrlNullable(imageUrl: string | null | undefined): string | null {
if (imageUrl == null) return null;
return getProxiedImageUrl(imageUrl);
}

View file

@ -168,8 +168,7 @@ function more(ev: MouseEvent) {
left: 0;
z-index: 1001;
width: $nav-icon-only-width;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
height: calc(var(--vh, 1vh) * 100);
height: 100dvh;
box-sizing: border-box;
overflow: auto;
overflow-x: clip;

View file

@ -198,8 +198,7 @@ onMounted(() => {
$ui-font-size: 1em;
$widgets-hide-threshold: 1200px;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
min-height: calc(var(--vh, 1vh) * 100);
min-height: 100dvh;
box-sizing: border-box;
&.wallpaper {
@ -301,8 +300,7 @@ onMounted(() => {
top: 0;
right: 0;
z-index: 1001;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
height: calc(var(--vh, 1vh) * 100);
height: 100dvh;
padding: var(--margin);
box-sizing: border-box;
overflow: auto;

View file

@ -255,8 +255,7 @@ async function deleteProfile() {
--deckDividerThickness: 5px;
display: flex;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
height: calc(var(--vh, 1vh) * 100);
height: 100dvh;
box-sizing: border-box;
flex: 1;
@ -424,8 +423,7 @@ async function deleteProfile() {
top: 0;
left: 0;
z-index: 1001;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
height: calc(var(--vh, 1vh) * 100);
height: 100dvh;
width: 240px;
box-sizing: border-box;
contain: strict;

View file

@ -220,8 +220,7 @@ const wallpaper = localStorage.getItem('wallpaper') != null;
$ui-font-size: 1em; // TODO:
$widgets-hide-threshold: 1090px;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
min-height: calc(var(--vh, 1vh) * 100);
min-height: 100dvh;
box-sizing: border-box;
display: flex;
@ -273,8 +272,7 @@ const wallpaper = localStorage.getItem('wallpaper') != null;
top: 0;
right: 0;
z-index: 1001;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
height: calc(var(--vh, 1vh) * 100);
height: 100dvh;
padding: var(--margin);
box-sizing: border-box;
overflow: auto;
@ -362,8 +360,7 @@ const wallpaper = localStorage.getItem('wallpaper') != null;
top: 0;
left: 0;
z-index: 1001;
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
height: calc(var(--vh, 1vh) * 100);
height: 100dvh;
width: 240px;
box-sizing: border-box;
contain: strict;

View file

@ -28,8 +28,7 @@ document.documentElement.style.overflowY = 'scroll';
<style lang="scss" scoped>
.mk-app {
// 100vh ... https://css-tricks.com/the-trick-to-viewport-units-on-mobile/
min-height: calc(var(--vh, 1vh) * 100);
min-height: 100dvh;
box-sizing: border-box;
}
</style>

17682
yarn.lock

File diff suppressed because it is too large Load diff