mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
rename MastodonConverters.ts to matching naming scheme
This commit is contained in:
parent
4754942301
commit
a81a00e94d
10 changed files with 18 additions and 18 deletions
|
@ -35,7 +35,7 @@ import { SignupApiService } from './api/SignupApiService.js';
|
||||||
import { StreamingApiServerService } from './api/StreamingApiServerService.js';
|
import { StreamingApiServerService } from './api/StreamingApiServerService.js';
|
||||||
import { OpenApiServerService } from './api/openapi/OpenApiServerService.js';
|
import { OpenApiServerService } from './api/openapi/OpenApiServerService.js';
|
||||||
import { ClientServerService } from './web/ClientServerService.js';
|
import { ClientServerService } from './web/ClientServerService.js';
|
||||||
import { MastoConverters } from './api/mastodon/converters.js';
|
import { MastodonConverters } from './api/mastodon/MastodonConverters.js';
|
||||||
import { MastodonLogger } from './api/mastodon/MastodonLogger.js';
|
import { MastodonLogger } from './api/mastodon/MastodonLogger.js';
|
||||||
import { MastodonDataService } from './api/mastodon/MastodonDataService.js';
|
import { MastodonDataService } from './api/mastodon/MastodonDataService.js';
|
||||||
import { FeedService } from './web/FeedService.js';
|
import { FeedService } from './web/FeedService.js';
|
||||||
|
@ -113,7 +113,7 @@ import { SigninWithPasskeyApiService } from './api/SigninWithPasskeyApiService.j
|
||||||
OpenApiServerService,
|
OpenApiServerService,
|
||||||
MastodonApiServerService,
|
MastodonApiServerService,
|
||||||
OAuth2ProviderService,
|
OAuth2ProviderService,
|
||||||
MastoConverters,
|
MastodonConverters,
|
||||||
MastodonLogger,
|
MastodonLogger,
|
||||||
MastodonDataService,
|
MastodonDataService,
|
||||||
MastodonClientService,
|
MastodonClientService,
|
||||||
|
|
|
@ -21,7 +21,7 @@ import { ApiTimelineMastodon } from '@/server/api/mastodon/endpoints/timeline.js
|
||||||
import { ApiSearchMastodon } from '@/server/api/mastodon/endpoints/search.js';
|
import { ApiSearchMastodon } from '@/server/api/mastodon/endpoints/search.js';
|
||||||
import { ApiError } from '@/server/api/error.js';
|
import { ApiError } from '@/server/api/error.js';
|
||||||
import { parseTimelineArgs, TimelineArgs, toBoolean } from './argsUtils.js';
|
import { parseTimelineArgs, TimelineArgs, toBoolean } from './argsUtils.js';
|
||||||
import { convertAnnouncement, convertAttachment, MastoConverters, convertRelationship } from './converters.js';
|
import { convertAnnouncement, convertAttachment, MastodonConverters, convertRelationship } from './MastodonConverters.js';
|
||||||
import type { Entity } from 'megalodon';
|
import type { Entity } from 'megalodon';
|
||||||
import type { FastifyInstance, FastifyPluginOptions } from 'fastify';
|
import type { FastifyInstance, FastifyPluginOptions } from 'fastify';
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ export class MastodonApiServerService {
|
||||||
@Inject(DI.config)
|
@Inject(DI.config)
|
||||||
private readonly config: Config,
|
private readonly config: Config,
|
||||||
|
|
||||||
private readonly mastoConverters: MastoConverters,
|
private readonly mastoConverters: MastodonConverters,
|
||||||
private readonly logger: MastodonLogger,
|
private readonly logger: MastodonLogger,
|
||||||
private readonly clientService: MastodonClientService,
|
private readonly clientService: MastodonClientService,
|
||||||
private readonly apiAccountMastodon: ApiAccountMastodon,
|
private readonly apiAccountMastodon: ApiAccountMastodon,
|
||||||
|
|
|
@ -47,7 +47,7 @@ export const escapeMFM = (text: string): string => text
|
||||||
.replace(/\r?\n/g, '<br>');
|
.replace(/\r?\n/g, '<br>');
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MastoConverters {
|
export class MastodonConverters {
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.config)
|
@Inject(DI.config)
|
||||||
private readonly config: Config,
|
private readonly config: Config,
|
|
@ -10,7 +10,7 @@ import { DriveService } from '@/core/DriveService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import type { AccessTokensRepository, UserProfilesRepository } from '@/models/_.js';
|
import type { AccessTokensRepository, UserProfilesRepository } from '@/models/_.js';
|
||||||
import { attachMinMaxPagination } from '@/server/api/mastodon/pagination.js';
|
import { attachMinMaxPagination } from '@/server/api/mastodon/pagination.js';
|
||||||
import { MastoConverters, convertRelationship, convertFeaturedTag, convertList } from '../converters.js';
|
import { MastodonConverters, convertRelationship, convertFeaturedTag, convertList } from '../MastodonConverters.js';
|
||||||
import type multer from 'fastify-multer';
|
import type multer from 'fastify-multer';
|
||||||
import type { FastifyInstance } from 'fastify';
|
import type { FastifyInstance } from 'fastify';
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ export class ApiAccountMastodon {
|
||||||
private readonly accessTokensRepository: AccessTokensRepository,
|
private readonly accessTokensRepository: AccessTokensRepository,
|
||||||
|
|
||||||
private readonly clientService: MastodonClientService,
|
private readonly clientService: MastodonClientService,
|
||||||
private readonly mastoConverters: MastoConverters,
|
private readonly mastoConverters: MastodonConverters,
|
||||||
private readonly driveService: DriveService,
|
private readonly driveService: DriveService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { toBoolean } from '@/server/api/mastodon/argsUtils.js';
|
import { toBoolean } from '@/server/api/mastodon/argsUtils.js';
|
||||||
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
||||||
import { convertFilter } from '../converters.js';
|
import { convertFilter } from '../MastodonConverters.js';
|
||||||
import type { FastifyInstance } from 'fastify';
|
import type { FastifyInstance } from 'fastify';
|
||||||
import type multer from 'fastify-multer';
|
import type multer from 'fastify-multer';
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
|
||||||
import type { Config } from '@/config.js';
|
import type { Config } from '@/config.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import type { MiMeta, UsersRepository } from '@/models/_.js';
|
import type { MiMeta, UsersRepository } from '@/models/_.js';
|
||||||
import { MastoConverters } from '@/server/api/mastodon/converters.js';
|
import { MastodonConverters } from '@/server/api/mastodon/MastodonConverters.js';
|
||||||
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
||||||
import { RoleService } from '@/core/RoleService.js';
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
import type { FastifyInstance } from 'fastify';
|
import type { FastifyInstance } from 'fastify';
|
||||||
|
@ -27,7 +27,7 @@ export class ApiInstanceMastodon {
|
||||||
@Inject(DI.config)
|
@Inject(DI.config)
|
||||||
private readonly config: Config,
|
private readonly config: Config,
|
||||||
|
|
||||||
private readonly mastoConverters: MastoConverters,
|
private readonly mastoConverters: MastodonConverters,
|
||||||
private readonly clientService: MastodonClientService,
|
private readonly clientService: MastodonClientService,
|
||||||
private readonly roleService: RoleService,
|
private readonly roleService: RoleService,
|
||||||
) {}
|
) {}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { parseTimelineArgs, TimelineArgs } from '@/server/api/mastodon/argsUtils.js';
|
import { parseTimelineArgs, TimelineArgs } from '@/server/api/mastodon/argsUtils.js';
|
||||||
import { MastoConverters } from '@/server/api/mastodon/converters.js';
|
import { MastodonConverters } from '@/server/api/mastodon/MastodonConverters.js';
|
||||||
import { attachMinMaxPagination } from '@/server/api/mastodon/pagination.js';
|
import { attachMinMaxPagination } from '@/server/api/mastodon/pagination.js';
|
||||||
import { MastodonClientService } from '../MastodonClientService.js';
|
import { MastodonClientService } from '../MastodonClientService.js';
|
||||||
import type { FastifyInstance } from 'fastify';
|
import type { FastifyInstance } from 'fastify';
|
||||||
|
@ -21,7 +21,7 @@ interface ApiNotifyMastodonRoute {
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ApiNotificationsMastodon {
|
export class ApiNotificationsMastodon {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly mastoConverters: MastoConverters,
|
private readonly mastoConverters: MastodonConverters,
|
||||||
private readonly clientService: MastodonClientService,
|
private readonly clientService: MastodonClientService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
||||||
import { attachMinMaxPagination, attachOffsetPagination } from '@/server/api/mastodon/pagination.js';
|
import { attachMinMaxPagination, attachOffsetPagination } from '@/server/api/mastodon/pagination.js';
|
||||||
import { MastoConverters } from '../converters.js';
|
import { MastodonConverters } from '../MastodonConverters.js';
|
||||||
import { parseTimelineArgs, TimelineArgs, toBoolean, toInt } from '../argsUtils.js';
|
import { parseTimelineArgs, TimelineArgs, toBoolean, toInt } from '../argsUtils.js';
|
||||||
import Account = Entity.Account;
|
import Account = Entity.Account;
|
||||||
import Status = Entity.Status;
|
import Status = Entity.Status;
|
||||||
|
@ -23,7 +23,7 @@ interface ApiSearchMastodonRoute {
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ApiSearchMastodon {
|
export class ApiSearchMastodon {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly mastoConverters: MastoConverters,
|
private readonly mastoConverters: MastodonConverters,
|
||||||
private readonly clientService: MastodonClientService,
|
private readonly clientService: MastodonClientService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Injectable } from '@nestjs/common';
|
||||||
import { emojiRegexAtStartToEnd } from '@/misc/emoji-regex.js';
|
import { emojiRegexAtStartToEnd } from '@/misc/emoji-regex.js';
|
||||||
import { parseTimelineArgs, TimelineArgs, toBoolean, toInt } from '@/server/api/mastodon/argsUtils.js';
|
import { parseTimelineArgs, TimelineArgs, toBoolean, toInt } from '@/server/api/mastodon/argsUtils.js';
|
||||||
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
||||||
import { convertAttachment, convertPoll, MastoConverters } from '../converters.js';
|
import { convertAttachment, convertPoll, MastodonConverters } from '../MastodonConverters.js';
|
||||||
import type { Entity } from 'megalodon';
|
import type { Entity } from 'megalodon';
|
||||||
import type { FastifyInstance } from 'fastify';
|
import type { FastifyInstance } from 'fastify';
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ function normalizeQuery(data: Record<string, unknown>) {
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ApiStatusMastodon {
|
export class ApiStatusMastodon {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly mastoConverters: MastoConverters,
|
private readonly mastoConverters: MastodonConverters,
|
||||||
private readonly clientService: MastodonClientService,
|
private readonly clientService: MastodonClientService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable } from '@nestjs/common';
|
||||||
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.js';
|
||||||
import { attachMinMaxPagination } from '@/server/api/mastodon/pagination.js';
|
import { attachMinMaxPagination } from '@/server/api/mastodon/pagination.js';
|
||||||
import { convertList, MastoConverters } from '../converters.js';
|
import { convertList, MastodonConverters } from '../MastodonConverters.js';
|
||||||
import { parseTimelineArgs, TimelineArgs, toBoolean } from '../argsUtils.js';
|
import { parseTimelineArgs, TimelineArgs, toBoolean } from '../argsUtils.js';
|
||||||
import type { Entity } from 'megalodon';
|
import type { Entity } from 'megalodon';
|
||||||
import type { FastifyInstance } from 'fastify';
|
import type { FastifyInstance } from 'fastify';
|
||||||
|
@ -15,7 +15,7 @@ import type { FastifyInstance } from 'fastify';
|
||||||
export class ApiTimelineMastodon {
|
export class ApiTimelineMastodon {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly clientService: MastodonClientService,
|
private readonly clientService: MastodonClientService,
|
||||||
private readonly mastoConverters: MastoConverters,
|
private readonly mastoConverters: MastodonConverters,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public register(fastify: FastifyInstance): void {
|
public register(fastify: FastifyInstance): void {
|
||||||
|
|
Loading…
Add table
Reference in a new issue