rename MastodonConverters.ts to matching naming scheme

This commit is contained in:
Hazelnoot 2025-03-24 11:03:20 -04:00
parent 4754942301
commit a81a00e94d
10 changed files with 18 additions and 18 deletions

View file

@ -35,7 +35,7 @@ import { SignupApiService } from './api/SignupApiService.js';
import { StreamingApiServerService } from './api/StreamingApiServerService.js';
import { OpenApiServerService } from './api/openapi/OpenApiServerService.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 { MastodonDataService } from './api/mastodon/MastodonDataService.js';
import { FeedService } from './web/FeedService.js';
@ -113,7 +113,7 @@ import { SigninWithPasskeyApiService } from './api/SigninWithPasskeyApiService.j
OpenApiServerService,
MastodonApiServerService,
OAuth2ProviderService,
MastoConverters,
MastodonConverters,
MastodonLogger,
MastodonDataService,
MastodonClientService,

View file

@ -21,7 +21,7 @@ import { ApiTimelineMastodon } from '@/server/api/mastodon/endpoints/timeline.js
import { ApiSearchMastodon } from '@/server/api/mastodon/endpoints/search.js';
import { ApiError } from '@/server/api/error.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 { FastifyInstance, FastifyPluginOptions } from 'fastify';
@ -31,7 +31,7 @@ export class MastodonApiServerService {
@Inject(DI.config)
private readonly config: Config,
private readonly mastoConverters: MastoConverters,
private readonly mastoConverters: MastodonConverters,
private readonly logger: MastodonLogger,
private readonly clientService: MastodonClientService,
private readonly apiAccountMastodon: ApiAccountMastodon,

View file

@ -47,7 +47,7 @@ export const escapeMFM = (text: string): string => text
.replace(/\r?\n/g, '<br>');
@Injectable()
export class MastoConverters {
export class MastodonConverters {
constructor(
@Inject(DI.config)
private readonly config: Config,

View file

@ -10,7 +10,7 @@ import { DriveService } from '@/core/DriveService.js';
import { DI } from '@/di-symbols.js';
import type { AccessTokensRepository, UserProfilesRepository } from '@/models/_.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 { FastifyInstance } from 'fastify';
@ -30,7 +30,7 @@ export class ApiAccountMastodon {
private readonly accessTokensRepository: AccessTokensRepository,
private readonly clientService: MastodonClientService,
private readonly mastoConverters: MastoConverters,
private readonly mastoConverters: MastodonConverters,
private readonly driveService: DriveService,
) {}

View file

@ -6,7 +6,7 @@
import { Injectable } from '@nestjs/common';
import { toBoolean } from '@/server/api/mastodon/argsUtils.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 multer from 'fastify-multer';

View file

@ -9,7 +9,7 @@ import { FILE_TYPE_BROWSERSAFE } from '@/const.js';
import type { Config } from '@/config.js';
import { DI } from '@/di-symbols.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 { RoleService } from '@/core/RoleService.js';
import type { FastifyInstance } from 'fastify';
@ -27,7 +27,7 @@ export class ApiInstanceMastodon {
@Inject(DI.config)
private readonly config: Config,
private readonly mastoConverters: MastoConverters,
private readonly mastoConverters: MastodonConverters,
private readonly clientService: MastodonClientService,
private readonly roleService: RoleService,
) {}

View file

@ -5,7 +5,7 @@
import { Injectable } from '@nestjs/common';
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 { MastodonClientService } from '../MastodonClientService.js';
import type { FastifyInstance } from 'fastify';
@ -21,7 +21,7 @@ interface ApiNotifyMastodonRoute {
@Injectable()
export class ApiNotificationsMastodon {
constructor(
private readonly mastoConverters: MastoConverters,
private readonly mastoConverters: MastodonConverters,
private readonly clientService: MastodonClientService,
) {}

View file

@ -6,7 +6,7 @@
import { Injectable } from '@nestjs/common';
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.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 Account = Entity.Account;
import Status = Entity.Status;
@ -23,7 +23,7 @@ interface ApiSearchMastodonRoute {
@Injectable()
export class ApiSearchMastodon {
constructor(
private readonly mastoConverters: MastoConverters,
private readonly mastoConverters: MastodonConverters,
private readonly clientService: MastodonClientService,
) {}

View file

@ -8,7 +8,7 @@ import { Injectable } from '@nestjs/common';
import { emojiRegexAtStartToEnd } from '@/misc/emoji-regex.js';
import { parseTimelineArgs, TimelineArgs, toBoolean, toInt } from '@/server/api/mastodon/argsUtils.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 { FastifyInstance } from 'fastify';
@ -20,7 +20,7 @@ function normalizeQuery(data: Record<string, unknown>) {
@Injectable()
export class ApiStatusMastodon {
constructor(
private readonly mastoConverters: MastoConverters,
private readonly mastoConverters: MastodonConverters,
private readonly clientService: MastodonClientService,
) {}

View file

@ -6,7 +6,7 @@
import { Injectable } from '@nestjs/common';
import { MastodonClientService } from '@/server/api/mastodon/MastodonClientService.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 type { Entity } from 'megalodon';
import type { FastifyInstance } from 'fastify';
@ -15,7 +15,7 @@ import type { FastifyInstance } from 'fastify';
export class ApiTimelineMastodon {
constructor(
private readonly clientService: MastodonClientService,
private readonly mastoConverters: MastoConverters,
private readonly mastoConverters: MastodonConverters,
) {}
public register(fastify: FastifyInstance): void {