diff --git a/.gitignore b/.gitignore index 2ccbe46..ecccf38 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /node_modules/ +/coverage/ +/.nyc_output/ diff --git a/.nyc_output/5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881.json b/.nyc_output/5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881.json deleted file mode 100644 index 4cb9cd6..0000000 --- a/.nyc_output/5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881.json +++ /dev/null @@ -1 +0,0 @@ -{"/home/timo/dev/requestor/index.js":{"path":"/home/timo/dev/requestor/index.js","statementMap":{"0":{"start":{"line":6,"column":11},"end":{"line":6,"column":25}},"1":{"start":{"line":7,"column":13},"end":{"line":7,"column":29}},"2":{"start":{"line":33,"column":18},"end":{"line":33,"column":75}},"3":{"start":{"line":35,"column":2},"end":{"line":45,"column":4}},"4":{"start":{"line":36,"column":4},"end":{"line":44,"column":5}},"5":{"start":{"line":37,"column":6},"end":{"line":37,"column":37}},"6":{"start":{"line":40,"column":6},"end":{"line":43,"column":26}},"7":{"start":{"line":41,"column":8},"end":{"line":41,"column":16}},"8":{"start":{"line":43,"column":8},"end":{"line":43,"column":26}},"9":{"start":{"line":65,"column":18},"end":{"line":65,"column":51}},"10":{"start":{"line":67,"column":2},"end":{"line":71,"column":3}},"11":{"start":{"line":68,"column":4},"end":{"line":70,"column":6}},"12":{"start":{"line":73,"column":2},"end":{"line":97,"column":3}},"13":{"start":{"line":75,"column":6},"end":{"line":75,"column":30}},"14":{"start":{"line":76,"column":6},"end":{"line":76,"column":12}},"15":{"start":{"line":78,"column":6},"end":{"line":78,"column":29}},"16":{"start":{"line":79,"column":6},"end":{"line":79,"column":12}},"17":{"start":{"line":81,"column":6},"end":{"line":81,"column":29}},"18":{"start":{"line":82,"column":6},"end":{"line":82,"column":12}},"19":{"start":{"line":84,"column":6},"end":{"line":84,"column":32}},"20":{"start":{"line":85,"column":6},"end":{"line":85,"column":12}},"21":{"start":{"line":87,"column":6},"end":{"line":87,"column":29}},"22":{"start":{"line":88,"column":6},"end":{"line":88,"column":12}},"23":{"start":{"line":90,"column":6},"end":{"line":94,"column":7}},"24":{"start":{"line":91,"column":8},"end":{"line":93,"column":10}},"25":{"start":{"line":96,"column":6},"end":{"line":96,"column":12}},"26":{"start":{"line":107,"column":0},"end":{"line":141,"column":2}},"27":{"start":{"line":112,"column":45},"end":{"line":112,"column":52}},"28":{"start":{"line":114,"column":2},"end":{"line":140,"column":3}},"29":{"start":{"line":115,"column":18},"end":{"line":115,"column":51}},"30":{"start":{"line":116,"column":23},"end":{"line":116,"column":40}},"31":{"start":{"line":118,"column":4},"end":{"line":121,"column":47}},"32":{"start":{"line":119,"column":6},"end":{"line":119,"column":37}},"33":{"start":{"line":121,"column":6},"end":{"line":121,"column":47}},"34":{"start":{"line":123,"column":4},"end":{"line":126,"column":30}},"35":{"start":{"line":128,"column":4},"end":{"line":139,"column":6}}},"fnMap":{"0":{"name":"get_handler","decl":{"start":{"line":31,"column":9},"end":{"line":31,"column":20}},"loc":{"start":{"line":31,"column":62},"end":{"line":46,"column":1}},"line":31},"1":{"name":"(anonymous_1)","decl":{"start":{"line":35,"column":9},"end":{"line":35,"column":10}},"loc":{"start":{"line":35,"column":29},"end":{"line":45,"column":3}},"line":35},"2":{"name":"register_handler","decl":{"start":{"line":58,"column":9},"end":{"line":58,"column":25}},"loc":{"start":{"line":64,"column":2},"end":{"line":98,"column":1}},"line":64},"3":{"name":"main","decl":{"start":{"line":107,"column":26},"end":{"line":107,"column":30}},"loc":{"start":{"line":111,"column":2},"end":{"line":141,"column":1}},"line":111}},"branchMap":{"0":{"loc":{"start":{"line":40,"column":6},"end":{"line":43,"column":26}},"type":"if","locations":[{"start":{"line":40,"column":6},"end":{"line":43,"column":26}},{"start":{"line":40,"column":6},"end":{"line":43,"column":26}}],"line":40},"1":{"loc":{"start":{"line":67,"column":2},"end":{"line":71,"column":3}},"type":"if","locations":[{"start":{"line":67,"column":2},"end":{"line":71,"column":3}},{"start":{"line":67,"column":2},"end":{"line":71,"column":3}}],"line":67},"2":{"loc":{"start":{"line":73,"column":2},"end":{"line":97,"column":3}},"type":"switch","locations":[{"start":{"line":74,"column":4},"end":{"line":76,"column":12}},{"start":{"line":77,"column":4},"end":{"line":79,"column":12}},{"start":{"line":80,"column":4},"end":{"line":82,"column":12}},{"start":{"line":83,"column":4},"end":{"line":85,"column":12}},{"start":{"line":86,"column":4},"end":{"line":88,"column":12}},{"start":{"line":89,"column":4},"end":{"line":96,"column":12}}],"line":73},"3":{"loc":{"start":{"line":90,"column":6},"end":{"line":94,"column":7}},"type":"if","locations":[{"start":{"line":90,"column":6},"end":{"line":94,"column":7}},{"start":{"line":90,"column":6},"end":{"line":94,"column":7}}],"line":90},"4":{"loc":{"start":{"line":110,"column":2},"end":{"line":110,"column":69}},"type":"default-arg","locations":[{"start":{"line":110,"column":12},"end":{"line":110,"column":69}}],"line":110},"5":{"loc":{"start":{"line":118,"column":4},"end":{"line":121,"column":47}},"type":"if","locations":[{"start":{"line":118,"column":4},"end":{"line":121,"column":47}},{"start":{"line":118,"column":4},"end":{"line":121,"column":47}}],"line":118}},"s":{"0":1,"1":1,"2":28,"3":28,"4":0,"5":0,"6":0,"7":0,"8":0,"9":28,"10":28,"11":0,"12":28,"13":4,"14":4,"15":6,"16":6,"17":4,"18":4,"19":4,"20":4,"21":6,"22":6,"23":4,"24":0,"25":4,"26":1,"27":4,"28":4,"29":28,"30":28,"31":28,"32":0,"33":28,"34":28,"35":28},"f":{"0":28,"1":0,"2":28,"3":4},"b":{"0":[0,0],"1":[0,28],"2":[4,6,4,4,6,4],"3":[0,4],"4":[3],"5":[0,28]},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"cbffc238401c9aace400d10037d9b72080f85fbc","contentHash":"2d4e7766e7b907e3b5e4d9d73f321e526f75a87d2e87540b4cfcee15ae480a84"},"/home/timo/dev/requestor/test_files/root/all-root.js":{"path":"/home/timo/dev/requestor/test_files/root/all-root.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"05d2d34baaf7687201973545d7e1b2db9b053ae5","contentHash":"1ea8cdf0c46154ab5f63ae3f8631d70b41e145120ad53477a0bb6d7174cfcb6d"},"/home/timo/dev/requestor/test_files/root/delete-root.js":{"path":"/home/timo/dev/requestor/test_files/root/delete-root.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"007b730dd7cb2200503f493d990c3cc9dcfc568a","contentHash":"ce2b940f2601825ee837df2738beeedfa1642217b71bd2f059519a40c3efdd85"},"/home/timo/dev/requestor/test_files/root/get-root.js":{"path":"/home/timo/dev/requestor/test_files/root/get-root.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"e26d53049ccaeea7471b8b82ca4a823f4e930707","contentHash":"5fb286eee5af69045046042bdb7f5eaf16efe636abd7e9290e8b90f87a9e1dd7"},"/home/timo/dev/requestor/test_files/root/not-root.js":{"path":"/home/timo/dev/requestor/test_files/root/not-root.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"ce85990d5e3cfe3b86d39674403bccd9d81d697d","contentHash":"2fc9f3918ba31f37baeba3432737adf3951e17248819ece2a250dc67f4e73f24"},"/home/timo/dev/requestor/test_files/root/post-root.js":{"path":"/home/timo/dev/requestor/test_files/root/post-root.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"aa96fa8abbcbec33033aa41b2a238c63c9b358c2","contentHash":"c315627558d404fe3313ea555a5960789e3243cc550ee305f51f77055a6d4190"},"/home/timo/dev/requestor/test_files/root/put-root.js":{"path":"/home/timo/dev/requestor/test_files/root/put-root.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"d233c87e169bb3dcebc478e68e3fc6f0a5c782ca","contentHash":"897ad82466351cc9a0a4265d64d4be8713c42691fa7502fa415b3bed9d3b941d"},"/home/timo/dev/requestor/test_files/root.sub/all-root.sub.js":{"path":"/home/timo/dev/requestor/test_files/root.sub/all-root.sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"fc2f6f336a3fe9e6544f7ea707e1e4c23adc77b7","contentHash":"eb4397c2c052aeadf6543690f3ae9b628faa27b9caa86ce92503604ee61ab93c"},"/home/timo/dev/requestor/test_files/root.sub/delete-root.sub.js":{"path":"/home/timo/dev/requestor/test_files/root.sub/delete-root.sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"134f9134b73ff6279cd07bbb5613daf8abe67100","contentHash":"4e0a45d6560ea380654ca85bba425909fa6cd3d8cb9b5517eaa2ced0fc50f083"},"/home/timo/dev/requestor/test_files/root.sub/get-root.sub.js":{"path":"/home/timo/dev/requestor/test_files/root.sub/get-root.sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"04936837363f3ec7c253672167350cbbf31315a5","contentHash":"1fb11e7e91f31d80bcab0fc43dd92348062013f8c614cfeb6ebb4e79c852b3dc"},"/home/timo/dev/requestor/test_files/root.sub/not-root.sub.js":{"path":"/home/timo/dev/requestor/test_files/root.sub/not-root.sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"481d743c5e1a064737428d24e484d8f9f5bbc281","contentHash":"16cf5147ed49973c60f9a6737b0bb256fc7a645f9019ecc20081344e82f4838d"},"/home/timo/dev/requestor/test_files/root.sub/post-root.sub.js":{"path":"/home/timo/dev/requestor/test_files/root.sub/post-root.sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"cb6eb82b76a352e1e7a6710049cf4c6254bb6087","contentHash":"b3c124d7ed2aaef072fa55ce973d4bf14f5c7385c39c33765808eb497b8c1954"},"/home/timo/dev/requestor/test_files/root.sub/put-root.sub.js":{"path":"/home/timo/dev/requestor/test_files/root.sub/put-root.sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"1f385fe5d431db5e51880b0c5c9b4ec9a0033a36","contentHash":"76a7e17d8aea8823f3659ef7b73d300d38ec53ee53abe34a4e3ac1447a1855d3"},"/home/timo/dev/requestor/test_files/sub/all-sub.js":{"path":"/home/timo/dev/requestor/test_files/sub/all-sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"7cbe94057905618c270be60f6df9b7f108589986","contentHash":"608594987514eb360bfe411faa5beb0767e6ddd872091815b62c969c70ff3df0"},"/home/timo/dev/requestor/test_files/sub/all-sub.root.js":{"path":"/home/timo/dev/requestor/test_files/sub/all-sub.root.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"2486de5045456a014a5184492010a4671c42ecef","contentHash":"146e9c21189f63ff8919ace1313cb9a00c5c5fb6afd81da8be5a2de09ea4ed3f"},"/home/timo/dev/requestor/test_files/sub/delete-sub.js":{"path":"/home/timo/dev/requestor/test_files/sub/delete-sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"8e63898a4fda702905c233965054133e49e2041b","contentHash":"27c8b277936433a977b00a6fe25334e8c4e52afc04e494e02ff59fe019299bcd"},"/home/timo/dev/requestor/test_files/sub/get-sub.js":{"path":"/home/timo/dev/requestor/test_files/sub/get-sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"d1b304e5cb61f03b054a798e5100fc24e24a0eb8","contentHash":"f5f9b792cf55eefaa3815905ef05f34694ccaa99eda39b7b99de97cceed7904a"},"/home/timo/dev/requestor/test_files/sub/get-sub.lv1.lv2.lv3.js":{"path":"/home/timo/dev/requestor/test_files/sub/get-sub.lv1.lv2.lv3.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"765bd63f63638203831f332e822f68444f3fbf05","contentHash":"db1408b5af25154d786e532c41574019241743706c7de868907bf97015133b98"},"/home/timo/dev/requestor/test_files/sub/not-sub.js":{"path":"/home/timo/dev/requestor/test_files/sub/not-sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"7f47fcf67209e46c2a93dfdac0963f3c6930479c","contentHash":"a3be844e9cb6eb5d96fce51cbf48289a82fa4edcc040002503b1d89d78946ba7"},"/home/timo/dev/requestor/test_files/sub/post-sub.js":{"path":"/home/timo/dev/requestor/test_files/sub/post-sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"b12b3b915ef54782f1ab5ce882906d23855b746f","contentHash":"047dcdf484d529a08aa75144d377d092248c6c250325245bcad86aa7d13a292a"},"/home/timo/dev/requestor/test_files/sub/put-sub.js":{"path":"/home/timo/dev/requestor/test_files/sub/put-sub.js","statementMap":{"0":{"start":{"line":3,"column":0},"end":{"line":5,"column":2}}},"fnMap":{"0":{"name":"(anonymous_0)","decl":{"start":{"line":3,"column":17},"end":{"line":3,"column":18}},"loc":{"start":{"line":3,"column":23},"end":{"line":5,"column":1}},"line":3}},"branchMap":{},"s":{"0":1},"f":{"0":0},"b":{},"_coverageSchema":"1a1c01bbd47fc00a2c39e90264f33305004495a9","hash":"a9d8312d148a8b9a321609fb76fc97fd2d4a4c64","contentHash":"6fe21355a4d3a522199fcc7a50d569060d61e71ed6fc04076463c79fce18c4f8"}} \ No newline at end of file diff --git a/.nyc_output/9ed529ca-95a3-4f3d-a58a-4f5f1df16472.json b/.nyc_output/9ed529ca-95a3-4f3d-a58a-4f5f1df16472.json deleted file mode 100644 index 9e26dfe..0000000 --- a/.nyc_output/9ed529ca-95a3-4f3d-a58a-4f5f1df16472.json +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/.nyc_output/processinfo/5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881.json b/.nyc_output/processinfo/5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881.json deleted file mode 100644 index cc6498c..0000000 --- a/.nyc_output/processinfo/5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":"9ed529ca-95a3-4f3d-a58a-4f5f1df16472","pid":16968,"argv":["/usr/bin/node","/home/timo/dev/requestor/node_modules/ava/lib/worker/subprocess.js"],"execArgv":[],"cwd":"/home/timo/dev/requestor","time":1582545546386,"ppid":16957,"coverageFilename":"/home/timo/dev/requestor/.nyc_output/5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881.json","externalId":"","uuid":"5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881","files":["/home/timo/dev/requestor/index.js","/home/timo/dev/requestor/test_files/root/all-root.js","/home/timo/dev/requestor/test_files/root/delete-root.js","/home/timo/dev/requestor/test_files/root/get-root.js","/home/timo/dev/requestor/test_files/root/not-root.js","/home/timo/dev/requestor/test_files/root/post-root.js","/home/timo/dev/requestor/test_files/root/put-root.js","/home/timo/dev/requestor/test_files/root.sub/all-root.sub.js","/home/timo/dev/requestor/test_files/root.sub/delete-root.sub.js","/home/timo/dev/requestor/test_files/root.sub/get-root.sub.js","/home/timo/dev/requestor/test_files/root.sub/not-root.sub.js","/home/timo/dev/requestor/test_files/root.sub/post-root.sub.js","/home/timo/dev/requestor/test_files/root.sub/put-root.sub.js","/home/timo/dev/requestor/test_files/sub/all-sub.js","/home/timo/dev/requestor/test_files/sub/all-sub.root.js","/home/timo/dev/requestor/test_files/sub/delete-sub.js","/home/timo/dev/requestor/test_files/sub/get-sub.js","/home/timo/dev/requestor/test_files/sub/get-sub.lv1.lv2.lv3.js","/home/timo/dev/requestor/test_files/sub/not-sub.js","/home/timo/dev/requestor/test_files/sub/post-sub.js","/home/timo/dev/requestor/test_files/sub/put-sub.js"]} \ No newline at end of file diff --git a/.nyc_output/processinfo/9ed529ca-95a3-4f3d-a58a-4f5f1df16472.json b/.nyc_output/processinfo/9ed529ca-95a3-4f3d-a58a-4f5f1df16472.json deleted file mode 100644 index 002b8b4..0000000 --- a/.nyc_output/processinfo/9ed529ca-95a3-4f3d-a58a-4f5f1df16472.json +++ /dev/null @@ -1 +0,0 @@ -{"parent":null,"pid":16957,"argv":["/usr/bin/node","/home/timo/dev/requestor/node_modules/.bin/ava"],"execArgv":[],"cwd":"/home/timo/dev/requestor","time":1582545545515,"ppid":16946,"coverageFilename":"/home/timo/dev/requestor/.nyc_output/9ed529ca-95a3-4f3d-a58a-4f5f1df16472.json","externalId":"","uuid":"9ed529ca-95a3-4f3d-a58a-4f5f1df16472","files":[]} \ No newline at end of file diff --git a/.nyc_output/processinfo/index.json b/.nyc_output/processinfo/index.json deleted file mode 100644 index c18ad4c..0000000 --- a/.nyc_output/processinfo/index.json +++ /dev/null @@ -1 +0,0 @@ -{"processes":{"5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881":{"parent":"9ed529ca-95a3-4f3d-a58a-4f5f1df16472","children":[]},"9ed529ca-95a3-4f3d-a58a-4f5f1df16472":{"parent":null,"children":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"]}},"files":{"/home/timo/dev/requestor/index.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root/all-root.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root/delete-root.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root/get-root.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root/not-root.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root/post-root.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root/put-root.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root.sub/all-root.sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root.sub/delete-root.sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root.sub/get-root.sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root.sub/not-root.sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root.sub/post-root.sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/root.sub/put-root.sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/all-sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/all-sub.root.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/delete-sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/get-sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/get-sub.lv1.lv2.lv3.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/not-sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/post-sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"],"/home/timo/dev/requestor/test_files/sub/put-sub.js":["5ad64ed6-f8ad-4aa6-a4ce-4978c9a74881"]},"externalIds":{}} \ No newline at end of file diff --git a/index.js b/index.js index e232377..81997ef 100644 --- a/index.js +++ b/index.js @@ -33,15 +33,11 @@ function get_handler ({ module_folder, file, opts, rethrow }) { const handler = require (path.join (process.cwd (), module_folder, file)); return (req, res, next) => { - try { - handler (req, res, next, opts); - } - catch (e) { - if (rethrow) - throw e; - else - console.error (e); - } + new Promise ((res) => res(handler (req, res, next, opts))) + .catch ((e) => { + if (rethrow) + throw e; + }); }; }