diff --git a/.dockerignore b/.dockerignore index e47a2ba20..e2f885aab 100644 --- a/.dockerignore +++ b/.dockerignore @@ -10,7 +10,7 @@ node_modules report.*.json # Rust -packages/backend/native-utils/target +packages/backend-rs/target # Cypress cypress/screenshots diff --git a/Dockerfile b/Dockerfile index b822ab663..bf4f13ab5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,12 +15,12 @@ RUN <= 10" + } +} \ No newline at end of file diff --git a/packages/backend-rs/npm/darwin-x64/README.md b/packages/backend-rs/npm/darwin-x64/README.md new file mode 100644 index 000000000..e7cb3c734 --- /dev/null +++ b/packages/backend-rs/npm/darwin-x64/README.md @@ -0,0 +1,3 @@ +# `backend-rs-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/darwin-x64/package.json b/packages/backend-rs/npm/darwin-x64/package.json similarity index 57% rename from packages/backend/native-utils/npm/darwin-x64/package.json rename to packages/backend-rs/npm/darwin-x64/package.json index 6bbcf1d23..210151bc6 100644 --- a/packages/backend/native-utils/npm/darwin-x64/package.json +++ b/packages/backend-rs/npm/darwin-x64/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-darwin-x64", + "name": "backend-rs-darwin-x64", "version": "0.0.0", "os": [ "darwin" @@ -7,9 +7,9 @@ "cpu": [ "x64" ], - "main": "native-utils.darwin-x64.node", + "main": "backend-rs.darwin-x64.node", "files": [ - "native-utils.darwin-x64.node" + "backend-rs.darwin-x64.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/freebsd-x64/README.md b/packages/backend-rs/npm/freebsd-x64/README.md new file mode 100644 index 000000000..df06915df --- /dev/null +++ b/packages/backend-rs/npm/freebsd-x64/README.md @@ -0,0 +1,3 @@ +# `backend-rs-freebsd-x64` + +This is the **x86_64-unknown-freebsd** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/freebsd-x64/package.json b/packages/backend-rs/npm/freebsd-x64/package.json similarity index 57% rename from packages/backend/native-utils/npm/freebsd-x64/package.json rename to packages/backend-rs/npm/freebsd-x64/package.json index 654b8abf3..10325bb5f 100644 --- a/packages/backend/native-utils/npm/freebsd-x64/package.json +++ b/packages/backend-rs/npm/freebsd-x64/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-freebsd-x64", + "name": "backend-rs-freebsd-x64", "version": "0.0.0", "os": [ "freebsd" @@ -7,9 +7,9 @@ "cpu": [ "x64" ], - "main": "native-utils.freebsd-x64.node", + "main": "backend-rs.freebsd-x64.node", "files": [ - "native-utils.freebsd-x64.node" + "backend-rs.freebsd-x64.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/linux-arm-gnueabihf/README.md b/packages/backend-rs/npm/linux-arm-gnueabihf/README.md new file mode 100644 index 000000000..fc4132cd0 --- /dev/null +++ b/packages/backend-rs/npm/linux-arm-gnueabihf/README.md @@ -0,0 +1,3 @@ +# `backend-rs-linux-arm-gnueabihf` + +This is the **armv7-unknown-linux-gnueabihf** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/linux-arm-gnueabihf/package.json b/packages/backend-rs/npm/linux-arm-gnueabihf/package.json similarity index 52% rename from packages/backend/native-utils/npm/linux-arm-gnueabihf/package.json rename to packages/backend-rs/npm/linux-arm-gnueabihf/package.json index 1e206c078..b25827a92 100644 --- a/packages/backend/native-utils/npm/linux-arm-gnueabihf/package.json +++ b/packages/backend-rs/npm/linux-arm-gnueabihf/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-linux-arm-gnueabihf", + "name": "backend-rs-linux-arm-gnueabihf", "version": "0.0.0", "os": [ "linux" @@ -7,9 +7,9 @@ "cpu": [ "arm" ], - "main": "native-utils.linux-arm-gnueabihf.node", + "main": "backend-rs.linux-arm-gnueabihf.node", "files": [ - "native-utils.linux-arm-gnueabihf.node" + "backend-rs.linux-arm-gnueabihf.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/linux-arm64-gnu/README.md b/packages/backend-rs/npm/linux-arm64-gnu/README.md new file mode 100644 index 000000000..9126a6317 --- /dev/null +++ b/packages/backend-rs/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `backend-rs-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/linux-arm64-gnu/package.json b/packages/backend-rs/npm/linux-arm64-gnu/package.json similarity index 59% rename from packages/backend/native-utils/npm/linux-arm64-gnu/package.json rename to packages/backend-rs/npm/linux-arm64-gnu/package.json index aa0b2a805..f2bc34118 100644 --- a/packages/backend/native-utils/npm/linux-arm64-gnu/package.json +++ b/packages/backend-rs/npm/linux-arm64-gnu/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-linux-arm64-gnu", + "name": "backend-rs-linux-arm64-gnu", "version": "0.0.0", "os": [ "linux" @@ -7,9 +7,9 @@ "cpu": [ "arm64" ], - "main": "native-utils.linux-arm64-gnu.node", + "main": "backend-rs.linux-arm64-gnu.node", "files": [ - "native-utils.linux-arm64-gnu.node" + "backend-rs.linux-arm64-gnu.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/linux-arm64-musl/README.md b/packages/backend-rs/npm/linux-arm64-musl/README.md new file mode 100644 index 000000000..970d094e4 --- /dev/null +++ b/packages/backend-rs/npm/linux-arm64-musl/README.md @@ -0,0 +1,3 @@ +# `backend-rs-linux-arm64-musl` + +This is the **aarch64-unknown-linux-musl** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/linux-arm64-musl/package.json b/packages/backend-rs/npm/linux-arm64-musl/package.json similarity index 58% rename from packages/backend/native-utils/npm/linux-arm64-musl/package.json rename to packages/backend-rs/npm/linux-arm64-musl/package.json index 99e9387ee..7b48c571f 100644 --- a/packages/backend/native-utils/npm/linux-arm64-musl/package.json +++ b/packages/backend-rs/npm/linux-arm64-musl/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-linux-arm64-musl", + "name": "backend-rs-linux-arm64-musl", "version": "0.0.0", "os": [ "linux" @@ -7,9 +7,9 @@ "cpu": [ "arm64" ], - "main": "native-utils.linux-arm64-musl.node", + "main": "backend-rs.linux-arm64-musl.node", "files": [ - "native-utils.linux-arm64-musl.node" + "backend-rs.linux-arm64-musl.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/linux-x64-gnu/README.md b/packages/backend-rs/npm/linux-x64-gnu/README.md new file mode 100644 index 000000000..6a947c5e7 --- /dev/null +++ b/packages/backend-rs/npm/linux-x64-gnu/README.md @@ -0,0 +1,3 @@ +# `backend-rs-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/linux-x64-gnu/package.json b/packages/backend-rs/npm/linux-x64-gnu/package.json similarity index 59% rename from packages/backend/native-utils/npm/linux-x64-gnu/package.json rename to packages/backend-rs/npm/linux-x64-gnu/package.json index f99a5f664..d704d16c9 100644 --- a/packages/backend/native-utils/npm/linux-x64-gnu/package.json +++ b/packages/backend-rs/npm/linux-x64-gnu/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-linux-x64-gnu", + "name": "backend-rs-linux-x64-gnu", "version": "0.0.0", "os": [ "linux" @@ -7,9 +7,9 @@ "cpu": [ "x64" ], - "main": "native-utils.linux-x64-gnu.node", + "main": "backend-rs.linux-x64-gnu.node", "files": [ - "native-utils.linux-x64-gnu.node" + "backend-rs.linux-x64-gnu.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/linux-x64-musl/README.md b/packages/backend-rs/npm/linux-x64-musl/README.md new file mode 100644 index 000000000..4344d648a --- /dev/null +++ b/packages/backend-rs/npm/linux-x64-musl/README.md @@ -0,0 +1,3 @@ +# `backend-rs-linux-x64-musl` + +This is the **x86_64-unknown-linux-musl** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/linux-x64-musl/package.json b/packages/backend-rs/npm/linux-x64-musl/package.json similarity index 59% rename from packages/backend/native-utils/npm/linux-x64-musl/package.json rename to packages/backend-rs/npm/linux-x64-musl/package.json index 56b520fff..a0d6324e9 100644 --- a/packages/backend/native-utils/npm/linux-x64-musl/package.json +++ b/packages/backend-rs/npm/linux-x64-musl/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-linux-x64-musl", + "name": "backend-rs-linux-x64-musl", "version": "0.0.0", "os": [ "linux" @@ -7,9 +7,9 @@ "cpu": [ "x64" ], - "main": "native-utils.linux-x64-musl.node", + "main": "backend-rs.linux-x64-musl.node", "files": [ - "native-utils.linux-x64-musl.node" + "backend-rs.linux-x64-musl.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/win32-arm64-msvc/README.md b/packages/backend-rs/npm/win32-arm64-msvc/README.md new file mode 100644 index 000000000..a89398e51 --- /dev/null +++ b/packages/backend-rs/npm/win32-arm64-msvc/README.md @@ -0,0 +1,3 @@ +# `backend-rs-win32-arm64-msvc` + +This is the **aarch64-pc-windows-msvc** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/win32-arm64-msvc/package.json b/packages/backend-rs/npm/win32-arm64-msvc/package.json similarity index 54% rename from packages/backend/native-utils/npm/win32-arm64-msvc/package.json rename to packages/backend-rs/npm/win32-arm64-msvc/package.json index 865a77105..7fcb8761d 100644 --- a/packages/backend/native-utils/npm/win32-arm64-msvc/package.json +++ b/packages/backend-rs/npm/win32-arm64-msvc/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-win32-arm64-msvc", + "name": "backend-rs-win32-arm64-msvc", "version": "0.0.0", "os": [ "win32" @@ -7,9 +7,9 @@ "cpu": [ "arm64" ], - "main": "native-utils.win32-arm64-msvc.node", + "main": "backend-rs.win32-arm64-msvc.node", "files": [ - "native-utils.win32-arm64-msvc.node" + "backend-rs.win32-arm64-msvc.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/win32-ia32-msvc/README.md b/packages/backend-rs/npm/win32-ia32-msvc/README.md new file mode 100644 index 000000000..43335cfad --- /dev/null +++ b/packages/backend-rs/npm/win32-ia32-msvc/README.md @@ -0,0 +1,3 @@ +# `backend-rs-win32-ia32-msvc` + +This is the **i686-pc-windows-msvc** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/win32-ia32-msvc/package.json b/packages/backend-rs/npm/win32-ia32-msvc/package.json similarity index 54% rename from packages/backend/native-utils/npm/win32-ia32-msvc/package.json rename to packages/backend-rs/npm/win32-ia32-msvc/package.json index 994eff12f..be3721ea7 100644 --- a/packages/backend/native-utils/npm/win32-ia32-msvc/package.json +++ b/packages/backend-rs/npm/win32-ia32-msvc/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-win32-ia32-msvc", + "name": "backend-rs-win32-ia32-msvc", "version": "0.0.0", "os": [ "win32" @@ -7,9 +7,9 @@ "cpu": [ "ia32" ], - "main": "native-utils.win32-ia32-msvc.node", + "main": "backend-rs.win32-ia32-msvc.node", "files": [ - "native-utils.win32-ia32-msvc.node" + "backend-rs.win32-ia32-msvc.node" ], "license": "MIT", "engines": { diff --git a/packages/backend-rs/npm/win32-x64-msvc/README.md b/packages/backend-rs/npm/win32-x64-msvc/README.md new file mode 100644 index 000000000..c881bdd12 --- /dev/null +++ b/packages/backend-rs/npm/win32-x64-msvc/README.md @@ -0,0 +1,3 @@ +# `backend-rs-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/win32-x64-msvc/package.json b/packages/backend-rs/npm/win32-x64-msvc/package.json similarity index 55% rename from packages/backend/native-utils/npm/win32-x64-msvc/package.json rename to packages/backend-rs/npm/win32-x64-msvc/package.json index 33b259b13..7765eb329 100644 --- a/packages/backend/native-utils/npm/win32-x64-msvc/package.json +++ b/packages/backend-rs/npm/win32-x64-msvc/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-win32-x64-msvc", + "name": "backend-rs-win32-x64-msvc", "version": "0.0.0", "os": [ "win32" @@ -7,9 +7,9 @@ "cpu": [ "x64" ], - "main": "native-utils.win32-x64-msvc.node", + "main": "backend-rs.win32-x64-msvc.node", "files": [ - "native-utils.win32-x64-msvc.node" + "backend-rs.win32-x64-msvc.node" ], "license": "MIT", "engines": { diff --git a/packages/backend/native-utils/package.json b/packages/backend-rs/package.json similarity index 95% rename from packages/backend/native-utils/package.json rename to packages/backend-rs/package.json index 6466db10a..df056c514 100644 --- a/packages/backend/native-utils/package.json +++ b/packages/backend-rs/package.json @@ -1,10 +1,10 @@ { - "name": "native-utils", + "name": "backend-rs", "version": "0.0.0", "main": "built/index.js", "types": "built/index.d.ts", "napi": { - "name": "native-utils", + "name": "backend-rs", "triples": { "additional": [ "aarch64-apple-darwin", diff --git a/packages/backend/native-utils/src/config/environment.rs b/packages/backend-rs/src/config/environment.rs similarity index 100% rename from packages/backend/native-utils/src/config/environment.rs rename to packages/backend-rs/src/config/environment.rs diff --git a/packages/backend/native-utils/src/config/mod.rs b/packages/backend-rs/src/config/mod.rs similarity index 100% rename from packages/backend/native-utils/src/config/mod.rs rename to packages/backend-rs/src/config/mod.rs diff --git a/packages/backend/native-utils/src/config/server.rs b/packages/backend-rs/src/config/server.rs similarity index 100% rename from packages/backend/native-utils/src/config/server.rs rename to packages/backend-rs/src/config/server.rs diff --git a/packages/backend/native-utils/src/database/error.rs b/packages/backend-rs/src/database/error.rs similarity index 100% rename from packages/backend/native-utils/src/database/error.rs rename to packages/backend-rs/src/database/error.rs diff --git a/packages/backend/native-utils/src/database/mod.rs b/packages/backend-rs/src/database/mod.rs similarity index 100% rename from packages/backend/native-utils/src/database/mod.rs rename to packages/backend-rs/src/database/mod.rs diff --git a/packages/backend/native-utils/src/lib.rs b/packages/backend-rs/src/lib.rs similarity index 100% rename from packages/backend/native-utils/src/lib.rs rename to packages/backend-rs/src/lib.rs diff --git a/packages/backend/native-utils/src/macros.rs b/packages/backend-rs/src/macros.rs similarity index 100% rename from packages/backend/native-utils/src/macros.rs rename to packages/backend-rs/src/macros.rs diff --git a/packages/backend/native-utils/src/mastodon_api.rs b/packages/backend-rs/src/mastodon_api.rs similarity index 100% rename from packages/backend/native-utils/src/mastodon_api.rs rename to packages/backend-rs/src/mastodon_api.rs diff --git a/packages/backend/native-utils/src/model/entity/abuse_user_report.rs b/packages/backend-rs/src/model/entity/abuse_user_report.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/abuse_user_report.rs rename to packages/backend-rs/src/model/entity/abuse_user_report.rs diff --git a/packages/backend/native-utils/src/model/entity/access_token.rs b/packages/backend-rs/src/model/entity/access_token.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/access_token.rs rename to packages/backend-rs/src/model/entity/access_token.rs diff --git a/packages/backend/native-utils/src/model/entity/ad.rs b/packages/backend-rs/src/model/entity/ad.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/ad.rs rename to packages/backend-rs/src/model/entity/ad.rs diff --git a/packages/backend/native-utils/src/model/entity/announcement.rs b/packages/backend-rs/src/model/entity/announcement.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/announcement.rs rename to packages/backend-rs/src/model/entity/announcement.rs diff --git a/packages/backend/native-utils/src/model/entity/announcement_read.rs b/packages/backend-rs/src/model/entity/announcement_read.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/announcement_read.rs rename to packages/backend-rs/src/model/entity/announcement_read.rs diff --git a/packages/backend/native-utils/src/model/entity/antenna.rs b/packages/backend-rs/src/model/entity/antenna.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/antenna.rs rename to packages/backend-rs/src/model/entity/antenna.rs diff --git a/packages/backend/native-utils/src/model/entity/app.rs b/packages/backend-rs/src/model/entity/app.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/app.rs rename to packages/backend-rs/src/model/entity/app.rs diff --git a/packages/backend/native-utils/src/model/entity/attestation_challenge.rs b/packages/backend-rs/src/model/entity/attestation_challenge.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/attestation_challenge.rs rename to packages/backend-rs/src/model/entity/attestation_challenge.rs diff --git a/packages/backend/native-utils/src/model/entity/auth_session.rs b/packages/backend-rs/src/model/entity/auth_session.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/auth_session.rs rename to packages/backend-rs/src/model/entity/auth_session.rs diff --git a/packages/backend/native-utils/src/model/entity/blocking.rs b/packages/backend-rs/src/model/entity/blocking.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/blocking.rs rename to packages/backend-rs/src/model/entity/blocking.rs diff --git a/packages/backend/native-utils/src/model/entity/channel.rs b/packages/backend-rs/src/model/entity/channel.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/channel.rs rename to packages/backend-rs/src/model/entity/channel.rs diff --git a/packages/backend/native-utils/src/model/entity/channel_following.rs b/packages/backend-rs/src/model/entity/channel_following.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/channel_following.rs rename to packages/backend-rs/src/model/entity/channel_following.rs diff --git a/packages/backend/native-utils/src/model/entity/channel_note_pining.rs b/packages/backend-rs/src/model/entity/channel_note_pining.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/channel_note_pining.rs rename to packages/backend-rs/src/model/entity/channel_note_pining.rs diff --git a/packages/backend/native-utils/src/model/entity/clip.rs b/packages/backend-rs/src/model/entity/clip.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/clip.rs rename to packages/backend-rs/src/model/entity/clip.rs diff --git a/packages/backend/native-utils/src/model/entity/clip_note.rs b/packages/backend-rs/src/model/entity/clip_note.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/clip_note.rs rename to packages/backend-rs/src/model/entity/clip_note.rs diff --git a/packages/backend/native-utils/src/model/entity/drive_file.rs b/packages/backend-rs/src/model/entity/drive_file.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/drive_file.rs rename to packages/backend-rs/src/model/entity/drive_file.rs diff --git a/packages/backend/native-utils/src/model/entity/drive_folder.rs b/packages/backend-rs/src/model/entity/drive_folder.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/drive_folder.rs rename to packages/backend-rs/src/model/entity/drive_folder.rs diff --git a/packages/backend/native-utils/src/model/entity/emoji.rs b/packages/backend-rs/src/model/entity/emoji.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/emoji.rs rename to packages/backend-rs/src/model/entity/emoji.rs diff --git a/packages/backend/native-utils/src/model/entity/follow_request.rs b/packages/backend-rs/src/model/entity/follow_request.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/follow_request.rs rename to packages/backend-rs/src/model/entity/follow_request.rs diff --git a/packages/backend/native-utils/src/model/entity/following.rs b/packages/backend-rs/src/model/entity/following.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/following.rs rename to packages/backend-rs/src/model/entity/following.rs diff --git a/packages/backend/native-utils/src/model/entity/gallery_like.rs b/packages/backend-rs/src/model/entity/gallery_like.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/gallery_like.rs rename to packages/backend-rs/src/model/entity/gallery_like.rs diff --git a/packages/backend/native-utils/src/model/entity/gallery_post.rs b/packages/backend-rs/src/model/entity/gallery_post.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/gallery_post.rs rename to packages/backend-rs/src/model/entity/gallery_post.rs diff --git a/packages/backend/native-utils/src/model/entity/hashtag.rs b/packages/backend-rs/src/model/entity/hashtag.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/hashtag.rs rename to packages/backend-rs/src/model/entity/hashtag.rs diff --git a/packages/backend/native-utils/src/model/entity/instance.rs b/packages/backend-rs/src/model/entity/instance.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/instance.rs rename to packages/backend-rs/src/model/entity/instance.rs diff --git a/packages/backend/native-utils/src/model/entity/messaging_message.rs b/packages/backend-rs/src/model/entity/messaging_message.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/messaging_message.rs rename to packages/backend-rs/src/model/entity/messaging_message.rs diff --git a/packages/backend/native-utils/src/model/entity/meta.rs b/packages/backend-rs/src/model/entity/meta.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/meta.rs rename to packages/backend-rs/src/model/entity/meta.rs diff --git a/packages/backend/native-utils/src/model/entity/migrations.rs b/packages/backend-rs/src/model/entity/migrations.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/migrations.rs rename to packages/backend-rs/src/model/entity/migrations.rs diff --git a/packages/backend/native-utils/src/model/entity/mod.rs b/packages/backend-rs/src/model/entity/mod.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/mod.rs rename to packages/backend-rs/src/model/entity/mod.rs diff --git a/packages/backend/native-utils/src/model/entity/moderation_log.rs b/packages/backend-rs/src/model/entity/moderation_log.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/moderation_log.rs rename to packages/backend-rs/src/model/entity/moderation_log.rs diff --git a/packages/backend/native-utils/src/model/entity/muted_note.rs b/packages/backend-rs/src/model/entity/muted_note.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/muted_note.rs rename to packages/backend-rs/src/model/entity/muted_note.rs diff --git a/packages/backend/native-utils/src/model/entity/muting.rs b/packages/backend-rs/src/model/entity/muting.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/muting.rs rename to packages/backend-rs/src/model/entity/muting.rs diff --git a/packages/backend/native-utils/src/model/entity/note.rs b/packages/backend-rs/src/model/entity/note.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/note.rs rename to packages/backend-rs/src/model/entity/note.rs diff --git a/packages/backend/native-utils/src/model/entity/note_edit.rs b/packages/backend-rs/src/model/entity/note_edit.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/note_edit.rs rename to packages/backend-rs/src/model/entity/note_edit.rs diff --git a/packages/backend/native-utils/src/model/entity/note_favorite.rs b/packages/backend-rs/src/model/entity/note_favorite.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/note_favorite.rs rename to packages/backend-rs/src/model/entity/note_favorite.rs diff --git a/packages/backend/native-utils/src/model/entity/note_reaction.rs b/packages/backend-rs/src/model/entity/note_reaction.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/note_reaction.rs rename to packages/backend-rs/src/model/entity/note_reaction.rs diff --git a/packages/backend/native-utils/src/model/entity/note_thread_muting.rs b/packages/backend-rs/src/model/entity/note_thread_muting.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/note_thread_muting.rs rename to packages/backend-rs/src/model/entity/note_thread_muting.rs diff --git a/packages/backend/native-utils/src/model/entity/note_unread.rs b/packages/backend-rs/src/model/entity/note_unread.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/note_unread.rs rename to packages/backend-rs/src/model/entity/note_unread.rs diff --git a/packages/backend/native-utils/src/model/entity/note_watching.rs b/packages/backend-rs/src/model/entity/note_watching.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/note_watching.rs rename to packages/backend-rs/src/model/entity/note_watching.rs diff --git a/packages/backend/native-utils/src/model/entity/notification.rs b/packages/backend-rs/src/model/entity/notification.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/notification.rs rename to packages/backend-rs/src/model/entity/notification.rs diff --git a/packages/backend/native-utils/src/model/entity/page.rs b/packages/backend-rs/src/model/entity/page.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/page.rs rename to packages/backend-rs/src/model/entity/page.rs diff --git a/packages/backend/native-utils/src/model/entity/page_like.rs b/packages/backend-rs/src/model/entity/page_like.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/page_like.rs rename to packages/backend-rs/src/model/entity/page_like.rs diff --git a/packages/backend/native-utils/src/model/entity/password_reset_request.rs b/packages/backend-rs/src/model/entity/password_reset_request.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/password_reset_request.rs rename to packages/backend-rs/src/model/entity/password_reset_request.rs diff --git a/packages/backend/native-utils/src/model/entity/poll.rs b/packages/backend-rs/src/model/entity/poll.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/poll.rs rename to packages/backend-rs/src/model/entity/poll.rs diff --git a/packages/backend/native-utils/src/model/entity/poll_vote.rs b/packages/backend-rs/src/model/entity/poll_vote.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/poll_vote.rs rename to packages/backend-rs/src/model/entity/poll_vote.rs diff --git a/packages/backend/native-utils/src/model/entity/prelude.rs b/packages/backend-rs/src/model/entity/prelude.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/prelude.rs rename to packages/backend-rs/src/model/entity/prelude.rs diff --git a/packages/backend/native-utils/src/model/entity/promo_note.rs b/packages/backend-rs/src/model/entity/promo_note.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/promo_note.rs rename to packages/backend-rs/src/model/entity/promo_note.rs diff --git a/packages/backend/native-utils/src/model/entity/promo_read.rs b/packages/backend-rs/src/model/entity/promo_read.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/promo_read.rs rename to packages/backend-rs/src/model/entity/promo_read.rs diff --git a/packages/backend/native-utils/src/model/entity/registration_ticket.rs b/packages/backend-rs/src/model/entity/registration_ticket.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/registration_ticket.rs rename to packages/backend-rs/src/model/entity/registration_ticket.rs diff --git a/packages/backend/native-utils/src/model/entity/registry_item.rs b/packages/backend-rs/src/model/entity/registry_item.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/registry_item.rs rename to packages/backend-rs/src/model/entity/registry_item.rs diff --git a/packages/backend/native-utils/src/model/entity/relay.rs b/packages/backend-rs/src/model/entity/relay.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/relay.rs rename to packages/backend-rs/src/model/entity/relay.rs diff --git a/packages/backend/native-utils/src/model/entity/renote_muting.rs b/packages/backend-rs/src/model/entity/renote_muting.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/renote_muting.rs rename to packages/backend-rs/src/model/entity/renote_muting.rs diff --git a/packages/backend/native-utils/src/model/entity/reply_muting.rs b/packages/backend-rs/src/model/entity/reply_muting.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/reply_muting.rs rename to packages/backend-rs/src/model/entity/reply_muting.rs diff --git a/packages/backend/native-utils/src/model/entity/sea_orm_active_enums.rs b/packages/backend-rs/src/model/entity/sea_orm_active_enums.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/sea_orm_active_enums.rs rename to packages/backend-rs/src/model/entity/sea_orm_active_enums.rs diff --git a/packages/backend/native-utils/src/model/entity/signin.rs b/packages/backend-rs/src/model/entity/signin.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/signin.rs rename to packages/backend-rs/src/model/entity/signin.rs diff --git a/packages/backend/native-utils/src/model/entity/sw_subscription.rs b/packages/backend-rs/src/model/entity/sw_subscription.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/sw_subscription.rs rename to packages/backend-rs/src/model/entity/sw_subscription.rs diff --git a/packages/backend/native-utils/src/model/entity/used_username.rs b/packages/backend-rs/src/model/entity/used_username.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/used_username.rs rename to packages/backend-rs/src/model/entity/used_username.rs diff --git a/packages/backend/native-utils/src/model/entity/user.rs b/packages/backend-rs/src/model/entity/user.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user.rs rename to packages/backend-rs/src/model/entity/user.rs diff --git a/packages/backend/native-utils/src/model/entity/user_group.rs b/packages/backend-rs/src/model/entity/user_group.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_group.rs rename to packages/backend-rs/src/model/entity/user_group.rs diff --git a/packages/backend/native-utils/src/model/entity/user_group_invitation.rs b/packages/backend-rs/src/model/entity/user_group_invitation.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_group_invitation.rs rename to packages/backend-rs/src/model/entity/user_group_invitation.rs diff --git a/packages/backend/native-utils/src/model/entity/user_group_invite.rs b/packages/backend-rs/src/model/entity/user_group_invite.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_group_invite.rs rename to packages/backend-rs/src/model/entity/user_group_invite.rs diff --git a/packages/backend/native-utils/src/model/entity/user_group_joining.rs b/packages/backend-rs/src/model/entity/user_group_joining.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_group_joining.rs rename to packages/backend-rs/src/model/entity/user_group_joining.rs diff --git a/packages/backend/native-utils/src/model/entity/user_ip.rs b/packages/backend-rs/src/model/entity/user_ip.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_ip.rs rename to packages/backend-rs/src/model/entity/user_ip.rs diff --git a/packages/backend/native-utils/src/model/entity/user_keypair.rs b/packages/backend-rs/src/model/entity/user_keypair.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_keypair.rs rename to packages/backend-rs/src/model/entity/user_keypair.rs diff --git a/packages/backend/native-utils/src/model/entity/user_list.rs b/packages/backend-rs/src/model/entity/user_list.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_list.rs rename to packages/backend-rs/src/model/entity/user_list.rs diff --git a/packages/backend/native-utils/src/model/entity/user_list_joining.rs b/packages/backend-rs/src/model/entity/user_list_joining.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_list_joining.rs rename to packages/backend-rs/src/model/entity/user_list_joining.rs diff --git a/packages/backend/native-utils/src/model/entity/user_note_pining.rs b/packages/backend-rs/src/model/entity/user_note_pining.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_note_pining.rs rename to packages/backend-rs/src/model/entity/user_note_pining.rs diff --git a/packages/backend/native-utils/src/model/entity/user_pending.rs b/packages/backend-rs/src/model/entity/user_pending.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_pending.rs rename to packages/backend-rs/src/model/entity/user_pending.rs diff --git a/packages/backend/native-utils/src/model/entity/user_profile.rs b/packages/backend-rs/src/model/entity/user_profile.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_profile.rs rename to packages/backend-rs/src/model/entity/user_profile.rs diff --git a/packages/backend/native-utils/src/model/entity/user_publickey.rs b/packages/backend-rs/src/model/entity/user_publickey.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_publickey.rs rename to packages/backend-rs/src/model/entity/user_publickey.rs diff --git a/packages/backend/native-utils/src/model/entity/user_security_key.rs b/packages/backend-rs/src/model/entity/user_security_key.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/user_security_key.rs rename to packages/backend-rs/src/model/entity/user_security_key.rs diff --git a/packages/backend/native-utils/src/model/entity/webhook.rs b/packages/backend-rs/src/model/entity/webhook.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/webhook.rs rename to packages/backend-rs/src/model/entity/webhook.rs diff --git a/packages/backend/native-utils/src/model/error.rs b/packages/backend-rs/src/model/error.rs similarity index 100% rename from packages/backend/native-utils/src/model/error.rs rename to packages/backend-rs/src/model/error.rs diff --git a/packages/backend/native-utils/src/model/mod.rs b/packages/backend-rs/src/model/mod.rs similarity index 100% rename from packages/backend/native-utils/src/model/mod.rs rename to packages/backend-rs/src/model/mod.rs diff --git a/packages/backend/native-utils/src/model/repository.rs b/packages/backend-rs/src/model/repository.rs similarity index 100% rename from packages/backend/native-utils/src/model/repository.rs rename to packages/backend-rs/src/model/repository.rs diff --git a/packages/backend/native-utils/src/model/schema.rs b/packages/backend-rs/src/model/schema.rs similarity index 100% rename from packages/backend/native-utils/src/model/schema.rs rename to packages/backend-rs/src/model/schema.rs diff --git a/packages/backend/native-utils/src/util/acct.rs b/packages/backend-rs/src/util/acct.rs similarity index 100% rename from packages/backend/native-utils/src/util/acct.rs rename to packages/backend-rs/src/util/acct.rs diff --git a/packages/backend/native-utils/src/util/convert_host.rs b/packages/backend-rs/src/util/convert_host.rs similarity index 100% rename from packages/backend/native-utils/src/util/convert_host.rs rename to packages/backend-rs/src/util/convert_host.rs diff --git a/packages/backend/native-utils/src/util/convert_to_hidden_post.rs b/packages/backend-rs/src/util/convert_to_hidden_post.rs similarity index 100% rename from packages/backend/native-utils/src/util/convert_to_hidden_post.rs rename to packages/backend-rs/src/util/convert_to_hidden_post.rs diff --git a/packages/backend/native-utils/src/util/escape_sql.rs b/packages/backend-rs/src/util/escape_sql.rs similarity index 100% rename from packages/backend/native-utils/src/util/escape_sql.rs rename to packages/backend-rs/src/util/escape_sql.rs diff --git a/packages/backend/native-utils/src/util/format_milliseconds.rs b/packages/backend-rs/src/util/format_milliseconds.rs similarity index 100% rename from packages/backend/native-utils/src/util/format_milliseconds.rs rename to packages/backend-rs/src/util/format_milliseconds.rs diff --git a/packages/backend/native-utils/src/util/id.rs b/packages/backend-rs/src/util/id.rs similarity index 100% rename from packages/backend/native-utils/src/util/id.rs rename to packages/backend-rs/src/util/id.rs diff --git a/packages/backend/native-utils/src/util/mod.rs b/packages/backend-rs/src/util/mod.rs similarity index 100% rename from packages/backend/native-utils/src/util/mod.rs rename to packages/backend-rs/src/util/mod.rs diff --git a/packages/backend/native-utils/src/util/random.rs b/packages/backend-rs/src/util/random.rs similarity index 100% rename from packages/backend/native-utils/src/util/random.rs rename to packages/backend-rs/src/util/random.rs diff --git a/packages/backend/native-utils/npm/android-arm-eabi/README.md b/packages/backend/native-utils/npm/android-arm-eabi/README.md deleted file mode 100644 index 10199cb8e..000000000 --- a/packages/backend/native-utils/npm/android-arm-eabi/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-android-arm-eabi` - -This is the **armv7-linux-androideabi** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/android-arm64/README.md b/packages/backend/native-utils/npm/android-arm64/README.md deleted file mode 100644 index c32c2fe71..000000000 --- a/packages/backend/native-utils/npm/android-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-android-arm64` - -This is the **aarch64-linux-android** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/darwin-arm64/README.md b/packages/backend/native-utils/npm/darwin-arm64/README.md deleted file mode 100644 index 870390222..000000000 --- a/packages/backend/native-utils/npm/darwin-arm64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-darwin-arm64` - -This is the **aarch64-apple-darwin** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/darwin-universal/README.md b/packages/backend/native-utils/npm/darwin-universal/README.md deleted file mode 100644 index 098bb3590..000000000 --- a/packages/backend/native-utils/npm/darwin-universal/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-darwin-universal` - -This is the **universal-apple-darwin** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/darwin-universal/package.json b/packages/backend/native-utils/npm/darwin-universal/package.json deleted file mode 100644 index a46061d42..000000000 --- a/packages/backend/native-utils/npm/darwin-universal/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "native-utils-darwin-universal", - "version": "0.0.0", - "os": [ - "darwin" - ], - "main": "native-utils.darwin-universal.node", - "files": [ - "native-utils.darwin-universal.node" - ], - "license": "MIT", - "engines": { - "node": ">= 10" - } -} \ No newline at end of file diff --git a/packages/backend/native-utils/npm/darwin-x64/README.md b/packages/backend/native-utils/npm/darwin-x64/README.md deleted file mode 100644 index 0acf36335..000000000 --- a/packages/backend/native-utils/npm/darwin-x64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-darwin-x64` - -This is the **x86_64-apple-darwin** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/freebsd-x64/README.md b/packages/backend/native-utils/npm/freebsd-x64/README.md deleted file mode 100644 index 2b74996de..000000000 --- a/packages/backend/native-utils/npm/freebsd-x64/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-freebsd-x64` - -This is the **x86_64-unknown-freebsd** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-arm-gnueabihf/README.md b/packages/backend/native-utils/npm/linux-arm-gnueabihf/README.md deleted file mode 100644 index 2203036de..000000000 --- a/packages/backend/native-utils/npm/linux-arm-gnueabihf/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-linux-arm-gnueabihf` - -This is the **armv7-unknown-linux-gnueabihf** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-arm64-gnu/README.md b/packages/backend/native-utils/npm/linux-arm64-gnu/README.md deleted file mode 100644 index ad3a9333f..000000000 --- a/packages/backend/native-utils/npm/linux-arm64-gnu/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-linux-arm64-gnu` - -This is the **aarch64-unknown-linux-gnu** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-arm64-musl/README.md b/packages/backend/native-utils/npm/linux-arm64-musl/README.md deleted file mode 100644 index df282532f..000000000 --- a/packages/backend/native-utils/npm/linux-arm64-musl/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-linux-arm64-musl` - -This is the **aarch64-unknown-linux-musl** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-x64-gnu/README.md b/packages/backend/native-utils/npm/linux-x64-gnu/README.md deleted file mode 100644 index 52eea85aa..000000000 --- a/packages/backend/native-utils/npm/linux-x64-gnu/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-linux-x64-gnu` - -This is the **x86_64-unknown-linux-gnu** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/linux-x64-musl/README.md b/packages/backend/native-utils/npm/linux-x64-musl/README.md deleted file mode 100644 index 6664b2378..000000000 --- a/packages/backend/native-utils/npm/linux-x64-musl/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-linux-x64-musl` - -This is the **x86_64-unknown-linux-musl** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/win32-arm64-msvc/README.md b/packages/backend/native-utils/npm/win32-arm64-msvc/README.md deleted file mode 100644 index 7aec7e0a5..000000000 --- a/packages/backend/native-utils/npm/win32-arm64-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-win32-arm64-msvc` - -This is the **aarch64-pc-windows-msvc** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/win32-ia32-msvc/README.md b/packages/backend/native-utils/npm/win32-ia32-msvc/README.md deleted file mode 100644 index 690de1975..000000000 --- a/packages/backend/native-utils/npm/win32-ia32-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-win32-ia32-msvc` - -This is the **i686-pc-windows-msvc** binary for `native-utils` diff --git a/packages/backend/native-utils/npm/win32-x64-msvc/README.md b/packages/backend/native-utils/npm/win32-x64-msvc/README.md deleted file mode 100644 index e34a5ff17..000000000 --- a/packages/backend/native-utils/npm/win32-x64-msvc/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# `native-utils-win32-x64-msvc` - -This is the **x86_64-pc-windows-msvc** binary for `native-utils` diff --git a/packages/backend/package.json b/packages/backend/package.json index 20058faec..0e51911d8 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -82,7 +82,7 @@ "mime-types": "2.1.35", "msgpackr": "1.10.1", "multer": "1.4.5-lts.1", - "native-utils": "link:native-utils", + "backend-rs": "link:backend-rs", "nested-property": "4.0.0", "node-fetch": "3.3.2", "nodemailer": "6.9.8", diff --git a/packages/backend/src/boot/index.ts b/packages/backend/src/boot/index.ts index 75a6fa410..89b9761c6 100644 --- a/packages/backend/src/boot/index.ts +++ b/packages/backend/src/boot/index.ts @@ -3,7 +3,7 @@ import chalk from "chalk"; import Xev from "xev"; import Logger from "@/services/logger.js"; -import { envConfig } from "@/misc/native-utils.js"; +import { envConfig } from "@/misc/backend-rs.js"; // for typeorm import "reflect-metadata"; diff --git a/packages/backend/src/boot/master.ts b/packages/backend/src/boot/master.ts index 8094ef807..00df6bdee 100644 --- a/packages/backend/src/boot/master.ts +++ b/packages/backend/src/boot/master.ts @@ -10,7 +10,7 @@ import semver from "semver"; import Logger from "@/services/logger.js"; import loadConfig from "@/config/load.js"; import type { Config } from "@/config/types.js"; -import { envConfig } from "@/misc/native-utils.js"; +import { envConfig } from "@/misc/backend-rs.js"; import { showMachineInfo } from "@/misc/show-machine-info.js"; import { db, initDb } from "@/db/postgre.js"; diff --git a/packages/backend/src/misc/native-utils.ts b/packages/backend/src/misc/backend-rs.ts similarity index 93% rename from packages/backend/src/misc/native-utils.ts rename to packages/backend/src/misc/backend-rs.ts index 1f73e6b9b..295e40481 100644 --- a/packages/backend/src/misc/native-utils.ts +++ b/packages/backend/src/misc/backend-rs.ts @@ -3,7 +3,7 @@ import { readEnvironmentConfig, getFullApAccount as getFullApAccountImpl, isSelfHost as isSelfHostImpl, -} from "native-utils/built/index.js"; +} from "backend-rs/built/index.js"; export const serverConfig = readServerConfig(); export const envConfig = readEnvironmentConfig(); diff --git a/packages/backend/src/misc/check-hit-antenna.ts b/packages/backend/src/misc/check-hit-antenna.ts index c1689b9cb..849cb4529 100644 --- a/packages/backend/src/misc/check-hit-antenna.ts +++ b/packages/backend/src/misc/check-hit-antenna.ts @@ -2,8 +2,8 @@ import type { Antenna } from "@/models/entities/antenna.js"; import type { Note } from "@/models/entities/note.js"; import type { User } from "@/models/entities/user.js"; import { Blockings, Followings, UserProfiles } from "@/models/index.js"; -import { getFullApAccount } from "@/misc/native-utils.js"; -import { stringToAcct } from "native-utils/built/index.js"; +import { getFullApAccount } from "@/misc/backend-rs.js"; +import { stringToAcct } from "backend-rs/built/index.js"; import type { Packed } from "@/misc/schema.js"; import { Cache } from "@/misc/cache.js"; import { getWordHardMute } from "@/misc/check-word-mute.js"; diff --git a/packages/backend/src/misc/gen-id.ts b/packages/backend/src/misc/gen-id.ts index 737bbe488..cf3f4f080 100644 --- a/packages/backend/src/misc/gen-id.ts +++ b/packages/backend/src/misc/gen-id.ts @@ -3,7 +3,7 @@ import { nativeCreateId, nativeInitIdGenerator, nativeGetTimestamp, -} from "native-utils/built/index.js"; +} from "backend-rs/built/index.js"; const length = Math.min(Math.max(config.cuid?.length ?? 16, 16), 24); const fingerprint = config.cuid?.fingerprint ?? ""; diff --git a/packages/backend/src/misc/populate-emojis.ts b/packages/backend/src/misc/populate-emojis.ts index 8e8cd02e9..7d915248a 100644 --- a/packages/backend/src/misc/populate-emojis.ts +++ b/packages/backend/src/misc/populate-emojis.ts @@ -3,8 +3,8 @@ import { Emojis } from "@/models/index.js"; import type { Emoji } from "@/models/entities/emoji.js"; import type { Note } from "@/models/entities/note.js"; import { Cache } from "./cache.js"; -import { toPunyOptional } from "native-utils/built/index.js"; -import { isSelfHost } from "@/misc/native-utils.js"; +import { toPunyOptional } from "backend-rs/built/index.js"; +import { isSelfHost } from "@/misc/backend-rs.js"; import { decodeReaction } from "./reaction-lib.js"; import config from "@/config/index.js"; import { query } from "@/prelude/url.js"; diff --git a/packages/backend/src/misc/reaction-lib.ts b/packages/backend/src/misc/reaction-lib.ts index 7c4bdd84a..3ded952e2 100644 --- a/packages/backend/src/misc/reaction-lib.ts +++ b/packages/backend/src/misc/reaction-lib.ts @@ -1,7 +1,7 @@ import { emojiRegex } from "./emoji-regex.js"; import { fetchMeta } from "./fetch-meta.js"; import { Emojis } from "@/models/index.js"; -import { toPunyOptional } from "native-utils/built/index.js"; +import { toPunyOptional } from "backend-rs/built/index.js"; import { IsNull } from "typeorm"; export function convertReactions(reactions: Record) { diff --git a/packages/backend/src/models/repositories/drive-file.ts b/packages/backend/src/models/repositories/drive-file.ts index 5b2ea3a03..c186fa2db 100644 --- a/packages/backend/src/models/repositories/drive-file.ts +++ b/packages/backend/src/models/repositories/drive-file.ts @@ -1,7 +1,7 @@ import { db } from "@/db/postgre.js"; import { DriveFile } from "@/models/entities/drive-file.js"; import type { User } from "@/models/entities/user.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import { awaitAll } from "@/prelude/await-all.js"; import type { Packed } from "@/misc/schema.js"; import config from "@/config/index.js"; diff --git a/packages/backend/src/queue/index.ts b/packages/backend/src/queue/index.ts index 1d6513ee6..7fc647ca6 100644 --- a/packages/backend/src/queue/index.ts +++ b/packages/backend/src/queue/index.ts @@ -5,7 +5,7 @@ import config from "@/config/index.js"; import type { DriveFile } from "@/models/entities/drive-file.js"; import type { IActivity } from "@/remote/activitypub/type.js"; import type { Webhook, webhookEventTypes } from "@/models/entities/webhook.js"; -import { envConfig } from "@/misc/native-utils.js"; +import { envConfig } from "@/misc/backend-rs.js"; import processDeliver from "./processors/deliver.js"; import processInbox from "./processors/inbox.js"; diff --git a/packages/backend/src/queue/processors/deliver.ts b/packages/backend/src/queue/processors/deliver.ts index 067f1558c..d5016839e 100644 --- a/packages/backend/src/queue/processors/deliver.ts +++ b/packages/backend/src/queue/processors/deliver.ts @@ -4,7 +4,7 @@ import { registerOrFetchInstanceDoc } from "@/services/register-or-fetch-instanc import Logger from "@/services/logger.js"; import { Instances } from "@/models/index.js"; import { fetchInstanceMetadata } from "@/services/fetch-instance-metadata.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import { StatusError } from "@/misc/fetch.js"; import { shouldSkipInstance } from "@/misc/skipped-instances.js"; import type { DeliverJobData } from "@/queue/types.js"; diff --git a/packages/backend/src/queue/processors/inbox.ts b/packages/backend/src/queue/processors/inbox.ts index 671d3afc7..fd550338e 100644 --- a/packages/backend/src/queue/processors/inbox.ts +++ b/packages/backend/src/queue/processors/inbox.ts @@ -6,7 +6,7 @@ import Logger from "@/services/logger.js"; import { registerOrFetchInstanceDoc } from "@/services/register-or-fetch-instance-doc.js"; import { Instances } from "@/models/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { toPuny, extractHost } from "native-utils/built/index.js"; +import { toPuny, extractHost } from "backend-rs/built/index.js"; import { getApId } from "@/remote/activitypub/type.js"; import { fetchInstanceMetadata } from "@/services/fetch-instance-metadata.js"; import type { InboxJobData } from "../types.js"; diff --git a/packages/backend/src/remote/activitypub/check-fetch.ts b/packages/backend/src/remote/activitypub/check-fetch.ts index a058f4d8c..510269567 100644 --- a/packages/backend/src/remote/activitypub/check-fetch.ts +++ b/packages/backend/src/remote/activitypub/check-fetch.ts @@ -2,7 +2,7 @@ import { URL } from "url"; import httpSignature, { IParsedSignature } from "@peertube/http-signature"; import config from "@/config/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import DbResolver from "@/remote/activitypub/db-resolver.js"; import { getApId } from "@/remote/activitypub/type.js"; import { shouldBlockInstance } from "@/misc/should-block-instance.js"; diff --git a/packages/backend/src/remote/activitypub/kernel/announce/note.ts b/packages/backend/src/remote/activitypub/kernel/announce/note.ts index 591b1d048..a56920ea4 100644 --- a/packages/backend/src/remote/activitypub/kernel/announce/note.ts +++ b/packages/backend/src/remote/activitypub/kernel/announce/note.ts @@ -5,7 +5,7 @@ import type { IAnnounce } from "../../type.js"; import { getApId } from "../../type.js"; import { fetchNote, resolveNote } from "../../models/note.js"; import { apLogger } from "../../logger.js"; -import { extractHost } from "native-utils/built/index.js"; +import { extractHost } from "backend-rs/built/index.js"; import { getApLock } from "@/misc/app-lock.js"; import { parseAudience } from "../../audience.js"; import { StatusError } from "@/misc/fetch.js"; diff --git a/packages/backend/src/remote/activitypub/kernel/create/note.ts b/packages/backend/src/remote/activitypub/kernel/create/note.ts index 5453ca051..17396ea57 100644 --- a/packages/backend/src/remote/activitypub/kernel/create/note.ts +++ b/packages/backend/src/remote/activitypub/kernel/create/note.ts @@ -4,7 +4,7 @@ import { createNote, fetchNote } from "../../models/note.js"; import type { IObject, ICreate } from "../../type.js"; import { getApId } from "../../type.js"; import { getApLock } from "@/misc/app-lock.js"; -import { extractHost } from "native-utils/built/index.js"; +import { extractHost } from "backend-rs/built/index.js"; import { StatusError } from "@/misc/fetch.js"; /** diff --git a/packages/backend/src/remote/activitypub/kernel/index.ts b/packages/backend/src/remote/activitypub/kernel/index.ts index f4e61f07f..a531eca63 100644 --- a/packages/backend/src/remote/activitypub/kernel/index.ts +++ b/packages/backend/src/remote/activitypub/kernel/index.ts @@ -38,7 +38,7 @@ import block from "./block/index.js"; import flag from "./flag/index.js"; import move from "./move/index.js"; import type { IObject, IActivity } from "../type.js"; -import { extractHost } from "native-utils/built/index.js"; +import { extractHost } from "backend-rs/built/index.js"; import { shouldBlockInstance } from "@/misc/should-block-instance.js"; export async function performActivity( diff --git a/packages/backend/src/remote/activitypub/kernel/read.ts b/packages/backend/src/remote/activitypub/kernel/read.ts index fb5f5e809..4b4c39c45 100644 --- a/packages/backend/src/remote/activitypub/kernel/read.ts +++ b/packages/backend/src/remote/activitypub/kernel/read.ts @@ -1,8 +1,8 @@ import type { CacheableRemoteUser } from "@/models/entities/user.js"; import type { IRead } from "../type.js"; import { getApId } from "../type.js"; -import { extractHost } from "native-utils/built/index.js"; -import { isSelfHost } from "@/misc/native-utils.js"; +import { extractHost } from "backend-rs/built/index.js"; +import { isSelfHost } from "@/misc/backend-rs.js"; import { MessagingMessages } from "@/models/index.js"; import { readUserMessagingMessage } from "@/server/api/common/read-messaging-message.js"; diff --git a/packages/backend/src/remote/activitypub/models/note.ts b/packages/backend/src/remote/activitypub/models/note.ts index 3279c1c1c..51b5b4439 100644 --- a/packages/backend/src/remote/activitypub/models/note.ts +++ b/packages/backend/src/remote/activitypub/models/note.ts @@ -14,7 +14,7 @@ import { extractPollFromQuestion } from "./question.js"; import vote from "@/services/note/polls/vote.js"; import { apLogger } from "../logger.js"; import { DriveFile } from "@/models/entities/drive-file.js"; -import { extractHost, toPuny } from "native-utils/built/index.js"; +import { extractHost, toPuny } from "backend-rs/built/index.js"; import { Emojis, Polls, diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index 5be29aad1..11d8ac56d 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -19,7 +19,7 @@ import { UserNotePining } from "@/models/entities/user-note-pining.js"; import { genId } from "@/misc/gen-id.js"; import { UserPublickey } from "@/models/entities/user-publickey.js"; import { isDuplicateKeyValueError } from "@/misc/is-duplicate-key-value-error.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import { UserProfile } from "@/models/entities/user-profile.js"; import { toArray } from "@/prelude/array.js"; import { fetchInstanceMetadata } from "@/services/fetch-instance-metadata.js"; diff --git a/packages/backend/src/remote/activitypub/resolver.ts b/packages/backend/src/remote/activitypub/resolver.ts index 62f3f2557..e0eb74e6a 100644 --- a/packages/backend/src/remote/activitypub/resolver.ts +++ b/packages/backend/src/remote/activitypub/resolver.ts @@ -3,8 +3,8 @@ import { getJson } from "@/misc/fetch.js"; import type { ILocalUser } from "@/models/entities/user.js"; import { getInstanceActor } from "@/services/instance-actor.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { extractHost } from "native-utils/built/index.js"; -import { isSelfHost } from "@/misc/native-utils.js"; +import { extractHost } from "backend-rs/built/index.js"; +import { isSelfHost } from "@/misc/backend-rs.js"; import { signedGet } from "./request.js"; import type { IObject, ICollection, IOrderedCollection } from "./type.js"; import { isCollectionOrOrderedCollection, getApId } from "./type.js"; diff --git a/packages/backend/src/remote/resolve-user.ts b/packages/backend/src/remote/resolve-user.ts index 5c6d641e4..34edd03a8 100644 --- a/packages/backend/src/remote/resolve-user.ts +++ b/packages/backend/src/remote/resolve-user.ts @@ -4,7 +4,7 @@ import { IsNull } from "typeorm"; import config from "@/config/index.js"; import type { User, IRemoteUser } from "@/models/entities/user.js"; import { Users } from "@/models/index.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import webFinger from "./webfinger.js"; import { createPerson, updatePerson } from "./activitypub/models/person.js"; import { remoteLogger } from "./logger.js"; diff --git a/packages/backend/src/server/activitypub.ts b/packages/backend/src/server/activitypub.ts index 8e3160e51..5fdcb621c 100644 --- a/packages/backend/src/server/activitypub.ts +++ b/packages/backend/src/server/activitypub.ts @@ -9,7 +9,7 @@ import renderKey from "@/remote/activitypub/renderer/key.js"; import { renderPerson } from "@/remote/activitypub/renderer/person.js"; import renderEmoji from "@/remote/activitypub/renderer/emoji.js"; import { inbox as processInbox } from "@/queue/index.js"; -import { isSelfHost } from "@/misc/native-utils.js"; +import { isSelfHost } from "@/misc/backend-rs.js"; import { Notes, Users, diff --git a/packages/backend/src/server/api/common/generate-native-user-token.ts b/packages/backend/src/server/api/common/generate-native-user-token.ts index 7b23e682e..6ffaac4f9 100644 --- a/packages/backend/src/server/api/common/generate-native-user-token.ts +++ b/packages/backend/src/server/api/common/generate-native-user-token.ts @@ -1,3 +1,3 @@ -import { genString } from "native-utils/built/index.js"; +import { genString } from "backend-rs/built/index.js"; export default () => genString(16); diff --git a/packages/backend/src/server/api/common/signup.ts b/packages/backend/src/server/api/common/signup.ts index 92889caa5..d0ac77335 100644 --- a/packages/backend/src/server/api/common/signup.ts +++ b/packages/backend/src/server/api/common/signup.ts @@ -5,7 +5,7 @@ import { Users, UsedUsernames } from "@/models/index.js"; import { UserProfile } from "@/models/entities/user-profile.js"; import { IsNull } from "typeorm"; import { genId } from "@/misc/gen-id.js"; -import { toPunyOptional } from "native-utils/built/index.js"; +import { toPunyOptional } from "backend-rs/built/index.js"; import { UserKeypair } from "@/models/entities/user-keypair.js"; import { UsedUsername } from "@/models/entities/used-username.js"; import { db } from "@/db/postgre.js"; diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index ec21abd2a..481deb700 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -2,7 +2,7 @@ import define from "@/server/api/define.js"; import { ApiError } from "@/server/api/error.js"; import { Emojis } from "@/models/index.js"; import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js"; -import { sqlLikeEscape, toPuny } from "native-utils/built/index.js"; +import { sqlLikeEscape, toPuny } from "backend-rs/built/index.js"; export const meta = { tags: ["admin", "emoji"], diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts index 2d4f24158..e0444770b 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list.ts @@ -2,7 +2,7 @@ import define from "@/server/api/define.js"; import { Emojis } from "@/models/index.js"; import { makePaginationQuery } from "../../../common/make-pagination-query.js"; import type { Emoji } from "@/models/entities/emoji.js"; -//import { sqlLikeEscape } from "native-utils/built/index.js"; +//import { sqlLikeEscape } from "backend-rs/built/index.js"; import { ApiError } from "../../../error.js"; export const meta = { diff --git a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts index 0d1111d8f..2c191d172 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/refresh-remote-instance-metadata.ts @@ -1,6 +1,6 @@ import define from "@/server/api/define.js"; import { Instances } from "@/models/index.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import { fetchInstanceMetadata } from "@/services/fetch-instance-metadata.js"; export const meta = { diff --git a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts index 0cfeacfb6..dfea5152d 100644 --- a/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts +++ b/packages/backend/src/server/api/endpoints/admin/federation/update-instance.ts @@ -1,6 +1,6 @@ import define from "@/server/api/define.js"; import { Instances } from "@/models/index.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; export const meta = { tags: ["admin"], diff --git a/packages/backend/src/server/api/endpoints/admin/show-users.ts b/packages/backend/src/server/api/endpoints/admin/show-users.ts index 33f43f133..8c1188a38 100644 --- a/packages/backend/src/server/api/endpoints/admin/show-users.ts +++ b/packages/backend/src/server/api/endpoints/admin/show-users.ts @@ -1,6 +1,6 @@ import { Users } from "@/models/index.js"; import define from "@/server/api/define.js"; -import { sqlLikeEscape } from "native-utils/built/index.js"; +import { sqlLikeEscape } from "backend-rs/built/index.js"; export const meta = { tags: ["admin"], diff --git a/packages/backend/src/server/api/endpoints/ap/show.ts b/packages/backend/src/server/api/endpoints/ap/show.ts index db3df9a3c..243af11f8 100644 --- a/packages/backend/src/server/api/endpoints/ap/show.ts +++ b/packages/backend/src/server/api/endpoints/ap/show.ts @@ -4,7 +4,7 @@ import { createNote } from "@/remote/activitypub/models/note.js"; import DbResolver from "@/remote/activitypub/db-resolver.js"; import Resolver from "@/remote/activitypub/resolver.js"; import { ApiError } from "@/server/api/error.js"; -import { extractHost } from "native-utils/built/index.js"; +import { extractHost } from "backend-rs/built/index.js"; import { Users, Notes } from "@/models/index.js"; import type { Note } from "@/models/entities/note.js"; import type { CacheableLocalUser, User } from "@/models/entities/user.js"; diff --git a/packages/backend/src/server/api/endpoints/app/create.ts b/packages/backend/src/server/api/endpoints/app/create.ts index c78ef88aa..04df4d41d 100644 --- a/packages/backend/src/server/api/endpoints/app/create.ts +++ b/packages/backend/src/server/api/endpoints/app/create.ts @@ -2,7 +2,7 @@ import define from "@/server/api/define.js"; import { Apps } from "@/models/index.js"; import { genId } from "@/misc/gen-id.js"; import { unique } from "@/prelude/array.js"; -import { genString } from "native-utils/built/index.js"; +import { genString } from "backend-rs/built/index.js"; export const meta = { tags: ["app"], diff --git a/packages/backend/src/server/api/endpoints/auth/accept.ts b/packages/backend/src/server/api/endpoints/auth/accept.ts index c92c97aae..921b26b7a 100644 --- a/packages/backend/src/server/api/endpoints/auth/accept.ts +++ b/packages/backend/src/server/api/endpoints/auth/accept.ts @@ -3,7 +3,7 @@ import define from "@/server/api/define.js"; import { ApiError } from "@/server/api/error.js"; import { AuthSessions, AccessTokens, Apps } from "@/models/index.js"; import { genId } from "@/misc/gen-id.js"; -import { genString } from "native-utils/built/index.js"; +import { genString } from "backend-rs/built/index.js"; export const meta = { tags: ["auth"], diff --git a/packages/backend/src/server/api/endpoints/channels/search.ts b/packages/backend/src/server/api/endpoints/channels/search.ts index d48eaefaf..5261d6841 100644 --- a/packages/backend/src/server/api/endpoints/channels/search.ts +++ b/packages/backend/src/server/api/endpoints/channels/search.ts @@ -2,7 +2,7 @@ import define from "@/server/api/define.js"; import { Brackets } from "typeorm"; import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js"; import { Channels } from "@/models/index.js"; -import { sqlLikeEscape } from "native-utils/built/index.js"; +import { sqlLikeEscape } from "backend-rs/built/index.js"; export const meta = { tags: ["channels"], diff --git a/packages/backend/src/server/api/endpoints/federation/instances.ts b/packages/backend/src/server/api/endpoints/federation/instances.ts index d8ea58725..8453004e8 100644 --- a/packages/backend/src/server/api/endpoints/federation/instances.ts +++ b/packages/backend/src/server/api/endpoints/federation/instances.ts @@ -1,7 +1,7 @@ import define from "@/server/api/define.js"; import { Instances } from "@/models/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { sqlLikeEscape } from "native-utils/built/index.js"; +import { sqlLikeEscape } from "backend-rs/built/index.js"; export const meta = { tags: ["federation"], diff --git a/packages/backend/src/server/api/endpoints/federation/show-instance.ts b/packages/backend/src/server/api/endpoints/federation/show-instance.ts index ac31acac8..d99a44077 100644 --- a/packages/backend/src/server/api/endpoints/federation/show-instance.ts +++ b/packages/backend/src/server/api/endpoints/federation/show-instance.ts @@ -1,6 +1,6 @@ import define from "@/server/api/define.js"; import { Instances } from "@/models/index.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; export const meta = { tags: ["federation"], diff --git a/packages/backend/src/server/api/endpoints/hashtags/search.ts b/packages/backend/src/server/api/endpoints/hashtags/search.ts index 1b8c9b9b0..19c5173d6 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/search.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/search.ts @@ -1,6 +1,6 @@ import define from "@/server/api/define.js"; import { Hashtags } from "@/models/index.js"; -import { sqlLikeEscape } from "native-utils/built/index.js"; +import { sqlLikeEscape } from "backend-rs/built/index.js"; export const meta = { tags: ["hashtags"], diff --git a/packages/backend/src/server/api/endpoints/hashtags/trend.ts b/packages/backend/src/server/api/endpoints/hashtags/trend.ts index 35b98c524..69f9234e8 100644 --- a/packages/backend/src/server/api/endpoints/hashtags/trend.ts +++ b/packages/backend/src/server/api/endpoints/hashtags/trend.ts @@ -3,7 +3,7 @@ import define from "@/server/api/define.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; import { Notes } from "@/models/index.js"; import type { Note } from "@/models/entities/note.js"; -import { safeForSql } from "native-utils/built/index.js"; +import { safeForSql } from "backend-rs/built/index.js"; import { normalizeForSearch } from "@/misc/normalize-for-search.js"; /* diff --git a/packages/backend/src/server/api/endpoints/i/known-as.ts b/packages/backend/src/server/api/endpoints/i/known-as.ts index 4f0f87c84..125955f5f 100644 --- a/packages/backend/src/server/api/endpoints/i/known-as.ts +++ b/packages/backend/src/server/api/endpoints/i/known-as.ts @@ -8,7 +8,7 @@ import { DAY } from "@/const.js"; import { apiLogger } from "@/server/api/logger.js"; import define from "@/server/api/define.js"; import { ApiError } from "@/server/api/error.js"; -import { stringToAcct } from "native-utils/built/index.js"; +import { stringToAcct } from "backend-rs/built/index.js"; export const meta = { tags: ["users"], diff --git a/packages/backend/src/server/api/endpoints/i/move.ts b/packages/backend/src/server/api/endpoints/i/move.ts index 303b43181..9a8410bc1 100644 --- a/packages/backend/src/server/api/endpoints/i/move.ts +++ b/packages/backend/src/server/api/endpoints/i/move.ts @@ -12,7 +12,7 @@ import { getUser } from "@/server/api/common/getters.js"; import { Followings, Users } from "@/models/index.js"; import config from "@/config/index.js"; import { publishMainStream } from "@/services/stream.js"; -import { stringToAcct } from "native-utils/built/index.js"; +import { stringToAcct } from "backend-rs/built/index.js"; export const meta = { tags: ["users"], diff --git a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts index a673b6dc2..610d0b73a 100644 --- a/packages/backend/src/server/api/endpoints/miauth/gen-token.ts +++ b/packages/backend/src/server/api/endpoints/miauth/gen-token.ts @@ -1,7 +1,7 @@ import define from "@/server/api/define.js"; import { AccessTokens } from "@/models/index.js"; import { genId } from "@/misc/gen-id.js"; -import { genString } from "native-utils/built/index.js"; +import { genString } from "backend-rs/built/index.js"; export const meta = { tags: ["auth"], diff --git a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts index 2ada80d99..7857552ef 100644 --- a/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts +++ b/packages/backend/src/server/api/endpoints/notes/search-by-tag.ts @@ -1,6 +1,6 @@ import { Brackets } from "typeorm"; import { Notes } from "@/models/index.js"; -import { safeForSql } from "native-utils/built/index.js"; +import { safeForSql } from "backend-rs/built/index.js"; import { normalizeForSearch } from "@/misc/normalize-for-search.js"; import define from "@/server/api/define.js"; import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js"; diff --git a/packages/backend/src/server/api/endpoints/notes/search.ts b/packages/backend/src/server/api/endpoints/notes/search.ts index 2be618d12..312c3a6d1 100644 --- a/packages/backend/src/server/api/endpoints/notes/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/search.ts @@ -10,7 +10,7 @@ import { makePaginationQuery } from "@/server/api/common/make-pagination-query.j import { generateVisibilityQuery } from "@/server/api/common/generate-visibility-query.js"; import { generateMutedUserQuery } from "@/server/api/common/generate-muted-user-query.js"; import { generateBlockedUserQuery } from "@/server/api/common/generate-block-query.js"; -import { sqlLikeEscape } from "native-utils/built/index.js"; +import { sqlLikeEscape } from "backend-rs/built/index.js"; export const meta = { tags: ["notes"], diff --git a/packages/backend/src/server/api/endpoints/pinned-users.ts b/packages/backend/src/server/api/endpoints/pinned-users.ts index e8d2e9a19..be8bca85c 100644 --- a/packages/backend/src/server/api/endpoints/pinned-users.ts +++ b/packages/backend/src/server/api/endpoints/pinned-users.ts @@ -1,7 +1,7 @@ import { IsNull } from "typeorm"; import { Users } from "@/models/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; -import { stringToAcct } from "native-utils/built/index.js"; +import { stringToAcct } from "backend-rs/built/index.js"; import type { User } from "@/models/entities/user.js"; import define from "@/server/api/define.js"; diff --git a/packages/backend/src/server/api/endpoints/users/followers.ts b/packages/backend/src/server/api/endpoints/users/followers.ts index 9e2a343b2..3f1d8ce9e 100644 --- a/packages/backend/src/server/api/endpoints/users/followers.ts +++ b/packages/backend/src/server/api/endpoints/users/followers.ts @@ -1,6 +1,6 @@ import { IsNull } from "typeorm"; import { Users, Followings, UserProfiles } from "@/models/index.js"; -import { toPunyOptional } from "native-utils/built/index.js"; +import { toPunyOptional } from "backend-rs/built/index.js"; import define from "@/server/api/define.js"; import { ApiError } from "@/server/api/error.js"; import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js"; diff --git a/packages/backend/src/server/api/endpoints/users/following.ts b/packages/backend/src/server/api/endpoints/users/following.ts index 0c56ab40a..5960c126c 100644 --- a/packages/backend/src/server/api/endpoints/users/following.ts +++ b/packages/backend/src/server/api/endpoints/users/following.ts @@ -1,6 +1,6 @@ import { IsNull } from "typeorm"; import { Users, Followings, UserProfiles } from "@/models/index.js"; -import { toPunyOptional } from "native-utils/built/index.js"; +import { toPunyOptional } from "backend-rs/built/index.js"; import define from "@/server/api/define.js"; import { ApiError } from "@/server/api/error.js"; import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js"; diff --git a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts index a89133076..c0d11c3d0 100644 --- a/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts +++ b/packages/backend/src/server/api/endpoints/users/search-by-username-and-host.ts @@ -2,7 +2,7 @@ import { Brackets } from "typeorm"; import { Followings, Users } from "@/models/index.js"; import type { User } from "@/models/entities/user.js"; import define from "@/server/api/define.js"; -import { sqlLikeEscape } from "native-utils/built/index.js"; +import { sqlLikeEscape } from "backend-rs/built/index.js"; export const meta = { tags: ["users"], diff --git a/packages/backend/src/server/api/endpoints/users/search.ts b/packages/backend/src/server/api/endpoints/users/search.ts index dfb6902dd..b902b125f 100644 --- a/packages/backend/src/server/api/endpoints/users/search.ts +++ b/packages/backend/src/server/api/endpoints/users/search.ts @@ -2,7 +2,7 @@ import { Brackets } from "typeorm"; import { UserProfiles, Users } from "@/models/index.js"; import type { User } from "@/models/entities/user.js"; import define from "@/server/api/define.js"; -import { sqlLikeEscape } from "native-utils/built/index.js"; +import { sqlLikeEscape } from "backend-rs/built/index.js"; export const meta = { tags: ["users"], diff --git a/packages/backend/src/server/api/index.ts b/packages/backend/src/server/api/index.ts index a5970d584..d82bd283b 100644 --- a/packages/backend/src/server/api/index.ts +++ b/packages/backend/src/server/api/index.ts @@ -23,11 +23,7 @@ import verifyEmail from "./private/verify-email.js"; import { koaBody } from "koa-body"; import { convertAttachment } from "./mastodon/converters.js"; -// TODO?: should we avoid importing things from built directory? -import { - convertId, - IdConvertType as IdType, -} from "native-utils/built/index.js"; +import { convertId, IdConvertType as IdType } from "backend-rs/built/index.js"; // re-export native rust id conversion (function and enum) export { IdType, convertId }; diff --git a/packages/backend/src/server/api/limiter.ts b/packages/backend/src/server/api/limiter.ts index d9bd5f486..b66424610 100644 --- a/packages/backend/src/server/api/limiter.ts +++ b/packages/backend/src/server/api/limiter.ts @@ -2,7 +2,7 @@ import Limiter from "ratelimiter"; import Logger from "@/services/logger.js"; import { redisClient } from "@/db/redis.js"; import type { IEndpointMeta } from "./endpoints.js"; -import { formatMilliseconds } from "native-utils/built/index.js"; +import { formatMilliseconds } from "backend-rs/built/index.js"; const logger = new Logger("limiter"); diff --git a/packages/backend/src/server/index.ts b/packages/backend/src/server/index.ts index 14bfe74a3..b08be4e21 100644 --- a/packages/backend/src/server/index.ts +++ b/packages/backend/src/server/index.ts @@ -19,8 +19,8 @@ import { Users } from "@/models/index.js"; import { fetchMeta } from "@/misc/fetch-meta.js"; import { genIdenticon } from "@/misc/gen-identicon.js"; import { createTemp } from "@/misc/create-temp.js"; -import { stringToAcct } from "native-utils/built/index.js"; -import { envConfig } from "@/misc/native-utils.js"; +import { stringToAcct } from "backend-rs/built/index.js"; +import { envConfig } from "@/misc/backend-rs.js"; import megalodon, { MegalodonInterface } from "megalodon"; import activityPub from "./activitypub.js"; import nodeinfo from "./nodeinfo.js"; diff --git a/packages/backend/src/server/web/index.ts b/packages/backend/src/server/web/index.ts index 0e6ad57db..a116eca31 100644 --- a/packages/backend/src/server/web/index.ts +++ b/packages/backend/src/server/web/index.ts @@ -28,7 +28,7 @@ import { Emojis, GalleryPosts, } from "@/models/index.js"; -import { stringToAcct } from "native-utils/built/index.js"; +import { stringToAcct } from "backend-rs/built/index.js"; import { getNoteSummary } from "@/misc/get-note-summary.js"; import { queues } from "@/queue/queues.js"; import { genOpenapiSpec } from "../api/openapi/gen-spec.js"; diff --git a/packages/backend/src/server/well-known.ts b/packages/backend/src/server/well-known.ts index eae8c8336..b2a02ef20 100644 --- a/packages/backend/src/server/well-known.ts +++ b/packages/backend/src/server/well-known.ts @@ -1,8 +1,8 @@ import Router from "@koa/router"; import config from "@/config/index.js"; -import { stringToAcct } from "native-utils/built/index.js"; -import type { Acct } from "native-utils/built/index.js"; +import { stringToAcct } from "backend-rs/built/index.js"; +import type { Acct } from "backend-rs/built/index.js"; import { links } from "./nodeinfo.js"; import { escapeAttribute, escapeValue } from "@/prelude/xml.js"; import { Users } from "@/models/index.js"; diff --git a/packages/backend/src/services/logger.ts b/packages/backend/src/services/logger.ts index 810baed29..63b7176ad 100644 --- a/packages/backend/src/services/logger.ts +++ b/packages/backend/src/services/logger.ts @@ -2,7 +2,7 @@ import cluster from "node:cluster"; import chalk from "chalk"; import { default as convertColor } from "color-convert"; import { format as dateFormat } from "date-fns"; -import { envConfig } from "@/misc/native-utils.js"; +import { envConfig } from "@/misc/backend-rs.js"; import config from "@/config/index.js"; import * as SyslogPro from "syslog-pro"; diff --git a/packages/backend/src/services/messages/create.ts b/packages/backend/src/services/messages/create.ts index 3381bdea1..c02cff66c 100644 --- a/packages/backend/src/services/messages/create.ts +++ b/packages/backend/src/services/messages/create.ts @@ -22,7 +22,7 @@ import renderNote from "@/remote/activitypub/renderer/note.js"; import renderCreate from "@/remote/activitypub/renderer/create.js"; import { renderActivity } from "@/remote/activitypub/renderer/index.js"; import { deliver } from "@/queue/index.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import { Instances } from "@/models/index.js"; export async function createMessage( diff --git a/packages/backend/src/services/register-or-fetch-instance-doc.ts b/packages/backend/src/services/register-or-fetch-instance-doc.ts index 17c8d9d1b..e7607c61f 100644 --- a/packages/backend/src/services/register-or-fetch-instance-doc.ts +++ b/packages/backend/src/services/register-or-fetch-instance-doc.ts @@ -1,7 +1,7 @@ import type { Instance } from "@/models/entities/instance.js"; import { Instances } from "@/models/index.js"; import { genId } from "@/misc/gen-id.js"; -import { toPuny } from "native-utils/built/index.js"; +import { toPuny } from "backend-rs/built/index.js"; import { Cache } from "@/misc/cache.js"; const cache = new Cache("registerOrFetchInstanceDoc", 60 * 60); diff --git a/packages/backend/src/services/send-email-notification.ts b/packages/backend/src/services/send-email-notification.ts index 78243b3ed..6b9e0f6fa 100644 --- a/packages/backend/src/services/send-email-notification.ts +++ b/packages/backend/src/services/send-email-notification.ts @@ -2,7 +2,7 @@ import type { User } from "@/models/entities/user.js"; // import { sendEmail } from "./send-email.js"; // import { I18n } from "@/misc/i18n.js"; -// import { acctToString } from "native-utils/built/index.js"; +// import { acctToString } from "backend-rs/built/index.js"; // TODO //const locales = await import('../../../../locales/index.js'); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 43727e440..6939eb9c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,6 +117,9 @@ importers: axios: specifier: 1.6.5 version: 1.6.5 + backend-rs: + specifier: link:backend-rs + version: link:backend-rs bcryptjs: specifier: 2.4.3 version: 2.4.3 @@ -252,9 +255,6 @@ importers: multer: specifier: 1.4.5-lts.1 version: 1.4.5-lts.1 - native-utils: - specifier: link:native-utils - version: link:native-utils nested-property: specifier: 4.0.0 version: 4.0.0 @@ -543,7 +543,7 @@ importers: specifier: 8.16.0 version: 8.16.0 - packages/backend/native-utils: + packages/backend-rs: devDependencies: '@napi-rs/cli': specifier: 2.18.0 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fd5cd65e6..9f11f7654 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,6 @@ packages: - 'packages/backend' - - 'packages/backend/native-utils' + - 'packages/backend-rs' - 'packages/client' - 'packages/sw' - 'packages/firefish-js' diff --git a/scripts/clean-built.mjs b/scripts/clean-built.mjs index aa2d0f739..50e286ad6 100644 --- a/scripts/clean-built.mjs +++ b/scripts/clean-built.mjs @@ -9,7 +9,7 @@ import { fileURLToPath } from "node:url"; recursive: true, force: true, }); - fs.rmSync(join(__dirname, "/../packages/backend/native-utils/built"), { + fs.rmSync(join(__dirname, "/../packages/backend-rs/built"), { recursive: true, force: true, }); diff --git a/scripts/clean-cargo.mjs b/scripts/clean-cargo.mjs index a2d20e421..77b87fdbd 100644 --- a/scripts/clean-cargo.mjs +++ b/scripts/clean-cargo.mjs @@ -7,7 +7,7 @@ import { execa } from "execa"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); execa("cargo", ["clean"], { - cwd: join(__dirname, "/../packages/backend/native-utils"), + cwd: join(__dirname, "/../packages/backend-rs"), stdio: "inherit", }); })(); diff --git a/scripts/clean-npm.mjs b/scripts/clean-npm.mjs index 7a6e28a72..d6719ab3b 100644 --- a/scripts/clean-npm.mjs +++ b/scripts/clean-npm.mjs @@ -10,7 +10,7 @@ import { execa } from "execa"; recursive: true, force: true, }); - fs.rmSync(join(__dirname, "/../packages/backend/native-utils/node_modules"), { + fs.rmSync(join(__dirname, "/../packages/backend-rs/node_modules"), { recursive: true, force: true, });