refactor: stop importing stuff from backend-rs/built
This commit is contained in:
parent
631a1d1d8e
commit
f1e1f9e5b0
61 changed files with 63 additions and 63 deletions
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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 ?? "";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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>) {
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
||||
/**
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { genString } from "backend-rs/built/index.js";
|
||||
import { genString } from "backend-rs";
|
||||
|
||||
export default () => genString(16);
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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";
|
||||
|
||||
/*
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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"],
|
||||
|
|
|
@ -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 };
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue