refactor(blog): binders take BindContext arg
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import type { SanitizedConfig } from "payload";
|
||||
import {
|
||||
withSpan,
|
||||
withCapture,
|
||||
@@ -6,9 +5,7 @@ import {
|
||||
type ITracer,
|
||||
type ILogger,
|
||||
} from "@repo/core-shared/instrumentation";
|
||||
import type { IEventBus } from "@repo/core-events";
|
||||
import type { IRealtimeBroadcaster, IRealtimeHandlerRegistry } from "@repo/core-realtime";
|
||||
import type { IJobQueue } from "@repo/core-shared/jobs";
|
||||
import type { BindProductionContext } from "@repo/core-shared/di";
|
||||
import { blogContainer } from "./container";
|
||||
import { BLOG_SYMBOLS } from "./symbols";
|
||||
import { ArticlesRepository } from "../infrastructure/repositories/articles.repository";
|
||||
@@ -19,15 +16,9 @@ import { getArticlesController } from "../interface-adapters/controllers/get-art
|
||||
import { getArticleBySlugController } from "../interface-adapters/controllers/get-article-by-slug.controller";
|
||||
import { createArticleController } from "../interface-adapters/controllers/create-article.controller";
|
||||
|
||||
export function bindProductionBlog(
|
||||
config: SanitizedConfig,
|
||||
tracer: ITracer,
|
||||
logger: ILogger,
|
||||
bus: IEventBus,
|
||||
queue: IJobQueue,
|
||||
realtime: IRealtimeBroadcaster,
|
||||
realtimeRegistry: IRealtimeHandlerRegistry,
|
||||
): void {
|
||||
export function bindProductionBlog(ctx: BindProductionContext): void {
|
||||
const { config, tracer, logger, bus, queue, realtime, realtimeRegistry } = ctx;
|
||||
|
||||
// Bind shared instrumentation into feature container
|
||||
if (blogContainer.isBound(INSTRUMENTATION_SYMBOLS.TRACER)) {
|
||||
blogContainer.unbind(INSTRUMENTATION_SYMBOLS.TRACER);
|
||||
|
||||
Reference in New Issue
Block a user