@oldzy/conduit 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,7 @@ declare abstract class BaseCommunicationObject {
6
6
  declare abstract class BaseRequest extends BaseCommunicationObject {
7
7
  readonly uuid: string;
8
8
  readonly timestamp: Date;
9
+ AbortSignal?: AbortSignal;
9
10
  constructor(type: string | symbol);
10
11
  }
11
12
 
@@ -6,6 +6,7 @@ declare abstract class BaseCommunicationObject {
6
6
  declare abstract class BaseRequest extends BaseCommunicationObject {
7
7
  readonly uuid: string;
8
8
  readonly timestamp: Date;
9
+ AbortSignal?: AbortSignal;
9
10
  constructor(type: string | symbol);
10
11
  }
11
12
 
@@ -1,5 +1,5 @@
1
1
  import { S as ServiceProvider } from './ServiceProvider-BE1-lOxZ.js';
2
- import { b as BaseResponse, a as BaseRequest } from './IRequestHandler-Dp4jjwcB.js';
2
+ import { b as BaseResponse, a as BaseRequest } from './IRequestHandler-DmhXQ-Ls.js';
3
3
 
4
4
  declare class Mediator {
5
5
  private serviceProvider;
@@ -1,5 +1,5 @@
1
1
  import { S as ServiceProvider } from './ServiceProvider-BE1-lOxZ.mjs';
2
- import { b as BaseResponse, a as BaseRequest } from './IRequestHandler-Dp4jjwcB.mjs';
2
+ import { b as BaseResponse, a as BaseRequest } from './IRequestHandler-DmhXQ-Ls.mjs';
3
3
 
4
4
  declare class Mediator {
5
5
  private serviceProvider;
@@ -1,8 +1,8 @@
1
1
  import { S as ServiceCollection } from '../ServiceCollection-DbvEQOzY.mjs';
2
2
  import { S as ServiceProvider, b as ServiceLifetime } from '../ServiceProvider-BE1-lOxZ.mjs';
3
- import { b as BaseResponse, a as BaseRequest, I as IRequestHandler } from '../IRequestHandler-Dp4jjwcB.mjs';
3
+ import { b as BaseResponse, a as BaseRequest, I as IRequestHandler } from '../IRequestHandler-DmhXQ-Ls.mjs';
4
4
  import { IPipelineBehavior } from '../pipeline/index.mjs';
5
- import { M as Mediator } from '../Mediator-IEaPewwN.mjs';
5
+ import { M as Mediator } from '../Mediator-VnHApRVc.mjs';
6
6
 
7
7
  interface IApplicationAdapter {
8
8
  readonly name: string;
@@ -1,8 +1,8 @@
1
1
  import { S as ServiceCollection } from '../ServiceCollection-DixtW4OW.js';
2
2
  import { S as ServiceProvider, b as ServiceLifetime } from '../ServiceProvider-BE1-lOxZ.js';
3
- import { b as BaseResponse, a as BaseRequest, I as IRequestHandler } from '../IRequestHandler-Dp4jjwcB.js';
3
+ import { b as BaseResponse, a as BaseRequest, I as IRequestHandler } from '../IRequestHandler-DmhXQ-Ls.js';
4
4
  import { IPipelineBehavior } from '../pipeline/index.js';
5
- import { M as Mediator } from '../Mediator-DsZR19WY.js';
5
+ import { M as Mediator } from '../Mediator-BD53uc1I.js';
6
6
 
7
7
  interface IApplicationAdapter {
8
8
  readonly name: string;
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { S as ServiceCollection } from './ServiceCollection-DbvEQOzY.mjs';
2
2
  export { I as IServiceScope, a as ServiceDescriptor, b as ServiceLifetime, S as ServiceProvider } from './ServiceProvider-BE1-lOxZ.mjs';
3
3
  export { Inject } from './di/index.mjs';
4
- export { B as BaseCommunicationObject, a as BaseRequest, b as BaseResponse, H as HandlerResult, I as IRequestHandler } from './IRequestHandler-Dp4jjwcB.mjs';
5
- export { M as Mediator } from './Mediator-IEaPewwN.mjs';
4
+ export { B as BaseCommunicationObject, a as BaseRequest, b as BaseResponse, H as HandlerResult, I as IRequestHandler } from './IRequestHandler-DmhXQ-Ls.mjs';
5
+ export { M as Mediator } from './Mediator-VnHApRVc.mjs';
6
6
  export { SimpleHandler, StreamingHandler } from './mediator/index.mjs';
7
7
  export { IPipelineBehavior, PipelineContext, PipelineDelegate } from './pipeline/index.mjs';
8
8
  export { Application, ApplicationBuilder, IApplicationAdapter } from './application/index.mjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { S as ServiceCollection } from './ServiceCollection-DixtW4OW.js';
2
2
  export { I as IServiceScope, a as ServiceDescriptor, b as ServiceLifetime, S as ServiceProvider } from './ServiceProvider-BE1-lOxZ.js';
3
3
  export { Inject } from './di/index.js';
4
- export { B as BaseCommunicationObject, a as BaseRequest, b as BaseResponse, H as HandlerResult, I as IRequestHandler } from './IRequestHandler-Dp4jjwcB.js';
5
- export { M as Mediator } from './Mediator-DsZR19WY.js';
4
+ export { B as BaseCommunicationObject, a as BaseRequest, b as BaseResponse, H as HandlerResult, I as IRequestHandler } from './IRequestHandler-DmhXQ-Ls.js';
5
+ export { M as Mediator } from './Mediator-BD53uc1I.js';
6
6
  export { SimpleHandler, StreamingHandler } from './mediator/index.js';
7
7
  export { IPipelineBehavior, PipelineContext, PipelineDelegate } from './pipeline/index.js';
8
8
  export { Application, ApplicationBuilder, IApplicationAdapter } from './application/index.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use strict';require('reflect-metadata');var uuid=require('uuid');/* conduit - MIT License */
2
- var H=Object.defineProperty;var F=(o,e,t)=>e in o?H(o,e,{enumerable:true,configurable:true,writable:true,value:t}):o[e]=t;var s=(o,e)=>H(o,"name",{value:e,configurable:true});var i=(o,e,t)=>F(o,typeof e!="symbol"?e+"":e,t);var n=(function(o){return o.Singleton="SINGLETON",o.Scoped="SCOPED",o.Transient="TRANSIENT",o})({});var w=class w{constructor(e,t){i(this,"serviceDescriptors");i(this,"singletons",new Map);i(this,"scopedInstances",new Map);i(this,"parent");i(this,"resolutionStack",[]);this.serviceDescriptors=e,this.parent=t;}getService(e){try{return this.getRequiredService(e.toString())}catch{return}}getRequiredService(e){let t=this.resolutionStack.length===0;if(this.resolutionStack.includes(e.toString())){let r=[...this.resolutionStack,e.toString()].map(a=>String(a)).join(" \u2192 ");throw new Error(`Circular dependency detected: ${r}`)}this.resolutionStack.push(e.toString());try{let r=this.serviceDescriptors.find(a=>a.serviceIdentifier.toString()===e.toString());if(!r){if(this.parent)return this.parent.getRequiredService(e.toString());throw new Error(`Service '${String(e)}' not registered`)}return this.resolveService(r)}catch(r){throw this.resolutionStack.pop(),r}finally{this.resolutionStack[this.resolutionStack.length-1]===e.toString()&&this.resolutionStack.pop(),t&&(this.resolutionStack=[]);}}resolveService(e){switch(e.lifetime){case n.Singleton:return this.resolveSingleton(e);case n.Scoped:return this.resolveScoped(e);case n.Transient:return this.resolveTransient(e);default:throw new Error(`Unknown lifetime: ${e.lifetime}`)}}resolveSingleton(e){let{serviceIdentifier:t}=e;if(this.singletons.has(t.toString()))return this.singletons.get(t.toString());let r=this.createInstance(e);return this.singletons.set(t.toString(),r),r}resolveScoped(e){let{serviceIdentifier:t}=e;if(!this.parent)throw new Error(`Cannot resolve scoped service '${String(t)}' from root provider. Use createScope() first.`);if(this.scopedInstances.has(t.toString()))return this.scopedInstances.get(t.toString());let r=this.createInstance(e);return this.scopedInstances.set(t.toString(),r),r}resolveTransient(e){return this.createInstance(e)}createInstance(e){if(e.implementationInstance!==void 0)return e.implementationInstance;if(e.implementationFactory)return e.implementationFactory(this);if(e.implementationType)return this.constructInstance(e);throw new Error(`Cannot create instance for service '${String(e.serviceIdentifier)}'`)}constructInstance(e){let{implementationType:t,dependencies:r}=e;if(!t)throw new Error("Implementation type is required");if(r&&r.length>0){let c=r.map(S=>this.getRequiredService(S));return new t(...c)}let a=Reflect.getMetadata("inject:params",t),h=Reflect.getMetadata("design:paramtypes",t)||[],v=Math.max(h.length,a?Math.max(...Object.keys(a).map(c=>parseInt(c)))+1:0),g=[];for(let c=0;c<v;c++){let S=a?.[c];if(S)g.push(this.getRequiredService(S));else if(h[c]){let q=h[c].name||h[c];g.push(this.getRequiredService(q));}else throw new Error(`Cannot resolve parameter at index ${c} for ${t.name}`)}return new t(...g)}createScope(){let e=new w(this.serviceDescriptors,this);return {serviceProvider:e,dispose:s(()=>{e.scopedInstances.clear();},"dispose")}}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())||(this.parent?.has(e.toString())??false)}};s(w,"ServiceProvider");var d=w;var y=class y{constructor(){i(this,"serviceDescriptors",[]);}addSingleton(e,t){return typeof t=="function"?this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Singleton}):this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationInstance:t,lifetime:n.Singleton}),this}addScoped(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped}),this}addTransient(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Transient}),this}addFactory(e,t,r=n.Transient){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationFactory:t,lifetime:r}),this}addScopedWithDependencies(e,t,r){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped,dependencies:r}),this}buildServiceProvider(){return new d([...this.serviceDescriptors])}getDescriptors(){return [...this.serviceDescriptors]}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())}get count(){return this.serviceDescriptors.length}};s(y,"ServiceCollection");var u=y;function N(o){return (e,t,r)=>{let h={...Reflect.getOwnMetadata("inject:params",e)||{}};h[r]=o.toString(),Reflect.defineMetadata("inject:params",h,e);}}s(N,"Inject");var x=class x{constructor(e){i(this,"request");i(this,"response");i(this,"metadata",new Map);this.request=e;}setMetadata(e,t){this.metadata.set(e,t);}getMetadata(e){return this.metadata.get(e)}};s(x,"PipelineContext");var l=x;var I=class I{constructor(e){i(this,"serviceProvider");i(this,"behaviors",[]);this.serviceProvider=e;let t=this.serviceProvider.getService("PipelineBehaviors");t&&(this.behaviors=t);}async send(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(this.isAsyncIterable(r))throw new Error("Handler returned a stream. Use stream() method instead of send().");return r}finally{t.dispose();}}async stream(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(!this.isAsyncIterable(r))throw new Error("Handler did not return a stream. Use send() method instead of stream().");return r}finally{t.dispose();}}async executeHandler(e,t){let r=t.getService(e.type);if(!r)throw new Error(`No handler registered for request type: ${String(e.type)}`);let a=new l(e);return this.behaviors.length===0?await r.handle(e):await this.executePipeline(a,r,this.behaviors)}async executePipeline(e,t,r){let a=0,h=s(async()=>{if(a<r.length)return await r[a++].handle(e,h);let v=await t.handle(e.request);return e.response=v,v},"next");return await h()}isAsyncIterable(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}};s(I,"Mediator");var f=I;var P=class P{handle(e){return this.handleSimple(e)}};s(P,"SimpleHandler");var D=P,b=class b{handle(e){return this.handleStream(e)}};s(b,"StreamingHandler");var E=b;var R=class R{constructor(e){i(this,"type");this.type=e.toString();}};s(R,"BaseCommunicationObject");var p=R;var k=class k extends p{constructor(t){super(t);i(this,"uuid");i(this,"timestamp");this.uuid=uuid.v4(),this.timestamp=new Date;}};s(k,"BaseRequest");var T=k;var j=class j extends p{constructor(t){super(t);i(this,"success");i(this,"errors");i(this,"timestamp");this.timestamp=new Date,this.success=true;}setErrors(t){return this.success=false,this.errors=t,this}addError(t){return this.errors||(this.errors=[]),this.errors.push(t),this.success=false,this}};s(j,"BaseResponse");var M=j;var C=class C{constructor(e,t,r){i(this,"serviceProvider");i(this,"mediator");i(this,"isRunning",false);i(this,"adapters");this.serviceProvider=e,this.mediator=t,this.adapters=r;}async run(){if(this.isRunning)throw new Error("Application is already running");for(let e of this.adapters)e.initialize&&await e.initialize(this);this.isRunning=true;}async stop(){if(this.isRunning){for(let e of [...this.adapters].reverse())e.dispose&&await e.dispose();this.isRunning=false;}}async send(e){if(!this.isRunning)throw new Error("Application must be running before sending requests. Call app.run() first.");return this.mediator.send(e)}async stream(e){if(!this.isRunning)throw new Error("Application must be running before streaming requests. Call app.run() first.");return this.mediator.stream(e)}getServiceProvider(){return this.serviceProvider}getMediator(){return this.mediator}get running(){return this.isRunning}};s(C,"Application");var m=C;var B="PipelineBehaviors",A=class A{constructor(){i(this,"services");i(this,"adapters",[]);i(this,"pipelineBehaviors",[]);this.services=new u;}registerHandler(e,t,r=n.Transient){if(typeof t=="function")switch(r){case n.Singleton:this.services.addSingleton(e,t);break;case n.Scoped:this.services.addScoped(e,t);break;case n.Transient:default:this.services.addTransient(e,t);break}else this.services.addSingleton(e,t);return this}registerHandlers(e){return e.forEach((t,r)=>{this.registerHandler(r,t);}),this}registerBehavior(e){return this.pipelineBehaviors.push(e),this}registerSingleton(e,t){return this.services.addSingleton(e,t),this}registerScoped(e,t){return this.services.addScoped(e,t),this}registerTransient(e,t){return this.services.addTransient(e,t),this}registerFactory(e,t,r=n.Transient){return this.services.addFactory(e,t,r),this}use(e){return this.adapters.push(e),this}getServiceCollection(){return this.services}async build(){for(let r of this.adapters)await r.configure(this.services);this.pipelineBehaviors.length>0&&this.services.addSingleton(B,this.pipelineBehaviors.map(r=>typeof r=="function"?new r:r));let e=this.services.buildServiceProvider(),t=new f(e);return new m(e,t,this.adapters)}};s(A,"ApplicationBuilder");var $=A;exports.Application=m;exports.ApplicationBuilder=$;exports.BaseCommunicationObject=p;exports.BaseRequest=T;exports.BaseResponse=M;exports.Inject=N;exports.Mediator=f;exports.PipelineContext=l;exports.ServiceCollection=u;exports.ServiceLifetime=n;exports.ServiceProvider=d;exports.SimpleHandler=D;exports.StreamingHandler=E;
2
+ var H=Object.defineProperty;var F=(o,e,t)=>e in o?H(o,e,{enumerable:true,configurable:true,writable:true,value:t}):o[e]=t;var s=(o,e)=>H(o,"name",{value:e,configurable:true});var i=(o,e,t)=>F(o,typeof e!="symbol"?e+"":e,t);var n=(function(o){return o.Singleton="SINGLETON",o.Scoped="SCOPED",o.Transient="TRANSIENT",o})({});var w=class w{constructor(e,t){i(this,"serviceDescriptors");i(this,"singletons",new Map);i(this,"scopedInstances",new Map);i(this,"parent");i(this,"resolutionStack",[]);this.serviceDescriptors=e,this.parent=t;}getService(e){try{return this.getRequiredService(e.toString())}catch{return}}getRequiredService(e){let t=this.resolutionStack.length===0;if(this.resolutionStack.includes(e.toString())){let r=[...this.resolutionStack,e.toString()].map(a=>String(a)).join(" \u2192 ");throw new Error(`Circular dependency detected: ${r}`)}this.resolutionStack.push(e.toString());try{let r=this.serviceDescriptors.find(a=>a.serviceIdentifier.toString()===e.toString());if(!r){if(this.parent)return this.parent.getRequiredService(e.toString());throw new Error(`Service '${String(e)}' not registered`)}return this.resolveService(r)}catch(r){throw this.resolutionStack.pop(),r}finally{this.resolutionStack[this.resolutionStack.length-1]===e.toString()&&this.resolutionStack.pop(),t&&(this.resolutionStack=[]);}}resolveService(e){switch(e.lifetime){case n.Singleton:return this.resolveSingleton(e);case n.Scoped:return this.resolveScoped(e);case n.Transient:return this.resolveTransient(e);default:throw new Error(`Unknown lifetime: ${e.lifetime}`)}}resolveSingleton(e){let{serviceIdentifier:t}=e;if(this.singletons.has(t.toString()))return this.singletons.get(t.toString());let r=this.createInstance(e);return this.singletons.set(t.toString(),r),r}resolveScoped(e){let{serviceIdentifier:t}=e;if(!this.parent)throw new Error(`Cannot resolve scoped service '${String(t)}' from root provider. Use createScope() first.`);if(this.scopedInstances.has(t.toString()))return this.scopedInstances.get(t.toString());let r=this.createInstance(e);return this.scopedInstances.set(t.toString(),r),r}resolveTransient(e){return this.createInstance(e)}createInstance(e){if(e.implementationInstance!==void 0)return e.implementationInstance;if(e.implementationFactory)return e.implementationFactory(this);if(e.implementationType)return this.constructInstance(e);throw new Error(`Cannot create instance for service '${String(e.serviceIdentifier)}'`)}constructInstance(e){let{implementationType:t,dependencies:r}=e;if(!t)throw new Error("Implementation type is required");if(r&&r.length>0){let c=r.map(S=>this.getRequiredService(S));return new t(...c)}let a=Reflect.getMetadata("inject:params",t),h=Reflect.getMetadata("design:paramtypes",t)||[],v=Math.max(h.length,a?Math.max(...Object.keys(a).map(c=>parseInt(c)))+1:0),g=[];for(let c=0;c<v;c++){let S=a?.[c];if(S)g.push(this.getRequiredService(S));else if(h[c]){let q=h[c].name||h[c];g.push(this.getRequiredService(q));}else throw new Error(`Cannot resolve parameter at index ${c} for ${t.name}`)}return new t(...g)}createScope(){let e=new w(this.serviceDescriptors,this);return {serviceProvider:e,dispose:s(()=>{e.scopedInstances.clear();},"dispose")}}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())||(this.parent?.has(e.toString())??false)}};s(w,"ServiceProvider");var d=w;var y=class y{constructor(){i(this,"serviceDescriptors",[]);}addSingleton(e,t){return typeof t=="function"?this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Singleton}):this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationInstance:t,lifetime:n.Singleton}),this}addScoped(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped}),this}addTransient(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Transient}),this}addFactory(e,t,r=n.Transient){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationFactory:t,lifetime:r}),this}addScopedWithDependencies(e,t,r){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped,dependencies:r}),this}buildServiceProvider(){return new d([...this.serviceDescriptors])}getDescriptors(){return [...this.serviceDescriptors]}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())}get count(){return this.serviceDescriptors.length}};s(y,"ServiceCollection");var u=y;function N(o){return (e,t,r)=>{let h={...Reflect.getOwnMetadata("inject:params",e)||{}};h[r]=o.toString(),Reflect.defineMetadata("inject:params",h,e);}}s(N,"Inject");var x=class x{constructor(e){i(this,"request");i(this,"response");i(this,"metadata",new Map);this.request=e;}setMetadata(e,t){this.metadata.set(e,t);}getMetadata(e){return this.metadata.get(e)}};s(x,"PipelineContext");var l=x;var I=class I{constructor(e){i(this,"serviceProvider");i(this,"behaviors",[]);this.serviceProvider=e;let t=this.serviceProvider.getService("PipelineBehaviors");t&&(this.behaviors=t);}async send(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(this.isAsyncIterable(r))throw new Error("Handler returned a stream. Use stream() method instead of send().");return r}finally{t.dispose();}}async stream(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(!this.isAsyncIterable(r))throw new Error("Handler did not return a stream. Use send() method instead of stream().");return r}finally{t.dispose();}}async executeHandler(e,t){let r=t.getService(e.type);if(!r)throw new Error(`No handler registered for request type: ${String(e.type)}`);let a=new l(e);return this.behaviors.length===0?await r.handle(e):await this.executePipeline(a,r,this.behaviors)}async executePipeline(e,t,r){let a=0,h=s(async()=>{if(a<r.length)return await r[a++].handle(e,h);let v=await t.handle(e.request);return e.response=v,v},"next");return await h()}isAsyncIterable(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}};s(I,"Mediator");var f=I;var P=class P{handle(e){return this.handleSimple(e)}};s(P,"SimpleHandler");var D=P,b=class b{handle(e){return this.handleStream(e)}};s(b,"StreamingHandler");var E=b;var R=class R{constructor(e){i(this,"type");this.type=e.toString();}};s(R,"BaseCommunicationObject");var p=R;var k=class k extends p{constructor(t){super(t);i(this,"uuid");i(this,"timestamp");i(this,"AbortSignal");this.uuid=uuid.v4(),this.timestamp=new Date;}};s(k,"BaseRequest");var T=k;var j=class j extends p{constructor(t){super(t);i(this,"success");i(this,"errors");i(this,"timestamp");this.timestamp=new Date,this.success=true;}setErrors(t){return this.success=false,this.errors=t,this}addError(t){return this.errors||(this.errors=[]),this.errors.push(t),this.success=false,this}};s(j,"BaseResponse");var M=j;var C=class C{constructor(e,t,r){i(this,"serviceProvider");i(this,"mediator");i(this,"isRunning",false);i(this,"adapters");this.serviceProvider=e,this.mediator=t,this.adapters=r;}async run(){if(this.isRunning)throw new Error("Application is already running");for(let e of this.adapters)e.initialize&&await e.initialize(this);this.isRunning=true;}async stop(){if(this.isRunning){for(let e of [...this.adapters].reverse())e.dispose&&await e.dispose();this.isRunning=false;}}async send(e){if(!this.isRunning)throw new Error("Application must be running before sending requests. Call app.run() first.");return this.mediator.send(e)}async stream(e){if(!this.isRunning)throw new Error("Application must be running before streaming requests. Call app.run() first.");return this.mediator.stream(e)}getServiceProvider(){return this.serviceProvider}getMediator(){return this.mediator}get running(){return this.isRunning}};s(C,"Application");var m=C;var B="PipelineBehaviors",$=class ${constructor(){i(this,"services");i(this,"adapters",[]);i(this,"pipelineBehaviors",[]);this.services=new u;}registerHandler(e,t,r=n.Transient){if(typeof t=="function")switch(r){case n.Singleton:this.services.addSingleton(e,t);break;case n.Scoped:this.services.addScoped(e,t);break;case n.Transient:default:this.services.addTransient(e,t);break}else this.services.addSingleton(e,t);return this}registerHandlers(e){return e.forEach((t,r)=>{this.registerHandler(r,t);}),this}registerBehavior(e){return this.pipelineBehaviors.push(e),this}registerSingleton(e,t){return this.services.addSingleton(e,t),this}registerScoped(e,t){return this.services.addScoped(e,t),this}registerTransient(e,t){return this.services.addTransient(e,t),this}registerFactory(e,t,r=n.Transient){return this.services.addFactory(e,t,r),this}use(e){return this.adapters.push(e),this}getServiceCollection(){return this.services}async build(){for(let r of this.adapters)await r.configure(this.services);this.pipelineBehaviors.length>0&&this.services.addSingleton(B,this.pipelineBehaviors.map(r=>typeof r=="function"?new r:r));let e=this.services.buildServiceProvider(),t=new f(e);return new m(e,t,this.adapters)}};s($,"ApplicationBuilder");var A=$;exports.Application=m;exports.ApplicationBuilder=A;exports.BaseCommunicationObject=p;exports.BaseRequest=T;exports.BaseResponse=M;exports.Inject=N;exports.Mediator=f;exports.PipelineContext=l;exports.ServiceCollection=u;exports.ServiceLifetime=n;exports.ServiceProvider=d;exports.SimpleHandler=D;exports.StreamingHandler=E;
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  import'reflect-metadata';import {v4}from'uuid';/* conduit - MIT License */
2
- var H=Object.defineProperty;var F=(o,e,t)=>e in o?H(o,e,{enumerable:true,configurable:true,writable:true,value:t}):o[e]=t;var s=(o,e)=>H(o,"name",{value:e,configurable:true});var i=(o,e,t)=>F(o,typeof e!="symbol"?e+"":e,t);var n=(function(o){return o.Singleton="SINGLETON",o.Scoped="SCOPED",o.Transient="TRANSIENT",o})({});var w=class w{constructor(e,t){i(this,"serviceDescriptors");i(this,"singletons",new Map);i(this,"scopedInstances",new Map);i(this,"parent");i(this,"resolutionStack",[]);this.serviceDescriptors=e,this.parent=t;}getService(e){try{return this.getRequiredService(e.toString())}catch{return}}getRequiredService(e){let t=this.resolutionStack.length===0;if(this.resolutionStack.includes(e.toString())){let r=[...this.resolutionStack,e.toString()].map(a=>String(a)).join(" \u2192 ");throw new Error(`Circular dependency detected: ${r}`)}this.resolutionStack.push(e.toString());try{let r=this.serviceDescriptors.find(a=>a.serviceIdentifier.toString()===e.toString());if(!r){if(this.parent)return this.parent.getRequiredService(e.toString());throw new Error(`Service '${String(e)}' not registered`)}return this.resolveService(r)}catch(r){throw this.resolutionStack.pop(),r}finally{this.resolutionStack[this.resolutionStack.length-1]===e.toString()&&this.resolutionStack.pop(),t&&(this.resolutionStack=[]);}}resolveService(e){switch(e.lifetime){case n.Singleton:return this.resolveSingleton(e);case n.Scoped:return this.resolveScoped(e);case n.Transient:return this.resolveTransient(e);default:throw new Error(`Unknown lifetime: ${e.lifetime}`)}}resolveSingleton(e){let{serviceIdentifier:t}=e;if(this.singletons.has(t.toString()))return this.singletons.get(t.toString());let r=this.createInstance(e);return this.singletons.set(t.toString(),r),r}resolveScoped(e){let{serviceIdentifier:t}=e;if(!this.parent)throw new Error(`Cannot resolve scoped service '${String(t)}' from root provider. Use createScope() first.`);if(this.scopedInstances.has(t.toString()))return this.scopedInstances.get(t.toString());let r=this.createInstance(e);return this.scopedInstances.set(t.toString(),r),r}resolveTransient(e){return this.createInstance(e)}createInstance(e){if(e.implementationInstance!==void 0)return e.implementationInstance;if(e.implementationFactory)return e.implementationFactory(this);if(e.implementationType)return this.constructInstance(e);throw new Error(`Cannot create instance for service '${String(e.serviceIdentifier)}'`)}constructInstance(e){let{implementationType:t,dependencies:r}=e;if(!t)throw new Error("Implementation type is required");if(r&&r.length>0){let c=r.map(S=>this.getRequiredService(S));return new t(...c)}let a=Reflect.getMetadata("inject:params",t),h=Reflect.getMetadata("design:paramtypes",t)||[],v=Math.max(h.length,a?Math.max(...Object.keys(a).map(c=>parseInt(c)))+1:0),g=[];for(let c=0;c<v;c++){let S=a?.[c];if(S)g.push(this.getRequiredService(S));else if(h[c]){let q=h[c].name||h[c];g.push(this.getRequiredService(q));}else throw new Error(`Cannot resolve parameter at index ${c} for ${t.name}`)}return new t(...g)}createScope(){let e=new w(this.serviceDescriptors,this);return {serviceProvider:e,dispose:s(()=>{e.scopedInstances.clear();},"dispose")}}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())||(this.parent?.has(e.toString())??false)}};s(w,"ServiceProvider");var d=w;var y=class y{constructor(){i(this,"serviceDescriptors",[]);}addSingleton(e,t){return typeof t=="function"?this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Singleton}):this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationInstance:t,lifetime:n.Singleton}),this}addScoped(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped}),this}addTransient(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Transient}),this}addFactory(e,t,r=n.Transient){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationFactory:t,lifetime:r}),this}addScopedWithDependencies(e,t,r){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped,dependencies:r}),this}buildServiceProvider(){return new d([...this.serviceDescriptors])}getDescriptors(){return [...this.serviceDescriptors]}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())}get count(){return this.serviceDescriptors.length}};s(y,"ServiceCollection");var u=y;function N(o){return (e,t,r)=>{let h={...Reflect.getOwnMetadata("inject:params",e)||{}};h[r]=o.toString(),Reflect.defineMetadata("inject:params",h,e);}}s(N,"Inject");var x=class x{constructor(e){i(this,"request");i(this,"response");i(this,"metadata",new Map);this.request=e;}setMetadata(e,t){this.metadata.set(e,t);}getMetadata(e){return this.metadata.get(e)}};s(x,"PipelineContext");var l=x;var I=class I{constructor(e){i(this,"serviceProvider");i(this,"behaviors",[]);this.serviceProvider=e;let t=this.serviceProvider.getService("PipelineBehaviors");t&&(this.behaviors=t);}async send(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(this.isAsyncIterable(r))throw new Error("Handler returned a stream. Use stream() method instead of send().");return r}finally{t.dispose();}}async stream(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(!this.isAsyncIterable(r))throw new Error("Handler did not return a stream. Use send() method instead of stream().");return r}finally{t.dispose();}}async executeHandler(e,t){let r=t.getService(e.type);if(!r)throw new Error(`No handler registered for request type: ${String(e.type)}`);let a=new l(e);return this.behaviors.length===0?await r.handle(e):await this.executePipeline(a,r,this.behaviors)}async executePipeline(e,t,r){let a=0,h=s(async()=>{if(a<r.length)return await r[a++].handle(e,h);let v=await t.handle(e.request);return e.response=v,v},"next");return await h()}isAsyncIterable(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}};s(I,"Mediator");var f=I;var P=class P{handle(e){return this.handleSimple(e)}};s(P,"SimpleHandler");var D=P,b=class b{handle(e){return this.handleStream(e)}};s(b,"StreamingHandler");var E=b;var R=class R{constructor(e){i(this,"type");this.type=e.toString();}};s(R,"BaseCommunicationObject");var p=R;var k=class k extends p{constructor(t){super(t);i(this,"uuid");i(this,"timestamp");this.uuid=v4(),this.timestamp=new Date;}};s(k,"BaseRequest");var T=k;var j=class j extends p{constructor(t){super(t);i(this,"success");i(this,"errors");i(this,"timestamp");this.timestamp=new Date,this.success=true;}setErrors(t){return this.success=false,this.errors=t,this}addError(t){return this.errors||(this.errors=[]),this.errors.push(t),this.success=false,this}};s(j,"BaseResponse");var M=j;var C=class C{constructor(e,t,r){i(this,"serviceProvider");i(this,"mediator");i(this,"isRunning",false);i(this,"adapters");this.serviceProvider=e,this.mediator=t,this.adapters=r;}async run(){if(this.isRunning)throw new Error("Application is already running");for(let e of this.adapters)e.initialize&&await e.initialize(this);this.isRunning=true;}async stop(){if(this.isRunning){for(let e of [...this.adapters].reverse())e.dispose&&await e.dispose();this.isRunning=false;}}async send(e){if(!this.isRunning)throw new Error("Application must be running before sending requests. Call app.run() first.");return this.mediator.send(e)}async stream(e){if(!this.isRunning)throw new Error("Application must be running before streaming requests. Call app.run() first.");return this.mediator.stream(e)}getServiceProvider(){return this.serviceProvider}getMediator(){return this.mediator}get running(){return this.isRunning}};s(C,"Application");var m=C;var B="PipelineBehaviors",A=class A{constructor(){i(this,"services");i(this,"adapters",[]);i(this,"pipelineBehaviors",[]);this.services=new u;}registerHandler(e,t,r=n.Transient){if(typeof t=="function")switch(r){case n.Singleton:this.services.addSingleton(e,t);break;case n.Scoped:this.services.addScoped(e,t);break;case n.Transient:default:this.services.addTransient(e,t);break}else this.services.addSingleton(e,t);return this}registerHandlers(e){return e.forEach((t,r)=>{this.registerHandler(r,t);}),this}registerBehavior(e){return this.pipelineBehaviors.push(e),this}registerSingleton(e,t){return this.services.addSingleton(e,t),this}registerScoped(e,t){return this.services.addScoped(e,t),this}registerTransient(e,t){return this.services.addTransient(e,t),this}registerFactory(e,t,r=n.Transient){return this.services.addFactory(e,t,r),this}use(e){return this.adapters.push(e),this}getServiceCollection(){return this.services}async build(){for(let r of this.adapters)await r.configure(this.services);this.pipelineBehaviors.length>0&&this.services.addSingleton(B,this.pipelineBehaviors.map(r=>typeof r=="function"?new r:r));let e=this.services.buildServiceProvider(),t=new f(e);return new m(e,t,this.adapters)}};s(A,"ApplicationBuilder");var $=A;export{m as Application,$ as ApplicationBuilder,p as BaseCommunicationObject,T as BaseRequest,M as BaseResponse,N as Inject,f as Mediator,l as PipelineContext,u as ServiceCollection,n as ServiceLifetime,d as ServiceProvider,D as SimpleHandler,E as StreamingHandler};
2
+ var H=Object.defineProperty;var F=(o,e,t)=>e in o?H(o,e,{enumerable:true,configurable:true,writable:true,value:t}):o[e]=t;var s=(o,e)=>H(o,"name",{value:e,configurable:true});var i=(o,e,t)=>F(o,typeof e!="symbol"?e+"":e,t);var n=(function(o){return o.Singleton="SINGLETON",o.Scoped="SCOPED",o.Transient="TRANSIENT",o})({});var w=class w{constructor(e,t){i(this,"serviceDescriptors");i(this,"singletons",new Map);i(this,"scopedInstances",new Map);i(this,"parent");i(this,"resolutionStack",[]);this.serviceDescriptors=e,this.parent=t;}getService(e){try{return this.getRequiredService(e.toString())}catch{return}}getRequiredService(e){let t=this.resolutionStack.length===0;if(this.resolutionStack.includes(e.toString())){let r=[...this.resolutionStack,e.toString()].map(a=>String(a)).join(" \u2192 ");throw new Error(`Circular dependency detected: ${r}`)}this.resolutionStack.push(e.toString());try{let r=this.serviceDescriptors.find(a=>a.serviceIdentifier.toString()===e.toString());if(!r){if(this.parent)return this.parent.getRequiredService(e.toString());throw new Error(`Service '${String(e)}' not registered`)}return this.resolveService(r)}catch(r){throw this.resolutionStack.pop(),r}finally{this.resolutionStack[this.resolutionStack.length-1]===e.toString()&&this.resolutionStack.pop(),t&&(this.resolutionStack=[]);}}resolveService(e){switch(e.lifetime){case n.Singleton:return this.resolveSingleton(e);case n.Scoped:return this.resolveScoped(e);case n.Transient:return this.resolveTransient(e);default:throw new Error(`Unknown lifetime: ${e.lifetime}`)}}resolveSingleton(e){let{serviceIdentifier:t}=e;if(this.singletons.has(t.toString()))return this.singletons.get(t.toString());let r=this.createInstance(e);return this.singletons.set(t.toString(),r),r}resolveScoped(e){let{serviceIdentifier:t}=e;if(!this.parent)throw new Error(`Cannot resolve scoped service '${String(t)}' from root provider. Use createScope() first.`);if(this.scopedInstances.has(t.toString()))return this.scopedInstances.get(t.toString());let r=this.createInstance(e);return this.scopedInstances.set(t.toString(),r),r}resolveTransient(e){return this.createInstance(e)}createInstance(e){if(e.implementationInstance!==void 0)return e.implementationInstance;if(e.implementationFactory)return e.implementationFactory(this);if(e.implementationType)return this.constructInstance(e);throw new Error(`Cannot create instance for service '${String(e.serviceIdentifier)}'`)}constructInstance(e){let{implementationType:t,dependencies:r}=e;if(!t)throw new Error("Implementation type is required");if(r&&r.length>0){let c=r.map(S=>this.getRequiredService(S));return new t(...c)}let a=Reflect.getMetadata("inject:params",t),h=Reflect.getMetadata("design:paramtypes",t)||[],v=Math.max(h.length,a?Math.max(...Object.keys(a).map(c=>parseInt(c)))+1:0),g=[];for(let c=0;c<v;c++){let S=a?.[c];if(S)g.push(this.getRequiredService(S));else if(h[c]){let q=h[c].name||h[c];g.push(this.getRequiredService(q));}else throw new Error(`Cannot resolve parameter at index ${c} for ${t.name}`)}return new t(...g)}createScope(){let e=new w(this.serviceDescriptors,this);return {serviceProvider:e,dispose:s(()=>{e.scopedInstances.clear();},"dispose")}}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())||(this.parent?.has(e.toString())??false)}};s(w,"ServiceProvider");var d=w;var y=class y{constructor(){i(this,"serviceDescriptors",[]);}addSingleton(e,t){return typeof t=="function"?this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Singleton}):this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationInstance:t,lifetime:n.Singleton}),this}addScoped(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped}),this}addTransient(e,t){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Transient}),this}addFactory(e,t,r=n.Transient){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationFactory:t,lifetime:r}),this}addScopedWithDependencies(e,t,r){return this.serviceDescriptors.push({serviceIdentifier:e.toString(),implementationType:t,lifetime:n.Scoped,dependencies:r}),this}buildServiceProvider(){return new d([...this.serviceDescriptors])}getDescriptors(){return [...this.serviceDescriptors]}has(e){return this.serviceDescriptors.some(t=>t.serviceIdentifier.toString()===e.toString())}get count(){return this.serviceDescriptors.length}};s(y,"ServiceCollection");var u=y;function N(o){return (e,t,r)=>{let h={...Reflect.getOwnMetadata("inject:params",e)||{}};h[r]=o.toString(),Reflect.defineMetadata("inject:params",h,e);}}s(N,"Inject");var x=class x{constructor(e){i(this,"request");i(this,"response");i(this,"metadata",new Map);this.request=e;}setMetadata(e,t){this.metadata.set(e,t);}getMetadata(e){return this.metadata.get(e)}};s(x,"PipelineContext");var l=x;var I=class I{constructor(e){i(this,"serviceProvider");i(this,"behaviors",[]);this.serviceProvider=e;let t=this.serviceProvider.getService("PipelineBehaviors");t&&(this.behaviors=t);}async send(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(this.isAsyncIterable(r))throw new Error("Handler returned a stream. Use stream() method instead of send().");return r}finally{t.dispose();}}async stream(e){let t=this.serviceProvider.createScope();try{let r=await this.executeHandler(e,t.serviceProvider);if(!this.isAsyncIterable(r))throw new Error("Handler did not return a stream. Use send() method instead of stream().");return r}finally{t.dispose();}}async executeHandler(e,t){let r=t.getService(e.type);if(!r)throw new Error(`No handler registered for request type: ${String(e.type)}`);let a=new l(e);return this.behaviors.length===0?await r.handle(e):await this.executePipeline(a,r,this.behaviors)}async executePipeline(e,t,r){let a=0,h=s(async()=>{if(a<r.length)return await r[a++].handle(e,h);let v=await t.handle(e.request);return e.response=v,v},"next");return await h()}isAsyncIterable(e){return e!=null&&typeof e[Symbol.asyncIterator]=="function"}};s(I,"Mediator");var f=I;var P=class P{handle(e){return this.handleSimple(e)}};s(P,"SimpleHandler");var D=P,b=class b{handle(e){return this.handleStream(e)}};s(b,"StreamingHandler");var E=b;var R=class R{constructor(e){i(this,"type");this.type=e.toString();}};s(R,"BaseCommunicationObject");var p=R;var k=class k extends p{constructor(t){super(t);i(this,"uuid");i(this,"timestamp");i(this,"AbortSignal");this.uuid=v4(),this.timestamp=new Date;}};s(k,"BaseRequest");var T=k;var j=class j extends p{constructor(t){super(t);i(this,"success");i(this,"errors");i(this,"timestamp");this.timestamp=new Date,this.success=true;}setErrors(t){return this.success=false,this.errors=t,this}addError(t){return this.errors||(this.errors=[]),this.errors.push(t),this.success=false,this}};s(j,"BaseResponse");var M=j;var C=class C{constructor(e,t,r){i(this,"serviceProvider");i(this,"mediator");i(this,"isRunning",false);i(this,"adapters");this.serviceProvider=e,this.mediator=t,this.adapters=r;}async run(){if(this.isRunning)throw new Error("Application is already running");for(let e of this.adapters)e.initialize&&await e.initialize(this);this.isRunning=true;}async stop(){if(this.isRunning){for(let e of [...this.adapters].reverse())e.dispose&&await e.dispose();this.isRunning=false;}}async send(e){if(!this.isRunning)throw new Error("Application must be running before sending requests. Call app.run() first.");return this.mediator.send(e)}async stream(e){if(!this.isRunning)throw new Error("Application must be running before streaming requests. Call app.run() first.");return this.mediator.stream(e)}getServiceProvider(){return this.serviceProvider}getMediator(){return this.mediator}get running(){return this.isRunning}};s(C,"Application");var m=C;var B="PipelineBehaviors",$=class ${constructor(){i(this,"services");i(this,"adapters",[]);i(this,"pipelineBehaviors",[]);this.services=new u;}registerHandler(e,t,r=n.Transient){if(typeof t=="function")switch(r){case n.Singleton:this.services.addSingleton(e,t);break;case n.Scoped:this.services.addScoped(e,t);break;case n.Transient:default:this.services.addTransient(e,t);break}else this.services.addSingleton(e,t);return this}registerHandlers(e){return e.forEach((t,r)=>{this.registerHandler(r,t);}),this}registerBehavior(e){return this.pipelineBehaviors.push(e),this}registerSingleton(e,t){return this.services.addSingleton(e,t),this}registerScoped(e,t){return this.services.addScoped(e,t),this}registerTransient(e,t){return this.services.addTransient(e,t),this}registerFactory(e,t,r=n.Transient){return this.services.addFactory(e,t,r),this}use(e){return this.adapters.push(e),this}getServiceCollection(){return this.services}async build(){for(let r of this.adapters)await r.configure(this.services);this.pipelineBehaviors.length>0&&this.services.addSingleton(B,this.pipelineBehaviors.map(r=>typeof r=="function"?new r:r));let e=this.services.buildServiceProvider(),t=new f(e);return new m(e,t,this.adapters)}};s($,"ApplicationBuilder");var A=$;export{m as Application,A as ApplicationBuilder,p as BaseCommunicationObject,T as BaseRequest,M as BaseResponse,N as Inject,f as Mediator,l as PipelineContext,u as ServiceCollection,n as ServiceLifetime,d as ServiceProvider,D as SimpleHandler,E as StreamingHandler};
@@ -1,6 +1,6 @@
1
- import { a as BaseRequest, b as BaseResponse, I as IRequestHandler } from '../IRequestHandler-Dp4jjwcB.mjs';
2
- export { H as HandlerResult } from '../IRequestHandler-Dp4jjwcB.mjs';
3
- export { M as Mediator } from '../Mediator-IEaPewwN.mjs';
1
+ import { a as BaseRequest, b as BaseResponse, I as IRequestHandler } from '../IRequestHandler-DmhXQ-Ls.mjs';
2
+ export { H as HandlerResult } from '../IRequestHandler-DmhXQ-Ls.mjs';
3
+ export { M as Mediator } from '../Mediator-VnHApRVc.mjs';
4
4
  import '../ServiceProvider-BE1-lOxZ.mjs';
5
5
 
6
6
  declare abstract class SimpleHandler<TRequest extends BaseRequest, TResponse extends BaseResponse> implements IRequestHandler<TRequest, TResponse> {
@@ -1,6 +1,6 @@
1
- import { a as BaseRequest, b as BaseResponse, I as IRequestHandler } from '../IRequestHandler-Dp4jjwcB.js';
2
- export { H as HandlerResult } from '../IRequestHandler-Dp4jjwcB.js';
3
- export { M as Mediator } from '../Mediator-DsZR19WY.js';
1
+ import { a as BaseRequest, b as BaseResponse, I as IRequestHandler } from '../IRequestHandler-DmhXQ-Ls.js';
2
+ export { H as HandlerResult } from '../IRequestHandler-DmhXQ-Ls.js';
3
+ export { M as Mediator } from '../Mediator-BD53uc1I.js';
4
4
  import '../ServiceProvider-BE1-lOxZ.js';
5
5
 
6
6
  declare abstract class SimpleHandler<TRequest extends BaseRequest, TResponse extends BaseResponse> implements IRequestHandler<TRequest, TResponse> {
@@ -1,4 +1,4 @@
1
- import { a as BaseRequest, b as BaseResponse, H as HandlerResult } from '../IRequestHandler-Dp4jjwcB.mjs';
1
+ import { a as BaseRequest, b as BaseResponse, H as HandlerResult } from '../IRequestHandler-DmhXQ-Ls.mjs';
2
2
 
3
3
  declare class PipelineContext {
4
4
  readonly request: BaseRequest;
@@ -1,4 +1,4 @@
1
- import { a as BaseRequest, b as BaseResponse, H as HandlerResult } from '../IRequestHandler-Dp4jjwcB.js';
1
+ import { a as BaseRequest, b as BaseResponse, H as HandlerResult } from '../IRequestHandler-DmhXQ-Ls.js';
2
2
 
3
3
  declare class PipelineContext {
4
4
  readonly request: BaseRequest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oldzy/conduit",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Transport-agnostic request/response pipeline framework with mediator pattern, dependency injection, and middleware support",
5
5
  "author": "oldzy",
6
6
  "license": "MIT",