compilePipelinePlan
Αυτό το περιεχόμενο δεν είναι ακόμη διαθέσιμο στη γλώσσα σου.
compilePipelinePlan(
declaration):object
Defined in: packages/pipeline/src/services/pipeline-plan.ts:48
Compiles a pipeline declaration into its effective, ordered behaviors and merged
options, without resolving instances. Global before behaviors come first, then
the handler’s own, then global after ones; a handler entry for a global behavior
supplies options at the global position.
Parameters
Section titled “Parameters”declaration
Section titled “declaration”Returns
Section titled “Returns”object
behaviorTypes
Section titled “behaviorTypes”behaviorTypes:
Constructor<IPipelineBehavior<unknown,unknown>>[]
globalBehaviorIds
Section titled “globalBehaviorIds”globalBehaviorIds:
Set<BehaviorId>
globalOptions
Section titled “globalOptions”globalOptions:
Map<BehaviorId,Record<string,unknown>>
handlerBehaviorTypes
Section titled “handlerBehaviorTypes”handlerBehaviorTypes:
Constructor<IPipelineBehavior<unknown,unknown>>[] |undefined
handlerOptions
Section titled “handlerOptions”handlerOptions:
Map<BehaviorId,Record<string,unknown>> |undefined
hasPipeline
Section titled “hasPipeline”hasPipeline:
boolean
mergedOptions
Section titled “mergedOptions”mergedOptions:
Map<BehaviorId,Record<string,unknown>>
Throws
Section titled “Throws”Error when one behavior is both skipped and declared.
Example
Section titled “Example”const plan = compilePipelinePlan({ handlerName: 'getPrice', requestKind: 'query', handlerBehaviorTypes: [CacheBehavior], globalBehaviors: { before: [LoggingBehavior] },});plan.behaviorTypes; // [LoggingBehavior, CacheBehavior]