Merge branch 'develop' into iceshrimp_mastodon

This commit is contained in:
naskya 2024-06-28 06:24:21 +09:00
commit e480e6e503
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
13 changed files with 145 additions and 531 deletions

View file

@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": false
},

View file

@ -42,14 +42,13 @@
"js-yaml": "4.1.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.2",
"@biomejs/cli-darwin-arm64": "1.8.2",
"@biomejs/cli-darwin-x64": "1.8.2",
"@biomejs/cli-linux-arm64": "1.8.2",
"@biomejs/cli-linux-x64": "1.8.2",
"@biomejs/biome": "1.8.3",
"@biomejs/cli-darwin-arm64": "1.8.3",
"@biomejs/cli-darwin-x64": "1.8.3",
"@biomejs/cli-linux-arm64": "1.8.3",
"@biomejs/cli-linux-x64": "1.8.3",
"@types/node": "20.14.9",
"execa": "9.3.0",
"pnpm": "9.4.0",
"typescript": "5.5.2"
"pnpm": "9.4.0"
}
}

View file

@ -1,29 +0,0 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"experimental": {
"keepImportAssertions": true,
"emitAssertForImportAttributes": true
},
"baseUrl": "src",
"paths": {
"@/*": ["*"]
},
"target": "es2022"
},
"minify": false,
"module": {
"type": "es6",
"strict": true,
"resolveFully": true
}
}

View file

@ -10,17 +10,14 @@
"migration:revert": "typeorm migration:revert --dataSource ./built/ormconfig.js",
"migration:new": "pnpm node ./scripts/create-migration.mjs",
"check:connect": "node ./check_connect.js",
"build": "pnpm swc src --out-dir built --source-maps false --copy-files --strip-leading-paths",
"build:debug": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths",
"watch": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths --watch",
"build": "pnpm tsc --project tsconfig.json ; pnpm tsc-alias --project tsconfig.json",
"build:debug": "pnpm tsc --sourceMap --project tsconfig.json ; pnpm tsc-alias --project tsconfig.json",
"watch": "pnpm tsc --project tsconfig.json --watch ; pnpm tsc-alias --project tsconfig.json --watch",
"lint": "pnpm biome check --apply **/*.ts ; pnpm run format",
"mocha": "cross-env NODE_ENV=test TS_NODE_FILES=true TS_NODE_TRANSPILE_ONLY=true TS_NODE_PROJECT=\"./test/tsconfig.json\" mocha",
"test": "pnpm run mocha",
"format": "pnpm biome format * --write"
},
"optionalDependencies": {
"@swc/core-android-arm64": "1.3.11"
},
"dependencies": {
"@bull-board/api": "5.20.5",
"@bull-board/koa": "5.20.5",
@ -38,7 +35,7 @@
"archiver": "7.0.1",
"async-lock": "1.4.0",
"async-mutex": "0.5.0",
"aws-sdk": "2.1649.0",
"aws-sdk": "2.1650.0",
"axios": "1.7.2",
"backend-rs": "workspace:*",
"blurhash": "2.0.5",
@ -122,8 +119,6 @@
"xev": "3.0.2"
},
"devDependencies": {
"@swc/cli": "0.3.14",
"@swc/core": "1.6.5",
"@types/adm-zip": "0.5.5",
"@types/async-lock": "1.4.0",
"@types/color-convert": "2.0.3",
@ -173,9 +168,9 @@
"mocha": "10.5.2",
"pug": "3.0.3",
"strict-event-emitter-types": "2.0.0",
"swc-loader": "0.2.6",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"tsc-alias": "1.8.10",
"tsconfig-paths": "4.2.0",
"type-fest": "4.20.1",
"typescript": "5.5.2",

View file

@ -224,13 +224,13 @@ export class DriveFile {
nullable: true,
})
@JoinColumn()
public user: User | null;
public user: Relation<User | null>;
@ManyToOne(() => DriveFolder, {
onDelete: "SET NULL",
nullable: true,
})
@JoinColumn()
public folder: DriveFolder | null;
public folder: Relation<DriveFolder | null>;
//#endregion Relations
}

View file

@ -743,11 +743,11 @@ async function insertNote(
renoteUserId: data.renote ? data.renote.userId : null,
renoteUserHost: data.renote ? data.renote.userHost : null,
userHost: user.host,
updatedAt: undefined,
uri: data.uri ?? undefined,
url: data.url ?? undefined,
});
if (data.uri != null) note.uri = data.uri;
if (data.url != null) note.url = data.url;
// Append mentions data
if (mentionedUsers.length > 0) {
note.mentions = mentionedUsers.map((u) => u.id);

View file

@ -8,15 +8,12 @@
"noUnusedLocals": false,
"noFallthroughCasesInSwitch": true,
"declaration": false,
"sourceMap": false,
"target": "es2021",
"module": "esnext",
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"removeComments": false,
"noLib": false,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,

View file

@ -84,7 +84,7 @@
"typescript": "5.5.2",
"unicode-emoji-json": "0.6.0",
"uuid": "10.0.0",
"vite": "5.3.1",
"vite": "5.3.2",
"vite-plugin-compression": "0.5.1",
"vue": "3.4.30",
"vue-draggable-plus": "0.5.0",

View file

@ -1,24 +0,0 @@
{
"$schema": "https://json.schemastore.org/swcrc",
"jsc": {
"parser": {
"syntax": "typescript",
"dynamicImport": true,
"decorators": true
},
"transform": {
"legacyDecorator": true,
"decoratorMetadata": true
},
"experimental": {
"emitAssertForImportAttributes": true
},
"target": "es2022"
},
"minify": false,
"module": {
"type": "es6",
"strict": true,
"resolveFully": true
}
}

View file

@ -4,13 +4,12 @@
"description": "Firefish SDK for JavaScript",
"homepage": "https://firefish.dev/firefish/firefish/-/tree/develop/packages/firefish-js",
"main": "./built/index.js",
"type": "module",
"types": "./src/index.ts",
"license": "MIT",
"scripts": {
"build": "pnpm swc src --out-dir built --source-maps false --copy-files --strip-leading-paths",
"build:debug": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths",
"watch": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths --watch",
"build": "pnpm tsc --project tsconfig.json ; pnpm tsc-alias --project tsconfig.json",
"build:debug": "pnpm tsc --sourceMap --project tsconfig.json ; pnpm tsc-alias --project tsconfig.json",
"watch": "pnpm tsc --project tsconfig.json --watch ; pnpm tsc-alias --project tsconfig.json --watch",
"lint": "pnpm biome check --apply src",
"format": "pnpm biome format --write src",
"jest": "jest --coverage --detectOpenHandles",
@ -21,9 +20,6 @@
"url": "https://firefish.dev/firefish/firefish.git"
},
"devDependencies": {
"@swc/cli": "0.3.14",
"@swc/core": "1.6.5",
"@swc/types": "0.1.9",
"@types/jest": "29.5.12",
"@types/node": "20.14.9",
"jest": "29.7.0",
@ -32,6 +28,7 @@
"mock-socket": "9.3.1",
"ts-jest": "29.1.5",
"ts-node": "10.9.2",
"tsc-alias": "1.8.10",
"tsd": "0.31.1",
"typescript": "5.5.2"
},
@ -41,8 +38,5 @@
"dependencies": {
"eventemitter3": "5.0.1",
"reconnecting": "4.4.1"
},
"optionalDependencies": {
"@swc/core-android-arm64": "1.3.11"
}
}

View file

@ -7,9 +7,14 @@ import Stream, { Connection } from "./streaming.js";
import * as StreamTypes from "./streaming.types.js";
import type * as TypeUtils from "./type-utils.js";
import * as api from "./api.js";
import * as entities from "./entities.js";
import type * as SchemaTypes from "./misc/schema.js";
import * as Schema from "./misc/schema.js";
import { langmap, type PostLanguage } from "./misc/langmap.js";
export {
type Endpoints,
type ApiTypes,
@ -21,6 +26,10 @@ export {
type TypeUtils,
Schema,
type SchemaTypes,
langmap,
type PostLanguage,
api,
entities,
};
export const permissions = consts.permissions;
@ -30,13 +39,3 @@ export const mutedNoteReasons = consts.mutedNoteReasons;
export const languages = consts.languages;
export const ffVisibility = consts.ffVisibility;
export const instanceSortParam = consts.instanceSortParam;
import { langmap, type PostLanguage } from "./misc/langmap.js";
export { langmap, type PostLanguage };
// api extractor not supported yet
//export * as api from './api';
//export * as entities from './entities';
import * as api from "./api.js";
import * as entities from "./entities.js";
export { api, entities };

View file

@ -11,7 +11,7 @@
"devDependencies": {
"firefish-js": "workspace:*",
"idb-keyval": "6.2.1",
"vite": "5.3.1",
"vite": "5.3.2",
"vite-plugin-compression": "0.5.1"
}
}

File diff suppressed because it is too large Load diff