Comparing version 2.2.5 to 2.2.6
# Awilix Changelog | ||
## 2.2.6 | ||
* Pass in the module descriptor to `formatName` - thanks @anasinnyk! | ||
## 2.2.5 | ||
@@ -4,0 +8,0 @@ |
@@ -1,1 +0,1 @@ | ||
{"/Users/jeff/Projects/awilix/lib/awilix.js":{"path":"/Users/jeff/Projects/awilix/lib/awilix.js","s":{"1":1,"2":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":7,"column":1}},"2":{"start":{"line":10,"column":0},"end":{"line":10,"column":57}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/createContainer.js":{"path":"/Users/jeff/Projects/awilix/lib/createContainer.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":59,"11":59,"12":59,"13":59,"14":59,"15":63,"16":2,"17":59,"18":59,"19":59,"20":59,"21":8,"22":59,"23":61,"24":1,"25":59,"26":59,"27":120,"28":59,"29":17,"30":59,"31":59,"32":72,"33":72,"34":76,"35":76,"36":72,"37":59,"38":59,"39":177,"40":24,"41":24,"42":36,"43":36,"44":36,"45":5,"46":5,"47":36,"48":24,"49":59,"50":59,"51":59,"52":59,"53":85,"54":57,"55":85,"56":85,"57":85,"58":85,"59":1,"60":84,"61":5,"62":79,"63":79,"64":79,"65":47,"66":33,"67":6,"68":6,"69":2,"70":2,"71":4,"72":6,"73":25,"74":38,"75":38,"76":14,"77":14,"78":25,"79":11,"80":11,"81":25,"82":1,"83":64,"84":64,"85":21,"86":21,"87":85,"88":71,"89":59,"90":59,"91":3,"92":3,"93":59,"94":59},"b":{"1":[1,1],"2":[17,42],"3":[59,59],"4":[120,37],"5":[5,31],"6":[57,28],"7":[1,84],"8":[5,79],"9":[47,6,25,1],"10":[2,4],"11":[14,24],"12":[11,14],"13":[71,14]},"f":{"1":59,"2":63,"3":8},"fnMap":{"1":{"name":"createContainer","line":24,"loc":{"start":{"line":24,"column":17},"end":{"line":24,"column":71}}},"2":{"name":"(anonymous_2)","line":47,"loc":{"start":{"line":47,"column":22},"end":{"line":47,"column":25}}},"3":{"name":"(anonymous_3)","line":81,"loc":{"start":{"line":81,"column":32},"end":{"line":81,"column":47}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":44}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":67}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":64}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":56}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"7":{"start":{"line":7,"column":0},"end":{"line":7,"column":30}},"8":{"start":{"line":13,"column":0},"end":{"line":13,"column":40}},"9":{"start":{"line":24,"column":0},"end":{"line":348,"column":1}},"10":{"start":{"line":25,"column":2},"end":{"line":25,"column":38}},"11":{"start":{"line":31,"column":2},"end":{"line":31,"column":26}},"12":{"start":{"line":35,"column":2},"end":{"line":35,"column":32}},"13":{"start":{"line":38,"column":2},"end":{"line":38,"column":26}},"14":{"start":{"line":41,"column":2},"end":{"line":57,"column":3}},"15":{"start":{"line":48,"column":6},"end":{"line":48,"column":34}},"16":{"start":{"line":55,"column":6},"end":{"line":55,"column":134}},"17":{"start":{"line":60,"column":2},"end":{"line":62,"column":17}},"18":{"start":{"line":70,"column":2},"end":{"line":70,"column":37}},"19":{"start":{"line":77,"column":2},"end":{"line":77,"column":22}},"20":{"start":{"line":80,"column":2},"end":{"line":84,"column":3}},"21":{"start":{"line":81,"column":49},"end":{"line":81,"column":69}},"22":{"start":{"line":91,"column":2},"end":{"line":115,"column":4}},"23":{"start":{"line":104,"column":27},"end":{"line":104,"column":40}},"24":{"start":{"line":113,"column":6},"end":{"line":113,"column":104}},"25":{"start":{"line":117,"column":2},"end":{"line":117,"column":27}},"26":{"start":{"line":125,"column":2},"end":{"line":131,"column":3}},"27":{"start":{"line":126,"column":4},"end":{"line":130,"column":5}},"28":{"start":{"line":139,"column":2},"end":{"line":141,"column":3}},"29":{"start":{"line":140,"column":4},"end":{"line":140,"column":46}},"30":{"start":{"line":143,"column":2},"end":{"line":143,"column":37}},"31":{"start":{"line":154,"column":2},"end":{"line":162,"column":3}},"32":{"start":{"line":155,"column":4},"end":{"line":155,"column":53}},"33":{"start":{"line":156,"column":4},"end":{"line":159,"column":5}},"34":{"start":{"line":157,"column":6},"end":{"line":157,"column":28}},"35":{"start":{"line":158,"column":6},"end":{"line":158,"column":32}},"36":{"start":{"line":161,"column":4},"end":{"line":161,"column":20}},"37":{"start":{"line":164,"column":2},"end":{"line":164,"column":31}},"38":{"start":{"line":169,"column":2},"end":{"line":189,"column":3}},"39":{"start":{"line":169,"column":31},"end":{"line":189,"column":3}},"40":{"start":{"line":171,"column":4},"end":{"line":171,"column":46}},"41":{"start":{"line":173,"column":4},"end":{"line":185,"column":5}},"42":{"start":{"line":174,"column":6},"end":{"line":174,"column":36}},"43":{"start":{"line":177,"column":6},"end":{"line":177,"column":36}},"44":{"start":{"line":178,"column":6},"end":{"line":182,"column":7}},"45":{"start":{"line":180,"column":8},"end":{"line":180,"column":58}},"46":{"start":{"line":181,"column":8},"end":{"line":181,"column":44}},"47":{"start":{"line":184,"column":6},"end":{"line":184,"column":46}},"48":{"start":{"line":188,"column":4},"end":{"line":188,"column":20}},"49":{"start":{"line":203,"column":2},"end":{"line":203,"column":55}},"50":{"start":{"line":217,"column":2},"end":{"line":217,"column":49}},"51":{"start":{"line":231,"column":2},"end":{"line":231,"column":49}},"52":{"start":{"line":242,"column":2},"end":{"line":321,"column":3}},"53":{"start":{"line":243,"column":4},"end":{"line":245,"column":5}},"54":{"start":{"line":244,"column":6},"end":{"line":244,"column":49}},"55":{"start":{"line":249,"column":4},"end":{"line":249,"column":33}},"56":{"start":{"line":251,"column":4},"end":{"line":320,"column":5}},"57":{"start":{"line":253,"column":6},"end":{"line":253,"column":52}},"58":{"start":{"line":254,"column":6},"end":{"line":256,"column":7}},"59":{"start":{"line":255,"column":8},"end":{"line":255,"column":95}},"60":{"start":{"line":258,"column":6},"end":{"line":260,"column":7}},"61":{"start":{"line":259,"column":8},"end":{"line":259,"column":62}},"62":{"start":{"line":263,"column":6},"end":{"line":263,"column":32}},"63":{"start":{"line":266,"column":6},"end":{"line":266,"column":26}},"64":{"start":{"line":267,"column":6},"end":{"line":306,"column":7}},"65":{"start":{"line":270,"column":10},"end":{"line":270,"column":52}},"66":{"start":{"line":271,"column":10},"end":{"line":271,"column":15}},"67":{"start":{"line":274,"column":10},"end":{"line":274,"column":35}},"68":{"start":{"line":275,"column":10},"end":{"line":280,"column":11}},"69":{"start":{"line":276,"column":12},"end":{"line":276,"column":54}},"70":{"start":{"line":277,"column":12},"end":{"line":277,"column":39}},"71":{"start":{"line":279,"column":12},"end":{"line":279,"column":29}},"72":{"start":{"line":281,"column":10},"end":{"line":281,"column":15}},"73":{"start":{"line":289,"column":10},"end":{"line":296,"column":11}},"74":{"start":{"line":290,"column":12},"end":{"line":290,"column":34}},"75":{"start":{"line":291,"column":12},"end":{"line":295,"column":13}},"76":{"start":{"line":293,"column":14},"end":{"line":293,"column":31}},"77":{"start":{"line":294,"column":14},"end":{"line":294,"column":19}},"78":{"start":{"line":299,"column":10},"end":{"line":302,"column":11}},"79":{"start":{"line":300,"column":12},"end":{"line":300,"column":54}},"80":{"start":{"line":301,"column":12},"end":{"line":301,"column":44}},"81":{"start":{"line":303,"column":10},"end":{"line":303,"column":15}},"82":{"start":{"line":305,"column":10},"end":{"line":305,"column":111}},"83":{"start":{"line":308,"column":6},"end":{"line":308,"column":27}},"84":{"start":{"line":309,"column":6},"end":{"line":309,"column":21}},"85":{"start":{"line":312,"column":6},"end":{"line":312,"column":26}},"86":{"start":{"line":313,"column":6},"end":{"line":313,"column":15}},"87":{"start":{"line":317,"column":6},"end":{"line":319,"column":7}},"88":{"start":{"line":318,"column":8},"end":{"line":318,"column":34}},"89":{"start":{"line":323,"column":2},"end":{"line":323,"column":29}},"90":{"start":{"line":334,"column":2},"end":{"line":337,"column":3}},"91":{"start":{"line":335,"column":4},"end":{"line":335,"column":53}},"92":{"start":{"line":336,"column":4},"end":{"line":336,"column":20}},"93":{"start":{"line":344,"column":2},"end":{"line":344,"column":37}},"94":{"start":{"line":347,"column":2},"end":{"line":347,"column":18}}},"branchMap":{"1":{"line":55,"type":"cond-expr","locations":[{"start":{"line":55,"column":54},"end":{"line":55,"column":64}},{"start":{"line":55,"column":67},"end":{"line":55,"column":69}}]},"2":{"line":60,"type":"cond-expr","locations":[{"start":{"line":61,"column":6},"end":{"line":61,"column":56}},{"start":{"line":62,"column":6},"end":{"line":62,"column":17}}]},"3":{"line":81,"type":"binary-expr","locations":[{"start":{"line":81,"column":13},"end":{"line":81,"column":28}},{"start":{"line":81,"column":32},"end":{"line":81,"column":70}}]},"4":{"line":128,"type":"binary-expr","locations":[{"start":{"line":128,"column":6},"end":{"line":128,"column":23}},{"start":{"line":128,"column":27},"end":{"line":128,"column":58}}]},"5":{"line":178,"type":"if","locations":[{"start":{"line":178,"column":6},"end":{"line":178,"column":6}},{"start":{"line":178,"column":6},"end":{"line":178,"column":6}}]},"6":{"line":243,"type":"if","locations":[{"start":{"line":243,"column":4},"end":{"line":243,"column":4}},{"start":{"line":243,"column":4},"end":{"line":243,"column":4}}]},"7":{"line":254,"type":"if","locations":[{"start":{"line":254,"column":6},"end":{"line":254,"column":6}},{"start":{"line":254,"column":6},"end":{"line":254,"column":6}}]},"8":{"line":258,"type":"if","locations":[{"start":{"line":258,"column":6},"end":{"line":258,"column":6}},{"start":{"line":258,"column":6},"end":{"line":258,"column":6}}]},"9":{"line":267,"type":"switch","locations":[{"start":{"line":268,"column":8},"end":{"line":271,"column":15}},{"start":{"line":272,"column":8},"end":{"line":281,"column":15}},{"start":{"line":282,"column":8},"end":{"line":303,"column":15}},{"start":{"line":304,"column":8},"end":{"line":305,"column":111}}]},"10":{"line":275,"type":"if","locations":[{"start":{"line":275,"column":10},"end":{"line":275,"column":10}},{"start":{"line":275,"column":10},"end":{"line":275,"column":10}}]},"11":{"line":291,"type":"if","locations":[{"start":{"line":291,"column":12},"end":{"line":291,"column":12}},{"start":{"line":291,"column":12},"end":{"line":291,"column":12}}]},"12":{"line":299,"type":"if","locations":[{"start":{"line":299,"column":10},"end":{"line":299,"column":10}},{"start":{"line":299,"column":10},"end":{"line":299,"column":10}}]},"13":{"line":317,"type":"if","locations":[{"start":{"line":317,"column":6},"end":{"line":317,"column":6}},{"start":{"line":317,"column":6},"end":{"line":317,"column":6}}]}}},"/Users/jeff/Projects/awilix/lib/loadModules.js":{"path":"/Users/jeff/Projects/awilix/lib/loadModules.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":10,"10":10,"11":10,"12":10,"13":10,"14":20,"15":20,"16":1,"17":19,"18":5,"19":3,"20":2,"21":14,"22":10,"23":20,"24":17,"25":17,"26":17,"27":3,"28":2,"29":3,"30":2,"31":17,"32":17,"33":17,"34":17,"35":5,"36":17,"37":17,"38":10},"b":{"1":[10,2],"2":[1,19],"3":[5,14],"4":[3,2],"5":[5,3],"6":[3,14],"7":[2,1],"8":[2,1],"9":[1,16],"10":[17,17,1],"11":[5,12]},"f":{"1":10},"fnMap":{"1":{"name":"loadModules","line":35,"loc":{"start":{"line":35,"column":17},"end":{"line":35,"column":73}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":39}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":35}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":37}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":42}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":38}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":48}},"7":{"start":{"line":8,"column":0},"end":{"line":10,"column":1}},"8":{"start":{"line":35,"column":0},"end":{"line":94,"column":1}},"9":{"start":{"line":36,"column":2},"end":{"line":36,"column":19}},"10":{"start":{"line":37,"column":2},"end":{"line":41,"column":10}},"11":{"start":{"line":42,"column":2},"end":{"line":42,"column":42}},"12":{"start":{"line":43,"column":2},"end":{"line":43,"column":62}},"13":{"start":{"line":45,"column":2},"end":{"line":63,"column":4}},"14":{"start":{"line":46,"column":4},"end":{"line":46,"column":47}},"15":{"start":{"line":49,"column":4},"end":{"line":51,"column":5}},"16":{"start":{"line":50,"column":6},"end":{"line":50,"column":22}},"17":{"start":{"line":53,"column":4},"end":{"line":60,"column":5}},"18":{"start":{"line":54,"column":6},"end":{"line":57,"column":7}},"19":{"start":{"line":56,"column":8},"end":{"line":56,"column":68}},"20":{"start":{"line":59,"column":6},"end":{"line":59,"column":22}},"21":{"start":{"line":62,"column":4},"end":{"line":62,"column":56}},"22":{"start":{"line":64,"column":2},"end":{"line":90,"column":4}},"23":{"start":{"line":64,"column":21},"end":{"line":64,"column":22}},"24":{"start":{"line":65,"column":4},"end":{"line":65,"column":23}},"25":{"start":{"line":66,"column":4},"end":{"line":66,"column":35}},"26":{"start":{"line":67,"column":4},"end":{"line":75,"column":5}},"27":{"start":{"line":68,"column":6},"end":{"line":70,"column":7}},"28":{"start":{"line":69,"column":8},"end":{"line":69,"column":45}},"29":{"start":{"line":72,"column":6},"end":{"line":74,"column":7}},"30":{"start":{"line":73,"column":8},"end":{"line":73,"column":30}},"31":{"start":{"line":77,"column":4},"end":{"line":77,"column":85}},"32":{"start":{"line":78,"column":4},"end":{"line":78,"column":106}},"33":{"start":{"line":79,"column":4},"end":{"line":79,"column":26}},"34":{"start":{"line":81,"column":4},"end":{"line":83,"column":5}},"35":{"start":{"line":82,"column":6},"end":{"line":82,"column":37}},"36":{"start":{"line":85,"column":4},"end":{"line":85,"column":66}},"37":{"start":{"line":86,"column":4},"end":{"line":89,"column":5}},"38":{"start":{"line":91,"column":2},"end":{"line":93,"column":3}}},"branchMap":{"1":{"line":36,"type":"binary-expr","locations":[{"start":{"line":36,"column":9},"end":{"line":36,"column":13}},{"start":{"line":36,"column":17},"end":{"line":36,"column":19}}]},"2":{"line":49,"type":"if","locations":[{"start":{"line":49,"column":4},"end":{"line":49,"column":4}},{"start":{"line":49,"column":4},"end":{"line":49,"column":4}}]},"3":{"line":53,"type":"if","locations":[{"start":{"line":53,"column":4},"end":{"line":53,"column":4}},{"start":{"line":53,"column":4},"end":{"line":53,"column":4}}]},"4":{"line":54,"type":"if","locations":[{"start":{"line":54,"column":6},"end":{"line":54,"column":6}},{"start":{"line":54,"column":6},"end":{"line":54,"column":6}}]},"5":{"line":54,"type":"binary-expr","locations":[{"start":{"line":54,"column":10},"end":{"line":54,"column":24}},{"start":{"line":54,"column":28},"end":{"line":54,"column":54}}]},"6":{"line":67,"type":"if","locations":[{"start":{"line":67,"column":4},"end":{"line":67,"column":4}},{"start":{"line":67,"column":4},"end":{"line":67,"column":4}}]},"7":{"line":68,"type":"if","locations":[{"start":{"line":68,"column":6},"end":{"line":68,"column":6}},{"start":{"line":68,"column":6},"end":{"line":68,"column":6}}]},"8":{"line":72,"type":"if","locations":[{"start":{"line":72,"column":6},"end":{"line":72,"column":6}},{"start":{"line":72,"column":6},"end":{"line":72,"column":6}}]},"9":{"line":77,"type":"cond-expr","locations":[{"start":{"line":77,"column":37},"end":{"line":77,"column":58}},{"start":{"line":77,"column":61},"end":{"line":77,"column":85}}]},"10":{"line":78,"type":"binary-expr","locations":[{"start":{"line":78,"column":22},"end":{"line":78,"column":46}},{"start":{"line":78,"column":50},"end":{"line":78,"column":83}},{"start":{"line":78,"column":88},"end":{"line":78,"column":106}}]},"11":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":4},"end":{"line":81,"column":4}},{"start":{"line":81,"column":4},"end":{"line":81,"column":4}}]}}},"/Users/jeff/Projects/awilix/lib/isFunction.js":{"path":"/Users/jeff/Projects/awilix/lib/isFunction.js","s":{"1":1,"2":29},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":10,"column":0},"end":{"line":10,"column":49}},"2":{"start":{"line":10,"column":24},"end":{"line":10,"column":49}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/Lifetime.js":{"path":"/Users/jeff/Projects/awilix/lib/Lifetime.js","s":{"1":1,"2":1,"3":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":5,"column":0},"end":{"line":5,"column":38}},"2":{"start":{"line":11,"column":0},"end":{"line":11,"column":38}},"3":{"start":{"line":17,"column":0},"end":{"line":17,"column":32}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/registrations.js":{"path":"/Users/jeff/Projects/awilix/lib/registrations.js","s":{"1":1,"2":1,"3":66,"4":1,"5":66,"6":15,"7":15,"8":66,"9":4,"10":5,"11":4,"12":1,"13":17,"14":9,"15":17,"16":1,"17":1,"18":52,"19":52,"20":52,"21":49,"22":52,"23":52,"24":52,"25":1,"26":1,"27":14,"28":14,"29":14,"30":5,"31":14,"32":14,"33":14,"34":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":14,"column":0},"end":{"line":16,"column":1}},"3":{"start":{"line":15,"column":2},"end":{"line":15,"column":43}},"4":{"start":{"line":31,"column":0},"end":{"line":43,"column":1}},"5":{"start":{"line":32,"column":2},"end":{"line":35,"column":3}},"6":{"start":{"line":33,"column":4},"end":{"line":33,"column":24}},"7":{"start":{"line":34,"column":4},"end":{"line":34,"column":14}},"8":{"start":{"line":37,"column":2},"end":{"line":42,"column":3}},"9":{"start":{"line":39,"column":21},"end":{"line":39,"column":52}},"10":{"start":{"line":40,"column":18},"end":{"line":40,"column":46}},"11":{"start":{"line":41,"column":21},"end":{"line":41,"column":52}},"12":{"start":{"line":57,"column":0},"end":{"line":66,"column":1}},"13":{"start":{"line":58,"column":2},"end":{"line":60,"column":3}},"14":{"start":{"line":59,"column":4},"end":{"line":59,"column":16}},"15":{"start":{"line":62,"column":2},"end":{"line":65,"column":3}},"16":{"start":{"line":68,"column":0},"end":{"line":68,"column":32}},"17":{"start":{"line":86,"column":0},"end":{"line":101,"column":1}},"18":{"start":{"line":87,"column":2},"end":{"line":89,"column":3}},"19":{"start":{"line":91,"column":2},"end":{"line":91,"column":36}},"20":{"start":{"line":93,"column":2},"end":{"line":93,"column":53}},"21":{"start":{"line":93,"column":33},"end":{"line":93,"column":53}},"22":{"start":{"line":95,"column":2},"end":{"line":98,"column":3}},"23":{"start":{"line":99,"column":2},"end":{"line":99,"column":51}},"24":{"start":{"line":100,"column":2},"end":{"line":100,"column":15}},"25":{"start":{"line":103,"column":0},"end":{"line":103,"column":38}},"26":{"start":{"line":120,"column":0},"end":{"line":136,"column":1}},"27":{"start":{"line":121,"column":2},"end":{"line":123,"column":3}},"28":{"start":{"line":125,"column":2},"end":{"line":125,"column":36}},"29":{"start":{"line":127,"column":2},"end":{"line":127,"column":59}},"30":{"start":{"line":127,"column":33},"end":{"line":127,"column":59}},"31":{"start":{"line":129,"column":2},"end":{"line":132,"column":3}},"32":{"start":{"line":134,"column":2},"end":{"line":134,"column":51}},"33":{"start":{"line":135,"column":2},"end":{"line":135,"column":15}},"34":{"start":{"line":138,"column":0},"end":{"line":138,"column":32}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/listModules.js":{"path":"/Users/jeff/Projects/awilix/lib/listModules.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":12,"7":12,"8":12,"9":3,"10":3,"11":12,"12":12,"13":79,"14":12,"15":1,"16":9,"17":5,"18":8,"19":4},"b":{"1":[3,9],"2":[5,4]},"f":{"1":12,"2":9},"fnMap":{"1":{"name":"_listModules","line":23,"loc":{"start":{"line":23,"column":0},"end":{"line":23,"column":42}}},"2":{"name":"listModules","line":55,"loc":{"start":{"line":55,"column":17},"end":{"line":55,"column":59}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":28}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":36}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":28}},"5":{"start":{"line":23,"column":0},"end":{"line":38,"column":1}},"6":{"start":{"line":24,"column":2},"end":{"line":24,"column":69}},"7":{"start":{"line":25,"column":2},"end":{"line":25,"column":24}},"8":{"start":{"line":26,"column":2},"end":{"line":29,"column":3}},"9":{"start":{"line":27,"column":4},"end":{"line":27,"column":32}},"10":{"start":{"line":28,"column":4},"end":{"line":28,"column":32}},"11":{"start":{"line":31,"column":2},"end":{"line":31,"column":58}},"12":{"start":{"line":32,"column":2},"end":{"line":36,"column":5}},"13":{"start":{"line":32,"column":34},"end":{"line":36,"column":3}},"14":{"start":{"line":37,"column":2},"end":{"line":37,"column":15}},"15":{"start":{"line":55,"column":0},"end":{"line":65,"column":1}},"16":{"start":{"line":56,"column":2},"end":{"line":62,"column":3}},"17":{"start":{"line":57,"column":4},"end":{"line":61,"column":5}},"18":{"start":{"line":59,"column":13},"end":{"line":59,"column":34}},"19":{"start":{"line":64,"column":2},"end":{"line":64,"column":41}}},"branchMap":{"1":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":2},"end":{"line":26,"column":2}},{"start":{"line":26,"column":2},"end":{"line":26,"column":2}}]},"2":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":56,"column":2}},{"start":{"line":56,"column":2},"end":{"line":56,"column":2}}]}}},"/Users/jeff/Projects/awilix/lib/flatten.js":{"path":"/Users/jeff/Projects/awilix/lib/flatten.js","s":{"1":1,"2":6,"3":6,"4":10,"5":37,"6":6},"b":{},"f":{"1":6},"fnMap":{"1":{"name":"flatten","line":10,"loc":{"start":{"line":10,"column":17},"end":{"line":10,"column":42}}}},"statementMap":{"1":{"start":{"line":10,"column":0},"end":{"line":19,"column":1}},"2":{"start":{"line":11,"column":2},"end":{"line":11,"column":19}},"3":{"start":{"line":12,"column":2},"end":{"line":16,"column":4}},"4":{"start":{"line":13,"column":4},"end":{"line":15,"column":6}},"5":{"start":{"line":14,"column":6},"end":{"line":14,"column":23}},"6":{"start":{"line":18,"column":2},"end":{"line":18,"column":15}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/AwilixResolutionError.js":{"path":"/Users/jeff/Projects/awilix/lib/AwilixResolutionError.js","s":{"1":1,"2":1,"3":1,"4":7,"5":7,"6":7,"7":7,"8":7,"9":2,"10":7,"11":7,"12":7,"13":7,"14":1},"b":{"1":[2,5]},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":45,"loc":{"start":{"line":45,"column":14},"end":{"line":45,"column":47}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":29}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":52}},"3":{"start":{"line":16,"column":0},"end":{"line":29,"column":1}},"4":{"start":{"line":17,"column":2},"end":{"line":17,"column":43}},"5":{"start":{"line":18,"column":2},"end":{"line":18,"column":28}},"6":{"start":{"line":19,"column":2},"end":{"line":19,"column":59}},"7":{"start":{"line":20,"column":2},"end":{"line":20,"column":42}},"8":{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},"9":{"start":{"line":22,"column":4},"end":{"line":22,"column":24}},"10":{"start":{"line":25,"column":2},"end":{"line":25,"column":18}},"11":{"start":{"line":26,"column":2},"end":{"line":26,"column":51}},"12":{"start":{"line":28,"column":2},"end":{"line":28,"column":12}},"13":{"start":{"line":46,"column":4},"end":{"line":46,"column":61}},"14":{"start":{"line":50,"column":0},"end":{"line":50,"column":38}}},"branchMap":{"1":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":2},"end":{"line":21,"column":2}},{"start":{"line":21,"column":2},"end":{"line":21,"column":2}}]}}},"/Users/jeff/Projects/awilix/lib/ExtendableError.js":{"path":"/Users/jeff/Projects/awilix/lib/ExtendableError.js","s":{"1":7,"2":7,"3":7,"4":7,"5":1},"b":{},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":12,"loc":{"start":{"line":12,"column":14},"end":{"line":12,"column":24}}}},"statementMap":{"1":{"start":{"line":13,"column":4},"end":{"line":13,"column":18}},"2":{"start":{"line":16,"column":4},"end":{"line":19,"column":6}},"3":{"start":{"line":21,"column":4},"end":{"line":24,"column":6}},"4":{"start":{"line":26,"column":4},"end":{"line":26,"column":51}},"5":{"start":{"line":30,"column":0},"end":{"line":30,"column":32}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/nameValueToObject.js":{"path":"/Users/jeff/Projects/awilix/lib/nameValueToObject.js","s":{"1":1,"2":1,"3":98,"4":98,"5":65,"6":98,"7":1},"b":{"1":[65,33]},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":48}},"2":{"start":{"line":14,"column":0},"end":{"line":21,"column":1}},"3":{"start":{"line":15,"column":2},"end":{"line":15,"column":16}},"4":{"start":{"line":16,"column":2},"end":{"line":18,"column":3}},"5":{"start":{"line":17,"column":4},"end":{"line":17,"column":42}},"6":{"start":{"line":20,"column":2},"end":{"line":20,"column":12}},"7":{"start":{"line":23,"column":0},"end":{"line":23,"column":34}}},"branchMap":{"1":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":2},"end":{"line":16,"column":2}},{"start":{"line":16,"column":2},"end":{"line":16,"column":2}}]}}},"/Users/jeff/Projects/awilix/lib/last.js":{"path":"/Users/jeff/Projects/awilix/lib/last.js","s":{"1":1,"2":86},"b":{},"f":{"1":86},"fnMap":{"1":{"name":"last","line":10,"loc":{"start":{"line":10,"column":17},"end":{"line":10,"column":37}}}},"statementMap":{"1":{"start":{"line":10,"column":0},"end":{"line":12,"column":1}},"2":{"start":{"line":11,"column":2},"end":{"line":11,"column":28}}},"branchMap":{}}} | ||
{"/Users/jeff/Projects/awilix/lib/awilix.js":{"path":"/Users/jeff/Projects/awilix/lib/awilix.js","s":{"1":1,"2":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":2,"column":0},"end":{"line":7,"column":1}},"2":{"start":{"line":10,"column":0},"end":{"line":10,"column":57}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/createContainer.js":{"path":"/Users/jeff/Projects/awilix/lib/createContainer.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":1,"10":59,"11":59,"12":59,"13":59,"14":59,"15":63,"16":2,"17":59,"18":59,"19":59,"20":59,"21":8,"22":59,"23":61,"24":1,"25":59,"26":59,"27":120,"28":59,"29":17,"30":59,"31":59,"32":72,"33":72,"34":76,"35":76,"36":72,"37":59,"38":59,"39":177,"40":24,"41":24,"42":36,"43":36,"44":36,"45":5,"46":5,"47":36,"48":24,"49":59,"50":59,"51":59,"52":59,"53":85,"54":57,"55":85,"56":85,"57":85,"58":85,"59":1,"60":84,"61":5,"62":79,"63":79,"64":79,"65":47,"66":33,"67":6,"68":6,"69":2,"70":2,"71":4,"72":6,"73":25,"74":38,"75":38,"76":14,"77":14,"78":25,"79":11,"80":11,"81":25,"82":1,"83":64,"84":64,"85":21,"86":21,"87":85,"88":71,"89":59,"90":59,"91":3,"92":3,"93":59,"94":59},"b":{"1":[1,1],"2":[17,42],"3":[59,59],"4":[120,37],"5":[5,31],"6":[57,28],"7":[1,84],"8":[5,79],"9":[47,6,25,1],"10":[2,4],"11":[14,24],"12":[11,14],"13":[71,14]},"f":{"1":59,"2":63,"3":8},"fnMap":{"1":{"name":"createContainer","line":24,"loc":{"start":{"line":24,"column":17},"end":{"line":24,"column":71}}},"2":{"name":"(anonymous_2)","line":47,"loc":{"start":{"line":47,"column":22},"end":{"line":47,"column":25}}},"3":{"name":"(anonymous_3)","line":81,"loc":{"start":{"line":81,"column":32},"end":{"line":81,"column":47}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":44}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":44}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":67}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":64}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":56}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":38}},"7":{"start":{"line":7,"column":0},"end":{"line":7,"column":30}},"8":{"start":{"line":13,"column":0},"end":{"line":13,"column":40}},"9":{"start":{"line":24,"column":0},"end":{"line":348,"column":1}},"10":{"start":{"line":25,"column":2},"end":{"line":25,"column":38}},"11":{"start":{"line":31,"column":2},"end":{"line":31,"column":26}},"12":{"start":{"line":35,"column":2},"end":{"line":35,"column":32}},"13":{"start":{"line":38,"column":2},"end":{"line":38,"column":26}},"14":{"start":{"line":41,"column":2},"end":{"line":57,"column":3}},"15":{"start":{"line":48,"column":6},"end":{"line":48,"column":34}},"16":{"start":{"line":55,"column":6},"end":{"line":55,"column":134}},"17":{"start":{"line":60,"column":2},"end":{"line":62,"column":17}},"18":{"start":{"line":70,"column":2},"end":{"line":70,"column":37}},"19":{"start":{"line":77,"column":2},"end":{"line":77,"column":22}},"20":{"start":{"line":80,"column":2},"end":{"line":84,"column":3}},"21":{"start":{"line":81,"column":49},"end":{"line":81,"column":69}},"22":{"start":{"line":91,"column":2},"end":{"line":115,"column":4}},"23":{"start":{"line":104,"column":27},"end":{"line":104,"column":40}},"24":{"start":{"line":113,"column":6},"end":{"line":113,"column":104}},"25":{"start":{"line":117,"column":2},"end":{"line":117,"column":27}},"26":{"start":{"line":125,"column":2},"end":{"line":131,"column":3}},"27":{"start":{"line":126,"column":4},"end":{"line":130,"column":5}},"28":{"start":{"line":139,"column":2},"end":{"line":141,"column":3}},"29":{"start":{"line":140,"column":4},"end":{"line":140,"column":46}},"30":{"start":{"line":143,"column":2},"end":{"line":143,"column":37}},"31":{"start":{"line":154,"column":2},"end":{"line":162,"column":3}},"32":{"start":{"line":155,"column":4},"end":{"line":155,"column":53}},"33":{"start":{"line":156,"column":4},"end":{"line":159,"column":5}},"34":{"start":{"line":157,"column":6},"end":{"line":157,"column":28}},"35":{"start":{"line":158,"column":6},"end":{"line":158,"column":32}},"36":{"start":{"line":161,"column":4},"end":{"line":161,"column":20}},"37":{"start":{"line":164,"column":2},"end":{"line":164,"column":31}},"38":{"start":{"line":169,"column":2},"end":{"line":189,"column":3}},"39":{"start":{"line":169,"column":31},"end":{"line":189,"column":3}},"40":{"start":{"line":171,"column":4},"end":{"line":171,"column":46}},"41":{"start":{"line":173,"column":4},"end":{"line":185,"column":5}},"42":{"start":{"line":174,"column":6},"end":{"line":174,"column":36}},"43":{"start":{"line":177,"column":6},"end":{"line":177,"column":36}},"44":{"start":{"line":178,"column":6},"end":{"line":182,"column":7}},"45":{"start":{"line":180,"column":8},"end":{"line":180,"column":58}},"46":{"start":{"line":181,"column":8},"end":{"line":181,"column":44}},"47":{"start":{"line":184,"column":6},"end":{"line":184,"column":46}},"48":{"start":{"line":188,"column":4},"end":{"line":188,"column":20}},"49":{"start":{"line":203,"column":2},"end":{"line":203,"column":55}},"50":{"start":{"line":217,"column":2},"end":{"line":217,"column":49}},"51":{"start":{"line":231,"column":2},"end":{"line":231,"column":49}},"52":{"start":{"line":242,"column":2},"end":{"line":321,"column":3}},"53":{"start":{"line":243,"column":4},"end":{"line":245,"column":5}},"54":{"start":{"line":244,"column":6},"end":{"line":244,"column":49}},"55":{"start":{"line":249,"column":4},"end":{"line":249,"column":33}},"56":{"start":{"line":251,"column":4},"end":{"line":320,"column":5}},"57":{"start":{"line":253,"column":6},"end":{"line":253,"column":52}},"58":{"start":{"line":254,"column":6},"end":{"line":256,"column":7}},"59":{"start":{"line":255,"column":8},"end":{"line":255,"column":95}},"60":{"start":{"line":258,"column":6},"end":{"line":260,"column":7}},"61":{"start":{"line":259,"column":8},"end":{"line":259,"column":62}},"62":{"start":{"line":263,"column":6},"end":{"line":263,"column":32}},"63":{"start":{"line":266,"column":6},"end":{"line":266,"column":26}},"64":{"start":{"line":267,"column":6},"end":{"line":306,"column":7}},"65":{"start":{"line":270,"column":10},"end":{"line":270,"column":52}},"66":{"start":{"line":271,"column":10},"end":{"line":271,"column":15}},"67":{"start":{"line":274,"column":10},"end":{"line":274,"column":35}},"68":{"start":{"line":275,"column":10},"end":{"line":280,"column":11}},"69":{"start":{"line":276,"column":12},"end":{"line":276,"column":54}},"70":{"start":{"line":277,"column":12},"end":{"line":277,"column":39}},"71":{"start":{"line":279,"column":12},"end":{"line":279,"column":29}},"72":{"start":{"line":281,"column":10},"end":{"line":281,"column":15}},"73":{"start":{"line":289,"column":10},"end":{"line":296,"column":11}},"74":{"start":{"line":290,"column":12},"end":{"line":290,"column":34}},"75":{"start":{"line":291,"column":12},"end":{"line":295,"column":13}},"76":{"start":{"line":293,"column":14},"end":{"line":293,"column":31}},"77":{"start":{"line":294,"column":14},"end":{"line":294,"column":19}},"78":{"start":{"line":299,"column":10},"end":{"line":302,"column":11}},"79":{"start":{"line":300,"column":12},"end":{"line":300,"column":54}},"80":{"start":{"line":301,"column":12},"end":{"line":301,"column":44}},"81":{"start":{"line":303,"column":10},"end":{"line":303,"column":15}},"82":{"start":{"line":305,"column":10},"end":{"line":305,"column":111}},"83":{"start":{"line":308,"column":6},"end":{"line":308,"column":27}},"84":{"start":{"line":309,"column":6},"end":{"line":309,"column":21}},"85":{"start":{"line":312,"column":6},"end":{"line":312,"column":26}},"86":{"start":{"line":313,"column":6},"end":{"line":313,"column":15}},"87":{"start":{"line":317,"column":6},"end":{"line":319,"column":7}},"88":{"start":{"line":318,"column":8},"end":{"line":318,"column":34}},"89":{"start":{"line":323,"column":2},"end":{"line":323,"column":29}},"90":{"start":{"line":334,"column":2},"end":{"line":337,"column":3}},"91":{"start":{"line":335,"column":4},"end":{"line":335,"column":53}},"92":{"start":{"line":336,"column":4},"end":{"line":336,"column":20}},"93":{"start":{"line":344,"column":2},"end":{"line":344,"column":37}},"94":{"start":{"line":347,"column":2},"end":{"line":347,"column":18}}},"branchMap":{"1":{"line":55,"type":"cond-expr","locations":[{"start":{"line":55,"column":54},"end":{"line":55,"column":64}},{"start":{"line":55,"column":67},"end":{"line":55,"column":69}}]},"2":{"line":60,"type":"cond-expr","locations":[{"start":{"line":61,"column":6},"end":{"line":61,"column":56}},{"start":{"line":62,"column":6},"end":{"line":62,"column":17}}]},"3":{"line":81,"type":"binary-expr","locations":[{"start":{"line":81,"column":13},"end":{"line":81,"column":28}},{"start":{"line":81,"column":32},"end":{"line":81,"column":70}}]},"4":{"line":128,"type":"binary-expr","locations":[{"start":{"line":128,"column":6},"end":{"line":128,"column":23}},{"start":{"line":128,"column":27},"end":{"line":128,"column":58}}]},"5":{"line":178,"type":"if","locations":[{"start":{"line":178,"column":6},"end":{"line":178,"column":6}},{"start":{"line":178,"column":6},"end":{"line":178,"column":6}}]},"6":{"line":243,"type":"if","locations":[{"start":{"line":243,"column":4},"end":{"line":243,"column":4}},{"start":{"line":243,"column":4},"end":{"line":243,"column":4}}]},"7":{"line":254,"type":"if","locations":[{"start":{"line":254,"column":6},"end":{"line":254,"column":6}},{"start":{"line":254,"column":6},"end":{"line":254,"column":6}}]},"8":{"line":258,"type":"if","locations":[{"start":{"line":258,"column":6},"end":{"line":258,"column":6}},{"start":{"line":258,"column":6},"end":{"line":258,"column":6}}]},"9":{"line":267,"type":"switch","locations":[{"start":{"line":268,"column":8},"end":{"line":271,"column":15}},{"start":{"line":272,"column":8},"end":{"line":281,"column":15}},{"start":{"line":282,"column":8},"end":{"line":303,"column":15}},{"start":{"line":304,"column":8},"end":{"line":305,"column":111}}]},"10":{"line":275,"type":"if","locations":[{"start":{"line":275,"column":10},"end":{"line":275,"column":10}},{"start":{"line":275,"column":10},"end":{"line":275,"column":10}}]},"11":{"line":291,"type":"if","locations":[{"start":{"line":291,"column":12},"end":{"line":291,"column":12}},{"start":{"line":291,"column":12},"end":{"line":291,"column":12}}]},"12":{"line":299,"type":"if","locations":[{"start":{"line":299,"column":10},"end":{"line":299,"column":10}},{"start":{"line":299,"column":10},"end":{"line":299,"column":10}}]},"13":{"line":317,"type":"if","locations":[{"start":{"line":317,"column":6},"end":{"line":317,"column":6}},{"start":{"line":317,"column":6},"end":{"line":317,"column":6}}]}}},"/Users/jeff/Projects/awilix/lib/loadModules.js":{"path":"/Users/jeff/Projects/awilix/lib/loadModules.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"7":1,"8":1,"9":10,"10":10,"11":10,"12":10,"13":10,"14":20,"15":20,"16":1,"17":19,"18":5,"19":3,"20":2,"21":14,"22":10,"23":20,"24":17,"25":17,"26":17,"27":3,"28":2,"29":3,"30":2,"31":17,"32":17,"33":17,"34":17,"35":5,"36":17,"37":17,"38":10},"b":{"1":[10,2],"2":[1,19],"3":[5,14],"4":[3,2],"5":[5,3],"6":[3,14],"7":[2,1],"8":[2,1],"9":[1,16],"10":[17,17,1],"11":[5,12]},"f":{"1":10},"fnMap":{"1":{"name":"loadModules","line":38,"loc":{"start":{"line":38,"column":17},"end":{"line":38,"column":73}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":39}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":35}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":37}},"4":{"start":{"line":4,"column":0},"end":{"line":4,"column":42}},"5":{"start":{"line":5,"column":0},"end":{"line":5,"column":38}},"6":{"start":{"line":6,"column":0},"end":{"line":6,"column":48}},"7":{"start":{"line":8,"column":0},"end":{"line":10,"column":1}},"8":{"start":{"line":38,"column":0},"end":{"line":107,"column":1}},"9":{"start":{"line":39,"column":2},"end":{"line":39,"column":19}},"10":{"start":{"line":40,"column":2},"end":{"line":44,"column":10}},"11":{"start":{"line":45,"column":2},"end":{"line":45,"column":42}},"12":{"start":{"line":46,"column":2},"end":{"line":46,"column":62}},"13":{"start":{"line":48,"column":2},"end":{"line":76,"column":4}},"14":{"start":{"line":49,"column":4},"end":{"line":49,"column":47}},"15":{"start":{"line":52,"column":4},"end":{"line":54,"column":5}},"16":{"start":{"line":53,"column":6},"end":{"line":53,"column":22}},"17":{"start":{"line":56,"column":4},"end":{"line":68,"column":5}},"18":{"start":{"line":57,"column":6},"end":{"line":65,"column":7}},"19":{"start":{"line":59,"column":8},"end":{"line":64,"column":9}},"20":{"start":{"line":67,"column":6},"end":{"line":67,"column":22}},"21":{"start":{"line":70,"column":4},"end":{"line":75,"column":5}},"22":{"start":{"line":77,"column":2},"end":{"line":103,"column":4}},"23":{"start":{"line":77,"column":21},"end":{"line":77,"column":22}},"24":{"start":{"line":78,"column":4},"end":{"line":78,"column":36}},"25":{"start":{"line":79,"column":4},"end":{"line":79,"column":35}},"26":{"start":{"line":80,"column":4},"end":{"line":88,"column":5}},"27":{"start":{"line":81,"column":6},"end":{"line":83,"column":7}},"28":{"start":{"line":82,"column":8},"end":{"line":82,"column":45}},"29":{"start":{"line":85,"column":6},"end":{"line":87,"column":7}},"30":{"start":{"line":86,"column":8},"end":{"line":86,"column":48}},"31":{"start":{"line":90,"column":4},"end":{"line":90,"column":98}},"32":{"start":{"line":91,"column":4},"end":{"line":91,"column":106}},"33":{"start":{"line":92,"column":4},"end":{"line":92,"column":52}},"34":{"start":{"line":94,"column":4},"end":{"line":96,"column":5}},"35":{"start":{"line":95,"column":6},"end":{"line":95,"column":63}},"36":{"start":{"line":98,"column":4},"end":{"line":98,"column":79}},"37":{"start":{"line":99,"column":4},"end":{"line":102,"column":5}},"38":{"start":{"line":104,"column":2},"end":{"line":106,"column":3}}},"branchMap":{"1":{"line":39,"type":"binary-expr","locations":[{"start":{"line":39,"column":9},"end":{"line":39,"column":13}},{"start":{"line":39,"column":17},"end":{"line":39,"column":19}}]},"2":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":4},"end":{"line":52,"column":4}},{"start":{"line":52,"column":4},"end":{"line":52,"column":4}}]},"3":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":4},"end":{"line":56,"column":4}},{"start":{"line":56,"column":4},"end":{"line":56,"column":4}}]},"4":{"line":57,"type":"if","locations":[{"start":{"line":57,"column":6},"end":{"line":57,"column":6}},{"start":{"line":57,"column":6},"end":{"line":57,"column":6}}]},"5":{"line":57,"type":"binary-expr","locations":[{"start":{"line":57,"column":10},"end":{"line":57,"column":24}},{"start":{"line":57,"column":28},"end":{"line":57,"column":54}}]},"6":{"line":80,"type":"if","locations":[{"start":{"line":80,"column":4},"end":{"line":80,"column":4}},{"start":{"line":80,"column":4},"end":{"line":80,"column":4}}]},"7":{"line":81,"type":"if","locations":[{"start":{"line":81,"column":6},"end":{"line":81,"column":6}},{"start":{"line":81,"column":6},"end":{"line":81,"column":6}}]},"8":{"line":85,"type":"if","locations":[{"start":{"line":85,"column":6},"end":{"line":85,"column":6}},{"start":{"line":85,"column":6},"end":{"line":85,"column":6}}]},"9":{"line":90,"type":"cond-expr","locations":[{"start":{"line":90,"column":50},"end":{"line":90,"column":71}},{"start":{"line":90,"column":74},"end":{"line":90,"column":98}}]},"10":{"line":91,"type":"binary-expr","locations":[{"start":{"line":91,"column":22},"end":{"line":91,"column":46}},{"start":{"line":91,"column":50},"end":{"line":91,"column":83}},{"start":{"line":91,"column":88},"end":{"line":91,"column":106}}]},"11":{"line":94,"type":"if","locations":[{"start":{"line":94,"column":4},"end":{"line":94,"column":4}},{"start":{"line":94,"column":4},"end":{"line":94,"column":4}}]}}},"/Users/jeff/Projects/awilix/lib/isFunction.js":{"path":"/Users/jeff/Projects/awilix/lib/isFunction.js","s":{"1":1,"2":29},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":10,"column":0},"end":{"line":10,"column":49}},"2":{"start":{"line":10,"column":24},"end":{"line":10,"column":49}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/Lifetime.js":{"path":"/Users/jeff/Projects/awilix/lib/Lifetime.js","s":{"1":1,"2":1,"3":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":5,"column":0},"end":{"line":5,"column":38}},"2":{"start":{"line":11,"column":0},"end":{"line":11,"column":38}},"3":{"start":{"line":17,"column":0},"end":{"line":17,"column":32}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/registrations.js":{"path":"/Users/jeff/Projects/awilix/lib/registrations.js","s":{"1":1,"2":1,"3":66,"4":1,"5":66,"6":15,"7":15,"8":66,"9":4,"10":5,"11":4,"12":1,"13":17,"14":9,"15":17,"16":1,"17":1,"18":52,"19":52,"20":52,"21":49,"22":52,"23":52,"24":52,"25":1,"26":1,"27":14,"28":14,"29":14,"30":5,"31":14,"32":14,"33":14,"34":1},"b":{},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":38}},"2":{"start":{"line":14,"column":0},"end":{"line":16,"column":1}},"3":{"start":{"line":15,"column":2},"end":{"line":15,"column":43}},"4":{"start":{"line":31,"column":0},"end":{"line":43,"column":1}},"5":{"start":{"line":32,"column":2},"end":{"line":35,"column":3}},"6":{"start":{"line":33,"column":4},"end":{"line":33,"column":24}},"7":{"start":{"line":34,"column":4},"end":{"line":34,"column":14}},"8":{"start":{"line":37,"column":2},"end":{"line":42,"column":3}},"9":{"start":{"line":39,"column":21},"end":{"line":39,"column":52}},"10":{"start":{"line":40,"column":18},"end":{"line":40,"column":46}},"11":{"start":{"line":41,"column":21},"end":{"line":41,"column":52}},"12":{"start":{"line":57,"column":0},"end":{"line":66,"column":1}},"13":{"start":{"line":58,"column":2},"end":{"line":60,"column":3}},"14":{"start":{"line":59,"column":4},"end":{"line":59,"column":16}},"15":{"start":{"line":62,"column":2},"end":{"line":65,"column":3}},"16":{"start":{"line":68,"column":0},"end":{"line":68,"column":32}},"17":{"start":{"line":86,"column":0},"end":{"line":101,"column":1}},"18":{"start":{"line":87,"column":2},"end":{"line":89,"column":3}},"19":{"start":{"line":91,"column":2},"end":{"line":91,"column":36}},"20":{"start":{"line":93,"column":2},"end":{"line":93,"column":53}},"21":{"start":{"line":93,"column":33},"end":{"line":93,"column":53}},"22":{"start":{"line":95,"column":2},"end":{"line":98,"column":3}},"23":{"start":{"line":99,"column":2},"end":{"line":99,"column":51}},"24":{"start":{"line":100,"column":2},"end":{"line":100,"column":15}},"25":{"start":{"line":103,"column":0},"end":{"line":103,"column":38}},"26":{"start":{"line":120,"column":0},"end":{"line":136,"column":1}},"27":{"start":{"line":121,"column":2},"end":{"line":123,"column":3}},"28":{"start":{"line":125,"column":2},"end":{"line":125,"column":36}},"29":{"start":{"line":127,"column":2},"end":{"line":127,"column":59}},"30":{"start":{"line":127,"column":33},"end":{"line":127,"column":59}},"31":{"start":{"line":129,"column":2},"end":{"line":132,"column":3}},"32":{"start":{"line":134,"column":2},"end":{"line":134,"column":51}},"33":{"start":{"line":135,"column":2},"end":{"line":135,"column":15}},"34":{"start":{"line":138,"column":0},"end":{"line":138,"column":32}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/listModules.js":{"path":"/Users/jeff/Projects/awilix/lib/listModules.js","s":{"1":1,"2":1,"3":1,"4":1,"5":1,"6":12,"7":12,"8":12,"9":3,"10":3,"11":12,"12":12,"13":79,"14":12,"15":1,"16":9,"17":5,"18":8,"19":4},"b":{"1":[3,9],"2":[5,4]},"f":{"1":12,"2":9},"fnMap":{"1":{"name":"_listModules","line":23,"loc":{"start":{"line":23,"column":0},"end":{"line":23,"column":42}}},"2":{"name":"listModules","line":55,"loc":{"start":{"line":55,"column":17},"end":{"line":55,"column":59}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":28}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":28}},"3":{"start":{"line":3,"column":0},"end":{"line":3,"column":36}},"4":{"start":{"line":6,"column":0},"end":{"line":6,"column":28}},"5":{"start":{"line":23,"column":0},"end":{"line":38,"column":1}},"6":{"start":{"line":24,"column":2},"end":{"line":24,"column":69}},"7":{"start":{"line":25,"column":2},"end":{"line":25,"column":24}},"8":{"start":{"line":26,"column":2},"end":{"line":29,"column":3}},"9":{"start":{"line":27,"column":4},"end":{"line":27,"column":32}},"10":{"start":{"line":28,"column":4},"end":{"line":28,"column":32}},"11":{"start":{"line":31,"column":2},"end":{"line":31,"column":58}},"12":{"start":{"line":32,"column":2},"end":{"line":36,"column":5}},"13":{"start":{"line":32,"column":34},"end":{"line":36,"column":3}},"14":{"start":{"line":37,"column":2},"end":{"line":37,"column":15}},"15":{"start":{"line":55,"column":0},"end":{"line":65,"column":1}},"16":{"start":{"line":56,"column":2},"end":{"line":62,"column":3}},"17":{"start":{"line":57,"column":4},"end":{"line":61,"column":5}},"18":{"start":{"line":59,"column":13},"end":{"line":59,"column":34}},"19":{"start":{"line":64,"column":2},"end":{"line":64,"column":41}}},"branchMap":{"1":{"line":26,"type":"if","locations":[{"start":{"line":26,"column":2},"end":{"line":26,"column":2}},{"start":{"line":26,"column":2},"end":{"line":26,"column":2}}]},"2":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":2},"end":{"line":56,"column":2}},{"start":{"line":56,"column":2},"end":{"line":56,"column":2}}]}}},"/Users/jeff/Projects/awilix/lib/flatten.js":{"path":"/Users/jeff/Projects/awilix/lib/flatten.js","s":{"1":1,"2":6,"3":6,"4":10,"5":37,"6":6},"b":{},"f":{"1":6},"fnMap":{"1":{"name":"flatten","line":10,"loc":{"start":{"line":10,"column":17},"end":{"line":10,"column":42}}}},"statementMap":{"1":{"start":{"line":10,"column":0},"end":{"line":19,"column":1}},"2":{"start":{"line":11,"column":2},"end":{"line":11,"column":19}},"3":{"start":{"line":12,"column":2},"end":{"line":16,"column":4}},"4":{"start":{"line":13,"column":4},"end":{"line":15,"column":6}},"5":{"start":{"line":14,"column":6},"end":{"line":14,"column":23}},"6":{"start":{"line":18,"column":2},"end":{"line":18,"column":15}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/AwilixResolutionError.js":{"path":"/Users/jeff/Projects/awilix/lib/AwilixResolutionError.js","s":{"1":1,"2":1,"3":1,"4":7,"5":7,"6":7,"7":7,"8":7,"9":2,"10":7,"11":7,"12":7,"13":7,"14":1},"b":{"1":[2,5]},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":45,"loc":{"start":{"line":45,"column":14},"end":{"line":45,"column":47}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":29}},"2":{"start":{"line":2,"column":0},"end":{"line":2,"column":52}},"3":{"start":{"line":16,"column":0},"end":{"line":29,"column":1}},"4":{"start":{"line":17,"column":2},"end":{"line":17,"column":43}},"5":{"start":{"line":18,"column":2},"end":{"line":18,"column":28}},"6":{"start":{"line":19,"column":2},"end":{"line":19,"column":59}},"7":{"start":{"line":20,"column":2},"end":{"line":20,"column":42}},"8":{"start":{"line":21,"column":2},"end":{"line":23,"column":3}},"9":{"start":{"line":22,"column":4},"end":{"line":22,"column":24}},"10":{"start":{"line":25,"column":2},"end":{"line":25,"column":18}},"11":{"start":{"line":26,"column":2},"end":{"line":26,"column":51}},"12":{"start":{"line":28,"column":2},"end":{"line":28,"column":12}},"13":{"start":{"line":46,"column":4},"end":{"line":46,"column":61}},"14":{"start":{"line":50,"column":0},"end":{"line":50,"column":38}}},"branchMap":{"1":{"line":21,"type":"if","locations":[{"start":{"line":21,"column":2},"end":{"line":21,"column":2}},{"start":{"line":21,"column":2},"end":{"line":21,"column":2}}]}}},"/Users/jeff/Projects/awilix/lib/ExtendableError.js":{"path":"/Users/jeff/Projects/awilix/lib/ExtendableError.js","s":{"1":7,"2":7,"3":7,"4":7,"5":1},"b":{},"f":{"1":7},"fnMap":{"1":{"name":"(anonymous_1)","line":12,"loc":{"start":{"line":12,"column":14},"end":{"line":12,"column":24}}}},"statementMap":{"1":{"start":{"line":13,"column":4},"end":{"line":13,"column":18}},"2":{"start":{"line":16,"column":4},"end":{"line":19,"column":6}},"3":{"start":{"line":21,"column":4},"end":{"line":24,"column":6}},"4":{"start":{"line":26,"column":4},"end":{"line":26,"column":51}},"5":{"start":{"line":30,"column":0},"end":{"line":30,"column":32}}},"branchMap":{}},"/Users/jeff/Projects/awilix/lib/nameValueToObject.js":{"path":"/Users/jeff/Projects/awilix/lib/nameValueToObject.js","s":{"1":1,"2":1,"3":98,"4":98,"5":65,"6":98,"7":1},"b":{"1":[65,33]},"f":{},"fnMap":{},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":1,"column":48}},"2":{"start":{"line":14,"column":0},"end":{"line":21,"column":1}},"3":{"start":{"line":15,"column":2},"end":{"line":15,"column":16}},"4":{"start":{"line":16,"column":2},"end":{"line":18,"column":3}},"5":{"start":{"line":17,"column":4},"end":{"line":17,"column":42}},"6":{"start":{"line":20,"column":2},"end":{"line":20,"column":12}},"7":{"start":{"line":23,"column":0},"end":{"line":23,"column":34}}},"branchMap":{"1":{"line":16,"type":"if","locations":[{"start":{"line":16,"column":2},"end":{"line":16,"column":2}},{"start":{"line":16,"column":2},"end":{"line":16,"column":2}}]}}},"/Users/jeff/Projects/awilix/lib/last.js":{"path":"/Users/jeff/Projects/awilix/lib/last.js","s":{"1":1,"2":86},"b":{},"f":{"1":86},"fnMap":{"1":{"name":"last","line":10,"loc":{"start":{"line":10,"column":17},"end":{"line":10,"column":37}}}},"statementMap":{"1":{"start":{"line":10,"column":0},"end":{"line":12,"column":1}},"2":{"start":{"line":11,"column":2},"end":{"line":11,"column":28}}},"branchMap":{}}} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
// These tests are not run, they are only here to verify typings. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//import mocha and mocha-typescript | ||
require("mocha"); | ||
const mocha_typescript_1 = require("mocha-typescript"); | ||
//require chai and use should assertions | ||
let chai = require('chai'); | ||
chai.should(); | ||
//import awilix definitions | ||
@@ -22,2 +11,4 @@ const index_1 = require("../index"); | ||
class TestClass { | ||
constructor(s, n) { } | ||
stuff(str) { } | ||
} | ||
@@ -28,3 +19,3 @@ /** | ||
*/ | ||
function testFunction() { } | ||
function testFunction(str) { } | ||
/** | ||
@@ -34,111 +25,42 @@ * Test value for container. | ||
const VALUE = 'foo'; | ||
/** | ||
* Test the AwilixContainer class. | ||
* @class TestAwilixContainer | ||
*/ | ||
let TestAwilixContainer = class TestAwilixContainer { | ||
/** | ||
* Before each test hook. | ||
* @method before | ||
*/ | ||
beforeEach() { | ||
//create container | ||
this.container = index_1.createContainer(); | ||
//register tests | ||
this.container.register({ | ||
testClass: index_1.asClass(TestClass), | ||
testFunction: index_1.asFunction(testFunction), | ||
testValue: index_1.asValue(VALUE) | ||
}); | ||
} | ||
/** | ||
* Test the cradle proxy | ||
* @method testCradle | ||
*/ | ||
testCradle() { | ||
this.container.cradle.should.be.instanceOf(Proxy); | ||
this.container.cradle.testClass.should.be.instanceOf(TestClass); | ||
this.container.cradle.testFunction.should.be.a.function; | ||
this.container.cradle.testValue.should.be.eql(VALUE); | ||
} | ||
testCreateScope() { | ||
this.container.createScope(); | ||
} | ||
testRegistrations() { | ||
this.container.registrations.should.be.an('array').with.lengthOf(3); | ||
} | ||
testRegister() { | ||
//single class | ||
this.container.register('_testClass', index_1.asClass(TestClass)); | ||
let testClassReference = this.container.resolve('_testClass'); | ||
testClassReference.should.be.an.instanceOf(TestClass); | ||
//single function | ||
this.container.register('_testFunction', index_1.asFunction(testFunction)); | ||
let testFunctionReference = this.container.resolve('_testFunction'); | ||
testFunctionReference.should.be.a('function'); | ||
//single value | ||
this.container.register('_testValue', index_1.asValue(VALUE)); | ||
let value = this.container.resolve('_testValue'); | ||
value.should.eql(VALUE); | ||
} | ||
testRegisterClass() { | ||
//single | ||
this.container.registerClass('_testClass', TestClass); | ||
let testClassReference = this.container.resolve('_testClass'); | ||
testClassReference.should.be.an.instanceOf(TestClass); | ||
//name and value pair | ||
this.container.registerClass({ | ||
'__testClass': TestClass | ||
}); | ||
let testClassReference2 = this.container.resolve('__testClass'); | ||
testClassReference2.should.be.an.instanceOf(TestClass); | ||
} | ||
testRegisterFunction() { | ||
//single | ||
this.container.registerFunction('_testFunction', testFunction); | ||
let testFunctionReference = this.container.resolve('_testFunction'); | ||
testFunctionReference.should.be.a('function'); | ||
//name and value pair | ||
this.container.registerFunction({ | ||
'__testFunction': testFunction | ||
}); | ||
let testFunctionReference2 = this.container.resolve('__testFunction'); | ||
testFunctionReference2.should.be.a('function'); | ||
} | ||
testRegisterValue() { | ||
//single | ||
this.container.registerValue('_testValue', VALUE); | ||
let value = this.container.resolve('_testValue'); | ||
value.should.eql(VALUE); | ||
//name and value pair | ||
this.container.registerValue({ | ||
'__testValue': VALUE | ||
}); | ||
let value2 = this.container.resolve('__testValue'); | ||
value2.should.be.eql(VALUE); | ||
} | ||
}; | ||
__decorate([ | ||
mocha_typescript_1.test('it should have a cradle proxy') | ||
], TestAwilixContainer.prototype, "testCradle", null); | ||
__decorate([ | ||
mocha_typescript_1.test('it should create a scope') | ||
], TestAwilixContainer.prototype, "testCreateScope", null); | ||
__decorate([ | ||
mocha_typescript_1.test('it should have at least one registration in the container') | ||
], TestAwilixContainer.prototype, "testRegistrations", null); | ||
__decorate([ | ||
mocha_typescript_1.test('it should register') | ||
], TestAwilixContainer.prototype, "testRegister", null); | ||
__decorate([ | ||
mocha_typescript_1.test('it should register a class') | ||
], TestAwilixContainer.prototype, "testRegisterClass", null); | ||
__decorate([ | ||
mocha_typescript_1.test('it should register a function') | ||
], TestAwilixContainer.prototype, "testRegisterFunction", null); | ||
__decorate([ | ||
mocha_typescript_1.test('it should register a value') | ||
], TestAwilixContainer.prototype, "testRegisterValue", null); | ||
TestAwilixContainer = __decorate([ | ||
mocha_typescript_1.suite | ||
], TestAwilixContainer); | ||
const container = index_1.createContainer(); | ||
const scope = container.createScope(); | ||
container.register({ | ||
testClass: index_1.asClass(TestClass), | ||
testClass2: index_1.asClass(TestClass), | ||
testFunction: index_1.asFunction(testFunction), | ||
testValue: index_1.asValue(VALUE) | ||
}); | ||
container.cradle.testClass; | ||
container.cradle.testFunction; | ||
container.cradle.testValue; | ||
container.registrations[0].resolve; | ||
container.registrations[0].lifetime; | ||
container.register('_testClass', index_1.asClass(TestClass)); | ||
const testClass = container.resolve('_testClass'); | ||
testClass.stuff("Hello"); | ||
const testFunc = container.resolve('_testFunction'); | ||
testFunc(""); | ||
const testFunc2 = container.resolve('_testFunction'); | ||
testFunc2(""); | ||
container.register('_testValue', index_1.asValue(VALUE)); | ||
container.registerClass({ | ||
__testClass: TestClass | ||
}); | ||
container.registerFunction({ | ||
__testFunction: testFunction | ||
}); | ||
container.registerValue({ | ||
__testValue: VALUE | ||
}); | ||
container.loadModules(['*.js'], { | ||
formatName: (name, descriptor) => descriptor.path | ||
}); | ||
container.loadModules([ | ||
['hello.js', { lifetime: index_1.Lifetime.SCOPED }] | ||
]); | ||
index_1.listModules(''); | ||
index_1.listModules(['']); | ||
index_1.listModules([ | ||
['hello.js', { lifetime: index_1.Lifetime.SCOPED }] | ||
]); |
@@ -1,2 +0,2 @@ | ||
// Type definitions for Awilix v2.2.3 | ||
// Type definitions for Awilix v2.2.6 | ||
// Project: https://github.com/jeffijoe/awilix | ||
@@ -12,3 +12,3 @@ // Definitions by: Brian Love <https://github.com/blove/> | ||
createScope(): AwilixContainer | ||
loadModules(globPatterns: string[], options?: LoadModulesOptions): Module[] | ||
loadModules(globPatterns: string[] | Array<[string, RegistrationOptions]>, options?: LoadModulesOptions): ModuleDescriptor[] | ||
registrations: Registration[] | ||
@@ -37,3 +37,2 @@ register(name: string, registration: Registration): AwilixContainer | ||
export declare class AwilixResolutionError extends Error { | ||
//left blank intentionally | ||
} | ||
@@ -47,3 +46,3 @@ | ||
*/ | ||
export declare function asClass<T>(type: T, options?: RegistrationOptions): FluidRegistration | ||
export declare function asClass<T>(type: new (...args: any[]) => T, options?: RegistrationOptions): FluidRegistration | ||
@@ -110,3 +109,6 @@ /** | ||
*/ | ||
export declare function listModules(globPatterns: string | string[], options?: ListModulesOptions): Module[] | ||
export declare function listModules( | ||
globPatterns: string | string[] | Array<[string, RegistrationOptions]>, | ||
options?: ListModulesOptions | ||
): ModuleDescriptor[] | ||
@@ -127,3 +129,3 @@ /** | ||
cwd?: string | ||
formatName?: Function | NameFormatters | ||
formatName?: NameFormatter | BuiltInNameFormatters | ||
registrationOptions?: RegistrationOptions | ||
@@ -133,6 +135,17 @@ } | ||
/** | ||
* Takes in the filename of the module being loaded as well as the module descriptor, | ||
* and returns a string which is used to register the module in the container. | ||
* | ||
* `descriptor.name` is the same as `name`. | ||
* | ||
* @type {NameFormatter} | ||
*/ | ||
export type NameFormatter = (name: string, descriptor: ModuleDescriptor) => string | ||
/** | ||
* An object containing the module name and path (full path to module). | ||
* @interface Module | ||
* | ||
* @interface ModuleDescriptor | ||
*/ | ||
export interface Module { | ||
export interface ModuleDescriptor { | ||
name: string | ||
@@ -152,5 +165,5 @@ path: string | ||
* Name formatting options when using loadModules(). | ||
* @type NameFormatters | ||
* @type BuiltInNameFormatters | ||
*/ | ||
export type NameFormatters = 'camelCase' | ||
export type BuiltInNameFormatters = 'camelCase' | ||
@@ -211,2 +224,2 @@ /** | ||
lifetime?: Lifetime | ||
} | ||
} |
@@ -32,2 +32,5 @@ const camelCase = require('camel-case') | ||
* | ||
* @param {(string, ModuleDescriptor) => string} opts.formatName | ||
* Used to format the name the module is registered with in the container. | ||
* | ||
* @return {Object} | ||
@@ -57,3 +60,8 @@ * Returns an object describing the result. | ||
// ES6 default export | ||
return { name: m.name, value: loaded.default, opts: m.opts } | ||
return { | ||
name: m.name, | ||
path: m.path, | ||
value: loaded.default, | ||
opts: m.opts | ||
} | ||
} | ||
@@ -64,6 +72,11 @@ | ||
return { name: m.name, value: loaded, opts: m.opts } | ||
return { | ||
name: m.name, | ||
path: m.path, | ||
value: loaded, | ||
opts: m.opts | ||
} | ||
}) | ||
result.filter(x => x).forEach(kvp => { | ||
let name = kvp.name | ||
result.filter(x => x).forEach(moduleDescriptor => { | ||
let name = moduleDescriptor.name | ||
let formatter = opts.formatName | ||
@@ -76,18 +89,18 @@ if (formatter) { | ||
if (formatter) { | ||
name = formatter(name) | ||
name = formatter(name, moduleDescriptor) | ||
} | ||
} | ||
const reg = isClass(kvp.value) ? registrations.asClass : registrations.asFunction | ||
const reg = isClass(moduleDescriptor.value) ? registrations.asClass : registrations.asFunction | ||
const lifetime = (opts.registrationOptions && opts.registrationOptions.lifetime) || Lifetime.TRANSIENT | ||
let kvpOpts = kvp.opts | ||
let moduleDescriptorOpts = moduleDescriptor.opts | ||
if (isString(kvpOpts)) { | ||
kvpOpts = { lifetime: kvpOpts } | ||
if (isString(moduleDescriptorOpts)) { | ||
moduleDescriptorOpts = { lifetime: moduleDescriptorOpts } | ||
} | ||
const regOpts = Object.assign({ lifetime: lifetime }, kvpOpts) | ||
const regOpts = Object.assign({ lifetime: lifetime }, moduleDescriptorOpts) | ||
container.register( | ||
name, | ||
reg(kvp.value, regOpts) | ||
reg(moduleDescriptor.value, regOpts) | ||
) | ||
@@ -94,0 +107,0 @@ }) |
{ | ||
"name": "awilix", | ||
"version": "2.2.5", | ||
"version": "2.2.6", | ||
"description": "Simple dependency injection container + helper utilities to facilitate wiring of modules", | ||
@@ -37,4 +37,4 @@ "main": "lib/awilix.js", | ||
"devDependencies": { | ||
"@types/chai": "^3.5.0", | ||
"@types/node": "^7.0.12", | ||
"@types/chai": "^3.5.1", | ||
"@types/node": "^7.0.14", | ||
"chai": "^3.5.0", | ||
@@ -50,4 +50,4 @@ "coveralls": "^2.13.0", | ||
"istanbul": "^0.4.5", | ||
"mocha": "^3.2.0", | ||
"mocha-typescript": "^1.0.23", | ||
"mocha": "^3.3.0", | ||
"mocha-typescript": "^1.1.0", | ||
"sinon": "^2.1.0", | ||
@@ -54,0 +54,0 @@ "sinon-chai": "^2.9.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45
298256
1437