From 01e8ae37f803a01eedb77556ab5813e85f06d782 Mon Sep 17 00:00:00 2001 From: naskya Date: Tue, 23 Jan 2024 01:29:15 +0900 Subject: [PATCH] refactor: rename backend/native-utils to backend-rs --- .dockerignore | 2 +- Dockerfile | 27 +- Makefile | 7 +- docs/changes.md | 2 +- docs/contributing.md | 2 +- neko/index.js | 665 ++++++++---------- neko/update/native.sh | 4 +- packages/README.md | 2 +- .../.cargo/config.toml | 0 .../native-utils => backend-rs}/.editorconfig | 0 .../native-utils => backend-rs}/.gitignore | 0 .../native-utils => backend-rs}/.npmignore | 0 .../native-utils => backend-rs}/Cargo.lock | 56 +- .../native-utils => backend-rs}/Cargo.toml | 2 +- .../native-utils => backend-rs}/build.rs | 0 .../backend-rs/npm/android-arm-eabi/README.md | 3 + .../npm/android-arm-eabi/package.json | 6 +- .../backend-rs/npm/android-arm64/README.md | 3 + .../npm/android-arm64/package.json | 6 +- .../backend-rs/npm/darwin-arm64/README.md | 3 + .../npm/darwin-arm64/package.json | 6 +- .../backend-rs/npm/darwin-universal/README.md | 3 + .../npm/darwin-universal/package.json | 15 + packages/backend-rs/npm/darwin-x64/README.md | 3 + .../npm/darwin-x64/package.json | 6 +- packages/backend-rs/npm/freebsd-x64/README.md | 3 + .../npm/freebsd-x64/package.json | 6 +- .../npm/linux-arm-gnueabihf/README.md | 3 + .../npm/linux-arm-gnueabihf/package.json | 6 +- .../backend-rs/npm/linux-arm64-gnu/README.md | 3 + .../npm/linux-arm64-gnu/package.json | 6 +- .../backend-rs/npm/linux-arm64-musl/README.md | 3 + .../npm/linux-arm64-musl/package.json | 6 +- .../backend-rs/npm/linux-x64-gnu/README.md | 3 + .../npm/linux-x64-gnu/package.json | 6 +- .../backend-rs/npm/linux-x64-musl/README.md | 3 + .../npm/linux-x64-musl/package.json | 6 +- .../backend-rs/npm/win32-arm64-msvc/README.md | 3 + .../npm/win32-arm64-msvc/package.json | 6 +- .../backend-rs/npm/win32-ia32-msvc/README.md | 3 + .../npm/win32-ia32-msvc/package.json | 6 +- .../backend-rs/npm/win32-x64-msvc/README.md | 3 + .../npm/win32-x64-msvc/package.json | 6 +- .../native-utils => backend-rs}/package.json | 4 +- .../src/config/environment.rs | 0 .../src/config/mod.rs | 0 .../src/config/server.rs | 0 .../src/database/error.rs | 0 .../src/database/mod.rs | 0 .../native-utils => backend-rs}/src/lib.rs | 0 .../native-utils => backend-rs}/src/macros.rs | 0 .../src/mastodon_api.rs | 0 .../src/model/entity/abuse_user_report.rs | 0 .../src/model/entity/access_token.rs | 0 .../src/model/entity/ad.rs | 0 .../src/model/entity/announcement.rs | 0 .../src/model/entity/announcement_read.rs | 0 .../src/model/entity/antenna.rs | 0 .../src/model/entity/app.rs | 0 .../src/model/entity/attestation_challenge.rs | 0 .../src/model/entity/auth_session.rs | 0 .../src/model/entity/blocking.rs | 0 .../src/model/entity/channel.rs | 0 .../src/model/entity/channel_following.rs | 0 .../src/model/entity/channel_note_pining.rs | 0 .../src/model/entity/clip.rs | 0 .../src/model/entity/clip_note.rs | 0 .../src/model/entity/drive_file.rs | 0 .../src/model/entity/drive_folder.rs | 0 .../src/model/entity/emoji.rs | 0 .../src/model/entity/follow_request.rs | 0 .../src/model/entity/following.rs | 0 .../src/model/entity/gallery_like.rs | 0 .../src/model/entity/gallery_post.rs | 0 .../src/model/entity/hashtag.rs | 0 .../src/model/entity/instance.rs | 0 .../src/model/entity/messaging_message.rs | 0 .../src/model/entity/meta.rs | 0 .../src/model/entity/migrations.rs | 0 .../src/model/entity/mod.rs | 0 .../src/model/entity/moderation_log.rs | 0 .../src/model/entity/muted_note.rs | 0 .../src/model/entity/muting.rs | 0 .../src/model/entity/note.rs | 0 .../src/model/entity/note_edit.rs | 0 .../src/model/entity/note_favorite.rs | 0 .../src/model/entity/note_reaction.rs | 0 .../src/model/entity/note_thread_muting.rs | 0 .../src/model/entity/note_unread.rs | 0 .../src/model/entity/note_watching.rs | 0 .../src/model/entity/notification.rs | 0 .../src/model/entity/page.rs | 0 .../src/model/entity/page_like.rs | 0 .../model/entity/password_reset_request.rs | 0 .../src/model/entity/poll.rs | 0 .../src/model/entity/poll_vote.rs | 0 .../src/model/entity/prelude.rs | 0 .../src/model/entity/promo_note.rs | 0 .../src/model/entity/promo_read.rs | 0 .../src/model/entity/registration_ticket.rs | 0 .../src/model/entity/registry_item.rs | 0 .../src/model/entity/relay.rs | 0 .../src/model/entity/renote_muting.rs | 0 .../src/model/entity/reply_muting.rs | 0 .../src/model/entity/sea_orm_active_enums.rs | 0 .../src/model/entity/signin.rs | 0 .../src/model/entity/sw_subscription.rs | 0 .../src/model/entity/used_username.rs | 0 .../src/model/entity/user.rs | 0 .../src/model/entity/user_group.rs | 0 .../src/model/entity/user_group_invitation.rs | 0 .../src/model/entity/user_group_invite.rs | 0 .../src/model/entity/user_group_joining.rs | 0 .../src/model/entity/user_ip.rs | 0 .../src/model/entity/user_keypair.rs | 0 .../src/model/entity/user_list.rs | 0 .../src/model/entity/user_list_joining.rs | 0 .../src/model/entity/user_note_pining.rs | 0 .../src/model/entity/user_pending.rs | 0 .../src/model/entity/user_profile.rs | 0 .../src/model/entity/user_publickey.rs | 0 .../src/model/entity/user_security_key.rs | 0 .../src/model/entity/webhook.rs | 0 .../src/model/error.rs | 0 .../src/model/mod.rs | 0 .../src/model/repository.rs | 0 .../src/model/schema.rs | 0 .../src/util/acct.rs | 0 .../src/util/convert_host.rs | 0 .../src/util/convert_to_hidden_post.rs | 0 .../src/util/escape_sql.rs | 0 .../src/util/format_milliseconds.rs | 0 .../src/util/id.rs | 0 .../src/util/mod.rs | 0 .../src/util/random.rs | 0 .../npm/android-arm-eabi/README.md | 3 - .../native-utils/npm/android-arm64/README.md | 3 - .../native-utils/npm/darwin-arm64/README.md | 3 - .../npm/darwin-universal/README.md | 3 - .../npm/darwin-universal/package.json | 15 - .../native-utils/npm/darwin-x64/README.md | 3 - .../native-utils/npm/freebsd-x64/README.md | 3 - .../npm/linux-arm-gnueabihf/README.md | 3 - .../npm/linux-arm64-gnu/README.md | 3 - .../npm/linux-arm64-musl/README.md | 3 - .../native-utils/npm/linux-x64-gnu/README.md | 3 - .../native-utils/npm/linux-x64-musl/README.md | 3 - .../npm/win32-arm64-msvc/README.md | 3 - .../npm/win32-ia32-msvc/README.md | 3 - .../native-utils/npm/win32-x64-msvc/README.md | 3 - packages/backend/package.json | 2 +- packages/backend/src/boot/index.ts | 2 +- packages/backend/src/boot/master.ts | 2 +- .../misc/{native-utils.ts => backend-rs.ts} | 2 +- .../backend/src/misc/check-hit-antenna.ts | 4 +- packages/backend/src/misc/gen-id.ts | 2 +- packages/backend/src/misc/populate-emojis.ts | 4 +- packages/backend/src/misc/reaction-lib.ts | 2 +- .../src/models/repositories/drive-file.ts | 2 +- packages/backend/src/queue/index.ts | 2 +- .../backend/src/queue/processors/deliver.ts | 2 +- .../backend/src/queue/processors/inbox.ts | 2 +- .../src/remote/activitypub/check-fetch.ts | 2 +- .../activitypub/kernel/announce/note.ts | 2 +- .../remote/activitypub/kernel/create/note.ts | 2 +- .../src/remote/activitypub/kernel/index.ts | 2 +- .../src/remote/activitypub/kernel/read.ts | 4 +- .../src/remote/activitypub/models/note.ts | 2 +- .../src/remote/activitypub/models/person.ts | 2 +- .../src/remote/activitypub/resolver.ts | 4 +- packages/backend/src/remote/resolve-user.ts | 2 +- packages/backend/src/server/activitypub.ts | 2 +- .../api/common/generate-native-user-token.ts | 2 +- .../backend/src/server/api/common/signup.ts | 2 +- .../api/endpoints/admin/emoji/list-remote.ts | 2 +- .../server/api/endpoints/admin/emoji/list.ts | 2 +- .../refresh-remote-instance-metadata.ts | 2 +- .../admin/federation/update-instance.ts | 2 +- .../server/api/endpoints/admin/show-users.ts | 2 +- .../src/server/api/endpoints/ap/show.ts | 2 +- .../src/server/api/endpoints/app/create.ts | 2 +- .../src/server/api/endpoints/auth/accept.ts | 2 +- .../server/api/endpoints/channels/search.ts | 2 +- .../api/endpoints/federation/instances.ts | 2 +- .../api/endpoints/federation/show-instance.ts | 2 +- .../server/api/endpoints/hashtags/search.ts | 2 +- .../server/api/endpoints/hashtags/trend.ts | 2 +- .../src/server/api/endpoints/i/known-as.ts | 2 +- .../src/server/api/endpoints/i/move.ts | 2 +- .../server/api/endpoints/miauth/gen-token.ts | 2 +- .../api/endpoints/notes/search-by-tag.ts | 2 +- .../src/server/api/endpoints/notes/search.ts | 2 +- .../src/server/api/endpoints/pinned-users.ts | 2 +- .../server/api/endpoints/users/followers.ts | 2 +- .../server/api/endpoints/users/following.ts | 2 +- .../users/search-by-username-and-host.ts | 2 +- .../src/server/api/endpoints/users/search.ts | 2 +- packages/backend/src/server/api/index.ts | 6 +- packages/backend/src/server/api/limiter.ts | 2 +- packages/backend/src/server/index.ts | 4 +- packages/backend/src/server/web/index.ts | 2 +- packages/backend/src/server/well-known.ts | 4 +- packages/backend/src/services/logger.ts | 2 +- .../backend/src/services/messages/create.ts | 2 +- .../register-or-fetch-instance-doc.ts | 2 +- .../src/services/send-email-notification.ts | 2 +- pnpm-lock.yaml | 8 +- pnpm-workspace.yaml | 2 +- scripts/clean-built.mjs | 2 +- scripts/clean-cargo.mjs | 2 +- scripts/clean-npm.mjs | 2 +- 211 files changed, 531 insertions(+), 578 deletions(-) rename packages/{backend/native-utils => backend-rs}/.cargo/config.toml (100%) rename packages/{backend/native-utils => backend-rs}/.editorconfig (100%) rename packages/{backend/native-utils => backend-rs}/.gitignore (100%) rename packages/{backend/native-utils => backend-rs}/.npmignore (100%) rename packages/{backend/native-utils => backend-rs}/Cargo.lock (99%) rename packages/{backend/native-utils => backend-rs}/Cargo.toml (97%) rename packages/{backend/native-utils => backend-rs}/build.rs (100%) create mode 100644 packages/backend-rs/npm/android-arm-eabi/README.md rename packages/{backend/native-utils => backend-rs}/npm/android-arm-eabi/package.json (54%) create mode 100644 packages/backend-rs/npm/android-arm64/README.md rename packages/{backend/native-utils => backend-rs}/npm/android-arm64/package.json (56%) create mode 100644 packages/backend-rs/npm/darwin-arm64/README.md rename packages/{backend/native-utils => backend-rs}/npm/darwin-arm64/package.json (56%) create mode 100644 packages/backend-rs/npm/darwin-universal/README.md create mode 100644 packages/backend-rs/npm/darwin-universal/package.json create mode 100644 packages/backend-rs/npm/darwin-x64/README.md rename packages/{backend/native-utils => backend-rs}/npm/darwin-x64/package.json (57%) create mode 100644 packages/backend-rs/npm/freebsd-x64/README.md rename packages/{backend/native-utils => backend-rs}/npm/freebsd-x64/package.json (57%) create mode 100644 packages/backend-rs/npm/linux-arm-gnueabihf/README.md rename packages/{backend/native-utils => backend-rs}/npm/linux-arm-gnueabihf/package.json (52%) create mode 100644 packages/backend-rs/npm/linux-arm64-gnu/README.md rename packages/{backend/native-utils => backend-rs}/npm/linux-arm64-gnu/package.json (59%) create mode 100644 packages/backend-rs/npm/linux-arm64-musl/README.md rename packages/{backend/native-utils => backend-rs}/npm/linux-arm64-musl/package.json (58%) create mode 100644 packages/backend-rs/npm/linux-x64-gnu/README.md rename packages/{backend/native-utils => backend-rs}/npm/linux-x64-gnu/package.json (59%) create mode 100644 packages/backend-rs/npm/linux-x64-musl/README.md rename packages/{backend/native-utils => backend-rs}/npm/linux-x64-musl/package.json (59%) create mode 100644 packages/backend-rs/npm/win32-arm64-msvc/README.md rename packages/{backend/native-utils => backend-rs}/npm/win32-arm64-msvc/package.json (54%) create mode 100644 packages/backend-rs/npm/win32-ia32-msvc/README.md rename packages/{backend/native-utils => backend-rs}/npm/win32-ia32-msvc/package.json (54%) create mode 100644 packages/backend-rs/npm/win32-x64-msvc/README.md rename packages/{backend/native-utils => backend-rs}/npm/win32-x64-msvc/package.json (55%) rename packages/{backend/native-utils => backend-rs}/package.json (95%) rename packages/{backend/native-utils => backend-rs}/src/config/environment.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/config/mod.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/config/server.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/database/error.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/database/mod.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/lib.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/macros.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/mastodon_api.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/abuse_user_report.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/access_token.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/ad.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/announcement.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/announcement_read.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/antenna.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/app.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/attestation_challenge.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/auth_session.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/blocking.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/channel.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/channel_following.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/channel_note_pining.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/clip.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/clip_note.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/drive_file.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/drive_folder.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/emoji.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/follow_request.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/following.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/gallery_like.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/gallery_post.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/hashtag.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/instance.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/messaging_message.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/meta.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/migrations.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/mod.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/moderation_log.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/muted_note.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/muting.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/note.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/note_edit.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/note_favorite.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/note_reaction.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/note_thread_muting.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/note_unread.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/note_watching.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/notification.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/page.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/page_like.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/password_reset_request.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/poll.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/poll_vote.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/prelude.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/promo_note.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/promo_read.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/registration_ticket.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/registry_item.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/relay.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/renote_muting.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/reply_muting.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/sea_orm_active_enums.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/signin.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/sw_subscription.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/used_username.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_group.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_group_invitation.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_group_invite.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_group_joining.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_ip.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_keypair.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_list.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_list_joining.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_note_pining.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_pending.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_profile.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_publickey.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/user_security_key.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/entity/webhook.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/error.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/mod.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/repository.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/model/schema.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/acct.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/convert_host.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/convert_to_hidden_post.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/escape_sql.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/format_milliseconds.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/id.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/mod.rs (100%) rename packages/{backend/native-utils => backend-rs}/src/util/random.rs (100%) delete mode 100644 packages/backend/native-utils/npm/android-arm-eabi/README.md delete mode 100644 packages/backend/native-utils/npm/android-arm64/README.md delete mode 100644 packages/backend/native-utils/npm/darwin-arm64/README.md delete mode 100644 packages/backend/native-utils/npm/darwin-universal/README.md delete mode 100644 packages/backend/native-utils/npm/darwin-universal/package.json delete mode 100644 packages/backend/native-utils/npm/darwin-x64/README.md delete mode 100644 packages/backend/native-utils/npm/freebsd-x64/README.md delete mode 100644 packages/backend/native-utils/npm/linux-arm-gnueabihf/README.md delete mode 100644 packages/backend/native-utils/npm/linux-arm64-gnu/README.md delete mode 100644 packages/backend/native-utils/npm/linux-arm64-musl/README.md delete mode 100644 packages/backend/native-utils/npm/linux-x64-gnu/README.md delete mode 100644 packages/backend/native-utils/npm/linux-x64-musl/README.md delete mode 100644 packages/backend/native-utils/npm/win32-arm64-msvc/README.md delete mode 100644 packages/backend/native-utils/npm/win32-ia32-msvc/README.md delete mode 100644 packages/backend/native-utils/npm/win32-x64-msvc/README.md rename packages/backend/src/misc/{native-utils.ts => backend-rs.ts} (93%) diff --git a/.dockerignore b/.dockerignore index e47a2ba2..e2f885aa 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 b822ab66..bf4f13ab 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 00000000..e7cb3c73 --- /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 6bbcf1d2..210151bc 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 00000000..df06915d --- /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 654b8abf..10325bb5 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 00000000..fc4132cd --- /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 1e206c07..b25827a9 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 00000000..9126a631 --- /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 aa0b2a80..f2bc3411 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 00000000..970d094e --- /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 99e9387e..7b48c571 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 00000000..6a947c5e --- /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 f99a5f66..d704d16c 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 00000000..4344d648 --- /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 56b520ff..a0d6324e 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 00000000..a89398e5 --- /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 865a7710..7fcb8761 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 00000000..43335cfa --- /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 994eff12..be3721ea 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 00000000..c881bdd1 --- /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 33b259b1..7765eb32 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 6466db10..df056c51 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 10199cb8..00000000 --- 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 c32c2fe7..00000000 --- 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 87039022..00000000 --- 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 098bb359..00000000 --- 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 a46061d4..00000000 --- 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 0acf3633..00000000 --- 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 2b74996d..00000000 --- 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 2203036d..00000000 --- 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 ad3a9333..00000000 --- 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 df282532..00000000 --- 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 52eea85a..00000000 --- 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 6664b237..00000000 --- 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 7aec7e0a..00000000 --- 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 690de197..00000000 --- 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 e34a5ff1..00000000 --- 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 20058fae..0e51911d 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 75a6fa41..89b9761c 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 8094ef80..00df6bde 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 1f73e6b9..295e4048 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 c1689b9c..849cb452 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 737bbe48..cf3f4f08 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 8e8cd02e..7d915248 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 7c4bdd84..3ded952e 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 5b2ea3a0..c186fa2d 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 1d6513ee..7fc647ca 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 067f1558..d5016839 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 671d3afc..fd550338 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 a058f4d8..51026956 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 591b1d04..a56920ea 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 5453ca05..17396ea5 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 f4e61f07..a531eca6 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 fb5f5e80..4b4c39c4 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 3279c1c1..51b5b443 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 5be29aad..11d8ac56 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 62f3f255..e0eb74e6 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 5c6d641e..34edd03a 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 8e3160e5..5fdcb621 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 7b23e682..6ffaac4f 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 92889caa..d0ac7733 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 ec21abd2..481deb70 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 2d4f2415..e0444770 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 0d1111d8..2c191d17 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 0cfeacfb..dfea5152 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 33f43f13..8c1188a3 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 db3df9a3..243af11f 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 c78ef88a..04df4d41 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 c92c97aa..921b26b7 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 d48eaefa..5261d684 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 d8ea5872..8453004e 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 ac31acac..d99a4407 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 1b8c9b9b..19c5173d 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 35b98c52..69f9234e 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 4f0f87c8..125955f5 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 303b4318..9a8410bc 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 a673b6dc..610d0b73 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 2ada80d9..7857552e 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 2be618d1..312c3a6d 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 e8d2e9a1..be8bca85 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 9e2a343b..3f1d8ce9 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 0c56ab40..5960c126 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 a8913307..c0d11c3d 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 dfb6902d..b902b125 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 a5970d58..d82bd283 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 d9bd5f48..b6642461 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 14bfe74a..b08be4e2 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 0e6ad57d..a116eca3 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 eae8c833..b2a02ef2 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 810baed2..63b7176a 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 3381bdea..c02cff66 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 17c8d9d1..e7607c61 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 78243b3e..6b9e0f6f 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 43727e44..6939eb9c 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 fd5cd65e..9f11f765 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 aa2d0f73..50e286ad 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 a2d20e42..77b87fdb 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 7a6e28a7..d6719ab3 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, });