Merge branch 'develop' into iceshrimp_mastodon

This commit is contained in:
naskya 2024-06-22 23:54:37 +09:00
commit c072f791aa
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
19 changed files with 2738 additions and 1704 deletions

View file

@ -223,6 +223,31 @@ build:container:
- buildah inspect "${IMAGE_TAG}" - buildah inspect "${IMAGE_TAG}"
- buildah push "${IMAGE_TAG}" - buildah push "${IMAGE_TAG}"
cargo:check:msrv:
stage: test
image: docker.io/rust:1.74-slim-bookworm
rules:
- if: $TEST == 'true'
when: always
- if: $TEST == 'false'
when: never
- if: $CI_COMMIT_BRANCH == 'develop' || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == 'develop'
changes:
paths:
- packages/backend-rs/**/*
- packages/macro-rs/**/*
- Cargo.toml
- Cargo.lock
when: always
services: []
before_script:
- apt-get update && apt-get -y upgrade
- apt-get install -y --no-install-recommends build-essential clang mold python3 perl nodejs postgresql-client
- cp ci/cargo/config.toml /usr/local/cargo/config.toml
script:
- cargo fetch --locked --manifest-path Cargo.toml
- cargo check --locked --frozen --all-features
cargo:test: cargo:test:
stage: test stage: test
rules: rules:
@ -237,7 +262,6 @@ cargo:test:
- packages/macro-rs/**/* - packages/macro-rs/**/*
- Cargo.toml - Cargo.toml
- Cargo.lock - Cargo.lock
- package.json
when: always when: always
script: script:
- curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/local/cargo/bin - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/local/cargo/bin

118
Cargo.lock generated
View file

@ -92,7 +92,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -143,7 +143,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -154,7 +154,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -207,7 +207,7 @@ dependencies = [
"chrono", "chrono",
"cuid2", "cuid2",
"emojis", "emojis",
"idna", "idna 1.0.1",
"image", "image",
"isahc", "isahc",
"macros", "macros",
@ -380,9 +380,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
[[package]] [[package]]
name = "bytemuck" name = "bytemuck"
version = "1.16.0" version = "1.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78834c15cb5d5efe3452d58b1e8ba890dd62d21907f867f383358198e56ebca5" checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e"
[[package]] [[package]]
name = "byteorder" name = "byteorder"
@ -629,7 +629,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f"
dependencies = [ dependencies = [
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -772,7 +772,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -1388,14 +1388,24 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
name = "idna" name = "idna"
version = "1.0.0" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
dependencies = [
"unicode-bidi",
"unicode-normalization",
]
[[package]]
name = "idna"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44a986806a1cc899952ba462bc1f28afbfd5850ab6cb030ccb20dd02cc527a24"
dependencies = [ dependencies = [
"icu_normalizer", "icu_normalizer",
"icu_properties", "icu_properties",
@ -1457,7 +1467,7 @@ checksum = "0122b7114117e64a63ac49f752a5ca4624d534c7b1c7de796ac196381cd2d947"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -1486,7 +1496,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -1734,7 +1744,7 @@ dependencies = [
"convert_case", "convert_case",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -1759,9 +1769,9 @@ dependencies = [
[[package]] [[package]]
name = "memchr" name = "memchr"
version = "2.7.2" version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]] [[package]]
name = "mime" name = "mime"
@ -1777,9 +1787,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]] [[package]]
name = "miniz_oxide" name = "miniz_oxide"
version = "0.7.3" version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
dependencies = [ dependencies = [
"adler", "adler",
"simd-adler32", "simd-adler32",
@ -1819,23 +1829,23 @@ checksum = "e1c0f5d67ee408a4685b61f5ab7e58605c8ae3f2b4189f0127d804ff13d5560a"
[[package]] [[package]]
name = "napi-derive" name = "napi-derive"
version = "2.16.5" version = "3.0.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0e034ddf6155192cf83f267ede763fe6c164dfa9971585436b16173718d94c4" checksum = "c230c813bfd4d6c7aafead3c075b37f0cf7fecb38be8f4cf5cfcee0b2c273ad0"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"convert_case", "convert_case",
"napi-derive-backend", "napi-derive-backend",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
name = "napi-derive-backend" name = "napi-derive-backend"
version = "1.0.67" version = "2.0.0-alpha.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bff2c00437f3b3266391eb5e6aa25d0029187daf5caf05b8e3271468fb5ae73e" checksum = "4370cc24c2e58d0f3393527b282eb00f1158b304248f549e1ec81bd2927db5fe"
dependencies = [ dependencies = [
"convert_case", "convert_case",
"once_cell", "once_cell",
@ -1843,7 +1853,7 @@ dependencies = [
"quote", "quote",
"regex", "regex",
"semver", "semver",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -1971,7 +1981,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -2063,7 +2073,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -2124,7 +2134,7 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -2181,7 +2191,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
"libc", "libc",
"redox_syscall 0.5.1", "redox_syscall 0.5.2",
"smallvec", "smallvec",
"windows-targets 0.52.5", "windows-targets 0.52.5",
] ]
@ -2282,7 +2292,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -2432,9 +2442,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro2" name = "proc-macro2"
version = "1.0.85" version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [ dependencies = [
"unicode-ident", "unicode-ident",
] ]
@ -2455,7 +2465,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
dependencies = [ dependencies = [
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -2603,9 +2613,9 @@ dependencies = [
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.5.1" version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
dependencies = [ dependencies = [
"bitflags 2.5.0", "bitflags 2.5.0",
] ]
@ -2826,7 +2836,7 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -2865,7 +2875,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"sea-bae", "sea-bae",
"syn 2.0.66", "syn 2.0.67",
"unicode-ident", "unicode-ident",
] ]
@ -2942,7 +2952,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -3382,9 +3392,9 @@ checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
[[package]] [[package]]
name = "subtle" name = "subtle"
version = "2.5.0" version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" checksum = "0d0208408ba0c3df17ed26eb06992cb1a1268d41b2c0e12e65203fbe3972cee5"
[[package]] [[package]]
name = "syn" name = "syn"
@ -3399,9 +3409,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.66" version = "2.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3428,7 +3438,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -3493,7 +3503,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -3598,7 +3608,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -3692,7 +3702,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -3791,12 +3801,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]] [[package]]
name = "url" name = "url"
version = "2.5.1" version = "2.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
dependencies = [ dependencies = [
"form_urlencoded", "form_urlencoded",
"idna", "idna 0.5.0",
"percent-encoding", "percent-encoding",
] ]
@ -3904,7 +3914,7 @@ dependencies = [
"once_cell", "once_cell",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -3926,7 +3936,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
"wasm-bindgen-backend", "wasm-bindgen-backend",
"wasm-bindgen-shared", "wasm-bindgen-shared",
] ]
@ -4207,7 +4217,7 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
"synstructure 0.13.1", "synstructure 0.13.1",
] ]
@ -4228,7 +4238,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]
@ -4248,7 +4258,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
"synstructure 0.13.1", "synstructure 0.13.1",
] ]
@ -4277,7 +4287,7 @@ checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.66", "syn 2.0.67",
] ]
[[package]] [[package]]

View file

@ -7,7 +7,7 @@ macros = { path = "packages/macro-rs/macros" }
macros-impl = { path = "packages/macro-rs/macros-impl" } macros-impl = { path = "packages/macro-rs/macros-impl" }
napi = { git = "https://github.com/napi-rs/napi-rs.git", rev = "ca2cd5c35a0c39ec4a94e93c6c5695b681046df2" } napi = { git = "https://github.com/napi-rs/napi-rs.git", rev = "ca2cd5c35a0c39ec4a94e93c6c5695b681046df2" }
napi-derive = "2.16.5" napi-derive = "3.0.0-alpha.1"
napi-build = "2.1.3" napi-build = "2.1.3"
argon2 = { version = "0.5.3", default-features = false } argon2 = { version = "0.5.3", default-features = false }
@ -19,14 +19,13 @@ chrono = { version = "0.4.38", default-features = false }
convert_case = { version = "0.6.0", default-features = false } convert_case = { version = "0.6.0", default-features = false }
cuid2 = { version = "0.1.2", default-features = false } cuid2 = { version = "0.1.2", default-features = false }
emojis = { version = "0.6.2", default-features = false } emojis = { version = "0.6.2", default-features = false }
idna = { version = "1.0.0", default-features = false } idna = { version = "1.0.1", default-features = false }
image = { version = "0.25.1", default-features = false } image = { version = "0.25.1", default-features = false }
isahc = { version = "1.7.2", default-features = false } isahc = { version = "1.7.2", default-features = false }
nom-exif = { version = "1.2.0", default-features = false } nom-exif = { version = "1.2.0", default-features = false }
once_cell = { version = "1.19.0", default-features = false } once_cell = { version = "1.19.0", default-features = false }
openssl = "0.10.64"
pretty_assertions = { version = "1.4.0", default-features = false } pretty_assertions = { version = "1.4.0", default-features = false }
proc-macro2 = { version = "1.0.85", default-features = false } proc-macro2 = { version = "1.0.86", default-features = false }
quote = { version = "1.0.36", default-features = false } quote = { version = "1.0.36", default-features = false }
rand = { version = "0.8.5", default-features = false } rand = { version = "0.8.5", default-features = false }
redis = { version = "0.25.4", default-features = false } redis = { version = "0.25.4", default-features = false }
@ -36,16 +35,23 @@ sea-orm = { version = "0.12.15", default-features = false }
serde = { version = "1.0.203", default-features = false } serde = { version = "1.0.203", default-features = false }
serde_json = { version = "1.0.117", default-features = false } serde_json = { version = "1.0.117", default-features = false }
serde_yaml = { version = "0.9.34", default-features = false } serde_yaml = { version = "0.9.34", default-features = false }
syn = { version = "2.0.66", default-features = false } syn = { version = "2.0.67", default-features = false }
sysinfo = { version = "0.30.12", default-features = false } sysinfo = { version = "0.30.12", default-features = false }
thiserror = { version = "1.0.61", default-features = false } thiserror = { version = "1.0.61", default-features = false }
tokio = { version = "1.38.0", default-features = false } tokio = { version = "1.38.0", default-features = false }
tokio-test = { version = "0.4.4", default-features = false } tokio-test = { version = "0.4.4", default-features = false }
tracing = { version = "0.1.40", default-features = false } tracing = { version = "0.1.40", default-features = false }
tracing-subscriber = { version = "0.3.18", default-features = false } tracing-subscriber = { version = "0.3.18", default-features = false }
url = { version = "2.5.1", default-features = false } url = { version = "2.5.2", default-features = false }
urlencoding = { version = "2.1.3", default-features = false } urlencoding = { version = "2.1.3", default-features = false }
web-push = { git = "https://github.com/pimeys/rust-web-push.git", rev = "40febe4085e3cef9cdfd539c315e3e945aba0656", default-features = false } web-push = { git = "https://github.com/pimeys/rust-web-push.git", rev = "40febe4085e3cef9cdfd539c315e3e945aba0656", default-features = false }
# subdependencies
## explicitly list OpenSSL to use the vendored version
openssl = "0.10.64"
## pin ravif and bitstream-io version because the latest one requires Rust 1.79
ravif = "=0.11.5"
bitstream-io = "=2.3.0"
[profile.release] [profile.release]
lto = true lto = true

View file

@ -395,7 +395,7 @@ _profile:
metadataLabel: Etiqueta metadataLabel: Etiqueta
metadataContent: Contingut metadataContent: Contingut
changeAvatar: Canvia l'avatar changeAvatar: Canvia l'avatar
changeBanner: Canvia el banner changeBanner: Canvia el bàner
locationDescription: Si primer introduïu la vostra ciutat, es mostrarà l'hora local locationDescription: Si primer introduïu la vostra ciutat, es mostrarà l'hora local
a altres usuaris. a altres usuaris.
name: Nom name: Nom
@ -1114,7 +1114,7 @@ createAccount: Crea un compte
fontSize: Mida del text fontSize: Mida del text
noFollowRequests: No tens cap sol·licitud de seguiment per aprovar noFollowRequests: No tens cap sol·licitud de seguiment per aprovar
openImageInNewTab: Obre les imatges a una pestanya nova openImageInNewTab: Obre les imatges a una pestanya nova
dashboard: Tauler dashboard: Taulell
local: Local local: Local
remote: Remot remote: Remot
total: Total total: Total
@ -1551,7 +1551,7 @@ itsOn: Activat
itsOff: Desactivat itsOff: Desactivat
emailRequiredForSignup: Requereix una adreça de correu electrònic per registrar-te emailRequiredForSignup: Requereix una adreça de correu electrònic per registrar-te
unread: Sense llegir unread: Sense llegir
controlPanel: Tauler de control controlPanel: Taulell de control
manageAccounts: Gestionar comptes manageAccounts: Gestionar comptes
makeReactionsPublic: Estableix l'historial de reaccions com a públic makeReactionsPublic: Estableix l'historial de reaccions com a públic
classic: Centrat classic: Centrat

View file

@ -2283,7 +2283,7 @@ searchPostsWithFiles: Nur Beiträge mit Dateien
noAltTextWarning: Einige der angehängten Dateien haben keine Beschreibung. Haben Sie noAltTextWarning: Einige der angehängten Dateien haben keine Beschreibung. Haben Sie
vergessen, diese zu schreiben? vergessen, diese zu schreiben?
toReply: Antworten toReply: Antworten
toPost: Beitrag teilen toPost: Teilen
sentFollowRequests: Gesendete Follow-Anfragen sentFollowRequests: Gesendete Follow-Anfragen
replyMute: Antworten in Timelines stummschalten replyMute: Antworten in Timelines stummschalten
replyUnmute: Stummschaltung von Antworten in Timelines aufheben replyUnmute: Stummschaltung von Antworten in Timelines aufheben

View file

@ -5,7 +5,7 @@
"type": "git", "type": "git",
"url": "https://firefish.dev/firefish/firefish.git" "url": "https://firefish.dev/firefish/firefish.git"
}, },
"packageManager": "pnpm@9.3.0", "packageManager": "pnpm@9.4.0",
"private": true, "private": true,
"scripts": { "scripts": {
"rebuild": "pnpm run clean && pnpm run build", "rebuild": "pnpm run clean && pnpm run build",
@ -42,14 +42,14 @@
"js-yaml": "4.1.0" "js-yaml": "4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.8.1", "@biomejs/biome": "1.8.2",
"@biomejs/cli-darwin-arm64": "1.8.1", "@biomejs/cli-darwin-arm64": "1.8.2",
"@biomejs/cli-darwin-x64": "1.8.1", "@biomejs/cli-darwin-x64": "1.8.2",
"@biomejs/cli-linux-arm64": "1.8.1", "@biomejs/cli-linux-arm64": "1.8.2",
"@biomejs/cli-linux-x64": "1.8.1", "@biomejs/cli-linux-x64": "1.8.2",
"@types/node": "20.14.2", "@types/node": "20.14.8",
"execa": "9.2.0", "execa": "9.3.0",
"pnpm": "9.3.0", "pnpm": "9.4.0",
"typescript": "5.4.5" "typescript": "5.5.2"
} }
} }

View file

@ -32,4 +32,3 @@ index.js index.d.ts: $(SRC)
rm --force index.js index.d.ts rm --force index.js index.d.ts
cp built/index.js index.js cp built/index.js index.js
cp built/index.d.ts index.d.ts cp built/index.d.ts index.d.ts
sed -i 's/^ \*r"/ */g' index.d.ts

File diff suppressed because it is too large Load diff

View file

@ -1,404 +1,453 @@
/* tslint:disable */ // prettier-ignore
/* eslint-disable */ /* eslint-disable */
/* prettier-ignore */
/* auto-generated by NAPI-RS */ /* auto-generated by NAPI-RS */
const { existsSync, readFileSync } = require('fs') const { readFileSync } = require('fs')
const { join } = require('path')
const { platform, arch } = process
let nativeBinding = null let nativeBinding = null
let localFileExisted = false const loadErrors = []
let loadError = null
function isMusl() { const isMusl = () => {
// For Node 10 let musl = false
if (!process.report || typeof process.report.getReport !== 'function') { if (process.platform === 'linux') {
try { musl = isMuslFromFilesystem()
const lddPath = require('child_process').execSync('which ldd').toString().trim() if (musl === null) {
return readFileSync(lddPath, 'utf8').includes('musl') musl = isMuslFromReport()
} catch (e) {
return true
} }
} else { if (musl === null) {
const { glibcVersionRuntime } = process.report.getReport().header musl = isMuslFromChildProcess()
return !glibcVersionRuntime }
}
return musl
}
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
const isMuslFromFilesystem = () => {
try {
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
} catch {
return null
} }
} }
switch (platform) { const isMuslFromReport = () => {
case 'android': const report = typeof process.report.getReport === 'function' ? process.report.getReport() : null
switch (arch) { if (!report) {
case 'arm64': return null
localFileExisted = existsSync(join(__dirname, 'backend-rs.android-arm64.node')) }
try { if (report.header && report.header.glibcVersionRuntime) {
if (localFileExisted) { return false
nativeBinding = require('./backend-rs.android-arm64.node') }
} else { if (Array.isArray(report.sharedObjects)) {
nativeBinding = require('backend-rs-android-arm64') if (report.sharedObjects.some(isFileMusl)) {
} return true
} catch (e) {
loadError = e
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'backend-rs.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./backend-rs.android-arm-eabi.node')
} else {
nativeBinding = require('backend-rs-android-arm-eabi')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Android ${arch}`)
} }
break }
case 'win32': return false
switch (arch) { }
case 'x64':
localFileExisted = existsSync( const isMuslFromChildProcess = () => {
join(__dirname, 'backend-rs.win32-x64-msvc.node') try {
) return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
try { } catch (e) {
if (localFileExisted) { // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
nativeBinding = require('./backend-rs.win32-x64-msvc.node') return false
} else { }
nativeBinding = require('backend-rs-win32-x64-msvc') }
}
} catch (e) { function requireNative() {
loadError = e if (process.platform === 'android') {
} if (process.arch === 'arm64') {
break try {
case 'ia32': return require('./backend-rs.android-arm64.node')
localFileExisted = existsSync( } catch (e) {
join(__dirname, 'backend-rs.win32-ia32-msvc.node') loadErrors.push(e)
)
try {
if (localFileExisted) {
nativeBinding = require('./backend-rs.win32-ia32-msvc.node')
} else {
nativeBinding = require('backend-rs-win32-ia32-msvc')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'backend-rs.win32-arm64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./backend-rs.win32-arm64-msvc.node')
} else {
nativeBinding = require('backend-rs-win32-arm64-msvc')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Windows: ${arch}`)
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'backend-rs.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./backend-rs.darwin-universal.node')
} else {
nativeBinding = require('backend-rs-darwin-universal')
} }
break try {
} catch {} return require('backend-rs-android-arm64')
switch (arch) { } catch (e) {
case 'x64': loadErrors.push(e)
localFileExisted = existsSync(join(__dirname, 'backend-rs.darwin-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./backend-rs.darwin-x64.node')
} else {
nativeBinding = require('backend-rs-darwin-x64')
}
} catch (e) {
loadError = e
}
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'backend-rs.darwin-arm64.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./backend-rs.darwin-arm64.node')
} else {
nativeBinding = require('backend-rs-darwin-arm64')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on macOS: ${arch}`)
}
break
case 'freebsd':
if (arch !== 'x64') {
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'backend-rs.freebsd-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./backend-rs.freebsd-x64.node')
} else {
nativeBinding = require('backend-rs-freebsd-x64')
} }
} catch (e) {
loadError = e } else if (process.arch === 'arm') {
try {
return require('./backend-rs.android-arm-eabi.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-android-arm-eabi')
} catch (e) {
loadErrors.push(e)
}
} else {
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
} }
break } else if (process.platform === 'win32') {
case 'linux': if (process.arch === 'x64') {
switch (arch) { try {
case 'x64': return require('./backend-rs.win32-x64-msvc.node')
if (isMusl()) { } catch (e) {
localFileExisted = existsSync( loadErrors.push(e)
join(__dirname, 'backend-rs.linux-x64-musl.node') }
) try {
try { return require('backend-rs-win32-x64-msvc')
if (localFileExisted) { } catch (e) {
nativeBinding = require('./backend-rs.linux-x64-musl.node') loadErrors.push(e)
} else { }
nativeBinding = require('backend-rs-linux-x64-musl')
} } else if (process.arch === 'ia32') {
} catch (e) { try {
loadError = e return require('./backend-rs.win32-ia32-msvc.node')
} } catch (e) {
} else { loadErrors.push(e)
localFileExisted = existsSync( }
join(__dirname, 'backend-rs.linux-x64-gnu.node') try {
) return require('backend-rs-win32-ia32-msvc')
try { } catch (e) {
if (localFileExisted) { loadErrors.push(e)
nativeBinding = require('./backend-rs.linux-x64-gnu.node') }
} else {
nativeBinding = require('backend-rs-linux-x64-gnu') } else if (process.arch === 'arm64') {
} try {
} catch (e) { return require('./backend-rs.win32-arm64-msvc.node')
loadError = e } catch (e) {
} loadErrors.push(e)
} }
break try {
case 'arm64': return require('backend-rs-win32-arm64-msvc')
if (isMusl()) { } catch (e) {
localFileExisted = existsSync( loadErrors.push(e)
join(__dirname, 'backend-rs.linux-arm64-musl.node') }
)
try { } else {
if (localFileExisted) { loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
nativeBinding = require('./backend-rs.linux-arm64-musl.node') }
} else { } else if (process.platform === 'darwin') {
nativeBinding = require('backend-rs-linux-arm64-musl') try {
} return require('./backend-rs.darwin-universal.node')
} catch (e) { } catch (e) {
loadError = e loadErrors.push(e)
} }
} else { try {
localFileExisted = existsSync( return require('backend-rs-darwin-universal')
join(__dirname, 'backend-rs.linux-arm64-gnu.node') } catch (e) {
) loadErrors.push(e)
try { }
if (localFileExisted) {
nativeBinding = require('./backend-rs.linux-arm64-gnu.node') if (process.arch === 'x64') {
} else { try {
nativeBinding = require('backend-rs-linux-arm64-gnu') return require('./backend-rs.darwin-x64.node')
} } catch (e) {
} catch (e) { loadErrors.push(e)
loadError = e }
} try {
} return require('backend-rs-darwin-x64')
break } catch (e) {
case 'arm': loadErrors.push(e)
if (isMusl()) { }
localFileExisted = existsSync(
join(__dirname, 'backend-rs.linux-arm-musleabihf.node') } else if (process.arch === 'arm64') {
) try {
try { return require('./backend-rs.darwin-arm64.node')
if (localFileExisted) { } catch (e) {
nativeBinding = require('./backend-rs.linux-arm-musleabihf.node') loadErrors.push(e)
} else { }
nativeBinding = require('backend-rs-linux-arm-musleabihf') try {
} return require('backend-rs-darwin-arm64')
} catch (e) { } catch (e) {
loadError = e loadErrors.push(e)
} }
} else {
localFileExisted = existsSync( } else {
join(__dirname, 'backend-rs.linux-arm-gnueabihf.node') loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
) }
try { } else if (process.platform === 'freebsd') {
if (localFileExisted) { if (process.arch === 'x64') {
nativeBinding = require('./backend-rs.linux-arm-gnueabihf.node') try {
} else { return require('./backend-rs.freebsd-x64.node')
nativeBinding = require('backend-rs-linux-arm-gnueabihf') } catch (e) {
} loadErrors.push(e)
} catch (e) { }
loadError = e try {
} return require('backend-rs-freebsd-x64')
} } catch (e) {
break loadErrors.push(e)
case 'riscv64': }
if (isMusl()) {
localFileExisted = existsSync( } else if (process.arch === 'arm64') {
join(__dirname, 'backend-rs.linux-riscv64-musl.node') try {
) return require('./backend-rs.freebsd-arm64.node')
try { } catch (e) {
if (localFileExisted) { loadErrors.push(e)
nativeBinding = require('./backend-rs.linux-riscv64-musl.node') }
} else { try {
nativeBinding = require('backend-rs-linux-riscv64-musl') return require('backend-rs-freebsd-arm64')
} } catch (e) {
} catch (e) { loadErrors.push(e)
loadError = e }
}
} else { } else {
localFileExisted = existsSync( loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
join(__dirname, 'backend-rs.linux-riscv64-gnu.node') }
) } else if (process.platform === 'linux') {
try { if (process.arch === 'x64') {
if (localFileExisted) { if (isMusl()) {
nativeBinding = require('./backend-rs.linux-riscv64-gnu.node')
} else {
nativeBinding = require('backend-rs-linux-riscv64-gnu')
}
} catch (e) {
loadError = e
}
}
break
case 's390x':
localFileExisted = existsSync(
join(__dirname, 'backend-rs.linux-s390x-gnu.node')
)
try { try {
if (localFileExisted) { return require('./backend-rs.linux-x64-musl.node')
nativeBinding = require('./backend-rs.linux-s390x-gnu.node') } catch (e) {
} else { loadErrors.push(e)
nativeBinding = require('backend-rs-linux-s390x-gnu') }
} try {
} catch (e) { return require('backend-rs-linux-x64-musl')
loadError = e } catch (e) {
} loadErrors.push(e)
break }
default:
throw new Error(`Unsupported architecture on Linux: ${arch}`) } else {
try {
return require('./backend-rs.linux-x64-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-x64-gnu')
} catch (e) {
loadErrors.push(e)
}
}
} else if (process.arch === 'arm64') {
if (isMusl()) {
try {
return require('./backend-rs.linux-arm64-musl.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-arm64-musl')
} catch (e) {
loadErrors.push(e)
}
} else {
try {
return require('./backend-rs.linux-arm64-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-arm64-gnu')
} catch (e) {
loadErrors.push(e)
}
}
} else if (process.arch === 'arm') {
if (isMusl()) {
try {
return require('./backend-rs.linux-arm-musleabihf.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-arm-musleabihf')
} catch (e) {
loadErrors.push(e)
}
} else {
try {
return require('./backend-rs.linux-arm-gnueabihf.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-arm-gnueabihf')
} catch (e) {
loadErrors.push(e)
}
}
} else if (process.arch === 'riscv64') {
if (isMusl()) {
try {
return require('./backend-rs.linux-riscv64-musl.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-riscv64-musl')
} catch (e) {
loadErrors.push(e)
}
} else {
try {
return require('./backend-rs.linux-riscv64-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-riscv64-gnu')
} catch (e) {
loadErrors.push(e)
}
}
} else if (process.arch === 'ppc64') {
try {
return require('./backend-rs.linux-ppc64-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-ppc64-gnu')
} catch (e) {
loadErrors.push(e)
}
} else if (process.arch === 's390x') {
try {
return require('./backend-rs.linux-s390x-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('backend-rs-linux-s390x-gnu')
} catch (e) {
loadErrors.push(e)
}
} else {
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
} }
break } else {
default: loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
throw new Error(`Unsupported OS: ${platform}, architecture: ${arch}`) }
}
nativeBinding = requireNative()
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
try {
nativeBinding = require('./backend-rs.wasi.cjs')
} catch (err) {
if (process.env.NAPI_RS_FORCE_WASI) {
console.error(err)
}
}
if (!nativeBinding) {
try {
nativeBinding = require('backend-rs-wasm32-wasi')
} catch (err) {
if (process.env.NAPI_RS_FORCE_WASI) {
console.error(err)
}
}
}
} }
if (!nativeBinding) { if (!nativeBinding) {
if (loadError) { if (loadErrors.length > 0) {
throw loadError // TODO Link to documentation with potential fixes
// - The package owner could build/publish bindings for this arch
// - The user may need to bundle the correct files
// - The user may need to re-install node_modules to get new packages
throw new Error('Failed to load native binding', { cause: loadErrors })
} }
throw new Error(`Failed to load native binding`) throw new Error(`Failed to load native binding`)
} }
const { SECOND, MINUTE, HOUR, DAY, USER_ONLINE_THRESHOLD, USER_ACTIVE_THRESHOLD, FILE_TYPE_BROWSERSAFE, fetchMeta, updateMetaCache, metaToPugArgs, loadConfig, stringToAcct, acctToString, fetchNodeinfo, nodeinfo_2_1, nodeinfo_2_0, updateNodeinfoCache, Protocol, Inbound, Outbound, greet, initializeRustLogger, showServerInfo, isBlockedServer, isSilencedServer, isAllowedServer, checkWordMute, getFullApAccount, isSelfHost, isSameOrigin, extractHost, toPuny, isUnicodeEmoji, sqlLikeEscape, sqlRegexEscape, safeForSql, formatMilliseconds, getImageSizeFromUrl, isQuote, isSafeUrl, latestVersion, getNoteSummary, nyaify, hashPassword, verifyPassword, isOldPasswordAlgorithm, decodeReaction, countReactions, toDbReaction, removeOldAttestationChallenges, cpuInfo, cpuUsage, memoryUsage, storageUsage, AntennaSrc, DriveFileUsageHint, MutedNoteReason, NoteVisibility, NotificationType, PageVisibility, PollNoteVisibility, PushSubscriptionType, RelayStatus, UserEmojiModPerm, UserProfileFfvisibility, UserProfileMutingNotificationTypes, updateAntennasOnNewNote, updateAntennaCache, watchNote, unwatchNote, PushNotificationKind, sendPushNotification, publishToChannelStream, publishToChatStream, ChatIndexEvent, publishToChatIndexStream, publishToBroadcastStream, DriveFileEvent, DriveFolderEvent, publishToDriveFileStream, publishToDriveFolderStream, publishToGroupChatStream, publishToModerationStream, publishToNotesStream, ChatEvent, getTimestamp, genId, genIdAt, generateSecureRandomString, generateUserToken } = nativeBinding module.exports.acctToString = nativeBinding.acctToString
module.exports.AntennaSrc = nativeBinding.AntennaSrc
module.exports.SECOND = SECOND module.exports.ChatEvent = nativeBinding.ChatEvent
module.exports.MINUTE = MINUTE module.exports.ChatIndexEvent = nativeBinding.ChatIndexEvent
module.exports.HOUR = HOUR module.exports.checkWordMute = nativeBinding.checkWordMute
module.exports.DAY = DAY module.exports.countReactions = nativeBinding.countReactions
module.exports.USER_ONLINE_THRESHOLD = USER_ONLINE_THRESHOLD module.exports.cpuInfo = nativeBinding.cpuInfo
module.exports.USER_ACTIVE_THRESHOLD = USER_ACTIVE_THRESHOLD module.exports.cpuUsage = nativeBinding.cpuUsage
module.exports.FILE_TYPE_BROWSERSAFE = FILE_TYPE_BROWSERSAFE module.exports.DAY = nativeBinding.DAY
module.exports.fetchMeta = fetchMeta module.exports.decodeReaction = nativeBinding.decodeReaction
module.exports.updateMetaCache = updateMetaCache module.exports.DriveFileEvent = nativeBinding.DriveFileEvent
module.exports.metaToPugArgs = metaToPugArgs module.exports.DriveFileUsageHint = nativeBinding.DriveFileUsageHint
module.exports.loadConfig = loadConfig module.exports.DriveFolderEvent = nativeBinding.DriveFolderEvent
module.exports.stringToAcct = stringToAcct module.exports.extractHost = nativeBinding.extractHost
module.exports.acctToString = acctToString module.exports.fetchMeta = nativeBinding.fetchMeta
module.exports.fetchNodeinfo = fetchNodeinfo module.exports.fetchNodeinfo = nativeBinding.fetchNodeinfo
module.exports.nodeinfo_2_1 = nodeinfo_2_1 module.exports.FILE_TYPE_BROWSERSAFE = nativeBinding.FILE_TYPE_BROWSERSAFE
module.exports.nodeinfo_2_0 = nodeinfo_2_0 module.exports.formatMilliseconds = nativeBinding.formatMilliseconds
module.exports.updateNodeinfoCache = updateNodeinfoCache module.exports.generateSecureRandomString = nativeBinding.generateSecureRandomString
module.exports.Protocol = Protocol module.exports.generateUserToken = nativeBinding.generateUserToken
module.exports.Inbound = Inbound module.exports.genId = nativeBinding.genId
module.exports.Outbound = Outbound module.exports.genIdAt = nativeBinding.genIdAt
module.exports.greet = greet module.exports.getFullApAccount = nativeBinding.getFullApAccount
module.exports.initializeRustLogger = initializeRustLogger module.exports.getImageSizeFromUrl = nativeBinding.getImageSizeFromUrl
module.exports.showServerInfo = showServerInfo module.exports.getNoteSummary = nativeBinding.getNoteSummary
module.exports.isBlockedServer = isBlockedServer module.exports.getTimestamp = nativeBinding.getTimestamp
module.exports.isSilencedServer = isSilencedServer module.exports.greet = nativeBinding.greet
module.exports.isAllowedServer = isAllowedServer module.exports.hashPassword = nativeBinding.hashPassword
module.exports.checkWordMute = checkWordMute module.exports.HOUR = nativeBinding.HOUR
module.exports.getFullApAccount = getFullApAccount module.exports.Inbound = nativeBinding.Inbound
module.exports.isSelfHost = isSelfHost module.exports.initializeRustLogger = nativeBinding.initializeRustLogger
module.exports.isSameOrigin = isSameOrigin module.exports.isAllowedServer = nativeBinding.isAllowedServer
module.exports.extractHost = extractHost module.exports.isBlockedServer = nativeBinding.isBlockedServer
module.exports.toPuny = toPuny module.exports.isOldPasswordAlgorithm = nativeBinding.isOldPasswordAlgorithm
module.exports.isUnicodeEmoji = isUnicodeEmoji module.exports.isQuote = nativeBinding.isQuote
module.exports.sqlLikeEscape = sqlLikeEscape module.exports.isSafeUrl = nativeBinding.isSafeUrl
module.exports.sqlRegexEscape = sqlRegexEscape module.exports.isSameOrigin = nativeBinding.isSameOrigin
module.exports.safeForSql = safeForSql module.exports.isSelfHost = nativeBinding.isSelfHost
module.exports.formatMilliseconds = formatMilliseconds module.exports.isSilencedServer = nativeBinding.isSilencedServer
module.exports.getImageSizeFromUrl = getImageSizeFromUrl module.exports.isUnicodeEmoji = nativeBinding.isUnicodeEmoji
module.exports.isQuote = isQuote module.exports.latestVersion = nativeBinding.latestVersion
module.exports.isSafeUrl = isSafeUrl module.exports.loadConfig = nativeBinding.loadConfig
module.exports.latestVersion = latestVersion module.exports.memoryUsage = nativeBinding.memoryUsage
module.exports.getNoteSummary = getNoteSummary module.exports.metaToPugArgs = nativeBinding.metaToPugArgs
module.exports.nyaify = nyaify module.exports.MINUTE = nativeBinding.MINUTE
module.exports.hashPassword = hashPassword module.exports.MutedNoteReason = nativeBinding.MutedNoteReason
module.exports.verifyPassword = verifyPassword module.exports.nodeinfo_2_0 = nativeBinding.nodeinfo_2_0
module.exports.isOldPasswordAlgorithm = isOldPasswordAlgorithm module.exports.nodeinfo_2_1 = nativeBinding.nodeinfo_2_1
module.exports.decodeReaction = decodeReaction module.exports.NoteVisibility = nativeBinding.NoteVisibility
module.exports.countReactions = countReactions module.exports.NotificationType = nativeBinding.NotificationType
module.exports.toDbReaction = toDbReaction module.exports.nyaify = nativeBinding.nyaify
module.exports.removeOldAttestationChallenges = removeOldAttestationChallenges module.exports.Outbound = nativeBinding.Outbound
module.exports.cpuInfo = cpuInfo module.exports.PageVisibility = nativeBinding.PageVisibility
module.exports.cpuUsage = cpuUsage module.exports.PollNoteVisibility = nativeBinding.PollNoteVisibility
module.exports.memoryUsage = memoryUsage module.exports.Protocol = nativeBinding.Protocol
module.exports.storageUsage = storageUsage module.exports.publishToBroadcastStream = nativeBinding.publishToBroadcastStream
module.exports.AntennaSrc = AntennaSrc module.exports.publishToChannelStream = nativeBinding.publishToChannelStream
module.exports.DriveFileUsageHint = DriveFileUsageHint module.exports.publishToChatIndexStream = nativeBinding.publishToChatIndexStream
module.exports.MutedNoteReason = MutedNoteReason module.exports.publishToChatStream = nativeBinding.publishToChatStream
module.exports.NoteVisibility = NoteVisibility module.exports.publishToDriveFileStream = nativeBinding.publishToDriveFileStream
module.exports.NotificationType = NotificationType module.exports.publishToDriveFolderStream = nativeBinding.publishToDriveFolderStream
module.exports.PageVisibility = PageVisibility module.exports.publishToGroupChatStream = nativeBinding.publishToGroupChatStream
module.exports.PollNoteVisibility = PollNoteVisibility module.exports.publishToModerationStream = nativeBinding.publishToModerationStream
module.exports.PushSubscriptionType = PushSubscriptionType module.exports.publishToNotesStream = nativeBinding.publishToNotesStream
module.exports.RelayStatus = RelayStatus module.exports.PushNotificationKind = nativeBinding.PushNotificationKind
module.exports.UserEmojiModPerm = UserEmojiModPerm module.exports.PushSubscriptionType = nativeBinding.PushSubscriptionType
module.exports.UserProfileFfvisibility = UserProfileFfvisibility module.exports.RelayStatus = nativeBinding.RelayStatus
module.exports.UserProfileMutingNotificationTypes = UserProfileMutingNotificationTypes module.exports.removeOldAttestationChallenges = nativeBinding.removeOldAttestationChallenges
module.exports.updateAntennasOnNewNote = updateAntennasOnNewNote module.exports.safeForSql = nativeBinding.safeForSql
module.exports.updateAntennaCache = updateAntennaCache module.exports.SECOND = nativeBinding.SECOND
module.exports.watchNote = watchNote module.exports.sendPushNotification = nativeBinding.sendPushNotification
module.exports.unwatchNote = unwatchNote module.exports.showServerInfo = nativeBinding.showServerInfo
module.exports.PushNotificationKind = PushNotificationKind module.exports.sqlLikeEscape = nativeBinding.sqlLikeEscape
module.exports.sendPushNotification = sendPushNotification module.exports.sqlRegexEscape = nativeBinding.sqlRegexEscape
module.exports.publishToChannelStream = publishToChannelStream module.exports.storageUsage = nativeBinding.storageUsage
module.exports.publishToChatStream = publishToChatStream module.exports.stringToAcct = nativeBinding.stringToAcct
module.exports.ChatIndexEvent = ChatIndexEvent module.exports.toDbReaction = nativeBinding.toDbReaction
module.exports.publishToChatIndexStream = publishToChatIndexStream module.exports.toPuny = nativeBinding.toPuny
module.exports.publishToBroadcastStream = publishToBroadcastStream module.exports.unwatchNote = nativeBinding.unwatchNote
module.exports.DriveFileEvent = DriveFileEvent module.exports.updateAntennaCache = nativeBinding.updateAntennaCache
module.exports.DriveFolderEvent = DriveFolderEvent module.exports.updateAntennasOnNewNote = nativeBinding.updateAntennasOnNewNote
module.exports.publishToDriveFileStream = publishToDriveFileStream module.exports.updateMetaCache = nativeBinding.updateMetaCache
module.exports.publishToDriveFolderStream = publishToDriveFolderStream module.exports.updateNodeinfoCache = nativeBinding.updateNodeinfoCache
module.exports.publishToGroupChatStream = publishToGroupChatStream module.exports.USER_ACTIVE_THRESHOLD = nativeBinding.USER_ACTIVE_THRESHOLD
module.exports.publishToModerationStream = publishToModerationStream module.exports.USER_ONLINE_THRESHOLD = nativeBinding.USER_ONLINE_THRESHOLD
module.exports.publishToNotesStream = publishToNotesStream module.exports.UserEmojiModPerm = nativeBinding.UserEmojiModPerm
module.exports.ChatEvent = ChatEvent module.exports.UserProfileFfvisibility = nativeBinding.UserProfileFfvisibility
module.exports.getTimestamp = getTimestamp module.exports.UserProfileMutingNotificationTypes = nativeBinding.UserProfileMutingNotificationTypes
module.exports.genId = genId module.exports.verifyPassword = nativeBinding.verifyPassword
module.exports.genIdAt = genIdAt module.exports.watchNote = nativeBinding.watchNote
module.exports.generateSecureRandomString = generateSecureRandomString
module.exports.generateUserToken = generateUserToken

View file

@ -4,30 +4,29 @@
"main": "built/index.js", "main": "built/index.js",
"types": "built/index.d.ts", "types": "built/index.d.ts",
"napi": { "napi": {
"name": "backend-rs", "binaryName": "backend-rs",
"triples": { "targets": [
"additional": [ "aarch64-apple-darwin",
"aarch64-apple-darwin", "aarch64-linux-android",
"aarch64-linux-android", "aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl",
"aarch64-unknown-linux-musl", "aarch64-pc-windows-msvc",
"aarch64-pc-windows-msvc", "armv7-unknown-linux-gnueabihf",
"armv7-unknown-linux-gnueabihf", "x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl", "x86_64-unknown-linux-musl",
"x86_64-unknown-freebsd", "x86_64-unknown-freebsd",
"i686-pc-windows-msvc", "i686-pc-windows-msvc",
"armv7-linux-androideabi", "armv7-linux-androideabi",
"universal-apple-darwin" "universal-apple-darwin"
] ]
}
}, },
"devDependencies": { "devDependencies": {
"@napi-rs/cli": "2.18.3" "@napi-rs/cli": "3.0.0-alpha.55"
}, },
"scripts": { "scripts": {
"artifacts": "napi artifacts", "artifacts": "napi artifacts",
"build": "napi build --features napi --no-const-enum --platform --release ./built/", "build": "RUSTFLAGS='-C target-cpu=native' napi build --features napi --no-const-enum --platform --release --output-dir ./built/",
"build:debug": "napi build --features napi --no-const-enum --platform ./built/", "build:debug": "napi build --features napi --no-const-enum --platform --output-dir ./built/",
"prepublishOnly": "napi prepublish -t npm", "prepublishOnly": "napi prepublish -t npm",
"universal": "napi universal", "universal": "napi universal",
"version": "napi version" "version": "napi version"

View file

@ -100,7 +100,6 @@ async fn generate_nodeinfo_2_1() -> Result<Nodeinfo21, DbErr> {
metadata.shrink_to_fit(); metadata.shrink_to_fit();
Ok(Nodeinfo21 { Ok(Nodeinfo21 {
version: "2.1".to_string(),
software: Software21 { software: Software21 {
name: "firefish".to_string(), name: "firefish".to_string(),
version: CONFIG.version.clone(), version: CONFIG.version.clone(),

View file

@ -5,17 +5,12 @@
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::collections::HashMap; use std::collections::HashMap;
// TODO: I want to use these macros but they don't work with rmp_serde
// * #[serde(skip_serializing_if = "Option::is_none")] (https://github.com/3Hren/msgpack-rust/issues/86)
// * #[serde(tag = "version", rename = "2.1")] (https://github.com/3Hren/msgpack-rust/issues/318)
/// NodeInfo schema version 2.1. <https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.1> /// NodeInfo schema version 2.1. <https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.1>
#[cfg_attr(test, derive(Debug, PartialEq, Deserialize))] #[cfg_attr(test, derive(Debug, PartialEq, Deserialize))]
#[derive(Clone, Serialize)] #[derive(Clone, Serialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
#[serde(tag = "version", rename = "2.1")]
pub struct Nodeinfo21 { pub struct Nodeinfo21 {
/// The schema version, must be 2.1.
pub version: String,
/// Metadata about server software in use. /// Metadata about server software in use.
pub software: Software21, pub software: Software21,
/// The protocols supported on this server. /// The protocols supported on this server.
@ -35,9 +30,8 @@ pub struct Nodeinfo21 {
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
#[macros::export(object, js_name = "Nodeinfo")] #[macros::export(object, js_name = "Nodeinfo")]
#[serde(tag = "version", rename = "2.0")]
pub struct Nodeinfo20 { pub struct Nodeinfo20 {
/// The schema version, must be 2.0.
pub version: String,
/// Metadata about server software in use. /// Metadata about server software in use.
pub software: Software20, pub software: Software20,
/// The protocols supported on this server. /// The protocols supported on this server.
@ -62,8 +56,10 @@ pub struct Software21 {
/// The version of this server software. /// The version of this server software.
pub version: String, pub version: String,
/// The url of the source code repository of this server software. /// The url of the source code repository of this server software.
#[serde(skip_serializing_if = "Option::is_none")]
pub repository: Option<String>, pub repository: Option<String>,
/// The url of the homepage of this server software. /// The url of the homepage of this server software.
#[serde(skip_serializing_if = "Option::is_none")]
pub homepage: Option<String>, pub homepage: Option<String>,
} }
@ -172,7 +168,9 @@ pub enum Outbound {
#[macros::export(object)] #[macros::export(object)]
pub struct Usage { pub struct Usage {
pub users: Users, pub users: Users,
#[serde(skip_serializing_if = "Option::is_none")]
pub local_posts: Option<u32>, pub local_posts: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub local_comments: Option<u32>, pub local_comments: Option<u32>,
} }
@ -182,8 +180,11 @@ pub struct Usage {
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
#[macros::export(object)] #[macros::export(object)]
pub struct Users { pub struct Users {
#[serde(skip_serializing_if = "Option::is_none")]
pub total: Option<u32>, pub total: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub active_halfyear: Option<u32>, pub active_halfyear: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub active_month: Option<u32>, pub active_month: Option<u32>,
} }
@ -199,7 +200,6 @@ impl From<Software21> for Software20 {
impl From<Nodeinfo21> for Nodeinfo20 { impl From<Nodeinfo21> for Nodeinfo20 {
fn from(nodeinfo: Nodeinfo21) -> Self { fn from(nodeinfo: Nodeinfo21) -> Self {
Self { Self {
version: "2.0".to_string(),
software: nodeinfo.software.into(), software: nodeinfo.software.into(),
protocols: nodeinfo.protocols, protocols: nodeinfo.protocols,
services: nodeinfo.services, services: nodeinfo.services,

View file

@ -31,18 +31,18 @@
"@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.15.0", "@redocly/openapi-core": "1.16.0",
"@sinonjs/fake-timers": "11.2.2", "@sinonjs/fake-timers": "11.2.2",
"adm-zip": "0.5.14", "adm-zip": "0.5.14",
"ajv": "8.16.0", "ajv": "8.16.0",
"archiver": "7.0.1", "archiver": "7.0.1",
"async-lock": "1.4.0", "async-lock": "1.4.0",
"async-mutex": "0.5.0", "async-mutex": "0.5.0",
"aws-sdk": "2.1642.0", "aws-sdk": "2.1646.0",
"axios": "1.7.2", "axios": "1.7.2",
"backend-rs": "workspace:*", "backend-rs": "workspace:*",
"blurhash": "2.0.5", "blurhash": "2.0.5",
"bull": "4.13.0", "bull": "4.13.1",
"cacheable-lookup": "git+https://github.com/TheEssem/cacheable-lookup.git#dd2fb616366a3c68dcf321a57a67295967b204bf", "cacheable-lookup": "git+https://github.com/TheEssem/cacheable-lookup.git#dd2fb616366a3c68dcf321a57a67295967b204bf",
"cbor-x": "1.5.9", "cbor-x": "1.5.9",
"chalk": "5.3.0", "chalk": "5.3.0",
@ -85,7 +85,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.13", "nodemailer": "6.9.14",
"opencc-js": "1.0.5", "opencc-js": "1.0.5",
"otpauth": "9.3.1", "otpauth": "9.3.1",
"parse5": "7.1.2", "parse5": "7.1.2",
@ -122,8 +122,8 @@
"xev": "3.0.2" "xev": "3.0.2"
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "0.3.12", "@swc/cli": "0.3.14",
"@swc/core": "1.6.1", "@swc/core": "1.6.5",
"@types/adm-zip": "0.5.5", "@types/adm-zip": "0.5.5",
"@types/async-lock": "1.4.0", "@types/async-lock": "1.4.0",
"@types/color-convert": "2.0.3", "@types/color-convert": "2.0.3",
@ -144,8 +144,8 @@
"@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/mocha": "10.0.6", "@types/mocha": "10.0.7",
"@types/node": "20.14.2", "@types/node": "20.14.8",
"@types/node-fetch": "2.6.11", "@types/node-fetch": "2.6.11",
"@types/nodemailer": "6.4.15", "@types/nodemailer": "6.4.15",
"@types/oauth": "0.9.5", "@types/oauth": "0.9.5",
@ -165,7 +165,7 @@
"@types/syslog-pro": "1.0.3", "@types/syslog-pro": "1.0.3",
"@types/tinycolor2": "1.4.6", "@types/tinycolor2": "1.4.6",
"@types/tmp": "0.2.6", "@types/tmp": "0.2.6",
"@types/uuid": "9.0.8", "@types/uuid": "10.0.0",
"@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",
@ -178,8 +178,8 @@
"ts-node": "10.9.2", "ts-node": "10.9.2",
"tsconfig-paths": "4.2.0", "tsconfig-paths": "4.2.0",
"type-fest": "4.20.1", "type-fest": "4.20.1",
"typescript": "5.4.5", "typescript": "5.5.2",
"webpack": "5.92.0", "webpack": "5.92.1",
"ws": "8.17.1" "ws": "8.17.1"
} }
} }

View file

@ -87,14 +87,20 @@ export const paramDef = {
export default define(meta, paramDef, async (ps, me) => { export default define(meta, paramDef, async (ps, me) => {
let user; let user;
const isAdminOrModerator = me && (me.isAdmin || me.isModerator); const isAdminOrModerator = me != null && (me.isAdmin || me.isModerator);
if (ps.userIds) { if (ps.userIds) {
if (ps.userIds.length === 0) { if (ps.userIds.length === 0) {
return []; return [];
} }
const isUrl = ps.userIds[0].startsWith("http"); let isUrl = false;
try {
const url = new URL(ps.userIds[0]);
isUrl = ["http", "https"].includes(url.protocol);
} catch (_) {}
let users: User[]; let users: User[];
if (isUrl) { if (isUrl) {
users = await Users.findBy( users = await Users.findBy(

View file

@ -32,7 +32,7 @@
"@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": "10.0.0",
"@vitejs/plugin-vue": "5.0.5", "@vitejs/plugin-vue": "5.0.5",
"@vue/runtime-core": "3.4.29", "@vue/runtime-core": "3.4.29",
"autobind-decorator": "2.4.0", "autobind-decorator": "2.4.0",
@ -72,7 +72,7 @@
"qrcode-vue3": "1.6.8", "qrcode-vue3": "1.6.8",
"rollup": "4.17.2", "rollup": "4.17.2",
"s-age": "1.1.2", "s-age": "1.1.2",
"sass": "1.77.5", "sass": "1.77.6",
"seedrandom": "3.0.5", "seedrandom": "3.0.5",
"stringz": "2.1.0", "stringz": "2.1.0",
"swiper": "11.1.4", "swiper": "11.1.4",
@ -81,7 +81,7 @@
"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.4.5", "typescript": "5.5.2",
"unicode-emoji-json": "0.6.0", "unicode-emoji-json": "0.6.0",
"uuid": "10.0.0", "uuid": "10.0.0",
"vite": "5.3.1", "vite": "5.3.1",

View file

@ -360,10 +360,8 @@ import { getStaticImageUrl } from "@/scripts/get-static-image-url";
import number from "@/filters/number"; import number from "@/filters/number";
import { userPage } from "@/filters/user"; import { userPage } from "@/filters/user";
import { defaultStore } from "@/store"; import { defaultStore } from "@/store";
import * as os from "@/os";
import { i18n } from "@/i18n"; import { i18n } from "@/i18n";
import { isModerator, isSignedIn, me } from "@/me"; import { isModerator, isSignedIn, me } from "@/me";
import { host } from "@/config";
import icon from "@/scripts/icon"; import icon from "@/scripts/icon";
const XPhotos = defineAsyncComponent(() => import("./index.photos.vue")); const XPhotos = defineAsyncComponent(() => import("./index.photos.vue"));

View file

@ -49,7 +49,7 @@ const XGallery = defineAsyncComponent(() => import("./gallery.vue"));
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{
acct: string; acct: string;
page?: string; page?: "home" | "reactions" | "media" | "clips" | "pages" | "gallery";
}>(), }>(),
{ {
page: "home", page: "home",

View file

@ -21,11 +21,11 @@
"url": "https://firefish.dev/firefish/firefish.git" "url": "https://firefish.dev/firefish/firefish.git"
}, },
"devDependencies": { "devDependencies": {
"@swc/cli": "0.3.12", "@swc/cli": "0.3.14",
"@swc/core": "1.6.1", "@swc/core": "1.6.5",
"@swc/types": "0.1.8", "@swc/types": "0.1.9",
"@types/jest": "29.5.12", "@types/jest": "29.5.12",
"@types/node": "20.14.2", "@types/node": "20.14.8",
"jest": "29.7.0", "jest": "29.7.0",
"jest-fetch-mock": "3.0.3", "jest-fetch-mock": "3.0.3",
"jest-websocket-mock": "2.5.0", "jest-websocket-mock": "2.5.0",
@ -33,7 +33,7 @@
"ts-jest": "29.1.5", "ts-jest": "29.1.5",
"ts-node": "10.9.2", "ts-node": "10.9.2",
"tsd": "0.31.1", "tsd": "0.31.1",
"typescript": "5.4.5" "typescript": "5.5.2"
}, },
"files": [ "files": [
"built", "src" "built", "src"

File diff suppressed because it is too large Load diff