{"version":3,"file":"index.cjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\nimport { IPipeline } from '../pipelines/pipeline';\n\n/**\n * Category identifier for grouping performance metrics.\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\n */\nexport type PipelineCategoryName = string;\n\n/**\n * Built-in metric categories for classifying pipeline and middleware performance entries.\n *\n * - `module` — System module pipelines (initialize, config, update, render, sync phases).\n * - `runtime` — Runtime orchestration pipeline and its middleware.\n * - `system` — Individual system middleware within a module pipeline.\n */\nexport enum PipelineCategory {\n  module = 'module',\n  runtime = 'runtime',\n  system = 'system'\n}\n\n/**\n * Options for identifying and categorizing performance metrics on pipelines.\n */\nexport type PipelineOptions = {\n  /** Display name for the pipeline in performance metrics. */\n  pipelineName: string;\n  /** Category assigned to pipeline-level metric entries. */\n  pipelineCategory: PipelineCategoryName;\n  /** Category assigned to per-middleware metric entries within this pipeline. */\n  middlewareCategory: PipelineCategoryName;\n};\n\n/**\n * Creates pipeline instances for various contexts.\n * Abstracts pipeline creation to support different implementations.\n * Used by the system to instantiate pipelines without coupling to specific implementations.\n */\nexport interface IPipelineFactory {\n  /**\n   * Creates a new pipeline for the specified context type.\n   * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\n   * @param options - Optional performance metric options (name, category) for the pipeline.\n   * @returns A new pipeline instance ready for middleware registration.\n   */\n  createPipeline<TContext extends IPipelineContext>(options?: PipelineOptions): IPipeline<TContext>;\n}\n"],"mappings":";;;;;;;;;AAgBA,IAAY,mBAAL,yBAAA,kBAAA;CACL,iBAAA,YAAA;CACA,iBAAA,aAAA;CACA,iBAAA,YAAA;;AACF,EAAA,CAAA,CAAA"}