UNPKG

@nestjsvn/swagger-sse

Version:

OpenAPI documentation and interactive Swagger UI for NestJS Server-Sent Events endpoints

47 lines (46 loc) 2.19 kB
/** * Plugin module exports * * This module provides the TypeScript CLI transformer for automatic * SSE endpoint detection and documentation generation. */ import * as ts from 'typescript'; import { SsePluginOptions } from './transformer'; export { sseTransformer } from './transformer'; export type { SsePluginOptions } from './transformer'; export { hasSseDecorator, hasApiSseDecorator, isDecoratorNamed, extractEventTypes, analyzeObservableType, typeNameToEventName, addApiSseDecorator, } from './ast-utils'; /** * NestJS CLI Plugin Integration - Before hook * * This function is called by the NestJS CLI before TypeScript compilation. * It provides SSE transformer functionality for the before lifecycle. */ export declare function before(options?: SsePluginOptions, program?: ts.Program): ts.TransformerFactory<ts.SourceFile>; /** * NestJS CLI Plugin Integration - After hook * * This function is called by the NestJS CLI after TypeScript compilation. * Currently delegates to the before transformer. */ export declare function after(options?: SsePluginOptions, program?: ts.Program): ts.TransformerFactory<ts.SourceFile>; /** * NestJS CLI Plugin Integration - After declarations hook * * This function is called by the NestJS CLI after declaration files are generated. * Currently delegates to the before transformer. */ export declare function afterDeclarations(options?: SsePluginOptions, program?: ts.Program): ts.TransformerFactory<ts.SourceFile>; /** * Legacy function factory for backward compatibility */ export default function nestjsCliPlugin(pluginOptions?: SsePluginOptions): { before: (options: unknown, program: ts.Program) => ts.TransformerFactory<ts.SourceFile>; after: (options: unknown, program: ts.Program) => ts.TransformerFactory<ts.SourceFile>; afterDeclarations: (options: unknown, program: ts.Program) => ts.TransformerFactory<ts.SourceFile>; }; /** * TypeScript Compiler Plugin Integration * * This function provides integration with the TypeScript compiler plugin system. */ export declare function createTransformerFactory(pluginOptions?: SsePluginOptions): (program: ts.Program) => ts.TransformerFactory<ts.SourceFile>;