UNPKG

@hexadrop/command

Version:

Hexagonal architecture utils library

2 lines 564 B
import{a as n}from"./chunk-L2QG74AD.js";import"./chunk-LHZGEWBL.js";import{a as d,b as C}from"./chunk-IPU6EBNI.js";import{a as t}from"./chunk-NW4ORICH.js";import"./chunk-YUO2TGC7.js";var o=class extends t{constructor(e){super();this.container=e}search(e){let a,m;if("COMMAND_NAME"in e?(m=e.COMMAND_NAME,a=Reflect.getMetadata(n,e)):"commandName"in e&&(m=e.commandName,a=Reflect.getMetadata(n,e.constructor)),!m)throw new C;if(!a)throw new d(m);let r=this.container.get(a);return r.run.bind(r)}};export{o as default}; //# sourceMappingURL=ioc.command-handlers.js.map