From fe0bfe31b34bd4085050ca2d4060753025426d90 Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 12 Feb 2024 23:14:23 +0900 Subject: [PATCH] meta: backend/native-utils -> backend-rs --- .dockerignore | 2 +- Dockerfile | 26 ++++----- docs/notice-for-admins.md | 11 ++++ 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 | 54 +++++++++---------- .../native-utils => backend-rs}/Cargo.toml | 2 +- .../__test__/index.spec.mjs | 0 .../native-utils => backend-rs}/build.rs | 0 .../backend-rs/npm/android-arm-eabi/README.md | 3 ++ .../npm/android-arm-eabi/package.json | 8 +-- .../backend-rs/npm/android-arm64/README.md | 3 ++ .../npm/android-arm64/package.json | 8 +-- .../backend-rs/npm/darwin-arm64/README.md | 3 ++ .../npm/darwin-arm64/package.json | 8 +-- .../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 | 8 +-- packages/backend-rs/npm/freebsd-x64/README.md | 3 ++ .../npm/freebsd-x64/package.json | 8 +-- .../npm/linux-arm-gnueabihf/README.md | 3 ++ .../npm/linux-arm-gnueabihf/package.json | 8 +-- .../backend-rs/npm/linux-arm64-gnu/README.md | 3 ++ .../npm/linux-arm64-gnu/package.json | 8 +-- .../backend-rs/npm/linux-arm64-musl/README.md | 3 ++ .../npm/linux-arm64-musl/package.json | 8 +-- .../backend-rs/npm/linux-x64-gnu/README.md | 3 ++ .../npm/linux-x64-gnu/package.json | 8 +-- .../backend-rs/npm/linux-x64-musl/README.md | 3 ++ .../npm/linux-x64-musl/package.json | 8 +-- .../backend-rs/npm/win32-arm64-msvc/README.md | 3 ++ .../npm/win32-arm64-msvc/package.json | 8 +-- .../backend-rs/npm/win32-ia32-msvc/README.md | 3 ++ .../npm/win32-ia32-msvc/package.json | 8 +-- .../backend-rs/npm/win32-x64-msvc/README.md | 3 ++ .../npm/win32-x64-msvc/package.json | 8 +-- .../native-utils => backend-rs}/package.json | 4 +- .../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/antenna_note.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/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/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/misc/gen-id.ts | 2 +- packages/backend/src/misc/secure-rndstr.ts | 2 +- packages/backend/src/server/api/index.ts | 2 +- pnpm-lock.yaml | 8 +-- pnpm-workspace.yaml | 2 +- scripts/clean-cargo.mjs | 2 +- 146 files changed, 175 insertions(+), 164 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}/__test__/index.spec.mjs (100%) 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 (53%) 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 (56%) 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 (58%) 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 (58%) 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 (53%) 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 (54%) rename packages/{backend/native-utils => backend-rs}/package.json (96%) 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/antenna_note.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/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/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 diff --git a/.dockerignore b/.dockerignore index ad6ad169ae..ff9f883401 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 3eca9392f7..954644a0c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,12 +8,12 @@ RUN curl --proto '=https' --tlsv1.2 --silent --show-error --fail https://sh.rust ENV PATH="/root/.cargo/bin:${PATH}" # Copy only the cargo dependency-related files first, to cache efficiently -COPY packages/backend/native-utils/Cargo.toml packages/backend/native-utils/Cargo.toml -COPY packages/backend/native-utils/Cargo.lock packages/backend/native-utils/Cargo.lock -COPY packages/backend/native-utils/src/lib.rs packages/backend/native-utils/src/ +COPY packages/backend-rs/Cargo.toml packages/backend-rs/Cargo.toml +COPY packages/backend-rs/Cargo.lock packages/backend-rs/Cargo.lock +COPY packages/backend-rs/src/lib.rs packages/backend-rs/src/ # Install cargo dependencies -RUN cargo fetch --locked --manifest-path /firefish/packages/backend/native-utils/Cargo.toml +RUN cargo fetch --locked --manifest-path /firefish/packages/backend-rs/Cargo.toml # Copy only the dependency-related files first, to cache efficiently COPY package.json pnpm*.yaml ./ @@ -22,22 +22,22 @@ COPY packages/client/package.json packages/client/package.json COPY packages/sw/package.json packages/sw/package.json COPY packages/firefish-js/package.json packages/firefish-js/package.json COPY packages/megalodon/package.json packages/megalodon/package.json -COPY packages/backend/native-utils/package.json packages/backend/native-utils/package.json -COPY packages/backend/native-utils/npm/linux-x64-musl/package.json packages/backend/native-utils/npm/linux-x64-musl/package.json -COPY packages/backend/native-utils/npm/linux-arm64-musl/package.json packages/backend/native-utils/npm/linux-arm64-musl/package.json +COPY packages/backend-rs/package.json packages/backend-rs/package.json +COPY packages/backend-rs/npm/linux-x64-musl/package.json packages/backend-rs/npm/linux-x64-musl/package.json +COPY packages/backend-rs/npm/linux-arm64-musl/package.json packages/backend-rs/npm/linux-arm64-musl/package.json # Configure pnpm, and install dev mode dependencies for compilation RUN corepack enable && corepack prepare pnpm@latest --activate && pnpm i --frozen-lockfile -# Copy in the rest of the native-utils rust files -COPY packages/backend/native-utils packages/backend/native-utils/ +# Copy in the rest of the rust files +COPY packages/backend-rs packages/backend-rs/ -# Compile native-utils -RUN pnpm run --filter native-utils build +# Compile backend-rs +RUN pnpm run --filter backend-rs build # Copy in the rest of the files to compile COPY . ./ -RUN env NODE_ENV=production sh -c "pnpm run --filter '!native-utils' build && pnpm run gulp" +RUN env NODE_ENV=production sh -c "pnpm run --filter '!backend-rs' build && pnpm run gulp" # Trim down the dependencies to only those for production RUN pnpm i --prod --frozen-lockfile @@ -64,7 +64,7 @@ COPY --from=build /firefish/packages/firefish-js/node_modules /firefish/packages COPY --from=build /firefish/built /firefish/built COPY --from=build /firefish/packages/backend/built /firefish/packages/backend/built COPY --from=build /firefish/packages/backend/assets/instance.css /firefish/packages/backend/assets/instance.css -COPY --from=build /firefish/packages/backend/native-utils/built /firefish/packages/backend/native-utils/built +COPY --from=build /firefish/packages/backend-rs/built /firefish/packages/backend-rs/built RUN corepack enable && corepack prepare pnpm@latest --activate ENV NODE_ENV=production diff --git a/docs/notice-for-admins.md b/docs/notice-for-admins.md index 10b05eb702..ffe4066346 100644 --- a/docs/notice-for-admins.md +++ b/docs/notice-for-admins.md @@ -1,3 +1,14 @@ +# Unreleased + +## For systemd users + +- `packages/backend/native-utils` can be removed. + - This directory was removed in the repository, but it's not completely removed from your system by `git pull --ff`, because some folders like `packages/backend/native-utils/built` are not tracked by git. + + ```sh + rm --recursive --force packages/backend/native-utils + ``` + # v20240206 ## For all users diff --git a/packages/README.md b/packages/README.md index ea04817f06..724f793222 100644 --- a/packages/README.md +++ b/packages/README.md @@ -3,7 +3,7 @@ This directory contains all of the packages Firefish uses. - `backend`: Main backend code written in TypeScript for NodeJS -- `backend/native-utils`: Backend code written in Rust, bound to NodeJS by [NAPI-RS](https://napi.rs/) +- `backend-rs`: Backend code written in Rust, bound to NodeJS by [NAPI-RS](https://napi.rs/) - `client`: Web interface written in Vue3 and TypeScript - `sw`: Web [Service Worker](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API) written in TypeScript - `firefish-js`: TypeScript SDK for both backend and client, also published on [NPM](https://www.npmjs.com/package/firefish-js) for public use diff --git a/packages/backend/native-utils/.cargo/config.toml b/packages/backend-rs/.cargo/config.toml similarity index 100% rename from packages/backend/native-utils/.cargo/config.toml rename to packages/backend-rs/.cargo/config.toml diff --git a/packages/backend/native-utils/.editorconfig b/packages/backend-rs/.editorconfig similarity index 100% rename from packages/backend/native-utils/.editorconfig rename to packages/backend-rs/.editorconfig diff --git a/packages/backend/native-utils/.gitignore b/packages/backend-rs/.gitignore similarity index 100% rename from packages/backend/native-utils/.gitignore rename to packages/backend-rs/.gitignore diff --git a/packages/backend/native-utils/.npmignore b/packages/backend-rs/.npmignore similarity index 100% rename from packages/backend/native-utils/.npmignore rename to packages/backend-rs/.npmignore diff --git a/packages/backend/native-utils/Cargo.lock b/packages/backend-rs/Cargo.lock similarity index 99% rename from packages/backend/native-utils/Cargo.lock rename to packages/backend-rs/Cargo.lock index 3538aea2da..55c466d79c 100644 --- a/packages/backend/native-utils/Cargo.lock +++ b/packages/backend-rs/Cargo.lock @@ -196,6 +196,33 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "backend-rs" +version = "0.0.0" +dependencies = [ + "async-trait", + "basen", + "cfg-if", + "chrono", + "cuid2", + "derive_more", + "jsonschema", + "napi", + "napi-build", + "napi-derive", + "once_cell", + "parse-display", + "pretty_assertions", + "rand", + "schemars", + "sea-orm", + "serde", + "serde_json", + "thiserror", + "tokio", + "utoipa", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -1319,33 +1346,6 @@ dependencies = [ "libloading", ] -[[package]] -name = "native-utils" -version = "0.0.0" -dependencies = [ - "async-trait", - "basen", - "cfg-if", - "chrono", - "cuid2", - "derive_more", - "jsonschema", - "napi", - "napi-build", - "napi-derive", - "once_cell", - "parse-display", - "pretty_assertions", - "rand", - "schemars", - "sea-orm", - "serde", - "serde_json", - "thiserror", - "tokio", - "utoipa", -] - [[package]] name = "nix" version = "0.27.1" diff --git a/packages/backend/native-utils/Cargo.toml b/packages/backend-rs/Cargo.toml similarity index 97% rename from packages/backend/native-utils/Cargo.toml rename to packages/backend-rs/Cargo.toml index a85dba0148..8b9239d23d 100644 --- a/packages/backend/native-utils/Cargo.toml +++ b/packages/backend-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] edition = "2021" -name = "native-utils" +name = "backend-rs" version = "0.0.0" [features] diff --git a/packages/backend/native-utils/__test__/index.spec.mjs b/packages/backend-rs/__test__/index.spec.mjs similarity index 100% rename from packages/backend/native-utils/__test__/index.spec.mjs rename to packages/backend-rs/__test__/index.spec.mjs diff --git a/packages/backend/native-utils/build.rs b/packages/backend-rs/build.rs similarity index 100% rename from packages/backend/native-utils/build.rs rename to packages/backend-rs/build.rs diff --git a/packages/backend-rs/npm/android-arm-eabi/README.md b/packages/backend-rs/npm/android-arm-eabi/README.md new file mode 100644 index 0000000000..26e84675de --- /dev/null +++ b/packages/backend-rs/npm/android-arm-eabi/README.md @@ -0,0 +1,3 @@ +# `backend-rs-android-arm-eabi` + +This is the **armv7-linux-androideabi** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/android-arm-eabi/package.json b/packages/backend-rs/npm/android-arm-eabi/package.json similarity index 53% rename from packages/backend/native-utils/npm/android-arm-eabi/package.json rename to packages/backend-rs/npm/android-arm-eabi/package.json index b4404c410a..ca06ebf7f3 100644 --- a/packages/backend/native-utils/npm/android-arm-eabi/package.json +++ b/packages/backend-rs/npm/android-arm-eabi/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-android-arm-eabi", + "name": "backend-rs-android-arm-eabi", "version": "0.0.0", "os": [ "android" @@ -7,12 +7,12 @@ "cpu": [ "arm" ], - "main": "native-utils.android-arm-eabi.node", + "main": "backend-rs.android-arm-eabi.node", "files": [ - "native-utils.android-arm-eabi.node" + "backend-rs.android-arm-eabi.node" ], "license": "MIT", "engines": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/packages/backend-rs/npm/android-arm64/README.md b/packages/backend-rs/npm/android-arm64/README.md new file mode 100644 index 0000000000..f18da53ca3 --- /dev/null +++ b/packages/backend-rs/npm/android-arm64/README.md @@ -0,0 +1,3 @@ +# `backend-rs-android-arm64` + +This is the **aarch64-linux-android** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/android-arm64/package.json b/packages/backend-rs/npm/android-arm64/package.json similarity index 56% rename from packages/backend/native-utils/npm/android-arm64/package.json rename to packages/backend-rs/npm/android-arm64/package.json index 9050ef37bd..b37c2f5b7c 100644 --- a/packages/backend/native-utils/npm/android-arm64/package.json +++ b/packages/backend-rs/npm/android-arm64/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-android-arm64", + "name": "backend-rs-android-arm64", "version": "0.0.0", "os": [ "android" @@ -7,12 +7,12 @@ "cpu": [ "arm64" ], - "main": "native-utils.android-arm64.node", + "main": "backend-rs.android-arm64.node", "files": [ - "native-utils.android-arm64.node" + "backend-rs.android-arm64.node" ], "license": "MIT", "engines": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/packages/backend-rs/npm/darwin-arm64/README.md b/packages/backend-rs/npm/darwin-arm64/README.md new file mode 100644 index 0000000000..4c2bb5f7de --- /dev/null +++ b/packages/backend-rs/npm/darwin-arm64/README.md @@ -0,0 +1,3 @@ +# `backend-rs-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `backend-rs` diff --git a/packages/backend/native-utils/npm/darwin-arm64/package.json b/packages/backend-rs/npm/darwin-arm64/package.json similarity index 56% rename from packages/backend/native-utils/npm/darwin-arm64/package.json rename to packages/backend-rs/npm/darwin-arm64/package.json index a7fcef289f..2ed7ccd061 100644 --- a/packages/backend/native-utils/npm/darwin-arm64/package.json +++ b/packages/backend-rs/npm/darwin-arm64/package.json @@ -1,5 +1,5 @@ { - "name": "native-utils-darwin-arm64", + "name": "backend-rs-darwin-arm64", "version": "0.0.0", "os": [ "darwin" @@ -7,12 +7,12 @@ "cpu": [ "arm64" ], - "main": "native-utils.darwin-arm64.node", + "main": "backend-rs.darwin-arm64.node", "files": [ - "native-utils.darwin-arm64.node" + "backend-rs.darwin-arm64.node" ], "license": "MIT", "engines": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/packages/backend-rs/npm/darwin-universal/README.md b/packages/backend-rs/npm/darwin-universal/README.md new file mode 100644 index 0000000000..fe9e88d1e4 --- /dev/null +++ b/packages/backend-rs/npm/darwin-universal/README.md @@ -0,0 +1,3 @@ +# `backend-rs-darwin-universal` + +This is the **universal-apple-darwin** binary for `backend-rs` diff --git a/packages/backend-rs/npm/darwin-universal/package.json b/packages/backend-rs/npm/darwin-universal/package.json new file mode 100644 index 0000000000..125f60807a --- /dev/null +++ b/packages/backend-rs/npm/darwin-universal/package.json @@ -0,0 +1,15 @@ +{ + "name": "backend-rs-darwin-universal", + "version": "0.0.0", + "os": [ + "darwin" + ], + "main": "backend-rs.darwin-universal.node", + "files": [ + "backend-rs.darwin-universal.node" + ], + "license": "MIT", + "engines": { + "node": ">= 10" + } +} 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 0000000000..e7cb3c7341 --- /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 6bbcf1d232..6a90d0628e 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,12 +7,12 @@ "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": { "node": ">= 10" } -} \ No newline at end of file +} 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 0000000000..df06915dff --- /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 56% rename from packages/backend/native-utils/npm/freebsd-x64/package.json rename to packages/backend-rs/npm/freebsd-x64/package.json index 654b8abf38..2ba1244845 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,12 +7,12 @@ "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": { "node": ">= 10" } -} \ No newline at end of file +} 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 0000000000..fc4132cd0e --- /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 1e206c078d..6e878bc516 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,12 +7,12 @@ "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": { "node": ">= 10" } -} \ No newline at end of file +} 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 0000000000..9126a63170 --- /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 58% rename from packages/backend/native-utils/npm/linux-arm64-gnu/package.json rename to packages/backend-rs/npm/linux-arm64-gnu/package.json index aa0b2a805f..27b87ae1d4 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": { @@ -18,4 +18,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} 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 0000000000..970d094e46 --- /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 99e9387ee6..49f83fb046 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": { @@ -18,4 +18,4 @@ "libc": [ "musl" ] -} \ No newline at end of file +} 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 0000000000..6a947c5e7f --- /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 f99a5f664e..7ba56d5212 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": { @@ -18,4 +18,4 @@ "libc": [ "glibc" ] -} \ No newline at end of file +} 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 0000000000..4344d648ae --- /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 58% rename from packages/backend/native-utils/npm/linux-x64-musl/package.json rename to packages/backend-rs/npm/linux-x64-musl/package.json index 56b520fff4..fcfa783c83 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": { @@ -18,4 +18,4 @@ "libc": [ "musl" ] -} \ No newline at end of file +} 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 0000000000..a89398e514 --- /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 53% rename from packages/backend/native-utils/npm/win32-arm64-msvc/package.json rename to packages/backend-rs/npm/win32-arm64-msvc/package.json index 865a771052..1783c23b00 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,12 +7,12 @@ "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": { "node": ">= 10" } -} \ No newline at end of file +} 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 0000000000..43335cfad0 --- /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 994eff12fd..854de42b14 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,12 +7,12 @@ "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": { "node": ">= 10" } -} \ No newline at end of file +} 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 0000000000..c881bdd12d --- /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 54% rename from packages/backend/native-utils/npm/win32-x64-msvc/package.json rename to packages/backend-rs/npm/win32-x64-msvc/package.json index 33b259b132..eb01ab78ef 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,12 +7,12 @@ "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": { "node": ">= 10" } -} \ No newline at end of file +} diff --git a/packages/backend/native-utils/package.json b/packages/backend-rs/package.json similarity index 96% rename from packages/backend/native-utils/package.json rename to packages/backend-rs/package.json index 90274de685..29dfe030ae 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/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/antenna_note.rs b/packages/backend-rs/src/model/entity/antenna_note.rs similarity index 100% rename from packages/backend/native-utils/src/model/entity/antenna_note.rs rename to packages/backend-rs/src/model/entity/antenna_note.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/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/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 10199cb8ec..0000000000 --- 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 c32c2fe710..0000000000 --- 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 8703902223..0000000000 --- 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 098bb35906..0000000000 --- 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 a46061d421..0000000000 --- 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 0acf363352..0000000000 --- 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 2b74996de7..0000000000 --- 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 2203036de0..0000000000 --- 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 ad3a9333f5..0000000000 --- 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 df282532ff..0000000000 --- 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 52eea85aab..0000000000 --- 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 6664b23783..0000000000 --- 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 7aec7e0a55..0000000000 --- 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 690de1975d..0000000000 --- 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 e34a5ff172..0000000000 --- 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 944f608427..d8e09724fc 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -42,6 +42,7 @@ "argon2": "^0.31.2", "aws-sdk": "2.1555.0", "axios": "^1.6.7", + "backend-rs": "workspace:*", "bcryptjs": "2.4.3", "blurhash": "2.0.5", "bull": "4.12.2", @@ -88,7 +89,6 @@ "mime-types": "2.1.35", "msgpackr": "^1.10.1", "multer": "1.4.5-lts.1", - "native-utils": "link:native-utils", "nested-property": "4.0.0", "node-fetch": "3.3.2", "nodemailer": "6.9.9", diff --git a/packages/backend/src/misc/gen-id.ts b/packages/backend/src/misc/gen-id.ts index 737bbe488f..cf3f4f080f 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/secure-rndstr.ts b/packages/backend/src/misc/secure-rndstr.ts index 3d69a4d4a5..7c1505b7a3 100644 --- a/packages/backend/src/misc/secure-rndstr.ts +++ b/packages/backend/src/misc/secure-rndstr.ts @@ -1,4 +1,4 @@ -import { nativeRandomStr } from "native-utils/built/index.js"; +import { nativeRandomStr } from "backend-rs/built/index.js"; export function secureRndstr(length = 32, _ = true): string { return nativeRandomStr(length); diff --git a/packages/backend/src/server/api/index.ts b/packages/backend/src/server/api/index.ts index a5970d5843..b23813721a 100644 --- a/packages/backend/src/server/api/index.ts +++ b/packages/backend/src/server/api/index.ts @@ -27,7 +27,7 @@ import { convertAttachment } from "./mastodon/converters.js"; import { convertId, IdConvertType as IdType, -} from "native-utils/built/index.js"; +} from "backend-rs/built/index.js"; // re-export native rust id conversion (function and enum) export { IdType, convertId }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 913bc9b381..8ffa1d6d69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -150,6 +150,9 @@ importers: axios: specifier: ^1.6.7 version: 1.6.7 + backend-rs: + specifier: workspace:* + version: link:../backend-rs bcryptjs: specifier: 2.4.3 version: 2.4.3 @@ -288,9 +291,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 @@ -606,7 +606,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 fd5cd65e6d..9f11f7654c 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-cargo.mjs b/scripts/clean-cargo.mjs index cb567dc1ee..df48e5fd55 100644 --- a/scripts/clean-cargo.mjs +++ b/scripts/clean-cargo.mjs @@ -6,7 +6,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", }); })();