refactor: stop importing stuff from backend-rs/built

This commit is contained in:
naskya 2024-01-23 02:16:52 +09:00
parent 631a1d1d8e
commit f1e1f9e5b0
Signed by: naskya
GPG key ID: 712D413B3A9FED5C
61 changed files with 63 additions and 63 deletions

View file

@ -37,6 +37,7 @@
"argon2": "^0.31.2",
"aws-sdk": "2.1540.0",
"axios": "1.6.5",
"backend-rs": "workspace:*",
"bcryptjs": "2.4.3",
"blurhash": "2.0.5",
"bull": "4.12.2",
@ -82,7 +83,6 @@
"mime-types": "2.1.35",
"msgpackr": "1.10.1",
"multer": "1.4.5-lts.1",
"backend-rs": "link:backend-rs",
"nested-property": "4.0.0",
"node-fetch": "3.3.2",
"nodemailer": "6.9.8",

View file

@ -3,7 +3,7 @@ import {
readEnvironmentConfig,
getFullApAccount as getFullApAccountImpl,
isSelfHost as isSelfHostImpl,
} from "backend-rs/built/index.js";
} from "backend-rs";
export const serverConfig = readServerConfig();
export const envConfig = readEnvironmentConfig();

View file

@ -3,7 +3,7 @@ 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/backend-rs.js";
import { stringToAcct } from "backend-rs/built/index.js";
import { stringToAcct } from "backend-rs";
import type { Packed } from "@/misc/schema.js";
import { Cache } from "@/misc/cache.js";
import { getWordHardMute } from "@/misc/check-word-mute.js";

View file

@ -3,7 +3,7 @@ import {
nativeCreateId,
nativeInitIdGenerator,
nativeGetTimestamp,
} from "backend-rs/built/index.js";
} from "backend-rs";
const length = Math.min(Math.max(config.cuid?.length ?? 16, 16), 24);
const fingerprint = config.cuid?.fingerprint ?? "";

View file

@ -3,7 +3,7 @@ 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 "backend-rs/built/index.js";
import { toPunyOptional } from "backend-rs";
import { isSelfHost } from "@/misc/backend-rs.js";
import { decodeReaction } from "./reaction-lib.js";
import config from "@/config/index.js";

View file

@ -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 "backend-rs/built/index.js";
import { toPunyOptional } from "backend-rs";
import { IsNull } from "typeorm";
export function convertReactions(reactions: Record<string, number>) {

View file

@ -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 "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import { awaitAll } from "@/prelude/await-all.js";
import type { Packed } from "@/misc/schema.js";
import config from "@/config/index.js";

View file

@ -4,7 +4,7 @@ import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "native-utils/built/index.js";
import { getFullApAccount } from "backend-rs";
import { createTemp } from "@/misc/create-temp.js";
import { Users, Blockings } from "@/models/index.js";
import { MoreThan } from "typeorm";

View file

@ -4,7 +4,7 @@ import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "native-utils/built/index.js";
import { getFullApAccount } from "backend-rs";
import { createTemp } from "@/misc/create-temp.js";
import { Users, Followings, Mutings } from "@/models/index.js";
import { In, MoreThan, Not } from "typeorm";

View file

@ -4,7 +4,7 @@ import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "native-utils/built/index.js";
import { getFullApAccount } from "backend-rs";
import { createTemp } from "@/misc/create-temp.js";
import { Users, Mutings } from "@/models/index.js";
import { IsNull, MoreThan } from "typeorm";

View file

@ -4,7 +4,7 @@ import * as fs from "node:fs";
import { queueLogger } from "../../logger.js";
import { addFile } from "@/services/drive/add-file.js";
import { format as dateFormat } from "date-fns";
import { getFullApAccount } from "native-utils/built/index.js";
import { getFullApAccount } from "backend-rs";
import { createTemp } from "@/misc/create-temp.js";
import { Users, UserLists, UserListJoinings } from "@/models/index.js";
import { In } from "typeorm";

View file

@ -3,7 +3,7 @@ import type Bull from "bull";
import { queueLogger } from "../../logger.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, stringToAcct, toPuny } from "native-utils/built/index.js";
import { isSelfHost, stringToAcct, toPuny } from "backend-rs";
import { Users, DriveFiles } from "@/models/index.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import block from "@/services/blocking/create.js";

View file

@ -1,4 +1,4 @@
import { convertToHiddenPost } from "native-utils/built/index.js";
import { convertToHiddenPost } from "backend-rs";
import create from "@/services/note/create.js";
import { Users } from "@/models/index.js";
import type { DbUserImportMastoPostJobData } from "@/queue/types.js";

View file

@ -3,7 +3,7 @@ import follow from "@/services/following/create.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, stringToAcct, toPuny } from "native-utils/built/index.js";
import { isSelfHost, stringToAcct, toPuny } from "backend-rs";
import { Users, DriveFiles } from "@/models/index.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import { queueLogger } from "../../logger.js";

View file

@ -3,7 +3,7 @@ import type Bull from "bull";
import { queueLogger } from "../../logger.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, stringToAcct, toPuny } from "native-utils/built/index.js";
import { isSelfHost, stringToAcct, toPuny } from "backend-rs";
import { Users, DriveFiles, Mutings } from "@/models/index.js";
import type { DbUserImportJobData } from "@/queue/types.js";
import type { User } from "@/models/entities/user.js";

View file

@ -4,7 +4,7 @@ import { queueLogger } from "../../logger.js";
import { resolveUser } from "@/remote/resolve-user.js";
import { pushUserToUserList } from "@/services/user-list/push.js";
import { downloadTextFile } from "@/misc/download-text-file.js";
import { isSelfHost, stringToAcct, toPuny } from "native-utils/built/index.js";
import { isSelfHost, stringToAcct, toPuny } from "backend-rs";
import {
DriveFiles,
Users,

View file

@ -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 "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import { StatusError } from "@/misc/fetch.js";
import { shouldSkipInstance } from "@/misc/skipped-instances.js";
import type { DeliverJobData } from "@/queue/types.js";

View file

@ -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 "backend-rs/built/index.js";
import { toPuny, extractHost } from "backend-rs";
import { getApId } from "@/remote/activitypub/type.js";
import { fetchInstanceMetadata } from "@/services/fetch-instance-metadata.js";
import type { InboxJobData } from "../types.js";

View file

@ -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 "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import DbResolver from "@/remote/activitypub/db-resolver.js";
import { getApId } from "@/remote/activitypub/type.js";
import { shouldBlockInstance } from "@/misc/should-block-instance.js";

View file

@ -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 "backend-rs/built/index.js";
import { extractHost } from "backend-rs";
import { getApLock } from "@/misc/app-lock.js";
import { parseAudience } from "../../audience.js";
import { StatusError } from "@/misc/fetch.js";

View file

@ -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 "backend-rs/built/index.js";
import { extractHost } from "backend-rs";
import { StatusError } from "@/misc/fetch.js";
/**

View file

@ -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 "backend-rs/built/index.js";
import { extractHost } from "backend-rs";
import { shouldBlockInstance } from "@/misc/should-block-instance.js";
export async function performActivity(

View file

@ -1,7 +1,7 @@
import type { CacheableRemoteUser } from "@/models/entities/user.js";
import type { IRead } from "../type.js";
import { getApId } from "../type.js";
import { extractHost } from "backend-rs/built/index.js";
import { extractHost } from "backend-rs";
import { isSelfHost } from "@/misc/backend-rs.js";
import { MessagingMessages } from "@/models/index.js";
import { readUserMessagingMessage } from "@/server/api/common/read-messaging-message.js";

View file

@ -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 "backend-rs/built/index.js";
import { extractHost, toPuny } from "backend-rs";
import {
Emojis,
Polls,

View file

@ -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 "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import { UserProfile } from "@/models/entities/user-profile.js";
import { toArray } from "@/prelude/array.js";
import { fetchInstanceMetadata } from "@/services/fetch-instance-metadata.js";

View file

@ -3,7 +3,7 @@ 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 "backend-rs/built/index.js";
import { extractHost } from "backend-rs";
import { isSelfHost } from "@/misc/backend-rs.js";
import { signedGet } from "./request.js";
import type { IObject, ICollection, IOrderedCollection } from "./type.js";

View file

@ -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 "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import webFinger from "./webfinger.js";
import { createPerson, updatePerson } from "./activitypub/models/person.js";
import { remoteLogger } from "./logger.js";

View file

@ -1,3 +1,3 @@
import { genString } from "backend-rs/built/index.js";
import { genString } from "backend-rs";
export default () => genString(16);

View file

@ -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 "backend-rs/built/index.js";
import { toPunyOptional } from "backend-rs";
import { UserKeypair } from "@/models/entities/user-keypair.js";
import { UsedUsername } from "@/models/entities/used-username.js";
import { db } from "@/db/postgre.js";

View file

@ -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 "backend-rs/built/index.js";
import { sqlLikeEscape, toPuny } from "backend-rs";
export const meta = {
tags: ["admin", "emoji"],

View file

@ -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 "backend-rs/built/index.js";
//import { sqlLikeEscape } from "backend-rs";
import { ApiError } from "../../../error.js";
export const meta = {

View file

@ -1,6 +1,6 @@
import define from "@/server/api/define.js";
import { Instances } from "@/models/index.js";
import { toPuny } from "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import { fetchInstanceMetadata } from "@/services/fetch-instance-metadata.js";
export const meta = {

View file

@ -1,6 +1,6 @@
import define from "@/server/api/define.js";
import { Instances } from "@/models/index.js";
import { toPuny } from "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
export const meta = {
tags: ["admin"],

View file

@ -1,6 +1,6 @@
import { Users } from "@/models/index.js";
import define from "@/server/api/define.js";
import { sqlLikeEscape } from "backend-rs/built/index.js";
import { sqlLikeEscape } from "backend-rs";
export const meta = {
tags: ["admin"],

View file

@ -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 "backend-rs/built/index.js";
import { extractHost } from "backend-rs";
import { Users, Notes } from "@/models/index.js";
import type { Note } from "@/models/entities/note.js";
import type { CacheableLocalUser, User } from "@/models/entities/user.js";

View file

@ -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 "backend-rs/built/index.js";
import { genString } from "backend-rs";
export const meta = {
tags: ["app"],

View file

@ -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 "backend-rs/built/index.js";
import { genString } from "backend-rs";
export const meta = {
tags: ["auth"],

View file

@ -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 "backend-rs/built/index.js";
import { sqlLikeEscape } from "backend-rs";
export const meta = {
tags: ["channels"],

View file

@ -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 "backend-rs/built/index.js";
import { sqlLikeEscape } from "backend-rs";
export const meta = {
tags: ["federation"],

View file

@ -1,6 +1,6 @@
import define from "@/server/api/define.js";
import { Instances } from "@/models/index.js";
import { toPuny } from "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
export const meta = {
tags: ["federation"],

View file

@ -1,6 +1,6 @@
import define from "@/server/api/define.js";
import { Hashtags } from "@/models/index.js";
import { sqlLikeEscape } from "backend-rs/built/index.js";
import { sqlLikeEscape } from "backend-rs";
export const meta = {
tags: ["hashtags"],

View file

@ -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 "backend-rs/built/index.js";
import { safeForSql } from "backend-rs";
import { normalizeForSearch } from "@/misc/normalize-for-search.js";
/*

View file

@ -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 "backend-rs/built/index.js";
import { stringToAcct } from "backend-rs";
export const meta = {
tags: ["users"],

View file

@ -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 "backend-rs/built/index.js";
import { stringToAcct } from "backend-rs";
export const meta = {
tags: ["users"],

View file

@ -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 "backend-rs/built/index.js";
import { genString } from "backend-rs";
export const meta = {
tags: ["auth"],

View file

@ -1,6 +1,6 @@
import { Brackets } from "typeorm";
import { Notes } from "@/models/index.js";
import { safeForSql } from "backend-rs/built/index.js";
import { safeForSql } from "backend-rs";
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";

View file

@ -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 "backend-rs/built/index.js";
import { sqlLikeEscape } from "backend-rs";
export const meta = {
tags: ["notes"],

View file

@ -1,7 +1,7 @@
import { IsNull } from "typeorm";
import { Users } from "@/models/index.js";
import { fetchMeta } from "@/misc/fetch-meta.js";
import { stringToAcct } from "backend-rs/built/index.js";
import { stringToAcct } from "backend-rs";
import type { User } from "@/models/entities/user.js";
import define from "@/server/api/define.js";

View file

@ -1,6 +1,6 @@
import { IsNull } from "typeorm";
import { Users, Followings, UserProfiles } from "@/models/index.js";
import { toPunyOptional } from "backend-rs/built/index.js";
import { toPunyOptional } from "backend-rs";
import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js";

View file

@ -1,6 +1,6 @@
import { IsNull } from "typeorm";
import { Users, Followings, UserProfiles } from "@/models/index.js";
import { toPunyOptional } from "backend-rs/built/index.js";
import { toPunyOptional } from "backend-rs";
import define from "@/server/api/define.js";
import { ApiError } from "@/server/api/error.js";
import { makePaginationQuery } from "@/server/api/common/make-pagination-query.js";

View file

@ -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 "backend-rs/built/index.js";
import { sqlLikeEscape } from "backend-rs";
export const meta = {
tags: ["users"],

View file

@ -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 "backend-rs/built/index.js";
import { sqlLikeEscape } from "backend-rs";
export const meta = {
tags: ["users"],

View file

@ -23,7 +23,7 @@ import verifyEmail from "./private/verify-email.js";
import { koaBody } from "koa-body";
import { convertAttachment } from "./mastodon/converters.js";
import { convertId, IdConvertType as IdType } from "backend-rs/built/index.js";
import { convertId, IdConvertType as IdType } from "backend-rs";
// re-export native rust id conversion (function and enum)
export { IdType, convertId };

View file

@ -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 "backend-rs/built/index.js";
import { formatMilliseconds } from "backend-rs";
const logger = new Logger("limiter");

View file

@ -19,7 +19,7 @@ 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 "backend-rs/built/index.js";
import { stringToAcct } from "backend-rs";
import { envConfig } from "@/misc/backend-rs.js";
import megalodon, { MegalodonInterface } from "megalodon";
import activityPub from "./activitypub.js";

View file

@ -28,7 +28,7 @@ import {
Emojis,
GalleryPosts,
} from "@/models/index.js";
import { stringToAcct } from "backend-rs/built/index.js";
import { stringToAcct } from "backend-rs";
import { getNoteSummary } from "@/misc/get-note-summary.js";
import { queues } from "@/queue/queues.js";
import { genOpenapiSpec } from "../api/openapi/gen-spec.js";

View file

@ -1,8 +1,8 @@
import Router from "@koa/router";
import config from "@/config/index.js";
import { stringToAcct } from "backend-rs/built/index.js";
import type { Acct } from "backend-rs/built/index.js";
import { stringToAcct } from "backend-rs";
import type { Acct } from "backend-rs";
import { links } from "./nodeinfo.js";
import { escapeAttribute, escapeValue } from "@/prelude/xml.js";
import { Users } from "@/models/index.js";

View file

@ -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 "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import { Instances } from "@/models/index.js";
export async function createMessage(

View file

@ -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 "backend-rs/built/index.js";
import { toPuny } from "backend-rs";
import { Cache } from "@/misc/cache.js";
const cache = new Cache<Instance>("registerOrFetchInstanceDoc", 60 * 60);

View file

@ -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 "backend-rs/built/index.js";
// import { acctToString } from "backend-rs";
// TODO
//const locales = await import('../../../../locales/index.js');

View file

@ -118,8 +118,8 @@ importers:
specifier: 1.6.5
version: 1.6.5
backend-rs:
specifier: link:backend-rs
version: link:backend-rs
specifier: workspace:*
version: link:../backend-rs
bcryptjs:
specifier: 2.4.3
version: 2.4.3