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

@ -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);