Self-hosted multi-platform broadcast newsroom for activist collectives: publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style column wall with hostile-content-safe rendering, live control room with Auto Director, bridged chat governance with polls and quorum, distributed sandboxed transcode workers, encrypted content-addressed archive, monthly analytics. MIT licensed. See README.md and docs/.
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
/**
|
|
* Intake module wiring: production providers bind the process-wide egress
|
|
* client, the S3 storage service and the real Redis lease surface.
|
|
*
|
|
* The egress package is ESM-only while the API emits CommonJS, so the client
|
|
* is constructed through the native-import binding in intake-egress.ts (same
|
|
* pattern as live-monitor/poller/egress.ts) inside a factory — the DI token
|
|
* carries the already-loaded surface.
|
|
*/
|
|
import { Module } from "@nestjs/common";
|
|
import { IntakeController } from "./intake.controller.js";
|
|
import { INTAKE_DEPENDENCIES, IntakeService } from "./intake.service.js";
|
|
import { intakeEgress } from "./intake-egress.js";
|
|
import { S3Storage, s3ConfigFromEnv } from "../storage/storage.js";
|
|
import { RespControlRedis } from "../media-control/redis.js";
|
|
|
|
@Module({
|
|
controllers: [IntakeController],
|
|
providers: [
|
|
IntakeService,
|
|
{
|
|
provide: INTAKE_DEPENDENCIES,
|
|
useFactory: async () => ({
|
|
egress: await intakeEgress(),
|
|
storage: new S3Storage(s3ConfigFromEnv()),
|
|
redis: new RespControlRedis(process.env.REDIS_URL ?? "redis://127.0.0.1:6379"),
|
|
random: Math.random,
|
|
now: () => new Date(),
|
|
sweepMs: 15_000,
|
|
}),
|
|
},
|
|
],
|
|
exports: [IntakeService],
|
|
})
|
|
export class IntakeModule {}
|