diff --git a/.madgerc b/.madgerc new file mode 100644 index 0000000..d3397ec --- /dev/null +++ b/.madgerc @@ -0,0 +1,3 @@ +{ + "excludeRegExp": [".*\\.spec\\.js", "package\\.json"] +} diff --git a/README.logging.md b/README.logging.md index 29b8912..f9b1f26 100644 --- a/README.logging.md +++ b/README.logging.md @@ -2,7 +2,7 @@ We are currently using pino for logging. Pino logs objects/messages directly to streams so other processes can actually handle formatting or other log actions (this is because Node is single threaded, so smarter to create -another process to manage the logs). We store all of these files in `/pino.log` +another process to manage the logs). We store all of these logs in `/pino.log` ## Configurations @@ -39,12 +39,12 @@ controller({ params, logger }: HapiRequest) { ## Other processes -Other node processes should be spawned (in production and development), here are some examples of processes -we recommend: +By design, pino just outputs logs to be used by other "transporters" (other node processes spawned in +production and development) for reacting to, and viewing these logs. here are some examples of processes +we recommend implementing: ### Logrotate -By design, pino just outputs logs to be used by other "transporters". Log Rotation should be handled via -another service as described in the [pino documention](http://getpino.io/#/docs/help?id=log-rotation) +Log Rotation on production servers should be handled via another service as described in the [pino documention](http://getpino.io/#/docs/help?id=log-rotation) ### Pino-Pretty Displays the logs in a prettier format that makes it easier to see the data, however takes up more space. @@ -97,8 +97,10 @@ e.g. ## Notes/Ideas -- Log Helper for use in the dataservices +- Trace logging any external requests/responses +- Logger Helper for use in the dataservices - goaccess? - websocket? endpoint that shows logs in real time - docs page for logs (searching?) - Elasticsearch/Logstash/Kibana +- logrotate on production diff --git a/README.setup.md b/README.setup.md index 9bf6fcd..f16fc7a 100644 --- a/README.setup.md +++ b/README.setup.md @@ -5,7 +5,7 @@ manage node versions is by using the [Node Version Manager](https://github.com/n in the project to help reference this minimum node version. Use `nvm use 10` to switch node versions after installing a new Node version. **Then you should install all -project dependencies**([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L30)) +project dependencies**([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L30)) with `npm install` (or `npm install -D` if development work is planned). This should install the Hapi Server Framework, MariaDB and other libraries used in this project. @@ -30,7 +30,7 @@ and create Postman test suites based on these files) ## Webpack Webpack config file([github](https://github.com/devlinjunker/template.node.hapi/blob/master/webpack.config.js)) -is used to manage our webpack build to compile the application. +is used to manage our webpack build to compile the application. In this file we: - designate the files that will be created with the build @@ -52,7 +52,7 @@ The Dependency Graph is created with [Madge](https://github.com/pahen/madge) and install both in order to update the dependency graph. I didn't include these in the package.json dependencies because I felt this is more than is needed to develop a working app or even write basic documentation. -Install madge with `npm install madge` and install graphviz with `brew install graphviz` or +Install madge with `npm install -g madge` and install graphviz with `brew install graphviz` or `port install graphviz` (for OSX) I split this out to a separate npm script: `npm run doc-image` @@ -60,3 +60,4 @@ I split this out to a separate npm script: `npm run doc-image` ## Notes/Ideas - **IDEA:** init scripts with installation and SQL setup + - Explore madge options: https://www.npmjs.com/package/madge#configuration diff --git a/docs/ast/source/base/request/hapi-request.interface.js.json b/docs/ast/source/base/request/hapi-request.interface.js.json new file mode 100644 index 0000000..e5c5329 --- /dev/null +++ b/docs/ast/source/base/request/hapi-request.interface.js.json @@ -0,0 +1,252 @@ +{ + "type": "File", + "start": 0, + "end": 333, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 333, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + }, + "sourceType": "module", + "body": [ + { + "type": "EmptyStatement", + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + }, + "leadingComments": null, + "trailingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", + "start": 3, + "end": 111, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": " eslint-disable flowtype/no-weak-types ", + "start": 113, + "end": 156, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 43 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n* Request Object that is passed to the controller function as the first parameter\n* from https://github.com/hapijs/hapi/blob/master/API.md#request\n* @type {HapiRequest}\n", + "start": 158, + "end": 333, + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", + "start": 3, + "end": 111, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": " eslint-disable flowtype/no-weak-types ", + "start": 113, + "end": 156, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 43 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n* Request Object that is passed to the controller function as the first parameter\n* from https://github.com/hapijs/hapi/blob/master/API.md#request\n* @type {HapiRequest}\n", + "start": 158, + "end": 333, + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + ], + "tokens": [ + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 0, + "end": 1, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", + "start": 3, + "end": 111, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": " eslint-disable flowtype/no-weak-types ", + "start": 113, + "end": 156, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 43 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n* Request Object that is passed to the controller function as the first parameter\n* from https://github.com/hapijs/hapi/blob/master/API.md#request\n* @type {HapiRequest}\n", + "start": 158, + "end": 333, + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 333, + "end": 333, + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/base/request/request-error.model.js.json b/docs/ast/source/base/request/request-error.model.js.json new file mode 100644 index 0000000..74ff302 --- /dev/null +++ b/docs/ast/source/base/request/request-error.model.js.json @@ -0,0 +1,1226 @@ +{ + "type": "File", + "start": 0, + "end": 415, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 415, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportDefaultDeclaration", + "start": 120, + "end": 415, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + }, + "declaration": { + "type": "ClassDeclaration", + "start": 135, + "end": 415, + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 18, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 141, + "end": 153, + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 33 + }, + "identifierName": "RequestError" + }, + "name": "RequestError", + "leadingComments": null + }, + "superClass": { + "type": "Identifier", + "start": 162, + "end": 167, + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 47 + }, + "identifierName": "Error" + }, + "name": "Error" + }, + "body": { + "type": "ClassBody", + "start": 168, + "end": 415, + "loc": { + "start": { + "line": 7, + "column": 48 + }, + "end": { + "line": 18, + "column": 1 + } + }, + "body": [ + { + "type": "ClassMethod", + "start": 347, + "end": 413, + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + }, + "static": false, + "computed": false, + "key": { + "type": "Identifier", + "start": 347, + "end": 358, + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 13 + }, + "identifierName": "constructor" + }, + "name": "constructor", + "leadingComments": null + }, + "kind": "constructor", + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 359, + "end": 362, + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 17 + }, + "identifierName": "msg" + }, + "name": "msg" + }, + { + "type": "Identifier", + "start": 364, + "end": 368, + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 23 + }, + "identifierName": "code" + }, + "name": "code" + } + ], + "body": { + "type": "BlockStatement", + "start": 370, + "end": 413, + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 17, + "column": 3 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 376, + "end": 387, + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 15 + } + }, + "expression": { + "type": "CallExpression", + "start": 376, + "end": 386, + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 14 + } + }, + "callee": { + "type": "Super", + "start": 376, + "end": 381, + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + "arguments": [ + { + "type": "Identifier", + "start": 382, + "end": 385, + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 13 + }, + "identifierName": "msg" + }, + "name": "msg" + } + ] + } + }, + { + "type": "ExpressionStatement", + "start": 392, + "end": 409, + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 21 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 392, + "end": 408, + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 20 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 392, + "end": 401, + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + }, + "object": { + "type": "ThisExpression", + "start": 392, + "end": 396, + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + "property": { + "type": "Identifier", + "start": 397, + "end": 401, + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 13 + }, + "identifierName": "code" + }, + "name": "code" + }, + "computed": false + }, + "right": { + "type": "Identifier", + "start": 404, + "end": 408, + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 20 + }, + "identifierName": "code" + }, + "name": "code" + } + } + } + ], + "directives": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n ", + "start": 173, + "end": 344, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 13, + "column": 5 + } + } + } + ] + } + ] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", + "start": 2, + "end": 119, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", + "start": 2, + "end": 119, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", + "start": 2, + "end": 119, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n ", + "start": 173, + "end": 344, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 13, + "column": 5 + } + } + } + ], + "tokens": [ + { + "type": "CommentBlock", + "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", + "start": 2, + "end": 119, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 120, + "end": 126, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 127, + "end": 134, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": { + "label": "class", + "keyword": "class", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "class", + "start": 135, + "end": 140, + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "RequestError", + "start": 141, + "end": 153, + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + { + "type": { + "label": "extends", + "keyword": "extends", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "extends", + "start": 154, + "end": 161, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 41 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Error", + "start": 162, + "end": 167, + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 47 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 168, + "end": 169, + "loc": { + "start": { + "line": 7, + "column": 48 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n ", + "start": 173, + "end": 344, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "constructor", + "start": 347, + "end": 358, + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 358, + "end": 359, + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "msg", + "start": 359, + "end": 362, + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 362, + "end": 363, + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "code", + "start": 364, + "end": 368, + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 368, + "end": 369, + "loc": { + "start": { + "line": 14, + "column": 23 + }, + "end": { + "line": 14, + "column": 24 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 370, + "end": 371, + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + { + "type": { + "label": "super", + "keyword": "super", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "super", + "start": 376, + "end": 381, + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 381, + "end": 382, + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "msg", + "start": 382, + "end": 385, + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 385, + "end": 386, + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 386, + "end": 387, + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": { + "label": "this", + "keyword": "this", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "this", + "start": 392, + "end": 396, + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 396, + "end": 397, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "code", + "start": 397, + "end": 401, + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 402, + "end": 403, + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "code", + "start": 404, + "end": 408, + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 408, + "end": 409, + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 412, + "end": 413, + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 414, + "end": 415, + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 415, + "end": 415, + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 1 + } + } + } + ] +} \ No newline at end of file diff --git a/docs/ast/source/base/server.js.json b/docs/ast/source/base/server.js.json index d0438cc..b19f6f2 100644 --- a/docs/ast/source/base/server.js.json +++ b/docs/ast/source/base/server.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 4357, + "end": 3640, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 164, + "line": 135, "column": 1 } }, "program": { "type": "Program", "start": 0, - "end": 4357, + "end": 3640, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 164, + "line": 135, "column": 1 } }, @@ -30,43 +30,43 @@ "body": [ { "type": "ExpressionStatement", - "start": 35, - "end": 74, + "start": 131, + "end": 170, "loc": { "start": { - "line": 3, + "line": 7, "column": 0 }, "end": { - "line": 3, + "line": 7, "column": 39 } }, "expression": { "type": "CallExpression", - "start": 35, - "end": 73, + "start": 131, + "end": 169, "loc": { "start": { - "line": 3, + "line": 7, "column": 0 }, "end": { - "line": 3, + "line": 7, "column": 38 } }, "callee": { "type": "Identifier", - "start": 35, - "end": 42, + "start": 131, + "end": 138, "loc": { "start": { - "line": 3, + "line": 7, "column": 0 }, "end": { - "line": 3, + "line": 7, "column": 7 }, "identifierName": "require" @@ -77,15 +77,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 43, - "end": 72, + "start": 139, + "end": 168, "loc": { "start": { - "line": 3, + "line": 7, "column": 8 }, "end": { - "line": 3, + "line": 7, "column": 37 } }, @@ -102,60 +102,92 @@ { "type": "CommentBlock", "value": " eslint-disable import/first ", - "start": 1, - "end": 34, + "start": 2, + "end": 35, "loc": { "start": { - "line": 2, + "line": 3, "column": 0 }, "end": { - "line": 2, + "line": 3, "column": 33 } } + }, + { + "type": "CommentBlock", + "value": " eslint-disable import/prefer-default-export ", + "start": 36, + "end": 85, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 49 + } + } + }, + { + "type": "CommentBlock", + "value": " eslint-disable flowtype/no-weak-types ", + "start": 86, + "end": 129, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 43 + } + } } ] }, { "type": "ExpressionStatement", - "start": 75, - "end": 102, + "start": 171, + "end": 198, "loc": { "start": { - "line": 4, + "line": 8, "column": 0 }, "end": { - "line": 4, + "line": 8, "column": 27 } }, "expression": { "type": "CallExpression", - "start": 75, - "end": 101, + "start": 171, + "end": 197, "loc": { "start": { - "line": 4, + "line": 8, "column": 0 }, "end": { - "line": 4, + "line": 8, "column": 26 } }, "callee": { "type": "Identifier", - "start": 75, - "end": 82, + "start": 171, + "end": 178, "loc": { "start": { - "line": 4, + "line": 8, "column": 0 }, "end": { - "line": 4, + "line": 8, "column": 7 }, "identifierName": "require" @@ -165,15 +197,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 83, - "end": 100, + "start": 179, + "end": 196, "loc": { "start": { - "line": 4, + "line": 8, "column": 8 }, "end": { - "line": 4, + "line": 8, "column": 25 } }, @@ -188,43 +220,43 @@ }, { "type": "ExpressionStatement", - "start": 103, - "end": 130, + "start": 199, + "end": 226, "loc": { "start": { - "line": 5, + "line": 9, "column": 0 }, "end": { - "line": 5, + "line": 9, "column": 27 } }, "expression": { "type": "CallExpression", - "start": 103, - "end": 129, + "start": 199, + "end": 225, "loc": { "start": { - "line": 5, + "line": 9, "column": 0 }, "end": { - "line": 5, + "line": 9, "column": 26 } }, "callee": { "type": "Identifier", - "start": 103, - "end": 110, + "start": 199, + "end": 206, "loc": { "start": { - "line": 5, + "line": 9, "column": 0 }, "end": { - "line": 5, + "line": 9, "column": 7 }, "identifierName": "require" @@ -234,15 +266,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 111, - "end": 128, + "start": 207, + "end": 224, "loc": { "start": { - "line": 5, + "line": 9, "column": 8 }, "end": { - "line": 5, + "line": 9, "column": 25 } }, @@ -257,44 +289,44 @@ }, { "type": "ImportDeclaration", - "start": 132, - "end": 152, + "start": 228, + "end": 248, "loc": { "start": { - "line": 7, + "line": 11, "column": 0 }, "end": { - "line": 7, + "line": 11, "column": 20 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 139, - "end": 141, + "start": 235, + "end": 237, "loc": { "start": { - "line": 7, + "line": 11, "column": 7 }, "end": { - "line": 7, + "line": 11, "column": 9 } }, "local": { "type": "Identifier", - "start": 139, - "end": 141, + "start": 235, + "end": 237, "loc": { "start": { - "line": 7, + "line": 11, "column": 7 }, "end": { - "line": 7, + "line": 11, "column": 9 }, "identifierName": "fs" @@ -305,15 +337,15 @@ ], "source": { "type": "StringLiteral", - "start": 147, - "end": 151, + "start": 243, + "end": 247, "loc": { "start": { - "line": 7, + "line": 11, "column": 15 }, "end": { - "line": 7, + "line": 11, "column": 19 } }, @@ -326,63 +358,63 @@ }, { "type": "ImportDeclaration", - "start": 153, - "end": 177, + "start": 249, + "end": 273, "loc": { "start": { - "line": 8, + "line": 12, "column": 0 }, "end": { - "line": 8, + "line": 12, "column": 24 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 160, - "end": 164, + "start": 256, + "end": 260, "loc": { "start": { - "line": 8, + "line": 12, "column": 7 }, "end": { - "line": 8, + "line": 12, "column": 11 } }, "local": { "type": "Identifier", - "start": 160, - "end": 164, + "start": 256, + "end": 260, "loc": { "start": { - "line": 8, + "line": 12, "column": 7 }, "end": { - "line": 8, + "line": 12, "column": 11 }, - "identifierName": "path" + "identifierName": "Path" }, - "name": "path" + "name": "Path" } } ], "source": { "type": "StringLiteral", - "start": 170, - "end": 176, + "start": 266, + "end": 272, "loc": { "start": { - "line": 8, + "line": 12, "column": 17 }, "end": { - "line": 8, + "line": 12, "column": 23 } }, @@ -395,44 +427,44 @@ }, { "type": "ImportDeclaration", - "start": 178, - "end": 202, + "start": 274, + "end": 298, "loc": { "start": { - "line": 9, + "line": 13, "column": 0 }, "end": { - "line": 9, + "line": 13, "column": 24 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 185, - "end": 189, + "start": 281, + "end": 285, "loc": { "start": { - "line": 9, + "line": 13, "column": 7 }, "end": { - "line": 9, + "line": 13, "column": 11 } }, "local": { "type": "Identifier", - "start": 185, - "end": 189, + "start": 281, + "end": 285, "loc": { "start": { - "line": 9, + "line": 13, "column": 7 }, "end": { - "line": 9, + "line": 13, "column": 11 }, "identifierName": "pino" @@ -443,15 +475,15 @@ ], "source": { "type": "StringLiteral", - "start": 195, - "end": 201, + "start": 291, + "end": 297, "loc": { "start": { - "line": 9, + "line": 13, "column": 17 }, "end": { - "line": 9, + "line": 13, "column": 23 } }, @@ -464,44 +496,44 @@ }, { "type": "ImportDeclaration", - "start": 203, - "end": 232, + "start": 299, + "end": 328, "loc": { "start": { - "line": 10, + "line": 14, "column": 0 }, "end": { - "line": 10, + "line": 14, "column": 29 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 210, - "end": 214, + "start": 306, + "end": 310, "loc": { "start": { - "line": 10, + "line": 14, "column": 7 }, "end": { - "line": 10, + "line": 14, "column": 11 } }, "local": { "type": "Identifier", - "start": 210, - "end": 214, + "start": 306, + "end": 310, "loc": { "start": { - "line": 10, + "line": 14, "column": 7 }, "end": { - "line": 10, + "line": 14, "column": 11 }, "identifierName": "Pino" @@ -512,15 +544,15 @@ ], "source": { "type": "StringLiteral", - "start": 220, - "end": 231, + "start": 316, + "end": 327, "loc": { "start": { - "line": 10, + "line": 14, "column": 17 }, "end": { - "line": 10, + "line": 14, "column": 28 } }, @@ -533,44 +565,44 @@ }, { "type": "ImportDeclaration", - "start": 233, - "end": 263, + "start": 329, + "end": 359, "loc": { "start": { - "line": 11, + "line": 15, "column": 0 }, "end": { - "line": 11, + "line": 15, "column": 30 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 240, - "end": 244, + "start": 336, + "end": 340, "loc": { "start": { - "line": 11, + "line": 15, "column": 7 }, "end": { - "line": 11, + "line": 15, "column": 11 } }, "local": { "type": "Identifier", - "start": 240, - "end": 244, + "start": 336, + "end": 340, "loc": { "start": { - "line": 11, + "line": 15, "column": 7 }, "end": { - "line": 11, + "line": 15, "column": 11 }, "identifierName": "Hapi" @@ -581,15 +613,15 @@ ], "source": { "type": "StringLiteral", - "start": 250, - "end": 262, + "start": 346, + "end": 358, "loc": { "start": { - "line": 11, + "line": 15, "column": 17 }, "end": { - "line": 11, + "line": 15, "column": 29 } }, @@ -602,44 +634,44 @@ }, { "type": "ImportDeclaration", - "start": 264, - "end": 296, + "start": 360, + "end": 392, "loc": { "start": { - "line": 12, + "line": 16, "column": 0 }, "end": { - "line": 12, + "line": 16, "column": 32 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 271, - "end": 276, + "start": 367, + "end": 372, "loc": { "start": { - "line": 12, + "line": 16, "column": 7 }, "end": { - "line": 12, + "line": 16, "column": 12 } }, "local": { "type": "Identifier", - "start": 271, - "end": 276, + "start": 367, + "end": 372, "loc": { "start": { - "line": 12, + "line": 16, "column": 7 }, "end": { - "line": 12, + "line": 16, "column": 12 }, "identifierName": "Inert" @@ -650,15 +682,15 @@ ], "source": { "type": "StringLiteral", - "start": 282, - "end": 295, + "start": 378, + "end": 391, "loc": { "start": { - "line": 12, + "line": 16, "column": 18 }, "end": { - "line": 12, + "line": 16, "column": 31 } }, @@ -671,44 +703,44 @@ }, { "type": "VariableDeclaration", - "start": 298, - "end": 344, + "start": 394, + "end": 440, "loc": { "start": { - "line": 14, + "line": 18, "column": 0 }, "end": { - "line": 14, + "line": 18, "column": 46 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 304, - "end": 343, + "start": 400, + "end": 439, "loc": { "start": { - "line": 14, + "line": 18, "column": 6 }, "end": { - "line": 14, + "line": 18, "column": 45 } }, "id": { "type": "Identifier", - "start": 304, - "end": 323, + "start": 400, + "end": 419, "loc": { "start": { - "line": 14, + "line": 18, "column": 6 }, "end": { - "line": 14, + "line": 18, "column": 25 }, "identifierName": "SERVER_NAME_DEFAULT" @@ -717,15 +749,15 @@ }, "init": { "type": "StringLiteral", - "start": 326, - "end": 343, + "start": 422, + "end": 439, "loc": { "start": { - "line": 14, + "line": 18, "column": 28 }, "end": { - "line": 14, + "line": 18, "column": 45 } }, @@ -741,44 +773,44 @@ }, { "type": "VariableDeclaration", - "start": 345, - "end": 376, + "start": 441, + "end": 472, "loc": { "start": { - "line": 15, + "line": 19, "column": 0 }, "end": { - "line": 15, + "line": 19, "column": 31 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 351, - "end": 375, + "start": 447, + "end": 471, "loc": { "start": { - "line": 15, + "line": 19, "column": 6 }, "end": { - "line": 15, + "line": 19, "column": 30 } }, "id": { "type": "Identifier", - "start": 351, - "end": 366, + "start": 447, + "end": 462, "loc": { "start": { - "line": 15, + "line": 19, "column": 6 }, "end": { - "line": 15, + "line": 19, "column": 21 }, "identifierName": "LOG_DIR_DEFAULT" @@ -787,15 +819,15 @@ }, "init": { "type": "StringLiteral", - "start": 369, - "end": 375, + "start": 465, + "end": 471, "loc": { "start": { - "line": 15, + "line": 19, "column": 24 }, "end": { - "line": 15, + "line": 19, "column": 30 } }, @@ -812,43 +844,27 @@ { "type": "CommentBlock", "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", - "start": 378, - "end": 739, - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", - "start": 742, - "end": 850, + "start": 474, + "end": 835, "loc": { "start": { - "line": 26, + "line": 21, "column": 0 }, "end": { - "line": 29, + "line": 27, "column": 3 } } }, { "type": "CommentBlock", - "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", - "start": 853, - "end": 970, + "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", + "start": 838, + "end": 1021, "loc": { "start": { - "line": 32, + "line": 30, "column": 0 }, "end": { @@ -861,15 +877,15 @@ }, { "type": "ExportNamedDeclaration", - "start": 971, - "end": 1258, + "start": 1022, + "end": 3640, "loc": { "start": { "line": 36, "column": 0 }, "end": { - "line": 47, + "line": 135, "column": 1 } }, @@ -877,22 +893,22 @@ "source": null, "declaration": { "type": "ClassDeclaration", - "start": 978, - "end": 1258, + "start": 1029, + "end": 3640, "loc": { "start": { "line": 36, "column": 7 }, "end": { - "line": 47, + "line": 135, "column": 1 } }, "id": { "type": "Identifier", - "start": 984, - "end": 996, + "start": 1035, + "end": 1041, "loc": { "start": { "line": 36, @@ -900,56 +916,40 @@ }, "end": { "line": 36, - "column": 25 + "column": 19 }, - "identifierName": "RequestError" + "identifierName": "Server" }, - "name": "RequestError", + "name": "Server", "leadingComments": null }, - "superClass": { - "type": "Identifier", - "start": 1005, - "end": 1010, - "loc": { - "start": { - "line": 36, - "column": 34 - }, - "end": { - "line": 36, - "column": 39 - }, - "identifierName": "Error" - }, - "name": "Error" - }, + "superClass": null, "body": { "type": "ClassBody", - "start": 1011, - "end": 1258, + "start": 1042, + "end": 3640, "loc": { "start": { "line": 36, - "column": 40 + "column": 20 }, "end": { - "line": 47, + "line": 135, "column": 1 } }, "body": [ { "type": "ClassMethod", - "start": 1190, - "end": 1256, + "start": 1083, + "end": 1411, "loc": { "start": { - "line": 43, + "line": 41, "column": 2 }, "end": { - "line": 46, + "line": 50, "column": 3 } }, @@ -957,15 +957,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1190, - "end": 1201, + "start": 1083, + "end": 1094, "loc": { "start": { - "line": 43, + "line": 41, "column": 2 }, "end": { - "line": 43, + "line": 41, "column": 13 }, "identifierName": "constructor" @@ -980,1168 +980,640 @@ "async": false, "params": [ { - "type": "Identifier", - "start": 1202, - "end": 1205, + "type": "ObjectPattern", + "start": 1095, + "end": 1130, "loc": { "start": { - "line": 43, + "line": 41, "column": 14 }, "end": { - "line": 43, - "column": 17 - }, - "identifierName": "msg" - }, - "name": "msg" - }, - { - "type": "Identifier", - "start": 1207, - "end": 1211, - "loc": { - "start": { - "line": 43, - "column": 19 - }, - "end": { - "line": 43, - "column": 23 - }, - "identifierName": "code" - }, - "name": "code" - } - ], - "body": { - "type": "BlockStatement", - "start": 1213, - "end": 1256, - "loc": { - "start": { - "line": 43, - "column": 25 + "line": 41, + "column": 49 + } }, - "end": { - "line": 46, - "column": 3 - } - }, - "body": [ - { - "type": "ExpressionStatement", - "start": 1219, - "end": 1230, - "loc": { - "start": { - "line": 44, - "column": 4 - }, - "end": { - "line": 44, - "column": 15 - } - }, - "expression": { - "type": "CallExpression", - "start": 1219, - "end": 1229, + "properties": [ + { + "type": "ObjectProperty", + "start": 1097, + "end": 1101, "loc": { "start": { - "line": 44, - "column": 4 + "line": 41, + "column": 16 }, "end": { - "line": 44, - "column": 14 + "line": 41, + "column": 20 } }, - "callee": { - "type": "Super", - "start": 1219, - "end": 1224, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1097, + "end": 1101, "loc": { "start": { - "line": 44, - "column": 4 + "line": 41, + "column": 16 }, "end": { - "line": 44, - "column": 9 - } - } + "line": 41, + "column": 20 + }, + "identifierName": "name" + }, + "name": "name" }, - "arguments": [ - { - "type": "Identifier", - "start": 1225, - "end": 1228, - "loc": { - "start": { - "line": 44, - "column": 10 - }, - "end": { - "line": 44, - "column": 13 - }, - "identifierName": "msg" + "value": { + "type": "Identifier", + "start": 1097, + "end": 1101, + "loc": { + "start": { + "line": 41, + "column": 16 }, - "name": "msg" - } - ] - } + "end": { + "line": 41, + "column": 20 + }, + "identifierName": "name" + }, + "name": "name" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 1103, + "end": 1107, + "loc": { + "start": { + "line": 41, + "column": 22 + }, + "end": { + "line": 41, + "column": 26 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1103, + "end": 1107, + "loc": { + "start": { + "line": 41, + "column": 22 + }, + "end": { + "line": 41, + "column": 26 + }, + "identifierName": "port" + }, + "name": "port" + }, + "value": { + "type": "Identifier", + "start": 1103, + "end": 1107, + "loc": { + "start": { + "line": 41, + "column": 22 + }, + "end": { + "line": 41, + "column": 26 + }, + "identifierName": "port" + }, + "name": "port" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 1109, + "end": 1113, + "loc": { + "start": { + "line": 41, + "column": 28 + }, + "end": { + "line": 41, + "column": 32 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1109, + "end": 1113, + "loc": { + "start": { + "line": 41, + "column": 28 + }, + "end": { + "line": 41, + "column": 32 + }, + "identifierName": "host" + }, + "name": "host" + }, + "value": { + "type": "Identifier", + "start": 1109, + "end": 1113, + "loc": { + "start": { + "line": 41, + "column": 28 + }, + "end": { + "line": 41, + "column": 32 + }, + "identifierName": "host" + }, + "name": "host" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 1115, + "end": 1121, + "loc": { + "start": { + "line": 41, + "column": 34 + }, + "end": { + "line": 41, + "column": 40 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1115, + "end": 1121, + "loc": { + "start": { + "line": 41, + "column": 34 + }, + "end": { + "line": 41, + "column": 40 + }, + "identifierName": "logDir" + }, + "name": "logDir" + }, + "value": { + "type": "Identifier", + "start": 1115, + "end": 1121, + "loc": { + "start": { + "line": 41, + "column": 34 + }, + "end": { + "line": 41, + "column": 40 + }, + "identifierName": "logDir" + }, + "name": "logDir" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 1123, + "end": 1128, + "loc": { + "start": { + "line": 41, + "column": 42 + }, + "end": { + "line": 41, + "column": 47 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 1123, + "end": 1128, + "loc": { + "start": { + "line": 41, + "column": 42 + }, + "end": { + "line": 41, + "column": 47 + }, + "identifierName": "debug" + }, + "name": "debug" + }, + "value": { + "type": "Identifier", + "start": 1123, + "end": 1128, + "loc": { + "start": { + "line": 41, + "column": 42 + }, + "end": { + "line": 41, + "column": 47 + }, + "identifierName": "debug" + }, + "name": "debug" + }, + "extra": { + "shorthand": true + } + } + ] + } + ], + "body": { + "type": "BlockStatement", + "start": 1132, + "end": 1411, + "loc": { + "start": { + "line": 41, + "column": 51 }, + "end": { + "line": 50, + "column": 3 + } + }, + "body": [ { "type": "ExpressionStatement", - "start": 1235, - "end": 1252, + "start": 1138, + "end": 1178, "loc": { "start": { - "line": 45, + "line": 42, "column": 4 }, "end": { - "line": 45, - "column": 21 + "line": 42, + "column": 44 } }, "expression": { "type": "AssignmentExpression", - "start": 1235, - "end": 1251, + "start": 1138, + "end": 1177, "loc": { "start": { - "line": 45, + "line": 42, "column": 4 }, "end": { - "line": 45, - "column": 20 + "line": 42, + "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 1235, - "end": 1244, + "start": 1138, + "end": 1147, "loc": { "start": { - "line": 45, + "line": 42, "column": 4 }, "end": { - "line": 45, + "line": 42, "column": 13 } }, "object": { "type": "ThisExpression", - "start": 1235, - "end": 1239, + "start": 1138, + "end": 1142, "loc": { "start": { - "line": 45, + "line": 42, "column": 4 }, "end": { - "line": 45, + "line": 42, "column": 8 } } }, "property": { "type": "Identifier", - "start": 1240, - "end": 1244, + "start": 1143, + "end": 1147, "loc": { "start": { - "line": 45, + "line": 42, "column": 9 }, "end": { - "line": 45, + "line": 42, "column": 13 }, - "identifierName": "code" + "identifierName": "name" }, - "name": "code" + "name": "name" }, "computed": false }, "right": { - "type": "Identifier", - "start": 1247, - "end": 1251, + "type": "LogicalExpression", + "start": 1150, + "end": 1177, "loc": { "start": { - "line": 45, + "line": 42, "column": 16 }, "end": { - "line": 45, - "column": 20 + "line": 42, + "column": 43 + } + }, + "left": { + "type": "Identifier", + "start": 1150, + "end": 1154, + "loc": { + "start": { + "line": 42, + "column": 16 + }, + "end": { + "line": 42, + "column": 20 + }, + "identifierName": "name" }, - "identifierName": "code" + "name": "name" }, - "name": "code" + "operator": "||", + "right": { + "type": "Identifier", + "start": 1158, + "end": 1177, + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 43 + }, + "identifierName": "SERVER_NAME_DEFAULT" + }, + "name": "SERVER_NAME_DEFAULT" + } } } - } - ], - "directives": [] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n ", - "start": 1016, - "end": 1187, - "loc": { - "start": { - "line": 38, - "column": 2 + }, + { + "type": "ExpressionStatement", + "start": 1183, + "end": 1223, + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 44 + } }, - "end": { - "line": 42, - "column": 5 - } - } - } - ] - } - ], - "trailingComments": null - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", - "start": 378, - "end": 739, - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", - "start": 742, - "end": 850, - "loc": { - "start": { - "line": 26, - "column": 0 - }, - "end": { - "line": 29, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", - "start": 853, - "end": 970, - "loc": { - "start": { - "line": 32, - "column": 0 - }, - "end": { - "line": 35, - "column": 3 - } - } - } - ], - "trailingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Request Object that is passed to the controller function as the first parameter\n * from https://github.com/hapijs/hapi/blob/master/API.md#request\n * @type {HapiRequest}\n ", - "start": 1260, - "end": 1439, - "loc": { - "start": { - "line": 49, - "column": 0 - }, - "end": { - "line": 53, - "column": 3 - } - } - } - ] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", - "start": 378, - "end": 739, - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", - "start": 742, - "end": 850, - "loc": { - "start": { - "line": 26, - "column": 0 - }, - "end": { - "line": 29, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", - "start": 853, - "end": 970, - "loc": { - "start": { - "line": 32, - "column": 0 - }, - "end": { - "line": 35, - "column": 3 - } - } - } - ], - "trailingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Request Object that is passed to the controller function as the first parameter\n * from https://github.com/hapijs/hapi/blob/master/API.md#request\n * @type {HapiRequest}\n ", - "start": 1260, - "end": 1439, - "loc": { - "start": { - "line": 49, - "column": 0 - }, - "end": { - "line": 53, - "column": 3 - } - } - } - ] - }, - { - "type": "EmptyStatement", - "start": 1440, - "end": 1441, - "loc": { - "start": { - "line": 54, - "column": 0 - }, - "end": { - "line": 54, - "column": 1 - } - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Request Object that is passed to the controller function as the first parameter\n * from https://github.com/hapijs/hapi/blob/master/API.md#request\n * @type {HapiRequest}\n ", - "start": 1260, - "end": 1439, - "loc": { - "start": { - "line": 49, - "column": 0 - }, - "end": { - "line": 53, - "column": 3 - } - } - } - ], - "trailingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", - "start": 1443, - "end": 1626, - "loc": { - "start": { - "line": 56, - "column": 0 - }, - "end": { - "line": 61, - "column": 3 - } - } - } - ] - }, - { - "type": "ExportNamedDeclaration", - "start": 1627, - "end": 4357, - "loc": { - "start": { - "line": 62, - "column": 0 - }, - "end": { - "line": 164, - "column": 1 - } - }, - "specifiers": [], - "source": null, - "declaration": { - "type": "ClassDeclaration", - "start": 1634, - "end": 4357, - "loc": { - "start": { - "line": 62, - "column": 7 - }, - "end": { - "line": 164, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 1640, - "end": 1646, - "loc": { - "start": { - "line": 62, - "column": 13 - }, - "end": { - "line": 62, - "column": 19 - }, - "identifierName": "Server" - }, - "name": "Server", - "leadingComments": null - }, - "superClass": null, - "body": { - "type": "ClassBody", - "start": 1647, - "end": 4357, - "loc": { - "start": { - "line": 62, - "column": 20 - }, - "end": { - "line": 164, - "column": 1 - } - }, - "body": [ - { - "type": "ClassMethod", - "start": 1713, - "end": 2041, - "loc": { - "start": { - "line": 68, - "column": 2 - }, - "end": { - "line": 77, - "column": 3 - } - }, - "static": false, - "computed": false, - "key": { - "type": "Identifier", - "start": 1713, - "end": 1724, - "loc": { - "start": { - "line": 68, - "column": 2 - }, - "end": { - "line": 68, - "column": 13 - }, - "identifierName": "constructor" - }, - "name": "constructor", - "leadingComments": null - }, - "kind": "constructor", - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [ - { - "type": "ObjectPattern", - "start": 1725, - "end": 1760, - "loc": { - "start": { - "line": 68, - "column": 14 - }, - "end": { - "line": 68, - "column": 49 - } - }, - "properties": [ - { - "type": "ObjectProperty", - "start": 1727, - "end": 1731, + "expression": { + "type": "AssignmentExpression", + "start": 1183, + "end": 1222, "loc": { "start": { - "line": 68, - "column": 16 + "line": 43, + "column": 4 }, "end": { - "line": 68, - "column": 20 + "line": 43, + "column": 43 } }, - "method": false, - "shorthand": true, - "computed": false, - "key": { - "type": "Identifier", - "start": 1727, - "end": 1731, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 1183, + "end": 1194, "loc": { "start": { - "line": 68, - "column": 16 + "line": 43, + "column": 4 }, "end": { - "line": 68, - "column": 20 - }, - "identifierName": "name" - }, - "name": "name" - }, - "value": { - "type": "Identifier", - "start": 1727, - "end": 1731, - "loc": { - "start": { - "line": 68, - "column": 16 - }, - "end": { - "line": 68, - "column": 20 - }, - "identifierName": "name" - }, - "name": "name" - }, - "extra": { - "shorthand": true - } - }, - { - "type": "ObjectProperty", - "start": 1733, - "end": 1737, - "loc": { - "start": { - "line": 68, - "column": 22 - }, - "end": { - "line": 68, - "column": 26 - } - }, - "method": false, - "shorthand": true, - "computed": false, - "key": { - "type": "Identifier", - "start": 1733, - "end": 1737, - "loc": { - "start": { - "line": 68, - "column": 22 - }, - "end": { - "line": 68, - "column": 26 - }, - "identifierName": "port" - }, - "name": "port" - }, - "value": { - "type": "Identifier", - "start": 1733, - "end": 1737, - "loc": { - "start": { - "line": 68, - "column": 22 - }, - "end": { - "line": 68, - "column": 26 - }, - "identifierName": "port" + "line": 43, + "column": 15 + } }, - "name": "port" - }, - "extra": { - "shorthand": true - } - }, - { - "type": "ObjectProperty", - "start": 1739, - "end": 1743, - "loc": { - "start": { - "line": 68, - "column": 28 + "object": { + "type": "ThisExpression", + "start": 1183, + "end": 1187, + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 8 + } + } }, - "end": { - "line": 68, - "column": 32 - } - }, - "method": false, - "shorthand": true, - "computed": false, - "key": { - "type": "Identifier", - "start": 1739, - "end": 1743, - "loc": { - "start": { - "line": 68, - "column": 28 - }, - "end": { - "line": 68, - "column": 32 + "property": { + "type": "Identifier", + "start": 1188, + "end": 1194, + "loc": { + "start": { + "line": 43, + "column": 9 + }, + "end": { + "line": 43, + "column": 15 + }, + "identifierName": "logDir" }, - "identifierName": "host" + "name": "logDir" }, - "name": "host" + "computed": false }, - "value": { - "type": "Identifier", - "start": 1739, - "end": 1743, + "right": { + "type": "LogicalExpression", + "start": 1197, + "end": 1222, "loc": { "start": { - "line": 68, - "column": 28 + "line": 43, + "column": 18 }, "end": { - "line": 68, - "column": 32 - }, - "identifierName": "host" - }, - "name": "host" - }, - "extra": { - "shorthand": true - } - }, - { - "type": "ObjectProperty", - "start": 1745, - "end": 1751, - "loc": { - "start": { - "line": 68, - "column": 34 + "line": 43, + "column": 43 + } }, - "end": { - "line": 68, - "column": 40 - } - }, - "method": false, - "shorthand": true, - "computed": false, - "key": { - "type": "Identifier", - "start": 1745, - "end": 1751, - "loc": { - "start": { - "line": 68, - "column": 34 - }, - "end": { - "line": 68, - "column": 40 + "left": { + "type": "Identifier", + "start": 1197, + "end": 1203, + "loc": { + "start": { + "line": 43, + "column": 18 + }, + "end": { + "line": 43, + "column": 24 + }, + "identifierName": "logDir" }, - "identifierName": "logDir" + "name": "logDir" }, - "name": "logDir" - }, - "value": { - "type": "Identifier", - "start": 1745, - "end": 1751, - "loc": { - "start": { - "line": 68, - "column": 34 - }, - "end": { - "line": 68, - "column": 40 + "operator": "||", + "right": { + "type": "Identifier", + "start": 1207, + "end": 1222, + "loc": { + "start": { + "line": 43, + "column": 28 + }, + "end": { + "line": 43, + "column": 43 + }, + "identifierName": "LOG_DIR_DEFAULT" }, - "identifierName": "logDir" - }, - "name": "logDir" - }, - "extra": { - "shorthand": true - } - }, - { - "type": "ObjectProperty", - "start": 1753, - "end": 1758, - "loc": { - "start": { - "line": 68, - "column": 42 - }, - "end": { - "line": 68, - "column": 47 + "name": "LOG_DIR_DEFAULT" } - }, - "method": false, - "shorthand": true, - "computed": false, - "key": { - "type": "Identifier", - "start": 1753, - "end": 1758, - "loc": { - "start": { - "line": 68, - "column": 42 - }, - "end": { - "line": 68, - "column": 47 - }, - "identifierName": "debug" - }, - "name": "debug" - }, - "value": { - "type": "Identifier", - "start": 1753, - "end": 1758, - "loc": { - "start": { - "line": 68, - "column": 42 - }, - "end": { - "line": 68, - "column": 47 - }, - "identifierName": "debug" - }, - "name": "debug" - }, - "extra": { - "shorthand": true } } - ] - } - ], - "body": { - "type": "BlockStatement", - "start": 1762, - "end": 2041, - "loc": { - "start": { - "line": 68, - "column": 51 }, - "end": { - "line": 77, - "column": 3 - } - }, - "body": [ { "type": "ExpressionStatement", - "start": 1768, - "end": 1808, + "start": 1228, + "end": 1407, "loc": { "start": { - "line": 69, + "line": 44, "column": 4 }, "end": { - "line": 69, - "column": 44 + "line": 49, + "column": 7 } }, "expression": { "type": "AssignmentExpression", - "start": 1768, - "end": 1807, + "start": 1228, + "end": 1406, "loc": { "start": { - "line": 69, + "line": 44, "column": 4 }, "end": { - "line": 69, - "column": 43 + "line": 49, + "column": 6 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 1768, - "end": 1777, + "start": 1228, + "end": 1239, "loc": { "start": { - "line": 69, + "line": 44, "column": 4 }, "end": { - "line": 69, - "column": 13 + "line": 44, + "column": 15 } }, "object": { "type": "ThisExpression", - "start": 1768, - "end": 1772, + "start": 1228, + "end": 1232, "loc": { "start": { - "line": 69, + "line": 44, "column": 4 }, "end": { - "line": 69, + "line": 44, "column": 8 } } }, "property": { "type": "Identifier", - "start": 1773, - "end": 1777, + "start": 1233, + "end": 1239, "loc": { "start": { - "line": 69, + "line": 44, "column": 9 }, "end": { - "line": 69, - "column": 13 - }, - "identifierName": "name" - }, - "name": "name" - }, - "computed": false - }, - "right": { - "type": "LogicalExpression", - "start": 1780, - "end": 1807, - "loc": { - "start": { - "line": 69, - "column": 16 - }, - "end": { - "line": 69, - "column": 43 - } - }, - "left": { - "type": "Identifier", - "start": 1780, - "end": 1784, - "loc": { - "start": { - "line": 69, - "column": 16 - }, - "end": { - "line": 69, - "column": 20 - }, - "identifierName": "name" - }, - "name": "name" - }, - "operator": "||", - "right": { - "type": "Identifier", - "start": 1788, - "end": 1807, - "loc": { - "start": { - "line": 69, - "column": 24 - }, - "end": { - "line": 69, - "column": 43 - }, - "identifierName": "SERVER_NAME_DEFAULT" - }, - "name": "SERVER_NAME_DEFAULT" - } - } - } - }, - { - "type": "ExpressionStatement", - "start": 1813, - "end": 1853, - "loc": { - "start": { - "line": 70, - "column": 4 - }, - "end": { - "line": 70, - "column": 44 - } - }, - "expression": { - "type": "AssignmentExpression", - "start": 1813, - "end": 1852, - "loc": { - "start": { - "line": 70, - "column": 4 - }, - "end": { - "line": 70, - "column": 43 - } - }, - "operator": "=", - "left": { - "type": "MemberExpression", - "start": 1813, - "end": 1824, - "loc": { - "start": { - "line": 70, - "column": 4 - }, - "end": { - "line": 70, - "column": 15 - } - }, - "object": { - "type": "ThisExpression", - "start": 1813, - "end": 1817, - "loc": { - "start": { - "line": 70, - "column": 4 - }, - "end": { - "line": 70, - "column": 8 - } - } - }, - "property": { - "type": "Identifier", - "start": 1818, - "end": 1824, - "loc": { - "start": { - "line": 70, - "column": 9 - }, - "end": { - "line": 70, - "column": 15 - }, - "identifierName": "logDir" - }, - "name": "logDir" - }, - "computed": false - }, - "right": { - "type": "LogicalExpression", - "start": 1827, - "end": 1852, - "loc": { - "start": { - "line": 70, - "column": 18 - }, - "end": { - "line": 70, - "column": 43 - } - }, - "left": { - "type": "Identifier", - "start": 1827, - "end": 1833, - "loc": { - "start": { - "line": 70, - "column": 18 - }, - "end": { - "line": 70, - "column": 24 - }, - "identifierName": "logDir" - }, - "name": "logDir" - }, - "operator": "||", - "right": { - "type": "Identifier", - "start": 1837, - "end": 1852, - "loc": { - "start": { - "line": 70, - "column": 28 - }, - "end": { - "line": 70, - "column": 43 - }, - "identifierName": "LOG_DIR_DEFAULT" - }, - "name": "LOG_DIR_DEFAULT" - } - } - } - }, - { - "type": "ExpressionStatement", - "start": 1858, - "end": 2037, - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 76, - "column": 7 - } - }, - "expression": { - "type": "AssignmentExpression", - "start": 1858, - "end": 2036, - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 76, - "column": 6 - } - }, - "operator": "=", - "left": { - "type": "MemberExpression", - "start": 1858, - "end": 1869, - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 71, - "column": 15 - } - }, - "object": { - "type": "ThisExpression", - "start": 1858, - "end": 1862, - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 71, - "column": 8 - } - } - }, - "property": { - "type": "Identifier", - "start": 1863, - "end": 1869, - "loc": { - "start": { - "line": 71, - "column": 9 - }, - "end": { - "line": 71, + "line": 44, "column": 15 }, "identifierName": "server" @@ -2152,43 +1624,43 @@ }, "right": { "type": "CallExpression", - "start": 1872, - "end": 2036, + "start": 1242, + "end": 1406, "loc": { "start": { - "line": 71, + "line": 44, "column": 18 }, "end": { - "line": 76, + "line": 49, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 1872, - "end": 1883, + "start": 1242, + "end": 1253, "loc": { "start": { - "line": 71, + "line": 44, "column": 18 }, "end": { - "line": 71, + "line": 44, "column": 29 } }, "object": { "type": "Identifier", - "start": 1872, - "end": 1876, + "start": 1242, + "end": 1246, "loc": { "start": { - "line": 71, + "line": 44, "column": 18 }, "end": { - "line": 71, + "line": 44, "column": 22 }, "identifierName": "Hapi" @@ -2197,15 +1669,15 @@ }, "property": { "type": "Identifier", - "start": 1877, - "end": 1883, + "start": 1247, + "end": 1253, "loc": { "start": { - "line": 71, + "line": 44, "column": 23 }, "end": { - "line": 71, + "line": 44, "column": 29 }, "identifierName": "server" @@ -2217,30 +1689,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 1884, - "end": 2035, + "start": 1254, + "end": 1405, "loc": { "start": { - "line": 71, + "line": 44, "column": 30 }, "end": { - "line": 76, + "line": 49, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 1892, - "end": 1896, + "start": 1262, + "end": 1266, "loc": { "start": { - "line": 72, + "line": 45, "column": 6 }, "end": { - "line": 72, + "line": 45, "column": 10 } }, @@ -2249,15 +1721,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1892, - "end": 1896, + "start": 1262, + "end": 1266, "loc": { "start": { - "line": 72, + "line": 45, "column": 6 }, "end": { - "line": 72, + "line": 45, "column": 10 }, "identifierName": "port" @@ -2266,15 +1738,15 @@ }, "value": { "type": "Identifier", - "start": 1892, - "end": 1896, + "start": 1262, + "end": 1266, "loc": { "start": { - "line": 72, + "line": 45, "column": 6 }, "end": { - "line": 72, + "line": 45, "column": 10 }, "identifierName": "port" @@ -2287,15 +1759,15 @@ }, { "type": "ObjectProperty", - "start": 1904, - "end": 1908, + "start": 1274, + "end": 1278, "loc": { "start": { - "line": 73, + "line": 46, "column": 6 }, "end": { - "line": 73, + "line": 46, "column": 10 } }, @@ -2304,15 +1776,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1904, - "end": 1908, + "start": 1274, + "end": 1278, "loc": { "start": { - "line": 73, + "line": 46, "column": 6 }, "end": { - "line": 73, + "line": 46, "column": 10 }, "identifierName": "host" @@ -2321,15 +1793,15 @@ }, "value": { "type": "Identifier", - "start": 1904, - "end": 1908, + "start": 1274, + "end": 1278, "loc": { "start": { - "line": 73, + "line": 46, "column": 6 }, "end": { - "line": 73, + "line": 46, "column": 10 }, "identifierName": "host" @@ -2342,15 +1814,15 @@ }, { "type": "ObjectProperty", - "start": 1971, - "end": 2029, + "start": 1341, + "end": 1399, "loc": { "start": { - "line": 75, + "line": 48, "column": 6 }, "end": { - "line": 75, + "line": 48, "column": 64 } }, @@ -2359,15 +1831,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1971, - "end": 1976, + "start": 1341, + "end": 1346, "loc": { "start": { - "line": 75, + "line": 48, "column": 6 }, "end": { - "line": 75, + "line": 48, "column": 11 }, "identifierName": "debug" @@ -2377,43 +1849,43 @@ }, "value": { "type": "ConditionalExpression", - "start": 1978, - "end": 2029, + "start": 1348, + "end": 1399, "loc": { "start": { - "line": 75, + "line": 48, "column": 13 }, "end": { - "line": 75, + "line": 48, "column": 64 } }, "test": { "type": "BinaryExpression", - "start": 1978, - "end": 1992, + "start": 1348, + "end": 1362, "loc": { "start": { - "line": 75, + "line": 48, "column": 13 }, "end": { - "line": 75, + "line": 48, "column": 27 } }, "left": { "type": "Identifier", - "start": 1978, - "end": 1983, + "start": 1348, + "end": 1353, "loc": { "start": { - "line": 75, + "line": 48, "column": 13 }, "end": { - "line": 75, + "line": 48, "column": 18 }, "identifierName": "debug" @@ -2423,15 +1895,15 @@ "operator": "===", "right": { "type": "BooleanLiteral", - "start": 1988, - "end": 1992, + "start": 1358, + "end": 1362, "loc": { "start": { - "line": 75, + "line": 48, "column": 23 }, "end": { - "line": 75, + "line": 48, "column": 27 } }, @@ -2440,30 +1912,30 @@ }, "consequent": { "type": "ObjectExpression", - "start": 1995, - "end": 2017, + "start": 1365, + "end": 1387, "loc": { "start": { - "line": 75, + "line": 48, "column": 30 }, "end": { - "line": 75, + "line": 48, "column": 52 } }, "properties": [ { "type": "ObjectProperty", - "start": 1997, - "end": 2015, + "start": 1367, + "end": 1385, "loc": { "start": { - "line": 75, + "line": 48, "column": 32 }, "end": { - "line": 75, + "line": 48, "column": 50 } }, @@ -2472,15 +1944,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1997, - "end": 2004, + "start": 1367, + "end": 1374, "loc": { "start": { - "line": 75, + "line": 48, "column": 32 }, "end": { - "line": 75, + "line": 48, "column": 39 }, "identifierName": "request" @@ -2489,30 +1961,30 @@ }, "value": { "type": "ArrayExpression", - "start": 2006, - "end": 2015, + "start": 1376, + "end": 1385, "loc": { "start": { - "line": 75, + "line": 48, "column": 41 }, "end": { - "line": 75, + "line": 48, "column": 50 } }, "elements": [ { "type": "StringLiteral", - "start": 2007, - "end": 2014, + "start": 1377, + "end": 1384, "loc": { "start": { - "line": 75, + "line": 48, "column": 42 }, "end": { - "line": 75, + "line": 48, "column": 49 } }, @@ -2529,15 +2001,15 @@ }, "alternate": { "type": "Identifier", - "start": 2020, - "end": 2029, + "start": 1390, + "end": 1399, "loc": { "start": { - "line": 75, + "line": 48, "column": 55 }, "end": { - "line": 75, + "line": 48, "column": 64 }, "identifierName": "undefined" @@ -2549,15 +2021,15 @@ { "type": "CommentLine", "value": " Sets errors to print to console while running", - "start": 1916, - "end": 1964, + "start": 1286, + "end": 1334, "loc": { "start": { - "line": 74, + "line": 47, "column": 6 }, "end": { - "line": 74, + "line": 47, "column": 54 } } @@ -2578,49 +2050,33 @@ { "type": "CommentBlock", "value": "*\n * Server Constructor\n ", - "start": 1652, - "end": 1685, + "start": 1047, + "end": 1080, "loc": { "start": { - "line": 64, + "line": 38, "column": 2 }, "end": { - "line": 66, + "line": 40, "column": 5 } } - }, - { - "type": "CommentLine", - "value": " eslint-disable-line", - "start": 1688, - "end": 1710, - "loc": { - "start": { - "line": 67, - "column": 2 - }, - "end": { - "line": 67, - "column": 24 - } - } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\n * Shutdown the Hapi Server Properly\n * @param {Function} callback callback to run after server has shutdown\n * @return {undefined} no return\n ", - "start": 2045, - "end": 2214, + "start": 1415, + "end": 1584, "loc": { "start": { - "line": 79, + "line": 52, "column": 2 }, "end": { - "line": 83, + "line": 56, "column": 5 } } @@ -2629,15 +2085,15 @@ }, { "type": "ClassMethod", - "start": 2217, - "end": 2487, + "start": 1587, + "end": 1807, "loc": { "start": { - "line": 84, + "line": 57, "column": 2 }, "end": { - "line": 93, + "line": 65, "column": 3 } }, @@ -2645,15 +2101,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2217, - "end": 2225, + "start": 1587, + "end": 1595, "loc": { "start": { - "line": 84, + "line": 57, "column": 2 }, "end": { - "line": 84, + "line": 57, "column": 10 }, "identifierName": "shutdown" @@ -2669,15 +2125,15 @@ "params": [ { "type": "Identifier", - "start": 2226, - "end": 2234, + "start": 1596, + "end": 1604, "loc": { "start": { - "line": 84, + "line": 57, "column": 11 }, "end": { - "line": 84, + "line": 57, "column": 19 }, "identifierName": "callback" @@ -2687,114 +2143,114 @@ ], "body": { "type": "BlockStatement", - "start": 2236, - "end": 2487, + "start": 1606, + "end": 1807, "loc": { "start": { - "line": 84, + "line": 57, "column": 21 }, "end": { - "line": 93, + "line": 65, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2338, - "end": 2483, + "start": 1658, + "end": 1803, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 92, + "line": 64, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 2338, - "end": 2482, + "start": 1658, + "end": 1802, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 92, + "line": 64, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 2338, - "end": 2379, + "start": 1658, + "end": 1699, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 87, + "line": 59, "column": 45 } }, "object": { "type": "CallExpression", - "start": 2338, - "end": 2374, + "start": 1658, + "end": 1694, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 87, + "line": 59, "column": 40 } }, "callee": { "type": "MemberExpression", - "start": 2338, - "end": 2354, + "start": 1658, + "end": 1674, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 87, + "line": 59, "column": 20 } }, "object": { "type": "MemberExpression", - "start": 2338, - "end": 2349, + "start": 1658, + "end": 1669, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 87, + "line": 59, "column": 15 } }, "object": { "type": "ThisExpression", - "start": 2338, - "end": 2342, + "start": 1658, + "end": 1662, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 87, + "line": 59, "column": 8 } }, @@ -2802,15 +2258,15 @@ }, "property": { "type": "Identifier", - "start": 2343, - "end": 2349, + "start": 1663, + "end": 1669, "loc": { "start": { - "line": 87, + "line": 59, "column": 9 }, "end": { - "line": 87, + "line": 59, "column": 15 }, "identifierName": "server" @@ -2822,15 +2278,15 @@ }, "property": { "type": "Identifier", - "start": 2350, - "end": 2354, + "start": 1670, + "end": 1674, "loc": { "start": { - "line": 87, + "line": 59, "column": 16 }, "end": { - "line": 87, + "line": 59, "column": 20 }, "identifierName": "stop" @@ -2843,30 +2299,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 2355, - "end": 2373, + "start": 1675, + "end": 1693, "loc": { "start": { - "line": 87, + "line": 59, "column": 21 }, "end": { - "line": 87, + "line": 59, "column": 39 } }, "properties": [ { "type": "ObjectProperty", - "start": 2357, - "end": 2371, + "start": 1677, + "end": 1691, "loc": { "start": { - "line": 87, + "line": 59, "column": 23 }, "end": { - "line": 87, + "line": 59, "column": 37 } }, @@ -2875,15 +2331,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2357, - "end": 2364, + "start": 1677, + "end": 1684, "loc": { "start": { - "line": 87, + "line": 59, "column": 23 }, "end": { - "line": 87, + "line": 59, "column": 30 }, "identifierName": "timeout" @@ -2892,15 +2348,15 @@ }, "value": { "type": "NumericLiteral", - "start": 2366, - "end": 2371, + "start": 1686, + "end": 1691, "loc": { "start": { - "line": 87, + "line": 59, "column": 32 }, "end": { - "line": 87, + "line": 59, "column": 37 } }, @@ -2918,15 +2374,15 @@ }, "property": { "type": "Identifier", - "start": 2375, - "end": 2379, + "start": 1695, + "end": 1699, "loc": { "start": { - "line": 87, + "line": 59, "column": 41 }, "end": { - "line": 87, + "line": 59, "column": 45 }, "identifierName": "then" @@ -2939,15 +2395,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 2380, - "end": 2481, + "start": 1700, + "end": 1801, "loc": { "start": { - "line": 87, + "line": 59, "column": 46 }, "end": { - "line": 92, + "line": 64, "column": 5 } }, @@ -2958,15 +2414,15 @@ "params": [ { "type": "Identifier", - "start": 2380, - "end": 2383, + "start": 1700, + "end": 1703, "loc": { "start": { - "line": 87, + "line": 59, "column": 46 }, "end": { - "line": 87, + "line": 59, "column": 49 }, "identifierName": "err" @@ -2976,44 +2432,44 @@ ], "body": { "type": "BlockStatement", - "start": 2387, - "end": 2481, + "start": 1707, + "end": 1801, "loc": { "start": { - "line": 87, + "line": 59, "column": 53 }, "end": { - "line": 92, + "line": 64, "column": 5 } }, "body": [ { "type": "IfStatement", - "start": 2395, - "end": 2454, + "start": 1715, + "end": 1774, "loc": { "start": { - "line": 88, + "line": 60, "column": 6 }, "end": { - "line": 90, + "line": 62, "column": 7 } }, "test": { "type": "Identifier", - "start": 2399, - "end": 2402, + "start": 1719, + "end": 1722, "loc": { "start": { - "line": 88, + "line": 60, "column": 10 }, "end": { - "line": 88, + "line": 60, "column": 13 }, "identifierName": "err" @@ -3022,15 +2478,15 @@ }, "consequent": { "type": "BlockStatement", - "start": 2404, - "end": 2454, + "start": 1724, + "end": 1774, "loc": { "start": { - "line": 88, + "line": 60, "column": 15 }, "end": { - "line": 90, + "line": 62, "column": 7 } }, @@ -3041,15 +2497,15 @@ { "type": "CommentLine", "value": " TODO: Log Hapi Shutdown Error", - "start": 2414, - "end": 2446, + "start": 1734, + "end": 1766, "loc": { "start": { - "line": 89, + "line": 61, "column": 8 }, "end": { - "line": 89, + "line": 61, "column": 40 } } @@ -3060,43 +2516,43 @@ }, { "type": "ExpressionStatement", - "start": 2461, - "end": 2475, + "start": 1781, + "end": 1795, "loc": { "start": { - "line": 91, + "line": 63, "column": 6 }, "end": { - "line": 91, + "line": 63, "column": 20 } }, "expression": { "type": "CallExpression", - "start": 2461, - "end": 2474, + "start": 1781, + "end": 1794, "loc": { "start": { - "line": 91, + "line": 63, "column": 6 }, "end": { - "line": 91, + "line": 63, "column": 19 } }, "callee": { "type": "Identifier", - "start": 2461, - "end": 2469, + "start": 1781, + "end": 1789, "loc": { "start": { - "line": 91, + "line": 63, "column": 6 }, "end": { - "line": 91, + "line": 63, "column": 14 }, "identifierName": "callback" @@ -3106,15 +2562,15 @@ "arguments": [ { "type": "Identifier", - "start": 2470, - "end": 2473, + "start": 1790, + "end": 1793, "loc": { "start": { - "line": 91, + "line": 63, "column": 15 }, "end": { - "line": 91, + "line": 63, "column": 18 }, "identifierName": "err" @@ -3132,34 +2588,18 @@ "leadingComments": null }, "leadingComments": [ - { - "type": "CommentLine", - "value": " eslint-disable-line flowtype/no-weak-types", - "start": 2242, - "end": 2287, - "loc": { - "start": { - "line": 85, - "column": 4 - }, - "end": { - "line": 85, - "column": 49 - } - } - }, { "type": "CommentLine", "value": " TODO: Set Shutdown Timeout from config", - "start": 2292, - "end": 2333, + "start": 1612, + "end": 1653, "loc": { "start": { - "line": 86, + "line": 58, "column": 4 }, "end": { - "line": 86, + "line": 58, "column": 45 } } @@ -3174,15 +2614,15 @@ { "type": "CommentBlock", "value": "*\n * Shutdown the Hapi Server Properly\n * @param {Function} callback callback to run after server has shutdown\n * @return {undefined} no return\n ", - "start": 2045, - "end": 2214, + "start": 1415, + "end": 1584, "loc": { "start": { - "line": 79, + "line": 52, "column": 2 }, "end": { - "line": 83, + "line": 56, "column": 5 } } @@ -3192,15 +2632,15 @@ { "type": "CommentBlock", "value": "*\n * Starts the server and registers any plugins\n * @return {Promise} Resolves once server has started\n ", - "start": 2491, - "end": 2605, + "start": 1811, + "end": 1925, "loc": { "start": { - "line": 95, + "line": 67, "column": 2 }, "end": { - "line": 98, + "line": 70, "column": 5 } } @@ -3209,15 +2649,15 @@ }, { "type": "ClassMethod", - "start": 2608, - "end": 3480, + "start": 1928, + "end": 2800, "loc": { "start": { - "line": 99, + "line": 71, "column": 2 }, "end": { - "line": 125, + "line": 97, "column": 3 } }, @@ -3225,15 +2665,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2614, - "end": 2617, + "start": 1934, + "end": 1937, "loc": { "start": { - "line": 99, + "line": 71, "column": 8 }, "end": { - "line": 99, + "line": 71, "column": 11 }, "identifierName": "run" @@ -3248,115 +2688,115 @@ "params": [], "body": { "type": "BlockStatement", - "start": 2620, - "end": 3480, + "start": 1940, + "end": 2800, "loc": { "start": { - "line": 99, + "line": 71, "column": 14 }, "end": { - "line": 125, + "line": 97, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2626, - "end": 2652, + "start": 1946, + "end": 1972, "loc": { "start": { - "line": 100, + "line": 72, "column": 4 }, "end": { - "line": 100, + "line": 72, "column": 30 } }, "expression": { "type": "AwaitExpression", - "start": 2626, - "end": 2651, + "start": 1946, + "end": 1971, "loc": { "start": { - "line": 100, + "line": 72, "column": 4 }, "end": { - "line": 100, + "line": 72, "column": 29 } }, "argument": { "type": "CallExpression", - "start": 2632, - "end": 2651, + "start": 1952, + "end": 1971, "loc": { "start": { - "line": 100, + "line": 72, "column": 10 }, "end": { - "line": 100, + "line": 72, "column": 29 } }, "callee": { "type": "MemberExpression", - "start": 2632, - "end": 2649, + "start": 1952, + "end": 1969, "loc": { "start": { - "line": 100, + "line": 72, "column": 10 }, "end": { - "line": 100, + "line": 72, "column": 27 } }, "object": { "type": "MemberExpression", - "start": 2632, - "end": 2643, + "start": 1952, + "end": 1963, "loc": { "start": { - "line": 100, + "line": 72, "column": 10 }, "end": { - "line": 100, + "line": 72, "column": 21 } }, "object": { "type": "ThisExpression", - "start": 2632, - "end": 2636, + "start": 1952, + "end": 1956, "loc": { "start": { - "line": 100, + "line": 72, "column": 10 }, "end": { - "line": 100, + "line": 72, "column": 14 } } }, "property": { "type": "Identifier", - "start": 2637, - "end": 2643, + "start": 1957, + "end": 1963, "loc": { "start": { - "line": 100, + "line": 72, "column": 15 }, "end": { - "line": 100, + "line": 72, "column": 21 }, "identifierName": "server" @@ -3367,15 +2807,15 @@ }, "property": { "type": "Identifier", - "start": 2644, - "end": 2649, + "start": 1964, + "end": 1969, "loc": { "start": { - "line": 100, + "line": 72, "column": 22 }, "end": { - "line": 100, + "line": 72, "column": 27 }, "identifierName": "start" @@ -3390,71 +2830,71 @@ }, { "type": "ExpressionStatement", - "start": 2657, - "end": 2748, + "start": 1977, + "end": 2068, "loc": { "start": { - "line": 101, + "line": 73, "column": 4 }, "end": { - "line": 101, + "line": 73, "column": 95 } }, "expression": { "type": "CallExpression", - "start": 2657, - "end": 2747, + "start": 1977, + "end": 2067, "loc": { "start": { - "line": 101, + "line": 73, "column": 4 }, "end": { - "line": 101, + "line": 73, "column": 94 } }, "callee": { "type": "MemberExpression", - "start": 2657, - "end": 2677, + "start": 1977, + "end": 1997, "loc": { "start": { - "line": 101, + "line": 73, "column": 4 }, "end": { - "line": 101, + "line": 73, "column": 24 } }, "object": { "type": "MemberExpression", - "start": 2657, - "end": 2671, + "start": 1977, + "end": 1991, "loc": { "start": { - "line": 101, + "line": 73, "column": 4 }, "end": { - "line": 101, + "line": 73, "column": 18 } }, "object": { "type": "Identifier", - "start": 2657, - "end": 2664, + "start": 1977, + "end": 1984, "loc": { "start": { - "line": 101, + "line": 73, "column": 4 }, "end": { - "line": 101, + "line": 73, "column": 11 }, "identifierName": "process" @@ -3463,15 +2903,15 @@ }, "property": { "type": "Identifier", - "start": 2665, - "end": 2671, + "start": 1985, + "end": 1991, "loc": { "start": { - "line": 101, + "line": 73, "column": 12 }, "end": { - "line": 101, + "line": 73, "column": 18 }, "identifierName": "stdout" @@ -3482,15 +2922,15 @@ }, "property": { "type": "Identifier", - "start": 2672, - "end": 2677, + "start": 1992, + "end": 1997, "loc": { "start": { - "line": 101, + "line": 73, "column": 19 }, "end": { - "line": 101, + "line": 73, "column": 24 }, "identifierName": "write" @@ -3502,71 +2942,71 @@ "arguments": [ { "type": "BinaryExpression", - "start": 2678, - "end": 2746, + "start": 1998, + "end": 2066, "loc": { "start": { - "line": 101, + "line": 73, "column": 25 }, "end": { - "line": 101, + "line": 73, "column": 93 } }, "left": { "type": "BinaryExpression", - "start": 2678, - "end": 2737, + "start": 1998, + "end": 2057, "loc": { "start": { - "line": 101, + "line": 73, "column": 25 }, "end": { - "line": 101, + "line": 73, "column": 84 } }, "left": { "type": "BinaryExpression", - "start": 2678, - "end": 2713, + "start": 1998, + "end": 2033, "loc": { "start": { - "line": 101, + "line": 73, "column": 25 }, "end": { - "line": 101, + "line": 73, "column": 60 } }, "left": { "type": "BinaryExpression", - "start": 2678, - "end": 2696, + "start": 1998, + "end": 2016, "loc": { "start": { - "line": 101, + "line": 73, "column": 25 }, "end": { - "line": 101, + "line": 73, "column": 43 } }, "left": { "type": "StringLiteral", - "start": 2678, - "end": 2684, + "start": 1998, + "end": 2004, "loc": { "start": { - "line": 101, + "line": 73, "column": 25 }, "end": { - "line": 101, + "line": 73, "column": 31 } }, @@ -3579,44 +3019,44 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 2687, - "end": 2696, + "start": 2007, + "end": 2016, "loc": { "start": { - "line": 101, + "line": 73, "column": 34 }, "end": { - "line": 101, + "line": 73, "column": 43 } }, "object": { "type": "ThisExpression", - "start": 2687, - "end": 2691, + "start": 2007, + "end": 2011, "loc": { "start": { - "line": 101, + "line": 73, "column": 34 }, "end": { - "line": 101, + "line": 73, "column": 38 } } }, "property": { "type": "Identifier", - "start": 2692, - "end": 2696, + "start": 2012, + "end": 2016, "loc": { "start": { - "line": 101, + "line": 73, "column": 39 }, "end": { - "line": 101, + "line": 73, "column": 43 }, "identifierName": "name" @@ -3629,15 +3069,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 2699, - "end": 2713, + "start": 2019, + "end": 2033, "loc": { "start": { - "line": 101, + "line": 73, "column": 46 }, "end": { - "line": 101, + "line": 73, "column": 60 } }, @@ -3651,72 +3091,72 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 2716, - "end": 2737, + "start": 2036, + "end": 2057, "loc": { "start": { - "line": 101, + "line": 73, "column": 63 }, "end": { - "line": 101, + "line": 73, "column": 84 } }, "object": { "type": "MemberExpression", - "start": 2716, - "end": 2732, + "start": 2036, + "end": 2052, "loc": { "start": { - "line": 101, + "line": 73, "column": 63 }, "end": { - "line": 101, + "line": 73, "column": 79 } }, "object": { "type": "MemberExpression", - "start": 2716, - "end": 2727, + "start": 2036, + "end": 2047, "loc": { "start": { - "line": 101, + "line": 73, "column": 63 }, "end": { - "line": 101, + "line": 73, "column": 74 } }, "object": { "type": "ThisExpression", - "start": 2716, - "end": 2720, + "start": 2036, + "end": 2040, "loc": { "start": { - "line": 101, + "line": 73, "column": 63 }, "end": { - "line": 101, + "line": 73, "column": 67 } } }, "property": { "type": "Identifier", - "start": 2721, - "end": 2727, + "start": 2041, + "end": 2047, "loc": { "start": { - "line": 101, + "line": 73, "column": 68 }, "end": { - "line": 101, + "line": 73, "column": 74 }, "identifierName": "server" @@ -3727,15 +3167,15 @@ }, "property": { "type": "Identifier", - "start": 2728, - "end": 2732, + "start": 2048, + "end": 2052, "loc": { "start": { - "line": 101, + "line": 73, "column": 75 }, "end": { - "line": 101, + "line": 73, "column": 79 }, "identifierName": "info" @@ -3746,15 +3186,15 @@ }, "property": { "type": "Identifier", - "start": 2733, - "end": 2737, + "start": 2053, + "end": 2057, "loc": { "start": { - "line": 101, + "line": 73, "column": 80 }, "end": { - "line": 101, + "line": 73, "column": 84 }, "identifierName": "port" @@ -3767,15 +3207,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 2740, - "end": 2746, + "start": 2060, + "end": 2066, "loc": { "start": { - "line": 101, + "line": 73, "column": 87 }, "end": { - "line": 101, + "line": 73, "column": 93 } }, @@ -3792,15 +3232,15 @@ { "type": "CommentLine", "value": " Serve Docs with OpenAPI and Swagger UI", - "start": 2754, - "end": 2795, + "start": 2074, + "end": 2115, "loc": { "start": { - "line": 103, + "line": 75, "column": 4 }, "end": { - "line": 103, + "line": 75, "column": 45 } } @@ -3808,15 +3248,15 @@ { "type": "CommentLine", "value": " visit at http://localhost:3333/docs/swagger/index.html", - "start": 2800, - "end": 2857, + "start": 2120, + "end": 2177, "loc": { "start": { - "line": 104, + "line": 76, "column": 4 }, "end": { - "line": 104, + "line": 76, "column": 61 } } @@ -3825,100 +3265,100 @@ }, { "type": "ExpressionStatement", - "start": 2862, - "end": 2918, + "start": 2182, + "end": 2238, "loc": { "start": { - "line": 105, + "line": 77, "column": 4 }, "end": { - "line": 107, + "line": 79, "column": 7 } }, "expression": { "type": "AwaitExpression", - "start": 2862, - "end": 2917, + "start": 2182, + "end": 2237, "loc": { "start": { - "line": 105, + "line": 77, "column": 4 }, "end": { - "line": 107, + "line": 79, "column": 6 } }, "argument": { "type": "CallExpression", - "start": 2868, - "end": 2917, + "start": 2188, + "end": 2237, "loc": { "start": { - "line": 105, + "line": 77, "column": 10 }, "end": { - "line": 107, + "line": 79, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 2868, - "end": 2888, + "start": 2188, + "end": 2208, "loc": { "start": { - "line": 105, + "line": 77, "column": 10 }, "end": { - "line": 105, + "line": 77, "column": 30 } }, "object": { "type": "MemberExpression", - "start": 2868, - "end": 2879, + "start": 2188, + "end": 2199, "loc": { "start": { - "line": 105, + "line": 77, "column": 10 }, "end": { - "line": 105, + "line": 77, "column": 21 } }, "object": { "type": "ThisExpression", - "start": 2868, - "end": 2872, + "start": 2188, + "end": 2192, "loc": { "start": { - "line": 105, + "line": 77, "column": 10 }, "end": { - "line": 105, + "line": 77, "column": 14 } } }, "property": { "type": "Identifier", - "start": 2873, - "end": 2879, + "start": 2193, + "end": 2199, "loc": { "start": { - "line": 105, + "line": 77, "column": 15 }, "end": { - "line": 105, + "line": 77, "column": 21 }, "identifierName": "server" @@ -3929,15 +3369,15 @@ }, "property": { "type": "Identifier", - "start": 2880, - "end": 2888, + "start": 2200, + "end": 2208, "loc": { "start": { - "line": 105, + "line": 77, "column": 22 }, "end": { - "line": 105, + "line": 77, "column": 30 }, "identifierName": "register" @@ -3949,30 +3389,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 2889, - "end": 2916, + "start": 2209, + "end": 2236, "loc": { "start": { - "line": 105, + "line": 77, "column": 31 }, "end": { - "line": 107, + "line": 79, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 2897, - "end": 2910, + "start": 2217, + "end": 2230, "loc": { "start": { - "line": 106, + "line": 78, "column": 6 }, "end": { - "line": 106, + "line": 78, "column": 19 } }, @@ -3981,15 +3421,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2897, - "end": 2903, + "start": 2217, + "end": 2223, "loc": { "start": { - "line": 106, + "line": 78, "column": 6 }, "end": { - "line": 106, + "line": 78, "column": 12 }, "identifierName": "plugin" @@ -3998,15 +3438,15 @@ }, "value": { "type": "Identifier", - "start": 2905, - "end": 2910, + "start": 2225, + "end": 2230, "loc": { "start": { - "line": 106, + "line": 78, "column": 14 }, "end": { - "line": 106, + "line": 78, "column": 19 }, "identifierName": "Inert" @@ -4024,15 +3464,15 @@ { "type": "CommentLine", "value": " Serve Docs with OpenAPI and Swagger UI", - "start": 2754, - "end": 2795, + "start": 2074, + "end": 2115, "loc": { "start": { - "line": 103, + "line": 75, "column": 4 }, "end": { - "line": 103, + "line": 75, "column": 45 } } @@ -4040,15 +3480,15 @@ { "type": "CommentLine", "value": " visit at http://localhost:3333/docs/swagger/index.html", - "start": 2800, - "end": 2857, + "start": 2120, + "end": 2177, "loc": { "start": { - "line": 104, + "line": 76, "column": 4 }, "end": { - "line": 104, + "line": 76, "column": 61 } } @@ -4058,15 +3498,15 @@ { "type": "CommentLine", "value": " Create `logs` directory (so we only see errors and console logs in process out)", - "start": 2924, - "end": 3006, + "start": 2244, + "end": 2326, "loc": { "start": { - "line": 109, + "line": 81, "column": 4 }, "end": { - "line": 109, + "line": 81, "column": 86 } } @@ -4075,29 +3515,29 @@ }, { "type": "IfStatement", - "start": 3011, - "end": 3084, + "start": 2331, + "end": 2404, "loc": { "start": { - "line": 110, + "line": 82, "column": 4 }, "end": { - "line": 112, + "line": 84, "column": 5 } }, "test": { "type": "UnaryExpression", - "start": 3015, - "end": 3042, + "start": 2335, + "end": 2362, "loc": { "start": { - "line": 110, + "line": 82, "column": 8 }, "end": { - "line": 110, + "line": 82, "column": 35 } }, @@ -4105,43 +3545,43 @@ "prefix": true, "argument": { "type": "CallExpression", - "start": 3016, - "end": 3042, + "start": 2336, + "end": 2362, "loc": { "start": { - "line": 110, + "line": 82, "column": 9 }, "end": { - "line": 110, + "line": 82, "column": 35 } }, "callee": { "type": "MemberExpression", - "start": 3016, - "end": 3029, + "start": 2336, + "end": 2349, "loc": { "start": { - "line": 110, + "line": 82, "column": 9 }, "end": { - "line": 110, + "line": 82, "column": 22 } }, "object": { "type": "Identifier", - "start": 3016, - "end": 3018, + "start": 2336, + "end": 2338, "loc": { "start": { - "line": 110, + "line": 82, "column": 9 }, "end": { - "line": 110, + "line": 82, "column": 11 }, "identifierName": "fs" @@ -4151,15 +3591,15 @@ }, "property": { "type": "Identifier", - "start": 3019, - "end": 3029, + "start": 2339, + "end": 2349, "loc": { "start": { - "line": 110, + "line": 82, "column": 12 }, "end": { - "line": 110, + "line": 82, "column": 22 }, "identifierName": "existsSync" @@ -4172,44 +3612,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 3030, - "end": 3041, + "start": 2350, + "end": 2361, "loc": { "start": { - "line": 110, + "line": 82, "column": 23 }, "end": { - "line": 110, + "line": 82, "column": 34 } }, "object": { "type": "ThisExpression", - "start": 3030, - "end": 3034, + "start": 2350, + "end": 2354, "loc": { "start": { - "line": 110, + "line": 82, "column": 23 }, "end": { - "line": 110, + "line": 82, "column": 27 } } }, "property": { "type": "Identifier", - "start": 3035, - "end": 3041, + "start": 2355, + "end": 2361, "loc": { "start": { - "line": 110, + "line": 82, "column": 28 }, "end": { - "line": 110, + "line": 82, "column": 34 }, "identifierName": "logDir" @@ -4228,72 +3668,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 3044, - "end": 3084, + "start": 2364, + "end": 2404, "loc": { "start": { - "line": 110, + "line": 82, "column": 37 }, "end": { - "line": 112, + "line": 84, "column": 5 } }, "body": [ { "type": "ExpressionStatement", - "start": 3052, - "end": 3078, + "start": 2372, + "end": 2398, "loc": { "start": { - "line": 111, + "line": 83, "column": 6 }, "end": { - "line": 111, + "line": 83, "column": 32 } }, "expression": { "type": "CallExpression", - "start": 3052, - "end": 3077, + "start": 2372, + "end": 2397, "loc": { "start": { - "line": 111, + "line": 83, "column": 6 }, "end": { - "line": 111, + "line": 83, "column": 31 } }, "callee": { "type": "MemberExpression", - "start": 3052, - "end": 3064, + "start": 2372, + "end": 2384, "loc": { "start": { - "line": 111, + "line": 83, "column": 6 }, "end": { - "line": 111, + "line": 83, "column": 18 } }, "object": { "type": "Identifier", - "start": 3052, - "end": 3054, + "start": 2372, + "end": 2374, "loc": { "start": { - "line": 111, + "line": 83, "column": 6 }, "end": { - "line": 111, + "line": 83, "column": 8 }, "identifierName": "fs" @@ -4302,15 +3742,15 @@ }, "property": { "type": "Identifier", - "start": 3055, - "end": 3064, + "start": 2375, + "end": 2384, "loc": { "start": { - "line": 111, + "line": 83, "column": 9 }, "end": { - "line": 111, + "line": 83, "column": 18 }, "identifierName": "mkdirSync" @@ -4322,44 +3762,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 3065, - "end": 3076, + "start": 2385, + "end": 2396, "loc": { "start": { - "line": 111, + "line": 83, "column": 19 }, "end": { - "line": 111, + "line": 83, "column": 30 } }, "object": { "type": "ThisExpression", - "start": 3065, - "end": 3069, + "start": 2385, + "end": 2389, "loc": { "start": { - "line": 111, + "line": 83, "column": 19 }, "end": { - "line": 111, + "line": 83, "column": 23 } } }, "property": { "type": "Identifier", - "start": 3070, - "end": 3076, + "start": 2390, + "end": 2396, "loc": { "start": { - "line": 111, + "line": 83, "column": 24 }, "end": { - "line": 111, + "line": 83, "column": 30 }, "identifierName": "logDir" @@ -4379,15 +3819,15 @@ { "type": "CommentLine", "value": " Create `logs` directory (so we only see errors and console logs in process out)", - "start": 2924, - "end": 3006, + "start": 2244, + "end": 2326, "loc": { "start": { - "line": 109, + "line": 81, "column": 4 }, "end": { - "line": 109, + "line": 81, "column": 86 } } @@ -4396,100 +3836,100 @@ }, { "type": "ExpressionStatement", - "start": 3090, - "end": 3434, + "start": 2410, + "end": 2754, "loc": { "start": { - "line": 114, + "line": 86, "column": 4 }, "end": { - "line": 122, + "line": 94, "column": 7 } }, "expression": { "type": "AwaitExpression", - "start": 3090, - "end": 3433, + "start": 2410, + "end": 2753, "loc": { "start": { - "line": 114, + "line": 86, "column": 4 }, "end": { - "line": 122, + "line": 94, "column": 6 } }, "argument": { "type": "CallExpression", - "start": 3096, - "end": 3433, + "start": 2416, + "end": 2753, "loc": { "start": { - "line": 114, + "line": 86, "column": 10 }, "end": { - "line": 122, + "line": 94, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 3096, - "end": 3116, + "start": 2416, + "end": 2436, "loc": { "start": { - "line": 114, + "line": 86, "column": 10 }, "end": { - "line": 114, + "line": 86, "column": 30 } }, "object": { "type": "MemberExpression", - "start": 3096, - "end": 3107, + "start": 2416, + "end": 2427, "loc": { "start": { - "line": 114, + "line": 86, "column": 10 }, "end": { - "line": 114, + "line": 86, "column": 21 } }, "object": { "type": "ThisExpression", - "start": 3096, - "end": 3100, + "start": 2416, + "end": 2420, "loc": { "start": { - "line": 114, + "line": 86, "column": 10 }, "end": { - "line": 114, + "line": 86, "column": 14 } } }, "property": { "type": "Identifier", - "start": 3101, - "end": 3107, + "start": 2421, + "end": 2427, "loc": { "start": { - "line": 114, + "line": 86, "column": 15 }, "end": { - "line": 114, + "line": 86, "column": 21 }, "identifierName": "server" @@ -4500,15 +3940,15 @@ }, "property": { "type": "Identifier", - "start": 3108, - "end": 3116, + "start": 2428, + "end": 2436, "loc": { "start": { - "line": 114, + "line": 86, "column": 22 }, "end": { - "line": 114, + "line": 86, "column": 30 }, "identifierName": "register" @@ -4520,30 +3960,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 3117, - "end": 3432, + "start": 2437, + "end": 2752, "loc": { "start": { - "line": 114, + "line": 86, "column": 31 }, "end": { - "line": 122, + "line": 94, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 3125, - "end": 3137, + "start": 2445, + "end": 2457, "loc": { "start": { - "line": 115, + "line": 87, "column": 6 }, "end": { - "line": 115, + "line": 87, "column": 18 } }, @@ -4552,15 +3992,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3125, - "end": 3131, + "start": 2445, + "end": 2451, "loc": { "start": { - "line": 115, + "line": 87, "column": 6 }, "end": { - "line": 115, + "line": 87, "column": 12 }, "identifierName": "plugin" @@ -4569,15 +4009,15 @@ }, "value": { "type": "Identifier", - "start": 3133, - "end": 3137, + "start": 2453, + "end": 2457, "loc": { "start": { - "line": 115, + "line": 87, "column": 14 }, "end": { - "line": 115, + "line": 87, "column": 18 }, "identifierName": "Pino" @@ -4587,15 +4027,15 @@ }, { "type": "ObjectProperty", - "start": 3145, - "end": 3426, + "start": 2465, + "end": 2746, "loc": { "start": { - "line": 116, + "line": 88, "column": 6 }, "end": { - "line": 121, + "line": 93, "column": 7 } }, @@ -4604,15 +4044,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3145, - "end": 3152, + "start": 2465, + "end": 2472, "loc": { "start": { - "line": 116, + "line": 88, "column": 6 }, "end": { - "line": 116, + "line": 88, "column": 13 }, "identifierName": "options" @@ -4621,30 +4061,30 @@ }, "value": { "type": "ObjectExpression", - "start": 3154, - "end": 3426, + "start": 2474, + "end": 2746, "loc": { "start": { - "line": 116, + "line": 88, "column": 15 }, "end": { - "line": 121, + "line": 93, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 3164, - "end": 3182, + "start": 2484, + "end": 2502, "loc": { "start": { - "line": 117, + "line": 89, "column": 8 }, "end": { - "line": 117, + "line": 89, "column": 26 } }, @@ -4653,15 +4093,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3164, - "end": 3175, + "start": 2484, + "end": 2495, "loc": { "start": { - "line": 117, + "line": 89, "column": 8 }, "end": { - "line": 117, + "line": 89, "column": 19 }, "identifierName": "prettyPrint" @@ -4670,15 +4110,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 3177, - "end": 3182, + "start": 2497, + "end": 2502, "loc": { "start": { - "line": 117, + "line": 89, "column": 21 }, "end": { - "line": 117, + "line": 89, "column": 26 } }, @@ -4687,15 +4127,15 @@ }, { "type": "ObjectProperty", - "start": 3192, - "end": 3245, + "start": 2512, + "end": 2565, "loc": { "start": { - "line": 118, + "line": 90, "column": 8 }, "end": { - "line": 118, + "line": 90, "column": 61 } }, @@ -4704,15 +4144,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3192, - "end": 3201, + "start": 2512, + "end": 2521, "loc": { "start": { - "line": 118, + "line": 90, "column": 8 }, "end": { - "line": 118, + "line": 90, "column": 17 }, "identifierName": "logEvents" @@ -4721,30 +4161,30 @@ }, "value": { "type": "ArrayExpression", - "start": 3203, - "end": 3245, + "start": 2523, + "end": 2565, "loc": { "start": { - "line": 118, + "line": 90, "column": 19 }, "end": { - "line": 118, + "line": 90, "column": 61 } }, "elements": [ { "type": "StringLiteral", - "start": 3204, - "end": 3215, + "start": 2524, + "end": 2535, "loc": { "start": { - "line": 118, + "line": 90, "column": 20 }, "end": { - "line": 118, + "line": 90, "column": 31 } }, @@ -4756,15 +4196,15 @@ }, { "type": "StringLiteral", - "start": 3217, - "end": 3227, + "start": 2537, + "end": 2547, "loc": { "start": { - "line": 118, + "line": 90, "column": 33 }, "end": { - "line": 118, + "line": 90, "column": 43 } }, @@ -4776,15 +4216,15 @@ }, { "type": "StringLiteral", - "start": 3229, - "end": 3244, + "start": 2549, + "end": 2564, "loc": { "start": { - "line": 118, + "line": 90, "column": 45 }, "end": { - "line": 118, + "line": 90, "column": 60 } }, @@ -4799,15 +4239,15 @@ }, { "type": "ObjectProperty", - "start": 3355, - "end": 3418, + "start": 2675, + "end": 2738, "loc": { "start": { - "line": 120, + "line": 92, "column": 8 }, "end": { - "line": 120, + "line": 92, "column": 71 } }, @@ -4816,15 +4256,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3355, - "end": 3361, + "start": 2675, + "end": 2681, "loc": { "start": { - "line": 120, + "line": 92, "column": 8 }, "end": { - "line": 120, + "line": 92, "column": 14 }, "identifierName": "stream" @@ -4834,43 +4274,43 @@ }, "value": { "type": "CallExpression", - "start": 3363, - "end": 3418, + "start": 2683, + "end": 2738, "loc": { "start": { - "line": 120, + "line": 92, "column": 16 }, "end": { - "line": 120, + "line": 92, "column": 71 } }, "callee": { "type": "MemberExpression", - "start": 3363, - "end": 3379, + "start": 2683, + "end": 2699, "loc": { "start": { - "line": 120, + "line": 92, "column": 16 }, "end": { - "line": 120, + "line": 92, "column": 32 } }, "object": { "type": "Identifier", - "start": 3363, - "end": 3367, + "start": 2683, + "end": 2687, "loc": { "start": { - "line": 120, + "line": 92, "column": 16 }, "end": { - "line": 120, + "line": 92, "column": 20 }, "identifierName": "pino" @@ -4879,15 +4319,15 @@ }, "property": { "type": "Identifier", - "start": 3368, - "end": 3379, + "start": 2688, + "end": 2699, "loc": { "start": { - "line": 120, + "line": 92, "column": 21 }, "end": { - "line": 120, + "line": 92, "column": 32 }, "identifierName": "destination" @@ -4899,60 +4339,60 @@ "arguments": [ { "type": "CallExpression", - "start": 3380, - "end": 3417, + "start": 2700, + "end": 2737, "loc": { "start": { - "line": 120, + "line": 92, "column": 33 }, "end": { - "line": 120, + "line": 92, "column": 70 } }, "callee": { "type": "MemberExpression", - "start": 3380, - "end": 3392, + "start": 2700, + "end": 2712, "loc": { "start": { - "line": 120, + "line": 92, "column": 33 }, "end": { - "line": 120, + "line": 92, "column": 45 } }, "object": { "type": "Identifier", - "start": 3380, - "end": 3384, + "start": 2700, + "end": 2704, "loc": { "start": { - "line": 120, + "line": 92, "column": 33 }, "end": { - "line": 120, + "line": 92, "column": 37 }, - "identifierName": "path" + "identifierName": "Path" }, - "name": "path" + "name": "Path" }, "property": { "type": "Identifier", - "start": 3385, - "end": 3392, + "start": 2705, + "end": 2712, "loc": { "start": { - "line": 120, + "line": 92, "column": 38 }, "end": { - "line": 120, + "line": 92, "column": 45 }, "identifierName": "resolve" @@ -4964,44 +4404,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 3393, - "end": 3404, + "start": 2713, + "end": 2724, "loc": { "start": { - "line": 120, + "line": 92, "column": 46 }, "end": { - "line": 120, + "line": 92, "column": 57 } }, "object": { "type": "ThisExpression", - "start": 3393, - "end": 3397, + "start": 2713, + "end": 2717, "loc": { "start": { - "line": 120, + "line": 92, "column": 46 }, "end": { - "line": 120, + "line": 92, "column": 50 } } }, "property": { "type": "Identifier", - "start": 3398, - "end": 3404, + "start": 2718, + "end": 2724, "loc": { "start": { - "line": 120, + "line": 92, "column": 51 }, "end": { - "line": 120, + "line": 92, "column": 57 }, "identifierName": "logDir" @@ -5012,15 +4452,15 @@ }, { "type": "StringLiteral", - "start": 3406, - "end": 3416, + "start": 2726, + "end": 2736, "loc": { "start": { - "line": 120, + "line": 92, "column": 59 }, "end": { - "line": 120, + "line": 92, "column": 69 } }, @@ -5038,15 +4478,15 @@ { "type": "CommentLine", "value": " Creates a log of all the requests made and info as well as response status error/success", - "start": 3255, - "end": 3346, + "start": 2575, + "end": 2666, "loc": { "start": { - "line": 119, + "line": 91, "column": 8 }, "end": { - "line": 119, + "line": 91, "column": 99 } } @@ -5065,15 +4505,15 @@ { "type": "CommentLine", "value": " TODO: Separate stream for errors?", - "start": 3440, - "end": 3476, + "start": 2760, + "end": 2796, "loc": { "start": { - "line": 124, + "line": 96, "column": 4 }, "end": { - "line": 124, + "line": 96, "column": 40 } } @@ -5088,15 +4528,15 @@ { "type": "CommentBlock", "value": "*\n * Starts the server and registers any plugins\n * @return {Promise} Resolves once server has started\n ", - "start": 2491, - "end": 2605, + "start": 1811, + "end": 1925, "loc": { "start": { - "line": 95, + "line": 67, "column": 2 }, "end": { - "line": 98, + "line": 70, "column": 5 } } @@ -5106,15 +4546,15 @@ { "type": "CommentBlock", "value": "*\n * Logs a message through hapi-pino\n * @param {string[]} tags for pino log record\n * @param {string} data for pino log record\n * @return {undefined}\n ", - "start": 3484, - "end": 3652, + "start": 2804, + "end": 2972, "loc": { "start": { - "line": 127, + "line": 99, "column": 2 }, "end": { - "line": 132, + "line": 104, "column": 5 } } @@ -5123,15 +4563,15 @@ }, { "type": "ClassMethod", - "start": 3655, - "end": 3713, + "start": 2975, + "end": 3033, "loc": { "start": { - "line": 133, + "line": 105, "column": 2 }, "end": { - "line": 135, + "line": 107, "column": 3 } }, @@ -5139,15 +4579,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3655, - "end": 3658, + "start": 2975, + "end": 2978, "loc": { "start": { - "line": 133, + "line": 105, "column": 2 }, "end": { - "line": 133, + "line": 105, "column": 5 }, "identifierName": "log" @@ -5163,30 +4603,30 @@ "params": [ { "type": "ObjectPattern", - "start": 3659, - "end": 3673, + "start": 2979, + "end": 2993, "loc": { "start": { - "line": 133, + "line": 105, "column": 6 }, "end": { - "line": 133, + "line": 105, "column": 20 } }, "properties": [ { "type": "ObjectProperty", - "start": 3661, - "end": 3665, + "start": 2981, + "end": 2985, "loc": { "start": { - "line": 133, + "line": 105, "column": 8 }, "end": { - "line": 133, + "line": 105, "column": 12 } }, @@ -5195,15 +4635,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3661, - "end": 3665, + "start": 2981, + "end": 2985, "loc": { "start": { - "line": 133, + "line": 105, "column": 8 }, "end": { - "line": 133, + "line": 105, "column": 12 }, "identifierName": "tags" @@ -5212,15 +4652,15 @@ }, "value": { "type": "Identifier", - "start": 3661, - "end": 3665, + "start": 2981, + "end": 2985, "loc": { "start": { - "line": 133, + "line": 105, "column": 8 }, "end": { - "line": 133, + "line": 105, "column": 12 }, "identifierName": "tags" @@ -5233,15 +4673,15 @@ }, { "type": "ObjectProperty", - "start": 3667, - "end": 3671, + "start": 2987, + "end": 2991, "loc": { "start": { - "line": 133, + "line": 105, "column": 14 }, "end": { - "line": 133, + "line": 105, "column": 18 } }, @@ -5250,15 +4690,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3667, - "end": 3671, + "start": 2987, + "end": 2991, "loc": { "start": { - "line": 133, + "line": 105, "column": 14 }, "end": { - "line": 133, + "line": 105, "column": 18 }, "identifierName": "data" @@ -5267,15 +4707,15 @@ }, "value": { "type": "Identifier", - "start": 3667, - "end": 3671, + "start": 2987, + "end": 2991, "loc": { "start": { - "line": 133, + "line": 105, "column": 14 }, "end": { - "line": 133, + "line": 105, "column": 18 }, "identifierName": "data" @@ -5291,101 +4731,101 @@ ], "body": { "type": "BlockStatement", - "start": 3675, - "end": 3713, + "start": 2995, + "end": 3033, "loc": { "start": { - "line": 133, + "line": 105, "column": 22 }, "end": { - "line": 135, + "line": 107, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 3681, - "end": 3709, + "start": 3001, + "end": 3029, "loc": { "start": { - "line": 134, + "line": 106, "column": 4 }, "end": { - "line": 134, + "line": 106, "column": 32 } }, "expression": { "type": "CallExpression", - "start": 3681, - "end": 3708, + "start": 3001, + "end": 3028, "loc": { "start": { - "line": 134, + "line": 106, "column": 4 }, "end": { - "line": 134, + "line": 106, "column": 31 } }, "callee": { "type": "MemberExpression", - "start": 3681, - "end": 3696, + "start": 3001, + "end": 3016, "loc": { "start": { - "line": 134, + "line": 106, "column": 4 }, "end": { - "line": 134, + "line": 106, "column": 19 } }, "object": { "type": "MemberExpression", - "start": 3681, - "end": 3692, + "start": 3001, + "end": 3012, "loc": { "start": { - "line": 134, + "line": 106, "column": 4 }, "end": { - "line": 134, + "line": 106, "column": 15 } }, "object": { "type": "ThisExpression", - "start": 3681, - "end": 3685, + "start": 3001, + "end": 3005, "loc": { "start": { - "line": 134, + "line": 106, "column": 4 }, "end": { - "line": 134, + "line": 106, "column": 8 } } }, "property": { "type": "Identifier", - "start": 3686, - "end": 3692, + "start": 3006, + "end": 3012, "loc": { "start": { - "line": 134, + "line": 106, "column": 9 }, "end": { - "line": 134, + "line": 106, "column": 15 }, "identifierName": "server" @@ -5396,15 +4836,15 @@ }, "property": { "type": "Identifier", - "start": 3693, - "end": 3696, + "start": 3013, + "end": 3016, "loc": { "start": { - "line": 134, + "line": 106, "column": 16 }, "end": { - "line": 134, + "line": 106, "column": 19 }, "identifierName": "log" @@ -5416,15 +4856,15 @@ "arguments": [ { "type": "Identifier", - "start": 3697, - "end": 3701, + "start": 3017, + "end": 3021, "loc": { "start": { - "line": 134, + "line": 106, "column": 20 }, "end": { - "line": 134, + "line": 106, "column": 24 }, "identifierName": "tags" @@ -5433,15 +4873,15 @@ }, { "type": "Identifier", - "start": 3703, - "end": 3707, + "start": 3023, + "end": 3027, "loc": { "start": { - "line": 134, + "line": 106, "column": 26 }, "end": { - "line": 134, + "line": 106, "column": 30 }, "identifierName": "data" @@ -5459,15 +4899,15 @@ { "type": "CommentBlock", "value": "*\n * Logs a message through hapi-pino\n * @param {string[]} tags for pino log record\n * @param {string} data for pino log record\n * @return {undefined}\n ", - "start": 3484, - "end": 3652, + "start": 2804, + "end": 2972, "loc": { "start": { - "line": 127, + "line": 99, "column": 2 }, "end": { - "line": 132, + "line": 104, "column": 5 } } @@ -5477,15 +4917,15 @@ { "type": "CommentBlock", "value": "*\n * Adds an endpoint at the path given handled by the controller\n * @param {EndpointConfig} endpoint configuration\n * @return {undefined}\n ", - "start": 3717, - "end": 3869, + "start": 3037, + "end": 3189, "loc": { "start": { - "line": 137, + "line": 109, "column": 2 }, "end": { - "line": 141, + "line": 113, "column": 5 } } @@ -5494,15 +4934,15 @@ }, { "type": "ClassMethod", - "start": 3872, - "end": 4085, + "start": 3192, + "end": 3368, "loc": { "start": { - "line": 142, + "line": 114, "column": 2 }, "end": { - "line": 152, + "line": 123, "column": 3 } }, @@ -5510,15 +4950,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3872, - "end": 3883, + "start": 3192, + "end": 3203, "loc": { "start": { - "line": 142, + "line": 114, "column": 2 }, "end": { - "line": 142, + "line": 114, "column": 13 }, "identifierName": "addEndpoint" @@ -5534,30 +4974,30 @@ "params": [ { "type": "ObjectPattern", - "start": 3884, - "end": 3912, + "start": 3204, + "end": 3232, "loc": { "start": { - "line": 142, + "line": 114, "column": 14 }, "end": { - "line": 142, + "line": 114, "column": 42 } }, "properties": [ { "type": "ObjectProperty", - "start": 3886, - "end": 3892, + "start": 3206, + "end": 3212, "loc": { "start": { - "line": 142, + "line": 114, "column": 16 }, "end": { - "line": 142, + "line": 114, "column": 22 } }, @@ -5566,15 +5006,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3886, - "end": 3892, + "start": 3206, + "end": 3212, "loc": { "start": { - "line": 142, + "line": 114, "column": 16 }, "end": { - "line": 142, + "line": 114, "column": 22 }, "identifierName": "method" @@ -5583,15 +5023,15 @@ }, "value": { "type": "Identifier", - "start": 3886, - "end": 3892, + "start": 3206, + "end": 3212, "loc": { "start": { - "line": 142, + "line": 114, "column": 16 }, "end": { - "line": 142, + "line": 114, "column": 22 }, "identifierName": "method" @@ -5604,15 +5044,15 @@ }, { "type": "ObjectProperty", - "start": 3894, - "end": 3898, + "start": 3214, + "end": 3218, "loc": { "start": { - "line": 142, + "line": 114, "column": 24 }, "end": { - "line": 142, + "line": 114, "column": 28 } }, @@ -5621,15 +5061,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3894, - "end": 3898, + "start": 3214, + "end": 3218, "loc": { "start": { - "line": 142, + "line": 114, "column": 24 }, "end": { - "line": 142, + "line": 114, "column": 28 }, "identifierName": "path" @@ -5638,15 +5078,15 @@ }, "value": { "type": "Identifier", - "start": 3894, - "end": 3898, + "start": 3214, + "end": 3218, "loc": { "start": { - "line": 142, + "line": 114, "column": 24 }, "end": { - "line": 142, + "line": 114, "column": 28 }, "identifierName": "path" @@ -5659,15 +5099,15 @@ }, { "type": "ObjectProperty", - "start": 3900, - "end": 3910, + "start": 3220, + "end": 3230, "loc": { "start": { - "line": 142, + "line": 114, "column": 30 }, "end": { - "line": 142, + "line": 114, "column": 40 } }, @@ -5676,15 +5116,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3900, - "end": 3910, + "start": 3220, + "end": 3230, "loc": { "start": { - "line": 142, + "line": 114, "column": 30 }, "end": { - "line": 142, + "line": 114, "column": 40 }, "identifierName": "controller" @@ -5693,15 +5133,15 @@ }, "value": { "type": "Identifier", - "start": 3900, - "end": 3910, + "start": 3220, + "end": 3230, "loc": { "start": { - "line": 142, + "line": 114, "column": 30 }, "end": { - "line": 142, + "line": 114, "column": 40 }, "identifierName": "controller" @@ -5717,158 +5157,155 @@ ], "body": { "type": "BlockStatement", - "start": 3914, - "end": 4085, + "start": 3234, + "end": 3368, "loc": { "start": { - "line": 142, + "line": 114, "column": 44 }, "end": { - "line": 152, + "line": 123, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 3957, - "end": 4081, + "start": 3240, + "end": 3364, "loc": { "start": { - "line": 144, + "line": 115, "column": 4 }, "end": { - "line": 151, + "line": 122, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 3957, - "end": 4080, + "start": 3240, + "end": 3363, "loc": { "start": { - "line": 144, + "line": 115, "column": 4 }, "end": { - "line": 151, + "line": 122, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 3957, - "end": 3974, + "start": 3240, + "end": 3257, "loc": { "start": { - "line": 144, + "line": 115, "column": 4 }, "end": { - "line": 144, + "line": 115, "column": 21 } }, "object": { "type": "MemberExpression", - "start": 3957, - "end": 3968, + "start": 3240, + "end": 3251, "loc": { "start": { - "line": 144, + "line": 115, "column": 4 }, "end": { - "line": 144, + "line": 115, "column": 15 } }, "object": { "type": "ThisExpression", - "start": 3957, - "end": 3961, + "start": 3240, + "end": 3244, "loc": { "start": { - "line": 144, + "line": 115, "column": 4 }, "end": { - "line": 144, + "line": 115, "column": 8 } - }, - "leadingComments": null + } }, "property": { "type": "Identifier", - "start": 3962, - "end": 3968, + "start": 3245, + "end": 3251, "loc": { "start": { - "line": 144, + "line": 115, "column": 9 }, "end": { - "line": 144, + "line": 115, "column": 15 }, "identifierName": "server" }, "name": "server" }, - "computed": false, - "leadingComments": null + "computed": false }, "property": { "type": "Identifier", - "start": 3969, - "end": 3974, + "start": 3252, + "end": 3257, "loc": { "start": { - "line": 144, + "line": 115, "column": 16 }, "end": { - "line": 144, + "line": 115, "column": 21 }, "identifierName": "route" }, "name": "route" }, - "computed": false, - "leadingComments": null + "computed": false }, "arguments": [ { "type": "ObjectExpression", - "start": 3975, - "end": 4079, + "start": 3258, + "end": 3362, "loc": { "start": { - "line": 144, + "line": 115, "column": 22 }, "end": { - "line": 151, + "line": 122, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 3983, - "end": 3989, + "start": 3266, + "end": 3272, "loc": { "start": { - "line": 145, + "line": 116, "column": 6 }, "end": { - "line": 145, + "line": 116, "column": 12 } }, @@ -5877,15 +5314,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3983, - "end": 3989, + "start": 3266, + "end": 3272, "loc": { "start": { - "line": 145, + "line": 116, "column": 6 }, "end": { - "line": 145, + "line": 116, "column": 12 }, "identifierName": "method" @@ -5894,15 +5331,15 @@ }, "value": { "type": "Identifier", - "start": 3983, - "end": 3989, + "start": 3266, + "end": 3272, "loc": { "start": { - "line": 145, + "line": 116, "column": 6 }, "end": { - "line": 145, + "line": 116, "column": 12 }, "identifierName": "method" @@ -5915,15 +5352,15 @@ }, { "type": "ObjectProperty", - "start": 3997, - "end": 4001, + "start": 3280, + "end": 3284, "loc": { "start": { - "line": 146, + "line": 117, "column": 6 }, "end": { - "line": 146, + "line": 117, "column": 10 } }, @@ -5932,15 +5369,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3997, - "end": 4001, + "start": 3280, + "end": 3284, "loc": { "start": { - "line": 146, + "line": 117, "column": 6 }, "end": { - "line": 146, + "line": 117, "column": 10 }, "identifierName": "path" @@ -5949,15 +5386,15 @@ }, "value": { "type": "Identifier", - "start": 3997, - "end": 4001, + "start": 3280, + "end": 3284, "loc": { "start": { - "line": 146, + "line": 117, "column": 6 }, "end": { - "line": 146, + "line": 117, "column": 10 }, "identifierName": "path" @@ -5970,15 +5407,15 @@ }, { "type": "ObjectProperty", - "start": 4009, - "end": 4028, + "start": 3292, + "end": 3311, "loc": { "start": { - "line": 147, + "line": 118, "column": 6 }, "end": { - "line": 147, + "line": 118, "column": 25 } }, @@ -5987,15 +5424,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4009, - "end": 4016, + "start": 3292, + "end": 3299, "loc": { "start": { - "line": 147, + "line": 118, "column": 6 }, "end": { - "line": 147, + "line": 118, "column": 13 }, "identifierName": "handler" @@ -6004,15 +5441,15 @@ }, "value": { "type": "Identifier", - "start": 4018, - "end": 4028, + "start": 3301, + "end": 3311, "loc": { "start": { - "line": 147, + "line": 118, "column": 15 }, "end": { - "line": 147, + "line": 118, "column": 25 }, "identifierName": "controller" @@ -6022,15 +5459,15 @@ }, { "type": "ObjectProperty", - "start": 4036, - "end": 4073, + "start": 3319, + "end": 3356, "loc": { "start": { - "line": 148, + "line": 119, "column": 6 }, "end": { - "line": 150, + "line": 121, "column": 7 } }, @@ -6039,15 +5476,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4036, - "end": 4043, + "start": 3319, + "end": 3326, "loc": { "start": { - "line": 148, + "line": 119, "column": 6 }, "end": { - "line": 148, + "line": 119, "column": 13 }, "identifierName": "options" @@ -6056,30 +5493,30 @@ }, "value": { "type": "ObjectExpression", - "start": 4045, - "end": 4073, + "start": 3328, + "end": 3356, "loc": { "start": { - "line": 148, + "line": 119, "column": 15 }, "end": { - "line": 150, + "line": 121, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 4055, - "end": 4065, + "start": 3338, + "end": 3348, "loc": { "start": { - "line": 149, + "line": 120, "column": 8 }, "end": { - "line": 149, + "line": 120, "column": 18 } }, @@ -6088,15 +5525,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4055, - "end": 4059, + "start": 3338, + "end": 3342, "loc": { "start": { - "line": 149, + "line": 120, "column": 8 }, "end": { - "line": 149, + "line": 120, "column": 12 }, "identifierName": "cors" @@ -6105,15 +5542,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 4061, - "end": 4065, + "start": 3344, + "end": 3348, "loc": { "start": { - "line": 149, + "line": 120, "column": 14 }, "end": { - "line": 149, + "line": 120, "column": 18 } }, @@ -6125,27 +5562,8 @@ } ] } - ], - "leadingComments": null - }, - "leadingComments": [ - { - "type": "CommentLine", - "value": " eslint-disable-line no-shadow", - "start": 3920, - "end": 3952, - "loc": { - "start": { - "line": 143, - "column": 4 - }, - "end": { - "line": 143, - "column": 36 - } - } - } - ] + ] + } } ], "directives": [], @@ -6155,15 +5573,15 @@ { "type": "CommentBlock", "value": "*\n * Adds an endpoint at the path given handled by the controller\n * @param {EndpointConfig} endpoint configuration\n * @return {undefined}\n ", - "start": 3717, - "end": 3869, + "start": 3037, + "end": 3189, "loc": { "start": { - "line": 137, + "line": 109, "column": 2 }, "end": { - "line": 141, + "line": 113, "column": 5 } } @@ -6173,15 +5591,15 @@ { "type": "CommentBlock", "value": "*\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n ", - "start": 4089, - "end": 4239, + "start": 3372, + "end": 3522, "loc": { "start": { - "line": 154, + "line": 125, "column": 2 }, "end": { - "line": 158, + "line": 129, "column": 5 } } @@ -6190,15 +5608,15 @@ }, { "type": "ClassMethod", - "start": 4242, - "end": 4355, + "start": 3525, + "end": 3638, "loc": { "start": { - "line": 159, + "line": 130, "column": 2 }, "end": { - "line": 163, + "line": 134, "column": 3 } }, @@ -6206,15 +5624,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4242, - "end": 4254, + "start": 3525, + "end": 3537, "loc": { "start": { - "line": 159, + "line": 130, "column": 2 }, "end": { - "line": 159, + "line": 130, "column": 14 }, "identifierName": "addEndpoints" @@ -6230,15 +5648,15 @@ "params": [ { "type": "Identifier", - "start": 4255, - "end": 4261, + "start": 3538, + "end": 3544, "loc": { "start": { - "line": 159, + "line": 130, "column": 15 }, "end": { - "line": 159, + "line": 130, "column": 21 }, "identifierName": "routes" @@ -6248,73 +5666,73 @@ ], "body": { "type": "BlockStatement", - "start": 4263, - "end": 4355, + "start": 3546, + "end": 3638, "loc": { "start": { - "line": 159, + "line": 130, "column": 23 }, "end": { - "line": 163, + "line": 134, "column": 3 } }, "body": [ { "type": "ForStatement", - "start": 4269, - "end": 4351, + "start": 3552, + "end": 3634, "loc": { "start": { - "line": 160, + "line": 131, "column": 4 }, "end": { - "line": 162, + "line": 133, "column": 5 } }, "init": { "type": "VariableDeclaration", - "start": 4274, - "end": 4283, + "start": 3557, + "end": 3566, "loc": { "start": { - "line": 160, + "line": 131, "column": 9 }, "end": { - "line": 160, + "line": 131, "column": 18 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 4278, - "end": 4283, + "start": 3561, + "end": 3566, "loc": { "start": { - "line": 160, + "line": 131, "column": 13 }, "end": { - "line": 160, + "line": 131, "column": 18 } }, "id": { "type": "Identifier", - "start": 4278, - "end": 4279, + "start": 3561, + "end": 3562, "loc": { "start": { - "line": 160, + "line": 131, "column": 13 }, "end": { - "line": 160, + "line": 131, "column": 14 }, "identifierName": "i" @@ -6323,15 +5741,15 @@ }, "init": { "type": "NumericLiteral", - "start": 4282, - "end": 4283, + "start": 3565, + "end": 3566, "loc": { "start": { - "line": 160, + "line": 131, "column": 17 }, "end": { - "line": 160, + "line": 131, "column": 18 } }, @@ -6347,29 +5765,29 @@ }, "test": { "type": "BinaryExpression", - "start": 4285, - "end": 4302, + "start": 3568, + "end": 3585, "loc": { "start": { - "line": 160, + "line": 131, "column": 20 }, "end": { - "line": 160, + "line": 131, "column": 37 } }, "left": { "type": "Identifier", - "start": 4285, - "end": 4286, + "start": 3568, + "end": 3569, "loc": { "start": { - "line": 160, + "line": 131, "column": 20 }, "end": { - "line": 160, + "line": 131, "column": 21 }, "identifierName": "i" @@ -6379,29 +5797,29 @@ "operator": "<", "right": { "type": "MemberExpression", - "start": 4289, - "end": 4302, + "start": 3572, + "end": 3585, "loc": { "start": { - "line": 160, + "line": 131, "column": 24 }, "end": { - "line": 160, + "line": 131, "column": 37 } }, "object": { "type": "Identifier", - "start": 4289, - "end": 4295, + "start": 3572, + "end": 3578, "loc": { "start": { - "line": 160, + "line": 131, "column": 24 }, "end": { - "line": 160, + "line": 131, "column": 30 }, "identifierName": "routes" @@ -6410,15 +5828,15 @@ }, "property": { "type": "Identifier", - "start": 4296, - "end": 4302, + "start": 3579, + "end": 3585, "loc": { "start": { - "line": 160, + "line": 131, "column": 31 }, "end": { - "line": 160, + "line": 131, "column": 37 }, "identifierName": "length" @@ -6430,15 +5848,15 @@ }, "update": { "type": "UpdateExpression", - "start": 4304, - "end": 4307, + "start": 3587, + "end": 3590, "loc": { "start": { - "line": 160, + "line": 131, "column": 39 }, "end": { - "line": 160, + "line": 131, "column": 42 } }, @@ -6446,15 +5864,15 @@ "prefix": false, "argument": { "type": "Identifier", - "start": 4304, - "end": 4305, + "start": 3587, + "end": 3588, "loc": { "start": { - "line": 160, + "line": 131, "column": 39 }, "end": { - "line": 160, + "line": 131, "column": 40 }, "identifierName": "i" @@ -6464,87 +5882,87 @@ }, "body": { "type": "BlockStatement", - "start": 4309, - "end": 4351, + "start": 3592, + "end": 3634, "loc": { "start": { - "line": 160, + "line": 131, "column": 44 }, "end": { - "line": 162, + "line": 133, "column": 5 } }, "body": [ { "type": "ExpressionStatement", - "start": 4317, - "end": 4345, + "start": 3600, + "end": 3628, "loc": { "start": { - "line": 161, + "line": 132, "column": 6 }, "end": { - "line": 161, + "line": 132, "column": 34 } }, "expression": { "type": "CallExpression", - "start": 4317, - "end": 4344, + "start": 3600, + "end": 3627, "loc": { "start": { - "line": 161, + "line": 132, "column": 6 }, "end": { - "line": 161, + "line": 132, "column": 33 } }, "callee": { "type": "MemberExpression", - "start": 4317, - "end": 4333, + "start": 3600, + "end": 3616, "loc": { "start": { - "line": 161, + "line": 132, "column": 6 }, "end": { - "line": 161, + "line": 132, "column": 22 } }, "object": { "type": "ThisExpression", - "start": 4317, - "end": 4321, + "start": 3600, + "end": 3604, "loc": { "start": { - "line": 161, + "line": 132, "column": 6 }, "end": { - "line": 161, + "line": 132, "column": 10 } } }, "property": { "type": "Identifier", - "start": 4322, - "end": 4333, + "start": 3605, + "end": 3616, "loc": { "start": { - "line": 161, + "line": 132, "column": 11 }, "end": { - "line": 161, + "line": 132, "column": 22 }, "identifierName": "addEndpoint" @@ -6556,29 +5974,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 4334, - "end": 4343, + "start": 3617, + "end": 3626, "loc": { "start": { - "line": 161, + "line": 132, "column": 23 }, "end": { - "line": 161, + "line": 132, "column": 32 } }, "object": { "type": "Identifier", - "start": 4334, - "end": 4340, + "start": 3617, + "end": 3623, "loc": { "start": { - "line": 161, + "line": 132, "column": 23 }, "end": { - "line": 161, + "line": 132, "column": 29 }, "identifierName": "routes" @@ -6587,15 +6005,15 @@ }, "property": { "type": "Identifier", - "start": 4341, - "end": 4342, + "start": 3624, + "end": 3625, "loc": { "start": { - "line": 161, + "line": 132, "column": 30 }, "end": { - "line": 161, + "line": 132, "column": 31 }, "identifierName": "i" @@ -6616,743 +6034,137 @@ }, "leadingComments": [ { - "type": "CommentBlock", - "value": "*\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n ", - "start": 4089, - "end": 4239, - "loc": { - "start": { - "line": 154, - "column": 2 - }, - "end": { - "line": 158, - "column": 5 - } - } - } - ] - } - ] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", - "start": 1443, - "end": 1626, - "loc": { - "start": { - "line": 56, - "column": 0 - }, - "end": { - "line": 61, - "column": 3 - } - } - } - ], - "trailingComments": [] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", - "start": 1443, - "end": 1626, - "loc": { - "start": { - "line": 56, - "column": 0 - }, - "end": { - "line": 61, - "column": 3 - } - } - } - ] - } - ], - "directives": [] - }, - "comments": [ - { - "type": "CommentBlock", - "value": " eslint-disable import/first ", - "start": 1, - "end": 34, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", - "start": 378, - "end": 739, - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", - "start": 742, - "end": 850, - "loc": { - "start": { - "line": 26, - "column": 0 - }, - "end": { - "line": 29, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", - "start": 853, - "end": 970, - "loc": { - "start": { - "line": 32, - "column": 0 - }, - "end": { - "line": 35, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n ", - "start": 1016, - "end": 1187, - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 42, - "column": 5 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Request Object that is passed to the controller function as the first parameter\n * from https://github.com/hapijs/hapi/blob/master/API.md#request\n * @type {HapiRequest}\n ", - "start": 1260, - "end": 1439, - "loc": { - "start": { - "line": 49, - "column": 0 - }, - "end": { - "line": 53, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", - "start": 1443, - "end": 1626, - "loc": { - "start": { - "line": 56, - "column": 0 - }, - "end": { - "line": 61, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Server Constructor\n ", - "start": 1652, - "end": 1685, - "loc": { - "start": { - "line": 64, - "column": 2 - }, - "end": { - "line": 66, - "column": 5 - } - } - }, - { - "type": "CommentLine", - "value": " eslint-disable-line", - "start": 1688, - "end": 1710, - "loc": { - "start": { - "line": 67, - "column": 2 - }, - "end": { - "line": 67, - "column": 24 - } - } - }, - { - "type": "CommentLine", - "value": " Sets errors to print to console while running", - "start": 1916, - "end": 1964, - "loc": { - "start": { - "line": 74, - "column": 6 - }, - "end": { - "line": 74, - "column": 54 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Shutdown the Hapi Server Properly\n * @param {Function} callback callback to run after server has shutdown\n * @return {undefined} no return\n ", - "start": 2045, - "end": 2214, - "loc": { - "start": { - "line": 79, - "column": 2 - }, - "end": { - "line": 83, - "column": 5 - } - } - }, - { - "type": "CommentLine", - "value": " eslint-disable-line flowtype/no-weak-types", - "start": 2242, - "end": 2287, - "loc": { - "start": { - "line": 85, - "column": 4 - }, - "end": { - "line": 85, - "column": 49 - } - } - }, - { - "type": "CommentLine", - "value": " TODO: Set Shutdown Timeout from config", - "start": 2292, - "end": 2333, - "loc": { - "start": { - "line": 86, - "column": 4 - }, - "end": { - "line": 86, - "column": 45 - } - } - }, - { - "type": "CommentLine", - "value": " TODO: Log Hapi Shutdown Error", - "start": 2414, - "end": 2446, - "loc": { - "start": { - "line": 89, - "column": 8 - }, - "end": { - "line": 89, - "column": 40 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Starts the server and registers any plugins\n * @return {Promise} Resolves once server has started\n ", - "start": 2491, - "end": 2605, - "loc": { - "start": { - "line": 95, - "column": 2 - }, - "end": { - "line": 98, - "column": 5 - } - } - }, - { - "type": "CommentLine", - "value": " Serve Docs with OpenAPI and Swagger UI", - "start": 2754, - "end": 2795, - "loc": { - "start": { - "line": 103, - "column": 4 - }, - "end": { - "line": 103, - "column": 45 - } - } - }, - { - "type": "CommentLine", - "value": " visit at http://localhost:3333/docs/swagger/index.html", - "start": 2800, - "end": 2857, - "loc": { - "start": { - "line": 104, - "column": 4 - }, - "end": { - "line": 104, - "column": 61 - } - } - }, - { - "type": "CommentLine", - "value": " Create `logs` directory (so we only see errors and console logs in process out)", - "start": 2924, - "end": 3006, - "loc": { - "start": { - "line": 109, - "column": 4 - }, - "end": { - "line": 109, - "column": 86 - } - } - }, - { - "type": "CommentLine", - "value": " Creates a log of all the requests made and info as well as response status error/success", - "start": 3255, - "end": 3346, - "loc": { - "start": { - "line": 119, - "column": 8 - }, - "end": { - "line": 119, - "column": 99 - } - } - }, - { - "type": "CommentLine", - "value": " TODO: Separate stream for errors?", - "start": 3440, - "end": 3476, - "loc": { - "start": { - "line": 124, - "column": 4 - }, - "end": { - "line": 124, - "column": 40 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Logs a message through hapi-pino\n * @param {string[]} tags for pino log record\n * @param {string} data for pino log record\n * @return {undefined}\n ", - "start": 3484, - "end": 3652, - "loc": { - "start": { - "line": 127, - "column": 2 - }, - "end": { - "line": 132, - "column": 5 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Adds an endpoint at the path given handled by the controller\n * @param {EndpointConfig} endpoint configuration\n * @return {undefined}\n ", - "start": 3717, - "end": 3869, - "loc": { - "start": { - "line": 137, - "column": 2 - }, - "end": { - "line": 141, - "column": 5 - } - } - }, - { - "type": "CommentLine", - "value": " eslint-disable-line no-shadow", - "start": 3920, - "end": 3952, - "loc": { - "start": { - "line": 143, - "column": 4 - }, - "end": { - "line": 143, - "column": 36 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n ", - "start": 4089, - "end": 4239, - "loc": { - "start": { - "line": 154, - "column": 2 - }, - "end": { - "line": 158, - "column": 5 - } - } - } - ], - "tokens": [ - { - "type": "CommentBlock", - "value": " eslint-disable import/first ", - "start": 1, - "end": 34, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "require", - "start": 35, - "end": 42, - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 42, - "end": 43, - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "source-map-support/register", - "start": 43, - "end": 72, - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 37 - } - } - }, - { - "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 72, - "end": 73, - "loc": { - "start": { - "line": 3, - "column": 37 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 73, - "end": 74, - "loc": { - "start": { - "line": 3, - "column": 38 - }, - "end": { - "line": 3, - "column": 39 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "require", - "start": 75, - "end": 82, - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 7 - } - } - }, - { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 82, - "end": 83, - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "@babel/register", - "start": 83, - "end": 100, - "loc": { - "start": { - "line": 4, - "column": 8 + "type": "CommentBlock", + "value": "*\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n ", + "start": 3372, + "end": 3522, + "loc": { + "start": { + "line": 125, + "column": 2 + }, + "end": { + "line": 129, + "column": 5 + } + } + } + ] + } + ] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", + "start": 474, + "end": 835, + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 27, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", + "start": 838, + "end": 1021, + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 35, + "column": 3 + } + } + } + ], + "trailingComments": [] }, - "end": { - "line": 4, - "column": 25 - } + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", + "start": 474, + "end": 835, + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 27, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", + "start": 838, + "end": 1021, + "loc": { + "start": { + "line": 30, + "column": 0 + }, + "end": { + "line": 35, + "column": 3 + } + } + } + ] } - }, + ], + "directives": [] + }, + "comments": [ { - "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 100, - "end": 101, + "type": "CommentBlock", + "value": " eslint-disable import/first ", + "start": 2, + "end": 35, "loc": { "start": { - "line": 4, - "column": 25 + "line": 3, + "column": 0 }, "end": { - "line": 4, - "column": 26 + "line": 3, + "column": 33 } } }, { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 101, - "end": 102, + "type": "CommentBlock", + "value": " eslint-disable import/prefer-default-export ", + "start": 36, + "end": 85, "loc": { "start": { "line": 4, - "column": 26 + "column": 0 }, "end": { "line": 4, - "column": 27 + "column": 49 } } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "require", - "start": 103, - "end": 110, + "type": "CommentBlock", + "value": " eslint-disable flowtype/no-weak-types ", + "start": 86, + "end": 129, "loc": { "start": { "line": 5, @@ -7360,516 +6172,319 @@ }, "end": { "line": 5, - "column": 7 + "column": 43 } } }, { - "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 110, - "end": 111, + "type": "CommentBlock", + "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", + "start": 474, + "end": 835, "loc": { "start": { - "line": 5, - "column": 7 + "line": 21, + "column": 0 }, "end": { - "line": 5, - "column": 8 + "line": 27, + "column": 3 } } }, { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "@babel/polyfill", - "start": 111, - "end": 128, + "type": "CommentBlock", + "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", + "start": 838, + "end": 1021, "loc": { "start": { - "line": 5, - "column": 8 + "line": 30, + "column": 0 }, "end": { - "line": 5, - "column": 25 + "line": 35, + "column": 3 } } }, { - "type": { - "label": ")", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 128, - "end": 129, + "type": "CommentBlock", + "value": "*\n * Server Constructor\n ", + "start": 1047, + "end": 1080, "loc": { "start": { - "line": 5, - "column": 25 + "line": 38, + "column": 2 }, "end": { - "line": 5, - "column": 26 + "line": 40, + "column": 5 } } }, { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 129, - "end": 130, + "type": "CommentLine", + "value": " Sets errors to print to console while running", + "start": 1286, + "end": 1334, "loc": { "start": { - "line": 5, - "column": 26 + "line": 47, + "column": 6 }, "end": { - "line": 5, - "column": 27 + "line": 47, + "column": 54 } } }, { - "type": { - "label": "import", - "keyword": "import", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "import", - "start": 132, - "end": 138, + "type": "CommentBlock", + "value": "*\n * Shutdown the Hapi Server Properly\n * @param {Function} callback callback to run after server has shutdown\n * @return {undefined} no return\n ", + "start": 1415, + "end": 1584, "loc": { "start": { - "line": 7, - "column": 0 + "line": 52, + "column": 2 }, "end": { - "line": 7, - "column": 6 + "line": 56, + "column": 5 } } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "fs", - "start": 139, - "end": 141, + }, + { + "type": "CommentLine", + "value": " TODO: Set Shutdown Timeout from config", + "start": 1612, + "end": 1653, "loc": { "start": { - "line": 7, - "column": 7 + "line": 58, + "column": 4 }, "end": { - "line": 7, - "column": 9 + "line": 58, + "column": 45 } } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 142, - "end": 146, + "type": "CommentLine", + "value": " TODO: Log Hapi Shutdown Error", + "start": 1734, + "end": 1766, "loc": { "start": { - "line": 7, - "column": 10 + "line": 61, + "column": 8 }, "end": { - "line": 7, - "column": 14 + "line": 61, + "column": 40 } } }, { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "fs", - "start": 147, - "end": 151, + "type": "CommentBlock", + "value": "*\n * Starts the server and registers any plugins\n * @return {Promise} Resolves once server has started\n ", + "start": 1811, + "end": 1925, "loc": { "start": { - "line": 7, - "column": 15 + "line": 67, + "column": 2 }, "end": { - "line": 7, - "column": 19 + "line": 70, + "column": 5 } } }, { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 151, - "end": 152, + "type": "CommentLine", + "value": " Serve Docs with OpenAPI and Swagger UI", + "start": 2074, + "end": 2115, "loc": { "start": { - "line": 7, - "column": 19 + "line": 75, + "column": 4 }, "end": { - "line": 7, - "column": 20 + "line": 75, + "column": 45 } } }, { - "type": { - "label": "import", - "keyword": "import", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "import", - "start": 153, - "end": 159, + "type": "CommentLine", + "value": " visit at http://localhost:3333/docs/swagger/index.html", + "start": 2120, + "end": 2177, "loc": { "start": { - "line": 8, - "column": 0 + "line": 76, + "column": 4 }, "end": { - "line": 8, - "column": 6 + "line": 76, + "column": 61 } } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "path", - "start": 160, - "end": 164, + "type": "CommentLine", + "value": " Create `logs` directory (so we only see errors and console logs in process out)", + "start": 2244, + "end": 2326, "loc": { "start": { - "line": 8, - "column": 7 + "line": 81, + "column": 4 }, "end": { - "line": 8, - "column": 11 + "line": 81, + "column": 86 } } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 165, - "end": 169, + "type": "CommentLine", + "value": " Creates a log of all the requests made and info as well as response status error/success", + "start": 2575, + "end": 2666, "loc": { "start": { - "line": 8, - "column": 12 + "line": 91, + "column": 8 }, "end": { - "line": 8, - "column": 16 + "line": 91, + "column": 99 } } }, { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "path", - "start": 170, - "end": 176, + "type": "CommentLine", + "value": " TODO: Separate stream for errors?", + "start": 2760, + "end": 2796, "loc": { "start": { - "line": 8, - "column": 17 + "line": 96, + "column": 4 }, "end": { - "line": 8, - "column": 23 + "line": 96, + "column": 40 } } }, { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 176, - "end": 177, + "type": "CommentBlock", + "value": "*\n * Logs a message through hapi-pino\n * @param {string[]} tags for pino log record\n * @param {string} data for pino log record\n * @return {undefined}\n ", + "start": 2804, + "end": 2972, "loc": { "start": { - "line": 8, - "column": 23 + "line": 99, + "column": 2 }, "end": { - "line": 8, - "column": 24 + "line": 104, + "column": 5 } } }, { - "type": { - "label": "import", - "keyword": "import", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "import", - "start": 178, - "end": 184, + "type": "CommentBlock", + "value": "*\n * Adds an endpoint at the path given handled by the controller\n * @param {EndpointConfig} endpoint configuration\n * @return {undefined}\n ", + "start": 3037, + "end": 3189, "loc": { "start": { - "line": 9, - "column": 0 + "line": 109, + "column": 2 }, "end": { - "line": 9, - "column": 6 + "line": 113, + "column": 5 } } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "pino", - "start": 185, - "end": 189, + "type": "CommentBlock", + "value": "*\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n ", + "start": 3372, + "end": 3522, "loc": { "start": { - "line": 9, - "column": 7 + "line": 125, + "column": 2 }, "end": { - "line": 9, - "column": 11 + "line": 129, + "column": 5 } } - }, + } + ], + "tokens": [ { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 190, - "end": 194, + "type": "CommentBlock", + "value": " eslint-disable import/first ", + "start": 2, + "end": 35, "loc": { "start": { - "line": 9, - "column": 12 + "line": 3, + "column": 0 }, "end": { - "line": 9, - "column": 16 + "line": 3, + "column": 33 } } }, { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "pino", - "start": 195, - "end": 201, + "type": "CommentBlock", + "value": " eslint-disable import/prefer-default-export ", + "start": 36, + "end": 85, "loc": { "start": { - "line": 9, - "column": 17 + "line": 4, + "column": 0 }, "end": { - "line": 9, - "column": 23 + "line": 4, + "column": 49 } } }, { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 201, - "end": 202, + "type": "CommentBlock", + "value": " eslint-disable flowtype/no-weak-types ", + "start": 86, + "end": 129, "loc": { "start": { - "line": 9, - "column": 23 + "line": 5, + "column": 0 }, "end": { - "line": 9, - "column": 24 + "line": 5, + "column": 43 } } }, { "type": { - "label": "import", - "keyword": "import", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -7877,27 +6492,26 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "import", - "start": 203, - "end": 209, + "value": "require", + "start": 131, + "end": 138, "loc": { "start": { - "line": 10, + "line": 7, "column": 0 }, "end": { - "line": 10, - "column": 6 + "line": 7, + "column": 7 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -7906,23 +6520,22 @@ "postfix": false, "binop": null }, - "value": "Pino", - "start": 210, - "end": 214, + "start": 138, + "end": 139, "loc": { "start": { - "line": 10, + "line": 7, "column": 7 }, "end": { - "line": 10, - "column": 11 + "line": 7, + "column": 8 } } }, { "type": { - "label": "name", + "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -7930,46 +6543,45 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "from", - "start": 215, - "end": 219, + "value": "source-map-support/register", + "start": 139, + "end": 168, "loc": { "start": { - "line": 10, - "column": 12 + "line": 7, + "column": 8 }, "end": { - "line": 10, - "column": 16 + "line": 7, + "column": 37 } } }, { "type": { - "label": "string", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "hapi-pino", - "start": 220, - "end": 231, + "start": 168, + "end": 169, "loc": { "start": { - "line": 10, - "column": 17 + "line": 7, + "column": 37 }, "end": { - "line": 10, - "column": 28 + "line": 7, + "column": 38 } } }, @@ -7986,23 +6598,22 @@ "binop": null, "updateContext": null }, - "start": 231, - "end": 232, + "start": 169, + "end": 170, "loc": { "start": { - "line": 10, - "column": 28 + "line": 7, + "column": 38 }, "end": { - "line": 10, - "column": 29 + "line": 7, + "column": 39 } } }, { "type": { - "label": "import", - "keyword": "import", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -8010,27 +6621,26 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "import", - "start": 233, - "end": 239, + "value": "require", + "start": 171, + "end": 178, "loc": { "start": { - "line": 11, + "line": 8, "column": 0 }, "end": { - "line": 11, - "column": 6 + "line": 8, + "column": 7 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -8039,23 +6649,22 @@ "postfix": false, "binop": null }, - "value": "Hapi", - "start": 240, - "end": 244, + "start": 178, + "end": 179, "loc": { "start": { - "line": 11, + "line": 8, "column": 7 }, "end": { - "line": 11, - "column": 11 + "line": 8, + "column": 8 } } }, { "type": { - "label": "name", + "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -8063,46 +6672,45 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "from", - "start": 245, - "end": 249, + "value": "@babel/register", + "start": 179, + "end": 196, "loc": { "start": { - "line": 11, - "column": 12 + "line": 8, + "column": 8 }, "end": { - "line": 11, - "column": 16 + "line": 8, + "column": 25 } } }, { "type": { - "label": "string", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "@hapi/hapi", - "start": 250, - "end": 262, + "start": 196, + "end": 197, "loc": { "start": { - "line": 11, - "column": 17 + "line": 8, + "column": 25 }, "end": { - "line": 11, - "column": 29 + "line": 8, + "column": 26 } } }, @@ -8119,23 +6727,22 @@ "binop": null, "updateContext": null }, - "start": 262, - "end": 263, + "start": 197, + "end": 198, "loc": { "start": { - "line": 11, - "column": 29 + "line": 8, + "column": 26 }, "end": { - "line": 11, - "column": 30 + "line": 8, + "column": 27 } } }, { "type": { - "label": "import", - "keyword": "import", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -8143,27 +6750,26 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "import", - "start": 264, - "end": 270, + "value": "require", + "start": 199, + "end": 206, "loc": { "start": { - "line": 12, + "line": 9, "column": 0 }, "end": { - "line": 12, - "column": 6 + "line": 9, + "column": 7 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -8172,23 +6778,22 @@ "postfix": false, "binop": null }, - "value": "Inert", - "start": 271, - "end": 276, + "start": 206, + "end": 207, "loc": { "start": { - "line": 12, + "line": 9, "column": 7 }, "end": { - "line": 12, - "column": 12 + "line": 9, + "column": 8 } } }, { "type": { - "label": "name", + "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -8196,46 +6801,45 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "from", - "start": 277, - "end": 281, + "value": "@babel/polyfill", + "start": 207, + "end": 224, "loc": { "start": { - "line": 12, - "column": 13 + "line": 9, + "column": 8 }, "end": { - "line": 12, - "column": 17 + "line": 9, + "column": 25 } } }, { "type": { - "label": "string", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "@hapi/inert", - "start": 282, - "end": 295, + "start": 224, + "end": 225, "loc": { "start": { - "line": 12, - "column": 18 + "line": 9, + "column": 25 }, "end": { - "line": 12, - "column": 31 + "line": 9, + "column": 26 } } }, @@ -8252,25 +6856,25 @@ "binop": null, "updateContext": null }, - "start": 295, - "end": 296, + "start": 225, + "end": 226, "loc": { "start": { - "line": 12, - "column": 31 + "line": 9, + "column": 26 }, "end": { - "line": 12, - "column": 32 + "line": 9, + "column": 27 } } }, { "type": { - "label": "const", - "keyword": "const", + "label": "import", + "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -8279,17 +6883,17 @@ "binop": null, "updateContext": null }, - "value": "const", - "start": 298, - "end": 303, + "value": "import", + "start": 228, + "end": 234, "loc": { "start": { - "line": 14, + "line": 11, "column": 0 }, "end": { - "line": 14, - "column": 5 + "line": 11, + "column": 6 } } }, @@ -8305,44 +6909,43 @@ "postfix": false, "binop": null }, - "value": "SERVER_NAME_DEFAULT", - "start": 304, - "end": 323, + "value": "fs", + "start": 235, + "end": 237, "loc": { "start": { - "line": 14, - "column": 6 + "line": 11, + "column": 7 }, "end": { - "line": 14, - "column": 25 + "line": 11, + "column": 9 } } }, { "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 324, - "end": 325, + "value": "from", + "start": 238, + "end": 242, "loc": { "start": { - "line": 14, - "column": 26 + "line": 11, + "column": 10 }, "end": { - "line": 14, - "column": 27 + "line": 11, + "column": 14 } } }, @@ -8359,17 +6962,17 @@ "binop": null, "updateContext": null }, - "value": "Template Server", - "start": 326, - "end": 343, + "value": "fs", + "start": 243, + "end": 247, "loc": { "start": { - "line": 14, - "column": 28 + "line": 11, + "column": 15 }, "end": { - "line": 14, - "column": 45 + "line": 11, + "column": 19 } } }, @@ -8386,25 +6989,25 @@ "binop": null, "updateContext": null }, - "start": 343, - "end": 344, + "start": 247, + "end": 248, "loc": { "start": { - "line": 14, - "column": 45 + "line": 11, + "column": 19 }, "end": { - "line": 14, - "column": 46 + "line": 11, + "column": 20 } } }, { "type": { - "label": "const", - "keyword": "const", + "label": "import", + "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -8413,17 +7016,17 @@ "binop": null, "updateContext": null }, - "value": "const", - "start": 345, - "end": 350, + "value": "import", + "start": 249, + "end": 255, "loc": { "start": { - "line": 15, + "line": 12, "column": 0 }, "end": { - "line": 15, - "column": 5 + "line": 12, + "column": 6 } } }, @@ -8439,44 +7042,43 @@ "postfix": false, "binop": null }, - "value": "LOG_DIR_DEFAULT", - "start": 351, - "end": 366, + "value": "Path", + "start": 256, + "end": 260, "loc": { "start": { - "line": 15, - "column": 6 + "line": 12, + "column": 7 }, "end": { - "line": 15, - "column": 21 + "line": 12, + "column": 11 } } }, { "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 367, - "end": 368, + "value": "from", + "start": 261, + "end": 265, "loc": { "start": { - "line": 15, - "column": 22 + "line": 12, + "column": 12 }, "end": { - "line": 15, - "column": 23 + "line": 12, + "column": 16 } } }, @@ -8493,17 +7095,17 @@ "binop": null, "updateContext": null }, - "value": "logs", - "start": 369, - "end": 375, + "value": "path", + "start": 266, + "end": 272, "loc": { "start": { - "line": 15, - "column": 24 + "line": 12, + "column": 17 }, "end": { - "line": 15, - "column": 30 + "line": 12, + "column": 23 } } }, @@ -8520,73 +7122,25 @@ "binop": null, "updateContext": null }, - "start": 375, - "end": 376, - "loc": { - "start": { - "line": 15, - "column": 30 - }, - "end": { - "line": 15, - "column": 31 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", - "start": 378, - "end": 739, - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n ", - "start": 742, - "end": 850, - "loc": { - "start": { - "line": 26, - "column": 0 - }, - "end": { - "line": 29, - "column": 3 - } - } - }, - { - "type": "CommentBlock", - "value": "*\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n ", - "start": 853, - "end": 970, + "start": 272, + "end": 273, "loc": { "start": { - "line": 32, - "column": 0 + "line": 12, + "column": 23 }, "end": { - "line": 35, - "column": 3 + "line": 12, + "column": 24 } } }, { "type": { - "label": "export", - "keyword": "export", + "label": "import", + "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -8595,45 +7149,43 @@ "binop": null, "updateContext": null }, - "value": "export", - "start": 971, - "end": 977, + "value": "import", + "start": 274, + "end": 280, "loc": { "start": { - "line": 36, + "line": 13, "column": 0 }, "end": { - "line": 36, + "line": 13, "column": 6 } } }, { "type": { - "label": "class", - "keyword": "class", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "class", - "start": 978, - "end": 983, + "value": "pino", + "start": 281, + "end": 285, "loc": { "start": { - "line": 36, + "line": 13, "column": 7 }, "end": { - "line": 36, - "column": 12 + "line": 13, + "column": 11 } } }, @@ -8649,26 +7201,25 @@ "postfix": false, "binop": null }, - "value": "RequestError", - "start": 984, - "end": 996, + "value": "from", + "start": 286, + "end": 290, "loc": { "start": { - "line": 36, - "column": 13 + "line": 13, + "column": 12 }, "end": { - "line": 36, - "column": 25 + "line": 13, + "column": 16 } } }, { "type": { - "label": "extends", - "keyword": "extends", - "beforeExpr": true, - "startsExpr": false, + "label": "string", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -8677,84 +7228,97 @@ "binop": null, "updateContext": null }, - "value": "extends", - "start": 997, - "end": 1004, + "value": "pino", + "start": 291, + "end": 297, "loc": { "start": { - "line": 36, - "column": 26 + "line": 13, + "column": 17 }, "end": { - "line": 36, - "column": 33 + "line": 13, + "column": 23 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": ";", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "Error", - "start": 1005, - "end": 1010, + "start": 297, + "end": 298, "loc": { "start": { - "line": 36, - "column": 34 + "line": 13, + "column": 23 }, "end": { - "line": 36, - "column": 39 + "line": 13, + "column": 24 } } }, { "type": { - "label": "{", - "beforeExpr": true, + "label": "import", + "keyword": "import", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1011, - "end": 1012, + "value": "import", + "start": 299, + "end": 305, "loc": { "start": { - "line": 36, - "column": 40 + "line": 14, + "column": 0 }, "end": { - "line": 36, - "column": 41 + "line": 14, + "column": 6 } } }, { - "type": "CommentBlock", - "value": "*\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n ", - "start": 1016, - "end": 1187, + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Pino", + "start": 306, + "end": 310, "loc": { "start": { - "line": 38, - "column": 2 + "line": 14, + "column": 7 }, "end": { - "line": 42, - "column": 5 + "line": 14, + "column": 11 } } }, @@ -8770,76 +7334,79 @@ "postfix": false, "binop": null }, - "value": "constructor", - "start": 1190, - "end": 1201, + "value": "from", + "start": 311, + "end": 315, "loc": { "start": { - "line": 43, - "column": 2 + "line": 14, + "column": 12 }, "end": { - "line": 43, - "column": 13 + "line": 14, + "column": 16 } } }, { "type": { - "label": "(", - "beforeExpr": true, + "label": "string", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1201, - "end": 1202, + "value": "hapi-pino", + "start": 316, + "end": 327, "loc": { "start": { - "line": 43, - "column": 13 + "line": 14, + "column": 17 }, "end": { - "line": 43, - "column": 14 + "line": 14, + "column": 28 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": ";", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "msg", - "start": 1202, - "end": 1205, + "start": 327, + "end": 328, "loc": { "start": { - "line": 43, - "column": 14 + "line": 14, + "column": 28 }, "end": { - "line": 43, - "column": 17 + "line": 14, + "column": 29 } } }, { "type": { - "label": ",", - "beforeExpr": true, - "startsExpr": false, + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -8848,16 +7415,17 @@ "binop": null, "updateContext": null }, - "start": 1205, - "end": 1206, + "value": "import", + "start": 329, + "end": 335, "loc": { "start": { - "line": 43, - "column": 17 + "line": 15, + "column": 0 }, "end": { - "line": 43, - "column": 18 + "line": 15, + "column": 6 } } }, @@ -8873,25 +7441,25 @@ "postfix": false, "binop": null }, - "value": "code", - "start": 1207, - "end": 1211, + "value": "Hapi", + "start": 336, + "end": 340, "loc": { "start": { - "line": 43, - "column": 19 + "line": 15, + "column": 7 }, "end": { - "line": 43, - "column": 23 + "line": 15, + "column": 11 } } }, { "type": { - "label": ")", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -8899,50 +7467,52 @@ "postfix": false, "binop": null }, - "start": 1211, - "end": 1212, + "value": "from", + "start": 341, + "end": 345, "loc": { "start": { - "line": 43, - "column": 23 + "line": 15, + "column": 12 }, "end": { - "line": 43, - "column": 24 + "line": 15, + "column": 16 } } }, { "type": { - "label": "{", - "beforeExpr": true, + "label": "string", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1213, - "end": 1214, + "value": "@hapi/hapi", + "start": 346, + "end": 358, "loc": { "start": { - "line": 43, - "column": 25 + "line": 15, + "column": 17 }, "end": { - "line": 43, - "column": 26 + "line": 15, + "column": 29 } } }, { "type": { - "label": "super", - "keyword": "super", - "beforeExpr": false, - "startsExpr": true, + "label": ";", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -8951,42 +7521,44 @@ "binop": null, "updateContext": null }, - "value": "super", - "start": 1219, - "end": 1224, + "start": 358, + "end": 359, "loc": { "start": { - "line": 44, - "column": 4 + "line": 15, + "column": 29 }, "end": { - "line": 44, - "column": 9 + "line": 15, + "column": 30 } } }, { "type": { - "label": "(", - "beforeExpr": true, + "label": "import", + "keyword": "import", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1224, - "end": 1225, + "value": "import", + "start": 360, + "end": 366, "loc": { "start": { - "line": 44, - "column": 9 + "line": 16, + "column": 0 }, "end": { - "line": 44, - "column": 10 + "line": 16, + "column": 6 } } }, @@ -9002,25 +7574,25 @@ "postfix": false, "binop": null }, - "value": "msg", - "start": 1225, - "end": 1228, + "value": "Inert", + "start": 367, + "end": 372, "loc": { "start": { - "line": 44, - "column": 10 + "line": 16, + "column": 7 }, "end": { - "line": 44, - "column": 13 + "line": 16, + "column": 12 } } }, { "type": { - "label": ")", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -9028,24 +7600,25 @@ "postfix": false, "binop": null }, - "start": 1228, - "end": 1229, + "value": "from", + "start": 373, + "end": 377, "loc": { "start": { - "line": 44, + "line": 16, "column": 13 }, "end": { - "line": 44, - "column": 14 + "line": 16, + "column": 17 } } }, { "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, + "label": "string", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -9054,25 +7627,25 @@ "binop": null, "updateContext": null }, - "start": 1229, - "end": 1230, + "value": "@hapi/inert", + "start": 378, + "end": 391, "loc": { "start": { - "line": 44, - "column": 14 + "line": 16, + "column": 18 }, "end": { - "line": 44, - "column": 15 + "line": 16, + "column": 31 } } }, { "type": { - "label": "this", - "keyword": "this", - "beforeExpr": false, - "startsExpr": true, + "label": ";", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -9081,23 +7654,23 @@ "binop": null, "updateContext": null }, - "value": "this", - "start": 1235, - "end": 1239, + "start": 391, + "end": 392, "loc": { "start": { - "line": 45, - "column": 4 + "line": 16, + "column": 31 }, "end": { - "line": 45, - "column": 8 + "line": 16, + "column": 32 } } }, { "type": { - "label": ".", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -9108,16 +7681,17 @@ "binop": null, "updateContext": null }, - "start": 1239, - "end": 1240, + "value": "const", + "start": 394, + "end": 399, "loc": { "start": { - "line": 45, - "column": 8 + "line": 18, + "column": 0 }, "end": { - "line": 45, - "column": 9 + "line": 18, + "column": 5 } } }, @@ -9133,17 +7707,17 @@ "postfix": false, "binop": null }, - "value": "code", - "start": 1240, - "end": 1244, + "value": "SERVER_NAME_DEFAULT", + "start": 400, + "end": 419, "loc": { "start": { - "line": 45, - "column": 9 + "line": 18, + "column": 6 }, "end": { - "line": 45, - "column": 13 + "line": 18, + "column": 25 } } }, @@ -9161,22 +7735,22 @@ "updateContext": null }, "value": "=", - "start": 1245, - "end": 1246, + "start": 420, + "end": 421, "loc": { "start": { - "line": 45, - "column": 14 + "line": 18, + "column": 26 }, "end": { - "line": 45, - "column": 15 + "line": 18, + "column": 27 } } }, { "type": { - "label": "name", + "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -9184,19 +7758,20 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "code", - "start": 1247, - "end": 1251, + "value": "Template Server", + "start": 422, + "end": 439, "loc": { "start": { - "line": 45, - "column": 16 + "line": 18, + "column": 28 }, "end": { - "line": 45, - "column": 20 + "line": 18, + "column": 45 } } }, @@ -9213,22 +7788,23 @@ "binop": null, "updateContext": null }, - "start": 1251, - "end": 1252, + "start": 439, + "end": 440, "loc": { "start": { - "line": 45, - "column": 20 + "line": 18, + "column": 45 }, "end": { - "line": 45, - "column": 21 + "line": 18, + "column": 46 } } }, { "type": { - "label": "}", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -9236,26 +7812,28 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 1255, - "end": 1256, + "value": "const", + "start": 441, + "end": 446, "loc": { "start": { - "line": 46, - "column": 2 + "line": 19, + "column": 0 }, "end": { - "line": 46, - "column": 3 + "line": 19, + "column": 5 } } }, { "type": { - "label": "}", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -9263,32 +7841,71 @@ "postfix": false, "binop": null }, - "start": 1257, - "end": 1258, + "value": "LOG_DIR_DEFAULT", + "start": 447, + "end": 462, "loc": { "start": { - "line": 47, - "column": 0 + "line": 19, + "column": 6 }, "end": { - "line": 47, - "column": 1 + "line": 19, + "column": 21 } } }, { - "type": "CommentBlock", - "value": "*\n * Request Object that is passed to the controller function as the first parameter\n * from https://github.com/hapijs/hapi/blob/master/API.md#request\n * @type {HapiRequest}\n ", - "start": 1260, - "end": 1439, + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 463, + "end": 464, + "loc": { + "start": { + "line": 19, + "column": 22 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "logs", + "start": 465, + "end": 471, "loc": { "start": { - "line": 49, - "column": 0 + "line": 19, + "column": 24 }, "end": { - "line": 53, - "column": 3 + "line": 19, + "column": 30 } } }, @@ -9305,31 +7922,47 @@ "binop": null, "updateContext": null }, - "start": 1440, - "end": 1441, + "start": 471, + "end": 472, + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 19, + "column": 31 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n ", + "start": 474, + "end": 835, "loc": { "start": { - "line": 54, + "line": 21, "column": 0 }, "end": { - "line": 54, - "column": 1 + "line": 27, + "column": 3 } } }, { "type": "CommentBlock", "value": "*\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n ", - "start": 1443, - "end": 1626, + "start": 838, + "end": 1021, "loc": { "start": { - "line": 56, + "line": 30, "column": 0 }, "end": { - "line": 61, + "line": 35, "column": 3 } } @@ -9349,15 +7982,15 @@ "updateContext": null }, "value": "export", - "start": 1627, - "end": 1633, + "start": 1022, + "end": 1028, "loc": { "start": { - "line": 62, + "line": 36, "column": 0 }, "end": { - "line": 62, + "line": 36, "column": 6 } } @@ -9377,15 +8010,15 @@ "updateContext": null }, "value": "class", - "start": 1634, - "end": 1639, + "start": 1029, + "end": 1034, "loc": { "start": { - "line": 62, + "line": 36, "column": 7 }, "end": { - "line": 62, + "line": 36, "column": 12 } } @@ -9403,15 +8036,15 @@ "binop": null }, "value": "Server", - "start": 1640, - "end": 1646, + "start": 1035, + "end": 1041, "loc": { "start": { - "line": 62, + "line": 36, "column": 13 }, "end": { - "line": 62, + "line": 36, "column": 19 } } @@ -9428,15 +8061,15 @@ "postfix": false, "binop": null }, - "start": 1647, - "end": 1648, + "start": 1042, + "end": 1043, "loc": { "start": { - "line": 62, + "line": 36, "column": 20 }, "end": { - "line": 62, + "line": 36, "column": 21 } } @@ -9444,35 +8077,19 @@ { "type": "CommentBlock", "value": "*\n * Server Constructor\n ", - "start": 1652, - "end": 1685, + "start": 1047, + "end": 1080, "loc": { "start": { - "line": 64, + "line": 38, "column": 2 }, "end": { - "line": 66, + "line": 40, "column": 5 } } }, - { - "type": "CommentLine", - "value": " eslint-disable-line", - "start": 1688, - "end": 1710, - "loc": { - "start": { - "line": 67, - "column": 2 - }, - "end": { - "line": 67, - "column": 24 - } - } - }, { "type": { "label": "name", @@ -9486,15 +8103,15 @@ "binop": null }, "value": "constructor", - "start": 1713, - "end": 1724, + "start": 1083, + "end": 1094, "loc": { "start": { - "line": 68, + "line": 41, "column": 2 }, "end": { - "line": 68, + "line": 41, "column": 13 } } @@ -9511,15 +8128,15 @@ "postfix": false, "binop": null }, - "start": 1724, - "end": 1725, + "start": 1094, + "end": 1095, "loc": { "start": { - "line": 68, + "line": 41, "column": 13 }, "end": { - "line": 68, + "line": 41, "column": 14 } } @@ -9536,15 +8153,15 @@ "postfix": false, "binop": null }, - "start": 1725, - "end": 1726, + "start": 1095, + "end": 1096, "loc": { "start": { - "line": 68, + "line": 41, "column": 14 }, "end": { - "line": 68, + "line": 41, "column": 15 } } @@ -9562,15 +8179,15 @@ "binop": null }, "value": "name", - "start": 1727, - "end": 1731, + "start": 1097, + "end": 1101, "loc": { "start": { - "line": 68, + "line": 41, "column": 16 }, "end": { - "line": 68, + "line": 41, "column": 20 } } @@ -9588,15 +8205,15 @@ "binop": null, "updateContext": null }, - "start": 1731, - "end": 1732, + "start": 1101, + "end": 1102, "loc": { "start": { - "line": 68, + "line": 41, "column": 20 }, "end": { - "line": 68, + "line": 41, "column": 21 } } @@ -9614,15 +8231,15 @@ "binop": null }, "value": "port", - "start": 1733, - "end": 1737, + "start": 1103, + "end": 1107, "loc": { "start": { - "line": 68, + "line": 41, "column": 22 }, "end": { - "line": 68, + "line": 41, "column": 26 } } @@ -9640,15 +8257,15 @@ "binop": null, "updateContext": null }, - "start": 1737, - "end": 1738, + "start": 1107, + "end": 1108, "loc": { "start": { - "line": 68, + "line": 41, "column": 26 }, "end": { - "line": 68, + "line": 41, "column": 27 } } @@ -9666,15 +8283,15 @@ "binop": null }, "value": "host", - "start": 1739, - "end": 1743, + "start": 1109, + "end": 1113, "loc": { "start": { - "line": 68, + "line": 41, "column": 28 }, "end": { - "line": 68, + "line": 41, "column": 32 } } @@ -9692,15 +8309,15 @@ "binop": null, "updateContext": null }, - "start": 1743, - "end": 1744, + "start": 1113, + "end": 1114, "loc": { "start": { - "line": 68, + "line": 41, "column": 32 }, "end": { - "line": 68, + "line": 41, "column": 33 } } @@ -9718,15 +8335,15 @@ "binop": null }, "value": "logDir", - "start": 1745, - "end": 1751, + "start": 1115, + "end": 1121, "loc": { "start": { - "line": 68, + "line": 41, "column": 34 }, "end": { - "line": 68, + "line": 41, "column": 40 } } @@ -9744,15 +8361,15 @@ "binop": null, "updateContext": null }, - "start": 1751, - "end": 1752, + "start": 1121, + "end": 1122, "loc": { "start": { - "line": 68, + "line": 41, "column": 40 }, "end": { - "line": 68, + "line": 41, "column": 41 } } @@ -9770,15 +8387,15 @@ "binop": null }, "value": "debug", - "start": 1753, - "end": 1758, + "start": 1123, + "end": 1128, "loc": { "start": { - "line": 68, + "line": 41, "column": 42 }, "end": { - "line": 68, + "line": 41, "column": 47 } } @@ -9795,15 +8412,15 @@ "postfix": false, "binop": null }, - "start": 1759, - "end": 1760, + "start": 1129, + "end": 1130, "loc": { "start": { - "line": 68, + "line": 41, "column": 48 }, "end": { - "line": 68, + "line": 41, "column": 49 } } @@ -9820,15 +8437,15 @@ "postfix": false, "binop": null }, - "start": 1760, - "end": 1761, + "start": 1130, + "end": 1131, "loc": { "start": { - "line": 68, + "line": 41, "column": 49 }, "end": { - "line": 68, + "line": 41, "column": 50 } } @@ -9845,15 +8462,15 @@ "postfix": false, "binop": null }, - "start": 1762, - "end": 1763, + "start": 1132, + "end": 1133, "loc": { "start": { - "line": 68, + "line": 41, "column": 51 }, "end": { - "line": 68, + "line": 41, "column": 52 } } @@ -9873,15 +8490,15 @@ "updateContext": null }, "value": "this", - "start": 1768, - "end": 1772, + "start": 1138, + "end": 1142, "loc": { "start": { - "line": 69, + "line": 42, "column": 4 }, "end": { - "line": 69, + "line": 42, "column": 8 } } @@ -9899,15 +8516,15 @@ "binop": null, "updateContext": null }, - "start": 1772, - "end": 1773, + "start": 1142, + "end": 1143, "loc": { "start": { - "line": 69, + "line": 42, "column": 8 }, "end": { - "line": 69, + "line": 42, "column": 9 } } @@ -9925,15 +8542,15 @@ "binop": null }, "value": "name", - "start": 1773, - "end": 1777, + "start": 1143, + "end": 1147, "loc": { "start": { - "line": 69, + "line": 42, "column": 9 }, "end": { - "line": 69, + "line": 42, "column": 13 } } @@ -9952,15 +8569,15 @@ "updateContext": null }, "value": "=", - "start": 1778, - "end": 1779, + "start": 1148, + "end": 1149, "loc": { "start": { - "line": 69, + "line": 42, "column": 14 }, "end": { - "line": 69, + "line": 42, "column": 15 } } @@ -9978,15 +8595,15 @@ "binop": null }, "value": "name", - "start": 1780, - "end": 1784, + "start": 1150, + "end": 1154, "loc": { "start": { - "line": 69, + "line": 42, "column": 16 }, "end": { - "line": 69, + "line": 42, "column": 20 } } @@ -10005,15 +8622,15 @@ "updateContext": null }, "value": "||", - "start": 1785, - "end": 1787, + "start": 1155, + "end": 1157, "loc": { "start": { - "line": 69, + "line": 42, "column": 21 }, "end": { - "line": 69, + "line": 42, "column": 23 } } @@ -10031,15 +8648,15 @@ "binop": null }, "value": "SERVER_NAME_DEFAULT", - "start": 1788, - "end": 1807, + "start": 1158, + "end": 1177, "loc": { "start": { - "line": 69, + "line": 42, "column": 24 }, "end": { - "line": 69, + "line": 42, "column": 43 } } @@ -10057,15 +8674,15 @@ "binop": null, "updateContext": null }, - "start": 1807, - "end": 1808, + "start": 1177, + "end": 1178, "loc": { "start": { - "line": 69, + "line": 42, "column": 43 }, "end": { - "line": 69, + "line": 42, "column": 44 } } @@ -10085,15 +8702,15 @@ "updateContext": null }, "value": "this", - "start": 1813, - "end": 1817, + "start": 1183, + "end": 1187, "loc": { "start": { - "line": 70, + "line": 43, "column": 4 }, "end": { - "line": 70, + "line": 43, "column": 8 } } @@ -10111,15 +8728,15 @@ "binop": null, "updateContext": null }, - "start": 1817, - "end": 1818, + "start": 1187, + "end": 1188, "loc": { "start": { - "line": 70, + "line": 43, "column": 8 }, "end": { - "line": 70, + "line": 43, "column": 9 } } @@ -10137,15 +8754,15 @@ "binop": null }, "value": "logDir", - "start": 1818, - "end": 1824, + "start": 1188, + "end": 1194, "loc": { "start": { - "line": 70, + "line": 43, "column": 9 }, "end": { - "line": 70, + "line": 43, "column": 15 } } @@ -10164,15 +8781,15 @@ "updateContext": null }, "value": "=", - "start": 1825, - "end": 1826, + "start": 1195, + "end": 1196, "loc": { "start": { - "line": 70, + "line": 43, "column": 16 }, "end": { - "line": 70, + "line": 43, "column": 17 } } @@ -10190,15 +8807,15 @@ "binop": null }, "value": "logDir", - "start": 1827, - "end": 1833, + "start": 1197, + "end": 1203, "loc": { "start": { - "line": 70, + "line": 43, "column": 18 }, "end": { - "line": 70, + "line": 43, "column": 24 } } @@ -10217,15 +8834,15 @@ "updateContext": null }, "value": "||", - "start": 1834, - "end": 1836, + "start": 1204, + "end": 1206, "loc": { "start": { - "line": 70, + "line": 43, "column": 25 }, "end": { - "line": 70, + "line": 43, "column": 27 } } @@ -10243,15 +8860,15 @@ "binop": null }, "value": "LOG_DIR_DEFAULT", - "start": 1837, - "end": 1852, + "start": 1207, + "end": 1222, "loc": { "start": { - "line": 70, + "line": 43, "column": 28 }, "end": { - "line": 70, + "line": 43, "column": 43 } } @@ -10269,15 +8886,15 @@ "binop": null, "updateContext": null }, - "start": 1852, - "end": 1853, + "start": 1222, + "end": 1223, "loc": { "start": { - "line": 70, + "line": 43, "column": 43 }, "end": { - "line": 70, + "line": 43, "column": 44 } } @@ -10297,15 +8914,15 @@ "updateContext": null }, "value": "this", - "start": 1858, - "end": 1862, + "start": 1228, + "end": 1232, "loc": { "start": { - "line": 71, + "line": 44, "column": 4 }, "end": { - "line": 71, + "line": 44, "column": 8 } } @@ -10323,15 +8940,15 @@ "binop": null, "updateContext": null }, - "start": 1862, - "end": 1863, + "start": 1232, + "end": 1233, "loc": { "start": { - "line": 71, + "line": 44, "column": 8 }, "end": { - "line": 71, + "line": 44, "column": 9 } } @@ -10349,15 +8966,15 @@ "binop": null }, "value": "server", - "start": 1863, - "end": 1869, + "start": 1233, + "end": 1239, "loc": { "start": { - "line": 71, + "line": 44, "column": 9 }, "end": { - "line": 71, + "line": 44, "column": 15 } } @@ -10376,15 +8993,15 @@ "updateContext": null }, "value": "=", - "start": 1870, - "end": 1871, + "start": 1240, + "end": 1241, "loc": { "start": { - "line": 71, + "line": 44, "column": 16 }, "end": { - "line": 71, + "line": 44, "column": 17 } } @@ -10402,15 +9019,15 @@ "binop": null }, "value": "Hapi", - "start": 1872, - "end": 1876, + "start": 1242, + "end": 1246, "loc": { "start": { - "line": 71, + "line": 44, "column": 18 }, "end": { - "line": 71, + "line": 44, "column": 22 } } @@ -10428,15 +9045,15 @@ "binop": null, "updateContext": null }, - "start": 1876, - "end": 1877, + "start": 1246, + "end": 1247, "loc": { "start": { - "line": 71, + "line": 44, "column": 22 }, "end": { - "line": 71, + "line": 44, "column": 23 } } @@ -10454,15 +9071,15 @@ "binop": null }, "value": "server", - "start": 1877, - "end": 1883, + "start": 1247, + "end": 1253, "loc": { "start": { - "line": 71, + "line": 44, "column": 23 }, "end": { - "line": 71, + "line": 44, "column": 29 } } @@ -10479,15 +9096,15 @@ "postfix": false, "binop": null }, - "start": 1883, - "end": 1884, + "start": 1253, + "end": 1254, "loc": { "start": { - "line": 71, + "line": 44, "column": 29 }, "end": { - "line": 71, + "line": 44, "column": 30 } } @@ -10504,15 +9121,15 @@ "postfix": false, "binop": null }, - "start": 1884, - "end": 1885, + "start": 1254, + "end": 1255, "loc": { "start": { - "line": 71, + "line": 44, "column": 30 }, "end": { - "line": 71, + "line": 44, "column": 31 } } @@ -10530,15 +9147,15 @@ "binop": null }, "value": "port", - "start": 1892, - "end": 1896, + "start": 1262, + "end": 1266, "loc": { "start": { - "line": 72, + "line": 45, "column": 6 }, "end": { - "line": 72, + "line": 45, "column": 10 } } @@ -10556,15 +9173,15 @@ "binop": null, "updateContext": null }, - "start": 1896, - "end": 1897, + "start": 1266, + "end": 1267, "loc": { "start": { - "line": 72, + "line": 45, "column": 10 }, "end": { - "line": 72, + "line": 45, "column": 11 } } @@ -10582,15 +9199,15 @@ "binop": null }, "value": "host", - "start": 1904, - "end": 1908, + "start": 1274, + "end": 1278, "loc": { "start": { - "line": 73, + "line": 46, "column": 6 }, "end": { - "line": 73, + "line": 46, "column": 10 } } @@ -10608,15 +9225,15 @@ "binop": null, "updateContext": null }, - "start": 1908, - "end": 1909, + "start": 1278, + "end": 1279, "loc": { "start": { - "line": 73, + "line": 46, "column": 10 }, "end": { - "line": 73, + "line": 46, "column": 11 } } @@ -10624,15 +9241,15 @@ { "type": "CommentLine", "value": " Sets errors to print to console while running", - "start": 1916, - "end": 1964, + "start": 1286, + "end": 1334, "loc": { "start": { - "line": 74, + "line": 47, "column": 6 }, "end": { - "line": 74, + "line": 47, "column": 54 } } @@ -10650,15 +9267,15 @@ "binop": null }, "value": "debug", - "start": 1971, - "end": 1976, + "start": 1341, + "end": 1346, "loc": { "start": { - "line": 75, + "line": 48, "column": 6 }, "end": { - "line": 75, + "line": 48, "column": 11 } } @@ -10676,15 +9293,15 @@ "binop": null, "updateContext": null }, - "start": 1976, - "end": 1977, + "start": 1346, + "end": 1347, "loc": { "start": { - "line": 75, + "line": 48, "column": 11 }, "end": { - "line": 75, + "line": 48, "column": 12 } } @@ -10702,15 +9319,15 @@ "binop": null }, "value": "debug", - "start": 1978, - "end": 1983, + "start": 1348, + "end": 1353, "loc": { "start": { - "line": 75, + "line": 48, "column": 13 }, "end": { - "line": 75, + "line": 48, "column": 18 } } @@ -10729,15 +9346,15 @@ "updateContext": null }, "value": "===", - "start": 1984, - "end": 1987, + "start": 1354, + "end": 1357, "loc": { "start": { - "line": 75, + "line": 48, "column": 19 }, "end": { - "line": 75, + "line": 48, "column": 22 } } @@ -10757,15 +9374,15 @@ "updateContext": null }, "value": "true", - "start": 1988, - "end": 1992, + "start": 1358, + "end": 1362, "loc": { "start": { - "line": 75, + "line": 48, "column": 23 }, "end": { - "line": 75, + "line": 48, "column": 27 } } @@ -10783,15 +9400,15 @@ "binop": null, "updateContext": null }, - "start": 1993, - "end": 1994, + "start": 1363, + "end": 1364, "loc": { "start": { - "line": 75, + "line": 48, "column": 28 }, "end": { - "line": 75, + "line": 48, "column": 29 } } @@ -10808,15 +9425,15 @@ "postfix": false, "binop": null }, - "start": 1995, - "end": 1996, + "start": 1365, + "end": 1366, "loc": { "start": { - "line": 75, + "line": 48, "column": 30 }, "end": { - "line": 75, + "line": 48, "column": 31 } } @@ -10834,15 +9451,15 @@ "binop": null }, "value": "request", - "start": 1997, - "end": 2004, + "start": 1367, + "end": 1374, "loc": { "start": { - "line": 75, + "line": 48, "column": 32 }, "end": { - "line": 75, + "line": 48, "column": 39 } } @@ -10860,15 +9477,15 @@ "binop": null, "updateContext": null }, - "start": 2004, - "end": 2005, + "start": 1374, + "end": 1375, "loc": { "start": { - "line": 75, + "line": 48, "column": 39 }, "end": { - "line": 75, + "line": 48, "column": 40 } } @@ -10886,15 +9503,15 @@ "binop": null, "updateContext": null }, - "start": 2006, - "end": 2007, + "start": 1376, + "end": 1377, "loc": { "start": { - "line": 75, + "line": 48, "column": 41 }, "end": { - "line": 75, + "line": 48, "column": 42 } } @@ -10913,15 +9530,15 @@ "updateContext": null }, "value": "error", - "start": 2007, - "end": 2014, + "start": 1377, + "end": 1384, "loc": { "start": { - "line": 75, + "line": 48, "column": 42 }, "end": { - "line": 75, + "line": 48, "column": 49 } } @@ -10939,15 +9556,15 @@ "binop": null, "updateContext": null }, - "start": 2014, - "end": 2015, + "start": 1384, + "end": 1385, "loc": { "start": { - "line": 75, + "line": 48, "column": 49 }, "end": { - "line": 75, + "line": 48, "column": 50 } } @@ -10964,15 +9581,15 @@ "postfix": false, "binop": null }, - "start": 2016, - "end": 2017, + "start": 1386, + "end": 1387, "loc": { "start": { - "line": 75, + "line": 48, "column": 51 }, "end": { - "line": 75, + "line": 48, "column": 52 } } @@ -10990,15 +9607,15 @@ "binop": null, "updateContext": null }, - "start": 2018, - "end": 2019, + "start": 1388, + "end": 1389, "loc": { "start": { - "line": 75, + "line": 48, "column": 53 }, "end": { - "line": 75, + "line": 48, "column": 54 } } @@ -11016,15 +9633,15 @@ "binop": null }, "value": "undefined", - "start": 2020, - "end": 2029, + "start": 1390, + "end": 1399, "loc": { "start": { - "line": 75, + "line": 48, "column": 55 }, "end": { - "line": 75, + "line": 48, "column": 64 } } @@ -11041,15 +9658,15 @@ "postfix": false, "binop": null }, - "start": 2034, - "end": 2035, + "start": 1404, + "end": 1405, "loc": { "start": { - "line": 76, + "line": 49, "column": 4 }, "end": { - "line": 76, + "line": 49, "column": 5 } } @@ -11066,15 +9683,15 @@ "postfix": false, "binop": null }, - "start": 2035, - "end": 2036, + "start": 1405, + "end": 1406, "loc": { "start": { - "line": 76, + "line": 49, "column": 5 }, "end": { - "line": 76, + "line": 49, "column": 6 } } @@ -11092,15 +9709,15 @@ "binop": null, "updateContext": null }, - "start": 2036, - "end": 2037, + "start": 1406, + "end": 1407, "loc": { "start": { - "line": 76, + "line": 49, "column": 6 }, "end": { - "line": 76, + "line": 49, "column": 7 } } @@ -11117,15 +9734,15 @@ "postfix": false, "binop": null }, - "start": 2040, - "end": 2041, + "start": 1410, + "end": 1411, "loc": { "start": { - "line": 77, + "line": 50, "column": 2 }, "end": { - "line": 77, + "line": 50, "column": 3 } } @@ -11133,15 +9750,15 @@ { "type": "CommentBlock", "value": "*\n * Shutdown the Hapi Server Properly\n * @param {Function} callback callback to run after server has shutdown\n * @return {undefined} no return\n ", - "start": 2045, - "end": 2214, + "start": 1415, + "end": 1584, "loc": { "start": { - "line": 79, + "line": 52, "column": 2 }, "end": { - "line": 83, + "line": 56, "column": 5 } } @@ -11159,15 +9776,15 @@ "binop": null }, "value": "shutdown", - "start": 2217, - "end": 2225, + "start": 1587, + "end": 1595, "loc": { "start": { - "line": 84, + "line": 57, "column": 2 }, "end": { - "line": 84, + "line": 57, "column": 10 } } @@ -11184,15 +9801,15 @@ "postfix": false, "binop": null }, - "start": 2225, - "end": 2226, + "start": 1595, + "end": 1596, "loc": { "start": { - "line": 84, + "line": 57, "column": 10 }, "end": { - "line": 84, + "line": 57, "column": 11 } } @@ -11210,15 +9827,15 @@ "binop": null }, "value": "callback", - "start": 2226, - "end": 2234, + "start": 1596, + "end": 1604, "loc": { "start": { - "line": 84, + "line": 57, "column": 11 }, "end": { - "line": 84, + "line": 57, "column": 19 } } @@ -11235,15 +9852,15 @@ "postfix": false, "binop": null }, - "start": 2234, - "end": 2235, + "start": 1604, + "end": 1605, "loc": { "start": { - "line": 84, + "line": 57, "column": 19 }, "end": { - "line": 84, + "line": 57, "column": 20 } } @@ -11260,47 +9877,31 @@ "postfix": false, "binop": null }, - "start": 2236, - "end": 2237, - "loc": { - "start": { - "line": 84, - "column": 21 - }, - "end": { - "line": 84, - "column": 22 - } - } - }, - { - "type": "CommentLine", - "value": " eslint-disable-line flowtype/no-weak-types", - "start": 2242, - "end": 2287, + "start": 1606, + "end": 1607, "loc": { "start": { - "line": 85, - "column": 4 + "line": 57, + "column": 21 }, "end": { - "line": 85, - "column": 49 + "line": 57, + "column": 22 } } }, { "type": "CommentLine", "value": " TODO: Set Shutdown Timeout from config", - "start": 2292, - "end": 2333, + "start": 1612, + "end": 1653, "loc": { "start": { - "line": 86, + "line": 58, "column": 4 }, "end": { - "line": 86, + "line": 58, "column": 45 } } @@ -11320,15 +9921,15 @@ "updateContext": null }, "value": "this", - "start": 2338, - "end": 2342, + "start": 1658, + "end": 1662, "loc": { "start": { - "line": 87, + "line": 59, "column": 4 }, "end": { - "line": 87, + "line": 59, "column": 8 } } @@ -11346,15 +9947,15 @@ "binop": null, "updateContext": null }, - "start": 2342, - "end": 2343, + "start": 1662, + "end": 1663, "loc": { "start": { - "line": 87, + "line": 59, "column": 8 }, "end": { - "line": 87, + "line": 59, "column": 9 } } @@ -11372,15 +9973,15 @@ "binop": null }, "value": "server", - "start": 2343, - "end": 2349, + "start": 1663, + "end": 1669, "loc": { "start": { - "line": 87, + "line": 59, "column": 9 }, "end": { - "line": 87, + "line": 59, "column": 15 } } @@ -11398,15 +9999,15 @@ "binop": null, "updateContext": null }, - "start": 2349, - "end": 2350, + "start": 1669, + "end": 1670, "loc": { "start": { - "line": 87, + "line": 59, "column": 15 }, "end": { - "line": 87, + "line": 59, "column": 16 } } @@ -11424,15 +10025,15 @@ "binop": null }, "value": "stop", - "start": 2350, - "end": 2354, + "start": 1670, + "end": 1674, "loc": { "start": { - "line": 87, + "line": 59, "column": 16 }, "end": { - "line": 87, + "line": 59, "column": 20 } } @@ -11449,15 +10050,15 @@ "postfix": false, "binop": null }, - "start": 2354, - "end": 2355, + "start": 1674, + "end": 1675, "loc": { "start": { - "line": 87, + "line": 59, "column": 20 }, "end": { - "line": 87, + "line": 59, "column": 21 } } @@ -11474,15 +10075,15 @@ "postfix": false, "binop": null }, - "start": 2355, - "end": 2356, + "start": 1675, + "end": 1676, "loc": { "start": { - "line": 87, + "line": 59, "column": 21 }, "end": { - "line": 87, + "line": 59, "column": 22 } } @@ -11500,15 +10101,15 @@ "binop": null }, "value": "timeout", - "start": 2357, - "end": 2364, + "start": 1677, + "end": 1684, "loc": { "start": { - "line": 87, + "line": 59, "column": 23 }, "end": { - "line": 87, + "line": 59, "column": 30 } } @@ -11526,15 +10127,15 @@ "binop": null, "updateContext": null }, - "start": 2364, - "end": 2365, + "start": 1684, + "end": 1685, "loc": { "start": { - "line": 87, + "line": 59, "column": 30 }, "end": { - "line": 87, + "line": 59, "column": 31 } } @@ -11553,15 +10154,15 @@ "updateContext": null }, "value": 10000, - "start": 2366, - "end": 2371, + "start": 1686, + "end": 1691, "loc": { "start": { - "line": 87, + "line": 59, "column": 32 }, "end": { - "line": 87, + "line": 59, "column": 37 } } @@ -11578,15 +10179,15 @@ "postfix": false, "binop": null }, - "start": 2372, - "end": 2373, + "start": 1692, + "end": 1693, "loc": { "start": { - "line": 87, + "line": 59, "column": 38 }, "end": { - "line": 87, + "line": 59, "column": 39 } } @@ -11603,15 +10204,15 @@ "postfix": false, "binop": null }, - "start": 2373, - "end": 2374, + "start": 1693, + "end": 1694, "loc": { "start": { - "line": 87, + "line": 59, "column": 39 }, "end": { - "line": 87, + "line": 59, "column": 40 } } @@ -11629,15 +10230,15 @@ "binop": null, "updateContext": null }, - "start": 2374, - "end": 2375, + "start": 1694, + "end": 1695, "loc": { "start": { - "line": 87, + "line": 59, "column": 40 }, "end": { - "line": 87, + "line": 59, "column": 41 } } @@ -11655,15 +10256,15 @@ "binop": null }, "value": "then", - "start": 2375, - "end": 2379, + "start": 1695, + "end": 1699, "loc": { "start": { - "line": 87, + "line": 59, "column": 41 }, "end": { - "line": 87, + "line": 59, "column": 45 } } @@ -11680,15 +10281,15 @@ "postfix": false, "binop": null }, - "start": 2379, - "end": 2380, + "start": 1699, + "end": 1700, "loc": { "start": { - "line": 87, + "line": 59, "column": 45 }, "end": { - "line": 87, + "line": 59, "column": 46 } } @@ -11706,15 +10307,15 @@ "binop": null }, "value": "err", - "start": 2380, - "end": 2383, + "start": 1700, + "end": 1703, "loc": { "start": { - "line": 87, + "line": 59, "column": 46 }, "end": { - "line": 87, + "line": 59, "column": 49 } } @@ -11732,15 +10333,15 @@ "binop": null, "updateContext": null }, - "start": 2384, - "end": 2386, + "start": 1704, + "end": 1706, "loc": { "start": { - "line": 87, + "line": 59, "column": 50 }, "end": { - "line": 87, + "line": 59, "column": 52 } } @@ -11757,15 +10358,15 @@ "postfix": false, "binop": null }, - "start": 2387, - "end": 2388, + "start": 1707, + "end": 1708, "loc": { "start": { - "line": 87, + "line": 59, "column": 53 }, "end": { - "line": 87, + "line": 59, "column": 54 } } @@ -11785,15 +10386,15 @@ "updateContext": null }, "value": "if", - "start": 2395, - "end": 2397, + "start": 1715, + "end": 1717, "loc": { "start": { - "line": 88, + "line": 60, "column": 6 }, "end": { - "line": 88, + "line": 60, "column": 8 } } @@ -11810,15 +10411,15 @@ "postfix": false, "binop": null }, - "start": 2398, - "end": 2399, + "start": 1718, + "end": 1719, "loc": { "start": { - "line": 88, + "line": 60, "column": 9 }, "end": { - "line": 88, + "line": 60, "column": 10 } } @@ -11836,15 +10437,15 @@ "binop": null }, "value": "err", - "start": 2399, - "end": 2402, + "start": 1719, + "end": 1722, "loc": { "start": { - "line": 88, + "line": 60, "column": 10 }, "end": { - "line": 88, + "line": 60, "column": 13 } } @@ -11861,15 +10462,15 @@ "postfix": false, "binop": null }, - "start": 2402, - "end": 2403, + "start": 1722, + "end": 1723, "loc": { "start": { - "line": 88, + "line": 60, "column": 13 }, "end": { - "line": 88, + "line": 60, "column": 14 } } @@ -11886,15 +10487,15 @@ "postfix": false, "binop": null }, - "start": 2404, - "end": 2405, + "start": 1724, + "end": 1725, "loc": { "start": { - "line": 88, + "line": 60, "column": 15 }, "end": { - "line": 88, + "line": 60, "column": 16 } } @@ -11902,15 +10503,15 @@ { "type": "CommentLine", "value": " TODO: Log Hapi Shutdown Error", - "start": 2414, - "end": 2446, + "start": 1734, + "end": 1766, "loc": { "start": { - "line": 89, + "line": 61, "column": 8 }, "end": { - "line": 89, + "line": 61, "column": 40 } } @@ -11927,15 +10528,15 @@ "postfix": false, "binop": null }, - "start": 2453, - "end": 2454, + "start": 1773, + "end": 1774, "loc": { "start": { - "line": 90, + "line": 62, "column": 6 }, "end": { - "line": 90, + "line": 62, "column": 7 } } @@ -11953,15 +10554,15 @@ "binop": null }, "value": "callback", - "start": 2461, - "end": 2469, + "start": 1781, + "end": 1789, "loc": { "start": { - "line": 91, + "line": 63, "column": 6 }, "end": { - "line": 91, + "line": 63, "column": 14 } } @@ -11978,15 +10579,15 @@ "postfix": false, "binop": null }, - "start": 2469, - "end": 2470, + "start": 1789, + "end": 1790, "loc": { "start": { - "line": 91, + "line": 63, "column": 14 }, "end": { - "line": 91, + "line": 63, "column": 15 } } @@ -12004,15 +10605,15 @@ "binop": null }, "value": "err", - "start": 2470, - "end": 2473, + "start": 1790, + "end": 1793, "loc": { "start": { - "line": 91, + "line": 63, "column": 15 }, "end": { - "line": 91, + "line": 63, "column": 18 } } @@ -12029,15 +10630,15 @@ "postfix": false, "binop": null }, - "start": 2473, - "end": 2474, + "start": 1793, + "end": 1794, "loc": { "start": { - "line": 91, + "line": 63, "column": 18 }, "end": { - "line": 91, + "line": 63, "column": 19 } } @@ -12055,15 +10656,15 @@ "binop": null, "updateContext": null }, - "start": 2474, - "end": 2475, + "start": 1794, + "end": 1795, "loc": { "start": { - "line": 91, + "line": 63, "column": 19 }, "end": { - "line": 91, + "line": 63, "column": 20 } } @@ -12080,15 +10681,15 @@ "postfix": false, "binop": null }, - "start": 2480, - "end": 2481, + "start": 1800, + "end": 1801, "loc": { "start": { - "line": 92, + "line": 64, "column": 4 }, "end": { - "line": 92, + "line": 64, "column": 5 } } @@ -12105,15 +10706,15 @@ "postfix": false, "binop": null }, - "start": 2481, - "end": 2482, + "start": 1801, + "end": 1802, "loc": { "start": { - "line": 92, + "line": 64, "column": 5 }, "end": { - "line": 92, + "line": 64, "column": 6 } } @@ -12131,15 +10732,15 @@ "binop": null, "updateContext": null }, - "start": 2482, - "end": 2483, + "start": 1802, + "end": 1803, "loc": { "start": { - "line": 92, + "line": 64, "column": 6 }, "end": { - "line": 92, + "line": 64, "column": 7 } } @@ -12156,15 +10757,15 @@ "postfix": false, "binop": null }, - "start": 2486, - "end": 2487, + "start": 1806, + "end": 1807, "loc": { "start": { - "line": 93, + "line": 65, "column": 2 }, "end": { - "line": 93, + "line": 65, "column": 3 } } @@ -12172,15 +10773,15 @@ { "type": "CommentBlock", "value": "*\n * Starts the server and registers any plugins\n * @return {Promise} Resolves once server has started\n ", - "start": 2491, - "end": 2605, + "start": 1811, + "end": 1925, "loc": { "start": { - "line": 95, + "line": 67, "column": 2 }, "end": { - "line": 98, + "line": 70, "column": 5 } } @@ -12198,15 +10799,15 @@ "binop": null }, "value": "async", - "start": 2608, - "end": 2613, + "start": 1928, + "end": 1933, "loc": { "start": { - "line": 99, + "line": 71, "column": 2 }, "end": { - "line": 99, + "line": 71, "column": 7 } } @@ -12224,15 +10825,15 @@ "binop": null }, "value": "run", - "start": 2614, - "end": 2617, + "start": 1934, + "end": 1937, "loc": { "start": { - "line": 99, + "line": 71, "column": 8 }, "end": { - "line": 99, + "line": 71, "column": 11 } } @@ -12249,15 +10850,15 @@ "postfix": false, "binop": null }, - "start": 2617, - "end": 2618, + "start": 1937, + "end": 1938, "loc": { "start": { - "line": 99, + "line": 71, "column": 11 }, "end": { - "line": 99, + "line": 71, "column": 12 } } @@ -12274,15 +10875,15 @@ "postfix": false, "binop": null }, - "start": 2618, - "end": 2619, + "start": 1938, + "end": 1939, "loc": { "start": { - "line": 99, + "line": 71, "column": 12 }, "end": { - "line": 99, + "line": 71, "column": 13 } } @@ -12299,15 +10900,15 @@ "postfix": false, "binop": null }, - "start": 2620, - "end": 2621, + "start": 1940, + "end": 1941, "loc": { "start": { - "line": 99, + "line": 71, "column": 14 }, "end": { - "line": 99, + "line": 71, "column": 15 } } @@ -12325,15 +10926,15 @@ "binop": null }, "value": "await", - "start": 2626, - "end": 2631, + "start": 1946, + "end": 1951, "loc": { "start": { - "line": 100, + "line": 72, "column": 4 }, "end": { - "line": 100, + "line": 72, "column": 9 } } @@ -12353,15 +10954,15 @@ "updateContext": null }, "value": "this", - "start": 2632, - "end": 2636, + "start": 1952, + "end": 1956, "loc": { "start": { - "line": 100, + "line": 72, "column": 10 }, "end": { - "line": 100, + "line": 72, "column": 14 } } @@ -12379,15 +10980,15 @@ "binop": null, "updateContext": null }, - "start": 2636, - "end": 2637, + "start": 1956, + "end": 1957, "loc": { "start": { - "line": 100, + "line": 72, "column": 14 }, "end": { - "line": 100, + "line": 72, "column": 15 } } @@ -12405,15 +11006,15 @@ "binop": null }, "value": "server", - "start": 2637, - "end": 2643, + "start": 1957, + "end": 1963, "loc": { "start": { - "line": 100, + "line": 72, "column": 15 }, "end": { - "line": 100, + "line": 72, "column": 21 } } @@ -12431,15 +11032,15 @@ "binop": null, "updateContext": null }, - "start": 2643, - "end": 2644, + "start": 1963, + "end": 1964, "loc": { "start": { - "line": 100, + "line": 72, "column": 21 }, "end": { - "line": 100, + "line": 72, "column": 22 } } @@ -12457,15 +11058,15 @@ "binop": null }, "value": "start", - "start": 2644, - "end": 2649, + "start": 1964, + "end": 1969, "loc": { "start": { - "line": 100, + "line": 72, "column": 22 }, "end": { - "line": 100, + "line": 72, "column": 27 } } @@ -12482,15 +11083,15 @@ "postfix": false, "binop": null }, - "start": 2649, - "end": 2650, + "start": 1969, + "end": 1970, "loc": { "start": { - "line": 100, + "line": 72, "column": 27 }, "end": { - "line": 100, + "line": 72, "column": 28 } } @@ -12507,15 +11108,15 @@ "postfix": false, "binop": null }, - "start": 2650, - "end": 2651, + "start": 1970, + "end": 1971, "loc": { "start": { - "line": 100, + "line": 72, "column": 28 }, "end": { - "line": 100, + "line": 72, "column": 29 } } @@ -12533,15 +11134,15 @@ "binop": null, "updateContext": null }, - "start": 2651, - "end": 2652, + "start": 1971, + "end": 1972, "loc": { "start": { - "line": 100, + "line": 72, "column": 29 }, "end": { - "line": 100, + "line": 72, "column": 30 } } @@ -12559,15 +11160,15 @@ "binop": null }, "value": "process", - "start": 2657, - "end": 2664, + "start": 1977, + "end": 1984, "loc": { "start": { - "line": 101, + "line": 73, "column": 4 }, "end": { - "line": 101, + "line": 73, "column": 11 } } @@ -12585,15 +11186,15 @@ "binop": null, "updateContext": null }, - "start": 2664, - "end": 2665, + "start": 1984, + "end": 1985, "loc": { "start": { - "line": 101, + "line": 73, "column": 11 }, "end": { - "line": 101, + "line": 73, "column": 12 } } @@ -12611,15 +11212,15 @@ "binop": null }, "value": "stdout", - "start": 2665, - "end": 2671, + "start": 1985, + "end": 1991, "loc": { "start": { - "line": 101, + "line": 73, "column": 12 }, "end": { - "line": 101, + "line": 73, "column": 18 } } @@ -12637,15 +11238,15 @@ "binop": null, "updateContext": null }, - "start": 2671, - "end": 2672, + "start": 1991, + "end": 1992, "loc": { "start": { - "line": 101, + "line": 73, "column": 18 }, "end": { - "line": 101, + "line": 73, "column": 19 } } @@ -12663,15 +11264,15 @@ "binop": null }, "value": "write", - "start": 2672, - "end": 2677, + "start": 1992, + "end": 1997, "loc": { "start": { - "line": 101, + "line": 73, "column": 19 }, "end": { - "line": 101, + "line": 73, "column": 24 } } @@ -12688,15 +11289,15 @@ "postfix": false, "binop": null }, - "start": 2677, - "end": 2678, + "start": 1997, + "end": 1998, "loc": { "start": { - "line": 101, + "line": 73, "column": 24 }, "end": { - "line": 101, + "line": 73, "column": 25 } } @@ -12715,15 +11316,15 @@ "updateContext": null }, "value": "\n\n", - "start": 2678, - "end": 2684, + "start": 1998, + "end": 2004, "loc": { "start": { - "line": 101, + "line": 73, "column": 25 }, "end": { - "line": 101, + "line": 73, "column": 31 } } @@ -12742,15 +11343,15 @@ "updateContext": null }, "value": "+", - "start": 2685, - "end": 2686, + "start": 2005, + "end": 2006, "loc": { "start": { - "line": 101, + "line": 73, "column": 32 }, "end": { - "line": 101, + "line": 73, "column": 33 } } @@ -12770,15 +11371,15 @@ "updateContext": null }, "value": "this", - "start": 2687, - "end": 2691, + "start": 2007, + "end": 2011, "loc": { "start": { - "line": 101, + "line": 73, "column": 34 }, "end": { - "line": 101, + "line": 73, "column": 38 } } @@ -12796,15 +11397,15 @@ "binop": null, "updateContext": null }, - "start": 2691, - "end": 2692, + "start": 2011, + "end": 2012, "loc": { "start": { - "line": 101, + "line": 73, "column": 38 }, "end": { - "line": 101, + "line": 73, "column": 39 } } @@ -12822,15 +11423,15 @@ "binop": null }, "value": "name", - "start": 2692, - "end": 2696, + "start": 2012, + "end": 2016, "loc": { "start": { - "line": 101, + "line": 73, "column": 39 }, "end": { - "line": 101, + "line": 73, "column": 43 } } @@ -12849,15 +11450,15 @@ "updateContext": null }, "value": "+", - "start": 2697, - "end": 2698, + "start": 2017, + "end": 2018, "loc": { "start": { - "line": 101, + "line": 73, "column": 44 }, "end": { - "line": 101, + "line": 73, "column": 45 } } @@ -12876,15 +11477,15 @@ "updateContext": null }, "value": " started on ", - "start": 2699, - "end": 2713, + "start": 2019, + "end": 2033, "loc": { "start": { - "line": 101, + "line": 73, "column": 46 }, "end": { - "line": 101, + "line": 73, "column": 60 } } @@ -12903,15 +11504,15 @@ "updateContext": null }, "value": "+", - "start": 2714, - "end": 2715, + "start": 2034, + "end": 2035, "loc": { "start": { - "line": 101, + "line": 73, "column": 61 }, "end": { - "line": 101, + "line": 73, "column": 62 } } @@ -12931,15 +11532,15 @@ "updateContext": null }, "value": "this", - "start": 2716, - "end": 2720, + "start": 2036, + "end": 2040, "loc": { "start": { - "line": 101, + "line": 73, "column": 63 }, "end": { - "line": 101, + "line": 73, "column": 67 } } @@ -12957,15 +11558,15 @@ "binop": null, "updateContext": null }, - "start": 2720, - "end": 2721, + "start": 2040, + "end": 2041, "loc": { "start": { - "line": 101, + "line": 73, "column": 67 }, "end": { - "line": 101, + "line": 73, "column": 68 } } @@ -12983,15 +11584,15 @@ "binop": null }, "value": "server", - "start": 2721, - "end": 2727, + "start": 2041, + "end": 2047, "loc": { "start": { - "line": 101, + "line": 73, "column": 68 }, "end": { - "line": 101, + "line": 73, "column": 74 } } @@ -13009,15 +11610,15 @@ "binop": null, "updateContext": null }, - "start": 2727, - "end": 2728, + "start": 2047, + "end": 2048, "loc": { "start": { - "line": 101, + "line": 73, "column": 74 }, "end": { - "line": 101, + "line": 73, "column": 75 } } @@ -13035,15 +11636,15 @@ "binop": null }, "value": "info", - "start": 2728, - "end": 2732, + "start": 2048, + "end": 2052, "loc": { "start": { - "line": 101, + "line": 73, "column": 75 }, "end": { - "line": 101, + "line": 73, "column": 79 } } @@ -13061,15 +11662,15 @@ "binop": null, "updateContext": null }, - "start": 2732, - "end": 2733, + "start": 2052, + "end": 2053, "loc": { "start": { - "line": 101, + "line": 73, "column": 79 }, "end": { - "line": 101, + "line": 73, "column": 80 } } @@ -13087,15 +11688,15 @@ "binop": null }, "value": "port", - "start": 2733, - "end": 2737, + "start": 2053, + "end": 2057, "loc": { "start": { - "line": 101, + "line": 73, "column": 80 }, "end": { - "line": 101, + "line": 73, "column": 84 } } @@ -13114,15 +11715,15 @@ "updateContext": null }, "value": "+", - "start": 2738, - "end": 2739, + "start": 2058, + "end": 2059, "loc": { "start": { - "line": 101, + "line": 73, "column": 85 }, "end": { - "line": 101, + "line": 73, "column": 86 } } @@ -13141,15 +11742,15 @@ "updateContext": null }, "value": "\n\n", - "start": 2740, - "end": 2746, + "start": 2060, + "end": 2066, "loc": { "start": { - "line": 101, + "line": 73, "column": 87 }, "end": { - "line": 101, + "line": 73, "column": 93 } } @@ -13166,15 +11767,15 @@ "postfix": false, "binop": null }, - "start": 2746, - "end": 2747, + "start": 2066, + "end": 2067, "loc": { "start": { - "line": 101, + "line": 73, "column": 93 }, "end": { - "line": 101, + "line": 73, "column": 94 } } @@ -13192,15 +11793,15 @@ "binop": null, "updateContext": null }, - "start": 2747, - "end": 2748, + "start": 2067, + "end": 2068, "loc": { "start": { - "line": 101, + "line": 73, "column": 94 }, "end": { - "line": 101, + "line": 73, "column": 95 } } @@ -13208,15 +11809,15 @@ { "type": "CommentLine", "value": " Serve Docs with OpenAPI and Swagger UI", - "start": 2754, - "end": 2795, + "start": 2074, + "end": 2115, "loc": { "start": { - "line": 103, + "line": 75, "column": 4 }, "end": { - "line": 103, + "line": 75, "column": 45 } } @@ -13224,15 +11825,15 @@ { "type": "CommentLine", "value": " visit at http://localhost:3333/docs/swagger/index.html", - "start": 2800, - "end": 2857, + "start": 2120, + "end": 2177, "loc": { "start": { - "line": 104, + "line": 76, "column": 4 }, "end": { - "line": 104, + "line": 76, "column": 61 } } @@ -13250,15 +11851,15 @@ "binop": null }, "value": "await", - "start": 2862, - "end": 2867, + "start": 2182, + "end": 2187, "loc": { "start": { - "line": 105, + "line": 77, "column": 4 }, "end": { - "line": 105, + "line": 77, "column": 9 } } @@ -13278,15 +11879,15 @@ "updateContext": null }, "value": "this", - "start": 2868, - "end": 2872, + "start": 2188, + "end": 2192, "loc": { "start": { - "line": 105, + "line": 77, "column": 10 }, "end": { - "line": 105, + "line": 77, "column": 14 } } @@ -13304,15 +11905,15 @@ "binop": null, "updateContext": null }, - "start": 2872, - "end": 2873, + "start": 2192, + "end": 2193, "loc": { "start": { - "line": 105, + "line": 77, "column": 14 }, "end": { - "line": 105, + "line": 77, "column": 15 } } @@ -13330,15 +11931,15 @@ "binop": null }, "value": "server", - "start": 2873, - "end": 2879, + "start": 2193, + "end": 2199, "loc": { "start": { - "line": 105, + "line": 77, "column": 15 }, "end": { - "line": 105, + "line": 77, "column": 21 } } @@ -13356,15 +11957,15 @@ "binop": null, "updateContext": null }, - "start": 2879, - "end": 2880, + "start": 2199, + "end": 2200, "loc": { "start": { - "line": 105, + "line": 77, "column": 21 }, "end": { - "line": 105, + "line": 77, "column": 22 } } @@ -13382,15 +11983,15 @@ "binop": null }, "value": "register", - "start": 2880, - "end": 2888, + "start": 2200, + "end": 2208, "loc": { "start": { - "line": 105, + "line": 77, "column": 22 }, "end": { - "line": 105, + "line": 77, "column": 30 } } @@ -13407,15 +12008,15 @@ "postfix": false, "binop": null }, - "start": 2888, - "end": 2889, + "start": 2208, + "end": 2209, "loc": { "start": { - "line": 105, + "line": 77, "column": 30 }, "end": { - "line": 105, + "line": 77, "column": 31 } } @@ -13432,15 +12033,15 @@ "postfix": false, "binop": null }, - "start": 2889, - "end": 2890, + "start": 2209, + "end": 2210, "loc": { "start": { - "line": 105, + "line": 77, "column": 31 }, "end": { - "line": 105, + "line": 77, "column": 32 } } @@ -13458,15 +12059,15 @@ "binop": null }, "value": "plugin", - "start": 2897, - "end": 2903, + "start": 2217, + "end": 2223, "loc": { "start": { - "line": 106, + "line": 78, "column": 6 }, "end": { - "line": 106, + "line": 78, "column": 12 } } @@ -13484,15 +12085,15 @@ "binop": null, "updateContext": null }, - "start": 2903, - "end": 2904, + "start": 2223, + "end": 2224, "loc": { "start": { - "line": 106, + "line": 78, "column": 12 }, "end": { - "line": 106, + "line": 78, "column": 13 } } @@ -13510,15 +12111,15 @@ "binop": null }, "value": "Inert", - "start": 2905, - "end": 2910, + "start": 2225, + "end": 2230, "loc": { "start": { - "line": 106, + "line": 78, "column": 14 }, "end": { - "line": 106, + "line": 78, "column": 19 } } @@ -13535,15 +12136,15 @@ "postfix": false, "binop": null }, - "start": 2915, - "end": 2916, + "start": 2235, + "end": 2236, "loc": { "start": { - "line": 107, + "line": 79, "column": 4 }, "end": { - "line": 107, + "line": 79, "column": 5 } } @@ -13560,15 +12161,15 @@ "postfix": false, "binop": null }, - "start": 2916, - "end": 2917, + "start": 2236, + "end": 2237, "loc": { "start": { - "line": 107, + "line": 79, "column": 5 }, "end": { - "line": 107, + "line": 79, "column": 6 } } @@ -13586,15 +12187,15 @@ "binop": null, "updateContext": null }, - "start": 2917, - "end": 2918, + "start": 2237, + "end": 2238, "loc": { "start": { - "line": 107, + "line": 79, "column": 6 }, "end": { - "line": 107, + "line": 79, "column": 7 } } @@ -13602,15 +12203,15 @@ { "type": "CommentLine", "value": " Create `logs` directory (so we only see errors and console logs in process out)", - "start": 2924, - "end": 3006, + "start": 2244, + "end": 2326, "loc": { "start": { - "line": 109, + "line": 81, "column": 4 }, "end": { - "line": 109, + "line": 81, "column": 86 } } @@ -13630,15 +12231,15 @@ "updateContext": null }, "value": "if", - "start": 3011, - "end": 3013, + "start": 2331, + "end": 2333, "loc": { "start": { - "line": 110, + "line": 82, "column": 4 }, "end": { - "line": 110, + "line": 82, "column": 6 } } @@ -13655,15 +12256,15 @@ "postfix": false, "binop": null }, - "start": 3014, - "end": 3015, + "start": 2334, + "end": 2335, "loc": { "start": { - "line": 110, + "line": 82, "column": 7 }, "end": { - "line": 110, + "line": 82, "column": 8 } } @@ -13682,15 +12283,15 @@ "updateContext": null }, "value": "!", - "start": 3015, - "end": 3016, + "start": 2335, + "end": 2336, "loc": { "start": { - "line": 110, + "line": 82, "column": 8 }, "end": { - "line": 110, + "line": 82, "column": 9 } } @@ -13708,15 +12309,15 @@ "binop": null }, "value": "fs", - "start": 3016, - "end": 3018, + "start": 2336, + "end": 2338, "loc": { "start": { - "line": 110, + "line": 82, "column": 9 }, "end": { - "line": 110, + "line": 82, "column": 11 } } @@ -13734,15 +12335,15 @@ "binop": null, "updateContext": null }, - "start": 3018, - "end": 3019, + "start": 2338, + "end": 2339, "loc": { "start": { - "line": 110, + "line": 82, "column": 11 }, "end": { - "line": 110, + "line": 82, "column": 12 } } @@ -13760,15 +12361,15 @@ "binop": null }, "value": "existsSync", - "start": 3019, - "end": 3029, + "start": 2339, + "end": 2349, "loc": { "start": { - "line": 110, + "line": 82, "column": 12 }, "end": { - "line": 110, + "line": 82, "column": 22 } } @@ -13785,15 +12386,15 @@ "postfix": false, "binop": null }, - "start": 3029, - "end": 3030, + "start": 2349, + "end": 2350, "loc": { "start": { - "line": 110, + "line": 82, "column": 22 }, "end": { - "line": 110, + "line": 82, "column": 23 } } @@ -13813,15 +12414,15 @@ "updateContext": null }, "value": "this", - "start": 3030, - "end": 3034, + "start": 2350, + "end": 2354, "loc": { "start": { - "line": 110, + "line": 82, "column": 23 }, "end": { - "line": 110, + "line": 82, "column": 27 } } @@ -13839,15 +12440,15 @@ "binop": null, "updateContext": null }, - "start": 3034, - "end": 3035, + "start": 2354, + "end": 2355, "loc": { "start": { - "line": 110, + "line": 82, "column": 27 }, "end": { - "line": 110, + "line": 82, "column": 28 } } @@ -13865,15 +12466,15 @@ "binop": null }, "value": "logDir", - "start": 3035, - "end": 3041, + "start": 2355, + "end": 2361, "loc": { "start": { - "line": 110, + "line": 82, "column": 28 }, "end": { - "line": 110, + "line": 82, "column": 34 } } @@ -13890,15 +12491,15 @@ "postfix": false, "binop": null }, - "start": 3041, - "end": 3042, + "start": 2361, + "end": 2362, "loc": { "start": { - "line": 110, + "line": 82, "column": 34 }, "end": { - "line": 110, + "line": 82, "column": 35 } } @@ -13915,15 +12516,15 @@ "postfix": false, "binop": null }, - "start": 3042, - "end": 3043, + "start": 2362, + "end": 2363, "loc": { "start": { - "line": 110, + "line": 82, "column": 35 }, "end": { - "line": 110, + "line": 82, "column": 36 } } @@ -13940,15 +12541,15 @@ "postfix": false, "binop": null }, - "start": 3044, - "end": 3045, + "start": 2364, + "end": 2365, "loc": { "start": { - "line": 110, + "line": 82, "column": 37 }, "end": { - "line": 110, + "line": 82, "column": 38 } } @@ -13966,15 +12567,15 @@ "binop": null }, "value": "fs", - "start": 3052, - "end": 3054, + "start": 2372, + "end": 2374, "loc": { "start": { - "line": 111, + "line": 83, "column": 6 }, "end": { - "line": 111, + "line": 83, "column": 8 } } @@ -13992,15 +12593,15 @@ "binop": null, "updateContext": null }, - "start": 3054, - "end": 3055, + "start": 2374, + "end": 2375, "loc": { "start": { - "line": 111, + "line": 83, "column": 8 }, "end": { - "line": 111, + "line": 83, "column": 9 } } @@ -14018,15 +12619,15 @@ "binop": null }, "value": "mkdirSync", - "start": 3055, - "end": 3064, + "start": 2375, + "end": 2384, "loc": { "start": { - "line": 111, + "line": 83, "column": 9 }, "end": { - "line": 111, + "line": 83, "column": 18 } } @@ -14043,15 +12644,15 @@ "postfix": false, "binop": null }, - "start": 3064, - "end": 3065, + "start": 2384, + "end": 2385, "loc": { "start": { - "line": 111, + "line": 83, "column": 18 }, "end": { - "line": 111, + "line": 83, "column": 19 } } @@ -14071,15 +12672,15 @@ "updateContext": null }, "value": "this", - "start": 3065, - "end": 3069, + "start": 2385, + "end": 2389, "loc": { "start": { - "line": 111, + "line": 83, "column": 19 }, "end": { - "line": 111, + "line": 83, "column": 23 } } @@ -14097,15 +12698,15 @@ "binop": null, "updateContext": null }, - "start": 3069, - "end": 3070, + "start": 2389, + "end": 2390, "loc": { "start": { - "line": 111, + "line": 83, "column": 23 }, "end": { - "line": 111, + "line": 83, "column": 24 } } @@ -14123,15 +12724,15 @@ "binop": null }, "value": "logDir", - "start": 3070, - "end": 3076, + "start": 2390, + "end": 2396, "loc": { "start": { - "line": 111, + "line": 83, "column": 24 }, "end": { - "line": 111, + "line": 83, "column": 30 } } @@ -14148,15 +12749,15 @@ "postfix": false, "binop": null }, - "start": 3076, - "end": 3077, + "start": 2396, + "end": 2397, "loc": { "start": { - "line": 111, + "line": 83, "column": 30 }, "end": { - "line": 111, + "line": 83, "column": 31 } } @@ -14174,15 +12775,15 @@ "binop": null, "updateContext": null }, - "start": 3077, - "end": 3078, + "start": 2397, + "end": 2398, "loc": { "start": { - "line": 111, + "line": 83, "column": 31 }, "end": { - "line": 111, + "line": 83, "column": 32 } } @@ -14199,15 +12800,15 @@ "postfix": false, "binop": null }, - "start": 3083, - "end": 3084, + "start": 2403, + "end": 2404, "loc": { "start": { - "line": 112, + "line": 84, "column": 4 }, "end": { - "line": 112, + "line": 84, "column": 5 } } @@ -14225,15 +12826,15 @@ "binop": null }, "value": "await", - "start": 3090, - "end": 3095, + "start": 2410, + "end": 2415, "loc": { "start": { - "line": 114, + "line": 86, "column": 4 }, "end": { - "line": 114, + "line": 86, "column": 9 } } @@ -14253,15 +12854,15 @@ "updateContext": null }, "value": "this", - "start": 3096, - "end": 3100, + "start": 2416, + "end": 2420, "loc": { "start": { - "line": 114, + "line": 86, "column": 10 }, "end": { - "line": 114, + "line": 86, "column": 14 } } @@ -14279,15 +12880,15 @@ "binop": null, "updateContext": null }, - "start": 3100, - "end": 3101, + "start": 2420, + "end": 2421, "loc": { "start": { - "line": 114, + "line": 86, "column": 14 }, "end": { - "line": 114, + "line": 86, "column": 15 } } @@ -14305,15 +12906,15 @@ "binop": null }, "value": "server", - "start": 3101, - "end": 3107, + "start": 2421, + "end": 2427, "loc": { "start": { - "line": 114, + "line": 86, "column": 15 }, "end": { - "line": 114, + "line": 86, "column": 21 } } @@ -14331,15 +12932,15 @@ "binop": null, "updateContext": null }, - "start": 3107, - "end": 3108, + "start": 2427, + "end": 2428, "loc": { "start": { - "line": 114, + "line": 86, "column": 21 }, "end": { - "line": 114, + "line": 86, "column": 22 } } @@ -14357,15 +12958,15 @@ "binop": null }, "value": "register", - "start": 3108, - "end": 3116, + "start": 2428, + "end": 2436, "loc": { "start": { - "line": 114, + "line": 86, "column": 22 }, "end": { - "line": 114, + "line": 86, "column": 30 } } @@ -14382,15 +12983,15 @@ "postfix": false, "binop": null }, - "start": 3116, - "end": 3117, + "start": 2436, + "end": 2437, "loc": { "start": { - "line": 114, + "line": 86, "column": 30 }, "end": { - "line": 114, + "line": 86, "column": 31 } } @@ -14407,15 +13008,15 @@ "postfix": false, "binop": null }, - "start": 3117, - "end": 3118, + "start": 2437, + "end": 2438, "loc": { "start": { - "line": 114, + "line": 86, "column": 31 }, "end": { - "line": 114, + "line": 86, "column": 32 } } @@ -14433,15 +13034,15 @@ "binop": null }, "value": "plugin", - "start": 3125, - "end": 3131, + "start": 2445, + "end": 2451, "loc": { "start": { - "line": 115, + "line": 87, "column": 6 }, "end": { - "line": 115, + "line": 87, "column": 12 } } @@ -14459,15 +13060,15 @@ "binop": null, "updateContext": null }, - "start": 3131, - "end": 3132, + "start": 2451, + "end": 2452, "loc": { "start": { - "line": 115, + "line": 87, "column": 12 }, "end": { - "line": 115, + "line": 87, "column": 13 } } @@ -14485,15 +13086,15 @@ "binop": null }, "value": "Pino", - "start": 3133, - "end": 3137, + "start": 2453, + "end": 2457, "loc": { "start": { - "line": 115, + "line": 87, "column": 14 }, "end": { - "line": 115, + "line": 87, "column": 18 } } @@ -14511,15 +13112,15 @@ "binop": null, "updateContext": null }, - "start": 3137, - "end": 3138, + "start": 2457, + "end": 2458, "loc": { "start": { - "line": 115, + "line": 87, "column": 18 }, "end": { - "line": 115, + "line": 87, "column": 19 } } @@ -14537,15 +13138,15 @@ "binop": null }, "value": "options", - "start": 3145, - "end": 3152, + "start": 2465, + "end": 2472, "loc": { "start": { - "line": 116, + "line": 88, "column": 6 }, "end": { - "line": 116, + "line": 88, "column": 13 } } @@ -14563,15 +13164,15 @@ "binop": null, "updateContext": null }, - "start": 3152, - "end": 3153, + "start": 2472, + "end": 2473, "loc": { "start": { - "line": 116, + "line": 88, "column": 13 }, "end": { - "line": 116, + "line": 88, "column": 14 } } @@ -14588,15 +13189,15 @@ "postfix": false, "binop": null }, - "start": 3154, - "end": 3155, + "start": 2474, + "end": 2475, "loc": { "start": { - "line": 116, + "line": 88, "column": 15 }, "end": { - "line": 116, + "line": 88, "column": 16 } } @@ -14614,15 +13215,15 @@ "binop": null }, "value": "prettyPrint", - "start": 3164, - "end": 3175, + "start": 2484, + "end": 2495, "loc": { "start": { - "line": 117, + "line": 89, "column": 8 }, "end": { - "line": 117, + "line": 89, "column": 19 } } @@ -14640,15 +13241,15 @@ "binop": null, "updateContext": null }, - "start": 3175, - "end": 3176, + "start": 2495, + "end": 2496, "loc": { "start": { - "line": 117, + "line": 89, "column": 19 }, "end": { - "line": 117, + "line": 89, "column": 20 } } @@ -14668,15 +13269,15 @@ "updateContext": null }, "value": "false", - "start": 3177, - "end": 3182, + "start": 2497, + "end": 2502, "loc": { "start": { - "line": 117, + "line": 89, "column": 21 }, "end": { - "line": 117, + "line": 89, "column": 26 } } @@ -14694,15 +13295,15 @@ "binop": null, "updateContext": null }, - "start": 3182, - "end": 3183, + "start": 2502, + "end": 2503, "loc": { "start": { - "line": 117, + "line": 89, "column": 26 }, "end": { - "line": 117, + "line": 89, "column": 27 } } @@ -14720,15 +13321,15 @@ "binop": null }, "value": "logEvents", - "start": 3192, - "end": 3201, + "start": 2512, + "end": 2521, "loc": { "start": { - "line": 118, + "line": 90, "column": 8 }, "end": { - "line": 118, + "line": 90, "column": 17 } } @@ -14746,15 +13347,15 @@ "binop": null, "updateContext": null }, - "start": 3201, - "end": 3202, + "start": 2521, + "end": 2522, "loc": { "start": { - "line": 118, + "line": 90, "column": 17 }, "end": { - "line": 118, + "line": 90, "column": 18 } } @@ -14772,15 +13373,15 @@ "binop": null, "updateContext": null }, - "start": 3203, - "end": 3204, + "start": 2523, + "end": 2524, "loc": { "start": { - "line": 118, + "line": 90, "column": 19 }, "end": { - "line": 118, + "line": 90, "column": 20 } } @@ -14799,15 +13400,15 @@ "updateContext": null }, "value": "onRequest", - "start": 3204, - "end": 3215, + "start": 2524, + "end": 2535, "loc": { "start": { - "line": 118, + "line": 90, "column": 20 }, "end": { - "line": 118, + "line": 90, "column": 31 } } @@ -14825,15 +13426,15 @@ "binop": null, "updateContext": null }, - "start": 3215, - "end": 3216, + "start": 2535, + "end": 2536, "loc": { "start": { - "line": 118, + "line": 90, "column": 31 }, "end": { - "line": 118, + "line": 90, "column": 32 } } @@ -14852,15 +13453,15 @@ "updateContext": null }, "value": "response", - "start": 3217, - "end": 3227, + "start": 2537, + "end": 2547, "loc": { "start": { - "line": 118, + "line": 90, "column": 33 }, "end": { - "line": 118, + "line": 90, "column": 43 } } @@ -14878,15 +13479,15 @@ "binop": null, "updateContext": null }, - "start": 3227, - "end": 3228, + "start": 2547, + "end": 2548, "loc": { "start": { - "line": 118, + "line": 90, "column": 43 }, "end": { - "line": 118, + "line": 90, "column": 44 } } @@ -14905,15 +13506,15 @@ "updateContext": null }, "value": "request-error", - "start": 3229, - "end": 3244, + "start": 2549, + "end": 2564, "loc": { "start": { - "line": 118, + "line": 90, "column": 45 }, "end": { - "line": 118, + "line": 90, "column": 60 } } @@ -14931,15 +13532,15 @@ "binop": null, "updateContext": null }, - "start": 3244, - "end": 3245, + "start": 2564, + "end": 2565, "loc": { "start": { - "line": 118, + "line": 90, "column": 60 }, "end": { - "line": 118, + "line": 90, "column": 61 } } @@ -14957,15 +13558,15 @@ "binop": null, "updateContext": null }, - "start": 3245, - "end": 3246, + "start": 2565, + "end": 2566, "loc": { "start": { - "line": 118, + "line": 90, "column": 61 }, "end": { - "line": 118, + "line": 90, "column": 62 } } @@ -14973,15 +13574,15 @@ { "type": "CommentLine", "value": " Creates a log of all the requests made and info as well as response status error/success", - "start": 3255, - "end": 3346, + "start": 2575, + "end": 2666, "loc": { "start": { - "line": 119, + "line": 91, "column": 8 }, "end": { - "line": 119, + "line": 91, "column": 99 } } @@ -14999,15 +13600,15 @@ "binop": null }, "value": "stream", - "start": 3355, - "end": 3361, + "start": 2675, + "end": 2681, "loc": { "start": { - "line": 120, + "line": 92, "column": 8 }, "end": { - "line": 120, + "line": 92, "column": 14 } } @@ -15025,15 +13626,15 @@ "binop": null, "updateContext": null }, - "start": 3361, - "end": 3362, + "start": 2681, + "end": 2682, "loc": { "start": { - "line": 120, + "line": 92, "column": 14 }, "end": { - "line": 120, + "line": 92, "column": 15 } } @@ -15051,15 +13652,15 @@ "binop": null }, "value": "pino", - "start": 3363, - "end": 3367, + "start": 2683, + "end": 2687, "loc": { "start": { - "line": 120, + "line": 92, "column": 16 }, "end": { - "line": 120, + "line": 92, "column": 20 } } @@ -15077,15 +13678,15 @@ "binop": null, "updateContext": null }, - "start": 3367, - "end": 3368, + "start": 2687, + "end": 2688, "loc": { "start": { - "line": 120, + "line": 92, "column": 20 }, "end": { - "line": 120, + "line": 92, "column": 21 } } @@ -15103,15 +13704,15 @@ "binop": null }, "value": "destination", - "start": 3368, - "end": 3379, + "start": 2688, + "end": 2699, "loc": { "start": { - "line": 120, + "line": 92, "column": 21 }, "end": { - "line": 120, + "line": 92, "column": 32 } } @@ -15128,15 +13729,15 @@ "postfix": false, "binop": null }, - "start": 3379, - "end": 3380, + "start": 2699, + "end": 2700, "loc": { "start": { - "line": 120, + "line": 92, "column": 32 }, "end": { - "line": 120, + "line": 92, "column": 33 } } @@ -15153,16 +13754,16 @@ "postfix": false, "binop": null }, - "value": "path", - "start": 3380, - "end": 3384, + "value": "Path", + "start": 2700, + "end": 2704, "loc": { "start": { - "line": 120, + "line": 92, "column": 33 }, "end": { - "line": 120, + "line": 92, "column": 37 } } @@ -15180,15 +13781,15 @@ "binop": null, "updateContext": null }, - "start": 3384, - "end": 3385, + "start": 2704, + "end": 2705, "loc": { "start": { - "line": 120, + "line": 92, "column": 37 }, "end": { - "line": 120, + "line": 92, "column": 38 } } @@ -15206,15 +13807,15 @@ "binop": null }, "value": "resolve", - "start": 3385, - "end": 3392, + "start": 2705, + "end": 2712, "loc": { "start": { - "line": 120, + "line": 92, "column": 38 }, "end": { - "line": 120, + "line": 92, "column": 45 } } @@ -15231,15 +13832,15 @@ "postfix": false, "binop": null }, - "start": 3392, - "end": 3393, + "start": 2712, + "end": 2713, "loc": { "start": { - "line": 120, + "line": 92, "column": 45 }, "end": { - "line": 120, + "line": 92, "column": 46 } } @@ -15259,15 +13860,15 @@ "updateContext": null }, "value": "this", - "start": 3393, - "end": 3397, + "start": 2713, + "end": 2717, "loc": { "start": { - "line": 120, + "line": 92, "column": 46 }, "end": { - "line": 120, + "line": 92, "column": 50 } } @@ -15285,15 +13886,15 @@ "binop": null, "updateContext": null }, - "start": 3397, - "end": 3398, + "start": 2717, + "end": 2718, "loc": { "start": { - "line": 120, + "line": 92, "column": 50 }, "end": { - "line": 120, + "line": 92, "column": 51 } } @@ -15311,15 +13912,15 @@ "binop": null }, "value": "logDir", - "start": 3398, - "end": 3404, + "start": 2718, + "end": 2724, "loc": { "start": { - "line": 120, + "line": 92, "column": 51 }, "end": { - "line": 120, + "line": 92, "column": 57 } } @@ -15337,15 +13938,15 @@ "binop": null, "updateContext": null }, - "start": 3404, - "end": 3405, + "start": 2724, + "end": 2725, "loc": { "start": { - "line": 120, + "line": 92, "column": 57 }, "end": { - "line": 120, + "line": 92, "column": 58 } } @@ -15364,15 +13965,15 @@ "updateContext": null }, "value": "pino.log", - "start": 3406, - "end": 3416, + "start": 2726, + "end": 2736, "loc": { "start": { - "line": 120, + "line": 92, "column": 59 }, "end": { - "line": 120, + "line": 92, "column": 69 } } @@ -15389,15 +13990,15 @@ "postfix": false, "binop": null }, - "start": 3416, - "end": 3417, + "start": 2736, + "end": 2737, "loc": { "start": { - "line": 120, + "line": 92, "column": 69 }, "end": { - "line": 120, + "line": 92, "column": 70 } } @@ -15414,15 +14015,15 @@ "postfix": false, "binop": null }, - "start": 3417, - "end": 3418, + "start": 2737, + "end": 2738, "loc": { "start": { - "line": 120, + "line": 92, "column": 70 }, "end": { - "line": 120, + "line": 92, "column": 71 } } @@ -15439,15 +14040,15 @@ "postfix": false, "binop": null }, - "start": 3425, - "end": 3426, + "start": 2745, + "end": 2746, "loc": { "start": { - "line": 121, + "line": 93, "column": 6 }, "end": { - "line": 121, + "line": 93, "column": 7 } } @@ -15464,15 +14065,15 @@ "postfix": false, "binop": null }, - "start": 3431, - "end": 3432, + "start": 2751, + "end": 2752, "loc": { "start": { - "line": 122, + "line": 94, "column": 4 }, "end": { - "line": 122, + "line": 94, "column": 5 } } @@ -15489,15 +14090,15 @@ "postfix": false, "binop": null }, - "start": 3432, - "end": 3433, + "start": 2752, + "end": 2753, "loc": { "start": { - "line": 122, + "line": 94, "column": 5 }, "end": { - "line": 122, + "line": 94, "column": 6 } } @@ -15515,15 +14116,15 @@ "binop": null, "updateContext": null }, - "start": 3433, - "end": 3434, + "start": 2753, + "end": 2754, "loc": { "start": { - "line": 122, + "line": 94, "column": 6 }, "end": { - "line": 122, + "line": 94, "column": 7 } } @@ -15531,15 +14132,15 @@ { "type": "CommentLine", "value": " TODO: Separate stream for errors?", - "start": 3440, - "end": 3476, + "start": 2760, + "end": 2796, "loc": { "start": { - "line": 124, + "line": 96, "column": 4 }, "end": { - "line": 124, + "line": 96, "column": 40 } } @@ -15556,15 +14157,15 @@ "postfix": false, "binop": null }, - "start": 3479, - "end": 3480, + "start": 2799, + "end": 2800, "loc": { "start": { - "line": 125, + "line": 97, "column": 2 }, "end": { - "line": 125, + "line": 97, "column": 3 } } @@ -15572,15 +14173,15 @@ { "type": "CommentBlock", "value": "*\n * Logs a message through hapi-pino\n * @param {string[]} tags for pino log record\n * @param {string} data for pino log record\n * @return {undefined}\n ", - "start": 3484, - "end": 3652, + "start": 2804, + "end": 2972, "loc": { "start": { - "line": 127, + "line": 99, "column": 2 }, "end": { - "line": 132, + "line": 104, "column": 5 } } @@ -15598,15 +14199,15 @@ "binop": null }, "value": "log", - "start": 3655, - "end": 3658, + "start": 2975, + "end": 2978, "loc": { "start": { - "line": 133, + "line": 105, "column": 2 }, "end": { - "line": 133, + "line": 105, "column": 5 } } @@ -15623,15 +14224,15 @@ "postfix": false, "binop": null }, - "start": 3658, - "end": 3659, + "start": 2978, + "end": 2979, "loc": { "start": { - "line": 133, + "line": 105, "column": 5 }, "end": { - "line": 133, + "line": 105, "column": 6 } } @@ -15648,15 +14249,15 @@ "postfix": false, "binop": null }, - "start": 3659, - "end": 3660, + "start": 2979, + "end": 2980, "loc": { "start": { - "line": 133, + "line": 105, "column": 6 }, "end": { - "line": 133, + "line": 105, "column": 7 } } @@ -15674,15 +14275,15 @@ "binop": null }, "value": "tags", - "start": 3661, - "end": 3665, + "start": 2981, + "end": 2985, "loc": { "start": { - "line": 133, + "line": 105, "column": 8 }, "end": { - "line": 133, + "line": 105, "column": 12 } } @@ -15700,15 +14301,15 @@ "binop": null, "updateContext": null }, - "start": 3665, - "end": 3666, + "start": 2985, + "end": 2986, "loc": { "start": { - "line": 133, + "line": 105, "column": 12 }, "end": { - "line": 133, + "line": 105, "column": 13 } } @@ -15726,15 +14327,15 @@ "binop": null }, "value": "data", - "start": 3667, - "end": 3671, + "start": 2987, + "end": 2991, "loc": { "start": { - "line": 133, + "line": 105, "column": 14 }, "end": { - "line": 133, + "line": 105, "column": 18 } } @@ -15751,15 +14352,15 @@ "postfix": false, "binop": null }, - "start": 3672, - "end": 3673, + "start": 2992, + "end": 2993, "loc": { "start": { - "line": 133, + "line": 105, "column": 19 }, "end": { - "line": 133, + "line": 105, "column": 20 } } @@ -15776,15 +14377,15 @@ "postfix": false, "binop": null }, - "start": 3673, - "end": 3674, + "start": 2993, + "end": 2994, "loc": { "start": { - "line": 133, + "line": 105, "column": 20 }, "end": { - "line": 133, + "line": 105, "column": 21 } } @@ -15801,15 +14402,15 @@ "postfix": false, "binop": null }, - "start": 3675, - "end": 3676, + "start": 2995, + "end": 2996, "loc": { "start": { - "line": 133, + "line": 105, "column": 22 }, "end": { - "line": 133, + "line": 105, "column": 23 } } @@ -15829,15 +14430,15 @@ "updateContext": null }, "value": "this", - "start": 3681, - "end": 3685, + "start": 3001, + "end": 3005, "loc": { "start": { - "line": 134, + "line": 106, "column": 4 }, "end": { - "line": 134, + "line": 106, "column": 8 } } @@ -15855,15 +14456,15 @@ "binop": null, "updateContext": null }, - "start": 3685, - "end": 3686, + "start": 3005, + "end": 3006, "loc": { "start": { - "line": 134, + "line": 106, "column": 8 }, "end": { - "line": 134, + "line": 106, "column": 9 } } @@ -15881,15 +14482,15 @@ "binop": null }, "value": "server", - "start": 3686, - "end": 3692, + "start": 3006, + "end": 3012, "loc": { "start": { - "line": 134, + "line": 106, "column": 9 }, "end": { - "line": 134, + "line": 106, "column": 15 } } @@ -15907,15 +14508,15 @@ "binop": null, "updateContext": null }, - "start": 3692, - "end": 3693, + "start": 3012, + "end": 3013, "loc": { "start": { - "line": 134, + "line": 106, "column": 15 }, "end": { - "line": 134, + "line": 106, "column": 16 } } @@ -15933,15 +14534,15 @@ "binop": null }, "value": "log", - "start": 3693, - "end": 3696, + "start": 3013, + "end": 3016, "loc": { "start": { - "line": 134, + "line": 106, "column": 16 }, "end": { - "line": 134, + "line": 106, "column": 19 } } @@ -15958,15 +14559,15 @@ "postfix": false, "binop": null }, - "start": 3696, - "end": 3697, + "start": 3016, + "end": 3017, "loc": { "start": { - "line": 134, + "line": 106, "column": 19 }, "end": { - "line": 134, + "line": 106, "column": 20 } } @@ -15984,15 +14585,15 @@ "binop": null }, "value": "tags", - "start": 3697, - "end": 3701, + "start": 3017, + "end": 3021, "loc": { "start": { - "line": 134, + "line": 106, "column": 20 }, "end": { - "line": 134, + "line": 106, "column": 24 } } @@ -16010,15 +14611,15 @@ "binop": null, "updateContext": null }, - "start": 3701, - "end": 3702, + "start": 3021, + "end": 3022, "loc": { "start": { - "line": 134, + "line": 106, "column": 24 }, "end": { - "line": 134, + "line": 106, "column": 25 } } @@ -16036,15 +14637,15 @@ "binop": null }, "value": "data", - "start": 3703, - "end": 3707, + "start": 3023, + "end": 3027, "loc": { "start": { - "line": 134, + "line": 106, "column": 26 }, "end": { - "line": 134, + "line": 106, "column": 30 } } @@ -16061,15 +14662,15 @@ "postfix": false, "binop": null }, - "start": 3707, - "end": 3708, + "start": 3027, + "end": 3028, "loc": { "start": { - "line": 134, + "line": 106, "column": 30 }, "end": { - "line": 134, + "line": 106, "column": 31 } } @@ -16087,15 +14688,15 @@ "binop": null, "updateContext": null }, - "start": 3708, - "end": 3709, + "start": 3028, + "end": 3029, "loc": { "start": { - "line": 134, + "line": 106, "column": 31 }, "end": { - "line": 134, + "line": 106, "column": 32 } } @@ -16112,15 +14713,15 @@ "postfix": false, "binop": null }, - "start": 3712, - "end": 3713, + "start": 3032, + "end": 3033, "loc": { "start": { - "line": 135, + "line": 107, "column": 2 }, "end": { - "line": 135, + "line": 107, "column": 3 } } @@ -16128,15 +14729,15 @@ { "type": "CommentBlock", "value": "*\n * Adds an endpoint at the path given handled by the controller\n * @param {EndpointConfig} endpoint configuration\n * @return {undefined}\n ", - "start": 3717, - "end": 3869, + "start": 3037, + "end": 3189, "loc": { "start": { - "line": 137, + "line": 109, "column": 2 }, "end": { - "line": 141, + "line": 113, "column": 5 } } @@ -16154,15 +14755,15 @@ "binop": null }, "value": "addEndpoint", - "start": 3872, - "end": 3883, + "start": 3192, + "end": 3203, "loc": { "start": { - "line": 142, + "line": 114, "column": 2 }, "end": { - "line": 142, + "line": 114, "column": 13 } } @@ -16179,15 +14780,15 @@ "postfix": false, "binop": null }, - "start": 3883, - "end": 3884, + "start": 3203, + "end": 3204, "loc": { "start": { - "line": 142, + "line": 114, "column": 13 }, "end": { - "line": 142, + "line": 114, "column": 14 } } @@ -16204,15 +14805,15 @@ "postfix": false, "binop": null }, - "start": 3884, - "end": 3885, + "start": 3204, + "end": 3205, "loc": { "start": { - "line": 142, + "line": 114, "column": 14 }, "end": { - "line": 142, + "line": 114, "column": 15 } } @@ -16230,15 +14831,15 @@ "binop": null }, "value": "method", - "start": 3886, - "end": 3892, + "start": 3206, + "end": 3212, "loc": { "start": { - "line": 142, + "line": 114, "column": 16 }, "end": { - "line": 142, + "line": 114, "column": 22 } } @@ -16256,15 +14857,15 @@ "binop": null, "updateContext": null }, - "start": 3892, - "end": 3893, + "start": 3212, + "end": 3213, "loc": { "start": { - "line": 142, + "line": 114, "column": 22 }, "end": { - "line": 142, + "line": 114, "column": 23 } } @@ -16282,15 +14883,15 @@ "binop": null }, "value": "path", - "start": 3894, - "end": 3898, + "start": 3214, + "end": 3218, "loc": { "start": { - "line": 142, + "line": 114, "column": 24 }, "end": { - "line": 142, + "line": 114, "column": 28 } } @@ -16308,15 +14909,15 @@ "binop": null, "updateContext": null }, - "start": 3898, - "end": 3899, + "start": 3218, + "end": 3219, "loc": { "start": { - "line": 142, + "line": 114, "column": 28 }, "end": { - "line": 142, + "line": 114, "column": 29 } } @@ -16334,15 +14935,15 @@ "binop": null }, "value": "controller", - "start": 3900, - "end": 3910, + "start": 3220, + "end": 3230, "loc": { "start": { - "line": 142, + "line": 114, "column": 30 }, "end": { - "line": 142, + "line": 114, "column": 40 } } @@ -16359,15 +14960,15 @@ "postfix": false, "binop": null }, - "start": 3911, - "end": 3912, + "start": 3231, + "end": 3232, "loc": { "start": { - "line": 142, + "line": 114, "column": 41 }, "end": { - "line": 142, + "line": 114, "column": 42 } } @@ -16384,15 +14985,15 @@ "postfix": false, "binop": null }, - "start": 3912, - "end": 3913, + "start": 3232, + "end": 3233, "loc": { "start": { - "line": 142, + "line": 114, "column": 42 }, "end": { - "line": 142, + "line": 114, "column": 43 } } @@ -16409,35 +15010,19 @@ "postfix": false, "binop": null }, - "start": 3914, - "end": 3915, + "start": 3234, + "end": 3235, "loc": { "start": { - "line": 142, + "line": 114, "column": 44 }, "end": { - "line": 142, + "line": 114, "column": 45 } } }, - { - "type": "CommentLine", - "value": " eslint-disable-line no-shadow", - "start": 3920, - "end": 3952, - "loc": { - "start": { - "line": 143, - "column": 4 - }, - "end": { - "line": 143, - "column": 36 - } - } - }, { "type": { "label": "this", @@ -16453,15 +15038,15 @@ "updateContext": null }, "value": "this", - "start": 3957, - "end": 3961, + "start": 3240, + "end": 3244, "loc": { "start": { - "line": 144, + "line": 115, "column": 4 }, "end": { - "line": 144, + "line": 115, "column": 8 } } @@ -16479,15 +15064,15 @@ "binop": null, "updateContext": null }, - "start": 3961, - "end": 3962, + "start": 3244, + "end": 3245, "loc": { "start": { - "line": 144, + "line": 115, "column": 8 }, "end": { - "line": 144, + "line": 115, "column": 9 } } @@ -16505,15 +15090,15 @@ "binop": null }, "value": "server", - "start": 3962, - "end": 3968, + "start": 3245, + "end": 3251, "loc": { "start": { - "line": 144, + "line": 115, "column": 9 }, "end": { - "line": 144, + "line": 115, "column": 15 } } @@ -16531,15 +15116,15 @@ "binop": null, "updateContext": null }, - "start": 3968, - "end": 3969, + "start": 3251, + "end": 3252, "loc": { "start": { - "line": 144, + "line": 115, "column": 15 }, "end": { - "line": 144, + "line": 115, "column": 16 } } @@ -16557,15 +15142,15 @@ "binop": null }, "value": "route", - "start": 3969, - "end": 3974, + "start": 3252, + "end": 3257, "loc": { "start": { - "line": 144, + "line": 115, "column": 16 }, "end": { - "line": 144, + "line": 115, "column": 21 } } @@ -16582,15 +15167,15 @@ "postfix": false, "binop": null }, - "start": 3974, - "end": 3975, + "start": 3257, + "end": 3258, "loc": { "start": { - "line": 144, + "line": 115, "column": 21 }, "end": { - "line": 144, + "line": 115, "column": 22 } } @@ -16607,15 +15192,15 @@ "postfix": false, "binop": null }, - "start": 3975, - "end": 3976, + "start": 3258, + "end": 3259, "loc": { "start": { - "line": 144, + "line": 115, "column": 22 }, "end": { - "line": 144, + "line": 115, "column": 23 } } @@ -16633,15 +15218,15 @@ "binop": null }, "value": "method", - "start": 3983, - "end": 3989, + "start": 3266, + "end": 3272, "loc": { "start": { - "line": 145, + "line": 116, "column": 6 }, "end": { - "line": 145, + "line": 116, "column": 12 } } @@ -16659,15 +15244,15 @@ "binop": null, "updateContext": null }, - "start": 3989, - "end": 3990, + "start": 3272, + "end": 3273, "loc": { "start": { - "line": 145, + "line": 116, "column": 12 }, "end": { - "line": 145, + "line": 116, "column": 13 } } @@ -16685,15 +15270,15 @@ "binop": null }, "value": "path", - "start": 3997, - "end": 4001, + "start": 3280, + "end": 3284, "loc": { "start": { - "line": 146, + "line": 117, "column": 6 }, "end": { - "line": 146, + "line": 117, "column": 10 } } @@ -16711,15 +15296,15 @@ "binop": null, "updateContext": null }, - "start": 4001, - "end": 4002, + "start": 3284, + "end": 3285, "loc": { "start": { - "line": 146, + "line": 117, "column": 10 }, "end": { - "line": 146, + "line": 117, "column": 11 } } @@ -16737,15 +15322,15 @@ "binop": null }, "value": "handler", - "start": 4009, - "end": 4016, + "start": 3292, + "end": 3299, "loc": { "start": { - "line": 147, + "line": 118, "column": 6 }, "end": { - "line": 147, + "line": 118, "column": 13 } } @@ -16763,15 +15348,15 @@ "binop": null, "updateContext": null }, - "start": 4016, - "end": 4017, + "start": 3299, + "end": 3300, "loc": { "start": { - "line": 147, + "line": 118, "column": 13 }, "end": { - "line": 147, + "line": 118, "column": 14 } } @@ -16789,15 +15374,15 @@ "binop": null }, "value": "controller", - "start": 4018, - "end": 4028, + "start": 3301, + "end": 3311, "loc": { "start": { - "line": 147, + "line": 118, "column": 15 }, "end": { - "line": 147, + "line": 118, "column": 25 } } @@ -16815,15 +15400,15 @@ "binop": null, "updateContext": null }, - "start": 4028, - "end": 4029, + "start": 3311, + "end": 3312, "loc": { "start": { - "line": 147, + "line": 118, "column": 25 }, "end": { - "line": 147, + "line": 118, "column": 26 } } @@ -16841,15 +15426,15 @@ "binop": null }, "value": "options", - "start": 4036, - "end": 4043, + "start": 3319, + "end": 3326, "loc": { "start": { - "line": 148, + "line": 119, "column": 6 }, "end": { - "line": 148, + "line": 119, "column": 13 } } @@ -16867,15 +15452,15 @@ "binop": null, "updateContext": null }, - "start": 4043, - "end": 4044, + "start": 3326, + "end": 3327, "loc": { "start": { - "line": 148, + "line": 119, "column": 13 }, "end": { - "line": 148, + "line": 119, "column": 14 } } @@ -16892,15 +15477,15 @@ "postfix": false, "binop": null }, - "start": 4045, - "end": 4046, + "start": 3328, + "end": 3329, "loc": { "start": { - "line": 148, + "line": 119, "column": 15 }, "end": { - "line": 148, + "line": 119, "column": 16 } } @@ -16918,15 +15503,15 @@ "binop": null }, "value": "cors", - "start": 4055, - "end": 4059, + "start": 3338, + "end": 3342, "loc": { "start": { - "line": 149, + "line": 120, "column": 8 }, "end": { - "line": 149, + "line": 120, "column": 12 } } @@ -16944,15 +15529,15 @@ "binop": null, "updateContext": null }, - "start": 4059, - "end": 4060, + "start": 3342, + "end": 3343, "loc": { "start": { - "line": 149, + "line": 120, "column": 12 }, "end": { - "line": 149, + "line": 120, "column": 13 } } @@ -16972,15 +15557,15 @@ "updateContext": null }, "value": "true", - "start": 4061, - "end": 4065, + "start": 3344, + "end": 3348, "loc": { "start": { - "line": 149, + "line": 120, "column": 14 }, "end": { - "line": 149, + "line": 120, "column": 18 } } @@ -16997,15 +15582,15 @@ "postfix": false, "binop": null }, - "start": 4072, - "end": 4073, + "start": 3355, + "end": 3356, "loc": { "start": { - "line": 150, + "line": 121, "column": 6 }, "end": { - "line": 150, + "line": 121, "column": 7 } } @@ -17022,15 +15607,15 @@ "postfix": false, "binop": null }, - "start": 4078, - "end": 4079, + "start": 3361, + "end": 3362, "loc": { "start": { - "line": 151, + "line": 122, "column": 4 }, "end": { - "line": 151, + "line": 122, "column": 5 } } @@ -17047,15 +15632,15 @@ "postfix": false, "binop": null }, - "start": 4079, - "end": 4080, + "start": 3362, + "end": 3363, "loc": { "start": { - "line": 151, + "line": 122, "column": 5 }, "end": { - "line": 151, + "line": 122, "column": 6 } } @@ -17073,15 +15658,15 @@ "binop": null, "updateContext": null }, - "start": 4080, - "end": 4081, + "start": 3363, + "end": 3364, "loc": { "start": { - "line": 151, + "line": 122, "column": 6 }, "end": { - "line": 151, + "line": 122, "column": 7 } } @@ -17098,15 +15683,15 @@ "postfix": false, "binop": null }, - "start": 4084, - "end": 4085, + "start": 3367, + "end": 3368, "loc": { "start": { - "line": 152, + "line": 123, "column": 2 }, "end": { - "line": 152, + "line": 123, "column": 3 } } @@ -17114,15 +15699,15 @@ { "type": "CommentBlock", "value": "*\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n ", - "start": 4089, - "end": 4239, + "start": 3372, + "end": 3522, "loc": { "start": { - "line": 154, + "line": 125, "column": 2 }, "end": { - "line": 158, + "line": 129, "column": 5 } } @@ -17140,15 +15725,15 @@ "binop": null }, "value": "addEndpoints", - "start": 4242, - "end": 4254, + "start": 3525, + "end": 3537, "loc": { "start": { - "line": 159, + "line": 130, "column": 2 }, "end": { - "line": 159, + "line": 130, "column": 14 } } @@ -17165,15 +15750,15 @@ "postfix": false, "binop": null }, - "start": 4254, - "end": 4255, + "start": 3537, + "end": 3538, "loc": { "start": { - "line": 159, + "line": 130, "column": 14 }, "end": { - "line": 159, + "line": 130, "column": 15 } } @@ -17191,15 +15776,15 @@ "binop": null }, "value": "routes", - "start": 4255, - "end": 4261, + "start": 3538, + "end": 3544, "loc": { "start": { - "line": 159, + "line": 130, "column": 15 }, "end": { - "line": 159, + "line": 130, "column": 21 } } @@ -17216,15 +15801,15 @@ "postfix": false, "binop": null }, - "start": 4261, - "end": 4262, + "start": 3544, + "end": 3545, "loc": { "start": { - "line": 159, + "line": 130, "column": 21 }, "end": { - "line": 159, + "line": 130, "column": 22 } } @@ -17241,15 +15826,15 @@ "postfix": false, "binop": null }, - "start": 4263, - "end": 4264, + "start": 3546, + "end": 3547, "loc": { "start": { - "line": 159, + "line": 130, "column": 23 }, "end": { - "line": 159, + "line": 130, "column": 24 } } @@ -17269,15 +15854,15 @@ "updateContext": null }, "value": "for", - "start": 4269, - "end": 4272, + "start": 3552, + "end": 3555, "loc": { "start": { - "line": 160, + "line": 131, "column": 4 }, "end": { - "line": 160, + "line": 131, "column": 7 } } @@ -17294,15 +15879,15 @@ "postfix": false, "binop": null }, - "start": 4273, - "end": 4274, + "start": 3556, + "end": 3557, "loc": { "start": { - "line": 160, + "line": 131, "column": 8 }, "end": { - "line": 160, + "line": 131, "column": 9 } } @@ -17322,15 +15907,15 @@ "updateContext": null }, "value": "let", - "start": 4274, - "end": 4277, + "start": 3557, + "end": 3560, "loc": { "start": { - "line": 160, + "line": 131, "column": 9 }, "end": { - "line": 160, + "line": 131, "column": 12 } } @@ -17348,15 +15933,15 @@ "binop": null }, "value": "i", - "start": 4278, - "end": 4279, + "start": 3561, + "end": 3562, "loc": { "start": { - "line": 160, + "line": 131, "column": 13 }, "end": { - "line": 160, + "line": 131, "column": 14 } } @@ -17375,15 +15960,15 @@ "updateContext": null }, "value": "=", - "start": 4280, - "end": 4281, + "start": 3563, + "end": 3564, "loc": { "start": { - "line": 160, + "line": 131, "column": 15 }, "end": { - "line": 160, + "line": 131, "column": 16 } } @@ -17402,15 +15987,15 @@ "updateContext": null }, "value": 0, - "start": 4282, - "end": 4283, + "start": 3565, + "end": 3566, "loc": { "start": { - "line": 160, + "line": 131, "column": 17 }, "end": { - "line": 160, + "line": 131, "column": 18 } } @@ -17428,15 +16013,15 @@ "binop": null, "updateContext": null }, - "start": 4283, - "end": 4284, + "start": 3566, + "end": 3567, "loc": { "start": { - "line": 160, + "line": 131, "column": 18 }, "end": { - "line": 160, + "line": 131, "column": 19 } } @@ -17454,15 +16039,15 @@ "binop": null }, "value": "i", - "start": 4285, - "end": 4286, + "start": 3568, + "end": 3569, "loc": { "start": { - "line": 160, + "line": 131, "column": 20 }, "end": { - "line": 160, + "line": 131, "column": 21 } } @@ -17481,15 +16066,15 @@ "updateContext": null }, "value": "<", - "start": 4287, - "end": 4288, + "start": 3570, + "end": 3571, "loc": { "start": { - "line": 160, + "line": 131, "column": 22 }, "end": { - "line": 160, + "line": 131, "column": 23 } } @@ -17507,15 +16092,15 @@ "binop": null }, "value": "routes", - "start": 4289, - "end": 4295, + "start": 3572, + "end": 3578, "loc": { "start": { - "line": 160, + "line": 131, "column": 24 }, "end": { - "line": 160, + "line": 131, "column": 30 } } @@ -17533,15 +16118,15 @@ "binop": null, "updateContext": null }, - "start": 4295, - "end": 4296, + "start": 3578, + "end": 3579, "loc": { "start": { - "line": 160, + "line": 131, "column": 30 }, "end": { - "line": 160, + "line": 131, "column": 31 } } @@ -17559,15 +16144,15 @@ "binop": null }, "value": "length", - "start": 4296, - "end": 4302, + "start": 3579, + "end": 3585, "loc": { "start": { - "line": 160, + "line": 131, "column": 31 }, "end": { - "line": 160, + "line": 131, "column": 37 } } @@ -17585,15 +16170,15 @@ "binop": null, "updateContext": null }, - "start": 4302, - "end": 4303, + "start": 3585, + "end": 3586, "loc": { "start": { - "line": 160, + "line": 131, "column": 37 }, "end": { - "line": 160, + "line": 131, "column": 38 } } @@ -17611,15 +16196,15 @@ "binop": null }, "value": "i", - "start": 4304, - "end": 4305, + "start": 3587, + "end": 3588, "loc": { "start": { - "line": 160, + "line": 131, "column": 39 }, "end": { - "line": 160, + "line": 131, "column": 40 } } @@ -17637,15 +16222,15 @@ "binop": null }, "value": "++", - "start": 4305, - "end": 4307, + "start": 3588, + "end": 3590, "loc": { "start": { - "line": 160, + "line": 131, "column": 40 }, "end": { - "line": 160, + "line": 131, "column": 42 } } @@ -17662,15 +16247,15 @@ "postfix": false, "binop": null }, - "start": 4307, - "end": 4308, + "start": 3590, + "end": 3591, "loc": { "start": { - "line": 160, + "line": 131, "column": 42 }, "end": { - "line": 160, + "line": 131, "column": 43 } } @@ -17687,15 +16272,15 @@ "postfix": false, "binop": null }, - "start": 4309, - "end": 4310, + "start": 3592, + "end": 3593, "loc": { "start": { - "line": 160, + "line": 131, "column": 44 }, "end": { - "line": 160, + "line": 131, "column": 45 } } @@ -17715,15 +16300,15 @@ "updateContext": null }, "value": "this", - "start": 4317, - "end": 4321, + "start": 3600, + "end": 3604, "loc": { "start": { - "line": 161, + "line": 132, "column": 6 }, "end": { - "line": 161, + "line": 132, "column": 10 } } @@ -17741,15 +16326,15 @@ "binop": null, "updateContext": null }, - "start": 4321, - "end": 4322, + "start": 3604, + "end": 3605, "loc": { "start": { - "line": 161, + "line": 132, "column": 10 }, "end": { - "line": 161, + "line": 132, "column": 11 } } @@ -17767,15 +16352,15 @@ "binop": null }, "value": "addEndpoint", - "start": 4322, - "end": 4333, + "start": 3605, + "end": 3616, "loc": { "start": { - "line": 161, + "line": 132, "column": 11 }, "end": { - "line": 161, + "line": 132, "column": 22 } } @@ -17792,15 +16377,15 @@ "postfix": false, "binop": null }, - "start": 4333, - "end": 4334, + "start": 3616, + "end": 3617, "loc": { "start": { - "line": 161, + "line": 132, "column": 22 }, "end": { - "line": 161, + "line": 132, "column": 23 } } @@ -17818,15 +16403,15 @@ "binop": null }, "value": "routes", - "start": 4334, - "end": 4340, + "start": 3617, + "end": 3623, "loc": { "start": { - "line": 161, + "line": 132, "column": 23 }, "end": { - "line": 161, + "line": 132, "column": 29 } } @@ -17844,15 +16429,15 @@ "binop": null, "updateContext": null }, - "start": 4340, - "end": 4341, + "start": 3623, + "end": 3624, "loc": { "start": { - "line": 161, + "line": 132, "column": 29 }, "end": { - "line": 161, + "line": 132, "column": 30 } } @@ -17870,15 +16455,15 @@ "binop": null }, "value": "i", - "start": 4341, - "end": 4342, + "start": 3624, + "end": 3625, "loc": { "start": { - "line": 161, + "line": 132, "column": 30 }, "end": { - "line": 161, + "line": 132, "column": 31 } } @@ -17896,15 +16481,15 @@ "binop": null, "updateContext": null }, - "start": 4342, - "end": 4343, + "start": 3625, + "end": 3626, "loc": { "start": { - "line": 161, + "line": 132, "column": 31 }, "end": { - "line": 161, + "line": 132, "column": 32 } } @@ -17921,15 +16506,15 @@ "postfix": false, "binop": null }, - "start": 4343, - "end": 4344, + "start": 3626, + "end": 3627, "loc": { "start": { - "line": 161, + "line": 132, "column": 32 }, "end": { - "line": 161, + "line": 132, "column": 33 } } @@ -17947,15 +16532,15 @@ "binop": null, "updateContext": null }, - "start": 4344, - "end": 4345, + "start": 3627, + "end": 3628, "loc": { "start": { - "line": 161, + "line": 132, "column": 33 }, "end": { - "line": 161, + "line": 132, "column": 34 } } @@ -17972,15 +16557,15 @@ "postfix": false, "binop": null }, - "start": 4350, - "end": 4351, + "start": 3633, + "end": 3634, "loc": { "start": { - "line": 162, + "line": 133, "column": 4 }, "end": { - "line": 162, + "line": 133, "column": 5 } } @@ -17997,15 +16582,15 @@ "postfix": false, "binop": null }, - "start": 4354, - "end": 4355, + "start": 3637, + "end": 3638, "loc": { "start": { - "line": 163, + "line": 134, "column": 2 }, "end": { - "line": 163, + "line": 134, "column": 3 } } @@ -18022,15 +16607,15 @@ "postfix": false, "binop": null }, - "start": 4356, - "end": 4357, + "start": 3639, + "end": 3640, "loc": { "start": { - "line": 164, + "line": 135, "column": 0 }, "end": { - "line": 164, + "line": 135, "column": 1 } } @@ -18048,15 +16633,15 @@ "binop": null, "updateContext": null }, - "start": 4357, - "end": 4357, + "start": 3640, + "end": 3640, "loc": { "start": { - "line": 164, + "line": 135, "column": 1 }, "end": { - "line": 164, + "line": 135, "column": 1 } } diff --git a/docs/ast/source/controllers/admin.controller.js.json b/docs/ast/source/controllers/admin.controller.js.json index 4da2cc9..7b513b9 100644 --- a/docs/ast/source/controllers/admin.controller.js.json +++ b/docs/ast/source/controllers/admin.controller.js.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 1045, + "end": 1069, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 1045, + "end": 1069, "loc": { "start": { "line": 1, @@ -31,7 +31,7 @@ { "type": "ImportDeclaration", "start": 115, - "end": 163, + "end": 187, "loc": { "start": { "line": 6, @@ -39,7 +39,7 @@ }, "end": { "line": 6, - "column": 48 + "column": 72 } }, "specifiers": [ @@ -98,7 +98,7 @@ "source": { "type": "StringLiteral", "start": 143, - "end": 162, + "end": 186, "loc": { "start": { "line": 6, @@ -106,14 +106,14 @@ }, "end": { "line": 6, - "column": 47 + "column": 71 } }, "extra": { - "rawValue": "../base/server.js", - "raw": "'../base/server.js'" + "rawValue": "../base/request/hapi-request.interface.js", + "raw": "'../base/request/hapi-request.interface.js'" }, - "value": "../base/server.js" + "value": "../base/request/hapi-request.interface.js" }, "leadingComments": [ { @@ -136,8 +136,8 @@ }, { "type": "ImportDeclaration", - "start": 164, - "end": 213, + "start": 188, + "end": 237, "loc": { "start": { "line": 7, @@ -151,8 +151,8 @@ "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 171, - "end": 177, + "start": 195, + "end": 201, "loc": { "start": { "line": 7, @@ -165,8 +165,8 @@ }, "local": { "type": "Identifier", - "start": 171, - "end": 177, + "start": 195, + "end": 201, "loc": { "start": { "line": 7, @@ -184,8 +184,8 @@ ], "source": { "type": "StringLiteral", - "start": 183, - "end": 212, + "start": 207, + "end": 236, "loc": { "start": { "line": 7, @@ -205,8 +205,8 @@ }, { "type": "ImportDeclaration", - "start": 214, - "end": 279, + "start": 238, + "end": 303, "loc": { "start": { "line": 8, @@ -220,8 +220,8 @@ "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 221, - "end": 238, + "start": 245, + "end": 262, "loc": { "start": { "line": 8, @@ -234,8 +234,8 @@ }, "local": { "type": "Identifier", - "start": 221, - "end": 238, + "start": 245, + "end": 262, "loc": { "start": { "line": 8, @@ -253,8 +253,8 @@ ], "source": { "type": "StringLiteral", - "start": 244, - "end": 278, + "start": 268, + "end": 302, "loc": { "start": { "line": 8, @@ -275,8 +275,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning server information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Server information Object\n ", - "start": 281, - "end": 447, + "start": 305, + "end": 471, "loc": { "start": { "line": 10, @@ -292,8 +292,8 @@ }, { "type": "FunctionDeclaration", - "start": 448, - "end": 539, + "start": 472, + "end": 563, "loc": { "start": { "line": 15, @@ -306,8 +306,8 @@ }, "id": { "type": "Identifier", - "start": 457, - "end": 471, + "start": 481, + "end": 495, "loc": { "start": { "line": 15, @@ -328,8 +328,8 @@ "params": [ { "type": "Identifier", - "start": 472, - "end": 479, + "start": 496, + "end": 503, "loc": { "start": { "line": 15, @@ -346,8 +346,8 @@ ], "body": { "type": "BlockStatement", - "start": 481, - "end": 539, + "start": 505, + "end": 563, "loc": { "start": { "line": 15, @@ -361,8 +361,8 @@ "body": [ { "type": "ReturnStatement", - "start": 510, - "end": 537, + "start": 534, + "end": 561, "loc": { "start": { "line": 17, @@ -375,8 +375,8 @@ }, "argument": { "type": "MemberExpression", - "start": 517, - "end": 536, + "start": 541, + "end": 560, "loc": { "start": { "line": 17, @@ -389,8 +389,8 @@ }, "object": { "type": "MemberExpression", - "start": 517, - "end": 531, + "start": 541, + "end": 555, "loc": { "start": { "line": 17, @@ -403,8 +403,8 @@ }, "object": { "type": "Identifier", - "start": 517, - "end": 524, + "start": 541, + "end": 548, "loc": { "start": { "line": 17, @@ -421,8 +421,8 @@ }, "property": { "type": "Identifier", - "start": 525, - "end": 531, + "start": 549, + "end": 555, "loc": { "start": { "line": 17, @@ -441,8 +441,8 @@ }, "property": { "type": "Identifier", - "start": 532, - "end": 536, + "start": 556, + "end": 560, "loc": { "start": { "line": 17, @@ -463,8 +463,8 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 485, - "end": 507, + "start": 509, + "end": 531, "loc": { "start": { "line": 16, @@ -486,8 +486,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning server information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Server information Object\n ", - "start": 281, - "end": 447, + "start": 305, + "end": 471, "loc": { "start": { "line": 10, @@ -504,8 +504,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning Healthcheck information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Healthcheck response Object\n ", - "start": 541, - "end": 714, + "start": 565, + "end": 738, "loc": { "start": { "line": 20, @@ -521,8 +521,8 @@ }, { "type": "FunctionDeclaration", - "start": 715, - "end": 843, + "start": 739, + "end": 867, "loc": { "start": { "line": 25, @@ -535,8 +535,8 @@ }, "id": { "type": "Identifier", - "start": 724, - "end": 745, + "start": 748, + "end": 769, "loc": { "start": { "line": 25, @@ -557,8 +557,8 @@ "params": [ { "type": "Identifier", - "start": 746, - "end": 753, + "start": 770, + "end": 777, "loc": { "start": { "line": 25, @@ -575,8 +575,8 @@ ], "body": { "type": "BlockStatement", - "start": 755, - "end": 843, + "start": 779, + "end": 867, "loc": { "start": { "line": 25, @@ -590,8 +590,8 @@ "body": [ { "type": "ReturnStatement", - "start": 784, - "end": 841, + "start": 808, + "end": 865, "loc": { "start": { "line": 27, @@ -604,8 +604,8 @@ }, "argument": { "type": "CallExpression", - "start": 791, - "end": 840, + "start": 815, + "end": 864, "loc": { "start": { "line": 27, @@ -618,8 +618,8 @@ }, "callee": { "type": "MemberExpression", - "start": 791, - "end": 818, + "start": 815, + "end": 842, "loc": { "start": { "line": 27, @@ -632,8 +632,8 @@ }, "object": { "type": "Identifier", - "start": 791, - "end": 808, + "start": 815, + "end": 832, "loc": { "start": { "line": 27, @@ -650,8 +650,8 @@ }, "property": { "type": "Identifier", - "start": 809, - "end": 818, + "start": 833, + "end": 842, "loc": { "start": { "line": 27, @@ -671,8 +671,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 819, - "end": 839, + "start": 843, + "end": 863, "loc": { "start": { "line": 27, @@ -685,8 +685,8 @@ }, "object": { "type": "MemberExpression", - "start": 819, - "end": 833, + "start": 843, + "end": 857, "loc": { "start": { "line": 27, @@ -699,8 +699,8 @@ }, "object": { "type": "Identifier", - "start": 819, - "end": 826, + "start": 843, + "end": 850, "loc": { "start": { "line": 27, @@ -716,8 +716,8 @@ }, "property": { "type": "Identifier", - "start": 827, - "end": 833, + "start": 851, + "end": 857, "loc": { "start": { "line": 27, @@ -735,8 +735,8 @@ }, "property": { "type": "Identifier", - "start": 834, - "end": 839, + "start": 858, + "end": 863, "loc": { "start": { "line": 27, @@ -759,8 +759,8 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 759, - "end": 781, + "start": 783, + "end": 805, "loc": { "start": { "line": 26, @@ -781,8 +781,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning Healthcheck information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Healthcheck response Object\n ", - "start": 541, - "end": 714, + "start": 565, + "end": 738, "loc": { "start": { "line": 20, @@ -798,8 +798,8 @@ }, { "type": "ExportDefaultDeclaration", - "start": 845, - "end": 1045, + "start": 869, + "end": 1069, "loc": { "start": { "line": 30, @@ -812,8 +812,8 @@ }, "declaration": { "type": "ArrayExpression", - "start": 860, - "end": 1044, + "start": 884, + "end": 1068, "loc": { "start": { "line": 30, @@ -827,8 +827,8 @@ "elements": [ { "type": "ObjectExpression", - "start": 861, - "end": 965, + "start": 885, + "end": 989, "loc": { "start": { "line": 30, @@ -842,8 +842,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 865, - "end": 909, + "start": 889, + "end": 933, "loc": { "start": { "line": 31, @@ -859,8 +859,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 865, - "end": 869, + "start": 889, + "end": 893, "loc": { "start": { "line": 31, @@ -876,8 +876,8 @@ }, "value": { "type": "BinaryExpression", - "start": 871, - "end": 909, + "start": 895, + "end": 933, "loc": { "start": { "line": 31, @@ -890,8 +890,8 @@ }, "left": { "type": "MemberExpression", - "start": 871, - "end": 895, + "start": 895, + "end": 919, "loc": { "start": { "line": 31, @@ -904,8 +904,8 @@ }, "object": { "type": "MemberExpression", - "start": 871, - "end": 883, + "start": 895, + "end": 907, "loc": { "start": { "line": 31, @@ -918,8 +918,8 @@ }, "object": { "type": "Identifier", - "start": 871, - "end": 877, + "start": 895, + "end": 901, "loc": { "start": { "line": 31, @@ -935,8 +935,8 @@ }, "property": { "type": "Identifier", - "start": 878, - "end": 883, + "start": 902, + "end": 907, "loc": { "start": { "line": 31, @@ -954,8 +954,8 @@ }, "property": { "type": "Identifier", - "start": 884, - "end": 895, + "start": 908, + "end": 919, "loc": { "start": { "line": 31, @@ -974,8 +974,8 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 898, - "end": 909, + "start": 922, + "end": 933, "loc": { "start": { "line": 31, @@ -996,8 +996,8 @@ }, { "type": "ObjectProperty", - "start": 913, - "end": 926, + "start": 937, + "end": 950, "loc": { "start": { "line": 32, @@ -1013,8 +1013,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 913, - "end": 919, + "start": 937, + "end": 943, "loc": { "start": { "line": 32, @@ -1030,8 +1030,8 @@ }, "value": { "type": "StringLiteral", - "start": 921, - "end": 926, + "start": 945, + "end": 950, "loc": { "start": { "line": 32, @@ -1051,8 +1051,8 @@ }, { "type": "ObjectProperty", - "start": 930, - "end": 963, + "start": 954, + "end": 987, "loc": { "start": { "line": 33, @@ -1068,8 +1068,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 930, - "end": 940, + "start": 954, + "end": 964, "loc": { "start": { "line": 33, @@ -1085,8 +1085,8 @@ }, "value": { "type": "Identifier", - "start": 942, - "end": 963, + "start": 966, + "end": 987, "loc": { "start": { "line": 33, @@ -1105,8 +1105,8 @@ }, { "type": "ObjectExpression", - "start": 967, - "end": 1043, + "start": 991, + "end": 1067, "loc": { "start": { "line": 34, @@ -1120,8 +1120,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 971, - "end": 994, + "start": 995, + "end": 1018, "loc": { "start": { "line": 35, @@ -1137,8 +1137,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 971, - "end": 975, + "start": 995, + "end": 999, "loc": { "start": { "line": 35, @@ -1154,8 +1154,8 @@ }, "value": { "type": "MemberExpression", - "start": 977, - "end": 994, + "start": 1001, + "end": 1018, "loc": { "start": { "line": 35, @@ -1168,8 +1168,8 @@ }, "object": { "type": "MemberExpression", - "start": 977, - "end": 989, + "start": 1001, + "end": 1013, "loc": { "start": { "line": 35, @@ -1182,8 +1182,8 @@ }, "object": { "type": "Identifier", - "start": 977, - "end": 983, + "start": 1001, + "end": 1007, "loc": { "start": { "line": 35, @@ -1199,8 +1199,8 @@ }, "property": { "type": "Identifier", - "start": 984, - "end": 989, + "start": 1008, + "end": 1013, "loc": { "start": { "line": 35, @@ -1218,8 +1218,8 @@ }, "property": { "type": "Identifier", - "start": 990, - "end": 994, + "start": 1014, + "end": 1018, "loc": { "start": { "line": 35, @@ -1238,8 +1238,8 @@ }, { "type": "ObjectProperty", - "start": 998, - "end": 1011, + "start": 1022, + "end": 1035, "loc": { "start": { "line": 36, @@ -1255,8 +1255,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 998, - "end": 1004, + "start": 1022, + "end": 1028, "loc": { "start": { "line": 36, @@ -1272,8 +1272,8 @@ }, "value": { "type": "StringLiteral", - "start": 1006, - "end": 1011, + "start": 1030, + "end": 1035, "loc": { "start": { "line": 36, @@ -1293,8 +1293,8 @@ }, { "type": "ObjectProperty", - "start": 1015, - "end": 1041, + "start": 1039, + "end": 1065, "loc": { "start": { "line": 37, @@ -1310,8 +1310,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1015, - "end": 1025, + "start": 1039, + "end": 1049, "loc": { "start": { "line": 37, @@ -1327,8 +1327,8 @@ }, "value": { "type": "Identifier", - "start": 1027, - "end": 1041, + "start": 1051, + "end": 1065, "loc": { "start": { "line": 37, @@ -1373,8 +1373,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning server information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Server information Object\n ", - "start": 281, - "end": 447, + "start": 305, + "end": 471, "loc": { "start": { "line": 10, @@ -1389,8 +1389,8 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 485, - "end": 507, + "start": 509, + "end": 531, "loc": { "start": { "line": 16, @@ -1405,8 +1405,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning Healthcheck information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Healthcheck response Object\n ", - "start": 541, - "end": 714, + "start": 565, + "end": 738, "loc": { "start": { "line": 20, @@ -1421,8 +1421,8 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 759, - "end": 781, + "start": 783, + "end": 805, "loc": { "start": { "line": 26, @@ -1595,9 +1595,9 @@ "binop": null, "updateContext": null }, - "value": "../base/server.js", + "value": "../base/request/hapi-request.interface.js", "start": 143, - "end": 162, + "end": 186, "loc": { "start": { "line": 6, @@ -1605,7 +1605,7 @@ }, "end": { "line": 6, - "column": 47 + "column": 71 } } }, @@ -1622,16 +1622,16 @@ "binop": null, "updateContext": null }, - "start": 162, - "end": 163, + "start": 186, + "end": 187, "loc": { "start": { "line": 6, - "column": 47 + "column": 71 }, "end": { "line": 6, - "column": 48 + "column": 72 } } }, @@ -1650,8 +1650,8 @@ "updateContext": null }, "value": "import", - "start": 164, - "end": 170, + "start": 188, + "end": 194, "loc": { "start": { "line": 7, @@ -1676,8 +1676,8 @@ "binop": null }, "value": "CONFIG", - "start": 171, - "end": 177, + "start": 195, + "end": 201, "loc": { "start": { "line": 7, @@ -1702,8 +1702,8 @@ "binop": null }, "value": "from", - "start": 178, - "end": 182, + "start": 202, + "end": 206, "loc": { "start": { "line": 7, @@ -1729,8 +1729,8 @@ "updateContext": null }, "value": "../helpers/config.helper.js", - "start": 183, - "end": 212, + "start": 207, + "end": 236, "loc": { "start": { "line": 7, @@ -1755,8 +1755,8 @@ "binop": null, "updateContext": null }, - "start": 212, - "end": 213, + "start": 236, + "end": 237, "loc": { "start": { "line": 7, @@ -1783,8 +1783,8 @@ "updateContext": null }, "value": "import", - "start": 214, - "end": 220, + "start": 238, + "end": 244, "loc": { "start": { "line": 8, @@ -1809,8 +1809,8 @@ "binop": null }, "value": "healthcheckHelper", - "start": 221, - "end": 238, + "start": 245, + "end": 262, "loc": { "start": { "line": 8, @@ -1835,8 +1835,8 @@ "binop": null }, "value": "from", - "start": 239, - "end": 243, + "start": 263, + "end": 267, "loc": { "start": { "line": 8, @@ -1862,8 +1862,8 @@ "updateContext": null }, "value": "../helpers/healthcheck.helper.js", - "start": 244, - "end": 278, + "start": 268, + "end": 302, "loc": { "start": { "line": 8, @@ -1888,8 +1888,8 @@ "binop": null, "updateContext": null }, - "start": 278, - "end": 279, + "start": 302, + "end": 303, "loc": { "start": { "line": 8, @@ -1904,8 +1904,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning server information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Server information Object\n ", - "start": 281, - "end": 447, + "start": 305, + "end": 471, "loc": { "start": { "line": 10, @@ -1931,8 +1931,8 @@ "binop": null }, "value": "function", - "start": 448, - "end": 456, + "start": 472, + "end": 480, "loc": { "start": { "line": 15, @@ -1957,8 +1957,8 @@ "binop": null }, "value": "infoController", - "start": 457, - "end": 471, + "start": 481, + "end": 495, "loc": { "start": { "line": 15, @@ -1982,8 +1982,8 @@ "postfix": false, "binop": null }, - "start": 471, - "end": 472, + "start": 495, + "end": 496, "loc": { "start": { "line": 15, @@ -2008,8 +2008,8 @@ "binop": null }, "value": "request", - "start": 472, - "end": 479, + "start": 496, + "end": 503, "loc": { "start": { "line": 15, @@ -2033,8 +2033,8 @@ "postfix": false, "binop": null }, - "start": 479, - "end": 480, + "start": 503, + "end": 504, "loc": { "start": { "line": 15, @@ -2058,8 +2058,8 @@ "postfix": false, "binop": null }, - "start": 481, - "end": 482, + "start": 505, + "end": 506, "loc": { "start": { "line": 15, @@ -2074,8 +2074,8 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 485, - "end": 507, + "start": 509, + "end": 531, "loc": { "start": { "line": 16, @@ -2102,8 +2102,8 @@ "updateContext": null }, "value": "return", - "start": 510, - "end": 516, + "start": 534, + "end": 540, "loc": { "start": { "line": 17, @@ -2128,8 +2128,8 @@ "binop": null }, "value": "request", - "start": 517, - "end": 524, + "start": 541, + "end": 548, "loc": { "start": { "line": 17, @@ -2154,8 +2154,8 @@ "binop": null, "updateContext": null }, - "start": 524, - "end": 525, + "start": 548, + "end": 549, "loc": { "start": { "line": 17, @@ -2180,8 +2180,8 @@ "binop": null }, "value": "server", - "start": 525, - "end": 531, + "start": 549, + "end": 555, "loc": { "start": { "line": 17, @@ -2206,8 +2206,8 @@ "binop": null, "updateContext": null }, - "start": 531, - "end": 532, + "start": 555, + "end": 556, "loc": { "start": { "line": 17, @@ -2232,8 +2232,8 @@ "binop": null }, "value": "info", - "start": 532, - "end": 536, + "start": 556, + "end": 560, "loc": { "start": { "line": 17, @@ -2258,8 +2258,8 @@ "binop": null, "updateContext": null }, - "start": 536, - "end": 537, + "start": 560, + "end": 561, "loc": { "start": { "line": 17, @@ -2283,8 +2283,8 @@ "postfix": false, "binop": null }, - "start": 538, - "end": 539, + "start": 562, + "end": 563, "loc": { "start": { "line": 18, @@ -2299,8 +2299,8 @@ { "type": "CommentBlock", "value": "*\n * Basic Controller for returning Healthcheck information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Healthcheck response Object\n ", - "start": 541, - "end": 714, + "start": 565, + "end": 738, "loc": { "start": { "line": 20, @@ -2326,8 +2326,8 @@ "binop": null }, "value": "function", - "start": 715, - "end": 723, + "start": 739, + "end": 747, "loc": { "start": { "line": 25, @@ -2352,8 +2352,8 @@ "binop": null }, "value": "healthcheckController", - "start": 724, - "end": 745, + "start": 748, + "end": 769, "loc": { "start": { "line": 25, @@ -2377,8 +2377,8 @@ "postfix": false, "binop": null }, - "start": 745, - "end": 746, + "start": 769, + "end": 770, "loc": { "start": { "line": 25, @@ -2403,8 +2403,8 @@ "binop": null }, "value": "request", - "start": 746, - "end": 753, + "start": 770, + "end": 777, "loc": { "start": { "line": 25, @@ -2428,8 +2428,8 @@ "postfix": false, "binop": null }, - "start": 753, - "end": 754, + "start": 777, + "end": 778, "loc": { "start": { "line": 25, @@ -2453,8 +2453,8 @@ "postfix": false, "binop": null }, - "start": 755, - "end": 756, + "start": 779, + "end": 780, "loc": { "start": { "line": 25, @@ -2469,8 +2469,8 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 759, - "end": 781, + "start": 783, + "end": 805, "loc": { "start": { "line": 26, @@ -2497,8 +2497,8 @@ "updateContext": null }, "value": "return", - "start": 784, - "end": 790, + "start": 808, + "end": 814, "loc": { "start": { "line": 27, @@ -2523,8 +2523,8 @@ "binop": null }, "value": "healthcheckHelper", - "start": 791, - "end": 808, + "start": 815, + "end": 832, "loc": { "start": { "line": 27, @@ -2549,8 +2549,8 @@ "binop": null, "updateContext": null }, - "start": 808, - "end": 809, + "start": 832, + "end": 833, "loc": { "start": { "line": 27, @@ -2575,8 +2575,8 @@ "binop": null }, "value": "getStatus", - "start": 809, - "end": 818, + "start": 833, + "end": 842, "loc": { "start": { "line": 27, @@ -2600,8 +2600,8 @@ "postfix": false, "binop": null }, - "start": 818, - "end": 819, + "start": 842, + "end": 843, "loc": { "start": { "line": 27, @@ -2626,8 +2626,8 @@ "binop": null }, "value": "request", - "start": 819, - "end": 826, + "start": 843, + "end": 850, "loc": { "start": { "line": 27, @@ -2652,8 +2652,8 @@ "binop": null, "updateContext": null }, - "start": 826, - "end": 827, + "start": 850, + "end": 851, "loc": { "start": { "line": 27, @@ -2678,8 +2678,8 @@ "binop": null }, "value": "params", - "start": 827, - "end": 833, + "start": 851, + "end": 857, "loc": { "start": { "line": 27, @@ -2704,8 +2704,8 @@ "binop": null, "updateContext": null }, - "start": 833, - "end": 834, + "start": 857, + "end": 858, "loc": { "start": { "line": 27, @@ -2730,8 +2730,8 @@ "binop": null }, "value": "level", - "start": 834, - "end": 839, + "start": 858, + "end": 863, "loc": { "start": { "line": 27, @@ -2755,8 +2755,8 @@ "postfix": false, "binop": null }, - "start": 839, - "end": 840, + "start": 863, + "end": 864, "loc": { "start": { "line": 27, @@ -2781,8 +2781,8 @@ "binop": null, "updateContext": null }, - "start": 840, - "end": 841, + "start": 864, + "end": 865, "loc": { "start": { "line": 27, @@ -2806,8 +2806,8 @@ "postfix": false, "binop": null }, - "start": 842, - "end": 843, + "start": 866, + "end": 867, "loc": { "start": { "line": 28, @@ -2834,8 +2834,8 @@ "updateContext": null }, "value": "export", - "start": 845, - "end": 851, + "start": 869, + "end": 875, "loc": { "start": { "line": 30, @@ -2862,8 +2862,8 @@ "updateContext": null }, "value": "default", - "start": 852, - "end": 859, + "start": 876, + "end": 883, "loc": { "start": { "line": 30, @@ -2888,8 +2888,8 @@ "binop": null, "updateContext": null }, - "start": 860, - "end": 861, + "start": 884, + "end": 885, "loc": { "start": { "line": 30, @@ -2913,8 +2913,8 @@ "postfix": false, "binop": null }, - "start": 861, - "end": 862, + "start": 885, + "end": 886, "loc": { "start": { "line": 30, @@ -2939,8 +2939,8 @@ "binop": null }, "value": "path", - "start": 865, - "end": 869, + "start": 889, + "end": 893, "loc": { "start": { "line": 31, @@ -2965,8 +2965,8 @@ "binop": null, "updateContext": null }, - "start": 869, - "end": 870, + "start": 893, + "end": 894, "loc": { "start": { "line": 31, @@ -2991,8 +2991,8 @@ "binop": null }, "value": "CONFIG", - "start": 871, - "end": 877, + "start": 895, + "end": 901, "loc": { "start": { "line": 31, @@ -3017,8 +3017,8 @@ "binop": null, "updateContext": null }, - "start": 877, - "end": 878, + "start": 901, + "end": 902, "loc": { "start": { "line": 31, @@ -3043,8 +3043,8 @@ "binop": null }, "value": "PATHS", - "start": 878, - "end": 883, + "start": 902, + "end": 907, "loc": { "start": { "line": 31, @@ -3069,8 +3069,8 @@ "binop": null, "updateContext": null }, - "start": 883, - "end": 884, + "start": 907, + "end": 908, "loc": { "start": { "line": 31, @@ -3095,8 +3095,8 @@ "binop": null }, "value": "healthcheck", - "start": 884, - "end": 895, + "start": 908, + "end": 919, "loc": { "start": { "line": 31, @@ -3122,8 +3122,8 @@ "updateContext": null }, "value": "+", - "start": 896, - "end": 897, + "start": 920, + "end": 921, "loc": { "start": { "line": 31, @@ -3149,8 +3149,8 @@ "updateContext": null }, "value": "/{level?}", - "start": 898, - "end": 909, + "start": 922, + "end": 933, "loc": { "start": { "line": 31, @@ -3175,8 +3175,8 @@ "binop": null, "updateContext": null }, - "start": 909, - "end": 910, + "start": 933, + "end": 934, "loc": { "start": { "line": 31, @@ -3201,8 +3201,8 @@ "binop": null }, "value": "method", - "start": 913, - "end": 919, + "start": 937, + "end": 943, "loc": { "start": { "line": 32, @@ -3227,8 +3227,8 @@ "binop": null, "updateContext": null }, - "start": 919, - "end": 920, + "start": 943, + "end": 944, "loc": { "start": { "line": 32, @@ -3254,8 +3254,8 @@ "updateContext": null }, "value": "GET", - "start": 921, - "end": 926, + "start": 945, + "end": 950, "loc": { "start": { "line": 32, @@ -3280,8 +3280,8 @@ "binop": null, "updateContext": null }, - "start": 926, - "end": 927, + "start": 950, + "end": 951, "loc": { "start": { "line": 32, @@ -3306,8 +3306,8 @@ "binop": null }, "value": "controller", - "start": 930, - "end": 940, + "start": 954, + "end": 964, "loc": { "start": { "line": 33, @@ -3332,8 +3332,8 @@ "binop": null, "updateContext": null }, - "start": 940, - "end": 941, + "start": 964, + "end": 965, "loc": { "start": { "line": 33, @@ -3358,8 +3358,8 @@ "binop": null }, "value": "healthcheckController", - "start": 942, - "end": 963, + "start": 966, + "end": 987, "loc": { "start": { "line": 33, @@ -3383,8 +3383,8 @@ "postfix": false, "binop": null }, - "start": 964, - "end": 965, + "start": 988, + "end": 989, "loc": { "start": { "line": 34, @@ -3409,8 +3409,8 @@ "binop": null, "updateContext": null }, - "start": 965, - "end": 966, + "start": 989, + "end": 990, "loc": { "start": { "line": 34, @@ -3434,8 +3434,8 @@ "postfix": false, "binop": null }, - "start": 967, - "end": 968, + "start": 991, + "end": 992, "loc": { "start": { "line": 34, @@ -3460,8 +3460,8 @@ "binop": null }, "value": "path", - "start": 971, - "end": 975, + "start": 995, + "end": 999, "loc": { "start": { "line": 35, @@ -3486,8 +3486,8 @@ "binop": null, "updateContext": null }, - "start": 975, - "end": 976, + "start": 999, + "end": 1000, "loc": { "start": { "line": 35, @@ -3512,8 +3512,8 @@ "binop": null }, "value": "CONFIG", - "start": 977, - "end": 983, + "start": 1001, + "end": 1007, "loc": { "start": { "line": 35, @@ -3538,8 +3538,8 @@ "binop": null, "updateContext": null }, - "start": 983, - "end": 984, + "start": 1007, + "end": 1008, "loc": { "start": { "line": 35, @@ -3564,8 +3564,8 @@ "binop": null }, "value": "PATHS", - "start": 984, - "end": 989, + "start": 1008, + "end": 1013, "loc": { "start": { "line": 35, @@ -3590,8 +3590,8 @@ "binop": null, "updateContext": null }, - "start": 989, - "end": 990, + "start": 1013, + "end": 1014, "loc": { "start": { "line": 35, @@ -3616,8 +3616,8 @@ "binop": null }, "value": "info", - "start": 990, - "end": 994, + "start": 1014, + "end": 1018, "loc": { "start": { "line": 35, @@ -3642,8 +3642,8 @@ "binop": null, "updateContext": null }, - "start": 994, - "end": 995, + "start": 1018, + "end": 1019, "loc": { "start": { "line": 35, @@ -3668,8 +3668,8 @@ "binop": null }, "value": "method", - "start": 998, - "end": 1004, + "start": 1022, + "end": 1028, "loc": { "start": { "line": 36, @@ -3694,8 +3694,8 @@ "binop": null, "updateContext": null }, - "start": 1004, - "end": 1005, + "start": 1028, + "end": 1029, "loc": { "start": { "line": 36, @@ -3721,8 +3721,8 @@ "updateContext": null }, "value": "GET", - "start": 1006, - "end": 1011, + "start": 1030, + "end": 1035, "loc": { "start": { "line": 36, @@ -3747,8 +3747,8 @@ "binop": null, "updateContext": null }, - "start": 1011, - "end": 1012, + "start": 1035, + "end": 1036, "loc": { "start": { "line": 36, @@ -3773,8 +3773,8 @@ "binop": null }, "value": "controller", - "start": 1015, - "end": 1025, + "start": 1039, + "end": 1049, "loc": { "start": { "line": 37, @@ -3799,8 +3799,8 @@ "binop": null, "updateContext": null }, - "start": 1025, - "end": 1026, + "start": 1049, + "end": 1050, "loc": { "start": { "line": 37, @@ -3825,8 +3825,8 @@ "binop": null }, "value": "infoController", - "start": 1027, - "end": 1041, + "start": 1051, + "end": 1065, "loc": { "start": { "line": 37, @@ -3850,8 +3850,8 @@ "postfix": false, "binop": null }, - "start": 1042, - "end": 1043, + "start": 1066, + "end": 1067, "loc": { "start": { "line": 38, @@ -3876,8 +3876,8 @@ "binop": null, "updateContext": null }, - "start": 1043, - "end": 1044, + "start": 1067, + "end": 1068, "loc": { "start": { "line": 38, @@ -3902,8 +3902,8 @@ "binop": null, "updateContext": null }, - "start": 1044, - "end": 1045, + "start": 1068, + "end": 1069, "loc": { "start": { "line": 38, @@ -3928,8 +3928,8 @@ "binop": null, "updateContext": null }, - "start": 1045, - "end": 1045, + "start": 1069, + "end": 1069, "loc": { "start": { "line": 38, diff --git a/docs/ast/source/controllers/hello.controller.js.json b/docs/ast/source/controllers/hello.controller.js.json index a228dbc..d8c5ae4 100644 --- a/docs/ast/source/controllers/hello.controller.js.json +++ b/docs/ast/source/controllers/hello.controller.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 1053, + "end": 987, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 47, + "line": 45, "column": 3 } }, "program": { "type": "Program", "start": 0, - "end": 1053, + "end": 987, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 47, + "line": 45, "column": 3 } }, @@ -30,122 +30,102 @@ "body": [ { "type": "ImportDeclaration", - "start": 90, - "end": 138, + "start": 0, + "end": 72, "loc": { "start": { - "line": 3, + "line": 1, "column": 0 }, "end": { - "line": 3, - "column": 48 + "line": 1, + "column": 72 } }, "specifiers": [ { "type": "ImportSpecifier", - "start": 99, - "end": 110, + "start": 9, + "end": 20, "loc": { "start": { - "line": 3, + "line": 1, "column": 9 }, "end": { - "line": 3, + "line": 1, "column": 20 } }, "imported": { "type": "Identifier", - "start": 99, - "end": 110, + "start": 9, + "end": 20, "loc": { "start": { - "line": 3, + "line": 1, "column": 9 }, "end": { - "line": 3, + "line": 1, "column": 20 }, "identifierName": "HapiRequest" }, - "name": "HapiRequest", - "leadingComments": null + "name": "HapiRequest" }, "local": { "type": "Identifier", - "start": 99, - "end": 110, + "start": 9, + "end": 20, "loc": { "start": { - "line": 3, + "line": 1, "column": 9 }, "end": { - "line": 3, + "line": 1, "column": 20 }, "identifierName": "HapiRequest" }, "name": "HapiRequest" - }, - "leadingComments": null + } } ], "source": { "type": "StringLiteral", - "start": 118, - "end": 137, + "start": 28, + "end": 71, "loc": { "start": { - "line": 3, + "line": 1, "column": 28 }, "end": { - "line": 3, - "column": 47 + "line": 1, + "column": 71 } }, "extra": { - "rawValue": "../base/server.js", - "raw": "'../base/server.js'" + "rawValue": "../base/request/hapi-request.interface.js", + "raw": "'../base/request/hapi-request.interface.js'" }, - "value": "../base/server.js" + "value": "../base/request/hapi-request.interface.js" }, - "leadingComments": [ - { - "type": "CommentLine", - "value": " For some reason this can't use the `app` alias but can do relative pathing here... :/", - "start": 1, - "end": 89, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 88 - } - } - } - ], "trailingComments": [ { "type": "CommentBlock", "value": "*\n * Controllers for Basic \"Hello World\" Functions\n *\n * See https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition\n ", - "start": 140, - "end": 291, + "start": 74, + "end": 225, "loc": { "start": { - "line": 5, + "line": 3, "column": 0 }, "end": { - "line": 9, + "line": 7, "column": 3 } } @@ -154,15 +134,15 @@ }, { "type": "ExportNamedDeclaration", - "start": 292, - "end": 729, + "start": 226, + "end": 663, "loc": { "start": { - "line": 10, + "line": 8, "column": 0 }, "end": { - "line": 30, + "line": 28, "column": 1 } }, @@ -170,29 +150,29 @@ "source": null, "declaration": { "type": "ClassDeclaration", - "start": 299, - "end": 729, + "start": 233, + "end": 663, "loc": { "start": { - "line": 10, + "line": 8, "column": 7 }, "end": { - "line": 30, + "line": 28, "column": 1 } }, "id": { "type": "Identifier", - "start": 305, - "end": 315, + "start": 239, + "end": 249, "loc": { "start": { - "line": 10, + "line": 8, "column": 13 }, "end": { - "line": 10, + "line": 8, "column": 23 }, "identifierName": "HelloWorld" @@ -203,30 +183,30 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 316, - "end": 729, + "start": 250, + "end": 663, "loc": { "start": { - "line": 10, + "line": 8, "column": 24 }, "end": { - "line": 30, + "line": 28, "column": 1 } }, "body": [ { "type": "ClassMethod", - "start": 395, - "end": 442, + "start": 329, + "end": 376, "loc": { "start": { - "line": 15, + "line": 13, "column": 2 }, "end": { - "line": 17, + "line": 15, "column": 3 } }, @@ -234,15 +214,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 402, - "end": 407, + "start": 336, + "end": 341, "loc": { "start": { - "line": 15, + "line": 13, "column": 9 }, "end": { - "line": 15, + "line": 13, "column": 14 }, "identifierName": "basic" @@ -257,44 +237,44 @@ "params": [], "body": { "type": "BlockStatement", - "start": 410, - "end": 442, + "start": 344, + "end": 376, "loc": { "start": { - "line": 15, + "line": 13, "column": 17 }, "end": { - "line": 17, + "line": 15, "column": 3 } }, "body": [ { "type": "ReturnStatement", - "start": 416, - "end": 438, + "start": 350, + "end": 372, "loc": { "start": { - "line": 16, + "line": 14, "column": 4 }, "end": { - "line": 16, + "line": 14, "column": 26 } }, "argument": { "type": "StringLiteral", - "start": 423, - "end": 437, + "start": 357, + "end": 371, "loc": { "start": { - "line": 16, + "line": 14, "column": 11 }, "end": { - "line": 16, + "line": 14, "column": 25 } }, @@ -313,15 +293,15 @@ { "type": "CommentBlock", "value": "*\n * Returns 'Hello World!'\n * @return {String} Hello World!\n ", - "start": 320, - "end": 392, + "start": 254, + "end": 326, "loc": { "start": { - "line": 11, + "line": 9, "column": 2 }, "end": { - "line": 14, + "line": 12, "column": 5 } } @@ -331,15 +311,15 @@ { "type": "CommentBlock", "value": "*\n * Returns a customized Hello Message\n * @param {HapiRequest} request Request Parameters\n * @return {String} Customized Hello Message\n ", - "start": 446, - "end": 604, + "start": 380, + "end": 538, "loc": { "start": { - "line": 19, + "line": 17, "column": 2 }, "end": { - "line": 23, + "line": 21, "column": 5 } } @@ -348,15 +328,15 @@ }, { "type": "ClassMethod", - "start": 607, - "end": 727, + "start": 541, + "end": 661, "loc": { "start": { - "line": 24, + "line": 22, "column": 2 }, "end": { - "line": 29, + "line": 27, "column": 3 } }, @@ -364,15 +344,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 614, - "end": 618, + "start": 548, + "end": 552, "loc": { "start": { - "line": 24, + "line": 22, "column": 9 }, "end": { - "line": 24, + "line": 22, "column": 13 }, "identifierName": "name" @@ -387,15 +367,15 @@ "params": [ { "type": "Identifier", - "start": 619, - "end": 626, + "start": 553, + "end": 560, "loc": { "start": { - "line": 24, + "line": 22, "column": 14 }, "end": { - "line": 24, + "line": 22, "column": 21 }, "identifierName": "request" @@ -405,59 +385,59 @@ ], "body": { "type": "BlockStatement", - "start": 628, - "end": 727, + "start": 562, + "end": 661, "loc": { "start": { - "line": 24, + "line": 22, "column": 23 }, "end": { - "line": 29, + "line": 27, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 635, - "end": 668, + "start": 569, + "end": 602, "loc": { "start": { - "line": 26, + "line": 24, "column": 4 }, "end": { - "line": 26, + "line": 24, "column": 37 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 641, - "end": 667, + "start": 575, + "end": 601, "loc": { "start": { - "line": 26, + "line": 24, "column": 10 }, "end": { - "line": 26, + "line": 24, "column": 36 } }, "id": { "type": "Identifier", - "start": 641, - "end": 645, + "start": 575, + "end": 579, "loc": { "start": { - "line": 26, + "line": 24, "column": 10 }, "end": { - "line": 26, + "line": 24, "column": 14 }, "identifierName": "name" @@ -466,43 +446,43 @@ }, "init": { "type": "MemberExpression", - "start": 648, - "end": 667, + "start": 582, + "end": 601, "loc": { "start": { - "line": 26, + "line": 24, "column": 17 }, "end": { - "line": 26, + "line": 24, "column": 36 } }, "object": { "type": "MemberExpression", - "start": 648, - "end": 662, + "start": 582, + "end": 596, "loc": { "start": { - "line": 26, + "line": 24, "column": 17 }, "end": { - "line": 26, + "line": 24, "column": 31 } }, "object": { "type": "Identifier", - "start": 648, - "end": 655, + "start": 582, + "end": 589, "loc": { "start": { - "line": 26, + "line": 24, "column": 17 }, "end": { - "line": 26, + "line": 24, "column": 24 }, "identifierName": "request" @@ -511,15 +491,15 @@ }, "property": { "type": "Identifier", - "start": 656, - "end": 662, + "start": 590, + "end": 596, "loc": { "start": { - "line": 26, + "line": 24, "column": 25 }, "end": { - "line": 26, + "line": 24, "column": 31 }, "identifierName": "params" @@ -530,15 +510,15 @@ }, "property": { "type": "Identifier", - "start": 663, - "end": 667, + "start": 597, + "end": 601, "loc": { "start": { - "line": 26, + "line": 24, "column": 32 }, "end": { - "line": 26, + "line": 24, "column": 36 }, "identifierName": "name" @@ -553,71 +533,71 @@ }, { "type": "ReturnStatement", - "start": 674, - "end": 723, + "start": 608, + "end": 657, "loc": { "start": { - "line": 28, + "line": 26, "column": 4 }, "end": { - "line": 28, + "line": 26, "column": 53 } }, "argument": { "type": "BinaryExpression", - "start": 681, - "end": 722, + "start": 615, + "end": 656, "loc": { "start": { - "line": 28, + "line": 26, "column": 11 }, "end": { - "line": 28, + "line": 26, "column": 52 } }, "left": { "type": "BinaryExpression", - "start": 681, - "end": 713, + "start": 615, + "end": 647, "loc": { "start": { - "line": 28, + "line": 26, "column": 11 }, "end": { - "line": 28, + "line": 26, "column": 43 } }, "left": { "type": "BinaryExpression", - "start": 681, - "end": 697, + "start": 615, + "end": 631, "loc": { "start": { - "line": 28, + "line": 26, "column": 11 }, "end": { - "line": 28, + "line": 26, "column": 27 } }, "left": { "type": "Identifier", - "start": 681, - "end": 685, + "start": 615, + "end": 619, "loc": { "start": { - "line": 28, + "line": 26, "column": 11 }, "end": { - "line": 28, + "line": 26, "column": 15 }, "identifierName": "name" @@ -627,15 +607,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 688, - "end": 697, + "start": 622, + "end": 631, "loc": { "start": { - "line": 28, + "line": 26, "column": 18 }, "end": { - "line": 28, + "line": 26, "column": 27 } }, @@ -649,43 +629,43 @@ "operator": "+", "right": { "type": "CallExpression", - "start": 700, - "end": 713, + "start": 634, + "end": 647, "loc": { "start": { - "line": 28, + "line": 26, "column": 30 }, "end": { - "line": 28, + "line": 26, "column": 43 } }, "callee": { "type": "MemberExpression", - "start": 700, - "end": 711, + "start": 634, + "end": 645, "loc": { "start": { - "line": 28, + "line": 26, "column": 30 }, "end": { - "line": 28, + "line": 26, "column": 41 } }, "object": { "type": "Identifier", - "start": 700, - "end": 704, + "start": 634, + "end": 638, "loc": { "start": { - "line": 28, + "line": 26, "column": 30 }, "end": { - "line": 28, + "line": 26, "column": 34 }, "identifierName": "Math" @@ -694,15 +674,15 @@ }, "property": { "type": "Identifier", - "start": 705, - "end": 711, + "start": 639, + "end": 645, "loc": { "start": { - "line": 28, + "line": 26, "column": 35 }, "end": { - "line": 28, + "line": 26, "column": 41 }, "identifierName": "random" @@ -717,15 +697,15 @@ "operator": "+", "right": { "type": "StringLiteral", - "start": 716, - "end": 722, + "start": 650, + "end": 656, "loc": { "start": { - "line": 28, + "line": 26, "column": 46 }, "end": { - "line": 28, + "line": 26, "column": 52 } }, @@ -744,15 +724,15 @@ { "type": "CommentBlock", "value": "*\n * Returns a customized Hello Message\n * @param {HapiRequest} request Request Parameters\n * @return {String} Customized Hello Message\n ", - "start": 446, - "end": 604, + "start": 380, + "end": 538, "loc": { "start": { - "line": 19, + "line": 17, "column": 2 }, "end": { - "line": 23, + "line": 21, "column": 5 } } @@ -765,15 +745,15 @@ { "type": "CommentBlock", "value": "*\n * Controllers for Basic \"Hello World\" Functions\n *\n * See https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition\n ", - "start": 140, - "end": 291, + "start": 74, + "end": 225, "loc": { "start": { - "line": 5, + "line": 3, "column": 0 }, "end": { - "line": 9, + "line": 7, "column": 3 } } @@ -785,15 +765,15 @@ { "type": "CommentBlock", "value": "*\n * Controllers for Basic \"Hello World\" Functions\n *\n * See https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition\n ", - "start": 140, - "end": 291, + "start": 74, + "end": 225, "loc": { "start": { - "line": 5, + "line": 3, "column": 0 }, "end": { - "line": 9, + "line": 7, "column": 3 } } @@ -802,59 +782,59 @@ }, { "type": "ExportDefaultDeclaration", - "start": 731, - "end": 1053, + "start": 665, + "end": 987, "loc": { "start": { - "line": 32, + "line": 30, "column": 0 }, "end": { - "line": 47, + "line": 45, "column": 3 } }, "declaration": { "type": "ArrayExpression", - "start": 746, - "end": 1052, + "start": 680, + "end": 986, "loc": { "start": { - "line": 32, + "line": 30, "column": 15 }, "end": { - "line": 47, + "line": 45, "column": 2 } }, "elements": [ { "type": "ObjectExpression", - "start": 747, - "end": 816, + "start": 681, + "end": 750, "loc": { "start": { - "line": 32, + "line": 30, "column": 16 }, "end": { - "line": 36, + "line": 34, "column": 1 } }, "properties": [ { "type": "ObjectProperty", - "start": 751, - "end": 765, + "start": 685, + "end": 699, "loc": { "start": { - "line": 33, + "line": 31, "column": 2 }, "end": { - "line": 33, + "line": 31, "column": 16 } }, @@ -863,15 +843,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 751, - "end": 755, + "start": 685, + "end": 689, "loc": { "start": { - "line": 33, + "line": 31, "column": 2 }, "end": { - "line": 33, + "line": 31, "column": 6 }, "identifierName": "path" @@ -880,15 +860,15 @@ }, "value": { "type": "StringLiteral", - "start": 757, - "end": 765, + "start": 691, + "end": 699, "loc": { "start": { - "line": 33, + "line": 31, "column": 8 }, "end": { - "line": 33, + "line": 31, "column": 16 } }, @@ -901,15 +881,15 @@ }, { "type": "ObjectProperty", - "start": 769, - "end": 782, + "start": 703, + "end": 716, "loc": { "start": { - "line": 34, + "line": 32, "column": 2 }, "end": { - "line": 34, + "line": 32, "column": 15 } }, @@ -918,15 +898,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 769, - "end": 775, + "start": 703, + "end": 709, "loc": { "start": { - "line": 34, + "line": 32, "column": 2 }, "end": { - "line": 34, + "line": 32, "column": 8 }, "identifierName": "method" @@ -935,15 +915,15 @@ }, "value": { "type": "StringLiteral", - "start": 777, - "end": 782, + "start": 711, + "end": 716, "loc": { "start": { - "line": 34, + "line": 32, "column": 10 }, "end": { - "line": 34, + "line": 32, "column": 15 } }, @@ -956,15 +936,15 @@ }, { "type": "ObjectProperty", - "start": 786, - "end": 814, + "start": 720, + "end": 748, "loc": { "start": { - "line": 35, + "line": 33, "column": 2 }, "end": { - "line": 35, + "line": 33, "column": 30 } }, @@ -973,15 +953,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 786, - "end": 796, + "start": 720, + "end": 730, "loc": { "start": { - "line": 35, + "line": 33, "column": 2 }, "end": { - "line": 35, + "line": 33, "column": 12 }, "identifierName": "controller" @@ -990,29 +970,29 @@ }, "value": { "type": "MemberExpression", - "start": 798, - "end": 814, + "start": 732, + "end": 748, "loc": { "start": { - "line": 35, + "line": 33, "column": 14 }, "end": { - "line": 35, + "line": 33, "column": 30 } }, "object": { "type": "Identifier", - "start": 798, - "end": 808, + "start": 732, + "end": 742, "loc": { "start": { - "line": 35, + "line": 33, "column": 14 }, "end": { - "line": 35, + "line": 33, "column": 24 }, "identifierName": "HelloWorld" @@ -1021,15 +1001,15 @@ }, "property": { "type": "Identifier", - "start": 809, - "end": 814, + "start": 743, + "end": 748, "loc": { "start": { - "line": 35, + "line": 33, "column": 25 }, "end": { - "line": 35, + "line": 33, "column": 30 }, "identifierName": "basic" @@ -1043,30 +1023,30 @@ }, { "type": "ObjectExpression", - "start": 818, - "end": 887, + "start": 752, + "end": 821, "loc": { "start": { - "line": 36, + "line": 34, "column": 3 }, "end": { - "line": 40, + "line": 38, "column": 1 } }, "properties": [ { "type": "ObjectProperty", - "start": 822, - "end": 837, + "start": 756, + "end": 771, "loc": { "start": { - "line": 37, + "line": 35, "column": 2 }, "end": { - "line": 37, + "line": 35, "column": 17 } }, @@ -1075,15 +1055,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 822, - "end": 826, + "start": 756, + "end": 760, "loc": { "start": { - "line": 37, + "line": 35, "column": 2 }, "end": { - "line": 37, + "line": 35, "column": 6 }, "identifierName": "path" @@ -1092,15 +1072,15 @@ }, "value": { "type": "StringLiteral", - "start": 828, - "end": 837, + "start": 762, + "end": 771, "loc": { "start": { - "line": 37, + "line": 35, "column": 8 }, "end": { - "line": 37, + "line": 35, "column": 17 } }, @@ -1113,15 +1093,15 @@ }, { "type": "ObjectProperty", - "start": 841, - "end": 854, + "start": 775, + "end": 788, "loc": { "start": { - "line": 38, + "line": 36, "column": 2 }, "end": { - "line": 38, + "line": 36, "column": 15 } }, @@ -1130,15 +1110,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 841, - "end": 847, + "start": 775, + "end": 781, "loc": { "start": { - "line": 38, + "line": 36, "column": 2 }, "end": { - "line": 38, + "line": 36, "column": 8 }, "identifierName": "method" @@ -1147,15 +1127,15 @@ }, "value": { "type": "StringLiteral", - "start": 849, - "end": 854, + "start": 783, + "end": 788, "loc": { "start": { - "line": 38, + "line": 36, "column": 10 }, "end": { - "line": 38, + "line": 36, "column": 15 } }, @@ -1168,15 +1148,15 @@ }, { "type": "ObjectProperty", - "start": 858, - "end": 885, + "start": 792, + "end": 819, "loc": { "start": { - "line": 39, + "line": 37, "column": 2 }, "end": { - "line": 39, + "line": 37, "column": 29 } }, @@ -1185,15 +1165,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 858, - "end": 868, + "start": 792, + "end": 802, "loc": { "start": { - "line": 39, + "line": 37, "column": 2 }, "end": { - "line": 39, + "line": 37, "column": 12 }, "identifierName": "controller" @@ -1202,29 +1182,29 @@ }, "value": { "type": "MemberExpression", - "start": 870, - "end": 885, + "start": 804, + "end": 819, "loc": { "start": { - "line": 39, + "line": 37, "column": 14 }, "end": { - "line": 39, + "line": 37, "column": 29 } }, "object": { "type": "Identifier", - "start": 870, - "end": 880, + "start": 804, + "end": 814, "loc": { "start": { - "line": 39, + "line": 37, "column": 14 }, "end": { - "line": 39, + "line": 37, "column": 24 }, "identifierName": "HelloWorld" @@ -1233,15 +1213,15 @@ }, "property": { "type": "Identifier", - "start": 881, - "end": 885, + "start": 815, + "end": 819, "loc": { "start": { - "line": 39, + "line": 37, "column": 25 }, "end": { - "line": 39, + "line": 37, "column": 29 }, "identifierName": "name" @@ -1255,30 +1235,30 @@ }, { "type": "ObjectExpression", - "start": 889, - "end": 1051, + "start": 823, + "end": 985, "loc": { "start": { - "line": 40, + "line": 38, "column": 3 }, "end": { - "line": 47, + "line": 45, "column": 1 } }, "properties": [ { "type": "ObjectProperty", - "start": 893, - "end": 907, + "start": 827, + "end": 841, "loc": { "start": { - "line": 41, + "line": 39, "column": 2 }, "end": { - "line": 41, + "line": 39, "column": 16 } }, @@ -1287,15 +1267,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 893, - "end": 897, + "start": 827, + "end": 831, "loc": { "start": { - "line": 41, + "line": 39, "column": 2 }, "end": { - "line": 41, + "line": 39, "column": 6 }, "identifierName": "path" @@ -1304,15 +1284,15 @@ }, "value": { "type": "StringLiteral", - "start": 899, - "end": 907, + "start": 833, + "end": 841, "loc": { "start": { - "line": 41, + "line": 39, "column": 8 }, "end": { - "line": 41, + "line": 39, "column": 16 } }, @@ -1325,15 +1305,15 @@ }, { "type": "ObjectProperty", - "start": 911, - "end": 924, + "start": 845, + "end": 858, "loc": { "start": { - "line": 42, + "line": 40, "column": 2 }, "end": { - "line": 42, + "line": 40, "column": 15 } }, @@ -1342,15 +1322,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 911, - "end": 917, + "start": 845, + "end": 851, "loc": { "start": { - "line": 42, + "line": 40, "column": 2 }, "end": { - "line": 42, + "line": 40, "column": 8 }, "identifierName": "method" @@ -1359,15 +1339,15 @@ }, "value": { "type": "StringLiteral", - "start": 919, - "end": 924, + "start": 853, + "end": 858, "loc": { "start": { - "line": 42, + "line": 40, "column": 10 }, "end": { - "line": 42, + "line": 40, "column": 15 } }, @@ -1380,15 +1360,15 @@ }, { "type": "ObjectProperty", - "start": 928, - "end": 1049, + "start": 862, + "end": 983, "loc": { "start": { - "line": 43, + "line": 41, "column": 2 }, "end": { - "line": 46, + "line": 44, "column": 3 } }, @@ -1397,15 +1377,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 928, - "end": 938, + "start": 862, + "end": 872, "loc": { "start": { - "line": 43, + "line": 41, "column": 2 }, "end": { - "line": 43, + "line": 41, "column": 12 }, "identifierName": "controller" @@ -1414,15 +1394,15 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 940, - "end": 1049, + "start": 874, + "end": 983, "loc": { "start": { - "line": 43, + "line": 41, "column": 14 }, "end": { - "line": 46, + "line": 44, "column": 3 } }, @@ -1433,15 +1413,15 @@ "params": [ { "type": "Identifier", - "start": 940, - "end": 947, + "start": 874, + "end": 881, "loc": { "start": { - "line": 43, + "line": 41, "column": 14 }, "end": { - "line": 43, + "line": 41, "column": 21 }, "identifierName": "request" @@ -1451,86 +1431,86 @@ ], "body": { "type": "BlockStatement", - "start": 951, - "end": 1049, + "start": 885, + "end": 983, "loc": { "start": { - "line": 43, + "line": 41, "column": 25 }, "end": { - "line": 46, + "line": 44, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 957, - "end": 996, + "start": 891, + "end": 930, "loc": { "start": { - "line": 44, + "line": 42, "column": 4 }, "end": { - "line": 44, + "line": 42, "column": 43 } }, "expression": { "type": "CallExpression", - "start": 957, - "end": 995, + "start": 891, + "end": 929, "loc": { "start": { - "line": 44, + "line": 42, "column": 4 }, "end": { - "line": 44, + "line": 42, "column": 42 } }, "callee": { "type": "MemberExpression", - "start": 957, - "end": 977, + "start": 891, + "end": 911, "loc": { "start": { - "line": 44, + "line": 42, "column": 4 }, "end": { - "line": 44, + "line": 42, "column": 24 } }, "object": { "type": "MemberExpression", - "start": 957, - "end": 971, + "start": 891, + "end": 905, "loc": { "start": { - "line": 44, + "line": 42, "column": 4 }, "end": { - "line": 44, + "line": 42, "column": 18 } }, "object": { "type": "Identifier", - "start": 957, - "end": 964, + "start": 891, + "end": 898, "loc": { "start": { - "line": 44, + "line": 42, "column": 4 }, "end": { - "line": 44, + "line": 42, "column": 11 }, "identifierName": "request" @@ -1539,15 +1519,15 @@ }, "property": { "type": "Identifier", - "start": 965, - "end": 971, + "start": 899, + "end": 905, "loc": { "start": { - "line": 44, + "line": 42, "column": 12 }, "end": { - "line": 44, + "line": 42, "column": 18 }, "identifierName": "logger" @@ -1558,15 +1538,15 @@ }, "property": { "type": "Identifier", - "start": 972, - "end": 977, + "start": 906, + "end": 911, "loc": { "start": { - "line": 44, + "line": 42, "column": 19 }, "end": { - "line": 44, + "line": 42, "column": 24 }, "identifierName": "error" @@ -1578,15 +1558,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 978, - "end": 994, + "start": 912, + "end": 928, "loc": { "start": { - "line": 44, + "line": 42, "column": 25 }, "end": { - "line": 44, + "line": 42, "column": 41 } }, @@ -1601,43 +1581,43 @@ }, { "type": "ThrowStatement", - "start": 1001, - "end": 1045, + "start": 935, + "end": 979, "loc": { "start": { - "line": 45, + "line": 43, "column": 4 }, "end": { - "line": 45, + "line": 43, "column": 48 } }, "argument": { "type": "NewExpression", - "start": 1007, - "end": 1044, + "start": 941, + "end": 978, "loc": { "start": { - "line": 45, + "line": 43, "column": 10 }, "end": { - "line": 45, + "line": 43, "column": 47 } }, "callee": { "type": "Identifier", - "start": 1011, - "end": 1016, + "start": 945, + "end": 950, "loc": { "start": { - "line": 45, + "line": 43, "column": 14 }, "end": { - "line": 45, + "line": 43, "column": 19 }, "identifierName": "Error" @@ -1647,15 +1627,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 1017, - "end": 1043, + "start": 951, + "end": 977, "loc": { "start": { - "line": 45, + "line": 43, "column": 20 }, "end": { - "line": 45, + "line": 43, "column": 46 } }, @@ -1684,34 +1664,18 @@ "directives": [] }, "comments": [ - { - "type": "CommentLine", - "value": " For some reason this can't use the `app` alias but can do relative pathing here... :/", - "start": 1, - "end": 89, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 88 - } - } - }, { "type": "CommentBlock", "value": "*\n * Controllers for Basic \"Hello World\" Functions\n *\n * See https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition\n ", - "start": 140, - "end": 291, + "start": 74, + "end": 225, "loc": { "start": { - "line": 5, + "line": 3, "column": 0 }, "end": { - "line": 9, + "line": 7, "column": 3 } } @@ -1719,15 +1683,15 @@ { "type": "CommentBlock", "value": "*\n * Returns 'Hello World!'\n * @return {String} Hello World!\n ", - "start": 320, - "end": 392, + "start": 254, + "end": 326, "loc": { "start": { - "line": 11, + "line": 9, "column": 2 }, "end": { - "line": 14, + "line": 12, "column": 5 } } @@ -1735,37 +1699,21 @@ { "type": "CommentBlock", "value": "*\n * Returns a customized Hello Message\n * @param {HapiRequest} request Request Parameters\n * @return {String} Customized Hello Message\n ", - "start": 446, - "end": 604, + "start": 380, + "end": 538, "loc": { "start": { - "line": 19, + "line": 17, "column": 2 }, "end": { - "line": 23, + "line": 21, "column": 5 } } } ], "tokens": [ - { - "type": "CommentLine", - "value": " For some reason this can't use the `app` alias but can do relative pathing here... :/", - "start": 1, - "end": 89, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 88 - } - } - }, { "type": { "label": "import", @@ -1781,15 +1729,15 @@ "updateContext": null }, "value": "import", - "start": 90, - "end": 96, + "start": 0, + "end": 6, "loc": { "start": { - "line": 3, + "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 1, "column": 6 } } @@ -1806,15 +1754,15 @@ "postfix": false, "binop": null }, - "start": 97, - "end": 98, + "start": 7, + "end": 8, "loc": { "start": { - "line": 3, + "line": 1, "column": 7 }, "end": { - "line": 3, + "line": 1, "column": 8 } } @@ -1832,15 +1780,15 @@ "binop": null }, "value": "HapiRequest", - "start": 99, - "end": 110, + "start": 9, + "end": 20, "loc": { "start": { - "line": 3, + "line": 1, "column": 9 }, "end": { - "line": 3, + "line": 1, "column": 20 } } @@ -1857,15 +1805,15 @@ "postfix": false, "binop": null }, - "start": 111, - "end": 112, + "start": 21, + "end": 22, "loc": { "start": { - "line": 3, + "line": 1, "column": 21 }, "end": { - "line": 3, + "line": 1, "column": 22 } } @@ -1883,15 +1831,15 @@ "binop": null }, "value": "from", - "start": 113, - "end": 117, + "start": 23, + "end": 27, "loc": { "start": { - "line": 3, + "line": 1, "column": 23 }, "end": { - "line": 3, + "line": 1, "column": 27 } } @@ -1909,17 +1857,17 @@ "binop": null, "updateContext": null }, - "value": "../base/server.js", - "start": 118, - "end": 137, + "value": "../base/request/hapi-request.interface.js", + "start": 28, + "end": 71, "loc": { "start": { - "line": 3, + "line": 1, "column": 28 }, "end": { - "line": 3, - "column": 47 + "line": 1, + "column": 71 } } }, @@ -1936,31 +1884,31 @@ "binop": null, "updateContext": null }, - "start": 137, - "end": 138, + "start": 71, + "end": 72, "loc": { "start": { - "line": 3, - "column": 47 + "line": 1, + "column": 71 }, "end": { - "line": 3, - "column": 48 + "line": 1, + "column": 72 } } }, { "type": "CommentBlock", "value": "*\n * Controllers for Basic \"Hello World\" Functions\n *\n * See https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition\n ", - "start": 140, - "end": 291, + "start": 74, + "end": 225, "loc": { "start": { - "line": 5, + "line": 3, "column": 0 }, "end": { - "line": 9, + "line": 7, "column": 3 } } @@ -1980,15 +1928,15 @@ "updateContext": null }, "value": "export", - "start": 292, - "end": 298, + "start": 226, + "end": 232, "loc": { "start": { - "line": 10, + "line": 8, "column": 0 }, "end": { - "line": 10, + "line": 8, "column": 6 } } @@ -2008,15 +1956,15 @@ "updateContext": null }, "value": "class", - "start": 299, - "end": 304, + "start": 233, + "end": 238, "loc": { "start": { - "line": 10, + "line": 8, "column": 7 }, "end": { - "line": 10, + "line": 8, "column": 12 } } @@ -2034,15 +1982,15 @@ "binop": null }, "value": "HelloWorld", - "start": 305, - "end": 315, + "start": 239, + "end": 249, "loc": { "start": { - "line": 10, + "line": 8, "column": 13 }, "end": { - "line": 10, + "line": 8, "column": 23 } } @@ -2059,15 +2007,15 @@ "postfix": false, "binop": null }, - "start": 316, - "end": 317, + "start": 250, + "end": 251, "loc": { "start": { - "line": 10, + "line": 8, "column": 24 }, "end": { - "line": 10, + "line": 8, "column": 25 } } @@ -2075,15 +2023,15 @@ { "type": "CommentBlock", "value": "*\n * Returns 'Hello World!'\n * @return {String} Hello World!\n ", - "start": 320, - "end": 392, + "start": 254, + "end": 326, "loc": { "start": { - "line": 11, + "line": 9, "column": 2 }, "end": { - "line": 14, + "line": 12, "column": 5 } } @@ -2101,15 +2049,15 @@ "binop": null }, "value": "static", - "start": 395, - "end": 401, + "start": 329, + "end": 335, "loc": { "start": { - "line": 15, + "line": 13, "column": 2 }, "end": { - "line": 15, + "line": 13, "column": 8 } } @@ -2127,15 +2075,15 @@ "binop": null }, "value": "basic", - "start": 402, - "end": 407, + "start": 336, + "end": 341, "loc": { "start": { - "line": 15, + "line": 13, "column": 9 }, "end": { - "line": 15, + "line": 13, "column": 14 } } @@ -2152,15 +2100,15 @@ "postfix": false, "binop": null }, - "start": 407, - "end": 408, + "start": 341, + "end": 342, "loc": { "start": { - "line": 15, + "line": 13, "column": 14 }, "end": { - "line": 15, + "line": 13, "column": 15 } } @@ -2177,15 +2125,15 @@ "postfix": false, "binop": null }, - "start": 408, - "end": 409, + "start": 342, + "end": 343, "loc": { "start": { - "line": 15, + "line": 13, "column": 15 }, "end": { - "line": 15, + "line": 13, "column": 16 } } @@ -2202,15 +2150,15 @@ "postfix": false, "binop": null }, - "start": 410, - "end": 411, + "start": 344, + "end": 345, "loc": { "start": { - "line": 15, + "line": 13, "column": 17 }, "end": { - "line": 15, + "line": 13, "column": 18 } } @@ -2230,15 +2178,15 @@ "updateContext": null }, "value": "return", - "start": 416, - "end": 422, + "start": 350, + "end": 356, "loc": { "start": { - "line": 16, + "line": 14, "column": 4 }, "end": { - "line": 16, + "line": 14, "column": 10 } } @@ -2257,15 +2205,15 @@ "updateContext": null }, "value": "Hello World!", - "start": 423, - "end": 437, + "start": 357, + "end": 371, "loc": { "start": { - "line": 16, + "line": 14, "column": 11 }, "end": { - "line": 16, + "line": 14, "column": 25 } } @@ -2283,15 +2231,15 @@ "binop": null, "updateContext": null }, - "start": 437, - "end": 438, + "start": 371, + "end": 372, "loc": { "start": { - "line": 16, + "line": 14, "column": 25 }, "end": { - "line": 16, + "line": 14, "column": 26 } } @@ -2308,15 +2256,15 @@ "postfix": false, "binop": null }, - "start": 441, - "end": 442, + "start": 375, + "end": 376, "loc": { "start": { - "line": 17, + "line": 15, "column": 2 }, "end": { - "line": 17, + "line": 15, "column": 3 } } @@ -2324,15 +2272,15 @@ { "type": "CommentBlock", "value": "*\n * Returns a customized Hello Message\n * @param {HapiRequest} request Request Parameters\n * @return {String} Customized Hello Message\n ", - "start": 446, - "end": 604, + "start": 380, + "end": 538, "loc": { "start": { - "line": 19, + "line": 17, "column": 2 }, "end": { - "line": 23, + "line": 21, "column": 5 } } @@ -2350,15 +2298,15 @@ "binop": null }, "value": "static", - "start": 607, - "end": 613, + "start": 541, + "end": 547, "loc": { "start": { - "line": 24, + "line": 22, "column": 2 }, "end": { - "line": 24, + "line": 22, "column": 8 } } @@ -2376,15 +2324,15 @@ "binop": null }, "value": "name", - "start": 614, - "end": 618, + "start": 548, + "end": 552, "loc": { "start": { - "line": 24, + "line": 22, "column": 9 }, "end": { - "line": 24, + "line": 22, "column": 13 } } @@ -2401,15 +2349,15 @@ "postfix": false, "binop": null }, - "start": 618, - "end": 619, + "start": 552, + "end": 553, "loc": { "start": { - "line": 24, + "line": 22, "column": 13 }, "end": { - "line": 24, + "line": 22, "column": 14 } } @@ -2427,15 +2375,15 @@ "binop": null }, "value": "request", - "start": 619, - "end": 626, + "start": 553, + "end": 560, "loc": { "start": { - "line": 24, + "line": 22, "column": 14 }, "end": { - "line": 24, + "line": 22, "column": 21 } } @@ -2452,15 +2400,15 @@ "postfix": false, "binop": null }, - "start": 626, - "end": 627, + "start": 560, + "end": 561, "loc": { "start": { - "line": 24, + "line": 22, "column": 21 }, "end": { - "line": 24, + "line": 22, "column": 22 } } @@ -2477,15 +2425,15 @@ "postfix": false, "binop": null }, - "start": 628, - "end": 629, + "start": 562, + "end": 563, "loc": { "start": { - "line": 24, + "line": 22, "column": 23 }, "end": { - "line": 24, + "line": 22, "column": 24 } } @@ -2505,15 +2453,15 @@ "updateContext": null }, "value": "const", - "start": 635, - "end": 640, + "start": 569, + "end": 574, "loc": { "start": { - "line": 26, + "line": 24, "column": 4 }, "end": { - "line": 26, + "line": 24, "column": 9 } } @@ -2531,15 +2479,15 @@ "binop": null }, "value": "name", - "start": 641, - "end": 645, + "start": 575, + "end": 579, "loc": { "start": { - "line": 26, + "line": 24, "column": 10 }, "end": { - "line": 26, + "line": 24, "column": 14 } } @@ -2558,15 +2506,15 @@ "updateContext": null }, "value": "=", - "start": 646, - "end": 647, + "start": 580, + "end": 581, "loc": { "start": { - "line": 26, + "line": 24, "column": 15 }, "end": { - "line": 26, + "line": 24, "column": 16 } } @@ -2584,15 +2532,15 @@ "binop": null }, "value": "request", - "start": 648, - "end": 655, + "start": 582, + "end": 589, "loc": { "start": { - "line": 26, + "line": 24, "column": 17 }, "end": { - "line": 26, + "line": 24, "column": 24 } } @@ -2610,15 +2558,15 @@ "binop": null, "updateContext": null }, - "start": 655, - "end": 656, + "start": 589, + "end": 590, "loc": { "start": { - "line": 26, + "line": 24, "column": 24 }, "end": { - "line": 26, + "line": 24, "column": 25 } } @@ -2636,15 +2584,15 @@ "binop": null }, "value": "params", - "start": 656, - "end": 662, + "start": 590, + "end": 596, "loc": { "start": { - "line": 26, + "line": 24, "column": 25 }, "end": { - "line": 26, + "line": 24, "column": 31 } } @@ -2662,15 +2610,15 @@ "binop": null, "updateContext": null }, - "start": 662, - "end": 663, + "start": 596, + "end": 597, "loc": { "start": { - "line": 26, + "line": 24, "column": 31 }, "end": { - "line": 26, + "line": 24, "column": 32 } } @@ -2688,15 +2636,15 @@ "binop": null }, "value": "name", - "start": 663, - "end": 667, + "start": 597, + "end": 601, "loc": { "start": { - "line": 26, + "line": 24, "column": 32 }, "end": { - "line": 26, + "line": 24, "column": 36 } } @@ -2714,15 +2662,15 @@ "binop": null, "updateContext": null }, - "start": 667, - "end": 668, + "start": 601, + "end": 602, "loc": { "start": { - "line": 26, + "line": 24, "column": 36 }, "end": { - "line": 26, + "line": 24, "column": 37 } } @@ -2742,15 +2690,15 @@ "updateContext": null }, "value": "return", - "start": 674, - "end": 680, + "start": 608, + "end": 614, "loc": { "start": { - "line": 28, + "line": 26, "column": 4 }, "end": { - "line": 28, + "line": 26, "column": 10 } } @@ -2768,15 +2716,15 @@ "binop": null }, "value": "name", - "start": 681, - "end": 685, + "start": 615, + "end": 619, "loc": { "start": { - "line": 28, + "line": 26, "column": 11 }, "end": { - "line": 28, + "line": 26, "column": 15 } } @@ -2795,15 +2743,15 @@ "updateContext": null }, "value": "+", - "start": 686, - "end": 687, + "start": 620, + "end": 621, "loc": { "start": { - "line": 28, + "line": 26, "column": 16 }, "end": { - "line": 28, + "line": 26, "column": 17 } } @@ -2822,15 +2770,15 @@ "updateContext": null }, "value": " says: ", - "start": 688, - "end": 697, + "start": 622, + "end": 631, "loc": { "start": { - "line": 28, + "line": 26, "column": 18 }, "end": { - "line": 28, + "line": 26, "column": 27 } } @@ -2849,15 +2797,15 @@ "updateContext": null }, "value": "+", - "start": 698, - "end": 699, + "start": 632, + "end": 633, "loc": { "start": { - "line": 28, + "line": 26, "column": 28 }, "end": { - "line": 28, + "line": 26, "column": 29 } } @@ -2875,15 +2823,15 @@ "binop": null }, "value": "Math", - "start": 700, - "end": 704, + "start": 634, + "end": 638, "loc": { "start": { - "line": 28, + "line": 26, "column": 30 }, "end": { - "line": 28, + "line": 26, "column": 34 } } @@ -2901,15 +2849,15 @@ "binop": null, "updateContext": null }, - "start": 704, - "end": 705, + "start": 638, + "end": 639, "loc": { "start": { - "line": 28, + "line": 26, "column": 34 }, "end": { - "line": 28, + "line": 26, "column": 35 } } @@ -2927,15 +2875,15 @@ "binop": null }, "value": "random", - "start": 705, - "end": 711, + "start": 639, + "end": 645, "loc": { "start": { - "line": 28, + "line": 26, "column": 35 }, "end": { - "line": 28, + "line": 26, "column": 41 } } @@ -2952,15 +2900,15 @@ "postfix": false, "binop": null }, - "start": 711, - "end": 712, + "start": 645, + "end": 646, "loc": { "start": { - "line": 28, + "line": 26, "column": 41 }, "end": { - "line": 28, + "line": 26, "column": 42 } } @@ -2977,15 +2925,15 @@ "postfix": false, "binop": null }, - "start": 712, - "end": 713, + "start": 646, + "end": 647, "loc": { "start": { - "line": 28, + "line": 26, "column": 42 }, "end": { - "line": 28, + "line": 26, "column": 43 } } @@ -3004,15 +2952,15 @@ "updateContext": null }, "value": "+", - "start": 714, - "end": 715, + "start": 648, + "end": 649, "loc": { "start": { - "line": 28, + "line": 26, "column": 44 }, "end": { - "line": 28, + "line": 26, "column": 45 } } @@ -3031,15 +2979,15 @@ "updateContext": null }, "value": "!!!!", - "start": 716, - "end": 722, + "start": 650, + "end": 656, "loc": { "start": { - "line": 28, + "line": 26, "column": 46 }, "end": { - "line": 28, + "line": 26, "column": 52 } } @@ -3057,15 +3005,15 @@ "binop": null, "updateContext": null }, - "start": 722, - "end": 723, + "start": 656, + "end": 657, "loc": { "start": { - "line": 28, + "line": 26, "column": 52 }, "end": { - "line": 28, + "line": 26, "column": 53 } } @@ -3082,15 +3030,15 @@ "postfix": false, "binop": null }, - "start": 726, - "end": 727, + "start": 660, + "end": 661, "loc": { "start": { - "line": 29, + "line": 27, "column": 2 }, "end": { - "line": 29, + "line": 27, "column": 3 } } @@ -3107,15 +3055,15 @@ "postfix": false, "binop": null }, - "start": 728, - "end": 729, + "start": 662, + "end": 663, "loc": { "start": { - "line": 30, + "line": 28, "column": 0 }, "end": { - "line": 30, + "line": 28, "column": 1 } } @@ -3135,15 +3083,15 @@ "updateContext": null }, "value": "export", - "start": 731, - "end": 737, + "start": 665, + "end": 671, "loc": { "start": { - "line": 32, + "line": 30, "column": 0 }, "end": { - "line": 32, + "line": 30, "column": 6 } } @@ -3163,15 +3111,15 @@ "updateContext": null }, "value": "default", - "start": 738, - "end": 745, + "start": 672, + "end": 679, "loc": { "start": { - "line": 32, + "line": 30, "column": 7 }, "end": { - "line": 32, + "line": 30, "column": 14 } } @@ -3189,15 +3137,15 @@ "binop": null, "updateContext": null }, - "start": 746, - "end": 747, + "start": 680, + "end": 681, "loc": { "start": { - "line": 32, + "line": 30, "column": 15 }, "end": { - "line": 32, + "line": 30, "column": 16 } } @@ -3214,15 +3162,15 @@ "postfix": false, "binop": null }, - "start": 747, - "end": 748, + "start": 681, + "end": 682, "loc": { "start": { - "line": 32, + "line": 30, "column": 16 }, "end": { - "line": 32, + "line": 30, "column": 17 } } @@ -3240,15 +3188,15 @@ "binop": null }, "value": "path", - "start": 751, - "end": 755, + "start": 685, + "end": 689, "loc": { "start": { - "line": 33, + "line": 31, "column": 2 }, "end": { - "line": 33, + "line": 31, "column": 6 } } @@ -3266,15 +3214,15 @@ "binop": null, "updateContext": null }, - "start": 755, - "end": 756, + "start": 689, + "end": 690, "loc": { "start": { - "line": 33, + "line": 31, "column": 6 }, "end": { - "line": 33, + "line": 31, "column": 7 } } @@ -3293,15 +3241,15 @@ "updateContext": null }, "value": "/hello", - "start": 757, - "end": 765, + "start": 691, + "end": 699, "loc": { "start": { - "line": 33, + "line": 31, "column": 8 }, "end": { - "line": 33, + "line": 31, "column": 16 } } @@ -3319,15 +3267,15 @@ "binop": null, "updateContext": null }, - "start": 765, - "end": 766, + "start": 699, + "end": 700, "loc": { "start": { - "line": 33, + "line": 31, "column": 16 }, "end": { - "line": 33, + "line": 31, "column": 17 } } @@ -3345,15 +3293,15 @@ "binop": null }, "value": "method", - "start": 769, - "end": 775, + "start": 703, + "end": 709, "loc": { "start": { - "line": 34, + "line": 32, "column": 2 }, "end": { - "line": 34, + "line": 32, "column": 8 } } @@ -3371,15 +3319,15 @@ "binop": null, "updateContext": null }, - "start": 775, - "end": 776, + "start": 709, + "end": 710, "loc": { "start": { - "line": 34, + "line": 32, "column": 8 }, "end": { - "line": 34, + "line": 32, "column": 9 } } @@ -3398,15 +3346,15 @@ "updateContext": null }, "value": "GET", - "start": 777, - "end": 782, + "start": 711, + "end": 716, "loc": { "start": { - "line": 34, + "line": 32, "column": 10 }, "end": { - "line": 34, + "line": 32, "column": 15 } } @@ -3424,15 +3372,15 @@ "binop": null, "updateContext": null }, - "start": 782, - "end": 783, + "start": 716, + "end": 717, "loc": { "start": { - "line": 34, + "line": 32, "column": 15 }, "end": { - "line": 34, + "line": 32, "column": 16 } } @@ -3450,15 +3398,15 @@ "binop": null }, "value": "controller", - "start": 786, - "end": 796, + "start": 720, + "end": 730, "loc": { "start": { - "line": 35, + "line": 33, "column": 2 }, "end": { - "line": 35, + "line": 33, "column": 12 } } @@ -3476,15 +3424,15 @@ "binop": null, "updateContext": null }, - "start": 796, - "end": 797, + "start": 730, + "end": 731, "loc": { "start": { - "line": 35, + "line": 33, "column": 12 }, "end": { - "line": 35, + "line": 33, "column": 13 } } @@ -3502,15 +3450,15 @@ "binop": null }, "value": "HelloWorld", - "start": 798, - "end": 808, + "start": 732, + "end": 742, "loc": { "start": { - "line": 35, + "line": 33, "column": 14 }, "end": { - "line": 35, + "line": 33, "column": 24 } } @@ -3528,15 +3476,15 @@ "binop": null, "updateContext": null }, - "start": 808, - "end": 809, + "start": 742, + "end": 743, "loc": { "start": { - "line": 35, + "line": 33, "column": 24 }, "end": { - "line": 35, + "line": 33, "column": 25 } } @@ -3554,15 +3502,15 @@ "binop": null }, "value": "basic", - "start": 809, - "end": 814, + "start": 743, + "end": 748, "loc": { "start": { - "line": 35, + "line": 33, "column": 25 }, "end": { - "line": 35, + "line": 33, "column": 30 } } @@ -3579,15 +3527,15 @@ "postfix": false, "binop": null }, - "start": 815, - "end": 816, + "start": 749, + "end": 750, "loc": { "start": { - "line": 36, + "line": 34, "column": 0 }, "end": { - "line": 36, + "line": 34, "column": 1 } } @@ -3605,15 +3553,15 @@ "binop": null, "updateContext": null }, - "start": 816, - "end": 817, + "start": 750, + "end": 751, "loc": { "start": { - "line": 36, + "line": 34, "column": 1 }, "end": { - "line": 36, + "line": 34, "column": 2 } } @@ -3630,15 +3578,15 @@ "postfix": false, "binop": null }, - "start": 818, - "end": 819, + "start": 752, + "end": 753, "loc": { "start": { - "line": 36, + "line": 34, "column": 3 }, "end": { - "line": 36, + "line": 34, "column": 4 } } @@ -3656,15 +3604,15 @@ "binop": null }, "value": "path", - "start": 822, - "end": 826, + "start": 756, + "end": 760, "loc": { "start": { - "line": 37, + "line": 35, "column": 2 }, "end": { - "line": 37, + "line": 35, "column": 6 } } @@ -3682,15 +3630,15 @@ "binop": null, "updateContext": null }, - "start": 826, - "end": 827, + "start": 760, + "end": 761, "loc": { "start": { - "line": 37, + "line": 35, "column": 6 }, "end": { - "line": 37, + "line": 35, "column": 7 } } @@ -3709,15 +3657,15 @@ "updateContext": null }, "value": "/{name}", - "start": 828, - "end": 837, + "start": 762, + "end": 771, "loc": { "start": { - "line": 37, + "line": 35, "column": 8 }, "end": { - "line": 37, + "line": 35, "column": 17 } } @@ -3735,15 +3683,15 @@ "binop": null, "updateContext": null }, - "start": 837, - "end": 838, + "start": 771, + "end": 772, "loc": { "start": { - "line": 37, + "line": 35, "column": 17 }, "end": { - "line": 37, + "line": 35, "column": 18 } } @@ -3761,15 +3709,15 @@ "binop": null }, "value": "method", - "start": 841, - "end": 847, + "start": 775, + "end": 781, "loc": { "start": { - "line": 38, + "line": 36, "column": 2 }, "end": { - "line": 38, + "line": 36, "column": 8 } } @@ -3787,15 +3735,15 @@ "binop": null, "updateContext": null }, - "start": 847, - "end": 848, + "start": 781, + "end": 782, "loc": { "start": { - "line": 38, + "line": 36, "column": 8 }, "end": { - "line": 38, + "line": 36, "column": 9 } } @@ -3814,15 +3762,15 @@ "updateContext": null }, "value": "GET", - "start": 849, - "end": 854, + "start": 783, + "end": 788, "loc": { "start": { - "line": 38, + "line": 36, "column": 10 }, "end": { - "line": 38, + "line": 36, "column": 15 } } @@ -3840,15 +3788,15 @@ "binop": null, "updateContext": null }, - "start": 854, - "end": 855, + "start": 788, + "end": 789, "loc": { "start": { - "line": 38, + "line": 36, "column": 15 }, "end": { - "line": 38, + "line": 36, "column": 16 } } @@ -3866,15 +3814,15 @@ "binop": null }, "value": "controller", - "start": 858, - "end": 868, + "start": 792, + "end": 802, "loc": { "start": { - "line": 39, + "line": 37, "column": 2 }, "end": { - "line": 39, + "line": 37, "column": 12 } } @@ -3892,15 +3840,15 @@ "binop": null, "updateContext": null }, - "start": 868, - "end": 869, + "start": 802, + "end": 803, "loc": { "start": { - "line": 39, + "line": 37, "column": 12 }, "end": { - "line": 39, + "line": 37, "column": 13 } } @@ -3918,15 +3866,15 @@ "binop": null }, "value": "HelloWorld", - "start": 870, - "end": 880, + "start": 804, + "end": 814, "loc": { "start": { - "line": 39, + "line": 37, "column": 14 }, "end": { - "line": 39, + "line": 37, "column": 24 } } @@ -3944,15 +3892,15 @@ "binop": null, "updateContext": null }, - "start": 880, - "end": 881, + "start": 814, + "end": 815, "loc": { "start": { - "line": 39, + "line": 37, "column": 24 }, "end": { - "line": 39, + "line": 37, "column": 25 } } @@ -3970,15 +3918,15 @@ "binop": null }, "value": "name", - "start": 881, - "end": 885, + "start": 815, + "end": 819, "loc": { "start": { - "line": 39, + "line": 37, "column": 25 }, "end": { - "line": 39, + "line": 37, "column": 29 } } @@ -3995,15 +3943,15 @@ "postfix": false, "binop": null }, - "start": 886, - "end": 887, + "start": 820, + "end": 821, "loc": { "start": { - "line": 40, + "line": 38, "column": 0 }, "end": { - "line": 40, + "line": 38, "column": 1 } } @@ -4021,15 +3969,15 @@ "binop": null, "updateContext": null }, - "start": 887, - "end": 888, + "start": 821, + "end": 822, "loc": { "start": { - "line": 40, + "line": 38, "column": 1 }, "end": { - "line": 40, + "line": 38, "column": 2 } } @@ -4046,15 +3994,15 @@ "postfix": false, "binop": null }, - "start": 889, - "end": 890, + "start": 823, + "end": 824, "loc": { "start": { - "line": 40, + "line": 38, "column": 3 }, "end": { - "line": 40, + "line": 38, "column": 4 } } @@ -4072,15 +4020,15 @@ "binop": null }, "value": "path", - "start": 893, - "end": 897, + "start": 827, + "end": 831, "loc": { "start": { - "line": 41, + "line": 39, "column": 2 }, "end": { - "line": 41, + "line": 39, "column": 6 } } @@ -4098,15 +4046,15 @@ "binop": null, "updateContext": null }, - "start": 897, - "end": 898, + "start": 831, + "end": 832, "loc": { "start": { - "line": 41, + "line": 39, "column": 6 }, "end": { - "line": 41, + "line": 39, "column": 7 } } @@ -4125,15 +4073,15 @@ "updateContext": null }, "value": "/error", - "start": 899, - "end": 907, + "start": 833, + "end": 841, "loc": { "start": { - "line": 41, + "line": 39, "column": 8 }, "end": { - "line": 41, + "line": 39, "column": 16 } } @@ -4151,15 +4099,15 @@ "binop": null, "updateContext": null }, - "start": 907, - "end": 908, + "start": 841, + "end": 842, "loc": { "start": { - "line": 41, + "line": 39, "column": 16 }, "end": { - "line": 41, + "line": 39, "column": 17 } } @@ -4177,15 +4125,15 @@ "binop": null }, "value": "method", - "start": 911, - "end": 917, + "start": 845, + "end": 851, "loc": { "start": { - "line": 42, + "line": 40, "column": 2 }, "end": { - "line": 42, + "line": 40, "column": 8 } } @@ -4203,15 +4151,15 @@ "binop": null, "updateContext": null }, - "start": 917, - "end": 918, + "start": 851, + "end": 852, "loc": { "start": { - "line": 42, + "line": 40, "column": 8 }, "end": { - "line": 42, + "line": 40, "column": 9 } } @@ -4230,15 +4178,15 @@ "updateContext": null }, "value": "GET", - "start": 919, - "end": 924, + "start": 853, + "end": 858, "loc": { "start": { - "line": 42, + "line": 40, "column": 10 }, "end": { - "line": 42, + "line": 40, "column": 15 } } @@ -4256,15 +4204,15 @@ "binop": null, "updateContext": null }, - "start": 924, - "end": 925, + "start": 858, + "end": 859, "loc": { "start": { - "line": 42, + "line": 40, "column": 15 }, "end": { - "line": 42, + "line": 40, "column": 16 } } @@ -4282,15 +4230,15 @@ "binop": null }, "value": "controller", - "start": 928, - "end": 938, + "start": 862, + "end": 872, "loc": { "start": { - "line": 43, + "line": 41, "column": 2 }, "end": { - "line": 43, + "line": 41, "column": 12 } } @@ -4308,15 +4256,15 @@ "binop": null, "updateContext": null }, - "start": 938, - "end": 939, + "start": 872, + "end": 873, "loc": { "start": { - "line": 43, + "line": 41, "column": 12 }, "end": { - "line": 43, + "line": 41, "column": 13 } } @@ -4334,15 +4282,15 @@ "binop": null }, "value": "request", - "start": 940, - "end": 947, + "start": 874, + "end": 881, "loc": { "start": { - "line": 43, + "line": 41, "column": 14 }, "end": { - "line": 43, + "line": 41, "column": 21 } } @@ -4360,15 +4308,15 @@ "binop": null, "updateContext": null }, - "start": 948, - "end": 950, + "start": 882, + "end": 884, "loc": { "start": { - "line": 43, + "line": 41, "column": 22 }, "end": { - "line": 43, + "line": 41, "column": 24 } } @@ -4385,15 +4333,15 @@ "postfix": false, "binop": null }, - "start": 951, - "end": 952, + "start": 885, + "end": 886, "loc": { "start": { - "line": 43, + "line": 41, "column": 25 }, "end": { - "line": 43, + "line": 41, "column": 26 } } @@ -4411,15 +4359,15 @@ "binop": null }, "value": "request", - "start": 957, - "end": 964, + "start": 891, + "end": 898, "loc": { "start": { - "line": 44, + "line": 42, "column": 4 }, "end": { - "line": 44, + "line": 42, "column": 11 } } @@ -4437,15 +4385,15 @@ "binop": null, "updateContext": null }, - "start": 964, - "end": 965, + "start": 898, + "end": 899, "loc": { "start": { - "line": 44, + "line": 42, "column": 11 }, "end": { - "line": 44, + "line": 42, "column": 12 } } @@ -4463,15 +4411,15 @@ "binop": null }, "value": "logger", - "start": 965, - "end": 971, + "start": 899, + "end": 905, "loc": { "start": { - "line": 44, + "line": 42, "column": 12 }, "end": { - "line": 44, + "line": 42, "column": 18 } } @@ -4489,15 +4437,15 @@ "binop": null, "updateContext": null }, - "start": 971, - "end": 972, + "start": 905, + "end": 906, "loc": { "start": { - "line": 44, + "line": 42, "column": 18 }, "end": { - "line": 44, + "line": 42, "column": 19 } } @@ -4515,15 +4463,15 @@ "binop": null }, "value": "error", - "start": 972, - "end": 977, + "start": 906, + "end": 911, "loc": { "start": { - "line": 44, + "line": 42, "column": 19 }, "end": { - "line": 44, + "line": 42, "column": 24 } } @@ -4540,15 +4488,15 @@ "postfix": false, "binop": null }, - "start": 977, - "end": 978, + "start": 911, + "end": 912, "loc": { "start": { - "line": 44, + "line": 42, "column": 24 }, "end": { - "line": 44, + "line": 42, "column": 25 } } @@ -4567,15 +4515,15 @@ "updateContext": null }, "value": "Error Message!", - "start": 978, - "end": 994, + "start": 912, + "end": 928, "loc": { "start": { - "line": 44, + "line": 42, "column": 25 }, "end": { - "line": 44, + "line": 42, "column": 41 } } @@ -4592,15 +4540,15 @@ "postfix": false, "binop": null }, - "start": 994, - "end": 995, + "start": 928, + "end": 929, "loc": { "start": { - "line": 44, + "line": 42, "column": 41 }, "end": { - "line": 44, + "line": 42, "column": 42 } } @@ -4618,15 +4566,15 @@ "binop": null, "updateContext": null }, - "start": 995, - "end": 996, + "start": 929, + "end": 930, "loc": { "start": { - "line": 44, + "line": 42, "column": 42 }, "end": { - "line": 44, + "line": 42, "column": 43 } } @@ -4646,15 +4594,15 @@ "updateContext": null }, "value": "throw", - "start": 1001, - "end": 1006, + "start": 935, + "end": 940, "loc": { "start": { - "line": 45, + "line": 43, "column": 4 }, "end": { - "line": 45, + "line": 43, "column": 9 } } @@ -4674,15 +4622,15 @@ "updateContext": null }, "value": "new", - "start": 1007, - "end": 1010, + "start": 941, + "end": 944, "loc": { "start": { - "line": 45, + "line": 43, "column": 10 }, "end": { - "line": 45, + "line": 43, "column": 13 } } @@ -4700,15 +4648,15 @@ "binop": null }, "value": "Error", - "start": 1011, - "end": 1016, + "start": 945, + "end": 950, "loc": { "start": { - "line": 45, + "line": 43, "column": 14 }, "end": { - "line": 45, + "line": 43, "column": 19 } } @@ -4725,15 +4673,15 @@ "postfix": false, "binop": null }, - "start": 1016, - "end": 1017, + "start": 950, + "end": 951, "loc": { "start": { - "line": 45, + "line": 43, "column": 19 }, "end": { - "line": 45, + "line": 43, "column": 20 } } @@ -4752,15 +4700,15 @@ "updateContext": null }, "value": "Intentional Error Thrown", - "start": 1017, - "end": 1043, + "start": 951, + "end": 977, "loc": { "start": { - "line": 45, + "line": 43, "column": 20 }, "end": { - "line": 45, + "line": 43, "column": 46 } } @@ -4777,15 +4725,15 @@ "postfix": false, "binop": null }, - "start": 1043, - "end": 1044, + "start": 977, + "end": 978, "loc": { "start": { - "line": 45, + "line": 43, "column": 46 }, "end": { - "line": 45, + "line": 43, "column": 47 } } @@ -4803,15 +4751,15 @@ "binop": null, "updateContext": null }, - "start": 1044, - "end": 1045, + "start": 978, + "end": 979, "loc": { "start": { - "line": 45, + "line": 43, "column": 47 }, "end": { - "line": 45, + "line": 43, "column": 48 } } @@ -4828,15 +4776,15 @@ "postfix": false, "binop": null }, - "start": 1048, - "end": 1049, + "start": 982, + "end": 983, "loc": { "start": { - "line": 46, + "line": 44, "column": 2 }, "end": { - "line": 46, + "line": 44, "column": 3 } } @@ -4853,15 +4801,15 @@ "postfix": false, "binop": null }, - "start": 1050, - "end": 1051, + "start": 984, + "end": 985, "loc": { "start": { - "line": 47, + "line": 45, "column": 0 }, "end": { - "line": 47, + "line": 45, "column": 1 } } @@ -4879,15 +4827,15 @@ "binop": null, "updateContext": null }, - "start": 1051, - "end": 1052, + "start": 985, + "end": 986, "loc": { "start": { - "line": 47, + "line": 45, "column": 1 }, "end": { - "line": 47, + "line": 45, "column": 2 } } @@ -4905,15 +4853,15 @@ "binop": null, "updateContext": null }, - "start": 1052, - "end": 1053, + "start": 986, + "end": 987, "loc": { "start": { - "line": 47, + "line": 45, "column": 2 }, "end": { - "line": 47, + "line": 45, "column": 3 } } @@ -4931,15 +4879,15 @@ "binop": null, "updateContext": null }, - "start": 1053, - "end": 1053, + "start": 987, + "end": 987, "loc": { "start": { - "line": 47, + "line": 45, "column": 3 }, "end": { - "line": 47, + "line": 45, "column": 3 } } diff --git a/docs/ast/source/controllers/note.controller.js.json b/docs/ast/source/controllers/note.controller.js.json index 48a17bb..37d766f 100644 --- a/docs/ast/source/controllers/note.controller.js.json +++ b/docs/ast/source/controllers/note.controller.js.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 2321, + "end": 2345, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 2321, + "end": 2345, "loc": { "start": { "line": 1, @@ -31,7 +31,7 @@ { "type": "ImportDeclaration", "start": 0, - "end": 61, + "end": 85, "loc": { "start": { "line": 1, @@ -39,7 +39,7 @@ }, "end": { "line": 1, - "column": 61 + "column": 85 } }, "specifiers": [ @@ -145,7 +145,7 @@ "source": { "type": "StringLiteral", "start": 41, - "end": 60, + "end": 84, "loc": { "start": { "line": 1, @@ -153,20 +153,20 @@ }, "end": { "line": 1, - "column": 60 + "column": 84 } }, "extra": { - "rawValue": "../base/server.js", - "raw": "'../base/server.js'" + "rawValue": "../base/request/hapi-request.interface.js", + "raw": "'../base/request/hapi-request.interface.js'" }, - "value": "../base/server.js" + "value": "../base/request/hapi-request.interface.js" } }, { "type": "ImportDeclaration", - "start": 62, - "end": 134, + "start": 86, + "end": 158, "loc": { "start": { "line": 2, @@ -180,8 +180,8 @@ "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 69, - "end": 84, + "start": 93, + "end": 108, "loc": { "start": { "line": 2, @@ -194,8 +194,8 @@ }, "local": { "type": "Identifier", - "start": 69, - "end": 84, + "start": 93, + "end": 108, "loc": { "start": { "line": 2, @@ -212,8 +212,8 @@ }, { "type": "ImportSpecifier", - "start": 88, - "end": 92, + "start": 112, + "end": 116, "loc": { "start": { "line": 2, @@ -226,8 +226,8 @@ }, "imported": { "type": "Identifier", - "start": 88, - "end": 92, + "start": 112, + "end": 116, "loc": { "start": { "line": 2, @@ -243,8 +243,8 @@ }, "local": { "type": "Identifier", - "start": 88, - "end": 92, + "start": 112, + "end": 116, "loc": { "start": { "line": 2, @@ -262,8 +262,8 @@ ], "source": { "type": "StringLiteral", - "start": 100, - "end": 133, + "start": 124, + "end": 157, "loc": { "start": { "line": 2, @@ -284,8 +284,8 @@ { "type": "CommentBlock", "value": "*\n * Container Controller for Note CRUD Functions\n ", - "start": 136, - "end": 191, + "start": 160, + "end": 215, "loc": { "start": { "line": 4, @@ -301,8 +301,8 @@ }, { "type": "ExportNamedDeclaration", - "start": 192, - "end": 1966, + "start": 216, + "end": 1990, "loc": { "start": { "line": 7, @@ -317,8 +317,8 @@ "source": null, "declaration": { "type": "ClassDeclaration", - "start": 199, - "end": 1966, + "start": 223, + "end": 1990, "loc": { "start": { "line": 7, @@ -331,8 +331,8 @@ }, "id": { "type": "Identifier", - "start": 205, - "end": 219, + "start": 229, + "end": 243, "loc": { "start": { "line": 7, @@ -350,8 +350,8 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 220, - "end": 1966, + "start": 244, + "end": 1990, "loc": { "start": { "line": 7, @@ -365,8 +365,8 @@ "body": [ { "type": "ClassMethod", - "start": 461, - "end": 905, + "start": 485, + "end": 929, "loc": { "start": { "line": 14, @@ -381,8 +381,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 474, - "end": 485, + "start": 498, + "end": 509, "loc": { "start": { "line": 14, @@ -404,8 +404,8 @@ "params": [ { "type": "ObjectPattern", - "start": 486, - "end": 496, + "start": 510, + "end": 520, "loc": { "start": { "line": 14, @@ -419,8 +419,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 488, - "end": 494, + "start": 512, + "end": 518, "loc": { "start": { "line": 14, @@ -436,8 +436,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 488, - "end": 494, + "start": 512, + "end": 518, "loc": { "start": { "line": 14, @@ -453,8 +453,8 @@ }, "value": { "type": "Identifier", - "start": 488, - "end": 494, + "start": 512, + "end": 518, "loc": { "start": { "line": 14, @@ -476,8 +476,8 @@ }, { "type": "Identifier", - "start": 498, - "end": 505, + "start": 522, + "end": 529, "loc": { "start": { "line": 14, @@ -494,8 +494,8 @@ ], "body": { "type": "BlockStatement", - "start": 507, - "end": 905, + "start": 531, + "end": 929, "loc": { "start": { "line": 14, @@ -509,8 +509,8 @@ "body": [ { "type": "TryStatement", - "start": 513, - "end": 901, + "start": 537, + "end": 925, "loc": { "start": { "line": 15, @@ -523,8 +523,8 @@ }, "block": { "type": "BlockStatement", - "start": 517, - "end": 587, + "start": 541, + "end": 611, "loc": { "start": { "line": 15, @@ -538,8 +538,8 @@ "body": [ { "type": "ReturnStatement", - "start": 525, - "end": 581, + "start": 549, + "end": 605, "loc": { "start": { "line": 16, @@ -552,8 +552,8 @@ }, "argument": { "type": "AwaitExpression", - "start": 532, - "end": 580, + "start": 556, + "end": 604, "loc": { "start": { "line": 16, @@ -566,8 +566,8 @@ }, "argument": { "type": "CallExpression", - "start": 538, - "end": 580, + "start": 562, + "end": 604, "loc": { "start": { "line": 16, @@ -580,8 +580,8 @@ }, "callee": { "type": "MemberExpression", - "start": 538, - "end": 561, + "start": 562, + "end": 585, "loc": { "start": { "line": 16, @@ -594,8 +594,8 @@ }, "object": { "type": "Identifier", - "start": 538, - "end": 553, + "start": 562, + "end": 577, "loc": { "start": { "line": 16, @@ -611,8 +611,8 @@ }, "property": { "type": "Identifier", - "start": 554, - "end": 561, + "start": 578, + "end": 585, "loc": { "start": { "line": 16, @@ -631,8 +631,8 @@ "arguments": [ { "type": "ObjectExpression", - "start": 562, - "end": 579, + "start": 586, + "end": 603, "loc": { "start": { "line": 16, @@ -646,8 +646,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 564, - "end": 577, + "start": 588, + "end": 601, "loc": { "start": { "line": 16, @@ -663,8 +663,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 564, - "end": 566, + "start": 588, + "end": 590, "loc": { "start": { "line": 16, @@ -680,8 +680,8 @@ }, "value": { "type": "MemberExpression", - "start": 568, - "end": 577, + "start": 592, + "end": 601, "loc": { "start": { "line": 16, @@ -694,8 +694,8 @@ }, "object": { "type": "Identifier", - "start": 568, - "end": 574, + "start": 592, + "end": 598, "loc": { "start": { "line": 16, @@ -711,8 +711,8 @@ }, "property": { "type": "Identifier", - "start": 575, - "end": 577, + "start": 599, + "end": 601, "loc": { "start": { "line": 16, @@ -740,8 +740,8 @@ }, "handler": { "type": "CatchClause", - "start": 588, - "end": 901, + "start": 612, + "end": 925, "loc": { "start": { "line": 17, @@ -754,8 +754,8 @@ }, "param": { "type": "Identifier", - "start": 595, - "end": 598, + "start": 619, + "end": 622, "loc": { "start": { "line": 17, @@ -771,8 +771,8 @@ }, "body": { "type": "BlockStatement", - "start": 600, - "end": 901, + "start": 624, + "end": 925, "loc": { "start": { "line": 17, @@ -786,8 +786,8 @@ "body": [ { "type": "VariableDeclaration", - "start": 669, - "end": 763, + "start": 693, + "end": 787, "loc": { "start": { "line": 19, @@ -801,8 +801,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 675, - "end": 762, + "start": 699, + "end": 786, "loc": { "start": { "line": 19, @@ -815,8 +815,8 @@ }, "id": { "type": "Identifier", - "start": 675, - "end": 679, + "start": 699, + "end": 703, "loc": { "start": { "line": 19, @@ -833,8 +833,8 @@ }, "init": { "type": "CallExpression", - "start": 682, - "end": 762, + "start": 706, + "end": 786, "loc": { "start": { "line": 19, @@ -847,8 +847,8 @@ }, "callee": { "type": "MemberExpression", - "start": 682, - "end": 698, + "start": 706, + "end": 722, "loc": { "start": { "line": 19, @@ -861,8 +861,8 @@ }, "object": { "type": "Identifier", - "start": 682, - "end": 689, + "start": 706, + "end": 713, "loc": { "start": { "line": 19, @@ -878,8 +878,8 @@ }, "property": { "type": "Identifier", - "start": 690, - "end": 698, + "start": 714, + "end": 722, "loc": { "start": { "line": 19, @@ -898,8 +898,8 @@ "arguments": [ { "type": "ObjectExpression", - "start": 699, - "end": 761, + "start": 723, + "end": 785, "loc": { "start": { "line": 19, @@ -913,8 +913,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 709, - "end": 729, + "start": 733, + "end": 753, "loc": { "start": { "line": 20, @@ -930,8 +930,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 709, - "end": 716, + "start": 733, + "end": 740, "loc": { "start": { "line": 20, @@ -947,8 +947,8 @@ }, "value": { "type": "MemberExpression", - "start": 718, - "end": 729, + "start": 742, + "end": 753, "loc": { "start": { "line": 20, @@ -961,8 +961,8 @@ }, "object": { "type": "Identifier", - "start": 718, - "end": 721, + "start": 742, + "end": 745, "loc": { "start": { "line": 20, @@ -978,8 +978,8 @@ }, "property": { "type": "Identifier", - "start": 722, - "end": 729, + "start": 746, + "end": 753, "loc": { "start": { "line": 20, @@ -998,8 +998,8 @@ }, { "type": "ObjectProperty", - "start": 739, - "end": 753, + "start": 763, + "end": 777, "loc": { "start": { "line": 21, @@ -1015,8 +1015,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 739, - "end": 743, + "start": 763, + "end": 767, "loc": { "start": { "line": 21, @@ -1032,8 +1032,8 @@ }, "value": { "type": "MemberExpression", - "start": 745, - "end": 753, + "start": 769, + "end": 777, "loc": { "start": { "line": 21, @@ -1046,8 +1046,8 @@ }, "object": { "type": "Identifier", - "start": 745, - "end": 748, + "start": 769, + "end": 772, "loc": { "start": { "line": 21, @@ -1063,8 +1063,8 @@ }, "property": { "type": "Identifier", - "start": 749, - "end": 753, + "start": 773, + "end": 777, "loc": { "start": { "line": 21, @@ -1093,8 +1093,8 @@ { "type": "CommentLine", "value": " Get resp(HapiHandler) to return http code if number", - "start": 608, - "end": 662, + "start": 632, + "end": 686, "loc": { "start": { "line": 18, @@ -1110,8 +1110,8 @@ }, { "type": "IfStatement", - "start": 770, - "end": 876, + "start": 794, + "end": 900, "loc": { "start": { "line": 23, @@ -1124,8 +1124,8 @@ }, "test": { "type": "BinaryExpression", - "start": 774, - "end": 802, + "start": 798, + "end": 826, "loc": { "start": { "line": 23, @@ -1138,8 +1138,8 @@ }, "left": { "type": "UnaryExpression", - "start": 774, - "end": 789, + "start": 798, + "end": 813, "loc": { "start": { "line": 23, @@ -1154,8 +1154,8 @@ "prefix": true, "argument": { "type": "MemberExpression", - "start": 781, - "end": 789, + "start": 805, + "end": 813, "loc": { "start": { "line": 23, @@ -1168,8 +1168,8 @@ }, "object": { "type": "Identifier", - "start": 781, - "end": 784, + "start": 805, + "end": 808, "loc": { "start": { "line": 23, @@ -1185,8 +1185,8 @@ }, "property": { "type": "Identifier", - "start": 785, - "end": 789, + "start": 809, + "end": 813, "loc": { "start": { "line": 23, @@ -1209,8 +1209,8 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 794, - "end": 802, + "start": 818, + "end": 826, "loc": { "start": { "line": 23, @@ -1230,8 +1230,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 804, - "end": 842, + "start": 828, + "end": 866, "loc": { "start": { "line": 23, @@ -1245,8 +1245,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 814, - "end": 834, + "start": 838, + "end": 858, "loc": { "start": { "line": 24, @@ -1259,8 +1259,8 @@ }, "expression": { "type": "CallExpression", - "start": 814, - "end": 833, + "start": 838, + "end": 857, "loc": { "start": { "line": 24, @@ -1273,8 +1273,8 @@ }, "callee": { "type": "MemberExpression", - "start": 814, - "end": 823, + "start": 838, + "end": 847, "loc": { "start": { "line": 24, @@ -1287,8 +1287,8 @@ }, "object": { "type": "Identifier", - "start": 814, - "end": 818, + "start": 838, + "end": 842, "loc": { "start": { "line": 24, @@ -1304,8 +1304,8 @@ }, "property": { "type": "Identifier", - "start": 819, - "end": 823, + "start": 843, + "end": 847, "loc": { "start": { "line": 24, @@ -1324,8 +1324,8 @@ "arguments": [ { "type": "MemberExpression", - "start": 824, - "end": 832, + "start": 848, + "end": 856, "loc": { "start": { "line": 24, @@ -1338,8 +1338,8 @@ }, "object": { "type": "Identifier", - "start": 824, - "end": 827, + "start": 848, + "end": 851, "loc": { "start": { "line": 24, @@ -1355,8 +1355,8 @@ }, "property": { "type": "Identifier", - "start": 828, - "end": 832, + "start": 852, + "end": 856, "loc": { "start": { "line": 24, @@ -1380,8 +1380,8 @@ }, "alternate": { "type": "BlockStatement", - "start": 848, - "end": 876, + "start": 872, + "end": 900, "loc": { "start": { "line": 25, @@ -1395,8 +1395,8 @@ "body": [ { "type": "ThrowStatement", - "start": 858, - "end": 868, + "start": 882, + "end": 892, "loc": { "start": { "line": 26, @@ -1409,8 +1409,8 @@ }, "argument": { "type": "Identifier", - "start": 864, - "end": 867, + "start": 888, + "end": 891, "loc": { "start": { "line": 26, @@ -1431,8 +1431,8 @@ }, { "type": "ReturnStatement", - "start": 883, - "end": 895, + "start": 907, + "end": 919, "loc": { "start": { "line": 28, @@ -1445,8 +1445,8 @@ }, "argument": { "type": "Identifier", - "start": 890, - "end": 894, + "start": 914, + "end": 918, "loc": { "start": { "line": 28, @@ -1476,8 +1476,8 @@ { "type": "CommentBlock", "value": "*\n * Returns a note, specified by Id\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler object for rejecting/setting errors\n * @return {Note} Note corresponding to Id passed in\n ", - "start": 224, - "end": 458, + "start": 248, + "end": 482, "loc": { "start": { "line": 8, @@ -1494,8 +1494,8 @@ { "type": "CommentBlock", "value": "*\n * Create a new Note\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler\n * @return {Note} [description]\n ", - "start": 909, - "end": 1071, + "start": 933, + "end": 1095, "loc": { "start": { "line": 32, @@ -1511,8 +1511,8 @@ }, { "type": "ClassMethod", - "start": 1074, - "end": 1389, + "start": 1098, + "end": 1413, "loc": { "start": { "line": 38, @@ -1527,8 +1527,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1081, - "end": 1091, + "start": 1105, + "end": 1115, "loc": { "start": { "line": 38, @@ -1550,8 +1550,8 @@ "params": [ { "type": "ObjectPattern", - "start": 1092, - "end": 1103, + "start": 1116, + "end": 1127, "loc": { "start": { "line": 38, @@ -1565,8 +1565,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1094, - "end": 1101, + "start": 1118, + "end": 1125, "loc": { "start": { "line": 38, @@ -1582,8 +1582,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1094, - "end": 1101, + "start": 1118, + "end": 1125, "loc": { "start": { "line": 38, @@ -1599,8 +1599,8 @@ }, "value": { "type": "Identifier", - "start": 1094, - "end": 1101, + "start": 1118, + "end": 1125, "loc": { "start": { "line": 38, @@ -1622,8 +1622,8 @@ }, { "type": "Identifier", - "start": 1105, - "end": 1112, + "start": 1129, + "end": 1136, "loc": { "start": { "line": 38, @@ -1640,8 +1640,8 @@ ], "body": { "type": "BlockStatement", - "start": 1114, - "end": 1389, + "start": 1138, + "end": 1413, "loc": { "start": { "line": 38, @@ -1655,8 +1655,8 @@ "body": [ { "type": "IfStatement", - "start": 1120, - "end": 1385, + "start": 1144, + "end": 1409, "loc": { "start": { "line": 39, @@ -1669,8 +1669,8 @@ }, "test": { "type": "MemberExpression", - "start": 1124, - "end": 1136, + "start": 1148, + "end": 1160, "loc": { "start": { "line": 39, @@ -1683,8 +1683,8 @@ }, "object": { "type": "Identifier", - "start": 1124, - "end": 1131, + "start": 1148, + "end": 1155, "loc": { "start": { "line": 39, @@ -1700,8 +1700,8 @@ }, "property": { "type": "Identifier", - "start": 1132, - "end": 1136, + "start": 1156, + "end": 1160, "loc": { "start": { "line": 39, @@ -1719,8 +1719,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 1138, - "end": 1210, + "start": 1162, + "end": 1234, "loc": { "start": { "line": 39, @@ -1734,8 +1734,8 @@ "body": [ { "type": "ReturnStatement", - "start": 1146, - "end": 1204, + "start": 1170, + "end": 1228, "loc": { "start": { "line": 40, @@ -1748,8 +1748,8 @@ }, "argument": { "type": "CallExpression", - "start": 1153, - "end": 1203, + "start": 1177, + "end": 1227, "loc": { "start": { "line": 40, @@ -1762,8 +1762,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1153, - "end": 1179, + "start": 1177, + "end": 1203, "loc": { "start": { "line": 40, @@ -1776,8 +1776,8 @@ }, "object": { "type": "Identifier", - "start": 1153, - "end": 1168, + "start": 1177, + "end": 1192, "loc": { "start": { "line": 40, @@ -1793,8 +1793,8 @@ }, "property": { "type": "Identifier", - "start": 1169, - "end": 1179, + "start": 1193, + "end": 1203, "loc": { "start": { "line": 40, @@ -1813,8 +1813,8 @@ "arguments": [ { "type": "ObjectExpression", - "start": 1180, - "end": 1202, + "start": 1204, + "end": 1226, "loc": { "start": { "line": 40, @@ -1828,8 +1828,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1182, - "end": 1200, + "start": 1206, + "end": 1224, "loc": { "start": { "line": 40, @@ -1845,8 +1845,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1182, - "end": 1186, + "start": 1206, + "end": 1210, "loc": { "start": { "line": 40, @@ -1862,8 +1862,8 @@ }, "value": { "type": "MemberExpression", - "start": 1188, - "end": 1200, + "start": 1212, + "end": 1224, "loc": { "start": { "line": 40, @@ -1876,8 +1876,8 @@ }, "object": { "type": "Identifier", - "start": 1188, - "end": 1195, + "start": 1212, + "end": 1219, "loc": { "start": { "line": 40, @@ -1893,8 +1893,8 @@ }, "property": { "type": "Identifier", - "start": 1196, - "end": 1200, + "start": 1220, + "end": 1224, "loc": { "start": { "line": 40, @@ -1921,8 +1921,8 @@ }, "alternate": { "type": "IfStatement", - "start": 1216, - "end": 1385, + "start": 1240, + "end": 1409, "loc": { "start": { "line": 41, @@ -1935,8 +1935,8 @@ }, "test": { "type": "CallExpression", - "start": 1220, - "end": 1242, + "start": 1244, + "end": 1266, "loc": { "start": { "line": 41, @@ -1949,8 +1949,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1220, - "end": 1233, + "start": 1244, + "end": 1257, "loc": { "start": { "line": 41, @@ -1963,8 +1963,8 @@ }, "object": { "type": "Identifier", - "start": 1220, - "end": 1225, + "start": 1244, + "end": 1249, "loc": { "start": { "line": 41, @@ -1980,8 +1980,8 @@ }, "property": { "type": "Identifier", - "start": 1226, - "end": 1233, + "start": 1250, + "end": 1257, "loc": { "start": { "line": 41, @@ -2000,8 +2000,8 @@ "arguments": [ { "type": "Identifier", - "start": 1234, - "end": 1241, + "start": 1258, + "end": 1265, "loc": { "start": { "line": 41, @@ -2019,8 +2019,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 1244, - "end": 1302, + "start": 1268, + "end": 1326, "loc": { "start": { "line": 41, @@ -2034,8 +2034,8 @@ "body": [ { "type": "ReturnStatement", - "start": 1252, - "end": 1296, + "start": 1276, + "end": 1320, "loc": { "start": { "line": 42, @@ -2048,8 +2048,8 @@ }, "argument": { "type": "CallExpression", - "start": 1259, - "end": 1295, + "start": 1283, + "end": 1319, "loc": { "start": { "line": 42, @@ -2062,8 +2062,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1259, - "end": 1286, + "start": 1283, + "end": 1310, "loc": { "start": { "line": 42, @@ -2076,8 +2076,8 @@ }, "object": { "type": "Identifier", - "start": 1259, - "end": 1274, + "start": 1283, + "end": 1298, "loc": { "start": { "line": 42, @@ -2093,8 +2093,8 @@ }, "property": { "type": "Identifier", - "start": 1275, - "end": 1286, + "start": 1299, + "end": 1310, "loc": { "start": { "line": 42, @@ -2113,8 +2113,8 @@ "arguments": [ { "type": "Identifier", - "start": 1287, - "end": 1294, + "start": 1311, + "end": 1318, "loc": { "start": { "line": 42, @@ -2136,8 +2136,8 @@ }, "alternate": { "type": "BlockStatement", - "start": 1308, - "end": 1385, + "start": 1332, + "end": 1409, "loc": { "start": { "line": 43, @@ -2151,8 +2151,8 @@ "body": [ { "type": "ReturnStatement", - "start": 1316, - "end": 1379, + "start": 1340, + "end": 1403, "loc": { "start": { "line": 44, @@ -2165,8 +2165,8 @@ }, "argument": { "type": "CallExpression", - "start": 1323, - "end": 1378, + "start": 1347, + "end": 1402, "loc": { "start": { "line": 44, @@ -2179,8 +2179,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1323, - "end": 1373, + "start": 1347, + "end": 1397, "loc": { "start": { "line": 44, @@ -2193,8 +2193,8 @@ }, "object": { "type": "CallExpression", - "start": 1323, - "end": 1368, + "start": 1347, + "end": 1392, "loc": { "start": { "line": 44, @@ -2207,8 +2207,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1323, - "end": 1339, + "start": 1347, + "end": 1363, "loc": { "start": { "line": 44, @@ -2221,8 +2221,8 @@ }, "object": { "type": "Identifier", - "start": 1323, - "end": 1330, + "start": 1347, + "end": 1354, "loc": { "start": { "line": 44, @@ -2238,8 +2238,8 @@ }, "property": { "type": "Identifier", - "start": 1331, - "end": 1339, + "start": 1355, + "end": 1363, "loc": { "start": { "line": 44, @@ -2258,8 +2258,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 1340, - "end": 1367, + "start": 1364, + "end": 1391, "loc": { "start": { "line": 44, @@ -2280,8 +2280,8 @@ }, "property": { "type": "Identifier", - "start": 1369, - "end": 1373, + "start": 1393, + "end": 1397, "loc": { "start": { "line": 44, @@ -2300,8 +2300,8 @@ "arguments": [ { "type": "NumericLiteral", - "start": 1374, - "end": 1377, + "start": 1398, + "end": 1401, "loc": { "start": { "line": 44, @@ -2334,8 +2334,8 @@ { "type": "CommentBlock", "value": "*\n * Create a new Note\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler\n * @return {Note} [description]\n ", - "start": 909, - "end": 1071, + "start": 933, + "end": 1095, "loc": { "start": { "line": 32, @@ -2352,8 +2352,8 @@ { "type": "CommentBlock", "value": "*\n * Update a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {Note} [description]\n ", - "start": 1393, - "end": 1528, + "start": 1417, + "end": 1552, "loc": { "start": { "line": 48, @@ -2369,8 +2369,8 @@ }, { "type": "ClassMethod", - "start": 1531, - "end": 1723, + "start": 1555, + "end": 1747, "loc": { "start": { "line": 53, @@ -2385,8 +2385,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1538, - "end": 1548, + "start": 1562, + "end": 1572, "loc": { "start": { "line": 53, @@ -2408,8 +2408,8 @@ "params": [ { "type": "ObjectPattern", - "start": 1549, - "end": 1568, + "start": 1573, + "end": 1592, "loc": { "start": { "line": 53, @@ -2423,8 +2423,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1551, - "end": 1558, + "start": 1575, + "end": 1582, "loc": { "start": { "line": 53, @@ -2440,8 +2440,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1551, - "end": 1558, + "start": 1575, + "end": 1582, "loc": { "start": { "line": 53, @@ -2457,8 +2457,8 @@ }, "value": { "type": "Identifier", - "start": 1551, - "end": 1558, + "start": 1575, + "end": 1582, "loc": { "start": { "line": 53, @@ -2478,8 +2478,8 @@ }, { "type": "ObjectProperty", - "start": 1560, - "end": 1566, + "start": 1584, + "end": 1590, "loc": { "start": { "line": 53, @@ -2495,8 +2495,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1560, - "end": 1566, + "start": 1584, + "end": 1590, "loc": { "start": { "line": 53, @@ -2512,8 +2512,8 @@ }, "value": { "type": "Identifier", - "start": 1560, - "end": 1566, + "start": 1584, + "end": 1590, "loc": { "start": { "line": 53, @@ -2536,8 +2536,8 @@ ], "body": { "type": "BlockStatement", - "start": 1570, - "end": 1723, + "start": 1594, + "end": 1747, "loc": { "start": { "line": 53, @@ -2551,8 +2551,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 1576, - "end": 1608, + "start": 1600, + "end": 1632, "loc": { "start": { "line": 54, @@ -2565,8 +2565,8 @@ }, "expression": { "type": "CallExpression", - "start": 1576, - "end": 1607, + "start": 1600, + "end": 1631, "loc": { "start": { "line": 54, @@ -2579,8 +2579,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1576, - "end": 1588, + "start": 1600, + "end": 1612, "loc": { "start": { "line": 54, @@ -2593,8 +2593,8 @@ }, "object": { "type": "Identifier", - "start": 1576, - "end": 1582, + "start": 1600, + "end": 1606, "loc": { "start": { "line": 54, @@ -2610,8 +2610,8 @@ }, "property": { "type": "Identifier", - "start": 1583, - "end": 1588, + "start": 1607, + "end": 1612, "loc": { "start": { "line": 54, @@ -2630,8 +2630,8 @@ "arguments": [ { "type": "ObjectExpression", - "start": 1589, - "end": 1606, + "start": 1613, + "end": 1630, "loc": { "start": { "line": 54, @@ -2645,8 +2645,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1591, - "end": 1604, + "start": 1615, + "end": 1628, "loc": { "start": { "line": 54, @@ -2662,8 +2662,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1591, - "end": 1595, + "start": 1615, + "end": 1619, "loc": { "start": { "line": 54, @@ -2679,8 +2679,8 @@ }, "value": { "type": "Identifier", - "start": 1597, - "end": 1604, + "start": 1621, + "end": 1628, "loc": { "start": { "line": 54, @@ -2703,8 +2703,8 @@ { "type": "CommentLine", "value": " TODO: Actually update / catch error on update", - "start": 1614, - "end": 1662, + "start": 1638, + "end": 1686, "loc": { "start": { "line": 56, @@ -2720,8 +2720,8 @@ }, { "type": "ReturnStatement", - "start": 1668, - "end": 1719, + "start": 1692, + "end": 1743, "loc": { "start": { "line": 58, @@ -2734,8 +2734,8 @@ }, "argument": { "type": "CallExpression", - "start": 1675, - "end": 1718, + "start": 1699, + "end": 1742, "loc": { "start": { "line": 58, @@ -2748,8 +2748,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1675, - "end": 1698, + "start": 1699, + "end": 1722, "loc": { "start": { "line": 58, @@ -2762,8 +2762,8 @@ }, "object": { "type": "Identifier", - "start": 1675, - "end": 1690, + "start": 1699, + "end": 1714, "loc": { "start": { "line": 58, @@ -2780,8 +2780,8 @@ }, "property": { "type": "Identifier", - "start": 1691, - "end": 1698, + "start": 1715, + "end": 1722, "loc": { "start": { "line": 58, @@ -2801,8 +2801,8 @@ "arguments": [ { "type": "ObjectExpression", - "start": 1699, - "end": 1717, + "start": 1723, + "end": 1741, "loc": { "start": { "line": 58, @@ -2816,8 +2816,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1701, - "end": 1715, + "start": 1725, + "end": 1739, "loc": { "start": { "line": 58, @@ -2833,8 +2833,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1701, - "end": 1703, + "start": 1725, + "end": 1727, "loc": { "start": { "line": 58, @@ -2850,8 +2850,8 @@ }, "value": { "type": "MemberExpression", - "start": 1705, - "end": 1715, + "start": 1729, + "end": 1739, "loc": { "start": { "line": 58, @@ -2864,8 +2864,8 @@ }, "object": { "type": "Identifier", - "start": 1705, - "end": 1712, + "start": 1729, + "end": 1736, "loc": { "start": { "line": 58, @@ -2881,8 +2881,8 @@ }, "property": { "type": "Identifier", - "start": 1713, - "end": 1715, + "start": 1737, + "end": 1739, "loc": { "start": { "line": 58, @@ -2908,8 +2908,8 @@ { "type": "CommentLine", "value": " TODO: Actually update / catch error on update", - "start": 1614, - "end": 1662, + "start": 1638, + "end": 1686, "loc": { "start": { "line": 56, @@ -2931,8 +2931,8 @@ { "type": "CommentBlock", "value": "*\n * Update a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {Note} [description]\n ", - "start": 1393, - "end": 1528, + "start": 1417, + "end": 1552, "loc": { "start": { "line": 48, @@ -2949,8 +2949,8 @@ { "type": "CommentBlock", "value": "*\n * Delete a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {boolean} [description]\n ", - "start": 1727, - "end": 1865, + "start": 1751, + "end": 1889, "loc": { "start": { "line": 61, @@ -2966,8 +2966,8 @@ }, { "type": "ClassMethod", - "start": 1868, - "end": 1964, + "start": 1892, + "end": 1988, "loc": { "start": { "line": 66, @@ -2982,8 +2982,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1875, - "end": 1885, + "start": 1899, + "end": 1909, "loc": { "start": { "line": 66, @@ -3005,8 +3005,8 @@ "params": [ { "type": "ObjectPattern", - "start": 1886, - "end": 1904, + "start": 1910, + "end": 1928, "loc": { "start": { "line": 66, @@ -3020,8 +3020,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1888, - "end": 1894, + "start": 1912, + "end": 1918, "loc": { "start": { "line": 66, @@ -3037,8 +3037,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1888, - "end": 1894, + "start": 1912, + "end": 1918, "loc": { "start": { "line": 66, @@ -3054,8 +3054,8 @@ }, "value": { "type": "Identifier", - "start": 1888, - "end": 1894, + "start": 1912, + "end": 1918, "loc": { "start": { "line": 66, @@ -3075,8 +3075,8 @@ }, { "type": "ObjectProperty", - "start": 1896, - "end": 1902, + "start": 1920, + "end": 1926, "loc": { "start": { "line": 66, @@ -3092,8 +3092,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1896, - "end": 1902, + "start": 1920, + "end": 1926, "loc": { "start": { "line": 66, @@ -3109,8 +3109,8 @@ }, "value": { "type": "Identifier", - "start": 1896, - "end": 1902, + "start": 1920, + "end": 1926, "loc": { "start": { "line": 66, @@ -3133,8 +3133,8 @@ ], "body": { "type": "BlockStatement", - "start": 1906, - "end": 1964, + "start": 1930, + "end": 1988, "loc": { "start": { "line": 66, @@ -3148,8 +3148,8 @@ "body": [ { "type": "ExpressionStatement", - "start": 1912, - "end": 1942, + "start": 1936, + "end": 1966, "loc": { "start": { "line": 67, @@ -3162,8 +3162,8 @@ }, "expression": { "type": "CallExpression", - "start": 1912, - "end": 1941, + "start": 1936, + "end": 1965, "loc": { "start": { "line": 67, @@ -3176,8 +3176,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1912, - "end": 1923, + "start": 1936, + "end": 1947, "loc": { "start": { "line": 67, @@ -3190,8 +3190,8 @@ }, "object": { "type": "Identifier", - "start": 1912, - "end": 1918, + "start": 1936, + "end": 1942, "loc": { "start": { "line": 67, @@ -3207,8 +3207,8 @@ }, "property": { "type": "Identifier", - "start": 1919, - "end": 1923, + "start": 1943, + "end": 1947, "loc": { "start": { "line": 67, @@ -3227,8 +3227,8 @@ "arguments": [ { "type": "ObjectExpression", - "start": 1924, - "end": 1940, + "start": 1948, + "end": 1964, "loc": { "start": { "line": 67, @@ -3242,8 +3242,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1926, - "end": 1938, + "start": 1950, + "end": 1962, "loc": { "start": { "line": 67, @@ -3259,8 +3259,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1926, - "end": 1930, + "start": 1950, + "end": 1954, "loc": { "start": { "line": 67, @@ -3276,8 +3276,8 @@ }, "value": { "type": "Identifier", - "start": 1932, - "end": 1938, + "start": 1956, + "end": 1962, "loc": { "start": { "line": 67, @@ -3299,8 +3299,8 @@ }, { "type": "ReturnStatement", - "start": 1948, - "end": 1960, + "start": 1972, + "end": 1984, "loc": { "start": { "line": 69, @@ -3313,8 +3313,8 @@ }, "argument": { "type": "BooleanLiteral", - "start": 1955, - "end": 1959, + "start": 1979, + "end": 1983, "loc": { "start": { "line": 69, @@ -3335,8 +3335,8 @@ { "type": "CommentBlock", "value": "*\n * Delete a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {boolean} [description]\n ", - "start": 1727, - "end": 1865, + "start": 1751, + "end": 1889, "loc": { "start": { "line": 61, @@ -3356,8 +3356,8 @@ { "type": "CommentBlock", "value": "*\n * Container Controller for Note CRUD Functions\n ", - "start": 136, - "end": 191, + "start": 160, + "end": 215, "loc": { "start": { "line": 4, @@ -3376,8 +3376,8 @@ { "type": "CommentBlock", "value": "*\n * Container Controller for Note CRUD Functions\n ", - "start": 136, - "end": 191, + "start": 160, + "end": 215, "loc": { "start": { "line": 4, @@ -3393,8 +3393,8 @@ }, { "type": "ExportDefaultDeclaration", - "start": 1968, - "end": 2321, + "start": 1992, + "end": 2345, "loc": { "start": { "line": 73, @@ -3407,8 +3407,8 @@ }, "declaration": { "type": "ArrayExpression", - "start": 1983, - "end": 2320, + "start": 2007, + "end": 2344, "loc": { "start": { "line": 73, @@ -3422,8 +3422,8 @@ "elements": [ { "type": "ObjectExpression", - "start": 1984, - "end": 2067, + "start": 2008, + "end": 2091, "loc": { "start": { "line": 73, @@ -3437,8 +3437,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1988, - "end": 2006, + "start": 2012, + "end": 2030, "loc": { "start": { "line": 74, @@ -3454,8 +3454,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1988, - "end": 1992, + "start": 2012, + "end": 2016, "loc": { "start": { "line": 74, @@ -3471,8 +3471,8 @@ }, "value": { "type": "StringLiteral", - "start": 1994, - "end": 2006, + "start": 2018, + "end": 2030, "loc": { "start": { "line": 74, @@ -3492,8 +3492,8 @@ }, { "type": "ObjectProperty", - "start": 2010, - "end": 2023, + "start": 2034, + "end": 2047, "loc": { "start": { "line": 75, @@ -3509,8 +3509,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2010, - "end": 2016, + "start": 2034, + "end": 2040, "loc": { "start": { "line": 75, @@ -3526,8 +3526,8 @@ }, "value": { "type": "StringLiteral", - "start": 2018, - "end": 2023, + "start": 2042, + "end": 2047, "loc": { "start": { "line": 75, @@ -3547,8 +3547,8 @@ }, { "type": "ObjectProperty", - "start": 2027, - "end": 2065, + "start": 2051, + "end": 2089, "loc": { "start": { "line": 76, @@ -3564,8 +3564,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2027, - "end": 2037, + "start": 2051, + "end": 2061, "loc": { "start": { "line": 76, @@ -3581,8 +3581,8 @@ }, "value": { "type": "MemberExpression", - "start": 2039, - "end": 2065, + "start": 2063, + "end": 2089, "loc": { "start": { "line": 76, @@ -3595,8 +3595,8 @@ }, "object": { "type": "Identifier", - "start": 2039, - "end": 2053, + "start": 2063, + "end": 2077, "loc": { "start": { "line": 76, @@ -3612,8 +3612,8 @@ }, "property": { "type": "Identifier", - "start": 2054, - "end": 2065, + "start": 2078, + "end": 2089, "loc": { "start": { "line": 76, @@ -3634,8 +3634,8 @@ }, { "type": "ObjectExpression", - "start": 2069, - "end": 2147, + "start": 2093, + "end": 2171, "loc": { "start": { "line": 77, @@ -3649,8 +3649,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 2073, - "end": 2086, + "start": 2097, + "end": 2110, "loc": { "start": { "line": 78, @@ -3666,8 +3666,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2073, - "end": 2077, + "start": 2097, + "end": 2101, "loc": { "start": { "line": 78, @@ -3683,8 +3683,8 @@ }, "value": { "type": "StringLiteral", - "start": 2079, - "end": 2086, + "start": 2103, + "end": 2110, "loc": { "start": { "line": 78, @@ -3704,8 +3704,8 @@ }, { "type": "ObjectProperty", - "start": 2090, - "end": 2104, + "start": 2114, + "end": 2128, "loc": { "start": { "line": 79, @@ -3721,8 +3721,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2090, - "end": 2096, + "start": 2114, + "end": 2120, "loc": { "start": { "line": 79, @@ -3738,8 +3738,8 @@ }, "value": { "type": "StringLiteral", - "start": 2098, - "end": 2104, + "start": 2122, + "end": 2128, "loc": { "start": { "line": 79, @@ -3759,8 +3759,8 @@ }, { "type": "ObjectProperty", - "start": 2108, - "end": 2145, + "start": 2132, + "end": 2169, "loc": { "start": { "line": 80, @@ -3776,8 +3776,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2108, - "end": 2118, + "start": 2132, + "end": 2142, "loc": { "start": { "line": 80, @@ -3793,8 +3793,8 @@ }, "value": { "type": "MemberExpression", - "start": 2120, - "end": 2145, + "start": 2144, + "end": 2169, "loc": { "start": { "line": 80, @@ -3807,8 +3807,8 @@ }, "object": { "type": "Identifier", - "start": 2120, - "end": 2134, + "start": 2144, + "end": 2158, "loc": { "start": { "line": 80, @@ -3824,8 +3824,8 @@ }, "property": { "type": "Identifier", - "start": 2135, - "end": 2145, + "start": 2159, + "end": 2169, "loc": { "start": { "line": 80, @@ -3846,8 +3846,8 @@ }, { "type": "ObjectExpression", - "start": 2149, - "end": 2232, + "start": 2173, + "end": 2256, "loc": { "start": { "line": 81, @@ -3861,8 +3861,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 2153, - "end": 2172, + "start": 2177, + "end": 2196, "loc": { "start": { "line": 82, @@ -3878,8 +3878,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2153, - "end": 2157, + "start": 2177, + "end": 2181, "loc": { "start": { "line": 82, @@ -3895,8 +3895,8 @@ }, "value": { "type": "StringLiteral", - "start": 2159, - "end": 2172, + "start": 2183, + "end": 2196, "loc": { "start": { "line": 82, @@ -3916,8 +3916,8 @@ }, { "type": "ObjectProperty", - "start": 2176, - "end": 2189, + "start": 2200, + "end": 2213, "loc": { "start": { "line": 83, @@ -3933,8 +3933,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2176, - "end": 2182, + "start": 2200, + "end": 2206, "loc": { "start": { "line": 83, @@ -3950,8 +3950,8 @@ }, "value": { "type": "StringLiteral", - "start": 2184, - "end": 2189, + "start": 2208, + "end": 2213, "loc": { "start": { "line": 83, @@ -3971,8 +3971,8 @@ }, { "type": "ObjectProperty", - "start": 2193, - "end": 2230, + "start": 2217, + "end": 2254, "loc": { "start": { "line": 84, @@ -3988,8 +3988,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2193, - "end": 2203, + "start": 2217, + "end": 2227, "loc": { "start": { "line": 84, @@ -4005,8 +4005,8 @@ }, "value": { "type": "MemberExpression", - "start": 2205, - "end": 2230, + "start": 2229, + "end": 2254, "loc": { "start": { "line": 84, @@ -4019,8 +4019,8 @@ }, "object": { "type": "Identifier", - "start": 2205, - "end": 2219, + "start": 2229, + "end": 2243, "loc": { "start": { "line": 84, @@ -4036,8 +4036,8 @@ }, "property": { "type": "Identifier", - "start": 2220, - "end": 2230, + "start": 2244, + "end": 2254, "loc": { "start": { "line": 84, @@ -4058,8 +4058,8 @@ }, { "type": "ObjectExpression", - "start": 2234, - "end": 2319, + "start": 2258, + "end": 2343, "loc": { "start": { "line": 85, @@ -4073,8 +4073,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 2238, - "end": 2256, + "start": 2262, + "end": 2280, "loc": { "start": { "line": 86, @@ -4090,8 +4090,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2238, - "end": 2242, + "start": 2262, + "end": 2266, "loc": { "start": { "line": 86, @@ -4107,8 +4107,8 @@ }, "value": { "type": "StringLiteral", - "start": 2244, - "end": 2256, + "start": 2268, + "end": 2280, "loc": { "start": { "line": 86, @@ -4128,8 +4128,8 @@ }, { "type": "ObjectProperty", - "start": 2260, - "end": 2276, + "start": 2284, + "end": 2300, "loc": { "start": { "line": 87, @@ -4145,8 +4145,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2260, - "end": 2266, + "start": 2284, + "end": 2290, "loc": { "start": { "line": 87, @@ -4162,8 +4162,8 @@ }, "value": { "type": "StringLiteral", - "start": 2268, - "end": 2276, + "start": 2292, + "end": 2300, "loc": { "start": { "line": 87, @@ -4183,8 +4183,8 @@ }, { "type": "ObjectProperty", - "start": 2280, - "end": 2317, + "start": 2304, + "end": 2341, "loc": { "start": { "line": 88, @@ -4200,8 +4200,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 2280, - "end": 2290, + "start": 2304, + "end": 2314, "loc": { "start": { "line": 88, @@ -4217,8 +4217,8 @@ }, "value": { "type": "MemberExpression", - "start": 2292, - "end": 2317, + "start": 2316, + "end": 2341, "loc": { "start": { "line": 88, @@ -4231,8 +4231,8 @@ }, "object": { "type": "Identifier", - "start": 2292, - "end": 2306, + "start": 2316, + "end": 2330, "loc": { "start": { "line": 88, @@ -4248,8 +4248,8 @@ }, "property": { "type": "Identifier", - "start": 2307, - "end": 2317, + "start": 2331, + "end": 2341, "loc": { "start": { "line": 88, @@ -4280,8 +4280,8 @@ { "type": "CommentBlock", "value": "*\n * Container Controller for Note CRUD Functions\n ", - "start": 136, - "end": 191, + "start": 160, + "end": 215, "loc": { "start": { "line": 4, @@ -4296,8 +4296,8 @@ { "type": "CommentBlock", "value": "*\n * Returns a note, specified by Id\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler object for rejecting/setting errors\n * @return {Note} Note corresponding to Id passed in\n ", - "start": 224, - "end": 458, + "start": 248, + "end": 482, "loc": { "start": { "line": 8, @@ -4312,8 +4312,8 @@ { "type": "CommentLine", "value": " Get resp(HapiHandler) to return http code if number", - "start": 608, - "end": 662, + "start": 632, + "end": 686, "loc": { "start": { "line": 18, @@ -4328,8 +4328,8 @@ { "type": "CommentBlock", "value": "*\n * Create a new Note\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler\n * @return {Note} [description]\n ", - "start": 909, - "end": 1071, + "start": 933, + "end": 1095, "loc": { "start": { "line": 32, @@ -4344,8 +4344,8 @@ { "type": "CommentBlock", "value": "*\n * Update a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {Note} [description]\n ", - "start": 1393, - "end": 1528, + "start": 1417, + "end": 1552, "loc": { "start": { "line": 48, @@ -4360,8 +4360,8 @@ { "type": "CommentLine", "value": " TODO: Actually update / catch error on update", - "start": 1614, - "end": 1662, + "start": 1638, + "end": 1686, "loc": { "start": { "line": 56, @@ -4376,8 +4376,8 @@ { "type": "CommentBlock", "value": "*\n * Delete a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {boolean} [description]\n ", - "start": 1727, - "end": 1865, + "start": 1751, + "end": 1889, "loc": { "start": { "line": 61, @@ -4586,9 +4586,9 @@ "binop": null, "updateContext": null }, - "value": "../base/server.js", + "value": "../base/request/hapi-request.interface.js", "start": 41, - "end": 60, + "end": 84, "loc": { "start": { "line": 1, @@ -4596,7 +4596,7 @@ }, "end": { "line": 1, - "column": 60 + "column": 84 } } }, @@ -4613,16 +4613,16 @@ "binop": null, "updateContext": null }, - "start": 60, - "end": 61, + "start": 84, + "end": 85, "loc": { "start": { "line": 1, - "column": 60 + "column": 84 }, "end": { "line": 1, - "column": 61 + "column": 85 } } }, @@ -4641,8 +4641,8 @@ "updateContext": null }, "value": "import", - "start": 62, - "end": 68, + "start": 86, + "end": 92, "loc": { "start": { "line": 2, @@ -4667,8 +4667,8 @@ "binop": null }, "value": "NoteDataservice", - "start": 69, - "end": 84, + "start": 93, + "end": 108, "loc": { "start": { "line": 2, @@ -4693,8 +4693,8 @@ "binop": null, "updateContext": null }, - "start": 84, - "end": 85, + "start": 108, + "end": 109, "loc": { "start": { "line": 2, @@ -4718,8 +4718,8 @@ "postfix": false, "binop": null }, - "start": 86, - "end": 87, + "start": 110, + "end": 111, "loc": { "start": { "line": 2, @@ -4744,8 +4744,8 @@ "binop": null }, "value": "Note", - "start": 88, - "end": 92, + "start": 112, + "end": 116, "loc": { "start": { "line": 2, @@ -4769,8 +4769,8 @@ "postfix": false, "binop": null }, - "start": 93, - "end": 94, + "start": 117, + "end": 118, "loc": { "start": { "line": 2, @@ -4795,8 +4795,8 @@ "binop": null }, "value": "from", - "start": 95, - "end": 99, + "start": 119, + "end": 123, "loc": { "start": { "line": 2, @@ -4822,8 +4822,8 @@ "updateContext": null }, "value": "../dataservices/note.service.js", - "start": 100, - "end": 133, + "start": 124, + "end": 157, "loc": { "start": { "line": 2, @@ -4848,8 +4848,8 @@ "binop": null, "updateContext": null }, - "start": 133, - "end": 134, + "start": 157, + "end": 158, "loc": { "start": { "line": 2, @@ -4864,8 +4864,8 @@ { "type": "CommentBlock", "value": "*\n * Container Controller for Note CRUD Functions\n ", - "start": 136, - "end": 191, + "start": 160, + "end": 215, "loc": { "start": { "line": 4, @@ -4892,8 +4892,8 @@ "updateContext": null }, "value": "export", - "start": 192, - "end": 198, + "start": 216, + "end": 222, "loc": { "start": { "line": 7, @@ -4920,8 +4920,8 @@ "updateContext": null }, "value": "class", - "start": 199, - "end": 204, + "start": 223, + "end": 228, "loc": { "start": { "line": 7, @@ -4946,8 +4946,8 @@ "binop": null }, "value": "NoteController", - "start": 205, - "end": 219, + "start": 229, + "end": 243, "loc": { "start": { "line": 7, @@ -4971,8 +4971,8 @@ "postfix": false, "binop": null }, - "start": 220, - "end": 221, + "start": 244, + "end": 245, "loc": { "start": { "line": 7, @@ -4987,8 +4987,8 @@ { "type": "CommentBlock", "value": "*\n * Returns a note, specified by Id\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler object for rejecting/setting errors\n * @return {Note} Note corresponding to Id passed in\n ", - "start": 224, - "end": 458, + "start": 248, + "end": 482, "loc": { "start": { "line": 8, @@ -5013,8 +5013,8 @@ "binop": null }, "value": "static", - "start": 461, - "end": 467, + "start": 485, + "end": 491, "loc": { "start": { "line": 14, @@ -5039,8 +5039,8 @@ "binop": null }, "value": "async", - "start": 468, - "end": 473, + "start": 492, + "end": 497, "loc": { "start": { "line": 14, @@ -5065,8 +5065,8 @@ "binop": null }, "value": "getNoteById", - "start": 474, - "end": 485, + "start": 498, + "end": 509, "loc": { "start": { "line": 14, @@ -5090,8 +5090,8 @@ "postfix": false, "binop": null }, - "start": 485, - "end": 486, + "start": 509, + "end": 510, "loc": { "start": { "line": 14, @@ -5115,8 +5115,8 @@ "postfix": false, "binop": null }, - "start": 486, - "end": 487, + "start": 510, + "end": 511, "loc": { "start": { "line": 14, @@ -5141,8 +5141,8 @@ "binop": null }, "value": "params", - "start": 488, - "end": 494, + "start": 512, + "end": 518, "loc": { "start": { "line": 14, @@ -5166,8 +5166,8 @@ "postfix": false, "binop": null }, - "start": 495, - "end": 496, + "start": 519, + "end": 520, "loc": { "start": { "line": 14, @@ -5192,8 +5192,8 @@ "binop": null, "updateContext": null }, - "start": 496, - "end": 497, + "start": 520, + "end": 521, "loc": { "start": { "line": 14, @@ -5218,8 +5218,8 @@ "binop": null }, "value": "handler", - "start": 498, - "end": 505, + "start": 522, + "end": 529, "loc": { "start": { "line": 14, @@ -5243,8 +5243,8 @@ "postfix": false, "binop": null }, - "start": 505, - "end": 506, + "start": 529, + "end": 530, "loc": { "start": { "line": 14, @@ -5268,8 +5268,8 @@ "postfix": false, "binop": null }, - "start": 507, - "end": 508, + "start": 531, + "end": 532, "loc": { "start": { "line": 14, @@ -5296,8 +5296,8 @@ "updateContext": null }, "value": "try", - "start": 513, - "end": 516, + "start": 537, + "end": 540, "loc": { "start": { "line": 15, @@ -5321,8 +5321,8 @@ "postfix": false, "binop": null }, - "start": 517, - "end": 518, + "start": 541, + "end": 542, "loc": { "start": { "line": 15, @@ -5349,8 +5349,8 @@ "updateContext": null }, "value": "return", - "start": 525, - "end": 531, + "start": 549, + "end": 555, "loc": { "start": { "line": 16, @@ -5375,8 +5375,8 @@ "binop": null }, "value": "await", - "start": 532, - "end": 537, + "start": 556, + "end": 561, "loc": { "start": { "line": 16, @@ -5401,8 +5401,8 @@ "binop": null }, "value": "NoteDataservice", - "start": 538, - "end": 553, + "start": 562, + "end": 577, "loc": { "start": { "line": 16, @@ -5427,8 +5427,8 @@ "binop": null, "updateContext": null }, - "start": 553, - "end": 554, + "start": 577, + "end": 578, "loc": { "start": { "line": 16, @@ -5453,8 +5453,8 @@ "binop": null }, "value": "getNote", - "start": 554, - "end": 561, + "start": 578, + "end": 585, "loc": { "start": { "line": 16, @@ -5478,8 +5478,8 @@ "postfix": false, "binop": null }, - "start": 561, - "end": 562, + "start": 585, + "end": 586, "loc": { "start": { "line": 16, @@ -5503,8 +5503,8 @@ "postfix": false, "binop": null }, - "start": 562, - "end": 563, + "start": 586, + "end": 587, "loc": { "start": { "line": 16, @@ -5529,8 +5529,8 @@ "binop": null }, "value": "id", - "start": 564, - "end": 566, + "start": 588, + "end": 590, "loc": { "start": { "line": 16, @@ -5555,8 +5555,8 @@ "binop": null, "updateContext": null }, - "start": 566, - "end": 567, + "start": 590, + "end": 591, "loc": { "start": { "line": 16, @@ -5581,8 +5581,8 @@ "binop": null }, "value": "params", - "start": 568, - "end": 574, + "start": 592, + "end": 598, "loc": { "start": { "line": 16, @@ -5607,8 +5607,8 @@ "binop": null, "updateContext": null }, - "start": 574, - "end": 575, + "start": 598, + "end": 599, "loc": { "start": { "line": 16, @@ -5633,8 +5633,8 @@ "binop": null }, "value": "id", - "start": 575, - "end": 577, + "start": 599, + "end": 601, "loc": { "start": { "line": 16, @@ -5658,8 +5658,8 @@ "postfix": false, "binop": null }, - "start": 578, - "end": 579, + "start": 602, + "end": 603, "loc": { "start": { "line": 16, @@ -5683,8 +5683,8 @@ "postfix": false, "binop": null }, - "start": 579, - "end": 580, + "start": 603, + "end": 604, "loc": { "start": { "line": 16, @@ -5709,8 +5709,8 @@ "binop": null, "updateContext": null }, - "start": 580, - "end": 581, + "start": 604, + "end": 605, "loc": { "start": { "line": 16, @@ -5734,8 +5734,8 @@ "postfix": false, "binop": null }, - "start": 586, - "end": 587, + "start": 610, + "end": 611, "loc": { "start": { "line": 17, @@ -5762,8 +5762,8 @@ "updateContext": null }, "value": "catch", - "start": 588, - "end": 593, + "start": 612, + "end": 617, "loc": { "start": { "line": 17, @@ -5787,8 +5787,8 @@ "postfix": false, "binop": null }, - "start": 594, - "end": 595, + "start": 618, + "end": 619, "loc": { "start": { "line": 17, @@ -5813,8 +5813,8 @@ "binop": null }, "value": "err", - "start": 595, - "end": 598, + "start": 619, + "end": 622, "loc": { "start": { "line": 17, @@ -5838,8 +5838,8 @@ "postfix": false, "binop": null }, - "start": 598, - "end": 599, + "start": 622, + "end": 623, "loc": { "start": { "line": 17, @@ -5863,8 +5863,8 @@ "postfix": false, "binop": null }, - "start": 600, - "end": 601, + "start": 624, + "end": 625, "loc": { "start": { "line": 17, @@ -5879,8 +5879,8 @@ { "type": "CommentLine", "value": " Get resp(HapiHandler) to return http code if number", - "start": 608, - "end": 662, + "start": 632, + "end": 686, "loc": { "start": { "line": 18, @@ -5907,8 +5907,8 @@ "updateContext": null }, "value": "const", - "start": 669, - "end": 674, + "start": 693, + "end": 698, "loc": { "start": { "line": 19, @@ -5933,8 +5933,8 @@ "binop": null }, "value": "resp", - "start": 675, - "end": 679, + "start": 699, + "end": 703, "loc": { "start": { "line": 19, @@ -5960,8 +5960,8 @@ "updateContext": null }, "value": "=", - "start": 680, - "end": 681, + "start": 704, + "end": 705, "loc": { "start": { "line": 19, @@ -5986,8 +5986,8 @@ "binop": null }, "value": "handler", - "start": 682, - "end": 689, + "start": 706, + "end": 713, "loc": { "start": { "line": 19, @@ -6012,8 +6012,8 @@ "binop": null, "updateContext": null }, - "start": 689, - "end": 690, + "start": 713, + "end": 714, "loc": { "start": { "line": 19, @@ -6038,8 +6038,8 @@ "binop": null }, "value": "response", - "start": 690, - "end": 698, + "start": 714, + "end": 722, "loc": { "start": { "line": 19, @@ -6063,8 +6063,8 @@ "postfix": false, "binop": null }, - "start": 698, - "end": 699, + "start": 722, + "end": 723, "loc": { "start": { "line": 19, @@ -6088,8 +6088,8 @@ "postfix": false, "binop": null }, - "start": 699, - "end": 700, + "start": 723, + "end": 724, "loc": { "start": { "line": 19, @@ -6114,8 +6114,8 @@ "binop": null }, "value": "message", - "start": 709, - "end": 716, + "start": 733, + "end": 740, "loc": { "start": { "line": 20, @@ -6140,8 +6140,8 @@ "binop": null, "updateContext": null }, - "start": 716, - "end": 717, + "start": 740, + "end": 741, "loc": { "start": { "line": 20, @@ -6166,8 +6166,8 @@ "binop": null }, "value": "err", - "start": 718, - "end": 721, + "start": 742, + "end": 745, "loc": { "start": { "line": 20, @@ -6192,8 +6192,8 @@ "binop": null, "updateContext": null }, - "start": 721, - "end": 722, + "start": 745, + "end": 746, "loc": { "start": { "line": 20, @@ -6218,8 +6218,8 @@ "binop": null }, "value": "message", - "start": 722, - "end": 729, + "start": 746, + "end": 753, "loc": { "start": { "line": 20, @@ -6244,8 +6244,8 @@ "binop": null, "updateContext": null }, - "start": 729, - "end": 730, + "start": 753, + "end": 754, "loc": { "start": { "line": 20, @@ -6270,8 +6270,8 @@ "binop": null }, "value": "code", - "start": 739, - "end": 743, + "start": 763, + "end": 767, "loc": { "start": { "line": 21, @@ -6296,8 +6296,8 @@ "binop": null, "updateContext": null }, - "start": 743, - "end": 744, + "start": 767, + "end": 768, "loc": { "start": { "line": 21, @@ -6322,8 +6322,8 @@ "binop": null }, "value": "err", - "start": 745, - "end": 748, + "start": 769, + "end": 772, "loc": { "start": { "line": 21, @@ -6348,8 +6348,8 @@ "binop": null, "updateContext": null }, - "start": 748, - "end": 749, + "start": 772, + "end": 773, "loc": { "start": { "line": 21, @@ -6374,8 +6374,8 @@ "binop": null }, "value": "code", - "start": 749, - "end": 753, + "start": 773, + "end": 777, "loc": { "start": { "line": 21, @@ -6399,8 +6399,8 @@ "postfix": false, "binop": null }, - "start": 760, - "end": 761, + "start": 784, + "end": 785, "loc": { "start": { "line": 22, @@ -6424,8 +6424,8 @@ "postfix": false, "binop": null }, - "start": 761, - "end": 762, + "start": 785, + "end": 786, "loc": { "start": { "line": 22, @@ -6450,8 +6450,8 @@ "binop": null, "updateContext": null }, - "start": 762, - "end": 763, + "start": 786, + "end": 787, "loc": { "start": { "line": 22, @@ -6478,8 +6478,8 @@ "updateContext": null }, "value": "if", - "start": 770, - "end": 772, + "start": 794, + "end": 796, "loc": { "start": { "line": 23, @@ -6503,8 +6503,8 @@ "postfix": false, "binop": null }, - "start": 773, - "end": 774, + "start": 797, + "end": 798, "loc": { "start": { "line": 23, @@ -6531,8 +6531,8 @@ "updateContext": null }, "value": "typeof", - "start": 774, - "end": 780, + "start": 798, + "end": 804, "loc": { "start": { "line": 23, @@ -6557,8 +6557,8 @@ "binop": null }, "value": "err", - "start": 781, - "end": 784, + "start": 805, + "end": 808, "loc": { "start": { "line": 23, @@ -6583,8 +6583,8 @@ "binop": null, "updateContext": null }, - "start": 784, - "end": 785, + "start": 808, + "end": 809, "loc": { "start": { "line": 23, @@ -6609,8 +6609,8 @@ "binop": null }, "value": "code", - "start": 785, - "end": 789, + "start": 809, + "end": 813, "loc": { "start": { "line": 23, @@ -6636,8 +6636,8 @@ "updateContext": null }, "value": "===", - "start": 790, - "end": 793, + "start": 814, + "end": 817, "loc": { "start": { "line": 23, @@ -6663,8 +6663,8 @@ "updateContext": null }, "value": "number", - "start": 794, - "end": 802, + "start": 818, + "end": 826, "loc": { "start": { "line": 23, @@ -6688,8 +6688,8 @@ "postfix": false, "binop": null }, - "start": 802, - "end": 803, + "start": 826, + "end": 827, "loc": { "start": { "line": 23, @@ -6713,8 +6713,8 @@ "postfix": false, "binop": null }, - "start": 804, - "end": 805, + "start": 828, + "end": 829, "loc": { "start": { "line": 23, @@ -6739,8 +6739,8 @@ "binop": null }, "value": "resp", - "start": 814, - "end": 818, + "start": 838, + "end": 842, "loc": { "start": { "line": 24, @@ -6765,8 +6765,8 @@ "binop": null, "updateContext": null }, - "start": 818, - "end": 819, + "start": 842, + "end": 843, "loc": { "start": { "line": 24, @@ -6791,8 +6791,8 @@ "binop": null }, "value": "code", - "start": 819, - "end": 823, + "start": 843, + "end": 847, "loc": { "start": { "line": 24, @@ -6816,8 +6816,8 @@ "postfix": false, "binop": null }, - "start": 823, - "end": 824, + "start": 847, + "end": 848, "loc": { "start": { "line": 24, @@ -6842,8 +6842,8 @@ "binop": null }, "value": "err", - "start": 824, - "end": 827, + "start": 848, + "end": 851, "loc": { "start": { "line": 24, @@ -6868,8 +6868,8 @@ "binop": null, "updateContext": null }, - "start": 827, - "end": 828, + "start": 851, + "end": 852, "loc": { "start": { "line": 24, @@ -6894,8 +6894,8 @@ "binop": null }, "value": "code", - "start": 828, - "end": 832, + "start": 852, + "end": 856, "loc": { "start": { "line": 24, @@ -6919,8 +6919,8 @@ "postfix": false, "binop": null }, - "start": 832, - "end": 833, + "start": 856, + "end": 857, "loc": { "start": { "line": 24, @@ -6945,8 +6945,8 @@ "binop": null, "updateContext": null }, - "start": 833, - "end": 834, + "start": 857, + "end": 858, "loc": { "start": { "line": 24, @@ -6970,8 +6970,8 @@ "postfix": false, "binop": null }, - "start": 841, - "end": 842, + "start": 865, + "end": 866, "loc": { "start": { "line": 25, @@ -6998,8 +6998,8 @@ "updateContext": null }, "value": "else", - "start": 843, - "end": 847, + "start": 867, + "end": 871, "loc": { "start": { "line": 25, @@ -7023,8 +7023,8 @@ "postfix": false, "binop": null }, - "start": 848, - "end": 849, + "start": 872, + "end": 873, "loc": { "start": { "line": 25, @@ -7051,8 +7051,8 @@ "updateContext": null }, "value": "throw", - "start": 858, - "end": 863, + "start": 882, + "end": 887, "loc": { "start": { "line": 26, @@ -7077,8 +7077,8 @@ "binop": null }, "value": "err", - "start": 864, - "end": 867, + "start": 888, + "end": 891, "loc": { "start": { "line": 26, @@ -7103,8 +7103,8 @@ "binop": null, "updateContext": null }, - "start": 867, - "end": 868, + "start": 891, + "end": 892, "loc": { "start": { "line": 26, @@ -7128,8 +7128,8 @@ "postfix": false, "binop": null }, - "start": 875, - "end": 876, + "start": 899, + "end": 900, "loc": { "start": { "line": 27, @@ -7156,8 +7156,8 @@ "updateContext": null }, "value": "return", - "start": 883, - "end": 889, + "start": 907, + "end": 913, "loc": { "start": { "line": 28, @@ -7182,8 +7182,8 @@ "binop": null }, "value": "resp", - "start": 890, - "end": 894, + "start": 914, + "end": 918, "loc": { "start": { "line": 28, @@ -7208,8 +7208,8 @@ "binop": null, "updateContext": null }, - "start": 894, - "end": 895, + "start": 918, + "end": 919, "loc": { "start": { "line": 28, @@ -7233,8 +7233,8 @@ "postfix": false, "binop": null }, - "start": 900, - "end": 901, + "start": 924, + "end": 925, "loc": { "start": { "line": 29, @@ -7258,8 +7258,8 @@ "postfix": false, "binop": null }, - "start": 904, - "end": 905, + "start": 928, + "end": 929, "loc": { "start": { "line": 30, @@ -7274,8 +7274,8 @@ { "type": "CommentBlock", "value": "*\n * Create a new Note\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler\n * @return {Note} [description]\n ", - "start": 909, - "end": 1071, + "start": 933, + "end": 1095, "loc": { "start": { "line": 32, @@ -7300,8 +7300,8 @@ "binop": null }, "value": "static", - "start": 1074, - "end": 1080, + "start": 1098, + "end": 1104, "loc": { "start": { "line": 38, @@ -7326,8 +7326,8 @@ "binop": null }, "value": "createNote", - "start": 1081, - "end": 1091, + "start": 1105, + "end": 1115, "loc": { "start": { "line": 38, @@ -7351,8 +7351,8 @@ "postfix": false, "binop": null }, - "start": 1091, - "end": 1092, + "start": 1115, + "end": 1116, "loc": { "start": { "line": 38, @@ -7376,8 +7376,8 @@ "postfix": false, "binop": null }, - "start": 1092, - "end": 1093, + "start": 1116, + "end": 1117, "loc": { "start": { "line": 38, @@ -7402,8 +7402,8 @@ "binop": null }, "value": "payload", - "start": 1094, - "end": 1101, + "start": 1118, + "end": 1125, "loc": { "start": { "line": 38, @@ -7427,8 +7427,8 @@ "postfix": false, "binop": null }, - "start": 1102, - "end": 1103, + "start": 1126, + "end": 1127, "loc": { "start": { "line": 38, @@ -7453,8 +7453,8 @@ "binop": null, "updateContext": null }, - "start": 1103, - "end": 1104, + "start": 1127, + "end": 1128, "loc": { "start": { "line": 38, @@ -7479,8 +7479,8 @@ "binop": null }, "value": "handler", - "start": 1105, - "end": 1112, + "start": 1129, + "end": 1136, "loc": { "start": { "line": 38, @@ -7504,8 +7504,8 @@ "postfix": false, "binop": null }, - "start": 1112, - "end": 1113, + "start": 1136, + "end": 1137, "loc": { "start": { "line": 38, @@ -7529,8 +7529,8 @@ "postfix": false, "binop": null }, - "start": 1114, - "end": 1115, + "start": 1138, + "end": 1139, "loc": { "start": { "line": 38, @@ -7557,8 +7557,8 @@ "updateContext": null }, "value": "if", - "start": 1120, - "end": 1122, + "start": 1144, + "end": 1146, "loc": { "start": { "line": 39, @@ -7582,8 +7582,8 @@ "postfix": false, "binop": null }, - "start": 1123, - "end": 1124, + "start": 1147, + "end": 1148, "loc": { "start": { "line": 39, @@ -7608,8 +7608,8 @@ "binop": null }, "value": "payload", - "start": 1124, - "end": 1131, + "start": 1148, + "end": 1155, "loc": { "start": { "line": 39, @@ -7634,8 +7634,8 @@ "binop": null, "updateContext": null }, - "start": 1131, - "end": 1132, + "start": 1155, + "end": 1156, "loc": { "start": { "line": 39, @@ -7660,8 +7660,8 @@ "binop": null }, "value": "name", - "start": 1132, - "end": 1136, + "start": 1156, + "end": 1160, "loc": { "start": { "line": 39, @@ -7685,8 +7685,8 @@ "postfix": false, "binop": null }, - "start": 1136, - "end": 1137, + "start": 1160, + "end": 1161, "loc": { "start": { "line": 39, @@ -7710,8 +7710,8 @@ "postfix": false, "binop": null }, - "start": 1138, - "end": 1139, + "start": 1162, + "end": 1163, "loc": { "start": { "line": 39, @@ -7738,8 +7738,8 @@ "updateContext": null }, "value": "return", - "start": 1146, - "end": 1152, + "start": 1170, + "end": 1176, "loc": { "start": { "line": 40, @@ -7764,8 +7764,8 @@ "binop": null }, "value": "NoteDataservice", - "start": 1153, - "end": 1168, + "start": 1177, + "end": 1192, "loc": { "start": { "line": 40, @@ -7790,8 +7790,8 @@ "binop": null, "updateContext": null }, - "start": 1168, - "end": 1169, + "start": 1192, + "end": 1193, "loc": { "start": { "line": 40, @@ -7816,8 +7816,8 @@ "binop": null }, "value": "createNote", - "start": 1169, - "end": 1179, + "start": 1193, + "end": 1203, "loc": { "start": { "line": 40, @@ -7841,8 +7841,8 @@ "postfix": false, "binop": null }, - "start": 1179, - "end": 1180, + "start": 1203, + "end": 1204, "loc": { "start": { "line": 40, @@ -7866,8 +7866,8 @@ "postfix": false, "binop": null }, - "start": 1180, - "end": 1181, + "start": 1204, + "end": 1205, "loc": { "start": { "line": 40, @@ -7892,8 +7892,8 @@ "binop": null }, "value": "name", - "start": 1182, - "end": 1186, + "start": 1206, + "end": 1210, "loc": { "start": { "line": 40, @@ -7918,8 +7918,8 @@ "binop": null, "updateContext": null }, - "start": 1186, - "end": 1187, + "start": 1210, + "end": 1211, "loc": { "start": { "line": 40, @@ -7944,8 +7944,8 @@ "binop": null }, "value": "payload", - "start": 1188, - "end": 1195, + "start": 1212, + "end": 1219, "loc": { "start": { "line": 40, @@ -7970,8 +7970,8 @@ "binop": null, "updateContext": null }, - "start": 1195, - "end": 1196, + "start": 1219, + "end": 1220, "loc": { "start": { "line": 40, @@ -7996,8 +7996,8 @@ "binop": null }, "value": "name", - "start": 1196, - "end": 1200, + "start": 1220, + "end": 1224, "loc": { "start": { "line": 40, @@ -8021,8 +8021,8 @@ "postfix": false, "binop": null }, - "start": 1201, - "end": 1202, + "start": 1225, + "end": 1226, "loc": { "start": { "line": 40, @@ -8046,8 +8046,8 @@ "postfix": false, "binop": null }, - "start": 1202, - "end": 1203, + "start": 1226, + "end": 1227, "loc": { "start": { "line": 40, @@ -8072,8 +8072,8 @@ "binop": null, "updateContext": null }, - "start": 1203, - "end": 1204, + "start": 1227, + "end": 1228, "loc": { "start": { "line": 40, @@ -8097,8 +8097,8 @@ "postfix": false, "binop": null }, - "start": 1209, - "end": 1210, + "start": 1233, + "end": 1234, "loc": { "start": { "line": 41, @@ -8125,8 +8125,8 @@ "updateContext": null }, "value": "else", - "start": 1211, - "end": 1215, + "start": 1235, + "end": 1239, "loc": { "start": { "line": 41, @@ -8153,8 +8153,8 @@ "updateContext": null }, "value": "if", - "start": 1216, - "end": 1218, + "start": 1240, + "end": 1242, "loc": { "start": { "line": 41, @@ -8178,8 +8178,8 @@ "postfix": false, "binop": null }, - "start": 1219, - "end": 1220, + "start": 1243, + "end": 1244, "loc": { "start": { "line": 41, @@ -8204,8 +8204,8 @@ "binop": null }, "value": "Array", - "start": 1220, - "end": 1225, + "start": 1244, + "end": 1249, "loc": { "start": { "line": 41, @@ -8230,8 +8230,8 @@ "binop": null, "updateContext": null }, - "start": 1225, - "end": 1226, + "start": 1249, + "end": 1250, "loc": { "start": { "line": 41, @@ -8256,8 +8256,8 @@ "binop": null }, "value": "isArray", - "start": 1226, - "end": 1233, + "start": 1250, + "end": 1257, "loc": { "start": { "line": 41, @@ -8281,8 +8281,8 @@ "postfix": false, "binop": null }, - "start": 1233, - "end": 1234, + "start": 1257, + "end": 1258, "loc": { "start": { "line": 41, @@ -8307,8 +8307,8 @@ "binop": null }, "value": "payload", - "start": 1234, - "end": 1241, + "start": 1258, + "end": 1265, "loc": { "start": { "line": 41, @@ -8332,8 +8332,8 @@ "postfix": false, "binop": null }, - "start": 1241, - "end": 1242, + "start": 1265, + "end": 1266, "loc": { "start": { "line": 41, @@ -8357,8 +8357,8 @@ "postfix": false, "binop": null }, - "start": 1242, - "end": 1243, + "start": 1266, + "end": 1267, "loc": { "start": { "line": 41, @@ -8382,8 +8382,8 @@ "postfix": false, "binop": null }, - "start": 1244, - "end": 1245, + "start": 1268, + "end": 1269, "loc": { "start": { "line": 41, @@ -8410,8 +8410,8 @@ "updateContext": null }, "value": "return", - "start": 1252, - "end": 1258, + "start": 1276, + "end": 1282, "loc": { "start": { "line": 42, @@ -8436,8 +8436,8 @@ "binop": null }, "value": "NoteDataservice", - "start": 1259, - "end": 1274, + "start": 1283, + "end": 1298, "loc": { "start": { "line": 42, @@ -8462,8 +8462,8 @@ "binop": null, "updateContext": null }, - "start": 1274, - "end": 1275, + "start": 1298, + "end": 1299, "loc": { "start": { "line": 42, @@ -8488,8 +8488,8 @@ "binop": null }, "value": "createNotes", - "start": 1275, - "end": 1286, + "start": 1299, + "end": 1310, "loc": { "start": { "line": 42, @@ -8513,8 +8513,8 @@ "postfix": false, "binop": null }, - "start": 1286, - "end": 1287, + "start": 1310, + "end": 1311, "loc": { "start": { "line": 42, @@ -8539,8 +8539,8 @@ "binop": null }, "value": "payload", - "start": 1287, - "end": 1294, + "start": 1311, + "end": 1318, "loc": { "start": { "line": 42, @@ -8564,8 +8564,8 @@ "postfix": false, "binop": null }, - "start": 1294, - "end": 1295, + "start": 1318, + "end": 1319, "loc": { "start": { "line": 42, @@ -8590,8 +8590,8 @@ "binop": null, "updateContext": null }, - "start": 1295, - "end": 1296, + "start": 1319, + "end": 1320, "loc": { "start": { "line": 42, @@ -8615,8 +8615,8 @@ "postfix": false, "binop": null }, - "start": 1301, - "end": 1302, + "start": 1325, + "end": 1326, "loc": { "start": { "line": 43, @@ -8643,8 +8643,8 @@ "updateContext": null }, "value": "else", - "start": 1303, - "end": 1307, + "start": 1327, + "end": 1331, "loc": { "start": { "line": 43, @@ -8668,8 +8668,8 @@ "postfix": false, "binop": null }, - "start": 1308, - "end": 1309, + "start": 1332, + "end": 1333, "loc": { "start": { "line": 43, @@ -8696,8 +8696,8 @@ "updateContext": null }, "value": "return", - "start": 1316, - "end": 1322, + "start": 1340, + "end": 1346, "loc": { "start": { "line": 44, @@ -8722,8 +8722,8 @@ "binop": null }, "value": "handler", - "start": 1323, - "end": 1330, + "start": 1347, + "end": 1354, "loc": { "start": { "line": 44, @@ -8748,8 +8748,8 @@ "binop": null, "updateContext": null }, - "start": 1330, - "end": 1331, + "start": 1354, + "end": 1355, "loc": { "start": { "line": 44, @@ -8774,8 +8774,8 @@ "binop": null }, "value": "response", - "start": 1331, - "end": 1339, + "start": 1355, + "end": 1363, "loc": { "start": { "line": 44, @@ -8799,8 +8799,8 @@ "postfix": false, "binop": null }, - "start": 1339, - "end": 1340, + "start": 1363, + "end": 1364, "loc": { "start": { "line": 44, @@ -8826,8 +8826,8 @@ "updateContext": null }, "value": "Missing Note(s) to create", - "start": 1340, - "end": 1367, + "start": 1364, + "end": 1391, "loc": { "start": { "line": 44, @@ -8851,8 +8851,8 @@ "postfix": false, "binop": null }, - "start": 1367, - "end": 1368, + "start": 1391, + "end": 1392, "loc": { "start": { "line": 44, @@ -8877,8 +8877,8 @@ "binop": null, "updateContext": null }, - "start": 1368, - "end": 1369, + "start": 1392, + "end": 1393, "loc": { "start": { "line": 44, @@ -8903,8 +8903,8 @@ "binop": null }, "value": "code", - "start": 1369, - "end": 1373, + "start": 1393, + "end": 1397, "loc": { "start": { "line": 44, @@ -8928,8 +8928,8 @@ "postfix": false, "binop": null }, - "start": 1373, - "end": 1374, + "start": 1397, + "end": 1398, "loc": { "start": { "line": 44, @@ -8955,8 +8955,8 @@ "updateContext": null }, "value": 500, - "start": 1374, - "end": 1377, + "start": 1398, + "end": 1401, "loc": { "start": { "line": 44, @@ -8980,8 +8980,8 @@ "postfix": false, "binop": null }, - "start": 1377, - "end": 1378, + "start": 1401, + "end": 1402, "loc": { "start": { "line": 44, @@ -9006,8 +9006,8 @@ "binop": null, "updateContext": null }, - "start": 1378, - "end": 1379, + "start": 1402, + "end": 1403, "loc": { "start": { "line": 44, @@ -9031,8 +9031,8 @@ "postfix": false, "binop": null }, - "start": 1384, - "end": 1385, + "start": 1408, + "end": 1409, "loc": { "start": { "line": 45, @@ -9056,8 +9056,8 @@ "postfix": false, "binop": null }, - "start": 1388, - "end": 1389, + "start": 1412, + "end": 1413, "loc": { "start": { "line": 46, @@ -9072,8 +9072,8 @@ { "type": "CommentBlock", "value": "*\n * Update a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {Note} [description]\n ", - "start": 1393, - "end": 1528, + "start": 1417, + "end": 1552, "loc": { "start": { "line": 48, @@ -9098,8 +9098,8 @@ "binop": null }, "value": "static", - "start": 1531, - "end": 1537, + "start": 1555, + "end": 1561, "loc": { "start": { "line": 53, @@ -9124,8 +9124,8 @@ "binop": null }, "value": "updateNote", - "start": 1538, - "end": 1548, + "start": 1562, + "end": 1572, "loc": { "start": { "line": 53, @@ -9149,8 +9149,8 @@ "postfix": false, "binop": null }, - "start": 1548, - "end": 1549, + "start": 1572, + "end": 1573, "loc": { "start": { "line": 53, @@ -9174,8 +9174,8 @@ "postfix": false, "binop": null }, - "start": 1549, - "end": 1550, + "start": 1573, + "end": 1574, "loc": { "start": { "line": 53, @@ -9200,8 +9200,8 @@ "binop": null }, "value": "payload", - "start": 1551, - "end": 1558, + "start": 1575, + "end": 1582, "loc": { "start": { "line": 53, @@ -9226,8 +9226,8 @@ "binop": null, "updateContext": null }, - "start": 1558, - "end": 1559, + "start": 1582, + "end": 1583, "loc": { "start": { "line": 53, @@ -9252,8 +9252,8 @@ "binop": null }, "value": "logger", - "start": 1560, - "end": 1566, + "start": 1584, + "end": 1590, "loc": { "start": { "line": 53, @@ -9277,8 +9277,8 @@ "postfix": false, "binop": null }, - "start": 1567, - "end": 1568, + "start": 1591, + "end": 1592, "loc": { "start": { "line": 53, @@ -9302,8 +9302,8 @@ "postfix": false, "binop": null }, - "start": 1568, - "end": 1569, + "start": 1592, + "end": 1593, "loc": { "start": { "line": 53, @@ -9327,8 +9327,8 @@ "postfix": false, "binop": null }, - "start": 1570, - "end": 1571, + "start": 1594, + "end": 1595, "loc": { "start": { "line": 53, @@ -9353,8 +9353,8 @@ "binop": null }, "value": "logger", - "start": 1576, - "end": 1582, + "start": 1600, + "end": 1606, "loc": { "start": { "line": 54, @@ -9379,8 +9379,8 @@ "binop": null, "updateContext": null }, - "start": 1582, - "end": 1583, + "start": 1606, + "end": 1607, "loc": { "start": { "line": 54, @@ -9405,8 +9405,8 @@ "binop": null }, "value": "trace", - "start": 1583, - "end": 1588, + "start": 1607, + "end": 1612, "loc": { "start": { "line": 54, @@ -9430,8 +9430,8 @@ "postfix": false, "binop": null }, - "start": 1588, - "end": 1589, + "start": 1612, + "end": 1613, "loc": { "start": { "line": 54, @@ -9455,8 +9455,8 @@ "postfix": false, "binop": null }, - "start": 1589, - "end": 1590, + "start": 1613, + "end": 1614, "loc": { "start": { "line": 54, @@ -9481,8 +9481,8 @@ "binop": null }, "value": "data", - "start": 1591, - "end": 1595, + "start": 1615, + "end": 1619, "loc": { "start": { "line": 54, @@ -9507,8 +9507,8 @@ "binop": null, "updateContext": null }, - "start": 1595, - "end": 1596, + "start": 1619, + "end": 1620, "loc": { "start": { "line": 54, @@ -9533,8 +9533,8 @@ "binop": null }, "value": "payload", - "start": 1597, - "end": 1604, + "start": 1621, + "end": 1628, "loc": { "start": { "line": 54, @@ -9558,8 +9558,8 @@ "postfix": false, "binop": null }, - "start": 1605, - "end": 1606, + "start": 1629, + "end": 1630, "loc": { "start": { "line": 54, @@ -9583,8 +9583,8 @@ "postfix": false, "binop": null }, - "start": 1606, - "end": 1607, + "start": 1630, + "end": 1631, "loc": { "start": { "line": 54, @@ -9609,8 +9609,8 @@ "binop": null, "updateContext": null }, - "start": 1607, - "end": 1608, + "start": 1631, + "end": 1632, "loc": { "start": { "line": 54, @@ -9625,8 +9625,8 @@ { "type": "CommentLine", "value": " TODO: Actually update / catch error on update", - "start": 1614, - "end": 1662, + "start": 1638, + "end": 1686, "loc": { "start": { "line": 56, @@ -9653,8 +9653,8 @@ "updateContext": null }, "value": "return", - "start": 1668, - "end": 1674, + "start": 1692, + "end": 1698, "loc": { "start": { "line": 58, @@ -9679,8 +9679,8 @@ "binop": null }, "value": "NoteDataservice", - "start": 1675, - "end": 1690, + "start": 1699, + "end": 1714, "loc": { "start": { "line": 58, @@ -9705,8 +9705,8 @@ "binop": null, "updateContext": null }, - "start": 1690, - "end": 1691, + "start": 1714, + "end": 1715, "loc": { "start": { "line": 58, @@ -9731,8 +9731,8 @@ "binop": null }, "value": "getNote", - "start": 1691, - "end": 1698, + "start": 1715, + "end": 1722, "loc": { "start": { "line": 58, @@ -9756,8 +9756,8 @@ "postfix": false, "binop": null }, - "start": 1698, - "end": 1699, + "start": 1722, + "end": 1723, "loc": { "start": { "line": 58, @@ -9781,8 +9781,8 @@ "postfix": false, "binop": null }, - "start": 1699, - "end": 1700, + "start": 1723, + "end": 1724, "loc": { "start": { "line": 58, @@ -9807,8 +9807,8 @@ "binop": null }, "value": "id", - "start": 1701, - "end": 1703, + "start": 1725, + "end": 1727, "loc": { "start": { "line": 58, @@ -9833,8 +9833,8 @@ "binop": null, "updateContext": null }, - "start": 1703, - "end": 1704, + "start": 1727, + "end": 1728, "loc": { "start": { "line": 58, @@ -9859,8 +9859,8 @@ "binop": null }, "value": "payload", - "start": 1705, - "end": 1712, + "start": 1729, + "end": 1736, "loc": { "start": { "line": 58, @@ -9885,8 +9885,8 @@ "binop": null, "updateContext": null }, - "start": 1712, - "end": 1713, + "start": 1736, + "end": 1737, "loc": { "start": { "line": 58, @@ -9911,8 +9911,8 @@ "binop": null }, "value": "id", - "start": 1713, - "end": 1715, + "start": 1737, + "end": 1739, "loc": { "start": { "line": 58, @@ -9936,8 +9936,8 @@ "postfix": false, "binop": null }, - "start": 1716, - "end": 1717, + "start": 1740, + "end": 1741, "loc": { "start": { "line": 58, @@ -9961,8 +9961,8 @@ "postfix": false, "binop": null }, - "start": 1717, - "end": 1718, + "start": 1741, + "end": 1742, "loc": { "start": { "line": 58, @@ -9987,8 +9987,8 @@ "binop": null, "updateContext": null }, - "start": 1718, - "end": 1719, + "start": 1742, + "end": 1743, "loc": { "start": { "line": 58, @@ -10012,8 +10012,8 @@ "postfix": false, "binop": null }, - "start": 1722, - "end": 1723, + "start": 1746, + "end": 1747, "loc": { "start": { "line": 59, @@ -10028,8 +10028,8 @@ { "type": "CommentBlock", "value": "*\n * Delete a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {boolean} [description]\n ", - "start": 1727, - "end": 1865, + "start": 1751, + "end": 1889, "loc": { "start": { "line": 61, @@ -10054,8 +10054,8 @@ "binop": null }, "value": "static", - "start": 1868, - "end": 1874, + "start": 1892, + "end": 1898, "loc": { "start": { "line": 66, @@ -10080,8 +10080,8 @@ "binop": null }, "value": "deleteNote", - "start": 1875, - "end": 1885, + "start": 1899, + "end": 1909, "loc": { "start": { "line": 66, @@ -10105,8 +10105,8 @@ "postfix": false, "binop": null }, - "start": 1885, - "end": 1886, + "start": 1909, + "end": 1910, "loc": { "start": { "line": 66, @@ -10130,8 +10130,8 @@ "postfix": false, "binop": null }, - "start": 1886, - "end": 1887, + "start": 1910, + "end": 1911, "loc": { "start": { "line": 66, @@ -10156,8 +10156,8 @@ "binop": null }, "value": "params", - "start": 1888, - "end": 1894, + "start": 1912, + "end": 1918, "loc": { "start": { "line": 66, @@ -10182,8 +10182,8 @@ "binop": null, "updateContext": null }, - "start": 1894, - "end": 1895, + "start": 1918, + "end": 1919, "loc": { "start": { "line": 66, @@ -10208,8 +10208,8 @@ "binop": null }, "value": "logger", - "start": 1896, - "end": 1902, + "start": 1920, + "end": 1926, "loc": { "start": { "line": 66, @@ -10233,8 +10233,8 @@ "postfix": false, "binop": null }, - "start": 1903, - "end": 1904, + "start": 1927, + "end": 1928, "loc": { "start": { "line": 66, @@ -10258,8 +10258,8 @@ "postfix": false, "binop": null }, - "start": 1904, - "end": 1905, + "start": 1928, + "end": 1929, "loc": { "start": { "line": 66, @@ -10283,8 +10283,8 @@ "postfix": false, "binop": null }, - "start": 1906, - "end": 1907, + "start": 1930, + "end": 1931, "loc": { "start": { "line": 66, @@ -10309,8 +10309,8 @@ "binop": null }, "value": "logger", - "start": 1912, - "end": 1918, + "start": 1936, + "end": 1942, "loc": { "start": { "line": 67, @@ -10335,8 +10335,8 @@ "binop": null, "updateContext": null }, - "start": 1918, - "end": 1919, + "start": 1942, + "end": 1943, "loc": { "start": { "line": 67, @@ -10361,8 +10361,8 @@ "binop": null }, "value": "info", - "start": 1919, - "end": 1923, + "start": 1943, + "end": 1947, "loc": { "start": { "line": 67, @@ -10386,8 +10386,8 @@ "postfix": false, "binop": null }, - "start": 1923, - "end": 1924, + "start": 1947, + "end": 1948, "loc": { "start": { "line": 67, @@ -10411,8 +10411,8 @@ "postfix": false, "binop": null }, - "start": 1924, - "end": 1925, + "start": 1948, + "end": 1949, "loc": { "start": { "line": 67, @@ -10437,8 +10437,8 @@ "binop": null }, "value": "data", - "start": 1926, - "end": 1930, + "start": 1950, + "end": 1954, "loc": { "start": { "line": 67, @@ -10463,8 +10463,8 @@ "binop": null, "updateContext": null }, - "start": 1930, - "end": 1931, + "start": 1954, + "end": 1955, "loc": { "start": { "line": 67, @@ -10489,8 +10489,8 @@ "binop": null }, "value": "params", - "start": 1932, - "end": 1938, + "start": 1956, + "end": 1962, "loc": { "start": { "line": 67, @@ -10514,8 +10514,8 @@ "postfix": false, "binop": null }, - "start": 1939, - "end": 1940, + "start": 1963, + "end": 1964, "loc": { "start": { "line": 67, @@ -10539,8 +10539,8 @@ "postfix": false, "binop": null }, - "start": 1940, - "end": 1941, + "start": 1964, + "end": 1965, "loc": { "start": { "line": 67, @@ -10565,8 +10565,8 @@ "binop": null, "updateContext": null }, - "start": 1941, - "end": 1942, + "start": 1965, + "end": 1966, "loc": { "start": { "line": 67, @@ -10593,8 +10593,8 @@ "updateContext": null }, "value": "return", - "start": 1948, - "end": 1954, + "start": 1972, + "end": 1978, "loc": { "start": { "line": 69, @@ -10621,8 +10621,8 @@ "updateContext": null }, "value": "true", - "start": 1955, - "end": 1959, + "start": 1979, + "end": 1983, "loc": { "start": { "line": 69, @@ -10647,8 +10647,8 @@ "binop": null, "updateContext": null }, - "start": 1959, - "end": 1960, + "start": 1983, + "end": 1984, "loc": { "start": { "line": 69, @@ -10672,8 +10672,8 @@ "postfix": false, "binop": null }, - "start": 1963, - "end": 1964, + "start": 1987, + "end": 1988, "loc": { "start": { "line": 70, @@ -10697,8 +10697,8 @@ "postfix": false, "binop": null }, - "start": 1965, - "end": 1966, + "start": 1989, + "end": 1990, "loc": { "start": { "line": 71, @@ -10725,8 +10725,8 @@ "updateContext": null }, "value": "export", - "start": 1968, - "end": 1974, + "start": 1992, + "end": 1998, "loc": { "start": { "line": 73, @@ -10753,8 +10753,8 @@ "updateContext": null }, "value": "default", - "start": 1975, - "end": 1982, + "start": 1999, + "end": 2006, "loc": { "start": { "line": 73, @@ -10779,8 +10779,8 @@ "binop": null, "updateContext": null }, - "start": 1983, - "end": 1984, + "start": 2007, + "end": 2008, "loc": { "start": { "line": 73, @@ -10804,8 +10804,8 @@ "postfix": false, "binop": null }, - "start": 1984, - "end": 1985, + "start": 2008, + "end": 2009, "loc": { "start": { "line": 73, @@ -10830,8 +10830,8 @@ "binop": null }, "value": "path", - "start": 1988, - "end": 1992, + "start": 2012, + "end": 2016, "loc": { "start": { "line": 74, @@ -10856,8 +10856,8 @@ "binop": null, "updateContext": null }, - "start": 1992, - "end": 1993, + "start": 2016, + "end": 2017, "loc": { "start": { "line": 74, @@ -10883,8 +10883,8 @@ "updateContext": null }, "value": "/note/{id}", - "start": 1994, - "end": 2006, + "start": 2018, + "end": 2030, "loc": { "start": { "line": 74, @@ -10909,8 +10909,8 @@ "binop": null, "updateContext": null }, - "start": 2006, - "end": 2007, + "start": 2030, + "end": 2031, "loc": { "start": { "line": 74, @@ -10935,8 +10935,8 @@ "binop": null }, "value": "method", - "start": 2010, - "end": 2016, + "start": 2034, + "end": 2040, "loc": { "start": { "line": 75, @@ -10961,8 +10961,8 @@ "binop": null, "updateContext": null }, - "start": 2016, - "end": 2017, + "start": 2040, + "end": 2041, "loc": { "start": { "line": 75, @@ -10988,8 +10988,8 @@ "updateContext": null }, "value": "GET", - "start": 2018, - "end": 2023, + "start": 2042, + "end": 2047, "loc": { "start": { "line": 75, @@ -11014,8 +11014,8 @@ "binop": null, "updateContext": null }, - "start": 2023, - "end": 2024, + "start": 2047, + "end": 2048, "loc": { "start": { "line": 75, @@ -11040,8 +11040,8 @@ "binop": null }, "value": "controller", - "start": 2027, - "end": 2037, + "start": 2051, + "end": 2061, "loc": { "start": { "line": 76, @@ -11066,8 +11066,8 @@ "binop": null, "updateContext": null }, - "start": 2037, - "end": 2038, + "start": 2061, + "end": 2062, "loc": { "start": { "line": 76, @@ -11092,8 +11092,8 @@ "binop": null }, "value": "NoteController", - "start": 2039, - "end": 2053, + "start": 2063, + "end": 2077, "loc": { "start": { "line": 76, @@ -11118,8 +11118,8 @@ "binop": null, "updateContext": null }, - "start": 2053, - "end": 2054, + "start": 2077, + "end": 2078, "loc": { "start": { "line": 76, @@ -11144,8 +11144,8 @@ "binop": null }, "value": "getNoteById", - "start": 2054, - "end": 2065, + "start": 2078, + "end": 2089, "loc": { "start": { "line": 76, @@ -11169,8 +11169,8 @@ "postfix": false, "binop": null }, - "start": 2066, - "end": 2067, + "start": 2090, + "end": 2091, "loc": { "start": { "line": 77, @@ -11195,8 +11195,8 @@ "binop": null, "updateContext": null }, - "start": 2067, - "end": 2068, + "start": 2091, + "end": 2092, "loc": { "start": { "line": 77, @@ -11220,8 +11220,8 @@ "postfix": false, "binop": null }, - "start": 2069, - "end": 2070, + "start": 2093, + "end": 2094, "loc": { "start": { "line": 77, @@ -11246,8 +11246,8 @@ "binop": null }, "value": "path", - "start": 2073, - "end": 2077, + "start": 2097, + "end": 2101, "loc": { "start": { "line": 78, @@ -11272,8 +11272,8 @@ "binop": null, "updateContext": null }, - "start": 2077, - "end": 2078, + "start": 2101, + "end": 2102, "loc": { "start": { "line": 78, @@ -11299,8 +11299,8 @@ "updateContext": null }, "value": "/note", - "start": 2079, - "end": 2086, + "start": 2103, + "end": 2110, "loc": { "start": { "line": 78, @@ -11325,8 +11325,8 @@ "binop": null, "updateContext": null }, - "start": 2086, - "end": 2087, + "start": 2110, + "end": 2111, "loc": { "start": { "line": 78, @@ -11351,8 +11351,8 @@ "binop": null }, "value": "method", - "start": 2090, - "end": 2096, + "start": 2114, + "end": 2120, "loc": { "start": { "line": 79, @@ -11377,8 +11377,8 @@ "binop": null, "updateContext": null }, - "start": 2096, - "end": 2097, + "start": 2120, + "end": 2121, "loc": { "start": { "line": 79, @@ -11404,8 +11404,8 @@ "updateContext": null }, "value": "POST", - "start": 2098, - "end": 2104, + "start": 2122, + "end": 2128, "loc": { "start": { "line": 79, @@ -11430,8 +11430,8 @@ "binop": null, "updateContext": null }, - "start": 2104, - "end": 2105, + "start": 2128, + "end": 2129, "loc": { "start": { "line": 79, @@ -11456,8 +11456,8 @@ "binop": null }, "value": "controller", - "start": 2108, - "end": 2118, + "start": 2132, + "end": 2142, "loc": { "start": { "line": 80, @@ -11482,8 +11482,8 @@ "binop": null, "updateContext": null }, - "start": 2118, - "end": 2119, + "start": 2142, + "end": 2143, "loc": { "start": { "line": 80, @@ -11508,8 +11508,8 @@ "binop": null }, "value": "NoteController", - "start": 2120, - "end": 2134, + "start": 2144, + "end": 2158, "loc": { "start": { "line": 80, @@ -11534,8 +11534,8 @@ "binop": null, "updateContext": null }, - "start": 2134, - "end": 2135, + "start": 2158, + "end": 2159, "loc": { "start": { "line": 80, @@ -11560,8 +11560,8 @@ "binop": null }, "value": "createNote", - "start": 2135, - "end": 2145, + "start": 2159, + "end": 2169, "loc": { "start": { "line": 80, @@ -11585,8 +11585,8 @@ "postfix": false, "binop": null }, - "start": 2146, - "end": 2147, + "start": 2170, + "end": 2171, "loc": { "start": { "line": 81, @@ -11611,8 +11611,8 @@ "binop": null, "updateContext": null }, - "start": 2147, - "end": 2148, + "start": 2171, + "end": 2172, "loc": { "start": { "line": 81, @@ -11636,8 +11636,8 @@ "postfix": false, "binop": null }, - "start": 2149, - "end": 2150, + "start": 2173, + "end": 2174, "loc": { "start": { "line": 81, @@ -11662,8 +11662,8 @@ "binop": null }, "value": "path", - "start": 2153, - "end": 2157, + "start": 2177, + "end": 2181, "loc": { "start": { "line": 82, @@ -11688,8 +11688,8 @@ "binop": null, "updateContext": null }, - "start": 2157, - "end": 2158, + "start": 2181, + "end": 2182, "loc": { "start": { "line": 82, @@ -11715,8 +11715,8 @@ "updateContext": null }, "value": "/note/{id?}", - "start": 2159, - "end": 2172, + "start": 2183, + "end": 2196, "loc": { "start": { "line": 82, @@ -11741,8 +11741,8 @@ "binop": null, "updateContext": null }, - "start": 2172, - "end": 2173, + "start": 2196, + "end": 2197, "loc": { "start": { "line": 82, @@ -11767,8 +11767,8 @@ "binop": null }, "value": "method", - "start": 2176, - "end": 2182, + "start": 2200, + "end": 2206, "loc": { "start": { "line": 83, @@ -11793,8 +11793,8 @@ "binop": null, "updateContext": null }, - "start": 2182, - "end": 2183, + "start": 2206, + "end": 2207, "loc": { "start": { "line": 83, @@ -11820,8 +11820,8 @@ "updateContext": null }, "value": "PUT", - "start": 2184, - "end": 2189, + "start": 2208, + "end": 2213, "loc": { "start": { "line": 83, @@ -11846,8 +11846,8 @@ "binop": null, "updateContext": null }, - "start": 2189, - "end": 2190, + "start": 2213, + "end": 2214, "loc": { "start": { "line": 83, @@ -11872,8 +11872,8 @@ "binop": null }, "value": "controller", - "start": 2193, - "end": 2203, + "start": 2217, + "end": 2227, "loc": { "start": { "line": 84, @@ -11898,8 +11898,8 @@ "binop": null, "updateContext": null }, - "start": 2203, - "end": 2204, + "start": 2227, + "end": 2228, "loc": { "start": { "line": 84, @@ -11924,8 +11924,8 @@ "binop": null }, "value": "NoteController", - "start": 2205, - "end": 2219, + "start": 2229, + "end": 2243, "loc": { "start": { "line": 84, @@ -11950,8 +11950,8 @@ "binop": null, "updateContext": null }, - "start": 2219, - "end": 2220, + "start": 2243, + "end": 2244, "loc": { "start": { "line": 84, @@ -11976,8 +11976,8 @@ "binop": null }, "value": "updateNote", - "start": 2220, - "end": 2230, + "start": 2244, + "end": 2254, "loc": { "start": { "line": 84, @@ -12001,8 +12001,8 @@ "postfix": false, "binop": null }, - "start": 2231, - "end": 2232, + "start": 2255, + "end": 2256, "loc": { "start": { "line": 85, @@ -12027,8 +12027,8 @@ "binop": null, "updateContext": null }, - "start": 2232, - "end": 2233, + "start": 2256, + "end": 2257, "loc": { "start": { "line": 85, @@ -12052,8 +12052,8 @@ "postfix": false, "binop": null }, - "start": 2234, - "end": 2235, + "start": 2258, + "end": 2259, "loc": { "start": { "line": 85, @@ -12078,8 +12078,8 @@ "binop": null }, "value": "path", - "start": 2238, - "end": 2242, + "start": 2262, + "end": 2266, "loc": { "start": { "line": 86, @@ -12104,8 +12104,8 @@ "binop": null, "updateContext": null }, - "start": 2242, - "end": 2243, + "start": 2266, + "end": 2267, "loc": { "start": { "line": 86, @@ -12131,8 +12131,8 @@ "updateContext": null }, "value": "/note/{id}", - "start": 2244, - "end": 2256, + "start": 2268, + "end": 2280, "loc": { "start": { "line": 86, @@ -12157,8 +12157,8 @@ "binop": null, "updateContext": null }, - "start": 2256, - "end": 2257, + "start": 2280, + "end": 2281, "loc": { "start": { "line": 86, @@ -12183,8 +12183,8 @@ "binop": null }, "value": "method", - "start": 2260, - "end": 2266, + "start": 2284, + "end": 2290, "loc": { "start": { "line": 87, @@ -12209,8 +12209,8 @@ "binop": null, "updateContext": null }, - "start": 2266, - "end": 2267, + "start": 2290, + "end": 2291, "loc": { "start": { "line": 87, @@ -12236,8 +12236,8 @@ "updateContext": null }, "value": "DELETE", - "start": 2268, - "end": 2276, + "start": 2292, + "end": 2300, "loc": { "start": { "line": 87, @@ -12262,8 +12262,8 @@ "binop": null, "updateContext": null }, - "start": 2276, - "end": 2277, + "start": 2300, + "end": 2301, "loc": { "start": { "line": 87, @@ -12288,8 +12288,8 @@ "binop": null }, "value": "controller", - "start": 2280, - "end": 2290, + "start": 2304, + "end": 2314, "loc": { "start": { "line": 88, @@ -12314,8 +12314,8 @@ "binop": null, "updateContext": null }, - "start": 2290, - "end": 2291, + "start": 2314, + "end": 2315, "loc": { "start": { "line": 88, @@ -12340,8 +12340,8 @@ "binop": null }, "value": "NoteController", - "start": 2292, - "end": 2306, + "start": 2316, + "end": 2330, "loc": { "start": { "line": 88, @@ -12366,8 +12366,8 @@ "binop": null, "updateContext": null }, - "start": 2306, - "end": 2307, + "start": 2330, + "end": 2331, "loc": { "start": { "line": 88, @@ -12392,8 +12392,8 @@ "binop": null }, "value": "deleteNote", - "start": 2307, - "end": 2317, + "start": 2331, + "end": 2341, "loc": { "start": { "line": 88, @@ -12417,8 +12417,8 @@ "postfix": false, "binop": null }, - "start": 2318, - "end": 2319, + "start": 2342, + "end": 2343, "loc": { "start": { "line": 89, @@ -12443,8 +12443,8 @@ "binop": null, "updateContext": null }, - "start": 2319, - "end": 2320, + "start": 2343, + "end": 2344, "loc": { "start": { "line": 89, @@ -12469,8 +12469,8 @@ "binop": null, "updateContext": null }, - "start": 2320, - "end": 2321, + "start": 2344, + "end": 2345, "loc": { "start": { "line": 89, @@ -12495,8 +12495,8 @@ "binop": null, "updateContext": null }, - "start": 2321, - "end": 2321, + "start": 2345, + "end": 2345, "loc": { "start": { "line": 89, diff --git a/docs/ast/source/dataservices/note.service.js.json b/docs/ast/source/dataservices/note.service.js.json index d7b18ef..e0a02ea 100644 --- a/docs/ast/source/dataservices/note.service.js.json +++ b/docs/ast/source/dataservices/note.service.js.json @@ -1,7 +1,7 @@ { "type": "File", "start": 0, - "end": 2193, + "end": 2210, "loc": { "start": { "line": 1, @@ -15,7 +15,7 @@ "program": { "type": "Program", "start": 0, - "end": 2193, + "end": 2210, "loc": { "start": { "line": 1, @@ -187,7 +187,7 @@ { "type": "ImportDeclaration", "start": 150, - "end": 199, + "end": 216, "loc": { "start": { "line": 7, @@ -195,81 +195,64 @@ }, "end": { "line": 7, - "column": 49 + "column": 66 } }, "specifiers": [ { - "type": "ImportSpecifier", - "start": 159, - "end": 171, + "type": "ImportDefaultSpecifier", + "start": 157, + "end": 169, "loc": { "start": { "line": 7, - "column": 9 + "column": 7 }, "end": { "line": 7, - "column": 21 + "column": 19 } }, - "imported": { + "local": { "type": "Identifier", - "start": 159, - "end": 171, + "start": 157, + "end": 169, "loc": { "start": { "line": 7, - "column": 9 + "column": 7 }, "end": { "line": 7, - "column": 21 + "column": 19 }, "identifierName": "RequestError" }, "name": "RequestError", "leadingComments": null }, - "local": { - "type": "Identifier", - "start": 159, - "end": 171, - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 21 - }, - "identifierName": "RequestError" - }, - "name": "RequestError" - }, "leadingComments": null } ], "source": { "type": "StringLiteral", - "start": 179, - "end": 198, + "start": 175, + "end": 215, "loc": { "start": { "line": 7, - "column": 29 + "column": 25 }, "end": { "line": 7, - "column": 48 + "column": 65 } }, "extra": { - "rawValue": "../base/server.js", - "raw": "'../base/server.js'" + "rawValue": "../base/request/request-error.model.js", + "raw": "'../base/request/request-error.model.js'" }, - "value": "../base/server.js" + "value": "../base/request/request-error.model.js" }, "leadingComments": [ { @@ -292,8 +275,8 @@ }, { "type": "ImportDeclaration", - "start": 200, - "end": 223, + "start": 217, + "end": 240, "loc": { "start": { "line": 8, @@ -307,8 +290,8 @@ "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 207, - "end": 208, + "start": 224, + "end": 225, "loc": { "start": { "line": 8, @@ -321,8 +304,8 @@ }, "local": { "type": "Identifier", - "start": 207, - "end": 208, + "start": 224, + "end": 225, "loc": { "start": { "line": 8, @@ -340,8 +323,8 @@ ], "source": { "type": "StringLiteral", - "start": 214, - "end": 222, + "start": 231, + "end": 239, "loc": { "start": { "line": 8, @@ -362,8 +345,8 @@ { "type": "CommentBlock", "value": "*\n * Note object with name and id\n * @type {Note}\n ", - "start": 225, - "end": 280, + "start": 242, + "end": 297, "loc": { "start": { "line": 10, @@ -379,8 +362,8 @@ }, { "type": "EmptyStatement", - "start": 281, - "end": 282, + "start": 298, + "end": 299, "loc": { "start": { "line": 14, @@ -395,8 +378,8 @@ { "type": "CommentBlock", "value": "*\n * Note object with name and id\n * @type {Note}\n ", - "start": 225, - "end": 280, + "start": 242, + "end": 297, "loc": { "start": { "line": 10, @@ -413,8 +396,8 @@ { "type": "CommentBlock", "value": "*\n * Note Dataservice for interacting with the storage system for saving notes\n ", - "start": 284, - "end": 368, + "start": 301, + "end": 385, "loc": { "start": { "line": 16, @@ -430,8 +413,8 @@ }, { "type": "ExportDefaultDeclaration", - "start": 369, - "end": 2193, + "start": 386, + "end": 2210, "loc": { "start": { "line": 19, @@ -444,8 +427,8 @@ }, "declaration": { "type": "ClassDeclaration", - "start": 384, - "end": 2193, + "start": 401, + "end": 2210, "loc": { "start": { "line": 19, @@ -458,8 +441,8 @@ }, "id": { "type": "Identifier", - "start": 390, - "end": 405, + "start": 407, + "end": 422, "loc": { "start": { "line": 19, @@ -477,8 +460,8 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 406, - "end": 2193, + "start": 423, + "end": 2210, "loc": { "start": { "line": 19, @@ -492,8 +475,8 @@ "body": [ { "type": "ClassMethod", - "start": 580, - "end": 957, + "start": 597, + "end": 974, "loc": { "start": { "line": 25, @@ -508,8 +491,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 593, - "end": 600, + "start": 610, + "end": 617, "loc": { "start": { "line": 25, @@ -531,8 +514,8 @@ "params": [ { "type": "ObjectPattern", - "start": 601, - "end": 607, + "start": 618, + "end": 624, "loc": { "start": { "line": 25, @@ -546,8 +529,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 603, - "end": 605, + "start": 620, + "end": 622, "loc": { "start": { "line": 25, @@ -563,8 +546,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 603, - "end": 605, + "start": 620, + "end": 622, "loc": { "start": { "line": 25, @@ -580,8 +563,8 @@ }, "value": { "type": "Identifier", - "start": 603, - "end": 605, + "start": 620, + "end": 622, "loc": { "start": { "line": 25, @@ -604,8 +587,8 @@ ], "body": { "type": "BlockStatement", - "start": 609, - "end": 957, + "start": 626, + "end": 974, "loc": { "start": { "line": 25, @@ -619,8 +602,8 @@ "body": [ { "type": "IfStatement", - "start": 615, - "end": 752, + "start": 632, + "end": 769, "loc": { "start": { "line": 26, @@ -633,8 +616,8 @@ }, "test": { "type": "LogicalExpression", - "start": 619, - "end": 678, + "start": 636, + "end": 695, "loc": { "start": { "line": 26, @@ -647,8 +630,8 @@ }, "left": { "type": "BinaryExpression", - "start": 619, - "end": 641, + "start": 636, + "end": 658, "loc": { "start": { "line": 26, @@ -661,8 +644,8 @@ }, "left": { "type": "UnaryExpression", - "start": 619, - "end": 628, + "start": 636, + "end": 645, "loc": { "start": { "line": 26, @@ -677,8 +660,8 @@ "prefix": true, "argument": { "type": "Identifier", - "start": 626, - "end": 628, + "start": 643, + "end": 645, "loc": { "start": { "line": 26, @@ -699,8 +682,8 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 633, - "end": 641, + "start": 650, + "end": 658, "loc": { "start": { "line": 26, @@ -721,8 +704,8 @@ "operator": "&&", "right": { "type": "CallExpression", - "start": 645, - "end": 678, + "start": 662, + "end": 695, "loc": { "start": { "line": 26, @@ -735,8 +718,8 @@ }, "callee": { "type": "MemberExpression", - "start": 645, - "end": 657, + "start": 662, + "end": 674, "loc": { "start": { "line": 26, @@ -749,8 +732,8 @@ }, "object": { "type": "Identifier", - "start": 645, - "end": 651, + "start": 662, + "end": 668, "loc": { "start": { "line": 26, @@ -766,8 +749,8 @@ }, "property": { "type": "Identifier", - "start": 652, - "end": 657, + "start": 669, + "end": 674, "loc": { "start": { "line": 26, @@ -786,8 +769,8 @@ "arguments": [ { "type": "CallExpression", - "start": 658, - "end": 677, + "start": 675, + "end": 694, "loc": { "start": { "line": 26, @@ -800,8 +783,8 @@ }, "callee": { "type": "MemberExpression", - "start": 658, - "end": 673, + "start": 675, + "end": 690, "loc": { "start": { "line": 26, @@ -814,8 +797,8 @@ }, "object": { "type": "Identifier", - "start": 658, - "end": 664, + "start": 675, + "end": 681, "loc": { "start": { "line": 26, @@ -831,8 +814,8 @@ }, "property": { "type": "Identifier", - "start": 665, - "end": 673, + "start": 682, + "end": 690, "loc": { "start": { "line": 26, @@ -851,8 +834,8 @@ "arguments": [ { "type": "Identifier", - "start": 674, - "end": 676, + "start": 691, + "end": 693, "loc": { "start": { "line": 26, @@ -873,8 +856,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 680, - "end": 752, + "start": 697, + "end": 769, "loc": { "start": { "line": 26, @@ -888,8 +871,8 @@ "body": [ { "type": "ThrowStatement", - "start": 688, - "end": 746, + "start": 705, + "end": 763, "loc": { "start": { "line": 27, @@ -902,8 +885,8 @@ }, "argument": { "type": "NewExpression", - "start": 694, - "end": 745, + "start": 711, + "end": 762, "loc": { "start": { "line": 27, @@ -916,8 +899,8 @@ }, "callee": { "type": "Identifier", - "start": 698, - "end": 710, + "start": 715, + "end": 727, "loc": { "start": { "line": 27, @@ -934,8 +917,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 711, - "end": 739, + "start": 728, + "end": 756, "loc": { "start": { "line": 27, @@ -954,8 +937,8 @@ }, { "type": "NumericLiteral", - "start": 741, - "end": 744, + "start": 758, + "end": 761, "loc": { "start": { "line": 27, @@ -982,8 +965,8 @@ }, { "type": "VariableDeclaration", - "start": 757, - "end": 841, + "start": 774, + "end": 858, "loc": { "start": { "line": 29, @@ -997,8 +980,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 763, - "end": 840, + "start": 780, + "end": 857, "loc": { "start": { "line": 29, @@ -1011,8 +994,8 @@ }, "id": { "type": "Identifier", - "start": 763, - "end": 766, + "start": 780, + "end": 783, "loc": { "start": { "line": 29, @@ -1028,8 +1011,8 @@ }, "init": { "type": "AwaitExpression", - "start": 769, - "end": 840, + "start": 786, + "end": 857, "loc": { "start": { "line": 29, @@ -1042,8 +1025,8 @@ }, "argument": { "type": "CallExpression", - "start": 775, - "end": 840, + "start": 792, + "end": 857, "loc": { "start": { "line": 29, @@ -1056,8 +1039,8 @@ }, "callee": { "type": "MemberExpression", - "start": 775, - "end": 797, + "start": 792, + "end": 814, "loc": { "start": { "line": 29, @@ -1070,8 +1053,8 @@ }, "object": { "type": "Identifier", - "start": 775, - "end": 788, + "start": 792, + "end": 805, "loc": { "start": { "line": 29, @@ -1087,8 +1070,8 @@ }, "property": { "type": "Identifier", - "start": 789, - "end": 797, + "start": 806, + "end": 814, "loc": { "start": { "line": 29, @@ -1107,8 +1090,8 @@ "arguments": [ { "type": "TemplateLiteral", - "start": 798, - "end": 839, + "start": 815, + "end": 856, "loc": { "start": { "line": 29, @@ -1122,8 +1105,8 @@ "expressions": [ { "type": "Identifier", - "start": 835, - "end": 837, + "start": 852, + "end": 854, "loc": { "start": { "line": 29, @@ -1141,8 +1124,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 799, - "end": 833, + "start": 816, + "end": 850, "loc": { "start": { "line": 29, @@ -1161,8 +1144,8 @@ }, { "type": "TemplateElement", - "start": 838, - "end": 838, + "start": 855, + "end": 855, "loc": { "start": { "line": 29, @@ -1190,8 +1173,8 @@ }, { "type": "IfStatement", - "start": 847, - "end": 936, + "start": 864, + "end": 953, "loc": { "start": { "line": 31, @@ -1204,8 +1187,8 @@ }, "test": { "type": "BinaryExpression", - "start": 851, - "end": 868, + "start": 868, + "end": 885, "loc": { "start": { "line": 31, @@ -1218,8 +1201,8 @@ }, "left": { "type": "Identifier", - "start": 851, - "end": 854, + "start": 868, + "end": 871, "loc": { "start": { "line": 31, @@ -1236,8 +1219,8 @@ "operator": "===", "right": { "type": "Identifier", - "start": 859, - "end": 868, + "start": 876, + "end": 885, "loc": { "start": { "line": 31, @@ -1254,8 +1237,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 870, - "end": 936, + "start": 887, + "end": 953, "loc": { "start": { "line": 31, @@ -1269,8 +1252,8 @@ "body": [ { "type": "ThrowStatement", - "start": 878, - "end": 930, + "start": 895, + "end": 947, "loc": { "start": { "line": 32, @@ -1283,8 +1266,8 @@ }, "argument": { "type": "NewExpression", - "start": 884, - "end": 929, + "start": 901, + "end": 946, "loc": { "start": { "line": 32, @@ -1297,8 +1280,8 @@ }, "callee": { "type": "Identifier", - "start": 888, - "end": 900, + "start": 905, + "end": 917, "loc": { "start": { "line": 32, @@ -1315,8 +1298,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 901, - "end": 923, + "start": 918, + "end": 940, "loc": { "start": { "line": 32, @@ -1335,8 +1318,8 @@ }, { "type": "NumericLiteral", - "start": 925, - "end": 928, + "start": 942, + "end": 945, "loc": { "start": { "line": 32, @@ -1363,8 +1346,8 @@ }, { "type": "ReturnStatement", - "start": 942, - "end": 953, + "start": 959, + "end": 970, "loc": { "start": { "line": 35, @@ -1377,8 +1360,8 @@ }, "argument": { "type": "Identifier", - "start": 949, - "end": 952, + "start": 966, + "end": 969, "loc": { "start": { "line": 35, @@ -1401,8 +1384,8 @@ { "type": "CommentBlock", "value": "*\n * Returns a note, specified by the caller by id\n * @param {number|string} id `id` number of the Note to retrieve\n * @return {Note} Note object\n ", - "start": 410, - "end": 577, + "start": 427, + "end": 594, "loc": { "start": { "line": 20, @@ -1419,8 +1402,8 @@ { "type": "CommentBlock", "value": "*\n * Creates a new note with a name\n * TODO: add (optional) content param and attribute\n * @param {String} name name of note\n * @return {Note} Note Object\n ", - "start": 961, - "end": 1138, + "start": 978, + "end": 1155, "loc": { "start": { "line": 38, @@ -1436,8 +1419,8 @@ }, { "type": "ClassMethod", - "start": 1141, - "end": 1542, + "start": 1158, + "end": 1559, "loc": { "start": { "line": 44, @@ -1452,8 +1435,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1154, - "end": 1164, + "start": 1171, + "end": 1181, "loc": { "start": { "line": 44, @@ -1475,8 +1458,8 @@ "params": [ { "type": "ObjectPattern", - "start": 1165, - "end": 1173, + "start": 1182, + "end": 1190, "loc": { "start": { "line": 44, @@ -1490,8 +1473,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1167, - "end": 1171, + "start": 1184, + "end": 1188, "loc": { "start": { "line": 44, @@ -1507,8 +1490,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1167, - "end": 1171, + "start": 1184, + "end": 1188, "loc": { "start": { "line": 44, @@ -1524,8 +1507,8 @@ }, "value": { "type": "Identifier", - "start": 1167, - "end": 1171, + "start": 1184, + "end": 1188, "loc": { "start": { "line": 44, @@ -1548,8 +1531,8 @@ ], "body": { "type": "BlockStatement", - "start": 1175, - "end": 1542, + "start": 1192, + "end": 1559, "loc": { "start": { "line": 44, @@ -1563,8 +1546,8 @@ "body": [ { "type": "IfStatement", - "start": 1181, - "end": 1287, + "start": 1198, + "end": 1304, "loc": { "start": { "line": 45, @@ -1577,8 +1560,8 @@ }, "test": { "type": "LogicalExpression", - "start": 1185, - "end": 1218, + "start": 1202, + "end": 1235, "loc": { "start": { "line": 45, @@ -1591,8 +1574,8 @@ }, "left": { "type": "BinaryExpression", - "start": 1185, - "end": 1196, + "start": 1202, + "end": 1213, "loc": { "start": { "line": 45, @@ -1605,8 +1588,8 @@ }, "left": { "type": "Identifier", - "start": 1185, - "end": 1189, + "start": 1202, + "end": 1206, "loc": { "start": { "line": 45, @@ -1623,8 +1606,8 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 1194, - "end": 1196, + "start": 1211, + "end": 1213, "loc": { "start": { "line": 45, @@ -1645,8 +1628,8 @@ "operator": "||", "right": { "type": "BinaryExpression", - "start": 1200, - "end": 1218, + "start": 1217, + "end": 1235, "loc": { "start": { "line": 45, @@ -1659,8 +1642,8 @@ }, "left": { "type": "Identifier", - "start": 1200, - "end": 1204, + "start": 1217, + "end": 1221, "loc": { "start": { "line": 45, @@ -1677,8 +1660,8 @@ "operator": "===", "right": { "type": "Identifier", - "start": 1209, - "end": 1218, + "start": 1226, + "end": 1235, "loc": { "start": { "line": 45, @@ -1696,8 +1679,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 1220, - "end": 1287, + "start": 1237, + "end": 1304, "loc": { "start": { "line": 45, @@ -1711,8 +1694,8 @@ "body": [ { "type": "ThrowStatement", - "start": 1228, - "end": 1281, + "start": 1245, + "end": 1298, "loc": { "start": { "line": 46, @@ -1725,8 +1708,8 @@ }, "argument": { "type": "NewExpression", - "start": 1234, - "end": 1280, + "start": 1251, + "end": 1297, "loc": { "start": { "line": 46, @@ -1739,8 +1722,8 @@ }, "callee": { "type": "Identifier", - "start": 1238, - "end": 1250, + "start": 1255, + "end": 1267, "loc": { "start": { "line": 46, @@ -1757,8 +1740,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 1251, - "end": 1274, + "start": 1268, + "end": 1291, "loc": { "start": { "line": 46, @@ -1777,8 +1760,8 @@ }, { "type": "NumericLiteral", - "start": 1276, - "end": 1279, + "start": 1293, + "end": 1296, "loc": { "start": { "line": 46, @@ -1805,8 +1788,8 @@ }, { "type": "VariableDeclaration", - "start": 1293, - "end": 1371, + "start": 1310, + "end": 1388, "loc": { "start": { "line": 49, @@ -1820,8 +1803,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 1299, - "end": 1370, + "start": 1316, + "end": 1387, "loc": { "start": { "line": 49, @@ -1834,8 +1817,8 @@ }, "id": { "type": "Identifier", - "start": 1299, - "end": 1307, + "start": 1316, + "end": 1324, "loc": { "start": { "line": 49, @@ -1851,8 +1834,8 @@ }, "init": { "type": "AwaitExpression", - "start": 1310, - "end": 1370, + "start": 1327, + "end": 1387, "loc": { "start": { "line": 49, @@ -1865,8 +1848,8 @@ }, "argument": { "type": "CallExpression", - "start": 1316, - "end": 1370, + "start": 1333, + "end": 1387, "loc": { "start": { "line": 49, @@ -1879,8 +1862,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1316, - "end": 1336, + "start": 1333, + "end": 1353, "loc": { "start": { "line": 49, @@ -1893,8 +1876,8 @@ }, "object": { "type": "Identifier", - "start": 1316, - "end": 1329, + "start": 1333, + "end": 1346, "loc": { "start": { "line": 49, @@ -1910,8 +1893,8 @@ }, "property": { "type": "Identifier", - "start": 1330, - "end": 1336, + "start": 1347, + "end": 1353, "loc": { "start": { "line": 49, @@ -1930,8 +1913,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 1337, - "end": 1349, + "start": 1354, + "end": 1366, "loc": { "start": { "line": 49, @@ -1950,8 +1933,8 @@ }, { "type": "ObjectExpression", - "start": 1351, - "end": 1369, + "start": 1368, + "end": 1386, "loc": { "start": { "line": 49, @@ -1965,8 +1948,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1359, - "end": 1363, + "start": 1376, + "end": 1380, "loc": { "start": { "line": 50, @@ -1982,8 +1965,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1359, - "end": 1363, + "start": 1376, + "end": 1380, "loc": { "start": { "line": 50, @@ -1999,8 +1982,8 @@ }, "value": { "type": "Identifier", - "start": 1359, - "end": 1363, + "start": 1376, + "end": 1380, "loc": { "start": { "line": 50, @@ -2030,8 +2013,8 @@ { "type": "CommentLine", "value": " TODO: Debug with atom?", - "start": 1377, - "end": 1402, + "start": 1394, + "end": 1419, "loc": { "start": { "line": 53, @@ -2046,8 +2029,8 @@ { "type": "CommentLine", "value": " TODO: Use Logger helper instead", - "start": 1407, - "end": 1441, + "start": 1424, + "end": 1458, "loc": { "start": { "line": 54, @@ -2063,8 +2046,8 @@ }, { "type": "ExpressionStatement", - "start": 1446, - "end": 1468, + "start": 1463, + "end": 1485, "loc": { "start": { "line": 55, @@ -2077,8 +2060,8 @@ }, "expression": { "type": "CallExpression", - "start": 1446, - "end": 1467, + "start": 1463, + "end": 1484, "loc": { "start": { "line": 55, @@ -2091,8 +2074,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1446, - "end": 1457, + "start": 1463, + "end": 1474, "loc": { "start": { "line": 55, @@ -2105,8 +2088,8 @@ }, "object": { "type": "Identifier", - "start": 1446, - "end": 1453, + "start": 1463, + "end": 1470, "loc": { "start": { "line": 55, @@ -2123,8 +2106,8 @@ }, "property": { "type": "Identifier", - "start": 1454, - "end": 1457, + "start": 1471, + "end": 1474, "loc": { "start": { "line": 55, @@ -2144,8 +2127,8 @@ "arguments": [ { "type": "Identifier", - "start": 1458, - "end": 1466, + "start": 1475, + "end": 1483, "loc": { "start": { "line": 55, @@ -2166,8 +2149,8 @@ { "type": "CommentLine", "value": " TODO: Debug with atom?", - "start": 1377, - "end": 1402, + "start": 1394, + "end": 1419, "loc": { "start": { "line": 53, @@ -2182,8 +2165,8 @@ { "type": "CommentLine", "value": " TODO: Use Logger helper instead", - "start": 1407, - "end": 1441, + "start": 1424, + "end": 1458, "loc": { "start": { "line": 54, @@ -2199,8 +2182,8 @@ }, { "type": "ReturnStatement", - "start": 1474, - "end": 1538, + "start": 1491, + "end": 1555, "loc": { "start": { "line": 57, @@ -2213,8 +2196,8 @@ }, "argument": { "type": "AwaitExpression", - "start": 1481, - "end": 1537, + "start": 1498, + "end": 1554, "loc": { "start": { "line": 57, @@ -2227,8 +2210,8 @@ }, "argument": { "type": "CallExpression", - "start": 1487, - "end": 1537, + "start": 1504, + "end": 1554, "loc": { "start": { "line": 57, @@ -2241,8 +2224,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1487, - "end": 1510, + "start": 1504, + "end": 1527, "loc": { "start": { "line": 57, @@ -2255,8 +2238,8 @@ }, "object": { "type": "Identifier", - "start": 1487, - "end": 1502, + "start": 1504, + "end": 1519, "loc": { "start": { "line": 57, @@ -2272,8 +2255,8 @@ }, "property": { "type": "Identifier", - "start": 1503, - "end": 1510, + "start": 1520, + "end": 1527, "loc": { "start": { "line": 57, @@ -2292,8 +2275,8 @@ "arguments": [ { "type": "ObjectExpression", - "start": 1511, - "end": 1536, + "start": 1528, + "end": 1553, "loc": { "start": { "line": 57, @@ -2307,8 +2290,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1513, - "end": 1534, + "start": 1530, + "end": 1551, "loc": { "start": { "line": 57, @@ -2324,8 +2307,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1513, - "end": 1515, + "start": 1530, + "end": 1532, "loc": { "start": { "line": 57, @@ -2341,8 +2324,8 @@ }, "value": { "type": "MemberExpression", - "start": 1517, - "end": 1534, + "start": 1534, + "end": 1551, "loc": { "start": { "line": 57, @@ -2355,8 +2338,8 @@ }, "object": { "type": "Identifier", - "start": 1517, - "end": 1525, + "start": 1534, + "end": 1542, "loc": { "start": { "line": 57, @@ -2372,8 +2355,8 @@ }, "property": { "type": "Identifier", - "start": 1526, - "end": 1534, + "start": 1543, + "end": 1551, "loc": { "start": { "line": 57, @@ -2404,8 +2387,8 @@ { "type": "CommentBlock", "value": "*\n * Creates a new note with a name\n * TODO: add (optional) content param and attribute\n * @param {String} name name of note\n * @return {Note} Note Object\n ", - "start": 961, - "end": 1138, + "start": 978, + "end": 1155, "loc": { "start": { "line": 38, @@ -2422,8 +2405,8 @@ { "type": "CommentBlock", "value": "*\n * Create multiple notes\n * @param {Array} notes Array of note objects with name parameter\n * @return {Promise} [description]\n ", - "start": 1546, - "end": 1695, + "start": 1563, + "end": 1712, "loc": { "start": { "line": 60, @@ -2439,8 +2422,8 @@ }, { "type": "ClassMethod", - "start": 1698, - "end": 2191, + "start": 1715, + "end": 2208, "loc": { "start": { "line": 65, @@ -2455,8 +2438,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1711, - "end": 1722, + "start": 1728, + "end": 1739, "loc": { "start": { "line": 65, @@ -2478,8 +2461,8 @@ "params": [ { "type": "Identifier", - "start": 1723, - "end": 1728, + "start": 1740, + "end": 1745, "loc": { "start": { "line": 65, @@ -2496,8 +2479,8 @@ ], "body": { "type": "BlockStatement", - "start": 1730, - "end": 2191, + "start": 1747, + "end": 2208, "loc": { "start": { "line": 65, @@ -2511,8 +2494,8 @@ "body": [ { "type": "IfStatement", - "start": 1736, - "end": 1912, + "start": 1753, + "end": 1929, "loc": { "start": { "line": 66, @@ -2525,8 +2508,8 @@ }, "test": { "type": "BinaryExpression", - "start": 1740, - "end": 1831, + "start": 1757, + "end": 1848, "loc": { "start": { "line": 66, @@ -2539,8 +2522,8 @@ }, "left": { "type": "CallExpression", - "start": 1740, - "end": 1817, + "start": 1757, + "end": 1834, "loc": { "start": { "line": 66, @@ -2553,8 +2536,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1740, - "end": 1746, + "start": 1757, + "end": 1763, "loc": { "start": { "line": 66, @@ -2567,8 +2550,8 @@ }, "object": { "type": "Identifier", - "start": 1740, - "end": 1741, + "start": 1757, + "end": 1758, "loc": { "start": { "line": 66, @@ -2584,8 +2567,8 @@ }, "property": { "type": "Identifier", - "start": 1742, - "end": 1746, + "start": 1759, + "end": 1763, "loc": { "start": { "line": 66, @@ -2604,8 +2587,8 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 1747, - "end": 1816, + "start": 1764, + "end": 1833, "loc": { "start": { "line": 66, @@ -2623,8 +2606,8 @@ "params": [ { "type": "ObjectPattern", - "start": 1748, - "end": 1756, + "start": 1765, + "end": 1773, "loc": { "start": { "line": 66, @@ -2638,8 +2621,8 @@ "properties": [ { "type": "ObjectProperty", - "start": 1750, - "end": 1754, + "start": 1767, + "end": 1771, "loc": { "start": { "line": 66, @@ -2655,8 +2638,8 @@ "computed": false, "key": { "type": "Identifier", - "start": 1750, - "end": 1754, + "start": 1767, + "end": 1771, "loc": { "start": { "line": 66, @@ -2672,8 +2655,8 @@ }, "value": { "type": "Identifier", - "start": 1750, - "end": 1754, + "start": 1767, + "end": 1771, "loc": { "start": { "line": 66, @@ -2696,8 +2679,8 @@ ], "body": { "type": "BlockStatement", - "start": 1761, - "end": 1816, + "start": 1778, + "end": 1833, "loc": { "start": { "line": 66, @@ -2711,8 +2694,8 @@ "body": [ { "type": "ReturnStatement", - "start": 1769, - "end": 1810, + "start": 1786, + "end": 1827, "loc": { "start": { "line": 67, @@ -2725,8 +2708,8 @@ }, "argument": { "type": "LogicalExpression", - "start": 1776, - "end": 1809, + "start": 1793, + "end": 1826, "loc": { "start": { "line": 67, @@ -2739,8 +2722,8 @@ }, "left": { "type": "BinaryExpression", - "start": 1776, - "end": 1787, + "start": 1793, + "end": 1804, "loc": { "start": { "line": 67, @@ -2753,8 +2736,8 @@ }, "left": { "type": "Identifier", - "start": 1776, - "end": 1780, + "start": 1793, + "end": 1797, "loc": { "start": { "line": 67, @@ -2771,8 +2754,8 @@ "operator": "===", "right": { "type": "StringLiteral", - "start": 1785, - "end": 1787, + "start": 1802, + "end": 1804, "loc": { "start": { "line": 67, @@ -2793,8 +2776,8 @@ "operator": "||", "right": { "type": "BinaryExpression", - "start": 1791, - "end": 1809, + "start": 1808, + "end": 1826, "loc": { "start": { "line": 67, @@ -2807,8 +2790,8 @@ }, "left": { "type": "Identifier", - "start": 1791, - "end": 1795, + "start": 1808, + "end": 1812, "loc": { "start": { "line": 67, @@ -2825,8 +2808,8 @@ "operator": "===", "right": { "type": "Identifier", - "start": 1800, - "end": 1809, + "start": 1817, + "end": 1826, "loc": { "start": { "line": 67, @@ -2852,8 +2835,8 @@ "operator": "!==", "right": { "type": "Identifier", - "start": 1822, - "end": 1831, + "start": 1839, + "end": 1848, "loc": { "start": { "line": 68, @@ -2870,8 +2853,8 @@ }, "consequent": { "type": "BlockStatement", - "start": 1833, - "end": 1912, + "start": 1850, + "end": 1929, "loc": { "start": { "line": 68, @@ -2885,8 +2868,8 @@ "body": [ { "type": "ThrowStatement", - "start": 1841, - "end": 1906, + "start": 1858, + "end": 1923, "loc": { "start": { "line": 69, @@ -2899,8 +2882,8 @@ }, "argument": { "type": "NewExpression", - "start": 1847, - "end": 1905, + "start": 1864, + "end": 1922, "loc": { "start": { "line": 69, @@ -2913,8 +2896,8 @@ }, "callee": { "type": "Identifier", - "start": 1851, - "end": 1863, + "start": 1868, + "end": 1880, "loc": { "start": { "line": 69, @@ -2931,8 +2914,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 1864, - "end": 1899, + "start": 1881, + "end": 1916, "loc": { "start": { "line": 69, @@ -2951,8 +2934,8 @@ }, { "type": "NumericLiteral", - "start": 1901, - "end": 1904, + "start": 1918, + "end": 1921, "loc": { "start": { "line": 69, @@ -2979,8 +2962,8 @@ }, { "type": "VariableDeclaration", - "start": 1917, - "end": 1988, + "start": 1934, + "end": 2005, "loc": { "start": { "line": 71, @@ -2994,8 +2977,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 1923, - "end": 1987, + "start": 1940, + "end": 2004, "loc": { "start": { "line": 71, @@ -3008,8 +2991,8 @@ }, "id": { "type": "Identifier", - "start": 1923, - "end": 1929, + "start": 1940, + "end": 1946, "loc": { "start": { "line": 71, @@ -3025,8 +3008,8 @@ }, "init": { "type": "AwaitExpression", - "start": 1932, - "end": 1987, + "start": 1949, + "end": 2004, "loc": { "start": { "line": 71, @@ -3039,8 +3022,8 @@ }, "argument": { "type": "CallExpression", - "start": 1938, - "end": 1987, + "start": 1955, + "end": 2004, "loc": { "start": { "line": 71, @@ -3053,8 +3036,8 @@ }, "callee": { "type": "MemberExpression", - "start": 1938, - "end": 1966, + "start": 1955, + "end": 1983, "loc": { "start": { "line": 71, @@ -3067,8 +3050,8 @@ }, "object": { "type": "Identifier", - "start": 1938, - "end": 1951, + "start": 1955, + "end": 1968, "loc": { "start": { "line": 71, @@ -3084,8 +3067,8 @@ }, "property": { "type": "Identifier", - "start": 1952, - "end": 1966, + "start": 1969, + "end": 1983, "loc": { "start": { "line": 71, @@ -3104,8 +3087,8 @@ "arguments": [ { "type": "StringLiteral", - "start": 1967, - "end": 1979, + "start": 1984, + "end": 1996, "loc": { "start": { "line": 71, @@ -3124,8 +3107,8 @@ }, { "type": "Identifier", - "start": 1981, - "end": 1986, + "start": 1998, + "end": 2003, "loc": { "start": { "line": 71, @@ -3148,8 +3131,8 @@ }, { "type": "VariableDeclaration", - "start": 1994, - "end": 2046, + "start": 2011, + "end": 2063, "loc": { "start": { "line": 73, @@ -3163,8 +3146,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2000, - "end": 2045, + "start": 2017, + "end": 2062, "loc": { "start": { "line": 73, @@ -3177,8 +3160,8 @@ }, "id": { "type": "Identifier", - "start": 2000, - "end": 2005, + "start": 2017, + "end": 2022, "loc": { "start": { "line": 73, @@ -3194,8 +3177,8 @@ }, "init": { "type": "BinaryExpression", - "start": 2008, - "end": 2045, + "start": 2025, + "end": 2062, "loc": { "start": { "line": 73, @@ -3208,8 +3191,8 @@ }, "left": { "type": "MemberExpression", - "start": 2008, - "end": 2023, + "start": 2025, + "end": 2040, "loc": { "start": { "line": 73, @@ -3222,8 +3205,8 @@ }, "object": { "type": "Identifier", - "start": 2008, - "end": 2014, + "start": 2025, + "end": 2031, "loc": { "start": { "line": 73, @@ -3239,8 +3222,8 @@ }, "property": { "type": "Identifier", - "start": 2015, - "end": 2023, + "start": 2032, + "end": 2040, "loc": { "start": { "line": 73, @@ -3259,8 +3242,8 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 2026, - "end": 2045, + "start": 2043, + "end": 2062, "loc": { "start": { "line": 73, @@ -3273,8 +3256,8 @@ }, "object": { "type": "Identifier", - "start": 2026, - "end": 2032, + "start": 2043, + "end": 2049, "loc": { "start": { "line": 73, @@ -3290,8 +3273,8 @@ }, "property": { "type": "Identifier", - "start": 2033, - "end": 2045, + "start": 2050, + "end": 2062, "loc": { "start": { "line": 73, @@ -3314,8 +3297,8 @@ }, { "type": "VariableDeclaration", - "start": 2051, - "end": 2141, + "start": 2068, + "end": 2158, "loc": { "start": { "line": 74, @@ -3329,8 +3312,8 @@ "declarations": [ { "type": "VariableDeclarator", - "start": 2057, - "end": 2140, + "start": 2074, + "end": 2157, "loc": { "start": { "line": 74, @@ -3343,8 +3326,8 @@ }, "id": { "type": "Identifier", - "start": 2057, - "end": 2062, + "start": 2074, + "end": 2079, "loc": { "start": { "line": 74, @@ -3360,8 +3343,8 @@ }, "init": { "type": "TemplateLiteral", - "start": 2065, - "end": 2140, + "start": 2082, + "end": 2157, "loc": { "start": { "line": 74, @@ -3375,8 +3358,8 @@ "expressions": [ { "type": "MemberExpression", - "start": 2105, - "end": 2120, + "start": 2122, + "end": 2137, "loc": { "start": { "line": 74, @@ -3389,8 +3372,8 @@ }, "object": { "type": "Identifier", - "start": 2105, - "end": 2111, + "start": 2122, + "end": 2128, "loc": { "start": { "line": 74, @@ -3406,8 +3389,8 @@ }, "property": { "type": "Identifier", - "start": 2112, - "end": 2120, + "start": 2129, + "end": 2137, "loc": { "start": { "line": 74, @@ -3425,8 +3408,8 @@ }, { "type": "Identifier", - "start": 2133, - "end": 2138, + "start": 2150, + "end": 2155, "loc": { "start": { "line": 74, @@ -3444,8 +3427,8 @@ "quasis": [ { "type": "TemplateElement", - "start": 2066, - "end": 2103, + "start": 2083, + "end": 2120, "loc": { "start": { "line": 74, @@ -3464,8 +3447,8 @@ }, { "type": "TemplateElement", - "start": 2121, - "end": 2131, + "start": 2138, + "end": 2148, "loc": { "start": { "line": 74, @@ -3484,8 +3467,8 @@ }, { "type": "TemplateElement", - "start": 2139, - "end": 2139, + "start": 2156, + "end": 2156, "loc": { "start": { "line": 74, @@ -3510,8 +3493,8 @@ }, { "type": "ReturnStatement", - "start": 2147, - "end": 2187, + "start": 2164, + "end": 2204, "loc": { "start": { "line": 76, @@ -3524,8 +3507,8 @@ }, "argument": { "type": "AwaitExpression", - "start": 2154, - "end": 2186, + "start": 2171, + "end": 2203, "loc": { "start": { "line": 76, @@ -3538,8 +3521,8 @@ }, "argument": { "type": "CallExpression", - "start": 2160, - "end": 2186, + "start": 2177, + "end": 2203, "loc": { "start": { "line": 76, @@ -3552,8 +3535,8 @@ }, "callee": { "type": "MemberExpression", - "start": 2160, - "end": 2179, + "start": 2177, + "end": 2196, "loc": { "start": { "line": 76, @@ -3566,8 +3549,8 @@ }, "object": { "type": "Identifier", - "start": 2160, - "end": 2173, + "start": 2177, + "end": 2190, "loc": { "start": { "line": 76, @@ -3583,8 +3566,8 @@ }, "property": { "type": "Identifier", - "start": 2174, - "end": 2179, + "start": 2191, + "end": 2196, "loc": { "start": { "line": 76, @@ -3603,8 +3586,8 @@ "arguments": [ { "type": "Identifier", - "start": 2180, - "end": 2185, + "start": 2197, + "end": 2202, "loc": { "start": { "line": 76, @@ -3629,8 +3612,8 @@ { "type": "CommentBlock", "value": "*\n * Create multiple notes\n * @param {Array} notes Array of note objects with name parameter\n * @return {Promise} [description]\n ", - "start": 1546, - "end": 1695, + "start": 1563, + "end": 1712, "loc": { "start": { "line": 60, @@ -3650,8 +3633,8 @@ { "type": "CommentBlock", "value": "*\n * Note Dataservice for interacting with the storage system for saving notes\n ", - "start": 284, - "end": 368, + "start": 301, + "end": 385, "loc": { "start": { "line": 16, @@ -3670,8 +3653,8 @@ { "type": "CommentBlock", "value": "*\n * Note Dataservice for interacting with the storage system for saving notes\n ", - "start": 284, - "end": 368, + "start": 301, + "end": 385, "loc": { "start": { "line": 16, @@ -3724,8 +3707,8 @@ { "type": "CommentBlock", "value": "*\n * Note object with name and id\n * @type {Note}\n ", - "start": 225, - "end": 280, + "start": 242, + "end": 297, "loc": { "start": { "line": 10, @@ -3740,8 +3723,8 @@ { "type": "CommentBlock", "value": "*\n * Note Dataservice for interacting with the storage system for saving notes\n ", - "start": 284, - "end": 368, + "start": 301, + "end": 385, "loc": { "start": { "line": 16, @@ -3756,8 +3739,8 @@ { "type": "CommentBlock", "value": "*\n * Returns a note, specified by the caller by id\n * @param {number|string} id `id` number of the Note to retrieve\n * @return {Note} Note object\n ", - "start": 410, - "end": 577, + "start": 427, + "end": 594, "loc": { "start": { "line": 20, @@ -3772,8 +3755,8 @@ { "type": "CommentBlock", "value": "*\n * Creates a new note with a name\n * TODO: add (optional) content param and attribute\n * @param {String} name name of note\n * @return {Note} Note Object\n ", - "start": 961, - "end": 1138, + "start": 978, + "end": 1155, "loc": { "start": { "line": 38, @@ -3788,8 +3771,8 @@ { "type": "CommentLine", "value": " TODO: Debug with atom?", - "start": 1377, - "end": 1402, + "start": 1394, + "end": 1419, "loc": { "start": { "line": 53, @@ -3804,8 +3787,8 @@ { "type": "CommentLine", "value": " TODO: Use Logger helper instead", - "start": 1407, - "end": 1441, + "start": 1424, + "end": 1458, "loc": { "start": { "line": 54, @@ -3820,8 +3803,8 @@ { "type": "CommentBlock", "value": "*\n * Create multiple notes\n * @param {Array} notes Array of note objects with name parameter\n * @return {Promise} [description]\n ", - "start": 1546, - "end": 1695, + "start": 1563, + "end": 1712, "loc": { "start": { "line": 60, @@ -4130,31 +4113,6 @@ } } }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 157, - "end": 158, - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, { "type": { "label": "name", @@ -4168,41 +4126,16 @@ "binop": null }, "value": "RequestError", - "start": 159, - "end": 171, - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - { - "type": { - "label": "}", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 172, - "end": 173, + "start": 157, + "end": 169, "loc": { "start": { "line": 7, - "column": 22 + "column": 7 }, "end": { "line": 7, - "column": 23 + "column": 19 } } }, @@ -4219,16 +4152,16 @@ "binop": null }, "value": "from", - "start": 174, - "end": 178, + "start": 170, + "end": 174, "loc": { "start": { "line": 7, - "column": 24 + "column": 20 }, "end": { "line": 7, - "column": 28 + "column": 24 } } }, @@ -4245,17 +4178,17 @@ "binop": null, "updateContext": null }, - "value": "../base/server.js", - "start": 179, - "end": 198, + "value": "../base/request/request-error.model.js", + "start": 175, + "end": 215, "loc": { "start": { "line": 7, - "column": 29 + "column": 25 }, "end": { "line": 7, - "column": 48 + "column": 65 } } }, @@ -4272,16 +4205,16 @@ "binop": null, "updateContext": null }, - "start": 198, - "end": 199, + "start": 215, + "end": 216, "loc": { "start": { "line": 7, - "column": 48 + "column": 65 }, "end": { "line": 7, - "column": 49 + "column": 66 } } }, @@ -4300,8 +4233,8 @@ "updateContext": null }, "value": "import", - "start": 200, - "end": 206, + "start": 217, + "end": 223, "loc": { "start": { "line": 8, @@ -4326,8 +4259,8 @@ "binop": null }, "value": "_", - "start": 207, - "end": 208, + "start": 224, + "end": 225, "loc": { "start": { "line": 8, @@ -4352,8 +4285,8 @@ "binop": null }, "value": "from", - "start": 209, - "end": 213, + "start": 226, + "end": 230, "loc": { "start": { "line": 8, @@ -4379,8 +4312,8 @@ "updateContext": null }, "value": "lodash", - "start": 214, - "end": 222, + "start": 231, + "end": 239, "loc": { "start": { "line": 8, @@ -4405,8 +4338,8 @@ "binop": null, "updateContext": null }, - "start": 222, - "end": 223, + "start": 239, + "end": 240, "loc": { "start": { "line": 8, @@ -4421,8 +4354,8 @@ { "type": "CommentBlock", "value": "*\n * Note object with name and id\n * @type {Note}\n ", - "start": 225, - "end": 280, + "start": 242, + "end": 297, "loc": { "start": { "line": 10, @@ -4447,8 +4380,8 @@ "binop": null, "updateContext": null }, - "start": 281, - "end": 282, + "start": 298, + "end": 299, "loc": { "start": { "line": 14, @@ -4463,8 +4396,8 @@ { "type": "CommentBlock", "value": "*\n * Note Dataservice for interacting with the storage system for saving notes\n ", - "start": 284, - "end": 368, + "start": 301, + "end": 385, "loc": { "start": { "line": 16, @@ -4491,8 +4424,8 @@ "updateContext": null }, "value": "export", - "start": 369, - "end": 375, + "start": 386, + "end": 392, "loc": { "start": { "line": 19, @@ -4519,8 +4452,8 @@ "updateContext": null }, "value": "default", - "start": 376, - "end": 383, + "start": 393, + "end": 400, "loc": { "start": { "line": 19, @@ -4547,8 +4480,8 @@ "updateContext": null }, "value": "class", - "start": 384, - "end": 389, + "start": 401, + "end": 406, "loc": { "start": { "line": 19, @@ -4573,8 +4506,8 @@ "binop": null }, "value": "NoteDataservice", - "start": 390, - "end": 405, + "start": 407, + "end": 422, "loc": { "start": { "line": 19, @@ -4598,8 +4531,8 @@ "postfix": false, "binop": null }, - "start": 406, - "end": 407, + "start": 423, + "end": 424, "loc": { "start": { "line": 19, @@ -4614,8 +4547,8 @@ { "type": "CommentBlock", "value": "*\n * Returns a note, specified by the caller by id\n * @param {number|string} id `id` number of the Note to retrieve\n * @return {Note} Note object\n ", - "start": 410, - "end": 577, + "start": 427, + "end": 594, "loc": { "start": { "line": 20, @@ -4640,8 +4573,8 @@ "binop": null }, "value": "static", - "start": 580, - "end": 586, + "start": 597, + "end": 603, "loc": { "start": { "line": 25, @@ -4666,8 +4599,8 @@ "binop": null }, "value": "async", - "start": 587, - "end": 592, + "start": 604, + "end": 609, "loc": { "start": { "line": 25, @@ -4692,8 +4625,8 @@ "binop": null }, "value": "getNote", - "start": 593, - "end": 600, + "start": 610, + "end": 617, "loc": { "start": { "line": 25, @@ -4717,8 +4650,8 @@ "postfix": false, "binop": null }, - "start": 600, - "end": 601, + "start": 617, + "end": 618, "loc": { "start": { "line": 25, @@ -4742,8 +4675,8 @@ "postfix": false, "binop": null }, - "start": 601, - "end": 602, + "start": 618, + "end": 619, "loc": { "start": { "line": 25, @@ -4768,8 +4701,8 @@ "binop": null }, "value": "id", - "start": 603, - "end": 605, + "start": 620, + "end": 622, "loc": { "start": { "line": 25, @@ -4793,8 +4726,8 @@ "postfix": false, "binop": null }, - "start": 606, - "end": 607, + "start": 623, + "end": 624, "loc": { "start": { "line": 25, @@ -4818,8 +4751,8 @@ "postfix": false, "binop": null }, - "start": 607, - "end": 608, + "start": 624, + "end": 625, "loc": { "start": { "line": 25, @@ -4843,8 +4776,8 @@ "postfix": false, "binop": null }, - "start": 609, - "end": 610, + "start": 626, + "end": 627, "loc": { "start": { "line": 25, @@ -4871,8 +4804,8 @@ "updateContext": null }, "value": "if", - "start": 615, - "end": 617, + "start": 632, + "end": 634, "loc": { "start": { "line": 26, @@ -4896,8 +4829,8 @@ "postfix": false, "binop": null }, - "start": 618, - "end": 619, + "start": 635, + "end": 636, "loc": { "start": { "line": 26, @@ -4924,8 +4857,8 @@ "updateContext": null }, "value": "typeof", - "start": 619, - "end": 625, + "start": 636, + "end": 642, "loc": { "start": { "line": 26, @@ -4950,8 +4883,8 @@ "binop": null }, "value": "id", - "start": 626, - "end": 628, + "start": 643, + "end": 645, "loc": { "start": { "line": 26, @@ -4977,8 +4910,8 @@ "updateContext": null }, "value": "===", - "start": 629, - "end": 632, + "start": 646, + "end": 649, "loc": { "start": { "line": 26, @@ -5004,8 +4937,8 @@ "updateContext": null }, "value": "string", - "start": 633, - "end": 641, + "start": 650, + "end": 658, "loc": { "start": { "line": 26, @@ -5031,8 +4964,8 @@ "updateContext": null }, "value": "&&", - "start": 642, - "end": 644, + "start": 659, + "end": 661, "loc": { "start": { "line": 26, @@ -5057,8 +4990,8 @@ "binop": null }, "value": "Number", - "start": 645, - "end": 651, + "start": 662, + "end": 668, "loc": { "start": { "line": 26, @@ -5083,8 +5016,8 @@ "binop": null, "updateContext": null }, - "start": 651, - "end": 652, + "start": 668, + "end": 669, "loc": { "start": { "line": 26, @@ -5109,8 +5042,8 @@ "binop": null }, "value": "isNaN", - "start": 652, - "end": 657, + "start": 669, + "end": 674, "loc": { "start": { "line": 26, @@ -5134,8 +5067,8 @@ "postfix": false, "binop": null }, - "start": 657, - "end": 658, + "start": 674, + "end": 675, "loc": { "start": { "line": 26, @@ -5160,8 +5093,8 @@ "binop": null }, "value": "Number", - "start": 658, - "end": 664, + "start": 675, + "end": 681, "loc": { "start": { "line": 26, @@ -5186,8 +5119,8 @@ "binop": null, "updateContext": null }, - "start": 664, - "end": 665, + "start": 681, + "end": 682, "loc": { "start": { "line": 26, @@ -5212,8 +5145,8 @@ "binop": null }, "value": "parseInt", - "start": 665, - "end": 673, + "start": 682, + "end": 690, "loc": { "start": { "line": 26, @@ -5237,8 +5170,8 @@ "postfix": false, "binop": null }, - "start": 673, - "end": 674, + "start": 690, + "end": 691, "loc": { "start": { "line": 26, @@ -5263,8 +5196,8 @@ "binop": null }, "value": "id", - "start": 674, - "end": 676, + "start": 691, + "end": 693, "loc": { "start": { "line": 26, @@ -5288,8 +5221,8 @@ "postfix": false, "binop": null }, - "start": 676, - "end": 677, + "start": 693, + "end": 694, "loc": { "start": { "line": 26, @@ -5313,8 +5246,8 @@ "postfix": false, "binop": null }, - "start": 677, - "end": 678, + "start": 694, + "end": 695, "loc": { "start": { "line": 26, @@ -5338,8 +5271,8 @@ "postfix": false, "binop": null }, - "start": 678, - "end": 679, + "start": 695, + "end": 696, "loc": { "start": { "line": 26, @@ -5363,8 +5296,8 @@ "postfix": false, "binop": null }, - "start": 680, - "end": 681, + "start": 697, + "end": 698, "loc": { "start": { "line": 26, @@ -5391,8 +5324,8 @@ "updateContext": null }, "value": "throw", - "start": 688, - "end": 693, + "start": 705, + "end": 710, "loc": { "start": { "line": 27, @@ -5419,8 +5352,8 @@ "updateContext": null }, "value": "new", - "start": 694, - "end": 697, + "start": 711, + "end": 714, "loc": { "start": { "line": 27, @@ -5445,8 +5378,8 @@ "binop": null }, "value": "RequestError", - "start": 698, - "end": 710, + "start": 715, + "end": 727, "loc": { "start": { "line": 27, @@ -5470,8 +5403,8 @@ "postfix": false, "binop": null }, - "start": 710, - "end": 711, + "start": 727, + "end": 728, "loc": { "start": { "line": 27, @@ -5497,8 +5430,8 @@ "updateContext": null }, "value": "Note Id must be an integer", - "start": 711, - "end": 739, + "start": 728, + "end": 756, "loc": { "start": { "line": 27, @@ -5523,8 +5456,8 @@ "binop": null, "updateContext": null }, - "start": 739, - "end": 740, + "start": 756, + "end": 757, "loc": { "start": { "line": 27, @@ -5550,8 +5483,8 @@ "updateContext": null }, "value": 400, - "start": 741, - "end": 744, + "start": 758, + "end": 761, "loc": { "start": { "line": 27, @@ -5575,8 +5508,8 @@ "postfix": false, "binop": null }, - "start": 744, - "end": 745, + "start": 761, + "end": 762, "loc": { "start": { "line": 27, @@ -5601,8 +5534,8 @@ "binop": null, "updateContext": null }, - "start": 745, - "end": 746, + "start": 762, + "end": 763, "loc": { "start": { "line": 27, @@ -5626,8 +5559,8 @@ "postfix": false, "binop": null }, - "start": 751, - "end": 752, + "start": 768, + "end": 769, "loc": { "start": { "line": 28, @@ -5654,8 +5587,8 @@ "updateContext": null }, "value": "const", - "start": 757, - "end": 762, + "start": 774, + "end": 779, "loc": { "start": { "line": 29, @@ -5680,8 +5613,8 @@ "binop": null }, "value": "row", - "start": 763, - "end": 766, + "start": 780, + "end": 783, "loc": { "start": { "line": 29, @@ -5707,8 +5640,8 @@ "updateContext": null }, "value": "=", - "start": 767, - "end": 768, + "start": 784, + "end": 785, "loc": { "start": { "line": 29, @@ -5733,8 +5666,8 @@ "binop": null }, "value": "await", - "start": 769, - "end": 774, + "start": 786, + "end": 791, "loc": { "start": { "line": 29, @@ -5759,8 +5692,8 @@ "binop": null }, "value": "mariadbHelper", - "start": 775, - "end": 788, + "start": 792, + "end": 805, "loc": { "start": { "line": 29, @@ -5785,8 +5718,8 @@ "binop": null, "updateContext": null }, - "start": 788, - "end": 789, + "start": 805, + "end": 806, "loc": { "start": { "line": 29, @@ -5811,8 +5744,8 @@ "binop": null }, "value": "fetchOne", - "start": 789, - "end": 797, + "start": 806, + "end": 814, "loc": { "start": { "line": 29, @@ -5836,8 +5769,8 @@ "postfix": false, "binop": null }, - "start": 797, - "end": 798, + "start": 814, + "end": 815, "loc": { "start": { "line": 29, @@ -5861,8 +5794,8 @@ "postfix": false, "binop": null }, - "start": 798, - "end": 799, + "start": 815, + "end": 816, "loc": { "start": { "line": 29, @@ -5888,8 +5821,8 @@ "updateContext": null }, "value": "SELECT * FROM test.notes WHERE id=", - "start": 799, - "end": 833, + "start": 816, + "end": 850, "loc": { "start": { "line": 29, @@ -5913,8 +5846,8 @@ "postfix": false, "binop": null }, - "start": 833, - "end": 835, + "start": 850, + "end": 852, "loc": { "start": { "line": 29, @@ -5939,8 +5872,8 @@ "binop": null }, "value": "id", - "start": 835, - "end": 837, + "start": 852, + "end": 854, "loc": { "start": { "line": 29, @@ -5964,8 +5897,8 @@ "postfix": false, "binop": null }, - "start": 837, - "end": 838, + "start": 854, + "end": 855, "loc": { "start": { "line": 29, @@ -5991,8 +5924,8 @@ "updateContext": null }, "value": "", - "start": 838, - "end": 838, + "start": 855, + "end": 855, "loc": { "start": { "line": 29, @@ -6016,8 +5949,8 @@ "postfix": false, "binop": null }, - "start": 838, - "end": 839, + "start": 855, + "end": 856, "loc": { "start": { "line": 29, @@ -6041,8 +5974,8 @@ "postfix": false, "binop": null }, - "start": 839, - "end": 840, + "start": 856, + "end": 857, "loc": { "start": { "line": 29, @@ -6067,8 +6000,8 @@ "binop": null, "updateContext": null }, - "start": 840, - "end": 841, + "start": 857, + "end": 858, "loc": { "start": { "line": 29, @@ -6095,8 +6028,8 @@ "updateContext": null }, "value": "if", - "start": 847, - "end": 849, + "start": 864, + "end": 866, "loc": { "start": { "line": 31, @@ -6120,8 +6053,8 @@ "postfix": false, "binop": null }, - "start": 850, - "end": 851, + "start": 867, + "end": 868, "loc": { "start": { "line": 31, @@ -6146,8 +6079,8 @@ "binop": null }, "value": "row", - "start": 851, - "end": 854, + "start": 868, + "end": 871, "loc": { "start": { "line": 31, @@ -6173,8 +6106,8 @@ "updateContext": null }, "value": "===", - "start": 855, - "end": 858, + "start": 872, + "end": 875, "loc": { "start": { "line": 31, @@ -6199,8 +6132,8 @@ "binop": null }, "value": "undefined", - "start": 859, - "end": 868, + "start": 876, + "end": 885, "loc": { "start": { "line": 31, @@ -6224,8 +6157,8 @@ "postfix": false, "binop": null }, - "start": 868, - "end": 869, + "start": 885, + "end": 886, "loc": { "start": { "line": 31, @@ -6249,8 +6182,8 @@ "postfix": false, "binop": null }, - "start": 870, - "end": 871, + "start": 887, + "end": 888, "loc": { "start": { "line": 31, @@ -6277,8 +6210,8 @@ "updateContext": null }, "value": "throw", - "start": 878, - "end": 883, + "start": 895, + "end": 900, "loc": { "start": { "line": 32, @@ -6305,8 +6238,8 @@ "updateContext": null }, "value": "new", - "start": 884, - "end": 887, + "start": 901, + "end": 904, "loc": { "start": { "line": 32, @@ -6331,8 +6264,8 @@ "binop": null }, "value": "RequestError", - "start": 888, - "end": 900, + "start": 905, + "end": 917, "loc": { "start": { "line": 32, @@ -6356,8 +6289,8 @@ "postfix": false, "binop": null }, - "start": 900, - "end": 901, + "start": 917, + "end": 918, "loc": { "start": { "line": 32, @@ -6383,8 +6316,8 @@ "updateContext": null }, "value": "Unrecognized Note Id", - "start": 901, - "end": 923, + "start": 918, + "end": 940, "loc": { "start": { "line": 32, @@ -6409,8 +6342,8 @@ "binop": null, "updateContext": null }, - "start": 923, - "end": 924, + "start": 940, + "end": 941, "loc": { "start": { "line": 32, @@ -6436,8 +6369,8 @@ "updateContext": null }, "value": 404, - "start": 925, - "end": 928, + "start": 942, + "end": 945, "loc": { "start": { "line": 32, @@ -6461,8 +6394,8 @@ "postfix": false, "binop": null }, - "start": 928, - "end": 929, + "start": 945, + "end": 946, "loc": { "start": { "line": 32, @@ -6487,8 +6420,8 @@ "binop": null, "updateContext": null }, - "start": 929, - "end": 930, + "start": 946, + "end": 947, "loc": { "start": { "line": 32, @@ -6512,8 +6445,8 @@ "postfix": false, "binop": null }, - "start": 935, - "end": 936, + "start": 952, + "end": 953, "loc": { "start": { "line": 33, @@ -6540,8 +6473,8 @@ "updateContext": null }, "value": "return", - "start": 942, - "end": 948, + "start": 959, + "end": 965, "loc": { "start": { "line": 35, @@ -6566,8 +6499,8 @@ "binop": null }, "value": "row", - "start": 949, - "end": 952, + "start": 966, + "end": 969, "loc": { "start": { "line": 35, @@ -6592,8 +6525,8 @@ "binop": null, "updateContext": null }, - "start": 952, - "end": 953, + "start": 969, + "end": 970, "loc": { "start": { "line": 35, @@ -6617,8 +6550,8 @@ "postfix": false, "binop": null }, - "start": 956, - "end": 957, + "start": 973, + "end": 974, "loc": { "start": { "line": 36, @@ -6633,8 +6566,8 @@ { "type": "CommentBlock", "value": "*\n * Creates a new note with a name\n * TODO: add (optional) content param and attribute\n * @param {String} name name of note\n * @return {Note} Note Object\n ", - "start": 961, - "end": 1138, + "start": 978, + "end": 1155, "loc": { "start": { "line": 38, @@ -6659,8 +6592,8 @@ "binop": null }, "value": "static", - "start": 1141, - "end": 1147, + "start": 1158, + "end": 1164, "loc": { "start": { "line": 44, @@ -6685,8 +6618,8 @@ "binop": null }, "value": "async", - "start": 1148, - "end": 1153, + "start": 1165, + "end": 1170, "loc": { "start": { "line": 44, @@ -6711,8 +6644,8 @@ "binop": null }, "value": "createNote", - "start": 1154, - "end": 1164, + "start": 1171, + "end": 1181, "loc": { "start": { "line": 44, @@ -6736,8 +6669,8 @@ "postfix": false, "binop": null }, - "start": 1164, - "end": 1165, + "start": 1181, + "end": 1182, "loc": { "start": { "line": 44, @@ -6761,8 +6694,8 @@ "postfix": false, "binop": null }, - "start": 1165, - "end": 1166, + "start": 1182, + "end": 1183, "loc": { "start": { "line": 44, @@ -6787,8 +6720,8 @@ "binop": null }, "value": "name", - "start": 1167, - "end": 1171, + "start": 1184, + "end": 1188, "loc": { "start": { "line": 44, @@ -6812,8 +6745,8 @@ "postfix": false, "binop": null }, - "start": 1172, - "end": 1173, + "start": 1189, + "end": 1190, "loc": { "start": { "line": 44, @@ -6837,8 +6770,8 @@ "postfix": false, "binop": null }, - "start": 1173, - "end": 1174, + "start": 1190, + "end": 1191, "loc": { "start": { "line": 44, @@ -6862,8 +6795,8 @@ "postfix": false, "binop": null }, - "start": 1175, - "end": 1176, + "start": 1192, + "end": 1193, "loc": { "start": { "line": 44, @@ -6890,8 +6823,8 @@ "updateContext": null }, "value": "if", - "start": 1181, - "end": 1183, + "start": 1198, + "end": 1200, "loc": { "start": { "line": 45, @@ -6915,8 +6848,8 @@ "postfix": false, "binop": null }, - "start": 1184, - "end": 1185, + "start": 1201, + "end": 1202, "loc": { "start": { "line": 45, @@ -6941,8 +6874,8 @@ "binop": null }, "value": "name", - "start": 1185, - "end": 1189, + "start": 1202, + "end": 1206, "loc": { "start": { "line": 45, @@ -6968,8 +6901,8 @@ "updateContext": null }, "value": "===", - "start": 1190, - "end": 1193, + "start": 1207, + "end": 1210, "loc": { "start": { "line": 45, @@ -6995,8 +6928,8 @@ "updateContext": null }, "value": "", - "start": 1194, - "end": 1196, + "start": 1211, + "end": 1213, "loc": { "start": { "line": 45, @@ -7022,8 +6955,8 @@ "updateContext": null }, "value": "||", - "start": 1197, - "end": 1199, + "start": 1214, + "end": 1216, "loc": { "start": { "line": 45, @@ -7048,8 +6981,8 @@ "binop": null }, "value": "name", - "start": 1200, - "end": 1204, + "start": 1217, + "end": 1221, "loc": { "start": { "line": 45, @@ -7075,8 +7008,8 @@ "updateContext": null }, "value": "===", - "start": 1205, - "end": 1208, + "start": 1222, + "end": 1225, "loc": { "start": { "line": 45, @@ -7101,8 +7034,8 @@ "binop": null }, "value": "undefined", - "start": 1209, - "end": 1218, + "start": 1226, + "end": 1235, "loc": { "start": { "line": 45, @@ -7126,8 +7059,8 @@ "postfix": false, "binop": null }, - "start": 1218, - "end": 1219, + "start": 1235, + "end": 1236, "loc": { "start": { "line": 45, @@ -7151,8 +7084,8 @@ "postfix": false, "binop": null }, - "start": 1220, - "end": 1221, + "start": 1237, + "end": 1238, "loc": { "start": { "line": 45, @@ -7179,8 +7112,8 @@ "updateContext": null }, "value": "throw", - "start": 1228, - "end": 1233, + "start": 1245, + "end": 1250, "loc": { "start": { "line": 46, @@ -7207,8 +7140,8 @@ "updateContext": null }, "value": "new", - "start": 1234, - "end": 1237, + "start": 1251, + "end": 1254, "loc": { "start": { "line": 46, @@ -7233,8 +7166,8 @@ "binop": null }, "value": "RequestError", - "start": 1238, - "end": 1250, + "start": 1255, + "end": 1267, "loc": { "start": { "line": 46, @@ -7258,8 +7191,8 @@ "postfix": false, "binop": null }, - "start": 1250, - "end": 1251, + "start": 1267, + "end": 1268, "loc": { "start": { "line": 46, @@ -7285,8 +7218,8 @@ "updateContext": null }, "value": "Name must be provided", - "start": 1251, - "end": 1274, + "start": 1268, + "end": 1291, "loc": { "start": { "line": 46, @@ -7311,8 +7244,8 @@ "binop": null, "updateContext": null }, - "start": 1274, - "end": 1275, + "start": 1291, + "end": 1292, "loc": { "start": { "line": 46, @@ -7338,8 +7271,8 @@ "updateContext": null }, "value": 404, - "start": 1276, - "end": 1279, + "start": 1293, + "end": 1296, "loc": { "start": { "line": 46, @@ -7363,8 +7296,8 @@ "postfix": false, "binop": null }, - "start": 1279, - "end": 1280, + "start": 1296, + "end": 1297, "loc": { "start": { "line": 46, @@ -7389,8 +7322,8 @@ "binop": null, "updateContext": null }, - "start": 1280, - "end": 1281, + "start": 1297, + "end": 1298, "loc": { "start": { "line": 46, @@ -7414,8 +7347,8 @@ "postfix": false, "binop": null }, - "start": 1286, - "end": 1287, + "start": 1303, + "end": 1304, "loc": { "start": { "line": 47, @@ -7442,8 +7375,8 @@ "updateContext": null }, "value": "const", - "start": 1293, - "end": 1298, + "start": 1310, + "end": 1315, "loc": { "start": { "line": 49, @@ -7468,8 +7401,8 @@ "binop": null }, "value": "response", - "start": 1299, - "end": 1307, + "start": 1316, + "end": 1324, "loc": { "start": { "line": 49, @@ -7495,8 +7428,8 @@ "updateContext": null }, "value": "=", - "start": 1308, - "end": 1309, + "start": 1325, + "end": 1326, "loc": { "start": { "line": 49, @@ -7521,8 +7454,8 @@ "binop": null }, "value": "await", - "start": 1310, - "end": 1315, + "start": 1327, + "end": 1332, "loc": { "start": { "line": 49, @@ -7547,8 +7480,8 @@ "binop": null }, "value": "mariadbHelper", - "start": 1316, - "end": 1329, + "start": 1333, + "end": 1346, "loc": { "start": { "line": 49, @@ -7573,8 +7506,8 @@ "binop": null, "updateContext": null }, - "start": 1329, - "end": 1330, + "start": 1346, + "end": 1347, "loc": { "start": { "line": 49, @@ -7599,8 +7532,8 @@ "binop": null }, "value": "insert", - "start": 1330, - "end": 1336, + "start": 1347, + "end": 1353, "loc": { "start": { "line": 49, @@ -7624,8 +7557,8 @@ "postfix": false, "binop": null }, - "start": 1336, - "end": 1337, + "start": 1353, + "end": 1354, "loc": { "start": { "line": 49, @@ -7651,8 +7584,8 @@ "updateContext": null }, "value": "test.notes", - "start": 1337, - "end": 1349, + "start": 1354, + "end": 1366, "loc": { "start": { "line": 49, @@ -7677,8 +7610,8 @@ "binop": null, "updateContext": null }, - "start": 1349, - "end": 1350, + "start": 1366, + "end": 1367, "loc": { "start": { "line": 49, @@ -7702,8 +7635,8 @@ "postfix": false, "binop": null }, - "start": 1351, - "end": 1352, + "start": 1368, + "end": 1369, "loc": { "start": { "line": 49, @@ -7728,8 +7661,8 @@ "binop": null }, "value": "name", - "start": 1359, - "end": 1363, + "start": 1376, + "end": 1380, "loc": { "start": { "line": 50, @@ -7753,8 +7686,8 @@ "postfix": false, "binop": null }, - "start": 1368, - "end": 1369, + "start": 1385, + "end": 1386, "loc": { "start": { "line": 51, @@ -7778,8 +7711,8 @@ "postfix": false, "binop": null }, - "start": 1369, - "end": 1370, + "start": 1386, + "end": 1387, "loc": { "start": { "line": 51, @@ -7804,8 +7737,8 @@ "binop": null, "updateContext": null }, - "start": 1370, - "end": 1371, + "start": 1387, + "end": 1388, "loc": { "start": { "line": 51, @@ -7820,8 +7753,8 @@ { "type": "CommentLine", "value": " TODO: Debug with atom?", - "start": 1377, - "end": 1402, + "start": 1394, + "end": 1419, "loc": { "start": { "line": 53, @@ -7836,8 +7769,8 @@ { "type": "CommentLine", "value": " TODO: Use Logger helper instead", - "start": 1407, - "end": 1441, + "start": 1424, + "end": 1458, "loc": { "start": { "line": 54, @@ -7862,8 +7795,8 @@ "binop": null }, "value": "console", - "start": 1446, - "end": 1453, + "start": 1463, + "end": 1470, "loc": { "start": { "line": 55, @@ -7888,8 +7821,8 @@ "binop": null, "updateContext": null }, - "start": 1453, - "end": 1454, + "start": 1470, + "end": 1471, "loc": { "start": { "line": 55, @@ -7914,8 +7847,8 @@ "binop": null }, "value": "log", - "start": 1454, - "end": 1457, + "start": 1471, + "end": 1474, "loc": { "start": { "line": 55, @@ -7939,8 +7872,8 @@ "postfix": false, "binop": null }, - "start": 1457, - "end": 1458, + "start": 1474, + "end": 1475, "loc": { "start": { "line": 55, @@ -7965,8 +7898,8 @@ "binop": null }, "value": "response", - "start": 1458, - "end": 1466, + "start": 1475, + "end": 1483, "loc": { "start": { "line": 55, @@ -7990,8 +7923,8 @@ "postfix": false, "binop": null }, - "start": 1466, - "end": 1467, + "start": 1483, + "end": 1484, "loc": { "start": { "line": 55, @@ -8016,8 +7949,8 @@ "binop": null, "updateContext": null }, - "start": 1467, - "end": 1468, + "start": 1484, + "end": 1485, "loc": { "start": { "line": 55, @@ -8044,8 +7977,8 @@ "updateContext": null }, "value": "return", - "start": 1474, - "end": 1480, + "start": 1491, + "end": 1497, "loc": { "start": { "line": 57, @@ -8070,8 +8003,8 @@ "binop": null }, "value": "await", - "start": 1481, - "end": 1486, + "start": 1498, + "end": 1503, "loc": { "start": { "line": 57, @@ -8096,8 +8029,8 @@ "binop": null }, "value": "NoteDataservice", - "start": 1487, - "end": 1502, + "start": 1504, + "end": 1519, "loc": { "start": { "line": 57, @@ -8122,8 +8055,8 @@ "binop": null, "updateContext": null }, - "start": 1502, - "end": 1503, + "start": 1519, + "end": 1520, "loc": { "start": { "line": 57, @@ -8148,8 +8081,8 @@ "binop": null }, "value": "getNote", - "start": 1503, - "end": 1510, + "start": 1520, + "end": 1527, "loc": { "start": { "line": 57, @@ -8173,8 +8106,8 @@ "postfix": false, "binop": null }, - "start": 1510, - "end": 1511, + "start": 1527, + "end": 1528, "loc": { "start": { "line": 57, @@ -8198,8 +8131,8 @@ "postfix": false, "binop": null }, - "start": 1511, - "end": 1512, + "start": 1528, + "end": 1529, "loc": { "start": { "line": 57, @@ -8224,8 +8157,8 @@ "binop": null }, "value": "id", - "start": 1513, - "end": 1515, + "start": 1530, + "end": 1532, "loc": { "start": { "line": 57, @@ -8250,8 +8183,8 @@ "binop": null, "updateContext": null }, - "start": 1515, - "end": 1516, + "start": 1532, + "end": 1533, "loc": { "start": { "line": 57, @@ -8276,8 +8209,8 @@ "binop": null }, "value": "response", - "start": 1517, - "end": 1525, + "start": 1534, + "end": 1542, "loc": { "start": { "line": 57, @@ -8302,8 +8235,8 @@ "binop": null, "updateContext": null }, - "start": 1525, - "end": 1526, + "start": 1542, + "end": 1543, "loc": { "start": { "line": 57, @@ -8328,8 +8261,8 @@ "binop": null }, "value": "insertId", - "start": 1526, - "end": 1534, + "start": 1543, + "end": 1551, "loc": { "start": { "line": 57, @@ -8353,8 +8286,8 @@ "postfix": false, "binop": null }, - "start": 1535, - "end": 1536, + "start": 1552, + "end": 1553, "loc": { "start": { "line": 57, @@ -8378,8 +8311,8 @@ "postfix": false, "binop": null }, - "start": 1536, - "end": 1537, + "start": 1553, + "end": 1554, "loc": { "start": { "line": 57, @@ -8404,8 +8337,8 @@ "binop": null, "updateContext": null }, - "start": 1537, - "end": 1538, + "start": 1554, + "end": 1555, "loc": { "start": { "line": 57, @@ -8429,8 +8362,8 @@ "postfix": false, "binop": null }, - "start": 1541, - "end": 1542, + "start": 1558, + "end": 1559, "loc": { "start": { "line": 58, @@ -8445,8 +8378,8 @@ { "type": "CommentBlock", "value": "*\n * Create multiple notes\n * @param {Array} notes Array of note objects with name parameter\n * @return {Promise} [description]\n ", - "start": 1546, - "end": 1695, + "start": 1563, + "end": 1712, "loc": { "start": { "line": 60, @@ -8471,8 +8404,8 @@ "binop": null }, "value": "static", - "start": 1698, - "end": 1704, + "start": 1715, + "end": 1721, "loc": { "start": { "line": 65, @@ -8497,8 +8430,8 @@ "binop": null }, "value": "async", - "start": 1705, - "end": 1710, + "start": 1722, + "end": 1727, "loc": { "start": { "line": 65, @@ -8523,8 +8456,8 @@ "binop": null }, "value": "createNotes", - "start": 1711, - "end": 1722, + "start": 1728, + "end": 1739, "loc": { "start": { "line": 65, @@ -8548,8 +8481,8 @@ "postfix": false, "binop": null }, - "start": 1722, - "end": 1723, + "start": 1739, + "end": 1740, "loc": { "start": { "line": 65, @@ -8574,8 +8507,8 @@ "binop": null }, "value": "notes", - "start": 1723, - "end": 1728, + "start": 1740, + "end": 1745, "loc": { "start": { "line": 65, @@ -8599,8 +8532,8 @@ "postfix": false, "binop": null }, - "start": 1728, - "end": 1729, + "start": 1745, + "end": 1746, "loc": { "start": { "line": 65, @@ -8624,8 +8557,8 @@ "postfix": false, "binop": null }, - "start": 1730, - "end": 1731, + "start": 1747, + "end": 1748, "loc": { "start": { "line": 65, @@ -8652,8 +8585,8 @@ "updateContext": null }, "value": "if", - "start": 1736, - "end": 1738, + "start": 1753, + "end": 1755, "loc": { "start": { "line": 66, @@ -8677,8 +8610,8 @@ "postfix": false, "binop": null }, - "start": 1739, - "end": 1740, + "start": 1756, + "end": 1757, "loc": { "start": { "line": 66, @@ -8703,8 +8636,8 @@ "binop": null }, "value": "_", - "start": 1740, - "end": 1741, + "start": 1757, + "end": 1758, "loc": { "start": { "line": 66, @@ -8729,8 +8662,8 @@ "binop": null, "updateContext": null }, - "start": 1741, - "end": 1742, + "start": 1758, + "end": 1759, "loc": { "start": { "line": 66, @@ -8755,8 +8688,8 @@ "binop": null }, "value": "find", - "start": 1742, - "end": 1746, + "start": 1759, + "end": 1763, "loc": { "start": { "line": 66, @@ -8780,8 +8713,8 @@ "postfix": false, "binop": null }, - "start": 1746, - "end": 1747, + "start": 1763, + "end": 1764, "loc": { "start": { "line": 66, @@ -8805,8 +8738,8 @@ "postfix": false, "binop": null }, - "start": 1747, - "end": 1748, + "start": 1764, + "end": 1765, "loc": { "start": { "line": 66, @@ -8830,8 +8763,8 @@ "postfix": false, "binop": null }, - "start": 1748, - "end": 1749, + "start": 1765, + "end": 1766, "loc": { "start": { "line": 66, @@ -8856,8 +8789,8 @@ "binop": null }, "value": "name", - "start": 1750, - "end": 1754, + "start": 1767, + "end": 1771, "loc": { "start": { "line": 66, @@ -8881,8 +8814,8 @@ "postfix": false, "binop": null }, - "start": 1755, - "end": 1756, + "start": 1772, + "end": 1773, "loc": { "start": { "line": 66, @@ -8906,8 +8839,8 @@ "postfix": false, "binop": null }, - "start": 1756, - "end": 1757, + "start": 1773, + "end": 1774, "loc": { "start": { "line": 66, @@ -8932,8 +8865,8 @@ "binop": null, "updateContext": null }, - "start": 1758, - "end": 1760, + "start": 1775, + "end": 1777, "loc": { "start": { "line": 66, @@ -8957,8 +8890,8 @@ "postfix": false, "binop": null }, - "start": 1761, - "end": 1762, + "start": 1778, + "end": 1779, "loc": { "start": { "line": 66, @@ -8985,8 +8918,8 @@ "updateContext": null }, "value": "return", - "start": 1769, - "end": 1775, + "start": 1786, + "end": 1792, "loc": { "start": { "line": 67, @@ -9011,8 +8944,8 @@ "binop": null }, "value": "name", - "start": 1776, - "end": 1780, + "start": 1793, + "end": 1797, "loc": { "start": { "line": 67, @@ -9038,8 +8971,8 @@ "updateContext": null }, "value": "===", - "start": 1781, - "end": 1784, + "start": 1798, + "end": 1801, "loc": { "start": { "line": 67, @@ -9065,8 +8998,8 @@ "updateContext": null }, "value": "", - "start": 1785, - "end": 1787, + "start": 1802, + "end": 1804, "loc": { "start": { "line": 67, @@ -9092,8 +9025,8 @@ "updateContext": null }, "value": "||", - "start": 1788, - "end": 1790, + "start": 1805, + "end": 1807, "loc": { "start": { "line": 67, @@ -9118,8 +9051,8 @@ "binop": null }, "value": "name", - "start": 1791, - "end": 1795, + "start": 1808, + "end": 1812, "loc": { "start": { "line": 67, @@ -9145,8 +9078,8 @@ "updateContext": null }, "value": "===", - "start": 1796, - "end": 1799, + "start": 1813, + "end": 1816, "loc": { "start": { "line": 67, @@ -9171,8 +9104,8 @@ "binop": null }, "value": "undefined", - "start": 1800, - "end": 1809, + "start": 1817, + "end": 1826, "loc": { "start": { "line": 67, @@ -9197,8 +9130,8 @@ "binop": null, "updateContext": null }, - "start": 1809, - "end": 1810, + "start": 1826, + "end": 1827, "loc": { "start": { "line": 67, @@ -9222,8 +9155,8 @@ "postfix": false, "binop": null }, - "start": 1815, - "end": 1816, + "start": 1832, + "end": 1833, "loc": { "start": { "line": 68, @@ -9247,8 +9180,8 @@ "postfix": false, "binop": null }, - "start": 1816, - "end": 1817, + "start": 1833, + "end": 1834, "loc": { "start": { "line": 68, @@ -9274,8 +9207,8 @@ "updateContext": null }, "value": "!==", - "start": 1818, - "end": 1821, + "start": 1835, + "end": 1838, "loc": { "start": { "line": 68, @@ -9300,8 +9233,8 @@ "binop": null }, "value": "undefined", - "start": 1822, - "end": 1831, + "start": 1839, + "end": 1848, "loc": { "start": { "line": 68, @@ -9325,8 +9258,8 @@ "postfix": false, "binop": null }, - "start": 1831, - "end": 1832, + "start": 1848, + "end": 1849, "loc": { "start": { "line": 68, @@ -9350,8 +9283,8 @@ "postfix": false, "binop": null }, - "start": 1833, - "end": 1834, + "start": 1850, + "end": 1851, "loc": { "start": { "line": 68, @@ -9378,8 +9311,8 @@ "updateContext": null }, "value": "throw", - "start": 1841, - "end": 1846, + "start": 1858, + "end": 1863, "loc": { "start": { "line": 69, @@ -9406,8 +9339,8 @@ "updateContext": null }, "value": "new", - "start": 1847, - "end": 1850, + "start": 1864, + "end": 1867, "loc": { "start": { "line": 69, @@ -9432,8 +9365,8 @@ "binop": null }, "value": "RequestError", - "start": 1851, - "end": 1863, + "start": 1868, + "end": 1880, "loc": { "start": { "line": 69, @@ -9457,8 +9390,8 @@ "postfix": false, "binop": null }, - "start": 1863, - "end": 1864, + "start": 1880, + "end": 1881, "loc": { "start": { "line": 69, @@ -9484,8 +9417,8 @@ "updateContext": null }, "value": "Name cannot be empty or undefined", - "start": 1864, - "end": 1899, + "start": 1881, + "end": 1916, "loc": { "start": { "line": 69, @@ -9510,8 +9443,8 @@ "binop": null, "updateContext": null }, - "start": 1899, - "end": 1900, + "start": 1916, + "end": 1917, "loc": { "start": { "line": 69, @@ -9537,8 +9470,8 @@ "updateContext": null }, "value": 404, - "start": 1901, - "end": 1904, + "start": 1918, + "end": 1921, "loc": { "start": { "line": 69, @@ -9562,8 +9495,8 @@ "postfix": false, "binop": null }, - "start": 1904, - "end": 1905, + "start": 1921, + "end": 1922, "loc": { "start": { "line": 69, @@ -9588,8 +9521,8 @@ "binop": null, "updateContext": null }, - "start": 1905, - "end": 1906, + "start": 1922, + "end": 1923, "loc": { "start": { "line": 69, @@ -9613,8 +9546,8 @@ "postfix": false, "binop": null }, - "start": 1911, - "end": 1912, + "start": 1928, + "end": 1929, "loc": { "start": { "line": 70, @@ -9641,8 +9574,8 @@ "updateContext": null }, "value": "const", - "start": 1917, - "end": 1922, + "start": 1934, + "end": 1939, "loc": { "start": { "line": 71, @@ -9667,8 +9600,8 @@ "binop": null }, "value": "insert", - "start": 1923, - "end": 1929, + "start": 1940, + "end": 1946, "loc": { "start": { "line": 71, @@ -9694,8 +9627,8 @@ "updateContext": null }, "value": "=", - "start": 1930, - "end": 1931, + "start": 1947, + "end": 1948, "loc": { "start": { "line": 71, @@ -9720,8 +9653,8 @@ "binop": null }, "value": "await", - "start": 1932, - "end": 1937, + "start": 1949, + "end": 1954, "loc": { "start": { "line": 71, @@ -9746,8 +9679,8 @@ "binop": null }, "value": "mariadbHelper", - "start": 1938, - "end": 1951, + "start": 1955, + "end": 1968, "loc": { "start": { "line": 71, @@ -9772,8 +9705,8 @@ "binop": null, "updateContext": null }, - "start": 1951, - "end": 1952, + "start": 1968, + "end": 1969, "loc": { "start": { "line": 71, @@ -9798,8 +9731,8 @@ "binop": null }, "value": "insertMultiple", - "start": 1952, - "end": 1966, + "start": 1969, + "end": 1983, "loc": { "start": { "line": 71, @@ -9823,8 +9756,8 @@ "postfix": false, "binop": null }, - "start": 1966, - "end": 1967, + "start": 1983, + "end": 1984, "loc": { "start": { "line": 71, @@ -9850,8 +9783,8 @@ "updateContext": null }, "value": "test.notes", - "start": 1967, - "end": 1979, + "start": 1984, + "end": 1996, "loc": { "start": { "line": 71, @@ -9876,8 +9809,8 @@ "binop": null, "updateContext": null }, - "start": 1979, - "end": 1980, + "start": 1996, + "end": 1997, "loc": { "start": { "line": 71, @@ -9902,8 +9835,8 @@ "binop": null }, "value": "notes", - "start": 1981, - "end": 1986, + "start": 1998, + "end": 2003, "loc": { "start": { "line": 71, @@ -9927,8 +9860,8 @@ "postfix": false, "binop": null }, - "start": 1986, - "end": 1987, + "start": 2003, + "end": 2004, "loc": { "start": { "line": 71, @@ -9953,8 +9886,8 @@ "binop": null, "updateContext": null }, - "start": 1987, - "end": 1988, + "start": 2004, + "end": 2005, "loc": { "start": { "line": 71, @@ -9981,8 +9914,8 @@ "updateContext": null }, "value": "const", - "start": 1994, - "end": 1999, + "start": 2011, + "end": 2016, "loc": { "start": { "line": 73, @@ -10007,8 +9940,8 @@ "binop": null }, "value": "endId", - "start": 2000, - "end": 2005, + "start": 2017, + "end": 2022, "loc": { "start": { "line": 73, @@ -10034,8 +9967,8 @@ "updateContext": null }, "value": "=", - "start": 2006, - "end": 2007, + "start": 2023, + "end": 2024, "loc": { "start": { "line": 73, @@ -10060,8 +9993,8 @@ "binop": null }, "value": "insert", - "start": 2008, - "end": 2014, + "start": 2025, + "end": 2031, "loc": { "start": { "line": 73, @@ -10086,8 +10019,8 @@ "binop": null, "updateContext": null }, - "start": 2014, - "end": 2015, + "start": 2031, + "end": 2032, "loc": { "start": { "line": 73, @@ -10112,8 +10045,8 @@ "binop": null }, "value": "insertId", - "start": 2015, - "end": 2023, + "start": 2032, + "end": 2040, "loc": { "start": { "line": 73, @@ -10139,8 +10072,8 @@ "updateContext": null }, "value": "+", - "start": 2024, - "end": 2025, + "start": 2041, + "end": 2042, "loc": { "start": { "line": 73, @@ -10165,8 +10098,8 @@ "binop": null }, "value": "insert", - "start": 2026, - "end": 2032, + "start": 2043, + "end": 2049, "loc": { "start": { "line": 73, @@ -10191,8 +10124,8 @@ "binop": null, "updateContext": null }, - "start": 2032, - "end": 2033, + "start": 2049, + "end": 2050, "loc": { "start": { "line": 73, @@ -10217,8 +10150,8 @@ "binop": null }, "value": "affectedRows", - "start": 2033, - "end": 2045, + "start": 2050, + "end": 2062, "loc": { "start": { "line": 73, @@ -10243,8 +10176,8 @@ "binop": null, "updateContext": null }, - "start": 2045, - "end": 2046, + "start": 2062, + "end": 2063, "loc": { "start": { "line": 73, @@ -10271,8 +10204,8 @@ "updateContext": null }, "value": "const", - "start": 2051, - "end": 2056, + "start": 2068, + "end": 2073, "loc": { "start": { "line": 74, @@ -10297,8 +10230,8 @@ "binop": null }, "value": "query", - "start": 2057, - "end": 2062, + "start": 2074, + "end": 2079, "loc": { "start": { "line": 74, @@ -10324,8 +10257,8 @@ "updateContext": null }, "value": "=", - "start": 2063, - "end": 2064, + "start": 2080, + "end": 2081, "loc": { "start": { "line": 74, @@ -10349,8 +10282,8 @@ "postfix": false, "binop": null }, - "start": 2065, - "end": 2066, + "start": 2082, + "end": 2083, "loc": { "start": { "line": 74, @@ -10376,8 +10309,8 @@ "updateContext": null }, "value": "SELECT * from test.notes WHERE id >= ", - "start": 2066, - "end": 2103, + "start": 2083, + "end": 2120, "loc": { "start": { "line": 74, @@ -10401,8 +10334,8 @@ "postfix": false, "binop": null }, - "start": 2103, - "end": 2105, + "start": 2120, + "end": 2122, "loc": { "start": { "line": 74, @@ -10427,8 +10360,8 @@ "binop": null }, "value": "insert", - "start": 2105, - "end": 2111, + "start": 2122, + "end": 2128, "loc": { "start": { "line": 74, @@ -10453,8 +10386,8 @@ "binop": null, "updateContext": null }, - "start": 2111, - "end": 2112, + "start": 2128, + "end": 2129, "loc": { "start": { "line": 74, @@ -10479,8 +10412,8 @@ "binop": null }, "value": "insertId", - "start": 2112, - "end": 2120, + "start": 2129, + "end": 2137, "loc": { "start": { "line": 74, @@ -10504,8 +10437,8 @@ "postfix": false, "binop": null }, - "start": 2120, - "end": 2121, + "start": 2137, + "end": 2138, "loc": { "start": { "line": 74, @@ -10531,8 +10464,8 @@ "updateContext": null }, "value": " AND id < ", - "start": 2121, - "end": 2131, + "start": 2138, + "end": 2148, "loc": { "start": { "line": 74, @@ -10556,8 +10489,8 @@ "postfix": false, "binop": null }, - "start": 2131, - "end": 2133, + "start": 2148, + "end": 2150, "loc": { "start": { "line": 74, @@ -10582,8 +10515,8 @@ "binop": null }, "value": "endId", - "start": 2133, - "end": 2138, + "start": 2150, + "end": 2155, "loc": { "start": { "line": 74, @@ -10607,8 +10540,8 @@ "postfix": false, "binop": null }, - "start": 2138, - "end": 2139, + "start": 2155, + "end": 2156, "loc": { "start": { "line": 74, @@ -10634,8 +10567,8 @@ "updateContext": null }, "value": "", - "start": 2139, - "end": 2139, + "start": 2156, + "end": 2156, "loc": { "start": { "line": 74, @@ -10659,8 +10592,8 @@ "postfix": false, "binop": null }, - "start": 2139, - "end": 2140, + "start": 2156, + "end": 2157, "loc": { "start": { "line": 74, @@ -10685,8 +10618,8 @@ "binop": null, "updateContext": null }, - "start": 2140, - "end": 2141, + "start": 2157, + "end": 2158, "loc": { "start": { "line": 74, @@ -10713,8 +10646,8 @@ "updateContext": null }, "value": "return", - "start": 2147, - "end": 2153, + "start": 2164, + "end": 2170, "loc": { "start": { "line": 76, @@ -10739,8 +10672,8 @@ "binop": null }, "value": "await", - "start": 2154, - "end": 2159, + "start": 2171, + "end": 2176, "loc": { "start": { "line": 76, @@ -10765,8 +10698,8 @@ "binop": null }, "value": "mariadbHelper", - "start": 2160, - "end": 2173, + "start": 2177, + "end": 2190, "loc": { "start": { "line": 76, @@ -10791,8 +10724,8 @@ "binop": null, "updateContext": null }, - "start": 2173, - "end": 2174, + "start": 2190, + "end": 2191, "loc": { "start": { "line": 76, @@ -10817,8 +10750,8 @@ "binop": null }, "value": "fetch", - "start": 2174, - "end": 2179, + "start": 2191, + "end": 2196, "loc": { "start": { "line": 76, @@ -10842,8 +10775,8 @@ "postfix": false, "binop": null }, - "start": 2179, - "end": 2180, + "start": 2196, + "end": 2197, "loc": { "start": { "line": 76, @@ -10868,8 +10801,8 @@ "binop": null }, "value": "query", - "start": 2180, - "end": 2185, + "start": 2197, + "end": 2202, "loc": { "start": { "line": 76, @@ -10893,8 +10826,8 @@ "postfix": false, "binop": null }, - "start": 2185, - "end": 2186, + "start": 2202, + "end": 2203, "loc": { "start": { "line": 76, @@ -10919,8 +10852,8 @@ "binop": null, "updateContext": null }, - "start": 2186, - "end": 2187, + "start": 2203, + "end": 2204, "loc": { "start": { "line": 76, @@ -10944,8 +10877,8 @@ "postfix": false, "binop": null }, - "start": 2190, - "end": 2191, + "start": 2207, + "end": 2208, "loc": { "start": { "line": 77, @@ -10969,8 +10902,8 @@ "postfix": false, "binop": null }, - "start": 2192, - "end": 2193, + "start": 2209, + "end": 2210, "loc": { "start": { "line": 78, @@ -10995,8 +10928,8 @@ "binop": null, "updateContext": null }, - "start": 2193, - "end": 2193, + "start": 2210, + "end": 2210, "loc": { "start": { "line": 78, diff --git a/docs/ast/source/entry.js.json b/docs/ast/source/entry.js.json index 7e15ab8..b310b2c 100644 --- a/docs/ast/source/entry.js.json +++ b/docs/ast/source/entry.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 3243, + "end": 3302, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 120, + "line": 121, "column": 3 } }, "program": { "type": "Program", "start": 0, - "end": 3243, + "end": 3302, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 120, + "line": 121, "column": 3 } }, @@ -120,7 +120,7 @@ { "type": "ImportDeclaration", "start": 92, - "end": 176, + "end": 150, "loc": { "start": { "line": 7, @@ -128,7 +128,7 @@ }, "end": { "line": 7, - "column": 84 + "column": 58 } }, "specifiers": [ @@ -229,33 +229,70 @@ }, "name": "EndpointConfig" } + } + ], + "source": { + "type": "StringLiteral", + "start": 131, + "end": 149, + "loc": { + "start": { + "line": 7, + "column": 39 + }, + "end": { + "line": 7, + "column": 57 + } + }, + "extra": { + "rawValue": "./base/server.js", + "raw": "'./base/server.js'" + }, + "value": "./base/server.js" + } + }, + { + "type": "ImportDeclaration", + "start": 151, + "end": 235, + "loc": { + "start": { + "line": 8, + "column": 0 }, + "end": { + "line": 8, + "column": 84 + } + }, + "specifiers": [ { "type": "ImportSpecifier", - "start": 125, - "end": 136, + "start": 160, + "end": 171, "loc": { "start": { - "line": 7, - "column": 33 + "line": 8, + "column": 9 }, "end": { - "line": 7, - "column": 44 + "line": 8, + "column": 20 } }, "imported": { "type": "Identifier", - "start": 125, - "end": 136, + "start": 160, + "end": 171, "loc": { "start": { - "line": 7, - "column": 33 + "line": 8, + "column": 9 }, "end": { - "line": 7, - "column": 44 + "line": 8, + "column": 20 }, "identifierName": "HapiRequest" }, @@ -263,16 +300,16 @@ }, "local": { "type": "Identifier", - "start": 125, - "end": 136, + "start": 160, + "end": 171, "loc": { "start": { - "line": 7, - "column": 33 + "line": 8, + "column": 9 }, "end": { - "line": 7, - "column": 44 + "line": 8, + "column": 20 }, "identifierName": "HapiRequest" }, @@ -281,30 +318,30 @@ }, { "type": "ImportSpecifier", - "start": 138, - "end": 149, + "start": 173, + "end": 184, "loc": { "start": { - "line": 7, - "column": 46 + "line": 8, + "column": 22 }, "end": { - "line": 7, - "column": 57 + "line": 8, + "column": 33 } }, "imported": { "type": "Identifier", - "start": 138, - "end": 149, + "start": 173, + "end": 184, "loc": { "start": { - "line": 7, - "column": 46 + "line": 8, + "column": 22 }, "end": { - "line": 7, - "column": 57 + "line": 8, + "column": 33 }, "identifierName": "HapiHandler" }, @@ -312,16 +349,16 @@ }, "local": { "type": "Identifier", - "start": 138, - "end": 149, + "start": 173, + "end": 184, "loc": { "start": { - "line": 7, - "column": 46 + "line": 8, + "column": 22 }, "end": { - "line": 7, - "column": 57 + "line": 8, + "column": 33 }, "identifierName": "HapiHandler" }, @@ -331,65 +368,65 @@ ], "source": { "type": "StringLiteral", - "start": 157, - "end": 175, + "start": 192, + "end": 234, "loc": { "start": { - "line": 7, - "column": 65 + "line": 8, + "column": 41 }, "end": { - "line": 7, + "line": 8, "column": 83 } }, "extra": { - "rawValue": "./base/server.js", - "raw": "'./base/server.js'" + "rawValue": "./base/request/hapi-request.interface.js", + "raw": "'./base/request/hapi-request.interface.js'" }, - "value": "./base/server.js" + "value": "./base/request/hapi-request.interface.js" } }, { "type": "ImportDeclaration", - "start": 177, - "end": 227, + "start": 236, + "end": 286, "loc": { "start": { - "line": 8, + "line": 9, "column": 0 }, "end": { - "line": 8, + "line": 9, "column": 50 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 184, - "end": 191, + "start": 243, + "end": 250, "loc": { "start": { - "line": 8, + "line": 9, "column": 7 }, "end": { - "line": 8, + "line": 9, "column": 14 } }, "local": { "type": "Identifier", - "start": 184, - "end": 191, + "start": 243, + "end": 250, "loc": { "start": { - "line": 8, + "line": 9, "column": 7 }, "end": { - "line": 8, + "line": 9, "column": 14 }, "identifierName": "mariadb" @@ -400,15 +437,15 @@ ], "source": { "type": "StringLiteral", - "start": 197, - "end": 226, + "start": 256, + "end": 285, "loc": { "start": { - "line": 8, + "line": 9, "column": 20 }, "end": { - "line": 8, + "line": 9, "column": 49 } }, @@ -421,44 +458,44 @@ }, { "type": "ImportDeclaration", - "start": 228, - "end": 276, + "start": 287, + "end": 335, "loc": { "start": { - "line": 9, + "line": 10, "column": 0 }, "end": { - "line": 9, + "line": 10, "column": 48 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 235, - "end": 241, + "start": 294, + "end": 300, "loc": { "start": { - "line": 9, + "line": 10, "column": 7 }, "end": { - "line": 9, + "line": 10, "column": 13 } }, "local": { "type": "Identifier", - "start": 235, - "end": 241, + "start": 294, + "end": 300, "loc": { "start": { - "line": 9, + "line": 10, "column": 7 }, "end": { - "line": 9, + "line": 10, "column": 13 }, "identifierName": "CONFIG" @@ -469,15 +506,15 @@ ], "source": { "type": "StringLiteral", - "start": 247, - "end": 275, + "start": 306, + "end": 334, "loc": { "start": { - "line": 9, + "line": 10, "column": 19 }, "end": { - "line": 9, + "line": 10, "column": 47 } }, @@ -491,15 +528,15 @@ { "type": "CommentLine", "value": " TODO: auto detect routes", - "start": 278, - "end": 305, + "start": 337, + "end": 364, "loc": { "start": { - "line": 11, + "line": 12, "column": 0 }, "end": { - "line": 11, + "line": 12, "column": 27 } } @@ -507,15 +544,15 @@ { "type": "CommentLine", "value": " https://stackoverflow.com/questions/6059246/how-to-include-route-handlers-in-multiple-files-in-express", - "start": 306, - "end": 411, + "start": 365, + "end": 470, "loc": { "start": { - "line": 12, + "line": 13, "column": 0 }, "end": { - "line": 12, + "line": 13, "column": 105 } } @@ -524,44 +561,44 @@ }, { "type": "ImportDeclaration", - "start": 412, - "end": 472, + "start": 471, + "end": 531, "loc": { "start": { - "line": 13, + "line": 14, "column": 0 }, "end": { - "line": 13, + "line": 14, "column": 60 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 419, - "end": 430, + "start": 478, + "end": 489, "loc": { "start": { - "line": 13, + "line": 14, "column": 7 }, "end": { - "line": 13, + "line": 14, "column": 18 } }, "local": { "type": "Identifier", - "start": 419, - "end": 430, + "start": 478, + "end": 489, "loc": { "start": { - "line": 13, + "line": 14, "column": 7 }, "end": { - "line": 13, + "line": 14, "column": 18 }, "identifierName": "adminRoutes" @@ -574,15 +611,15 @@ ], "source": { "type": "StringLiteral", - "start": 436, - "end": 471, + "start": 495, + "end": 530, "loc": { "start": { - "line": 13, + "line": 14, "column": 24 }, "end": { - "line": 13, + "line": 14, "column": 59 } }, @@ -596,15 +633,15 @@ { "type": "CommentLine", "value": " TODO: auto detect routes", - "start": 278, - "end": 305, + "start": 337, + "end": 364, "loc": { "start": { - "line": 11, + "line": 12, "column": 0 }, "end": { - "line": 11, + "line": 12, "column": 27 } } @@ -612,15 +649,15 @@ { "type": "CommentLine", "value": " https://stackoverflow.com/questions/6059246/how-to-include-route-handlers-in-multiple-files-in-express", - "start": 306, - "end": 411, + "start": 365, + "end": 470, "loc": { "start": { - "line": 12, + "line": 13, "column": 0 }, "end": { - "line": 12, + "line": 13, "column": 105 } } @@ -629,44 +666,44 @@ }, { "type": "ImportDeclaration", - "start": 473, - "end": 533, + "start": 532, + "end": 592, "loc": { "start": { - "line": 14, + "line": 15, "column": 0 }, "end": { - "line": 14, + "line": 15, "column": 60 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 480, - "end": 491, + "start": 539, + "end": 550, "loc": { "start": { - "line": 14, + "line": 15, "column": 7 }, "end": { - "line": 14, + "line": 15, "column": 18 } }, "local": { "type": "Identifier", - "start": 480, - "end": 491, + "start": 539, + "end": 550, "loc": { "start": { - "line": 14, + "line": 15, "column": 7 }, "end": { - "line": 14, + "line": 15, "column": 18 }, "identifierName": "helloRoutes" @@ -677,15 +714,15 @@ ], "source": { "type": "StringLiteral", - "start": 497, - "end": 532, + "start": 556, + "end": 591, "loc": { "start": { - "line": 14, + "line": 15, "column": 24 }, "end": { - "line": 14, + "line": 15, "column": 59 } }, @@ -698,44 +735,44 @@ }, { "type": "ImportDeclaration", - "start": 534, - "end": 592, + "start": 593, + "end": 651, "loc": { "start": { - "line": 15, + "line": 16, "column": 0 }, "end": { - "line": 15, + "line": 16, "column": 58 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", - "start": 541, - "end": 551, + "start": 600, + "end": 610, "loc": { "start": { - "line": 15, + "line": 16, "column": 7 }, "end": { - "line": 15, + "line": 16, "column": 17 } }, "local": { "type": "Identifier", - "start": 541, - "end": 551, + "start": 600, + "end": 610, "loc": { "start": { - "line": 15, + "line": 16, "column": 7 }, "end": { - "line": 15, + "line": 16, "column": 17 }, "identifierName": "noteRoutes" @@ -746,15 +783,15 @@ ], "source": { "type": "StringLiteral", - "start": 557, - "end": 591, + "start": 616, + "end": 650, "loc": { "start": { - "line": 15, + "line": 16, "column": 23 }, "end": { - "line": 15, + "line": 16, "column": 57 } }, @@ -768,15 +805,15 @@ { "type": "CommentBlock", "value": "*\n * Build the routes from files and add docs if CONFIG set\n * @type {Array}\n ", - "start": 594, - "end": 692, + "start": 653, + "end": 751, "loc": { "start": { - "line": 17, + "line": 18, "column": 0 }, "end": { - "line": 20, + "line": 21, "column": 3 } } @@ -785,44 +822,44 @@ }, { "type": "VariableDeclaration", - "start": 693, - "end": 742, + "start": 752, + "end": 801, "loc": { "start": { - "line": 21, + "line": 22, "column": 0 }, "end": { - "line": 21, + "line": 22, "column": 49 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 699, - "end": 741, + "start": 758, + "end": 800, "loc": { "start": { - "line": 21, + "line": 22, "column": 6 }, "end": { - "line": 21, + "line": 22, "column": 48 } }, "id": { "type": "Identifier", - "start": 699, - "end": 708, + "start": 758, + "end": 767, "loc": { "start": { - "line": 21, + "line": 22, "column": 6 }, "end": { - "line": 21, + "line": 22, "column": 15 }, "identifierName": "apiRoutes" @@ -832,43 +869,43 @@ }, "init": { "type": "CallExpression", - "start": 711, - "end": 741, + "start": 770, + "end": 800, "loc": { "start": { - "line": 21, + "line": 22, "column": 18 }, "end": { - "line": 21, + "line": 22, "column": 48 } }, "callee": { "type": "MemberExpression", - "start": 711, - "end": 729, + "start": 770, + "end": 788, "loc": { "start": { - "line": 21, + "line": 22, "column": 18 }, "end": { - "line": 21, + "line": 22, "column": 36 } }, "object": { "type": "Identifier", - "start": 711, - "end": 722, + "start": 770, + "end": 781, "loc": { "start": { - "line": 21, + "line": 22, "column": 18 }, "end": { - "line": 21, + "line": 22, "column": 29 }, "identifierName": "helloRoutes" @@ -877,15 +914,15 @@ }, "property": { "type": "Identifier", - "start": 723, - "end": 729, + "start": 782, + "end": 788, "loc": { "start": { - "line": 21, + "line": 22, "column": 30 }, "end": { - "line": 21, + "line": 22, "column": 36 }, "identifierName": "concat" @@ -897,15 +934,15 @@ "arguments": [ { "type": "Identifier", - "start": 730, - "end": 740, + "start": 789, + "end": 799, "loc": { "start": { - "line": 21, + "line": 22, "column": 37 }, "end": { - "line": 21, + "line": 22, "column": 47 }, "identifierName": "noteRoutes" @@ -922,15 +959,15 @@ { "type": "CommentBlock", "value": "*\n * Build the routes from files and add docs if CONFIG set\n * @type {Array}\n ", - "start": 594, - "end": 692, + "start": 653, + "end": 751, "loc": { "start": { - "line": 17, + "line": 18, "column": 0 }, "end": { - "line": 20, + "line": 21, "column": 3 } } @@ -939,57 +976,57 @@ }, { "type": "ExpressionStatement", - "start": 743, - "end": 821, + "start": 802, + "end": 880, "loc": { "start": { - "line": 22, + "line": 23, "column": 0 }, "end": { - "line": 24, + "line": 25, "column": 3 } }, "expression": { "type": "CallExpression", - "start": 743, - "end": 820, + "start": 802, + "end": 879, "loc": { "start": { - "line": 22, + "line": 23, "column": 0 }, "end": { - "line": 24, + "line": 25, "column": 2 } }, "callee": { "type": "MemberExpression", - "start": 743, - "end": 760, + "start": 802, + "end": 819, "loc": { "start": { - "line": 22, + "line": 23, "column": 0 }, "end": { - "line": 22, + "line": 23, "column": 17 } }, "object": { "type": "Identifier", - "start": 743, - "end": 752, + "start": 802, + "end": 811, "loc": { "start": { - "line": 22, + "line": 23, "column": 0 }, "end": { - "line": 22, + "line": 23, "column": 9 }, "identifierName": "apiRoutes" @@ -998,15 +1035,15 @@ }, "property": { "type": "Identifier", - "start": 753, - "end": 760, + "start": 812, + "end": 819, "loc": { "start": { - "line": 22, + "line": 23, "column": 10 }, "end": { - "line": 22, + "line": 23, "column": 17 }, "identifierName": "forEach" @@ -1018,15 +1055,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 761, - "end": 819, + "start": 820, + "end": 878, "loc": { "start": { - "line": 22, + "line": 23, "column": 18 }, "end": { - "line": 24, + "line": 25, "column": 1 } }, @@ -1037,15 +1074,15 @@ "params": [ { "type": "Identifier", - "start": 761, - "end": 766, + "start": 820, + "end": 825, "loc": { "start": { - "line": 22, + "line": 23, "column": 18 }, "end": { - "line": 22, + "line": 23, "column": 23 }, "identifierName": "route" @@ -1055,73 +1092,73 @@ ], "body": { "type": "BlockStatement", - "start": 770, - "end": 819, + "start": 829, + "end": 878, "loc": { "start": { - "line": 22, + "line": 23, "column": 27 }, "end": { - "line": 24, + "line": 25, "column": 1 } }, "body": [ { "type": "ExpressionStatement", - "start": 774, - "end": 817, + "start": 833, + "end": 876, "loc": { "start": { - "line": 23, + "line": 24, "column": 2 }, "end": { - "line": 23, + "line": 24, "column": 45 } }, "expression": { "type": "AssignmentExpression", - "start": 774, - "end": 816, + "start": 833, + "end": 875, "loc": { "start": { - "line": 23, + "line": 24, "column": 2 }, "end": { - "line": 23, + "line": 24, "column": 44 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 774, - "end": 784, + "start": 833, + "end": 843, "loc": { "start": { - "line": 23, + "line": 24, "column": 2 }, "end": { - "line": 23, + "line": 24, "column": 12 } }, "object": { "type": "Identifier", - "start": 774, - "end": 779, + "start": 833, + "end": 838, "loc": { "start": { - "line": 23, + "line": 24, "column": 2 }, "end": { - "line": 23, + "line": 24, "column": 7 }, "identifierName": "route" @@ -1130,15 +1167,15 @@ }, "property": { "type": "Identifier", - "start": 780, - "end": 784, + "start": 839, + "end": 843, "loc": { "start": { - "line": 23, + "line": 24, "column": 8 }, "end": { - "line": 23, + "line": 24, "column": 12 }, "identifierName": "path" @@ -1149,57 +1186,57 @@ }, "right": { "type": "BinaryExpression", - "start": 787, - "end": 816, + "start": 846, + "end": 875, "loc": { "start": { - "line": 23, + "line": 24, "column": 15 }, "end": { - "line": 23, + "line": 24, "column": 44 } }, "left": { "type": "MemberExpression", - "start": 787, - "end": 803, + "start": 846, + "end": 862, "loc": { "start": { - "line": 23, + "line": 24, "column": 15 }, "end": { - "line": 23, + "line": 24, "column": 31 } }, "object": { "type": "MemberExpression", - "start": 787, - "end": 799, + "start": 846, + "end": 858, "loc": { "start": { - "line": 23, + "line": 24, "column": 15 }, "end": { - "line": 23, + "line": 24, "column": 27 } }, "object": { "type": "Identifier", - "start": 787, - "end": 793, + "start": 846, + "end": 852, "loc": { "start": { - "line": 23, + "line": 24, "column": 15 }, "end": { - "line": 23, + "line": 24, "column": 21 }, "identifierName": "CONFIG" @@ -1208,15 +1245,15 @@ }, "property": { "type": "Identifier", - "start": 794, - "end": 799, + "start": 853, + "end": 858, "loc": { "start": { - "line": 23, + "line": 24, "column": 22 }, "end": { - "line": 23, + "line": 24, "column": 27 }, "identifierName": "PATHS" @@ -1227,15 +1264,15 @@ }, "property": { "type": "Identifier", - "start": 800, - "end": 803, + "start": 859, + "end": 862, "loc": { "start": { - "line": 23, + "line": 24, "column": 28 }, "end": { - "line": 23, + "line": 24, "column": 31 }, "identifierName": "api" @@ -1247,29 +1284,29 @@ "operator": "+", "right": { "type": "MemberExpression", - "start": 806, - "end": 816, + "start": 865, + "end": 875, "loc": { "start": { - "line": 23, + "line": 24, "column": 34 }, "end": { - "line": 23, + "line": 24, "column": 44 } }, "object": { "type": "Identifier", - "start": 806, - "end": 811, + "start": 865, + "end": 870, "loc": { "start": { - "line": 23, + "line": 24, "column": 34 }, "end": { - "line": 23, + "line": 24, "column": 39 }, "identifierName": "route" @@ -1278,15 +1315,15 @@ }, "property": { "type": "Identifier", - "start": 812, - "end": 816, + "start": 871, + "end": 875, "loc": { "start": { - "line": 23, + "line": 24, "column": 40 }, "end": { - "line": 23, + "line": 24, "column": 44 }, "identifierName": "path" @@ -1307,44 +1344,44 @@ }, { "type": "VariableDeclaration", - "start": 823, - "end": 1296, + "start": 882, + "end": 1355, "loc": { "start": { - "line": 26, + "line": 27, "column": 0 }, "end": { - "line": 49, + "line": 50, "column": 3 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 829, - "end": 1295, + "start": 888, + "end": 1354, "loc": { "start": { - "line": 26, + "line": 27, "column": 6 }, "end": { - "line": 49, + "line": 50, "column": 2 } }, "id": { "type": "Identifier", - "start": 829, - "end": 838, + "start": 888, + "end": 897, "loc": { "start": { - "line": 26, + "line": 27, "column": 6 }, "end": { - "line": 26, + "line": 27, "column": 15 }, "identifierName": "docRoutes" @@ -1353,45 +1390,45 @@ }, "init": { "type": "ArrayExpression", - "start": 841, - "end": 1295, + "start": 900, + "end": 1354, "loc": { "start": { - "line": 26, + "line": 27, "column": 18 }, "end": { - "line": 49, + "line": 50, "column": 2 } }, "elements": [ { "type": "ObjectExpression", - "start": 842, - "end": 961, + "start": 901, + "end": 1020, "loc": { "start": { - "line": 26, + "line": 27, "column": 19 }, "end": { - "line": 32, + "line": 33, "column": 1 } }, "properties": [ { "type": "ObjectProperty", - "start": 846, - "end": 859, + "start": 905, + "end": 918, "loc": { "start": { - "line": 27, + "line": 28, "column": 2 }, "end": { - "line": 27, + "line": 28, "column": 15 } }, @@ -1400,15 +1437,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 846, - "end": 852, + "start": 905, + "end": 911, "loc": { "start": { - "line": 27, + "line": 28, "column": 2 }, "end": { - "line": 27, + "line": 28, "column": 8 }, "identifierName": "method" @@ -1417,15 +1454,15 @@ }, "value": { "type": "StringLiteral", - "start": 854, - "end": 859, + "start": 913, + "end": 918, "loc": { "start": { - "line": 27, + "line": 28, "column": 10 }, "end": { - "line": 27, + "line": 28, "column": 15 } }, @@ -1438,15 +1475,15 @@ }, { "type": "ObjectProperty", - "start": 863, - "end": 885, + "start": 922, + "end": 944, "loc": { "start": { - "line": 28, + "line": 29, "column": 2 }, "end": { - "line": 28, + "line": 29, "column": 24 } }, @@ -1455,15 +1492,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 863, - "end": 867, + "start": 922, + "end": 926, "loc": { "start": { - "line": 28, + "line": 29, "column": 2 }, "end": { - "line": 28, + "line": 29, "column": 6 }, "identifierName": "path" @@ -1472,43 +1509,43 @@ }, "value": { "type": "MemberExpression", - "start": 869, - "end": 885, + "start": 928, + "end": 944, "loc": { "start": { - "line": 28, + "line": 29, "column": 8 }, "end": { - "line": 28, + "line": 29, "column": 24 } }, "object": { "type": "MemberExpression", - "start": 869, - "end": 881, + "start": 928, + "end": 940, "loc": { "start": { - "line": 28, + "line": 29, "column": 8 }, "end": { - "line": 28, + "line": 29, "column": 20 } }, "object": { "type": "Identifier", - "start": 869, - "end": 875, + "start": 928, + "end": 934, "loc": { "start": { - "line": 28, + "line": 29, "column": 8 }, "end": { - "line": 28, + "line": 29, "column": 14 }, "identifierName": "CONFIG" @@ -1517,15 +1554,15 @@ }, "property": { "type": "Identifier", - "start": 876, - "end": 881, + "start": 935, + "end": 940, "loc": { "start": { - "line": 28, + "line": 29, "column": 15 }, "end": { - "line": 28, + "line": 29, "column": 20 }, "identifierName": "PATHS" @@ -1536,15 +1573,15 @@ }, "property": { "type": "Identifier", - "start": 882, - "end": 885, + "start": 941, + "end": 944, "loc": { "start": { - "line": 28, + "line": 29, "column": 21 }, "end": { - "line": 28, + "line": 29, "column": 24 }, "identifierName": "api" @@ -1556,15 +1593,15 @@ }, { "type": "ObjectProperty", - "start": 889, - "end": 959, + "start": 948, + "end": 1018, "loc": { "start": { - "line": 29, + "line": 30, "column": 2 }, "end": { - "line": 31, + "line": 32, "column": 3 } }, @@ -1573,15 +1610,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 889, - "end": 899, + "start": 948, + "end": 958, "loc": { "start": { - "line": 29, + "line": 30, "column": 2 }, "end": { - "line": 29, + "line": 30, "column": 12 }, "identifierName": "controller" @@ -1590,30 +1627,30 @@ }, "value": { "type": "ObjectExpression", - "start": 901, - "end": 959, + "start": 960, + "end": 1018, "loc": { "start": { - "line": 29, + "line": 30, "column": 14 }, "end": { - "line": 31, + "line": 32, "column": 3 } }, "properties": [ { "type": "ObjectProperty", - "start": 907, - "end": 955, + "start": 966, + "end": 1014, "loc": { "start": { - "line": 30, + "line": 31, "column": 4 }, "end": { - "line": 30, + "line": 31, "column": 52 } }, @@ -1622,15 +1659,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 907, - "end": 911, + "start": 966, + "end": 970, "loc": { "start": { - "line": 30, + "line": 31, "column": 4 }, "end": { - "line": 30, + "line": 31, "column": 8 }, "identifierName": "file" @@ -1639,43 +1676,43 @@ }, "value": { "type": "CallExpression", - "start": 913, - "end": 955, + "start": 972, + "end": 1014, "loc": { "start": { - "line": 30, + "line": 31, "column": 10 }, "end": { - "line": 30, + "line": 31, "column": 52 } }, "callee": { "type": "MemberExpression", - "start": 913, - "end": 925, + "start": 972, + "end": 984, "loc": { "start": { - "line": 30, + "line": 31, "column": 10 }, "end": { - "line": 30, + "line": 31, "column": 22 } }, "object": { "type": "Identifier", - "start": 913, - "end": 917, + "start": 972, + "end": 976, "loc": { "start": { - "line": 30, + "line": 31, "column": 10 }, "end": { - "line": 30, + "line": 31, "column": 14 }, "identifierName": "path" @@ -1684,15 +1721,15 @@ }, "property": { "type": "Identifier", - "start": 918, - "end": 925, + "start": 977, + "end": 984, "loc": { "start": { - "line": 30, + "line": 31, "column": 15 }, "end": { - "line": 30, + "line": 31, "column": 22 }, "identifierName": "resolve" @@ -1704,15 +1741,15 @@ "arguments": [ { "type": "Identifier", - "start": 926, - "end": 935, + "start": 985, + "end": 994, "loc": { "start": { - "line": 30, + "line": 31, "column": 23 }, "end": { - "line": 30, + "line": 31, "column": 32 }, "identifierName": "__dirname" @@ -1721,15 +1758,15 @@ }, { "type": "StringLiteral", - "start": 937, - "end": 954, + "start": 996, + "end": 1013, "loc": { "start": { - "line": 30, + "line": 31, "column": 34 }, "end": { - "line": 30, + "line": 31, "column": 51 } }, @@ -1749,30 +1786,30 @@ }, { "type": "ObjectExpression", - "start": 963, - "end": 1147, + "start": 1022, + "end": 1206, "loc": { "start": { - "line": 32, + "line": 33, "column": 3 }, "end": { - "line": 42, + "line": 43, "column": 1 } }, "properties": [ { "type": "ObjectProperty", - "start": 967, - "end": 980, + "start": 1026, + "end": 1039, "loc": { "start": { - "line": 33, + "line": 34, "column": 2 }, "end": { - "line": 33, + "line": 34, "column": 15 } }, @@ -1781,15 +1818,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 967, - "end": 973, + "start": 1026, + "end": 1032, "loc": { "start": { - "line": 33, + "line": 34, "column": 2 }, "end": { - "line": 33, + "line": 34, "column": 8 }, "identifierName": "method" @@ -1798,15 +1835,15 @@ }, "value": { "type": "StringLiteral", - "start": 975, - "end": 980, + "start": 1034, + "end": 1039, "loc": { "start": { - "line": 33, + "line": 34, "column": 10 }, "end": { - "line": 33, + "line": 34, "column": 15 } }, @@ -1819,15 +1856,15 @@ }, { "type": "ObjectProperty", - "start": 984, - "end": 1006, + "start": 1043, + "end": 1065, "loc": { "start": { - "line": 34, + "line": 35, "column": 2 }, "end": { - "line": 34, + "line": 35, "column": 24 } }, @@ -1836,15 +1873,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 984, - "end": 988, + "start": 1043, + "end": 1047, "loc": { "start": { - "line": 34, + "line": 35, "column": 2 }, "end": { - "line": 34, + "line": 35, "column": 6 }, "identifierName": "path" @@ -1853,15 +1890,15 @@ }, "value": { "type": "StringLiteral", - "start": 990, - "end": 1006, + "start": 1049, + "end": 1065, "loc": { "start": { - "line": 34, + "line": 35, "column": 8 }, "end": { - "line": 34, + "line": 35, "column": 24 } }, @@ -1874,15 +1911,15 @@ }, { "type": "ObjectProperty", - "start": 1010, - "end": 1145, + "start": 1069, + "end": 1204, "loc": { "start": { - "line": 35, + "line": 36, "column": 2 }, "end": { - "line": 41, + "line": 42, "column": 3 } }, @@ -1891,15 +1928,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1010, - "end": 1020, + "start": 1069, + "end": 1079, "loc": { "start": { - "line": 35, + "line": 36, "column": 2 }, "end": { - "line": 35, + "line": 36, "column": 12 }, "identifierName": "controller" @@ -1908,30 +1945,30 @@ }, "value": { "type": "ObjectExpression", - "start": 1022, - "end": 1145, + "start": 1081, + "end": 1204, "loc": { "start": { - "line": 35, + "line": 36, "column": 14 }, "end": { - "line": 41, + "line": 42, "column": 3 } }, "properties": [ { "type": "ObjectProperty", - "start": 1028, - "end": 1141, + "start": 1087, + "end": 1200, "loc": { "start": { - "line": 36, + "line": 37, "column": 4 }, "end": { - "line": 40, + "line": 41, "column": 5 } }, @@ -1940,15 +1977,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1028, - "end": 1037, + "start": 1087, + "end": 1096, "loc": { "start": { - "line": 36, + "line": 37, "column": 4 }, "end": { - "line": 36, + "line": 37, "column": 13 }, "identifierName": "directory" @@ -1957,30 +1994,30 @@ }, "value": { "type": "ObjectExpression", - "start": 1039, - "end": 1141, + "start": 1098, + "end": 1200, "loc": { "start": { - "line": 36, + "line": 37, "column": 15 }, "end": { - "line": 40, + "line": 41, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 1047, - "end": 1087, + "start": 1106, + "end": 1146, "loc": { "start": { - "line": 37, + "line": 38, "column": 6 }, "end": { - "line": 37, + "line": 38, "column": 46 } }, @@ -1989,15 +2026,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1047, - "end": 1051, + "start": 1106, + "end": 1110, "loc": { "start": { - "line": 37, + "line": 38, "column": 6 }, "end": { - "line": 37, + "line": 38, "column": 10 }, "identifierName": "path" @@ -2006,43 +2043,43 @@ }, "value": { "type": "CallExpression", - "start": 1053, - "end": 1087, + "start": 1112, + "end": 1146, "loc": { "start": { - "line": 37, + "line": 38, "column": 12 }, "end": { - "line": 37, + "line": 38, "column": 46 } }, "callee": { "type": "MemberExpression", - "start": 1053, - "end": 1065, + "start": 1112, + "end": 1124, "loc": { "start": { - "line": 37, + "line": 38, "column": 12 }, "end": { - "line": 37, + "line": 38, "column": 24 } }, "object": { "type": "Identifier", - "start": 1053, - "end": 1057, + "start": 1112, + "end": 1116, "loc": { "start": { - "line": 37, + "line": 38, "column": 12 }, "end": { - "line": 37, + "line": 38, "column": 16 }, "identifierName": "path" @@ -2051,15 +2088,15 @@ }, "property": { "type": "Identifier", - "start": 1058, - "end": 1065, + "start": 1117, + "end": 1124, "loc": { "start": { - "line": 37, + "line": 38, "column": 17 }, "end": { - "line": 37, + "line": 38, "column": 24 }, "identifierName": "resolve" @@ -2071,15 +2108,15 @@ "arguments": [ { "type": "Identifier", - "start": 1066, - "end": 1075, + "start": 1125, + "end": 1134, "loc": { "start": { - "line": 37, + "line": 38, "column": 25 }, "end": { - "line": 37, + "line": 38, "column": 34 }, "identifierName": "__dirname" @@ -2088,15 +2125,15 @@ }, { "type": "StringLiteral", - "start": 1077, - "end": 1086, + "start": 1136, + "end": 1145, "loc": { "start": { - "line": 37, + "line": 38, "column": 36 }, "end": { - "line": 37, + "line": 38, "column": 45 } }, @@ -2111,15 +2148,15 @@ }, { "type": "ObjectProperty", - "start": 1095, - "end": 1106, + "start": 1154, + "end": 1165, "loc": { "start": { - "line": 38, + "line": 39, "column": 6 }, "end": { - "line": 38, + "line": 39, "column": 17 } }, @@ -2128,15 +2165,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1095, - "end": 1100, + "start": 1154, + "end": 1159, "loc": { "start": { - "line": 38, + "line": 39, "column": 6 }, "end": { - "line": 38, + "line": 39, "column": 11 }, "identifierName": "index" @@ -2145,15 +2182,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 1102, - "end": 1106, + "start": 1161, + "end": 1165, "loc": { "start": { - "line": 38, + "line": 39, "column": 13 }, "end": { - "line": 38, + "line": 39, "column": 17 } }, @@ -2162,15 +2199,15 @@ }, { "type": "ObjectProperty", - "start": 1114, - "end": 1135, + "start": 1173, + "end": 1194, "loc": { "start": { - "line": 39, + "line": 40, "column": 6 }, "end": { - "line": 39, + "line": 40, "column": 27 } }, @@ -2179,15 +2216,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1114, - "end": 1129, + "start": 1173, + "end": 1188, "loc": { "start": { - "line": 39, + "line": 40, "column": 6 }, "end": { - "line": 39, + "line": 40, "column": 21 }, "identifierName": "redirectToSlash" @@ -2196,15 +2233,15 @@ }, "value": { "type": "BooleanLiteral", - "start": 1131, - "end": 1135, + "start": 1190, + "end": 1194, "loc": { "start": { - "line": 39, + "line": 40, "column": 23 }, "end": { - "line": 39, + "line": 40, "column": 27 } }, @@ -2221,30 +2258,30 @@ }, { "type": "ObjectExpression", - "start": 1149, - "end": 1294, + "start": 1208, + "end": 1353, "loc": { "start": { - "line": 42, + "line": 43, "column": 3 }, "end": { - "line": 49, + "line": 50, "column": 1 } }, "properties": [ { "type": "ObjectProperty", - "start": 1153, - "end": 1166, + "start": 1212, + "end": 1225, "loc": { "start": { - "line": 43, + "line": 44, "column": 2 }, "end": { - "line": 43, + "line": 44, "column": 15 } }, @@ -2253,15 +2290,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1153, - "end": 1159, + "start": 1212, + "end": 1218, "loc": { "start": { - "line": 43, + "line": 44, "column": 2 }, "end": { - "line": 43, + "line": 44, "column": 8 }, "identifierName": "method" @@ -2270,15 +2307,15 @@ }, "value": { "type": "StringLiteral", - "start": 1161, - "end": 1166, + "start": 1220, + "end": 1225, "loc": { "start": { - "line": 43, + "line": 44, "column": 10 }, "end": { - "line": 43, + "line": 44, "column": 15 } }, @@ -2291,15 +2328,15 @@ }, { "type": "ObjectProperty", - "start": 1170, - "end": 1183, + "start": 1229, + "end": 1242, "loc": { "start": { - "line": 44, + "line": 45, "column": 2 }, "end": { - "line": 44, + "line": 45, "column": 15 } }, @@ -2308,15 +2345,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1170, - "end": 1174, + "start": 1229, + "end": 1233, "loc": { "start": { - "line": 44, + "line": 45, "column": 2 }, "end": { - "line": 44, + "line": 45, "column": 6 }, "identifierName": "path" @@ -2325,15 +2362,15 @@ }, "value": { "type": "StringLiteral", - "start": 1176, - "end": 1183, + "start": 1235, + "end": 1242, "loc": { "start": { - "line": 44, + "line": 45, "column": 8 }, "end": { - "line": 44, + "line": 45, "column": 15 } }, @@ -2346,15 +2383,15 @@ }, { "type": "ObjectProperty", - "start": 1187, - "end": 1292, + "start": 1246, + "end": 1351, "loc": { "start": { - "line": 45, + "line": 46, "column": 2 }, "end": { - "line": 48, + "line": 49, "column": 3 } }, @@ -2363,15 +2400,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1187, - "end": 1197, + "start": 1246, + "end": 1256, "loc": { "start": { - "line": 45, + "line": 46, "column": 2 }, "end": { - "line": 45, + "line": 46, "column": 12 }, "identifierName": "controller" @@ -2380,15 +2417,15 @@ }, "value": { "type": "ArrowFunctionExpression", - "start": 1199, - "end": 1292, + "start": 1258, + "end": 1351, "loc": { "start": { - "line": 45, + "line": 46, "column": 14 }, "end": { - "line": 48, + "line": 49, "column": 3 } }, @@ -2399,15 +2436,15 @@ "params": [ { "type": "Identifier", - "start": 1200, - "end": 1207, + "start": 1259, + "end": 1266, "loc": { "start": { - "line": 45, + "line": 46, "column": 15 }, "end": { - "line": 45, + "line": 46, "column": 22 }, "identifierName": "request" @@ -2416,15 +2453,15 @@ }, { "type": "Identifier", - "start": 1209, - "end": 1216, + "start": 1268, + "end": 1275, "loc": { "start": { - "line": 45, + "line": 46, "column": 24 }, "end": { - "line": 45, + "line": 46, "column": 31 }, "identifierName": "handler" @@ -2434,72 +2471,72 @@ ], "body": { "type": "BlockStatement", - "start": 1221, - "end": 1292, + "start": 1280, + "end": 1351, "loc": { "start": { - "line": 45, + "line": 46, "column": 36 }, "end": { - "line": 48, + "line": 49, "column": 3 } }, "body": [ { "type": "ReturnStatement", - "start": 1254, - "end": 1288, + "start": 1313, + "end": 1347, "loc": { "start": { - "line": 47, + "line": 48, "column": 4 }, "end": { - "line": 47, + "line": 48, "column": 38 } }, "argument": { "type": "CallExpression", - "start": 1261, - "end": 1287, + "start": 1320, + "end": 1346, "loc": { "start": { - "line": 47, + "line": 48, "column": 11 }, "end": { - "line": 47, + "line": 48, "column": 37 } }, "callee": { "type": "MemberExpression", - "start": 1261, - "end": 1277, + "start": 1320, + "end": 1336, "loc": { "start": { - "line": 47, + "line": 48, "column": 11 }, "end": { - "line": 47, + "line": 48, "column": 27 } }, "object": { "type": "Identifier", - "start": 1261, - "end": 1268, + "start": 1320, + "end": 1327, "loc": { "start": { - "line": 47, + "line": 48, "column": 11 }, "end": { - "line": 47, + "line": 48, "column": 18 }, "identifierName": "handler" @@ -2509,15 +2546,15 @@ }, "property": { "type": "Identifier", - "start": 1269, - "end": 1277, + "start": 1328, + "end": 1336, "loc": { "start": { - "line": 47, + "line": 48, "column": 19 }, "end": { - "line": 47, + "line": 48, "column": 27 }, "identifierName": "redirect" @@ -2530,15 +2567,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 1278, - "end": 1286, + "start": 1337, + "end": 1345, "loc": { "start": { - "line": 47, + "line": 48, "column": 28 }, "end": { - "line": 47, + "line": 48, "column": 36 } }, @@ -2555,15 +2592,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 1227, - "end": 1249, + "start": 1286, + "end": 1308, "loc": { "start": { - "line": 46, + "line": 47, "column": 4 }, "end": { - "line": 46, + "line": 47, "column": 26 } } @@ -2586,15 +2623,15 @@ { "type": "CommentBlock", "value": "*\n * Entry point to run the server\n * @return {undefined} no return\n ", - "start": 1297, - "end": 1370, + "start": 1356, + "end": 1429, "loc": { "start": { - "line": 50, + "line": 51, "column": 0 }, "end": { - "line": 53, + "line": 54, "column": 3 } } @@ -2603,43 +2640,43 @@ }, { "type": "ExportDefaultDeclaration", - "start": 1371, - "end": 2401, + "start": 1430, + "end": 2460, "loc": { "start": { - "line": 54, + "line": 55, "column": 0 }, "end": { - "line": 90, + "line": 91, "column": 3 } }, "declaration": { "type": "FunctionExpression", - "start": 1387, - "end": 2399, + "start": 1446, + "end": 2458, "loc": { "start": { - "line": 54, + "line": 55, "column": 16 }, "end": { - "line": 90, + "line": 91, "column": 1 } }, "id": { "type": "Identifier", - "start": 1402, - "end": 1406, + "start": 1461, + "end": 1465, "loc": { "start": { - "line": 54, + "line": 55, "column": 31 }, "end": { - "line": 54, + "line": 55, "column": 35 }, "identifierName": "main" @@ -2652,88 +2689,88 @@ "params": [], "body": { "type": "BlockStatement", - "start": 1409, - "end": 2399, + "start": 1468, + "end": 2458, "loc": { "start": { - "line": 54, + "line": 55, "column": 38 }, "end": { - "line": 90, + "line": 91, "column": 1 } }, "body": [ { "type": "TryStatement", - "start": 1492, - "end": 2397, + "start": 1551, + "end": 2456, "loc": { "start": { - "line": 56, + "line": 57, "column": 2 }, "end": { - "line": 89, + "line": 90, "column": 3 } }, "block": { "type": "BlockStatement", - "start": 1496, - "end": 2167, + "start": 1555, + "end": 2226, "loc": { "start": { - "line": 56, + "line": 57, "column": 6 }, "end": { - "line": 84, + "line": 85, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 1502, - "end": 1730, + "start": 1561, + "end": 1789, "loc": { "start": { - "line": 57, + "line": 58, "column": 4 }, "end": { - "line": 64, + "line": 65, "column": 7 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 1508, - "end": 1729, + "start": 1567, + "end": 1788, "loc": { "start": { - "line": 57, + "line": 58, "column": 10 }, "end": { - "line": 64, + "line": 65, "column": 6 } }, "id": { "type": "Identifier", - "start": 1508, - "end": 1514, + "start": 1567, + "end": 1573, "loc": { "start": { - "line": 57, + "line": 58, "column": 10 }, "end": { - "line": 57, + "line": 58, "column": 16 }, "identifierName": "server" @@ -2743,29 +2780,29 @@ }, "init": { "type": "NewExpression", - "start": 1517, - "end": 1729, + "start": 1576, + "end": 1788, "loc": { "start": { - "line": 57, + "line": 58, "column": 19 }, "end": { - "line": 64, + "line": 65, "column": 6 } }, "callee": { "type": "Identifier", - "start": 1521, - "end": 1527, + "start": 1580, + "end": 1586, "loc": { "start": { - "line": 57, + "line": 58, "column": 23 }, "end": { - "line": 57, + "line": 58, "column": 29 }, "identifierName": "Server" @@ -2775,30 +2812,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 1528, - "end": 1728, + "start": 1587, + "end": 1787, "loc": { "start": { - "line": 57, + "line": 58, "column": 30 }, "end": { - "line": 64, + "line": 65, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 1536, - "end": 1560, + "start": 1595, + "end": 1619, "loc": { "start": { - "line": 58, + "line": 59, "column": 6 }, "end": { - "line": 58, + "line": 59, "column": 30 } }, @@ -2807,15 +2844,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1536, - "end": 1540, + "start": 1595, + "end": 1599, "loc": { "start": { - "line": 58, + "line": 59, "column": 6 }, "end": { - "line": 58, + "line": 59, "column": 10 }, "identifierName": "name" @@ -2824,43 +2861,43 @@ }, "value": { "type": "MemberExpression", - "start": 1542, - "end": 1560, + "start": 1601, + "end": 1619, "loc": { "start": { - "line": 58, + "line": 59, "column": 12 }, "end": { - "line": 58, + "line": 59, "column": 30 } }, "object": { "type": "MemberExpression", - "start": 1542, - "end": 1555, + "start": 1601, + "end": 1614, "loc": { "start": { - "line": 58, + "line": 59, "column": 12 }, "end": { - "line": 58, + "line": 59, "column": 25 } }, "object": { "type": "Identifier", - "start": 1542, - "end": 1548, + "start": 1601, + "end": 1607, "loc": { "start": { - "line": 58, + "line": 59, "column": 12 }, "end": { - "line": 58, + "line": 59, "column": 18 }, "identifierName": "CONFIG" @@ -2869,15 +2906,15 @@ }, "property": { "type": "Identifier", - "start": 1549, - "end": 1555, + "start": 1608, + "end": 1614, "loc": { "start": { - "line": 58, + "line": 59, "column": 19 }, "end": { - "line": 58, + "line": 59, "column": 25 }, "identifierName": "SERVER" @@ -2888,15 +2925,15 @@ }, "property": { "type": "Identifier", - "start": 1556, - "end": 1560, + "start": 1615, + "end": 1619, "loc": { "start": { - "line": 58, + "line": 59, "column": 26 }, "end": { - "line": 58, + "line": 59, "column": 30 }, "identifierName": "name" @@ -2908,15 +2945,15 @@ }, { "type": "ObjectProperty", - "start": 1568, - "end": 1592, + "start": 1627, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 60, "column": 6 }, "end": { - "line": 59, + "line": 60, "column": 30 } }, @@ -2925,15 +2962,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1568, - "end": 1572, + "start": 1627, + "end": 1631, "loc": { "start": { - "line": 59, + "line": 60, "column": 6 }, "end": { - "line": 59, + "line": 60, "column": 10 }, "identifierName": "host" @@ -2942,43 +2979,43 @@ }, "value": { "type": "MemberExpression", - "start": 1574, - "end": 1592, + "start": 1633, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 60, "column": 12 }, "end": { - "line": 59, + "line": 60, "column": 30 } }, "object": { "type": "MemberExpression", - "start": 1574, - "end": 1587, + "start": 1633, + "end": 1646, "loc": { "start": { - "line": 59, + "line": 60, "column": 12 }, "end": { - "line": 59, + "line": 60, "column": 25 } }, "object": { "type": "Identifier", - "start": 1574, - "end": 1580, + "start": 1633, + "end": 1639, "loc": { "start": { - "line": 59, + "line": 60, "column": 12 }, "end": { - "line": 59, + "line": 60, "column": 18 }, "identifierName": "CONFIG" @@ -2987,15 +3024,15 @@ }, "property": { "type": "Identifier", - "start": 1581, - "end": 1587, + "start": 1640, + "end": 1646, "loc": { "start": { - "line": 59, + "line": 60, "column": 19 }, "end": { - "line": 59, + "line": 60, "column": 25 }, "identifierName": "SERVER" @@ -3006,15 +3043,15 @@ }, "property": { "type": "Identifier", - "start": 1588, - "end": 1592, + "start": 1647, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 60, "column": 26 }, "end": { - "line": 59, + "line": 60, "column": 30 }, "identifierName": "host" @@ -3026,15 +3063,15 @@ }, { "type": "ObjectProperty", - "start": 1600, - "end": 1624, + "start": 1659, + "end": 1683, "loc": { "start": { - "line": 60, + "line": 61, "column": 6 }, "end": { - "line": 60, + "line": 61, "column": 30 } }, @@ -3043,15 +3080,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1600, - "end": 1604, + "start": 1659, + "end": 1663, "loc": { "start": { - "line": 60, + "line": 61, "column": 6 }, "end": { - "line": 60, + "line": 61, "column": 10 }, "identifierName": "port" @@ -3060,43 +3097,43 @@ }, "value": { "type": "MemberExpression", - "start": 1606, - "end": 1624, + "start": 1665, + "end": 1683, "loc": { "start": { - "line": 60, + "line": 61, "column": 12 }, "end": { - "line": 60, + "line": 61, "column": 30 } }, "object": { "type": "MemberExpression", - "start": 1606, - "end": 1619, + "start": 1665, + "end": 1678, "loc": { "start": { - "line": 60, + "line": 61, "column": 12 }, "end": { - "line": 60, + "line": 61, "column": 25 } }, "object": { "type": "Identifier", - "start": 1606, - "end": 1612, + "start": 1665, + "end": 1671, "loc": { "start": { - "line": 60, + "line": 61, "column": 12 }, "end": { - "line": 60, + "line": 61, "column": 18 }, "identifierName": "CONFIG" @@ -3105,15 +3142,15 @@ }, "property": { "type": "Identifier", - "start": 1613, - "end": 1619, + "start": 1672, + "end": 1678, "loc": { "start": { - "line": 60, + "line": 61, "column": 19 }, "end": { - "line": 60, + "line": 61, "column": 25 }, "identifierName": "SERVER" @@ -3124,15 +3161,15 @@ }, "property": { "type": "Identifier", - "start": 1620, - "end": 1624, + "start": 1679, + "end": 1683, "loc": { "start": { - "line": 60, + "line": 61, "column": 26 }, "end": { - "line": 60, + "line": 61, "column": 30 }, "identifierName": "port" @@ -3144,15 +3181,15 @@ }, { "type": "ObjectProperty", - "start": 1632, - "end": 1656, + "start": 1691, + "end": 1715, "loc": { "start": { - "line": 61, + "line": 62, "column": 6 }, "end": { - "line": 61, + "line": 62, "column": 30 } }, @@ -3161,15 +3198,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1632, - "end": 1637, + "start": 1691, + "end": 1696, "loc": { "start": { - "line": 61, + "line": 62, "column": 6 }, "end": { - "line": 61, + "line": 62, "column": 11 }, "identifierName": "debug" @@ -3178,43 +3215,43 @@ }, "value": { "type": "MemberExpression", - "start": 1639, - "end": 1656, + "start": 1698, + "end": 1715, "loc": { "start": { - "line": 61, + "line": 62, "column": 13 }, "end": { - "line": 61, + "line": 62, "column": 30 } }, "object": { "type": "MemberExpression", - "start": 1639, - "end": 1650, + "start": 1698, + "end": 1709, "loc": { "start": { - "line": 61, + "line": 62, "column": 13 }, "end": { - "line": 61, + "line": 62, "column": 24 } }, "object": { "type": "Identifier", - "start": 1639, - "end": 1645, + "start": 1698, + "end": 1704, "loc": { "start": { - "line": 61, + "line": 62, "column": 13 }, "end": { - "line": 61, + "line": 62, "column": 19 }, "identifierName": "CONFIG" @@ -3223,15 +3260,15 @@ }, "property": { "type": "Identifier", - "start": 1646, - "end": 1650, + "start": 1705, + "end": 1709, "loc": { "start": { - "line": 61, + "line": 62, "column": 20 }, "end": { - "line": 61, + "line": 62, "column": 24 }, "identifierName": "LOGS" @@ -3242,15 +3279,15 @@ }, "property": { "type": "Identifier", - "start": 1651, - "end": 1656, + "start": 1710, + "end": 1715, "loc": { "start": { - "line": 61, + "line": 62, "column": 25 }, "end": { - "line": 61, + "line": 62, "column": 30 }, "identifierName": "debug" @@ -3262,15 +3299,15 @@ }, { "type": "ObjectProperty", - "start": 1664, - "end": 1687, + "start": 1723, + "end": 1746, "loc": { "start": { - "line": 62, + "line": 63, "column": 6 }, "end": { - "line": 62, + "line": 63, "column": 29 } }, @@ -3279,15 +3316,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1664, - "end": 1670, + "start": 1723, + "end": 1729, "loc": { "start": { - "line": 62, + "line": 63, "column": 6 }, "end": { - "line": 62, + "line": 63, "column": 12 }, "identifierName": "logDir" @@ -3296,43 +3333,43 @@ }, "value": { "type": "MemberExpression", - "start": 1672, - "end": 1687, + "start": 1731, + "end": 1746, "loc": { "start": { - "line": 62, + "line": 63, "column": 14 }, "end": { - "line": 62, + "line": 63, "column": 29 } }, "object": { "type": "MemberExpression", - "start": 1672, - "end": 1683, + "start": 1731, + "end": 1742, "loc": { "start": { - "line": 62, + "line": 63, "column": 14 }, "end": { - "line": 62, + "line": 63, "column": 25 } }, "object": { "type": "Identifier", - "start": 1672, - "end": 1678, + "start": 1731, + "end": 1737, "loc": { "start": { - "line": 62, + "line": 63, "column": 14 }, "end": { - "line": 62, + "line": 63, "column": 20 }, "identifierName": "CONFIG" @@ -3341,15 +3378,15 @@ }, "property": { "type": "Identifier", - "start": 1679, - "end": 1683, + "start": 1738, + "end": 1742, "loc": { "start": { - "line": 62, + "line": 63, "column": 21 }, "end": { - "line": 62, + "line": 63, "column": 25 }, "identifierName": "LOGS" @@ -3360,15 +3397,15 @@ }, "property": { "type": "Identifier", - "start": 1684, - "end": 1687, + "start": 1743, + "end": 1746, "loc": { "start": { - "line": 62, + "line": 63, "column": 26 }, "end": { - "line": 62, + "line": 63, "column": 29 }, "identifierName": "dir" @@ -3380,15 +3417,15 @@ }, { "type": "ObjectProperty", - "start": 1695, - "end": 1722, + "start": 1754, + "end": 1781, "loc": { "start": { - "line": 63, + "line": 64, "column": 6 }, "end": { - "line": 63, + "line": 64, "column": 33 } }, @@ -3397,15 +3434,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 1695, - "end": 1703, + "start": 1754, + "end": 1762, "loc": { "start": { - "line": 63, + "line": 64, "column": 6 }, "end": { - "line": 63, + "line": 64, "column": 14 }, "identifierName": "logLevel" @@ -3414,43 +3451,43 @@ }, "value": { "type": "MemberExpression", - "start": 1705, - "end": 1722, + "start": 1764, + "end": 1781, "loc": { "start": { - "line": 63, + "line": 64, "column": 16 }, "end": { - "line": 63, + "line": 64, "column": 33 } }, "object": { "type": "MemberExpression", - "start": 1705, - "end": 1716, + "start": 1764, + "end": 1775, "loc": { "start": { - "line": 63, + "line": 64, "column": 16 }, "end": { - "line": 63, + "line": 64, "column": 27 } }, "object": { "type": "Identifier", - "start": 1705, - "end": 1711, + "start": 1764, + "end": 1770, "loc": { "start": { - "line": 63, + "line": 64, "column": 16 }, "end": { - "line": 63, + "line": 64, "column": 22 }, "identifierName": "CONFIG" @@ -3459,15 +3496,15 @@ }, "property": { "type": "Identifier", - "start": 1712, - "end": 1716, + "start": 1771, + "end": 1775, "loc": { "start": { - "line": 63, + "line": 64, "column": 23 }, "end": { - "line": 63, + "line": 64, "column": 27 }, "identifierName": "LOGS" @@ -3478,15 +3515,15 @@ }, "property": { "type": "Identifier", - "start": 1717, - "end": 1722, + "start": 1776, + "end": 1781, "loc": { "start": { - "line": 63, + "line": 64, "column": 28 }, "end": { - "line": 63, + "line": 64, "column": 33 }, "identifierName": "level" @@ -3508,71 +3545,71 @@ }, { "type": "ExpressionStatement", - "start": 1736, - "end": 1755, + "start": 1795, + "end": 1814, "loc": { "start": { - "line": 66, + "line": 67, "column": 4 }, "end": { - "line": 66, + "line": 67, "column": 23 } }, "expression": { "type": "AwaitExpression", - "start": 1736, - "end": 1754, + "start": 1795, + "end": 1813, "loc": { "start": { - "line": 66, + "line": 67, "column": 4 }, "end": { - "line": 66, + "line": 67, "column": 22 } }, "argument": { "type": "CallExpression", - "start": 1742, - "end": 1754, + "start": 1801, + "end": 1813, "loc": { "start": { - "line": 66, + "line": 67, "column": 10 }, "end": { - "line": 66, + "line": 67, "column": 22 } }, "callee": { "type": "MemberExpression", - "start": 1742, - "end": 1752, + "start": 1801, + "end": 1811, "loc": { "start": { - "line": 66, + "line": 67, "column": 10 }, "end": { - "line": 66, + "line": 67, "column": 20 } }, "object": { "type": "Identifier", - "start": 1742, - "end": 1748, + "start": 1801, + "end": 1807, "loc": { "start": { - "line": 66, + "line": 67, "column": 10 }, "end": { - "line": 66, + "line": 67, "column": 16 }, "identifierName": "server" @@ -3581,15 +3618,15 @@ }, "property": { "type": "Identifier", - "start": 1749, - "end": 1752, + "start": 1808, + "end": 1811, "loc": { "start": { - "line": 66, + "line": 67, "column": 17 }, "end": { - "line": 66, + "line": 67, "column": 20 }, "identifierName": "run" @@ -3604,57 +3641,57 @@ }, { "type": "ExpressionStatement", - "start": 1761, - "end": 1792, + "start": 1820, + "end": 1851, "loc": { "start": { - "line": 68, + "line": 69, "column": 4 }, "end": { - "line": 68, + "line": 69, "column": 35 } }, "expression": { "type": "CallExpression", - "start": 1761, - "end": 1791, + "start": 1820, + "end": 1850, "loc": { "start": { - "line": 68, + "line": 69, "column": 4 }, "end": { - "line": 68, + "line": 69, "column": 34 } }, "callee": { "type": "MemberExpression", - "start": 1761, - "end": 1780, + "start": 1820, + "end": 1839, "loc": { "start": { - "line": 68, + "line": 69, "column": 4 }, "end": { - "line": 68, + "line": 69, "column": 23 } }, "object": { "type": "Identifier", - "start": 1761, - "end": 1767, + "start": 1820, + "end": 1826, "loc": { "start": { - "line": 68, + "line": 69, "column": 4 }, "end": { - "line": 68, + "line": 69, "column": 10 }, "identifierName": "server" @@ -3663,15 +3700,15 @@ }, "property": { "type": "Identifier", - "start": 1768, - "end": 1780, + "start": 1827, + "end": 1839, "loc": { "start": { - "line": 68, + "line": 69, "column": 11 }, "end": { - "line": 68, + "line": 69, "column": 23 }, "identifierName": "addEndpoints" @@ -3683,15 +3720,15 @@ "arguments": [ { "type": "Identifier", - "start": 1781, - "end": 1790, + "start": 1840, + "end": 1849, "loc": { "start": { - "line": 68, + "line": 69, "column": 24 }, "end": { - "line": 68, + "line": 69, "column": 33 }, "identifierName": "apiRoutes" @@ -3703,57 +3740,57 @@ }, { "type": "ExpressionStatement", - "start": 1797, - "end": 1830, + "start": 1856, + "end": 1889, "loc": { "start": { - "line": 69, + "line": 70, "column": 4 }, "end": { - "line": 69, + "line": 70, "column": 37 } }, "expression": { "type": "CallExpression", - "start": 1797, - "end": 1829, + "start": 1856, + "end": 1888, "loc": { "start": { - "line": 69, + "line": 70, "column": 4 }, "end": { - "line": 69, + "line": 70, "column": 36 } }, "callee": { "type": "MemberExpression", - "start": 1797, - "end": 1816, + "start": 1856, + "end": 1875, "loc": { "start": { - "line": 69, + "line": 70, "column": 4 }, "end": { - "line": 69, + "line": 70, "column": 23 } }, "object": { "type": "Identifier", - "start": 1797, - "end": 1803, + "start": 1856, + "end": 1862, "loc": { "start": { - "line": 69, + "line": 70, "column": 4 }, "end": { - "line": 69, + "line": 70, "column": 10 }, "identifierName": "server" @@ -3762,15 +3799,15 @@ }, "property": { "type": "Identifier", - "start": 1804, - "end": 1816, + "start": 1863, + "end": 1875, "loc": { "start": { - "line": 69, + "line": 70, "column": 11 }, "end": { - "line": 69, + "line": 70, "column": 23 }, "identifierName": "addEndpoints" @@ -3782,15 +3819,15 @@ "arguments": [ { "type": "Identifier", - "start": 1817, - "end": 1828, + "start": 1876, + "end": 1887, "loc": { "start": { - "line": 69, + "line": 70, "column": 24 }, "end": { - "line": 69, + "line": 70, "column": 35 }, "identifierName": "adminRoutes" @@ -3802,57 +3839,57 @@ }, { "type": "IfStatement", - "start": 1836, - "end": 1905, + "start": 1895, + "end": 1964, "loc": { "start": { - "line": 71, + "line": 72, "column": 4 }, "end": { - "line": 73, + "line": 74, "column": 5 } }, "test": { "type": "MemberExpression", - "start": 1840, - "end": 1858, + "start": 1899, + "end": 1917, "loc": { "start": { - "line": 71, + "line": 72, "column": 8 }, "end": { - "line": 71, + "line": 72, "column": 26 } }, "object": { "type": "MemberExpression", - "start": 1840, - "end": 1853, + "start": 1899, + "end": 1912, "loc": { "start": { - "line": 71, + "line": 72, "column": 8 }, "end": { - "line": 71, + "line": 72, "column": 21 } }, "object": { "type": "Identifier", - "start": 1840, - "end": 1846, + "start": 1899, + "end": 1905, "loc": { "start": { - "line": 71, + "line": 72, "column": 8 }, "end": { - "line": 71, + "line": 72, "column": 14 }, "identifierName": "CONFIG" @@ -3861,15 +3898,15 @@ }, "property": { "type": "Identifier", - "start": 1847, - "end": 1853, + "start": 1906, + "end": 1912, "loc": { "start": { - "line": 71, + "line": 72, "column": 15 }, "end": { - "line": 71, + "line": 72, "column": 21 }, "identifierName": "SERVER" @@ -3880,15 +3917,15 @@ }, "property": { "type": "Identifier", - "start": 1854, - "end": 1858, + "start": 1913, + "end": 1917, "loc": { "start": { - "line": 71, + "line": 72, "column": 22 }, "end": { - "line": 71, + "line": 72, "column": 26 }, "identifierName": "docs" @@ -3899,72 +3936,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 1860, - "end": 1905, + "start": 1919, + "end": 1964, "loc": { "start": { - "line": 71, + "line": 72, "column": 28 }, "end": { - "line": 73, + "line": 74, "column": 5 } }, "body": [ { "type": "ExpressionStatement", - "start": 1868, - "end": 1899, + "start": 1927, + "end": 1958, "loc": { "start": { - "line": 72, + "line": 73, "column": 6 }, "end": { - "line": 72, + "line": 73, "column": 37 } }, "expression": { "type": "CallExpression", - "start": 1868, - "end": 1898, + "start": 1927, + "end": 1957, "loc": { "start": { - "line": 72, + "line": 73, "column": 6 }, "end": { - "line": 72, + "line": 73, "column": 36 } }, "callee": { "type": "MemberExpression", - "start": 1868, - "end": 1887, + "start": 1927, + "end": 1946, "loc": { "start": { - "line": 72, + "line": 73, "column": 6 }, "end": { - "line": 72, + "line": 73, "column": 25 } }, "object": { "type": "Identifier", - "start": 1868, - "end": 1874, + "start": 1927, + "end": 1933, "loc": { "start": { - "line": 72, + "line": 73, "column": 6 }, "end": { - "line": 72, + "line": 73, "column": 12 }, "identifierName": "server" @@ -3973,15 +4010,15 @@ }, "property": { "type": "Identifier", - "start": 1875, - "end": 1887, + "start": 1934, + "end": 1946, "loc": { "start": { - "line": 72, + "line": 73, "column": 13 }, "end": { - "line": 72, + "line": 73, "column": 25 }, "identifierName": "addEndpoints" @@ -3993,15 +4030,15 @@ "arguments": [ { "type": "Identifier", - "start": 1888, - "end": 1897, + "start": 1947, + "end": 1956, "loc": { "start": { - "line": 72, + "line": 73, "column": 26 }, "end": { - "line": 72, + "line": 73, "column": 35 }, "identifierName": "docRoutes" @@ -4018,57 +4055,57 @@ }, { "type": "ExpressionStatement", - "start": 1911, - "end": 1987, + "start": 1970, + "end": 2046, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 77, + "line": 78, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 1911, - "end": 1986, + "start": 1970, + "end": 2045, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 77, + "line": 78, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 1911, - "end": 1921, + "start": 1970, + "end": 1980, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 14 } }, "object": { "type": "Identifier", - "start": 1911, - "end": 1918, + "start": 1970, + "end": 1977, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 11 }, "identifierName": "process" @@ -4077,15 +4114,15 @@ }, "property": { "type": "Identifier", - "start": 1919, - "end": 1921, + "start": 1978, + "end": 1980, "loc": { "start": { - "line": 75, + "line": 76, "column": 12 }, "end": { - "line": 75, + "line": 76, "column": 14 }, "identifierName": "on" @@ -4097,15 +4134,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 1922, - "end": 1931, + "start": 1981, + "end": 1990, "loc": { "start": { - "line": 75, + "line": 76, "column": 15 }, "end": { - "line": 75, + "line": 76, "column": 24 } }, @@ -4117,15 +4154,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 1933, - "end": 1985, + "start": 1992, + "end": 2044, "loc": { "start": { - "line": 75, + "line": 76, "column": 26 }, "end": { - "line": 77, + "line": 78, "column": 5 } }, @@ -4136,58 +4173,58 @@ "params": [], "body": { "type": "BlockStatement", - "start": 1939, - "end": 1985, + "start": 1998, + "end": 2044, "loc": { "start": { - "line": 75, + "line": 76, "column": 32 }, "end": { - "line": 77, + "line": 78, "column": 5 } }, "body": [ { "type": "ExpressionStatement", - "start": 1947, - "end": 1979, + "start": 2006, + "end": 2038, "loc": { "start": { - "line": 76, + "line": 77, "column": 6 }, "end": { - "line": 76, + "line": 77, "column": 38 } }, "expression": { "type": "CallExpression", - "start": 1947, - "end": 1978, + "start": 2006, + "end": 2037, "loc": { "start": { - "line": 76, + "line": 77, "column": 6 }, "end": { - "line": 76, + "line": 77, "column": 37 } }, "callee": { "type": "Identifier", - "start": 1947, - "end": 1970, + "start": 2006, + "end": 2029, "loc": { "start": { - "line": 76, + "line": 77, "column": 6 }, "end": { - "line": 76, + "line": 77, "column": 29 }, "identifierName": "attemptGracefulShutdown" @@ -4197,15 +4234,15 @@ "arguments": [ { "type": "Identifier", - "start": 1971, - "end": 1977, + "start": 2030, + "end": 2036, "loc": { "start": { - "line": 76, + "line": 77, "column": 30 }, "end": { - "line": 76, + "line": 77, "column": 36 }, "identifierName": "server" @@ -4224,57 +4261,57 @@ }, { "type": "ExpressionStatement", - "start": 1992, - "end": 2090, + "start": 2051, + "end": 2149, "loc": { "start": { - "line": 78, + "line": 79, "column": 4 }, "end": { - "line": 81, + "line": 82, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 1992, - "end": 2089, + "start": 2051, + "end": 2148, "loc": { "start": { - "line": 78, + "line": 79, "column": 4 }, "end": { - "line": 81, + "line": 82, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 1992, - "end": 2002, + "start": 2051, + "end": 2061, "loc": { "start": { - "line": 78, + "line": 79, "column": 4 }, "end": { - "line": 78, + "line": 79, "column": 14 } }, "object": { "type": "Identifier", - "start": 1992, - "end": 1999, + "start": 2051, + "end": 2058, "loc": { "start": { - "line": 78, + "line": 79, "column": 4 }, "end": { - "line": 78, + "line": 79, "column": 11 }, "identifierName": "process" @@ -4283,15 +4320,15 @@ }, "property": { "type": "Identifier", - "start": 2000, - "end": 2002, + "start": 2059, + "end": 2061, "loc": { "start": { - "line": 78, + "line": 79, "column": 12 }, "end": { - "line": 78, + "line": 79, "column": 14 }, "identifierName": "on" @@ -4303,15 +4340,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 2003, - "end": 2012, + "start": 2062, + "end": 2071, "loc": { "start": { - "line": 78, + "line": 79, "column": 15 }, "end": { - "line": 78, + "line": 79, "column": 24 } }, @@ -4323,15 +4360,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 2014, - "end": 2088, + "start": 2073, + "end": 2147, "loc": { "start": { - "line": 78, + "line": 79, "column": 26 }, "end": { - "line": 81, + "line": 82, "column": 5 } }, @@ -4342,58 +4379,58 @@ "params": [], "body": { "type": "BlockStatement", - "start": 2020, - "end": 2088, + "start": 2079, + "end": 2147, "loc": { "start": { - "line": 78, + "line": 79, "column": 32 }, "end": { - "line": 81, + "line": 82, "column": 5 } }, "body": [ { "type": "ExpressionStatement", - "start": 2050, - "end": 2082, + "start": 2109, + "end": 2141, "loc": { "start": { - "line": 80, + "line": 81, "column": 6 }, "end": { - "line": 80, + "line": 81, "column": 38 } }, "expression": { "type": "CallExpression", - "start": 2050, - "end": 2081, + "start": 2109, + "end": 2140, "loc": { "start": { - "line": 80, + "line": 81, "column": 6 }, "end": { - "line": 80, + "line": 81, "column": 37 } }, "callee": { "type": "Identifier", - "start": 2050, - "end": 2073, + "start": 2109, + "end": 2132, "loc": { "start": { - "line": 80, + "line": 81, "column": 6 }, "end": { - "line": 80, + "line": 81, "column": 29 }, "identifierName": "attemptGracefulShutdown" @@ -4404,15 +4441,15 @@ "arguments": [ { "type": "Identifier", - "start": 2074, - "end": 2080, + "start": 2133, + "end": 2139, "loc": { "start": { - "line": 80, + "line": 81, "column": 30 }, "end": { - "line": 80, + "line": 81, "column": 36 }, "identifierName": "server" @@ -4426,15 +4463,15 @@ { "type": "CommentLine", "value": " For nodemon?", - "start": 2028, - "end": 2043, + "start": 2087, + "end": 2102, "loc": { "start": { - "line": 79, + "line": 80, "column": 6 }, "end": { - "line": 79, + "line": 80, "column": 21 } } @@ -4450,57 +4487,57 @@ }, { "type": "ExpressionStatement", - "start": 2096, - "end": 2163, + "start": 2155, + "end": 2222, "loc": { "start": { - "line": 83, + "line": 84, "column": 4 }, "end": { - "line": 83, + "line": 84, "column": 71 } }, "expression": { "type": "CallExpression", - "start": 2096, - "end": 2162, + "start": 2155, + "end": 2221, "loc": { "start": { - "line": 83, + "line": 84, "column": 4 }, "end": { - "line": 83, + "line": 84, "column": 70 } }, "callee": { "type": "MemberExpression", - "start": 2096, - "end": 2106, + "start": 2155, + "end": 2165, "loc": { "start": { - "line": 83, + "line": 84, "column": 4 }, "end": { - "line": 83, + "line": 84, "column": 14 } }, "object": { "type": "Identifier", - "start": 2096, - "end": 2102, + "start": 2155, + "end": 2161, "loc": { "start": { - "line": 83, + "line": 84, "column": 4 }, "end": { - "line": 83, + "line": 84, "column": 10 }, "identifierName": "server" @@ -4509,15 +4546,15 @@ }, "property": { "type": "Identifier", - "start": 2103, - "end": 2106, + "start": 2162, + "end": 2165, "loc": { "start": { - "line": 83, + "line": 84, "column": 11 }, "end": { - "line": 83, + "line": 84, "column": 14 }, "identifierName": "log" @@ -4529,30 +4566,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 2107, - "end": 2161, + "start": 2166, + "end": 2220, "loc": { "start": { - "line": 83, + "line": 84, "column": 15 }, "end": { - "line": 83, + "line": 84, "column": 69 } }, "properties": [ { "type": "ObjectProperty", - "start": 2109, - "end": 2126, + "start": 2168, + "end": 2185, "loc": { "start": { - "line": 83, + "line": 84, "column": 17 }, "end": { - "line": 83, + "line": 84, "column": 34 } }, @@ -4561,15 +4598,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2109, - "end": 2113, + "start": 2168, + "end": 2172, "loc": { "start": { - "line": 83, + "line": 84, "column": 17 }, "end": { - "line": 83, + "line": 84, "column": 21 }, "identifierName": "tags" @@ -4578,30 +4615,30 @@ }, "value": { "type": "ArrayExpression", - "start": 2115, - "end": 2126, + "start": 2174, + "end": 2185, "loc": { "start": { - "line": 83, + "line": 84, "column": 23 }, "end": { - "line": 83, + "line": 84, "column": 34 } }, "elements": [ { "type": "StringLiteral", - "start": 2116, - "end": 2125, + "start": 2175, + "end": 2184, "loc": { "start": { - "line": 83, + "line": 84, "column": 24 }, "end": { - "line": 83, + "line": 84, "column": 33 } }, @@ -4616,15 +4653,15 @@ }, { "type": "ObjectProperty", - "start": 2128, - "end": 2159, + "start": 2187, + "end": 2218, "loc": { "start": { - "line": 83, + "line": 84, "column": 36 }, "end": { - "line": 83, + "line": 84, "column": 67 } }, @@ -4633,15 +4670,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2128, - "end": 2132, + "start": 2187, + "end": 2191, "loc": { "start": { - "line": 83, + "line": 84, "column": 36 }, "end": { - "line": 83, + "line": 84, "column": 40 }, "identifierName": "data" @@ -4650,15 +4687,15 @@ }, "value": { "type": "StringLiteral", - "start": 2134, - "end": 2159, + "start": 2193, + "end": 2218, "loc": { "start": { - "line": 83, + "line": 84, "column": 42 }, "end": { - "line": 83, + "line": 84, "column": 67 } }, @@ -4680,29 +4717,29 @@ }, "handler": { "type": "CatchClause", - "start": 2168, - "end": 2397, + "start": 2227, + "end": 2456, "loc": { "start": { - "line": 84, + "line": 85, "column": 4 }, "end": { - "line": 89, + "line": 90, "column": 3 } }, "param": { "type": "Identifier", - "start": 2175, - "end": 2178, + "start": 2234, + "end": 2237, "loc": { "start": { - "line": 84, + "line": 85, "column": 11 }, "end": { - "line": 84, + "line": 85, "column": 14 }, "identifierName": "err" @@ -4711,86 +4748,86 @@ }, "body": { "type": "BlockStatement", - "start": 2180, - "end": 2397, + "start": 2239, + "end": 2456, "loc": { "start": { - "line": 84, + "line": 85, "column": 16 }, "end": { - "line": 89, + "line": 90, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2265, - "end": 2371, + "start": 2324, + "end": 2430, "loc": { "start": { - "line": 86, + "line": 87, "column": 4 }, "end": { - "line": 86, + "line": 87, "column": 110 } }, "expression": { "type": "CallExpression", - "start": 2265, - "end": 2370, + "start": 2324, + "end": 2429, "loc": { "start": { - "line": 86, + "line": 87, "column": 4 }, "end": { - "line": 86, + "line": 87, "column": 109 } }, "callee": { "type": "MemberExpression", - "start": 2265, - "end": 2285, + "start": 2324, + "end": 2344, "loc": { "start": { - "line": 86, + "line": 87, "column": 4 }, "end": { - "line": 86, + "line": 87, "column": 24 } }, "object": { "type": "MemberExpression", - "start": 2265, - "end": 2279, + "start": 2324, + "end": 2338, "loc": { "start": { - "line": 86, + "line": 87, "column": 4 }, "end": { - "line": 86, + "line": 87, "column": 18 } }, "object": { "type": "Identifier", - "start": 2265, - "end": 2272, + "start": 2324, + "end": 2331, "loc": { "start": { - "line": 86, + "line": 87, "column": 4 }, "end": { - "line": 86, + "line": 87, "column": 11 }, "identifierName": "process" @@ -4800,15 +4837,15 @@ }, "property": { "type": "Identifier", - "start": 2273, - "end": 2279, + "start": 2332, + "end": 2338, "loc": { "start": { - "line": 86, + "line": 87, "column": 12 }, "end": { - "line": 86, + "line": 87, "column": 18 }, "identifierName": "stdout" @@ -4820,15 +4857,15 @@ }, "property": { "type": "Identifier", - "start": 2280, - "end": 2285, + "start": 2339, + "end": 2344, "loc": { "start": { - "line": 86, + "line": 87, "column": 19 }, "end": { - "line": 86, + "line": 87, "column": 24 }, "identifierName": "write" @@ -4841,15 +4878,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 2286, - "end": 2369, + "start": 2345, + "end": 2428, "loc": { "start": { - "line": 86, + "line": 87, "column": 25 }, "end": { - "line": 86, + "line": 87, "column": 108 } }, @@ -4866,15 +4903,15 @@ { "type": "CommentLine", "value": " Likely caused by \"bad\" endpoint (empty/ duplicate paths/ no controller)", - "start": 2186, - "end": 2260, + "start": 2245, + "end": 2319, "loc": { "start": { - "line": 85, + "line": 86, "column": 4 }, "end": { - "line": 85, + "line": 86, "column": 78 } } @@ -4883,57 +4920,57 @@ }, { "type": "ExpressionStatement", - "start": 2377, - "end": 2393, + "start": 2436, + "end": 2452, "loc": { "start": { - "line": 88, + "line": 89, "column": 4 }, "end": { - "line": 88, + "line": 89, "column": 20 } }, "expression": { "type": "CallExpression", - "start": 2377, - "end": 2392, + "start": 2436, + "end": 2451, "loc": { "start": { - "line": 88, + "line": 89, "column": 4 }, "end": { - "line": 88, + "line": 89, "column": 19 } }, "callee": { "type": "MemberExpression", - "start": 2377, - "end": 2389, + "start": 2436, + "end": 2448, "loc": { "start": { - "line": 88, + "line": 89, "column": 4 }, "end": { - "line": 88, + "line": 89, "column": 16 } }, "object": { "type": "Identifier", - "start": 2377, - "end": 2384, + "start": 2436, + "end": 2443, "loc": { "start": { - "line": 88, + "line": 89, "column": 4 }, "end": { - "line": 88, + "line": 89, "column": 11 }, "identifierName": "process" @@ -4942,15 +4979,15 @@ }, "property": { "type": "Identifier", - "start": 2385, - "end": 2389, + "start": 2444, + "end": 2448, "loc": { "start": { - "line": 88, + "line": 89, "column": 12 }, "end": { - "line": 88, + "line": 89, "column": 16 }, "identifierName": "exit" @@ -4962,15 +4999,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 2390, - "end": 2391, + "start": 2449, + "end": 2450, "loc": { "start": { - "line": 88, + "line": 89, "column": 17 }, "end": { - "line": 88, + "line": 89, "column": 18 } }, @@ -4993,15 +5030,15 @@ { "type": "CommentLine", "value": " TODO: Check if mysql can be connected/db exists (use name in config file)", - "start": 1413, - "end": 1489, + "start": 1472, + "end": 1548, "loc": { "start": { - "line": 55, + "line": 56, "column": 2 }, "end": { - "line": 55, + "line": 56, "column": 78 } } @@ -5015,15 +5052,15 @@ { "type": "CommentBlock", "value": "*\n * Entry point to run the server\n * @return {undefined} no return\n ", - "start": 1297, - "end": 1370, + "start": 1356, + "end": 1429, "loc": { "start": { - "line": 50, + "line": 51, "column": 0 }, "end": { - "line": 53, + "line": 54, "column": 3 } } @@ -5031,7 +5068,7 @@ ], "extra": { "parenthesized": true, - "parenStart": 1386 + "parenStart": 1445 }, "trailingComments": [] }, @@ -5039,15 +5076,15 @@ { "type": "CommentBlock", "value": "*\n * Entry point to run the server\n * @return {undefined} no return\n ", - "start": 1297, - "end": 1370, + "start": 1356, + "end": 1429, "loc": { "start": { - "line": 50, + "line": 51, "column": 0 }, "end": { - "line": 53, + "line": 54, "column": 3 } } @@ -5056,43 +5093,43 @@ }, { "type": "ExpressionStatement", - "start": 2402, - "end": 2409, + "start": 2461, + "end": 2468, "loc": { "start": { - "line": 91, + "line": 92, "column": 0 }, "end": { - "line": 91, + "line": 92, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 2402, - "end": 2408, + "start": 2461, + "end": 2467, "loc": { "start": { - "line": 91, + "line": 92, "column": 0 }, "end": { - "line": 91, + "line": 92, "column": 6 } }, "callee": { "type": "Identifier", - "start": 2402, - "end": 2406, + "start": 2461, + "end": 2465, "loc": { "start": { - "line": 91, + "line": 92, "column": 0 }, "end": { - "line": 91, + "line": 92, "column": 4 }, "identifierName": "main" @@ -5105,15 +5142,15 @@ { "type": "CommentBlock", "value": "*\n * Attempt to shutdown the server and database connections\n * @param {Server} server Server Object to be shutdown\n * @return {undefined} undefined\n ", - "start": 2411, - "end": 2573, + "start": 2470, + "end": 2632, "loc": { "start": { - "line": 93, + "line": 94, "column": 0 }, "end": { - "line": 97, + "line": 98, "column": 3 } } @@ -5122,29 +5159,29 @@ }, { "type": "FunctionDeclaration", - "start": 2574, - "end": 2943, + "start": 2633, + "end": 3002, "loc": { "start": { - "line": 98, + "line": 99, "column": 0 }, "end": { - "line": 108, + "line": 109, "column": 1 } }, "id": { "type": "Identifier", - "start": 2583, - "end": 2606, + "start": 2642, + "end": 2665, "loc": { "start": { - "line": 98, + "line": 99, "column": 9 }, "end": { - "line": 98, + "line": 99, "column": 32 }, "identifierName": "attemptGracefulShutdown" @@ -5158,15 +5195,15 @@ "params": [ { "type": "Identifier", - "start": 2607, - "end": 2613, + "start": 2666, + "end": 2672, "loc": { "start": { - "line": 98, + "line": 99, "column": 33 }, "end": { - "line": 98, + "line": 99, "column": 39 }, "identifierName": "server" @@ -5176,72 +5213,72 @@ ], "body": { "type": "BlockStatement", - "start": 2615, - "end": 2943, + "start": 2674, + "end": 3002, "loc": { "start": { - "line": 98, + "line": 99, "column": 41 }, "end": { - "line": 108, + "line": 109, "column": 1 } }, "body": [ { "type": "ExpressionStatement", - "start": 2619, - "end": 2679, + "start": 2678, + "end": 2738, "loc": { "start": { - "line": 99, + "line": 100, "column": 2 }, "end": { - "line": 99, + "line": 100, "column": 62 } }, "expression": { "type": "CallExpression", - "start": 2619, - "end": 2678, + "start": 2678, + "end": 2737, "loc": { "start": { - "line": 99, + "line": 100, "column": 2 }, "end": { - "line": 99, + "line": 100, "column": 61 } }, "callee": { "type": "MemberExpression", - "start": 2619, - "end": 2629, + "start": 2678, + "end": 2688, "loc": { "start": { - "line": 99, + "line": 100, "column": 2 }, "end": { - "line": 99, + "line": 100, "column": 12 } }, "object": { "type": "Identifier", - "start": 2619, - "end": 2625, + "start": 2678, + "end": 2684, "loc": { "start": { - "line": 99, + "line": 100, "column": 2 }, "end": { - "line": 99, + "line": 100, "column": 8 }, "identifierName": "server" @@ -5250,15 +5287,15 @@ }, "property": { "type": "Identifier", - "start": 2626, - "end": 2629, + "start": 2685, + "end": 2688, "loc": { "start": { - "line": 99, + "line": 100, "column": 9 }, "end": { - "line": 99, + "line": 100, "column": 12 }, "identifierName": "log" @@ -5270,30 +5307,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 2630, - "end": 2677, + "start": 2689, + "end": 2736, "loc": { "start": { - "line": 99, + "line": 100, "column": 13 }, "end": { - "line": 99, + "line": 100, "column": 60 } }, "properties": [ { "type": "ObjectProperty", - "start": 2632, - "end": 2650, + "start": 2691, + "end": 2709, "loc": { "start": { - "line": 99, + "line": 100, "column": 15 }, "end": { - "line": 99, + "line": 100, "column": 33 } }, @@ -5302,15 +5339,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2632, - "end": 2636, + "start": 2691, + "end": 2695, "loc": { "start": { - "line": 99, + "line": 100, "column": 15 }, "end": { - "line": 99, + "line": 100, "column": 19 }, "identifierName": "tags" @@ -5319,30 +5356,30 @@ }, "value": { "type": "ArrayExpression", - "start": 2638, - "end": 2650, + "start": 2697, + "end": 2709, "loc": { "start": { - "line": 99, + "line": 100, "column": 21 }, "end": { - "line": 99, + "line": 100, "column": 33 } }, "elements": [ { "type": "StringLiteral", - "start": 2639, - "end": 2649, + "start": 2698, + "end": 2708, "loc": { "start": { - "line": 99, + "line": 100, "column": 22 }, "end": { - "line": 99, + "line": 100, "column": 32 } }, @@ -5357,15 +5394,15 @@ }, { "type": "ObjectProperty", - "start": 2652, - "end": 2675, + "start": 2711, + "end": 2734, "loc": { "start": { - "line": 99, + "line": 100, "column": 35 }, "end": { - "line": 99, + "line": 100, "column": 58 } }, @@ -5374,15 +5411,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2652, - "end": 2656, + "start": 2711, + "end": 2715, "loc": { "start": { - "line": 99, + "line": 100, "column": 35 }, "end": { - "line": 99, + "line": 100, "column": 39 }, "identifierName": "data" @@ -5391,15 +5428,15 @@ }, "value": { "type": "StringLiteral", - "start": 2658, - "end": 2675, + "start": 2717, + "end": 2734, "loc": { "start": { - "line": 99, + "line": 100, "column": 41 }, "end": { - "line": 99, + "line": 100, "column": 58 } }, @@ -5417,57 +5454,57 @@ }, { "type": "ExpressionStatement", - "start": 2682, - "end": 2941, + "start": 2741, + "end": 3000, "loc": { "start": { - "line": 100, + "line": 101, "column": 2 }, "end": { - "line": 107, + "line": 108, "column": 5 } }, "expression": { "type": "CallExpression", - "start": 2682, - "end": 2940, + "start": 2741, + "end": 2999, "loc": { "start": { - "line": 100, + "line": 101, "column": 2 }, "end": { - "line": 107, + "line": 108, "column": 4 } }, "callee": { "type": "MemberExpression", - "start": 2682, - "end": 2697, + "start": 2741, + "end": 2756, "loc": { "start": { - "line": 100, + "line": 101, "column": 2 }, "end": { - "line": 100, + "line": 101, "column": 17 } }, "object": { "type": "Identifier", - "start": 2682, - "end": 2688, + "start": 2741, + "end": 2747, "loc": { "start": { - "line": 100, + "line": 101, "column": 2 }, "end": { - "line": 100, + "line": 101, "column": 8 }, "identifierName": "server" @@ -5476,15 +5513,15 @@ }, "property": { "type": "Identifier", - "start": 2689, - "end": 2697, + "start": 2748, + "end": 2756, "loc": { "start": { - "line": 100, + "line": 101, "column": 9 }, "end": { - "line": 100, + "line": 101, "column": 17 }, "identifierName": "shutdown" @@ -5496,15 +5533,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 2698, - "end": 2939, + "start": 2757, + "end": 2998, "loc": { "start": { - "line": 100, + "line": 101, "column": 18 }, "end": { - "line": 107, + "line": 108, "column": 3 } }, @@ -5515,15 +5552,15 @@ "params": [ { "type": "Identifier", - "start": 2698, - "end": 2705, + "start": 2757, + "end": 2764, "loc": { "start": { - "line": 100, + "line": 101, "column": 18 }, "end": { - "line": 100, + "line": 101, "column": 25 }, "identifierName": "hapiErr" @@ -5533,72 +5570,72 @@ ], "body": { "type": "BlockStatement", - "start": 2709, - "end": 2939, + "start": 2768, + "end": 2998, "loc": { "start": { - "line": 100, + "line": 101, "column": 29 }, "end": { - "line": 107, + "line": 108, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2715, - "end": 2780, + "start": 2774, + "end": 2839, "loc": { "start": { - "line": 101, + "line": 102, "column": 4 }, "end": { - "line": 101, + "line": 102, "column": 69 } }, "expression": { "type": "CallExpression", - "start": 2715, - "end": 2779, + "start": 2774, + "end": 2838, "loc": { "start": { - "line": 101, + "line": 102, "column": 4 }, "end": { - "line": 101, + "line": 102, "column": 68 } }, "callee": { "type": "MemberExpression", - "start": 2715, - "end": 2725, + "start": 2774, + "end": 2784, "loc": { "start": { - "line": 101, + "line": 102, "column": 4 }, "end": { - "line": 101, + "line": 102, "column": 14 } }, "object": { "type": "Identifier", - "start": 2715, - "end": 2721, + "start": 2774, + "end": 2780, "loc": { "start": { - "line": 101, + "line": 102, "column": 4 }, "end": { - "line": 101, + "line": 102, "column": 10 }, "identifierName": "server" @@ -5607,15 +5644,15 @@ }, "property": { "type": "Identifier", - "start": 2722, - "end": 2725, + "start": 2781, + "end": 2784, "loc": { "start": { - "line": 101, + "line": 102, "column": 11 }, "end": { - "line": 101, + "line": 102, "column": 14 }, "identifierName": "log" @@ -5627,30 +5664,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 2726, - "end": 2778, + "start": 2785, + "end": 2837, "loc": { "start": { - "line": 101, + "line": 102, "column": 15 }, "end": { - "line": 101, + "line": 102, "column": 67 } }, "properties": [ { "type": "ObjectProperty", - "start": 2728, - "end": 2746, + "start": 2787, + "end": 2805, "loc": { "start": { - "line": 101, + "line": 102, "column": 17 }, "end": { - "line": 101, + "line": 102, "column": 35 } }, @@ -5659,15 +5696,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2728, - "end": 2732, + "start": 2787, + "end": 2791, "loc": { "start": { - "line": 101, + "line": 102, "column": 17 }, "end": { - "line": 101, + "line": 102, "column": 21 }, "identifierName": "tags" @@ -5676,30 +5713,30 @@ }, "value": { "type": "ArrayExpression", - "start": 2734, - "end": 2746, + "start": 2793, + "end": 2805, "loc": { "start": { - "line": 101, + "line": 102, "column": 23 }, "end": { - "line": 101, + "line": 102, "column": 35 } }, "elements": [ { "type": "StringLiteral", - "start": 2735, - "end": 2745, + "start": 2794, + "end": 2804, "loc": { "start": { - "line": 101, + "line": 102, "column": 24 }, "end": { - "line": 101, + "line": 102, "column": 34 } }, @@ -5714,15 +5751,15 @@ }, { "type": "ObjectProperty", - "start": 2748, - "end": 2776, + "start": 2807, + "end": 2835, "loc": { "start": { - "line": 101, + "line": 102, "column": 37 }, "end": { - "line": 101, + "line": 102, "column": 65 } }, @@ -5731,15 +5768,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2748, - "end": 2752, + "start": 2807, + "end": 2811, "loc": { "start": { - "line": 101, + "line": 102, "column": 37 }, "end": { - "line": 101, + "line": 102, "column": 41 }, "identifierName": "data" @@ -5748,15 +5785,15 @@ }, "value": { "type": "StringLiteral", - "start": 2754, - "end": 2776, + "start": 2813, + "end": 2835, "loc": { "start": { - "line": 101, + "line": 102, "column": 43 }, "end": { - "line": 101, + "line": 102, "column": 65 } }, @@ -5774,57 +5811,57 @@ }, { "type": "ExpressionStatement", - "start": 2785, - "end": 2935, + "start": 2844, + "end": 2994, "loc": { "start": { - "line": 102, + "line": 103, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 2785, - "end": 2934, + "start": 2844, + "end": 2993, "loc": { "start": { - "line": 102, + "line": 103, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 2785, - "end": 2801, + "start": 2844, + "end": 2860, "loc": { "start": { - "line": 102, + "line": 103, "column": 4 }, "end": { - "line": 102, + "line": 103, "column": 20 } }, "object": { "type": "Identifier", - "start": 2785, - "end": 2792, + "start": 2844, + "end": 2851, "loc": { "start": { - "line": 102, + "line": 103, "column": 4 }, "end": { - "line": 102, + "line": 103, "column": 11 }, "identifierName": "mariadb" @@ -5833,15 +5870,15 @@ }, "property": { "type": "Identifier", - "start": 2793, - "end": 2801, + "start": 2852, + "end": 2860, "loc": { "start": { - "line": 102, + "line": 103, "column": 12 }, "end": { - "line": 102, + "line": 103, "column": 20 }, "identifierName": "shutdown" @@ -5853,15 +5890,15 @@ "arguments": [ { "type": "ArrowFunctionExpression", - "start": 2802, - "end": 2933, + "start": 2861, + "end": 2992, "loc": { "start": { - "line": 102, + "line": 103, "column": 21 }, "end": { - "line": 106, + "line": 107, "column": 5 } }, @@ -5872,15 +5909,15 @@ "params": [ { "type": "Identifier", - "start": 2802, - "end": 2807, + "start": 2861, + "end": 2866, "loc": { "start": { - "line": 102, + "line": 103, "column": 21 }, "end": { - "line": 102, + "line": 103, "column": 26 }, "identifierName": "dbErr" @@ -5890,72 +5927,72 @@ ], "body": { "type": "BlockStatement", - "start": 2811, - "end": 2933, + "start": 2870, + "end": 2992, "loc": { "start": { - "line": 102, + "line": 103, "column": 30 }, "end": { - "line": 106, + "line": 107, "column": 5 } }, "body": [ { "type": "ExpressionStatement", - "start": 2819, - "end": 2880, + "start": 2878, + "end": 2939, "loc": { "start": { - "line": 103, + "line": 104, "column": 6 }, "end": { - "line": 103, + "line": 104, "column": 67 } }, "expression": { "type": "CallExpression", - "start": 2819, - "end": 2879, + "start": 2878, + "end": 2938, "loc": { "start": { - "line": 103, + "line": 104, "column": 6 }, "end": { - "line": 103, + "line": 104, "column": 66 } }, "callee": { "type": "MemberExpression", - "start": 2819, - "end": 2829, + "start": 2878, + "end": 2888, "loc": { "start": { - "line": 103, + "line": 104, "column": 6 }, "end": { - "line": 103, + "line": 104, "column": 16 } }, "object": { "type": "Identifier", - "start": 2819, - "end": 2825, + "start": 2878, + "end": 2884, "loc": { "start": { - "line": 103, + "line": 104, "column": 6 }, "end": { - "line": 103, + "line": 104, "column": 12 }, "identifierName": "server" @@ -5964,15 +6001,15 @@ }, "property": { "type": "Identifier", - "start": 2826, - "end": 2829, + "start": 2885, + "end": 2888, "loc": { "start": { - "line": 103, + "line": 104, "column": 13 }, "end": { - "line": 103, + "line": 104, "column": 16 }, "identifierName": "log" @@ -5984,30 +6021,30 @@ "arguments": [ { "type": "ObjectExpression", - "start": 2830, - "end": 2878, + "start": 2889, + "end": 2937, "loc": { "start": { - "line": 103, + "line": 104, "column": 17 }, "end": { - "line": 103, + "line": 104, "column": 65 } }, "properties": [ { "type": "ObjectProperty", - "start": 2832, - "end": 2850, + "start": 2891, + "end": 2909, "loc": { "start": { - "line": 103, + "line": 104, "column": 19 }, "end": { - "line": 103, + "line": 104, "column": 37 } }, @@ -6016,15 +6053,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2832, - "end": 2836, + "start": 2891, + "end": 2895, "loc": { "start": { - "line": 103, + "line": 104, "column": 19 }, "end": { - "line": 103, + "line": 104, "column": 23 }, "identifierName": "tags" @@ -6033,30 +6070,30 @@ }, "value": { "type": "ArrayExpression", - "start": 2838, - "end": 2850, + "start": 2897, + "end": 2909, "loc": { "start": { - "line": 103, + "line": 104, "column": 25 }, "end": { - "line": 103, + "line": 104, "column": 37 } }, "elements": [ { "type": "StringLiteral", - "start": 2839, - "end": 2849, + "start": 2898, + "end": 2908, "loc": { "start": { - "line": 103, + "line": 104, "column": 26 }, "end": { - "line": 103, + "line": 104, "column": 36 } }, @@ -6071,15 +6108,15 @@ }, { "type": "ObjectProperty", - "start": 2852, - "end": 2876, + "start": 2911, + "end": 2935, "loc": { "start": { - "line": 103, + "line": 104, "column": 39 }, "end": { - "line": 103, + "line": 104, "column": 63 } }, @@ -6088,15 +6125,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2852, - "end": 2856, + "start": 2911, + "end": 2915, "loc": { "start": { - "line": 103, + "line": 104, "column": 39 }, "end": { - "line": 103, + "line": 104, "column": 43 }, "identifierName": "data" @@ -6105,15 +6142,15 @@ }, "value": { "type": "StringLiteral", - "start": 2858, - "end": 2876, + "start": 2917, + "end": 2935, "loc": { "start": { - "line": 103, + "line": 104, "column": 45 }, "end": { - "line": 103, + "line": 104, "column": 63 } }, @@ -6131,57 +6168,57 @@ }, { "type": "ExpressionStatement", - "start": 2888, - "end": 2927, + "start": 2947, + "end": 2986, "loc": { "start": { - "line": 105, + "line": 106, "column": 6 }, "end": { - "line": 105, + "line": 106, "column": 45 } }, "expression": { "type": "CallExpression", - "start": 2888, - "end": 2926, + "start": 2947, + "end": 2985, "loc": { "start": { - "line": 105, + "line": 106, "column": 6 }, "end": { - "line": 105, + "line": 106, "column": 44 } }, "callee": { "type": "MemberExpression", - "start": 2888, - "end": 2900, + "start": 2947, + "end": 2959, "loc": { "start": { - "line": 105, + "line": 106, "column": 6 }, "end": { - "line": 105, + "line": 106, "column": 18 } }, "object": { "type": "Identifier", - "start": 2888, - "end": 2895, + "start": 2947, + "end": 2954, "loc": { "start": { - "line": 105, + "line": 106, "column": 6 }, "end": { - "line": 105, + "line": 106, "column": 13 }, "identifierName": "process" @@ -6190,15 +6227,15 @@ }, "property": { "type": "Identifier", - "start": 2896, - "end": 2900, + "start": 2955, + "end": 2959, "loc": { "start": { - "line": 105, + "line": 106, "column": 14 }, "end": { - "line": 105, + "line": 106, "column": 18 }, "identifierName": "exit" @@ -6210,43 +6247,43 @@ "arguments": [ { "type": "ConditionalExpression", - "start": 2901, - "end": 2925, + "start": 2960, + "end": 2984, "loc": { "start": { - "line": 105, + "line": 106, "column": 19 }, "end": { - "line": 105, + "line": 106, "column": 43 } }, "test": { "type": "LogicalExpression", - "start": 2901, - "end": 2917, + "start": 2960, + "end": 2976, "loc": { "start": { - "line": 105, + "line": 106, "column": 19 }, "end": { - "line": 105, + "line": 106, "column": 35 } }, "left": { "type": "Identifier", - "start": 2901, - "end": 2908, + "start": 2960, + "end": 2967, "loc": { "start": { - "line": 105, + "line": 106, "column": 19 }, "end": { - "line": 105, + "line": 106, "column": 26 }, "identifierName": "hapiErr" @@ -6256,15 +6293,15 @@ "operator": "||", "right": { "type": "Identifier", - "start": 2912, - "end": 2917, + "start": 2971, + "end": 2976, "loc": { "start": { - "line": 105, + "line": 106, "column": 30 }, "end": { - "line": 105, + "line": 106, "column": 35 }, "identifierName": "dbErr" @@ -6274,15 +6311,15 @@ }, "consequent": { "type": "NumericLiteral", - "start": 2920, - "end": 2921, + "start": 2979, + "end": 2980, "loc": { "start": { - "line": 105, + "line": 106, "column": 38 }, "end": { - "line": 105, + "line": 106, "column": 39 } }, @@ -6294,15 +6331,15 @@ }, "alternate": { "type": "NumericLiteral", - "start": 2924, - "end": 2925, + "start": 2983, + "end": 2984, "loc": { "start": { - "line": 105, + "line": 106, "column": 42 }, "end": { - "line": 105, + "line": 106, "column": 43 } }, @@ -6338,15 +6375,15 @@ { "type": "CommentBlock", "value": "*\n * Attempt to shutdown the server and database connections\n * @param {Server} server Server Object to be shutdown\n * @return {undefined} undefined\n ", - "start": 2411, - "end": 2573, + "start": 2470, + "end": 2632, "loc": { "start": { - "line": 93, + "line": 94, "column": 0 }, "end": { - "line": 97, + "line": 98, "column": 3 } } @@ -6356,15 +6393,15 @@ { "type": "CommentLine", "value": " What is this about again?", - "start": 2945, - "end": 2973, + "start": 3004, + "end": 3032, "loc": { "start": { - "line": 110, + "line": 111, "column": 0 }, "end": { - "line": 110, + "line": 111, "column": 28 } } @@ -6373,57 +6410,57 @@ }, { "type": "ExpressionStatement", - "start": 2974, - "end": 3108, + "start": 3033, + "end": 3167, "loc": { "start": { - "line": 111, + "line": 112, "column": 0 }, "end": { - "line": 115, + "line": 116, "column": 3 } }, "expression": { "type": "CallExpression", - "start": 2974, - "end": 3107, + "start": 3033, + "end": 3166, "loc": { "start": { - "line": 111, + "line": 112, "column": 0 }, "end": { - "line": 115, + "line": 116, "column": 2 } }, "callee": { "type": "MemberExpression", - "start": 2974, - "end": 2984, + "start": 3033, + "end": 3043, "loc": { "start": { - "line": 111, + "line": 112, "column": 0 }, "end": { - "line": 111, + "line": 112, "column": 10 } }, "object": { "type": "Identifier", - "start": 2974, - "end": 2981, + "start": 3033, + "end": 3040, "loc": { "start": { - "line": 111, + "line": 112, "column": 0 }, "end": { - "line": 111, + "line": 112, "column": 7 }, "identifierName": "process" @@ -6433,15 +6470,15 @@ }, "property": { "type": "Identifier", - "start": 2982, - "end": 2984, + "start": 3041, + "end": 3043, "loc": { "start": { - "line": 111, + "line": 112, "column": 8 }, "end": { - "line": 111, + "line": 112, "column": 10 }, "identifierName": "on" @@ -6454,15 +6491,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 2985, - "end": 3005, + "start": 3044, + "end": 3064, "loc": { "start": { - "line": 111, + "line": 112, "column": 11 }, "end": { - "line": 111, + "line": 112, "column": 31 } }, @@ -6474,15 +6511,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 3007, - "end": 3106, + "start": 3066, + "end": 3165, "loc": { "start": { - "line": 111, + "line": 112, "column": 33 }, "end": { - "line": 115, + "line": 116, "column": 1 } }, @@ -6493,15 +6530,15 @@ "params": [ { "type": "Identifier", - "start": 3007, - "end": 3010, + "start": 3066, + "end": 3069, "loc": { "start": { - "line": 111, + "line": 112, "column": 33 }, "end": { - "line": 111, + "line": 112, "column": 36 }, "identifierName": "err" @@ -6511,86 +6548,86 @@ ], "body": { "type": "BlockStatement", - "start": 3014, - "end": 3106, + "start": 3073, + "end": 3165, "loc": { "start": { - "line": 111, + "line": 112, "column": 40 }, "end": { - "line": 115, + "line": 116, "column": 1 } }, "body": [ { "type": "ExpressionStatement", - "start": 3043, - "end": 3085, + "start": 3102, + "end": 3144, "loc": { "start": { - "line": 113, + "line": 114, "column": 2 }, "end": { - "line": 113, + "line": 114, "column": 44 } }, "expression": { "type": "CallExpression", - "start": 3043, - "end": 3084, + "start": 3102, + "end": 3143, "loc": { "start": { - "line": 113, + "line": 114, "column": 2 }, "end": { - "line": 113, + "line": 114, "column": 43 } }, "callee": { "type": "MemberExpression", - "start": 3043, - "end": 3063, + "start": 3102, + "end": 3122, "loc": { "start": { - "line": 113, + "line": 114, "column": 2 }, "end": { - "line": 113, + "line": 114, "column": 22 } }, "object": { "type": "MemberExpression", - "start": 3043, - "end": 3057, + "start": 3102, + "end": 3116, "loc": { "start": { - "line": 113, + "line": 114, "column": 2 }, "end": { - "line": 113, + "line": 114, "column": 16 } }, "object": { "type": "Identifier", - "start": 3043, - "end": 3050, + "start": 3102, + "end": 3109, "loc": { "start": { - "line": 113, + "line": 114, "column": 2 }, "end": { - "line": 113, + "line": 114, "column": 9 }, "identifierName": "process" @@ -6600,15 +6637,15 @@ }, "property": { "type": "Identifier", - "start": 3051, - "end": 3057, + "start": 3110, + "end": 3116, "loc": { "start": { - "line": 113, + "line": 114, "column": 10 }, "end": { - "line": 113, + "line": 114, "column": 16 }, "identifierName": "stdout" @@ -6620,15 +6657,15 @@ }, "property": { "type": "Identifier", - "start": 3058, - "end": 3063, + "start": 3117, + "end": 3122, "loc": { "start": { - "line": 113, + "line": 114, "column": 17 }, "end": { - "line": 113, + "line": 114, "column": 22 }, "identifierName": "write" @@ -6641,43 +6678,43 @@ "arguments": [ { "type": "CallExpression", - "start": 3064, - "end": 3083, + "start": 3123, + "end": 3142, "loc": { "start": { - "line": 113, + "line": 114, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 42 } }, "callee": { "type": "MemberExpression", - "start": 3064, - "end": 3078, + "start": 3123, + "end": 3137, "loc": { "start": { - "line": 113, + "line": 114, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 37 } }, "object": { "type": "Identifier", - "start": 3064, - "end": 3068, + "start": 3123, + "end": 3127, "loc": { "start": { - "line": 113, + "line": 114, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 27 }, "identifierName": "JSON" @@ -6686,15 +6723,15 @@ }, "property": { "type": "Identifier", - "start": 3069, - "end": 3078, + "start": 3128, + "end": 3137, "loc": { "start": { - "line": 113, + "line": 114, "column": 28 }, "end": { - "line": 113, + "line": 114, "column": 37 }, "identifierName": "stringify" @@ -6706,15 +6743,15 @@ "arguments": [ { "type": "Identifier", - "start": 3079, - "end": 3082, + "start": 3138, + "end": 3141, "loc": { "start": { - "line": 113, + "line": 114, "column": 38 }, "end": { - "line": 113, + "line": 114, "column": 41 }, "identifierName": "err" @@ -6730,15 +6767,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 3018, - "end": 3040, + "start": 3077, + "end": 3099, "loc": { "start": { - "line": 112, + "line": 113, "column": 2 }, "end": { - "line": 112, + "line": 113, "column": 24 } } @@ -6747,57 +6784,57 @@ }, { "type": "ExpressionStatement", - "start": 3088, - "end": 3104, + "start": 3147, + "end": 3163, "loc": { "start": { - "line": 114, + "line": 115, "column": 2 }, "end": { - "line": 114, + "line": 115, "column": 18 } }, "expression": { "type": "CallExpression", - "start": 3088, - "end": 3103, + "start": 3147, + "end": 3162, "loc": { "start": { - "line": 114, + "line": 115, "column": 2 }, "end": { - "line": 114, + "line": 115, "column": 17 } }, "callee": { "type": "MemberExpression", - "start": 3088, - "end": 3100, + "start": 3147, + "end": 3159, "loc": { "start": { - "line": 114, + "line": 115, "column": 2 }, "end": { - "line": 114, + "line": 115, "column": 14 } }, "object": { "type": "Identifier", - "start": 3088, - "end": 3095, + "start": 3147, + "end": 3154, "loc": { "start": { - "line": 114, + "line": 115, "column": 2 }, "end": { - "line": 114, + "line": 115, "column": 9 }, "identifierName": "process" @@ -6806,15 +6843,15 @@ }, "property": { "type": "Identifier", - "start": 3096, - "end": 3100, + "start": 3155, + "end": 3159, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 14 }, "identifierName": "exit" @@ -6826,15 +6863,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 3101, - "end": 3102, + "start": 3160, + "end": 3161, "loc": { "start": { - "line": 114, + "line": 115, "column": 15 }, "end": { - "line": 114, + "line": 115, "column": 16 } }, @@ -6858,15 +6895,15 @@ { "type": "CommentLine", "value": " What is this about again?", - "start": 2945, - "end": 2973, + "start": 3004, + "end": 3032, "loc": { "start": { - "line": 110, + "line": 111, "column": 0 }, "end": { - "line": 110, + "line": 111, "column": 28 } } @@ -6875,57 +6912,57 @@ }, { "type": "ExpressionStatement", - "start": 3109, - "end": 3243, + "start": 3168, + "end": 3302, "loc": { "start": { - "line": 116, + "line": 117, "column": 0 }, "end": { - "line": 120, + "line": 121, "column": 3 } }, "expression": { "type": "CallExpression", - "start": 3109, - "end": 3242, + "start": 3168, + "end": 3301, "loc": { "start": { - "line": 116, + "line": 117, "column": 0 }, "end": { - "line": 120, + "line": 121, "column": 2 } }, "callee": { "type": "MemberExpression", - "start": 3109, - "end": 3119, + "start": 3168, + "end": 3178, "loc": { "start": { - "line": 116, + "line": 117, "column": 0 }, "end": { - "line": 116, + "line": 117, "column": 10 } }, "object": { "type": "Identifier", - "start": 3109, - "end": 3116, + "start": 3168, + "end": 3175, "loc": { "start": { - "line": 116, + "line": 117, "column": 0 }, "end": { - "line": 116, + "line": 117, "column": 7 }, "identifierName": "process" @@ -6934,15 +6971,15 @@ }, "property": { "type": "Identifier", - "start": 3117, - "end": 3119, + "start": 3176, + "end": 3178, "loc": { "start": { - "line": 116, + "line": 117, "column": 8 }, "end": { - "line": 116, + "line": 117, "column": 10 }, "identifierName": "on" @@ -6954,15 +6991,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 3120, - "end": 3140, + "start": 3179, + "end": 3199, "loc": { "start": { - "line": 116, + "line": 117, "column": 11 }, "end": { - "line": 116, + "line": 117, "column": 31 } }, @@ -6974,15 +7011,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 3142, - "end": 3241, + "start": 3201, + "end": 3300, "loc": { "start": { - "line": 116, + "line": 117, "column": 33 }, "end": { - "line": 120, + "line": 121, "column": 1 } }, @@ -6993,15 +7030,15 @@ "params": [ { "type": "Identifier", - "start": 3142, - "end": 3145, + "start": 3201, + "end": 3204, "loc": { "start": { - "line": 116, + "line": 117, "column": 33 }, "end": { - "line": 116, + "line": 117, "column": 36 }, "identifierName": "err" @@ -7011,86 +7048,86 @@ ], "body": { "type": "BlockStatement", - "start": 3149, - "end": 3241, + "start": 3208, + "end": 3300, "loc": { "start": { - "line": 116, + "line": 117, "column": 40 }, "end": { - "line": 120, + "line": 121, "column": 1 } }, "body": [ { "type": "ExpressionStatement", - "start": 3178, - "end": 3220, + "start": 3237, + "end": 3279, "loc": { "start": { - "line": 118, + "line": 119, "column": 2 }, "end": { - "line": 118, + "line": 119, "column": 44 } }, "expression": { "type": "CallExpression", - "start": 3178, - "end": 3219, + "start": 3237, + "end": 3278, "loc": { "start": { - "line": 118, + "line": 119, "column": 2 }, "end": { - "line": 118, + "line": 119, "column": 43 } }, "callee": { "type": "MemberExpression", - "start": 3178, - "end": 3198, + "start": 3237, + "end": 3257, "loc": { "start": { - "line": 118, + "line": 119, "column": 2 }, "end": { - "line": 118, + "line": 119, "column": 22 } }, "object": { "type": "MemberExpression", - "start": 3178, - "end": 3192, + "start": 3237, + "end": 3251, "loc": { "start": { - "line": 118, + "line": 119, "column": 2 }, "end": { - "line": 118, + "line": 119, "column": 16 } }, "object": { "type": "Identifier", - "start": 3178, - "end": 3185, + "start": 3237, + "end": 3244, "loc": { "start": { - "line": 118, + "line": 119, "column": 2 }, "end": { - "line": 118, + "line": 119, "column": 9 }, "identifierName": "process" @@ -7100,15 +7137,15 @@ }, "property": { "type": "Identifier", - "start": 3186, - "end": 3192, + "start": 3245, + "end": 3251, "loc": { "start": { - "line": 118, + "line": 119, "column": 10 }, "end": { - "line": 118, + "line": 119, "column": 16 }, "identifierName": "stdout" @@ -7120,15 +7157,15 @@ }, "property": { "type": "Identifier", - "start": 3193, - "end": 3198, + "start": 3252, + "end": 3257, "loc": { "start": { - "line": 118, + "line": 119, "column": 17 }, "end": { - "line": 118, + "line": 119, "column": 22 }, "identifierName": "write" @@ -7141,43 +7178,43 @@ "arguments": [ { "type": "CallExpression", - "start": 3199, - "end": 3218, + "start": 3258, + "end": 3277, "loc": { "start": { - "line": 118, + "line": 119, "column": 23 }, "end": { - "line": 118, + "line": 119, "column": 42 } }, "callee": { "type": "MemberExpression", - "start": 3199, - "end": 3213, + "start": 3258, + "end": 3272, "loc": { "start": { - "line": 118, + "line": 119, "column": 23 }, "end": { - "line": 118, + "line": 119, "column": 37 } }, "object": { "type": "Identifier", - "start": 3199, - "end": 3203, + "start": 3258, + "end": 3262, "loc": { "start": { - "line": 118, + "line": 119, "column": 23 }, "end": { - "line": 118, + "line": 119, "column": 27 }, "identifierName": "JSON" @@ -7186,15 +7223,15 @@ }, "property": { "type": "Identifier", - "start": 3204, - "end": 3213, + "start": 3263, + "end": 3272, "loc": { "start": { - "line": 118, + "line": 119, "column": 28 }, "end": { - "line": 118, + "line": 119, "column": 37 }, "identifierName": "stringify" @@ -7206,15 +7243,15 @@ "arguments": [ { "type": "Identifier", - "start": 3214, - "end": 3217, + "start": 3273, + "end": 3276, "loc": { "start": { - "line": 118, + "line": 119, "column": 38 }, "end": { - "line": 118, + "line": 119, "column": 41 }, "identifierName": "err" @@ -7230,15 +7267,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 3153, - "end": 3175, + "start": 3212, + "end": 3234, "loc": { "start": { - "line": 117, + "line": 118, "column": 2 }, "end": { - "line": 117, + "line": 118, "column": 24 } } @@ -7247,57 +7284,57 @@ }, { "type": "ExpressionStatement", - "start": 3223, - "end": 3239, + "start": 3282, + "end": 3298, "loc": { "start": { - "line": 119, + "line": 120, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 18 } }, "expression": { "type": "CallExpression", - "start": 3223, - "end": 3238, + "start": 3282, + "end": 3297, "loc": { "start": { - "line": 119, + "line": 120, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 17 } }, "callee": { "type": "MemberExpression", - "start": 3223, - "end": 3235, + "start": 3282, + "end": 3294, "loc": { "start": { - "line": 119, + "line": 120, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 14 } }, "object": { "type": "Identifier", - "start": 3223, - "end": 3230, + "start": 3282, + "end": 3289, "loc": { "start": { - "line": 119, + "line": 120, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 9 }, "identifierName": "process" @@ -7306,15 +7343,15 @@ }, "property": { "type": "Identifier", - "start": 3231, - "end": 3235, + "start": 3290, + "end": 3294, "loc": { "start": { - "line": 119, + "line": 120, "column": 10 }, "end": { - "line": 119, + "line": 120, "column": 14 }, "identifierName": "exit" @@ -7326,15 +7363,15 @@ "arguments": [ { "type": "NumericLiteral", - "start": 3236, - "end": 3237, + "start": 3295, + "end": 3296, "loc": { "start": { - "line": 119, + "line": 120, "column": 15 }, "end": { - "line": 119, + "line": 120, "column": 16 } }, @@ -7377,15 +7414,15 @@ { "type": "CommentLine", "value": " TODO: auto detect routes", - "start": 278, - "end": 305, + "start": 337, + "end": 364, "loc": { "start": { - "line": 11, + "line": 12, "column": 0 }, "end": { - "line": 11, + "line": 12, "column": 27 } } @@ -7393,15 +7430,15 @@ { "type": "CommentLine", "value": " https://stackoverflow.com/questions/6059246/how-to-include-route-handlers-in-multiple-files-in-express", - "start": 306, - "end": 411, + "start": 365, + "end": 470, "loc": { "start": { - "line": 12, + "line": 13, "column": 0 }, "end": { - "line": 12, + "line": 13, "column": 105 } } @@ -7409,15 +7446,15 @@ { "type": "CommentBlock", "value": "*\n * Build the routes from files and add docs if CONFIG set\n * @type {Array}\n ", - "start": 594, - "end": 692, + "start": 653, + "end": 751, "loc": { "start": { - "line": 17, + "line": 18, "column": 0 }, "end": { - "line": 20, + "line": 21, "column": 3 } } @@ -7425,15 +7462,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 1227, - "end": 1249, + "start": 1286, + "end": 1308, "loc": { "start": { - "line": 46, + "line": 47, "column": 4 }, "end": { - "line": 46, + "line": 47, "column": 26 } } @@ -7441,15 +7478,15 @@ { "type": "CommentBlock", "value": "*\n * Entry point to run the server\n * @return {undefined} no return\n ", - "start": 1297, - "end": 1370, + "start": 1356, + "end": 1429, "loc": { "start": { - "line": 50, + "line": 51, "column": 0 }, "end": { - "line": 53, + "line": 54, "column": 3 } } @@ -7457,15 +7494,15 @@ { "type": "CommentLine", "value": " TODO: Check if mysql can be connected/db exists (use name in config file)", - "start": 1413, - "end": 1489, + "start": 1472, + "end": 1548, "loc": { "start": { - "line": 55, + "line": 56, "column": 2 }, "end": { - "line": 55, + "line": 56, "column": 78 } } @@ -7473,15 +7510,15 @@ { "type": "CommentLine", "value": " For nodemon?", - "start": 2028, - "end": 2043, + "start": 2087, + "end": 2102, "loc": { "start": { - "line": 79, + "line": 80, "column": 6 }, "end": { - "line": 79, + "line": 80, "column": 21 } } @@ -7489,15 +7526,15 @@ { "type": "CommentLine", "value": " Likely caused by \"bad\" endpoint (empty/ duplicate paths/ no controller)", - "start": 2186, - "end": 2260, + "start": 2245, + "end": 2319, "loc": { "start": { - "line": 85, + "line": 86, "column": 4 }, "end": { - "line": 85, + "line": 86, "column": 78 } } @@ -7505,15 +7542,15 @@ { "type": "CommentBlock", "value": "*\n * Attempt to shutdown the server and database connections\n * @param {Server} server Server Object to be shutdown\n * @return {undefined} undefined\n ", - "start": 2411, - "end": 2573, + "start": 2470, + "end": 2632, "loc": { "start": { - "line": 93, + "line": 94, "column": 0 }, "end": { - "line": 97, + "line": 98, "column": 3 } } @@ -7521,15 +7558,15 @@ { "type": "CommentLine", "value": " What is this about again?", - "start": 2945, - "end": 2973, + "start": 3004, + "end": 3032, "loc": { "start": { - "line": 110, + "line": 111, "column": 0 }, "end": { - "line": 110, + "line": 111, "column": 28 } } @@ -7537,15 +7574,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 3018, - "end": 3040, + "start": 3077, + "end": 3099, "loc": { "start": { - "line": 112, + "line": 113, "column": 2 }, "end": { - "line": 112, + "line": 113, "column": 24 } } @@ -7553,15 +7590,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 3153, - "end": 3175, + "start": 3212, + "end": 3234, "loc": { "start": { - "line": 117, + "line": 118, "column": 2 }, "end": { - "line": 117, + "line": 118, "column": 24 } } @@ -7850,27 +7887,26 @@ }, { "type": { - "label": ",", - "beforeExpr": true, + "label": "}", + "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 123, - "end": 124, + "start": 124, + "end": 125, "loc": { "start": { "line": 7, - "column": 31 + "column": 32 }, "end": { "line": 7, - "column": 32 + "column": 33 } } }, @@ -7886,25 +7922,25 @@ "postfix": false, "binop": null }, - "value": "HapiRequest", - "start": 125, - "end": 136, + "value": "from", + "start": 126, + "end": 130, "loc": { "start": { "line": 7, - "column": 33 + "column": 34 }, "end": { "line": 7, - "column": 44 + "column": 38 } } }, { "type": { - "label": ",", - "beforeExpr": true, - "startsExpr": false, + "label": "string", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -7913,74 +7949,78 @@ "binop": null, "updateContext": null }, - "start": 136, - "end": 137, + "value": "./base/server.js", + "start": 131, + "end": 149, "loc": { "start": { "line": 7, - "column": 44 + "column": 39 }, "end": { "line": 7, - "column": 45 + "column": 57 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": ";", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "HapiHandler", - "start": 138, - "end": 149, + "start": 149, + "end": 150, "loc": { "start": { "line": 7, - "column": 46 + "column": 57 }, "end": { "line": 7, - "column": 57 + "column": 58 } } }, { "type": { - "label": "}", + "label": "import", + "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 150, - "end": 151, + "value": "import", + "start": 151, + "end": 157, "loc": { "start": { - "line": 7, - "column": 58 + "line": 8, + "column": 0 }, "end": { - "line": 7, - "column": 59 + "line": 8, + "column": 6 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "{", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -7989,17 +8029,145 @@ "postfix": false, "binop": null }, - "value": "from", - "start": 152, - "end": 156, + "start": 158, + "end": 159, "loc": { "start": { - "line": 7, - "column": 60 + "line": 8, + "column": 7 }, "end": { - "line": 7, - "column": 64 + "line": 8, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "HapiRequest", + "start": 160, + "end": 171, + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 171, + "end": 172, + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "HapiHandler", + "start": 173, + "end": 184, + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 33 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 185, + "end": 186, + "loc": { + "start": { + "line": 8, + "column": 34 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 187, + "end": 191, + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 40 } } }, @@ -8016,16 +8184,16 @@ "binop": null, "updateContext": null }, - "value": "./base/server.js", - "start": 157, - "end": 175, + "value": "./base/request/hapi-request.interface.js", + "start": 192, + "end": 234, "loc": { "start": { - "line": 7, - "column": 65 + "line": 8, + "column": 41 }, "end": { - "line": 7, + "line": 8, "column": 83 } } @@ -8043,15 +8211,15 @@ "binop": null, "updateContext": null }, - "start": 175, - "end": 176, + "start": 234, + "end": 235, "loc": { "start": { - "line": 7, + "line": 8, "column": 83 }, "end": { - "line": 7, + "line": 8, "column": 84 } } @@ -8071,15 +8239,15 @@ "updateContext": null }, "value": "import", - "start": 177, - "end": 183, + "start": 236, + "end": 242, "loc": { "start": { - "line": 8, + "line": 9, "column": 0 }, "end": { - "line": 8, + "line": 9, "column": 6 } } @@ -8097,15 +8265,15 @@ "binop": null }, "value": "mariadb", - "start": 184, - "end": 191, + "start": 243, + "end": 250, "loc": { "start": { - "line": 8, + "line": 9, "column": 7 }, "end": { - "line": 8, + "line": 9, "column": 14 } } @@ -8123,15 +8291,15 @@ "binop": null }, "value": "from", - "start": 192, - "end": 196, + "start": 251, + "end": 255, "loc": { "start": { - "line": 8, + "line": 9, "column": 15 }, "end": { - "line": 8, + "line": 9, "column": 19 } } @@ -8150,15 +8318,15 @@ "updateContext": null }, "value": "./helpers/mariadb.helper.js", - "start": 197, - "end": 226, + "start": 256, + "end": 285, "loc": { "start": { - "line": 8, + "line": 9, "column": 20 }, "end": { - "line": 8, + "line": 9, "column": 49 } } @@ -8176,15 +8344,15 @@ "binop": null, "updateContext": null }, - "start": 226, - "end": 227, + "start": 285, + "end": 286, "loc": { "start": { - "line": 8, + "line": 9, "column": 49 }, "end": { - "line": 8, + "line": 9, "column": 50 } } @@ -8204,15 +8372,15 @@ "updateContext": null }, "value": "import", - "start": 228, - "end": 234, + "start": 287, + "end": 293, "loc": { "start": { - "line": 9, + "line": 10, "column": 0 }, "end": { - "line": 9, + "line": 10, "column": 6 } } @@ -8230,15 +8398,15 @@ "binop": null }, "value": "CONFIG", - "start": 235, - "end": 241, + "start": 294, + "end": 300, "loc": { "start": { - "line": 9, + "line": 10, "column": 7 }, "end": { - "line": 9, + "line": 10, "column": 13 } } @@ -8256,15 +8424,15 @@ "binop": null }, "value": "from", - "start": 242, - "end": 246, + "start": 301, + "end": 305, "loc": { "start": { - "line": 9, + "line": 10, "column": 14 }, "end": { - "line": 9, + "line": 10, "column": 18 } } @@ -8283,15 +8451,15 @@ "updateContext": null }, "value": "./helpers/config.helper.js", - "start": 247, - "end": 275, + "start": 306, + "end": 334, "loc": { "start": { - "line": 9, + "line": 10, "column": 19 }, "end": { - "line": 9, + "line": 10, "column": 47 } } @@ -8309,15 +8477,15 @@ "binop": null, "updateContext": null }, - "start": 275, - "end": 276, + "start": 334, + "end": 335, "loc": { "start": { - "line": 9, + "line": 10, "column": 47 }, "end": { - "line": 9, + "line": 10, "column": 48 } } @@ -8325,15 +8493,15 @@ { "type": "CommentLine", "value": " TODO: auto detect routes", - "start": 278, - "end": 305, + "start": 337, + "end": 364, "loc": { "start": { - "line": 11, + "line": 12, "column": 0 }, "end": { - "line": 11, + "line": 12, "column": 27 } } @@ -8341,15 +8509,15 @@ { "type": "CommentLine", "value": " https://stackoverflow.com/questions/6059246/how-to-include-route-handlers-in-multiple-files-in-express", - "start": 306, - "end": 411, + "start": 365, + "end": 470, "loc": { "start": { - "line": 12, + "line": 13, "column": 0 }, "end": { - "line": 12, + "line": 13, "column": 105 } } @@ -8369,15 +8537,15 @@ "updateContext": null }, "value": "import", - "start": 412, - "end": 418, + "start": 471, + "end": 477, "loc": { "start": { - "line": 13, + "line": 14, "column": 0 }, "end": { - "line": 13, + "line": 14, "column": 6 } } @@ -8395,15 +8563,15 @@ "binop": null }, "value": "adminRoutes", - "start": 419, - "end": 430, + "start": 478, + "end": 489, "loc": { "start": { - "line": 13, + "line": 14, "column": 7 }, "end": { - "line": 13, + "line": 14, "column": 18 } } @@ -8421,15 +8589,15 @@ "binop": null }, "value": "from", - "start": 431, - "end": 435, + "start": 490, + "end": 494, "loc": { "start": { - "line": 13, + "line": 14, "column": 19 }, "end": { - "line": 13, + "line": 14, "column": 23 } } @@ -8448,15 +8616,15 @@ "updateContext": null }, "value": "./controllers/admin.controller.js", - "start": 436, - "end": 471, + "start": 495, + "end": 530, "loc": { "start": { - "line": 13, + "line": 14, "column": 24 }, "end": { - "line": 13, + "line": 14, "column": 59 } } @@ -8474,15 +8642,15 @@ "binop": null, "updateContext": null }, - "start": 471, - "end": 472, + "start": 530, + "end": 531, "loc": { "start": { - "line": 13, + "line": 14, "column": 59 }, "end": { - "line": 13, + "line": 14, "column": 60 } } @@ -8502,15 +8670,15 @@ "updateContext": null }, "value": "import", - "start": 473, - "end": 479, + "start": 532, + "end": 538, "loc": { "start": { - "line": 14, + "line": 15, "column": 0 }, "end": { - "line": 14, + "line": 15, "column": 6 } } @@ -8528,15 +8696,15 @@ "binop": null }, "value": "helloRoutes", - "start": 480, - "end": 491, + "start": 539, + "end": 550, "loc": { "start": { - "line": 14, + "line": 15, "column": 7 }, "end": { - "line": 14, + "line": 15, "column": 18 } } @@ -8554,15 +8722,15 @@ "binop": null }, "value": "from", - "start": 492, - "end": 496, + "start": 551, + "end": 555, "loc": { "start": { - "line": 14, + "line": 15, "column": 19 }, "end": { - "line": 14, + "line": 15, "column": 23 } } @@ -8581,15 +8749,15 @@ "updateContext": null }, "value": "./controllers/hello.controller.js", - "start": 497, - "end": 532, + "start": 556, + "end": 591, "loc": { "start": { - "line": 14, + "line": 15, "column": 24 }, "end": { - "line": 14, + "line": 15, "column": 59 } } @@ -8607,15 +8775,15 @@ "binop": null, "updateContext": null }, - "start": 532, - "end": 533, + "start": 591, + "end": 592, "loc": { "start": { - "line": 14, + "line": 15, "column": 59 }, "end": { - "line": 14, + "line": 15, "column": 60 } } @@ -8635,15 +8803,15 @@ "updateContext": null }, "value": "import", - "start": 534, - "end": 540, + "start": 593, + "end": 599, "loc": { "start": { - "line": 15, + "line": 16, "column": 0 }, "end": { - "line": 15, + "line": 16, "column": 6 } } @@ -8661,15 +8829,15 @@ "binop": null }, "value": "noteRoutes", - "start": 541, - "end": 551, + "start": 600, + "end": 610, "loc": { "start": { - "line": 15, + "line": 16, "column": 7 }, "end": { - "line": 15, + "line": 16, "column": 17 } } @@ -8687,15 +8855,15 @@ "binop": null }, "value": "from", - "start": 552, - "end": 556, + "start": 611, + "end": 615, "loc": { "start": { - "line": 15, + "line": 16, "column": 18 }, "end": { - "line": 15, + "line": 16, "column": 22 } } @@ -8714,15 +8882,15 @@ "updateContext": null }, "value": "./controllers/note.controller.js", - "start": 557, - "end": 591, + "start": 616, + "end": 650, "loc": { "start": { - "line": 15, + "line": 16, "column": 23 }, "end": { - "line": 15, + "line": 16, "column": 57 } } @@ -8740,15 +8908,15 @@ "binop": null, "updateContext": null }, - "start": 591, - "end": 592, + "start": 650, + "end": 651, "loc": { "start": { - "line": 15, + "line": 16, "column": 57 }, "end": { - "line": 15, + "line": 16, "column": 58 } } @@ -8756,15 +8924,15 @@ { "type": "CommentBlock", "value": "*\n * Build the routes from files and add docs if CONFIG set\n * @type {Array}\n ", - "start": 594, - "end": 692, + "start": 653, + "end": 751, "loc": { "start": { - "line": 17, + "line": 18, "column": 0 }, "end": { - "line": 20, + "line": 21, "column": 3 } } @@ -8784,15 +8952,15 @@ "updateContext": null }, "value": "const", - "start": 693, - "end": 698, + "start": 752, + "end": 757, "loc": { "start": { - "line": 21, + "line": 22, "column": 0 }, "end": { - "line": 21, + "line": 22, "column": 5 } } @@ -8810,15 +8978,15 @@ "binop": null }, "value": "apiRoutes", - "start": 699, - "end": 708, + "start": 758, + "end": 767, "loc": { "start": { - "line": 21, + "line": 22, "column": 6 }, "end": { - "line": 21, + "line": 22, "column": 15 } } @@ -8837,15 +9005,15 @@ "updateContext": null }, "value": "=", - "start": 709, - "end": 710, + "start": 768, + "end": 769, "loc": { "start": { - "line": 21, + "line": 22, "column": 16 }, "end": { - "line": 21, + "line": 22, "column": 17 } } @@ -8863,15 +9031,15 @@ "binop": null }, "value": "helloRoutes", - "start": 711, - "end": 722, + "start": 770, + "end": 781, "loc": { "start": { - "line": 21, + "line": 22, "column": 18 }, "end": { - "line": 21, + "line": 22, "column": 29 } } @@ -8889,15 +9057,15 @@ "binop": null, "updateContext": null }, - "start": 722, - "end": 723, + "start": 781, + "end": 782, "loc": { "start": { - "line": 21, + "line": 22, "column": 29 }, "end": { - "line": 21, + "line": 22, "column": 30 } } @@ -8915,15 +9083,15 @@ "binop": null }, "value": "concat", - "start": 723, - "end": 729, + "start": 782, + "end": 788, "loc": { "start": { - "line": 21, + "line": 22, "column": 30 }, "end": { - "line": 21, + "line": 22, "column": 36 } } @@ -8940,15 +9108,15 @@ "postfix": false, "binop": null }, - "start": 729, - "end": 730, + "start": 788, + "end": 789, "loc": { "start": { - "line": 21, + "line": 22, "column": 36 }, "end": { - "line": 21, + "line": 22, "column": 37 } } @@ -8966,15 +9134,15 @@ "binop": null }, "value": "noteRoutes", - "start": 730, - "end": 740, + "start": 789, + "end": 799, "loc": { "start": { - "line": 21, + "line": 22, "column": 37 }, "end": { - "line": 21, + "line": 22, "column": 47 } } @@ -8991,15 +9159,15 @@ "postfix": false, "binop": null }, - "start": 740, - "end": 741, + "start": 799, + "end": 800, "loc": { "start": { - "line": 21, + "line": 22, "column": 47 }, "end": { - "line": 21, + "line": 22, "column": 48 } } @@ -9017,15 +9185,15 @@ "binop": null, "updateContext": null }, - "start": 741, - "end": 742, + "start": 800, + "end": 801, "loc": { "start": { - "line": 21, + "line": 22, "column": 48 }, "end": { - "line": 21, + "line": 22, "column": 49 } } @@ -9043,15 +9211,15 @@ "binop": null }, "value": "apiRoutes", - "start": 743, - "end": 752, + "start": 802, + "end": 811, "loc": { "start": { - "line": 22, + "line": 23, "column": 0 }, "end": { - "line": 22, + "line": 23, "column": 9 } } @@ -9069,15 +9237,15 @@ "binop": null, "updateContext": null }, - "start": 752, - "end": 753, + "start": 811, + "end": 812, "loc": { "start": { - "line": 22, + "line": 23, "column": 9 }, "end": { - "line": 22, + "line": 23, "column": 10 } } @@ -9095,15 +9263,15 @@ "binop": null }, "value": "forEach", - "start": 753, - "end": 760, + "start": 812, + "end": 819, "loc": { "start": { - "line": 22, + "line": 23, "column": 10 }, "end": { - "line": 22, + "line": 23, "column": 17 } } @@ -9120,15 +9288,15 @@ "postfix": false, "binop": null }, - "start": 760, - "end": 761, + "start": 819, + "end": 820, "loc": { "start": { - "line": 22, + "line": 23, "column": 17 }, "end": { - "line": 22, + "line": 23, "column": 18 } } @@ -9146,15 +9314,15 @@ "binop": null }, "value": "route", - "start": 761, - "end": 766, + "start": 820, + "end": 825, "loc": { "start": { - "line": 22, + "line": 23, "column": 18 }, "end": { - "line": 22, + "line": 23, "column": 23 } } @@ -9172,15 +9340,15 @@ "binop": null, "updateContext": null }, - "start": 767, - "end": 769, + "start": 826, + "end": 828, "loc": { "start": { - "line": 22, + "line": 23, "column": 24 }, "end": { - "line": 22, + "line": 23, "column": 26 } } @@ -9197,15 +9365,15 @@ "postfix": false, "binop": null }, - "start": 770, - "end": 771, + "start": 829, + "end": 830, "loc": { "start": { - "line": 22, + "line": 23, "column": 27 }, "end": { - "line": 22, + "line": 23, "column": 28 } } @@ -9223,15 +9391,15 @@ "binop": null }, "value": "route", - "start": 774, - "end": 779, + "start": 833, + "end": 838, "loc": { "start": { - "line": 23, + "line": 24, "column": 2 }, "end": { - "line": 23, + "line": 24, "column": 7 } } @@ -9249,15 +9417,15 @@ "binop": null, "updateContext": null }, - "start": 779, - "end": 780, + "start": 838, + "end": 839, "loc": { "start": { - "line": 23, + "line": 24, "column": 7 }, "end": { - "line": 23, + "line": 24, "column": 8 } } @@ -9275,15 +9443,15 @@ "binop": null }, "value": "path", - "start": 780, - "end": 784, + "start": 839, + "end": 843, "loc": { "start": { - "line": 23, + "line": 24, "column": 8 }, "end": { - "line": 23, + "line": 24, "column": 12 } } @@ -9302,15 +9470,15 @@ "updateContext": null }, "value": "=", - "start": 785, - "end": 786, + "start": 844, + "end": 845, "loc": { "start": { - "line": 23, + "line": 24, "column": 13 }, "end": { - "line": 23, + "line": 24, "column": 14 } } @@ -9328,15 +9496,15 @@ "binop": null }, "value": "CONFIG", - "start": 787, - "end": 793, + "start": 846, + "end": 852, "loc": { "start": { - "line": 23, + "line": 24, "column": 15 }, "end": { - "line": 23, + "line": 24, "column": 21 } } @@ -9354,15 +9522,15 @@ "binop": null, "updateContext": null }, - "start": 793, - "end": 794, + "start": 852, + "end": 853, "loc": { "start": { - "line": 23, + "line": 24, "column": 21 }, "end": { - "line": 23, + "line": 24, "column": 22 } } @@ -9380,15 +9548,15 @@ "binop": null }, "value": "PATHS", - "start": 794, - "end": 799, + "start": 853, + "end": 858, "loc": { "start": { - "line": 23, + "line": 24, "column": 22 }, "end": { - "line": 23, + "line": 24, "column": 27 } } @@ -9406,15 +9574,15 @@ "binop": null, "updateContext": null }, - "start": 799, - "end": 800, + "start": 858, + "end": 859, "loc": { "start": { - "line": 23, + "line": 24, "column": 27 }, "end": { - "line": 23, + "line": 24, "column": 28 } } @@ -9432,15 +9600,15 @@ "binop": null }, "value": "api", - "start": 800, - "end": 803, + "start": 859, + "end": 862, "loc": { "start": { - "line": 23, + "line": 24, "column": 28 }, "end": { - "line": 23, + "line": 24, "column": 31 } } @@ -9459,15 +9627,15 @@ "updateContext": null }, "value": "+", - "start": 804, - "end": 805, + "start": 863, + "end": 864, "loc": { "start": { - "line": 23, + "line": 24, "column": 32 }, "end": { - "line": 23, + "line": 24, "column": 33 } } @@ -9485,15 +9653,15 @@ "binop": null }, "value": "route", - "start": 806, - "end": 811, + "start": 865, + "end": 870, "loc": { "start": { - "line": 23, + "line": 24, "column": 34 }, "end": { - "line": 23, + "line": 24, "column": 39 } } @@ -9511,15 +9679,15 @@ "binop": null, "updateContext": null }, - "start": 811, - "end": 812, + "start": 870, + "end": 871, "loc": { "start": { - "line": 23, + "line": 24, "column": 39 }, "end": { - "line": 23, + "line": 24, "column": 40 } } @@ -9537,15 +9705,15 @@ "binop": null }, "value": "path", - "start": 812, - "end": 816, + "start": 871, + "end": 875, "loc": { "start": { - "line": 23, + "line": 24, "column": 40 }, "end": { - "line": 23, + "line": 24, "column": 44 } } @@ -9563,15 +9731,15 @@ "binop": null, "updateContext": null }, - "start": 816, - "end": 817, + "start": 875, + "end": 876, "loc": { "start": { - "line": 23, + "line": 24, "column": 44 }, "end": { - "line": 23, + "line": 24, "column": 45 } } @@ -9588,15 +9756,15 @@ "postfix": false, "binop": null }, - "start": 818, - "end": 819, + "start": 877, + "end": 878, "loc": { "start": { - "line": 24, + "line": 25, "column": 0 }, "end": { - "line": 24, + "line": 25, "column": 1 } } @@ -9613,15 +9781,15 @@ "postfix": false, "binop": null }, - "start": 819, - "end": 820, + "start": 878, + "end": 879, "loc": { "start": { - "line": 24, + "line": 25, "column": 1 }, "end": { - "line": 24, + "line": 25, "column": 2 } } @@ -9639,15 +9807,15 @@ "binop": null, "updateContext": null }, - "start": 820, - "end": 821, + "start": 879, + "end": 880, "loc": { "start": { - "line": 24, + "line": 25, "column": 2 }, "end": { - "line": 24, + "line": 25, "column": 3 } } @@ -9667,15 +9835,15 @@ "updateContext": null }, "value": "const", - "start": 823, - "end": 828, + "start": 882, + "end": 887, "loc": { "start": { - "line": 26, + "line": 27, "column": 0 }, "end": { - "line": 26, + "line": 27, "column": 5 } } @@ -9693,15 +9861,15 @@ "binop": null }, "value": "docRoutes", - "start": 829, - "end": 838, + "start": 888, + "end": 897, "loc": { "start": { - "line": 26, + "line": 27, "column": 6 }, "end": { - "line": 26, + "line": 27, "column": 15 } } @@ -9720,15 +9888,15 @@ "updateContext": null }, "value": "=", - "start": 839, - "end": 840, + "start": 898, + "end": 899, "loc": { "start": { - "line": 26, + "line": 27, "column": 16 }, "end": { - "line": 26, + "line": 27, "column": 17 } } @@ -9746,15 +9914,15 @@ "binop": null, "updateContext": null }, - "start": 841, - "end": 842, + "start": 900, + "end": 901, "loc": { "start": { - "line": 26, + "line": 27, "column": 18 }, "end": { - "line": 26, + "line": 27, "column": 19 } } @@ -9771,15 +9939,15 @@ "postfix": false, "binop": null }, - "start": 842, - "end": 843, + "start": 901, + "end": 902, "loc": { "start": { - "line": 26, + "line": 27, "column": 19 }, "end": { - "line": 26, + "line": 27, "column": 20 } } @@ -9797,15 +9965,15 @@ "binop": null }, "value": "method", - "start": 846, - "end": 852, + "start": 905, + "end": 911, "loc": { "start": { - "line": 27, + "line": 28, "column": 2 }, "end": { - "line": 27, + "line": 28, "column": 8 } } @@ -9823,15 +9991,15 @@ "binop": null, "updateContext": null }, - "start": 852, - "end": 853, + "start": 911, + "end": 912, "loc": { "start": { - "line": 27, + "line": 28, "column": 8 }, "end": { - "line": 27, + "line": 28, "column": 9 } } @@ -9850,15 +10018,15 @@ "updateContext": null }, "value": "GET", - "start": 854, - "end": 859, + "start": 913, + "end": 918, "loc": { "start": { - "line": 27, + "line": 28, "column": 10 }, "end": { - "line": 27, + "line": 28, "column": 15 } } @@ -9876,15 +10044,15 @@ "binop": null, "updateContext": null }, - "start": 859, - "end": 860, + "start": 918, + "end": 919, "loc": { "start": { - "line": 27, + "line": 28, "column": 15 }, "end": { - "line": 27, + "line": 28, "column": 16 } } @@ -9902,15 +10070,15 @@ "binop": null }, "value": "path", - "start": 863, - "end": 867, + "start": 922, + "end": 926, "loc": { "start": { - "line": 28, + "line": 29, "column": 2 }, "end": { - "line": 28, + "line": 29, "column": 6 } } @@ -9928,15 +10096,15 @@ "binop": null, "updateContext": null }, - "start": 867, - "end": 868, + "start": 926, + "end": 927, "loc": { "start": { - "line": 28, + "line": 29, "column": 6 }, "end": { - "line": 28, + "line": 29, "column": 7 } } @@ -9954,15 +10122,15 @@ "binop": null }, "value": "CONFIG", - "start": 869, - "end": 875, + "start": 928, + "end": 934, "loc": { "start": { - "line": 28, + "line": 29, "column": 8 }, "end": { - "line": 28, + "line": 29, "column": 14 } } @@ -9980,15 +10148,15 @@ "binop": null, "updateContext": null }, - "start": 875, - "end": 876, + "start": 934, + "end": 935, "loc": { "start": { - "line": 28, + "line": 29, "column": 14 }, "end": { - "line": 28, + "line": 29, "column": 15 } } @@ -10006,15 +10174,15 @@ "binop": null }, "value": "PATHS", - "start": 876, - "end": 881, + "start": 935, + "end": 940, "loc": { "start": { - "line": 28, + "line": 29, "column": 15 }, "end": { - "line": 28, + "line": 29, "column": 20 } } @@ -10032,15 +10200,15 @@ "binop": null, "updateContext": null }, - "start": 881, - "end": 882, + "start": 940, + "end": 941, "loc": { "start": { - "line": 28, + "line": 29, "column": 20 }, "end": { - "line": 28, + "line": 29, "column": 21 } } @@ -10058,15 +10226,15 @@ "binop": null }, "value": "api", - "start": 882, - "end": 885, + "start": 941, + "end": 944, "loc": { "start": { - "line": 28, + "line": 29, "column": 21 }, "end": { - "line": 28, + "line": 29, "column": 24 } } @@ -10084,15 +10252,15 @@ "binop": null, "updateContext": null }, - "start": 885, - "end": 886, + "start": 944, + "end": 945, "loc": { "start": { - "line": 28, + "line": 29, "column": 24 }, "end": { - "line": 28, + "line": 29, "column": 25 } } @@ -10110,15 +10278,15 @@ "binop": null }, "value": "controller", - "start": 889, - "end": 899, + "start": 948, + "end": 958, "loc": { "start": { - "line": 29, + "line": 30, "column": 2 }, "end": { - "line": 29, + "line": 30, "column": 12 } } @@ -10136,15 +10304,15 @@ "binop": null, "updateContext": null }, - "start": 899, - "end": 900, + "start": 958, + "end": 959, "loc": { "start": { - "line": 29, + "line": 30, "column": 12 }, "end": { - "line": 29, + "line": 30, "column": 13 } } @@ -10161,15 +10329,15 @@ "postfix": false, "binop": null }, - "start": 901, - "end": 902, + "start": 960, + "end": 961, "loc": { "start": { - "line": 29, + "line": 30, "column": 14 }, "end": { - "line": 29, + "line": 30, "column": 15 } } @@ -10187,15 +10355,15 @@ "binop": null }, "value": "file", - "start": 907, - "end": 911, + "start": 966, + "end": 970, "loc": { "start": { - "line": 30, + "line": 31, "column": 4 }, "end": { - "line": 30, + "line": 31, "column": 8 } } @@ -10213,15 +10381,15 @@ "binop": null, "updateContext": null }, - "start": 911, - "end": 912, + "start": 970, + "end": 971, "loc": { "start": { - "line": 30, + "line": 31, "column": 8 }, "end": { - "line": 30, + "line": 31, "column": 9 } } @@ -10239,15 +10407,15 @@ "binop": null }, "value": "path", - "start": 913, - "end": 917, + "start": 972, + "end": 976, "loc": { "start": { - "line": 30, + "line": 31, "column": 10 }, "end": { - "line": 30, + "line": 31, "column": 14 } } @@ -10265,15 +10433,15 @@ "binop": null, "updateContext": null }, - "start": 917, - "end": 918, + "start": 976, + "end": 977, "loc": { "start": { - "line": 30, + "line": 31, "column": 14 }, "end": { - "line": 30, + "line": 31, "column": 15 } } @@ -10291,15 +10459,15 @@ "binop": null }, "value": "resolve", - "start": 918, - "end": 925, + "start": 977, + "end": 984, "loc": { "start": { - "line": 30, + "line": 31, "column": 15 }, "end": { - "line": 30, + "line": 31, "column": 22 } } @@ -10316,15 +10484,15 @@ "postfix": false, "binop": null }, - "start": 925, - "end": 926, + "start": 984, + "end": 985, "loc": { "start": { - "line": 30, + "line": 31, "column": 22 }, "end": { - "line": 30, + "line": 31, "column": 23 } } @@ -10342,15 +10510,15 @@ "binop": null }, "value": "__dirname", - "start": 926, - "end": 935, + "start": 985, + "end": 994, "loc": { "start": { - "line": 30, + "line": 31, "column": 23 }, "end": { - "line": 30, + "line": 31, "column": 32 } } @@ -10368,15 +10536,15 @@ "binop": null, "updateContext": null }, - "start": 935, - "end": 936, + "start": 994, + "end": 995, "loc": { "start": { - "line": 30, + "line": 31, "column": 32 }, "end": { - "line": 30, + "line": 31, "column": 33 } } @@ -10395,15 +10563,15 @@ "updateContext": null }, "value": "../openapi.yaml", - "start": 937, - "end": 954, + "start": 996, + "end": 1013, "loc": { "start": { - "line": 30, + "line": 31, "column": 34 }, "end": { - "line": 30, + "line": 31, "column": 51 } } @@ -10420,15 +10588,15 @@ "postfix": false, "binop": null }, - "start": 954, - "end": 955, + "start": 1013, + "end": 1014, "loc": { "start": { - "line": 30, + "line": 31, "column": 51 }, "end": { - "line": 30, + "line": 31, "column": 52 } } @@ -10445,15 +10613,15 @@ "postfix": false, "binop": null }, - "start": 958, - "end": 959, + "start": 1017, + "end": 1018, "loc": { "start": { - "line": 31, + "line": 32, "column": 2 }, "end": { - "line": 31, + "line": 32, "column": 3 } } @@ -10470,15 +10638,15 @@ "postfix": false, "binop": null }, - "start": 960, - "end": 961, + "start": 1019, + "end": 1020, "loc": { "start": { - "line": 32, + "line": 33, "column": 0 }, "end": { - "line": 32, + "line": 33, "column": 1 } } @@ -10496,15 +10664,15 @@ "binop": null, "updateContext": null }, - "start": 961, - "end": 962, + "start": 1020, + "end": 1021, "loc": { "start": { - "line": 32, + "line": 33, "column": 1 }, "end": { - "line": 32, + "line": 33, "column": 2 } } @@ -10521,15 +10689,15 @@ "postfix": false, "binop": null }, - "start": 963, - "end": 964, + "start": 1022, + "end": 1023, "loc": { "start": { - "line": 32, + "line": 33, "column": 3 }, "end": { - "line": 32, + "line": 33, "column": 4 } } @@ -10547,15 +10715,15 @@ "binop": null }, "value": "method", - "start": 967, - "end": 973, + "start": 1026, + "end": 1032, "loc": { "start": { - "line": 33, + "line": 34, "column": 2 }, "end": { - "line": 33, + "line": 34, "column": 8 } } @@ -10573,15 +10741,15 @@ "binop": null, "updateContext": null }, - "start": 973, - "end": 974, + "start": 1032, + "end": 1033, "loc": { "start": { - "line": 33, + "line": 34, "column": 8 }, "end": { - "line": 33, + "line": 34, "column": 9 } } @@ -10600,15 +10768,15 @@ "updateContext": null }, "value": "GET", - "start": 975, - "end": 980, + "start": 1034, + "end": 1039, "loc": { "start": { - "line": 33, + "line": 34, "column": 10 }, "end": { - "line": 33, + "line": 34, "column": 15 } } @@ -10626,15 +10794,15 @@ "binop": null, "updateContext": null }, - "start": 980, - "end": 981, + "start": 1039, + "end": 1040, "loc": { "start": { - "line": 33, + "line": 34, "column": 15 }, "end": { - "line": 33, + "line": 34, "column": 16 } } @@ -10652,15 +10820,15 @@ "binop": null }, "value": "path", - "start": 984, - "end": 988, + "start": 1043, + "end": 1047, "loc": { "start": { - "line": 34, + "line": 35, "column": 2 }, "end": { - "line": 34, + "line": 35, "column": 6 } } @@ -10678,15 +10846,15 @@ "binop": null, "updateContext": null }, - "start": 988, - "end": 989, + "start": 1047, + "end": 1048, "loc": { "start": { - "line": 34, + "line": 35, "column": 6 }, "end": { - "line": 34, + "line": 35, "column": 7 } } @@ -10705,15 +10873,15 @@ "updateContext": null }, "value": "/docs/{param*}", - "start": 990, - "end": 1006, + "start": 1049, + "end": 1065, "loc": { "start": { - "line": 34, + "line": 35, "column": 8 }, "end": { - "line": 34, + "line": 35, "column": 24 } } @@ -10731,15 +10899,15 @@ "binop": null, "updateContext": null }, - "start": 1006, - "end": 1007, + "start": 1065, + "end": 1066, "loc": { "start": { - "line": 34, + "line": 35, "column": 24 }, "end": { - "line": 34, + "line": 35, "column": 25 } } @@ -10757,15 +10925,15 @@ "binop": null }, "value": "controller", - "start": 1010, - "end": 1020, + "start": 1069, + "end": 1079, "loc": { "start": { - "line": 35, + "line": 36, "column": 2 }, "end": { - "line": 35, + "line": 36, "column": 12 } } @@ -10783,15 +10951,15 @@ "binop": null, "updateContext": null }, - "start": 1020, - "end": 1021, + "start": 1079, + "end": 1080, "loc": { "start": { - "line": 35, + "line": 36, "column": 12 }, "end": { - "line": 35, + "line": 36, "column": 13 } } @@ -10808,15 +10976,15 @@ "postfix": false, "binop": null }, - "start": 1022, - "end": 1023, + "start": 1081, + "end": 1082, "loc": { "start": { - "line": 35, + "line": 36, "column": 14 }, "end": { - "line": 35, + "line": 36, "column": 15 } } @@ -10834,15 +11002,15 @@ "binop": null }, "value": "directory", - "start": 1028, - "end": 1037, + "start": 1087, + "end": 1096, "loc": { "start": { - "line": 36, + "line": 37, "column": 4 }, "end": { - "line": 36, + "line": 37, "column": 13 } } @@ -10860,15 +11028,15 @@ "binop": null, "updateContext": null }, - "start": 1037, - "end": 1038, + "start": 1096, + "end": 1097, "loc": { "start": { - "line": 36, + "line": 37, "column": 13 }, "end": { - "line": 36, + "line": 37, "column": 14 } } @@ -10885,15 +11053,15 @@ "postfix": false, "binop": null }, - "start": 1039, - "end": 1040, + "start": 1098, + "end": 1099, "loc": { "start": { - "line": 36, + "line": 37, "column": 15 }, "end": { - "line": 36, + "line": 37, "column": 16 } } @@ -10911,15 +11079,15 @@ "binop": null }, "value": "path", - "start": 1047, - "end": 1051, + "start": 1106, + "end": 1110, "loc": { "start": { - "line": 37, + "line": 38, "column": 6 }, "end": { - "line": 37, + "line": 38, "column": 10 } } @@ -10937,15 +11105,15 @@ "binop": null, "updateContext": null }, - "start": 1051, - "end": 1052, + "start": 1110, + "end": 1111, "loc": { "start": { - "line": 37, + "line": 38, "column": 10 }, "end": { - "line": 37, + "line": 38, "column": 11 } } @@ -10963,15 +11131,15 @@ "binop": null }, "value": "path", - "start": 1053, - "end": 1057, + "start": 1112, + "end": 1116, "loc": { "start": { - "line": 37, + "line": 38, "column": 12 }, "end": { - "line": 37, + "line": 38, "column": 16 } } @@ -10989,15 +11157,15 @@ "binop": null, "updateContext": null }, - "start": 1057, - "end": 1058, + "start": 1116, + "end": 1117, "loc": { "start": { - "line": 37, + "line": 38, "column": 16 }, "end": { - "line": 37, + "line": 38, "column": 17 } } @@ -11015,15 +11183,15 @@ "binop": null }, "value": "resolve", - "start": 1058, - "end": 1065, + "start": 1117, + "end": 1124, "loc": { "start": { - "line": 37, + "line": 38, "column": 17 }, "end": { - "line": 37, + "line": 38, "column": 24 } } @@ -11040,15 +11208,15 @@ "postfix": false, "binop": null }, - "start": 1065, - "end": 1066, + "start": 1124, + "end": 1125, "loc": { "start": { - "line": 37, + "line": 38, "column": 24 }, "end": { - "line": 37, + "line": 38, "column": 25 } } @@ -11066,15 +11234,15 @@ "binop": null }, "value": "__dirname", - "start": 1066, - "end": 1075, + "start": 1125, + "end": 1134, "loc": { "start": { - "line": 37, + "line": 38, "column": 25 }, "end": { - "line": 37, + "line": 38, "column": 34 } } @@ -11092,15 +11260,15 @@ "binop": null, "updateContext": null }, - "start": 1075, - "end": 1076, + "start": 1134, + "end": 1135, "loc": { "start": { - "line": 37, + "line": 38, "column": 34 }, "end": { - "line": 37, + "line": 38, "column": 35 } } @@ -11119,15 +11287,15 @@ "updateContext": null }, "value": "../docs", - "start": 1077, - "end": 1086, + "start": 1136, + "end": 1145, "loc": { "start": { - "line": 37, + "line": 38, "column": 36 }, "end": { - "line": 37, + "line": 38, "column": 45 } } @@ -11144,15 +11312,15 @@ "postfix": false, "binop": null }, - "start": 1086, - "end": 1087, + "start": 1145, + "end": 1146, "loc": { "start": { - "line": 37, + "line": 38, "column": 45 }, "end": { - "line": 37, + "line": 38, "column": 46 } } @@ -11170,15 +11338,15 @@ "binop": null, "updateContext": null }, - "start": 1087, - "end": 1088, + "start": 1146, + "end": 1147, "loc": { "start": { - "line": 37, + "line": 38, "column": 46 }, "end": { - "line": 37, + "line": 38, "column": 47 } } @@ -11196,15 +11364,15 @@ "binop": null }, "value": "index", - "start": 1095, - "end": 1100, + "start": 1154, + "end": 1159, "loc": { "start": { - "line": 38, + "line": 39, "column": 6 }, "end": { - "line": 38, + "line": 39, "column": 11 } } @@ -11222,15 +11390,15 @@ "binop": null, "updateContext": null }, - "start": 1100, - "end": 1101, + "start": 1159, + "end": 1160, "loc": { "start": { - "line": 38, + "line": 39, "column": 11 }, "end": { - "line": 38, + "line": 39, "column": 12 } } @@ -11250,15 +11418,15 @@ "updateContext": null }, "value": "true", - "start": 1102, - "end": 1106, + "start": 1161, + "end": 1165, "loc": { "start": { - "line": 38, + "line": 39, "column": 13 }, "end": { - "line": 38, + "line": 39, "column": 17 } } @@ -11276,15 +11444,15 @@ "binop": null, "updateContext": null }, - "start": 1106, - "end": 1107, + "start": 1165, + "end": 1166, "loc": { "start": { - "line": 38, + "line": 39, "column": 17 }, "end": { - "line": 38, + "line": 39, "column": 18 } } @@ -11302,15 +11470,15 @@ "binop": null }, "value": "redirectToSlash", - "start": 1114, - "end": 1129, + "start": 1173, + "end": 1188, "loc": { "start": { - "line": 39, + "line": 40, "column": 6 }, "end": { - "line": 39, + "line": 40, "column": 21 } } @@ -11328,15 +11496,15 @@ "binop": null, "updateContext": null }, - "start": 1129, - "end": 1130, + "start": 1188, + "end": 1189, "loc": { "start": { - "line": 39, + "line": 40, "column": 21 }, "end": { - "line": 39, + "line": 40, "column": 22 } } @@ -11356,15 +11524,15 @@ "updateContext": null }, "value": "true", - "start": 1131, - "end": 1135, + "start": 1190, + "end": 1194, "loc": { "start": { - "line": 39, + "line": 40, "column": 23 }, "end": { - "line": 39, + "line": 40, "column": 27 } } @@ -11381,15 +11549,15 @@ "postfix": false, "binop": null }, - "start": 1140, - "end": 1141, + "start": 1199, + "end": 1200, "loc": { "start": { - "line": 40, + "line": 41, "column": 4 }, "end": { - "line": 40, + "line": 41, "column": 5 } } @@ -11406,15 +11574,15 @@ "postfix": false, "binop": null }, - "start": 1144, - "end": 1145, + "start": 1203, + "end": 1204, "loc": { "start": { - "line": 41, + "line": 42, "column": 2 }, "end": { - "line": 41, + "line": 42, "column": 3 } } @@ -11431,15 +11599,15 @@ "postfix": false, "binop": null }, - "start": 1146, - "end": 1147, + "start": 1205, + "end": 1206, "loc": { "start": { - "line": 42, + "line": 43, "column": 0 }, "end": { - "line": 42, + "line": 43, "column": 1 } } @@ -11457,15 +11625,15 @@ "binop": null, "updateContext": null }, - "start": 1147, - "end": 1148, + "start": 1206, + "end": 1207, "loc": { "start": { - "line": 42, + "line": 43, "column": 1 }, "end": { - "line": 42, + "line": 43, "column": 2 } } @@ -11482,15 +11650,15 @@ "postfix": false, "binop": null }, - "start": 1149, - "end": 1150, + "start": 1208, + "end": 1209, "loc": { "start": { - "line": 42, + "line": 43, "column": 3 }, "end": { - "line": 42, + "line": 43, "column": 4 } } @@ -11508,15 +11676,15 @@ "binop": null }, "value": "method", - "start": 1153, - "end": 1159, + "start": 1212, + "end": 1218, "loc": { "start": { - "line": 43, + "line": 44, "column": 2 }, "end": { - "line": 43, + "line": 44, "column": 8 } } @@ -11534,15 +11702,15 @@ "binop": null, "updateContext": null }, - "start": 1159, - "end": 1160, + "start": 1218, + "end": 1219, "loc": { "start": { - "line": 43, + "line": 44, "column": 8 }, "end": { - "line": 43, + "line": 44, "column": 9 } } @@ -11561,15 +11729,15 @@ "updateContext": null }, "value": "GET", - "start": 1161, - "end": 1166, + "start": 1220, + "end": 1225, "loc": { "start": { - "line": 43, + "line": 44, "column": 10 }, "end": { - "line": 43, + "line": 44, "column": 15 } } @@ -11587,15 +11755,15 @@ "binop": null, "updateContext": null }, - "start": 1166, - "end": 1167, + "start": 1225, + "end": 1226, "loc": { "start": { - "line": 43, + "line": 44, "column": 15 }, "end": { - "line": 43, + "line": 44, "column": 16 } } @@ -11613,15 +11781,15 @@ "binop": null }, "value": "path", - "start": 1170, - "end": 1174, + "start": 1229, + "end": 1233, "loc": { "start": { - "line": 44, + "line": 45, "column": 2 }, "end": { - "line": 44, + "line": 45, "column": 6 } } @@ -11639,15 +11807,15 @@ "binop": null, "updateContext": null }, - "start": 1174, - "end": 1175, + "start": 1233, + "end": 1234, "loc": { "start": { - "line": 44, + "line": 45, "column": 6 }, "end": { - "line": 44, + "line": 45, "column": 7 } } @@ -11666,15 +11834,15 @@ "updateContext": null }, "value": "/docs", - "start": 1176, - "end": 1183, + "start": 1235, + "end": 1242, "loc": { "start": { - "line": 44, + "line": 45, "column": 8 }, "end": { - "line": 44, + "line": 45, "column": 15 } } @@ -11692,15 +11860,15 @@ "binop": null, "updateContext": null }, - "start": 1183, - "end": 1184, + "start": 1242, + "end": 1243, "loc": { "start": { - "line": 44, + "line": 45, "column": 15 }, "end": { - "line": 44, + "line": 45, "column": 16 } } @@ -11718,15 +11886,15 @@ "binop": null }, "value": "controller", - "start": 1187, - "end": 1197, + "start": 1246, + "end": 1256, "loc": { "start": { - "line": 45, + "line": 46, "column": 2 }, "end": { - "line": 45, + "line": 46, "column": 12 } } @@ -11744,15 +11912,15 @@ "binop": null, "updateContext": null }, - "start": 1197, - "end": 1198, + "start": 1256, + "end": 1257, "loc": { "start": { - "line": 45, + "line": 46, "column": 12 }, "end": { - "line": 45, + "line": 46, "column": 13 } } @@ -11769,15 +11937,15 @@ "postfix": false, "binop": null }, - "start": 1199, - "end": 1200, + "start": 1258, + "end": 1259, "loc": { "start": { - "line": 45, + "line": 46, "column": 14 }, "end": { - "line": 45, + "line": 46, "column": 15 } } @@ -11795,15 +11963,15 @@ "binop": null }, "value": "request", - "start": 1200, - "end": 1207, + "start": 1259, + "end": 1266, "loc": { "start": { - "line": 45, + "line": 46, "column": 15 }, "end": { - "line": 45, + "line": 46, "column": 22 } } @@ -11821,15 +11989,15 @@ "binop": null, "updateContext": null }, - "start": 1207, - "end": 1208, + "start": 1266, + "end": 1267, "loc": { "start": { - "line": 45, + "line": 46, "column": 22 }, "end": { - "line": 45, + "line": 46, "column": 23 } } @@ -11847,15 +12015,15 @@ "binop": null }, "value": "handler", - "start": 1209, - "end": 1216, + "start": 1268, + "end": 1275, "loc": { "start": { - "line": 45, + "line": 46, "column": 24 }, "end": { - "line": 45, + "line": 46, "column": 31 } } @@ -11872,15 +12040,15 @@ "postfix": false, "binop": null }, - "start": 1216, - "end": 1217, + "start": 1275, + "end": 1276, "loc": { "start": { - "line": 45, + "line": 46, "column": 31 }, "end": { - "line": 45, + "line": 46, "column": 32 } } @@ -11898,15 +12066,15 @@ "binop": null, "updateContext": null }, - "start": 1218, - "end": 1220, + "start": 1277, + "end": 1279, "loc": { "start": { - "line": 45, + "line": 46, "column": 33 }, "end": { - "line": 45, + "line": 46, "column": 35 } } @@ -11923,15 +12091,15 @@ "postfix": false, "binop": null }, - "start": 1221, - "end": 1222, + "start": 1280, + "end": 1281, "loc": { "start": { - "line": 45, + "line": 46, "column": 36 }, "end": { - "line": 45, + "line": 46, "column": 37 } } @@ -11939,15 +12107,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 1227, - "end": 1249, + "start": 1286, + "end": 1308, "loc": { "start": { - "line": 46, + "line": 47, "column": 4 }, "end": { - "line": 46, + "line": 47, "column": 26 } } @@ -11967,15 +12135,15 @@ "updateContext": null }, "value": "return", - "start": 1254, - "end": 1260, + "start": 1313, + "end": 1319, "loc": { "start": { - "line": 47, + "line": 48, "column": 4 }, "end": { - "line": 47, + "line": 48, "column": 10 } } @@ -11993,15 +12161,15 @@ "binop": null }, "value": "handler", - "start": 1261, - "end": 1268, + "start": 1320, + "end": 1327, "loc": { "start": { - "line": 47, + "line": 48, "column": 11 }, "end": { - "line": 47, + "line": 48, "column": 18 } } @@ -12019,15 +12187,15 @@ "binop": null, "updateContext": null }, - "start": 1268, - "end": 1269, + "start": 1327, + "end": 1328, "loc": { "start": { - "line": 47, + "line": 48, "column": 18 }, "end": { - "line": 47, + "line": 48, "column": 19 } } @@ -12045,15 +12213,15 @@ "binop": null }, "value": "redirect", - "start": 1269, - "end": 1277, + "start": 1328, + "end": 1336, "loc": { "start": { - "line": 47, + "line": 48, "column": 19 }, "end": { - "line": 47, + "line": 48, "column": 27 } } @@ -12070,15 +12238,15 @@ "postfix": false, "binop": null }, - "start": 1277, - "end": 1278, + "start": 1336, + "end": 1337, "loc": { "start": { - "line": 47, + "line": 48, "column": 27 }, "end": { - "line": 47, + "line": 48, "column": 28 } } @@ -12097,15 +12265,15 @@ "updateContext": null }, "value": "/docs/", - "start": 1278, - "end": 1286, + "start": 1337, + "end": 1345, "loc": { "start": { - "line": 47, + "line": 48, "column": 28 }, "end": { - "line": 47, + "line": 48, "column": 36 } } @@ -12122,15 +12290,15 @@ "postfix": false, "binop": null }, - "start": 1286, - "end": 1287, + "start": 1345, + "end": 1346, "loc": { "start": { - "line": 47, + "line": 48, "column": 36 }, "end": { - "line": 47, + "line": 48, "column": 37 } } @@ -12148,15 +12316,15 @@ "binop": null, "updateContext": null }, - "start": 1287, - "end": 1288, + "start": 1346, + "end": 1347, "loc": { "start": { - "line": 47, + "line": 48, "column": 37 }, "end": { - "line": 47, + "line": 48, "column": 38 } } @@ -12173,15 +12341,15 @@ "postfix": false, "binop": null }, - "start": 1291, - "end": 1292, + "start": 1350, + "end": 1351, "loc": { "start": { - "line": 48, + "line": 49, "column": 2 }, "end": { - "line": 48, + "line": 49, "column": 3 } } @@ -12198,15 +12366,15 @@ "postfix": false, "binop": null }, - "start": 1293, - "end": 1294, + "start": 1352, + "end": 1353, "loc": { "start": { - "line": 49, + "line": 50, "column": 0 }, "end": { - "line": 49, + "line": 50, "column": 1 } } @@ -12224,15 +12392,15 @@ "binop": null, "updateContext": null }, - "start": 1294, - "end": 1295, + "start": 1353, + "end": 1354, "loc": { "start": { - "line": 49, + "line": 50, "column": 1 }, "end": { - "line": 49, + "line": 50, "column": 2 } } @@ -12250,15 +12418,15 @@ "binop": null, "updateContext": null }, - "start": 1295, - "end": 1296, + "start": 1354, + "end": 1355, "loc": { "start": { - "line": 49, + "line": 50, "column": 2 }, "end": { - "line": 49, + "line": 50, "column": 3 } } @@ -12266,15 +12434,15 @@ { "type": "CommentBlock", "value": "*\n * Entry point to run the server\n * @return {undefined} no return\n ", - "start": 1297, - "end": 1370, + "start": 1356, + "end": 1429, "loc": { "start": { - "line": 50, + "line": 51, "column": 0 }, "end": { - "line": 53, + "line": 54, "column": 3 } } @@ -12294,15 +12462,15 @@ "updateContext": null }, "value": "export", - "start": 1371, - "end": 1377, + "start": 1430, + "end": 1436, "loc": { "start": { - "line": 54, + "line": 55, "column": 0 }, "end": { - "line": 54, + "line": 55, "column": 6 } } @@ -12322,15 +12490,15 @@ "updateContext": null }, "value": "default", - "start": 1378, - "end": 1385, + "start": 1437, + "end": 1444, "loc": { "start": { - "line": 54, + "line": 55, "column": 7 }, "end": { - "line": 54, + "line": 55, "column": 14 } } @@ -12347,15 +12515,15 @@ "postfix": false, "binop": null }, - "start": 1386, - "end": 1387, + "start": 1445, + "end": 1446, "loc": { "start": { - "line": 54, + "line": 55, "column": 15 }, "end": { - "line": 54, + "line": 55, "column": 16 } } @@ -12373,15 +12541,15 @@ "binop": null }, "value": "async", - "start": 1387, - "end": 1392, + "start": 1446, + "end": 1451, "loc": { "start": { - "line": 54, + "line": 55, "column": 16 }, "end": { - "line": 54, + "line": 55, "column": 21 } } @@ -12400,15 +12568,15 @@ "binop": null }, "value": "function", - "start": 1393, - "end": 1401, + "start": 1452, + "end": 1460, "loc": { "start": { - "line": 54, + "line": 55, "column": 22 }, "end": { - "line": 54, + "line": 55, "column": 30 } } @@ -12426,15 +12594,15 @@ "binop": null }, "value": "main", - "start": 1402, - "end": 1406, + "start": 1461, + "end": 1465, "loc": { "start": { - "line": 54, + "line": 55, "column": 31 }, "end": { - "line": 54, + "line": 55, "column": 35 } } @@ -12451,15 +12619,15 @@ "postfix": false, "binop": null }, - "start": 1406, - "end": 1407, + "start": 1465, + "end": 1466, "loc": { "start": { - "line": 54, + "line": 55, "column": 35 }, "end": { - "line": 54, + "line": 55, "column": 36 } } @@ -12476,15 +12644,15 @@ "postfix": false, "binop": null }, - "start": 1407, - "end": 1408, + "start": 1466, + "end": 1467, "loc": { "start": { - "line": 54, + "line": 55, "column": 36 }, "end": { - "line": 54, + "line": 55, "column": 37 } } @@ -12501,15 +12669,15 @@ "postfix": false, "binop": null }, - "start": 1409, - "end": 1410, + "start": 1468, + "end": 1469, "loc": { "start": { - "line": 54, + "line": 55, "column": 38 }, "end": { - "line": 54, + "line": 55, "column": 39 } } @@ -12517,15 +12685,15 @@ { "type": "CommentLine", "value": " TODO: Check if mysql can be connected/db exists (use name in config file)", - "start": 1413, - "end": 1489, + "start": 1472, + "end": 1548, "loc": { "start": { - "line": 55, + "line": 56, "column": 2 }, "end": { - "line": 55, + "line": 56, "column": 78 } } @@ -12545,15 +12713,15 @@ "updateContext": null }, "value": "try", - "start": 1492, - "end": 1495, + "start": 1551, + "end": 1554, "loc": { "start": { - "line": 56, + "line": 57, "column": 2 }, "end": { - "line": 56, + "line": 57, "column": 5 } } @@ -12570,15 +12738,15 @@ "postfix": false, "binop": null }, - "start": 1496, - "end": 1497, + "start": 1555, + "end": 1556, "loc": { "start": { - "line": 56, + "line": 57, "column": 6 }, "end": { - "line": 56, + "line": 57, "column": 7 } } @@ -12598,15 +12766,15 @@ "updateContext": null }, "value": "const", - "start": 1502, - "end": 1507, + "start": 1561, + "end": 1566, "loc": { "start": { - "line": 57, + "line": 58, "column": 4 }, "end": { - "line": 57, + "line": 58, "column": 9 } } @@ -12624,15 +12792,15 @@ "binop": null }, "value": "server", - "start": 1508, - "end": 1514, + "start": 1567, + "end": 1573, "loc": { "start": { - "line": 57, + "line": 58, "column": 10 }, "end": { - "line": 57, + "line": 58, "column": 16 } } @@ -12651,15 +12819,15 @@ "updateContext": null }, "value": "=", - "start": 1515, - "end": 1516, + "start": 1574, + "end": 1575, "loc": { "start": { - "line": 57, + "line": 58, "column": 17 }, "end": { - "line": 57, + "line": 58, "column": 18 } } @@ -12679,15 +12847,15 @@ "updateContext": null }, "value": "new", - "start": 1517, - "end": 1520, + "start": 1576, + "end": 1579, "loc": { "start": { - "line": 57, + "line": 58, "column": 19 }, "end": { - "line": 57, + "line": 58, "column": 22 } } @@ -12705,15 +12873,15 @@ "binop": null }, "value": "Server", - "start": 1521, - "end": 1527, + "start": 1580, + "end": 1586, "loc": { "start": { - "line": 57, + "line": 58, "column": 23 }, "end": { - "line": 57, + "line": 58, "column": 29 } } @@ -12730,15 +12898,15 @@ "postfix": false, "binop": null }, - "start": 1527, - "end": 1528, + "start": 1586, + "end": 1587, "loc": { "start": { - "line": 57, + "line": 58, "column": 29 }, "end": { - "line": 57, + "line": 58, "column": 30 } } @@ -12755,15 +12923,15 @@ "postfix": false, "binop": null }, - "start": 1528, - "end": 1529, + "start": 1587, + "end": 1588, "loc": { "start": { - "line": 57, + "line": 58, "column": 30 }, "end": { - "line": 57, + "line": 58, "column": 31 } } @@ -12781,15 +12949,15 @@ "binop": null }, "value": "name", - "start": 1536, - "end": 1540, + "start": 1595, + "end": 1599, "loc": { "start": { - "line": 58, + "line": 59, "column": 6 }, "end": { - "line": 58, + "line": 59, "column": 10 } } @@ -12807,15 +12975,15 @@ "binop": null, "updateContext": null }, - "start": 1540, - "end": 1541, + "start": 1599, + "end": 1600, "loc": { "start": { - "line": 58, + "line": 59, "column": 10 }, "end": { - "line": 58, + "line": 59, "column": 11 } } @@ -12833,15 +13001,15 @@ "binop": null }, "value": "CONFIG", - "start": 1542, - "end": 1548, + "start": 1601, + "end": 1607, "loc": { "start": { - "line": 58, + "line": 59, "column": 12 }, "end": { - "line": 58, + "line": 59, "column": 18 } } @@ -12859,15 +13027,15 @@ "binop": null, "updateContext": null }, - "start": 1548, - "end": 1549, + "start": 1607, + "end": 1608, "loc": { "start": { - "line": 58, + "line": 59, "column": 18 }, "end": { - "line": 58, + "line": 59, "column": 19 } } @@ -12885,15 +13053,15 @@ "binop": null }, "value": "SERVER", - "start": 1549, - "end": 1555, + "start": 1608, + "end": 1614, "loc": { "start": { - "line": 58, + "line": 59, "column": 19 }, "end": { - "line": 58, + "line": 59, "column": 25 } } @@ -12911,15 +13079,15 @@ "binop": null, "updateContext": null }, - "start": 1555, - "end": 1556, + "start": 1614, + "end": 1615, "loc": { "start": { - "line": 58, + "line": 59, "column": 25 }, "end": { - "line": 58, + "line": 59, "column": 26 } } @@ -12937,15 +13105,15 @@ "binop": null }, "value": "name", - "start": 1556, - "end": 1560, + "start": 1615, + "end": 1619, "loc": { "start": { - "line": 58, + "line": 59, "column": 26 }, "end": { - "line": 58, + "line": 59, "column": 30 } } @@ -12963,15 +13131,15 @@ "binop": null, "updateContext": null }, - "start": 1560, - "end": 1561, + "start": 1619, + "end": 1620, "loc": { "start": { - "line": 58, + "line": 59, "column": 30 }, "end": { - "line": 58, + "line": 59, "column": 31 } } @@ -12989,15 +13157,15 @@ "binop": null }, "value": "host", - "start": 1568, - "end": 1572, + "start": 1627, + "end": 1631, "loc": { "start": { - "line": 59, + "line": 60, "column": 6 }, "end": { - "line": 59, + "line": 60, "column": 10 } } @@ -13015,15 +13183,15 @@ "binop": null, "updateContext": null }, - "start": 1572, - "end": 1573, + "start": 1631, + "end": 1632, "loc": { "start": { - "line": 59, + "line": 60, "column": 10 }, "end": { - "line": 59, + "line": 60, "column": 11 } } @@ -13041,15 +13209,15 @@ "binop": null }, "value": "CONFIG", - "start": 1574, - "end": 1580, + "start": 1633, + "end": 1639, "loc": { "start": { - "line": 59, + "line": 60, "column": 12 }, "end": { - "line": 59, + "line": 60, "column": 18 } } @@ -13067,15 +13235,15 @@ "binop": null, "updateContext": null }, - "start": 1580, - "end": 1581, + "start": 1639, + "end": 1640, "loc": { "start": { - "line": 59, + "line": 60, "column": 18 }, "end": { - "line": 59, + "line": 60, "column": 19 } } @@ -13093,15 +13261,15 @@ "binop": null }, "value": "SERVER", - "start": 1581, - "end": 1587, + "start": 1640, + "end": 1646, "loc": { "start": { - "line": 59, + "line": 60, "column": 19 }, "end": { - "line": 59, + "line": 60, "column": 25 } } @@ -13119,15 +13287,15 @@ "binop": null, "updateContext": null }, - "start": 1587, - "end": 1588, + "start": 1646, + "end": 1647, "loc": { "start": { - "line": 59, + "line": 60, "column": 25 }, "end": { - "line": 59, + "line": 60, "column": 26 } } @@ -13145,15 +13313,15 @@ "binop": null }, "value": "host", - "start": 1588, - "end": 1592, + "start": 1647, + "end": 1651, "loc": { "start": { - "line": 59, + "line": 60, "column": 26 }, "end": { - "line": 59, + "line": 60, "column": 30 } } @@ -13171,15 +13339,15 @@ "binop": null, "updateContext": null }, - "start": 1592, - "end": 1593, + "start": 1651, + "end": 1652, "loc": { "start": { - "line": 59, + "line": 60, "column": 30 }, "end": { - "line": 59, + "line": 60, "column": 31 } } @@ -13197,15 +13365,15 @@ "binop": null }, "value": "port", - "start": 1600, - "end": 1604, + "start": 1659, + "end": 1663, "loc": { "start": { - "line": 60, + "line": 61, "column": 6 }, "end": { - "line": 60, + "line": 61, "column": 10 } } @@ -13223,15 +13391,15 @@ "binop": null, "updateContext": null }, - "start": 1604, - "end": 1605, + "start": 1663, + "end": 1664, "loc": { "start": { - "line": 60, + "line": 61, "column": 10 }, "end": { - "line": 60, + "line": 61, "column": 11 } } @@ -13249,15 +13417,15 @@ "binop": null }, "value": "CONFIG", - "start": 1606, - "end": 1612, + "start": 1665, + "end": 1671, "loc": { "start": { - "line": 60, + "line": 61, "column": 12 }, "end": { - "line": 60, + "line": 61, "column": 18 } } @@ -13275,15 +13443,15 @@ "binop": null, "updateContext": null }, - "start": 1612, - "end": 1613, + "start": 1671, + "end": 1672, "loc": { "start": { - "line": 60, + "line": 61, "column": 18 }, "end": { - "line": 60, + "line": 61, "column": 19 } } @@ -13301,15 +13469,15 @@ "binop": null }, "value": "SERVER", - "start": 1613, - "end": 1619, + "start": 1672, + "end": 1678, "loc": { "start": { - "line": 60, + "line": 61, "column": 19 }, "end": { - "line": 60, + "line": 61, "column": 25 } } @@ -13327,15 +13495,15 @@ "binop": null, "updateContext": null }, - "start": 1619, - "end": 1620, + "start": 1678, + "end": 1679, "loc": { "start": { - "line": 60, + "line": 61, "column": 25 }, "end": { - "line": 60, + "line": 61, "column": 26 } } @@ -13353,15 +13521,15 @@ "binop": null }, "value": "port", - "start": 1620, - "end": 1624, + "start": 1679, + "end": 1683, "loc": { "start": { - "line": 60, + "line": 61, "column": 26 }, "end": { - "line": 60, + "line": 61, "column": 30 } } @@ -13379,15 +13547,15 @@ "binop": null, "updateContext": null }, - "start": 1624, - "end": 1625, + "start": 1683, + "end": 1684, "loc": { "start": { - "line": 60, + "line": 61, "column": 30 }, "end": { - "line": 60, + "line": 61, "column": 31 } } @@ -13405,15 +13573,15 @@ "binop": null }, "value": "debug", - "start": 1632, - "end": 1637, + "start": 1691, + "end": 1696, "loc": { "start": { - "line": 61, + "line": 62, "column": 6 }, "end": { - "line": 61, + "line": 62, "column": 11 } } @@ -13431,15 +13599,15 @@ "binop": null, "updateContext": null }, - "start": 1637, - "end": 1638, + "start": 1696, + "end": 1697, "loc": { "start": { - "line": 61, + "line": 62, "column": 11 }, "end": { - "line": 61, + "line": 62, "column": 12 } } @@ -13457,15 +13625,15 @@ "binop": null }, "value": "CONFIG", - "start": 1639, - "end": 1645, + "start": 1698, + "end": 1704, "loc": { "start": { - "line": 61, + "line": 62, "column": 13 }, "end": { - "line": 61, + "line": 62, "column": 19 } } @@ -13483,15 +13651,15 @@ "binop": null, "updateContext": null }, - "start": 1645, - "end": 1646, + "start": 1704, + "end": 1705, "loc": { "start": { - "line": 61, + "line": 62, "column": 19 }, "end": { - "line": 61, + "line": 62, "column": 20 } } @@ -13509,15 +13677,15 @@ "binop": null }, "value": "LOGS", - "start": 1646, - "end": 1650, + "start": 1705, + "end": 1709, "loc": { "start": { - "line": 61, + "line": 62, "column": 20 }, "end": { - "line": 61, + "line": 62, "column": 24 } } @@ -13535,15 +13703,15 @@ "binop": null, "updateContext": null }, - "start": 1650, - "end": 1651, + "start": 1709, + "end": 1710, "loc": { "start": { - "line": 61, + "line": 62, "column": 24 }, "end": { - "line": 61, + "line": 62, "column": 25 } } @@ -13561,15 +13729,15 @@ "binop": null }, "value": "debug", - "start": 1651, - "end": 1656, + "start": 1710, + "end": 1715, "loc": { "start": { - "line": 61, + "line": 62, "column": 25 }, "end": { - "line": 61, + "line": 62, "column": 30 } } @@ -13587,15 +13755,15 @@ "binop": null, "updateContext": null }, - "start": 1656, - "end": 1657, + "start": 1715, + "end": 1716, "loc": { "start": { - "line": 61, + "line": 62, "column": 30 }, "end": { - "line": 61, + "line": 62, "column": 31 } } @@ -13613,15 +13781,15 @@ "binop": null }, "value": "logDir", - "start": 1664, - "end": 1670, + "start": 1723, + "end": 1729, "loc": { "start": { - "line": 62, + "line": 63, "column": 6 }, "end": { - "line": 62, + "line": 63, "column": 12 } } @@ -13639,15 +13807,15 @@ "binop": null, "updateContext": null }, - "start": 1670, - "end": 1671, + "start": 1729, + "end": 1730, "loc": { "start": { - "line": 62, + "line": 63, "column": 12 }, "end": { - "line": 62, + "line": 63, "column": 13 } } @@ -13665,15 +13833,15 @@ "binop": null }, "value": "CONFIG", - "start": 1672, - "end": 1678, + "start": 1731, + "end": 1737, "loc": { "start": { - "line": 62, + "line": 63, "column": 14 }, "end": { - "line": 62, + "line": 63, "column": 20 } } @@ -13691,15 +13859,15 @@ "binop": null, "updateContext": null }, - "start": 1678, - "end": 1679, + "start": 1737, + "end": 1738, "loc": { "start": { - "line": 62, + "line": 63, "column": 20 }, "end": { - "line": 62, + "line": 63, "column": 21 } } @@ -13717,15 +13885,15 @@ "binop": null }, "value": "LOGS", - "start": 1679, - "end": 1683, + "start": 1738, + "end": 1742, "loc": { "start": { - "line": 62, + "line": 63, "column": 21 }, "end": { - "line": 62, + "line": 63, "column": 25 } } @@ -13743,15 +13911,15 @@ "binop": null, "updateContext": null }, - "start": 1683, - "end": 1684, + "start": 1742, + "end": 1743, "loc": { "start": { - "line": 62, + "line": 63, "column": 25 }, "end": { - "line": 62, + "line": 63, "column": 26 } } @@ -13769,15 +13937,15 @@ "binop": null }, "value": "dir", - "start": 1684, - "end": 1687, + "start": 1743, + "end": 1746, "loc": { "start": { - "line": 62, + "line": 63, "column": 26 }, "end": { - "line": 62, + "line": 63, "column": 29 } } @@ -13795,15 +13963,15 @@ "binop": null, "updateContext": null }, - "start": 1687, - "end": 1688, + "start": 1746, + "end": 1747, "loc": { "start": { - "line": 62, + "line": 63, "column": 29 }, "end": { - "line": 62, + "line": 63, "column": 30 } } @@ -13821,15 +13989,15 @@ "binop": null }, "value": "logLevel", - "start": 1695, - "end": 1703, + "start": 1754, + "end": 1762, "loc": { "start": { - "line": 63, + "line": 64, "column": 6 }, "end": { - "line": 63, + "line": 64, "column": 14 } } @@ -13847,15 +14015,15 @@ "binop": null, "updateContext": null }, - "start": 1703, - "end": 1704, + "start": 1762, + "end": 1763, "loc": { "start": { - "line": 63, + "line": 64, "column": 14 }, "end": { - "line": 63, + "line": 64, "column": 15 } } @@ -13873,15 +14041,15 @@ "binop": null }, "value": "CONFIG", - "start": 1705, - "end": 1711, + "start": 1764, + "end": 1770, "loc": { "start": { - "line": 63, + "line": 64, "column": 16 }, "end": { - "line": 63, + "line": 64, "column": 22 } } @@ -13899,15 +14067,15 @@ "binop": null, "updateContext": null }, - "start": 1711, - "end": 1712, + "start": 1770, + "end": 1771, "loc": { "start": { - "line": 63, + "line": 64, "column": 22 }, "end": { - "line": 63, + "line": 64, "column": 23 } } @@ -13925,15 +14093,15 @@ "binop": null }, "value": "LOGS", - "start": 1712, - "end": 1716, + "start": 1771, + "end": 1775, "loc": { "start": { - "line": 63, + "line": 64, "column": 23 }, "end": { - "line": 63, + "line": 64, "column": 27 } } @@ -13951,15 +14119,15 @@ "binop": null, "updateContext": null }, - "start": 1716, - "end": 1717, + "start": 1775, + "end": 1776, "loc": { "start": { - "line": 63, + "line": 64, "column": 27 }, "end": { - "line": 63, + "line": 64, "column": 28 } } @@ -13977,15 +14145,15 @@ "binop": null }, "value": "level", - "start": 1717, - "end": 1722, + "start": 1776, + "end": 1781, "loc": { "start": { - "line": 63, + "line": 64, "column": 28 }, "end": { - "line": 63, + "line": 64, "column": 33 } } @@ -14002,15 +14170,15 @@ "postfix": false, "binop": null }, - "start": 1727, - "end": 1728, + "start": 1786, + "end": 1787, "loc": { "start": { - "line": 64, + "line": 65, "column": 4 }, "end": { - "line": 64, + "line": 65, "column": 5 } } @@ -14027,15 +14195,15 @@ "postfix": false, "binop": null }, - "start": 1728, - "end": 1729, + "start": 1787, + "end": 1788, "loc": { "start": { - "line": 64, + "line": 65, "column": 5 }, "end": { - "line": 64, + "line": 65, "column": 6 } } @@ -14053,15 +14221,15 @@ "binop": null, "updateContext": null }, - "start": 1729, - "end": 1730, + "start": 1788, + "end": 1789, "loc": { "start": { - "line": 64, + "line": 65, "column": 6 }, "end": { - "line": 64, + "line": 65, "column": 7 } } @@ -14079,15 +14247,15 @@ "binop": null }, "value": "await", - "start": 1736, - "end": 1741, + "start": 1795, + "end": 1800, "loc": { "start": { - "line": 66, + "line": 67, "column": 4 }, "end": { - "line": 66, + "line": 67, "column": 9 } } @@ -14105,15 +14273,15 @@ "binop": null }, "value": "server", - "start": 1742, - "end": 1748, + "start": 1801, + "end": 1807, "loc": { "start": { - "line": 66, + "line": 67, "column": 10 }, "end": { - "line": 66, + "line": 67, "column": 16 } } @@ -14131,15 +14299,15 @@ "binop": null, "updateContext": null }, - "start": 1748, - "end": 1749, + "start": 1807, + "end": 1808, "loc": { "start": { - "line": 66, + "line": 67, "column": 16 }, "end": { - "line": 66, + "line": 67, "column": 17 } } @@ -14157,15 +14325,15 @@ "binop": null }, "value": "run", - "start": 1749, - "end": 1752, + "start": 1808, + "end": 1811, "loc": { "start": { - "line": 66, + "line": 67, "column": 17 }, "end": { - "line": 66, + "line": 67, "column": 20 } } @@ -14182,15 +14350,15 @@ "postfix": false, "binop": null }, - "start": 1752, - "end": 1753, + "start": 1811, + "end": 1812, "loc": { "start": { - "line": 66, + "line": 67, "column": 20 }, "end": { - "line": 66, + "line": 67, "column": 21 } } @@ -14207,15 +14375,15 @@ "postfix": false, "binop": null }, - "start": 1753, - "end": 1754, + "start": 1812, + "end": 1813, "loc": { "start": { - "line": 66, + "line": 67, "column": 21 }, "end": { - "line": 66, + "line": 67, "column": 22 } } @@ -14233,15 +14401,15 @@ "binop": null, "updateContext": null }, - "start": 1754, - "end": 1755, + "start": 1813, + "end": 1814, "loc": { "start": { - "line": 66, + "line": 67, "column": 22 }, "end": { - "line": 66, + "line": 67, "column": 23 } } @@ -14259,15 +14427,15 @@ "binop": null }, "value": "server", - "start": 1761, - "end": 1767, + "start": 1820, + "end": 1826, "loc": { "start": { - "line": 68, + "line": 69, "column": 4 }, "end": { - "line": 68, + "line": 69, "column": 10 } } @@ -14285,15 +14453,15 @@ "binop": null, "updateContext": null }, - "start": 1767, - "end": 1768, + "start": 1826, + "end": 1827, "loc": { "start": { - "line": 68, + "line": 69, "column": 10 }, "end": { - "line": 68, + "line": 69, "column": 11 } } @@ -14311,15 +14479,15 @@ "binop": null }, "value": "addEndpoints", - "start": 1768, - "end": 1780, + "start": 1827, + "end": 1839, "loc": { "start": { - "line": 68, + "line": 69, "column": 11 }, "end": { - "line": 68, + "line": 69, "column": 23 } } @@ -14336,15 +14504,15 @@ "postfix": false, "binop": null }, - "start": 1780, - "end": 1781, + "start": 1839, + "end": 1840, "loc": { "start": { - "line": 68, + "line": 69, "column": 23 }, "end": { - "line": 68, + "line": 69, "column": 24 } } @@ -14362,15 +14530,15 @@ "binop": null }, "value": "apiRoutes", - "start": 1781, - "end": 1790, + "start": 1840, + "end": 1849, "loc": { "start": { - "line": 68, + "line": 69, "column": 24 }, "end": { - "line": 68, + "line": 69, "column": 33 } } @@ -14387,15 +14555,15 @@ "postfix": false, "binop": null }, - "start": 1790, - "end": 1791, + "start": 1849, + "end": 1850, "loc": { "start": { - "line": 68, + "line": 69, "column": 33 }, "end": { - "line": 68, + "line": 69, "column": 34 } } @@ -14413,15 +14581,15 @@ "binop": null, "updateContext": null }, - "start": 1791, - "end": 1792, + "start": 1850, + "end": 1851, "loc": { "start": { - "line": 68, + "line": 69, "column": 34 }, "end": { - "line": 68, + "line": 69, "column": 35 } } @@ -14439,15 +14607,15 @@ "binop": null }, "value": "server", - "start": 1797, - "end": 1803, + "start": 1856, + "end": 1862, "loc": { "start": { - "line": 69, + "line": 70, "column": 4 }, "end": { - "line": 69, + "line": 70, "column": 10 } } @@ -14465,15 +14633,15 @@ "binop": null, "updateContext": null }, - "start": 1803, - "end": 1804, + "start": 1862, + "end": 1863, "loc": { "start": { - "line": 69, + "line": 70, "column": 10 }, "end": { - "line": 69, + "line": 70, "column": 11 } } @@ -14491,15 +14659,15 @@ "binop": null }, "value": "addEndpoints", - "start": 1804, - "end": 1816, + "start": 1863, + "end": 1875, "loc": { "start": { - "line": 69, + "line": 70, "column": 11 }, "end": { - "line": 69, + "line": 70, "column": 23 } } @@ -14516,15 +14684,15 @@ "postfix": false, "binop": null }, - "start": 1816, - "end": 1817, + "start": 1875, + "end": 1876, "loc": { "start": { - "line": 69, + "line": 70, "column": 23 }, "end": { - "line": 69, + "line": 70, "column": 24 } } @@ -14542,15 +14710,15 @@ "binop": null }, "value": "adminRoutes", - "start": 1817, - "end": 1828, + "start": 1876, + "end": 1887, "loc": { "start": { - "line": 69, + "line": 70, "column": 24 }, "end": { - "line": 69, + "line": 70, "column": 35 } } @@ -14567,15 +14735,15 @@ "postfix": false, "binop": null }, - "start": 1828, - "end": 1829, + "start": 1887, + "end": 1888, "loc": { "start": { - "line": 69, + "line": 70, "column": 35 }, "end": { - "line": 69, + "line": 70, "column": 36 } } @@ -14593,15 +14761,15 @@ "binop": null, "updateContext": null }, - "start": 1829, - "end": 1830, + "start": 1888, + "end": 1889, "loc": { "start": { - "line": 69, + "line": 70, "column": 36 }, "end": { - "line": 69, + "line": 70, "column": 37 } } @@ -14621,15 +14789,15 @@ "updateContext": null }, "value": "if", - "start": 1836, - "end": 1838, + "start": 1895, + "end": 1897, "loc": { "start": { - "line": 71, + "line": 72, "column": 4 }, "end": { - "line": 71, + "line": 72, "column": 6 } } @@ -14646,15 +14814,15 @@ "postfix": false, "binop": null }, - "start": 1839, - "end": 1840, + "start": 1898, + "end": 1899, "loc": { "start": { - "line": 71, + "line": 72, "column": 7 }, "end": { - "line": 71, + "line": 72, "column": 8 } } @@ -14672,15 +14840,15 @@ "binop": null }, "value": "CONFIG", - "start": 1840, - "end": 1846, + "start": 1899, + "end": 1905, "loc": { "start": { - "line": 71, + "line": 72, "column": 8 }, "end": { - "line": 71, + "line": 72, "column": 14 } } @@ -14698,15 +14866,15 @@ "binop": null, "updateContext": null }, - "start": 1846, - "end": 1847, + "start": 1905, + "end": 1906, "loc": { "start": { - "line": 71, + "line": 72, "column": 14 }, "end": { - "line": 71, + "line": 72, "column": 15 } } @@ -14724,15 +14892,15 @@ "binop": null }, "value": "SERVER", - "start": 1847, - "end": 1853, + "start": 1906, + "end": 1912, "loc": { "start": { - "line": 71, + "line": 72, "column": 15 }, "end": { - "line": 71, + "line": 72, "column": 21 } } @@ -14750,15 +14918,15 @@ "binop": null, "updateContext": null }, - "start": 1853, - "end": 1854, + "start": 1912, + "end": 1913, "loc": { "start": { - "line": 71, + "line": 72, "column": 21 }, "end": { - "line": 71, + "line": 72, "column": 22 } } @@ -14776,15 +14944,15 @@ "binop": null }, "value": "docs", - "start": 1854, - "end": 1858, + "start": 1913, + "end": 1917, "loc": { "start": { - "line": 71, + "line": 72, "column": 22 }, "end": { - "line": 71, + "line": 72, "column": 26 } } @@ -14801,15 +14969,15 @@ "postfix": false, "binop": null }, - "start": 1858, - "end": 1859, + "start": 1917, + "end": 1918, "loc": { "start": { - "line": 71, + "line": 72, "column": 26 }, "end": { - "line": 71, + "line": 72, "column": 27 } } @@ -14826,15 +14994,15 @@ "postfix": false, "binop": null }, - "start": 1860, - "end": 1861, + "start": 1919, + "end": 1920, "loc": { "start": { - "line": 71, + "line": 72, "column": 28 }, "end": { - "line": 71, + "line": 72, "column": 29 } } @@ -14852,15 +15020,15 @@ "binop": null }, "value": "server", - "start": 1868, - "end": 1874, + "start": 1927, + "end": 1933, "loc": { "start": { - "line": 72, + "line": 73, "column": 6 }, "end": { - "line": 72, + "line": 73, "column": 12 } } @@ -14878,15 +15046,15 @@ "binop": null, "updateContext": null }, - "start": 1874, - "end": 1875, + "start": 1933, + "end": 1934, "loc": { "start": { - "line": 72, + "line": 73, "column": 12 }, "end": { - "line": 72, + "line": 73, "column": 13 } } @@ -14904,15 +15072,15 @@ "binop": null }, "value": "addEndpoints", - "start": 1875, - "end": 1887, + "start": 1934, + "end": 1946, "loc": { "start": { - "line": 72, + "line": 73, "column": 13 }, "end": { - "line": 72, + "line": 73, "column": 25 } } @@ -14929,15 +15097,15 @@ "postfix": false, "binop": null }, - "start": 1887, - "end": 1888, + "start": 1946, + "end": 1947, "loc": { "start": { - "line": 72, + "line": 73, "column": 25 }, "end": { - "line": 72, + "line": 73, "column": 26 } } @@ -14955,15 +15123,15 @@ "binop": null }, "value": "docRoutes", - "start": 1888, - "end": 1897, + "start": 1947, + "end": 1956, "loc": { "start": { - "line": 72, + "line": 73, "column": 26 }, "end": { - "line": 72, + "line": 73, "column": 35 } } @@ -14980,15 +15148,15 @@ "postfix": false, "binop": null }, - "start": 1897, - "end": 1898, + "start": 1956, + "end": 1957, "loc": { "start": { - "line": 72, + "line": 73, "column": 35 }, "end": { - "line": 72, + "line": 73, "column": 36 } } @@ -15006,15 +15174,15 @@ "binop": null, "updateContext": null }, - "start": 1898, - "end": 1899, + "start": 1957, + "end": 1958, "loc": { "start": { - "line": 72, + "line": 73, "column": 36 }, "end": { - "line": 72, + "line": 73, "column": 37 } } @@ -15031,15 +15199,15 @@ "postfix": false, "binop": null }, - "start": 1904, - "end": 1905, + "start": 1963, + "end": 1964, "loc": { "start": { - "line": 73, + "line": 74, "column": 4 }, "end": { - "line": 73, + "line": 74, "column": 5 } } @@ -15057,15 +15225,15 @@ "binop": null }, "value": "process", - "start": 1911, - "end": 1918, + "start": 1970, + "end": 1977, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 11 } } @@ -15083,15 +15251,15 @@ "binop": null, "updateContext": null }, - "start": 1918, - "end": 1919, + "start": 1977, + "end": 1978, "loc": { "start": { - "line": 75, + "line": 76, "column": 11 }, "end": { - "line": 75, + "line": 76, "column": 12 } } @@ -15109,15 +15277,15 @@ "binop": null }, "value": "on", - "start": 1919, - "end": 1921, + "start": 1978, + "end": 1980, "loc": { "start": { - "line": 75, + "line": 76, "column": 12 }, "end": { - "line": 75, + "line": 76, "column": 14 } } @@ -15134,15 +15302,15 @@ "postfix": false, "binop": null }, - "start": 1921, - "end": 1922, + "start": 1980, + "end": 1981, "loc": { "start": { - "line": 75, + "line": 76, "column": 14 }, "end": { - "line": 75, + "line": 76, "column": 15 } } @@ -15161,15 +15329,15 @@ "updateContext": null }, "value": "SIGTERM", - "start": 1922, - "end": 1931, + "start": 1981, + "end": 1990, "loc": { "start": { - "line": 75, + "line": 76, "column": 15 }, "end": { - "line": 75, + "line": 76, "column": 24 } } @@ -15187,15 +15355,15 @@ "binop": null, "updateContext": null }, - "start": 1931, - "end": 1932, + "start": 1990, + "end": 1991, "loc": { "start": { - "line": 75, + "line": 76, "column": 24 }, "end": { - "line": 75, + "line": 76, "column": 25 } } @@ -15212,15 +15380,15 @@ "postfix": false, "binop": null }, - "start": 1933, - "end": 1934, + "start": 1992, + "end": 1993, "loc": { "start": { - "line": 75, + "line": 76, "column": 26 }, "end": { - "line": 75, + "line": 76, "column": 27 } } @@ -15237,15 +15405,15 @@ "postfix": false, "binop": null }, - "start": 1934, - "end": 1935, + "start": 1993, + "end": 1994, "loc": { "start": { - "line": 75, + "line": 76, "column": 27 }, "end": { - "line": 75, + "line": 76, "column": 28 } } @@ -15263,15 +15431,15 @@ "binop": null, "updateContext": null }, - "start": 1936, - "end": 1938, + "start": 1995, + "end": 1997, "loc": { "start": { - "line": 75, + "line": 76, "column": 29 }, "end": { - "line": 75, + "line": 76, "column": 31 } } @@ -15288,15 +15456,15 @@ "postfix": false, "binop": null }, - "start": 1939, - "end": 1940, + "start": 1998, + "end": 1999, "loc": { "start": { - "line": 75, + "line": 76, "column": 32 }, "end": { - "line": 75, + "line": 76, "column": 33 } } @@ -15314,15 +15482,15 @@ "binop": null }, "value": "attemptGracefulShutdown", - "start": 1947, - "end": 1970, + "start": 2006, + "end": 2029, "loc": { "start": { - "line": 76, + "line": 77, "column": 6 }, "end": { - "line": 76, + "line": 77, "column": 29 } } @@ -15339,15 +15507,15 @@ "postfix": false, "binop": null }, - "start": 1970, - "end": 1971, + "start": 2029, + "end": 2030, "loc": { "start": { - "line": 76, + "line": 77, "column": 29 }, "end": { - "line": 76, + "line": 77, "column": 30 } } @@ -15365,15 +15533,15 @@ "binop": null }, "value": "server", - "start": 1971, - "end": 1977, + "start": 2030, + "end": 2036, "loc": { "start": { - "line": 76, + "line": 77, "column": 30 }, "end": { - "line": 76, + "line": 77, "column": 36 } } @@ -15390,15 +15558,15 @@ "postfix": false, "binop": null }, - "start": 1977, - "end": 1978, + "start": 2036, + "end": 2037, "loc": { "start": { - "line": 76, + "line": 77, "column": 36 }, "end": { - "line": 76, + "line": 77, "column": 37 } } @@ -15416,15 +15584,15 @@ "binop": null, "updateContext": null }, - "start": 1978, - "end": 1979, + "start": 2037, + "end": 2038, "loc": { "start": { - "line": 76, + "line": 77, "column": 37 }, "end": { - "line": 76, + "line": 77, "column": 38 } } @@ -15441,15 +15609,15 @@ "postfix": false, "binop": null }, - "start": 1984, - "end": 1985, + "start": 2043, + "end": 2044, "loc": { "start": { - "line": 77, + "line": 78, "column": 4 }, "end": { - "line": 77, + "line": 78, "column": 5 } } @@ -15466,15 +15634,15 @@ "postfix": false, "binop": null }, - "start": 1985, - "end": 1986, + "start": 2044, + "end": 2045, "loc": { "start": { - "line": 77, + "line": 78, "column": 5 }, "end": { - "line": 77, + "line": 78, "column": 6 } } @@ -15492,15 +15660,15 @@ "binop": null, "updateContext": null }, - "start": 1986, - "end": 1987, + "start": 2045, + "end": 2046, "loc": { "start": { - "line": 77, + "line": 78, "column": 6 }, "end": { - "line": 77, + "line": 78, "column": 7 } } @@ -15518,15 +15686,15 @@ "binop": null }, "value": "process", - "start": 1992, - "end": 1999, + "start": 2051, + "end": 2058, "loc": { "start": { - "line": 78, + "line": 79, "column": 4 }, "end": { - "line": 78, + "line": 79, "column": 11 } } @@ -15544,15 +15712,15 @@ "binop": null, "updateContext": null }, - "start": 1999, - "end": 2000, + "start": 2058, + "end": 2059, "loc": { "start": { - "line": 78, + "line": 79, "column": 11 }, "end": { - "line": 78, + "line": 79, "column": 12 } } @@ -15570,15 +15738,15 @@ "binop": null }, "value": "on", - "start": 2000, - "end": 2002, + "start": 2059, + "end": 2061, "loc": { "start": { - "line": 78, + "line": 79, "column": 12 }, "end": { - "line": 78, + "line": 79, "column": 14 } } @@ -15595,15 +15763,15 @@ "postfix": false, "binop": null }, - "start": 2002, - "end": 2003, + "start": 2061, + "end": 2062, "loc": { "start": { - "line": 78, + "line": 79, "column": 14 }, "end": { - "line": 78, + "line": 79, "column": 15 } } @@ -15622,15 +15790,15 @@ "updateContext": null }, "value": "SIGUSR2", - "start": 2003, - "end": 2012, + "start": 2062, + "end": 2071, "loc": { "start": { - "line": 78, + "line": 79, "column": 15 }, "end": { - "line": 78, + "line": 79, "column": 24 } } @@ -15648,15 +15816,15 @@ "binop": null, "updateContext": null }, - "start": 2012, - "end": 2013, + "start": 2071, + "end": 2072, "loc": { "start": { - "line": 78, + "line": 79, "column": 24 }, "end": { - "line": 78, + "line": 79, "column": 25 } } @@ -15673,15 +15841,15 @@ "postfix": false, "binop": null }, - "start": 2014, - "end": 2015, + "start": 2073, + "end": 2074, "loc": { "start": { - "line": 78, + "line": 79, "column": 26 }, "end": { - "line": 78, + "line": 79, "column": 27 } } @@ -15698,15 +15866,15 @@ "postfix": false, "binop": null }, - "start": 2015, - "end": 2016, + "start": 2074, + "end": 2075, "loc": { "start": { - "line": 78, + "line": 79, "column": 27 }, "end": { - "line": 78, + "line": 79, "column": 28 } } @@ -15724,15 +15892,15 @@ "binop": null, "updateContext": null }, - "start": 2017, - "end": 2019, + "start": 2076, + "end": 2078, "loc": { "start": { - "line": 78, + "line": 79, "column": 29 }, "end": { - "line": 78, + "line": 79, "column": 31 } } @@ -15749,15 +15917,15 @@ "postfix": false, "binop": null }, - "start": 2020, - "end": 2021, + "start": 2079, + "end": 2080, "loc": { "start": { - "line": 78, + "line": 79, "column": 32 }, "end": { - "line": 78, + "line": 79, "column": 33 } } @@ -15765,15 +15933,15 @@ { "type": "CommentLine", "value": " For nodemon?", - "start": 2028, - "end": 2043, + "start": 2087, + "end": 2102, "loc": { "start": { - "line": 79, + "line": 80, "column": 6 }, "end": { - "line": 79, + "line": 80, "column": 21 } } @@ -15791,15 +15959,15 @@ "binop": null }, "value": "attemptGracefulShutdown", - "start": 2050, - "end": 2073, + "start": 2109, + "end": 2132, "loc": { "start": { - "line": 80, + "line": 81, "column": 6 }, "end": { - "line": 80, + "line": 81, "column": 29 } } @@ -15816,15 +15984,15 @@ "postfix": false, "binop": null }, - "start": 2073, - "end": 2074, + "start": 2132, + "end": 2133, "loc": { "start": { - "line": 80, + "line": 81, "column": 29 }, "end": { - "line": 80, + "line": 81, "column": 30 } } @@ -15842,15 +16010,15 @@ "binop": null }, "value": "server", - "start": 2074, - "end": 2080, + "start": 2133, + "end": 2139, "loc": { "start": { - "line": 80, + "line": 81, "column": 30 }, "end": { - "line": 80, + "line": 81, "column": 36 } } @@ -15867,15 +16035,15 @@ "postfix": false, "binop": null }, - "start": 2080, - "end": 2081, + "start": 2139, + "end": 2140, "loc": { "start": { - "line": 80, + "line": 81, "column": 36 }, "end": { - "line": 80, + "line": 81, "column": 37 } } @@ -15893,15 +16061,15 @@ "binop": null, "updateContext": null }, - "start": 2081, - "end": 2082, + "start": 2140, + "end": 2141, "loc": { "start": { - "line": 80, + "line": 81, "column": 37 }, "end": { - "line": 80, + "line": 81, "column": 38 } } @@ -15918,15 +16086,15 @@ "postfix": false, "binop": null }, - "start": 2087, - "end": 2088, + "start": 2146, + "end": 2147, "loc": { "start": { - "line": 81, + "line": 82, "column": 4 }, "end": { - "line": 81, + "line": 82, "column": 5 } } @@ -15943,15 +16111,15 @@ "postfix": false, "binop": null }, - "start": 2088, - "end": 2089, + "start": 2147, + "end": 2148, "loc": { "start": { - "line": 81, + "line": 82, "column": 5 }, "end": { - "line": 81, + "line": 82, "column": 6 } } @@ -15969,15 +16137,15 @@ "binop": null, "updateContext": null }, - "start": 2089, - "end": 2090, + "start": 2148, + "end": 2149, "loc": { "start": { - "line": 81, + "line": 82, "column": 6 }, "end": { - "line": 81, + "line": 82, "column": 7 } } @@ -15995,15 +16163,15 @@ "binop": null }, "value": "server", - "start": 2096, - "end": 2102, + "start": 2155, + "end": 2161, "loc": { "start": { - "line": 83, + "line": 84, "column": 4 }, "end": { - "line": 83, + "line": 84, "column": 10 } } @@ -16021,15 +16189,15 @@ "binop": null, "updateContext": null }, - "start": 2102, - "end": 2103, + "start": 2161, + "end": 2162, "loc": { "start": { - "line": 83, + "line": 84, "column": 10 }, "end": { - "line": 83, + "line": 84, "column": 11 } } @@ -16047,15 +16215,15 @@ "binop": null }, "value": "log", - "start": 2103, - "end": 2106, + "start": 2162, + "end": 2165, "loc": { "start": { - "line": 83, + "line": 84, "column": 11 }, "end": { - "line": 83, + "line": 84, "column": 14 } } @@ -16072,15 +16240,15 @@ "postfix": false, "binop": null }, - "start": 2106, - "end": 2107, + "start": 2165, + "end": 2166, "loc": { "start": { - "line": 83, + "line": 84, "column": 14 }, "end": { - "line": 83, + "line": 84, "column": 15 } } @@ -16097,15 +16265,15 @@ "postfix": false, "binop": null }, - "start": 2107, - "end": 2108, + "start": 2166, + "end": 2167, "loc": { "start": { - "line": 83, + "line": 84, "column": 15 }, "end": { - "line": 83, + "line": 84, "column": 16 } } @@ -16123,15 +16291,15 @@ "binop": null }, "value": "tags", - "start": 2109, - "end": 2113, + "start": 2168, + "end": 2172, "loc": { "start": { - "line": 83, + "line": 84, "column": 17 }, "end": { - "line": 83, + "line": 84, "column": 21 } } @@ -16149,15 +16317,15 @@ "binop": null, "updateContext": null }, - "start": 2113, - "end": 2114, + "start": 2172, + "end": 2173, "loc": { "start": { - "line": 83, + "line": 84, "column": 21 }, "end": { - "line": 83, + "line": 84, "column": 22 } } @@ -16175,15 +16343,15 @@ "binop": null, "updateContext": null }, - "start": 2115, - "end": 2116, + "start": 2174, + "end": 2175, "loc": { "start": { - "line": 83, + "line": 84, "column": 23 }, "end": { - "line": 83, + "line": 84, "column": 24 } } @@ -16202,15 +16370,15 @@ "updateContext": null }, "value": "STARTUP", - "start": 2116, - "end": 2125, + "start": 2175, + "end": 2184, "loc": { "start": { - "line": 83, + "line": 84, "column": 24 }, "end": { - "line": 83, + "line": 84, "column": 33 } } @@ -16228,15 +16396,15 @@ "binop": null, "updateContext": null }, - "start": 2125, - "end": 2126, + "start": 2184, + "end": 2185, "loc": { "start": { - "line": 83, + "line": 84, "column": 33 }, "end": { - "line": 83, + "line": 84, "column": 34 } } @@ -16254,15 +16422,15 @@ "binop": null, "updateContext": null }, - "start": 2126, - "end": 2127, + "start": 2185, + "end": 2186, "loc": { "start": { - "line": 83, + "line": 84, "column": 34 }, "end": { - "line": 83, + "line": 84, "column": 35 } } @@ -16280,15 +16448,15 @@ "binop": null }, "value": "data", - "start": 2128, - "end": 2132, + "start": 2187, + "end": 2191, "loc": { "start": { - "line": 83, + "line": 84, "column": 36 }, "end": { - "line": 83, + "line": 84, "column": 40 } } @@ -16306,15 +16474,15 @@ "binop": null, "updateContext": null }, - "start": 2132, - "end": 2133, + "start": 2191, + "end": 2192, "loc": { "start": { - "line": 83, + "line": 84, "column": 40 }, "end": { - "line": 83, + "line": 84, "column": 41 } } @@ -16333,15 +16501,15 @@ "updateContext": null }, "value": "server startup complete", - "start": 2134, - "end": 2159, + "start": 2193, + "end": 2218, "loc": { "start": { - "line": 83, + "line": 84, "column": 42 }, "end": { - "line": 83, + "line": 84, "column": 67 } } @@ -16358,15 +16526,15 @@ "postfix": false, "binop": null }, - "start": 2160, - "end": 2161, + "start": 2219, + "end": 2220, "loc": { "start": { - "line": 83, + "line": 84, "column": 68 }, "end": { - "line": 83, + "line": 84, "column": 69 } } @@ -16383,15 +16551,15 @@ "postfix": false, "binop": null }, - "start": 2161, - "end": 2162, + "start": 2220, + "end": 2221, "loc": { "start": { - "line": 83, + "line": 84, "column": 69 }, "end": { - "line": 83, + "line": 84, "column": 70 } } @@ -16409,15 +16577,15 @@ "binop": null, "updateContext": null }, - "start": 2162, - "end": 2163, + "start": 2221, + "end": 2222, "loc": { "start": { - "line": 83, + "line": 84, "column": 70 }, "end": { - "line": 83, + "line": 84, "column": 71 } } @@ -16434,15 +16602,15 @@ "postfix": false, "binop": null }, - "start": 2166, - "end": 2167, + "start": 2225, + "end": 2226, "loc": { "start": { - "line": 84, + "line": 85, "column": 2 }, "end": { - "line": 84, + "line": 85, "column": 3 } } @@ -16462,15 +16630,15 @@ "updateContext": null }, "value": "catch", - "start": 2168, - "end": 2173, + "start": 2227, + "end": 2232, "loc": { "start": { - "line": 84, + "line": 85, "column": 4 }, "end": { - "line": 84, + "line": 85, "column": 9 } } @@ -16487,15 +16655,15 @@ "postfix": false, "binop": null }, - "start": 2174, - "end": 2175, + "start": 2233, + "end": 2234, "loc": { "start": { - "line": 84, + "line": 85, "column": 10 }, "end": { - "line": 84, + "line": 85, "column": 11 } } @@ -16513,15 +16681,15 @@ "binop": null }, "value": "err", - "start": 2175, - "end": 2178, + "start": 2234, + "end": 2237, "loc": { "start": { - "line": 84, + "line": 85, "column": 11 }, "end": { - "line": 84, + "line": 85, "column": 14 } } @@ -16538,15 +16706,15 @@ "postfix": false, "binop": null }, - "start": 2178, - "end": 2179, + "start": 2237, + "end": 2238, "loc": { "start": { - "line": 84, + "line": 85, "column": 14 }, "end": { - "line": 84, + "line": 85, "column": 15 } } @@ -16563,15 +16731,15 @@ "postfix": false, "binop": null }, - "start": 2180, - "end": 2181, + "start": 2239, + "end": 2240, "loc": { "start": { - "line": 84, + "line": 85, "column": 16 }, "end": { - "line": 84, + "line": 85, "column": 17 } } @@ -16579,15 +16747,15 @@ { "type": "CommentLine", "value": " Likely caused by \"bad\" endpoint (empty/ duplicate paths/ no controller)", - "start": 2186, - "end": 2260, + "start": 2245, + "end": 2319, "loc": { "start": { - "line": 85, + "line": 86, "column": 4 }, "end": { - "line": 85, + "line": 86, "column": 78 } } @@ -16605,15 +16773,15 @@ "binop": null }, "value": "process", - "start": 2265, - "end": 2272, + "start": 2324, + "end": 2331, "loc": { "start": { - "line": 86, + "line": 87, "column": 4 }, "end": { - "line": 86, + "line": 87, "column": 11 } } @@ -16631,15 +16799,15 @@ "binop": null, "updateContext": null }, - "start": 2272, - "end": 2273, + "start": 2331, + "end": 2332, "loc": { "start": { - "line": 86, + "line": 87, "column": 11 }, "end": { - "line": 86, + "line": 87, "column": 12 } } @@ -16657,15 +16825,15 @@ "binop": null }, "value": "stdout", - "start": 2273, - "end": 2279, + "start": 2332, + "end": 2338, "loc": { "start": { - "line": 86, + "line": 87, "column": 12 }, "end": { - "line": 86, + "line": 87, "column": 18 } } @@ -16683,15 +16851,15 @@ "binop": null, "updateContext": null }, - "start": 2279, - "end": 2280, + "start": 2338, + "end": 2339, "loc": { "start": { - "line": 86, + "line": 87, "column": 18 }, "end": { - "line": 86, + "line": 87, "column": 19 } } @@ -16709,15 +16877,15 @@ "binop": null }, "value": "write", - "start": 2280, - "end": 2285, + "start": 2339, + "end": 2344, "loc": { "start": { - "line": 86, + "line": 87, "column": 19 }, "end": { - "line": 86, + "line": 87, "column": 24 } } @@ -16734,15 +16902,15 @@ "postfix": false, "binop": null }, - "start": 2285, - "end": 2286, + "start": 2344, + "end": 2345, "loc": { "start": { - "line": 86, + "line": 87, "column": 24 }, "end": { - "line": 86, + "line": 87, "column": 25 } } @@ -16761,15 +16929,15 @@ "updateContext": null }, "value": "Server startup failed! [Likely due to local changes or missing dependencies]\n\n", - "start": 2286, - "end": 2369, + "start": 2345, + "end": 2428, "loc": { "start": { - "line": 86, + "line": 87, "column": 25 }, "end": { - "line": 86, + "line": 87, "column": 108 } } @@ -16786,15 +16954,15 @@ "postfix": false, "binop": null }, - "start": 2369, - "end": 2370, + "start": 2428, + "end": 2429, "loc": { "start": { - "line": 86, + "line": 87, "column": 108 }, "end": { - "line": 86, + "line": 87, "column": 109 } } @@ -16812,15 +16980,15 @@ "binop": null, "updateContext": null }, - "start": 2370, - "end": 2371, + "start": 2429, + "end": 2430, "loc": { "start": { - "line": 86, + "line": 87, "column": 109 }, "end": { - "line": 86, + "line": 87, "column": 110 } } @@ -16838,15 +17006,15 @@ "binop": null }, "value": "process", - "start": 2377, - "end": 2384, + "start": 2436, + "end": 2443, "loc": { "start": { - "line": 88, + "line": 89, "column": 4 }, "end": { - "line": 88, + "line": 89, "column": 11 } } @@ -16864,15 +17032,15 @@ "binop": null, "updateContext": null }, - "start": 2384, - "end": 2385, + "start": 2443, + "end": 2444, "loc": { "start": { - "line": 88, + "line": 89, "column": 11 }, "end": { - "line": 88, + "line": 89, "column": 12 } } @@ -16890,15 +17058,15 @@ "binop": null }, "value": "exit", - "start": 2385, - "end": 2389, + "start": 2444, + "end": 2448, "loc": { "start": { - "line": 88, + "line": 89, "column": 12 }, "end": { - "line": 88, + "line": 89, "column": 16 } } @@ -16915,15 +17083,15 @@ "postfix": false, "binop": null }, - "start": 2389, - "end": 2390, + "start": 2448, + "end": 2449, "loc": { "start": { - "line": 88, + "line": 89, "column": 16 }, "end": { - "line": 88, + "line": 89, "column": 17 } } @@ -16942,15 +17110,15 @@ "updateContext": null }, "value": 1, - "start": 2390, - "end": 2391, + "start": 2449, + "end": 2450, "loc": { "start": { - "line": 88, + "line": 89, "column": 17 }, "end": { - "line": 88, + "line": 89, "column": 18 } } @@ -16967,15 +17135,15 @@ "postfix": false, "binop": null }, - "start": 2391, - "end": 2392, + "start": 2450, + "end": 2451, "loc": { "start": { - "line": 88, + "line": 89, "column": 18 }, "end": { - "line": 88, + "line": 89, "column": 19 } } @@ -16993,15 +17161,15 @@ "binop": null, "updateContext": null }, - "start": 2392, - "end": 2393, + "start": 2451, + "end": 2452, "loc": { "start": { - "line": 88, + "line": 89, "column": 19 }, "end": { - "line": 88, + "line": 89, "column": 20 } } @@ -17018,15 +17186,15 @@ "postfix": false, "binop": null }, - "start": 2396, - "end": 2397, + "start": 2455, + "end": 2456, "loc": { "start": { - "line": 89, + "line": 90, "column": 2 }, "end": { - "line": 89, + "line": 90, "column": 3 } } @@ -17043,15 +17211,15 @@ "postfix": false, "binop": null }, - "start": 2398, - "end": 2399, + "start": 2457, + "end": 2458, "loc": { "start": { - "line": 90, + "line": 91, "column": 0 }, "end": { - "line": 90, + "line": 91, "column": 1 } } @@ -17068,15 +17236,15 @@ "postfix": false, "binop": null }, - "start": 2399, - "end": 2400, + "start": 2458, + "end": 2459, "loc": { "start": { - "line": 90, + "line": 91, "column": 1 }, "end": { - "line": 90, + "line": 91, "column": 2 } } @@ -17094,15 +17262,15 @@ "binop": null, "updateContext": null }, - "start": 2400, - "end": 2401, + "start": 2459, + "end": 2460, "loc": { "start": { - "line": 90, + "line": 91, "column": 2 }, "end": { - "line": 90, + "line": 91, "column": 3 } } @@ -17120,15 +17288,15 @@ "binop": null }, "value": "main", - "start": 2402, - "end": 2406, + "start": 2461, + "end": 2465, "loc": { "start": { - "line": 91, + "line": 92, "column": 0 }, "end": { - "line": 91, + "line": 92, "column": 4 } } @@ -17145,15 +17313,15 @@ "postfix": false, "binop": null }, - "start": 2406, - "end": 2407, + "start": 2465, + "end": 2466, "loc": { "start": { - "line": 91, + "line": 92, "column": 4 }, "end": { - "line": 91, + "line": 92, "column": 5 } } @@ -17170,15 +17338,15 @@ "postfix": false, "binop": null }, - "start": 2407, - "end": 2408, + "start": 2466, + "end": 2467, "loc": { "start": { - "line": 91, + "line": 92, "column": 5 }, "end": { - "line": 91, + "line": 92, "column": 6 } } @@ -17196,15 +17364,15 @@ "binop": null, "updateContext": null }, - "start": 2408, - "end": 2409, + "start": 2467, + "end": 2468, "loc": { "start": { - "line": 91, + "line": 92, "column": 6 }, "end": { - "line": 91, + "line": 92, "column": 7 } } @@ -17212,15 +17380,15 @@ { "type": "CommentBlock", "value": "*\n * Attempt to shutdown the server and database connections\n * @param {Server} server Server Object to be shutdown\n * @return {undefined} undefined\n ", - "start": 2411, - "end": 2573, + "start": 2470, + "end": 2632, "loc": { "start": { - "line": 93, + "line": 94, "column": 0 }, "end": { - "line": 97, + "line": 98, "column": 3 } } @@ -17239,15 +17407,15 @@ "binop": null }, "value": "function", - "start": 2574, - "end": 2582, + "start": 2633, + "end": 2641, "loc": { "start": { - "line": 98, + "line": 99, "column": 0 }, "end": { - "line": 98, + "line": 99, "column": 8 } } @@ -17265,15 +17433,15 @@ "binop": null }, "value": "attemptGracefulShutdown", - "start": 2583, - "end": 2606, + "start": 2642, + "end": 2665, "loc": { "start": { - "line": 98, + "line": 99, "column": 9 }, "end": { - "line": 98, + "line": 99, "column": 32 } } @@ -17290,15 +17458,15 @@ "postfix": false, "binop": null }, - "start": 2606, - "end": 2607, + "start": 2665, + "end": 2666, "loc": { "start": { - "line": 98, + "line": 99, "column": 32 }, "end": { - "line": 98, + "line": 99, "column": 33 } } @@ -17316,15 +17484,15 @@ "binop": null }, "value": "server", - "start": 2607, - "end": 2613, + "start": 2666, + "end": 2672, "loc": { "start": { - "line": 98, + "line": 99, "column": 33 }, "end": { - "line": 98, + "line": 99, "column": 39 } } @@ -17341,15 +17509,15 @@ "postfix": false, "binop": null }, - "start": 2613, - "end": 2614, + "start": 2672, + "end": 2673, "loc": { "start": { - "line": 98, + "line": 99, "column": 39 }, "end": { - "line": 98, + "line": 99, "column": 40 } } @@ -17366,15 +17534,15 @@ "postfix": false, "binop": null }, - "start": 2615, - "end": 2616, + "start": 2674, + "end": 2675, "loc": { "start": { - "line": 98, + "line": 99, "column": 41 }, "end": { - "line": 98, + "line": 99, "column": 42 } } @@ -17392,15 +17560,15 @@ "binop": null }, "value": "server", - "start": 2619, - "end": 2625, + "start": 2678, + "end": 2684, "loc": { "start": { - "line": 99, + "line": 100, "column": 2 }, "end": { - "line": 99, + "line": 100, "column": 8 } } @@ -17418,15 +17586,15 @@ "binop": null, "updateContext": null }, - "start": 2625, - "end": 2626, + "start": 2684, + "end": 2685, "loc": { "start": { - "line": 99, + "line": 100, "column": 8 }, "end": { - "line": 99, + "line": 100, "column": 9 } } @@ -17444,15 +17612,15 @@ "binop": null }, "value": "log", - "start": 2626, - "end": 2629, + "start": 2685, + "end": 2688, "loc": { "start": { - "line": 99, + "line": 100, "column": 9 }, "end": { - "line": 99, + "line": 100, "column": 12 } } @@ -17469,15 +17637,15 @@ "postfix": false, "binop": null }, - "start": 2629, - "end": 2630, + "start": 2688, + "end": 2689, "loc": { "start": { - "line": 99, + "line": 100, "column": 12 }, "end": { - "line": 99, + "line": 100, "column": 13 } } @@ -17494,15 +17662,15 @@ "postfix": false, "binop": null }, - "start": 2630, - "end": 2631, + "start": 2689, + "end": 2690, "loc": { "start": { - "line": 99, + "line": 100, "column": 13 }, "end": { - "line": 99, + "line": 100, "column": 14 } } @@ -17520,15 +17688,15 @@ "binop": null }, "value": "tags", - "start": 2632, - "end": 2636, + "start": 2691, + "end": 2695, "loc": { "start": { - "line": 99, + "line": 100, "column": 15 }, "end": { - "line": 99, + "line": 100, "column": 19 } } @@ -17546,15 +17714,15 @@ "binop": null, "updateContext": null }, - "start": 2636, - "end": 2637, + "start": 2695, + "end": 2696, "loc": { "start": { - "line": 99, + "line": 100, "column": 19 }, "end": { - "line": 99, + "line": 100, "column": 20 } } @@ -17572,15 +17740,15 @@ "binop": null, "updateContext": null }, - "start": 2638, - "end": 2639, + "start": 2697, + "end": 2698, "loc": { "start": { - "line": 99, + "line": 100, "column": 21 }, "end": { - "line": 99, + "line": 100, "column": 22 } } @@ -17599,15 +17767,15 @@ "updateContext": null }, "value": "SHUTDOWN", - "start": 2639, - "end": 2649, + "start": 2698, + "end": 2708, "loc": { "start": { - "line": 99, + "line": 100, "column": 22 }, "end": { - "line": 99, + "line": 100, "column": 32 } } @@ -17625,15 +17793,15 @@ "binop": null, "updateContext": null }, - "start": 2649, - "end": 2650, + "start": 2708, + "end": 2709, "loc": { "start": { - "line": 99, + "line": 100, "column": 32 }, "end": { - "line": 99, + "line": 100, "column": 33 } } @@ -17651,15 +17819,15 @@ "binop": null, "updateContext": null }, - "start": 2650, - "end": 2651, + "start": 2709, + "end": 2710, "loc": { "start": { - "line": 99, + "line": 100, "column": 33 }, "end": { - "line": 99, + "line": 100, "column": 34 } } @@ -17677,15 +17845,15 @@ "binop": null }, "value": "data", - "start": 2652, - "end": 2656, + "start": 2711, + "end": 2715, "loc": { "start": { - "line": 99, + "line": 100, "column": 35 }, "end": { - "line": 99, + "line": 100, "column": 39 } } @@ -17703,15 +17871,15 @@ "binop": null, "updateContext": null }, - "start": 2656, - "end": 2657, + "start": 2715, + "end": 2716, "loc": { "start": { - "line": 99, + "line": 100, "column": 39 }, "end": { - "line": 99, + "line": 100, "column": 40 } } @@ -17730,15 +17898,15 @@ "updateContext": null }, "value": "shutdown signal", - "start": 2658, - "end": 2675, + "start": 2717, + "end": 2734, "loc": { "start": { - "line": 99, + "line": 100, "column": 41 }, "end": { - "line": 99, + "line": 100, "column": 58 } } @@ -17755,15 +17923,15 @@ "postfix": false, "binop": null }, - "start": 2676, - "end": 2677, + "start": 2735, + "end": 2736, "loc": { "start": { - "line": 99, + "line": 100, "column": 59 }, "end": { - "line": 99, + "line": 100, "column": 60 } } @@ -17780,15 +17948,15 @@ "postfix": false, "binop": null }, - "start": 2677, - "end": 2678, + "start": 2736, + "end": 2737, "loc": { "start": { - "line": 99, + "line": 100, "column": 60 }, "end": { - "line": 99, + "line": 100, "column": 61 } } @@ -17806,15 +17974,15 @@ "binop": null, "updateContext": null }, - "start": 2678, - "end": 2679, + "start": 2737, + "end": 2738, "loc": { "start": { - "line": 99, + "line": 100, "column": 61 }, "end": { - "line": 99, + "line": 100, "column": 62 } } @@ -17832,15 +18000,15 @@ "binop": null }, "value": "server", - "start": 2682, - "end": 2688, + "start": 2741, + "end": 2747, "loc": { "start": { - "line": 100, + "line": 101, "column": 2 }, "end": { - "line": 100, + "line": 101, "column": 8 } } @@ -17858,15 +18026,15 @@ "binop": null, "updateContext": null }, - "start": 2688, - "end": 2689, + "start": 2747, + "end": 2748, "loc": { "start": { - "line": 100, + "line": 101, "column": 8 }, "end": { - "line": 100, + "line": 101, "column": 9 } } @@ -17884,15 +18052,15 @@ "binop": null }, "value": "shutdown", - "start": 2689, - "end": 2697, + "start": 2748, + "end": 2756, "loc": { "start": { - "line": 100, + "line": 101, "column": 9 }, "end": { - "line": 100, + "line": 101, "column": 17 } } @@ -17909,15 +18077,15 @@ "postfix": false, "binop": null }, - "start": 2697, - "end": 2698, + "start": 2756, + "end": 2757, "loc": { "start": { - "line": 100, + "line": 101, "column": 17 }, "end": { - "line": 100, + "line": 101, "column": 18 } } @@ -17935,15 +18103,15 @@ "binop": null }, "value": "hapiErr", - "start": 2698, - "end": 2705, + "start": 2757, + "end": 2764, "loc": { "start": { - "line": 100, + "line": 101, "column": 18 }, "end": { - "line": 100, + "line": 101, "column": 25 } } @@ -17961,15 +18129,15 @@ "binop": null, "updateContext": null }, - "start": 2706, - "end": 2708, + "start": 2765, + "end": 2767, "loc": { "start": { - "line": 100, + "line": 101, "column": 26 }, "end": { - "line": 100, + "line": 101, "column": 28 } } @@ -17986,15 +18154,15 @@ "postfix": false, "binop": null }, - "start": 2709, - "end": 2710, + "start": 2768, + "end": 2769, "loc": { "start": { - "line": 100, + "line": 101, "column": 29 }, "end": { - "line": 100, + "line": 101, "column": 30 } } @@ -18012,15 +18180,15 @@ "binop": null }, "value": "server", - "start": 2715, - "end": 2721, + "start": 2774, + "end": 2780, "loc": { "start": { - "line": 101, + "line": 102, "column": 4 }, "end": { - "line": 101, + "line": 102, "column": 10 } } @@ -18038,15 +18206,15 @@ "binop": null, "updateContext": null }, - "start": 2721, - "end": 2722, + "start": 2780, + "end": 2781, "loc": { "start": { - "line": 101, + "line": 102, "column": 10 }, "end": { - "line": 101, + "line": 102, "column": 11 } } @@ -18064,15 +18232,15 @@ "binop": null }, "value": "log", - "start": 2722, - "end": 2725, + "start": 2781, + "end": 2784, "loc": { "start": { - "line": 101, + "line": 102, "column": 11 }, "end": { - "line": 101, + "line": 102, "column": 14 } } @@ -18089,15 +18257,15 @@ "postfix": false, "binop": null }, - "start": 2725, - "end": 2726, + "start": 2784, + "end": 2785, "loc": { "start": { - "line": 101, + "line": 102, "column": 14 }, "end": { - "line": 101, + "line": 102, "column": 15 } } @@ -18114,15 +18282,15 @@ "postfix": false, "binop": null }, - "start": 2726, - "end": 2727, + "start": 2785, + "end": 2786, "loc": { "start": { - "line": 101, + "line": 102, "column": 15 }, "end": { - "line": 101, + "line": 102, "column": 16 } } @@ -18140,15 +18308,15 @@ "binop": null }, "value": "tags", - "start": 2728, - "end": 2732, + "start": 2787, + "end": 2791, "loc": { "start": { - "line": 101, + "line": 102, "column": 17 }, "end": { - "line": 101, + "line": 102, "column": 21 } } @@ -18166,15 +18334,15 @@ "binop": null, "updateContext": null }, - "start": 2732, - "end": 2733, + "start": 2791, + "end": 2792, "loc": { "start": { - "line": 101, + "line": 102, "column": 21 }, "end": { - "line": 101, + "line": 102, "column": 22 } } @@ -18192,15 +18360,15 @@ "binop": null, "updateContext": null }, - "start": 2734, - "end": 2735, + "start": 2793, + "end": 2794, "loc": { "start": { - "line": 101, + "line": 102, "column": 23 }, "end": { - "line": 101, + "line": 102, "column": 24 } } @@ -18219,15 +18387,15 @@ "updateContext": null }, "value": "SHUTDOWN", - "start": 2735, - "end": 2745, + "start": 2794, + "end": 2804, "loc": { "start": { - "line": 101, + "line": 102, "column": 24 }, "end": { - "line": 101, + "line": 102, "column": 34 } } @@ -18245,15 +18413,15 @@ "binop": null, "updateContext": null }, - "start": 2745, - "end": 2746, + "start": 2804, + "end": 2805, "loc": { "start": { - "line": 101, + "line": 102, "column": 34 }, "end": { - "line": 101, + "line": 102, "column": 35 } } @@ -18271,15 +18439,15 @@ "binop": null, "updateContext": null }, - "start": 2746, - "end": 2747, + "start": 2805, + "end": 2806, "loc": { "start": { - "line": 101, + "line": 102, "column": 35 }, "end": { - "line": 101, + "line": 102, "column": 36 } } @@ -18297,15 +18465,15 @@ "binop": null }, "value": "data", - "start": 2748, - "end": 2752, + "start": 2807, + "end": 2811, "loc": { "start": { - "line": 101, + "line": 102, "column": 37 }, "end": { - "line": 101, + "line": 102, "column": 41 } } @@ -18323,15 +18491,15 @@ "binop": null, "updateContext": null }, - "start": 2752, - "end": 2753, + "start": 2811, + "end": 2812, "loc": { "start": { - "line": 101, + "line": 102, "column": 41 }, "end": { - "line": 101, + "line": 102, "column": 42 } } @@ -18350,15 +18518,15 @@ "updateContext": null }, "value": "hapi server shutdown", - "start": 2754, - "end": 2776, + "start": 2813, + "end": 2835, "loc": { "start": { - "line": 101, + "line": 102, "column": 43 }, "end": { - "line": 101, + "line": 102, "column": 65 } } @@ -18375,15 +18543,15 @@ "postfix": false, "binop": null }, - "start": 2777, - "end": 2778, + "start": 2836, + "end": 2837, "loc": { "start": { - "line": 101, + "line": 102, "column": 66 }, "end": { - "line": 101, + "line": 102, "column": 67 } } @@ -18400,15 +18568,15 @@ "postfix": false, "binop": null }, - "start": 2778, - "end": 2779, + "start": 2837, + "end": 2838, "loc": { "start": { - "line": 101, + "line": 102, "column": 67 }, "end": { - "line": 101, + "line": 102, "column": 68 } } @@ -18426,15 +18594,15 @@ "binop": null, "updateContext": null }, - "start": 2779, - "end": 2780, + "start": 2838, + "end": 2839, "loc": { "start": { - "line": 101, + "line": 102, "column": 68 }, "end": { - "line": 101, + "line": 102, "column": 69 } } @@ -18452,15 +18620,15 @@ "binop": null }, "value": "mariadb", - "start": 2785, - "end": 2792, + "start": 2844, + "end": 2851, "loc": { "start": { - "line": 102, + "line": 103, "column": 4 }, "end": { - "line": 102, + "line": 103, "column": 11 } } @@ -18478,15 +18646,15 @@ "binop": null, "updateContext": null }, - "start": 2792, - "end": 2793, + "start": 2851, + "end": 2852, "loc": { "start": { - "line": 102, + "line": 103, "column": 11 }, "end": { - "line": 102, + "line": 103, "column": 12 } } @@ -18504,15 +18672,15 @@ "binop": null }, "value": "shutdown", - "start": 2793, - "end": 2801, + "start": 2852, + "end": 2860, "loc": { "start": { - "line": 102, + "line": 103, "column": 12 }, "end": { - "line": 102, + "line": 103, "column": 20 } } @@ -18529,15 +18697,15 @@ "postfix": false, "binop": null }, - "start": 2801, - "end": 2802, + "start": 2860, + "end": 2861, "loc": { "start": { - "line": 102, + "line": 103, "column": 20 }, "end": { - "line": 102, + "line": 103, "column": 21 } } @@ -18555,15 +18723,15 @@ "binop": null }, "value": "dbErr", - "start": 2802, - "end": 2807, + "start": 2861, + "end": 2866, "loc": { "start": { - "line": 102, + "line": 103, "column": 21 }, "end": { - "line": 102, + "line": 103, "column": 26 } } @@ -18581,15 +18749,15 @@ "binop": null, "updateContext": null }, - "start": 2808, - "end": 2810, + "start": 2867, + "end": 2869, "loc": { "start": { - "line": 102, + "line": 103, "column": 27 }, "end": { - "line": 102, + "line": 103, "column": 29 } } @@ -18606,15 +18774,15 @@ "postfix": false, "binop": null }, - "start": 2811, - "end": 2812, + "start": 2870, + "end": 2871, "loc": { "start": { - "line": 102, + "line": 103, "column": 30 }, "end": { - "line": 102, + "line": 103, "column": 31 } } @@ -18632,15 +18800,15 @@ "binop": null }, "value": "server", - "start": 2819, - "end": 2825, + "start": 2878, + "end": 2884, "loc": { "start": { - "line": 103, + "line": 104, "column": 6 }, "end": { - "line": 103, + "line": 104, "column": 12 } } @@ -18658,15 +18826,15 @@ "binop": null, "updateContext": null }, - "start": 2825, - "end": 2826, + "start": 2884, + "end": 2885, "loc": { "start": { - "line": 103, + "line": 104, "column": 12 }, "end": { - "line": 103, + "line": 104, "column": 13 } } @@ -18684,15 +18852,15 @@ "binop": null }, "value": "log", - "start": 2826, - "end": 2829, + "start": 2885, + "end": 2888, "loc": { "start": { - "line": 103, + "line": 104, "column": 13 }, "end": { - "line": 103, + "line": 104, "column": 16 } } @@ -18709,15 +18877,15 @@ "postfix": false, "binop": null }, - "start": 2829, - "end": 2830, + "start": 2888, + "end": 2889, "loc": { "start": { - "line": 103, + "line": 104, "column": 16 }, "end": { - "line": 103, + "line": 104, "column": 17 } } @@ -18734,15 +18902,15 @@ "postfix": false, "binop": null }, - "start": 2830, - "end": 2831, + "start": 2889, + "end": 2890, "loc": { "start": { - "line": 103, + "line": 104, "column": 17 }, "end": { - "line": 103, + "line": 104, "column": 18 } } @@ -18760,15 +18928,15 @@ "binop": null }, "value": "tags", - "start": 2832, - "end": 2836, + "start": 2891, + "end": 2895, "loc": { "start": { - "line": 103, + "line": 104, "column": 19 }, "end": { - "line": 103, + "line": 104, "column": 23 } } @@ -18786,15 +18954,15 @@ "binop": null, "updateContext": null }, - "start": 2836, - "end": 2837, + "start": 2895, + "end": 2896, "loc": { "start": { - "line": 103, + "line": 104, "column": 23 }, "end": { - "line": 103, + "line": 104, "column": 24 } } @@ -18812,15 +18980,15 @@ "binop": null, "updateContext": null }, - "start": 2838, - "end": 2839, + "start": 2897, + "end": 2898, "loc": { "start": { - "line": 103, + "line": 104, "column": 25 }, "end": { - "line": 103, + "line": 104, "column": 26 } } @@ -18839,15 +19007,15 @@ "updateContext": null }, "value": "SHUTDOWN", - "start": 2839, - "end": 2849, + "start": 2898, + "end": 2908, "loc": { "start": { - "line": 103, + "line": 104, "column": 26 }, "end": { - "line": 103, + "line": 104, "column": 36 } } @@ -18865,15 +19033,15 @@ "binop": null, "updateContext": null }, - "start": 2849, - "end": 2850, + "start": 2908, + "end": 2909, "loc": { "start": { - "line": 103, + "line": 104, "column": 36 }, "end": { - "line": 103, + "line": 104, "column": 37 } } @@ -18891,15 +19059,15 @@ "binop": null, "updateContext": null }, - "start": 2850, - "end": 2851, + "start": 2909, + "end": 2910, "loc": { "start": { - "line": 103, + "line": 104, "column": 37 }, "end": { - "line": 103, + "line": 104, "column": 38 } } @@ -18917,15 +19085,15 @@ "binop": null }, "value": "data", - "start": 2852, - "end": 2856, + "start": 2911, + "end": 2915, "loc": { "start": { - "line": 103, + "line": 104, "column": 39 }, "end": { - "line": 103, + "line": 104, "column": 43 } } @@ -18943,15 +19111,15 @@ "binop": null, "updateContext": null }, - "start": 2856, - "end": 2857, + "start": 2915, + "end": 2916, "loc": { "start": { - "line": 103, + "line": 104, "column": 43 }, "end": { - "line": 103, + "line": 104, "column": 44 } } @@ -18970,15 +19138,15 @@ "updateContext": null }, "value": "mariadb shutdown", - "start": 2858, - "end": 2876, + "start": 2917, + "end": 2935, "loc": { "start": { - "line": 103, + "line": 104, "column": 45 }, "end": { - "line": 103, + "line": 104, "column": 63 } } @@ -18995,15 +19163,15 @@ "postfix": false, "binop": null }, - "start": 2877, - "end": 2878, + "start": 2936, + "end": 2937, "loc": { "start": { - "line": 103, + "line": 104, "column": 64 }, "end": { - "line": 103, + "line": 104, "column": 65 } } @@ -19020,15 +19188,15 @@ "postfix": false, "binop": null }, - "start": 2878, - "end": 2879, + "start": 2937, + "end": 2938, "loc": { "start": { - "line": 103, + "line": 104, "column": 65 }, "end": { - "line": 103, + "line": 104, "column": 66 } } @@ -19046,15 +19214,15 @@ "binop": null, "updateContext": null }, - "start": 2879, - "end": 2880, + "start": 2938, + "end": 2939, "loc": { "start": { - "line": 103, + "line": 104, "column": 66 }, "end": { - "line": 103, + "line": 104, "column": 67 } } @@ -19072,15 +19240,15 @@ "binop": null }, "value": "process", - "start": 2888, - "end": 2895, + "start": 2947, + "end": 2954, "loc": { "start": { - "line": 105, + "line": 106, "column": 6 }, "end": { - "line": 105, + "line": 106, "column": 13 } } @@ -19098,15 +19266,15 @@ "binop": null, "updateContext": null }, - "start": 2895, - "end": 2896, + "start": 2954, + "end": 2955, "loc": { "start": { - "line": 105, + "line": 106, "column": 13 }, "end": { - "line": 105, + "line": 106, "column": 14 } } @@ -19124,15 +19292,15 @@ "binop": null }, "value": "exit", - "start": 2896, - "end": 2900, + "start": 2955, + "end": 2959, "loc": { "start": { - "line": 105, + "line": 106, "column": 14 }, "end": { - "line": 105, + "line": 106, "column": 18 } } @@ -19149,15 +19317,15 @@ "postfix": false, "binop": null }, - "start": 2900, - "end": 2901, + "start": 2959, + "end": 2960, "loc": { "start": { - "line": 105, + "line": 106, "column": 18 }, "end": { - "line": 105, + "line": 106, "column": 19 } } @@ -19175,15 +19343,15 @@ "binop": null }, "value": "hapiErr", - "start": 2901, - "end": 2908, + "start": 2960, + "end": 2967, "loc": { "start": { - "line": 105, + "line": 106, "column": 19 }, "end": { - "line": 105, + "line": 106, "column": 26 } } @@ -19202,15 +19370,15 @@ "updateContext": null }, "value": "||", - "start": 2909, - "end": 2911, + "start": 2968, + "end": 2970, "loc": { "start": { - "line": 105, + "line": 106, "column": 27 }, "end": { - "line": 105, + "line": 106, "column": 29 } } @@ -19228,15 +19396,15 @@ "binop": null }, "value": "dbErr", - "start": 2912, - "end": 2917, + "start": 2971, + "end": 2976, "loc": { "start": { - "line": 105, + "line": 106, "column": 30 }, "end": { - "line": 105, + "line": 106, "column": 35 } } @@ -19254,15 +19422,15 @@ "binop": null, "updateContext": null }, - "start": 2918, - "end": 2919, + "start": 2977, + "end": 2978, "loc": { "start": { - "line": 105, + "line": 106, "column": 36 }, "end": { - "line": 105, + "line": 106, "column": 37 } } @@ -19281,15 +19449,15 @@ "updateContext": null }, "value": 1, - "start": 2920, - "end": 2921, + "start": 2979, + "end": 2980, "loc": { "start": { - "line": 105, + "line": 106, "column": 38 }, "end": { - "line": 105, + "line": 106, "column": 39 } } @@ -19307,15 +19475,15 @@ "binop": null, "updateContext": null }, - "start": 2922, - "end": 2923, + "start": 2981, + "end": 2982, "loc": { "start": { - "line": 105, + "line": 106, "column": 40 }, "end": { - "line": 105, + "line": 106, "column": 41 } } @@ -19334,15 +19502,15 @@ "updateContext": null }, "value": 0, - "start": 2924, - "end": 2925, + "start": 2983, + "end": 2984, "loc": { "start": { - "line": 105, + "line": 106, "column": 42 }, "end": { - "line": 105, + "line": 106, "column": 43 } } @@ -19359,15 +19527,15 @@ "postfix": false, "binop": null }, - "start": 2925, - "end": 2926, + "start": 2984, + "end": 2985, "loc": { "start": { - "line": 105, + "line": 106, "column": 43 }, "end": { - "line": 105, + "line": 106, "column": 44 } } @@ -19385,15 +19553,15 @@ "binop": null, "updateContext": null }, - "start": 2926, - "end": 2927, + "start": 2985, + "end": 2986, "loc": { "start": { - "line": 105, + "line": 106, "column": 44 }, "end": { - "line": 105, + "line": 106, "column": 45 } } @@ -19410,15 +19578,15 @@ "postfix": false, "binop": null }, - "start": 2932, - "end": 2933, + "start": 2991, + "end": 2992, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 5 } } @@ -19435,15 +19603,15 @@ "postfix": false, "binop": null }, - "start": 2933, - "end": 2934, + "start": 2992, + "end": 2993, "loc": { "start": { - "line": 106, + "line": 107, "column": 5 }, "end": { - "line": 106, + "line": 107, "column": 6 } } @@ -19461,15 +19629,15 @@ "binop": null, "updateContext": null }, - "start": 2934, - "end": 2935, + "start": 2993, + "end": 2994, "loc": { "start": { - "line": 106, + "line": 107, "column": 6 }, "end": { - "line": 106, + "line": 107, "column": 7 } } @@ -19486,15 +19654,15 @@ "postfix": false, "binop": null }, - "start": 2938, - "end": 2939, + "start": 2997, + "end": 2998, "loc": { "start": { - "line": 107, + "line": 108, "column": 2 }, "end": { - "line": 107, + "line": 108, "column": 3 } } @@ -19511,15 +19679,15 @@ "postfix": false, "binop": null }, - "start": 2939, - "end": 2940, + "start": 2998, + "end": 2999, "loc": { "start": { - "line": 107, + "line": 108, "column": 3 }, "end": { - "line": 107, + "line": 108, "column": 4 } } @@ -19537,15 +19705,15 @@ "binop": null, "updateContext": null }, - "start": 2940, - "end": 2941, + "start": 2999, + "end": 3000, "loc": { "start": { - "line": 107, + "line": 108, "column": 4 }, "end": { - "line": 107, + "line": 108, "column": 5 } } @@ -19562,15 +19730,15 @@ "postfix": false, "binop": null }, - "start": 2942, - "end": 2943, + "start": 3001, + "end": 3002, "loc": { "start": { - "line": 108, + "line": 109, "column": 0 }, "end": { - "line": 108, + "line": 109, "column": 1 } } @@ -19578,15 +19746,15 @@ { "type": "CommentLine", "value": " What is this about again?", - "start": 2945, - "end": 2973, + "start": 3004, + "end": 3032, "loc": { "start": { - "line": 110, + "line": 111, "column": 0 }, "end": { - "line": 110, + "line": 111, "column": 28 } } @@ -19604,15 +19772,15 @@ "binop": null }, "value": "process", - "start": 2974, - "end": 2981, + "start": 3033, + "end": 3040, "loc": { "start": { - "line": 111, + "line": 112, "column": 0 }, "end": { - "line": 111, + "line": 112, "column": 7 } } @@ -19630,15 +19798,15 @@ "binop": null, "updateContext": null }, - "start": 2981, - "end": 2982, + "start": 3040, + "end": 3041, "loc": { "start": { - "line": 111, + "line": 112, "column": 7 }, "end": { - "line": 111, + "line": 112, "column": 8 } } @@ -19656,15 +19824,15 @@ "binop": null }, "value": "on", - "start": 2982, - "end": 2984, + "start": 3041, + "end": 3043, "loc": { "start": { - "line": 111, + "line": 112, "column": 8 }, "end": { - "line": 111, + "line": 112, "column": 10 } } @@ -19681,15 +19849,15 @@ "postfix": false, "binop": null }, - "start": 2984, - "end": 2985, + "start": 3043, + "end": 3044, "loc": { "start": { - "line": 111, + "line": 112, "column": 10 }, "end": { - "line": 111, + "line": 112, "column": 11 } } @@ -19708,15 +19876,15 @@ "updateContext": null }, "value": "unhandledRejection", - "start": 2985, - "end": 3005, + "start": 3044, + "end": 3064, "loc": { "start": { - "line": 111, + "line": 112, "column": 11 }, "end": { - "line": 111, + "line": 112, "column": 31 } } @@ -19734,15 +19902,15 @@ "binop": null, "updateContext": null }, - "start": 3005, - "end": 3006, + "start": 3064, + "end": 3065, "loc": { "start": { - "line": 111, + "line": 112, "column": 31 }, "end": { - "line": 111, + "line": 112, "column": 32 } } @@ -19760,15 +19928,15 @@ "binop": null }, "value": "err", - "start": 3007, - "end": 3010, + "start": 3066, + "end": 3069, "loc": { "start": { - "line": 111, + "line": 112, "column": 33 }, "end": { - "line": 111, + "line": 112, "column": 36 } } @@ -19786,15 +19954,15 @@ "binop": null, "updateContext": null }, - "start": 3011, - "end": 3013, + "start": 3070, + "end": 3072, "loc": { "start": { - "line": 111, + "line": 112, "column": 37 }, "end": { - "line": 111, + "line": 112, "column": 39 } } @@ -19811,15 +19979,15 @@ "postfix": false, "binop": null }, - "start": 3014, - "end": 3015, + "start": 3073, + "end": 3074, "loc": { "start": { - "line": 111, + "line": 112, "column": 40 }, "end": { - "line": 111, + "line": 112, "column": 41 } } @@ -19827,15 +19995,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 3018, - "end": 3040, + "start": 3077, + "end": 3099, "loc": { "start": { - "line": 112, + "line": 113, "column": 2 }, "end": { - "line": 112, + "line": 113, "column": 24 } } @@ -19853,15 +20021,15 @@ "binop": null }, "value": "process", - "start": 3043, - "end": 3050, + "start": 3102, + "end": 3109, "loc": { "start": { - "line": 113, + "line": 114, "column": 2 }, "end": { - "line": 113, + "line": 114, "column": 9 } } @@ -19879,15 +20047,15 @@ "binop": null, "updateContext": null }, - "start": 3050, - "end": 3051, + "start": 3109, + "end": 3110, "loc": { "start": { - "line": 113, + "line": 114, "column": 9 }, "end": { - "line": 113, + "line": 114, "column": 10 } } @@ -19905,15 +20073,15 @@ "binop": null }, "value": "stdout", - "start": 3051, - "end": 3057, + "start": 3110, + "end": 3116, "loc": { "start": { - "line": 113, + "line": 114, "column": 10 }, "end": { - "line": 113, + "line": 114, "column": 16 } } @@ -19931,15 +20099,15 @@ "binop": null, "updateContext": null }, - "start": 3057, - "end": 3058, + "start": 3116, + "end": 3117, "loc": { "start": { - "line": 113, + "line": 114, "column": 16 }, "end": { - "line": 113, + "line": 114, "column": 17 } } @@ -19957,15 +20125,15 @@ "binop": null }, "value": "write", - "start": 3058, - "end": 3063, + "start": 3117, + "end": 3122, "loc": { "start": { - "line": 113, + "line": 114, "column": 17 }, "end": { - "line": 113, + "line": 114, "column": 22 } } @@ -19982,15 +20150,15 @@ "postfix": false, "binop": null }, - "start": 3063, - "end": 3064, + "start": 3122, + "end": 3123, "loc": { "start": { - "line": 113, + "line": 114, "column": 22 }, "end": { - "line": 113, + "line": 114, "column": 23 } } @@ -20008,15 +20176,15 @@ "binop": null }, "value": "JSON", - "start": 3064, - "end": 3068, + "start": 3123, + "end": 3127, "loc": { "start": { - "line": 113, + "line": 114, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 27 } } @@ -20034,15 +20202,15 @@ "binop": null, "updateContext": null }, - "start": 3068, - "end": 3069, + "start": 3127, + "end": 3128, "loc": { "start": { - "line": 113, + "line": 114, "column": 27 }, "end": { - "line": 113, + "line": 114, "column": 28 } } @@ -20060,15 +20228,15 @@ "binop": null }, "value": "stringify", - "start": 3069, - "end": 3078, + "start": 3128, + "end": 3137, "loc": { "start": { - "line": 113, + "line": 114, "column": 28 }, "end": { - "line": 113, + "line": 114, "column": 37 } } @@ -20085,15 +20253,15 @@ "postfix": false, "binop": null }, - "start": 3078, - "end": 3079, + "start": 3137, + "end": 3138, "loc": { "start": { - "line": 113, + "line": 114, "column": 37 }, "end": { - "line": 113, + "line": 114, "column": 38 } } @@ -20111,15 +20279,15 @@ "binop": null }, "value": "err", - "start": 3079, - "end": 3082, + "start": 3138, + "end": 3141, "loc": { "start": { - "line": 113, + "line": 114, "column": 38 }, "end": { - "line": 113, + "line": 114, "column": 41 } } @@ -20136,15 +20304,15 @@ "postfix": false, "binop": null }, - "start": 3082, - "end": 3083, + "start": 3141, + "end": 3142, "loc": { "start": { - "line": 113, + "line": 114, "column": 41 }, "end": { - "line": 113, + "line": 114, "column": 42 } } @@ -20161,15 +20329,15 @@ "postfix": false, "binop": null }, - "start": 3083, - "end": 3084, + "start": 3142, + "end": 3143, "loc": { "start": { - "line": 113, + "line": 114, "column": 42 }, "end": { - "line": 113, + "line": 114, "column": 43 } } @@ -20187,15 +20355,15 @@ "binop": null, "updateContext": null }, - "start": 3084, - "end": 3085, + "start": 3143, + "end": 3144, "loc": { "start": { - "line": 113, + "line": 114, "column": 43 }, "end": { - "line": 113, + "line": 114, "column": 44 } } @@ -20213,15 +20381,15 @@ "binop": null }, "value": "process", - "start": 3088, - "end": 3095, + "start": 3147, + "end": 3154, "loc": { "start": { - "line": 114, + "line": 115, "column": 2 }, "end": { - "line": 114, + "line": 115, "column": 9 } } @@ -20239,15 +20407,15 @@ "binop": null, "updateContext": null }, - "start": 3095, - "end": 3096, + "start": 3154, + "end": 3155, "loc": { "start": { - "line": 114, + "line": 115, "column": 9 }, "end": { - "line": 114, + "line": 115, "column": 10 } } @@ -20265,15 +20433,15 @@ "binop": null }, "value": "exit", - "start": 3096, - "end": 3100, + "start": 3155, + "end": 3159, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 14 } } @@ -20290,15 +20458,15 @@ "postfix": false, "binop": null }, - "start": 3100, - "end": 3101, + "start": 3159, + "end": 3160, "loc": { "start": { - "line": 114, + "line": 115, "column": 14 }, "end": { - "line": 114, + "line": 115, "column": 15 } } @@ -20317,15 +20485,15 @@ "updateContext": null }, "value": 1, - "start": 3101, - "end": 3102, + "start": 3160, + "end": 3161, "loc": { "start": { - "line": 114, + "line": 115, "column": 15 }, "end": { - "line": 114, + "line": 115, "column": 16 } } @@ -20342,15 +20510,15 @@ "postfix": false, "binop": null }, - "start": 3102, - "end": 3103, + "start": 3161, + "end": 3162, "loc": { "start": { - "line": 114, + "line": 115, "column": 16 }, "end": { - "line": 114, + "line": 115, "column": 17 } } @@ -20368,15 +20536,15 @@ "binop": null, "updateContext": null }, - "start": 3103, - "end": 3104, + "start": 3162, + "end": 3163, "loc": { "start": { - "line": 114, + "line": 115, "column": 17 }, "end": { - "line": 114, + "line": 115, "column": 18 } } @@ -20393,15 +20561,15 @@ "postfix": false, "binop": null }, - "start": 3105, - "end": 3106, + "start": 3164, + "end": 3165, "loc": { "start": { - "line": 115, + "line": 116, "column": 0 }, "end": { - "line": 115, + "line": 116, "column": 1 } } @@ -20418,15 +20586,15 @@ "postfix": false, "binop": null }, - "start": 3106, - "end": 3107, + "start": 3165, + "end": 3166, "loc": { "start": { - "line": 115, + "line": 116, "column": 1 }, "end": { - "line": 115, + "line": 116, "column": 2 } } @@ -20444,15 +20612,15 @@ "binop": null, "updateContext": null }, - "start": 3107, - "end": 3108, + "start": 3166, + "end": 3167, "loc": { "start": { - "line": 115, + "line": 116, "column": 2 }, "end": { - "line": 115, + "line": 116, "column": 3 } } @@ -20470,15 +20638,15 @@ "binop": null }, "value": "process", - "start": 3109, - "end": 3116, + "start": 3168, + "end": 3175, "loc": { "start": { - "line": 116, + "line": 117, "column": 0 }, "end": { - "line": 116, + "line": 117, "column": 7 } } @@ -20496,15 +20664,15 @@ "binop": null, "updateContext": null }, - "start": 3116, - "end": 3117, + "start": 3175, + "end": 3176, "loc": { "start": { - "line": 116, + "line": 117, "column": 7 }, "end": { - "line": 116, + "line": 117, "column": 8 } } @@ -20522,15 +20690,15 @@ "binop": null }, "value": "on", - "start": 3117, - "end": 3119, + "start": 3176, + "end": 3178, "loc": { "start": { - "line": 116, + "line": 117, "column": 8 }, "end": { - "line": 116, + "line": 117, "column": 10 } } @@ -20547,15 +20715,15 @@ "postfix": false, "binop": null }, - "start": 3119, - "end": 3120, + "start": 3178, + "end": 3179, "loc": { "start": { - "line": 116, + "line": 117, "column": 10 }, "end": { - "line": 116, + "line": 117, "column": 11 } } @@ -20574,15 +20742,15 @@ "updateContext": null }, "value": "unhandledException", - "start": 3120, - "end": 3140, + "start": 3179, + "end": 3199, "loc": { "start": { - "line": 116, + "line": 117, "column": 11 }, "end": { - "line": 116, + "line": 117, "column": 31 } } @@ -20600,15 +20768,15 @@ "binop": null, "updateContext": null }, - "start": 3140, - "end": 3141, + "start": 3199, + "end": 3200, "loc": { "start": { - "line": 116, + "line": 117, "column": 31 }, "end": { - "line": 116, + "line": 117, "column": 32 } } @@ -20626,15 +20794,15 @@ "binop": null }, "value": "err", - "start": 3142, - "end": 3145, + "start": 3201, + "end": 3204, "loc": { "start": { - "line": 116, + "line": 117, "column": 33 }, "end": { - "line": 116, + "line": 117, "column": 36 } } @@ -20652,15 +20820,15 @@ "binop": null, "updateContext": null }, - "start": 3146, - "end": 3148, + "start": 3205, + "end": 3207, "loc": { "start": { - "line": 116, + "line": 117, "column": 37 }, "end": { - "line": 116, + "line": 117, "column": 39 } } @@ -20677,15 +20845,15 @@ "postfix": false, "binop": null }, - "start": 3149, - "end": 3150, + "start": 3208, + "end": 3209, "loc": { "start": { - "line": 116, + "line": 117, "column": 40 }, "end": { - "line": 116, + "line": 117, "column": 41 } } @@ -20693,15 +20861,15 @@ { "type": "CommentLine", "value": " eslint-disable-line", - "start": 3153, - "end": 3175, + "start": 3212, + "end": 3234, "loc": { "start": { - "line": 117, + "line": 118, "column": 2 }, "end": { - "line": 117, + "line": 118, "column": 24 } } @@ -20719,15 +20887,15 @@ "binop": null }, "value": "process", - "start": 3178, - "end": 3185, + "start": 3237, + "end": 3244, "loc": { "start": { - "line": 118, + "line": 119, "column": 2 }, "end": { - "line": 118, + "line": 119, "column": 9 } } @@ -20745,15 +20913,15 @@ "binop": null, "updateContext": null }, - "start": 3185, - "end": 3186, + "start": 3244, + "end": 3245, "loc": { "start": { - "line": 118, + "line": 119, "column": 9 }, "end": { - "line": 118, + "line": 119, "column": 10 } } @@ -20771,15 +20939,15 @@ "binop": null }, "value": "stdout", - "start": 3186, - "end": 3192, + "start": 3245, + "end": 3251, "loc": { "start": { - "line": 118, + "line": 119, "column": 10 }, "end": { - "line": 118, + "line": 119, "column": 16 } } @@ -20797,15 +20965,15 @@ "binop": null, "updateContext": null }, - "start": 3192, - "end": 3193, + "start": 3251, + "end": 3252, "loc": { "start": { - "line": 118, + "line": 119, "column": 16 }, "end": { - "line": 118, + "line": 119, "column": 17 } } @@ -20823,15 +20991,15 @@ "binop": null }, "value": "write", - "start": 3193, - "end": 3198, + "start": 3252, + "end": 3257, "loc": { "start": { - "line": 118, + "line": 119, "column": 17 }, "end": { - "line": 118, + "line": 119, "column": 22 } } @@ -20848,15 +21016,15 @@ "postfix": false, "binop": null }, - "start": 3198, - "end": 3199, + "start": 3257, + "end": 3258, "loc": { "start": { - "line": 118, + "line": 119, "column": 22 }, "end": { - "line": 118, + "line": 119, "column": 23 } } @@ -20874,15 +21042,15 @@ "binop": null }, "value": "JSON", - "start": 3199, - "end": 3203, + "start": 3258, + "end": 3262, "loc": { "start": { - "line": 118, + "line": 119, "column": 23 }, "end": { - "line": 118, + "line": 119, "column": 27 } } @@ -20900,15 +21068,15 @@ "binop": null, "updateContext": null }, - "start": 3203, - "end": 3204, + "start": 3262, + "end": 3263, "loc": { "start": { - "line": 118, + "line": 119, "column": 27 }, "end": { - "line": 118, + "line": 119, "column": 28 } } @@ -20926,15 +21094,15 @@ "binop": null }, "value": "stringify", - "start": 3204, - "end": 3213, + "start": 3263, + "end": 3272, "loc": { "start": { - "line": 118, + "line": 119, "column": 28 }, "end": { - "line": 118, + "line": 119, "column": 37 } } @@ -20951,15 +21119,15 @@ "postfix": false, "binop": null }, - "start": 3213, - "end": 3214, + "start": 3272, + "end": 3273, "loc": { "start": { - "line": 118, + "line": 119, "column": 37 }, "end": { - "line": 118, + "line": 119, "column": 38 } } @@ -20977,15 +21145,15 @@ "binop": null }, "value": "err", - "start": 3214, - "end": 3217, + "start": 3273, + "end": 3276, "loc": { "start": { - "line": 118, + "line": 119, "column": 38 }, "end": { - "line": 118, + "line": 119, "column": 41 } } @@ -21002,15 +21170,15 @@ "postfix": false, "binop": null }, - "start": 3217, - "end": 3218, + "start": 3276, + "end": 3277, "loc": { "start": { - "line": 118, + "line": 119, "column": 41 }, "end": { - "line": 118, + "line": 119, "column": 42 } } @@ -21027,15 +21195,15 @@ "postfix": false, "binop": null }, - "start": 3218, - "end": 3219, + "start": 3277, + "end": 3278, "loc": { "start": { - "line": 118, + "line": 119, "column": 42 }, "end": { - "line": 118, + "line": 119, "column": 43 } } @@ -21053,15 +21221,15 @@ "binop": null, "updateContext": null }, - "start": 3219, - "end": 3220, + "start": 3278, + "end": 3279, "loc": { "start": { - "line": 118, + "line": 119, "column": 43 }, "end": { - "line": 118, + "line": 119, "column": 44 } } @@ -21079,15 +21247,15 @@ "binop": null }, "value": "process", - "start": 3223, - "end": 3230, + "start": 3282, + "end": 3289, "loc": { "start": { - "line": 119, + "line": 120, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 9 } } @@ -21105,15 +21273,15 @@ "binop": null, "updateContext": null }, - "start": 3230, - "end": 3231, + "start": 3289, + "end": 3290, "loc": { "start": { - "line": 119, + "line": 120, "column": 9 }, "end": { - "line": 119, + "line": 120, "column": 10 } } @@ -21131,15 +21299,15 @@ "binop": null }, "value": "exit", - "start": 3231, - "end": 3235, + "start": 3290, + "end": 3294, "loc": { "start": { - "line": 119, + "line": 120, "column": 10 }, "end": { - "line": 119, + "line": 120, "column": 14 } } @@ -21156,15 +21324,15 @@ "postfix": false, "binop": null }, - "start": 3235, - "end": 3236, + "start": 3294, + "end": 3295, "loc": { "start": { - "line": 119, + "line": 120, "column": 14 }, "end": { - "line": 119, + "line": 120, "column": 15 } } @@ -21183,15 +21351,15 @@ "updateContext": null }, "value": 1, - "start": 3236, - "end": 3237, + "start": 3295, + "end": 3296, "loc": { "start": { - "line": 119, + "line": 120, "column": 15 }, "end": { - "line": 119, + "line": 120, "column": 16 } } @@ -21208,15 +21376,15 @@ "postfix": false, "binop": null }, - "start": 3237, - "end": 3238, + "start": 3296, + "end": 3297, "loc": { "start": { - "line": 119, + "line": 120, "column": 16 }, "end": { - "line": 119, + "line": 120, "column": 17 } } @@ -21234,15 +21402,15 @@ "binop": null, "updateContext": null }, - "start": 3238, - "end": 3239, + "start": 3297, + "end": 3298, "loc": { "start": { - "line": 119, + "line": 120, "column": 17 }, "end": { - "line": 119, + "line": 120, "column": 18 } } @@ -21259,15 +21427,15 @@ "postfix": false, "binop": null }, - "start": 3240, - "end": 3241, + "start": 3299, + "end": 3300, "loc": { "start": { - "line": 120, + "line": 121, "column": 0 }, "end": { - "line": 120, + "line": 121, "column": 1 } } @@ -21284,15 +21452,15 @@ "postfix": false, "binop": null }, - "start": 3241, - "end": 3242, + "start": 3300, + "end": 3301, "loc": { "start": { - "line": 120, + "line": 121, "column": 1 }, "end": { - "line": 120, + "line": 121, "column": 2 } } @@ -21310,15 +21478,15 @@ "binop": null, "updateContext": null }, - "start": 3242, - "end": 3243, + "start": 3301, + "end": 3302, "loc": { "start": { - "line": 120, + "line": 121, "column": 2 }, "end": { - "line": 120, + "line": 121, "column": 3 } } @@ -21336,15 +21504,15 @@ "binop": null, "updateContext": null }, - "start": 3243, - "end": 3243, + "start": 3302, + "end": 3302, "loc": { "start": { - "line": 120, + "line": 121, "column": 3 }, "end": { - "line": 120, + "line": 121, "column": 3 } } diff --git a/docs/ast/source/helpers/healthcheck.helper.js.json b/docs/ast/source/helpers/healthcheck.helper.js.json index d9090a1..0615409 100644 --- a/docs/ast/source/helpers/healthcheck.helper.js.json +++ b/docs/ast/source/helpers/healthcheck.helper.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 5138, + "end": 5305, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 175, + "line": 180, "column": 33 } }, "program": { "type": "Program", "start": 0, - "end": 5138, + "end": 5305, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 175, + "line": 180, "column": 33 } }, @@ -1993,14 +1993,14 @@ { "type": "FunctionDeclaration", "start": 1341, - "end": 2265, + "end": 2283, "loc": { "start": { "line": 47, "column": 0 }, "end": { - "line": 79, + "line": 80, "column": 1 } }, @@ -2047,14 +2047,14 @@ "body": { "type": "BlockStatement", "start": 1390, - "end": 2265, + "end": 2283, "loc": { "start": { "line": 47, "column": 49 }, "end": { - "line": 79, + "line": 80, "column": 1 } }, @@ -4108,173 +4108,194 @@ { "type": "TryStatement", "start": 2121, - "end": 2244, + "end": 2262, "loc": { "start": { "line": 72, "column": 2 }, "end": { - "line": 77, + "line": 78, "column": 3 } }, "block": { "type": "BlockStatement", "start": 2125, - "end": 2168, + "end": 2186, "loc": { "start": { "line": 72, "column": 6 }, "end": { - "line": 74, + "line": 75, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2131, - "end": 2164, + "start": 2149, + "end": 2182, "loc": { "start": { - "line": 73, + "line": 74, "column": 4 }, "end": { - "line": 73, + "line": 74, "column": 37 } }, "expression": { "type": "AssignmentExpression", - "start": 2131, - "end": 2163, + "start": 2149, + "end": 2181, "loc": { "start": { - "line": 73, + "line": 74, "column": 4 }, "end": { - "line": 73, + "line": 74, "column": 36 } }, "operator": "+=", "left": { "type": "MemberExpression", - "start": 2131, - "end": 2146, + "start": 2149, + "end": 2164, "loc": { "start": { - "line": 73, + "line": 74, "column": 4 }, "end": { - "line": 73, + "line": 74, "column": 19 } }, "object": { "type": "Identifier", - "start": 2131, - "end": 2139, + "start": 2149, + "end": 2157, "loc": { "start": { - "line": 73, + "line": 74, "column": 4 }, "end": { - "line": 73, + "line": 74, "column": 12 }, "identifierName": "response" }, - "name": "response" + "name": "response", + "leadingComments": null }, "property": { "type": "Identifier", - "start": 2140, - "end": 2146, + "start": 2158, + "end": 2164, "loc": { "start": { - "line": 73, + "line": 74, "column": 13 }, "end": { - "line": 73, + "line": 74, "column": 19 }, "identifierName": "status" }, "name": "status" }, - "computed": false + "computed": false, + "leadingComments": null }, "right": { "type": "AwaitExpression", - "start": 2150, - "end": 2163, + "start": 2168, + "end": 2181, "loc": { "start": { - "line": 73, + "line": 74, "column": 23 }, "end": { - "line": 73, + "line": 74, "column": 36 } }, "argument": { "type": "Identifier", - "start": 2156, - "end": 2163, + "start": 2174, + "end": 2181, "loc": { "start": { - "line": 73, + "line": 74, "column": 29 }, "end": { - "line": 73, + "line": 74, "column": 36 }, "identifierName": "promise" }, "name": "promise" } + }, + "leadingComments": null + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 2131, + "end": 2144, + "loc": { + "start": { + "line": 73, + "column": 4 + }, + "end": { + "line": 73, + "column": 17 + } + } } - } + ] } ], "directives": [] }, "handler": { "type": "CatchClause", - "start": 2169, - "end": 2244, + "start": 2187, + "end": 2262, "loc": { "start": { - "line": 74, + "line": 75, "column": 4 }, "end": { - "line": 77, + "line": 78, "column": 3 } }, "param": { "type": "Identifier", - "start": 2176, - "end": 2181, + "start": 2194, + "end": 2199, "loc": { "start": { - "line": 74, + "line": 75, "column": 11 }, "end": { - "line": 74, + "line": 75, "column": 16 }, "identifierName": "error" @@ -4283,73 +4304,73 @@ }, "body": { "type": "BlockStatement", - "start": 2183, - "end": 2244, + "start": 2201, + "end": 2262, "loc": { "start": { - "line": 74, + "line": 75, "column": 18 }, "end": { - "line": 77, + "line": 78, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2189, - "end": 2211, + "start": 2207, + "end": 2229, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 26 } }, "expression": { "type": "AssignmentExpression", - "start": 2189, - "end": 2210, + "start": 2207, + "end": 2228, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 25 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 2189, - "end": 2203, + "start": 2207, + "end": 2221, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 18 } }, "object": { "type": "Identifier", - "start": 2189, - "end": 2197, + "start": 2207, + "end": 2215, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 12 }, "identifierName": "response" @@ -4358,15 +4379,15 @@ }, "property": { "type": "Identifier", - "start": 2198, - "end": 2203, + "start": 2216, + "end": 2221, "loc": { "start": { - "line": 75, + "line": 76, "column": 13 }, "end": { - "line": 75, + "line": 76, "column": 18 }, "identifierName": "error" @@ -4377,15 +4398,15 @@ }, "right": { "type": "BooleanLiteral", - "start": 2206, - "end": 2210, + "start": 2224, + "end": 2228, "loc": { "start": { - "line": 75, + "line": 76, "column": 21 }, "end": { - "line": 75, + "line": 76, "column": 25 } }, @@ -4395,58 +4416,58 @@ }, { "type": "ExpressionStatement", - "start": 2216, - "end": 2240, + "start": 2234, + "end": 2258, "loc": { "start": { - "line": 76, + "line": 77, "column": 4 }, "end": { - "line": 76, + "line": 77, "column": 28 } }, "expression": { "type": "AssignmentExpression", - "start": 2216, - "end": 2239, + "start": 2234, + "end": 2257, "loc": { "start": { - "line": 76, + "line": 77, "column": 4 }, "end": { - "line": 76, + "line": 77, "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 2216, - "end": 2231, + "start": 2234, + "end": 2249, "loc": { "start": { - "line": 76, + "line": 77, "column": 4 }, "end": { - "line": 76, + "line": 77, "column": 19 } }, "object": { "type": "Identifier", - "start": 2216, - "end": 2224, + "start": 2234, + "end": 2242, "loc": { "start": { - "line": 76, + "line": 77, "column": 4 }, "end": { - "line": 76, + "line": 77, "column": 12 }, "identifierName": "response" @@ -4455,15 +4476,15 @@ }, "property": { "type": "Identifier", - "start": 2225, - "end": 2231, + "start": 2243, + "end": 2249, "loc": { "start": { - "line": 76, + "line": 77, "column": 13 }, "end": { - "line": 76, + "line": 77, "column": 19 }, "identifierName": "status" @@ -4474,15 +4495,15 @@ }, "right": { "type": "Identifier", - "start": 2234, - "end": 2239, + "start": 2252, + "end": 2257, "loc": { "start": { - "line": 76, + "line": 77, "column": 22 }, "end": { - "line": 76, + "line": 77, "column": 27 }, "identifierName": "error" @@ -4500,29 +4521,29 @@ }, { "type": "ReturnStatement", - "start": 2247, - "end": 2263, + "start": 2265, + "end": 2281, "loc": { "start": { - "line": 78, + "line": 79, "column": 2 }, "end": { - "line": 78, + "line": 79, "column": 18 } }, "argument": { "type": "Identifier", - "start": 2254, - "end": 2262, + "start": 2272, + "end": 2280, "loc": { "start": { - "line": 78, + "line": 79, "column": 9 }, "end": { - "line": 78, + "line": 79, "column": 17 }, "identifierName": "response" @@ -4556,15 +4577,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the current branch of the build (TODO: development vs production?)\n * @return {string} information about the current branch and build\n ", - "start": 2267, - "end": 2419, + "start": 2285, + "end": 2437, "loc": { "start": { - "line": 81, + "line": 82, "column": 0 }, "end": { - "line": 84, + "line": 85, "column": 3 } } @@ -4573,29 +4594,29 @@ }, { "type": "FunctionDeclaration", - "start": 2420, - "end": 2616, + "start": 2438, + "end": 2634, "loc": { "start": { - "line": 85, + "line": 86, "column": 0 }, "end": { - "line": 90, + "line": 91, "column": 1 } }, "id": { "type": "Identifier", - "start": 2429, - "end": 2438, + "start": 2447, + "end": 2456, "loc": { "start": { - "line": 85, + "line": 86, "column": 9 }, "end": { - "line": 85, + "line": 86, "column": 18 }, "identifierName": "getBranch" @@ -4609,59 +4630,59 @@ "params": [], "body": { "type": "BlockStatement", - "start": 2441, - "end": 2616, + "start": 2459, + "end": 2634, "loc": { "start": { - "line": 85, + "line": 86, "column": 21 }, "end": { - "line": 90, + "line": 91, "column": 1 } }, "body": [ { "type": "VariableDeclaration", - "start": 2445, - "end": 2543, + "start": 2463, + "end": 2561, "loc": { "start": { - "line": 86, + "line": 87, "column": 2 }, "end": { - "line": 86, + "line": 87, "column": 100 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 2451, - "end": 2542, + "start": 2469, + "end": 2560, "loc": { "start": { - "line": 86, + "line": 87, "column": 8 }, "end": { - "line": 86, + "line": 87, "column": 99 } }, "id": { "type": "Identifier", - "start": 2451, - "end": 2458, + "start": 2469, + "end": 2476, "loc": { "start": { - "line": 86, + "line": 87, "column": 8 }, "end": { - "line": 86, + "line": 87, "column": 15 }, "identifierName": "content" @@ -4670,43 +4691,43 @@ }, "init": { "type": "CallExpression", - "start": 2461, - "end": 2542, + "start": 2479, + "end": 2560, "loc": { "start": { - "line": 86, + "line": 87, "column": 18 }, "end": { - "line": 86, + "line": 87, "column": 99 } }, "callee": { "type": "MemberExpression", - "start": 2461, - "end": 2478, + "start": 2479, + "end": 2496, "loc": { "start": { - "line": 86, + "line": 87, "column": 18 }, "end": { - "line": 86, + "line": 87, "column": 35 } }, "object": { "type": "Identifier", - "start": 2461, - "end": 2465, + "start": 2479, + "end": 2483, "loc": { "start": { - "line": 86, + "line": 87, "column": 18 }, "end": { - "line": 86, + "line": 87, "column": 22 }, "identifierName": "file" @@ -4715,15 +4736,15 @@ }, "property": { "type": "Identifier", - "start": 2466, - "end": 2478, + "start": 2484, + "end": 2496, "loc": { "start": { - "line": 86, + "line": 87, "column": 23 }, "end": { - "line": 86, + "line": 87, "column": 35 }, "identifierName": "readFileSync" @@ -4735,43 +4756,43 @@ "arguments": [ { "type": "CallExpression", - "start": 2479, - "end": 2518, + "start": 2497, + "end": 2536, "loc": { "start": { - "line": 86, + "line": 87, "column": 36 }, "end": { - "line": 86, + "line": 87, "column": 75 } }, "callee": { "type": "MemberExpression", - "start": 2479, - "end": 2488, + "start": 2497, + "end": 2506, "loc": { "start": { - "line": 86, + "line": 87, "column": 36 }, "end": { - "line": 86, + "line": 87, "column": 45 } }, "object": { "type": "Identifier", - "start": 2479, - "end": 2483, + "start": 2497, + "end": 2501, "loc": { "start": { - "line": 86, + "line": 87, "column": 36 }, "end": { - "line": 86, + "line": 87, "column": 40 }, "identifierName": "path" @@ -4780,15 +4801,15 @@ }, "property": { "type": "Identifier", - "start": 2484, - "end": 2488, + "start": 2502, + "end": 2506, "loc": { "start": { - "line": 86, + "line": 87, "column": 41 }, "end": { - "line": 86, + "line": 87, "column": 45 }, "identifierName": "join" @@ -4800,15 +4821,15 @@ "arguments": [ { "type": "Identifier", - "start": 2489, - "end": 2498, + "start": 2507, + "end": 2516, "loc": { "start": { - "line": 86, + "line": 87, "column": 46 }, "end": { - "line": 86, + "line": 87, "column": 55 }, "identifierName": "__dirname" @@ -4817,15 +4838,15 @@ }, { "type": "StringLiteral", - "start": 2500, - "end": 2517, + "start": 2518, + "end": 2535, "loc": { "start": { - "line": 86, + "line": 87, "column": 57 }, "end": { - "line": 86, + "line": 87, "column": 74 } }, @@ -4839,30 +4860,30 @@ }, { "type": "ObjectExpression", - "start": 2520, - "end": 2541, + "start": 2538, + "end": 2559, "loc": { "start": { - "line": 86, + "line": 87, "column": 77 }, "end": { - "line": 86, + "line": 87, "column": 98 } }, "properties": [ { "type": "ObjectProperty", - "start": 2522, - "end": 2539, + "start": 2540, + "end": 2557, "loc": { "start": { - "line": 86, + "line": 87, "column": 79 }, "end": { - "line": 86, + "line": 87, "column": 96 } }, @@ -4871,15 +4892,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2522, - "end": 2530, + "start": 2540, + "end": 2548, "loc": { "start": { - "line": 86, + "line": 87, "column": 79 }, "end": { - "line": 86, + "line": 87, "column": 87 }, "identifierName": "encoding" @@ -4888,15 +4909,15 @@ }, "value": { "type": "StringLiteral", - "start": 2532, - "end": 2539, + "start": 2550, + "end": 2557, "loc": { "start": { - "line": 86, + "line": 87, "column": 89 }, "end": { - "line": 86, + "line": 87, "column": 96 } }, @@ -4917,44 +4938,44 @@ }, { "type": "VariableDeclaration", - "start": 2547, - "end": 2580, + "start": 2565, + "end": 2598, "loc": { "start": { - "line": 88, + "line": 89, "column": 2 }, "end": { - "line": 88, + "line": 89, "column": 35 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 2553, - "end": 2579, + "start": 2571, + "end": 2597, "loc": { "start": { - "line": 88, + "line": 89, "column": 8 }, "end": { - "line": 88, + "line": 89, "column": 34 } }, "id": { "type": "Identifier", - "start": 2553, - "end": 2558, + "start": 2571, + "end": 2576, "loc": { "start": { - "line": 88, + "line": 89, "column": 8 }, "end": { - "line": 88, + "line": 89, "column": 13 }, "identifierName": "split" @@ -4963,43 +4984,43 @@ }, "init": { "type": "CallExpression", - "start": 2561, - "end": 2579, + "start": 2579, + "end": 2597, "loc": { "start": { - "line": 88, + "line": 89, "column": 16 }, "end": { - "line": 88, + "line": 89, "column": 34 } }, "callee": { "type": "MemberExpression", - "start": 2561, - "end": 2574, + "start": 2579, + "end": 2592, "loc": { "start": { - "line": 88, + "line": 89, "column": 16 }, "end": { - "line": 88, + "line": 89, "column": 29 } }, "object": { "type": "Identifier", - "start": 2561, - "end": 2568, + "start": 2579, + "end": 2586, "loc": { "start": { - "line": 88, + "line": 89, "column": 16 }, "end": { - "line": 88, + "line": 89, "column": 23 }, "identifierName": "content" @@ -5008,15 +5029,15 @@ }, "property": { "type": "Identifier", - "start": 2569, - "end": 2574, + "start": 2587, + "end": 2592, "loc": { "start": { - "line": 88, + "line": 89, "column": 24 }, "end": { - "line": 88, + "line": 89, "column": 29 }, "identifierName": "split" @@ -5028,15 +5049,15 @@ "arguments": [ { "type": "StringLiteral", - "start": 2575, - "end": 2578, + "start": 2593, + "end": 2596, "loc": { "start": { - "line": 88, + "line": 89, "column": 30 }, "end": { - "line": 88, + "line": 89, "column": 33 } }, @@ -5054,43 +5075,43 @@ }, { "type": "ReturnStatement", - "start": 2583, - "end": 2614, + "start": 2601, + "end": 2632, "loc": { "start": { - "line": 89, + "line": 90, "column": 2 }, "end": { - "line": 89, + "line": 90, "column": 33 } }, "argument": { "type": "MemberExpression", - "start": 2590, - "end": 2613, + "start": 2608, + "end": 2631, "loc": { "start": { - "line": 89, + "line": 90, "column": 9 }, "end": { - "line": 89, + "line": 90, "column": 32 } }, "object": { "type": "Identifier", - "start": 2590, - "end": 2595, + "start": 2608, + "end": 2613, "loc": { "start": { - "line": 89, + "line": 90, "column": 9 }, "end": { - "line": 89, + "line": 90, "column": 14 }, "identifierName": "split" @@ -5099,43 +5120,43 @@ }, "property": { "type": "BinaryExpression", - "start": 2596, - "end": 2612, + "start": 2614, + "end": 2630, "loc": { "start": { - "line": 89, + "line": 90, "column": 15 }, "end": { - "line": 89, + "line": 90, "column": 31 } }, "left": { "type": "MemberExpression", - "start": 2596, - "end": 2608, + "start": 2614, + "end": 2626, "loc": { "start": { - "line": 89, + "line": 90, "column": 15 }, "end": { - "line": 89, + "line": 90, "column": 27 } }, "object": { "type": "Identifier", - "start": 2596, - "end": 2601, + "start": 2614, + "end": 2619, "loc": { "start": { - "line": 89, + "line": 90, "column": 15 }, "end": { - "line": 89, + "line": 90, "column": 20 }, "identifierName": "split" @@ -5144,15 +5165,15 @@ }, "property": { "type": "Identifier", - "start": 2602, - "end": 2608, + "start": 2620, + "end": 2626, "loc": { "start": { - "line": 89, + "line": 90, "column": 21 }, "end": { - "line": 89, + "line": 90, "column": 27 }, "identifierName": "length" @@ -5164,15 +5185,15 @@ "operator": "-", "right": { "type": "NumericLiteral", - "start": 2611, - "end": 2612, + "start": 2629, + "end": 2630, "loc": { "start": { - "line": 89, + "line": 90, "column": 30 }, "end": { - "line": 89, + "line": 90, "column": 31 } }, @@ -5194,15 +5215,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the current branch of the build (TODO: development vs production?)\n * @return {string} information about the current branch and build\n ", - "start": 2267, - "end": 2419, + "start": 2285, + "end": 2437, "loc": { "start": { - "line": 81, + "line": 82, "column": 0 }, "end": { - "line": 84, + "line": 85, "column": 3 } } @@ -5212,15 +5233,15 @@ { "type": "CommentBlock", "value": "*\n * Class to wrap the methods that are used for server healthcheck\n ", - "start": 2618, - "end": 2691, + "start": 2636, + "end": 2709, "loc": { "start": { - "line": 92, + "line": 93, "column": 0 }, "end": { - "line": 94, + "line": 95, "column": 3 } } @@ -5229,29 +5250,29 @@ }, { "type": "Identifier", - "start": 2692, - "end": 4965, + "start": 2710, + "end": 5132, "loc": { "start": { - "line": 95, + "line": 96, "column": 0 }, "end": { - "line": 168, + "line": 173, "column": 1 } }, "id": { "type": "Identifier", - "start": 2698, - "end": 2715, + "start": 2716, + "end": 2733, "loc": { "start": { - "line": 95, + "line": 96, "column": 6 }, "end": { - "line": 95, + "line": 96, "column": 23 }, "identifierName": "HealthcheckHelper" @@ -5262,30 +5283,30 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 2716, - "end": 4965, + "start": 2734, + "end": 5132, "loc": { "start": { - "line": 95, + "line": 96, "column": 24 }, "end": { - "line": 168, + "line": 173, "column": 1 } }, "body": [ { "type": "ClassMethod", - "start": 2962, - "end": 3401, + "start": 2980, + "end": 3419, "loc": { "start": { - "line": 103, + "line": 104, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 3 } }, @@ -5293,15 +5314,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2962, - "end": 2973, + "start": 2980, + "end": 2991, "loc": { "start": { - "line": 103, + "line": 104, "column": 2 }, "end": { - "line": 103, + "line": 104, "column": 13 }, "identifierName": "constructor" @@ -5317,88 +5338,88 @@ "params": [], "body": { "type": "BlockStatement", - "start": 2976, - "end": 3401, + "start": 2994, + "end": 3419, "loc": { "start": { - "line": 103, + "line": 104, "column": 16 }, "end": { - "line": 119, + "line": 120, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2982, - "end": 3003, + "start": 3000, + "end": 3021, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 25 } }, "expression": { "type": "AssignmentExpression", - "start": 2982, - "end": 3002, + "start": 3000, + "end": 3020, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 2982, - "end": 2997, + "start": 3000, + "end": 3015, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 19 } }, "object": { "type": "ThisExpression", - "start": 2982, - "end": 2986, + "start": 3000, + "end": 3004, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 8 } } }, "property": { "type": "Identifier", - "start": 2987, - "end": 2997, + "start": 3005, + "end": 3015, "loc": { "start": { - "line": 104, + "line": 105, "column": 9 }, "end": { - "line": 104, + "line": 105, "column": 19 }, "identifierName": "serviceMap" @@ -5409,15 +5430,15 @@ }, "right": { "type": "ObjectExpression", - "start": 3000, - "end": 3002, + "start": 3018, + "end": 3020, "loc": { "start": { - "line": 104, + "line": 105, "column": 22 }, "end": { - "line": 104, + "line": 105, "column": 24 } }, @@ -5427,73 +5448,73 @@ }, { "type": "ExpressionStatement", - "start": 3008, - "end": 3024, + "start": 3026, + "end": 3042, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 20 } }, "expression": { "type": "AssignmentExpression", - "start": 3008, - "end": 3023, + "start": 3026, + "end": 3041, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 19 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3008, - "end": 3018, + "start": 3026, + "end": 3036, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 14 } }, "object": { "type": "ThisExpression", - "start": 3008, - "end": 3012, + "start": 3026, + "end": 3030, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 8 } } }, "property": { "type": "Identifier", - "start": 3013, - "end": 3018, + "start": 3031, + "end": 3036, "loc": { "start": { - "line": 105, + "line": 106, "column": 9 }, "end": { - "line": 105, + "line": 106, "column": 14 }, "identifierName": "dbMap" @@ -5504,15 +5525,15 @@ }, "right": { "type": "ObjectExpression", - "start": 3021, - "end": 3023, + "start": 3039, + "end": 3041, "loc": { "start": { - "line": 105, + "line": 106, "column": 17 }, "end": { - "line": 105, + "line": 106, "column": 19 } }, @@ -5522,57 +5543,57 @@ }, { "type": "ExpressionStatement", - "start": 3029, - "end": 3220, + "start": 3047, + "end": 3238, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 111, + "line": 112, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 3029, - "end": 3219, + "start": 3047, + "end": 3237, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 111, + "line": 112, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 3029, - "end": 3035, + "start": 3047, + "end": 3053, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 10 } }, "object": { "type": "Identifier", - "start": 3029, - "end": 3030, + "start": 3047, + "end": 3048, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 5 }, "identifierName": "_" @@ -5581,15 +5602,15 @@ }, "property": { "type": "Identifier", - "start": 3031, - "end": 3035, + "start": 3049, + "end": 3053, "loc": { "start": { - "line": 106, + "line": 107, "column": 6 }, "end": { - "line": 106, + "line": 107, "column": 10 }, "identifierName": "each" @@ -5601,29 +5622,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 3036, - "end": 3060, + "start": 3054, + "end": 3078, "loc": { "start": { - "line": 106, + "line": 107, "column": 11 }, "end": { - "line": 106, + "line": 107, "column": 35 } }, "object": { "type": "Identifier", - "start": 3036, - "end": 3042, + "start": 3054, + "end": 3060, "loc": { "start": { - "line": 106, + "line": 107, "column": 11 }, "end": { - "line": 106, + "line": 107, "column": 17 }, "identifierName": "CONFIG" @@ -5632,15 +5653,15 @@ }, "property": { "type": "Identifier", - "start": 3043, - "end": 3060, + "start": 3061, + "end": 3078, "loc": { "start": { - "line": 106, + "line": 107, "column": 18 }, "end": { - "line": 106, + "line": 107, "column": 35 }, "identifierName": "EXTERNAL_SERVICES" @@ -5651,15 +5672,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 3062, - "end": 3218, + "start": 3080, + "end": 3236, "loc": { "start": { - "line": 106, + "line": 107, "column": 37 }, "end": { - "line": 111, + "line": 112, "column": 5 } }, @@ -5670,15 +5691,15 @@ "params": [ { "type": "Identifier", - "start": 3063, - "end": 3070, + "start": 3081, + "end": 3088, "loc": { "start": { - "line": 106, + "line": 107, "column": 38 }, "end": { - "line": 106, + "line": 107, "column": 45 }, "identifierName": "service" @@ -5687,15 +5708,15 @@ }, { "type": "Identifier", - "start": 3072, - "end": 3076, + "start": 3090, + "end": 3094, "loc": { "start": { - "line": 106, + "line": 107, "column": 47 }, "end": { - "line": 106, + "line": 107, "column": 51 }, "identifierName": "name" @@ -5705,72 +5726,72 @@ ], "body": { "type": "BlockStatement", - "start": 3081, - "end": 3218, + "start": 3099, + "end": 3236, "loc": { "start": { - "line": 106, + "line": 107, "column": 56 }, "end": { - "line": 111, + "line": 112, "column": 5 } }, "body": [ { "type": "IfStatement", - "start": 3089, - "end": 3173, + "start": 3107, + "end": 3191, "loc": { "start": { - "line": 107, + "line": 108, "column": 6 }, "end": { - "line": 109, + "line": 110, "column": 7 } }, "test": { "type": "BinaryExpression", - "start": 3093, - "end": 3126, + "start": 3111, + "end": 3144, "loc": { "start": { - "line": 107, + "line": 108, "column": 10 }, "end": { - "line": 107, + "line": 108, "column": 43 } }, "left": { "type": "MemberExpression", - "start": 3093, - "end": 3112, + "start": 3111, + "end": 3130, "loc": { "start": { - "line": 107, + "line": 108, "column": 10 }, "end": { - "line": 107, + "line": 108, "column": 29 } }, "object": { "type": "Identifier", - "start": 3093, - "end": 3100, + "start": 3111, + "end": 3118, "loc": { "start": { - "line": 107, + "line": 108, "column": 10 }, "end": { - "line": 107, + "line": 108, "column": 17 }, "identifierName": "service" @@ -5779,15 +5800,15 @@ }, "property": { "type": "Identifier", - "start": 3101, - "end": 3112, + "start": 3119, + "end": 3130, "loc": { "start": { - "line": 107, + "line": 108, "column": 18 }, "end": { - "line": 107, + "line": 108, "column": 29 }, "identifierName": "serviceName" @@ -5799,15 +5820,15 @@ "operator": "===", "right": { "type": "Identifier", - "start": 3117, - "end": 3126, + "start": 3135, + "end": 3144, "loc": { "start": { - "line": 107, + "line": 108, "column": 34 }, "end": { - "line": 107, + "line": 108, "column": 43 }, "identifierName": "undefined" @@ -5817,73 +5838,73 @@ }, "consequent": { "type": "BlockStatement", - "start": 3128, - "end": 3173, + "start": 3146, + "end": 3191, "loc": { "start": { - "line": 107, + "line": 108, "column": 45 }, "end": { - "line": 109, + "line": 110, "column": 7 } }, "body": [ { "type": "ExpressionStatement", - "start": 3138, - "end": 3165, + "start": 3156, + "end": 3183, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 35 } }, "expression": { "type": "AssignmentExpression", - "start": 3138, - "end": 3164, + "start": 3156, + "end": 3182, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 34 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3138, - "end": 3157, + "start": 3156, + "end": 3175, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 27 } }, "object": { "type": "Identifier", - "start": 3138, - "end": 3145, + "start": 3156, + "end": 3163, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 15 }, "identifierName": "service" @@ -5892,15 +5913,15 @@ }, "property": { "type": "Identifier", - "start": 3146, - "end": 3157, + "start": 3164, + "end": 3175, "loc": { "start": { - "line": 108, + "line": 109, "column": 16 }, "end": { - "line": 108, + "line": 109, "column": 27 }, "identifierName": "serviceName" @@ -5911,15 +5932,15 @@ }, "right": { "type": "Identifier", - "start": 3160, - "end": 3164, + "start": 3178, + "end": 3182, "loc": { "start": { - "line": 108, + "line": 109, "column": 30 }, "end": { - "line": 108, + "line": 109, "column": 34 }, "identifierName": "name" @@ -5935,87 +5956,87 @@ }, { "type": "ExpressionStatement", - "start": 3180, - "end": 3212, + "start": 3198, + "end": 3230, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 38 } }, "expression": { "type": "AssignmentExpression", - "start": 3180, - "end": 3211, + "start": 3198, + "end": 3229, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3180, - "end": 3201, + "start": 3198, + "end": 3219, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 27 } }, "object": { "type": "MemberExpression", - "start": 3180, - "end": 3195, + "start": 3198, + "end": 3213, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 21 } }, "object": { "type": "ThisExpression", - "start": 3180, - "end": 3184, + "start": 3198, + "end": 3202, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 10 } } }, "property": { "type": "Identifier", - "start": 3185, - "end": 3195, + "start": 3203, + "end": 3213, "loc": { "start": { - "line": 110, + "line": 111, "column": 11 }, "end": { - "line": 110, + "line": 111, "column": 21 }, "identifierName": "serviceMap" @@ -6026,15 +6047,15 @@ }, "property": { "type": "Identifier", - "start": 3196, - "end": 3200, + "start": 3214, + "end": 3218, "loc": { "start": { - "line": 110, + "line": 111, "column": 22 }, "end": { - "line": 110, + "line": 111, "column": 26 }, "identifierName": "name" @@ -6045,15 +6066,15 @@ }, "right": { "type": "Identifier", - "start": 3204, - "end": 3211, + "start": 3222, + "end": 3229, "loc": { "start": { - "line": 110, + "line": 111, "column": 30 }, "end": { - "line": 110, + "line": 111, "column": 37 }, "identifierName": "service" @@ -6071,57 +6092,57 @@ }, { "type": "ExpressionStatement", - "start": 3226, - "end": 3397, + "start": 3244, + "end": 3415, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 118, + "line": 119, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 3226, - "end": 3396, + "start": 3244, + "end": 3414, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 118, + "line": 119, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 3226, - "end": 3232, + "start": 3244, + "end": 3250, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 113, + "line": 114, "column": 10 } }, "object": { "type": "Identifier", - "start": 3226, - "end": 3227, + "start": 3244, + "end": 3245, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 113, + "line": 114, "column": 5 }, "identifierName": "_" @@ -6130,15 +6151,15 @@ }, "property": { "type": "Identifier", - "start": 3228, - "end": 3232, + "start": 3246, + "end": 3250, "loc": { "start": { - "line": 113, + "line": 114, "column": 6 }, "end": { - "line": 113, + "line": 114, "column": 10 }, "identifierName": "each" @@ -6150,29 +6171,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 3233, - "end": 3242, + "start": 3251, + "end": 3260, "loc": { "start": { - "line": 113, + "line": 114, "column": 11 }, "end": { - "line": 113, + "line": 114, "column": 20 } }, "object": { "type": "Identifier", - "start": 3233, - "end": 3239, + "start": 3251, + "end": 3257, "loc": { "start": { - "line": 113, + "line": 114, "column": 11 }, "end": { - "line": 113, + "line": 114, "column": 17 }, "identifierName": "CONFIG" @@ -6181,15 +6202,15 @@ }, "property": { "type": "Identifier", - "start": 3240, - "end": 3242, + "start": 3258, + "end": 3260, "loc": { "start": { - "line": 113, + "line": 114, "column": 18 }, "end": { - "line": 113, + "line": 114, "column": 20 }, "identifierName": "DB" @@ -6200,15 +6221,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 3244, - "end": 3395, + "start": 3262, + "end": 3413, "loc": { "start": { - "line": 113, + "line": 114, "column": 22 }, "end": { - "line": 118, + "line": 119, "column": 5 } }, @@ -6219,15 +6240,15 @@ "params": [ { "type": "Identifier", - "start": 3245, - "end": 3252, + "start": 3263, + "end": 3270, "loc": { "start": { - "line": 113, + "line": 114, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 30 }, "identifierName": "service" @@ -6236,15 +6257,15 @@ }, { "type": "Identifier", - "start": 3254, - "end": 3258, + "start": 3272, + "end": 3276, "loc": { "start": { - "line": 113, + "line": 114, "column": 32 }, "end": { - "line": 113, + "line": 114, "column": 36 }, "identifierName": "name" @@ -6254,72 +6275,72 @@ ], "body": { "type": "BlockStatement", - "start": 3263, - "end": 3395, + "start": 3281, + "end": 3413, "loc": { "start": { - "line": 113, + "line": 114, "column": 41 }, "end": { - "line": 118, + "line": 119, "column": 5 } }, "body": [ { "type": "IfStatement", - "start": 3271, - "end": 3355, + "start": 3289, + "end": 3373, "loc": { "start": { - "line": 114, + "line": 115, "column": 6 }, "end": { - "line": 116, + "line": 117, "column": 7 } }, "test": { "type": "BinaryExpression", - "start": 3275, - "end": 3308, + "start": 3293, + "end": 3326, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 43 } }, "left": { "type": "MemberExpression", - "start": 3275, - "end": 3294, + "start": 3293, + "end": 3312, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 29 } }, "object": { "type": "Identifier", - "start": 3275, - "end": 3282, + "start": 3293, + "end": 3300, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 17 }, "identifierName": "service" @@ -6328,15 +6349,15 @@ }, "property": { "type": "Identifier", - "start": 3283, - "end": 3294, + "start": 3301, + "end": 3312, "loc": { "start": { - "line": 114, + "line": 115, "column": 18 }, "end": { - "line": 114, + "line": 115, "column": 29 }, "identifierName": "serviceName" @@ -6348,15 +6369,15 @@ "operator": "===", "right": { "type": "Identifier", - "start": 3299, - "end": 3308, + "start": 3317, + "end": 3326, "loc": { "start": { - "line": 114, + "line": 115, "column": 34 }, "end": { - "line": 114, + "line": 115, "column": 43 }, "identifierName": "undefined" @@ -6366,73 +6387,73 @@ }, "consequent": { "type": "BlockStatement", - "start": 3310, - "end": 3355, + "start": 3328, + "end": 3373, "loc": { "start": { - "line": 114, + "line": 115, "column": 45 }, "end": { - "line": 116, + "line": 117, "column": 7 } }, "body": [ { "type": "ExpressionStatement", - "start": 3320, - "end": 3347, + "start": 3338, + "end": 3365, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 35 } }, "expression": { "type": "AssignmentExpression", - "start": 3320, - "end": 3346, + "start": 3338, + "end": 3364, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 34 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3320, - "end": 3339, + "start": 3338, + "end": 3357, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 27 } }, "object": { "type": "Identifier", - "start": 3320, - "end": 3327, + "start": 3338, + "end": 3345, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 15 }, "identifierName": "service" @@ -6441,15 +6462,15 @@ }, "property": { "type": "Identifier", - "start": 3328, - "end": 3339, + "start": 3346, + "end": 3357, "loc": { "start": { - "line": 115, + "line": 116, "column": 16 }, "end": { - "line": 115, + "line": 116, "column": 27 }, "identifierName": "serviceName" @@ -6460,15 +6481,15 @@ }, "right": { "type": "Identifier", - "start": 3342, - "end": 3346, + "start": 3360, + "end": 3364, "loc": { "start": { - "line": 115, + "line": 116, "column": 30 }, "end": { - "line": 115, + "line": 116, "column": 34 }, "identifierName": "name" @@ -6484,87 +6505,87 @@ }, { "type": "ExpressionStatement", - "start": 3362, - "end": 3389, + "start": 3380, + "end": 3407, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 33 } }, "expression": { "type": "AssignmentExpression", - "start": 3362, - "end": 3388, + "start": 3380, + "end": 3406, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3362, - "end": 3378, + "start": 3380, + "end": 3396, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 22 } }, "object": { "type": "MemberExpression", - "start": 3362, - "end": 3372, + "start": 3380, + "end": 3390, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 16 } }, "object": { "type": "ThisExpression", - "start": 3362, - "end": 3366, + "start": 3380, + "end": 3384, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 10 } } }, "property": { "type": "Identifier", - "start": 3367, - "end": 3372, + "start": 3385, + "end": 3390, "loc": { "start": { - "line": 117, + "line": 118, "column": 11 }, "end": { - "line": 117, + "line": 118, "column": 16 }, "identifierName": "dbMap" @@ -6575,15 +6596,15 @@ }, "property": { "type": "Identifier", - "start": 3373, - "end": 3377, + "start": 3391, + "end": 3395, "loc": { "start": { - "line": 117, + "line": 118, "column": 17 }, "end": { - "line": 117, + "line": 118, "column": 21 }, "identifierName": "name" @@ -6594,15 +6615,15 @@ }, "right": { "type": "Identifier", - "start": 3381, - "end": 3388, + "start": 3399, + "end": 3406, "loc": { "start": { - "line": 117, + "line": 118, "column": 25 }, "end": { - "line": 117, + "line": 118, "column": 32 }, "identifierName": "service" @@ -6626,15 +6647,15 @@ { "type": "CommentBlock", "value": "*\n * Creates the Healthcheck helper by loading the configuration file and parsing the database and external\n * service configurations\n ", - "start": 2721, - "end": 2866, + "start": 2739, + "end": 2884, "loc": { "start": { - "line": 97, + "line": 98, "column": 2 }, "end": { - "line": 100, + "line": 101, "column": 5 } } @@ -6642,15 +6663,15 @@ { "type": "CommentLine", "value": " Tried these with ES6 Map type but it made it much harder to do easy JSON manipulations", - "start": 2870, - "end": 2959, + "start": 2888, + "end": 2977, "loc": { "start": { - "line": 102, + "line": 103, "column": 2 }, "end": { - "line": 102, + "line": 103, "column": 91 } } @@ -6660,15 +6681,15 @@ { "type": "CommentBlock", "value": "*\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n ", - "start": 3405, - "end": 3633, + "start": 3423, + "end": 3651, "loc": { "start": { - "line": 121, + "line": 122, "column": 2 }, "end": { - "line": 125, + "line": 126, "column": 5 } } @@ -6677,15 +6698,15 @@ }, { "type": "ClassMethod", - "start": 3636, - "end": 4011, + "start": 3654, + "end": 4029, "loc": { "start": { - "line": 126, + "line": 127, "column": 2 }, "end": { - "line": 138, + "line": 139, "column": 3 } }, @@ -6693,15 +6714,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3642, - "end": 3651, + "start": 3660, + "end": 3669, "loc": { "start": { - "line": 126, + "line": 127, "column": 8 }, "end": { - "line": 126, + "line": 127, "column": 17 }, "identifierName": "isRunning" @@ -6716,15 +6737,15 @@ "params": [ { "type": "Identifier", - "start": 3652, - "end": 3663, + "start": 3670, + "end": 3681, "loc": { "start": { - "line": 126, + "line": 127, "column": 18 }, "end": { - "line": 126, + "line": 127, "column": 29 }, "identifierName": "serviceName" @@ -6734,59 +6755,59 @@ ], "body": { "type": "BlockStatement", - "start": 3665, - "end": 4011, + "start": 3683, + "end": 4029, "loc": { "start": { - "line": 126, + "line": 127, "column": 31 }, "end": { - "line": 138, + "line": 139, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 3671, - "end": 3713, + "start": 3689, + "end": 3731, "loc": { "start": { - "line": 127, + "line": 128, "column": 4 }, "end": { - "line": 127, + "line": 128, "column": 46 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 3677, - "end": 3712, + "start": 3695, + "end": 3730, "loc": { "start": { - "line": 127, + "line": 128, "column": 10 }, "end": { - "line": 127, + "line": 128, "column": 45 } }, "id": { "type": "Identifier", - "start": 3677, - "end": 3681, + "start": 3695, + "end": 3699, "loc": { "start": { - "line": 127, + "line": 128, "column": 10 }, "end": { - "line": 127, + "line": 128, "column": 14 }, "identifierName": "conf" @@ -6795,58 +6816,58 @@ }, "init": { "type": "MemberExpression", - "start": 3684, - "end": 3712, + "start": 3702, + "end": 3730, "loc": { "start": { - "line": 127, + "line": 128, "column": 17 }, "end": { - "line": 127, + "line": 128, "column": 45 } }, "object": { "type": "MemberExpression", - "start": 3684, - "end": 3699, + "start": 3702, + "end": 3717, "loc": { "start": { - "line": 127, + "line": 128, "column": 17 }, "end": { - "line": 127, + "line": 128, "column": 32 } }, "object": { "type": "ThisExpression", - "start": 3684, - "end": 3688, + "start": 3702, + "end": 3706, "loc": { "start": { - "line": 127, + "line": 128, "column": 17 }, "end": { - "line": 127, + "line": 128, "column": 21 } } }, "property": { "type": "Identifier", - "start": 3689, - "end": 3699, + "start": 3707, + "end": 3717, "loc": { "start": { - "line": 127, + "line": 128, "column": 22 }, "end": { - "line": 127, + "line": 128, "column": 32 }, "identifierName": "serviceMap" @@ -6857,15 +6878,15 @@ }, "property": { "type": "Identifier", - "start": 3700, - "end": 3711, + "start": 3718, + "end": 3729, "loc": { "start": { - "line": 127, + "line": 128, "column": 33 }, "end": { - "line": 127, + "line": 128, "column": 44 }, "identifierName": "serviceName" @@ -6881,15 +6902,15 @@ { "type": "CommentLine", "value": " TODO: don't check if it exists, check if it is actually running", - "start": 3718, - "end": 3784, + "start": 3736, + "end": 3802, "loc": { "start": { - "line": 128, + "line": 129, "column": 4 }, "end": { - "line": 128, + "line": 129, "column": 70 } } @@ -6898,43 +6919,43 @@ }, { "type": "IfStatement", - "start": 3789, - "end": 3988, + "start": 3807, + "end": 4006, "loc": { "start": { - "line": 129, + "line": 130, "column": 4 }, "end": { - "line": 135, + "line": 136, "column": 5 } }, "test": { "type": "BinaryExpression", - "start": 3793, - "end": 3811, + "start": 3811, + "end": 3829, "loc": { "start": { - "line": 129, + "line": 130, "column": 8 }, "end": { - "line": 129, + "line": 130, "column": 26 } }, "left": { "type": "Identifier", - "start": 3793, - "end": 3797, + "start": 3811, + "end": 3815, "loc": { "start": { - "line": 129, + "line": 130, "column": 8 }, "end": { - "line": 129, + "line": 130, "column": 12 }, "identifierName": "conf" @@ -6945,15 +6966,15 @@ "operator": "!==", "right": { "type": "Identifier", - "start": 3802, - "end": 3811, + "start": 3820, + "end": 3829, "loc": { "start": { - "line": 129, + "line": 130, "column": 17 }, "end": { - "line": 129, + "line": 130, "column": 26 }, "identifierName": "undefined" @@ -6964,58 +6985,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 3813, - "end": 3988, + "start": 3831, + "end": 4006, "loc": { "start": { - "line": 129, + "line": 130, "column": 28 }, "end": { - "line": 135, + "line": 136, "column": 5 } }, "body": [ { "type": "IfStatement", - "start": 3821, - "end": 3982, + "start": 3839, + "end": 4000, "loc": { "start": { - "line": 130, + "line": 131, "column": 6 }, "end": { - "line": 134, + "line": 135, "column": 7 } }, "test": { "type": "BinaryExpression", - "start": 3825, - "end": 3855, + "start": 3843, + "end": 3873, "loc": { "start": { - "line": 130, + "line": 131, "column": 10 }, "end": { - "line": 130, + "line": 131, "column": 40 } }, "left": { "type": "Identifier", - "start": 3825, - "end": 3829, + "start": 3843, + "end": 3847, "loc": { "start": { - "line": 130, + "line": 131, "column": 10 }, "end": { - "line": 130, + "line": 131, "column": 14 }, "identifierName": "conf" @@ -7025,15 +7046,15 @@ "operator": "instanceof", "right": { "type": "Identifier", - "start": 3841, - "end": 3855, + "start": 3859, + "end": 3873, "loc": { "start": { - "line": 130, + "line": 131, "column": 26 }, "end": { - "line": 130, + "line": 131, "column": 40 }, "identifierName": "DatabaseConfig" @@ -7043,72 +7064,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 3857, - "end": 3913, + "start": 3875, + "end": 3931, "loc": { "start": { - "line": 130, + "line": 131, "column": 42 }, "end": { - "line": 132, + "line": 133, "column": 7 } }, "body": [ { "type": "ReturnStatement", - "start": 3867, - "end": 3905, + "start": 3885, + "end": 3923, "loc": { "start": { - "line": 131, + "line": 132, "column": 8 }, "end": { - "line": 131, + "line": 132, "column": 46 } }, "argument": { "type": "AwaitExpression", - "start": 3874, - "end": 3904, + "start": 3892, + "end": 3922, "loc": { "start": { - "line": 131, + "line": 132, "column": 15 }, "end": { - "line": 131, + "line": 132, "column": 45 } }, "argument": { "type": "CallExpression", - "start": 3880, - "end": 3904, + "start": 3898, + "end": 3922, "loc": { "start": { - "line": 131, + "line": 132, "column": 21 }, "end": { - "line": 131, + "line": 132, "column": 45 } }, "callee": { "type": "Identifier", - "start": 3880, - "end": 3898, + "start": 3898, + "end": 3916, "loc": { "start": { - "line": 131, + "line": 132, "column": 21 }, "end": { - "line": 131, + "line": 132, "column": 39 }, "identifierName": "_getDatabaseStatus" @@ -7118,15 +7139,15 @@ "arguments": [ { "type": "Identifier", - "start": 3899, - "end": 3903, + "start": 3917, + "end": 3921, "loc": { "start": { - "line": 131, + "line": 132, "column": 40 }, "end": { - "line": 131, + "line": 132, "column": 44 }, "identifierName": "conf" @@ -7142,72 +7163,72 @@ }, "alternate": { "type": "BlockStatement", - "start": 3919, - "end": 3982, + "start": 3937, + "end": 4000, "loc": { "start": { - "line": 132, + "line": 133, "column": 13 }, "end": { - "line": 134, + "line": 135, "column": 7 } }, "body": [ { "type": "ReturnStatement", - "start": 3929, - "end": 3974, + "start": 3947, + "end": 3992, "loc": { "start": { - "line": 133, + "line": 134, "column": 8 }, "end": { - "line": 133, + "line": 134, "column": 53 } }, "argument": { "type": "AwaitExpression", - "start": 3936, - "end": 3973, + "start": 3954, + "end": 3991, "loc": { "start": { - "line": 133, + "line": 134, "column": 15 }, "end": { - "line": 133, + "line": 134, "column": 52 } }, "argument": { "type": "CallExpression", - "start": 3942, - "end": 3973, + "start": 3960, + "end": 3991, "loc": { "start": { - "line": 133, + "line": 134, "column": 21 }, "end": { - "line": 133, + "line": 134, "column": 52 } }, "callee": { "type": "Identifier", - "start": 3942, - "end": 3967, + "start": 3960, + "end": 3985, "loc": { "start": { - "line": 133, + "line": 134, "column": 21 }, "end": { - "line": 133, + "line": 134, "column": 46 }, "identifierName": "_getExternalServiceStatus" @@ -7217,15 +7238,15 @@ "arguments": [ { "type": "Identifier", - "start": 3968, - "end": 3972, + "start": 3986, + "end": 3990, "loc": { "start": { - "line": 133, + "line": 134, "column": 47 }, "end": { - "line": 133, + "line": 134, "column": 51 }, "identifierName": "conf" @@ -7248,15 +7269,15 @@ { "type": "CommentLine", "value": " TODO: don't check if it exists, check if it is actually running", - "start": 3718, - "end": 3784, + "start": 3736, + "end": 3802, "loc": { "start": { - "line": 128, + "line": 129, "column": 4 }, "end": { - "line": 128, + "line": 129, "column": 70 } } @@ -7265,29 +7286,29 @@ }, { "type": "ReturnStatement", - "start": 3994, - "end": 4007, + "start": 4012, + "end": 4025, "loc": { "start": { - "line": 137, + "line": 138, "column": 4 }, "end": { - "line": 137, + "line": 138, "column": 17 } }, "argument": { "type": "BooleanLiteral", - "start": 4001, - "end": 4006, + "start": 4019, + "end": 4024, "loc": { "start": { - "line": 137, + "line": 138, "column": 11 }, "end": { - "line": 137, + "line": 138, "column": 16 } }, @@ -7302,15 +7323,15 @@ { "type": "CommentBlock", "value": "*\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n ", - "start": 3405, - "end": 3633, + "start": 3423, + "end": 3651, "loc": { "start": { - "line": 121, + "line": 122, "column": 2 }, "end": { - "line": 125, + "line": 126, "column": 5 } } @@ -7320,15 +7341,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n ", - "start": 4015, - "end": 4431, + "start": 4033, + "end": 4449, "loc": { "start": { - "line": 140, + "line": 141, "column": 2 }, "end": { - "line": 147, + "line": 148, "column": 5 } } @@ -7337,15 +7358,15 @@ }, { "type": "ClassMethod", - "start": 4434, - "end": 4963, + "start": 4452, + "end": 5130, "loc": { "start": { - "line": 148, + "line": 149, "column": 2 }, "end": { - "line": 167, + "line": 172, "column": 3 } }, @@ -7353,15 +7374,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4440, - "end": 4449, + "start": 4458, + "end": 4467, "loc": { "start": { - "line": 148, + "line": 149, "column": 8 }, "end": { - "line": 148, + "line": 149, "column": 17 }, "identifierName": "getStatus" @@ -7376,15 +7397,15 @@ "params": [ { "type": "Identifier", - "start": 4450, - "end": 4455, + "start": 4468, + "end": 4473, "loc": { "start": { - "line": 148, + "line": 149, "column": 18 }, "end": { - "line": 148, + "line": 149, "column": 23 }, "identifierName": "level" @@ -7394,59 +7415,59 @@ ], "body": { "type": "BlockStatement", - "start": 4457, - "end": 4963, + "start": 4475, + "end": 5130, "loc": { "start": { - "line": 148, + "line": 149, "column": 25 }, "end": { - "line": 167, + "line": 172, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 4498, - "end": 4867, + "start": 4531, + "end": 4988, "loc": { "start": { - "line": 150, + "line": 151, "column": 4 }, "end": { - "line": 163, + "line": 168, "column": 6 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 4504, - "end": 4866, + "start": 4537, + "end": 4987, "loc": { "start": { - "line": 150, + "line": 151, "column": 10 }, "end": { - "line": 163, + "line": 168, "column": 5 } }, "id": { "type": "Identifier", - "start": 4504, - "end": 4510, + "start": 4537, + "end": 4543, "loc": { "start": { - "line": 150, + "line": 151, "column": 10 }, "end": { - "line": 150, + "line": 151, "column": 16 }, "identifierName": "status" @@ -7456,30 +7477,30 @@ }, "init": { "type": "ObjectExpression", - "start": 4513, - "end": 4866, + "start": 4546, + "end": 4987, "loc": { "start": { - "line": 150, + "line": 151, "column": 19 }, "end": { - "line": 163, + "line": 168, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 4521, - "end": 4712, + "start": 4554, + "end": 4833, "loc": { "start": { - "line": 151, + "line": 152, "column": 6 }, "end": { - "line": 160, + "line": 165, "column": 8 } }, @@ -7488,15 +7509,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4521, - "end": 4523, + "start": 4554, + "end": 4556, "loc": { "start": { - "line": 151, + "line": 152, "column": 6 }, "end": { - "line": 151, + "line": 152, "column": 8 }, "identifierName": "L1" @@ -7505,45 +7526,45 @@ }, "value": { "type": "ArrayExpression", - "start": 4525, - "end": 4712, + "start": 4558, + "end": 4833, "loc": { "start": { - "line": 151, + "line": 152, "column": 10 }, "end": { - "line": 160, + "line": 165, "column": 8 } }, "elements": [ { "type": "ObjectExpression", - "start": 4526, - "end": 4583, + "start": 4559, + "end": 4660, "loc": { "start": { - "line": 151, + "line": 152, "column": 11 }, "end": { - "line": 154, + "line": 157, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 4536, - "end": 4550, + "start": 4591, + "end": 4605, "loc": { "start": { - "line": 152, + "line": 154, "column": 8 }, "end": { - "line": 152, + "line": 154, "column": 22 } }, @@ -7552,32 +7573,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4536, - "end": 4540, + "start": 4591, + "end": 4595, "loc": { "start": { - "line": 152, + "line": 154, "column": 8 }, "end": { - "line": 152, + "line": 154, "column": 12 }, "identifierName": "name" }, - "name": "name" + "name": "name", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4542, - "end": 4550, + "start": 4597, + "end": 4605, "loc": { "start": { - "line": 152, + "line": 154, "column": 14 }, "end": { - "line": 152, + "line": 154, "column": 22 } }, @@ -7586,19 +7608,37 @@ "raw": "'SERVER'" }, "value": "SERVER" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4569, + "end": 4582, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 21 + } + } + } + ] }, { "type": "ObjectProperty", - "start": 4560, - "end": 4575, + "start": 4637, + "end": 4652, "loc": { "start": { - "line": 153, + "line": 156, "column": 8 }, "end": { - "line": 153, + "line": 156, "column": 23 } }, @@ -7607,32 +7647,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4560, - "end": 4566, + "start": 4637, + "end": 4643, "loc": { "start": { - "line": 153, + "line": 156, "column": 8 }, "end": { - "line": 153, + "line": 156, "column": 14 }, "identifierName": "status" }, - "name": "status" + "name": "status", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4568, - "end": 4575, + "start": 4645, + "end": 4652, "loc": { "start": { - "line": 153, + "line": 156, "column": 16 }, "end": { - "line": 153, + "line": 156, "column": 23 } }, @@ -7641,36 +7682,54 @@ "raw": "'alive'" }, "value": "alive" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4615, + "end": 4628, + "loc": { + "start": { + "line": 155, + "column": 8 + }, + "end": { + "line": 155, + "column": 21 + } + } + } + ] } ] }, { "type": "ObjectExpression", - "start": 4585, - "end": 4648, + "start": 4662, + "end": 4747, "loc": { "start": { - "line": 154, + "line": 157, "column": 9 }, "end": { - "line": 157, + "line": 161, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 4595, - "end": 4610, + "start": 4694, + "end": 4709, "loc": { "start": { - "line": 155, + "line": 159, "column": 8 }, "end": { - "line": 155, + "line": 159, "column": 23 } }, @@ -7679,32 +7738,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4595, - "end": 4599, + "start": 4694, + "end": 4698, "loc": { "start": { - "line": 155, + "line": 159, "column": 8 }, "end": { - "line": 155, + "line": 159, "column": 12 }, "identifierName": "name" }, - "name": "name" + "name": "name", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4601, - "end": 4610, + "start": 4700, + "end": 4709, "loc": { "start": { - "line": 155, + "line": 159, "column": 14 }, "end": { - "line": 155, + "line": 159, "column": 23 } }, @@ -7713,19 +7773,37 @@ "raw": "'VERSION'" }, "value": "VERSION" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4672, + "end": 4685, + "loc": { + "start": { + "line": 158, + "column": 8 + }, + "end": { + "line": 158, + "column": 21 + } + } + } + ] }, { "type": "ObjectProperty", - "start": 4620, - "end": 4640, + "start": 4719, + "end": 4739, "loc": { "start": { - "line": 156, + "line": 160, "column": 8 }, "end": { - "line": 156, + "line": 160, "column": 28 } }, @@ -7734,15 +7812,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4620, - "end": 4626, + "start": 4719, + "end": 4725, "loc": { "start": { - "line": 156, + "line": 160, "column": 8 }, "end": { - "line": 156, + "line": 160, "column": 14 }, "identifierName": "status" @@ -7751,29 +7829,29 @@ }, "value": { "type": "MemberExpression", - "start": 4628, - "end": 4640, + "start": 4727, + "end": 4739, "loc": { "start": { - "line": 156, + "line": 160, "column": 16 }, "end": { - "line": 156, + "line": 160, "column": 28 } }, "object": { "type": "Identifier", - "start": 4628, - "end": 4632, + "start": 4727, + "end": 4731, "loc": { "start": { - "line": 156, + "line": 160, "column": 16 }, "end": { - "line": 156, + "line": 160, "column": 20 }, "identifierName": "pack" @@ -7782,15 +7860,15 @@ }, "property": { "type": "Identifier", - "start": 4633, - "end": 4640, + "start": 4732, + "end": 4739, "loc": { "start": { - "line": 156, + "line": 160, "column": 21 }, "end": { - "line": 156, + "line": 160, "column": 28 }, "identifierName": "version" @@ -7804,30 +7882,30 @@ }, { "type": "ObjectExpression", - "start": 4650, - "end": 4711, + "start": 4749, + "end": 4832, "loc": { "start": { - "line": 157, + "line": 161, "column": 9 }, "end": { - "line": 160, + "line": 165, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 4660, - "end": 4674, + "start": 4781, + "end": 4795, "loc": { "start": { - "line": 158, + "line": 163, "column": 8 }, "end": { - "line": 158, + "line": 163, "column": 22 } }, @@ -7836,32 +7914,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4660, - "end": 4664, + "start": 4781, + "end": 4785, "loc": { "start": { - "line": 158, + "line": 163, "column": 8 }, "end": { - "line": 158, + "line": 163, "column": 12 }, "identifierName": "name" }, - "name": "name" + "name": "name", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4666, - "end": 4674, + "start": 4787, + "end": 4795, "loc": { "start": { - "line": 158, + "line": 163, "column": 14 }, "end": { - "line": 158, + "line": 163, "column": 22 } }, @@ -7870,19 +7949,37 @@ "raw": "'BRANCH'" }, "value": "BRANCH" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4759, + "end": 4772, + "loc": { + "start": { + "line": 162, + "column": 8 + }, + "end": { + "line": 162, + "column": 21 + } + } + } + ] }, { "type": "ObjectProperty", - "start": 4684, - "end": 4703, + "start": 4805, + "end": 4824, "loc": { "start": { - "line": 159, + "line": 164, "column": 8 }, "end": { - "line": 159, + "line": 164, "column": 27 } }, @@ -7891,15 +7988,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4684, - "end": 4690, + "start": 4805, + "end": 4811, "loc": { "start": { - "line": 159, + "line": 164, "column": 8 }, "end": { - "line": 159, + "line": 164, "column": 14 }, "identifierName": "status" @@ -7908,29 +8005,29 @@ }, "value": { "type": "CallExpression", - "start": 4692, - "end": 4703, + "start": 4813, + "end": 4824, "loc": { "start": { - "line": 159, + "line": 164, "column": 16 }, "end": { - "line": 159, + "line": 164, "column": 27 } }, "callee": { "type": "Identifier", - "start": 4692, - "end": 4701, + "start": 4813, + "end": 4822, "loc": { "start": { - "line": 159, + "line": 164, "column": 16 }, "end": { - "line": 159, + "line": 164, "column": 25 }, "identifierName": "getBranch" @@ -7947,15 +8044,15 @@ }, { "type": "ObjectProperty", - "start": 4720, - "end": 4780, + "start": 4841, + "end": 4901, "loc": { "start": { - "line": 161, + "line": 166, "column": 6 }, "end": { - "line": 161, + "line": 166, "column": 66 } }, @@ -7964,15 +8061,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4720, - "end": 4722, + "start": 4841, + "end": 4843, "loc": { "start": { - "line": 161, + "line": 166, "column": 6 }, "end": { - "line": 161, + "line": 166, "column": 8 }, "identifierName": "L2" @@ -7981,57 +8078,57 @@ }, "value": { "type": "AwaitExpression", - "start": 4724, - "end": 4780, + "start": 4845, + "end": 4901, "loc": { "start": { - "line": 161, + "line": 166, "column": 10 }, "end": { - "line": 161, + "line": 166, "column": 66 } }, "argument": { "type": "CallExpression", - "start": 4730, - "end": 4780, + "start": 4851, + "end": 4901, "loc": { "start": { - "line": 161, + "line": 166, "column": 16 }, "end": { - "line": 161, + "line": 166, "column": 66 } }, "callee": { "type": "MemberExpression", - "start": 4730, - "end": 4741, + "start": 4851, + "end": 4862, "loc": { "start": { - "line": 161, + "line": 166, "column": 16 }, "end": { - "line": 161, + "line": 166, "column": 27 } }, "object": { "type": "Identifier", - "start": 4730, - "end": 4737, + "start": 4851, + "end": 4858, "loc": { "start": { - "line": 161, + "line": 166, "column": 16 }, "end": { - "line": 161, + "line": 166, "column": 23 }, "identifierName": "Promise" @@ -8040,15 +8137,15 @@ }, "property": { "type": "Identifier", - "start": 4738, - "end": 4741, + "start": 4859, + "end": 4862, "loc": { "start": { - "line": 161, + "line": 166, "column": 24 }, "end": { - "line": 161, + "line": 166, "column": 27 }, "identifierName": "all" @@ -8060,43 +8157,43 @@ "arguments": [ { "type": "CallExpression", - "start": 4742, - "end": 4779, + "start": 4863, + "end": 4900, "loc": { "start": { - "line": 161, + "line": 166, "column": 28 }, "end": { - "line": 161, + "line": 166, "column": 65 } }, "callee": { "type": "MemberExpression", - "start": 4742, - "end": 4747, + "start": 4863, + "end": 4868, "loc": { "start": { - "line": 161, + "line": 166, "column": 28 }, "end": { - "line": 161, + "line": 166, "column": 33 } }, "object": { "type": "Identifier", - "start": 4742, - "end": 4743, + "start": 4863, + "end": 4864, "loc": { "start": { - "line": 161, + "line": 166, "column": 28 }, "end": { - "line": 161, + "line": 166, "column": 29 }, "identifierName": "_" @@ -8105,15 +8202,15 @@ }, "property": { "type": "Identifier", - "start": 4744, - "end": 4747, + "start": 4865, + "end": 4868, "loc": { "start": { - "line": 161, + "line": 166, "column": 30 }, "end": { - "line": 161, + "line": 166, "column": 33 }, "identifierName": "map" @@ -8125,44 +8222,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 4748, - "end": 4758, + "start": 4869, + "end": 4879, "loc": { "start": { - "line": 161, + "line": 166, "column": 34 }, "end": { - "line": 161, + "line": 166, "column": 44 } }, "object": { "type": "ThisExpression", - "start": 4748, - "end": 4752, + "start": 4869, + "end": 4873, "loc": { "start": { - "line": 161, + "line": 166, "column": 34 }, "end": { - "line": 161, + "line": 166, "column": 38 } } }, "property": { "type": "Identifier", - "start": 4753, - "end": 4758, + "start": 4874, + "end": 4879, "loc": { "start": { - "line": 161, + "line": 166, "column": 39 }, "end": { - "line": 161, + "line": 166, "column": 44 }, "identifierName": "dbMap" @@ -8173,15 +8270,15 @@ }, { "type": "Identifier", - "start": 4760, - "end": 4778, + "start": 4881, + "end": 4899, "loc": { "start": { - "line": 161, + "line": 166, "column": 46 }, "end": { - "line": 161, + "line": 166, "column": 64 }, "identifierName": "_getDatabaseStatus" @@ -8196,15 +8293,15 @@ }, { "type": "ObjectProperty", - "start": 4788, - "end": 4860, + "start": 4909, + "end": 4981, "loc": { "start": { - "line": 162, + "line": 167, "column": 6 }, "end": { - "line": 162, + "line": 167, "column": 78 } }, @@ -8213,15 +8310,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4788, - "end": 4790, + "start": 4909, + "end": 4911, "loc": { "start": { - "line": 162, + "line": 167, "column": 6 }, "end": { - "line": 162, + "line": 167, "column": 8 }, "identifierName": "L3" @@ -8230,57 +8327,57 @@ }, "value": { "type": "AwaitExpression", - "start": 4792, - "end": 4860, + "start": 4913, + "end": 4981, "loc": { "start": { - "line": 162, + "line": 167, "column": 10 }, "end": { - "line": 162, + "line": 167, "column": 78 } }, "argument": { "type": "CallExpression", - "start": 4798, - "end": 4860, + "start": 4919, + "end": 4981, "loc": { "start": { - "line": 162, + "line": 167, "column": 16 }, "end": { - "line": 162, + "line": 167, "column": 78 } }, "callee": { "type": "MemberExpression", - "start": 4798, - "end": 4809, + "start": 4919, + "end": 4930, "loc": { "start": { - "line": 162, + "line": 167, "column": 16 }, "end": { - "line": 162, + "line": 167, "column": 27 } }, "object": { "type": "Identifier", - "start": 4798, - "end": 4805, + "start": 4919, + "end": 4926, "loc": { "start": { - "line": 162, + "line": 167, "column": 16 }, "end": { - "line": 162, + "line": 167, "column": 23 }, "identifierName": "Promise" @@ -8289,15 +8386,15 @@ }, "property": { "type": "Identifier", - "start": 4806, - "end": 4809, + "start": 4927, + "end": 4930, "loc": { "start": { - "line": 162, + "line": 167, "column": 24 }, "end": { - "line": 162, + "line": 167, "column": 27 }, "identifierName": "all" @@ -8309,43 +8406,43 @@ "arguments": [ { "type": "CallExpression", - "start": 4810, - "end": 4859, + "start": 4931, + "end": 4980, "loc": { "start": { - "line": 162, + "line": 167, "column": 28 }, "end": { - "line": 162, + "line": 167, "column": 77 } }, "callee": { "type": "MemberExpression", - "start": 4810, - "end": 4815, + "start": 4931, + "end": 4936, "loc": { "start": { - "line": 162, + "line": 167, "column": 28 }, "end": { - "line": 162, + "line": 167, "column": 33 } }, "object": { "type": "Identifier", - "start": 4810, - "end": 4811, + "start": 4931, + "end": 4932, "loc": { "start": { - "line": 162, + "line": 167, "column": 28 }, "end": { - "line": 162, + "line": 167, "column": 29 }, "identifierName": "_" @@ -8354,15 +8451,15 @@ }, "property": { "type": "Identifier", - "start": 4812, - "end": 4815, + "start": 4933, + "end": 4936, "loc": { "start": { - "line": 162, + "line": 167, "column": 30 }, "end": { - "line": 162, + "line": 167, "column": 33 }, "identifierName": "map" @@ -8374,44 +8471,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 4816, - "end": 4831, + "start": 4937, + "end": 4952, "loc": { "start": { - "line": 162, + "line": 167, "column": 34 }, "end": { - "line": 162, + "line": 167, "column": 49 } }, "object": { "type": "ThisExpression", - "start": 4816, - "end": 4820, + "start": 4937, + "end": 4941, "loc": { "start": { - "line": 162, + "line": 167, "column": 34 }, "end": { - "line": 162, + "line": 167, "column": 38 } } }, "property": { "type": "Identifier", - "start": 4821, - "end": 4831, + "start": 4942, + "end": 4952, "loc": { "start": { - "line": 162, + "line": 167, "column": 39 }, "end": { - "line": 162, + "line": 167, "column": 49 }, "identifierName": "serviceMap" @@ -8422,15 +8519,15 @@ }, { "type": "Identifier", - "start": 4833, - "end": 4858, + "start": 4954, + "end": 4979, "loc": { "start": { - "line": 162, + "line": 167, "column": 51 }, "end": { - "line": 162, + "line": 167, "column": 76 }, "identifierName": "_getExternalServiceStatus" @@ -8451,18 +8548,18 @@ "kind": "const", "leadingComments": [ { - "type": "CommentBlock", - "value": " eslint-disable id-length ", - "start": 4463, - "end": 4493, + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 4481, + "end": 4526, "loc": { "start": { - "line": 149, + "line": 150, "column": 4 }, "end": { - "line": 149, - "column": 34 + "line": 150, + "column": 49 } } } @@ -8471,15 +8568,15 @@ { "type": "CommentBlock", "value": " eslint-enable id-length ", - "start": 4872, - "end": 4901, + "start": 4993, + "end": 5022, "loc": { "start": { - "line": 164, + "line": 169, "column": 4 }, "end": { - "line": 164, + "line": 169, "column": 33 } } @@ -8488,57 +8585,57 @@ }, { "type": "ReturnStatement", - "start": 4907, - "end": 4959, + "start": 5028, + "end": 5080, "loc": { "start": { - "line": 166, + "line": 171, "column": 4 }, "end": { - "line": 166, + "line": 171, "column": 56 } }, "argument": { "type": "ConditionalExpression", - "start": 4914, - "end": 4958, + "start": 5035, + "end": 5079, "loc": { "start": { - "line": 166, + "line": 171, "column": 11 }, "end": { - "line": 166, + "line": 171, "column": 55 } }, "test": { "type": "BinaryExpression", - "start": 4914, - "end": 4933, + "start": 5035, + "end": 5054, "loc": { "start": { - "line": 166, + "line": 171, "column": 11 }, "end": { - "line": 166, + "line": 171, "column": 30 } }, "left": { "type": "Identifier", - "start": 4914, - "end": 4919, + "start": 5035, + "end": 5040, "loc": { "start": { - "line": 166, + "line": 171, "column": 11 }, "end": { - "line": 166, + "line": 171, "column": 16 }, "identifierName": "level" @@ -8549,15 +8646,15 @@ "operator": "===", "right": { "type": "Identifier", - "start": 4924, - "end": 4933, + "start": 5045, + "end": 5054, "loc": { "start": { - "line": 166, + "line": 171, "column": 21 }, "end": { - "line": 166, + "line": 171, "column": 30 }, "identifierName": "undefined" @@ -8568,15 +8665,15 @@ }, "consequent": { "type": "Identifier", - "start": 4936, - "end": 4942, + "start": 5057, + "end": 5063, "loc": { "start": { - "line": 166, + "line": 171, "column": 33 }, "end": { - "line": 166, + "line": 171, "column": 39 }, "identifierName": "status" @@ -8585,29 +8682,29 @@ }, "alternate": { "type": "MemberExpression", - "start": 4945, - "end": 4958, + "start": 5066, + "end": 5079, "loc": { "start": { - "line": 166, + "line": 171, "column": 42 }, "end": { - "line": 166, + "line": 171, "column": 55 } }, "object": { "type": "Identifier", - "start": 4945, - "end": 4951, + "start": 5066, + "end": 5072, "loc": { "start": { - "line": 166, + "line": 171, "column": 42 }, "end": { - "line": 166, + "line": 171, "column": 48 }, "identifierName": "status" @@ -8616,15 +8713,15 @@ }, "property": { "type": "Identifier", - "start": 4952, - "end": 4957, + "start": 5073, + "end": 5078, "loc": { "start": { - "line": 166, + "line": 171, "column": 49 }, "end": { - "line": 166, + "line": 171, "column": 54 }, "identifierName": "level" @@ -8639,19 +8736,37 @@ { "type": "CommentBlock", "value": " eslint-enable id-length ", - "start": 4872, - "end": 4901, + "start": 4993, + "end": 5022, "loc": { "start": { - "line": 164, + "line": 169, "column": 4 }, "end": { - "line": 164, + "line": 169, "column": 33 } } } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 5081, + "end": 5126, + "loc": { + "start": { + "line": 171, + "column": 57 + }, + "end": { + "line": 171, + "column": 102 + } + } + } ] } ], @@ -8661,15 +8776,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n ", - "start": 4015, - "end": 4431, + "start": 4033, + "end": 4449, "loc": { "start": { - "line": 140, + "line": 141, "column": 2 }, "end": { - "line": 147, + "line": 148, "column": 5 } } @@ -8685,44 +8800,44 @@ }, { "type": "Identifier", - "start": 5054, - "end": 5104, + "start": 5221, + "end": 5271, "loc": { "start": { - "line": 174, + "line": 179, "column": 0 }, "end": { - "line": 174, + "line": 179, "column": 50 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 5060, - "end": 5103, + "start": 5227, + "end": 5270, "loc": { "start": { - "line": 174, + "line": 179, "column": 6 }, "end": { - "line": 174, + "line": 179, "column": 49 } }, "id": { "type": "Identifier", - "start": 5060, - "end": 5077, + "start": 5227, + "end": 5244, "loc": { "start": { - "line": 174, + "line": 179, "column": 6 }, "end": { - "line": 174, + "line": 179, "column": 23 }, "identifierName": "healthcheckHelper" @@ -8732,29 +8847,29 @@ }, "init": { "type": "NewExpression", - "start": 5080, - "end": 5103, + "start": 5247, + "end": 5270, "loc": { "start": { - "line": 174, + "line": 179, "column": 26 }, "end": { - "line": 174, + "line": 179, "column": 49 } }, "callee": { "type": "Identifier", - "start": 5084, - "end": 5101, + "start": 5251, + "end": 5268, "loc": { "start": { - "line": 174, + "line": 179, "column": 30 }, "end": { - "line": 174, + "line": 179, "column": 47 }, "identifierName": "HealthcheckHelper" @@ -8773,29 +8888,29 @@ }, { "type": "Identifier", - "start": 5105, - "end": 5138, + "start": 5272, + "end": 5305, "loc": { "start": { - "line": 175, + "line": 180, "column": 0 }, "end": { - "line": 175, + "line": 180, "column": 33 } }, "declaration": { "type": "Identifier", - "start": 5120, - "end": 5137, + "start": 5287, + "end": 5304, "loc": { "start": { - "line": 175, + "line": 180, "column": 15 }, "end": { - "line": 175, + "line": 180, "column": 32 }, "identifierName": "healthcheckHelper" @@ -8808,43 +8923,43 @@ }, { "type": "ExportDefaultDeclaration", - "start": 5105, - "end": 5138, + "start": 5272, + "end": 5305, "loc": { "start": { - "line": 175, + "line": 180, "column": 0 }, "end": { - "line": 175, + "line": 180, "column": 33 } }, "declaration": { "type": "ClassDeclaration", - "start": 2692, - "end": 4965, + "start": 2710, + "end": 5132, "loc": { "start": { - "line": 95, + "line": 96, "column": 0 }, "end": { - "line": 168, + "line": 173, "column": 1 } }, "id": { "type": "Identifier", - "start": 2698, - "end": 2715, + "start": 2716, + "end": 2733, "loc": { "start": { - "line": 95, + "line": 96, "column": 6 }, "end": { - "line": 95, + "line": 96, "column": 23 }, "identifierName": "HealthcheckHelper" @@ -8855,30 +8970,30 @@ "superClass": null, "body": { "type": "ClassBody", - "start": 2716, - "end": 4965, + "start": 2734, + "end": 5132, "loc": { "start": { - "line": 95, + "line": 96, "column": 24 }, "end": { - "line": 168, + "line": 173, "column": 1 } }, "body": [ { "type": "ClassMethod", - "start": 2962, - "end": 3401, + "start": 2980, + "end": 3419, "loc": { "start": { - "line": 103, + "line": 104, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 3 } }, @@ -8886,15 +9001,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 2962, - "end": 2973, + "start": 2980, + "end": 2991, "loc": { "start": { - "line": 103, + "line": 104, "column": 2 }, "end": { - "line": 103, + "line": 104, "column": 13 }, "identifierName": "constructor" @@ -8910,88 +9025,88 @@ "params": [], "body": { "type": "BlockStatement", - "start": 2976, - "end": 3401, + "start": 2994, + "end": 3419, "loc": { "start": { - "line": 103, + "line": 104, "column": 16 }, "end": { - "line": 119, + "line": 120, "column": 3 } }, "body": [ { "type": "ExpressionStatement", - "start": 2982, - "end": 3003, + "start": 3000, + "end": 3021, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 25 } }, "expression": { "type": "AssignmentExpression", - "start": 2982, - "end": 3002, + "start": 3000, + "end": 3020, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 2982, - "end": 2997, + "start": 3000, + "end": 3015, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 19 } }, "object": { "type": "ThisExpression", - "start": 2982, - "end": 2986, + "start": 3000, + "end": 3004, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 8 } } }, "property": { "type": "Identifier", - "start": 2987, - "end": 2997, + "start": 3005, + "end": 3015, "loc": { "start": { - "line": 104, + "line": 105, "column": 9 }, "end": { - "line": 104, + "line": 105, "column": 19 }, "identifierName": "serviceMap" @@ -9002,15 +9117,15 @@ }, "right": { "type": "ObjectExpression", - "start": 3000, - "end": 3002, + "start": 3018, + "end": 3020, "loc": { "start": { - "line": 104, + "line": 105, "column": 22 }, "end": { - "line": 104, + "line": 105, "column": 24 } }, @@ -9020,73 +9135,73 @@ }, { "type": "ExpressionStatement", - "start": 3008, - "end": 3024, + "start": 3026, + "end": 3042, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 20 } }, "expression": { "type": "AssignmentExpression", - "start": 3008, - "end": 3023, + "start": 3026, + "end": 3041, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 19 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3008, - "end": 3018, + "start": 3026, + "end": 3036, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 14 } }, "object": { "type": "ThisExpression", - "start": 3008, - "end": 3012, + "start": 3026, + "end": 3030, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 8 } } }, "property": { "type": "Identifier", - "start": 3013, - "end": 3018, + "start": 3031, + "end": 3036, "loc": { "start": { - "line": 105, + "line": 106, "column": 9 }, "end": { - "line": 105, + "line": 106, "column": 14 }, "identifierName": "dbMap" @@ -9097,15 +9212,15 @@ }, "right": { "type": "ObjectExpression", - "start": 3021, - "end": 3023, + "start": 3039, + "end": 3041, "loc": { "start": { - "line": 105, + "line": 106, "column": 17 }, "end": { - "line": 105, + "line": 106, "column": 19 } }, @@ -9115,57 +9230,57 @@ }, { "type": "ExpressionStatement", - "start": 3029, - "end": 3220, + "start": 3047, + "end": 3238, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 111, + "line": 112, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 3029, - "end": 3219, + "start": 3047, + "end": 3237, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 111, + "line": 112, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 3029, - "end": 3035, + "start": 3047, + "end": 3053, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 10 } }, "object": { "type": "Identifier", - "start": 3029, - "end": 3030, + "start": 3047, + "end": 3048, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 5 }, "identifierName": "_" @@ -9174,15 +9289,15 @@ }, "property": { "type": "Identifier", - "start": 3031, - "end": 3035, + "start": 3049, + "end": 3053, "loc": { "start": { - "line": 106, + "line": 107, "column": 6 }, "end": { - "line": 106, + "line": 107, "column": 10 }, "identifierName": "each" @@ -9194,29 +9309,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 3036, - "end": 3060, + "start": 3054, + "end": 3078, "loc": { "start": { - "line": 106, + "line": 107, "column": 11 }, "end": { - "line": 106, + "line": 107, "column": 35 } }, "object": { "type": "Identifier", - "start": 3036, - "end": 3042, + "start": 3054, + "end": 3060, "loc": { "start": { - "line": 106, + "line": 107, "column": 11 }, "end": { - "line": 106, + "line": 107, "column": 17 }, "identifierName": "CONFIG" @@ -9225,15 +9340,15 @@ }, "property": { "type": "Identifier", - "start": 3043, - "end": 3060, + "start": 3061, + "end": 3078, "loc": { "start": { - "line": 106, + "line": 107, "column": 18 }, "end": { - "line": 106, + "line": 107, "column": 35 }, "identifierName": "EXTERNAL_SERVICES" @@ -9244,15 +9359,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 3062, - "end": 3218, + "start": 3080, + "end": 3236, "loc": { "start": { - "line": 106, + "line": 107, "column": 37 }, "end": { - "line": 111, + "line": 112, "column": 5 } }, @@ -9263,15 +9378,15 @@ "params": [ { "type": "Identifier", - "start": 3063, - "end": 3070, + "start": 3081, + "end": 3088, "loc": { "start": { - "line": 106, + "line": 107, "column": 38 }, "end": { - "line": 106, + "line": 107, "column": 45 }, "identifierName": "service" @@ -9280,15 +9395,15 @@ }, { "type": "Identifier", - "start": 3072, - "end": 3076, + "start": 3090, + "end": 3094, "loc": { "start": { - "line": 106, + "line": 107, "column": 47 }, "end": { - "line": 106, + "line": 107, "column": 51 }, "identifierName": "name" @@ -9298,72 +9413,72 @@ ], "body": { "type": "BlockStatement", - "start": 3081, - "end": 3218, + "start": 3099, + "end": 3236, "loc": { "start": { - "line": 106, + "line": 107, "column": 56 }, "end": { - "line": 111, + "line": 112, "column": 5 } }, "body": [ { "type": "IfStatement", - "start": 3089, - "end": 3173, + "start": 3107, + "end": 3191, "loc": { "start": { - "line": 107, + "line": 108, "column": 6 }, "end": { - "line": 109, + "line": 110, "column": 7 } }, "test": { "type": "BinaryExpression", - "start": 3093, - "end": 3126, + "start": 3111, + "end": 3144, "loc": { "start": { - "line": 107, + "line": 108, "column": 10 }, "end": { - "line": 107, + "line": 108, "column": 43 } }, "left": { "type": "MemberExpression", - "start": 3093, - "end": 3112, + "start": 3111, + "end": 3130, "loc": { "start": { - "line": 107, + "line": 108, "column": 10 }, "end": { - "line": 107, + "line": 108, "column": 29 } }, "object": { "type": "Identifier", - "start": 3093, - "end": 3100, + "start": 3111, + "end": 3118, "loc": { "start": { - "line": 107, + "line": 108, "column": 10 }, "end": { - "line": 107, + "line": 108, "column": 17 }, "identifierName": "service" @@ -9372,15 +9487,15 @@ }, "property": { "type": "Identifier", - "start": 3101, - "end": 3112, + "start": 3119, + "end": 3130, "loc": { "start": { - "line": 107, + "line": 108, "column": 18 }, "end": { - "line": 107, + "line": 108, "column": 29 }, "identifierName": "serviceName" @@ -9392,15 +9507,15 @@ "operator": "===", "right": { "type": "Identifier", - "start": 3117, - "end": 3126, + "start": 3135, + "end": 3144, "loc": { "start": { - "line": 107, + "line": 108, "column": 34 }, "end": { - "line": 107, + "line": 108, "column": 43 }, "identifierName": "undefined" @@ -9410,73 +9525,73 @@ }, "consequent": { "type": "BlockStatement", - "start": 3128, - "end": 3173, + "start": 3146, + "end": 3191, "loc": { "start": { - "line": 107, + "line": 108, "column": 45 }, "end": { - "line": 109, + "line": 110, "column": 7 } }, "body": [ { "type": "ExpressionStatement", - "start": 3138, - "end": 3165, + "start": 3156, + "end": 3183, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 35 } }, "expression": { "type": "AssignmentExpression", - "start": 3138, - "end": 3164, + "start": 3156, + "end": 3182, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 34 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3138, - "end": 3157, + "start": 3156, + "end": 3175, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 27 } }, "object": { "type": "Identifier", - "start": 3138, - "end": 3145, + "start": 3156, + "end": 3163, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 15 }, "identifierName": "service" @@ -9485,15 +9600,15 @@ }, "property": { "type": "Identifier", - "start": 3146, - "end": 3157, + "start": 3164, + "end": 3175, "loc": { "start": { - "line": 108, + "line": 109, "column": 16 }, "end": { - "line": 108, + "line": 109, "column": 27 }, "identifierName": "serviceName" @@ -9504,15 +9619,15 @@ }, "right": { "type": "Identifier", - "start": 3160, - "end": 3164, + "start": 3178, + "end": 3182, "loc": { "start": { - "line": 108, + "line": 109, "column": 30 }, "end": { - "line": 108, + "line": 109, "column": 34 }, "identifierName": "name" @@ -9528,87 +9643,87 @@ }, { "type": "ExpressionStatement", - "start": 3180, - "end": 3212, + "start": 3198, + "end": 3230, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 38 } }, "expression": { "type": "AssignmentExpression", - "start": 3180, - "end": 3211, + "start": 3198, + "end": 3229, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3180, - "end": 3201, + "start": 3198, + "end": 3219, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 27 } }, "object": { "type": "MemberExpression", - "start": 3180, - "end": 3195, + "start": 3198, + "end": 3213, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 21 } }, "object": { "type": "ThisExpression", - "start": 3180, - "end": 3184, + "start": 3198, + "end": 3202, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 10 } } }, "property": { "type": "Identifier", - "start": 3185, - "end": 3195, + "start": 3203, + "end": 3213, "loc": { "start": { - "line": 110, + "line": 111, "column": 11 }, "end": { - "line": 110, + "line": 111, "column": 21 }, "identifierName": "serviceMap" @@ -9619,15 +9734,15 @@ }, "property": { "type": "Identifier", - "start": 3196, - "end": 3200, + "start": 3214, + "end": 3218, "loc": { "start": { - "line": 110, + "line": 111, "column": 22 }, "end": { - "line": 110, + "line": 111, "column": 26 }, "identifierName": "name" @@ -9638,15 +9753,15 @@ }, "right": { "type": "Identifier", - "start": 3204, - "end": 3211, + "start": 3222, + "end": 3229, "loc": { "start": { - "line": 110, + "line": 111, "column": 30 }, "end": { - "line": 110, + "line": 111, "column": 37 }, "identifierName": "service" @@ -9664,57 +9779,57 @@ }, { "type": "ExpressionStatement", - "start": 3226, - "end": 3397, + "start": 3244, + "end": 3415, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 118, + "line": 119, "column": 7 } }, "expression": { "type": "CallExpression", - "start": 3226, - "end": 3396, + "start": 3244, + "end": 3414, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 118, + "line": 119, "column": 6 } }, "callee": { "type": "MemberExpression", - "start": 3226, - "end": 3232, + "start": 3244, + "end": 3250, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 113, + "line": 114, "column": 10 } }, "object": { "type": "Identifier", - "start": 3226, - "end": 3227, + "start": 3244, + "end": 3245, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 113, + "line": 114, "column": 5 }, "identifierName": "_" @@ -9723,15 +9838,15 @@ }, "property": { "type": "Identifier", - "start": 3228, - "end": 3232, + "start": 3246, + "end": 3250, "loc": { "start": { - "line": 113, + "line": 114, "column": 6 }, "end": { - "line": 113, + "line": 114, "column": 10 }, "identifierName": "each" @@ -9743,29 +9858,29 @@ "arguments": [ { "type": "MemberExpression", - "start": 3233, - "end": 3242, + "start": 3251, + "end": 3260, "loc": { "start": { - "line": 113, + "line": 114, "column": 11 }, "end": { - "line": 113, + "line": 114, "column": 20 } }, "object": { "type": "Identifier", - "start": 3233, - "end": 3239, + "start": 3251, + "end": 3257, "loc": { "start": { - "line": 113, + "line": 114, "column": 11 }, "end": { - "line": 113, + "line": 114, "column": 17 }, "identifierName": "CONFIG" @@ -9774,15 +9889,15 @@ }, "property": { "type": "Identifier", - "start": 3240, - "end": 3242, + "start": 3258, + "end": 3260, "loc": { "start": { - "line": 113, + "line": 114, "column": 18 }, "end": { - "line": 113, + "line": 114, "column": 20 }, "identifierName": "DB" @@ -9793,15 +9908,15 @@ }, { "type": "ArrowFunctionExpression", - "start": 3244, - "end": 3395, + "start": 3262, + "end": 3413, "loc": { "start": { - "line": 113, + "line": 114, "column": 22 }, "end": { - "line": 118, + "line": 119, "column": 5 } }, @@ -9812,15 +9927,15 @@ "params": [ { "type": "Identifier", - "start": 3245, - "end": 3252, + "start": 3263, + "end": 3270, "loc": { "start": { - "line": 113, + "line": 114, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 30 }, "identifierName": "service" @@ -9829,15 +9944,15 @@ }, { "type": "Identifier", - "start": 3254, - "end": 3258, + "start": 3272, + "end": 3276, "loc": { "start": { - "line": 113, + "line": 114, "column": 32 }, "end": { - "line": 113, + "line": 114, "column": 36 }, "identifierName": "name" @@ -9847,72 +9962,72 @@ ], "body": { "type": "BlockStatement", - "start": 3263, - "end": 3395, + "start": 3281, + "end": 3413, "loc": { "start": { - "line": 113, + "line": 114, "column": 41 }, "end": { - "line": 118, + "line": 119, "column": 5 } }, "body": [ { "type": "IfStatement", - "start": 3271, - "end": 3355, + "start": 3289, + "end": 3373, "loc": { "start": { - "line": 114, + "line": 115, "column": 6 }, "end": { - "line": 116, + "line": 117, "column": 7 } }, "test": { "type": "BinaryExpression", - "start": 3275, - "end": 3308, + "start": 3293, + "end": 3326, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 43 } }, "left": { "type": "MemberExpression", - "start": 3275, - "end": 3294, + "start": 3293, + "end": 3312, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 29 } }, "object": { "type": "Identifier", - "start": 3275, - "end": 3282, + "start": 3293, + "end": 3300, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 17 }, "identifierName": "service" @@ -9921,15 +10036,15 @@ }, "property": { "type": "Identifier", - "start": 3283, - "end": 3294, + "start": 3301, + "end": 3312, "loc": { "start": { - "line": 114, + "line": 115, "column": 18 }, "end": { - "line": 114, + "line": 115, "column": 29 }, "identifierName": "serviceName" @@ -9941,15 +10056,15 @@ "operator": "===", "right": { "type": "Identifier", - "start": 3299, - "end": 3308, + "start": 3317, + "end": 3326, "loc": { "start": { - "line": 114, + "line": 115, "column": 34 }, "end": { - "line": 114, + "line": 115, "column": 43 }, "identifierName": "undefined" @@ -9959,73 +10074,73 @@ }, "consequent": { "type": "BlockStatement", - "start": 3310, - "end": 3355, + "start": 3328, + "end": 3373, "loc": { "start": { - "line": 114, + "line": 115, "column": 45 }, "end": { - "line": 116, + "line": 117, "column": 7 } }, "body": [ { "type": "ExpressionStatement", - "start": 3320, - "end": 3347, + "start": 3338, + "end": 3365, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 35 } }, "expression": { "type": "AssignmentExpression", - "start": 3320, - "end": 3346, + "start": 3338, + "end": 3364, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 34 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3320, - "end": 3339, + "start": 3338, + "end": 3357, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 27 } }, "object": { "type": "Identifier", - "start": 3320, - "end": 3327, + "start": 3338, + "end": 3345, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 15 }, "identifierName": "service" @@ -10034,15 +10149,15 @@ }, "property": { "type": "Identifier", - "start": 3328, - "end": 3339, + "start": 3346, + "end": 3357, "loc": { "start": { - "line": 115, + "line": 116, "column": 16 }, "end": { - "line": 115, + "line": 116, "column": 27 }, "identifierName": "serviceName" @@ -10053,15 +10168,15 @@ }, "right": { "type": "Identifier", - "start": 3342, - "end": 3346, + "start": 3360, + "end": 3364, "loc": { "start": { - "line": 115, + "line": 116, "column": 30 }, "end": { - "line": 115, + "line": 116, "column": 34 }, "identifierName": "name" @@ -10077,87 +10192,87 @@ }, { "type": "ExpressionStatement", - "start": 3362, - "end": 3389, + "start": 3380, + "end": 3407, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 33 } }, "expression": { "type": "AssignmentExpression", - "start": 3362, - "end": 3388, + "start": 3380, + "end": 3406, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", - "start": 3362, - "end": 3378, + "start": 3380, + "end": 3396, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 22 } }, "object": { "type": "MemberExpression", - "start": 3362, - "end": 3372, + "start": 3380, + "end": 3390, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 16 } }, "object": { "type": "ThisExpression", - "start": 3362, - "end": 3366, + "start": 3380, + "end": 3384, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 10 } } }, "property": { "type": "Identifier", - "start": 3367, - "end": 3372, + "start": 3385, + "end": 3390, "loc": { "start": { - "line": 117, + "line": 118, "column": 11 }, "end": { - "line": 117, + "line": 118, "column": 16 }, "identifierName": "dbMap" @@ -10168,15 +10283,15 @@ }, "property": { "type": "Identifier", - "start": 3373, - "end": 3377, + "start": 3391, + "end": 3395, "loc": { "start": { - "line": 117, + "line": 118, "column": 17 }, "end": { - "line": 117, + "line": 118, "column": 21 }, "identifierName": "name" @@ -10187,15 +10302,15 @@ }, "right": { "type": "Identifier", - "start": 3381, - "end": 3388, + "start": 3399, + "end": 3406, "loc": { "start": { - "line": 117, + "line": 118, "column": 25 }, "end": { - "line": 117, + "line": 118, "column": 32 }, "identifierName": "service" @@ -10219,15 +10334,15 @@ { "type": "CommentBlock", "value": "*\n * Creates the Healthcheck helper by loading the configuration file and parsing the database and external\n * service configurations\n ", - "start": 2721, - "end": 2866, + "start": 2739, + "end": 2884, "loc": { "start": { - "line": 97, + "line": 98, "column": 2 }, "end": { - "line": 100, + "line": 101, "column": 5 } } @@ -10235,15 +10350,15 @@ { "type": "CommentLine", "value": " Tried these with ES6 Map type but it made it much harder to do easy JSON manipulations", - "start": 2870, - "end": 2959, + "start": 2888, + "end": 2977, "loc": { "start": { - "line": 102, + "line": 103, "column": 2 }, "end": { - "line": 102, + "line": 103, "column": 91 } } @@ -10253,15 +10368,15 @@ { "type": "CommentBlock", "value": "*\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n ", - "start": 3405, - "end": 3633, + "start": 3423, + "end": 3651, "loc": { "start": { - "line": 121, + "line": 122, "column": 2 }, "end": { - "line": 125, + "line": 126, "column": 5 } } @@ -10270,15 +10385,15 @@ }, { "type": "ClassMethod", - "start": 3636, - "end": 4011, + "start": 3654, + "end": 4029, "loc": { "start": { - "line": 126, + "line": 127, "column": 2 }, "end": { - "line": 138, + "line": 139, "column": 3 } }, @@ -10286,15 +10401,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 3642, - "end": 3651, + "start": 3660, + "end": 3669, "loc": { "start": { - "line": 126, + "line": 127, "column": 8 }, "end": { - "line": 126, + "line": 127, "column": 17 }, "identifierName": "isRunning" @@ -10309,15 +10424,15 @@ "params": [ { "type": "Identifier", - "start": 3652, - "end": 3663, + "start": 3670, + "end": 3681, "loc": { "start": { - "line": 126, + "line": 127, "column": 18 }, "end": { - "line": 126, + "line": 127, "column": 29 }, "identifierName": "serviceName" @@ -10327,59 +10442,59 @@ ], "body": { "type": "BlockStatement", - "start": 3665, - "end": 4011, + "start": 3683, + "end": 4029, "loc": { "start": { - "line": 126, + "line": 127, "column": 31 }, "end": { - "line": 138, + "line": 139, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 3671, - "end": 3713, + "start": 3689, + "end": 3731, "loc": { "start": { - "line": 127, + "line": 128, "column": 4 }, "end": { - "line": 127, + "line": 128, "column": 46 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 3677, - "end": 3712, + "start": 3695, + "end": 3730, "loc": { "start": { - "line": 127, + "line": 128, "column": 10 }, "end": { - "line": 127, + "line": 128, "column": 45 } }, "id": { "type": "Identifier", - "start": 3677, - "end": 3681, + "start": 3695, + "end": 3699, "loc": { "start": { - "line": 127, + "line": 128, "column": 10 }, "end": { - "line": 127, + "line": 128, "column": 14 }, "identifierName": "conf" @@ -10388,58 +10503,58 @@ }, "init": { "type": "MemberExpression", - "start": 3684, - "end": 3712, + "start": 3702, + "end": 3730, "loc": { "start": { - "line": 127, + "line": 128, "column": 17 }, "end": { - "line": 127, + "line": 128, "column": 45 } }, "object": { "type": "MemberExpression", - "start": 3684, - "end": 3699, + "start": 3702, + "end": 3717, "loc": { "start": { - "line": 127, + "line": 128, "column": 17 }, "end": { - "line": 127, + "line": 128, "column": 32 } }, "object": { "type": "ThisExpression", - "start": 3684, - "end": 3688, + "start": 3702, + "end": 3706, "loc": { "start": { - "line": 127, + "line": 128, "column": 17 }, "end": { - "line": 127, + "line": 128, "column": 21 } } }, "property": { "type": "Identifier", - "start": 3689, - "end": 3699, + "start": 3707, + "end": 3717, "loc": { "start": { - "line": 127, + "line": 128, "column": 22 }, "end": { - "line": 127, + "line": 128, "column": 32 }, "identifierName": "serviceMap" @@ -10450,15 +10565,15 @@ }, "property": { "type": "Identifier", - "start": 3700, - "end": 3711, + "start": 3718, + "end": 3729, "loc": { "start": { - "line": 127, + "line": 128, "column": 33 }, "end": { - "line": 127, + "line": 128, "column": 44 }, "identifierName": "serviceName" @@ -10474,15 +10589,15 @@ { "type": "CommentLine", "value": " TODO: don't check if it exists, check if it is actually running", - "start": 3718, - "end": 3784, + "start": 3736, + "end": 3802, "loc": { "start": { - "line": 128, + "line": 129, "column": 4 }, "end": { - "line": 128, + "line": 129, "column": 70 } } @@ -10491,43 +10606,43 @@ }, { "type": "IfStatement", - "start": 3789, - "end": 3988, + "start": 3807, + "end": 4006, "loc": { "start": { - "line": 129, + "line": 130, "column": 4 }, "end": { - "line": 135, + "line": 136, "column": 5 } }, "test": { "type": "BinaryExpression", - "start": 3793, - "end": 3811, + "start": 3811, + "end": 3829, "loc": { "start": { - "line": 129, + "line": 130, "column": 8 }, "end": { - "line": 129, + "line": 130, "column": 26 } }, "left": { "type": "Identifier", - "start": 3793, - "end": 3797, + "start": 3811, + "end": 3815, "loc": { "start": { - "line": 129, + "line": 130, "column": 8 }, "end": { - "line": 129, + "line": 130, "column": 12 }, "identifierName": "conf" @@ -10538,15 +10653,15 @@ "operator": "!==", "right": { "type": "Identifier", - "start": 3802, - "end": 3811, + "start": 3820, + "end": 3829, "loc": { "start": { - "line": 129, + "line": 130, "column": 17 }, "end": { - "line": 129, + "line": 130, "column": 26 }, "identifierName": "undefined" @@ -10557,58 +10672,58 @@ }, "consequent": { "type": "BlockStatement", - "start": 3813, - "end": 3988, + "start": 3831, + "end": 4006, "loc": { "start": { - "line": 129, + "line": 130, "column": 28 }, "end": { - "line": 135, + "line": 136, "column": 5 } }, "body": [ { "type": "IfStatement", - "start": 3821, - "end": 3982, + "start": 3839, + "end": 4000, "loc": { "start": { - "line": 130, + "line": 131, "column": 6 }, "end": { - "line": 134, + "line": 135, "column": 7 } }, "test": { "type": "BinaryExpression", - "start": 3825, - "end": 3855, + "start": 3843, + "end": 3873, "loc": { "start": { - "line": 130, + "line": 131, "column": 10 }, "end": { - "line": 130, + "line": 131, "column": 40 } }, "left": { "type": "Identifier", - "start": 3825, - "end": 3829, + "start": 3843, + "end": 3847, "loc": { "start": { - "line": 130, + "line": 131, "column": 10 }, "end": { - "line": 130, + "line": 131, "column": 14 }, "identifierName": "conf" @@ -10618,15 +10733,15 @@ "operator": "instanceof", "right": { "type": "Identifier", - "start": 3841, - "end": 3855, + "start": 3859, + "end": 3873, "loc": { "start": { - "line": 130, + "line": 131, "column": 26 }, "end": { - "line": 130, + "line": 131, "column": 40 }, "identifierName": "DatabaseConfig" @@ -10636,72 +10751,72 @@ }, "consequent": { "type": "BlockStatement", - "start": 3857, - "end": 3913, + "start": 3875, + "end": 3931, "loc": { "start": { - "line": 130, + "line": 131, "column": 42 }, "end": { - "line": 132, + "line": 133, "column": 7 } }, "body": [ { "type": "ReturnStatement", - "start": 3867, - "end": 3905, + "start": 3885, + "end": 3923, "loc": { "start": { - "line": 131, + "line": 132, "column": 8 }, "end": { - "line": 131, + "line": 132, "column": 46 } }, "argument": { "type": "AwaitExpression", - "start": 3874, - "end": 3904, + "start": 3892, + "end": 3922, "loc": { "start": { - "line": 131, + "line": 132, "column": 15 }, "end": { - "line": 131, + "line": 132, "column": 45 } }, "argument": { "type": "CallExpression", - "start": 3880, - "end": 3904, + "start": 3898, + "end": 3922, "loc": { "start": { - "line": 131, + "line": 132, "column": 21 }, "end": { - "line": 131, + "line": 132, "column": 45 } }, "callee": { "type": "Identifier", - "start": 3880, - "end": 3898, + "start": 3898, + "end": 3916, "loc": { "start": { - "line": 131, + "line": 132, "column": 21 }, "end": { - "line": 131, + "line": 132, "column": 39 }, "identifierName": "_getDatabaseStatus" @@ -10711,15 +10826,15 @@ "arguments": [ { "type": "Identifier", - "start": 3899, - "end": 3903, + "start": 3917, + "end": 3921, "loc": { "start": { - "line": 131, + "line": 132, "column": 40 }, "end": { - "line": 131, + "line": 132, "column": 44 }, "identifierName": "conf" @@ -10735,72 +10850,72 @@ }, "alternate": { "type": "BlockStatement", - "start": 3919, - "end": 3982, + "start": 3937, + "end": 4000, "loc": { "start": { - "line": 132, + "line": 133, "column": 13 }, "end": { - "line": 134, + "line": 135, "column": 7 } }, "body": [ { "type": "ReturnStatement", - "start": 3929, - "end": 3974, + "start": 3947, + "end": 3992, "loc": { "start": { - "line": 133, + "line": 134, "column": 8 }, "end": { - "line": 133, + "line": 134, "column": 53 } }, "argument": { "type": "AwaitExpression", - "start": 3936, - "end": 3973, + "start": 3954, + "end": 3991, "loc": { "start": { - "line": 133, + "line": 134, "column": 15 }, "end": { - "line": 133, + "line": 134, "column": 52 } }, "argument": { "type": "CallExpression", - "start": 3942, - "end": 3973, + "start": 3960, + "end": 3991, "loc": { "start": { - "line": 133, + "line": 134, "column": 21 }, "end": { - "line": 133, + "line": 134, "column": 52 } }, "callee": { "type": "Identifier", - "start": 3942, - "end": 3967, + "start": 3960, + "end": 3985, "loc": { "start": { - "line": 133, + "line": 134, "column": 21 }, "end": { - "line": 133, + "line": 134, "column": 46 }, "identifierName": "_getExternalServiceStatus" @@ -10810,15 +10925,15 @@ "arguments": [ { "type": "Identifier", - "start": 3968, - "end": 3972, + "start": 3986, + "end": 3990, "loc": { "start": { - "line": 133, + "line": 134, "column": 47 }, "end": { - "line": 133, + "line": 134, "column": 51 }, "identifierName": "conf" @@ -10841,15 +10956,15 @@ { "type": "CommentLine", "value": " TODO: don't check if it exists, check if it is actually running", - "start": 3718, - "end": 3784, + "start": 3736, + "end": 3802, "loc": { "start": { - "line": 128, + "line": 129, "column": 4 }, "end": { - "line": 128, + "line": 129, "column": 70 } } @@ -10858,29 +10973,29 @@ }, { "type": "ReturnStatement", - "start": 3994, - "end": 4007, + "start": 4012, + "end": 4025, "loc": { "start": { - "line": 137, + "line": 138, "column": 4 }, "end": { - "line": 137, + "line": 138, "column": 17 } }, "argument": { "type": "BooleanLiteral", - "start": 4001, - "end": 4006, + "start": 4019, + "end": 4024, "loc": { "start": { - "line": 137, + "line": 138, "column": 11 }, "end": { - "line": 137, + "line": 138, "column": 16 } }, @@ -10895,15 +11010,15 @@ { "type": "CommentBlock", "value": "*\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n ", - "start": 3405, - "end": 3633, + "start": 3423, + "end": 3651, "loc": { "start": { - "line": 121, + "line": 122, "column": 2 }, "end": { - "line": 125, + "line": 126, "column": 5 } } @@ -10913,15 +11028,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n ", - "start": 4015, - "end": 4431, + "start": 4033, + "end": 4449, "loc": { "start": { - "line": 140, + "line": 141, "column": 2 }, "end": { - "line": 147, + "line": 148, "column": 5 } } @@ -10930,15 +11045,15 @@ }, { "type": "ClassMethod", - "start": 4434, - "end": 4963, + "start": 4452, + "end": 5130, "loc": { "start": { - "line": 148, + "line": 149, "column": 2 }, "end": { - "line": 167, + "line": 172, "column": 3 } }, @@ -10946,15 +11061,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4440, - "end": 4449, + "start": 4458, + "end": 4467, "loc": { "start": { - "line": 148, + "line": 149, "column": 8 }, "end": { - "line": 148, + "line": 149, "column": 17 }, "identifierName": "getStatus" @@ -10969,15 +11084,15 @@ "params": [ { "type": "Identifier", - "start": 4450, - "end": 4455, + "start": 4468, + "end": 4473, "loc": { "start": { - "line": 148, + "line": 149, "column": 18 }, "end": { - "line": 148, + "line": 149, "column": 23 }, "identifierName": "level" @@ -10987,59 +11102,59 @@ ], "body": { "type": "BlockStatement", - "start": 4457, - "end": 4963, + "start": 4475, + "end": 5130, "loc": { "start": { - "line": 148, + "line": 149, "column": 25 }, "end": { - "line": 167, + "line": 172, "column": 3 } }, "body": [ { "type": "VariableDeclaration", - "start": 4498, - "end": 4867, + "start": 4531, + "end": 4988, "loc": { "start": { - "line": 150, + "line": 151, "column": 4 }, "end": { - "line": 163, + "line": 168, "column": 6 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 4504, - "end": 4866, + "start": 4537, + "end": 4987, "loc": { "start": { - "line": 150, + "line": 151, "column": 10 }, "end": { - "line": 163, + "line": 168, "column": 5 } }, "id": { "type": "Identifier", - "start": 4504, - "end": 4510, + "start": 4537, + "end": 4543, "loc": { "start": { - "line": 150, + "line": 151, "column": 10 }, "end": { - "line": 150, + "line": 151, "column": 16 }, "identifierName": "status" @@ -11049,30 +11164,30 @@ }, "init": { "type": "ObjectExpression", - "start": 4513, - "end": 4866, + "start": 4546, + "end": 4987, "loc": { "start": { - "line": 150, + "line": 151, "column": 19 }, "end": { - "line": 163, + "line": 168, "column": 5 } }, "properties": [ { "type": "ObjectProperty", - "start": 4521, - "end": 4712, + "start": 4554, + "end": 4833, "loc": { "start": { - "line": 151, + "line": 152, "column": 6 }, "end": { - "line": 160, + "line": 165, "column": 8 } }, @@ -11081,15 +11196,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4521, - "end": 4523, + "start": 4554, + "end": 4556, "loc": { "start": { - "line": 151, + "line": 152, "column": 6 }, "end": { - "line": 151, + "line": 152, "column": 8 }, "identifierName": "L1" @@ -11098,45 +11213,45 @@ }, "value": { "type": "ArrayExpression", - "start": 4525, - "end": 4712, + "start": 4558, + "end": 4833, "loc": { "start": { - "line": 151, + "line": 152, "column": 10 }, "end": { - "line": 160, + "line": 165, "column": 8 } }, "elements": [ { "type": "ObjectExpression", - "start": 4526, - "end": 4583, + "start": 4559, + "end": 4660, "loc": { "start": { - "line": 151, + "line": 152, "column": 11 }, "end": { - "line": 154, + "line": 157, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 4536, - "end": 4550, + "start": 4591, + "end": 4605, "loc": { "start": { - "line": 152, + "line": 154, "column": 8 }, "end": { - "line": 152, + "line": 154, "column": 22 } }, @@ -11145,32 +11260,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4536, - "end": 4540, + "start": 4591, + "end": 4595, "loc": { "start": { - "line": 152, + "line": 154, "column": 8 }, "end": { - "line": 152, + "line": 154, "column": 12 }, "identifierName": "name" }, - "name": "name" + "name": "name", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4542, - "end": 4550, + "start": 4597, + "end": 4605, "loc": { "start": { - "line": 152, + "line": 154, "column": 14 }, "end": { - "line": 152, + "line": 154, "column": 22 } }, @@ -11179,19 +11295,37 @@ "raw": "'SERVER'" }, "value": "SERVER" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4569, + "end": 4582, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 21 + } + } + } + ] }, { "type": "ObjectProperty", - "start": 4560, - "end": 4575, + "start": 4637, + "end": 4652, "loc": { "start": { - "line": 153, + "line": 156, "column": 8 }, "end": { - "line": 153, + "line": 156, "column": 23 } }, @@ -11200,32 +11334,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4560, - "end": 4566, + "start": 4637, + "end": 4643, "loc": { "start": { - "line": 153, + "line": 156, "column": 8 }, "end": { - "line": 153, + "line": 156, "column": 14 }, "identifierName": "status" }, - "name": "status" + "name": "status", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4568, - "end": 4575, + "start": 4645, + "end": 4652, "loc": { "start": { - "line": 153, + "line": 156, "column": 16 }, "end": { - "line": 153, + "line": 156, "column": 23 } }, @@ -11234,36 +11369,54 @@ "raw": "'alive'" }, "value": "alive" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4615, + "end": 4628, + "loc": { + "start": { + "line": 155, + "column": 8 + }, + "end": { + "line": 155, + "column": 21 + } + } + } + ] } ] }, { "type": "ObjectExpression", - "start": 4585, - "end": 4648, + "start": 4662, + "end": 4747, "loc": { "start": { - "line": 154, + "line": 157, "column": 9 }, "end": { - "line": 157, + "line": 161, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 4595, - "end": 4610, + "start": 4694, + "end": 4709, "loc": { "start": { - "line": 155, + "line": 159, "column": 8 }, "end": { - "line": 155, + "line": 159, "column": 23 } }, @@ -11272,32 +11425,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4595, - "end": 4599, + "start": 4694, + "end": 4698, "loc": { "start": { - "line": 155, + "line": 159, "column": 8 }, "end": { - "line": 155, + "line": 159, "column": 12 }, "identifierName": "name" }, - "name": "name" + "name": "name", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4601, - "end": 4610, + "start": 4700, + "end": 4709, "loc": { "start": { - "line": 155, + "line": 159, "column": 14 }, "end": { - "line": 155, + "line": 159, "column": 23 } }, @@ -11306,19 +11460,37 @@ "raw": "'VERSION'" }, "value": "VERSION" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4672, + "end": 4685, + "loc": { + "start": { + "line": 158, + "column": 8 + }, + "end": { + "line": 158, + "column": 21 + } + } + } + ] }, { "type": "ObjectProperty", - "start": 4620, - "end": 4640, + "start": 4719, + "end": 4739, "loc": { "start": { - "line": 156, + "line": 160, "column": 8 }, "end": { - "line": 156, + "line": 160, "column": 28 } }, @@ -11327,15 +11499,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4620, - "end": 4626, + "start": 4719, + "end": 4725, "loc": { "start": { - "line": 156, + "line": 160, "column": 8 }, "end": { - "line": 156, + "line": 160, "column": 14 }, "identifierName": "status" @@ -11344,29 +11516,29 @@ }, "value": { "type": "MemberExpression", - "start": 4628, - "end": 4640, + "start": 4727, + "end": 4739, "loc": { "start": { - "line": 156, + "line": 160, "column": 16 }, "end": { - "line": 156, + "line": 160, "column": 28 } }, "object": { "type": "Identifier", - "start": 4628, - "end": 4632, + "start": 4727, + "end": 4731, "loc": { "start": { - "line": 156, + "line": 160, "column": 16 }, "end": { - "line": 156, + "line": 160, "column": 20 }, "identifierName": "pack" @@ -11375,15 +11547,15 @@ }, "property": { "type": "Identifier", - "start": 4633, - "end": 4640, + "start": 4732, + "end": 4739, "loc": { "start": { - "line": 156, + "line": 160, "column": 21 }, "end": { - "line": 156, + "line": 160, "column": 28 }, "identifierName": "version" @@ -11397,30 +11569,30 @@ }, { "type": "ObjectExpression", - "start": 4650, - "end": 4711, + "start": 4749, + "end": 4832, "loc": { "start": { - "line": 157, + "line": 161, "column": 9 }, "end": { - "line": 160, + "line": 165, "column": 7 } }, "properties": [ { "type": "ObjectProperty", - "start": 4660, - "end": 4674, + "start": 4781, + "end": 4795, "loc": { "start": { - "line": 158, + "line": 163, "column": 8 }, "end": { - "line": 158, + "line": 163, "column": 22 } }, @@ -11429,32 +11601,33 @@ "computed": false, "key": { "type": "Identifier", - "start": 4660, - "end": 4664, + "start": 4781, + "end": 4785, "loc": { "start": { - "line": 158, + "line": 163, "column": 8 }, "end": { - "line": 158, + "line": 163, "column": 12 }, "identifierName": "name" }, - "name": "name" + "name": "name", + "leadingComments": null }, "value": { "type": "StringLiteral", - "start": 4666, - "end": 4674, + "start": 4787, + "end": 4795, "loc": { "start": { - "line": 158, + "line": 163, "column": 14 }, "end": { - "line": 158, + "line": 163, "column": 22 } }, @@ -11463,19 +11636,37 @@ "raw": "'BRANCH'" }, "value": "BRANCH" - } + }, + "leadingComments": [ + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4759, + "end": 4772, + "loc": { + "start": { + "line": 162, + "column": 8 + }, + "end": { + "line": 162, + "column": 21 + } + } + } + ] }, { "type": "ObjectProperty", - "start": 4684, - "end": 4703, + "start": 4805, + "end": 4824, "loc": { "start": { - "line": 159, + "line": 164, "column": 8 }, "end": { - "line": 159, + "line": 164, "column": 27 } }, @@ -11484,15 +11675,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4684, - "end": 4690, + "start": 4805, + "end": 4811, "loc": { "start": { - "line": 159, + "line": 164, "column": 8 }, "end": { - "line": 159, + "line": 164, "column": 14 }, "identifierName": "status" @@ -11501,29 +11692,29 @@ }, "value": { "type": "CallExpression", - "start": 4692, - "end": 4703, + "start": 4813, + "end": 4824, "loc": { "start": { - "line": 159, + "line": 164, "column": 16 }, "end": { - "line": 159, + "line": 164, "column": 27 } }, "callee": { "type": "Identifier", - "start": 4692, - "end": 4701, + "start": 4813, + "end": 4822, "loc": { "start": { - "line": 159, + "line": 164, "column": 16 }, "end": { - "line": 159, + "line": 164, "column": 25 }, "identifierName": "getBranch" @@ -11540,15 +11731,15 @@ }, { "type": "ObjectProperty", - "start": 4720, - "end": 4780, + "start": 4841, + "end": 4901, "loc": { "start": { - "line": 161, + "line": 166, "column": 6 }, "end": { - "line": 161, + "line": 166, "column": 66 } }, @@ -11557,15 +11748,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4720, - "end": 4722, + "start": 4841, + "end": 4843, "loc": { "start": { - "line": 161, + "line": 166, "column": 6 }, "end": { - "line": 161, + "line": 166, "column": 8 }, "identifierName": "L2" @@ -11574,57 +11765,57 @@ }, "value": { "type": "AwaitExpression", - "start": 4724, - "end": 4780, + "start": 4845, + "end": 4901, "loc": { "start": { - "line": 161, + "line": 166, "column": 10 }, "end": { - "line": 161, + "line": 166, "column": 66 } }, "argument": { "type": "CallExpression", - "start": 4730, - "end": 4780, + "start": 4851, + "end": 4901, "loc": { "start": { - "line": 161, + "line": 166, "column": 16 }, "end": { - "line": 161, + "line": 166, "column": 66 } }, "callee": { "type": "MemberExpression", - "start": 4730, - "end": 4741, + "start": 4851, + "end": 4862, "loc": { "start": { - "line": 161, + "line": 166, "column": 16 }, "end": { - "line": 161, + "line": 166, "column": 27 } }, "object": { "type": "Identifier", - "start": 4730, - "end": 4737, + "start": 4851, + "end": 4858, "loc": { "start": { - "line": 161, + "line": 166, "column": 16 }, "end": { - "line": 161, + "line": 166, "column": 23 }, "identifierName": "Promise" @@ -11633,15 +11824,15 @@ }, "property": { "type": "Identifier", - "start": 4738, - "end": 4741, + "start": 4859, + "end": 4862, "loc": { "start": { - "line": 161, + "line": 166, "column": 24 }, "end": { - "line": 161, + "line": 166, "column": 27 }, "identifierName": "all" @@ -11653,43 +11844,43 @@ "arguments": [ { "type": "CallExpression", - "start": 4742, - "end": 4779, + "start": 4863, + "end": 4900, "loc": { "start": { - "line": 161, + "line": 166, "column": 28 }, "end": { - "line": 161, + "line": 166, "column": 65 } }, "callee": { "type": "MemberExpression", - "start": 4742, - "end": 4747, + "start": 4863, + "end": 4868, "loc": { "start": { - "line": 161, + "line": 166, "column": 28 }, "end": { - "line": 161, + "line": 166, "column": 33 } }, "object": { "type": "Identifier", - "start": 4742, - "end": 4743, + "start": 4863, + "end": 4864, "loc": { "start": { - "line": 161, + "line": 166, "column": 28 }, "end": { - "line": 161, + "line": 166, "column": 29 }, "identifierName": "_" @@ -11698,15 +11889,15 @@ }, "property": { "type": "Identifier", - "start": 4744, - "end": 4747, + "start": 4865, + "end": 4868, "loc": { "start": { - "line": 161, + "line": 166, "column": 30 }, "end": { - "line": 161, + "line": 166, "column": 33 }, "identifierName": "map" @@ -11718,44 +11909,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 4748, - "end": 4758, + "start": 4869, + "end": 4879, "loc": { "start": { - "line": 161, + "line": 166, "column": 34 }, "end": { - "line": 161, + "line": 166, "column": 44 } }, "object": { "type": "ThisExpression", - "start": 4748, - "end": 4752, + "start": 4869, + "end": 4873, "loc": { "start": { - "line": 161, + "line": 166, "column": 34 }, "end": { - "line": 161, + "line": 166, "column": 38 } } }, "property": { "type": "Identifier", - "start": 4753, - "end": 4758, + "start": 4874, + "end": 4879, "loc": { "start": { - "line": 161, + "line": 166, "column": 39 }, "end": { - "line": 161, + "line": 166, "column": 44 }, "identifierName": "dbMap" @@ -11766,15 +11957,15 @@ }, { "type": "Identifier", - "start": 4760, - "end": 4778, + "start": 4881, + "end": 4899, "loc": { "start": { - "line": 161, + "line": 166, "column": 46 }, "end": { - "line": 161, + "line": 166, "column": 64 }, "identifierName": "_getDatabaseStatus" @@ -11789,15 +11980,15 @@ }, { "type": "ObjectProperty", - "start": 4788, - "end": 4860, + "start": 4909, + "end": 4981, "loc": { "start": { - "line": 162, + "line": 167, "column": 6 }, "end": { - "line": 162, + "line": 167, "column": 78 } }, @@ -11806,15 +11997,15 @@ "computed": false, "key": { "type": "Identifier", - "start": 4788, - "end": 4790, + "start": 4909, + "end": 4911, "loc": { "start": { - "line": 162, + "line": 167, "column": 6 }, "end": { - "line": 162, + "line": 167, "column": 8 }, "identifierName": "L3" @@ -11823,57 +12014,57 @@ }, "value": { "type": "AwaitExpression", - "start": 4792, - "end": 4860, + "start": 4913, + "end": 4981, "loc": { "start": { - "line": 162, + "line": 167, "column": 10 }, "end": { - "line": 162, + "line": 167, "column": 78 } }, "argument": { "type": "CallExpression", - "start": 4798, - "end": 4860, + "start": 4919, + "end": 4981, "loc": { "start": { - "line": 162, + "line": 167, "column": 16 }, "end": { - "line": 162, + "line": 167, "column": 78 } }, "callee": { "type": "MemberExpression", - "start": 4798, - "end": 4809, + "start": 4919, + "end": 4930, "loc": { "start": { - "line": 162, + "line": 167, "column": 16 }, "end": { - "line": 162, + "line": 167, "column": 27 } }, "object": { "type": "Identifier", - "start": 4798, - "end": 4805, + "start": 4919, + "end": 4926, "loc": { "start": { - "line": 162, + "line": 167, "column": 16 }, "end": { - "line": 162, + "line": 167, "column": 23 }, "identifierName": "Promise" @@ -11882,15 +12073,15 @@ }, "property": { "type": "Identifier", - "start": 4806, - "end": 4809, + "start": 4927, + "end": 4930, "loc": { "start": { - "line": 162, + "line": 167, "column": 24 }, "end": { - "line": 162, + "line": 167, "column": 27 }, "identifierName": "all" @@ -11902,43 +12093,43 @@ "arguments": [ { "type": "CallExpression", - "start": 4810, - "end": 4859, + "start": 4931, + "end": 4980, "loc": { "start": { - "line": 162, + "line": 167, "column": 28 }, "end": { - "line": 162, + "line": 167, "column": 77 } }, "callee": { "type": "MemberExpression", - "start": 4810, - "end": 4815, + "start": 4931, + "end": 4936, "loc": { "start": { - "line": 162, + "line": 167, "column": 28 }, "end": { - "line": 162, + "line": 167, "column": 33 } }, "object": { "type": "Identifier", - "start": 4810, - "end": 4811, + "start": 4931, + "end": 4932, "loc": { "start": { - "line": 162, + "line": 167, "column": 28 }, "end": { - "line": 162, + "line": 167, "column": 29 }, "identifierName": "_" @@ -11947,15 +12138,15 @@ }, "property": { "type": "Identifier", - "start": 4812, - "end": 4815, + "start": 4933, + "end": 4936, "loc": { "start": { - "line": 162, + "line": 167, "column": 30 }, "end": { - "line": 162, + "line": 167, "column": 33 }, "identifierName": "map" @@ -11967,44 +12158,44 @@ "arguments": [ { "type": "MemberExpression", - "start": 4816, - "end": 4831, + "start": 4937, + "end": 4952, "loc": { "start": { - "line": 162, + "line": 167, "column": 34 }, "end": { - "line": 162, + "line": 167, "column": 49 } }, "object": { "type": "ThisExpression", - "start": 4816, - "end": 4820, + "start": 4937, + "end": 4941, "loc": { "start": { - "line": 162, + "line": 167, "column": 34 }, "end": { - "line": 162, + "line": 167, "column": 38 } } }, "property": { "type": "Identifier", - "start": 4821, - "end": 4831, + "start": 4942, + "end": 4952, "loc": { "start": { - "line": 162, + "line": 167, "column": 39 }, "end": { - "line": 162, + "line": 167, "column": 49 }, "identifierName": "serviceMap" @@ -12015,15 +12206,15 @@ }, { "type": "Identifier", - "start": 4833, - "end": 4858, + "start": 4954, + "end": 4979, "loc": { "start": { - "line": 162, + "line": 167, "column": 51 }, "end": { - "line": 162, + "line": 167, "column": 76 }, "identifierName": "_getExternalServiceStatus" @@ -12044,18 +12235,18 @@ "kind": "const", "leadingComments": [ { - "type": "CommentBlock", - "value": " eslint-disable id-length ", - "start": 4463, - "end": 4493, + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 4481, + "end": 4526, "loc": { "start": { - "line": 149, + "line": 150, "column": 4 }, "end": { - "line": 149, - "column": 34 + "line": 150, + "column": 49 } } } @@ -12064,15 +12255,15 @@ { "type": "CommentBlock", "value": " eslint-enable id-length ", - "start": 4872, - "end": 4901, + "start": 4993, + "end": 5022, "loc": { "start": { - "line": 164, + "line": 169, "column": 4 }, "end": { - "line": 164, + "line": 169, "column": 33 } } @@ -12081,57 +12272,57 @@ }, { "type": "ReturnStatement", - "start": 4907, - "end": 4959, + "start": 5028, + "end": 5080, "loc": { "start": { - "line": 166, + "line": 171, "column": 4 }, "end": { - "line": 166, + "line": 171, "column": 56 } }, "argument": { "type": "ConditionalExpression", - "start": 4914, - "end": 4958, + "start": 5035, + "end": 5079, "loc": { "start": { - "line": 166, + "line": 171, "column": 11 }, "end": { - "line": 166, + "line": 171, "column": 55 } }, "test": { "type": "BinaryExpression", - "start": 4914, - "end": 4933, + "start": 5035, + "end": 5054, "loc": { "start": { - "line": 166, + "line": 171, "column": 11 }, "end": { - "line": 166, + "line": 171, "column": 30 } }, "left": { "type": "Identifier", - "start": 4914, - "end": 4919, + "start": 5035, + "end": 5040, "loc": { "start": { - "line": 166, + "line": 171, "column": 11 }, "end": { - "line": 166, + "line": 171, "column": 16 }, "identifierName": "level" @@ -12142,15 +12333,15 @@ "operator": "===", "right": { "type": "Identifier", - "start": 4924, - "end": 4933, + "start": 5045, + "end": 5054, "loc": { "start": { - "line": 166, + "line": 171, "column": 21 }, "end": { - "line": 166, + "line": 171, "column": 30 }, "identifierName": "undefined" @@ -12161,15 +12352,15 @@ }, "consequent": { "type": "Identifier", - "start": 4936, - "end": 4942, + "start": 5057, + "end": 5063, "loc": { "start": { - "line": 166, + "line": 171, "column": 33 }, "end": { - "line": 166, + "line": 171, "column": 39 }, "identifierName": "status" @@ -12178,29 +12369,29 @@ }, "alternate": { "type": "MemberExpression", - "start": 4945, - "end": 4958, + "start": 5066, + "end": 5079, "loc": { "start": { - "line": 166, + "line": 171, "column": 42 }, "end": { - "line": 166, + "line": 171, "column": 55 } }, "object": { "type": "Identifier", - "start": 4945, - "end": 4951, + "start": 5066, + "end": 5072, "loc": { "start": { - "line": 166, + "line": 171, "column": 42 }, "end": { - "line": 166, + "line": 171, "column": 48 }, "identifierName": "status" @@ -12209,15 +12400,15 @@ }, "property": { "type": "Identifier", - "start": 4952, - "end": 4957, + "start": 5073, + "end": 5078, "loc": { "start": { - "line": 166, + "line": 171, "column": 49 }, "end": { - "line": 166, + "line": 171, "column": 54 }, "identifierName": "level" @@ -12232,19 +12423,37 @@ { "type": "CommentBlock", "value": " eslint-enable id-length ", - "start": 4872, - "end": 4901, + "start": 4993, + "end": 5022, "loc": { "start": { - "line": 164, + "line": 169, "column": 4 }, "end": { - "line": 164, + "line": 169, "column": 33 } } } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 5081, + "end": 5126, + "loc": { + "start": { + "line": 171, + "column": 57 + }, + "end": { + "line": 171, + "column": 102 + } + } + } ] } ], @@ -12254,15 +12463,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n ", - "start": 4015, - "end": 4431, + "start": 4033, + "end": 4449, "loc": { "start": { - "line": 140, + "line": 141, "column": 2 }, "end": { - "line": 147, + "line": 148, "column": 5 } } @@ -12276,15 +12485,15 @@ { "type": "CommentBlock", "value": "*\n * Class to wrap the methods that are used for server healthcheck\n ", - "start": 2618, - "end": 2691, + "start": 2636, + "end": 2709, "loc": { "start": { - "line": 92, + "line": 93, "column": 0 }, "end": { - "line": 94, + "line": 95, "column": 3 } } @@ -12294,15 +12503,15 @@ { "type": "CommentBlock", "value": "*\n * Exported Helperto interact with Healcheck Operations\n * @type {Healthcheck}\n ", - "start": 4967, - "end": 5053, + "start": 5134, + "end": 5220, "loc": { "start": { - "line": 170, + "line": 175, "column": 0 }, "end": { - "line": 173, + "line": 178, "column": 3 } } @@ -12314,15 +12523,15 @@ }, { "type": "ExportDefaultDeclaration", - "start": 5105, - "end": 5138, + "start": 5272, + "end": 5305, "loc": { "start": { - "line": 175, + "line": 180, "column": 0 }, "end": { - "line": 175, + "line": 180, "column": 33 } }, @@ -12331,11 +12540,11 @@ "kind": "let", "loc": { "start": { - "line": 175, + "line": 180, "column": 0 }, "end": { - "line": 175, + "line": 180, "column": 33 } }, @@ -12459,18 +12668,34 @@ } } }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 2131, + "end": 2144, + "loc": { + "start": { + "line": 73, + "column": 4 + }, + "end": { + "line": 73, + "column": 17 + } + } + }, { "type": "CommentBlock", "value": "*\n * Returns the current branch of the build (TODO: development vs production?)\n * @return {string} information about the current branch and build\n ", - "start": 2267, - "end": 2419, + "start": 2285, + "end": 2437, "loc": { "start": { - "line": 81, + "line": 82, "column": 0 }, "end": { - "line": 84, + "line": 85, "column": 3 } } @@ -12478,15 +12703,15 @@ { "type": "CommentBlock", "value": "*\n * Class to wrap the methods that are used for server healthcheck\n ", - "start": 2618, - "end": 2691, + "start": 2636, + "end": 2709, "loc": { "start": { - "line": 92, + "line": 93, "column": 0 }, "end": { - "line": 94, + "line": 95, "column": 3 } } @@ -12494,15 +12719,15 @@ { "type": "CommentBlock", "value": "*\n * Creates the Healthcheck helper by loading the configuration file and parsing the database and external\n * service configurations\n ", - "start": 2721, - "end": 2866, + "start": 2739, + "end": 2884, "loc": { "start": { - "line": 97, + "line": 98, "column": 2 }, "end": { - "line": 100, + "line": 101, "column": 5 } } @@ -12510,15 +12735,15 @@ { "type": "CommentLine", "value": " Tried these with ES6 Map type but it made it much harder to do easy JSON manipulations", - "start": 2870, - "end": 2959, + "start": 2888, + "end": 2977, "loc": { "start": { - "line": 102, + "line": 103, "column": 2 }, "end": { - "line": 102, + "line": 103, "column": 91 } } @@ -12526,15 +12751,15 @@ { "type": "CommentBlock", "value": "*\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n ", - "start": 3405, - "end": 3633, + "start": 3423, + "end": 3651, "loc": { "start": { - "line": 121, + "line": 122, "column": 2 }, "end": { - "line": 125, + "line": 126, "column": 5 } } @@ -12542,15 +12767,15 @@ { "type": "CommentLine", "value": " TODO: don't check if it exists, check if it is actually running", - "start": 3718, - "end": 3784, + "start": 3736, + "end": 3802, "loc": { "start": { - "line": 128, + "line": 129, "column": 4 }, "end": { - "line": 128, + "line": 129, "column": 70 } } @@ -12558,63 +12783,143 @@ { "type": "CommentBlock", "value": "*\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n ", - "start": 4015, - "end": 4431, + "start": 4033, + "end": 4449, "loc": { "start": { - "line": 140, + "line": 141, "column": 2 }, "end": { - "line": 147, + "line": 148, "column": 5 } } }, { - "type": "CommentBlock", - "value": " eslint-disable id-length ", - "start": 4463, - "end": 4493, + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 4481, + "end": 4526, "loc": { "start": { - "line": 149, + "line": 150, "column": 4 }, "end": { - "line": 149, - "column": 34 + "line": 150, + "column": 49 + } + } + }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4569, + "end": 4582, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 21 + } + } + }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4615, + "end": 4628, + "loc": { + "start": { + "line": 155, + "column": 8 + }, + "end": { + "line": 155, + "column": 21 + } + } + }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4672, + "end": 4685, + "loc": { + "start": { + "line": 158, + "column": 8 + }, + "end": { + "line": 158, + "column": 21 + } + } + }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4759, + "end": 4772, + "loc": { + "start": { + "line": 162, + "column": 8 + }, + "end": { + "line": 162, + "column": 21 } } }, { "type": "CommentBlock", "value": " eslint-enable id-length ", - "start": 4872, - "end": 4901, + "start": 4993, + "end": 5022, "loc": { "start": { - "line": 164, + "line": 169, "column": 4 }, "end": { - "line": 164, + "line": 169, "column": 33 } } }, + { + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 5081, + "end": 5126, + "loc": { + "start": { + "line": 171, + "column": 57 + }, + "end": { + "line": 171, + "column": 102 + } + } + }, { "type": "CommentBlock", "value": "*\n * Exported Helperto interact with Healcheck Operations\n * @type {Healthcheck}\n ", - "start": 4967, - "end": 5053, + "start": 5134, + "end": 5220, "loc": { "start": { - "line": 170, + "line": 175, "column": 0 }, "end": { - "line": 173, + "line": 178, "column": 3 } } @@ -20574,27 +20879,43 @@ } }, { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 2131, + "end": 2144, + "loc": { + "start": { + "line": 73, + "column": 4 + }, + "end": { + "line": 73, + "column": 17 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "response", - "start": 2131, - "end": 2139, + "start": 2149, + "end": 2157, "loc": { "start": { - "line": 73, + "line": 74, "column": 4 }, "end": { - "line": 73, + "line": 74, "column": 12 } } @@ -20612,15 +20933,15 @@ "binop": null, "updateContext": null }, - "start": 2139, - "end": 2140, + "start": 2157, + "end": 2158, "loc": { "start": { - "line": 73, + "line": 74, "column": 12 }, "end": { - "line": 73, + "line": 74, "column": 13 } } @@ -20638,15 +20959,15 @@ "binop": null }, "value": "status", - "start": 2140, - "end": 2146, + "start": 2158, + "end": 2164, "loc": { "start": { - "line": 73, + "line": 74, "column": 13 }, "end": { - "line": 73, + "line": 74, "column": 19 } } @@ -20665,15 +20986,15 @@ "updateContext": null }, "value": "+=", - "start": 2147, - "end": 2149, + "start": 2165, + "end": 2167, "loc": { "start": { - "line": 73, + "line": 74, "column": 20 }, "end": { - "line": 73, + "line": 74, "column": 22 } } @@ -20691,15 +21012,15 @@ "binop": null }, "value": "await", - "start": 2150, - "end": 2155, + "start": 2168, + "end": 2173, "loc": { "start": { - "line": 73, + "line": 74, "column": 23 }, "end": { - "line": 73, + "line": 74, "column": 28 } } @@ -20717,15 +21038,15 @@ "binop": null }, "value": "promise", - "start": 2156, - "end": 2163, + "start": 2174, + "end": 2181, "loc": { "start": { - "line": 73, + "line": 74, "column": 29 }, "end": { - "line": 73, + "line": 74, "column": 36 } } @@ -20743,15 +21064,15 @@ "binop": null, "updateContext": null }, - "start": 2163, - "end": 2164, + "start": 2181, + "end": 2182, "loc": { "start": { - "line": 73, + "line": 74, "column": 36 }, "end": { - "line": 73, + "line": 74, "column": 37 } } @@ -20768,15 +21089,15 @@ "postfix": false, "binop": null }, - "start": 2167, - "end": 2168, + "start": 2185, + "end": 2186, "loc": { "start": { - "line": 74, + "line": 75, "column": 2 }, "end": { - "line": 74, + "line": 75, "column": 3 } } @@ -20796,15 +21117,15 @@ "updateContext": null }, "value": "catch", - "start": 2169, - "end": 2174, + "start": 2187, + "end": 2192, "loc": { "start": { - "line": 74, + "line": 75, "column": 4 }, "end": { - "line": 74, + "line": 75, "column": 9 } } @@ -20821,15 +21142,15 @@ "postfix": false, "binop": null }, - "start": 2175, - "end": 2176, + "start": 2193, + "end": 2194, "loc": { "start": { - "line": 74, + "line": 75, "column": 10 }, "end": { - "line": 74, + "line": 75, "column": 11 } } @@ -20847,15 +21168,15 @@ "binop": null }, "value": "error", - "start": 2176, - "end": 2181, + "start": 2194, + "end": 2199, "loc": { "start": { - "line": 74, + "line": 75, "column": 11 }, "end": { - "line": 74, + "line": 75, "column": 16 } } @@ -20872,15 +21193,15 @@ "postfix": false, "binop": null }, - "start": 2181, - "end": 2182, + "start": 2199, + "end": 2200, "loc": { "start": { - "line": 74, + "line": 75, "column": 16 }, "end": { - "line": 74, + "line": 75, "column": 17 } } @@ -20897,15 +21218,15 @@ "postfix": false, "binop": null }, - "start": 2183, - "end": 2184, + "start": 2201, + "end": 2202, "loc": { "start": { - "line": 74, + "line": 75, "column": 18 }, "end": { - "line": 74, + "line": 75, "column": 19 } } @@ -20923,15 +21244,15 @@ "binop": null }, "value": "response", - "start": 2189, - "end": 2197, + "start": 2207, + "end": 2215, "loc": { "start": { - "line": 75, + "line": 76, "column": 4 }, "end": { - "line": 75, + "line": 76, "column": 12 } } @@ -20949,15 +21270,15 @@ "binop": null, "updateContext": null }, - "start": 2197, - "end": 2198, + "start": 2215, + "end": 2216, "loc": { "start": { - "line": 75, + "line": 76, "column": 12 }, "end": { - "line": 75, + "line": 76, "column": 13 } } @@ -20975,15 +21296,15 @@ "binop": null }, "value": "error", - "start": 2198, - "end": 2203, + "start": 2216, + "end": 2221, "loc": { "start": { - "line": 75, + "line": 76, "column": 13 }, "end": { - "line": 75, + "line": 76, "column": 18 } } @@ -21002,15 +21323,15 @@ "updateContext": null }, "value": "=", - "start": 2204, - "end": 2205, + "start": 2222, + "end": 2223, "loc": { "start": { - "line": 75, + "line": 76, "column": 19 }, "end": { - "line": 75, + "line": 76, "column": 20 } } @@ -21030,15 +21351,15 @@ "updateContext": null }, "value": "true", - "start": 2206, - "end": 2210, + "start": 2224, + "end": 2228, "loc": { "start": { - "line": 75, + "line": 76, "column": 21 }, "end": { - "line": 75, + "line": 76, "column": 25 } } @@ -21056,15 +21377,15 @@ "binop": null, "updateContext": null }, - "start": 2210, - "end": 2211, + "start": 2228, + "end": 2229, "loc": { "start": { - "line": 75, + "line": 76, "column": 25 }, "end": { - "line": 75, + "line": 76, "column": 26 } } @@ -21082,15 +21403,15 @@ "binop": null }, "value": "response", - "start": 2216, - "end": 2224, + "start": 2234, + "end": 2242, "loc": { "start": { - "line": 76, + "line": 77, "column": 4 }, "end": { - "line": 76, + "line": 77, "column": 12 } } @@ -21108,15 +21429,15 @@ "binop": null, "updateContext": null }, - "start": 2224, - "end": 2225, + "start": 2242, + "end": 2243, "loc": { "start": { - "line": 76, + "line": 77, "column": 12 }, "end": { - "line": 76, + "line": 77, "column": 13 } } @@ -21134,15 +21455,15 @@ "binop": null }, "value": "status", - "start": 2225, - "end": 2231, + "start": 2243, + "end": 2249, "loc": { "start": { - "line": 76, + "line": 77, "column": 13 }, "end": { - "line": 76, + "line": 77, "column": 19 } } @@ -21161,15 +21482,15 @@ "updateContext": null }, "value": "=", - "start": 2232, - "end": 2233, + "start": 2250, + "end": 2251, "loc": { "start": { - "line": 76, + "line": 77, "column": 20 }, "end": { - "line": 76, + "line": 77, "column": 21 } } @@ -21187,15 +21508,15 @@ "binop": null }, "value": "error", - "start": 2234, - "end": 2239, + "start": 2252, + "end": 2257, "loc": { "start": { - "line": 76, + "line": 77, "column": 22 }, "end": { - "line": 76, + "line": 77, "column": 27 } } @@ -21213,15 +21534,15 @@ "binop": null, "updateContext": null }, - "start": 2239, - "end": 2240, + "start": 2257, + "end": 2258, "loc": { "start": { - "line": 76, + "line": 77, "column": 27 }, "end": { - "line": 76, + "line": 77, "column": 28 } } @@ -21238,15 +21559,15 @@ "postfix": false, "binop": null }, - "start": 2243, - "end": 2244, + "start": 2261, + "end": 2262, "loc": { "start": { - "line": 77, + "line": 78, "column": 2 }, "end": { - "line": 77, + "line": 78, "column": 3 } } @@ -21266,15 +21587,15 @@ "updateContext": null }, "value": "return", - "start": 2247, - "end": 2253, + "start": 2265, + "end": 2271, "loc": { "start": { - "line": 78, + "line": 79, "column": 2 }, "end": { - "line": 78, + "line": 79, "column": 8 } } @@ -21292,15 +21613,15 @@ "binop": null }, "value": "response", - "start": 2254, - "end": 2262, + "start": 2272, + "end": 2280, "loc": { "start": { - "line": 78, + "line": 79, "column": 9 }, "end": { - "line": 78, + "line": 79, "column": 17 } } @@ -21318,15 +21639,15 @@ "binop": null, "updateContext": null }, - "start": 2262, - "end": 2263, + "start": 2280, + "end": 2281, "loc": { "start": { - "line": 78, + "line": 79, "column": 17 }, "end": { - "line": 78, + "line": 79, "column": 18 } } @@ -21343,15 +21664,15 @@ "postfix": false, "binop": null }, - "start": 2264, - "end": 2265, + "start": 2282, + "end": 2283, "loc": { "start": { - "line": 79, + "line": 80, "column": 0 }, "end": { - "line": 79, + "line": 80, "column": 1 } } @@ -21359,15 +21680,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the current branch of the build (TODO: development vs production?)\n * @return {string} information about the current branch and build\n ", - "start": 2267, - "end": 2419, + "start": 2285, + "end": 2437, "loc": { "start": { - "line": 81, + "line": 82, "column": 0 }, "end": { - "line": 84, + "line": 85, "column": 3 } } @@ -21386,15 +21707,15 @@ "binop": null }, "value": "function", - "start": 2420, - "end": 2428, + "start": 2438, + "end": 2446, "loc": { "start": { - "line": 85, + "line": 86, "column": 0 }, "end": { - "line": 85, + "line": 86, "column": 8 } } @@ -21412,15 +21733,15 @@ "binop": null }, "value": "getBranch", - "start": 2429, - "end": 2438, + "start": 2447, + "end": 2456, "loc": { "start": { - "line": 85, + "line": 86, "column": 9 }, "end": { - "line": 85, + "line": 86, "column": 18 } } @@ -21437,15 +21758,15 @@ "postfix": false, "binop": null }, - "start": 2438, - "end": 2439, + "start": 2456, + "end": 2457, "loc": { "start": { - "line": 85, + "line": 86, "column": 18 }, "end": { - "line": 85, + "line": 86, "column": 19 } } @@ -21462,15 +21783,15 @@ "postfix": false, "binop": null }, - "start": 2439, - "end": 2440, + "start": 2457, + "end": 2458, "loc": { "start": { - "line": 85, + "line": 86, "column": 19 }, "end": { - "line": 85, + "line": 86, "column": 20 } } @@ -21487,15 +21808,15 @@ "postfix": false, "binop": null }, - "start": 2441, - "end": 2442, + "start": 2459, + "end": 2460, "loc": { "start": { - "line": 85, + "line": 86, "column": 21 }, "end": { - "line": 85, + "line": 86, "column": 22 } } @@ -21515,15 +21836,15 @@ "updateContext": null }, "value": "const", - "start": 2445, - "end": 2450, + "start": 2463, + "end": 2468, "loc": { "start": { - "line": 86, + "line": 87, "column": 2 }, "end": { - "line": 86, + "line": 87, "column": 7 } } @@ -21541,15 +21862,15 @@ "binop": null }, "value": "content", - "start": 2451, - "end": 2458, + "start": 2469, + "end": 2476, "loc": { "start": { - "line": 86, + "line": 87, "column": 8 }, "end": { - "line": 86, + "line": 87, "column": 15 } } @@ -21568,15 +21889,15 @@ "updateContext": null }, "value": "=", - "start": 2459, - "end": 2460, + "start": 2477, + "end": 2478, "loc": { "start": { - "line": 86, + "line": 87, "column": 16 }, "end": { - "line": 86, + "line": 87, "column": 17 } } @@ -21594,15 +21915,15 @@ "binop": null }, "value": "file", - "start": 2461, - "end": 2465, + "start": 2479, + "end": 2483, "loc": { "start": { - "line": 86, + "line": 87, "column": 18 }, "end": { - "line": 86, + "line": 87, "column": 22 } } @@ -21620,15 +21941,15 @@ "binop": null, "updateContext": null }, - "start": 2465, - "end": 2466, + "start": 2483, + "end": 2484, "loc": { "start": { - "line": 86, + "line": 87, "column": 22 }, "end": { - "line": 86, + "line": 87, "column": 23 } } @@ -21646,15 +21967,15 @@ "binop": null }, "value": "readFileSync", - "start": 2466, - "end": 2478, + "start": 2484, + "end": 2496, "loc": { "start": { - "line": 86, + "line": 87, "column": 23 }, "end": { - "line": 86, + "line": 87, "column": 35 } } @@ -21671,15 +21992,15 @@ "postfix": false, "binop": null }, - "start": 2478, - "end": 2479, + "start": 2496, + "end": 2497, "loc": { "start": { - "line": 86, + "line": 87, "column": 35 }, "end": { - "line": 86, + "line": 87, "column": 36 } } @@ -21697,15 +22018,15 @@ "binop": null }, "value": "path", - "start": 2479, - "end": 2483, + "start": 2497, + "end": 2501, "loc": { "start": { - "line": 86, + "line": 87, "column": 36 }, "end": { - "line": 86, + "line": 87, "column": 40 } } @@ -21723,15 +22044,15 @@ "binop": null, "updateContext": null }, - "start": 2483, - "end": 2484, + "start": 2501, + "end": 2502, "loc": { "start": { - "line": 86, + "line": 87, "column": 40 }, "end": { - "line": 86, + "line": 87, "column": 41 } } @@ -21749,15 +22070,15 @@ "binop": null }, "value": "join", - "start": 2484, - "end": 2488, + "start": 2502, + "end": 2506, "loc": { "start": { - "line": 86, + "line": 87, "column": 41 }, "end": { - "line": 86, + "line": 87, "column": 45 } } @@ -21774,15 +22095,15 @@ "postfix": false, "binop": null }, - "start": 2488, - "end": 2489, + "start": 2506, + "end": 2507, "loc": { "start": { - "line": 86, + "line": 87, "column": 45 }, "end": { - "line": 86, + "line": 87, "column": 46 } } @@ -21800,15 +22121,15 @@ "binop": null }, "value": "__dirname", - "start": 2489, - "end": 2498, + "start": 2507, + "end": 2516, "loc": { "start": { - "line": 86, + "line": 87, "column": 46 }, "end": { - "line": 86, + "line": 87, "column": 55 } } @@ -21826,15 +22147,15 @@ "binop": null, "updateContext": null }, - "start": 2498, - "end": 2499, + "start": 2516, + "end": 2517, "loc": { "start": { - "line": 86, + "line": 87, "column": 55 }, "end": { - "line": 86, + "line": 87, "column": 56 } } @@ -21853,15 +22174,15 @@ "updateContext": null }, "value": "../../.git/HEAD", - "start": 2500, - "end": 2517, + "start": 2518, + "end": 2535, "loc": { "start": { - "line": 86, + "line": 87, "column": 57 }, "end": { - "line": 86, + "line": 87, "column": 74 } } @@ -21878,15 +22199,15 @@ "postfix": false, "binop": null }, - "start": 2517, - "end": 2518, + "start": 2535, + "end": 2536, "loc": { "start": { - "line": 86, + "line": 87, "column": 74 }, "end": { - "line": 86, + "line": 87, "column": 75 } } @@ -21904,15 +22225,15 @@ "binop": null, "updateContext": null }, - "start": 2518, - "end": 2519, + "start": 2536, + "end": 2537, "loc": { "start": { - "line": 86, + "line": 87, "column": 75 }, "end": { - "line": 86, + "line": 87, "column": 76 } } @@ -21929,15 +22250,15 @@ "postfix": false, "binop": null }, - "start": 2520, - "end": 2521, + "start": 2538, + "end": 2539, "loc": { "start": { - "line": 86, + "line": 87, "column": 77 }, "end": { - "line": 86, + "line": 87, "column": 78 } } @@ -21955,15 +22276,15 @@ "binop": null }, "value": "encoding", - "start": 2522, - "end": 2530, + "start": 2540, + "end": 2548, "loc": { "start": { - "line": 86, + "line": 87, "column": 79 }, "end": { - "line": 86, + "line": 87, "column": 87 } } @@ -21981,15 +22302,15 @@ "binop": null, "updateContext": null }, - "start": 2530, - "end": 2531, + "start": 2548, + "end": 2549, "loc": { "start": { - "line": 86, + "line": 87, "column": 87 }, "end": { - "line": 86, + "line": 87, "column": 88 } } @@ -22008,15 +22329,15 @@ "updateContext": null }, "value": "UTF-8", - "start": 2532, - "end": 2539, + "start": 2550, + "end": 2557, "loc": { "start": { - "line": 86, + "line": 87, "column": 89 }, "end": { - "line": 86, + "line": 87, "column": 96 } } @@ -22033,15 +22354,15 @@ "postfix": false, "binop": null }, - "start": 2540, - "end": 2541, + "start": 2558, + "end": 2559, "loc": { "start": { - "line": 86, + "line": 87, "column": 97 }, "end": { - "line": 86, + "line": 87, "column": 98 } } @@ -22058,15 +22379,15 @@ "postfix": false, "binop": null }, - "start": 2541, - "end": 2542, + "start": 2559, + "end": 2560, "loc": { "start": { - "line": 86, + "line": 87, "column": 98 }, "end": { - "line": 86, + "line": 87, "column": 99 } } @@ -22084,15 +22405,15 @@ "binop": null, "updateContext": null }, - "start": 2542, - "end": 2543, + "start": 2560, + "end": 2561, "loc": { "start": { - "line": 86, + "line": 87, "column": 99 }, "end": { - "line": 86, + "line": 87, "column": 100 } } @@ -22112,15 +22433,15 @@ "updateContext": null }, "value": "const", - "start": 2547, - "end": 2552, + "start": 2565, + "end": 2570, "loc": { "start": { - "line": 88, + "line": 89, "column": 2 }, "end": { - "line": 88, + "line": 89, "column": 7 } } @@ -22138,15 +22459,15 @@ "binop": null }, "value": "split", - "start": 2553, - "end": 2558, + "start": 2571, + "end": 2576, "loc": { "start": { - "line": 88, + "line": 89, "column": 8 }, "end": { - "line": 88, + "line": 89, "column": 13 } } @@ -22165,15 +22486,15 @@ "updateContext": null }, "value": "=", - "start": 2559, - "end": 2560, + "start": 2577, + "end": 2578, "loc": { "start": { - "line": 88, + "line": 89, "column": 14 }, "end": { - "line": 88, + "line": 89, "column": 15 } } @@ -22191,15 +22512,15 @@ "binop": null }, "value": "content", - "start": 2561, - "end": 2568, + "start": 2579, + "end": 2586, "loc": { "start": { - "line": 88, + "line": 89, "column": 16 }, "end": { - "line": 88, + "line": 89, "column": 23 } } @@ -22217,15 +22538,15 @@ "binop": null, "updateContext": null }, - "start": 2568, - "end": 2569, + "start": 2586, + "end": 2587, "loc": { "start": { - "line": 88, + "line": 89, "column": 23 }, "end": { - "line": 88, + "line": 89, "column": 24 } } @@ -22243,15 +22564,15 @@ "binop": null }, "value": "split", - "start": 2569, - "end": 2574, + "start": 2587, + "end": 2592, "loc": { "start": { - "line": 88, + "line": 89, "column": 24 }, "end": { - "line": 88, + "line": 89, "column": 29 } } @@ -22268,15 +22589,15 @@ "postfix": false, "binop": null }, - "start": 2574, - "end": 2575, + "start": 2592, + "end": 2593, "loc": { "start": { - "line": 88, + "line": 89, "column": 29 }, "end": { - "line": 88, + "line": 89, "column": 30 } } @@ -22295,15 +22616,15 @@ "updateContext": null }, "value": "/", - "start": 2575, - "end": 2578, + "start": 2593, + "end": 2596, "loc": { "start": { - "line": 88, + "line": 89, "column": 30 }, "end": { - "line": 88, + "line": 89, "column": 33 } } @@ -22320,15 +22641,15 @@ "postfix": false, "binop": null }, - "start": 2578, - "end": 2579, + "start": 2596, + "end": 2597, "loc": { "start": { - "line": 88, + "line": 89, "column": 33 }, "end": { - "line": 88, + "line": 89, "column": 34 } } @@ -22346,15 +22667,15 @@ "binop": null, "updateContext": null }, - "start": 2579, - "end": 2580, + "start": 2597, + "end": 2598, "loc": { "start": { - "line": 88, + "line": 89, "column": 34 }, "end": { - "line": 88, + "line": 89, "column": 35 } } @@ -22374,15 +22695,15 @@ "updateContext": null }, "value": "return", - "start": 2583, - "end": 2589, + "start": 2601, + "end": 2607, "loc": { "start": { - "line": 89, + "line": 90, "column": 2 }, "end": { - "line": 89, + "line": 90, "column": 8 } } @@ -22400,15 +22721,15 @@ "binop": null }, "value": "split", - "start": 2590, - "end": 2595, + "start": 2608, + "end": 2613, "loc": { "start": { - "line": 89, + "line": 90, "column": 9 }, "end": { - "line": 89, + "line": 90, "column": 14 } } @@ -22426,15 +22747,15 @@ "binop": null, "updateContext": null }, - "start": 2595, - "end": 2596, + "start": 2613, + "end": 2614, "loc": { "start": { - "line": 89, + "line": 90, "column": 14 }, "end": { - "line": 89, + "line": 90, "column": 15 } } @@ -22452,15 +22773,15 @@ "binop": null }, "value": "split", - "start": 2596, - "end": 2601, + "start": 2614, + "end": 2619, "loc": { "start": { - "line": 89, + "line": 90, "column": 15 }, "end": { - "line": 89, + "line": 90, "column": 20 } } @@ -22478,15 +22799,15 @@ "binop": null, "updateContext": null }, - "start": 2601, - "end": 2602, + "start": 2619, + "end": 2620, "loc": { "start": { - "line": 89, + "line": 90, "column": 20 }, "end": { - "line": 89, + "line": 90, "column": 21 } } @@ -22504,15 +22825,15 @@ "binop": null }, "value": "length", - "start": 2602, - "end": 2608, + "start": 2620, + "end": 2626, "loc": { "start": { - "line": 89, + "line": 90, "column": 21 }, "end": { - "line": 89, + "line": 90, "column": 27 } } @@ -22531,15 +22852,15 @@ "updateContext": null }, "value": "-", - "start": 2609, - "end": 2610, + "start": 2627, + "end": 2628, "loc": { "start": { - "line": 89, + "line": 90, "column": 28 }, "end": { - "line": 89, + "line": 90, "column": 29 } } @@ -22558,15 +22879,15 @@ "updateContext": null }, "value": 1, - "start": 2611, - "end": 2612, + "start": 2629, + "end": 2630, "loc": { "start": { - "line": 89, + "line": 90, "column": 30 }, "end": { - "line": 89, + "line": 90, "column": 31 } } @@ -22584,15 +22905,15 @@ "binop": null, "updateContext": null }, - "start": 2612, - "end": 2613, + "start": 2630, + "end": 2631, "loc": { "start": { - "line": 89, + "line": 90, "column": 31 }, "end": { - "line": 89, + "line": 90, "column": 32 } } @@ -22610,15 +22931,15 @@ "binop": null, "updateContext": null }, - "start": 2613, - "end": 2614, + "start": 2631, + "end": 2632, "loc": { "start": { - "line": 89, + "line": 90, "column": 32 }, "end": { - "line": 89, + "line": 90, "column": 33 } } @@ -22635,15 +22956,15 @@ "postfix": false, "binop": null }, - "start": 2615, - "end": 2616, + "start": 2633, + "end": 2634, "loc": { "start": { - "line": 90, + "line": 91, "column": 0 }, "end": { - "line": 90, + "line": 91, "column": 1 } } @@ -22651,15 +22972,15 @@ { "type": "CommentBlock", "value": "*\n * Class to wrap the methods that are used for server healthcheck\n ", - "start": 2618, - "end": 2691, + "start": 2636, + "end": 2709, "loc": { "start": { - "line": 92, + "line": 93, "column": 0 }, "end": { - "line": 94, + "line": 95, "column": 3 } } @@ -22679,15 +23000,15 @@ "updateContext": null }, "value": "class", - "start": 2692, - "end": 2697, + "start": 2710, + "end": 2715, "loc": { "start": { - "line": 95, + "line": 96, "column": 0 }, "end": { - "line": 95, + "line": 96, "column": 5 } } @@ -22705,15 +23026,15 @@ "binop": null }, "value": "HealthcheckHelper", - "start": 2698, - "end": 2715, + "start": 2716, + "end": 2733, "loc": { "start": { - "line": 95, + "line": 96, "column": 6 }, "end": { - "line": 95, + "line": 96, "column": 23 } } @@ -22730,15 +23051,15 @@ "postfix": false, "binop": null }, - "start": 2716, - "end": 2717, + "start": 2734, + "end": 2735, "loc": { "start": { - "line": 95, + "line": 96, "column": 24 }, "end": { - "line": 95, + "line": 96, "column": 25 } } @@ -22746,15 +23067,15 @@ { "type": "CommentBlock", "value": "*\n * Creates the Healthcheck helper by loading the configuration file and parsing the database and external\n * service configurations\n ", - "start": 2721, - "end": 2866, + "start": 2739, + "end": 2884, "loc": { "start": { - "line": 97, + "line": 98, "column": 2 }, "end": { - "line": 100, + "line": 101, "column": 5 } } @@ -22762,15 +23083,15 @@ { "type": "CommentLine", "value": " Tried these with ES6 Map type but it made it much harder to do easy JSON manipulations", - "start": 2870, - "end": 2959, + "start": 2888, + "end": 2977, "loc": { "start": { - "line": 102, + "line": 103, "column": 2 }, "end": { - "line": 102, + "line": 103, "column": 91 } } @@ -22788,15 +23109,15 @@ "binop": null }, "value": "constructor", - "start": 2962, - "end": 2973, + "start": 2980, + "end": 2991, "loc": { "start": { - "line": 103, + "line": 104, "column": 2 }, "end": { - "line": 103, + "line": 104, "column": 13 } } @@ -22813,15 +23134,15 @@ "postfix": false, "binop": null }, - "start": 2973, - "end": 2974, + "start": 2991, + "end": 2992, "loc": { "start": { - "line": 103, + "line": 104, "column": 13 }, "end": { - "line": 103, + "line": 104, "column": 14 } } @@ -22838,15 +23159,15 @@ "postfix": false, "binop": null }, - "start": 2974, - "end": 2975, + "start": 2992, + "end": 2993, "loc": { "start": { - "line": 103, + "line": 104, "column": 14 }, "end": { - "line": 103, + "line": 104, "column": 15 } } @@ -22863,15 +23184,15 @@ "postfix": false, "binop": null }, - "start": 2976, - "end": 2977, + "start": 2994, + "end": 2995, "loc": { "start": { - "line": 103, + "line": 104, "column": 16 }, "end": { - "line": 103, + "line": 104, "column": 17 } } @@ -22891,15 +23212,15 @@ "updateContext": null }, "value": "this", - "start": 2982, - "end": 2986, + "start": 3000, + "end": 3004, "loc": { "start": { - "line": 104, + "line": 105, "column": 4 }, "end": { - "line": 104, + "line": 105, "column": 8 } } @@ -22917,15 +23238,15 @@ "binop": null, "updateContext": null }, - "start": 2986, - "end": 2987, + "start": 3004, + "end": 3005, "loc": { "start": { - "line": 104, + "line": 105, "column": 8 }, "end": { - "line": 104, + "line": 105, "column": 9 } } @@ -22943,15 +23264,15 @@ "binop": null }, "value": "serviceMap", - "start": 2987, - "end": 2997, + "start": 3005, + "end": 3015, "loc": { "start": { - "line": 104, + "line": 105, "column": 9 }, "end": { - "line": 104, + "line": 105, "column": 19 } } @@ -22970,15 +23291,15 @@ "updateContext": null }, "value": "=", - "start": 2998, - "end": 2999, + "start": 3016, + "end": 3017, "loc": { "start": { - "line": 104, + "line": 105, "column": 20 }, "end": { - "line": 104, + "line": 105, "column": 21 } } @@ -22995,15 +23316,15 @@ "postfix": false, "binop": null }, - "start": 3000, - "end": 3001, + "start": 3018, + "end": 3019, "loc": { "start": { - "line": 104, + "line": 105, "column": 22 }, "end": { - "line": 104, + "line": 105, "column": 23 } } @@ -23020,15 +23341,15 @@ "postfix": false, "binop": null }, - "start": 3001, - "end": 3002, + "start": 3019, + "end": 3020, "loc": { "start": { - "line": 104, + "line": 105, "column": 23 }, "end": { - "line": 104, + "line": 105, "column": 24 } } @@ -23046,15 +23367,15 @@ "binop": null, "updateContext": null }, - "start": 3002, - "end": 3003, + "start": 3020, + "end": 3021, "loc": { "start": { - "line": 104, + "line": 105, "column": 24 }, "end": { - "line": 104, + "line": 105, "column": 25 } } @@ -23074,15 +23395,15 @@ "updateContext": null }, "value": "this", - "start": 3008, - "end": 3012, + "start": 3026, + "end": 3030, "loc": { "start": { - "line": 105, + "line": 106, "column": 4 }, "end": { - "line": 105, + "line": 106, "column": 8 } } @@ -23100,15 +23421,15 @@ "binop": null, "updateContext": null }, - "start": 3012, - "end": 3013, + "start": 3030, + "end": 3031, "loc": { "start": { - "line": 105, + "line": 106, "column": 8 }, "end": { - "line": 105, + "line": 106, "column": 9 } } @@ -23126,15 +23447,15 @@ "binop": null }, "value": "dbMap", - "start": 3013, - "end": 3018, + "start": 3031, + "end": 3036, "loc": { "start": { - "line": 105, + "line": 106, "column": 9 }, "end": { - "line": 105, + "line": 106, "column": 14 } } @@ -23153,15 +23474,15 @@ "updateContext": null }, "value": "=", - "start": 3019, - "end": 3020, + "start": 3037, + "end": 3038, "loc": { "start": { - "line": 105, + "line": 106, "column": 15 }, "end": { - "line": 105, + "line": 106, "column": 16 } } @@ -23178,15 +23499,15 @@ "postfix": false, "binop": null }, - "start": 3021, - "end": 3022, + "start": 3039, + "end": 3040, "loc": { "start": { - "line": 105, + "line": 106, "column": 17 }, "end": { - "line": 105, + "line": 106, "column": 18 } } @@ -23203,15 +23524,15 @@ "postfix": false, "binop": null }, - "start": 3022, - "end": 3023, + "start": 3040, + "end": 3041, "loc": { "start": { - "line": 105, + "line": 106, "column": 18 }, "end": { - "line": 105, + "line": 106, "column": 19 } } @@ -23229,15 +23550,15 @@ "binop": null, "updateContext": null }, - "start": 3023, - "end": 3024, + "start": 3041, + "end": 3042, "loc": { "start": { - "line": 105, + "line": 106, "column": 19 }, "end": { - "line": 105, + "line": 106, "column": 20 } } @@ -23255,15 +23576,15 @@ "binop": null }, "value": "_", - "start": 3029, - "end": 3030, + "start": 3047, + "end": 3048, "loc": { "start": { - "line": 106, + "line": 107, "column": 4 }, "end": { - "line": 106, + "line": 107, "column": 5 } } @@ -23281,15 +23602,15 @@ "binop": null, "updateContext": null }, - "start": 3030, - "end": 3031, + "start": 3048, + "end": 3049, "loc": { "start": { - "line": 106, + "line": 107, "column": 5 }, "end": { - "line": 106, + "line": 107, "column": 6 } } @@ -23307,15 +23628,15 @@ "binop": null }, "value": "each", - "start": 3031, - "end": 3035, + "start": 3049, + "end": 3053, "loc": { "start": { - "line": 106, + "line": 107, "column": 6 }, "end": { - "line": 106, + "line": 107, "column": 10 } } @@ -23332,15 +23653,15 @@ "postfix": false, "binop": null }, - "start": 3035, - "end": 3036, + "start": 3053, + "end": 3054, "loc": { "start": { - "line": 106, + "line": 107, "column": 10 }, "end": { - "line": 106, + "line": 107, "column": 11 } } @@ -23358,15 +23679,15 @@ "binop": null }, "value": "CONFIG", - "start": 3036, - "end": 3042, + "start": 3054, + "end": 3060, "loc": { "start": { - "line": 106, + "line": 107, "column": 11 }, "end": { - "line": 106, + "line": 107, "column": 17 } } @@ -23384,15 +23705,15 @@ "binop": null, "updateContext": null }, - "start": 3042, - "end": 3043, + "start": 3060, + "end": 3061, "loc": { "start": { - "line": 106, + "line": 107, "column": 17 }, "end": { - "line": 106, + "line": 107, "column": 18 } } @@ -23410,15 +23731,15 @@ "binop": null }, "value": "EXTERNAL_SERVICES", - "start": 3043, - "end": 3060, + "start": 3061, + "end": 3078, "loc": { "start": { - "line": 106, + "line": 107, "column": 18 }, "end": { - "line": 106, + "line": 107, "column": 35 } } @@ -23436,15 +23757,15 @@ "binop": null, "updateContext": null }, - "start": 3060, - "end": 3061, + "start": 3078, + "end": 3079, "loc": { "start": { - "line": 106, + "line": 107, "column": 35 }, "end": { - "line": 106, + "line": 107, "column": 36 } } @@ -23461,15 +23782,15 @@ "postfix": false, "binop": null }, - "start": 3062, - "end": 3063, + "start": 3080, + "end": 3081, "loc": { "start": { - "line": 106, + "line": 107, "column": 37 }, "end": { - "line": 106, + "line": 107, "column": 38 } } @@ -23487,15 +23808,15 @@ "binop": null }, "value": "service", - "start": 3063, - "end": 3070, + "start": 3081, + "end": 3088, "loc": { "start": { - "line": 106, + "line": 107, "column": 38 }, "end": { - "line": 106, + "line": 107, "column": 45 } } @@ -23513,15 +23834,15 @@ "binop": null, "updateContext": null }, - "start": 3070, - "end": 3071, + "start": 3088, + "end": 3089, "loc": { "start": { - "line": 106, + "line": 107, "column": 45 }, "end": { - "line": 106, + "line": 107, "column": 46 } } @@ -23539,15 +23860,15 @@ "binop": null }, "value": "name", - "start": 3072, - "end": 3076, + "start": 3090, + "end": 3094, "loc": { "start": { - "line": 106, + "line": 107, "column": 47 }, "end": { - "line": 106, + "line": 107, "column": 51 } } @@ -23564,15 +23885,15 @@ "postfix": false, "binop": null }, - "start": 3076, - "end": 3077, + "start": 3094, + "end": 3095, "loc": { "start": { - "line": 106, + "line": 107, "column": 51 }, "end": { - "line": 106, + "line": 107, "column": 52 } } @@ -23590,15 +23911,15 @@ "binop": null, "updateContext": null }, - "start": 3078, - "end": 3080, + "start": 3096, + "end": 3098, "loc": { "start": { - "line": 106, + "line": 107, "column": 53 }, "end": { - "line": 106, + "line": 107, "column": 55 } } @@ -23615,15 +23936,15 @@ "postfix": false, "binop": null }, - "start": 3081, - "end": 3082, + "start": 3099, + "end": 3100, "loc": { "start": { - "line": 106, + "line": 107, "column": 56 }, "end": { - "line": 106, + "line": 107, "column": 57 } } @@ -23643,15 +23964,15 @@ "updateContext": null }, "value": "if", - "start": 3089, - "end": 3091, + "start": 3107, + "end": 3109, "loc": { "start": { - "line": 107, + "line": 108, "column": 6 }, "end": { - "line": 107, + "line": 108, "column": 8 } } @@ -23668,15 +23989,15 @@ "postfix": false, "binop": null }, - "start": 3092, - "end": 3093, + "start": 3110, + "end": 3111, "loc": { "start": { - "line": 107, + "line": 108, "column": 9 }, "end": { - "line": 107, + "line": 108, "column": 10 } } @@ -23694,15 +24015,15 @@ "binop": null }, "value": "service", - "start": 3093, - "end": 3100, + "start": 3111, + "end": 3118, "loc": { "start": { - "line": 107, + "line": 108, "column": 10 }, "end": { - "line": 107, + "line": 108, "column": 17 } } @@ -23720,15 +24041,15 @@ "binop": null, "updateContext": null }, - "start": 3100, - "end": 3101, + "start": 3118, + "end": 3119, "loc": { "start": { - "line": 107, + "line": 108, "column": 17 }, "end": { - "line": 107, + "line": 108, "column": 18 } } @@ -23746,15 +24067,15 @@ "binop": null }, "value": "serviceName", - "start": 3101, - "end": 3112, + "start": 3119, + "end": 3130, "loc": { "start": { - "line": 107, + "line": 108, "column": 18 }, "end": { - "line": 107, + "line": 108, "column": 29 } } @@ -23773,15 +24094,15 @@ "updateContext": null }, "value": "===", - "start": 3113, - "end": 3116, + "start": 3131, + "end": 3134, "loc": { "start": { - "line": 107, + "line": 108, "column": 30 }, "end": { - "line": 107, + "line": 108, "column": 33 } } @@ -23799,15 +24120,15 @@ "binop": null }, "value": "undefined", - "start": 3117, - "end": 3126, + "start": 3135, + "end": 3144, "loc": { "start": { - "line": 107, + "line": 108, "column": 34 }, "end": { - "line": 107, + "line": 108, "column": 43 } } @@ -23824,15 +24145,15 @@ "postfix": false, "binop": null }, - "start": 3126, - "end": 3127, + "start": 3144, + "end": 3145, "loc": { "start": { - "line": 107, + "line": 108, "column": 43 }, "end": { - "line": 107, + "line": 108, "column": 44 } } @@ -23849,15 +24170,15 @@ "postfix": false, "binop": null }, - "start": 3128, - "end": 3129, + "start": 3146, + "end": 3147, "loc": { "start": { - "line": 107, + "line": 108, "column": 45 }, "end": { - "line": 107, + "line": 108, "column": 46 } } @@ -23875,15 +24196,15 @@ "binop": null }, "value": "service", - "start": 3138, - "end": 3145, + "start": 3156, + "end": 3163, "loc": { "start": { - "line": 108, + "line": 109, "column": 8 }, "end": { - "line": 108, + "line": 109, "column": 15 } } @@ -23901,15 +24222,15 @@ "binop": null, "updateContext": null }, - "start": 3145, - "end": 3146, + "start": 3163, + "end": 3164, "loc": { "start": { - "line": 108, + "line": 109, "column": 15 }, "end": { - "line": 108, + "line": 109, "column": 16 } } @@ -23927,15 +24248,15 @@ "binop": null }, "value": "serviceName", - "start": 3146, - "end": 3157, + "start": 3164, + "end": 3175, "loc": { "start": { - "line": 108, + "line": 109, "column": 16 }, "end": { - "line": 108, + "line": 109, "column": 27 } } @@ -23954,15 +24275,15 @@ "updateContext": null }, "value": "=", - "start": 3158, - "end": 3159, + "start": 3176, + "end": 3177, "loc": { "start": { - "line": 108, + "line": 109, "column": 28 }, "end": { - "line": 108, + "line": 109, "column": 29 } } @@ -23980,15 +24301,15 @@ "binop": null }, "value": "name", - "start": 3160, - "end": 3164, + "start": 3178, + "end": 3182, "loc": { "start": { - "line": 108, + "line": 109, "column": 30 }, "end": { - "line": 108, + "line": 109, "column": 34 } } @@ -24006,15 +24327,15 @@ "binop": null, "updateContext": null }, - "start": 3164, - "end": 3165, + "start": 3182, + "end": 3183, "loc": { "start": { - "line": 108, + "line": 109, "column": 34 }, "end": { - "line": 108, + "line": 109, "column": 35 } } @@ -24031,15 +24352,15 @@ "postfix": false, "binop": null }, - "start": 3172, - "end": 3173, + "start": 3190, + "end": 3191, "loc": { "start": { - "line": 109, + "line": 110, "column": 6 }, "end": { - "line": 109, + "line": 110, "column": 7 } } @@ -24059,15 +24380,15 @@ "updateContext": null }, "value": "this", - "start": 3180, - "end": 3184, + "start": 3198, + "end": 3202, "loc": { "start": { - "line": 110, + "line": 111, "column": 6 }, "end": { - "line": 110, + "line": 111, "column": 10 } } @@ -24085,15 +24406,15 @@ "binop": null, "updateContext": null }, - "start": 3184, - "end": 3185, + "start": 3202, + "end": 3203, "loc": { "start": { - "line": 110, + "line": 111, "column": 10 }, "end": { - "line": 110, + "line": 111, "column": 11 } } @@ -24111,15 +24432,15 @@ "binop": null }, "value": "serviceMap", - "start": 3185, - "end": 3195, + "start": 3203, + "end": 3213, "loc": { "start": { - "line": 110, + "line": 111, "column": 11 }, "end": { - "line": 110, + "line": 111, "column": 21 } } @@ -24137,15 +24458,15 @@ "binop": null, "updateContext": null }, - "start": 3195, - "end": 3196, + "start": 3213, + "end": 3214, "loc": { "start": { - "line": 110, + "line": 111, "column": 21 }, "end": { - "line": 110, + "line": 111, "column": 22 } } @@ -24163,15 +24484,15 @@ "binop": null }, "value": "name", - "start": 3196, - "end": 3200, + "start": 3214, + "end": 3218, "loc": { "start": { - "line": 110, + "line": 111, "column": 22 }, "end": { - "line": 110, + "line": 111, "column": 26 } } @@ -24189,15 +24510,15 @@ "binop": null, "updateContext": null }, - "start": 3200, - "end": 3201, + "start": 3218, + "end": 3219, "loc": { "start": { - "line": 110, + "line": 111, "column": 26 }, "end": { - "line": 110, + "line": 111, "column": 27 } } @@ -24216,15 +24537,15 @@ "updateContext": null }, "value": "=", - "start": 3202, - "end": 3203, + "start": 3220, + "end": 3221, "loc": { "start": { - "line": 110, + "line": 111, "column": 28 }, "end": { - "line": 110, + "line": 111, "column": 29 } } @@ -24242,15 +24563,15 @@ "binop": null }, "value": "service", - "start": 3204, - "end": 3211, + "start": 3222, + "end": 3229, "loc": { "start": { - "line": 110, + "line": 111, "column": 30 }, "end": { - "line": 110, + "line": 111, "column": 37 } } @@ -24268,15 +24589,15 @@ "binop": null, "updateContext": null }, - "start": 3211, - "end": 3212, + "start": 3229, + "end": 3230, "loc": { "start": { - "line": 110, + "line": 111, "column": 37 }, "end": { - "line": 110, + "line": 111, "column": 38 } } @@ -24293,15 +24614,15 @@ "postfix": false, "binop": null }, - "start": 3217, - "end": 3218, + "start": 3235, + "end": 3236, "loc": { "start": { - "line": 111, + "line": 112, "column": 4 }, "end": { - "line": 111, + "line": 112, "column": 5 } } @@ -24318,15 +24639,15 @@ "postfix": false, "binop": null }, - "start": 3218, - "end": 3219, + "start": 3236, + "end": 3237, "loc": { "start": { - "line": 111, + "line": 112, "column": 5 }, "end": { - "line": 111, + "line": 112, "column": 6 } } @@ -24344,15 +24665,15 @@ "binop": null, "updateContext": null }, - "start": 3219, - "end": 3220, + "start": 3237, + "end": 3238, "loc": { "start": { - "line": 111, + "line": 112, "column": 6 }, "end": { - "line": 111, + "line": 112, "column": 7 } } @@ -24370,15 +24691,15 @@ "binop": null }, "value": "_", - "start": 3226, - "end": 3227, + "start": 3244, + "end": 3245, "loc": { "start": { - "line": 113, + "line": 114, "column": 4 }, "end": { - "line": 113, + "line": 114, "column": 5 } } @@ -24396,15 +24717,15 @@ "binop": null, "updateContext": null }, - "start": 3227, - "end": 3228, + "start": 3245, + "end": 3246, "loc": { "start": { - "line": 113, + "line": 114, "column": 5 }, "end": { - "line": 113, + "line": 114, "column": 6 } } @@ -24422,15 +24743,15 @@ "binop": null }, "value": "each", - "start": 3228, - "end": 3232, + "start": 3246, + "end": 3250, "loc": { "start": { - "line": 113, + "line": 114, "column": 6 }, "end": { - "line": 113, + "line": 114, "column": 10 } } @@ -24447,15 +24768,15 @@ "postfix": false, "binop": null }, - "start": 3232, - "end": 3233, + "start": 3250, + "end": 3251, "loc": { "start": { - "line": 113, + "line": 114, "column": 10 }, "end": { - "line": 113, + "line": 114, "column": 11 } } @@ -24473,15 +24794,15 @@ "binop": null }, "value": "CONFIG", - "start": 3233, - "end": 3239, + "start": 3251, + "end": 3257, "loc": { "start": { - "line": 113, + "line": 114, "column": 11 }, "end": { - "line": 113, + "line": 114, "column": 17 } } @@ -24499,15 +24820,15 @@ "binop": null, "updateContext": null }, - "start": 3239, - "end": 3240, + "start": 3257, + "end": 3258, "loc": { "start": { - "line": 113, + "line": 114, "column": 17 }, "end": { - "line": 113, + "line": 114, "column": 18 } } @@ -24525,15 +24846,15 @@ "binop": null }, "value": "DB", - "start": 3240, - "end": 3242, + "start": 3258, + "end": 3260, "loc": { "start": { - "line": 113, + "line": 114, "column": 18 }, "end": { - "line": 113, + "line": 114, "column": 20 } } @@ -24551,15 +24872,15 @@ "binop": null, "updateContext": null }, - "start": 3242, - "end": 3243, + "start": 3260, + "end": 3261, "loc": { "start": { - "line": 113, + "line": 114, "column": 20 }, "end": { - "line": 113, + "line": 114, "column": 21 } } @@ -24576,15 +24897,15 @@ "postfix": false, "binop": null }, - "start": 3244, - "end": 3245, + "start": 3262, + "end": 3263, "loc": { "start": { - "line": 113, + "line": 114, "column": 22 }, "end": { - "line": 113, + "line": 114, "column": 23 } } @@ -24602,15 +24923,15 @@ "binop": null }, "value": "service", - "start": 3245, - "end": 3252, + "start": 3263, + "end": 3270, "loc": { "start": { - "line": 113, + "line": 114, "column": 23 }, "end": { - "line": 113, + "line": 114, "column": 30 } } @@ -24628,15 +24949,15 @@ "binop": null, "updateContext": null }, - "start": 3252, - "end": 3253, + "start": 3270, + "end": 3271, "loc": { "start": { - "line": 113, + "line": 114, "column": 30 }, "end": { - "line": 113, + "line": 114, "column": 31 } } @@ -24654,15 +24975,15 @@ "binop": null }, "value": "name", - "start": 3254, - "end": 3258, + "start": 3272, + "end": 3276, "loc": { "start": { - "line": 113, + "line": 114, "column": 32 }, "end": { - "line": 113, + "line": 114, "column": 36 } } @@ -24679,15 +25000,15 @@ "postfix": false, "binop": null }, - "start": 3258, - "end": 3259, + "start": 3276, + "end": 3277, "loc": { "start": { - "line": 113, + "line": 114, "column": 36 }, "end": { - "line": 113, + "line": 114, "column": 37 } } @@ -24705,15 +25026,15 @@ "binop": null, "updateContext": null }, - "start": 3260, - "end": 3262, + "start": 3278, + "end": 3280, "loc": { "start": { - "line": 113, + "line": 114, "column": 38 }, "end": { - "line": 113, + "line": 114, "column": 40 } } @@ -24730,15 +25051,15 @@ "postfix": false, "binop": null }, - "start": 3263, - "end": 3264, + "start": 3281, + "end": 3282, "loc": { "start": { - "line": 113, + "line": 114, "column": 41 }, "end": { - "line": 113, + "line": 114, "column": 42 } } @@ -24758,15 +25079,15 @@ "updateContext": null }, "value": "if", - "start": 3271, - "end": 3273, + "start": 3289, + "end": 3291, "loc": { "start": { - "line": 114, + "line": 115, "column": 6 }, "end": { - "line": 114, + "line": 115, "column": 8 } } @@ -24783,15 +25104,15 @@ "postfix": false, "binop": null }, - "start": 3274, - "end": 3275, + "start": 3292, + "end": 3293, "loc": { "start": { - "line": 114, + "line": 115, "column": 9 }, "end": { - "line": 114, + "line": 115, "column": 10 } } @@ -24809,15 +25130,15 @@ "binop": null }, "value": "service", - "start": 3275, - "end": 3282, + "start": 3293, + "end": 3300, "loc": { "start": { - "line": 114, + "line": 115, "column": 10 }, "end": { - "line": 114, + "line": 115, "column": 17 } } @@ -24835,15 +25156,15 @@ "binop": null, "updateContext": null }, - "start": 3282, - "end": 3283, + "start": 3300, + "end": 3301, "loc": { "start": { - "line": 114, + "line": 115, "column": 17 }, "end": { - "line": 114, + "line": 115, "column": 18 } } @@ -24861,15 +25182,15 @@ "binop": null }, "value": "serviceName", - "start": 3283, - "end": 3294, + "start": 3301, + "end": 3312, "loc": { "start": { - "line": 114, + "line": 115, "column": 18 }, "end": { - "line": 114, + "line": 115, "column": 29 } } @@ -24888,15 +25209,15 @@ "updateContext": null }, "value": "===", - "start": 3295, - "end": 3298, + "start": 3313, + "end": 3316, "loc": { "start": { - "line": 114, + "line": 115, "column": 30 }, "end": { - "line": 114, + "line": 115, "column": 33 } } @@ -24914,15 +25235,15 @@ "binop": null }, "value": "undefined", - "start": 3299, - "end": 3308, + "start": 3317, + "end": 3326, "loc": { "start": { - "line": 114, + "line": 115, "column": 34 }, "end": { - "line": 114, + "line": 115, "column": 43 } } @@ -24939,15 +25260,15 @@ "postfix": false, "binop": null }, - "start": 3308, - "end": 3309, + "start": 3326, + "end": 3327, "loc": { "start": { - "line": 114, + "line": 115, "column": 43 }, "end": { - "line": 114, + "line": 115, "column": 44 } } @@ -24964,15 +25285,15 @@ "postfix": false, "binop": null }, - "start": 3310, - "end": 3311, + "start": 3328, + "end": 3329, "loc": { "start": { - "line": 114, + "line": 115, "column": 45 }, "end": { - "line": 114, + "line": 115, "column": 46 } } @@ -24990,15 +25311,15 @@ "binop": null }, "value": "service", - "start": 3320, - "end": 3327, + "start": 3338, + "end": 3345, "loc": { "start": { - "line": 115, + "line": 116, "column": 8 }, "end": { - "line": 115, + "line": 116, "column": 15 } } @@ -25016,15 +25337,15 @@ "binop": null, "updateContext": null }, - "start": 3327, - "end": 3328, + "start": 3345, + "end": 3346, "loc": { "start": { - "line": 115, + "line": 116, "column": 15 }, "end": { - "line": 115, + "line": 116, "column": 16 } } @@ -25042,15 +25363,15 @@ "binop": null }, "value": "serviceName", - "start": 3328, - "end": 3339, + "start": 3346, + "end": 3357, "loc": { "start": { - "line": 115, + "line": 116, "column": 16 }, "end": { - "line": 115, + "line": 116, "column": 27 } } @@ -25069,15 +25390,15 @@ "updateContext": null }, "value": "=", - "start": 3340, - "end": 3341, + "start": 3358, + "end": 3359, "loc": { "start": { - "line": 115, + "line": 116, "column": 28 }, "end": { - "line": 115, + "line": 116, "column": 29 } } @@ -25095,15 +25416,15 @@ "binop": null }, "value": "name", - "start": 3342, - "end": 3346, + "start": 3360, + "end": 3364, "loc": { "start": { - "line": 115, + "line": 116, "column": 30 }, "end": { - "line": 115, + "line": 116, "column": 34 } } @@ -25121,15 +25442,15 @@ "binop": null, "updateContext": null }, - "start": 3346, - "end": 3347, + "start": 3364, + "end": 3365, "loc": { "start": { - "line": 115, + "line": 116, "column": 34 }, "end": { - "line": 115, + "line": 116, "column": 35 } } @@ -25146,15 +25467,15 @@ "postfix": false, "binop": null }, - "start": 3354, - "end": 3355, + "start": 3372, + "end": 3373, "loc": { "start": { - "line": 116, + "line": 117, "column": 6 }, "end": { - "line": 116, + "line": 117, "column": 7 } } @@ -25174,15 +25495,15 @@ "updateContext": null }, "value": "this", - "start": 3362, - "end": 3366, + "start": 3380, + "end": 3384, "loc": { "start": { - "line": 117, + "line": 118, "column": 6 }, "end": { - "line": 117, + "line": 118, "column": 10 } } @@ -25200,15 +25521,15 @@ "binop": null, "updateContext": null }, - "start": 3366, - "end": 3367, + "start": 3384, + "end": 3385, "loc": { "start": { - "line": 117, + "line": 118, "column": 10 }, "end": { - "line": 117, + "line": 118, "column": 11 } } @@ -25226,15 +25547,15 @@ "binop": null }, "value": "dbMap", - "start": 3367, - "end": 3372, + "start": 3385, + "end": 3390, "loc": { "start": { - "line": 117, + "line": 118, "column": 11 }, "end": { - "line": 117, + "line": 118, "column": 16 } } @@ -25252,15 +25573,15 @@ "binop": null, "updateContext": null }, - "start": 3372, - "end": 3373, + "start": 3390, + "end": 3391, "loc": { "start": { - "line": 117, + "line": 118, "column": 16 }, "end": { - "line": 117, + "line": 118, "column": 17 } } @@ -25278,15 +25599,15 @@ "binop": null }, "value": "name", - "start": 3373, - "end": 3377, + "start": 3391, + "end": 3395, "loc": { "start": { - "line": 117, + "line": 118, "column": 17 }, "end": { - "line": 117, + "line": 118, "column": 21 } } @@ -25304,15 +25625,15 @@ "binop": null, "updateContext": null }, - "start": 3377, - "end": 3378, + "start": 3395, + "end": 3396, "loc": { "start": { - "line": 117, + "line": 118, "column": 21 }, "end": { - "line": 117, + "line": 118, "column": 22 } } @@ -25331,15 +25652,15 @@ "updateContext": null }, "value": "=", - "start": 3379, - "end": 3380, + "start": 3397, + "end": 3398, "loc": { "start": { - "line": 117, + "line": 118, "column": 23 }, "end": { - "line": 117, + "line": 118, "column": 24 } } @@ -25357,15 +25678,15 @@ "binop": null }, "value": "service", - "start": 3381, - "end": 3388, + "start": 3399, + "end": 3406, "loc": { "start": { - "line": 117, + "line": 118, "column": 25 }, "end": { - "line": 117, + "line": 118, "column": 32 } } @@ -25383,15 +25704,15 @@ "binop": null, "updateContext": null }, - "start": 3388, - "end": 3389, + "start": 3406, + "end": 3407, "loc": { "start": { - "line": 117, + "line": 118, "column": 32 }, "end": { - "line": 117, + "line": 118, "column": 33 } } @@ -25408,15 +25729,15 @@ "postfix": false, "binop": null }, - "start": 3394, - "end": 3395, + "start": 3412, + "end": 3413, "loc": { "start": { - "line": 118, + "line": 119, "column": 4 }, "end": { - "line": 118, + "line": 119, "column": 5 } } @@ -25433,15 +25754,15 @@ "postfix": false, "binop": null }, - "start": 3395, - "end": 3396, + "start": 3413, + "end": 3414, "loc": { "start": { - "line": 118, + "line": 119, "column": 5 }, "end": { - "line": 118, + "line": 119, "column": 6 } } @@ -25459,15 +25780,15 @@ "binop": null, "updateContext": null }, - "start": 3396, - "end": 3397, + "start": 3414, + "end": 3415, "loc": { "start": { - "line": 118, + "line": 119, "column": 6 }, "end": { - "line": 118, + "line": 119, "column": 7 } } @@ -25484,15 +25805,15 @@ "postfix": false, "binop": null }, - "start": 3400, - "end": 3401, + "start": 3418, + "end": 3419, "loc": { "start": { - "line": 119, + "line": 120, "column": 2 }, "end": { - "line": 119, + "line": 120, "column": 3 } } @@ -25500,15 +25821,15 @@ { "type": "CommentBlock", "value": "*\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n ", - "start": 3405, - "end": 3633, + "start": 3423, + "end": 3651, "loc": { "start": { - "line": 121, + "line": 122, "column": 2 }, "end": { - "line": 125, + "line": 126, "column": 5 } } @@ -25526,15 +25847,15 @@ "binop": null }, "value": "async", - "start": 3636, - "end": 3641, + "start": 3654, + "end": 3659, "loc": { "start": { - "line": 126, + "line": 127, "column": 2 }, "end": { - "line": 126, + "line": 127, "column": 7 } } @@ -25552,15 +25873,15 @@ "binop": null }, "value": "isRunning", - "start": 3642, - "end": 3651, + "start": 3660, + "end": 3669, "loc": { "start": { - "line": 126, + "line": 127, "column": 8 }, "end": { - "line": 126, + "line": 127, "column": 17 } } @@ -25577,15 +25898,15 @@ "postfix": false, "binop": null }, - "start": 3651, - "end": 3652, + "start": 3669, + "end": 3670, "loc": { "start": { - "line": 126, + "line": 127, "column": 17 }, "end": { - "line": 126, + "line": 127, "column": 18 } } @@ -25603,15 +25924,15 @@ "binop": null }, "value": "serviceName", - "start": 3652, - "end": 3663, + "start": 3670, + "end": 3681, "loc": { "start": { - "line": 126, + "line": 127, "column": 18 }, "end": { - "line": 126, + "line": 127, "column": 29 } } @@ -25628,15 +25949,15 @@ "postfix": false, "binop": null }, - "start": 3663, - "end": 3664, + "start": 3681, + "end": 3682, "loc": { "start": { - "line": 126, + "line": 127, "column": 29 }, "end": { - "line": 126, + "line": 127, "column": 30 } } @@ -25653,15 +25974,15 @@ "postfix": false, "binop": null }, - "start": 3665, - "end": 3666, + "start": 3683, + "end": 3684, "loc": { "start": { - "line": 126, + "line": 127, "column": 31 }, "end": { - "line": 126, + "line": 127, "column": 32 } } @@ -25681,15 +26002,15 @@ "updateContext": null }, "value": "const", - "start": 3671, - "end": 3676, + "start": 3689, + "end": 3694, "loc": { "start": { - "line": 127, + "line": 128, "column": 4 }, "end": { - "line": 127, + "line": 128, "column": 9 } } @@ -25707,15 +26028,15 @@ "binop": null }, "value": "conf", - "start": 3677, - "end": 3681, + "start": 3695, + "end": 3699, "loc": { "start": { - "line": 127, + "line": 128, "column": 10 }, "end": { - "line": 127, + "line": 128, "column": 14 } } @@ -25734,15 +26055,15 @@ "updateContext": null }, "value": "=", - "start": 3682, - "end": 3683, + "start": 3700, + "end": 3701, "loc": { "start": { - "line": 127, + "line": 128, "column": 15 }, "end": { - "line": 127, + "line": 128, "column": 16 } } @@ -25762,15 +26083,15 @@ "updateContext": null }, "value": "this", - "start": 3684, - "end": 3688, + "start": 3702, + "end": 3706, "loc": { "start": { - "line": 127, + "line": 128, "column": 17 }, "end": { - "line": 127, + "line": 128, "column": 21 } } @@ -25788,15 +26109,15 @@ "binop": null, "updateContext": null }, - "start": 3688, - "end": 3689, + "start": 3706, + "end": 3707, "loc": { "start": { - "line": 127, + "line": 128, "column": 21 }, "end": { - "line": 127, + "line": 128, "column": 22 } } @@ -25814,15 +26135,15 @@ "binop": null }, "value": "serviceMap", - "start": 3689, - "end": 3699, + "start": 3707, + "end": 3717, "loc": { "start": { - "line": 127, + "line": 128, "column": 22 }, "end": { - "line": 127, + "line": 128, "column": 32 } } @@ -25840,15 +26161,15 @@ "binop": null, "updateContext": null }, - "start": 3699, - "end": 3700, + "start": 3717, + "end": 3718, "loc": { "start": { - "line": 127, + "line": 128, "column": 32 }, "end": { - "line": 127, + "line": 128, "column": 33 } } @@ -25866,15 +26187,15 @@ "binop": null }, "value": "serviceName", - "start": 3700, - "end": 3711, + "start": 3718, + "end": 3729, "loc": { "start": { - "line": 127, + "line": 128, "column": 33 }, "end": { - "line": 127, + "line": 128, "column": 44 } } @@ -25892,15 +26213,15 @@ "binop": null, "updateContext": null }, - "start": 3711, - "end": 3712, + "start": 3729, + "end": 3730, "loc": { "start": { - "line": 127, + "line": 128, "column": 44 }, "end": { - "line": 127, + "line": 128, "column": 45 } } @@ -25918,15 +26239,15 @@ "binop": null, "updateContext": null }, - "start": 3712, - "end": 3713, + "start": 3730, + "end": 3731, "loc": { "start": { - "line": 127, + "line": 128, "column": 45 }, "end": { - "line": 127, + "line": 128, "column": 46 } } @@ -25934,15 +26255,15 @@ { "type": "CommentLine", "value": " TODO: don't check if it exists, check if it is actually running", - "start": 3718, - "end": 3784, + "start": 3736, + "end": 3802, "loc": { "start": { - "line": 128, + "line": 129, "column": 4 }, "end": { - "line": 128, + "line": 129, "column": 70 } } @@ -25962,15 +26283,15 @@ "updateContext": null }, "value": "if", - "start": 3789, - "end": 3791, + "start": 3807, + "end": 3809, "loc": { "start": { - "line": 129, + "line": 130, "column": 4 }, "end": { - "line": 129, + "line": 130, "column": 6 } } @@ -25987,15 +26308,15 @@ "postfix": false, "binop": null }, - "start": 3792, - "end": 3793, + "start": 3810, + "end": 3811, "loc": { "start": { - "line": 129, + "line": 130, "column": 7 }, "end": { - "line": 129, + "line": 130, "column": 8 } } @@ -26013,15 +26334,15 @@ "binop": null }, "value": "conf", - "start": 3793, - "end": 3797, + "start": 3811, + "end": 3815, "loc": { "start": { - "line": 129, + "line": 130, "column": 8 }, "end": { - "line": 129, + "line": 130, "column": 12 } } @@ -26040,15 +26361,15 @@ "updateContext": null }, "value": "!==", - "start": 3798, - "end": 3801, + "start": 3816, + "end": 3819, "loc": { "start": { - "line": 129, + "line": 130, "column": 13 }, "end": { - "line": 129, + "line": 130, "column": 16 } } @@ -26066,15 +26387,15 @@ "binop": null }, "value": "undefined", - "start": 3802, - "end": 3811, + "start": 3820, + "end": 3829, "loc": { "start": { - "line": 129, + "line": 130, "column": 17 }, "end": { - "line": 129, + "line": 130, "column": 26 } } @@ -26091,15 +26412,15 @@ "postfix": false, "binop": null }, - "start": 3811, - "end": 3812, + "start": 3829, + "end": 3830, "loc": { "start": { - "line": 129, + "line": 130, "column": 26 }, "end": { - "line": 129, + "line": 130, "column": 27 } } @@ -26116,15 +26437,15 @@ "postfix": false, "binop": null }, - "start": 3813, - "end": 3814, + "start": 3831, + "end": 3832, "loc": { "start": { - "line": 129, + "line": 130, "column": 28 }, "end": { - "line": 129, + "line": 130, "column": 29 } } @@ -26144,15 +26465,15 @@ "updateContext": null }, "value": "if", - "start": 3821, - "end": 3823, + "start": 3839, + "end": 3841, "loc": { "start": { - "line": 130, + "line": 131, "column": 6 }, "end": { - "line": 130, + "line": 131, "column": 8 } } @@ -26169,15 +26490,15 @@ "postfix": false, "binop": null }, - "start": 3824, - "end": 3825, + "start": 3842, + "end": 3843, "loc": { "start": { - "line": 130, + "line": 131, "column": 9 }, "end": { - "line": 130, + "line": 131, "column": 10 } } @@ -26195,15 +26516,15 @@ "binop": null }, "value": "conf", - "start": 3825, - "end": 3829, + "start": 3843, + "end": 3847, "loc": { "start": { - "line": 130, + "line": 131, "column": 10 }, "end": { - "line": 130, + "line": 131, "column": 14 } } @@ -26223,15 +26544,15 @@ "updateContext": null }, "value": "instanceof", - "start": 3830, - "end": 3840, + "start": 3848, + "end": 3858, "loc": { "start": { - "line": 130, + "line": 131, "column": 15 }, "end": { - "line": 130, + "line": 131, "column": 25 } } @@ -26249,15 +26570,15 @@ "binop": null }, "value": "DatabaseConfig", - "start": 3841, - "end": 3855, + "start": 3859, + "end": 3873, "loc": { "start": { - "line": 130, + "line": 131, "column": 26 }, "end": { - "line": 130, + "line": 131, "column": 40 } } @@ -26274,15 +26595,15 @@ "postfix": false, "binop": null }, - "start": 3855, - "end": 3856, + "start": 3873, + "end": 3874, "loc": { "start": { - "line": 130, + "line": 131, "column": 40 }, "end": { - "line": 130, + "line": 131, "column": 41 } } @@ -26299,15 +26620,15 @@ "postfix": false, "binop": null }, - "start": 3857, - "end": 3858, + "start": 3875, + "end": 3876, "loc": { "start": { - "line": 130, + "line": 131, "column": 42 }, "end": { - "line": 130, + "line": 131, "column": 43 } } @@ -26327,15 +26648,15 @@ "updateContext": null }, "value": "return", - "start": 3867, - "end": 3873, + "start": 3885, + "end": 3891, "loc": { "start": { - "line": 131, + "line": 132, "column": 8 }, "end": { - "line": 131, + "line": 132, "column": 14 } } @@ -26353,15 +26674,15 @@ "binop": null }, "value": "await", - "start": 3874, - "end": 3879, + "start": 3892, + "end": 3897, "loc": { "start": { - "line": 131, + "line": 132, "column": 15 }, "end": { - "line": 131, + "line": 132, "column": 20 } } @@ -26379,15 +26700,15 @@ "binop": null }, "value": "_getDatabaseStatus", - "start": 3880, - "end": 3898, + "start": 3898, + "end": 3916, "loc": { "start": { - "line": 131, + "line": 132, "column": 21 }, "end": { - "line": 131, + "line": 132, "column": 39 } } @@ -26404,15 +26725,15 @@ "postfix": false, "binop": null }, - "start": 3898, - "end": 3899, + "start": 3916, + "end": 3917, "loc": { "start": { - "line": 131, + "line": 132, "column": 39 }, "end": { - "line": 131, + "line": 132, "column": 40 } } @@ -26430,15 +26751,15 @@ "binop": null }, "value": "conf", - "start": 3899, - "end": 3903, + "start": 3917, + "end": 3921, "loc": { "start": { - "line": 131, + "line": 132, "column": 40 }, "end": { - "line": 131, + "line": 132, "column": 44 } } @@ -26455,15 +26776,15 @@ "postfix": false, "binop": null }, - "start": 3903, - "end": 3904, + "start": 3921, + "end": 3922, "loc": { "start": { - "line": 131, + "line": 132, "column": 44 }, "end": { - "line": 131, + "line": 132, "column": 45 } } @@ -26481,15 +26802,15 @@ "binop": null, "updateContext": null }, - "start": 3904, - "end": 3905, + "start": 3922, + "end": 3923, "loc": { "start": { - "line": 131, + "line": 132, "column": 45 }, "end": { - "line": 131, + "line": 132, "column": 46 } } @@ -26506,15 +26827,15 @@ "postfix": false, "binop": null }, - "start": 3912, - "end": 3913, + "start": 3930, + "end": 3931, "loc": { "start": { - "line": 132, + "line": 133, "column": 6 }, "end": { - "line": 132, + "line": 133, "column": 7 } } @@ -26534,15 +26855,15 @@ "updateContext": null }, "value": "else", - "start": 3914, - "end": 3918, + "start": 3932, + "end": 3936, "loc": { "start": { - "line": 132, + "line": 133, "column": 8 }, "end": { - "line": 132, + "line": 133, "column": 12 } } @@ -26559,15 +26880,15 @@ "postfix": false, "binop": null }, - "start": 3919, - "end": 3920, + "start": 3937, + "end": 3938, "loc": { "start": { - "line": 132, + "line": 133, "column": 13 }, "end": { - "line": 132, + "line": 133, "column": 14 } } @@ -26587,15 +26908,15 @@ "updateContext": null }, "value": "return", - "start": 3929, - "end": 3935, + "start": 3947, + "end": 3953, "loc": { "start": { - "line": 133, + "line": 134, "column": 8 }, "end": { - "line": 133, + "line": 134, "column": 14 } } @@ -26613,15 +26934,15 @@ "binop": null }, "value": "await", - "start": 3936, - "end": 3941, + "start": 3954, + "end": 3959, "loc": { "start": { - "line": 133, + "line": 134, "column": 15 }, "end": { - "line": 133, + "line": 134, "column": 20 } } @@ -26639,15 +26960,15 @@ "binop": null }, "value": "_getExternalServiceStatus", - "start": 3942, - "end": 3967, + "start": 3960, + "end": 3985, "loc": { "start": { - "line": 133, + "line": 134, "column": 21 }, "end": { - "line": 133, + "line": 134, "column": 46 } } @@ -26664,15 +26985,15 @@ "postfix": false, "binop": null }, - "start": 3967, - "end": 3968, + "start": 3985, + "end": 3986, "loc": { "start": { - "line": 133, + "line": 134, "column": 46 }, "end": { - "line": 133, + "line": 134, "column": 47 } } @@ -26690,15 +27011,15 @@ "binop": null }, "value": "conf", - "start": 3968, - "end": 3972, + "start": 3986, + "end": 3990, "loc": { "start": { - "line": 133, + "line": 134, "column": 47 }, "end": { - "line": 133, + "line": 134, "column": 51 } } @@ -26715,15 +27036,15 @@ "postfix": false, "binop": null }, - "start": 3972, - "end": 3973, + "start": 3990, + "end": 3991, "loc": { "start": { - "line": 133, + "line": 134, "column": 51 }, "end": { - "line": 133, + "line": 134, "column": 52 } } @@ -26741,15 +27062,15 @@ "binop": null, "updateContext": null }, - "start": 3973, - "end": 3974, + "start": 3991, + "end": 3992, "loc": { "start": { - "line": 133, + "line": 134, "column": 52 }, "end": { - "line": 133, + "line": 134, "column": 53 } } @@ -26766,15 +27087,15 @@ "postfix": false, "binop": null }, - "start": 3981, - "end": 3982, + "start": 3999, + "end": 4000, "loc": { "start": { - "line": 134, + "line": 135, "column": 6 }, "end": { - "line": 134, + "line": 135, "column": 7 } } @@ -26791,15 +27112,15 @@ "postfix": false, "binop": null }, - "start": 3987, - "end": 3988, + "start": 4005, + "end": 4006, "loc": { "start": { - "line": 135, + "line": 136, "column": 4 }, "end": { - "line": 135, + "line": 136, "column": 5 } } @@ -26819,15 +27140,15 @@ "updateContext": null }, "value": "return", - "start": 3994, - "end": 4000, + "start": 4012, + "end": 4018, "loc": { "start": { - "line": 137, + "line": 138, "column": 4 }, "end": { - "line": 137, + "line": 138, "column": 10 } } @@ -26847,15 +27168,15 @@ "updateContext": null }, "value": "false", - "start": 4001, - "end": 4006, + "start": 4019, + "end": 4024, "loc": { "start": { - "line": 137, + "line": 138, "column": 11 }, "end": { - "line": 137, + "line": 138, "column": 16 } } @@ -26873,15 +27194,15 @@ "binop": null, "updateContext": null }, - "start": 4006, - "end": 4007, + "start": 4024, + "end": 4025, "loc": { "start": { - "line": 137, + "line": 138, "column": 16 }, "end": { - "line": 137, + "line": 138, "column": 17 } } @@ -26898,15 +27219,15 @@ "postfix": false, "binop": null }, - "start": 4010, - "end": 4011, + "start": 4028, + "end": 4029, "loc": { "start": { - "line": 138, + "line": 139, "column": 2 }, "end": { - "line": 138, + "line": 139, "column": 3 } } @@ -26914,15 +27235,15 @@ { "type": "CommentBlock", "value": "*\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n ", - "start": 4015, - "end": 4431, + "start": 4033, + "end": 4449, "loc": { "start": { - "line": 140, + "line": 141, "column": 2 }, "end": { - "line": 147, + "line": 148, "column": 5 } } @@ -26940,15 +27261,15 @@ "binop": null }, "value": "async", - "start": 4434, - "end": 4439, + "start": 4452, + "end": 4457, "loc": { "start": { - "line": 148, + "line": 149, "column": 2 }, "end": { - "line": 148, + "line": 149, "column": 7 } } @@ -26966,15 +27287,15 @@ "binop": null }, "value": "getStatus", - "start": 4440, - "end": 4449, + "start": 4458, + "end": 4467, "loc": { "start": { - "line": 148, + "line": 149, "column": 8 }, "end": { - "line": 148, + "line": 149, "column": 17 } } @@ -26991,15 +27312,15 @@ "postfix": false, "binop": null }, - "start": 4449, - "end": 4450, + "start": 4467, + "end": 4468, "loc": { "start": { - "line": 148, + "line": 149, "column": 17 }, "end": { - "line": 148, + "line": 149, "column": 18 } } @@ -27017,15 +27338,15 @@ "binop": null }, "value": "level", - "start": 4450, - "end": 4455, + "start": 4468, + "end": 4473, "loc": { "start": { - "line": 148, + "line": 149, "column": 18 }, "end": { - "line": 148, + "line": 149, "column": 23 } } @@ -27042,15 +27363,15 @@ "postfix": false, "binop": null }, - "start": 4455, - "end": 4456, + "start": 4473, + "end": 4474, "loc": { "start": { - "line": 148, + "line": 149, "column": 23 }, "end": { - "line": 148, + "line": 149, "column": 24 } } @@ -27067,32 +27388,32 @@ "postfix": false, "binop": null }, - "start": 4457, - "end": 4458, + "start": 4475, + "end": 4476, "loc": { "start": { - "line": 148, + "line": 149, "column": 25 }, "end": { - "line": 148, + "line": 149, "column": 26 } } }, { - "type": "CommentBlock", - "value": " eslint-disable id-length ", - "start": 4463, - "end": 4493, + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 4481, + "end": 4526, "loc": { "start": { - "line": 149, + "line": 150, "column": 4 }, "end": { - "line": 149, - "column": 34 + "line": 150, + "column": 49 } } }, @@ -27111,15 +27432,15 @@ "updateContext": null }, "value": "const", - "start": 4498, - "end": 4503, + "start": 4531, + "end": 4536, "loc": { "start": { - "line": 150, + "line": 151, "column": 4 }, "end": { - "line": 150, + "line": 151, "column": 9 } } @@ -27137,15 +27458,15 @@ "binop": null }, "value": "status", - "start": 4504, - "end": 4510, + "start": 4537, + "end": 4543, "loc": { "start": { - "line": 150, + "line": 151, "column": 10 }, "end": { - "line": 150, + "line": 151, "column": 16 } } @@ -27164,15 +27485,15 @@ "updateContext": null }, "value": "=", - "start": 4511, - "end": 4512, + "start": 4544, + "end": 4545, "loc": { "start": { - "line": 150, + "line": 151, "column": 17 }, "end": { - "line": 150, + "line": 151, "column": 18 } } @@ -27189,15 +27510,15 @@ "postfix": false, "binop": null }, - "start": 4513, - "end": 4514, + "start": 4546, + "end": 4547, "loc": { "start": { - "line": 150, + "line": 151, "column": 19 }, "end": { - "line": 150, + "line": 151, "column": 20 } } @@ -27215,15 +27536,15 @@ "binop": null }, "value": "L1", - "start": 4521, - "end": 4523, + "start": 4554, + "end": 4556, "loc": { "start": { - "line": 151, + "line": 152, "column": 6 }, "end": { - "line": 151, + "line": 152, "column": 8 } } @@ -27241,15 +27562,15 @@ "binop": null, "updateContext": null }, - "start": 4523, - "end": 4524, + "start": 4556, + "end": 4557, "loc": { "start": { - "line": 151, + "line": 152, "column": 8 }, "end": { - "line": 151, + "line": 152, "column": 9 } } @@ -27267,15 +27588,15 @@ "binop": null, "updateContext": null }, - "start": 4525, - "end": 4526, + "start": 4558, + "end": 4559, "loc": { "start": { - "line": 151, + "line": 152, "column": 10 }, "end": { - "line": 151, + "line": 152, "column": 11 } } @@ -27292,19 +27613,35 @@ "postfix": false, "binop": null }, - "start": 4526, - "end": 4527, + "start": 4559, + "end": 4560, "loc": { "start": { - "line": 151, + "line": 152, "column": 11 }, "end": { - "line": 151, + "line": 152, "column": 12 } } }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4569, + "end": 4582, + "loc": { + "start": { + "line": 153, + "column": 8 + }, + "end": { + "line": 153, + "column": 21 + } + } + }, { "type": { "label": "name", @@ -27318,15 +27655,15 @@ "binop": null }, "value": "name", - "start": 4536, - "end": 4540, + "start": 4591, + "end": 4595, "loc": { "start": { - "line": 152, + "line": 154, "column": 8 }, "end": { - "line": 152, + "line": 154, "column": 12 } } @@ -27344,15 +27681,15 @@ "binop": null, "updateContext": null }, - "start": 4540, - "end": 4541, + "start": 4595, + "end": 4596, "loc": { "start": { - "line": 152, + "line": 154, "column": 12 }, "end": { - "line": 152, + "line": 154, "column": 13 } } @@ -27371,15 +27708,15 @@ "updateContext": null }, "value": "SERVER", - "start": 4542, - "end": 4550, + "start": 4597, + "end": 4605, "loc": { "start": { - "line": 152, + "line": 154, "column": 14 }, "end": { - "line": 152, + "line": 154, "column": 22 } } @@ -27397,19 +27734,35 @@ "binop": null, "updateContext": null }, - "start": 4550, - "end": 4551, + "start": 4605, + "end": 4606, "loc": { "start": { - "line": 152, + "line": 154, "column": 22 }, "end": { - "line": 152, + "line": 154, "column": 23 } } }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4615, + "end": 4628, + "loc": { + "start": { + "line": 155, + "column": 8 + }, + "end": { + "line": 155, + "column": 21 + } + } + }, { "type": { "label": "name", @@ -27423,15 +27776,15 @@ "binop": null }, "value": "status", - "start": 4560, - "end": 4566, + "start": 4637, + "end": 4643, "loc": { "start": { - "line": 153, + "line": 156, "column": 8 }, "end": { - "line": 153, + "line": 156, "column": 14 } } @@ -27449,15 +27802,15 @@ "binop": null, "updateContext": null }, - "start": 4566, - "end": 4567, + "start": 4643, + "end": 4644, "loc": { "start": { - "line": 153, + "line": 156, "column": 14 }, "end": { - "line": 153, + "line": 156, "column": 15 } } @@ -27476,15 +27829,15 @@ "updateContext": null }, "value": "alive", - "start": 4568, - "end": 4575, + "start": 4645, + "end": 4652, "loc": { "start": { - "line": 153, + "line": 156, "column": 16 }, "end": { - "line": 153, + "line": 156, "column": 23 } } @@ -27501,15 +27854,15 @@ "postfix": false, "binop": null }, - "start": 4582, - "end": 4583, + "start": 4659, + "end": 4660, "loc": { "start": { - "line": 154, + "line": 157, "column": 6 }, "end": { - "line": 154, + "line": 157, "column": 7 } } @@ -27527,15 +27880,15 @@ "binop": null, "updateContext": null }, - "start": 4583, - "end": 4584, + "start": 4660, + "end": 4661, "loc": { "start": { - "line": 154, + "line": 157, "column": 7 }, "end": { - "line": 154, + "line": 157, "column": 8 } } @@ -27552,19 +27905,35 @@ "postfix": false, "binop": null }, - "start": 4585, - "end": 4586, + "start": 4662, + "end": 4663, "loc": { "start": { - "line": 154, + "line": 157, "column": 9 }, "end": { - "line": 154, + "line": 157, "column": 10 } } }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4672, + "end": 4685, + "loc": { + "start": { + "line": 158, + "column": 8 + }, + "end": { + "line": 158, + "column": 21 + } + } + }, { "type": { "label": "name", @@ -27578,15 +27947,15 @@ "binop": null }, "value": "name", - "start": 4595, - "end": 4599, + "start": 4694, + "end": 4698, "loc": { "start": { - "line": 155, + "line": 159, "column": 8 }, "end": { - "line": 155, + "line": 159, "column": 12 } } @@ -27604,15 +27973,15 @@ "binop": null, "updateContext": null }, - "start": 4599, - "end": 4600, + "start": 4698, + "end": 4699, "loc": { "start": { - "line": 155, + "line": 159, "column": 12 }, "end": { - "line": 155, + "line": 159, "column": 13 } } @@ -27631,15 +28000,15 @@ "updateContext": null }, "value": "VERSION", - "start": 4601, - "end": 4610, + "start": 4700, + "end": 4709, "loc": { "start": { - "line": 155, + "line": 159, "column": 14 }, "end": { - "line": 155, + "line": 159, "column": 23 } } @@ -27657,15 +28026,15 @@ "binop": null, "updateContext": null }, - "start": 4610, - "end": 4611, + "start": 4709, + "end": 4710, "loc": { "start": { - "line": 155, + "line": 159, "column": 23 }, "end": { - "line": 155, + "line": 159, "column": 24 } } @@ -27683,15 +28052,15 @@ "binop": null }, "value": "status", - "start": 4620, - "end": 4626, + "start": 4719, + "end": 4725, "loc": { "start": { - "line": 156, + "line": 160, "column": 8 }, "end": { - "line": 156, + "line": 160, "column": 14 } } @@ -27709,15 +28078,15 @@ "binop": null, "updateContext": null }, - "start": 4626, - "end": 4627, + "start": 4725, + "end": 4726, "loc": { "start": { - "line": 156, + "line": 160, "column": 14 }, "end": { - "line": 156, + "line": 160, "column": 15 } } @@ -27735,15 +28104,15 @@ "binop": null }, "value": "pack", - "start": 4628, - "end": 4632, + "start": 4727, + "end": 4731, "loc": { "start": { - "line": 156, + "line": 160, "column": 16 }, "end": { - "line": 156, + "line": 160, "column": 20 } } @@ -27761,15 +28130,15 @@ "binop": null, "updateContext": null }, - "start": 4632, - "end": 4633, + "start": 4731, + "end": 4732, "loc": { "start": { - "line": 156, + "line": 160, "column": 20 }, "end": { - "line": 156, + "line": 160, "column": 21 } } @@ -27787,15 +28156,15 @@ "binop": null }, "value": "version", - "start": 4633, - "end": 4640, + "start": 4732, + "end": 4739, "loc": { "start": { - "line": 156, + "line": 160, "column": 21 }, "end": { - "line": 156, + "line": 160, "column": 28 } } @@ -27812,15 +28181,15 @@ "postfix": false, "binop": null }, - "start": 4647, - "end": 4648, + "start": 4746, + "end": 4747, "loc": { "start": { - "line": 157, + "line": 161, "column": 6 }, "end": { - "line": 157, + "line": 161, "column": 7 } } @@ -27838,15 +28207,15 @@ "binop": null, "updateContext": null }, - "start": 4648, - "end": 4649, + "start": 4747, + "end": 4748, "loc": { "start": { - "line": 157, + "line": 161, "column": 7 }, "end": { - "line": 157, + "line": 161, "column": 8 } } @@ -27863,19 +28232,35 @@ "postfix": false, "binop": null }, - "start": 4650, - "end": 4651, + "start": 4749, + "end": 4750, "loc": { "start": { - "line": 157, + "line": 161, "column": 9 }, "end": { - "line": 157, + "line": 161, "column": 10 } } }, + { + "type": "CommentLine", + "value": " $FlowFixMe", + "start": 4759, + "end": 4772, + "loc": { + "start": { + "line": 162, + "column": 8 + }, + "end": { + "line": 162, + "column": 21 + } + } + }, { "type": { "label": "name", @@ -27889,15 +28274,15 @@ "binop": null }, "value": "name", - "start": 4660, - "end": 4664, + "start": 4781, + "end": 4785, "loc": { "start": { - "line": 158, + "line": 163, "column": 8 }, "end": { - "line": 158, + "line": 163, "column": 12 } } @@ -27915,15 +28300,15 @@ "binop": null, "updateContext": null }, - "start": 4664, - "end": 4665, + "start": 4785, + "end": 4786, "loc": { "start": { - "line": 158, + "line": 163, "column": 12 }, "end": { - "line": 158, + "line": 163, "column": 13 } } @@ -27942,15 +28327,15 @@ "updateContext": null }, "value": "BRANCH", - "start": 4666, - "end": 4674, + "start": 4787, + "end": 4795, "loc": { "start": { - "line": 158, + "line": 163, "column": 14 }, "end": { - "line": 158, + "line": 163, "column": 22 } } @@ -27968,15 +28353,15 @@ "binop": null, "updateContext": null }, - "start": 4674, - "end": 4675, + "start": 4795, + "end": 4796, "loc": { "start": { - "line": 158, + "line": 163, "column": 22 }, "end": { - "line": 158, + "line": 163, "column": 23 } } @@ -27994,15 +28379,15 @@ "binop": null }, "value": "status", - "start": 4684, - "end": 4690, + "start": 4805, + "end": 4811, "loc": { "start": { - "line": 159, + "line": 164, "column": 8 }, "end": { - "line": 159, + "line": 164, "column": 14 } } @@ -28020,15 +28405,15 @@ "binop": null, "updateContext": null }, - "start": 4690, - "end": 4691, + "start": 4811, + "end": 4812, "loc": { "start": { - "line": 159, + "line": 164, "column": 14 }, "end": { - "line": 159, + "line": 164, "column": 15 } } @@ -28046,15 +28431,15 @@ "binop": null }, "value": "getBranch", - "start": 4692, - "end": 4701, + "start": 4813, + "end": 4822, "loc": { "start": { - "line": 159, + "line": 164, "column": 16 }, "end": { - "line": 159, + "line": 164, "column": 25 } } @@ -28071,15 +28456,15 @@ "postfix": false, "binop": null }, - "start": 4701, - "end": 4702, + "start": 4822, + "end": 4823, "loc": { "start": { - "line": 159, + "line": 164, "column": 25 }, "end": { - "line": 159, + "line": 164, "column": 26 } } @@ -28096,15 +28481,15 @@ "postfix": false, "binop": null }, - "start": 4702, - "end": 4703, + "start": 4823, + "end": 4824, "loc": { "start": { - "line": 159, + "line": 164, "column": 26 }, "end": { - "line": 159, + "line": 164, "column": 27 } } @@ -28121,15 +28506,15 @@ "postfix": false, "binop": null }, - "start": 4710, - "end": 4711, + "start": 4831, + "end": 4832, "loc": { "start": { - "line": 160, + "line": 165, "column": 6 }, "end": { - "line": 160, + "line": 165, "column": 7 } } @@ -28147,15 +28532,15 @@ "binop": null, "updateContext": null }, - "start": 4711, - "end": 4712, + "start": 4832, + "end": 4833, "loc": { "start": { - "line": 160, + "line": 165, "column": 7 }, "end": { - "line": 160, + "line": 165, "column": 8 } } @@ -28173,15 +28558,15 @@ "binop": null, "updateContext": null }, - "start": 4712, - "end": 4713, + "start": 4833, + "end": 4834, "loc": { "start": { - "line": 160, + "line": 165, "column": 8 }, "end": { - "line": 160, + "line": 165, "column": 9 } } @@ -28199,15 +28584,15 @@ "binop": null }, "value": "L2", - "start": 4720, - "end": 4722, + "start": 4841, + "end": 4843, "loc": { "start": { - "line": 161, + "line": 166, "column": 6 }, "end": { - "line": 161, + "line": 166, "column": 8 } } @@ -28225,15 +28610,15 @@ "binop": null, "updateContext": null }, - "start": 4722, - "end": 4723, + "start": 4843, + "end": 4844, "loc": { "start": { - "line": 161, + "line": 166, "column": 8 }, "end": { - "line": 161, + "line": 166, "column": 9 } } @@ -28251,15 +28636,15 @@ "binop": null }, "value": "await", - "start": 4724, - "end": 4729, + "start": 4845, + "end": 4850, "loc": { "start": { - "line": 161, + "line": 166, "column": 10 }, "end": { - "line": 161, + "line": 166, "column": 15 } } @@ -28277,15 +28662,15 @@ "binop": null }, "value": "Promise", - "start": 4730, - "end": 4737, + "start": 4851, + "end": 4858, "loc": { "start": { - "line": 161, + "line": 166, "column": 16 }, "end": { - "line": 161, + "line": 166, "column": 23 } } @@ -28303,15 +28688,15 @@ "binop": null, "updateContext": null }, - "start": 4737, - "end": 4738, + "start": 4858, + "end": 4859, "loc": { "start": { - "line": 161, + "line": 166, "column": 23 }, "end": { - "line": 161, + "line": 166, "column": 24 } } @@ -28329,15 +28714,15 @@ "binop": null }, "value": "all", - "start": 4738, - "end": 4741, + "start": 4859, + "end": 4862, "loc": { "start": { - "line": 161, + "line": 166, "column": 24 }, "end": { - "line": 161, + "line": 166, "column": 27 } } @@ -28354,15 +28739,15 @@ "postfix": false, "binop": null }, - "start": 4741, - "end": 4742, + "start": 4862, + "end": 4863, "loc": { "start": { - "line": 161, + "line": 166, "column": 27 }, "end": { - "line": 161, + "line": 166, "column": 28 } } @@ -28380,15 +28765,15 @@ "binop": null }, "value": "_", - "start": 4742, - "end": 4743, + "start": 4863, + "end": 4864, "loc": { "start": { - "line": 161, + "line": 166, "column": 28 }, "end": { - "line": 161, + "line": 166, "column": 29 } } @@ -28406,15 +28791,15 @@ "binop": null, "updateContext": null }, - "start": 4743, - "end": 4744, + "start": 4864, + "end": 4865, "loc": { "start": { - "line": 161, + "line": 166, "column": 29 }, "end": { - "line": 161, + "line": 166, "column": 30 } } @@ -28432,15 +28817,15 @@ "binop": null }, "value": "map", - "start": 4744, - "end": 4747, + "start": 4865, + "end": 4868, "loc": { "start": { - "line": 161, + "line": 166, "column": 30 }, "end": { - "line": 161, + "line": 166, "column": 33 } } @@ -28457,15 +28842,15 @@ "postfix": false, "binop": null }, - "start": 4747, - "end": 4748, + "start": 4868, + "end": 4869, "loc": { "start": { - "line": 161, + "line": 166, "column": 33 }, "end": { - "line": 161, + "line": 166, "column": 34 } } @@ -28485,15 +28870,15 @@ "updateContext": null }, "value": "this", - "start": 4748, - "end": 4752, + "start": 4869, + "end": 4873, "loc": { "start": { - "line": 161, + "line": 166, "column": 34 }, "end": { - "line": 161, + "line": 166, "column": 38 } } @@ -28511,15 +28896,15 @@ "binop": null, "updateContext": null }, - "start": 4752, - "end": 4753, + "start": 4873, + "end": 4874, "loc": { "start": { - "line": 161, + "line": 166, "column": 38 }, "end": { - "line": 161, + "line": 166, "column": 39 } } @@ -28537,15 +28922,15 @@ "binop": null }, "value": "dbMap", - "start": 4753, - "end": 4758, + "start": 4874, + "end": 4879, "loc": { "start": { - "line": 161, + "line": 166, "column": 39 }, "end": { - "line": 161, + "line": 166, "column": 44 } } @@ -28563,15 +28948,15 @@ "binop": null, "updateContext": null }, - "start": 4758, - "end": 4759, + "start": 4879, + "end": 4880, "loc": { "start": { - "line": 161, + "line": 166, "column": 44 }, "end": { - "line": 161, + "line": 166, "column": 45 } } @@ -28589,15 +28974,15 @@ "binop": null }, "value": "_getDatabaseStatus", - "start": 4760, - "end": 4778, + "start": 4881, + "end": 4899, "loc": { "start": { - "line": 161, + "line": 166, "column": 46 }, "end": { - "line": 161, + "line": 166, "column": 64 } } @@ -28614,15 +28999,15 @@ "postfix": false, "binop": null }, - "start": 4778, - "end": 4779, + "start": 4899, + "end": 4900, "loc": { "start": { - "line": 161, + "line": 166, "column": 64 }, "end": { - "line": 161, + "line": 166, "column": 65 } } @@ -28639,15 +29024,15 @@ "postfix": false, "binop": null }, - "start": 4779, - "end": 4780, + "start": 4900, + "end": 4901, "loc": { "start": { - "line": 161, + "line": 166, "column": 65 }, "end": { - "line": 161, + "line": 166, "column": 66 } } @@ -28665,15 +29050,15 @@ "binop": null, "updateContext": null }, - "start": 4780, - "end": 4781, + "start": 4901, + "end": 4902, "loc": { "start": { - "line": 161, + "line": 166, "column": 66 }, "end": { - "line": 161, + "line": 166, "column": 67 } } @@ -28691,15 +29076,15 @@ "binop": null }, "value": "L3", - "start": 4788, - "end": 4790, + "start": 4909, + "end": 4911, "loc": { "start": { - "line": 162, + "line": 167, "column": 6 }, "end": { - "line": 162, + "line": 167, "column": 8 } } @@ -28717,15 +29102,15 @@ "binop": null, "updateContext": null }, - "start": 4790, - "end": 4791, + "start": 4911, + "end": 4912, "loc": { "start": { - "line": 162, + "line": 167, "column": 8 }, "end": { - "line": 162, + "line": 167, "column": 9 } } @@ -28743,15 +29128,15 @@ "binop": null }, "value": "await", - "start": 4792, - "end": 4797, + "start": 4913, + "end": 4918, "loc": { "start": { - "line": 162, + "line": 167, "column": 10 }, "end": { - "line": 162, + "line": 167, "column": 15 } } @@ -28769,15 +29154,15 @@ "binop": null }, "value": "Promise", - "start": 4798, - "end": 4805, + "start": 4919, + "end": 4926, "loc": { "start": { - "line": 162, + "line": 167, "column": 16 }, "end": { - "line": 162, + "line": 167, "column": 23 } } @@ -28795,15 +29180,15 @@ "binop": null, "updateContext": null }, - "start": 4805, - "end": 4806, + "start": 4926, + "end": 4927, "loc": { "start": { - "line": 162, + "line": 167, "column": 23 }, "end": { - "line": 162, + "line": 167, "column": 24 } } @@ -28821,15 +29206,15 @@ "binop": null }, "value": "all", - "start": 4806, - "end": 4809, + "start": 4927, + "end": 4930, "loc": { "start": { - "line": 162, + "line": 167, "column": 24 }, "end": { - "line": 162, + "line": 167, "column": 27 } } @@ -28846,15 +29231,15 @@ "postfix": false, "binop": null }, - "start": 4809, - "end": 4810, + "start": 4930, + "end": 4931, "loc": { "start": { - "line": 162, + "line": 167, "column": 27 }, "end": { - "line": 162, + "line": 167, "column": 28 } } @@ -28872,15 +29257,15 @@ "binop": null }, "value": "_", - "start": 4810, - "end": 4811, + "start": 4931, + "end": 4932, "loc": { "start": { - "line": 162, + "line": 167, "column": 28 }, "end": { - "line": 162, + "line": 167, "column": 29 } } @@ -28898,15 +29283,15 @@ "binop": null, "updateContext": null }, - "start": 4811, - "end": 4812, + "start": 4932, + "end": 4933, "loc": { "start": { - "line": 162, + "line": 167, "column": 29 }, "end": { - "line": 162, + "line": 167, "column": 30 } } @@ -28924,15 +29309,15 @@ "binop": null }, "value": "map", - "start": 4812, - "end": 4815, + "start": 4933, + "end": 4936, "loc": { "start": { - "line": 162, + "line": 167, "column": 30 }, "end": { - "line": 162, + "line": 167, "column": 33 } } @@ -28949,15 +29334,15 @@ "postfix": false, "binop": null }, - "start": 4815, - "end": 4816, + "start": 4936, + "end": 4937, "loc": { "start": { - "line": 162, + "line": 167, "column": 33 }, "end": { - "line": 162, + "line": 167, "column": 34 } } @@ -28977,15 +29362,15 @@ "updateContext": null }, "value": "this", - "start": 4816, - "end": 4820, + "start": 4937, + "end": 4941, "loc": { "start": { - "line": 162, + "line": 167, "column": 34 }, "end": { - "line": 162, + "line": 167, "column": 38 } } @@ -29003,15 +29388,15 @@ "binop": null, "updateContext": null }, - "start": 4820, - "end": 4821, + "start": 4941, + "end": 4942, "loc": { "start": { - "line": 162, + "line": 167, "column": 38 }, "end": { - "line": 162, + "line": 167, "column": 39 } } @@ -29029,15 +29414,15 @@ "binop": null }, "value": "serviceMap", - "start": 4821, - "end": 4831, + "start": 4942, + "end": 4952, "loc": { "start": { - "line": 162, + "line": 167, "column": 39 }, "end": { - "line": 162, + "line": 167, "column": 49 } } @@ -29055,15 +29440,15 @@ "binop": null, "updateContext": null }, - "start": 4831, - "end": 4832, + "start": 4952, + "end": 4953, "loc": { "start": { - "line": 162, + "line": 167, "column": 49 }, "end": { - "line": 162, + "line": 167, "column": 50 } } @@ -29081,15 +29466,15 @@ "binop": null }, "value": "_getExternalServiceStatus", - "start": 4833, - "end": 4858, + "start": 4954, + "end": 4979, "loc": { "start": { - "line": 162, + "line": 167, "column": 51 }, "end": { - "line": 162, + "line": 167, "column": 76 } } @@ -29106,15 +29491,15 @@ "postfix": false, "binop": null }, - "start": 4858, - "end": 4859, + "start": 4979, + "end": 4980, "loc": { "start": { - "line": 162, + "line": 167, "column": 76 }, "end": { - "line": 162, + "line": 167, "column": 77 } } @@ -29131,15 +29516,15 @@ "postfix": false, "binop": null }, - "start": 4859, - "end": 4860, + "start": 4980, + "end": 4981, "loc": { "start": { - "line": 162, + "line": 167, "column": 77 }, "end": { - "line": 162, + "line": 167, "column": 78 } } @@ -29156,15 +29541,15 @@ "postfix": false, "binop": null }, - "start": 4865, - "end": 4866, + "start": 4986, + "end": 4987, "loc": { "start": { - "line": 163, + "line": 168, "column": 4 }, "end": { - "line": 163, + "line": 168, "column": 5 } } @@ -29182,15 +29567,15 @@ "binop": null, "updateContext": null }, - "start": 4866, - "end": 4867, + "start": 4987, + "end": 4988, "loc": { "start": { - "line": 163, + "line": 168, "column": 5 }, "end": { - "line": 163, + "line": 168, "column": 6 } } @@ -29198,15 +29583,15 @@ { "type": "CommentBlock", "value": " eslint-enable id-length ", - "start": 4872, - "end": 4901, + "start": 4993, + "end": 5022, "loc": { "start": { - "line": 164, + "line": 169, "column": 4 }, "end": { - "line": 164, + "line": 169, "column": 33 } } @@ -29226,15 +29611,15 @@ "updateContext": null }, "value": "return", - "start": 4907, - "end": 4913, + "start": 5028, + "end": 5034, "loc": { "start": { - "line": 166, + "line": 171, "column": 4 }, "end": { - "line": 166, + "line": 171, "column": 10 } } @@ -29252,15 +29637,15 @@ "binop": null }, "value": "level", - "start": 4914, - "end": 4919, + "start": 5035, + "end": 5040, "loc": { "start": { - "line": 166, + "line": 171, "column": 11 }, "end": { - "line": 166, + "line": 171, "column": 16 } } @@ -29279,15 +29664,15 @@ "updateContext": null }, "value": "===", - "start": 4920, - "end": 4923, + "start": 5041, + "end": 5044, "loc": { "start": { - "line": 166, + "line": 171, "column": 17 }, "end": { - "line": 166, + "line": 171, "column": 20 } } @@ -29305,15 +29690,15 @@ "binop": null }, "value": "undefined", - "start": 4924, - "end": 4933, + "start": 5045, + "end": 5054, "loc": { "start": { - "line": 166, + "line": 171, "column": 21 }, "end": { - "line": 166, + "line": 171, "column": 30 } } @@ -29331,15 +29716,15 @@ "binop": null, "updateContext": null }, - "start": 4934, - "end": 4935, + "start": 5055, + "end": 5056, "loc": { "start": { - "line": 166, + "line": 171, "column": 31 }, "end": { - "line": 166, + "line": 171, "column": 32 } } @@ -29357,15 +29742,15 @@ "binop": null }, "value": "status", - "start": 4936, - "end": 4942, + "start": 5057, + "end": 5063, "loc": { "start": { - "line": 166, + "line": 171, "column": 33 }, "end": { - "line": 166, + "line": 171, "column": 39 } } @@ -29383,15 +29768,15 @@ "binop": null, "updateContext": null }, - "start": 4943, - "end": 4944, + "start": 5064, + "end": 5065, "loc": { "start": { - "line": 166, + "line": 171, "column": 40 }, "end": { - "line": 166, + "line": 171, "column": 41 } } @@ -29409,15 +29794,15 @@ "binop": null }, "value": "status", - "start": 4945, - "end": 4951, + "start": 5066, + "end": 5072, "loc": { "start": { - "line": 166, + "line": 171, "column": 42 }, "end": { - "line": 166, + "line": 171, "column": 48 } } @@ -29435,15 +29820,15 @@ "binop": null, "updateContext": null }, - "start": 4951, - "end": 4952, + "start": 5072, + "end": 5073, "loc": { "start": { - "line": 166, + "line": 171, "column": 48 }, "end": { - "line": 166, + "line": 171, "column": 49 } } @@ -29461,15 +29846,15 @@ "binop": null }, "value": "level", - "start": 4952, - "end": 4957, + "start": 5073, + "end": 5078, "loc": { "start": { - "line": 166, + "line": 171, "column": 49 }, "end": { - "line": 166, + "line": 171, "column": 54 } } @@ -29487,15 +29872,15 @@ "binop": null, "updateContext": null }, - "start": 4957, - "end": 4958, + "start": 5078, + "end": 5079, "loc": { "start": { - "line": 166, + "line": 171, "column": 54 }, "end": { - "line": 166, + "line": 171, "column": 55 } } @@ -29513,19 +29898,35 @@ "binop": null, "updateContext": null }, - "start": 4958, - "end": 4959, + "start": 5079, + "end": 5080, "loc": { "start": { - "line": 166, + "line": 171, "column": 55 }, "end": { - "line": 166, + "line": 171, "column": 56 } } }, + { + "type": "CommentLine", + "value": " eslint-disable-line flowtype/no-weak-types", + "start": 5081, + "end": 5126, + "loc": { + "start": { + "line": 171, + "column": 57 + }, + "end": { + "line": 171, + "column": 102 + } + } + }, { "type": { "label": "}", @@ -29538,15 +29939,15 @@ "postfix": false, "binop": null }, - "start": 4962, - "end": 4963, + "start": 5129, + "end": 5130, "loc": { "start": { - "line": 167, + "line": 172, "column": 2 }, "end": { - "line": 167, + "line": 172, "column": 3 } } @@ -29563,15 +29964,15 @@ "postfix": false, "binop": null }, - "start": 4964, - "end": 4965, + "start": 5131, + "end": 5132, "loc": { "start": { - "line": 168, + "line": 173, "column": 0 }, "end": { - "line": 168, + "line": 173, "column": 1 } } @@ -29579,15 +29980,15 @@ { "type": "CommentBlock", "value": "*\n * Exported Helperto interact with Healcheck Operations\n * @type {Healthcheck}\n ", - "start": 4967, - "end": 5053, + "start": 5134, + "end": 5220, "loc": { "start": { - "line": 170, + "line": 175, "column": 0 }, "end": { - "line": 173, + "line": 178, "column": 3 } } @@ -29607,15 +30008,15 @@ "updateContext": null }, "value": "const", - "start": 5054, - "end": 5059, + "start": 5221, + "end": 5226, "loc": { "start": { - "line": 174, + "line": 179, "column": 0 }, "end": { - "line": 174, + "line": 179, "column": 5 } } @@ -29633,15 +30034,15 @@ "binop": null }, "value": "healthcheckHelper", - "start": 5060, - "end": 5077, + "start": 5227, + "end": 5244, "loc": { "start": { - "line": 174, + "line": 179, "column": 6 }, "end": { - "line": 174, + "line": 179, "column": 23 } } @@ -29660,15 +30061,15 @@ "updateContext": null }, "value": "=", - "start": 5078, - "end": 5079, + "start": 5245, + "end": 5246, "loc": { "start": { - "line": 174, + "line": 179, "column": 24 }, "end": { - "line": 174, + "line": 179, "column": 25 } } @@ -29688,15 +30089,15 @@ "updateContext": null }, "value": "new", - "start": 5080, - "end": 5083, + "start": 5247, + "end": 5250, "loc": { "start": { - "line": 174, + "line": 179, "column": 26 }, "end": { - "line": 174, + "line": 179, "column": 29 } } @@ -29714,15 +30115,15 @@ "binop": null }, "value": "HealthcheckHelper", - "start": 5084, - "end": 5101, + "start": 5251, + "end": 5268, "loc": { "start": { - "line": 174, + "line": 179, "column": 30 }, "end": { - "line": 174, + "line": 179, "column": 47 } } @@ -29739,15 +30140,15 @@ "postfix": false, "binop": null }, - "start": 5101, - "end": 5102, + "start": 5268, + "end": 5269, "loc": { "start": { - "line": 174, + "line": 179, "column": 47 }, "end": { - "line": 174, + "line": 179, "column": 48 } } @@ -29764,15 +30165,15 @@ "postfix": false, "binop": null }, - "start": 5102, - "end": 5103, + "start": 5269, + "end": 5270, "loc": { "start": { - "line": 174, + "line": 179, "column": 48 }, "end": { - "line": 174, + "line": 179, "column": 49 } } @@ -29790,15 +30191,15 @@ "binop": null, "updateContext": null }, - "start": 5103, - "end": 5104, + "start": 5270, + "end": 5271, "loc": { "start": { - "line": 174, + "line": 179, "column": 49 }, "end": { - "line": 174, + "line": 179, "column": 50 } } @@ -29818,15 +30219,15 @@ "updateContext": null }, "value": "export", - "start": 5105, - "end": 5111, + "start": 5272, + "end": 5278, "loc": { "start": { - "line": 175, + "line": 180, "column": 0 }, "end": { - "line": 175, + "line": 180, "column": 6 } } @@ -29846,15 +30247,15 @@ "updateContext": null }, "value": "default", - "start": 5112, - "end": 5119, + "start": 5279, + "end": 5286, "loc": { "start": { - "line": 175, + "line": 180, "column": 7 }, "end": { - "line": 175, + "line": 180, "column": 14 } } @@ -29872,15 +30273,15 @@ "binop": null }, "value": "healthcheckHelper", - "start": 5120, - "end": 5137, + "start": 5287, + "end": 5304, "loc": { "start": { - "line": 175, + "line": 180, "column": 15 }, "end": { - "line": 175, + "line": 180, "column": 32 } } @@ -29898,15 +30299,15 @@ "binop": null, "updateContext": null }, - "start": 5137, - "end": 5138, + "start": 5304, + "end": 5305, "loc": { "start": { - "line": 175, + "line": 180, "column": 32 }, "end": { - "line": 175, + "line": 180, "column": 33 } } @@ -29924,15 +30325,15 @@ "binop": null, "updateContext": null }, - "start": 5138, - "end": 5138, + "start": 5305, + "end": 5305, "loc": { "start": { - "line": 175, + "line": 180, "column": 33 }, "end": { - "line": 175, + "line": 180, "column": 33 } } diff --git a/docs/class/src/base/request/request-error.model.js~RequestError.html b/docs/class/src/base/request/request-error.model.js~RequestError.html new file mode 100644 index 0000000..8d1cbc6 --- /dev/null +++ b/docs/class/src/base/request/request-error.model.js~RequestError.html @@ -0,0 +1,306 @@ + + + + + + RequestError | HapiServer + + + + + + + + +
+ Home + Manual + Reference + Source + Test + API + Healthcheck + + +
+ + + +
+ + public + class + + + + | source +
+ +
+

RequestError

+ + + + + +

Extends:

Error → RequestError
+ + + + + + + + + +

Request Error Class to help set a response code and message to display to the user

+
+ + + + + + + + + +
+ + + +

Constructor Summary

+ + + + + + + + + +
Public Constructor
+ public + + + + + +
+

+ + + + constructor(msg: string, code: number) +

+
+
+ + +

Create a new Request Error

+
+
+
+ + +
+
+

Member Summary

+ + + + + + + + + +
Public Members
+ public + + + + + +
+

+ + + + code: * +

+
+
+ + + +
+
+ + +
+
+ + + + + + +

Public Constructors

+ +
+

+ public + + + + + + constructor(msg: string, code: number) + + + + source + +

+ + + + +

Create a new Request Error

+
+ + + +
+

Params:

+ + + + + + + + + + + + + + + + + + + +
NameTypeAttributeDescription
msgstring

message to display when returned

+
codenumber

response status code to set in Hapi Response

+
+
+
+ + + + + + + + + + + + + + + + + +
+
+

Public Members

+ +
+

+ public + + + + + + code: * + + + + source + +

+ + + + + + + + +
+
+ + + + + + + + + + + + + + + + + +
+
+ +
+ + + + + + + + + + + + + diff --git a/docs/class/src/base/server.js~Server.html b/docs/class/src/base/server.js~Server.html index 0fa0fcd..e9a11c6 100644 --- a/docs/class/src/base/server.js~Server.html +++ b/docs/class/src/base/server.js~Server.html @@ -37,8 +37,8 @@
  • Fmain
  • -
  • baseCRequestError
  • -
  • CServer
  • +
  • baseCServer
  • +
  • base/requestCRequestError
  • controllersCHelloWorld
  • CNoteController
  • dataservicesCNoteDataservice
  • @@ -52,13 +52,13 @@
    -
    import {Server} from 'HapiServer/src/base/server.js'
    +
    import {Server} from 'HapiServer/src/base/server.js'
    public class - | source + | source
    @@ -392,7 +392,7 @@

    - source + source

    @@ -439,7 +439,7 @@

    - source + source

    @@ -482,7 +482,7 @@

    - source + source

    @@ -525,7 +525,7 @@

    - source + source

    @@ -571,7 +571,7 @@

    - source + source

    @@ -644,7 +644,7 @@

    - source + source

    @@ -717,7 +717,7 @@

    - source + source

    @@ -797,7 +797,7 @@

    - source + source

    @@ -854,7 +854,7 @@

    - source + source

    diff --git a/docs/class/src/controllers/hello.controller.js~HelloWorld.html b/docs/class/src/controllers/hello.controller.js~HelloWorld.html index 49942a9..5d884cf 100644 --- a/docs/class/src/controllers/hello.controller.js~HelloWorld.html +++ b/docs/class/src/controllers/hello.controller.js~HelloWorld.html @@ -37,8 +37,8 @@
    • Fmain
    • -
    • baseCRequestError
    • -
    • CServer
    • +
    • baseCServer
    • +
    • base/requestCRequestError
    • controllersCHelloWorld
    • CNoteController
    • dataservicesCNoteDataservice
    • @@ -52,13 +52,13 @@
      - + public class - | source + | source
      @@ -185,7 +185,7 @@

      - source + source

      @@ -248,7 +248,7 @@

      - source + source

      diff --git a/docs/class/src/controllers/note.controller.js~NoteController.html b/docs/class/src/controllers/note.controller.js~NoteController.html index 8b839e8..6137903 100644 --- a/docs/class/src/controllers/note.controller.js~NoteController.html +++ b/docs/class/src/controllers/note.controller.js~NoteController.html @@ -37,8 +37,8 @@
      @@ -281,7 +281,7 @@

      - source + source

      @@ -329,7 +329,7 @@

      - source + source

      @@ -372,7 +372,7 @@

      - source + source

      @@ -418,7 +418,7 @@

      - source + source

      @@ -495,7 +495,7 @@

      - source + source

      diff --git a/docs/class/src/helpers/mariadb.helper.js~MariaDBHelper.html b/docs/class/src/helpers/mariadb.helper.js~MariaDBHelper.html index 2eb5360..5ddf2bc 100644 --- a/docs/class/src/helpers/mariadb.helper.js~MariaDBHelper.html +++ b/docs/class/src/helpers/mariadb.helper.js~MariaDBHelper.html @@ -37,8 +37,8 @@
      • Fmain
      • -
      • baseCRequestError
      • -
      • CServer
      • +
      • baseCServer
      • +
      • base/requestCRequestError
      • controllersCHelloWorld
      • CNoteController
      • dataservicesCNoteDataservice
      • diff --git a/docs/coverage.json b/docs/coverage.json index d3851a0..2cad097 100644 --- a/docs/coverage.json +++ b/docs/coverage.json @@ -3,16 +3,22 @@ "expectCount": 56, "actualCount": 45, "files": { + "src/base/request/request-error.model.js": { + "expectCount": 3, + "actualCount": 2, + "undocumentLines": [ + 16 + ] + }, "src/base/server.js": { - "expectCount": 15, - "actualCount": 9, + "expectCount": 12, + "actualCount": 7, "undocumentLines": [ - 14, - 15, - 45, - 69, - 70, - 71 + 18, + 19, + 42, + 43, + 44 ] }, "src/controllers/admin.controller.js": { @@ -39,7 +45,7 @@ "expectCount": 4, "actualCount": 3, "undocumentLines": [ - 26 + 27 ] }, "src/helpers/config.helper.js": { @@ -51,9 +57,9 @@ "expectCount": 10, "actualCount": 7, "undocumentLines": [ - 104, 105, - 175 + 106, + 180 ] }, "src/helpers/mariadb.helper.js": { diff --git a/docs/file/src/base/request/hapi-request.interface.js.html b/docs/file/src/base/request/hapi-request.interface.js.html new file mode 100644 index 0000000..71f1e26 --- /dev/null +++ b/docs/file/src/base/request/hapi-request.interface.js.html @@ -0,0 +1,102 @@ + + + + + + src/base/request/hapi-request.interface.js | HapiServer + + + + + + + + +
        + Home + Manual + Reference + Source + Test + API + Healthcheck + + +
        + + + +

        src/base/request/hapi-request.interface.js

        +
        /**
        + * @flow
        + */
        +/* eslint-disable flowtype/no-weak-types */
        +
        +/**
        +* Request Object that is passed to the controller function as the first parameter
        +* from https://github.com/hapijs/hapi/blob/master/API.md#request
        +* @type {HapiRequest}
        +*/
        +export interface HapiRequest {
        +  server: any;
        +  headers: any;
        +  // from path
        +  params: any;
        +  // Body of a POST request
        +  payload: any;
        +  logger: any;
        +};
        +
        +
        +/**
        + * Hapi Handler for returning messages or setting error codes during requests
        + * @type {HapiHandler}
        + */
        +export interface HapiHandler {
        +  code: Function;
        +  response: Function;
        +  redirect: Function;
        +}
        +
        + +
        + + + + + + + + + + + + + diff --git a/docs/file/src/base/request/request-error.model.js.html b/docs/file/src/base/request/request-error.model.js.html new file mode 100644 index 0000000..d04e80c --- /dev/null +++ b/docs/file/src/base/request/request-error.model.js.html @@ -0,0 +1,93 @@ + + + + + + src/base/request/request-error.model.js | HapiServer + + + + + + + + +
        + Home + Manual + Reference + Source + Test + API + Healthcheck + + +
        + + + +

        src/base/request/request-error.model.js

        +
        /**
        + * @flow
        + */
        +
        +/**
        + * Request Error Class to help set a response code and message to display to the user
        + * @type {RequestError}
        + */
        +export default class RequestError extends Error {
        +  code: number;
        +
        +  /**
        +   * Create a new Request Error
        +   * @param {string} msg  message to display when returned
        +   * @param {number} code response status code to set in Hapi Response
        +   */
        +  constructor(msg: string, code: number) {
        +    super(msg);
        +    this.code = code;
        +  }
        +}
        +
        + +
        + + + + + + + + + + + + + diff --git a/docs/file/src/base/server.js.html b/docs/file/src/base/server.js.html index 07046d1..b8e7b0f 100644 --- a/docs/file/src/base/server.js.html +++ b/docs/file/src/base/server.js.html @@ -37,8 +37,8 @@
        • Fmain
        • -
        • baseCRequestError
        • -
        • CServer
        • +
        • baseCServer
        • +
        • base/requestCRequestError
        • controllersCHelloWorld
        • CNoteController
        • dataservicesCNoteDataservice
        • @@ -55,13 +55,17 @@
          /**
            * @flow
            */
          +
           /* eslint-disable import/first */
          +/* eslint-disable import/prefer-default-export */
          +/* eslint-disable flowtype/no-weak-types */
          +
           require('source-map-support/register');
           require('@babel/register');
           require('@babel/polyfill');
           
           import fs from 'fs';
          -import path from 'path';
          +import Path from 'path';
           import pino from 'pino';
           import Pino from 'hapi-pino';
           import Hapi from '@hapi/hapi';
          @@ -82,53 +86,9 @@
           export interface EndpointConfig {
             method: string;
             path: string;
          -  controller: any; // eslint-disable-line
          -}
          -
          -/**
          - * Hapi Handler for returning messages or setting error codes during requests
          - * @type {HapiHandler}
          - */
          -export interface HapiHandler {
          -  code: Function; // eslint-disable-line
          -  response: Function; // eslint-disable-line
          -  redirect: Function; //eslint-disable-line
          -}
          -
          -/**
          - * Request Error Class to help set a response code and message to display to the user
          - * @type {RequestError}
          - */
          -export class RequestError extends Error {
          -  code: number;
          -
          -  /**
          -   * Create a new Request Error
          -   * @param {string} msg  message to display when returned
          -   * @param {number} code response status code to set in Hapi Response
          -   */
          -  constructor(msg: string, code: number) {
          -    super(msg);
          -    this.code = code;
          -  }
          +  controller: any;
           }
           
          -/**
          - * Request Object that is passed to the controller function as the first parameter
          - * from https://github.com/hapijs/hapi/blob/master/API.md#request
          - * @type {HapiRequest}
          - */
          -export interface HapiRequest {
          -  server: any; // eslint-disable-line
          -  headers: any; // eslint-disable-line
          -  // from path
          -  params: any; // eslint-disable-line
          -  // Body of a POST request
          -  payload: any; // eslint-disable-line
          -  logger: any; // eslint-disable-line
          -};
          -
          -
           export interface ServerParams {
             name: string;
             port: number;
          @@ -144,7 +104,7 @@
            * @type {Server}
            */
           export class Server {
          -  server: any; // eslint-disable-line
          +  server: any;
             name: string;
             logDir: string;
           
          @@ -167,7 +127,7 @@
              * @param  {Function} callback callback to run after server has shutdown
              * @return {undefined}            no return
              */
          -  shutdown(callback: Function) { // eslint-disable-line flowtype/no-weak-types
          +  shutdown(callback: Function) {
               // TODO: Set Shutdown Timeout from config
               this.server.stop({ timeout: 10000 }).then((err: Error) => {
                 if (err) {
          @@ -206,7 +166,7 @@
                     'request-error'
                   ],
                   // Creates a log of all the requests made and info as well as response status error/success
          -        stream: pino.destination(path.resolve(this.logDir, 'pino.log'))
          +        stream: pino.destination(Path.resolve(this.logDir, 'pino.log'))
                 }
               });
           
          @@ -230,7 +190,7 @@
              * @param {EndpointConfig} endpoint configuration
              * @return {undefined}
              */
          -  addEndpoint({ method, path, controller }: EndpointConfig) { // eslint-disable-line no-shadow
          +  addEndpoint({ method, path, controller }: EndpointConfig) {
               this.server.route({
                 method,
                 path,
          diff --git a/docs/file/src/controllers/admin.controller.js.html b/docs/file/src/controllers/admin.controller.js.html
          index 4e10179..548882c 100644
          --- a/docs/file/src/controllers/admin.controller.js.html
          +++ b/docs/file/src/controllers/admin.controller.js.html
          @@ -37,8 +37,8 @@
             
          • Fmain
          • -
          • baseCRequestError
          • -
          • CServer
          • +
          • baseCServer
          • +
          • base/requestCRequestError
          • controllersCHelloWorld
          • CNoteController
          • dataservicesCNoteDataservice
          • @@ -57,7 +57,7 @@ * * NOTE: This file will not be included in the esdoc list because it doesn't export any identifiers */ -import { HapiRequest } from '../base/server.js'; +import { HapiRequest } from '../base/request/hapi-request.interface.js'; import CONFIG from '../helpers/config.helper.js'; import healthcheckHelper from '../helpers/healthcheck.helper.js'; diff --git a/docs/file/src/controllers/hello.controller.js.html b/docs/file/src/controllers/hello.controller.js.html index bcd8ce5..c77b761 100644 --- a/docs/file/src/controllers/hello.controller.js.html +++ b/docs/file/src/controllers/hello.controller.js.html @@ -37,8 +37,8 @@
            • Fmain
            • -
            • baseCRequestError
            • -
            • CServer
            • +
            • baseCServer
            • +
            • base/requestCRequestError
            • controllersCHelloWorld
            • CNoteController
            • dataservicesCNoteDataservice
            • @@ -55,8 +55,7 @@
              /**
                * @flow
                */
              -// For some reason this can't use the `app` alias but can do relative pathing here... :/
              -import { HapiRequest } from '../base/server.js';
              +import { HapiRequest } from '../base/request/hapi-request.interface.js';
               
               /**
                * Controllers for Basic "Hello World" Functions
              diff --git a/docs/file/src/controllers/note.controller.js.html b/docs/file/src/controllers/note.controller.js.html
              index e2a8ab2..58ca016 100644
              --- a/docs/file/src/controllers/note.controller.js.html
              +++ b/docs/file/src/controllers/note.controller.js.html
              @@ -37,8 +37,8 @@
                 
              • Fmain
              • -
              • baseCRequestError
              • -
              • CServer
              • +
              • baseCServer
              • +
              • base/requestCRequestError
              • controllersCHelloWorld
              • CNoteController
              • dataservicesCNoteDataservice
              • @@ -55,7 +55,7 @@
                /**
                  * @flow
                  */
                -import { HapiRequest, HapiHandler } from '../base/server.js';
                +import { HapiRequest, HapiHandler } from '../base/request/hapi-request.interface.js';
                 import NoteDataservice, { Note } from '../dataservices/note.service.js';
                 
                 /**
                diff --git a/docs/file/src/dataservices/note.service.js.html b/docs/file/src/dataservices/note.service.js.html
                index dab2b6d..97288c8 100644
                --- a/docs/file/src/dataservices/note.service.js.html
                +++ b/docs/file/src/dataservices/note.service.js.html
                @@ -37,8 +37,8 @@
                   
                • Fmain
                • -
                • baseCRequestError
                • -
                • CServer
                • +
                • baseCServer
                • +
                • base/requestCRequestError
                • controllersCHelloWorld
                • CNoteController
                • dataservicesCNoteDataservice
                • @@ -58,7 +58,7 @@ * MariaDB Service Example */ import mariadbHelper, { MariaDBInsertResponse } from '../helpers/mariadb.helper.js'; // eslint-disable-line -import { RequestError } from '../base/server.js'; +import RequestError from '../base/request/request-error.model.js'; import _ from 'lodash'; /** diff --git a/docs/file/src/entry.js.html b/docs/file/src/entry.js.html index acaf87d..6988f4b 100644 --- a/docs/file/src/entry.js.html +++ b/docs/file/src/entry.js.html @@ -37,8 +37,8 @@
                  • Fmain
                  • -
                  • baseCRequestError
                  • -
                  • CServer
                  • +
                  • baseCServer
                  • +
                  • base/requestCRequestError
                  • controllersCHelloWorld
                  • CNoteController
                  • dataservicesCNoteDataservice
                  • @@ -58,7 +58,8 @@ * Entry point that loads all routes for the server */ import path from 'path'; -import { Server, EndpointConfig, HapiRequest, HapiHandler } from './base/server.js'; +import { Server, EndpointConfig } from './base/server.js'; +import { HapiRequest, HapiHandler } from './base/request/hapi-request.interface.js'; import mariadb from './helpers/mariadb.helper.js'; import CONFIG from './helpers/config.helper.js'; diff --git a/docs/file/src/helpers/config.helper.js.html b/docs/file/src/helpers/config.helper.js.html index 2c474bd..df60036 100644 --- a/docs/file/src/helpers/config.helper.js.html +++ b/docs/file/src/helpers/config.helper.js.html @@ -37,8 +37,8 @@
      +
      +

      base/request

      +
      + + + + @@ -430,6 +440,7 @@

      helpers

      Directories
      diff --git a/docs/image/dependency.png b/docs/image/dependency.png index c318408..f95c79c 100644 Binary files a/docs/image/dependency.png and b/docs/image/dependency.png differ diff --git a/docs/index.html b/docs/index.html index fc67de3..c2308f9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -37,8 +37,8 @@
      • Fmain
      • -
      • baseCRequestError
      • -
      • CServer
      • +
      • baseCServer
      • +
      • base/requestCRequestError
      • controllersCHelloWorld
      • CNoteController
      • dataservicesCNoteDataservice
      • diff --git a/docs/index.json b/docs/index.json index b80ea18..bc8f3f2 100644 --- a/docs/index.json +++ b/docs/index.json @@ -566,69 +566,38 @@ { "__docId__": 48, "kind": "file", - "name": "src/base/server.js", - "content": "/**\n * @flow\n */\n/* eslint-disable import/first */\nrequire('source-map-support/register');\nrequire('@babel/register');\nrequire('@babel/polyfill');\n\nimport fs from 'fs';\nimport path from 'path';\nimport pino from 'pino';\nimport Pino from 'hapi-pino';\nimport Hapi from '@hapi/hapi';\nimport Inert from '@hapi/inert';\n\n\n\nconst SERVER_NAME_DEFAULT: string = 'Template Server';\nconst LOG_DIR_DEFAULT: string = 'logs';\n\n/**\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n */\nexport interface EndpointConfig {\n method: string;\n path: string;\n controller: any; // eslint-disable-line\n}\n\n/**\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n */\nexport interface HapiHandler {\n code: Function; // eslint-disable-line\n response: Function; // eslint-disable-line\n redirect: Function; //eslint-disable-line\n}\n\n/**\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n */\nexport class RequestError extends Error {\n code: number;\n\n /**\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n */\n constructor(msg: string, code: number) {\n super(msg);\n this.code = code;\n }\n}\n\n/**\n * Request Object that is passed to the controller function as the first parameter\n * from https://github.com/hapijs/hapi/blob/master/API.md#request\n * @type {HapiRequest}\n */\nexport interface HapiRequest {\n server: any; // eslint-disable-line\n headers: any; // eslint-disable-line\n // from path\n params: any; // eslint-disable-line\n // Body of a POST request\n payload: any; // eslint-disable-line\n logger: any; // eslint-disable-line\n};\n\n\nexport interface ServerParams {\n name: string;\n port: number;\n host: string;\n logDir: string;\n debug?: boolean;\n}\n\n/**\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n */\nexport class Server {\n server: any; // eslint-disable-line\n name: string;\n logDir: string;\n\n /**\n * Server Constructor\n */\n constructor({ name, port, host, logDir, debug }: ServerParams) {\n this.name = name || SERVER_NAME_DEFAULT;\n this.logDir = logDir || LOG_DIR_DEFAULT;\n this.server = Hapi.server({\n port,\n host,\n // Sets errors to print to console while running\n debug: debug === true ? { request: ['error'] } : undefined\n });\n }\n\n /**\n * Shutdown the Hapi Server Properly\n * @param {Function} callback callback to run after server has shutdown\n * @return {undefined} no return\n */\n shutdown(callback: Function) { // eslint-disable-line flowtype/no-weak-types\n // TODO: Set Shutdown Timeout from config\n this.server.stop({ timeout: 10000 }).then((err: Error) => {\n if (err) {\n // TODO: Log Hapi Shutdown Error\n }\n callback(err);\n });\n }\n\n /**\n * Starts the server and registers any plugins\n * @return {Promise} Resolves once server has started\n */\n async run() {\n await this.server.start();\n process.stdout.write('\\n\\n' + this.name + ' started on ' + this.server.info.port + '\\n\\n');\n\n // Serve Docs with OpenAPI and Swagger UI\n // visit at http://localhost:3333/docs/swagger/index.html\n await this.server.register({\n plugin: Inert\n });\n\n // Create `logs` directory (so we only see errors and console logs in process out)\n if (!fs.existsSync(this.logDir)) {\n fs.mkdirSync(this.logDir);\n }\n\n await this.server.register({\n plugin: Pino,\n options: {\n prettyPrint: false,\n logEvents: [\n 'onRequest',\n 'response',\n 'request-error'\n ],\n // Creates a log of all the requests made and info as well as response status error/success\n stream: pino.destination(path.resolve(this.logDir, 'pino.log'))\n }\n });\n\n // TODO: Separate stream for errors?\n\n }\n\n /**\n * Logs a message through hapi-pino\n * @param {string[]} tags for pino log record\n * @param {string} data for pino log record\n * @return {undefined}\n */\n log({ tags, data }: { tags: string[]; data: string }) {\n this.server.log(tags, data);\n }\n\n\n /**\n * Adds an endpoint at the path given handled by the controller\n * @param {EndpointConfig} endpoint configuration\n * @return {undefined}\n */\n addEndpoint({ method, path, controller }: EndpointConfig) { // eslint-disable-line no-shadow\n this.server.route({\n method,\n path,\n handler: controller,\n options: {\n cors: true\n }\n });\n }\n\n /**\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n */\n addEndpoints(routes: Array) {\n for (let i: number = 0; i < routes.length; i++) {\n this.addEndpoint(routes[i]);\n }\n }\n}\n", + "name": "src/base/request/hapi-request.interface.js", + "content": "/**\n * @flow\n */\n/* eslint-disable flowtype/no-weak-types */\n\n/**\n* Request Object that is passed to the controller function as the first parameter\n* from https://github.com/hapijs/hapi/blob/master/API.md#request\n* @type {HapiRequest}\n*/\nexport interface HapiRequest {\n server: any;\n headers: any;\n // from path\n params: any;\n // Body of a POST request\n payload: any;\n logger: any;\n};\n\n\n/**\n * Hapi Handler for returning messages or setting error codes during requests\n * @type {HapiHandler}\n */\nexport interface HapiHandler {\n code: Function;\n response: Function;\n redirect: Function;\n}\n", "static": true, - "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/base/server.js", + "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/base/request/hapi-request.interface.js", "access": "public", "description": null, "lineNumber": 1 }, { "__docId__": 49, - "kind": "variable", - "name": "SERVER_NAME_DEFAULT", - "memberof": "src/base/server.js", + "kind": "file", + "name": "src/base/request/request-error.model.js", + "content": "/**\n * @flow\n */\n\n/**\n * Request Error Class to help set a response code and message to display to the user\n * @type {RequestError}\n */\nexport default class RequestError extends Error {\n code: number;\n\n /**\n * Create a new Request Error\n * @param {string} msg message to display when returned\n * @param {number} code response status code to set in Hapi Response\n */\n constructor(msg: string, code: number) {\n super(msg);\n this.code = code;\n }\n}\n", "static": true, - "longname": "src/base/server.js~SERVER_NAME_DEFAULT", + "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/base/request/request-error.model.js", "access": "public", - "export": false, - "importPath": "HapiServer/src/base/server.js", - "importStyle": null, "description": null, - "lineNumber": 14, - "undocument": true, - "type": { - "types": [ - "string" - ] - }, - "ignore": true + "lineNumber": 1 }, { "__docId__": 50, - "kind": "variable", - "name": "LOG_DIR_DEFAULT", - "memberof": "src/base/server.js", - "static": true, - "longname": "src/base/server.js~LOG_DIR_DEFAULT", - "access": "public", - "export": false, - "importPath": "HapiServer/src/base/server.js", - "importStyle": null, - "description": null, - "lineNumber": 15, - "undocument": true, - "type": { - "types": [ - "string" - ] - }, - "ignore": true - }, - { - "__docId__": 51, "kind": "class", "name": "RequestError", - "memberof": "src/base/server.js", + "memberof": "src/base/request/request-error.model.js", "static": true, - "longname": "src/base/server.js~RequestError", + "longname": "src/base/request/request-error.model.js~RequestError", "access": "public", "export": true, - "importPath": "HapiServer/src/base/server.js", - "importStyle": "{RequestError}", + "importPath": "HapiServer/src/base/request/request-error.model.js", + "importStyle": "RequestError", "description": "Request Error Class to help set a response code and message to display to the user", - "lineNumber": 36, + "lineNumber": 7, "type": { "nullable": null, "types": [ @@ -643,17 +612,17 @@ ] }, { - "__docId__": 52, + "__docId__": 51, "kind": "constructor", "name": "constructor", - "memberof": "src/base/server.js~RequestError", + "memberof": "src/base/request/request-error.model.js~RequestError", "generator": false, "async": false, "static": false, - "longname": "src/base/server.js~RequestError#constructor", + "longname": "src/base/request/request-error.model.js~RequestError#constructor", "access": "public", "description": "Create a new Request Error", - "lineNumber": 43, + "lineNumber": 14, "params": [ { "nullable": null, @@ -678,15 +647,15 @@ ] }, { - "__docId__": 53, + "__docId__": 52, "kind": "member", "name": "code", - "memberof": "src/base/server.js~RequestError", + "memberof": "src/base/request/request-error.model.js~RequestError", "static": false, - "longname": "src/base/server.js~RequestError#code", + "longname": "src/base/request/request-error.model.js~RequestError#code", "access": "public", "description": null, - "lineNumber": 45, + "lineNumber": 16, "undocument": true, "type": { "types": [ @@ -694,8 +663,61 @@ ] } }, + { + "__docId__": 53, + "kind": "file", + "name": "src/base/server.js", + "content": "/**\n * @flow\n */\n\n/* eslint-disable import/first */\n/* eslint-disable import/prefer-default-export */\n/* eslint-disable flowtype/no-weak-types */\n\nrequire('source-map-support/register');\nrequire('@babel/register');\nrequire('@babel/polyfill');\n\nimport fs from 'fs';\nimport Path from 'path';\nimport pino from 'pino';\nimport Pino from 'hapi-pino';\nimport Hapi from '@hapi/hapi';\nimport Inert from '@hapi/inert';\n\n\n\nconst SERVER_NAME_DEFAULT: string = 'Template Server';\nconst LOG_DIR_DEFAULT: string = 'logs';\n\n/**\n * Endpoint that can be created, should have a http method, path and controller that resolves when\n * the path is hit\n * @param {string} method HTTP method the endpoint must be called with to trigger controller\n * @param {string} path URL path of endpoint\n * @param {Function} controller Handler function that is triggered when endpoint is hit\n */\nexport interface EndpointConfig {\n method: string;\n path: string;\n controller: any;\n}\n\nexport interface ServerParams {\n name: string;\n port: number;\n host: string;\n logDir: string;\n debug?: boolean;\n}\n\n/**\n * Abstraction to manage running the server.\n * Instantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is\n *\n * @type {Server}\n */\nexport class Server {\n server: any;\n name: string;\n logDir: string;\n\n /**\n * Server Constructor\n */\n constructor({ name, port, host, logDir, debug }: ServerParams) {\n this.name = name || SERVER_NAME_DEFAULT;\n this.logDir = logDir || LOG_DIR_DEFAULT;\n this.server = Hapi.server({\n port,\n host,\n // Sets errors to print to console while running\n debug: debug === true ? { request: ['error'] } : undefined\n });\n }\n\n /**\n * Shutdown the Hapi Server Properly\n * @param {Function} callback callback to run after server has shutdown\n * @return {undefined} no return\n */\n shutdown(callback: Function) {\n // TODO: Set Shutdown Timeout from config\n this.server.stop({ timeout: 10000 }).then((err: Error) => {\n if (err) {\n // TODO: Log Hapi Shutdown Error\n }\n callback(err);\n });\n }\n\n /**\n * Starts the server and registers any plugins\n * @return {Promise} Resolves once server has started\n */\n async run() {\n await this.server.start();\n process.stdout.write('\\n\\n' + this.name + ' started on ' + this.server.info.port + '\\n\\n');\n\n // Serve Docs with OpenAPI and Swagger UI\n // visit at http://localhost:3333/docs/swagger/index.html\n await this.server.register({\n plugin: Inert\n });\n\n // Create `logs` directory (so we only see errors and console logs in process out)\n if (!fs.existsSync(this.logDir)) {\n fs.mkdirSync(this.logDir);\n }\n\n await this.server.register({\n plugin: Pino,\n options: {\n prettyPrint: false,\n logEvents: [\n 'onRequest',\n 'response',\n 'request-error'\n ],\n // Creates a log of all the requests made and info as well as response status error/success\n stream: pino.destination(Path.resolve(this.logDir, 'pino.log'))\n }\n });\n\n // TODO: Separate stream for errors?\n\n }\n\n /**\n * Logs a message through hapi-pino\n * @param {string[]} tags for pino log record\n * @param {string} data for pino log record\n * @return {undefined}\n */\n log({ tags, data }: { tags: string[]; data: string }) {\n this.server.log(tags, data);\n }\n\n\n /**\n * Adds an endpoint at the path given handled by the controller\n * @param {EndpointConfig} endpoint configuration\n * @return {undefined}\n */\n addEndpoint({ method, path, controller }: EndpointConfig) {\n this.server.route({\n method,\n path,\n handler: controller,\n options: {\n cors: true\n }\n });\n }\n\n /**\n * Adds the endpoints given to the server\n * @param {Array} routes Routes to add to the server\n * @returns {undefined}\n */\n addEndpoints(routes: Array) {\n for (let i: number = 0; i < routes.length; i++) {\n this.addEndpoint(routes[i]);\n }\n }\n}\n", + "static": true, + "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/base/server.js", + "access": "public", + "description": null, + "lineNumber": 1 + }, { "__docId__": 54, + "kind": "variable", + "name": "SERVER_NAME_DEFAULT", + "memberof": "src/base/server.js", + "static": true, + "longname": "src/base/server.js~SERVER_NAME_DEFAULT", + "access": "public", + "export": false, + "importPath": "HapiServer/src/base/server.js", + "importStyle": null, + "description": null, + "lineNumber": 18, + "undocument": true, + "type": { + "types": [ + "string" + ] + }, + "ignore": true + }, + { + "__docId__": 55, + "kind": "variable", + "name": "LOG_DIR_DEFAULT", + "memberof": "src/base/server.js", + "static": true, + "longname": "src/base/server.js~LOG_DIR_DEFAULT", + "access": "public", + "export": false, + "importPath": "HapiServer/src/base/server.js", + "importStyle": null, + "description": null, + "lineNumber": 19, + "undocument": true, + "type": { + "types": [ + "string" + ] + }, + "ignore": true + }, + { + "__docId__": 56, "kind": "class", "name": "Server", "memberof": "src/base/server.js", @@ -706,7 +728,7 @@ "importPath": "HapiServer/src/base/server.js", "importStyle": "{Server}", "description": "Abstraction to manage running the server.\nInstantiates on application server start up inside `entry.js` file or wherever the intial \"main\" script is", - "lineNumber": 62, + "lineNumber": 36, "type": { "nullable": null, "types": [ @@ -718,7 +740,7 @@ "interface": false }, { - "__docId__": 55, + "__docId__": 57, "kind": "constructor", "name": "constructor", "memberof": "src/base/server.js~Server", @@ -728,10 +750,10 @@ "longname": "src/base/server.js~Server#constructor", "access": "public", "description": "Server Constructor", - "lineNumber": 68 + "lineNumber": 41 }, { - "__docId__": 56, + "__docId__": 58, "kind": "member", "name": "name", "memberof": "src/base/server.js~Server", @@ -739,7 +761,7 @@ "longname": "src/base/server.js~Server#name", "access": "public", "description": null, - "lineNumber": 69, + "lineNumber": 42, "undocument": true, "type": { "types": [ @@ -748,7 +770,7 @@ } }, { - "__docId__": 57, + "__docId__": 59, "kind": "member", "name": "logDir", "memberof": "src/base/server.js~Server", @@ -756,7 +778,7 @@ "longname": "src/base/server.js~Server#logDir", "access": "public", "description": null, - "lineNumber": 70, + "lineNumber": 43, "undocument": true, "type": { "types": [ @@ -765,7 +787,7 @@ } }, { - "__docId__": 58, + "__docId__": 60, "kind": "member", "name": "server", "memberof": "src/base/server.js~Server", @@ -773,7 +795,7 @@ "longname": "src/base/server.js~Server#server", "access": "public", "description": null, - "lineNumber": 71, + "lineNumber": 44, "undocument": true, "type": { "types": [ @@ -782,7 +804,7 @@ } }, { - "__docId__": 59, + "__docId__": 61, "kind": "method", "name": "shutdown", "memberof": "src/base/server.js~Server", @@ -792,7 +814,7 @@ "longname": "src/base/server.js~Server#shutdown", "access": "public", "description": "Shutdown the Hapi Server Properly", - "lineNumber": 84, + "lineNumber": 57, "params": [ { "nullable": null, @@ -815,7 +837,7 @@ } }, { - "__docId__": 60, + "__docId__": 62, "kind": "method", "name": "run", "memberof": "src/base/server.js~Server", @@ -825,7 +847,7 @@ "longname": "src/base/server.js~Server#run", "access": "public", "description": "Starts the server and registers any plugins", - "lineNumber": 99, + "lineNumber": 71, "return": { "nullable": null, "types": [ @@ -837,7 +859,7 @@ "params": [] }, { - "__docId__": 61, + "__docId__": 63, "kind": "method", "name": "log", "memberof": "src/base/server.js~Server", @@ -847,7 +869,7 @@ "longname": "src/base/server.js~Server#log", "access": "public", "description": "Logs a message through hapi-pino", - "lineNumber": 133, + "lineNumber": 105, "params": [ { "nullable": null, @@ -880,7 +902,7 @@ } }, { - "__docId__": 62, + "__docId__": 64, "kind": "method", "name": "addEndpoint", "memberof": "src/base/server.js~Server", @@ -890,7 +912,7 @@ "longname": "src/base/server.js~Server#addEndpoint", "access": "public", "description": "Adds an endpoint at the path given handled by the controller", - "lineNumber": 142, + "lineNumber": 114, "params": [ { "nullable": null, @@ -913,7 +935,7 @@ } }, { - "__docId__": 63, + "__docId__": 65, "kind": "method", "name": "addEndpoints", "memberof": "src/base/server.js~Server", @@ -923,7 +945,7 @@ "longname": "src/base/server.js~Server#addEndpoints", "access": "public", "description": "Adds the endpoints given to the server", - "lineNumber": 159, + "lineNumber": 130, "unknown": [ { "tagName": "@returns", @@ -952,10 +974,10 @@ } }, { - "__docId__": 64, + "__docId__": 66, "kind": "file", "name": "src/controllers/admin.controller.js", - "content": "/**\n * @flow\n *\n * NOTE: This file will not be included in the esdoc list because it doesn't export any identifiers\n */\nimport { HapiRequest } from '../base/server.js';\nimport CONFIG from '../helpers/config.helper.js';\nimport healthcheckHelper from '../helpers/healthcheck.helper.js';\n\n/**\n * Basic Controller for returning server information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Server information Object\n */\nfunction infoController(request: HapiRequest): any { // eslint-disable-line\n return request.server.info;\n}\n\n/**\n * Basic Controller for returning Healthcheck information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Healthcheck response Object\n */\nfunction healthcheckController(request: HapiRequest): any { // eslint-disable-line\n return healthcheckHelper.getStatus(request.params.level);\n}\n\nexport default [\n {\n path: CONFIG.PATHS.healthcheck + '/{level?}',\n method: 'GET',\n controller: healthcheckController\n },\n {\n path: CONFIG.PATHS.info,\n method: 'GET',\n controller: infoController\n }\n];\n", + "content": "/**\n * @flow\n *\n * NOTE: This file will not be included in the esdoc list because it doesn't export any identifiers\n */\nimport { HapiRequest } from '../base/request/hapi-request.interface.js';\nimport CONFIG from '../helpers/config.helper.js';\nimport healthcheckHelper from '../helpers/healthcheck.helper.js';\n\n/**\n * Basic Controller for returning server information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Server information Object\n */\nfunction infoController(request: HapiRequest): any { // eslint-disable-line\n return request.server.info;\n}\n\n/**\n * Basic Controller for returning Healthcheck information\n * @param {HapiRequest} request Request Parameters\n * @return {Object} Healthcheck response Object\n */\nfunction healthcheckController(request: HapiRequest): any { // eslint-disable-line\n return healthcheckHelper.getStatus(request.params.level);\n}\n\nexport default [\n {\n path: CONFIG.PATHS.healthcheck + '/{level?}',\n method: 'GET',\n controller: healthcheckController\n },\n {\n path: CONFIG.PATHS.info,\n method: 'GET',\n controller: infoController\n }\n];\n", "static": true, "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/controllers/admin.controller.js", "access": "public", @@ -963,7 +985,7 @@ "lineNumber": 1 }, { - "__docId__": 65, + "__docId__": 67, "kind": "function", "name": "infoController", "memberof": "src/controllers/admin.controller.js", @@ -1000,7 +1022,7 @@ "ignore": true }, { - "__docId__": 66, + "__docId__": 68, "kind": "function", "name": "healthcheckController", "memberof": "src/controllers/admin.controller.js", @@ -1037,10 +1059,10 @@ "ignore": true }, { - "__docId__": 67, + "__docId__": 69, "kind": "file", "name": "src/controllers/hello.controller.js", - "content": "/**\n * @flow\n */\n// For some reason this can't use the `app` alias but can do relative pathing here... :/\nimport { HapiRequest } from '../base/server.js';\n\n/**\n * Controllers for Basic \"Hello World\" Functions\n *\n * See https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition\n */\nexport class HelloWorld {\n /**\n * Returns 'Hello World!'\n * @return {String} Hello World!\n */\n static basic(): string {\n return 'Hello World!';\n }\n\n /**\n * Returns a customized Hello Message\n * @param {HapiRequest} request Request Parameters\n * @return {String} Customized Hello Message\n */\n static name(request: HapiRequest): string {\n\n const name: string = request.params.name;\n\n return name + ' says: ' + Math.random() + '!!!!';\n }\n}\n\nexport default [\n {\n path: '/hello',\n method: 'GET',\n controller: HelloWorld.basic\n },\n {\n path: '/{name}',\n method: 'GET',\n controller: HelloWorld.name\n },\n {\n path: '/error',\n method: 'GET',\n controller: (request: HapiRequest) => {\n request.logger.error('Error Message!');\n throw new Error('Intentional Error Thrown');\n }\n }\n];\n", + "content": "/**\n * @flow\n */\nimport { HapiRequest } from '../base/request/hapi-request.interface.js';\n\n/**\n * Controllers for Basic \"Hello World\" Functions\n *\n * See https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition\n */\nexport class HelloWorld {\n /**\n * Returns 'Hello World!'\n * @return {String} Hello World!\n */\n static basic(): string {\n return 'Hello World!';\n }\n\n /**\n * Returns a customized Hello Message\n * @param {HapiRequest} request Request Parameters\n * @return {String} Customized Hello Message\n */\n static name(request: HapiRequest): string {\n\n const name: string = request.params.name;\n\n return name + ' says: ' + Math.random() + '!!!!';\n }\n}\n\nexport default [\n {\n path: '/hello',\n method: 'GET',\n controller: HelloWorld.basic\n },\n {\n path: '/{name}',\n method: 'GET',\n controller: HelloWorld.name\n },\n {\n path: '/error',\n method: 'GET',\n controller: (request: HapiRequest) => {\n request.logger.error('Error Message!');\n throw new Error('Intentional Error Thrown');\n }\n }\n];\n", "static": true, "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/controllers/hello.controller.js", "access": "public", @@ -1048,7 +1070,7 @@ "lineNumber": 1 }, { - "__docId__": 68, + "__docId__": 70, "kind": "class", "name": "HelloWorld", "memberof": "src/controllers/hello.controller.js", @@ -1059,11 +1081,11 @@ "importPath": "HapiServer/src/controllers/hello.controller.js", "importStyle": "{HelloWorld}", "description": "Controllers for Basic \"Hello World\" Functions\n\nSee https://github.com/hapijs/hapi/blob/master/API.md#request for HapiRequest definition", - "lineNumber": 10, + "lineNumber": 8, "interface": false }, { - "__docId__": 69, + "__docId__": 71, "kind": "method", "name": "basic", "memberof": "src/controllers/hello.controller.js~HelloWorld", @@ -1073,7 +1095,7 @@ "longname": "src/controllers/hello.controller.js~HelloWorld.basic", "access": "public", "description": "Returns 'Hello World!'", - "lineNumber": 15, + "lineNumber": 13, "return": { "nullable": null, "types": [ @@ -1085,7 +1107,7 @@ "params": [] }, { - "__docId__": 70, + "__docId__": 72, "kind": "method", "name": "name", "memberof": "src/controllers/hello.controller.js~HelloWorld", @@ -1095,7 +1117,7 @@ "longname": "src/controllers/hello.controller.js~HelloWorld.name", "access": "public", "description": "Returns a customized Hello Message", - "lineNumber": 24, + "lineNumber": 22, "params": [ { "nullable": null, @@ -1118,10 +1140,10 @@ } }, { - "__docId__": 71, + "__docId__": 73, "kind": "file", "name": "src/controllers/note.controller.js", - "content": "/**\n * @flow\n */\nimport { HapiRequest, HapiHandler } from '../base/server.js';\nimport NoteDataservice, { Note } from '../dataservices/note.service.js';\n\n/**\n * Container Controller for Note CRUD Functions\n */\nexport class NoteController {\n /**\n * Returns a note, specified by Id\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler object for rejecting/setting errors\n * @return {Note} Note corresponding to Id passed in\n */\n static async getNoteById({ params }: HapiRequest, handler: HapiHandler): Promise {\n try {\n return await NoteDataservice.getNote({ id: params.id });\n } catch (err) {\n // Get resp(HapiHandler) to return http code if number\n const resp: HapiHandler = handler.response({\n message: err.message,\n code: err.code\n });\n if (typeof(err.code) === 'number') {\n resp.code(err.code);\n } else {\n throw err;\n }\n return resp;\n }\n }\n\n /**\n * Create a new Note\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler\n * @return {Note} [description]\n */\n static createNote({ payload }: HapiRequest, handler: HapiHandler): Promise> {\n if (payload.name) {\n return NoteDataservice.createNote({ name: payload.name });\n } else if (Array.isArray(payload)) {\n return NoteDataservice.createNotes(payload);\n } else {\n return handler.response('Missing Note(s) to create').code(500);\n }\n }\n\n /**\n * Update a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {Note} [description]\n */\n static updateNote({ payload, logger }: HapiRequest): Promise {\n logger.trace({ data: payload });\n\n // TODO: Actually update / catch error on update\n\n return NoteDataservice.getNote({ id: payload.id });\n }\n\n /**\n * Delete a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {boolean} [description]\n */\n static deleteNote({ params, logger }: HapiRequest): boolean {\n logger.info({ data: params });\n\n return true;\n }\n}\n\nexport default [\n {\n path: '/note/{id}',\n method: 'GET',\n controller: NoteController.getNoteById\n },\n {\n path: '/note',\n method: 'POST',\n controller: NoteController.createNote\n },\n {\n path: '/note/{id?}',\n method: 'PUT',\n controller: NoteController.updateNote\n },\n {\n path: '/note/{id}',\n method: 'DELETE',\n controller: NoteController.deleteNote\n }\n];\n", + "content": "/**\n * @flow\n */\nimport { HapiRequest, HapiHandler } from '../base/request/hapi-request.interface.js';\nimport NoteDataservice, { Note } from '../dataservices/note.service.js';\n\n/**\n * Container Controller for Note CRUD Functions\n */\nexport class NoteController {\n /**\n * Returns a note, specified by Id\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler object for rejecting/setting errors\n * @return {Note} Note corresponding to Id passed in\n */\n static async getNoteById({ params }: HapiRequest, handler: HapiHandler): Promise {\n try {\n return await NoteDataservice.getNote({ id: params.id });\n } catch (err) {\n // Get resp(HapiHandler) to return http code if number\n const resp: HapiHandler = handler.response({\n message: err.message,\n code: err.code\n });\n if (typeof(err.code) === 'number') {\n resp.code(err.code);\n } else {\n throw err;\n }\n return resp;\n }\n }\n\n /**\n * Create a new Note\n * @param {HapiRequest} request RequestObject\n * @param {any} handler Hapi Handler\n * @return {Note} [description]\n */\n static createNote({ payload }: HapiRequest, handler: HapiHandler): Promise> {\n if (payload.name) {\n return NoteDataservice.createNote({ name: payload.name });\n } else if (Array.isArray(payload)) {\n return NoteDataservice.createNotes(payload);\n } else {\n return handler.response('Missing Note(s) to create').code(500);\n }\n }\n\n /**\n * Update a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {Note} [description]\n */\n static updateNote({ payload, logger }: HapiRequest): Promise {\n logger.trace({ data: payload });\n\n // TODO: Actually update / catch error on update\n\n return NoteDataservice.getNote({ id: payload.id });\n }\n\n /**\n * Delete a note, specified by id\n * @param {HapiRequest} request RequestObject\n * @return {boolean} [description]\n */\n static deleteNote({ params, logger }: HapiRequest): boolean {\n logger.info({ data: params });\n\n return true;\n }\n}\n\nexport default [\n {\n path: '/note/{id}',\n method: 'GET',\n controller: NoteController.getNoteById\n },\n {\n path: '/note',\n method: 'POST',\n controller: NoteController.createNote\n },\n {\n path: '/note/{id?}',\n method: 'PUT',\n controller: NoteController.updateNote\n },\n {\n path: '/note/{id}',\n method: 'DELETE',\n controller: NoteController.deleteNote\n }\n];\n", "static": true, "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/controllers/note.controller.js", "access": "public", @@ -1129,7 +1151,7 @@ "lineNumber": 1 }, { - "__docId__": 72, + "__docId__": 74, "kind": "class", "name": "NoteController", "memberof": "src/controllers/note.controller.js", @@ -1144,7 +1166,7 @@ "interface": false }, { - "__docId__": 73, + "__docId__": 75, "kind": "method", "name": "getNoteById", "memberof": "src/controllers/note.controller.js~NoteController", @@ -1187,7 +1209,7 @@ } }, { - "__docId__": 74, + "__docId__": 76, "kind": "method", "name": "createNote", "memberof": "src/controllers/note.controller.js~NoteController", @@ -1230,7 +1252,7 @@ } }, { - "__docId__": 75, + "__docId__": 77, "kind": "method", "name": "updateNote", "memberof": "src/controllers/note.controller.js~NoteController", @@ -1263,7 +1285,7 @@ } }, { - "__docId__": 76, + "__docId__": 78, "kind": "method", "name": "deleteNote", "memberof": "src/controllers/note.controller.js~NoteController", @@ -1296,10 +1318,10 @@ } }, { - "__docId__": 77, + "__docId__": 79, "kind": "file", "name": "src/dataservices/note.service.js", - "content": "/**\n * @flow\n *\n * MariaDB Service Example\n */\nimport mariadbHelper, { MariaDBInsertResponse } from '../helpers/mariadb.helper.js'; // eslint-disable-line\nimport { RequestError } from '../base/server.js';\nimport _ from 'lodash';\n\n/**\n * Note object with name and id\n * @type {Note}\n */\nexport interface Note {\n id: number;\n name: string;\n};\n\n/**\n * Note Dataservice for interacting with the storage system for saving notes\n */\nexport default class NoteDataservice {\n /**\n * Returns a note, specified by the caller by id\n * @param {number|string} id `id` number of the Note to retrieve\n * @return {Note} Note object\n */\n static async getNote({ id }: { id: number }): Promise {\n if (typeof(id) === 'string' && Number.isNaN(Number.parseInt((id: string)))) {\n throw new RequestError('Note Id must be an integer', 400);\n }\n const row: Note = await mariadbHelper.fetchOne(`SELECT * FROM test.notes WHERE id=${id}`);\n\n if (row === undefined) {\n throw new RequestError('Unrecognized Note Id', 404);\n }\n\n return row;\n }\n\n /**\n * Creates a new note with a name\n * TODO: add (optional) content param and attribute\n * @param {String} name name of note\n * @return {Note} Note Object\n */\n static async createNote({ name }: { name: string }): Promise {\n if (name === '' || name === undefined) {\n throw new RequestError('Name must be provided', 404);\n }\n\n const response: MariaDBInsertResponse = await mariadbHelper.insert('test.notes', {\n name\n });\n\n // TODO: Debug with atom?\n // TODO: Use Logger helper instead\n console.log(response);\n\n return await NoteDataservice.getNote({ id: response.insertId });\n }\n\n /**\n * Create multiple notes\n * @param {Array} notes Array of note objects with name parameter\n * @return {Promise} [description]\n */\n static async createNotes(notes: Array<{name: string}>): Promise | Note> {\n if (\n _.find(({ name }: { name: string; }): boolean => {\n return name === '' || name === undefined;\n }) !== undefined\n ) {\n throw new RequestError('Name cannot be empty or undefined', 404);\n }\n const insert: MariaDBInsertResponse = await mariadbHelper.insertMultiple('test.notes', notes);\n\n const endId: number = insert.insertId + insert.affectedRows;\n const query: string = `SELECT * from test.notes WHERE id >= ${insert.insertId} AND id < ${endId}`;\n\n return await mariadbHelper.fetch(query);\n }\n}\n", + "content": "/**\n * @flow\n *\n * MariaDB Service Example\n */\nimport mariadbHelper, { MariaDBInsertResponse } from '../helpers/mariadb.helper.js'; // eslint-disable-line\nimport RequestError from '../base/request/request-error.model.js';\nimport _ from 'lodash';\n\n/**\n * Note object with name and id\n * @type {Note}\n */\nexport interface Note {\n id: number;\n name: string;\n};\n\n/**\n * Note Dataservice for interacting with the storage system for saving notes\n */\nexport default class NoteDataservice {\n /**\n * Returns a note, specified by the caller by id\n * @param {number|string} id `id` number of the Note to retrieve\n * @return {Note} Note object\n */\n static async getNote({ id }: { id: number }): Promise {\n if (typeof(id) === 'string' && Number.isNaN(Number.parseInt((id: string)))) {\n throw new RequestError('Note Id must be an integer', 400);\n }\n const row: Note = await mariadbHelper.fetchOne(`SELECT * FROM test.notes WHERE id=${id}`);\n\n if (row === undefined) {\n throw new RequestError('Unrecognized Note Id', 404);\n }\n\n return row;\n }\n\n /**\n * Creates a new note with a name\n * TODO: add (optional) content param and attribute\n * @param {String} name name of note\n * @return {Note} Note Object\n */\n static async createNote({ name }: { name: string }): Promise {\n if (name === '' || name === undefined) {\n throw new RequestError('Name must be provided', 404);\n }\n\n const response: MariaDBInsertResponse = await mariadbHelper.insert('test.notes', {\n name\n });\n\n // TODO: Debug with atom?\n // TODO: Use Logger helper instead\n console.log(response);\n\n return await NoteDataservice.getNote({ id: response.insertId });\n }\n\n /**\n * Create multiple notes\n * @param {Array} notes Array of note objects with name parameter\n * @return {Promise} [description]\n */\n static async createNotes(notes: Array<{name: string}>): Promise | Note> {\n if (\n _.find(({ name }: { name: string; }): boolean => {\n return name === '' || name === undefined;\n }) !== undefined\n ) {\n throw new RequestError('Name cannot be empty or undefined', 404);\n }\n const insert: MariaDBInsertResponse = await mariadbHelper.insertMultiple('test.notes', notes);\n\n const endId: number = insert.insertId + insert.affectedRows;\n const query: string = `SELECT * from test.notes WHERE id >= ${insert.insertId} AND id < ${endId}`;\n\n return await mariadbHelper.fetch(query);\n }\n}\n", "static": true, "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/dataservices/note.service.js", "access": "public", @@ -1307,7 +1329,7 @@ "lineNumber": 1 }, { - "__docId__": 78, + "__docId__": 80, "kind": "class", "name": "NoteDataservice", "memberof": "src/dataservices/note.service.js", @@ -1322,7 +1344,7 @@ "interface": false }, { - "__docId__": 79, + "__docId__": 81, "kind": "method", "name": "getNote", "memberof": "src/dataservices/note.service.js~NoteDataservice", @@ -1356,7 +1378,7 @@ } }, { - "__docId__": 80, + "__docId__": 82, "kind": "method", "name": "createNote", "memberof": "src/dataservices/note.service.js~NoteDataservice", @@ -1389,7 +1411,7 @@ } }, { - "__docId__": 81, + "__docId__": 83, "kind": "method", "name": "createNotes", "memberof": "src/dataservices/note.service.js~NoteDataservice", @@ -1422,10 +1444,10 @@ } }, { - "__docId__": 82, + "__docId__": 84, "kind": "file", "name": "src/entry.js", - "content": "/**\n * @flow\n *\n * Entry point that loads all routes for the server\n */\nimport path from 'path';\nimport { Server, EndpointConfig, HapiRequest, HapiHandler } from './base/server.js';\nimport mariadb from './helpers/mariadb.helper.js';\nimport CONFIG from './helpers/config.helper.js';\n\n// TODO: auto detect routes\n// https://stackoverflow.com/questions/6059246/how-to-include-route-handlers-in-multiple-files-in-express\nimport adminRoutes from './controllers/admin.controller.js';\nimport helloRoutes from './controllers/hello.controller.js';\nimport noteRoutes from './controllers/note.controller.js';\n\n/**\n * Build the routes from files and add docs if CONFIG set\n * @type {Array}\n */\nconst apiRoutes: Array = helloRoutes.concat(noteRoutes);\napiRoutes.forEach((route: EndpointConfig) => {\n route.path = CONFIG.PATHS.api + route.path;\n});\n\nconst docRoutes: Array = [\n {\n method: 'GET',\n path: CONFIG.PATHS.api,\n controller: {\n file: path.resolve(__dirname, '../openapi.yaml')\n }\n },\n {\n method: 'GET',\n path: '/docs/{param*}',\n controller: {\n directory: {\n path: path.resolve(__dirname, '../docs'),\n index: true,\n redirectToSlash: true\n }\n }\n },\n {\n method: 'GET',\n path: '/docs',\n controller: (request: HapiRequest, handler: HapiHandler): any => { // eslint-disable-line\n return handler.redirect('/docs/');\n }\n }\n];\n/**\n * Entry point to run the server\n * @return {undefined} no return\n */\nexport default async function main() {\n // TODO: Check if mysql can be connected/db exists (use name in config file)\n // Only serve healthcheck if error (redirect all other pages to healtcheck?)\n try {\n const server: Server = new Server({\n name: CONFIG.SERVER.name,\n host: CONFIG.SERVER.host,\n port: CONFIG.SERVER.port,\n debug: CONFIG.LOGS.debug,\n logDir: CONFIG.LOGS.dir,\n logLevel: CONFIG.LOGS.level\n });\n\n await server.run();\n\n server.addEndpoints(apiRoutes);\n server.addEndpoints(adminRoutes);\n\n if (CONFIG.SERVER.docs) {\n server.addEndpoints(docRoutes);\n }\n\n process.on('SIGTERM', () => {\n attemptGracefulShutdown(server);\n });\n process.on('SIGUSR2', () => { // For nodemon?\n attemptGracefulShutdown(server);\n });\n\n server.log({ tags: ['STARTUP'], data: 'server startup complete' });\n } catch (err) {\n // Likely caused by \"bad\" endpoint (empty/ duplicate paths/ no controller)\n process.stdout.write('Server startup failed! [Likely due to local changes or missing dependencies]\\n\\n');\n\n process.exit(1);\n }\n}\nmain();\n\n\n\n/**\n * Attempt to shutdown the server and database connections\n * @param {Server} server Server Object to be shutdown\n * @return {undefined} undefined\n */\nfunction attemptGracefulShutdown(server: Server) {\n server.log({ tags: ['SHUTDOWN'], data: 'shutdown signal' });\n server.shutdown((hapiErr: Error) => {\n server.log({ tags: ['SHUTDOWN'], data: 'hapi server shutdown' });\n mariadb.shutdown((dbErr: Error) => {\n server.log({ tags: ['SHUTDOWN'], data: 'mariadb shutdown' });\n\n process.exit(hapiErr || dbErr ? 1 : 0);\n });\n });\n}\n\n// What is this about again?\nprocess.on('unhandledRejection', (err) => { // eslint-disable-line\n process.stdout.write(JSON.stringify(err));\n process.exit(1);\n});\nprocess.on('unhandledException', (err) => { // eslint-disable-line\n process.stdout.write(JSON.stringify(err));\n process.exit(1);\n});\n", + "content": "/**\n * @flow\n *\n * Entry point that loads all routes for the server\n */\nimport path from 'path';\nimport { Server, EndpointConfig } from './base/server.js';\nimport { HapiRequest, HapiHandler } from './base/request/hapi-request.interface.js';\nimport mariadb from './helpers/mariadb.helper.js';\nimport CONFIG from './helpers/config.helper.js';\n\n// TODO: auto detect routes\n// https://stackoverflow.com/questions/6059246/how-to-include-route-handlers-in-multiple-files-in-express\nimport adminRoutes from './controllers/admin.controller.js';\nimport helloRoutes from './controllers/hello.controller.js';\nimport noteRoutes from './controllers/note.controller.js';\n\n/**\n * Build the routes from files and add docs if CONFIG set\n * @type {Array}\n */\nconst apiRoutes: Array = helloRoutes.concat(noteRoutes);\napiRoutes.forEach((route: EndpointConfig) => {\n route.path = CONFIG.PATHS.api + route.path;\n});\n\nconst docRoutes: Array = [\n {\n method: 'GET',\n path: CONFIG.PATHS.api,\n controller: {\n file: path.resolve(__dirname, '../openapi.yaml')\n }\n },\n {\n method: 'GET',\n path: '/docs/{param*}',\n controller: {\n directory: {\n path: path.resolve(__dirname, '../docs'),\n index: true,\n redirectToSlash: true\n }\n }\n },\n {\n method: 'GET',\n path: '/docs',\n controller: (request: HapiRequest, handler: HapiHandler): any => { // eslint-disable-line\n return handler.redirect('/docs/');\n }\n }\n];\n/**\n * Entry point to run the server\n * @return {undefined} no return\n */\nexport default async function main() {\n // TODO: Check if mysql can be connected/db exists (use name in config file)\n // Only serve healthcheck if error (redirect all other pages to healtcheck?)\n try {\n const server: Server = new Server({\n name: CONFIG.SERVER.name,\n host: CONFIG.SERVER.host,\n port: CONFIG.SERVER.port,\n debug: CONFIG.LOGS.debug,\n logDir: CONFIG.LOGS.dir,\n logLevel: CONFIG.LOGS.level\n });\n\n await server.run();\n\n server.addEndpoints(apiRoutes);\n server.addEndpoints(adminRoutes);\n\n if (CONFIG.SERVER.docs) {\n server.addEndpoints(docRoutes);\n }\n\n process.on('SIGTERM', () => {\n attemptGracefulShutdown(server);\n });\n process.on('SIGUSR2', () => { // For nodemon?\n attemptGracefulShutdown(server);\n });\n\n server.log({ tags: ['STARTUP'], data: 'server startup complete' });\n } catch (err) {\n // Likely caused by \"bad\" endpoint (empty/ duplicate paths/ no controller)\n process.stdout.write('Server startup failed! [Likely due to local changes or missing dependencies]\\n\\n');\n\n process.exit(1);\n }\n}\nmain();\n\n\n\n/**\n * Attempt to shutdown the server and database connections\n * @param {Server} server Server Object to be shutdown\n * @return {undefined} undefined\n */\nfunction attemptGracefulShutdown(server: Server) {\n server.log({ tags: ['SHUTDOWN'], data: 'shutdown signal' });\n server.shutdown((hapiErr: Error) => {\n server.log({ tags: ['SHUTDOWN'], data: 'hapi server shutdown' });\n mariadb.shutdown((dbErr: Error) => {\n server.log({ tags: ['SHUTDOWN'], data: 'mariadb shutdown' });\n\n process.exit(hapiErr || dbErr ? 1 : 0);\n });\n });\n}\n\n// What is this about again?\nprocess.on('unhandledRejection', (err) => { // eslint-disable-line\n process.stdout.write(JSON.stringify(err));\n process.exit(1);\n});\nprocess.on('unhandledException', (err) => { // eslint-disable-line\n process.stdout.write(JSON.stringify(err));\n process.exit(1);\n});\n", "static": true, "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/entry.js", "access": "public", @@ -1433,7 +1455,7 @@ "lineNumber": 1 }, { - "__docId__": 83, + "__docId__": 85, "kind": "variable", "name": "apiRoutes", "memberof": "src/entry.js", @@ -1444,7 +1466,7 @@ "importPath": "HapiServer/src/entry.js", "importStyle": null, "description": "Build the routes from files and add docs if CONFIG set", - "lineNumber": 21, + "lineNumber": 22, "type": { "nullable": null, "types": [ @@ -1456,7 +1478,7 @@ "ignore": true }, { - "__docId__": 84, + "__docId__": 86, "kind": "variable", "name": "docRoutes", "memberof": "src/entry.js", @@ -1467,7 +1489,7 @@ "importPath": "HapiServer/src/entry.js", "importStyle": null, "description": null, - "lineNumber": 26, + "lineNumber": 27, "undocument": true, "type": { "types": [ @@ -1477,7 +1499,7 @@ "ignore": true }, { - "__docId__": 85, + "__docId__": 87, "kind": "function", "name": "main", "memberof": "src/entry.js", @@ -1490,7 +1512,7 @@ "importPath": "HapiServer/src/entry.js", "importStyle": "main", "description": "Entry point to run the server", - "lineNumber": 54, + "lineNumber": 55, "return": { "nullable": null, "types": [ @@ -1502,7 +1524,7 @@ "params": [] }, { - "__docId__": 86, + "__docId__": 88, "kind": "function", "name": "attemptGracefulShutdown", "memberof": "src/entry.js", @@ -1515,7 +1537,7 @@ "importPath": "HapiServer/src/entry.js", "importStyle": null, "description": "Attempt to shutdown the server and database connections", - "lineNumber": 98, + "lineNumber": 99, "params": [ { "nullable": null, @@ -1539,7 +1561,7 @@ "ignore": true }, { - "__docId__": 87, + "__docId__": 89, "kind": "file", "name": "src/helpers/config.helper.js", "content": "/**\n * @flow\n */\nimport path from 'path';\nimport YAML from 'yamljs';\nimport fs from 'fs'; // eslint-disable-line\n\n/**\n * YAML file content\n * @type {string}\n */\nconst yamlContent: string = fs.readFileSync(path.resolve(__dirname, '../../conf/config.yaml'), 'utf-8');\n\n// TODO: env.properties file with replacements/defaults in config.yaml?\n\n\n\n/**\n * CONFIG object with SERVER and DB properties\n * @type {Config}\n */\nconst CONFIG: Config = YAML.parse(yamlContent);\nexport default CONFIG;\n\n/**\n * Config Helper Expected Properties\n * @type {Config}\n */\nexport interface Config {\n SERVER: {\n protocol: string;\n host: string;\n name: string;\n port: number;\n tmpDir: string; // For generating files\n docs: boolean; // should display docs?\n };\n LOGS: {\n debug: boolean;\n dir: string;\n level: string;\n };\n DB: {\n MARIADB: DatabaseConfig\n };\n PATHS: {\n api: string;\n healthcheck: string;\n info: string;\n };\n EXTERNAL_SERVICES: {\n // TODO: Update this\n EXAMPLE: ExternalServiceConfig\n };\n}\n\nexport interface DatabaseConfig {\n serviceName?: string;\n name: string;\n host: string;\n user: string;\n password: string;\n}\n\nexport interface ExternalServiceConfig {\n serviceName?: string;\n protocol: string;\n host: string;\n port: number;\n path: string;\n healthcheck?: {\n port?: number;\n path: string;\n };\n cacheEnabled: boolean;\n cacheExpiration: number;\n}\n", @@ -1550,7 +1572,7 @@ "lineNumber": 1 }, { - "__docId__": 88, + "__docId__": 90, "kind": "variable", "name": "yamlContent", "memberof": "src/helpers/config.helper.js", @@ -1573,7 +1595,7 @@ "ignore": true }, { - "__docId__": 89, + "__docId__": 91, "kind": "variable", "name": "CONFIG", "memberof": "src/helpers/config.helper.js", @@ -1595,10 +1617,10 @@ } }, { - "__docId__": 90, + "__docId__": 92, "kind": "file", "name": "src/helpers/healthcheck.helper.js", - "content": "/**\n * @flow\n */\nimport _ from 'lodash';\nimport http from 'http';\nimport CONFIG, { DatabaseConfig, ExternalServiceConfig } from './config.helper.js';\nimport { MariaDBHelper } from './mariadb.helper.js';\nimport pack from '../../package.json';\nimport file from 'fs';\nimport path from 'path';\n\n/**\n * Healthcheck Response Object containing the healthcheck name, status and if it errored or not\n * @type {HealthcheckResponse}\n */\ninterface HealthcheckResponse {\n name: string | typeof undefined;\n status: any;\n error?: boolean;\n};\n\n/**\n * Retrieves the status of a database, based on the config given\n * @param {DatabaseConfig} config config of database to check\n * @return {HealthcheckResponse} Response from Database Healtcheck\n */\nasync function _getDatabaseStatus(config: DatabaseConfig): Promise {\n const response: HealthcheckResponse = {\n name: config.serviceName,\n status: undefined\n };\n try {\n const helper: MariaDBHelper = new MariaDBHelper({\n config: _.merge(config, {\n connectionLimit: 1\n })\n });\n const status: string | boolean = await helper.getStatus();\n response.status = JSON.stringify(status);\n helper.shutdown();\n } catch (error) {\n response.error = true;\n response.status = error;\n }\n\n return response;\n}\n\n/**\n * Retrieves the status of an external service via http request to an endpoint, based on config given\n * @param {ExternalServiceConfig} config config of external service\n * @return {HealthcheckResponse} Response from Database Healtcheck\n */\nasync function _getExternalServiceStatus(config: ExternalServiceConfig): Promise {\n const endpoint: string = config.protocol + '://' + config.host + ':' +\n _.get(config.healthcheck, 'port', config.port) + _.get(config.healthcheck, 'path', config.path);\n\n const promise = new Promise((resolve, reject) => { // eslint-disable-line\n const req = http.get(endpoint, (response) => { // eslint-disable-line\n response.on('data', (data: string) => {\n resolve(data);\n });\n });\n // TODO: Set Timeout length from Config (per service or have default?)\n req.setTimeout(5000, () => {\n req.destroy();\n reject('Error: Timeout at ' + endpoint);\n });\n req.on('error', (error: Error) => {\n reject(error);\n });\n });\n\n const response: HealthcheckResponse = {\n name: config.serviceName,\n status: undefined\n };\n try {\n response.status += await promise;\n } catch (error) {\n response.error = true;\n response.status = error;\n }\n return response;\n}\n\n/**\n * Returns the current branch of the build (TODO: development vs production?)\n * @return {string} information about the current branch and build\n */\nfunction getBranch(): string {\n const content: string = file.readFileSync(path.join(__dirname, '../../.git/HEAD'), { encoding: 'UTF-8' });\n\n const split: string[] = content.split('/');\n return split[split.length - 1];\n}\n\n/**\n * Class to wrap the methods that are used for server healthcheck\n */\nclass HealthcheckHelper {\n // Tried these with ES6 Map type but it made it much harder to do easy JSON manipulations\n serviceMap: { [name: string]: ExternalServiceConfig };\n dbMap: { [name: string]: DatabaseConfig };\n\n /**\n * Creates the Healthcheck helper by loading the configuration file and parsing the database and external\n * service configurations\n */\n constructor() {\n this.serviceMap = {};\n this.dbMap = {};\n _.each(CONFIG.EXTERNAL_SERVICES, (service: ExternalServiceConfig, name: string) => {\n if (service.serviceName === undefined) {\n service.serviceName = name;\n }\n this.serviceMap[name] = service;\n });\n\n _.each(CONFIG.DB, (service: DatabaseConfig, name: string) => {\n if (service.serviceName === undefined) {\n service.serviceName = name;\n }\n this.dbMap[name] = service;\n });\n }\n\n /**\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n */\n async isRunning(serviceName: string): Promise {\n const conf: DatabaseConfig | ExternalServiceConfig = this.serviceMap[serviceName];\n // TODO: don't check if it exists, check if it is actually running\n if (conf !== undefined) {\n if (conf instanceof DatabaseConfig) {\n return await _getDatabaseStatus(conf);\n } else {\n return await _getExternalServiceStatus(conf);\n }\n }\n\n return false;\n }\n\n /**\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n */\n async getStatus(level?: 'L1' | 'L2' | 'L3'): any {\n /* eslint-disable id-length */\n const status = {\n L1: [\n {\n name: 'SERVER',\n status: 'alive',\n },\n {\n name: 'VERSION',\n status: pack.version\n },\n {\n name: 'BRANCH',\n status: getBranch()\n }\n ],\n L2: await Promise.all(_.map(this.dbMap, _getDatabaseStatus)),\n L3: await Promise.all(_.map(this.serviceMap, _getExternalServiceStatus))\n };\n /* eslint-enable id-length */\n\n return level === undefined ? status : status[level];\n }\n}\n\n/**\n * Exported Helperto interact with Healcheck Operations\n * @type {Healthcheck}\n */\nconst healthcheckHelper: HealthcheckHelper = new HealthcheckHelper();\nexport default healthcheckHelper;\n", + "content": "/**\n * @flow\n */\nimport _ from 'lodash';\nimport http from 'http';\nimport CONFIG, { DatabaseConfig, ExternalServiceConfig } from './config.helper.js';\nimport { MariaDBHelper } from './mariadb.helper.js';\nimport pack from '../../package.json';\nimport file from 'fs';\nimport path from 'path';\n\n/**\n * Healthcheck Response Object containing the healthcheck name, status and if it errored or not\n * @type {HealthcheckResponse}\n */\ninterface HealthcheckResponse {\n name: ?string;\n status: ?string;\n error?: boolean;\n};\n\ninterface FullResponse {\n L1: Array;\n L2: Array;\n L3: Array;\n}\n\n/**\n * Retrieves the status of a database, based on the config given\n * @param {DatabaseConfig} config config of database to check\n * @return {HealthcheckResponse} Response from Database Healtcheck\n */\nasync function _getDatabaseStatus(config: DatabaseConfig): Promise {\n const response: HealthcheckResponse = {\n name: config.serviceName,\n status: undefined\n };\n try {\n const helper: MariaDBHelper = new MariaDBHelper({\n config: _.merge(config, {\n connectionLimit: 1\n })\n });\n const status: string | boolean = await helper.getStatus();\n response.status = JSON.stringify(status);\n helper.shutdown();\n } catch (error) {\n response.error = true;\n response.status = error;\n }\n\n return response;\n}\n\n/**\n * Retrieves the status of an external service via http request to an endpoint, based on config given\n * @param {ExternalServiceConfig} config config of external service\n * @return {HealthcheckResponse} Response from Database Healtcheck\n */\nasync function _getExternalServiceStatus(config: ExternalServiceConfig): Promise {\n const endpoint: string = config.protocol + '://' + config.host + ':' +\n _.get(config.healthcheck, 'port', config.port) + _.get(config.healthcheck, 'path', config.path);\n\n const promise = new Promise((resolve, reject) => { // eslint-disable-line\n const req = http.get(endpoint, (response) => { // eslint-disable-line\n response.on('data', (data: string) => {\n resolve(data);\n });\n });\n // TODO: Set Timeout length from Config (per service or have default?)\n req.setTimeout(5000, () => {\n req.destroy();\n reject('Error: Timeout at ' + endpoint);\n });\n req.on('error', (error: Error) => {\n reject(error);\n });\n });\n\n const response: HealthcheckResponse = {\n name: config.serviceName,\n status: undefined\n };\n try {\n // $FlowFixMe\n response.status += await promise;\n } catch (error) {\n response.error = true;\n response.status = error;\n }\n return response;\n}\n\n/**\n * Returns the current branch of the build (TODO: development vs production?)\n * @return {string} information about the current branch and build\n */\nfunction getBranch(): string {\n const content: string = file.readFileSync(path.join(__dirname, '../../.git/HEAD'), { encoding: 'UTF-8' });\n\n const split: string[] = content.split('/');\n return split[split.length - 1];\n}\n\n/**\n * Class to wrap the methods that are used for server healthcheck\n */\nclass HealthcheckHelper {\n // Tried these with ES6 Map type but it made it much harder to do easy JSON manipulations\n serviceMap: { [name: string]: ExternalServiceConfig };\n dbMap: { [name: string]: DatabaseConfig };\n\n /**\n * Creates the Healthcheck helper by loading the configuration file and parsing the database and external\n * service configurations\n */\n constructor() {\n this.serviceMap = {};\n this.dbMap = {};\n _.each(CONFIG.EXTERNAL_SERVICES, (service: ExternalServiceConfig, name: string) => {\n if (service.serviceName === undefined) {\n service.serviceName = name;\n }\n this.serviceMap[name] = service;\n });\n\n _.each(CONFIG.DB, (service: DatabaseConfig, name: string) => {\n if (service.serviceName === undefined) {\n service.serviceName = name;\n }\n this.dbMap[name] = service;\n });\n }\n\n /**\n * Returns whether the service passed is running\n * @param {string} serviceName name of the service/database to check is running\n * @return {Boolean} whether or not the service returns it is healthy\n */\n async isRunning(serviceName: string): Promise {\n const conf: DatabaseConfig | ExternalServiceConfig = this.serviceMap[serviceName];\n // TODO: don't check if it exists, check if it is actually running\n if (conf !== undefined) {\n if (conf instanceof DatabaseConfig) {\n return await _getDatabaseStatus(conf);\n } else {\n return await _getExternalServiceStatus(conf);\n }\n }\n\n return false;\n }\n\n /**\n * Returns the status\n * @param {String} level of healthcheck status to view\n * L1: this server + version\n * L2: databases and other essential services we manage for the endpoints to work\n * L3: external services we don't have control over and hopefully we catch errors for to explain to user\n * @returns {any} status of services in that level (or full status of server if no level provided)\n */\n async getStatus(level?: 'L1' | 'L2' | 'L3'): any { // eslint-disable-line flowtype/no-weak-types\n /* eslint-disable id-length */\n const status: FullResponse = {\n L1: [\n {\n // $FlowFixMe\n name: 'SERVER',\n // $FlowFixMe\n status: 'alive',\n },\n {\n // $FlowFixMe\n name: 'VERSION',\n status: pack.version\n },\n {\n // $FlowFixMe\n name: 'BRANCH',\n status: getBranch()\n }\n ],\n L2: await Promise.all(_.map(this.dbMap, _getDatabaseStatus)),\n L3: await Promise.all(_.map(this.serviceMap, _getExternalServiceStatus))\n };\n /* eslint-enable id-length */\n\n return level === undefined ? status : (status: any)[level]; // eslint-disable-line flowtype/no-weak-types\n }\n}\n\n/**\n * Exported Helperto interact with Healcheck Operations\n * @type {Healthcheck}\n */\nconst healthcheckHelper: HealthcheckHelper = new HealthcheckHelper();\nexport default healthcheckHelper;\n", "static": true, "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/helpers/healthcheck.helper.js", "access": "public", @@ -1606,7 +1628,7 @@ "lineNumber": 1 }, { - "__docId__": 91, + "__docId__": 93, "kind": "function", "name": "_getDatabaseStatus", "memberof": "src/helpers/healthcheck.helper.js", @@ -1643,7 +1665,7 @@ "ignore": true }, { - "__docId__": 92, + "__docId__": 94, "kind": "function", "name": "_getExternalServiceStatus", "memberof": "src/helpers/healthcheck.helper.js", @@ -1680,7 +1702,7 @@ "ignore": true }, { - "__docId__": 93, + "__docId__": 95, "kind": "function", "name": "getBranch", "memberof": "src/helpers/healthcheck.helper.js", @@ -1693,7 +1715,7 @@ "importPath": "HapiServer/src/helpers/healthcheck.helper.js", "importStyle": null, "description": "Returns the current branch of the build (TODO: development vs production?)", - "lineNumber": 85, + "lineNumber": 86, "return": { "nullable": null, "types": [ @@ -1706,7 +1728,7 @@ "ignore": true }, { - "__docId__": 94, + "__docId__": 96, "kind": "class", "name": "HealthcheckHelper", "memberof": "src/helpers/healthcheck.helper.js", @@ -1717,12 +1739,12 @@ "importPath": "HapiServer/src/helpers/healthcheck.helper.js", "importStyle": null, "description": "Class to wrap the methods that are used for server healthcheck", - "lineNumber": 95, + "lineNumber": 96, "pseudoExport": true, "interface": false }, { - "__docId__": 95, + "__docId__": 97, "kind": "constructor", "name": "constructor", "memberof": "src/helpers/healthcheck.helper.js~HealthcheckHelper", @@ -1732,10 +1754,10 @@ "longname": "src/helpers/healthcheck.helper.js~HealthcheckHelper#constructor", "access": "public", "description": "Creates the Healthcheck helper by loading the configuration file and parsing the database and external\nservice configurations", - "lineNumber": 103 + "lineNumber": 104 }, { - "__docId__": 96, + "__docId__": 98, "kind": "member", "name": "serviceMap", "memberof": "src/helpers/healthcheck.helper.js~HealthcheckHelper", @@ -1743,7 +1765,7 @@ "longname": "src/helpers/healthcheck.helper.js~HealthcheckHelper#serviceMap", "access": "public", "description": null, - "lineNumber": 104, + "lineNumber": 105, "undocument": true, "type": { "types": [ @@ -1752,7 +1774,7 @@ } }, { - "__docId__": 97, + "__docId__": 99, "kind": "member", "name": "dbMap", "memberof": "src/helpers/healthcheck.helper.js~HealthcheckHelper", @@ -1760,7 +1782,7 @@ "longname": "src/helpers/healthcheck.helper.js~HealthcheckHelper#dbMap", "access": "public", "description": null, - "lineNumber": 105, + "lineNumber": 106, "undocument": true, "type": { "types": [ @@ -1769,7 +1791,7 @@ } }, { - "__docId__": 98, + "__docId__": 100, "kind": "method", "name": "isRunning", "memberof": "src/helpers/healthcheck.helper.js~HealthcheckHelper", @@ -1779,7 +1801,7 @@ "longname": "src/helpers/healthcheck.helper.js~HealthcheckHelper#isRunning", "access": "public", "description": "Returns whether the service passed is running", - "lineNumber": 126, + "lineNumber": 127, "params": [ { "nullable": null, @@ -1802,7 +1824,7 @@ } }, { - "__docId__": 99, + "__docId__": 101, "kind": "method", "name": "getStatus", "memberof": "src/helpers/healthcheck.helper.js~HealthcheckHelper", @@ -1812,7 +1834,7 @@ "longname": "src/helpers/healthcheck.helper.js~HealthcheckHelper#getStatus", "access": "public", "description": "Returns the status", - "lineNumber": 148, + "lineNumber": 149, "unknown": [ { "tagName": "@returns", @@ -1841,7 +1863,7 @@ } }, { - "__docId__": 100, + "__docId__": 102, "kind": "variable", "name": "healthcheckHelper", "memberof": "src/helpers/healthcheck.helper.js", @@ -1852,7 +1874,7 @@ "importPath": "HapiServer/src/helpers/healthcheck.helper.js", "importStyle": "healthcheckHelper", "description": null, - "lineNumber": 175, + "lineNumber": 180, "undocument": true, "type": { "types": [ @@ -1861,7 +1883,7 @@ } }, { - "__docId__": 101, + "__docId__": 103, "kind": "file", "name": "src/helpers/mariadb.helper.js", "content": "/**\n * @flow\n */\nimport mariadb from 'mariadb';\nimport CONFIG from './config.helper.js';\n\n\n// Disable weak type rule to allow for generalized database objects\n/* eslint-disable flowtype/no-weak-types, flowtype/require-variable-type */\n\n/**\n * Configuration for MariaDBHelper Database connection\n * @type {MariaDBConfig}\n */\nexport interface MariaDBConfig {\n host: string;\n user: string;\n password: string;\n connectionLimit: number;\n};\n\n/**\n * Response from MariaDB Insert statement (From MariaDB)\n * @type {MariaDBInsertResponse}\n */\nexport interface MariaDBInsertResponse {\n affectedRows: number;\n insertId: number;\n warningStatus: number;\n}\n\n/**\n * MariaDB Helper for easy access to a configured MySQL Connection, with consistent methods for simple\n * interactions and larger transactions.\n *\n * This class can also be instantiated pointing elsewhere with a different MariaDBConfig passed to the\n * constructor\n * @type {MariaDBHelper}\n */\nexport class MariaDBHelper {\n /**\n * MariaDB Pool API\n * @type {PoolApi} https://mariadb.com/kb/en/library/connector-nodejs-promise-api/#pool-api\n */\n dbPool: any;\n transactionConnection: any;\n\n /**\n * Creates a new Helper (on this file export starts the Database Pool)\n * @param {MariaDBConfig} config Configuration to Connect to MySQL Database\n * @param {MariaDB.Connection} transactionConnection MariaDB Connection to use for larger transactions\n */\n constructor({ config, transactionConnection }: { config?: MariaDBConfig, transactionConnection?: any }) {\n // NOTE: Not sure if this is better, or if we should just make sure to always call `shutdown` to close db\n // If testing, skip any startup\n if (process.argv.includes('--env.unit_test')) {\n return;\n }\n\n if (config) {\n // Instantiating a connection to a different server\n this.dbPool = mariadb.createPool(config);\n } else if (transactionConnection) {\n // For Larger Transaction\n // TODO: Finish up transactionConnection Helper\n } else {\n // TODO: Log on failure to create MariaDB Helper\n throw new Error('MariaDBHelper created without DB Config or connection to use');\n }\n }\n\n /**\n * Shuts down the mariadb connections\n * @param {Function} callback callback function to call after shutting down db connections\n * @return {undefined} no return\n */\n shutdown(callback: Function) {\n if (this.dbPool) {\n this.dbPool.end((err: Error) => {\n if (err) {\n // TODO: Do Something on MariaDB Shutdown error\n }\n callback(err);\n });\n }\n }\n\n /**\n * Return the status of the database server (should be called on an instance with a pool, not connection)\n * @return {String | boolean} Either the current time, returned from database, or false if unable\n * to connect\n */\n async getStatus(): Promise {\n if (this.dbPool) {\n return await this.dbPool.query('SELECT NOW();');\n } else {\n return false;\n }\n }\n\n /**\n * Execute a simple query on the entire database\n * @param {string} query Query string to be passed to DB for response\n * see https://mariadb.com/kb/en/library/data-manipulation/ for reference\n * @param {Array} values Array of values to inject into the query string, matching the number of\n * placeholders given\n * @return {Promise} Returns the response from the query\n */\n query(query: string, values?: Array): Promise {\n if (this.transactionConnection) {\n // TODO: use transaction connection if it exists (this is what makes this so versatile)\n return this.transactionConnection.query(query, values);\n } else {\n return this.dbPool.query(query, values);\n }\n }\n\n /**\n * Fetch all rows given a query string and values that can qualify the query\n * @param {string} query Query string to pass to mariadb\n * @return {Promise} Return array of values\n */\n async fetch(query: string): Promise> {\n // TODO: Log if query doesn't contain `SELECT`\n\n const response = await this.query(query);\n\n if (!response || response.length === 0) {\n return [];\n }\n return response;\n }\n\n /**\n * Fetch the (first) row that matches a string\n * @param {string} query Query string to pass to mariadb\n * @return {Promise} Returns a single value\n */\n async fetchOne(query: string): Promise {\n const response = await this.fetch(query);\n\n if (!response || response.length === 0) {\n return undefined;\n }\n\n return response[0];\n }\n\n /**\n * Insert an Object into a specific table\n * @param {String} table Name of table to insert object into\n * @param {Object} object Mapping from column names to values to insert into DB Table\n * @return {Promise} Response from MariaDB\n */\n async insert(table: string, object: Object): Promise {\n // e.g. {'abc': 1, 'def', 2 }\n const keyString: string = Object.keys(object).join(', '); // 'abc, def'\n\n const values: Array = Object.values(object); // [1, 2]\n const inserts: string = '?,'.repeat(values.length).slice(0, (values.length * 2) - 1); // '?, ?'\n\n const response: MariaDBInsertResponse = await this.query(\n `INSERT INTO ${table} (${keyString}) value (${inserts})`,\n values\n );\n\n return response;\n }\n\n /**\n * Insert multiple objects into the table\n * @param {string} table to insert into\n * @param {Array} objects Array of objects to insert\n * @return {Promise} Response from MariaDB\n */\n async insertMultiple(table: string, objects: Array): Promise {\n // e.g. {'abc': 1, 'def', 2 }\n const firstObject = objects[0];\n const keyString: string = Object.keys(firstObject).join(', '); // 'abc, def'\n\n let inserts = '';\n const allValues = [];\n for (const object of objects) {\n const values: Array = Object.values(object); // [1, 2]\n inserts = '?,'.repeat(values.length).slice(0, (values.length * 2) - 1); // '?, ?'\n allValues.push(values);\n }\n\n // TODO: Handle insert if in transaction\n if (this.transactionConnection) {\n // just use transactionConnection instead?\n } else {\n // Best way to insert multiple objects in one statement?\n return await this.dbPool.batch(`INSERT INTO ${table} (${keyString}) VALUES (${inserts})`, allValues);\n }\n }\n\n // async update(table: string, object: any, where: any): any {\n // // TODO: Write proper update statement\n // }\n\n // /**\n // * Create a new connection and Helper to run a single transaction with multiple queries/db statements\n // * @param {Function} transactionCallback Uses the helper passed back to run all of the different queries\n // * @return {Promise} Indicates that the transaction has completed or errored\n // */\n // transaction(transactionCallback: Function): Promise {\n // console.log(transactionCallback);\n // if (this.dbPool) { // TODO: Create new Helper with a connection from pool }\n //\n // return new Promise((resolve: Function, reject: Function) => {\n // console.log(this);\n // this._beginTransaction();\n //\n // // TODO: call transactionCallback(with new helper)\n //\n // // TODO: close connection properly\n //\n // if (failure)\n // this._rollbackTransaction();\n // console.log(reject);\n //\n // else\n // this._commitTransaction();\n // console.log(resolve);\n //\n // });\n // }\n\n // async _beginTransaction() {\n //\n // }\n //\n // async _commitTransaction() {\n //\n // }\n //\n // async _rollbackTransaction() {\n //\n // }\n\n // async healthCheck() {\n //\n // }\n}\n\n\nconst mariadbHelper = new MariaDBHelper({ config: {\n database: undefined,\n host: CONFIG.DB.MARIADB.host,\n user: CONFIG.DB.MARIADB.user,\n password: CONFIG.DB.MARIADB.password,\n connectionLimit: 5\n} });\n\n/**\n * Exported MariaDB Helper that uses DB configuration in config.yaml\n * @type {MariaDBHelper}\n */\nexport default mariadbHelper;\n", @@ -1872,7 +1894,7 @@ "lineNumber": 1 }, { - "__docId__": 102, + "__docId__": 104, "kind": "class", "name": "MariaDBHelper", "memberof": "src/helpers/mariadb.helper.js", @@ -1895,7 +1917,7 @@ "interface": false }, { - "__docId__": 103, + "__docId__": 105, "kind": "constructor", "name": "constructor", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -1916,7 +1938,7 @@ } }, { - "__docId__": 104, + "__docId__": 106, "kind": "member", "name": "dbPool", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -1933,7 +1955,7 @@ } }, { - "__docId__": 105, + "__docId__": 107, "kind": "method", "name": "shutdown", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -1966,7 +1988,7 @@ } }, { - "__docId__": 106, + "__docId__": 108, "kind": "method", "name": "getStatus", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -1989,7 +2011,7 @@ "params": [] }, { - "__docId__": 107, + "__docId__": 109, "kind": "method", "name": "query", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -2032,7 +2054,7 @@ } }, { - "__docId__": 108, + "__docId__": 110, "kind": "method", "name": "fetch", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -2065,7 +2087,7 @@ } }, { - "__docId__": 109, + "__docId__": 111, "kind": "method", "name": "fetchOne", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -2098,7 +2120,7 @@ } }, { - "__docId__": 110, + "__docId__": 112, "kind": "method", "name": "insert", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -2141,7 +2163,7 @@ } }, { - "__docId__": 111, + "__docId__": 113, "kind": "method", "name": "insertMultiple", "memberof": "src/helpers/mariadb.helper.js~MariaDBHelper", @@ -2184,7 +2206,7 @@ } }, { - "__docId__": 112, + "__docId__": 114, "kind": "variable", "name": "mariadbHelper", "memberof": "src/helpers/mariadb.helper.js", @@ -2215,7 +2237,7 @@ }, { "kind": "packageJSON", - "content": "{\n \"version\": \"0.1.0\",\n \"name\": \"HapiServer\",\n \"description\": \"Template for Hapi Server\",\n \"keywords\": [\n \"flow\",\n \"eslint\",\n \"esdoc\",\n \"template\",\n \"node\",\n \"hapi\",\n \"server\"\n ],\n \"author\": \"djunker \",\n \"license\": \"ISC\",\n \"main\": \"dist/server.bundle.js\",\n \"scripts\": {\n \"start-watch\": \"rm -rf ./dist/; ./node_modules/.bin/webpack --watch & (sleep 20s && nodemon dist/server.bundle.js)\",\n \"test-watch\": \"node_modules/.bin/mocha --watch --env.unit_test\",\n \"dev-watch\": \"./node_modules/.bin/webpack --watch\",\n \"test\": \"node node_modules/.bin/mocha --env.unit_test\",\n \"doc\": \"./node_modules/.bin/esdoc && cp ./openapi.yaml docs/swagger/\",\n \"dev\": \"npm run build && node dist/server.bundle.js\",\n \"lint\": \"node_modules/.bin/eslint src/\",\n \"build\": \"./node_modules/.bin/webpack\",\n \"clean\": \"rm -rf ./dist\",\n \"help\": \"echo \\\"$(cat help.txt)\\\"\",\n \"doc-image\": \"./node_modules/madge/bin/cli.js ./src -x '.*\\\\.spec\\\\.js' -i docs/image/dependency.png & npm run doc\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"./scripts/hooks/pre-commit.sh\"\n }\n },\n \"dependencies\": {\n \"@hapi/hapi\": \"^18.4.0\",\n \"@hapi/inert\": \"^5.2.2\",\n \"hapi-pino\": \"^6.1.0\",\n \"lodash\": \"^4.17.15\",\n \"mariadb\": \"^2.1.1\",\n \"yamljs\": \"^0.3.0\"\n },\n \"devDependencies\": {\n \"@babel/core\": \"^7.6.4\",\n \"@babel/plugin-transform-flow-strip-types\": \"^7.4.4\",\n \"@babel/polyfill\": \"^7.6.0\",\n \"@babel/preset-env\": \"^7.6.0\",\n \"@babel/preset-es2015\": \"^7.0.0-beta.53\",\n \"@babel/preset-flow\": \"^7.0.0\",\n \"@babel/preset-stage-0\": \"^7.0.0\",\n \"@babel/register\": \"^7.6.0\",\n \"babel-eslint\": \"^10.0.3\",\n \"babel-loader\": \"^8.0.6\",\n \"babel-plugin-source-map-support\": \"^2.1.1\",\n \"babel-plugin-transform-flow-strip-types\": \"^6.22.0\",\n \"chai\": \"^4.2.0\",\n \"chai-as-promised\": \"^7.1.1\",\n \"esdoc\": \"^1.1.0\",\n \"esdoc-flow-plugin\": \"^1.0.0\",\n \"esdoc-standard-plugin\": \"^1.0.0\",\n \"eslint\": \"^6.4.0\",\n \"eslint-config-prettier\": \"^6.4.0\",\n \"eslint-import-resolver-webpack\": \"^0.11.1\",\n \"eslint-loader\": \"^3.0.0\",\n \"eslint-plugin-filenames\": \"^1.3.2\",\n \"eslint-plugin-flowtype\": \"^4.3.0\",\n \"eslint-plugin-flowtype-errors\": \"^4.1.0\",\n \"eslint-plugin-header\": \"^3.0.0\",\n \"eslint-plugin-import\": \"^2.18.2\",\n \"eslint-plugin-mocha\": \"^6.2.1\",\n \"eslint-plugin-prettier\": \"^3.1.1\",\n \"flow-bin\": \"^0.107.0\",\n \"flow-webpack-plugin\": \"^1.2.0\",\n \"husky\": \"^4.2.3\",\n \"karma-chrome-launcher\": \"^3.1.0\",\n \"mocha\": \"^6.2.0\",\n \"mocha-loader\": \"^3.0.0\",\n \"nodemon\": \"^1.19.2\",\n \"pino-pretty\": \"^3.6.1\",\n \"prettier\": \"^1.18.2\",\n \"require-context\": \"^1.1.0\",\n \"sinon\": \"^7.4.2\",\n \"sinon-chai\": \"^3.3.0\",\n \"source-map-support\": \"^0.5.13\",\n \"webpack\": \"^4.40.2\",\n \"webpack-cli\": \"^3.3.9\",\n \"webpack-dev-server\": \"^3.8.2\",\n \"webpack-node-externals\": \"^1.7.2\",\n \"webpack-shell-plugin\": \"^0.5.0\"\n }\n}\n", + "content": "{\n \"version\": \"0.1.0\",\n \"name\": \"HapiServer\",\n \"description\": \"Template for Hapi Server\",\n \"keywords\": [\n \"flow\",\n \"eslint\",\n \"esdoc\",\n \"template\",\n \"node\",\n \"hapi\",\n \"server\"\n ],\n \"author\": \"djunker \",\n \"license\": \"ISC\",\n \"main\": \"dist/server.bundle.js\",\n \"scripts\": {\n \"start-watch\": \"rm -rf ./dist/; ./node_modules/.bin/webpack --watch & (sleep 20s && nodemon dist/server.bundle.js)\",\n \"test-watch\": \"node_modules/.bin/mocha --watch --env.unit_test\",\n \"dev-watch\": \"./node_modules/.bin/webpack --watch\",\n \"test\": \"node node_modules/.bin/mocha --env.unit_test\",\n \"doc\": \"./node_modules/.bin/esdoc && cp ./openapi.yaml docs/swagger/\",\n \"dev\": \"npm run build && node dist/server.bundle.js\",\n \"lint\": \"node_modules/.bin/eslint src/\",\n \"build\": \"./node_modules/.bin/webpack\",\n \"clean\": \"rm -rf ./dist\",\n \"help\": \"echo \\\"$(cat help.txt)\\\"\",\n \"doc-image\": \"madge ./src -i docs/image/dependency.png & npm run doc\"\n },\n \"husky\": {\n \"hooks\": {\n \"pre-commit\": \"./scripts/hooks/pre-commit.sh\"\n }\n },\n \"dependencies\": {\n \"@hapi/hapi\": \"^18.4.0\",\n \"@hapi/inert\": \"^5.2.2\",\n \"hapi-pino\": \"^6.1.0\",\n \"lodash\": \"^4.17.15\",\n \"mariadb\": \"^2.1.1\",\n \"yamljs\": \"^0.3.0\"\n },\n \"devDependencies\": {\n \"@babel/core\": \"^7.6.4\",\n \"@babel/plugin-transform-flow-strip-types\": \"^7.4.4\",\n \"@babel/polyfill\": \"^7.6.0\",\n \"@babel/preset-env\": \"^7.6.0\",\n \"@babel/preset-es2015\": \"^7.0.0-beta.53\",\n \"@babel/preset-flow\": \"^7.0.0\",\n \"@babel/preset-stage-0\": \"^7.0.0\",\n \"@babel/register\": \"^7.6.0\",\n \"babel-eslint\": \"^10.0.3\",\n \"babel-loader\": \"^8.0.6\",\n \"babel-plugin-source-map-support\": \"^2.1.1\",\n \"babel-plugin-transform-flow-strip-types\": \"^6.22.0\",\n \"chai\": \"^4.2.0\",\n \"chai-as-promised\": \"^7.1.1\",\n \"esdoc\": \"^1.1.0\",\n \"esdoc-flow-plugin\": \"^1.0.0\",\n \"esdoc-standard-plugin\": \"^1.0.0\",\n \"eslint\": \"^6.4.0\",\n \"eslint-config-prettier\": \"^6.4.0\",\n \"eslint-import-resolver-webpack\": \"^0.11.1\",\n \"eslint-loader\": \"^3.0.0\",\n \"eslint-plugin-filenames\": \"^1.3.2\",\n \"eslint-plugin-flowtype\": \"^4.3.0\",\n \"eslint-plugin-flowtype-errors\": \"^4.1.0\",\n \"eslint-plugin-header\": \"^3.0.0\",\n \"eslint-plugin-import\": \"^2.18.2\",\n \"eslint-plugin-mocha\": \"^6.2.1\",\n \"eslint-plugin-prettier\": \"^3.1.1\",\n \"flow-bin\": \"^0.107.0\",\n \"flow-webpack-plugin\": \"^1.2.0\",\n \"husky\": \"^4.2.3\",\n \"karma-chrome-launcher\": \"^3.1.0\",\n \"mocha\": \"^6.2.0\",\n \"mocha-loader\": \"^3.0.0\",\n \"nodemon\": \"^1.19.2\",\n \"pino-pretty\": \"^3.6.1\",\n \"prettier\": \"^1.18.2\",\n \"require-context\": \"^1.1.0\",\n \"sinon\": \"^7.4.2\",\n \"sinon-chai\": \"^3.3.0\",\n \"source-map-support\": \"^0.5.13\",\n \"webpack\": \"^4.40.2\",\n \"webpack-cli\": \"^3.3.9\",\n \"webpack-dev-server\": \"^3.8.2\",\n \"webpack-node-externals\": \"^1.7.2\",\n \"webpack-shell-plugin\": \"^0.5.0\"\n }\n}\n", "longname": "/Users/junkerd/Programming/js/template.node.hapi/package.json", "name": "package.json", "static": true, @@ -2233,7 +2255,7 @@ "kind": "manual", "longname": "/Users/junkerd/Programming/js/template.node.hapi/README.setup.md", "name": "./README.setup.md", - "content": "# Setup\n\n**Requires Node 10+**. Please install this before attempting to run. The easiest way to install and\nmanage node versions is by using the [Node Version Manager](https://github.com/nvm-sh/nvm). We define a .nvm file\nin the project to help reference this minimum node version.\n\nUse `nvm use 10` to switch node versions after installing a new Node version. **Then you should install all\nproject dependencies**([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L30)) \nwith `npm install` (or `npm install -D` if development work is planned). This should install the Hapi Server Framework,\n MariaDB and other libraries used in this project.\n\nIf you have cloned the master branch, then the build should compile and all tests should pass once the\ndependencies have been downloaded and installed. To only compile the server, use `npm run build`, or you can\njust run the tests with `npm run test`. **To watch the files for changes and rebuild/retest the files\non changes, you can use** `npm run start-watch`. See the package.json([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L17))\nfor all possibe npm commands.\n\nThe Note Controller/Dataservice Endpoints require MariaDB installed to store the notes passed. After you\nhave installed mariadb, you will need to set up the initial database using mariadb and a SQL program (or\nscripts if we get working). **Once the db is set up, the configuration for the database name, user, password\nand port are set in** `conf/config.yaml`\n([github](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml)).\n\n**Each endpoint that is created should have an OpenAPI representation in** `openapi.yaml`. This file can be\nused to run [Swagger UI](https://swagger.io/tools/swagger-ui/) to help with running/testing the processes\ndeveloped. There is a Swagger application at the API link in the docs or can view the raw\nfile([source](../swagger/openapi.yaml)) (Eventually we will autogenerate OpenAPI file from code annotations\nand create Postman test suites based on these files)\n\n## Webpack\n\nWebpack config file([github](https://github.com/devlinjunker/template.node.hapi/blob/master/webpack.config.js))\nis used to manage our webpack build to compile the application. \n\nIn this file we:\n - designate the files that will be created with the build\n - define the source mapping that will be generated with the output (this should be changed in prod)\n - set the target environment and available globals\n - define where we should look to import files\n - and set up modules/plugins for the build\n - Babel and ESLint Loaders\n - Flow Integration with Webpack\n - Hot Module Replacement for rebuilding on file changes\n - Webpack Shell Plugin to re-run Mocha tests on file changes/rebuild\n\n## Documentation\n\nThe `docs/` directory is created with `npm run doc`, this generates an esdoc webpage based on the modified\ntemplate stored in `docs/template`.\n\nThe Dependency Graph is created with [Madge](https://github.com/pahen/madge) and graphviz, you will need to\ninstall both in order to update the dependency graph. I didn't include these in the package.json dependencies\nbecause I felt this is more than is needed to develop a working app or even write basic documentation.\n\nInstall madge with `npm install madge` and install graphviz with `brew install graphviz` or\n`port install graphviz` (for OSX)\n\nI split this out to a separate npm script: `npm run doc-image`\n\n\n## Notes/Ideas\n - **IDEA:** init scripts with installation and SQL setup\n", + "content": "# Setup\n\n**Requires Node 10+**. Please install this before attempting to run. The easiest way to install and\nmanage node versions is by using the [Node Version Manager](https://github.com/nvm-sh/nvm). We define a .nvm file\nin the project to help reference this minimum node version.\n\nUse `nvm use 10` to switch node versions after installing a new Node version. **Then you should install all\nproject dependencies**([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L30))\nwith `npm install` (or `npm install -D` if development work is planned). This should install the Hapi Server Framework,\n MariaDB and other libraries used in this project.\n\nIf you have cloned the master branch, then the build should compile and all tests should pass once the\ndependencies have been downloaded and installed. To only compile the server, use `npm run build`, or you can\njust run the tests with `npm run test`. **To watch the files for changes and rebuild/retest the files\non changes, you can use** `npm run start-watch`. See the package.json([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L17))\nfor all possibe npm commands.\n\nThe Note Controller/Dataservice Endpoints require MariaDB installed to store the notes passed. After you\nhave installed mariadb, you will need to set up the initial database using mariadb and a SQL program (or\nscripts if we get working). **Once the db is set up, the configuration for the database name, user, password\nand port are set in** `conf/config.yaml`\n([github](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml)).\n\n**Each endpoint that is created should have an OpenAPI representation in** `openapi.yaml`. This file can be\nused to run [Swagger UI](https://swagger.io/tools/swagger-ui/) to help with running/testing the processes\ndeveloped. There is a Swagger application at the API link in the docs or can view the raw\nfile([source](../swagger/openapi.yaml)) (Eventually we will autogenerate OpenAPI file from code annotations\nand create Postman test suites based on these files)\n\n## Webpack\n\nWebpack config file([github](https://github.com/devlinjunker/template.node.hapi/blob/master/webpack.config.js))\nis used to manage our webpack build to compile the application.\n\nIn this file we:\n - designate the files that will be created with the build\n - define the source mapping that will be generated with the output (this should be changed in prod)\n - set the target environment and available globals\n - define where we should look to import files\n - and set up modules/plugins for the build\n - Babel and ESLint Loaders\n - Flow Integration with Webpack\n - Hot Module Replacement for rebuilding on file changes\n - Webpack Shell Plugin to re-run Mocha tests on file changes/rebuild\n\n## Documentation\n\nThe `docs/` directory is created with `npm run doc`, this generates an esdoc webpage based on the modified\ntemplate stored in `docs/template`.\n\nThe Dependency Graph is created with [Madge](https://github.com/pahen/madge) and graphviz, you will need to\ninstall both in order to update the dependency graph. I didn't include these in the package.json dependencies\nbecause I felt this is more than is needed to develop a working app or even write basic documentation.\n\nInstall madge with `npm install -g madge` and install graphviz with `brew install graphviz` or\n`port install graphviz` (for OSX)\n\nI split this out to a separate npm script: `npm run doc-image`\n\n\n## Notes/Ideas\n - **IDEA:** init scripts with installation and SQL setup\n - Explore madge options: https://www.npmjs.com/package/madge#configuration\n", "static": true, "access": "public" }, @@ -2249,7 +2271,7 @@ "kind": "manual", "longname": "/Users/junkerd/Programming/js/template.node.hapi/README.logging.md", "name": "./README.logging.md", - "content": "# Logging\n\nWe are currently using pino for logging. Pino logs objects/messages directly to streams so other processes can\nactually handle formatting or other log actions (this is because Node is single threaded, so smarter to create\nanother process to manage the logs). We store all of these files in `/pino.log`\n\n## Configurations\n\nSome settings can be configured in the config.yaml([github](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml#L12)) file:\n - The `debug` property shows error messages and stack traces in the stdout of the server process (for\n development)\n - The `dir` property defines the directory to save log files in\n - The `level` property defines the log level we show in pino.log\n\n## What we log\n\n- Request Log\n - We record all connections to endpoints with the request details\n- Errors\n - Any Errors during request execution will be recorded in the log\n- Developer Messages (via Logger provided methods in Route Controllers)\n - Messages added by developers inside the controller body\n - different methods for levels: trace/debug/info/warn/error/fatal\n\n**Example:** \n```\ncontroller({ params, logger }: HapiRequest) {\n try {\n logger.info({ data: params });\n\n ...do stuff...\n } catch(err) {\n logger.error('Personalized Error Message');\n }\n\n ... return things?...\n}\n```\n\n\n## Other processes\nOther node processes should be spawned (in production and development), here are some examples of processes\nwe recommend:\n\n### Logrotate\nBy design, pino just outputs logs to be used by other \"transporters\". Log Rotation should be handled via\nanother service as described in the [pino documention](http://getpino.io/#/docs/help?id=log-rotation)\n\n### Pino-Pretty\nDisplays the logs in a prettier format that makes it easier to see the data, however takes up more space.\nTo use, pipe the log file to pino-pretty executable:\n`tail -f logs/pino.log | ./node_modules/.bin/pino-pretty -t ` \n\nSee [CLI arguments](https://github.com/pinojs/pino-pretty#cli-arguments) for more control of output:\n - remove `-t` for epoch\n - `-s` for searching\n - `-i` for ignoring properties\ne.g.\n```\n[2020-03-22 05:58:27.175 +0000] INFO (72753 on Devlins-MacBook-Air.local): request completed\n req: {\n \"id\": \"1584855457513:Devlins-MacBook-Air.local:72753:k82m08u1:10001\",\n \"method\": \"put\",\n \"url\": \"http://localhost:3333/api/note/1\",\n \"headers\": {\n \"host\": \"localhost:3333\",\n \"connection\": \"keep-alive\",\n \"content-length\": \"17\",\n \"accept\": \"*/*\",\n \"sec-fetch-dest\": \"empty\",\n \"user-agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36\",\n \"content-type\": \"application/json\",\n \"origin\": \"http://localhost:3333\",\n \"sec-fetch-site\": \"same-origin\",\n \"sec-fetch-mode\": \"cors\",\n \"referer\": \"http://localhost:3333/docs/swagger/index.html\",\n \"accept-encoding\": \"gzip, deflate, br\",\n \"accept-language\": \"en-US,en;q=0.9\",\n \"cookie\": \"SQLiteManager_currentLangue=2; _pk_id.2.1fff=e04c4083531e55a4.1584819760.6.1584855171.1584855171.; _pk_ses.2.1fff=1\"\n },\n \"remoteAddress\": \"127.0.0.1\",\n \"remotePort\": 64175\n }\n res: {\n \"statusCode\": 200,\n \"headers\": {\n \"content-type\": \"application/json; charset=utf-8\",\n \"vary\": \"origin\",\n \"access-control-allow-origin\": \"http://localhost:3333\",\n \"access-control-expose-headers\": \"WWW-Authenticate,Server-Authorization\",\n \"cache-control\": \"no-cache\",\n \"content-length\": 4\n }\n }\n responseTime: 6\n```\n\n\n## Notes/Ideas\n- Log Helper for use in the dataservices\n- goaccess?\n- websocket? endpoint that shows logs in real time\n- docs page for logs (searching?)\n- Elasticsearch/Logstash/Kibana\n", + "content": "# Logging\n\nWe are currently using pino for logging. Pino logs objects/messages directly to streams so other processes can\nactually handle formatting or other log actions (this is because Node is single threaded, so smarter to create\nanother process to manage the logs). We store all of these logs in `/pino.log`\n\n## Configurations\n\nSome settings can be configured in the config.yaml([github](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml#L12)) file:\n - The `debug` property shows error messages and stack traces in the stdout of the server process (for\n development)\n - The `dir` property defines the directory to save log files in\n - The `level` property defines the log level we show in pino.log\n\n## What we log\n\n- Request Log\n - We record all connections to endpoints with the request details\n- Errors\n - Any Errors during request execution will be recorded in the log\n- Developer Messages (via Logger provided methods in Route Controllers)\n - Messages added by developers inside the controller body\n - different methods for levels: trace/debug/info/warn/error/fatal\n\n**Example:** \n```\ncontroller({ params, logger }: HapiRequest) {\n try {\n logger.info({ data: params });\n\n ...do stuff...\n } catch(err) {\n logger.error('Personalized Error Message');\n }\n\n ... return things?...\n}\n```\n\n\n## Other processes\nBy design, pino just outputs logs to be used by other \"transporters\" (other node processes spawned in\nproduction and development) for reacting to, and viewing these logs. here are some examples of processes\nwe recommend implementing:\n\n### Logrotate\nLog Rotation on production servers should be handled via another service as described in the [pino documention](http://getpino.io/#/docs/help?id=log-rotation)\n\n### Pino-Pretty\nDisplays the logs in a prettier format that makes it easier to see the data, however takes up more space.\nTo use, pipe the log file to pino-pretty executable:\n`tail -f logs/pino.log | ./node_modules/.bin/pino-pretty -t ` \n\nSee [CLI arguments](https://github.com/pinojs/pino-pretty#cli-arguments) for more control of output:\n - remove `-t` for epoch\n - `-s` for searching\n - `-i` for ignoring properties\ne.g.\n```\n[2020-03-22 05:58:27.175 +0000] INFO (72753 on Devlins-MacBook-Air.local): request completed\n req: {\n \"id\": \"1584855457513:Devlins-MacBook-Air.local:72753:k82m08u1:10001\",\n \"method\": \"put\",\n \"url\": \"http://localhost:3333/api/note/1\",\n \"headers\": {\n \"host\": \"localhost:3333\",\n \"connection\": \"keep-alive\",\n \"content-length\": \"17\",\n \"accept\": \"*/*\",\n \"sec-fetch-dest\": \"empty\",\n \"user-agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36\",\n \"content-type\": \"application/json\",\n \"origin\": \"http://localhost:3333\",\n \"sec-fetch-site\": \"same-origin\",\n \"sec-fetch-mode\": \"cors\",\n \"referer\": \"http://localhost:3333/docs/swagger/index.html\",\n \"accept-encoding\": \"gzip, deflate, br\",\n \"accept-language\": \"en-US,en;q=0.9\",\n \"cookie\": \"SQLiteManager_currentLangue=2; _pk_id.2.1fff=e04c4083531e55a4.1584819760.6.1584855171.1584855171.; _pk_ses.2.1fff=1\"\n },\n \"remoteAddress\": \"127.0.0.1\",\n \"remotePort\": 64175\n }\n res: {\n \"statusCode\": 200,\n \"headers\": {\n \"content-type\": \"application/json; charset=utf-8\",\n \"vary\": \"origin\",\n \"access-control-allow-origin\": \"http://localhost:3333\",\n \"access-control-expose-headers\": \"WWW-Authenticate,Server-Authorization\",\n \"cache-control\": \"no-cache\",\n \"content-length\": 4\n }\n }\n responseTime: 6\n```\n\n\n## Notes/Ideas\n- Trace logging any external requests/responses\n- Logger Helper for use in the dataservices\n- goaccess?\n- websocket? endpoint that shows logs in real time\n- docs page for logs (searching?)\n- Elasticsearch/Logstash/Kibana\n- logrotate on production\n", "static": true, "access": "public" }, @@ -2265,7 +2287,7 @@ "kind": "manual", "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/dataservices/README.dataservices.md", "name": "./src/dataservices/README.dataservices.md", - "content": "# Dataservices\n\nDataservices communicate with storage systems or external APIs to fetch/store data.\n\n\n## Hello World\n\nSimple example of Hello World endpoint plus example with random value and input from path parameter\n\n## Note Dataservice\n\nCreate/Read Note objects out of a mariadb/mysql database\n\n\n## Notes/Ideas\n - RDBMS vs Document store\n - CAP theorem stands for C – Consistency, A — Availability, P — Partitioning (or Scalability) and states that having all three properties at the same time is not possible,\n - https://medium.com/statuscode/three-reasons-to-use-a-nosql-document-store-for-your-next-web-application-6b9eabffc8d8\n - Document Store:\n - use for settings data and where schema will be changed often\n - when changes are small crud, based on users interactions?\n - when count and aggregate data is useful to end user\n - RDBMS:\n - less duplicated data, normalized and stored in specific tables\n - useful when data changes often\n - seems like more useful for storing fact data in ETL processes?\n - Q: phoenix?\n", + "content": "# Dataservices\n\nDataservices abstract the communication with storage systems or external APIs to fetch/store data related to a\ntopic or for a specific UI component.\n\n## Examples\n\n### Note Dataservice\nCreate/Read Note objects out of a mariadb/mysql database\n\n\n## Notes/Ideas\n- Quick storage dataservice (abstracted away from specific object?)\n - takes object from post/put request and places in mongodb\n - objects indexed by another param\n - automatically assigned id\n - retrieves with get request\n - delete request\n - takes multiple object ids\n - search/or retrieve by property?\n", "static": true, "access": "public" }, @@ -2273,7 +2295,7 @@ "kind": "manual", "longname": "/Users/junkerd/Programming/js/template.node.hapi/src/helpers/README.helpers.md", "name": "./src/helpers/README.helpers.md", - "content": "# Helpers\n\nHelpers are classes that wrap some functionality not associated with an external service\n\n## MariaDB\n - connecting with mariadb server\n - query\n - insert\n - fetch\n - fetchOne\n\n## Config\n - reading properties from [config file](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml#L3)\n\n## Healthcheck\n - Make simple requests to configured DB/External Services to see if available\n\n\n\n\n## Notes/Ideas\n - Do we want/need to worry about Dependency Injection/Singletons?\n - **IDEA:** Move Server into helpers as `server.helper.js`?\n", + "content": "# Helpers\n\nHelpers are classes that modularize some functionality that is useful in the server.\n\n## Examples\n\n### MariaDB\nHelper class for connecting with mariadb server and saving/retrieving rows from tables\n - query\n - insert\n - fetch\n - fetchOne\n\n### Config\nHelper class for reading properties from [config file](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml#L3)\n - provides a typed interface of these properties\n\n### Healthcheck\nHelper for building the healthcheck response that is displayed at `` endpoint.\n - Determines version/branch and if the server is running properly\n - Makes simple requests to configured dependency DB/External Services to see if they are available\n\n\n\n## Notes/Ideas\n - **IDEA:** Should healthcheck read log file for past minute to see if any errors?\n - Do we want/need to worry about Dependency Injection/Singletons?\n - RDBMS vs Document store\n - CAP theorem stands for C – Consistency, A — Availability, P — Partitioning (or Scalability) and states that having all three properties at the same time is not possible,\n - https://medium.com/statuscode/three-reasons-to-use-a-nosql-document-store-for-your-next-web-application-6b9eabffc8d8\n - Document Store:\n - use for settings data and where schema will be changed often\n - when changes are small crud, based on users interactions?\n - when count and aggregate data is useful to end user\n - RDBMS:\n - less duplicated data, normalized and stored in specific tables\n - useful when data changes often\n - seems like more useful for storing fact data in ETL processes?\n - Q: phoenix?\n", "static": true, "access": "public" }, @@ -2281,7 +2303,7 @@ "kind": "manual", "longname": "/Users/junkerd/Programming/js/template.node.hapi/scripts/hooks/README.hooks.md", "name": "./scripts/hooks/README.hooks.md", - "content": "# Git Hooks\n\nWe use githooks([github](https://github.com/devlinjunker/template.node.hapi/tree/master/scripts/hooks)) to help clean up and enforce the workflow for developers. This is done with Husky.\n\n**NOTE: We prevent commits to master branch on local machine (so all changes to master are PRs on github)**. You may want to disable this for more rapid local development, you can just remove the configuration in package.json([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L30)) that adds these hooks.\n\n## On commit\nBefore each commit, we want to verify that the build won't break. So we make sure to run the build process one more time with only the committed files before\nletting the commit go through:\n\nProcess:\n1. Stash uncommited changes\n2. Run linting/flow/compliation and tests with npm/webpack\n3. Pop uncommitted changes\n", + "content": "# Git Hooks/Workflow\n\nWe use githooks([github](https://github.com/devlinjunker/template.node.hapi/tree/master/scripts/hooks)) to help clean up and enforce the workflow for developers. This is done with Husky.\n\n**NOTE: We prevent commits to master branch on local machine (so all changes to master are PRs on github)**. You may want to disable this for more rapid local development, you can just remove the configuration in package.json([github](https://github.com/devlinjunker/template.node.hapi/blob/master/package.json#L30)) that adds these hooks.\n\n## On commit\nBefore each commit, we want to verify that the build won't break. So we make sure to run the build process one more time with only the committed files before\nletting the commit go through:\n\nProcess:\n1. Stash uncommited changes\n2. Run linting/flow/compliation and tests with npm/webpack\n3. Pop uncommitted changes\n\n\n## Github Actions\n\nWe setup github actions on this project so we can attempt to build and run the tests for every PR submitted\nagainst master.\n\nMore to come...\n", "static": true, "access": "public" }, @@ -2294,7 +2316,7 @@ "access": "public" }, { - "__docId__": 113, + "__docId__": 115, "kind": "testFile", "name": "template.node.hapi/src/controllers/hello.controller.spec.js", "content": "import { HelloWorld } from './hello.controller.js';\n\n/** @test {HelloWorld} */\ndescribe('HelloWorld', function() {\n /** @test {HelloWorld.basic} */\n describe('basic()', function() {\n it('returns \\'Hello World!\\'', function() {\n const returned = HelloWorld.basic();\n\n expect(returned).to.equal('Hello World!');\n });\n });\n\n /** @test {HelloWorld.name} */\n describe('name()', function() {\n it('returns \\'{request.params.name} says:\\'', function() {\n const request = {\n params: {\n name: 'Devlin'\n }\n };\n\n let returned = HelloWorld.name(request);\n expect(returned.startsWith('Devlin says')).to.be.true;\n\n request.params.name = 'Michelle';\n\n returned = HelloWorld.name(request);\n expect(returned.startsWith('Michelle says')).to.be.true;\n });\n });\n});\n", @@ -2305,7 +2327,7 @@ "lineNumber": 1 }, { - "__docId__": 114, + "__docId__": 116, "kind": "test", "name": "describe0", "testId": 0, @@ -2321,7 +2343,7 @@ ] }, { - "__docId__": 115, + "__docId__": 117, "kind": "test", "name": "describe1", "testId": 1, @@ -2337,7 +2359,7 @@ ] }, { - "__docId__": 116, + "__docId__": 118, "kind": "test", "name": "it2", "testId": 2, @@ -2350,7 +2372,7 @@ "lineNumber": 7 }, { - "__docId__": 117, + "__docId__": 119, "kind": "test", "name": "describe3", "testId": 3, @@ -2366,7 +2388,7 @@ ] }, { - "__docId__": 118, + "__docId__": 120, "kind": "test", "name": "it4", "testId": 4, @@ -2379,7 +2401,7 @@ "lineNumber": 16 }, { - "__docId__": 119, + "__docId__": 121, "kind": "testFile", "name": "template.node.hapi/src/controllers/note.controller.spec.js", "content": "import { NoteController } from './note.controller.js';\nimport NoteDataservice from '../dataservices/note.service.js';\n\n/**\n * Question:\n * Do we want to unit test controllers? If we do openapi based testing with Newman, I think that should\n * cover all of the standard \"black-box\" expectations of the endpoint...\n * https://github.com/dtzar/openapi-auto-test\n *\n * Seems like we should still unit test with fakes/stubs on the dataservices so we can test before live,\n * especially if we have controllers that will modify/transform data\n */\n\n/** @test {NoteController} */\ndescribe('NoteController', function() {\n let getStub;\n beforeEach(function() {\n // Create stubs and fakes here for how we expect backend to interact\n getStub = sinonSandbox.stub(NoteDataservice, 'getNote');\n });\n\n /** @test {NoteController.getNoteById} */\n describe('getNoteById()', function() {\n /**\n * Question:\n * Is this useful? Or should we just check that it calls the backend dataservice?\n *\n * Maybe we should use Model classes for objects returned from service, so we can instantiate in\n * the fakes/returns we stub\n */\n it('should return a Note with id passed', async function() {\n const id = 1;\n getStub.resolves({\n id\n });\n\n const note = await NoteController.getNoteById({ params: { id } });\n\n expect(note).to.contain({ id });\n });\n\n it('should return error message if id is invalid');\n\n it('should return error message if Note doesn\\'t exist');\n });\n\n /** @test {NoteController.createNote} */\n describe('createNote()', function() {\n it('should call DataService.createNote (with newName?)', async function() {\n const createNoteStub = sinonSandbox.stub(NoteDataservice, 'createNote');\n\n const newNoteName = 'abc';\n await NoteController.createNote({ payload: { name: newNoteName } });\n\n expect(createNoteStub).to.be.called;\n expect(createNoteStub).to.be.calledWith({ name: newNoteName });\n });\n\n it('should return note with name passed and new id', async function() {\n const id = 13;\n sinonSandbox.stub(NoteDataservice, 'createNote').callsFake(({ name }) => {\n return {\n id,\n name\n };\n });\n\n const newNoteName = 'abc';\n const note = await NoteController.createNote({ payload: { name: newNoteName } });\n\n expect(note).to.deep.equal({\n id,\n name: newNoteName\n });\n });\n\n it('should return error if note name is empty');\n\n it('should return error message if error creating note');\n });\n\n /** @test {NoteController.updateNote} */\n describe('updateNote()', function() {\n it('should call NoteDataservice.updateNote (with params)');\n\n it('should return note with updated name, as passed');\n\n it('should return error message if id is invalid');\n\n it('should return error message if error updating note');\n });\n\n /** @test {NoteController.deleteNote} */\n describe('deleteNote()', function() {\n it('should call NoteDataservice.deleteNote (with id)');\n\n it('should return the deleted note id');\n\n it('should return error message if id is invalid');\n\n it('should return error message if error deleting note');\n });\n});\n", @@ -2390,7 +2412,7 @@ "lineNumber": 1 }, { - "__docId__": 120, + "__docId__": 122, "kind": "test", "name": "describe5", "testId": 5, @@ -2406,7 +2428,7 @@ ] }, { - "__docId__": 121, + "__docId__": 123, "kind": "test", "name": "describe6", "testId": 6, @@ -2422,7 +2444,7 @@ ] }, { - "__docId__": 122, + "__docId__": 124, "kind": "test", "name": "it7", "testId": 7, @@ -2435,7 +2457,7 @@ "lineNumber": 31 }, { - "__docId__": 123, + "__docId__": 125, "kind": "test", "name": "it8", "testId": 8, @@ -2448,7 +2470,7 @@ "lineNumber": 42 }, { - "__docId__": 124, + "__docId__": 126, "kind": "test", "name": "it9", "testId": 9, @@ -2461,7 +2483,7 @@ "lineNumber": 44 }, { - "__docId__": 125, + "__docId__": 127, "kind": "test", "name": "describe10", "testId": 10, @@ -2477,7 +2499,7 @@ ] }, { - "__docId__": 126, + "__docId__": 128, "kind": "test", "name": "it11", "testId": 11, @@ -2490,7 +2512,7 @@ "lineNumber": 49 }, { - "__docId__": 127, + "__docId__": 129, "kind": "test", "name": "it12", "testId": 12, @@ -2503,7 +2525,7 @@ "lineNumber": 59 }, { - "__docId__": 128, + "__docId__": 130, "kind": "test", "name": "it13", "testId": 13, @@ -2516,7 +2538,7 @@ "lineNumber": 77 }, { - "__docId__": 129, + "__docId__": 131, "kind": "test", "name": "it14", "testId": 14, @@ -2529,7 +2551,7 @@ "lineNumber": 79 }, { - "__docId__": 130, + "__docId__": 132, "kind": "test", "name": "describe15", "testId": 15, @@ -2545,7 +2567,7 @@ ] }, { - "__docId__": 131, + "__docId__": 133, "kind": "test", "name": "it16", "testId": 16, @@ -2558,7 +2580,7 @@ "lineNumber": 84 }, { - "__docId__": 132, + "__docId__": 134, "kind": "test", "name": "it17", "testId": 17, @@ -2571,7 +2593,7 @@ "lineNumber": 86 }, { - "__docId__": 133, + "__docId__": 135, "kind": "test", "name": "it18", "testId": 18, @@ -2584,7 +2606,7 @@ "lineNumber": 88 }, { - "__docId__": 134, + "__docId__": 136, "kind": "test", "name": "it19", "testId": 19, @@ -2597,7 +2619,7 @@ "lineNumber": 90 }, { - "__docId__": 135, + "__docId__": 137, "kind": "test", "name": "describe20", "testId": 20, @@ -2613,7 +2635,7 @@ ] }, { - "__docId__": 136, + "__docId__": 138, "kind": "test", "name": "it21", "testId": 21, @@ -2626,7 +2648,7 @@ "lineNumber": 95 }, { - "__docId__": 137, + "__docId__": 139, "kind": "test", "name": "it22", "testId": 22, @@ -2639,7 +2661,7 @@ "lineNumber": 97 }, { - "__docId__": 138, + "__docId__": 140, "kind": "test", "name": "it23", "testId": 23, @@ -2652,7 +2674,7 @@ "lineNumber": 99 }, { - "__docId__": 139, + "__docId__": 141, "kind": "test", "name": "it24", "testId": 24, @@ -2665,7 +2687,7 @@ "lineNumber": 101 }, { - "__docId__": 140, + "__docId__": 142, "kind": "testFile", "name": "template.node.hapi/src/dataservices/note.service.spec.js", "content": "import NoteDataservice from './note.service.js';\nimport mariadb from '../helpers/mariadb.helper.js';\n\n/** @test {NoteDataservice} */\ndescribe('NoteDataservice', function() {\n\n /**\n * Question:\n * Should we test that mariadb fetchStub is called? Seems like \"white-box\" testing, but also\n * we need to stub the query anyways..\n *\n * Maybe we should be testing that note object has properties we expect and dataservice should\n * ensure we return those properties. Flow doesn't check this?\n * Maybe just test things that affect the application output, like if the mariadb helper returns\n * bad values what is response\n */\n\n /** @test {NoteDataservice.getNote} */\n describe('getNote()', function() {\n let fetchStub;\n beforeEach(function() {\n // Create stubs and fakes here on mariadbhelper, should we create a larger fake object class?\n fetchStub = sinonSandbox.stub(mariadb, 'fetchOne');\n });\n\n it('should return a note object with matching id', async function() {\n fetchStub.resolves({ id: 1, name: 'abc' });\n const id = 1;\n\n const result = await NoteDataservice.getNote({ id });\n\n expect(result).to.contain({ id, name: 'abc' });\n });\n\n it('should throw error if id is invalid', async function() {\n const promise = NoteDataservice.getNote({ id: 'abc' });\n\n await expect(promise).to.be.rejected;\n });\n\n it('should throw error if id doesnt return note', async function() {\n // Hide logging from exception message\n sinonSandbox.stub(console, 'log');\n\n fetchStub.resolves(undefined);\n\n const promise = NoteDataservice.getNote({ id: 1 });\n await expect(promise).to.be.rejected;\n });\n\n it('should throw error with code if mysql unreachable');\n });\n\n /** @test {NoteDataservice.createNote} */\n describe('createNote()', function() {\n it('should return a note with the name passed');\n });\n\n /** @test {NoteDataservice.createNotes} */\n describe('createNotes()', function() {\n it('should return same number of notes passed to be created');\n });\n});\n", @@ -2676,7 +2698,7 @@ "lineNumber": 1 }, { - "__docId__": 141, + "__docId__": 143, "kind": "test", "name": "describe25", "testId": 25, @@ -2692,7 +2714,7 @@ ] }, { - "__docId__": 142, + "__docId__": 144, "kind": "test", "name": "describe26", "testId": 26, @@ -2708,7 +2730,7 @@ ] }, { - "__docId__": 143, + "__docId__": 145, "kind": "test", "name": "it27", "testId": 27, @@ -2721,7 +2743,7 @@ "lineNumber": 26 }, { - "__docId__": 144, + "__docId__": 146, "kind": "test", "name": "it28", "testId": 28, @@ -2734,7 +2756,7 @@ "lineNumber": 35 }, { - "__docId__": 145, + "__docId__": 147, "kind": "test", "name": "it29", "testId": 29, @@ -2747,7 +2769,7 @@ "lineNumber": 41 }, { - "__docId__": 146, + "__docId__": 148, "kind": "test", "name": "it30", "testId": 30, @@ -2760,7 +2782,7 @@ "lineNumber": 51 }, { - "__docId__": 147, + "__docId__": 149, "kind": "test", "name": "describe31", "testId": 31, @@ -2776,7 +2798,7 @@ ] }, { - "__docId__": 148, + "__docId__": 150, "kind": "test", "name": "it32", "testId": 32, @@ -2789,7 +2811,7 @@ "lineNumber": 56 }, { - "__docId__": 149, + "__docId__": 151, "kind": "test", "name": "describe33", "testId": 33, @@ -2805,7 +2827,7 @@ ] }, { - "__docId__": 150, + "__docId__": 152, "kind": "test", "name": "it34", "testId": 34, @@ -2818,7 +2840,7 @@ "lineNumber": 61 }, { - "__docId__": 151, + "__docId__": 153, "kind": "testFile", "name": "template.node.hapi/src/helpers/mariadb.helper.spec.js", "content": "// import mariaDbHelper from 'mariadb.helper.js';\n\n// Q: should we write this spec file? It seems like we're just testing things that won't be affected by\n// anything... and may just change later.\n//\n// Do we want to test that the correct query strings are sent to the mariadb library?\n// Seems like too much\n//\n// Seems like white box testing so I'm not going to do it right now\n\n/* @test {MariaDBHelper} */\n// describe('MariaDBHelper', () => {\n// describe('constructor', () => {\n// it('should not do anything if in test mode');\n//\n// it('should require a config or transactionConnection');\n// });\n//\n// describe('shutdown()');\n//\n// describe('query()');\n//\n// describe('fetch()');\n//\n// describe('fetchOne()');\n//\n// describe('insert()');\n// });\n", diff --git a/docs/lint.json b/docs/lint.json index bf0b25c..f9a7e2e 100644 --- a/docs/lint.json +++ b/docs/lint.json @@ -4,32 +4,32 @@ "filePath": "src/base/server.js", "lines": [ { - "lineNumber": 126, - "line": " * Starts the server and registers any plugins" + "lineNumber": 98, + "line": "" }, { - "lineNumber": 127, - "line": " * @return {Promise} Resolves once server has started" + "lineNumber": 99, + "line": " // Create `logs` directory (so we only see errors and console logs in process out)" }, { - "lineNumber": 128, - "line": " */" + "lineNumber": 100, + "line": " if (!fs.existsSync(this.logDir)) {" }, { - "lineNumber": 129, - "line": " async run() {" + "lineNumber": 101, + "line": " fs.mkdirSync(this.logDir);" }, { - "lineNumber": 130, - "line": " await this.server.start();" + "lineNumber": 102, + "line": " }" }, { - "lineNumber": 131, - "line": " process.stdout.write('\\n\\n' + this.name + ' started on ' + this.server.info.port + '\\n\\n');" + "lineNumber": 103, + "line": "" }, { - "lineNumber": 132, - "line": "" + "lineNumber": 104, + "line": " await this.server.register({" } ], "codeParams": [ diff --git a/docs/manual/README.controllers.html b/docs/manual/README.controllers.html index 8749d01..22b3469 100644 --- a/docs/manual/README.controllers.html +++ b/docs/manual/README.controllers.html @@ -74,8 +74,8 @@ @@ -83,17 +83,19 @@
        diff --git a/docs/manual/README.dataservices.html b/docs/manual/README.dataservices.html index 4ee0cd7..4383d20 100644 --- a/docs/manual/README.dataservices.html +++ b/docs/manual/README.dataservices.html @@ -74,8 +74,8 @@
        @@ -83,17 +83,19 @@
        @@ -106,26 +108,20 @@
        -

        Dataservices

        Dataservices communicate with storage systems or external APIs to fetch/store data.

        -

        Hello World

        Simple example of Hello World endpoint plus example with random value and input from path parameter

        -

        Note Dataservice

        Create/Read Note objects out of a mariadb/mysql database

        +

        Dataservices

        Dataservices abstract the communication with storage systems or external APIs to fetch/store data related to a +topic or for a specific UI component.

        +

        Examples

        Note Dataservice

        Create/Read Note objects out of a mariadb/mysql database

        Notes/Ideas

          -
        • RDBMS vs Document store
            -
          • CAP theorem stands for C – Consistency, A — Availability, P — Partitioning (or Scalability) and states that having all three properties at the same time is not possible,
          • -
          • https://medium.com/statuscode/three-reasons-to-use-a-nosql-document-store-for-your-next-web-application-6b9eabffc8d8
          • -
          • Document Store:
              -
            • use for settings data and where schema will be changed often
            • -
            • when changes are small crud, based on users interactions?
            • -
            • when count and aggregate data is useful to end user
            • -
            -
          • -
          • RDBMS:
              -
            • less duplicated data, normalized and stored in specific tables
            • -
            • useful when data changes often
            • -
            • seems like more useful for storing fact data in ETL processes?
            • -
            • Q: phoenix?
            • +
            • Quick storage dataservice (abstracted away from specific object?)
                +
              • takes object from post/put request and places in mongodb
              • +
              • objects indexed by another param
              • +
              • automatically assigned id
              • +
              • retrieves with get request
              • +
              • delete request
                  +
                • takes multiple object ids
              • +
              • search/or retrieve by property?
            diff --git a/docs/manual/README.entry.html b/docs/manual/README.entry.html index 8db03ab..606fbad 100644 --- a/docs/manual/README.entry.html +++ b/docs/manual/README.entry.html @@ -74,8 +74,8 @@
        @@ -83,17 +83,19 @@
        diff --git a/docs/manual/README.helpers.html b/docs/manual/README.helpers.html index 5e2c14e..36e77c1 100644 --- a/docs/manual/README.helpers.html +++ b/docs/manual/README.helpers.html @@ -74,8 +74,8 @@
        @@ -83,17 +83,19 @@
        @@ -106,25 +108,42 @@
        -

        Helpers

        Helpers are classes that wrap some functionality not associated with an external service

        -

        MariaDB

          -
        • connecting with mariadb server
            -
          • query
          • -
          • insert
          • -
          • fetch
          • -
          • fetchOne
          • +

            Helpers

            Helpers are classes that modularize some functionality that is useful in the server.

            +

            Examples

            MariaDB

            Helper class for connecting with mariadb server and saving/retrieving rows from tables

            +
            - query
            +- insert
            +- fetch
            +- fetchOne
            +

            Config

            Helper class for reading properties from config file

            +
              +
            • provides a typed interface of these properties
            - -
          -

          Config

          -

          Healthcheck

            -
          • Make simple requests to configured DB/External Services to see if available
          • +

            Healthcheck

            Helper for building the healthcheck response that is displayed at <CONFIG.PATHS.healthceck> endpoint.

            +
              +
            • Determines version/branch and if the server is running properly
            • +
            • Makes simple requests to configured dependency DB/External Services to see if they are available

            Notes/Ideas

              +
            • IDEA: Should healthcheck read log file for past minute to see if any errors?
            • Do we want/need to worry about Dependency Injection/Singletons?
            • -
            • IDEA: Move Server into helpers as server.helper.js?
            • +
            • RDBMS vs Document store
                +
              • CAP theorem stands for C – Consistency, A — Availability, P — Partitioning (or Scalability) and states that having all three properties at the same time is not possible,
              • +
              • https://medium.com/statuscode/three-reasons-to-use-a-nosql-document-store-for-your-next-web-application-6b9eabffc8d8
              • +
              • Document Store:
                  +
                • use for settings data and where schema will be changed often
                • +
                • when changes are small crud, based on users interactions?
                • +
                • when count and aggregate data is useful to end user
                • +
                +
              • +
              • RDBMS:
                  +
                • less duplicated data, normalized and stored in specific tables
                • +
                • useful when data changes often
                • +
                • seems like more useful for storing fact data in ETL processes?
                • +
                • Q: phoenix?
                • +
                +
              • +
              +
        diff --git a/docs/manual/README.hooks.html b/docs/manual/README.hooks.html index 728f6b7..cda2d1a 100644 --- a/docs/manual/README.hooks.html +++ b/docs/manual/README.hooks.html @@ -74,8 +74,8 @@
        @@ -83,17 +83,19 @@
        @@ -106,7 +108,7 @@
        -

        Git Hooks

        We use githooks(github) to help clean up and enforce the workflow for developers. This is done with Husky.

        +

        Git Hooks/Workflow

        We use githooks(github) to help clean up and enforce the workflow for developers. This is done with Husky.

        NOTE: We prevent commits to master branch on local machine (so all changes to master are PRs on github). You may want to disable this for more rapid local development, you can just remove the configuration in package.json(github) that adds these hooks.

        On commit

        Before each commit, we want to verify that the build won't break. So we make sure to run the build process one more time with only the committed files before letting the commit go through:

        @@ -116,6 +118,9 @@

        On commit

        Before each commit, we want to verify that t

      • Run linting/flow/compliation and tests with npm/webpack
      • Pop uncommitted changes
      • +

        Github Actions

        We setup github actions on this project so we can attempt to build and run the tests for every PR submitted +against master.

        +

        More to come...

        diff --git a/docs/manual/README.logging.html b/docs/manual/README.logging.html index d55edea..66af3da 100644 --- a/docs/manual/README.logging.html +++ b/docs/manual/README.logging.html @@ -74,8 +74,8 @@
        @@ -83,17 +83,19 @@
        @@ -108,7 +110,7 @@

        Logging

        We are currently using pino for logging. Pino logs objects/messages directly to streams so other processes can actually handle formatting or other log actions (this is because Node is single threaded, so smarter to create -another process to manage the logs). We store all of these files in <CONFIG.LOG.dir>/pino.log

        +another process to manage the logs). We store all of these logs in <CONFIG.LOG.dir>/pino.log

        Configurations

        Some settings can be configured in the config.yaml(github) file:

        • The debug property shows error messages and stack traces in the stdout of the server process (for @@ -143,10 +145,10 @@

          What we log

            ... return things?... } -

            Other processes

            Other node processes should be spawned (in production and development), here are some examples of processes -we recommend:

            -

            Logrotate

            By design, pino just outputs logs to be used by other "transporters". Log Rotation should be handled via -another service as described in the pino documention

            +

            Other processes

            By design, pino just outputs logs to be used by other "transporters" (other node processes spawned in +production and development) for reacting to, and viewing these logs. here are some examples of processes +we recommend implementing:

            +

            Logrotate

            Log Rotation on production servers should be handled via another service as described in the pino documention

            Pino-Pretty

            Displays the logs in a prettier format that makes it easier to see the data, however takes up more space. To use, pipe the log file to pino-pretty executable: tail -f logs/pino.log | ./node_modules/.bin/pino-pretty -t

            @@ -194,11 +196,13 @@

            Pino-Pretty

            Displays the logs in a prettier format t

          Notes/Ideas

            -
          • Log Helper for use in the dataservices
          • +
          • Trace logging any external requests/responses
          • +
          • Logger Helper for use in the dataservices
          • goaccess?
          • websocket? endpoint that shows logs in real time
          • docs page for logs (searching?)
          • Elasticsearch/Logstash/Kibana
          • +
          • logrotate on production
        diff --git a/docs/manual/README.setup.html b/docs/manual/README.setup.html index 457fb06..bde9115 100644 --- a/docs/manual/README.setup.html +++ b/docs/manual/README.setup.html @@ -74,8 +74,8 @@
        @@ -83,17 +83,19 @@
        @@ -110,7 +112,7 @@ manage node versions is by using the Node Version Manager. We define a .nvm file in the project to help reference this minimum node version.

        Use nvm use 10 to switch node versions after installing a new Node version. Then you should install all -project dependencies(github) +project dependencies(github) with npm install (or npm install -D if development work is planned). This should install the Hapi Server Framework, MariaDB and other libraries used in this project.

        If you have cloned the master branch, then the build should compile and all tests should pass once the @@ -129,7 +131,7 @@ file(source) (Eventually we will autogenerate OpenAPI file from code annotations and create Postman test suites based on these files)

        Webpack

        Webpack config file(github) -is used to manage our webpack build to compile the application.

        +is used to manage our webpack build to compile the application.

        In this file we:

        • designate the files that will be created with the build
        • @@ -149,11 +151,12 @@

          Documentation

          The docs/ directory is

          The Dependency Graph is created with Madge and graphviz, you will need to install both in order to update the dependency graph. I didn't include these in the package.json dependencies because I felt this is more than is needed to develop a working app or even write basic documentation.

          -

          Install madge with npm install madge and install graphviz with brew install graphviz or +

          Install madge with npm install -g madge and install graphviz with brew install graphviz or port install graphviz (for OSX)

          I split this out to a separate npm script: npm run doc-image

          Notes/Ideas

        diff --git a/docs/manual/README.test.html b/docs/manual/README.test.html index daf7340..4d71083 100644 --- a/docs/manual/README.test.html +++ b/docs/manual/README.test.html @@ -74,8 +74,8 @@ @@ -83,17 +83,19 @@
        diff --git a/docs/manual/index.html b/docs/manual/index.html index f0a5037..71c7acd 100644 --- a/docs/manual/index.html +++ b/docs/manual/index.html @@ -74,8 +74,8 @@
        @@ -83,17 +83,19 @@
        @@ -130,7 +132,7 @@

        Setup

        Requires Node 10+. Please install this before attempting to run. The easiest way to install and manage node versions is by using the Node Version Manager. We define a .nvm file in the project to help reference this minimum node version.

        Use nvm use 10 to switch node versions after installing a new Node version. Then you should install all -project dependencies(github) +project dependencies(github) with npm install (or npm install -D if development work is planned). This should install the Hapi Server Framework, MariaDB and other libraries used in this project.

        If you have cloned the master branch, then the build should compile and all tests should pass once the dependencies have been downloaded and installed. To only compile the server, use npm run build, or you can @@ -145,7 +147,7 @@ developed. There is a Swagger application at the API link in the docs or can view the raw file(source) (Eventually we will autogenerate OpenAPI file from code annotations and create Postman test suites based on these files)

        Webpack

        Webpack config file(github) -is used to manage our webpack build to compile the application.

        In this file we:

          +is used to manage our webpack build to compile the application.

          In this file we:

          • designate the files that will be created with the build
          • define the source mapping that will be generated with the output (this should be changed in prod)
          • set the target environment and available globals
          • @@ -160,9 +162,10 @@

          Documentation

          The docs/ directory is created with npm run doc, this generates an esdoc webpage based on the modified template stored in docs/template.

          The Dependency Graph is created with Madge and graphviz, you will need to install both in order to update the dependency graph. I didn't include these in the package.json dependencies -because I felt this is more than is needed to develop a working app or even write basic documentation.

          Install madge with npm install madge and install graphviz with brew install graphviz or +because I felt this is more than is needed to develop a working app or even write basic documentation.

          Install madge with npm install -g madge and install graphviz with brew install graphviz or port install graphviz (for OSX)

          I split this out to a separate npm script: npm run doc-image

          Notes/Ideas

        @@ -183,7 +186,7 @@

        Logging

        We are currently using pino for logging. Pino logs objects/messages directly to streams so other processes can actually handle formatting or other log actions (this is because Node is single threaded, so smarter to create -another process to manage the logs). We store all of these files in <CONFIG.LOG.dir>/pino.log

        Configurations

        Some settings can be configured in the config.yaml(github) file:

          +another process to manage the logs). We store all of these logs in <CONFIG.LOG.dir>/pino.log

          Configurations

          Some settings can be configured in the config.yaml(github) file:

          • The debug property shows error messages and stack traces in the stdout of the server process (for development)
          • The dir property defines the directory to save log files in
          • @@ -213,9 +216,9 @@ ... return things?... } -

            Other processes

            Other node processes should be spawned (in production and development), here are some examples of processes -we recommend:

            Logrotate

            By design, pino just outputs logs to be used by other "transporters". Log Rotation should be handled via -another service as described in the pino documention

            Pino-Pretty

            Displays the logs in a prettier format that makes it easier to see the data, however takes up more space. +

            Other processes

            By design, pino just outputs logs to be used by other "transporters" (other node processes spawned in +production and development) for reacting to, and viewing these logs. here are some examples of processes +we recommend implementing:

            Logrotate

            Log Rotation on production servers should be handled via another service as described in the pino documention

            Pino-Pretty

            Displays the logs in a prettier format that makes it easier to see the data, however takes up more space. To use, pipe the log file to pino-pretty executable: tail -f logs/pino.log | ./node_modules/.bin/pino-pretty -t

            See CLI arguments for more control of output:

            • remove -t for epoch
            • @@ -259,11 +262,13 @@ responseTime: 6

            Notes/Ideas

              -
            • Log Helper for use in the dataservices
            • +
            • Trace logging any external requests/responses
            • +
            • Logger Helper for use in the dataservices
            • goaccess?
            • websocket? endpoint that shows logs in real time
            • docs page for logs (searching?)
            • Elasticsearch/Logstash/Kibana
            • +
            • logrotate on production
        @@ -306,7 +311,38 @@
        -

        Dataservices

        Dataservices communicate with storage systems or external APIs to fetch/store data.

        Hello World

        Simple example of Hello World endpoint plus example with random value and input from path parameter

        Note Dataservice

        Create/Read Note objects out of a mariadb/mysql database

        Notes/Ideas

          +

          Dataservices

          Dataservices abstract the communication with storage systems or external APIs to fetch/store data related to a +topic or for a specific UI component.

          Examples

          Note Dataservice

          Create/Read Note objects out of a mariadb/mysql database

          Notes/Ideas

            +
          • Quick storage dataservice (abstracted away from specific object?)
              +
            • takes object from post/put request and places in mongodb
            • +
            • objects indexed by another param
            • +
            • automatically assigned id
            • +
            • retrieves with get request
            • +
            • delete request
                +
              • takes multiple object ids
              • +
              +
            • +
            • search/or retrieve by property?
            • +
            +
          • +
          + +
        +
        +
        +
        +

        Helpers

        Helpers are classes that modularize some functionality that is useful in the server.

        Examples

        MariaDB

        Helper class for connecting with mariadb server and saving/retrieving rows from tables

        - query
        +- insert
        +- fetch
        +- fetchOne
        +

        Config

        Helper class for reading properties from config file

          +
        • provides a typed interface of these properties
        • +

        Healthcheck

        Helper for building the healthcheck response that is displayed at <CONFIG.PATHS.healthceck> endpoint.

          +
        • Determines version/branch and if the server is running properly
        • +
        • Makes simple requests to configured dependency DB/External Services to see if they are available
        • +

        Notes/Ideas

        - -
        -
        -
        -
        -

        Helpers

        Helpers are classes that wrap some functionality not associated with an external service

        MariaDB

          -
        • connecting with mariadb server
            -
          • query
          • -
          • insert
          • -
          • fetch
          • -
          • fetchOne
          • -
          -
        • -

        Config

        Healthcheck

          -
        • Make simple requests to configured DB/External Services to see if available
        • -

        Notes/Ideas

          -
        • Do we want/need to worry about Dependency Injection/Singletons?
        • -
        • IDEA: Move Server into helpers as server.helper.js?
        -

        Git Hooks

        We use githooks(github) to help clean up and enforce the workflow for developers. This is done with Husky.

        NOTE: We prevent commits to master branch on local machine (so all changes to master are PRs on github). You may want to disable this for more rapid local development, you can just remove the configuration in package.json(github) that adds these hooks.

        On commit

        Before each commit, we want to verify that the build won't break. So we make sure to run the build process one more time with only the committed files before +

        Git Hooks/Workflow

        We use githooks(github) to help clean up and enforce the workflow for developers. This is done with Husky.

        NOTE: We prevent commits to master branch on local machine (so all changes to master are PRs on github). You may want to disable this for more rapid local development, you can just remove the configuration in package.json(github) that adds these hooks.

        On commit

        Before each commit, we want to verify that the build won't break. So we make sure to run the build process one more time with only the committed files before letting the commit go through:

        Process:

        1. Stash uncommited changes
        2. Run linting/flow/compliation and tests with npm/webpack
        3. Pop uncommitted changes
        4. -
        +

        Github Actions

        We setup github actions on this project so we can attempt to build and run the tests for every PR submitted +against master.

        More to come...

        diff --git a/docs/script/search_index.js b/docs/script/search_index.js index 4de7ade..539768a 100644 --- a/docs/script/search_index.js +++ b/docs/script/search_index.js @@ -36,9 +36,9 @@ window.esdocSearchIndex = [ "class" ], [ - "hapiserver/src/base/server.js~requesterror", - "class/src/base/server.js~RequestError.html", - "RequestError HapiServer/src/base/server.js", + "hapiserver/src/base/request/request-error.model.js~requesterror", + "class/src/base/request/request-error.model.js~RequestError.html", + "RequestError HapiServer/src/base/request/request-error.model.js", "class" ], [ @@ -558,23 +558,35 @@ window.esdocSearchIndex = [ "external" ], [ - "src/base/server.js", - "file/src/base/server.js.html", - "src/base/server.js", + "src/base/request/hapi-request.interface.js", + "file/src/base/request/hapi-request.interface.js.html", + "src/base/request/hapi-request.interface.js", + "file" + ], + [ + "src/base/request/request-error.model.js", + "file/src/base/request/request-error.model.js.html", + "src/base/request/request-error.model.js", "file" ], [ - "src/base/server.js~requesterror#code", - "class/src/base/server.js~RequestError.html#instance-member-code", - "src/base/server.js~RequestError#code", + "src/base/request/request-error.model.js~requesterror#code", + "class/src/base/request/request-error.model.js~RequestError.html#instance-member-code", + "src/base/request/request-error.model.js~RequestError#code", "member" ], [ - "src/base/server.js~requesterror#constructor", - "class/src/base/server.js~RequestError.html#instance-constructor-constructor", - "src/base/server.js~RequestError#constructor", + "src/base/request/request-error.model.js~requesterror#constructor", + "class/src/base/request/request-error.model.js~RequestError.html#instance-constructor-constructor", + "src/base/request/request-error.model.js~RequestError#constructor", "method" ], + [ + "src/base/server.js", + "file/src/base/server.js.html", + "src/base/server.js", + "file" + ], [ "src/base/server.js~server#addendpoint", "class/src/base/server.js~Server.html#instance-method-addEndpoint", diff --git a/docs/source.html b/docs/source.html index 15e48ee..06148e4 100644 --- a/docs/source.html +++ b/docs/source.html @@ -37,8 +37,8 @@
      + + + + + + + + + + + + + + + + - + - - - + + + - + - + - - - + + + - + - + - + - + - - - + + + @@ -121,16 +136,16 @@ - + - - - + + + diff --git a/docs/test-file/template.node.hapi/src/controllers/hello.controller.spec.js.html b/docs/test-file/template.node.hapi/src/controllers/hello.controller.spec.js.html index 280d40a..801c4c3 100644 --- a/docs/test-file/template.node.hapi/src/controllers/hello.controller.spec.js.html +++ b/docs/test-file/template.node.hapi/src/controllers/hello.controller.spec.js.html @@ -37,8 +37,8 @@
      • Fmain
      • -
      • baseCRequestError
      • -
      • CServer
      • +
      • baseCServer
      • +
      • base/requestCRequestError
      • controllersCHelloWorld
      • CNoteController
      • dataservicesCNoteDataservice
      • diff --git a/docs/test-file/template.node.hapi/src/controllers/note.controller.spec.js.html b/docs/test-file/template.node.hapi/src/controllers/note.controller.spec.js.html index 0b11dc9..844af40 100644 --- a/docs/test-file/template.node.hapi/src/controllers/note.controller.spec.js.html +++ b/docs/test-file/template.node.hapi/src/controllers/note.controller.spec.js.html @@ -37,8 +37,8 @@
        • Fmain
        • -
        • baseCRequestError
        • -
        • CServer
        • +
        • baseCServer
        • +
        • base/requestCRequestError
        • controllersCHelloWorld
        • CNoteController
        • dataservicesCNoteDataservice
        • diff --git a/docs/test-file/template.node.hapi/src/dataservices/note.service.spec.js.html b/docs/test-file/template.node.hapi/src/dataservices/note.service.spec.js.html index d3fc8fc..bd33bb5 100644 --- a/docs/test-file/template.node.hapi/src/dataservices/note.service.spec.js.html +++ b/docs/test-file/template.node.hapi/src/dataservices/note.service.spec.js.html @@ -37,8 +37,8 @@
          • Fmain
          • -
          • baseCRequestError
          • -
          • CServer
          • +
          • baseCServer
          • +
          • base/requestCRequestError
          • controllersCHelloWorld
          • CNoteController
          • dataservicesCNoteDataservice
          • diff --git a/docs/test-file/template.node.hapi/src/helpers/mariadb.helper.spec.js.html b/docs/test-file/template.node.hapi/src/helpers/mariadb.helper.spec.js.html index fd6d2eb..73daaa9 100644 --- a/docs/test-file/template.node.hapi/src/helpers/mariadb.helper.spec.js.html +++ b/docs/test-file/template.node.hapi/src/helpers/mariadb.helper.spec.js.html @@ -37,8 +37,8 @@
            • Fmain
            • -
            • baseCRequestError
            • -
            • CServer
            • +
            • baseCServer
            • +
            • base/requestCRequestError
            • controllersCHelloWorld
            • CNoteController
            • dataservicesCNoteDataservice
            • diff --git a/docs/test.html b/docs/test.html index 904ae2c..4032c07 100644 --- a/docs/test.html +++ b/docs/test.html @@ -37,8 +37,8 @@
              • Fmain
              • -
              • baseCRequestError
              • -
              • CServer
              • +
              • baseCServer
              • +
              • base/requestCRequestError
              • controllersCHelloWorld
              • CNoteController
              • dataservicesCNoteDataservice
              • diff --git a/docs/variable/index.html b/docs/variable/index.html index 5400495..59594e4 100644 --- a/docs/variable/index.html +++ b/docs/variable/index.html @@ -37,8 +37,8 @@
                • Fmain
                • -
                • baseCRequestError
                • -
                • CServer
                • +
                • baseCServer
                • +
                • base/requestCRequestError
                • controllersCHelloWorld
                • CNoteController
                • dataservicesCNoteDataservice
                • @@ -203,11 +203,11 @@

                  - source + source

                  -
                  import healthcheckHelper from 'HapiServer/src/helpers/healthcheck.helper.js'
                  +
                  import healthcheckHelper from 'HapiServer/src/helpers/healthcheck.helper.js'
                  diff --git a/package-lock.json b/package-lock.json index 9289388..615522c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2650,7 +2650,7 @@ "args": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/args/-/args-5.0.1.tgz", - "integrity": "sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ==", + "integrity": "sha1-S/KY35CkeZoJUhNixXknjML912E=", "requires": { "camelcase": "5.0.0", "chalk": "2.4.2", @@ -4289,7 +4289,7 @@ "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==" + "integrity": "sha1-puN0maTZqc+F71hyBE1ikByYia4=" }, "debug": { "version": "2.6.9", @@ -8830,7 +8830,7 @@ "mri": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", - "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==" + "integrity": "sha1-fLHdG5tAkF8frAU6viW2cg9EdEo=" }, "ms": { "version": "2.0.0", @@ -11227,7 +11227,7 @@ "split2": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz", - "integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==", + "integrity": "sha1-xR8Y8+BqjERpqqtIdofY2VYWC7Y=", "requires": { "readable-stream": "^3.0.0" }, diff --git a/package.json b/package.json index e5818d3..2634866 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "build": "./node_modules/.bin/webpack", "clean": "rm -rf ./dist", "help": "echo \"$(cat help.txt)\"", - "doc-image": "./node_modules/madge/bin/cli.js ./src -x '.*\\.spec\\.js' -i docs/image/dependency.png & npm run doc" + "doc-image": "madge ./src -i docs/image/dependency.png & npm run doc" }, "husky": { "hooks": { diff --git a/scripts/hooks/README.hooks.md b/scripts/hooks/README.hooks.md index dcdcad6..29f50b6 100644 --- a/scripts/hooks/README.hooks.md +++ b/scripts/hooks/README.hooks.md @@ -1,4 +1,4 @@ -# Git Hooks +# Git Hooks/Workflow We use githooks([github](https://github.com/devlinjunker/template.node.hapi/tree/master/scripts/hooks)) to help clean up and enforce the workflow for developers. This is done with Husky. @@ -12,3 +12,11 @@ Process: 1. Stash uncommited changes 2. Run linting/flow/compliation and tests with npm/webpack 3. Pop uncommitted changes + + +## Github Actions + +We setup github actions on this project so we can attempt to build and run the tests for every PR submitted +against master. + +More to come... diff --git a/src/base/request/hapi-request.interface.js b/src/base/request/hapi-request.interface.js new file mode 100644 index 0000000..a3bc273 --- /dev/null +++ b/src/base/request/hapi-request.interface.js @@ -0,0 +1,30 @@ +/** + * @flow + */ +/* eslint-disable flowtype/no-weak-types */ + +/** +* Request Object that is passed to the controller function as the first parameter +* from https://github.com/hapijs/hapi/blob/master/API.md#request +* @type {HapiRequest} +*/ +export interface HapiRequest { + server: any; + headers: any; + // from path + params: any; + // Body of a POST request + payload: any; + logger: any; +}; + + +/** + * Hapi Handler for returning messages or setting error codes during requests + * @type {HapiHandler} + */ +export interface HapiHandler { + code: Function; + response: Function; + redirect: Function; +} diff --git a/src/base/request/request-error.model.js b/src/base/request/request-error.model.js new file mode 100644 index 0000000..39bbba8 --- /dev/null +++ b/src/base/request/request-error.model.js @@ -0,0 +1,21 @@ +/** + * @flow + */ + +/** + * Request Error Class to help set a response code and message to display to the user + * @type {RequestError} + */ +export default class RequestError extends Error { + code: number; + + /** + * Create a new Request Error + * @param {string} msg message to display when returned + * @param {number} code response status code to set in Hapi Response + */ + constructor(msg: string, code: number) { + super(msg); + this.code = code; + } +} diff --git a/src/base/server.js b/src/base/server.js index 696a687..302e2ef 100644 --- a/src/base/server.js +++ b/src/base/server.js @@ -1,13 +1,17 @@ /** * @flow */ + /* eslint-disable import/first */ +/* eslint-disable import/prefer-default-export */ +/* eslint-disable flowtype/no-weak-types */ + require('source-map-support/register'); require('@babel/register'); require('@babel/polyfill'); import fs from 'fs'; -import path from 'path'; +import Path from 'path'; import pino from 'pino'; import Pino from 'hapi-pino'; import Hapi from '@hapi/hapi'; @@ -28,53 +32,9 @@ const LOG_DIR_DEFAULT: string = 'logs'; export interface EndpointConfig { method: string; path: string; - controller: any; // eslint-disable-line -} - -/** - * Hapi Handler for returning messages or setting error codes during requests - * @type {HapiHandler} - */ -export interface HapiHandler { - code: Function; // eslint-disable-line - response: Function; // eslint-disable-line - redirect: Function; //eslint-disable-line -} - -/** - * Request Error Class to help set a response code and message to display to the user - * @type {RequestError} - */ -export class RequestError extends Error { - code: number; - - /** - * Create a new Request Error - * @param {string} msg message to display when returned - * @param {number} code response status code to set in Hapi Response - */ - constructor(msg: string, code: number) { - super(msg); - this.code = code; - } + controller: any; } -/** - * Request Object that is passed to the controller function as the first parameter - * from https://github.com/hapijs/hapi/blob/master/API.md#request - * @type {HapiRequest} - */ -export interface HapiRequest { - server: any; // eslint-disable-line - headers: any; // eslint-disable-line - // from path - params: any; // eslint-disable-line - // Body of a POST request - payload: any; // eslint-disable-line - logger: any; // eslint-disable-line -}; - - export interface ServerParams { name: string; port: number; @@ -90,7 +50,7 @@ export interface ServerParams { * @type {Server} */ export class Server { - server: any; // eslint-disable-line + server: any; name: string; logDir: string; @@ -113,7 +73,7 @@ export class Server { * @param {Function} callback callback to run after server has shutdown * @return {undefined} no return */ - shutdown(callback: Function) { // eslint-disable-line flowtype/no-weak-types + shutdown(callback: Function) { // TODO: Set Shutdown Timeout from config this.server.stop({ timeout: 10000 }).then((err: Error) => { if (err) { @@ -152,7 +112,7 @@ export class Server { 'request-error' ], // Creates a log of all the requests made and info as well as response status error/success - stream: pino.destination(path.resolve(this.logDir, 'pino.log')) + stream: pino.destination(Path.resolve(this.logDir, 'pino.log')) } }); @@ -176,7 +136,7 @@ export class Server { * @param {EndpointConfig} endpoint configuration * @return {undefined} */ - addEndpoint({ method, path, controller }: EndpointConfig) { // eslint-disable-line no-shadow + addEndpoint({ method, path, controller }: EndpointConfig) { this.server.route({ method, path, diff --git a/src/controllers/admin.controller.js b/src/controllers/admin.controller.js index 92ad773..5e5d5b7 100644 --- a/src/controllers/admin.controller.js +++ b/src/controllers/admin.controller.js @@ -3,7 +3,7 @@ * * NOTE: This file will not be included in the esdoc list because it doesn't export any identifiers */ -import { HapiRequest } from '../base/server.js'; +import { HapiRequest } from '../base/request/hapi-request.interface.js'; import CONFIG from '../helpers/config.helper.js'; import healthcheckHelper from '../helpers/healthcheck.helper.js'; diff --git a/src/controllers/hello.controller.js b/src/controllers/hello.controller.js index fac5dfc..c00d58a 100644 --- a/src/controllers/hello.controller.js +++ b/src/controllers/hello.controller.js @@ -1,8 +1,7 @@ /** * @flow */ -// For some reason this can't use the `app` alias but can do relative pathing here... :/ -import { HapiRequest } from '../base/server.js'; +import { HapiRequest } from '../base/request/hapi-request.interface.js'; /** * Controllers for Basic "Hello World" Functions diff --git a/src/controllers/note.controller.js b/src/controllers/note.controller.js index 3679662..7c64082 100644 --- a/src/controllers/note.controller.js +++ b/src/controllers/note.controller.js @@ -1,7 +1,7 @@ /** * @flow */ -import { HapiRequest, HapiHandler } from '../base/server.js'; +import { HapiRequest, HapiHandler } from '../base/request/hapi-request.interface.js'; import NoteDataservice, { Note } from '../dataservices/note.service.js'; /** diff --git a/src/dataservices/README.dataservices.md b/src/dataservices/README.dataservices.md index 2aa5a5d..c2d3f43 100644 --- a/src/dataservices/README.dataservices.md +++ b/src/dataservices/README.dataservices.md @@ -1,27 +1,20 @@ # Dataservices -Dataservices communicate with storage systems or external APIs to fetch/store data. +Dataservices abstract the communication with storage systems or external APIs to fetch/store data related to a +topic or for a specific UI component. +## Examples -## Hello World - -Simple example of Hello World endpoint plus example with random value and input from path parameter - -## Note Dataservice - +### Note Dataservice Create/Read Note objects out of a mariadb/mysql database ## Notes/Ideas - - RDBMS vs Document store - - CAP theorem stands for C – Consistency, A — Availability, P — Partitioning (or Scalability) and states that having all three properties at the same time is not possible, - - https://medium.com/statuscode/three-reasons-to-use-a-nosql-document-store-for-your-next-web-application-6b9eabffc8d8 - - Document Store: - - use for settings data and where schema will be changed often - - when changes are small crud, based on users interactions? - - when count and aggregate data is useful to end user - - RDBMS: - - less duplicated data, normalized and stored in specific tables - - useful when data changes often - - seems like more useful for storing fact data in ETL processes? - - Q: phoenix? +- Quick storage dataservice (abstracted away from specific object?) + - takes object from post/put request and places in mongodb + - objects indexed by another param + - automatically assigned id + - retrieves with get request + - delete request + - takes multiple object ids + - search/or retrieve by property? diff --git a/src/dataservices/note.service.js b/src/dataservices/note.service.js index b6c3719..eeb1486 100644 --- a/src/dataservices/note.service.js +++ b/src/dataservices/note.service.js @@ -4,7 +4,7 @@ * MariaDB Service Example */ import mariadbHelper, { MariaDBInsertResponse } from '../helpers/mariadb.helper.js'; // eslint-disable-line -import { RequestError } from '../base/server.js'; +import RequestError from '../base/request/request-error.model.js'; import _ from 'lodash'; /** diff --git a/src/entry.js b/src/entry.js index be196c3..4023a09 100644 --- a/src/entry.js +++ b/src/entry.js @@ -4,7 +4,8 @@ * Entry point that loads all routes for the server */ import path from 'path'; -import { Server, EndpointConfig, HapiRequest, HapiHandler } from './base/server.js'; +import { Server, EndpointConfig } from './base/server.js'; +import { HapiRequest, HapiHandler } from './base/request/hapi-request.interface.js'; import mariadb from './helpers/mariadb.helper.js'; import CONFIG from './helpers/config.helper.js'; diff --git a/src/helpers/README.helpers.md b/src/helpers/README.helpers.md index 91f6283..f78dd38 100644 --- a/src/helpers/README.helpers.md +++ b/src/helpers/README.helpers.md @@ -1,23 +1,39 @@ # Helpers -Helpers are classes that wrap some functionality not associated with an external service +Helpers are classes that modularize some functionality that is useful in the server. -## MariaDB - - connecting with mariadb server +## Examples + +### MariaDB +Helper class for connecting with mariadb server and saving/retrieving rows from tables - query - insert - fetch - fetchOne -## Config - - reading properties from [config file](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml#L3) - -## Healthcheck - - Make simple requests to configured DB/External Services to see if available +### Config +Helper class for reading properties from [config file](https://github.com/devlinjunker/template.node.hapi/blob/master/conf/config.yaml#L3) + - provides a typed interface of these properties +### Healthcheck +Helper for building the healthcheck response that is displayed at `` endpoint. + - Determines version/branch and if the server is running properly + - Makes simple requests to configured dependency DB/External Services to see if they are available ## Notes/Ideas + - **IDEA:** Should healthcheck read log file for past minute to see if any errors? - Do we want/need to worry about Dependency Injection/Singletons? - - **IDEA:** Move Server into helpers as `server.helper.js`? + - RDBMS vs Document store + - CAP theorem stands for C – Consistency, A — Availability, P — Partitioning (or Scalability) and states that having all three properties at the same time is not possible, + - https://medium.com/statuscode/three-reasons-to-use-a-nosql-document-store-for-your-next-web-application-6b9eabffc8d8 + - Document Store: + - use for settings data and where schema will be changed often + - when changes are small crud, based on users interactions? + - when count and aggregate data is useful to end user + - RDBMS: + - less duplicated data, normalized and stored in specific tables + - useful when data changes often + - seems like more useful for storing fact data in ETL processes? + - Q: phoenix? diff --git a/src/helpers/healthcheck.helper.js b/src/helpers/healthcheck.helper.js index fc1fe45..60b1bb6 100644 --- a/src/helpers/healthcheck.helper.js +++ b/src/helpers/healthcheck.helper.js @@ -14,11 +14,17 @@ import path from 'path'; * @type {HealthcheckResponse} */ interface HealthcheckResponse { - name: string | typeof undefined; - status: any; + name: ?string; + status: ?string; error?: boolean; }; +interface FullResponse { + L1: Array; + L2: Array; + L3: Array; +} + /** * Retrieves the status of a database, based on the config given * @param {DatabaseConfig} config config of database to check @@ -76,6 +82,7 @@ async function _getExternalServiceStatus(config: ExternalServiceConfig): Promise status: undefined }; try { + // $FlowFixMe response.status += await promise; } catch (error) { response.error = true; @@ -152,19 +159,23 @@ class HealthcheckHelper { * L3: external services we don't have control over and hopefully we catch errors for to explain to user * @returns {any} status of services in that level (or full status of server if no level provided) */ - async getStatus(level?: 'L1' | 'L2' | 'L3'): any { + async getStatus(level?: 'L1' | 'L2' | 'L3'): any { // eslint-disable-line flowtype/no-weak-types /* eslint-disable id-length */ - const status = { + const status: FullResponse = { L1: [ { + // $FlowFixMe name: 'SERVER', + // $FlowFixMe status: 'alive', }, { + // $FlowFixMe name: 'VERSION', status: pack.version }, { + // $FlowFixMe name: 'BRANCH', status: getBranch() } @@ -174,7 +185,7 @@ class HealthcheckHelper { }; /* eslint-enable id-length */ - return level === undefined ? status : status[level]; + return level === undefined ? status : (status: any)[level]; // eslint-disable-line flowtype/no-weak-types } }
      summary
      public @@ -144,13 +154,13 @@

      base

      C - Server: Server + RequestError: RequestError

      -

      Abstraction to manage running the server.

      +

      Request Error Class to help set a response code and message to display to the user

      src/base/request/hapi-request.interface.js--598 byte302020-03-01 17:10:49 (UTC)
      src/base/request/request-error.model.jsRequestError-464 byte212020-03-01 17:10:49 (UTC)
      src/base/server.jsRequestError -ServerServer 60 %9/155280 byte2002020-03-01 16:30:42 (UTC)4088 byte1602020-03-01 17:48:09 (UTC)
      src/controllers/admin.controller.js - 100 %2/21105 byte1129 byte 392020-03-07 21:35:20 (UTC)2020-03-01 17:10:49 (UTC)
      src/controllers/hello.controller.js HelloWorld 100 %3/31160 byte532020-03-01 16:30:42 (UTC)1095 byte522020-03-01 17:10:49 (UTC)
      src/controllers/note.controller.js NoteController 100 %5/52570 byte2594 byte 972020-03-01 16:30:43 (UTC)2020-03-01 17:10:49 (UTC)
      src/dataservices/note.service.js NoteDataservice 100 %4/42493 byte2510 byte 832020-03-01 16:30:43 (UTC)2020-03-01 17:10:49 (UTC)
      src/entry.js main 75 %3/43498 byte1232020-03-01 16:30:42 (UTC)3557 byte1242020-03-01 17:10:49 (UTC)
      src/helpers/config.helper.js100 %2/2 1411 byte 772020-03-01 16:30:42 (UTC)2020-03-01 17:02:10 (UTC)
      src/helpers/healthcheck.helper.js HealthcheckHelper healthcheckHelper 70 %7/105819 byte1862020-03-07 21:35:20 (UTC)6162 byte1972020-03-01 17:37:17 (UTC)
      src/helpers/mariadb.helper.js