@bluelibs/runner - v6.3.1
    Preparing search index...

      @bluelibs/runner - v6.3.1

      BlueLibs Runner

      A TypeScript-first dependency injection framework that combines functional programming with enterprise features. No decorators, no magic - just explicit, testable code.

      import { r, run } from "@bluelibs/runner";

      // Define a task (a function with superpowers)
      const greet = r.task("greet")
      .run(async (name: string) => `Hello, ${name}!`)
      .build();

      // Create and run your app
      const app = r.resource("app").register([greet]).build();
      const { runTask } = await run(app);

      console.log(await runTask(greet, "World")); // "Hello, World!"
      • Tasks: Functions with dependency injection, middleware, and validation
      • Resources: Singleton services with lifecycle management (init/dispose)
      • Events: Type-safe messages for decoupled communication
      • Hooks: Lightweight event handlers
      • Middleware: Cross-cutting concerns (auth, logging, caching)

      Namespaces

      definitions
      errors
      Match

      Enumerations

      CircuitBreakerState
      CronOnError
      HookDependencyState
      ResourceLifecycleMode
      RunnerMode
      SymbolPolicyErrorMessage

      Classes

      EventManager
      LifecycleAdmissionController
      LockableMap
      Logger
      LogPrinter
      MiddlewareManager
      PlatformAdapter
      Queue
      RunnerError
      RunResult
      RuntimeTimers
      Semaphore
      Serializer
      Store
      TaskRunner

      Interfaces

      AsyncContextFluentBuilder
      CacheResourceConfig
      CheckSchemaLike
      CircuitBreakerMiddlewareConfig
      CircuitBreakerOpenError
      CircuitBreakerStatus
      ConcurrencyMiddlewareConfig
      ConcurrencyState
      CronResourceConfig
      CronResourceValue
      CronScheduledTask
      CronTagConfig
      CycleDetectionConfig
      CycleDetectionOptions
      DebounceState
      DeserializationContext
      ErrorFluentBuilder
      EventFluentBuilder
      EventLaneBuilderWithTopology
      EventLaneFluentBuilder
      ExecutionContextAccessor
      ExecutionContextConfig
      ExecutionContextOptions
      ExecutionContextProvideOptions
      ExecutionFrame
      ExecutionJournal
      ExecutionRecordNode
      ExecutionRecordResult
      ExecutionRecordSnapshot
      FallbackMiddlewareConfig
      FullExecutionContextSnapshot
      HttpClient
      HttpClientAuth
      HttpClientConfig
      IAsyncContext
      IAsyncContextDefinition
      IAsyncContextMeta
      IAsyncLocalStorage
      ICacheProvider
      IContractable
      IdentityContextValue
      IdentityRequirementConfig
      IdentityScopeConfig
      IErrorDefinition
      IErrorDefinitionFinal
      IErrorHelper
      IErrorMeta
      IEvent
      IEventDefinition
      IEventEmission
      IEventEmissionCallOptions
      IEventEmitOptions
      IEventEmitReport
      IEventHandlerOptions
      IEventLane
      IEventLaneDefinition
      IEventLaneMeta
      IEventLaneTopology
      IEventLaneTopologyBinding
      IEventLaneTopologyConsumeEntry
      IEventLaneTopologyHookPolicy
      IEventLaneTopologyProfile
      IEventListenerError
      IEventMeta
      IHealthReporter
      IHook
      IHookDefinition
      IIdentity
      ILog
      ILogInfo
      IMeta
      IMiddlewareMeta
      InputFile
      InputFileMeta
      IOptionalDependency
      IPlatformAdapter
      IResource
      IResourceDefinition
      IResourceHealthReport
      IResourceHealthReportEntry
      IResourceHealthResult
      IResourceMeta
      IResourceMiddleware
      IResourceMiddlewareConfigured
      IResourceMiddlewareDefinition
      IResourceMiddlewareExecutionInput
      IResourceWithConfig
      IRpcLane
      IRpcLaneCommunicator
      IRpcLaneDefinition
      IRpcLaneMeta
      IRpcLanePolicy
      IRpcLanesTopology
      IRpcLaneTopologyBinding
      IRpcLaneTopologyProfile
      IRunnerError
      IRuntime
      IRuntimeRecoveryHandle
      IRuntimeRecoveryOptions
      IsolationPolicy
      IsolationScope
      IsolationSubtreeFilter
      IsolationWhitelistEntry
      ITag
      ITagConfigured
      ITagDefinition
      ITaggable
      ITagMeta
      ITagStartupDependency
      ITask
      ITaskDefinition
      ITaskMeta
      ITaskMiddleware
      ITaskMiddlewareConfigured
      ITaskMiddlewareDefinition
      ITaskMiddlewareExecutionInput
      ITimerHandle
      ITimers
      IValidationSchema
      JournalSetOptions
      LightExecutionContextSnapshot
      MatchCompiledSchema
      MatchJsonObject
      MatchJsonSchema
      MatchMessageContext
      MatchMessageDescriptor
      ObjectReference
      OnUnhandledErrorInfo
      PrintableLog
      RateLimitError
      RateLimitMiddlewareConfig
      RateLimitState
      RemoteLaneBindingAuthJwtAsymmetric
      RemoteLaneBindingAuthJwtHmac
      RemoteLaneBindingAuthNone
      RequireContextMiddlewareConfig
      ResourceForkInfo
      RetryMiddlewareConfig
      RpcLaneRequestOptions
      RunnerFileSentinel
      SerializationContext
      SerializedTypeRecord
      SerializerDeserializeOptions
      SerializerFieldOptions
      SerializerLike
      SerializerOptions
      SerializerSchemaLike
      TagDependencyAccessor
      TagDependencyMatch
      TagDependencyResourceMatch
      TagDependencyTaskMatch
      TagFluentBuilder
      TaskCallOptions
      TaskFluentBuilder
      TemporalMiddlewareConfig
      ThrottleState
      TimeoutError
      TimeoutMiddlewareConfig
      TypeDefinition

      Type Aliases

      AnyElement
      AnyError
      AnyResource
      AnyTask
      CacheProviderInput
      CheckedValue
      CommonPayload
      ConfigContractViolationError
      CONTRACT
      ContractsIntersectionConfigs
      ContractsIntersectionInputs
      ContractsIntersectionOutputs
      ContractsUnionConfigs
      ContractsUnionInputs
      ContractsUnionOutputs
      DebugConfig
      DebugFriendlyConfig
      DefaultErrorType
      DependencyMapType
      DependencyValuesType
      DependencyValueType
      DisplayResourceSubtreePolicy
      DisposeOptions
      EnsureConfigSatisfiesContracts
      EnsureInputSatisfiesContracts
      EnsureOutputSatisfiesContracts
      EnsureTagsForTarget
      ErrorTagType
      ErrorThrowArgs
      EventDependency
      EventEmissionFailureMode
      EventEmissionInterceptor
      EventHandlerType
      EventTagType
      ExecutionContextFramesMode
      ExecutionContextSnapshot
      ExecutionFrameKind
      ExtractConfigTypeFromContracts
      ExtractContractOf
      ExtractContractsFromCollection
      ExtractEventPayload
      ExtractInputTypeFromContracts
      ExtractOutputTypeFromContracts
      ExtractResourceConfig
      ExtractResourceValue
      ExtractTaskInput
      ExtractTaskOutput
      FilterContractsKind
      HasConfigContracts
      HasInputContracts
      HasNeverProperty
      HasOutputContracts
      HookArrayOnTarget
      HookExecutionInterceptor
      HookFluentBuilder
      HookOnPredicate
      HookRevertFn
      HookSelectorTarget
      HookStoreElementType
      HookTagType
      IdentityAsyncContext
      InferCheckSchema
      InferConfigOrViolationFromContracts
      InferInputOrViolationFromContracts
      InferMatchPattern
      InferOutputOrViolationFromContracts
      InputArg
      InputCollisionGuard
      InputContractViolationError
      IsAny
      IsImpossibleIntersection
      IsNever
      IsolationChannel
      IsolationChannels
      IsolationExportsConfig
      IsolationExportsTarget
      IsolationPolicyDeclaration
      IsolationPolicyInput
      IsolationPolicyResolver
      IsolationTarget
      IsTuple
      IsUnknown
      IsUnspecified
      ITagWithOptionalConfig
      ItemType
      JournalKey
      JsonPrimitive
      KeysWithNever
      LogLevels
      LogPrinterPrintStrategy
      MatchJsonPrimitive
      MatchJsonValue
      MatchMessageOptions
      MatchPattern
      NonVoid
      NormalizedResourceSubtreeEventPolicy
      NormalizedResourceSubtreeHookPolicy
      NormalizedResourceSubtreeMiddlewarePolicy
      NormalizedResourceSubtreePolicy
      NormalizedResourceSubtreeResourceMiddlewarePolicy
      NormalizedResourceSubtreeResourcePolicy
      NormalizedResourceSubtreeTagPolicy
      NormalizedResourceSubtreeTaskMiddlewarePolicy
      NormalizedResourceSubtreeTaskPolicy
      NormalizedThrowsList
      OnType
      OnUnhandledError
      OutputContractViolationError
      OverridableDefinition
      OverridableElements
      OverrideDefinitionBrand
      PlatformClearTimeout
      PlatformId
      PlatformSetTimeout
      PrintStrategy
      QueueEvent
      QueueEventType
      RegisterableItem
      RemoteLaneAuthMode
      RemoteLaneBindingAuth
      RemoteLaneJwtAsymmetricAlgorithm
      RequiredKeys
      ResolveConfig
      ResolvedOn
      ResolvedResourceMiddlewareConfig
      ResolvedRunOptions
      ResolvedTaskMiddlewareConfig
      ResolveInput
      ResolveValidationSchemaInput
      ResourceCooldownAdmissionTargets
      ResourceDependency
      ResourceDependencyValuesType
      ResourceDependencyValueType
      ResourceFluentBuilder
      ResourceHealthStatus
      ResourceInitFn
      ResourceMiddlewareAttachmentType
      ResourceMiddlewareFluentBuilder
      ResourceMiddlewareInterceptor
      ResourceMiddlewareStoreElementType
      ResourceMiddlewareTagType
      ResourceSubtreeEventPolicy
      ResourceSubtreeHookPolicy
      ResourceSubtreeMiddlewarePolicy
      ResourceSubtreePolicy
      ResourceSubtreePolicyDeclaration
      ResourceSubtreePolicyInput
      ResourceSubtreePolicyList
      ResourceSubtreePolicyResolver
      ResourceSubtreePolicyValue
      ResourceSubtreeResourceMiddlewarePolicy
      ResourceSubtreeResourcePolicy
      ResourceSubtreeTagPolicy
      ResourceSubtreeTaskMiddlewarePolicy
      ResourceSubtreeTaskPolicy
      ResourceTagType
      RpcLaneCommunicatorResource
      RpcLaneMiddlewareId
      RunOptions
      RuntimeCallSource
      RuntimeCallSourceKind
      RuntimeDisposeOptions
      RuntimeLifecyclePhase
      RuntimeState
      SemaphoreEvent
      SemaphoreEventType
      SerializedNode
      SerializedValue
      SerializerFieldDecorator
      ShouldReplaceConfig
      ShouldReplaceInput
      Simplify
      StoreDefinition
      StoreEventDefinition
      StoreHookDefinition
      StoreResourceDefinition
      StoreResourceMiddlewareDefinition
      StoreTaskDefinition
      StoreTaskMiddlewareDefinition
      SubtreeElementValidator
      SubtreeEventValidator
      SubtreeHookValidator
      SubtreePolicyOptions
      SubtreePolicyViolationRecord
      SubtreeResourceMiddlewareEntry
      SubtreeResourceMiddlewarePredicate
      SubtreeResourceMiddlewareValidator
      SubtreeResourceValidator
      SubtreeTagValidator
      SubtreeTaskMiddlewareEntry
      SubtreeTaskMiddlewarePredicate
      SubtreeTaskMiddlewareValidator
      SubtreeTaskValidator
      SubtreeValidatableElement
      SubtreeValidationTargetType
      SubtreeViolation
      SubtreeViolationCode
      SymbolPolicy
      TaggedResource
      TaggedTask
      TagTarget
      TagType
      TagTypeFor
      TaskDependency
      TaskDependencyWithIntercept
      TaskLocalInterceptor
      TaskLocalInterceptorRecord
      TaskMiddlewareAttachmentType
      TaskMiddlewareFluentBuilder
      TaskMiddlewareInterceptor
      TaskMiddlewareStoreElementType
      TaskMiddlewareTagType
      TaskRunContext
      TaskRunnerInterceptOptions
      TaskRunnerInterceptor
      TaskTagType
      ThrowsList
      UnhandledErrorKind
      UnionToIntersection
      UnknownToNever
      ValidationSchemaClassConstructor
      ValidationSchemaInput
      ValidOnTarget

      Variables

      allFalse
      asyncContexts
      CONTRACT
      debug
      debugLevels
      EventEmissionFailureMode
      events
      EXECUTION_CONTEXT_CYCLE_DETECTION_DEFAULTS
      journal
      levelNormal
      levelVerbose
      Match
      middleware
      r
      resources
      RuntimeCallSourceKind
      RuntimeLifecyclePhase
      runtimeSource
      symbolAsyncContext
      symbolDefinitionIdentity
      symbolError
      symbolEvent
      symbolEventLane
      symbolFilePath
      symbolForkedFrom
      symbolHook
      symbolIsolationSubtreeResource
      symbolMiddleware
      symbolMiddlewareConfigured
      symbolMiddlewareConfiguredFrom
      symbolOptionalDependency
      symbolOverrideDefinition
      symbolOverrideTargetDefinition
      SymbolPolicy
      symbolResource
      symbolResourceIsolateDeclarations
      symbolResourceMiddleware
      symbolResourceRegistersChildren
      symbolResourceSubtreeDeclarations
      symbolResourceWithConfig
      symbolRpcLane
      symbolRpcLanePolicy
      symbolRpcLaneRoutedBy
      symbolTag
      symbolTagBeforeInitDependency
      symbolTagConfigured
      symbolTagConfiguredFrom
      symbolTask
      symbolTaskMiddleware
      tags

      Functions

      bindProcessErrorHandler
      check
      createDefaultUnhandledError
      createHttpClient
      defineAsyncContext
      defineEvent
      defineEventLane
      defineHook
      defineOverride
      defineResource
      defineResourceMiddleware
      defineRpcLane
      defineTag
      defineTask
      defineTaskMiddleware
      detectColorSupport
      getConfig
      isAsyncContext
      isError
      isEvent
      isEventLane
      isHook
      isIsolationScope
      isOneOf
      isOptional
      isOverrideDefinition
      isResource
      isResourceMiddleware
      isResourceWithConfig
      isRpcLane
      isSameDefinition
      isSubtreeFilter
      isTag
      isTagStartup
      isTask
      isTaskMiddleware
      onAnyOf
      run
      safeReportUnhandledError
      scope
      setPlatform
      subtreeOf

      References

      cancellationError → errors.cancellationError
      DisposeWave → definitions.DisposeWave
      Errors → errors
      EventStoreElementType → definitions.EventStoreElementType
      InferValidationSchemaInput → definitions.InferValidationSchemaInput
      InitWave → definitions.InitWave
      RegisterableItems → RegisterableItem
      ResourceStoreElementType → definitions.ResourceStoreElementType
      TaskStoreElementType → definitions.TaskStoreElementType