Compare commits

..

1 commit

Author SHA1 Message Date
64a8912f48
fix (backend-rs): add use_nullable to struct
Co-authored-by: naskya <m@naskya.net>
2024-02-28 16:53:51 +09:00
18 changed files with 983 additions and 1150 deletions

View file

@ -35,22 +35,22 @@ pre-commit: test format shellcheck update-lockfiles regenerate-entities neko/ind
.PHONY: test .PHONY: test
test: # test-revert test: test-revert
# .PHONY: test-revert .PHONY: test-revert
# test-revert: $(T)/test-revert test-revert: $(T)/test-revert
# $(T)/test-revert: neko/revert.sql $(MIGRATIONS) $(T)/test-revert: neko/revert.sql $(MIGRATIONS)
# cd dev && \ cd dev && \
# podman-compose exec db \ podman-compose exec db \
# psql \ psql \
# --echo-all \ --echo-all \
# --user=$(POSTGRES_USER) \ --user=$(POSTGRES_USER) \
# --dbname=$(POSTGRES_DB) \ --dbname=$(POSTGRES_DB) \
# --set='ON_ERROR_STOP=1' \ --set='ON_ERROR_STOP=1' \
# --command="$$(printf '%s\nROLLBACK;' "$$(cat ../neko/revert.sql | sed '$$ d')")" --command="$$(printf '%s\nROLLBACK;' "$$(cat ../neko/revert.sql | sed '$$ d')")"
# touch $@ touch $@
.PHONY: update-lockfiles .PHONY: update-lockfiles

View file

@ -1,7 +1,6 @@
BEGIN; BEGIN;
DELETE FROM "migrations" WHERE name IN ( DELETE FROM "migrations" WHERE name IN (
'FixNoteUrlIndex1709129810501',
'IndexAltTextAndCw1708872574733', 'IndexAltTextAndCw1708872574733',
'SeparateHardMuteWordsAndPatterns1706413792769', 'SeparateHardMuteWordsAndPatterns1706413792769',
'RenameMetaColumns1705944717480', 'RenameMetaColumns1705944717480',

View file

@ -8,7 +8,7 @@
"engines": { "engines": {
"node": ">= 18.17.0" "node": ">= 18.17.0"
}, },
"packageManager": "pnpm@8.15.4", "packageManager": "pnpm@8.15.1",
"private": true, "private": true,
"scripts": { "scripts": {
"rebuild": "pnpm run clean && pnpm run build", "rebuild": "pnpm run clean && pnpm run build",
@ -33,8 +33,8 @@
"cleanall": "pnpm run clean-all" "cleanall": "pnpm run clean-all"
}, },
"dependencies": { "dependencies": {
"@bull-board/api": "5.14.2", "@bull-board/api": "5.14.0",
"@bull-board/ui": "5.14.2", "@bull-board/ui": "5.14.0",
"@napi-rs/cli": "2.18.0", "@napi-rs/cli": "2.18.0",
"gulp": "4.0.2", "gulp": "4.0.2",
"gulp-cssnano": "2.1.3", "gulp-cssnano": "2.1.3",
@ -48,9 +48,9 @@
"@biomejs/cli-darwin-x64": "1.5.3", "@biomejs/cli-darwin-x64": "1.5.3",
"@biomejs/cli-linux-arm64": "1.5.3", "@biomejs/cli-linux-arm64": "1.5.3",
"@biomejs/cli-linux-x64": "1.5.3", "@biomejs/cli-linux-x64": "1.5.3",
"@types/node": "20.11.21", "@types/node": "20.11.13",
"execa": "8.0.1", "execa": "8.0.1",
"pnpm": "8.15.4", "pnpm": "8.15.1",
"typescript": "5.3.3" "typescript": "5.3.3"
} }
} }

View file

@ -1,11 +0,0 @@
export class FixNoteUrlIndex1709129810501 {
name = "FixNoteUrlIndex1709129810501";
async up(queryRunner) {
await queryRunner.query(`DROP INDEX "IDX_note_url"`);
await queryRunner.query(`CREATE INDEX "IDX_note_url" ON "note" ("url")`);
}
async down(queryRunner) {
/* You don't revert this migration */
}
}

View file

@ -9,9 +9,9 @@
"migrate": "typeorm migration:run -d ormconfig.js", "migrate": "typeorm migration:run -d ormconfig.js",
"revertmigration": "typeorm migration:revert -d ormconfig.js", "revertmigration": "typeorm migration:revert -d ormconfig.js",
"check:connect": "node ./check_connect.js", "check:connect": "node ./check_connect.js",
"build": "pnpm swc src --out-dir built --source-maps false --copy-files --strip-leading-paths", "build": "pnpm swc src -d built -D",
"build:debug": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths", "build:debug": "pnpm swc src -d built -s -D",
"watch": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths --watch", "watch": "pnpm swc src -d built -D -w",
"lint": "pnpm biome check --apply **/*.ts ; pnpm run format", "lint": "pnpm biome check --apply **/*.ts ; pnpm run format",
"format": "pnpm biome format * --write" "format": "pnpm biome format * --write"
}, },
@ -19,22 +19,22 @@
"@swc/core-android-arm64": "1.3.11" "@swc/core-android-arm64": "1.3.11"
}, },
"dependencies": { "dependencies": {
"@bull-board/api": "5.14.2", "@bull-board/api": "5.14.0",
"@bull-board/koa": "5.14.2", "@bull-board/koa": "5.14.0",
"@bull-board/ui": "5.14.2", "@bull-board/ui": "5.14.0",
"@discordapp/twemoji": "^15.0.2", "@discordapp/twemoji": "^15.0.2",
"@koa/cors": "5.0.0", "@koa/cors": "5.0.0",
"@koa/multer": "3.0.2", "@koa/multer": "3.0.2",
"@koa/router": "12.0.1", "@koa/router": "12.0.1",
"@ladjs/koa-views": "9.0.0", "@ladjs/koa-views": "9.0.0",
"@peertube/http-signature": "1.7.0", "@peertube/http-signature": "1.7.0",
"@redocly/openapi-core": "1.9.1", "@redocly/openapi-core": "1.8.1",
"@sinonjs/fake-timers": "11.2.2", "@sinonjs/fake-timers": "11.2.2",
"@twemoji/parser": "^15.0.0", "@twemoji/parser": "^15.0.0",
"adm-zip": "^0.5.10", "adm-zip": "^0.5.10",
"ajv": "8.12.0", "ajv": "8.12.0",
"archiver": "6.0.2", "archiver": "6.0.1",
"aws-sdk": "2.1567.0", "aws-sdk": "2.1547.0",
"axios": "1.6.7", "axios": "1.6.7",
"backend-rs": "workspace:*", "backend-rs": "workspace:*",
"blurhash": "2.0.5", "blurhash": "2.0.5",
@ -49,15 +49,15 @@
"date-fns": "3.3.1", "date-fns": "3.3.1",
"decompress": "4.2.1", "decompress": "4.2.1",
"deep-email-validator": "0.1.21", "deep-email-validator": "0.1.21",
"deepl-node": "1.12.0", "deepl-node": "1.11.1",
"escape-regexp": "0.0.1", "escape-regexp": "0.0.1",
"feed": "4.2.2", "feed": "4.2.2",
"file-type": "19.0.0", "file-type": "19.0.0",
"fluent-ffmpeg": "2.1.2", "fluent-ffmpeg": "2.1.2",
"firefish-js": "workspace:*", "firefish-js": "workspace:*",
"got": "14.2.0", "got": "14.1.0",
"gunzip-maybe": "1.4.2", "gunzip-maybe": "1.4.2",
"happy-dom": "13.6.2", "happy-dom": "13.3.8",
"hpagent": "1.2.0", "hpagent": "1.2.0",
"ioredis": "5.3.2", "ioredis": "5.3.2",
"ip-cidr": "4.0.0", "ip-cidr": "4.0.0",
@ -65,7 +65,7 @@
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
"json5": "2.2.3", "json5": "2.2.3",
"jsonld": "8.3.2", "jsonld": "8.3.2",
"jsrsasign": "11.1.0", "jsrsasign": "11.0.0",
"koa": "2.15.0", "koa": "2.15.0",
"koa-body": "6.0.1", "koa-body": "6.0.1",
"koa-bodyparser": "4.4.1", "koa-bodyparser": "4.4.1",
@ -83,7 +83,7 @@
"multer": "1.4.5-lts.1", "multer": "1.4.5-lts.1",
"nested-property": "4.0.0", "nested-property": "4.0.0",
"node-fetch": "3.3.2", "node-fetch": "3.3.2",
"nodemailer": "6.9.10", "nodemailer": "6.9.8",
"opencc-js": "1.0.5", "opencc-js": "1.0.5",
"os-utils": "0.0.14", "os-utils": "0.0.14",
"otpauth": "9.2.2", "otpauth": "9.2.2",
@ -103,17 +103,17 @@
"rename": "1.0.4", "rename": "1.0.4",
"rndstr": "1.0.0", "rndstr": "1.0.0",
"rss-parser": "3.13.0", "rss-parser": "3.13.0",
"sanitize-html": "2.12.1", "sanitize-html": "2.11.0",
"semver": "7.6.0", "semver": "7.5.4",
"sharp": "0.33.2", "sharp": "0.33.2",
"stringz": "2.1.0", "stringz": "2.1.0",
"summaly": "2.7.0", "summaly": "2.7.0",
"syslog-pro": "1.0.0", "syslog-pro": "1.0.0",
"systeminformation": "5.22.0", "systeminformation": "5.21.24",
"tar-stream": "3.1.7", "tar-stream": "3.1.7",
"tesseract.js": "5.0.5", "tesseract.js": "5.0.4",
"tinycolor2": "1.6.0", "tinycolor2": "1.6.0",
"tmp": "0.2.2", "tmp": "0.2.1",
"typeorm": "0.3.20", "typeorm": "0.3.20",
"ulid": "2.3.0", "ulid": "2.3.0",
"uuid": "9.0.1", "uuid": "9.0.1",
@ -122,15 +122,15 @@
"xev": "3.0.2" "xev": "3.0.2"
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "0.3.10", "@swc/cli": "0.1.65",
"@swc/core": "1.4.2", "@swc/core": "1.3.107",
"@types/adm-zip": "0.5.5", "@types/adm-zip": "0.5.5",
"@types/escape-regexp": "0.0.3", "@types/escape-regexp": "0.0.3",
"@types/fluent-ffmpeg": "2.1.24", "@types/fluent-ffmpeg": "2.1.24",
"@types/js-yaml": "4.0.9", "@types/js-yaml": "4.0.9",
"@types/jsonld": "1.5.13", "@types/jsonld": "1.5.13",
"@types/jsrsasign": "10.5.12", "@types/jsrsasign": "10.5.12",
"@types/koa": "2.15.0", "@types/koa": "2.14.0",
"@types/koa-bodyparser": "4.3.12", "@types/koa-bodyparser": "4.3.12",
"@types/koa-cors": "0.0.6", "@types/koa-cors": "0.0.6",
"@types/koa-favicon": "2.1.3", "@types/koa-favicon": "2.1.3",
@ -140,22 +140,22 @@
"@types/koa__cors": "5.0.0", "@types/koa__cors": "5.0.0",
"@types/koa__multer": "2.0.7", "@types/koa__multer": "2.0.7",
"@types/koa__router": "12.0.4", "@types/koa__router": "12.0.4",
"@types/node": "20.11.21", "@types/node": "20.11.13",
"@types/node-fetch": "2.6.11", "@types/node-fetch": "2.6.11",
"@types/nodemailer": "6.4.14", "@types/nodemailer": "6.4.14",
"@types/oauth": "0.9.4", "@types/oauth": "0.9.4",
"@types/opencc-js": "1.0.3", "@types/opencc-js": "1.0.3",
"@types/pg": "8.11.2", "@types/pg": "8.11.0",
"@types/probe-image-size": "7.2.4", "@types/probe-image-size": "7.2.4",
"@types/pug": "2.0.10", "@types/pug": "2.0.10",
"@types/punycode": "2.1.4", "@types/punycode": "2.1.3",
"@types/qrcode": "1.5.5", "@types/qrcode": "1.5.5",
"@types/qs": "6.9.12", "@types/qs": "6.9.11",
"@types/random-seed": "0.3.5", "@types/random-seed": "0.3.5",
"@types/ratelimiter": "3.4.6", "@types/ratelimiter": "3.4.6",
"@types/rename": "1.0.7", "@types/rename": "1.0.7",
"@types/sanitize-html": "2.11.0", "@types/sanitize-html": "2.9.5",
"@types/semver": "7.5.8", "@types/semver": "7.5.6",
"@types/sinonjs__fake-timers": "8.1.5", "@types/sinonjs__fake-timers": "8.1.5",
"@types/syslog-pro": "1.0.3", "@types/syslog-pro": "1.0.3",
"@types/tinycolor2": "1.4.6", "@types/tinycolor2": "1.4.6",
@ -165,15 +165,15 @@
"@types/websocket": "1.0.10", "@types/websocket": "1.0.10",
"@types/ws": "8.5.10", "@types/ws": "8.5.10",
"cross-env": "7.0.3", "cross-env": "7.0.3",
"eslint": "8.57.0", "eslint": "8.56.0",
"pug": "3.0.2", "pug": "3.0.2",
"strict-event-emitter-types": "2.0.0", "strict-event-emitter-types": "2.0.0",
"swc-loader": "0.2.6", "swc-loader": "0.2.3",
"ts-loader": "9.5.1", "ts-loader": "9.5.1",
"ts-node": "10.9.2", "ts-node": "10.9.2",
"tsconfig-paths": "4.2.0", "tsconfig-paths": "4.2.0",
"typescript": "5.3.3", "typescript": "5.3.3",
"webpack": "5.90.3", "webpack": "5.90.0",
"ws": "8.16.0" "ws": "8.16.0"
} }
} }

View file

@ -1,5 +1,4 @@
import define from "@/server/api/define.js"; import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { Emojis } from "@/models/index.js"; import { Emojis } from "@/models/index.js";
import { In } from "typeorm"; import { In } from "typeorm";
import { db } from "@/db/postgre.js"; import { db } from "@/db/postgre.js";

View file

@ -1,5 +1,4 @@
import define from "@/server/api/define.js"; import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { Emojis } from "@/models/index.js"; import { Emojis } from "@/models/index.js";
import { In } from "typeorm"; import { In } from "typeorm";
import { insertModerationLog } from "@/services/insert-moderation-log.js"; import { insertModerationLog } from "@/services/insert-moderation-log.js";

View file

@ -1,5 +1,4 @@
import define from "@/server/api/define.js"; import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { Emojis } from "@/models/index.js"; import { Emojis } from "@/models/index.js";
import { In } from "typeorm"; import { In } from "typeorm";
import { db } from "@/db/postgre.js"; import { db } from "@/db/postgre.js";

View file

@ -1,5 +1,4 @@
import define from "@/server/api/define.js"; import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { Emojis } from "@/models/index.js"; import { Emojis } from "@/models/index.js";
import { In } from "typeorm"; import { In } from "typeorm";
import { db } from "@/db/postgre.js"; import { db } from "@/db/postgre.js";

View file

@ -1,5 +1,4 @@
import define from "@/server/api/define.js"; import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { Emojis } from "@/models/index.js"; import { Emojis } from "@/models/index.js";
import { In } from "typeorm"; import { In } from "typeorm";
import { db } from "@/db/postgre.js"; import { db } from "@/db/postgre.js";

View file

@ -1,5 +1,4 @@
import define from "@/server/api/define.js"; import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { Emojis } from "@/models/index.js"; import { Emojis } from "@/models/index.js";
import { In } from "typeorm"; import { In } from "typeorm";
import { db } from "@/db/postgre.js"; import { db } from "@/db/postgre.js";

View file

@ -44,5 +44,5 @@
"compileOnSave": false, "compileOnSave": false,
"include": [ "include": [
"./src/**/*.ts" "./src/**/*.ts"
] ],
} }

View file

@ -11,7 +11,7 @@
"format": "pnpm biome format * --write && pnpm prettier --write '**/*.{scss,vue}' --cache --cache-strategy metadata" "format": "pnpm biome format * --write && pnpm prettier --write '**/*.{scss,vue}' --cache --cache-strategy metadata"
}, },
"devDependencies": { "devDependencies": {
"@eslint-sets/eslint-config-vue3": "^5.12.0", "@eslint-sets/eslint-config-vue3": "^5.11.0",
"@eslint-sets/eslint-config-vue3-ts": "^3.3.0", "@eslint-sets/eslint-config-vue3-ts": "^3.3.0",
"@phosphor-icons/web": "^2.0.3", "@phosphor-icons/web": "^2.0.3",
"@rollup/plugin-alias": "5.1.0", "@rollup/plugin-alias": "5.1.0",
@ -26,14 +26,14 @@
"@types/katex": "0.16.7", "@types/katex": "0.16.7",
"@types/matter-js": "0.19.6", "@types/matter-js": "0.19.6",
"@types/prismjs": "1.26.3", "@types/prismjs": "1.26.3",
"@types/punycode": "2.1.4", "@types/punycode": "2.1.3",
"@types/seedrandom": "3.0.8", "@types/seedrandom": "3.0.8",
"@types/textarea-caret": "3.0.3", "@types/textarea-caret": "3.0.3",
"@types/throttle-debounce": "5.0.2", "@types/throttle-debounce": "5.0.2",
"@types/tinycolor2": "1.4.6", "@types/tinycolor2": "1.4.6",
"@types/uuid": "9.0.8", "@types/uuid": "9.0.8",
"@vitejs/plugin-vue": "5.0.4", "@vitejs/plugin-vue": "5.0.3",
"@vue/runtime-core": "3.4.21", "@vue/runtime-core": "3.4.15",
"autobind-decorator": "2.4.0", "autobind-decorator": "2.4.0",
"autosize": "6.0.1", "autosize": "6.0.1",
"blurhash": "2.0.5", "blurhash": "2.0.5",
@ -66,27 +66,27 @@
"mfm-js": "0.24.0", "mfm-js": "0.24.0",
"moment": "^2.30.1", "moment": "^2.30.1",
"photoswipe": "5.4.3", "photoswipe": "5.4.3",
"prettier": "3.2.5", "prettier": "3.2.4",
"prismjs": "1.29.0", "prismjs": "1.29.0",
"punycode": "2.3.1", "punycode": "2.3.1",
"rollup": "4.12.0", "rollup": "4.9.6",
"s-age": "1.1.2", "s-age": "1.1.2",
"sass": "1.71.1", "sass": "1.70.0",
"seedrandom": "3.0.5", "seedrandom": "3.0.5",
"stringz": "2.1.0", "stringz": "2.1.0",
"swiper": "11.0.7", "swiper": "11.0.5",
"syuilo-password-strength": "0.0.1", "syuilo-password-strength": "0.0.1",
"textarea-caret": "3.1.0", "textarea-caret": "3.1.0",
"three": "0.161.0", "three": "0.160.1",
"throttle-debounce": "5.0.0", "throttle-debounce": "5.0.0",
"tinycolor2": "1.6.0", "tinycolor2": "1.6.0",
"tinyld": "^1.3.4", "tinyld": "^1.3.4",
"typescript": "5.3.3", "typescript": "5.3.3",
"unicode-emoji-json": "0.4.0", "unicode-emoji-json": "0.4.0",
"uuid": "9.0.1", "uuid": "9.0.1",
"vite": "5.1.4", "vite": "5.0.12",
"vite-plugin-compression": "0.5.1", "vite-plugin-compression": "0.5.1",
"vue": "3.4.21", "vue": "3.4.15",
"vue-draggable-plus": "^0.3.5", "vue-draggable-plus": "^0.3.5",
"vue-plyr": "^7.0.0", "vue-plyr": "^7.0.0",
"vue-prism-editor": "2.0.0-alpha.2" "vue-prism-editor": "2.0.0-alpha.2"

View file

@ -79,16 +79,10 @@
{{ i18n.ts.retry }} {{ i18n.ts.retry }}
</MkButton> </MkButton>
</div> </div>
<div <div v-if="user && user.securityKeys && user.twoFactorEnabled" class="or-hr">
v-if="user && user.securityKeys && user.twoFactorEnabled"
class="or-hr"
>
<p class="or-msg">{{ i18n.ts.or }}</p> <p class="or-msg">{{ i18n.ts.or }}</p>
</div> </div>
<div <div v-if="user.twoFactorEnabled" class="twofa-group totp-group">
v-if="user.twoFactorEnabled"
class="twofa-group totp-group"
>
<p style="margin-bottom: 0"> <p style="margin-bottom: 0">
{{ i18n.ts.twoStepAuthentication }} {{ i18n.ts.twoStepAuthentication }}
</p> </p>

View file

@ -7,10 +7,9 @@
"types": "./built/index.d.ts", "types": "./built/index.d.ts",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"build": "pnpm swc src --out-dir built --source-maps false --copy-files --strip-leading-paths", "build": "pnpm swc src -d built -D",
"build:types": "pnpm tsc --emitDeclarationOnly", "build:types": "pnpm tsc --emitDeclarationOnly",
"build:debug": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths", "build:debug": "pnpm swc src -d built -s -D",
"watch": "pnpm swc src --out-dir built --source-maps true --copy-files --strip-leading-paths --watch",
"lint": "pnpm biome check --apply src", "lint": "pnpm biome check --apply src",
"format": "pnpm biome format --write src" "format": "pnpm biome format --write src"
}, },
@ -19,12 +18,12 @@
"url": "https://code.naskya.net/naskya/firefish" "url": "https://code.naskya.net/naskya/firefish"
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "0.3.10", "@swc/cli": "0.1.65",
"@swc/core": "1.4.2", "@swc/core": "1.3.107",
"@swc/types": "0.1.5", "@swc/types": "0.1.5",
"@types/node": "20.11.21", "@types/node": "20.11.13",
"ts-node": "10.9.2", "ts-node": "10.9.2",
"tsd": "0.30.7", "tsd": "0.30.4",
"typescript": "5.3.3" "typescript": "5.3.3"
}, },
"files": [ "files": [

24
packages/sw/.swcrc Normal file
View file

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

View file

@ -5,13 +5,20 @@
"scripts": { "scripts": {
"build": "pnpm vite build --emptyOutDir", "build": "pnpm vite build --emptyOutDir",
"build:debug": "pnpm run build", "build:debug": "pnpm run build",
"watch": "pnpm swc src -d built -D -w",
"lint": "pnpm biome check *.ts --apply", "lint": "pnpm biome check *.ts --apply",
"format": "pnpm biome format * --write" "format": "pnpm biome format * --write"
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "0.1.65",
"@swc/core": "1.3.107",
"@swc/core-android-arm64": "1.3.11",
"firefish-js": "workspace:*", "firefish-js": "workspace:*",
"idb-keyval": "6.2.1", "idb-keyval": "6.2.1",
"vite": "5.1.4", "vite": "5.0.12",
"vite-plugin-compression": "0.5.1" "vite-plugin-compression": "0.5.1"
},
"optionalDependencies": {
"@swc/core-android-arm64": "1.3.11"
} }
} }

File diff suppressed because it is too large Load diff