├── .circleci └── config.yml ├── .editorconfig ├── .eslintignore ├── .eslintrc.json ├── .github ├── CODEOWNERS └── ISSUE_TEMPLATE.md ├── .gitignore ├── .jsinspectrc ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── appveyor.yml ├── bin └── codacy-coverage.js ├── index.js ├── lib ├── coverageParser.js ├── getGitData.js ├── handleInput.js ├── impl │ ├── jacoco.js │ └── lcov.js ├── logger.js ├── reporter.js └── util.js ├── package-lock.json ├── package.json └── test ├── cli.js ├── coverageParser.js ├── getGitData.js ├── handleInput.js ├── handleMultiLangInput.js ├── helper.js ├── jacoco.js ├── jacoco2.js ├── lcov.js ├── lcov2.js ├── logger.js ├── mock ├── jacoco.xml ├── jacoco2.xml ├── lcov-multilang.info ├── lcov.info ├── lcov2.info ├── no-lines.info └── no-lines.xml └── reporter.js /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | orbs: 4 | codacy: codacy/base@1.0.0 5 | 6 | jobs: 7 | build: 8 | parameters: 9 | node_version: 10 | type: string 11 | docker: 12 | - image: circleci/node:<< parameters.node_version >> 13 | working_directory: ~/workdir 14 | 15 | steps: 16 | - attach_workspace: 17 | at: ~/ 18 | - run: npm install 19 | - run: | 20 | if [ "<< parameters.node_version >>" == "latest" ]; then 21 | npm run test-all 22 | else 23 | npm run test 24 | fi 25 | - run: 26 | name: Coverage 27 | command: | 28 | if [ -n "$CODACY_PROJECT_TOKEN" ]; then 29 | cat ./coverage/lcov.info | node ./bin/codacy-coverage.js 30 | else 31 | echo "Skip sending coverage due to no provided codacy token!" 32 | fi 33 | 34 | workflows: 35 | version: 2 36 | install_and_test: 37 | jobs: 38 | - codacy/checkout_and_version 39 | - build: 40 | name: build_6 41 | node_version: "6" 42 | requires: 43 | - codacy/checkout_and_version 44 | - build: 45 | name: build_7 46 | node_version: "7" 47 | requires: 48 | - codacy/checkout_and_version 49 | - build: 50 | name: build_8 51 | node_version: "8" 52 | requires: 53 | - codacy/checkout_and_version 54 | - build: 55 | name: build_9 56 | node_version: "9" 57 | requires: 58 | - codacy/checkout_and_version 59 | - build: 60 | name: build_latest 61 | node_version: "latest" 62 | requires: 63 | - codacy/checkout_and_version 64 | - codacy/tag_version: 65 | filters: 66 | branches: 67 | only: 68 | - master 69 | name: tag_version 70 | context: CodacyAWS 71 | requires: 72 | - build_6 73 | - build_7 74 | - build_8 75 | - build_9 76 | - build_latest 77 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | indent_style = space 12 | indent_size = 2 13 | max_line_length = 120 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | coverage 2 | reports 3 | node_modules -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "es6": true, 4 | "mocha": true, 5 | "node": true 6 | }, 7 | "globals": {}, 8 | "rules": { 9 | "camelcase": [ 10 | 2, 11 | { 12 | "properties": "never" 13 | } 14 | ], 15 | "curly": [ 16 | 2, 17 | "all" 18 | ], 19 | "eqeqeq": 2, 20 | "wrap-iife": 2, 21 | "indent": [ 22 | 2, 23 | 4, 24 | { 25 | "SwitchCase": 1 26 | } 27 | ], 28 | "no-use-before-define": [ 29 | 2, 30 | { 31 | "functions": false 32 | } 33 | ], 34 | "new-cap": 2, 35 | "no-caller": 2, 36 | "no-empty": [ 37 | 2, 38 | { 39 | "allowEmptyCatch": true 40 | } 41 | ], 42 | "no-irregular-whitespace": 2, 43 | "no-new": 2, 44 | "quotes": [ 45 | 2, 46 | "single" 47 | ], 48 | "no-undef": 2, 49 | "no-unused-vars": 2, 50 | "strict": [ 51 | 2, 52 | "function" 53 | ], 54 | "no-eq-null": 2, 55 | "keyword-spacing": [ 56 | 2, 57 | {} 58 | ], 59 | "space-before-blocks": [ 60 | 2, 61 | "always" 62 | ], 63 | "space-before-function-paren": [ 64 | 2, 65 | { 66 | "anonymous": "ignore", 67 | "named": "never" 68 | } 69 | ], 70 | "array-bracket-spacing": [ 71 | 2, 72 | "never", 73 | {} 74 | ], 75 | "space-in-parens": [ 76 | 2, 77 | "never" 78 | ], 79 | "quote-props": [ 80 | 2, 81 | "as-needed" 82 | ], 83 | "no-underscore-dangle": 2, 84 | "key-spacing": [ 85 | 2, 86 | { 87 | "beforeColon": false, 88 | "afterColon": true 89 | } 90 | ], 91 | "comma-style": [ 92 | 2, 93 | "last" 94 | ], 95 | "space-unary-ops": [ 96 | 2, 97 | { 98 | "words": false, 99 | "nonwords": false 100 | } 101 | ], 102 | "space-infix-ops": 2, 103 | "no-with": 2, 104 | "no-multiple-empty-lines": 2, 105 | "no-mixed-spaces-and-tabs": 2, 106 | "no-trailing-spaces": 2, 107 | "comma-dangle": [ 108 | 2, 109 | "never" 110 | ], 111 | "brace-style": [ 112 | 2, 113 | "1tbs", 114 | { 115 | "allowSingleLine": true 116 | } 117 | ], 118 | "dot-notation": 2, 119 | "yoda": [ 120 | 2, 121 | "never" 122 | ] 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @lolgab @ljmf00 @andreaTP @rtfpessoa @bmbferreira @DReigada @pedrocodacy 2 | 3 | *.yml @h314to @paulopontesm 4 | 5 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Are you looking for help? 2 | 3 | This is an issue tracker, used to manage and track the development of this [Codacy](https://www.codacy.com/) project. 4 | 5 | It is not a platform support system. If think your problem is related with our platform at https://www.codacy.com/, please contact us through our [contact form](https://www.codacy.com/contact) or our internal chat application, visible after you login on the bottom right corner. 6 | 7 | Keep in mind that this issue tracker is for specific problems of this project. 8 | 9 | ### node.js Version (2.5.x / etc) 10 | 11 | 12 | 13 | ### Operating System (Ubuntu 15.10 / MacOS 10.10 / Windows 10) 14 | 15 | Use `uname -a` if on Linux. 16 | 17 | ### Testing framework 18 | 19 | 20 | ### Library Dependencies 21 | 22 | If this is an issue that involves integration with another system, include the exact version and OS of the other system, including any intermediate drivers or APIs i.e. if you connect to a PostgreSQL database, include both the version / OS of PostgreSQL and the JDBC driver version used to connect to the database. 23 | 24 | ### Expected Behavior 25 | 26 | Please describe the expected behavior of the issue, starting from the first action. 27 | 28 | 1. 29 | 2. 30 | 3. 31 | 32 | ### Actual Behavior 33 | 34 | Please provide a description of what actually happens, working from the same starting point. 35 | 36 | Be descriptive: "it doesn't work" does not describe what the behavior actually is -- instead, say "when running this sequence of commands: (...), the tool outputs this error: (...)" Copy and paste logs, and include any URLs that you find it may be useful. 37 | 38 | 1. 39 | 2. 40 | 3. 41 | 42 | ### Reproducible Test Case 43 | 44 | Please provide a some information on how to reproduce the bug (e.g. sequence of commands you are running). A PR with a failing test would be awesome, if possible. 45 | 46 | If the issue is more complex or requires configuration, please provide a link to a project on Github/Codacy that reproduces the issue. 47 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Reports 17 | reports 18 | 19 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 20 | .grunt 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # Deployed apps should consider commenting this line out: 27 | # see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git 28 | node_modules 29 | 30 | #IntelliJ 31 | .idea 32 | **/*.iml 33 | 34 | # Mac 35 | .DS_Store 36 | 37 | .vscode 38 | -------------------------------------------------------------------------------- /.jsinspectrc: -------------------------------------------------------------------------------- 1 | { 2 | "threshold": 30, 3 | "identifiers": true, 4 | "diff": true, 5 | "color": true, 6 | "ignore": "node_modules|coverage|reports", 7 | "reporter": "json" 8 | } 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | ## Main rules 4 | 5 | * Before you open a ticket or send a pull request, [search](https://github.com/codacy/node-codacy-coverage/issues) for previous discussions about the same feature or issue. Add any new details to earlier tickets if you find any. 6 | 7 | * If you're proposing a new feature, make sure you create an issue to let other contributors know what you will be working on. 8 | 9 | * Before sending a pull request make sure your code is tested. 10 | 11 | * Before sending a pull request for a feature, be sure to run tests with `npm run test`. 12 | 13 | * Use the same coding style as the rest of the codebase, most of the checks can be performed with `npm run lint`. 14 | 15 | * Use `git rebase` (not `git merge`) to sync your work from time to time with the master branch. 16 | 17 | * After creating your pull request make sure the build is passing on [CircleCI](https://circleci.com/gh/codacy/node-codacy-coverage) and that [Codacy](https://www.codacy.com/app/codacy/node-codacy-coverage) is also confident in the code quality. 18 | 19 | ## Commit Style 20 | 21 | Writing good commit logs is important. A commit log should describe what changed and why. 22 | Follow these guidelines when writing one: 23 | 24 | 1. The first line should be 50 characters or less and contain a short 25 | description of the change prefixed with the name of the changed 26 | subsystem (e.g. "net: add localAddress and localPort to Socket"). 27 | 2. Keep the second line blank. 28 | 3. Wrap all other lines at 72 columns. 29 | 30 | A good commit log can look something like this: 31 | 32 | ```git-commit 33 | subsystem: explaining the commit in one line 34 | 35 | Body of commit message is a few lines of text, explaining things 36 | in more detail, possibly giving some background about the issue 37 | being fixed, etc. etc. 38 | 39 | The body of the commit message can be several paragraphs, and 40 | please do proper word-wrap and keep columns shorter than about 41 | 72 characters or so. That way `git log` will show things 42 | nicely even when it is indented. 43 | ``` 44 | 45 | ### Developer's Certificate of Origin 1.0 46 | 47 | By making a contribution to this project, I certify that: 48 | 49 | * (a) The contribution was created in whole or in part by me and I 50 | have the right to submit it under the open source license indicated 51 | in the file; or 52 | * (b) The contribution is based upon previous work that, to the best 53 | of my knowledge, is covered under an appropriate open source license 54 | and I have the right under that license to submit that work with 55 | modifications, whether created in whole or in part by me, under the 56 | same open source license (unless I am permitted to submit under a 57 | different license), as indicated in the file; or 58 | * (c) The contribution was provided directly to me by some other 59 | person who certified (a), (b) or (c) and I have not modified it. 60 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 David Pate 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deprecated 2 | 3 | This repository is no longer maintained. As an alternative, check [codacy-coverage-reporter](https://github.com/codacy/codacy-coverage-reporter) to send your test coverage results to your Codacy dashboard. 4 | 5 | # Node Codacy Coverage 6 | 7 | Credits to [David](https://github.com/DavidTPate) for creating this! 8 | [Codacy](https://codacy.com/) support for Node.js. Get coverage reporting and code analysis for Node.js from Codacy. 9 | 10 | [![Codacy](https://api.codacy.com/project/badge/grade/3c7f5de6ce734762981d3e689de7b941)](https://www.codacy.com/app/codacy/node-codacy-coverage) 11 | [![Codacy](https://api.codacy.com/project/badge/coverage/3c7f5de6ce734762981d3e689de7b941)](https://www.codacy.com/app/codacy/node-codacy-coverage) 12 | [![Build Status](https://circleci.com/gh/codacy/node-codacy-coverage.png?style=shield&circle-token=:circle-token)](https://circleci.com/gh/codacy/node-codacy-coverage) 13 | [![npm](https://img.shields.io/npm/v/codacy-coverage.svg)](https://www.npmjs.com/package/codacy-coverage) 14 | [![npm](https://img.shields.io/npm/dm/codacy-coverage.svg)](https://www.npmjs.com/package/codacy-coverage) 15 | [![David](https://img.shields.io/david/codacy/node-codacy-coverage.svg)](https://david-dm.org/codacy/node-codacy-coverage) 16 | [![David](https://img.shields.io/david/dev/codacy/node-codacy-coverage.svg)](https://david-dm.org/codacy/node-codacy-coverage) 17 | [![David](https://img.shields.io/david/peer/codacy/node-codacy-coverage.svg)](https://david-dm.org/codacy/node-codacy-coverage) 18 | 19 | ## Installation 20 | 21 | Add the latest version of `codacy-coverage` to your package.json: 22 | 23 | ```sh 24 | npm install codacy-coverage --save 25 | ``` 26 | 27 | If you're using mocha, add `mocha-lcov-reporter` to your package.json: 28 | 29 | ```sh 30 | npm install mocha-lcov-reporter --save 31 | ``` 32 | 33 | ## Enterprise 34 | 35 | To send coverage in the enterprise version you should specify your Codacy installation URL with the option `-e`: 36 | 37 | ```sh 38 | codacy-coverage -e :16006 39 | ``` 40 | 41 | ## Usage 42 | 43 | This cli can take standard input from any tool that emits the lcov data format (including [mocha](http://mochajs.org)'s [LCov reporter](https://npmjs.org/package/mocha-lcov-reporter)) and send it to Codacy to report your code coverage there. 44 | 45 | Once your app is instrumented for coverage, and building, you need to pipe the lcov output to `codacy-coverage`. 46 | 47 | ### Identifying the project 48 | 49 | You'll need to provide the secret Project API token from `Codacy Project > Settings > Integrations > Project API` via: 50 | 51 | * (Recommended) Environment variable: CODACY_PROJECT_TOKEN 52 | * CLI parameter variable: `--token` 53 | 54 | > Note: You should keep your any API token well **protected**, as it grants owner permissions to your projects. 55 | 56 | ### Test Coverage 57 | 58 | #### [Mocha](http://mochajs.org) + [Blanket.js](https://github.com/alex-seville/blanket) 59 | 60 | * Install [blanket.js](http://blanketjs.org/) 61 | * Configure blanket according to [docs](https://github.com/alex-seville/blanket/blob/master/docs/getting_started_node.md). 62 | * Add test with coverage step to your package.json: 63 | 64 | ```json 65 | "scripts": { 66 | "test-with-coverage": "NODE_ENV=test YOURPACKAGE_COVERAGE=1 mocha --require blanket --reporter mocha-lcov-reporter | codacy-coverage" 67 | } 68 | ``` 69 | 70 | * Run your tests with: 71 | 72 | ```sh 73 | npm run test-with-coverage 74 | ``` 75 | 76 | #### [Mocha](http://mochajs.org) + [JSCoverage](https://github.com/fishbar/jscoverage) 77 | 78 | Instrumenting your app for coverage is probably harder than it needs to be (read [here](http://www.seejohncode.com/2012/03/13/setting-up-mocha-jscoverage/)), but that's also a necessary step. 79 | 80 | * Add test with coverage step to your package.json: 81 | 82 | ```json 83 | "scripts": { 84 | "test-with-coverage": "YOURPACKAGE_COVERAGE=1 mocha test -R mocha-lcov-reporter | codacy-coverage" 85 | } 86 | ``` 87 | 88 | * Run your tests with: 89 | 90 | ```sh 91 | npm run test-with-coverage 92 | ``` 93 | 94 | #### [Istanbul](https://github.com/gotwarlost/istanbul) 95 | 96 | ##### With Mocha 97 | 98 | * Add test with coverage step to your package.json: 99 | 100 | ```json 101 | "scripts": { 102 | "test-with-coverage": "istanbul cover _mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | codacy-coverage && rm -rf ./coverage" 103 | } 104 | ``` 105 | 106 | * Run your tests with: 107 | 108 | ```sh 109 | npm run test-with-coverage 110 | ``` 111 | 112 | ##### With Jasmine 113 | 114 | * Add test with coverage step to your package.json: 115 | 116 | ```json 117 | "scripts": { 118 | "test-with-coverage": "istanbul cover jasmine-node --captureExceptions spec/ && cat ./coverage/lcov.info | codacy-coverage && rm -rf ./coverage" 119 | } 120 | ``` 121 | 122 | * Run your tests with: 123 | 124 | ```sh 125 | npm run test-with-coverage 126 | ``` 127 | 128 | #### [Poncho](https://github.com/deepsweet/poncho) 129 | 130 | Client-side JS code coverage using [PhantomJS](https://github.com/ariya/phantomjs), [Mocha](http://mochajs.org) and [Blanket](https://github.com/alex-seville/blanket): 131 | 132 | * [Configure](http://mochajs.org#browser-support) Mocha for browser 133 | * [Mark](https://github.com/deepsweet/poncho#usage) target script(s) with `data-cover` html-attribute 134 | * Add test with coverage step to your package.json: 135 | 136 | ```json 137 | "scripts": { 138 | "test-with-coverage": "poncho -R lcov test/test.html | codacy-coverage" 139 | } 140 | ``` 141 | 142 | * Run your tests with: 143 | 144 | ```sh 145 | npm run test-with-coverage 146 | ``` 147 | 148 | #### [Jest](https://facebook.github.io/jest/) 149 | 150 | * Add test with coverage step to your package.json: 151 | 152 | Note: [jest might return exit code 1](https://github.com/facebook/jest/issues/3520) if you defined a coverage threshold and the threshold is not met 153 | 154 | ```json 155 | "scripts": { 156 | "test-with-coverage": "jest --coverage && cat ./coverage/lcov.info | codacy-coverage" 157 | } 158 | ``` 159 | 160 | * Run your tests with: 161 | 162 | ```sh 163 | npm run test-with-coverage 164 | ``` 165 | 166 | ## Extras 167 | 168 | ### Account Token 169 | 170 | As an alternative to the Project API token you can also send coverage using your account/api token by following steps: 171 | 172 | * Add test with coverage step to your package.json: 173 | 174 | ```json 175 | "scripts": { 176 | "test-with-coverage": "cat ./coverage/lcov.info | codacy-coverage --accountToken --username --projectName " 177 | } 178 | ``` 179 | 180 | * Run your tests with: 181 | 182 | ```sh 183 | npm run test-with-coverage 184 | ``` 185 | 186 | You'll need to provide the secret Account API token from [Codacy Account](https://app.codacy.com/account/apiTokens)` > API Tokens` via: 187 | 188 | * (Recommended) Environment variable: CODACY_ACCOUNT_TOKEN 189 | * CLI parameter variable: `--accountToken` 190 | 191 | ### Force custom language (e.g. Typescript, Coffeescript, C, ...) 192 | 193 | * Pass an extra parameter to the codacy-coverage reporter `--language typescript` or `--language coffeescript`. 194 | * If you have multiple languages you need to invoke the reporter for each of them. 195 | 196 | ### Run in Windows 197 | 198 | If you are running coverage in a windows machine without Unix tools, 199 | you need to change the command to `codacy-coverage < ./test/unit/coverage/lcov.info`. 200 | 201 | ## Troubleshooting 202 | 203 | ### Path Problems 204 | 205 | The paths in your coverage file should be relative, 206 | if you are having problems with absolute paths, 207 | you can run our plugin with `-p .` to strip the current path from the paths in your coverage file: 208 | 209 | ```json 210 | "scripts": { 211 | "test-with-coverage": "cat ./coverage/lcov.info | codacy-coverage -p ." 212 | } 213 | ``` 214 | 215 | ### Enterprise Coverage 216 | 217 | To send coverage in the **enterprise** version you should specify your Codacy installation URL followed by the port 16006 using the -e option, example: 218 | 219 | ```json 220 | "scripts": { 221 | "test-with-coverage": "cat ./coverage/lcov.info | codacy-coverage -e :16006" 222 | } 223 | ``` 224 | 225 | ## Options 226 | 227 | ```bash 228 | Options: 229 | 230 | -V, --version output the version number 231 | -f, --format [value] Coverage input format 232 | -t, --token [value] Codacy Project API Token 233 | -a, --accountToken [value] Codacy Account Token 234 | -u, --username [value] Codacy Username/Organization 235 | -n, --projectName [value] Codacy Project Name 236 | -c, --commit [value] Commit SHA hash 237 | -l, --language [value Project Language 238 | -e, --endpoint [value] Codacy API Endpoint 239 | -p, --prefix [value] Project path prefix 240 | -v, --verbose Display verbose output 241 | -d, --debug Display debug output 242 | -h, --help output usage information 243 | ``` 244 | 245 | ## License 246 | 247 | [MIT](LICENSE) 248 | 249 | ## What is Codacy 250 | 251 | [Codacy](https://www.codacy.com/) is an Automated Code Review Tool that monitors your technical debt, 252 | helps you improve your code quality, 253 | teaches best practices to your developers, 254 | and helps you save time in Code Reviews. 255 | 256 | ### Among Codacy’s features 257 | 258 | * Identify new Static Analysis issues 259 | * Commit and Pull Request Analysis with GitHub, BitBucket/Stash, GitLab (and also direct git repositories) 260 | * Auto-comments on Commits and Pull Requests 261 | * Integrations with Slack, HipChat, Jira, YouTrack 262 | * Track issues Code Style, Security, Error Proneness, Performance, Unused Code and other categories 263 | 264 | Codacy also helps keep track of Code Coverage, Code Duplication, and Code Complexity. 265 | 266 | Codacy supports PHP, Python, Ruby, Java, JavaScript, and Scala, among others. 267 | 268 | ### Free for Open Source 269 | 270 | Codacy is free for Open Source projects. 271 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # AppVeyor file 2 | # http://www.appveyor.com/docs/appveyor-yml 3 | 4 | # Build version format 5 | version: "{build}" 6 | 7 | # What combinations to test 8 | environment: 9 | matrix: 10 | - nodejs_version: 6 11 | - nodejs_version: 7 12 | - nodejs_version: 8 13 | - nodejs_version: 9 14 | 15 | install: 16 | # Get the latest stable version of Node.js 17 | - ps: Install-Product node $env:nodejs_version 18 | # install modules 19 | - npm install 20 | 21 | build: off 22 | 23 | test_script: 24 | - npm test 25 | 26 | matrix: 27 | fast_finish: true # set this flag to immediately finish build once one of the jobs fails. 28 | -------------------------------------------------------------------------------- /bin/codacy-coverage.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | (function (program, logger, util, lib) { 3 | 'use strict'; 4 | process.stdin.resume(); 5 | process.stdin.setEncoding('utf8'); 6 | 7 | var input = ''; 8 | var loggerImpl; 9 | 10 | process.stdin.on('data', function (chunk) { 11 | input += chunk; 12 | if (loggerImpl) { 13 | loggerImpl.trace('Got chunk'); 14 | } 15 | }); 16 | 17 | program 18 | .version(require('../package').version) 19 | .usage('[options]') 20 | .option('-f, --format [value]', 'Coverage input format') 21 | .option('-t, --token [value]', 'Codacy Project API Token') 22 | .option('-a, --accountToken [value]', 'Codacy Account Token') 23 | .option('-u, --username [value]', 'Codacy Username/Organization') 24 | .option('-n, --projectName [value]', 'Codacy Project Name') 25 | .option('-c, --commit [value]', 'Commit SHA hash') 26 | .option('-l, --language [value', 'Project Language') 27 | .option('-e, --endpoint [value]', 'Codacy API Endpoint') 28 | .option('-p, --prefix [value]', 'Project path prefix') 29 | .option('-v, --verbose', 'Display verbose output') 30 | .option('-d, --debug', 'Display debug output') 31 | .parse(process.argv); 32 | 33 | loggerImpl = logger({ 34 | verbose: program.verbose, 35 | debug: program.debug 36 | }); 37 | 38 | loggerImpl.info(util.format('Started with: token [%j], accountToken [%j], username [%j], projectName [%j], commitId [%j], language [%j], endpoint [%j], format [%j], path prefix [%j], verbose [%j], debug [%j]', 39 | program.token, program.accountToken, program.username, program.projectName, program.commit, program.language, program.endpoint, program.format, program.prefix, program.verbose, program.debug)); 40 | 41 | process.stdin.on('end', function () { 42 | loggerImpl.trace('Received file through stdin'); 43 | 44 | if (program.help === true) { 45 | return; 46 | } 47 | 48 | return lib.handleInput(input, program).then(function () { 49 | loggerImpl.debug('Successfully sent coverage'); 50 | }, function (err) { 51 | loggerImpl.error('Error sending coverage'); 52 | loggerImpl.error(err); 53 | process.exitCode = 1; 54 | }); 55 | }); 56 | 57 | }(require('commander'), require('../lib/logger'), require('util'), require('../index'))); 58 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | (function (parser, reporter, getGitData, handleInput) { 2 | 'use strict'; 3 | module.exports = { 4 | getParser: parser.getParser, 5 | reporter: reporter, 6 | getGitData: getGitData, 7 | handleInput: handleInput 8 | }; 9 | }(require('./lib/coverageParser'), require('./lib/reporter'), require('./lib/getGitData'), require('./lib/handleInput'))); -------------------------------------------------------------------------------- /lib/coverageParser.js: -------------------------------------------------------------------------------- 1 | (function (Joi, util, logger) { 2 | 'use strict'; 3 | 4 | var validFormats = ['lcov','jacoco']; 5 | var formatValidation = Joi.string().valid(validFormats).required(); 6 | 7 | module.exports = { 8 | getParser: function getParser(coverageFormat) { 9 | var validFormat = Joi.validate(coverageFormat, formatValidation); 10 | 11 | if (validFormat.error) { 12 | logger.error(validFormat.error); 13 | throw new Error(util.format('Expected one of the following supported formats: %j, but got [%s]', validFormats, coverageFormat)); 14 | } 15 | 16 | logger.debug('Creating coverage parser for: ' + coverageFormat); 17 | return require('./impl/' + coverageFormat); 18 | } 19 | }; 20 | }(require('joi'), require('util'), require('./logger')())); 21 | -------------------------------------------------------------------------------- /lib/getGitData.js: -------------------------------------------------------------------------------- 1 | (function (logger, exec, Promise) { 2 | 'use strict'; 3 | module.exports = { 4 | getCommitId: function (commitId) { 5 | return new Promise(function (resolve, reject) { 6 | if (commitId) { 7 | logger.debug('Provided Commit Id: ' + commitId); 8 | return resolve(commitId); 9 | } 10 | 11 | var gitCommit = process.env.CODACY_GIT_COMMIT || 12 | process.env.TRAVIS_COMMIT || 13 | process.env.DRONE_COMMIT || 14 | process.env.GIT_COMMIT || 15 | process.env.CIRCLE_SHA1 || 16 | process.env.CI_COMMIT_ID || 17 | process.env.WERCKER_GIT_COMMIT || 18 | process.env.BUILDKITE_COMMIT || 19 | process.env.CI_COMMIT_SHA || 20 | process.env.BITBUCKET_COMMIT; 21 | 22 | if (gitCommit) { 23 | logger.debug('Received Commit Id: ' + gitCommit); 24 | return resolve(gitCommit); 25 | } 26 | 27 | exec('git rev-parse HEAD', function (err, commitId) { 28 | if (err) { 29 | return reject(err); 30 | } 31 | commitId = commitId.trim(); 32 | logger.debug('Got Commit Id: ' + commitId); 33 | resolve(commitId); 34 | }); 35 | }); 36 | } 37 | }; 38 | }(require('./logger')(), require('child_process').exec, require('bluebird'))); 39 | -------------------------------------------------------------------------------- /lib/handleInput.js: -------------------------------------------------------------------------------- 1 | (function (parser, reporter, getGitData, logger, Promise, util) { 2 | 'use strict'; 3 | module.exports = function (input, opts) { 4 | opts = opts || {}; 5 | 6 | var token = opts.token || process.env.CODACY_PROJECT_TOKEN || process.env.CODACY_REPO_TOKEN; 7 | var accountToken = opts.accountToken || process.env.CODACY_ACCOUNT_TOKEN; 8 | var username = opts.username; 9 | var projectName = opts.projectName; 10 | var commit = opts.commit; 11 | var format = opts.format || 'lcov'; 12 | var pathPrefix = opts.prefix || ''; 13 | var language = opts.language; 14 | var loggerImpl; 15 | 16 | loggerImpl = logger({ 17 | verbose: opts.verbose, 18 | debug: opts.debug 19 | }); 20 | 21 | if (!token && !accountToken) { 22 | return Promise.reject(new Error('Token is required')); 23 | } 24 | 25 | if (accountToken) { 26 | if (!username) { 27 | return Promise.reject(new Error('When using an account token, a username is required.')); 28 | } 29 | if (!projectName) { 30 | return Promise.reject(new Error('When using an account token, a project name is required.')); 31 | } 32 | } 33 | 34 | loggerImpl.info(util.format('Handling input for: token [%j], accountToken [%j], username [%j], projectName [%j], commitId [%j], language [%j], endpoint [%j], format [%j], path prefix [%j], verbose [%j], debug [%j]', 35 | token, accountToken, username, projectName, commit, language, opts.endpoint, format, pathPrefix, opts.verbose, opts.debug)); 36 | 37 | // Parse the coverage data for the given format and retrieve the commit id if we don't have it. 38 | return Promise.all([parser.getParser(format).parse(pathPrefix, input), getGitData.getCommitId(commit)]).spread(function (parsedCoverage, commitId) { 39 | // Now that we've parse the coverage data to the correct format, send it to Codacy. 40 | loggerImpl.trace(parsedCoverage); 41 | loggerImpl.debug('Sending coverage'); 42 | return reporter({ 43 | endpoint: opts.endpoint, 44 | accountToken: accountToken 45 | }).sendCoverage(token, commitId, language, parsedCoverage, accountToken, username, projectName); 46 | }); 47 | }; 48 | }(require('./coverageParser'), require('./reporter'), require('./getGitData'), require('./logger'), require('bluebird'), require('util'))); 49 | -------------------------------------------------------------------------------- /lib/impl/jacoco.js: -------------------------------------------------------------------------------- 1 | (function (jacocoParse, Promise, Joi, logger, util, path) { 2 | 'use strict'; 3 | 4 | var jacocoStringValidation = Joi.string().required(); 5 | var optionsValidation = Joi.object().keys().optional(); 6 | 7 | module.exports = { 8 | parse: function parseJacoco(pathPrefix, jacocoString, options) { 9 | return new Promise(function (resolve, reject) { 10 | logger.debug('Parsing Jacoco Data'); 11 | var nonEmptyReport = Joi.validate(jacocoString, jacocoStringValidation); 12 | var validOptions = Joi.validate(options, optionsValidation, { 13 | stripUnknown: true 14 | }); 15 | var validationError = nonEmptyReport.error || validOptions.error; 16 | 17 | if (validationError) { 18 | logger.error(validationError); 19 | return reject(validationError); 20 | } 21 | 22 | jacocoParse.parseContent(jacocoString, function (err, data) { 23 | if (err) { 24 | err = new Error('Failed to parse jacoco report: ' + err); 25 | 26 | logger.error(err); 27 | return reject(err); 28 | } 29 | 30 | var result = { 31 | total: 0, 32 | fileReports: [] 33 | }; 34 | var totalLines = 0; 35 | var totalHits = 0; 36 | 37 | //TODO: Convert to reduce function 38 | data.forEach(function (stats) { 39 | var fileStats = { 40 | // The API expects the filenames to be relative to the project, ex. lib/reporter.js 41 | filename: stats.file ? pathPrefix + path.relative(process.cwd(), stats.file) : '', 42 | coverage: {} 43 | }; 44 | 45 | totalLines += stats.lines.found; 46 | totalHits += stats.lines.hit; 47 | 48 | // The API uses integers only, so convert accordingly. 49 | fileStats.total = Math.floor(util.safeDivision(stats.lines.hit, stats.lines.found) * 100); 50 | 51 | //TODO: Convert to reduce function 52 | stats.lines.details.forEach(function (detail) { 53 | // Codacy needs the 0s to know failed coverage data 54 | // We also can't have a negative number of hits on a line, so exclude those. 55 | if (detail.hit >= 0) { 56 | fileStats.coverage[detail.line] = detail.hit; 57 | } 58 | }); 59 | 60 | logger.trace('Successfully parsed ' + stats.file); 61 | result.fileReports.push(fileStats); 62 | }); 63 | 64 | // The API uses integers only, so convert accordingly. 65 | result.total = Math.floor(util.safeDivision(totalHits, totalLines) * 100); 66 | 67 | logger.debug('Successfully Parsed Jacoco Data'); 68 | 69 | resolve(result); 70 | }); 71 | }); 72 | } 73 | }; 74 | }(require('jacoco-parse'), require('bluebird'), require('joi'), require('../logger')(), require('../util'), require('path'))); 75 | -------------------------------------------------------------------------------- /lib/impl/lcov.js: -------------------------------------------------------------------------------- 1 | (function (lcovParse, Promise, Joi, logger, util, path) { 2 | 'use strict'; 3 | 4 | var lcovStringValidation = Joi.string().required(); 5 | var optionsValidation = Joi.object().keys().optional(); 6 | 7 | module.exports = { 8 | parse: function parseLcov(pathPrefix, lcovString, options) { 9 | return new Promise(function (resolve, reject) { 10 | logger.debug('Parsing Lcov Data'); 11 | var validLcov = Joi.validate(lcovString, lcovStringValidation); 12 | var validOptions = Joi.validate(options, optionsValidation, { 13 | stripUnknown: true 14 | }); 15 | var validationError = validLcov.error || validOptions.error; 16 | 17 | if (validationError) { 18 | logger.error(validationError); 19 | return reject(validationError); 20 | } 21 | 22 | lcovParse(lcovString, function (err, data) { 23 | if (err) { 24 | err = new Error(err); 25 | 26 | logger.error(err); 27 | return reject(err); 28 | } 29 | 30 | var result = { 31 | total: 0, 32 | fileReports: [] 33 | }; 34 | var totalLines = 0; 35 | var totalHits = 0; 36 | 37 | //TODO: Convert to reduce function 38 | data.forEach(function (stats) { 39 | var fileStats = { 40 | // The API expects the filenames to be relative to the project, ex. lib/reporter.js 41 | filename: stats.file ? pathPrefix + path.relative(process.cwd(), stats.file) : '', 42 | coverage: {} 43 | }; 44 | 45 | totalLines += stats.lines.found; 46 | totalHits += stats.lines.hit; 47 | 48 | // The API uses integers only, so convert accordingly. 49 | fileStats.total = Math.floor(util.safeDivision(stats.lines.hit, stats.lines.found) * 100); 50 | 51 | //TODO: Convert to reduce function 52 | stats.lines.details.forEach(function (detail) { 53 | // Codacy needs the 0s to know failed coverage data 54 | // We also can't have a negative number of hits on a line, so exclude those. 55 | if (detail.hit >= 0) { 56 | fileStats.coverage[detail.line] = detail.hit; 57 | } 58 | }); 59 | 60 | logger.trace('Successfully parsed ' + stats.file); 61 | result.fileReports.push(fileStats); 62 | }); 63 | 64 | // The API uses integers only, so convert accordingly. 65 | result.total = Math.floor(util.safeDivision(totalHits, totalLines) * 100); 66 | 67 | logger.debug('Successfully Parsed Lcov Data'); 68 | 69 | resolve(result); 70 | }); 71 | }); 72 | } 73 | }; 74 | }(require('lcov-parse'), require('bluebird'), require('joi'), require('../logger')(), require('../util'), require('path'))); 75 | -------------------------------------------------------------------------------- /lib/logger.js: -------------------------------------------------------------------------------- 1 | (function (logDriver) { 2 | 'use strict'; 3 | var logger; 4 | 5 | module.exports = function SetupLogger(options) { 6 | if (options || !logger) { 7 | options = options || {}; 8 | 9 | logger = logDriver({level: getLogLevel(options)}); 10 | return logger; 11 | } else { 12 | return logDriver.logger; 13 | } 14 | }; 15 | 16 | function getLogLevel(options) { 17 | var logLevel = 'warn'; 18 | 19 | if (options.verbose) { 20 | logLevel = 'debug'; 21 | } 22 | 23 | if (options.debug) { 24 | logLevel = 'trace'; 25 | } 26 | 27 | // Environment variables don't override options passed in. 28 | if (logLevel === 'warn') { 29 | if (process.env.CODACY_VERBOSE) { 30 | logLevel = 'debug'; 31 | } 32 | 33 | if (process.env.CODACY_DEBUG) { 34 | logLevel = 'trace'; 35 | } 36 | } 37 | return logLevel; 38 | } 39 | 40 | }(require('log-driver'))); 41 | -------------------------------------------------------------------------------- /lib/reporter.js: -------------------------------------------------------------------------------- 1 | (function(request, Joi, Promise, util, lodash, logger) { 2 | 'use strict'; 3 | 4 | var optionsValidation = Joi.object({ 5 | endpoint: Joi.string().min(1).optional().example('https://api.codacy.com/2.0/coverage/:commitId/:language') 6 | }); 7 | var tokenValidation = Joi.string().required().min(1).example('1234567890');//TODO: Revisit this validation to see if we can better validate the values 8 | var commitIdValidation = Joi.string().required().min(1).example('1234567890'); //TODO: Revisit this validation to see if we can better validate the values 9 | var accountTokenValidation = Joi.string().required().min(1).example('1234567890'); 10 | var usernameValidation = Joi.string().required().min(1).example('1234567890'); 11 | var projectNameValidation = Joi.string().required().min(1).example('1234567890'); 12 | var coverageDataValidation = Joi.object({ 13 | total: Joi.number().integer().required().min(0).max(100), 14 | fileReports: Joi.array().required().items(Joi.object({ 15 | filename: Joi.string().required().min(1), 16 | total: Joi.number().integer().required().min(0).max(100), 17 | coverage: Joi.object().pattern(/\d/, Joi.number().integer().min(0)) 18 | }).required()) 19 | }).example({total: 50, fileReports: [{filename: 'filename', total: 10, coverage: {1: 1, 2: 3}}]}); 20 | 21 | var languageMap = { 22 | js: 'javascript', 23 | jsx: 'javascript', 24 | ts: 'typescript', 25 | tsx: 'typescript', 26 | coffee: 'coffeescript', 27 | java: 'java' 28 | }; 29 | 30 | function sendByLanguage(endpoint, commitId, token, data, accountToken, username, projectName) { 31 | var reportsByLanguage = lodash.groupBy(data.fileReports, function(elem) { 32 | return languageMap[lodash.head(lodash.takeRight(elem.filename.split('.'), 1))] || 'javascript'; 33 | }); 34 | 35 | var languageResponses = lodash.map(reportsByLanguage, function(fileReports, language) { 36 | 37 | var weighedCoverage = lodash.reduce(fileReports, function(accom, elem) { 38 | return accom + (elem.total * Object.keys(elem.coverage).length); 39 | }, 0); 40 | 41 | var coveredLines = lodash.reduce(fileReports, function(accom, elem) { 42 | return accom + Object.keys(elem.coverage).length; 43 | }, 0); 44 | 45 | var finalCoverage = weighedCoverage / coveredLines; 46 | 47 | var dataPerLanguage = lodash.clone(data); 48 | dataPerLanguage.fileReports = fileReports; 49 | dataPerLanguage.total = Math.floor(finalCoverage); 50 | 51 | return sendLanguage(endpoint, commitId, language, token, dataPerLanguage, accountToken, username, projectName); 52 | }); 53 | 54 | return Promise.all(languageResponses) 55 | .then(function(errs) { 56 | errs = lodash.filter(errs, function(e) { 57 | return !lodash.isUndefined(e) 58 | }); 59 | 60 | if (errs.length) { 61 | return Promise.reject(errs[0]); 62 | } 63 | 64 | logger.trace('All languages sent successfully'); 65 | return Promise.resolve(); 66 | }, function(err) { 67 | logger.trace('Failed to send some languages'); 68 | return Promise.reject(err); 69 | }); 70 | } 71 | 72 | 73 | function sendForLanguage(endpoint, commitId, language, token, data, accountToken, username, projectName) { 74 | return sendLanguage(endpoint, commitId, language, token, data, accountToken, username, projectName) 75 | .then(function(err) { 76 | if (err) { 77 | return Promise.reject(err); 78 | } 79 | return Promise.resolve(); 80 | }, function(err) { 81 | return Promise.reject(err); 82 | }); 83 | } 84 | 85 | function sendLanguage(endpoint, commitId, language, token, data, accountToken, username, projectName) { 86 | var url = endpoint.replace(':commitId', commitId).replace(':language', language); 87 | // jscs:disable 88 | var headers = accountToken ? {api_token: accountToken} : {project_token: token}; 89 | // jscs:enable 90 | if (accountToken) { 91 | url = url.replace(':username', username).replace(':projectName', projectName); 92 | } 93 | 94 | logger.trace(util.format('Sending POST to %s', url)); 95 | return request({ 96 | url: url, 97 | method: 'POST', 98 | json: data, 99 | headers: headers, 100 | resolveWithFullResponse: true 101 | }).then(function(res) { 102 | if (res.statusCode !== 200) { 103 | var err = new Error(util.format('Expected Status Code of 200, but got [%s]', res.statusCode)); 104 | logger.error(util.format('Status Code [%s] - Error [%j]', res.statusCode, res.error)); 105 | return Promise.reject(err); 106 | } 107 | logger.debug('Successfully sent coverage data'); 108 | return Promise.resolve(); 109 | }, function(res) { 110 | var err = new Error(util.format('Expected Successful Status Code, but got [%s]', res.statusCode)); 111 | logger.error(util.format('Status Code [%s] - Error [%j]', res.statusCode, res.error)); 112 | return Promise.reject(err); 113 | }); 114 | } 115 | 116 | module.exports = function(options) { 117 | logger.trace(util.format('Creating reporter for %j', options)); 118 | var optionsValid = Joi.validate(options, optionsValidation, { 119 | stripUnknown: true 120 | }); 121 | 122 | if (optionsValid.error) { 123 | logger.error(optionsValid.error); 124 | throw optionsValid.error; 125 | } 126 | 127 | var endpointPostfix = options.accountToken ? '/2.0/:username/:projectName/commit/:commitId/coverage/:language' : '/2.0/coverage/:commitId/:language'; 128 | 129 | var endpoint = (options.endpoint || 'https://api.codacy.com') + endpointPostfix; 130 | 131 | logger.debug('Setting up reporter communicating to: ' + endpoint); 132 | 133 | return { 134 | sendCoverage: function sendCoverage(token, commitId, language, data, accountToken, username, projectName) { 135 | logger.trace(util.format('Sending Coverage for token [%s] and commitId [%s]', token, commitId)); 136 | var tokenValid = Joi.validate(token, tokenValidation); 137 | var commitIdValid = Joi.validate(commitId, commitIdValidation); 138 | var dataValid = Joi.validate(data, coverageDataValidation, { 139 | stripUnknown: true 140 | }); 141 | var validationErr = commitIdValid.error || dataValid.error; 142 | 143 | if (accountToken) { 144 | var accountTokenValid = Joi.validate(accountToken, accountTokenValidation); 145 | var usernameValid = Joi.validate(username, usernameValidation); 146 | var projectNameValid = Joi.validate(projectName, projectNameValidation); 147 | 148 | validationErr = validationErr || accountTokenValid.error || usernameValid.error || projectNameValid.error; 149 | } else { 150 | validationErr = validationErr || tokenValid.error; 151 | } 152 | 153 | if (validationErr) { 154 | logger.error(validationErr); 155 | return Promise.reject(validationErr); 156 | } 157 | 158 | if (language) { 159 | return sendForLanguage(endpoint, commitId, language, token, data, accountToken, username, projectName); 160 | } 161 | 162 | return sendByLanguage(endpoint, commitId, token, data, accountToken, username, projectName); 163 | } 164 | }; 165 | }; 166 | }(require('request-promise'), require('joi'), require('bluebird'), require('util'), require('lodash'), require('./logger')())); 167 | -------------------------------------------------------------------------------- /lib/util.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | 'use strict'; 3 | 4 | module.exports = { 5 | safeDivision: function (numerator, denominator) { 6 | if (denominator === 0 || isNaN(denominator)) { 7 | return 0; 8 | } else { 9 | return numerator / denominator; 10 | } 11 | } 12 | }; 13 | 14 | }()); 15 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codacy-coverage", 3 | "version": "3.4.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@babel/code-frame": { 8 | "version": "7.5.5", 9 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", 10 | "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", 11 | "dev": true, 12 | "requires": { 13 | "@babel/highlight": "^7.0.0" 14 | } 15 | }, 16 | "@babel/highlight": { 17 | "version": "7.5.0", 18 | "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", 19 | "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", 20 | "dev": true, 21 | "requires": { 22 | "chalk": "^2.0.0", 23 | "esutils": "^2.0.2", 24 | "js-tokens": "^4.0.0" 25 | } 26 | }, 27 | "abbrev": { 28 | "version": "1.0.9", 29 | "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", 30 | "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", 31 | "dev": true 32 | }, 33 | "acorn": { 34 | "version": "7.1.0", 35 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", 36 | "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", 37 | "dev": true 38 | }, 39 | "acorn-jsx": { 40 | "version": "5.0.2", 41 | "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", 42 | "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", 43 | "dev": true 44 | }, 45 | "ajv": { 46 | "version": "6.5.5", 47 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.5.tgz", 48 | "integrity": "sha1-z5fNreccY5mpLG1sQXc4EpG3gaE=", 49 | "requires": { 50 | "fast-deep-equal": "^2.0.1", 51 | "fast-json-stable-stringify": "^2.0.0", 52 | "json-schema-traverse": "^0.4.1", 53 | "uri-js": "^4.2.2" 54 | } 55 | }, 56 | "amdefine": { 57 | "version": "1.0.1", 58 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", 59 | "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", 60 | "dev": true, 61 | "optional": true 62 | }, 63 | "ansi-colors": { 64 | "version": "3.2.3", 65 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", 66 | "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", 67 | "dev": true 68 | }, 69 | "ansi-escapes": { 70 | "version": "3.2.0", 71 | "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", 72 | "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", 73 | "dev": true 74 | }, 75 | "ansi-regex": { 76 | "version": "3.0.0", 77 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", 78 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", 79 | "dev": true 80 | }, 81 | "ansi-styles": { 82 | "version": "3.2.1", 83 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 84 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 85 | "dev": true, 86 | "requires": { 87 | "color-convert": "^1.9.0" 88 | } 89 | }, 90 | "argparse": { 91 | "version": "1.0.10", 92 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 93 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 94 | "dev": true, 95 | "requires": { 96 | "sprintf-js": "~1.0.2" 97 | } 98 | }, 99 | "asn1": { 100 | "version": "0.2.4", 101 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", 102 | "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", 103 | "requires": { 104 | "safer-buffer": "~2.1.0" 105 | } 106 | }, 107 | "assert-plus": { 108 | "version": "1.0.0", 109 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 110 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 111 | }, 112 | "assertion-error": { 113 | "version": "1.1.0", 114 | "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", 115 | "integrity": "sha1-5gtrDo8wG9l+U3UhW9pAbIURjAs=", 116 | "dev": true 117 | }, 118 | "astral-regex": { 119 | "version": "1.0.0", 120 | "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", 121 | "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", 122 | "dev": true 123 | }, 124 | "async": { 125 | "version": "1.5.2", 126 | "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", 127 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", 128 | "dev": true 129 | }, 130 | "asynckit": { 131 | "version": "0.4.0", 132 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 133 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 134 | }, 135 | "aws-sign2": { 136 | "version": "0.7.0", 137 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 138 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 139 | }, 140 | "aws4": { 141 | "version": "1.8.0", 142 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", 143 | "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" 144 | }, 145 | "babylon": { 146 | "version": "6.16.1", 147 | "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.16.1.tgz", 148 | "integrity": "sha1-MMWiL0gZeKnn+M399JaxHZS0BNM=", 149 | "dev": true 150 | }, 151 | "balanced-match": { 152 | "version": "1.0.0", 153 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 154 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" 155 | }, 156 | "bcrypt-pbkdf": { 157 | "version": "1.0.2", 158 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", 159 | "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", 160 | "requires": { 161 | "tweetnacl": "^0.14.3" 162 | } 163 | }, 164 | "bluebird": { 165 | "version": "3.7.0", 166 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.0.tgz", 167 | "integrity": "sha512-aBQ1FxIa7kSWCcmKHlcHFlT2jt6J/l4FzC7KcPELkOJOsPOb/bccdhmIrKDfXhwFrmc7vDoDrrepFvGqjyXGJg==" 168 | }, 169 | "brace-expansion": { 170 | "version": "1.1.11", 171 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 172 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 173 | "requires": { 174 | "balanced-match": "^1.0.0", 175 | "concat-map": "0.0.1" 176 | } 177 | }, 178 | "browser-stdout": { 179 | "version": "1.3.1", 180 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 181 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" 182 | }, 183 | "callsites": { 184 | "version": "3.1.0", 185 | "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", 186 | "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", 187 | "dev": true 188 | }, 189 | "camelcase": { 190 | "version": "5.3.1", 191 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 192 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", 193 | "dev": true 194 | }, 195 | "caseless": { 196 | "version": "0.12.0", 197 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 198 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 199 | }, 200 | "chai": { 201 | "version": "4.2.0", 202 | "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", 203 | "integrity": "sha1-dgqnLPION5XoSxKHfODoNzeqKeU=", 204 | "dev": true, 205 | "requires": { 206 | "assertion-error": "^1.1.0", 207 | "check-error": "^1.0.2", 208 | "deep-eql": "^3.0.1", 209 | "get-func-name": "^2.0.0", 210 | "pathval": "^1.1.0", 211 | "type-detect": "^4.0.5" 212 | } 213 | }, 214 | "chai-as-promised": { 215 | "version": "7.1.1", 216 | "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", 217 | "integrity": "sha1-CGRdgl3rhpbuYXJdv1kMAS6wDKA=", 218 | "dev": true, 219 | "requires": { 220 | "check-error": "^1.0.2" 221 | } 222 | }, 223 | "chalk": { 224 | "version": "2.4.1", 225 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", 226 | "integrity": "sha1-GMSasWoDe26wFSzIPjRxM4IVtm4=", 227 | "dev": true, 228 | "requires": { 229 | "ansi-styles": "^3.2.1", 230 | "escape-string-regexp": "^1.0.5", 231 | "supports-color": "^5.3.0" 232 | }, 233 | "dependencies": { 234 | "ansi-styles": { 235 | "version": "3.2.1", 236 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 237 | "integrity": "sha1-QfuyAkPlCxK+DwS43tvwdSDOhB0=", 238 | "dev": true, 239 | "requires": { 240 | "color-convert": "^1.9.0" 241 | } 242 | }, 243 | "supports-color": { 244 | "version": "5.5.0", 245 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 246 | "integrity": "sha1-4uaaRKyHcveKHsCzW2id9lMO/I8=", 247 | "dev": true, 248 | "requires": { 249 | "has-flag": "^3.0.0" 250 | } 251 | } 252 | } 253 | }, 254 | "chardet": { 255 | "version": "0.7.0", 256 | "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", 257 | "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", 258 | "dev": true 259 | }, 260 | "check-error": { 261 | "version": "1.0.2", 262 | "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", 263 | "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", 264 | "dev": true 265 | }, 266 | "cli-cursor": { 267 | "version": "2.1.0", 268 | "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", 269 | "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", 270 | "dev": true, 271 | "requires": { 272 | "restore-cursor": "^2.0.0" 273 | } 274 | }, 275 | "cli-width": { 276 | "version": "2.2.0", 277 | "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", 278 | "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", 279 | "dev": true 280 | }, 281 | "cliui": { 282 | "version": "5.0.0", 283 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", 284 | "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", 285 | "dev": true, 286 | "requires": { 287 | "string-width": "^3.1.0", 288 | "strip-ansi": "^5.2.0", 289 | "wrap-ansi": "^5.1.0" 290 | }, 291 | "dependencies": { 292 | "string-width": { 293 | "version": "3.1.0", 294 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 295 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 296 | "dev": true, 297 | "requires": { 298 | "emoji-regex": "^7.0.1", 299 | "is-fullwidth-code-point": "^2.0.0", 300 | "strip-ansi": "^5.1.0" 301 | } 302 | } 303 | } 304 | }, 305 | "color-convert": { 306 | "version": "1.9.3", 307 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 308 | "integrity": "sha1-u3GFBpDh8TZWfeYp0tVHHe2kweg=", 309 | "dev": true, 310 | "requires": { 311 | "color-name": "1.1.3" 312 | } 313 | }, 314 | "color-name": { 315 | "version": "1.1.3", 316 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 317 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 318 | "dev": true 319 | }, 320 | "combined-stream": { 321 | "version": "1.0.7", 322 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", 323 | "integrity": "sha1-LR0kMXr7ir6V1tLAsHtXgTU52Cg=", 324 | "requires": { 325 | "delayed-stream": "~1.0.0" 326 | } 327 | }, 328 | "commander": { 329 | "version": "3.0.2", 330 | "resolved": "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz", 331 | "integrity": "sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow==" 332 | }, 333 | "concat-map": { 334 | "version": "0.0.1", 335 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 336 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" 337 | }, 338 | "core-util-is": { 339 | "version": "1.0.2", 340 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 341 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 342 | }, 343 | "cross-spawn": { 344 | "version": "6.0.5", 345 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 346 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 347 | "dev": true, 348 | "requires": { 349 | "nice-try": "^1.0.4", 350 | "path-key": "^2.0.1", 351 | "semver": "^5.5.0", 352 | "shebang-command": "^1.2.0", 353 | "which": "^1.2.9" 354 | }, 355 | "dependencies": { 356 | "semver": { 357 | "version": "5.7.1", 358 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 359 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 360 | "dev": true 361 | } 362 | } 363 | }, 364 | "dashdash": { 365 | "version": "1.14.1", 366 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 367 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 368 | "requires": { 369 | "assert-plus": "^1.0.0" 370 | } 371 | }, 372 | "debug": { 373 | "version": "4.1.1", 374 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 375 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 376 | "dev": true, 377 | "requires": { 378 | "ms": "^2.1.1" 379 | } 380 | }, 381 | "decamelize": { 382 | "version": "1.2.0", 383 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 384 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 385 | "dev": true 386 | }, 387 | "deep-eql": { 388 | "version": "3.0.1", 389 | "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", 390 | "integrity": "sha1-38lARACtHI/gI+faHfHBR8S0RN8=", 391 | "dev": true, 392 | "requires": { 393 | "type-detect": "^4.0.0" 394 | } 395 | }, 396 | "deep-equal": { 397 | "version": "1.1.0", 398 | "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", 399 | "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", 400 | "dev": true, 401 | "requires": { 402 | "is-arguments": "^1.0.4", 403 | "is-date-object": "^1.0.1", 404 | "is-regex": "^1.0.4", 405 | "object-is": "^1.0.1", 406 | "object-keys": "^1.1.1", 407 | "regexp.prototype.flags": "^1.2.0" 408 | } 409 | }, 410 | "deep-is": { 411 | "version": "0.1.3", 412 | "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", 413 | "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", 414 | "dev": true 415 | }, 416 | "define-properties": { 417 | "version": "1.1.3", 418 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 419 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", 420 | "requires": { 421 | "object-keys": "^1.0.12" 422 | } 423 | }, 424 | "delayed-stream": { 425 | "version": "1.0.0", 426 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 427 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 428 | }, 429 | "diff": { 430 | "version": "3.5.0", 431 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 432 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" 433 | }, 434 | "dirty-chai": { 435 | "version": "2.0.1", 436 | "resolved": "https://registry.npmjs.org/dirty-chai/-/dirty-chai-2.0.1.tgz", 437 | "integrity": "sha1-ayFi7xf3lDWJ2oQKvJbnW9oBr/M=", 438 | "dev": true 439 | }, 440 | "doctrine": { 441 | "version": "3.0.0", 442 | "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", 443 | "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", 444 | "dev": true, 445 | "requires": { 446 | "esutils": "^2.0.2" 447 | } 448 | }, 449 | "ecc-jsbn": { 450 | "version": "0.1.2", 451 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", 452 | "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", 453 | "requires": { 454 | "jsbn": "~0.1.0", 455 | "safer-buffer": "^2.1.0" 456 | } 457 | }, 458 | "emoji-regex": { 459 | "version": "7.0.3", 460 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 461 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 462 | "dev": true 463 | }, 464 | "es-abstract": { 465 | "version": "1.15.0", 466 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.15.0.tgz", 467 | "integrity": "sha512-bhkEqWJ2t2lMeaJDuk7okMkJWI/yqgH/EoGwpcvv0XW9RWQsRspI4wt6xuyuvMvvQE3gg/D9HXppgk21w78GyQ==", 468 | "requires": { 469 | "es-to-primitive": "^1.2.0", 470 | "function-bind": "^1.1.1", 471 | "has": "^1.0.3", 472 | "has-symbols": "^1.0.0", 473 | "is-callable": "^1.1.4", 474 | "is-regex": "^1.0.4", 475 | "object-inspect": "^1.6.0", 476 | "object-keys": "^1.1.1", 477 | "string.prototype.trimleft": "^2.1.0", 478 | "string.prototype.trimright": "^2.1.0" 479 | } 480 | }, 481 | "es-to-primitive": { 482 | "version": "1.2.0", 483 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", 484 | "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", 485 | "requires": { 486 | "is-callable": "^1.1.4", 487 | "is-date-object": "^1.0.1", 488 | "is-symbol": "^1.0.2" 489 | } 490 | }, 491 | "escape-string-regexp": { 492 | "version": "1.0.5", 493 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 494 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 495 | }, 496 | "escodegen": { 497 | "version": "1.8.1", 498 | "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", 499 | "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", 500 | "dev": true, 501 | "requires": { 502 | "esprima": "^2.7.1", 503 | "estraverse": "^1.9.1", 504 | "esutils": "^2.0.2", 505 | "optionator": "^0.8.1", 506 | "source-map": "~0.2.0" 507 | }, 508 | "dependencies": { 509 | "esprima": { 510 | "version": "2.7.3", 511 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", 512 | "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", 513 | "dev": true 514 | }, 515 | "estraverse": { 516 | "version": "1.9.3", 517 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", 518 | "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", 519 | "dev": true 520 | } 521 | } 522 | }, 523 | "eslint": { 524 | "version": "6.5.1", 525 | "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.5.1.tgz", 526 | "integrity": "sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A==", 527 | "dev": true, 528 | "requires": { 529 | "@babel/code-frame": "^7.0.0", 530 | "ajv": "^6.10.0", 531 | "chalk": "^2.1.0", 532 | "cross-spawn": "^6.0.5", 533 | "debug": "^4.0.1", 534 | "doctrine": "^3.0.0", 535 | "eslint-scope": "^5.0.0", 536 | "eslint-utils": "^1.4.2", 537 | "eslint-visitor-keys": "^1.1.0", 538 | "espree": "^6.1.1", 539 | "esquery": "^1.0.1", 540 | "esutils": "^2.0.2", 541 | "file-entry-cache": "^5.0.1", 542 | "functional-red-black-tree": "^1.0.1", 543 | "glob-parent": "^5.0.0", 544 | "globals": "^11.7.0", 545 | "ignore": "^4.0.6", 546 | "import-fresh": "^3.0.0", 547 | "imurmurhash": "^0.1.4", 548 | "inquirer": "^6.4.1", 549 | "is-glob": "^4.0.0", 550 | "js-yaml": "^3.13.1", 551 | "json-stable-stringify-without-jsonify": "^1.0.1", 552 | "levn": "^0.3.0", 553 | "lodash": "^4.17.14", 554 | "minimatch": "^3.0.4", 555 | "mkdirp": "^0.5.1", 556 | "natural-compare": "^1.4.0", 557 | "optionator": "^0.8.2", 558 | "progress": "^2.0.0", 559 | "regexpp": "^2.0.1", 560 | "semver": "^6.1.2", 561 | "strip-ansi": "^5.2.0", 562 | "strip-json-comments": "^3.0.1", 563 | "table": "^5.2.3", 564 | "text-table": "^0.2.0", 565 | "v8-compile-cache": "^2.0.3" 566 | }, 567 | "dependencies": { 568 | "ajv": { 569 | "version": "6.10.2", 570 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", 571 | "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", 572 | "dev": true, 573 | "requires": { 574 | "fast-deep-equal": "^2.0.1", 575 | "fast-json-stable-stringify": "^2.0.0", 576 | "json-schema-traverse": "^0.4.1", 577 | "uri-js": "^4.2.2" 578 | } 579 | }, 580 | "lodash": { 581 | "version": "4.17.15", 582 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 583 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 584 | "dev": true 585 | } 586 | } 587 | }, 588 | "eslint-scope": { 589 | "version": "5.0.0", 590 | "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", 591 | "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", 592 | "dev": true, 593 | "requires": { 594 | "esrecurse": "^4.1.0", 595 | "estraverse": "^4.1.1" 596 | } 597 | }, 598 | "eslint-utils": { 599 | "version": "1.4.2", 600 | "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", 601 | "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", 602 | "dev": true, 603 | "requires": { 604 | "eslint-visitor-keys": "^1.0.0" 605 | } 606 | }, 607 | "eslint-visitor-keys": { 608 | "version": "1.1.0", 609 | "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", 610 | "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", 611 | "dev": true 612 | }, 613 | "espree": { 614 | "version": "6.1.1", 615 | "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz", 616 | "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==", 617 | "dev": true, 618 | "requires": { 619 | "acorn": "^7.0.0", 620 | "acorn-jsx": "^5.0.2", 621 | "eslint-visitor-keys": "^1.1.0" 622 | } 623 | }, 624 | "esprima": { 625 | "version": "4.0.1", 626 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 627 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 628 | "dev": true 629 | }, 630 | "esquery": { 631 | "version": "1.0.1", 632 | "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", 633 | "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", 634 | "dev": true, 635 | "requires": { 636 | "estraverse": "^4.0.0" 637 | } 638 | }, 639 | "esrecurse": { 640 | "version": "4.2.1", 641 | "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", 642 | "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", 643 | "dev": true, 644 | "requires": { 645 | "estraverse": "^4.1.0" 646 | } 647 | }, 648 | "estraverse": { 649 | "version": "4.3.0", 650 | "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", 651 | "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", 652 | "dev": true 653 | }, 654 | "esutils": { 655 | "version": "2.0.2", 656 | "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", 657 | "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", 658 | "dev": true 659 | }, 660 | "extend": { 661 | "version": "3.0.2", 662 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", 663 | "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" 664 | }, 665 | "external-editor": { 666 | "version": "3.1.0", 667 | "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", 668 | "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", 669 | "dev": true, 670 | "requires": { 671 | "chardet": "^0.7.0", 672 | "iconv-lite": "^0.4.24", 673 | "tmp": "^0.0.33" 674 | } 675 | }, 676 | "extsprintf": { 677 | "version": "1.3.0", 678 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 679 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 680 | }, 681 | "fast-deep-equal": { 682 | "version": "2.0.1", 683 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", 684 | "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" 685 | }, 686 | "fast-json-stable-stringify": { 687 | "version": "2.0.0", 688 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 689 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 690 | }, 691 | "fast-levenshtein": { 692 | "version": "2.0.6", 693 | "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", 694 | "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", 695 | "dev": true 696 | }, 697 | "figures": { 698 | "version": "2.0.0", 699 | "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", 700 | "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", 701 | "dev": true, 702 | "requires": { 703 | "escape-string-regexp": "^1.0.5" 704 | } 705 | }, 706 | "file-entry-cache": { 707 | "version": "5.0.1", 708 | "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", 709 | "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", 710 | "dev": true, 711 | "requires": { 712 | "flat-cache": "^2.0.1" 713 | } 714 | }, 715 | "filepaths": { 716 | "version": "0.3.0", 717 | "resolved": "https://registry.npmjs.org/filepaths/-/filepaths-0.3.0.tgz", 718 | "integrity": "sha1-ocmkYBturn+4dvwayYR5zrVXwXc=", 719 | "dev": true 720 | }, 721 | "find-up": { 722 | "version": "3.0.0", 723 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", 724 | "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", 725 | "dev": true, 726 | "requires": { 727 | "locate-path": "^3.0.0" 728 | } 729 | }, 730 | "flat": { 731 | "version": "4.1.0", 732 | "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", 733 | "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", 734 | "dev": true, 735 | "requires": { 736 | "is-buffer": "~2.0.3" 737 | } 738 | }, 739 | "flat-cache": { 740 | "version": "2.0.1", 741 | "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", 742 | "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", 743 | "dev": true, 744 | "requires": { 745 | "flatted": "^2.0.0", 746 | "rimraf": "2.6.3", 747 | "write": "1.0.3" 748 | } 749 | }, 750 | "flatted": { 751 | "version": "2.0.1", 752 | "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", 753 | "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", 754 | "dev": true 755 | }, 756 | "forever-agent": { 757 | "version": "0.6.1", 758 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 759 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 760 | }, 761 | "form-data": { 762 | "version": "2.3.3", 763 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", 764 | "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", 765 | "requires": { 766 | "asynckit": "^0.4.0", 767 | "combined-stream": "^1.0.6", 768 | "mime-types": "^2.1.12" 769 | } 770 | }, 771 | "fs.realpath": { 772 | "version": "1.0.0", 773 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 774 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" 775 | }, 776 | "function-bind": { 777 | "version": "1.1.1", 778 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 779 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" 780 | }, 781 | "functional-red-black-tree": { 782 | "version": "1.0.1", 783 | "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", 784 | "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", 785 | "dev": true 786 | }, 787 | "get-caller-file": { 788 | "version": "2.0.5", 789 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 790 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 791 | "dev": true 792 | }, 793 | "get-func-name": { 794 | "version": "2.0.0", 795 | "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", 796 | "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", 797 | "dev": true 798 | }, 799 | "get-stdin": { 800 | "version": "4.0.1", 801 | "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", 802 | "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", 803 | "dev": true 804 | }, 805 | "getpass": { 806 | "version": "0.1.7", 807 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 808 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 809 | "requires": { 810 | "assert-plus": "^1.0.0" 811 | } 812 | }, 813 | "glob": { 814 | "version": "7.1.4", 815 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", 816 | "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", 817 | "dev": true, 818 | "requires": { 819 | "fs.realpath": "^1.0.0", 820 | "inflight": "^1.0.4", 821 | "inherits": "2", 822 | "minimatch": "^3.0.4", 823 | "once": "^1.3.0", 824 | "path-is-absolute": "^1.0.0" 825 | } 826 | }, 827 | "glob-parent": { 828 | "version": "5.1.0", 829 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", 830 | "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", 831 | "dev": true, 832 | "requires": { 833 | "is-glob": "^4.0.1" 834 | } 835 | }, 836 | "globals": { 837 | "version": "11.12.0", 838 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", 839 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", 840 | "dev": true 841 | }, 842 | "growl": { 843 | "version": "1.10.5", 844 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 845 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==" 846 | }, 847 | "handlebars": { 848 | "version": "4.4.3", 849 | "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.3.tgz", 850 | "integrity": "sha512-B0W4A2U1ww3q7VVthTKfh+epHx+q4mCt6iK+zEAzbMBpWQAwxCeKxEGpj/1oQTpzPXDNSOG7hmG14TsISH50yw==", 851 | "dev": true, 852 | "requires": { 853 | "neo-async": "^2.6.0", 854 | "optimist": "^0.6.1", 855 | "source-map": "^0.6.1", 856 | "uglify-js": "^3.1.4" 857 | }, 858 | "dependencies": { 859 | "source-map": { 860 | "version": "0.6.1", 861 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 862 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 863 | "dev": true 864 | } 865 | } 866 | }, 867 | "har-schema": { 868 | "version": "2.0.0", 869 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 870 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 871 | }, 872 | "har-validator": { 873 | "version": "5.1.3", 874 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", 875 | "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", 876 | "requires": { 877 | "ajv": "^6.5.5", 878 | "har-schema": "^2.0.0" 879 | } 880 | }, 881 | "has": { 882 | "version": "1.0.3", 883 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 884 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 885 | "requires": { 886 | "function-bind": "^1.1.1" 887 | } 888 | }, 889 | "has-flag": { 890 | "version": "3.0.0", 891 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 892 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 893 | }, 894 | "has-symbols": { 895 | "version": "1.0.0", 896 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", 897 | "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" 898 | }, 899 | "he": { 900 | "version": "1.1.1", 901 | "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", 902 | "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=" 903 | }, 904 | "hoek": { 905 | "version": "6.1.3", 906 | "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.3.tgz", 907 | "integrity": "sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ==" 908 | }, 909 | "http-signature": { 910 | "version": "1.2.0", 911 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 912 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 913 | "requires": { 914 | "assert-plus": "^1.0.0", 915 | "jsprim": "^1.2.2", 916 | "sshpk": "^1.7.0" 917 | } 918 | }, 919 | "iconv-lite": { 920 | "version": "0.4.24", 921 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", 922 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", 923 | "dev": true, 924 | "requires": { 925 | "safer-buffer": ">= 2.1.2 < 3" 926 | } 927 | }, 928 | "ignore": { 929 | "version": "4.0.6", 930 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", 931 | "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", 932 | "dev": true 933 | }, 934 | "import-fresh": { 935 | "version": "3.1.0", 936 | "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", 937 | "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", 938 | "dev": true, 939 | "requires": { 940 | "parent-module": "^1.0.0", 941 | "resolve-from": "^4.0.0" 942 | } 943 | }, 944 | "imurmurhash": { 945 | "version": "0.1.4", 946 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 947 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 948 | "dev": true 949 | }, 950 | "inflight": { 951 | "version": "1.0.6", 952 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 953 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 954 | "requires": { 955 | "once": "^1.3.0", 956 | "wrappy": "1" 957 | } 958 | }, 959 | "inherits": { 960 | "version": "2.0.3", 961 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 962 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 963 | }, 964 | "inquirer": { 965 | "version": "6.5.2", 966 | "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", 967 | "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", 968 | "dev": true, 969 | "requires": { 970 | "ansi-escapes": "^3.2.0", 971 | "chalk": "^2.4.2", 972 | "cli-cursor": "^2.1.0", 973 | "cli-width": "^2.0.0", 974 | "external-editor": "^3.0.3", 975 | "figures": "^2.0.0", 976 | "lodash": "^4.17.12", 977 | "mute-stream": "0.0.7", 978 | "run-async": "^2.2.0", 979 | "rxjs": "^6.4.0", 980 | "string-width": "^2.1.0", 981 | "strip-ansi": "^5.1.0", 982 | "through": "^2.3.6" 983 | }, 984 | "dependencies": { 985 | "chalk": { 986 | "version": "2.4.2", 987 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 988 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 989 | "dev": true, 990 | "requires": { 991 | "ansi-styles": "^3.2.1", 992 | "escape-string-regexp": "^1.0.5", 993 | "supports-color": "^5.3.0" 994 | } 995 | } 996 | } 997 | }, 998 | "is-arguments": { 999 | "version": "1.0.4", 1000 | "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", 1001 | "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", 1002 | "dev": true 1003 | }, 1004 | "is-buffer": { 1005 | "version": "2.0.4", 1006 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", 1007 | "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", 1008 | "dev": true 1009 | }, 1010 | "is-callable": { 1011 | "version": "1.1.4", 1012 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", 1013 | "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==" 1014 | }, 1015 | "is-date-object": { 1016 | "version": "1.0.1", 1017 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", 1018 | "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" 1019 | }, 1020 | "is-extglob": { 1021 | "version": "2.1.1", 1022 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 1023 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 1024 | "dev": true 1025 | }, 1026 | "is-fullwidth-code-point": { 1027 | "version": "2.0.0", 1028 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 1029 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 1030 | "dev": true 1031 | }, 1032 | "is-glob": { 1033 | "version": "4.0.1", 1034 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 1035 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 1036 | "dev": true, 1037 | "requires": { 1038 | "is-extglob": "^2.1.1" 1039 | } 1040 | }, 1041 | "is-promise": { 1042 | "version": "2.1.0", 1043 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", 1044 | "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", 1045 | "dev": true 1046 | }, 1047 | "is-regex": { 1048 | "version": "1.0.4", 1049 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", 1050 | "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", 1051 | "requires": { 1052 | "has": "^1.0.1" 1053 | } 1054 | }, 1055 | "is-symbol": { 1056 | "version": "1.0.2", 1057 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", 1058 | "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", 1059 | "requires": { 1060 | "has-symbols": "^1.0.0" 1061 | } 1062 | }, 1063 | "is-typedarray": { 1064 | "version": "1.0.0", 1065 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 1066 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 1067 | }, 1068 | "isemail": { 1069 | "version": "3.2.0", 1070 | "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", 1071 | "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", 1072 | "requires": { 1073 | "punycode": "2.x.x" 1074 | } 1075 | }, 1076 | "isexe": { 1077 | "version": "2.0.0", 1078 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 1079 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 1080 | "dev": true 1081 | }, 1082 | "isstream": { 1083 | "version": "0.1.2", 1084 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 1085 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 1086 | }, 1087 | "istanbul": { 1088 | "version": "0.4.5", 1089 | "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", 1090 | "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", 1091 | "dev": true, 1092 | "requires": { 1093 | "abbrev": "1.0.x", 1094 | "async": "1.x", 1095 | "escodegen": "1.8.x", 1096 | "esprima": "2.7.x", 1097 | "glob": "^5.0.15", 1098 | "handlebars": "^4.0.1", 1099 | "js-yaml": "3.x", 1100 | "mkdirp": "0.5.x", 1101 | "nopt": "3.x", 1102 | "once": "1.x", 1103 | "resolve": "1.1.x", 1104 | "supports-color": "^3.1.0", 1105 | "which": "^1.1.1", 1106 | "wordwrap": "^1.0.0" 1107 | }, 1108 | "dependencies": { 1109 | "esprima": { 1110 | "version": "2.7.3", 1111 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", 1112 | "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", 1113 | "dev": true 1114 | }, 1115 | "glob": { 1116 | "version": "5.0.15", 1117 | "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", 1118 | "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", 1119 | "dev": true, 1120 | "requires": { 1121 | "inflight": "^1.0.4", 1122 | "inherits": "2", 1123 | "minimatch": "2 || 3", 1124 | "once": "^1.3.0", 1125 | "path-is-absolute": "^1.0.0" 1126 | } 1127 | }, 1128 | "has-flag": { 1129 | "version": "1.0.0", 1130 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", 1131 | "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", 1132 | "dev": true 1133 | }, 1134 | "supports-color": { 1135 | "version": "3.2.3", 1136 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", 1137 | "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", 1138 | "dev": true, 1139 | "requires": { 1140 | "has-flag": "^1.0.0" 1141 | } 1142 | } 1143 | } 1144 | }, 1145 | "jacoco-parse": { 1146 | "version": "2.0.1", 1147 | "resolved": "https://registry.npmjs.org/jacoco-parse/-/jacoco-parse-2.0.1.tgz", 1148 | "integrity": "sha512-YGhIb2iXuQ4/zNh2zgHd6Z6dqlYwLYH1wfsxtTNQ+jnHH9PhhuMwqOFihXymSI41trxok48LdKkSeDIWs28tYg==", 1149 | "requires": { 1150 | "mocha": "^5.2.0", 1151 | "xml2js": "^0.4.9" 1152 | }, 1153 | "dependencies": { 1154 | "commander": { 1155 | "version": "2.15.1", 1156 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", 1157 | "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" 1158 | }, 1159 | "debug": { 1160 | "version": "3.1.0", 1161 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 1162 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 1163 | "requires": { 1164 | "ms": "2.0.0" 1165 | } 1166 | }, 1167 | "glob": { 1168 | "version": "7.1.2", 1169 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", 1170 | "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", 1171 | "requires": { 1172 | "fs.realpath": "^1.0.0", 1173 | "inflight": "^1.0.4", 1174 | "inherits": "2", 1175 | "minimatch": "^3.0.4", 1176 | "once": "^1.3.0", 1177 | "path-is-absolute": "^1.0.0" 1178 | } 1179 | }, 1180 | "mocha": { 1181 | "version": "5.2.0", 1182 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", 1183 | "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", 1184 | "requires": { 1185 | "browser-stdout": "1.3.1", 1186 | "commander": "2.15.1", 1187 | "debug": "3.1.0", 1188 | "diff": "3.5.0", 1189 | "escape-string-regexp": "1.0.5", 1190 | "glob": "7.1.2", 1191 | "growl": "1.10.5", 1192 | "he": "1.1.1", 1193 | "minimatch": "3.0.4", 1194 | "mkdirp": "0.5.1", 1195 | "supports-color": "5.4.0" 1196 | } 1197 | }, 1198 | "ms": { 1199 | "version": "2.0.0", 1200 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 1201 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 1202 | }, 1203 | "supports-color": { 1204 | "version": "5.4.0", 1205 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", 1206 | "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", 1207 | "requires": { 1208 | "has-flag": "^3.0.0" 1209 | } 1210 | } 1211 | } 1212 | }, 1213 | "joi": { 1214 | "version": "14.3.1", 1215 | "resolved": "https://registry.npmjs.org/joi/-/joi-14.3.1.tgz", 1216 | "integrity": "sha512-LQDdM+pkOrpAn4Lp+neNIFV3axv1Vna3j38bisbQhETPMANYRbFJFUyOZcOClYvM/hppMhGWuKSFEK9vjrB+bQ==", 1217 | "requires": { 1218 | "hoek": "6.x.x", 1219 | "isemail": "3.x.x", 1220 | "topo": "3.x.x" 1221 | } 1222 | }, 1223 | "js-tokens": { 1224 | "version": "4.0.0", 1225 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 1226 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 1227 | "dev": true 1228 | }, 1229 | "js-yaml": { 1230 | "version": "3.13.1", 1231 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 1232 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 1233 | "dev": true, 1234 | "requires": { 1235 | "argparse": "^1.0.7", 1236 | "esprima": "^4.0.0" 1237 | } 1238 | }, 1239 | "jsbn": { 1240 | "version": "0.1.1", 1241 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 1242 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" 1243 | }, 1244 | "jsinspect": { 1245 | "version": "0.12.7", 1246 | "resolved": "https://registry.npmjs.org/jsinspect/-/jsinspect-0.12.7.tgz", 1247 | "integrity": "sha1-o/jupHyokxuU1iBiCJ69oJmGaFQ=", 1248 | "dev": true, 1249 | "requires": { 1250 | "babylon": "6.16.1", 1251 | "chalk": "^2.1.0", 1252 | "commander": "^2.11.0", 1253 | "filepaths": "0.3.0", 1254 | "stable": "^0.1.6", 1255 | "strip-indent": "^1.0.1", 1256 | "strip-json-comments": "1.0.2" 1257 | }, 1258 | "dependencies": { 1259 | "commander": { 1260 | "version": "2.20.3", 1261 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", 1262 | "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", 1263 | "dev": true 1264 | }, 1265 | "strip-json-comments": { 1266 | "version": "1.0.2", 1267 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.2.tgz", 1268 | "integrity": "sha1-WkirlgI9usG3uND/q/b2PxZ3vp8=", 1269 | "dev": true 1270 | } 1271 | } 1272 | }, 1273 | "json-schema": { 1274 | "version": "0.2.3", 1275 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 1276 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" 1277 | }, 1278 | "json-schema-traverse": { 1279 | "version": "0.4.1", 1280 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", 1281 | "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" 1282 | }, 1283 | "json-stable-stringify-without-jsonify": { 1284 | "version": "1.0.1", 1285 | "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", 1286 | "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", 1287 | "dev": true 1288 | }, 1289 | "json-stringify-safe": { 1290 | "version": "5.0.1", 1291 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 1292 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 1293 | }, 1294 | "jsprim": { 1295 | "version": "1.4.1", 1296 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 1297 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 1298 | "requires": { 1299 | "assert-plus": "1.0.0", 1300 | "extsprintf": "1.3.0", 1301 | "json-schema": "0.2.3", 1302 | "verror": "1.10.0" 1303 | } 1304 | }, 1305 | "lcov-parse": { 1306 | "version": "1.0.0", 1307 | "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", 1308 | "integrity": "sha1-6w1GtUER68VhrLTECO+TY73I9+A=" 1309 | }, 1310 | "levn": { 1311 | "version": "0.3.0", 1312 | "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", 1313 | "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", 1314 | "dev": true, 1315 | "requires": { 1316 | "prelude-ls": "~1.1.2", 1317 | "type-check": "~0.3.2" 1318 | } 1319 | }, 1320 | "locate-path": { 1321 | "version": "3.0.0", 1322 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", 1323 | "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", 1324 | "dev": true, 1325 | "requires": { 1326 | "p-locate": "^3.0.0", 1327 | "path-exists": "^3.0.0" 1328 | } 1329 | }, 1330 | "lodash": { 1331 | "version": "4.17.15", 1332 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 1333 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" 1334 | }, 1335 | "log-driver": { 1336 | "version": "1.2.7", 1337 | "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", 1338 | "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" 1339 | }, 1340 | "log-symbols": { 1341 | "version": "2.2.0", 1342 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", 1343 | "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", 1344 | "dev": true, 1345 | "requires": { 1346 | "chalk": "^2.0.1" 1347 | } 1348 | }, 1349 | "mime-db": { 1350 | "version": "1.37.0", 1351 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", 1352 | "integrity": "sha1-C2oM5v2+lXbiXx8tL96IMNwK0Ng=" 1353 | }, 1354 | "mime-types": { 1355 | "version": "2.1.21", 1356 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", 1357 | "integrity": "sha1-KJlaoey3cHQv5q5+WPkYHHRLP5Y=", 1358 | "requires": { 1359 | "mime-db": "~1.37.0" 1360 | } 1361 | }, 1362 | "mimic-fn": { 1363 | "version": "1.2.0", 1364 | "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", 1365 | "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", 1366 | "dev": true 1367 | }, 1368 | "minimatch": { 1369 | "version": "3.0.4", 1370 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 1371 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 1372 | "requires": { 1373 | "brace-expansion": "^1.1.7" 1374 | } 1375 | }, 1376 | "minimist": { 1377 | "version": "0.0.8", 1378 | "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", 1379 | "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" 1380 | }, 1381 | "mkdirp": { 1382 | "version": "0.5.1", 1383 | "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", 1384 | "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", 1385 | "requires": { 1386 | "minimist": "0.0.8" 1387 | } 1388 | }, 1389 | "mocha": { 1390 | "version": "6.2.1", 1391 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.1.tgz", 1392 | "integrity": "sha512-VCcWkLHwk79NYQc8cxhkmI8IigTIhsCwZ6RTxQsqK6go4UvEhzJkYuHm8B2YtlSxcYq2fY+ucr4JBwoD6ci80A==", 1393 | "dev": true, 1394 | "requires": { 1395 | "ansi-colors": "3.2.3", 1396 | "browser-stdout": "1.3.1", 1397 | "debug": "3.2.6", 1398 | "diff": "3.5.0", 1399 | "escape-string-regexp": "1.0.5", 1400 | "find-up": "3.0.0", 1401 | "glob": "7.1.3", 1402 | "growl": "1.10.5", 1403 | "he": "1.2.0", 1404 | "js-yaml": "3.13.1", 1405 | "log-symbols": "2.2.0", 1406 | "minimatch": "3.0.4", 1407 | "mkdirp": "0.5.1", 1408 | "ms": "2.1.1", 1409 | "node-environment-flags": "1.0.5", 1410 | "object.assign": "4.1.0", 1411 | "strip-json-comments": "2.0.1", 1412 | "supports-color": "6.0.0", 1413 | "which": "1.3.1", 1414 | "wide-align": "1.1.3", 1415 | "yargs": "13.3.0", 1416 | "yargs-parser": "13.1.1", 1417 | "yargs-unparser": "1.6.0" 1418 | }, 1419 | "dependencies": { 1420 | "debug": { 1421 | "version": "3.2.6", 1422 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 1423 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 1424 | "dev": true, 1425 | "requires": { 1426 | "ms": "^2.1.1" 1427 | } 1428 | }, 1429 | "glob": { 1430 | "version": "7.1.3", 1431 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 1432 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", 1433 | "dev": true, 1434 | "requires": { 1435 | "fs.realpath": "^1.0.0", 1436 | "inflight": "^1.0.4", 1437 | "inherits": "2", 1438 | "minimatch": "^3.0.4", 1439 | "once": "^1.3.0", 1440 | "path-is-absolute": "^1.0.0" 1441 | } 1442 | }, 1443 | "he": { 1444 | "version": "1.2.0", 1445 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1446 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1447 | "dev": true 1448 | }, 1449 | "ms": { 1450 | "version": "2.1.1", 1451 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 1452 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", 1453 | "dev": true 1454 | }, 1455 | "strip-json-comments": { 1456 | "version": "2.0.1", 1457 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 1458 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 1459 | "dev": true 1460 | }, 1461 | "supports-color": { 1462 | "version": "6.0.0", 1463 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", 1464 | "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", 1465 | "dev": true, 1466 | "requires": { 1467 | "has-flag": "^3.0.0" 1468 | } 1469 | } 1470 | } 1471 | }, 1472 | "ms": { 1473 | "version": "2.1.2", 1474 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 1475 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 1476 | "dev": true 1477 | }, 1478 | "mute-stream": { 1479 | "version": "0.0.7", 1480 | "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", 1481 | "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", 1482 | "dev": true 1483 | }, 1484 | "natural-compare": { 1485 | "version": "1.4.0", 1486 | "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", 1487 | "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", 1488 | "dev": true 1489 | }, 1490 | "neo-async": { 1491 | "version": "2.6.1", 1492 | "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", 1493 | "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", 1494 | "dev": true 1495 | }, 1496 | "nice-try": { 1497 | "version": "1.0.5", 1498 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 1499 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", 1500 | "dev": true 1501 | }, 1502 | "nock": { 1503 | "version": "9.6.1", 1504 | "resolved": "https://registry.npmjs.org/nock/-/nock-9.6.1.tgz", 1505 | "integrity": "sha512-EDgl/WgNQ0C1BZZlASOQkQdE6tAWXJi8QQlugqzN64JJkvZ7ILijZuG24r4vCC7yOfnm6HKpne5AGExLGCeBWg==", 1506 | "dev": true, 1507 | "requires": { 1508 | "chai": "^4.1.2", 1509 | "debug": "^3.1.0", 1510 | "deep-equal": "^1.0.0", 1511 | "json-stringify-safe": "^5.0.1", 1512 | "lodash": "^4.17.5", 1513 | "mkdirp": "^0.5.0", 1514 | "propagate": "^1.0.0", 1515 | "qs": "^6.5.1", 1516 | "semver": "^5.5.0" 1517 | }, 1518 | "dependencies": { 1519 | "debug": { 1520 | "version": "3.2.6", 1521 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 1522 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 1523 | "dev": true, 1524 | "requires": { 1525 | "ms": "^2.1.1" 1526 | } 1527 | }, 1528 | "semver": { 1529 | "version": "5.7.1", 1530 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1531 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 1532 | "dev": true 1533 | } 1534 | } 1535 | }, 1536 | "node-environment-flags": { 1537 | "version": "1.0.5", 1538 | "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", 1539 | "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", 1540 | "dev": true, 1541 | "requires": { 1542 | "object.getownpropertydescriptors": "^2.0.3", 1543 | "semver": "^5.7.0" 1544 | }, 1545 | "dependencies": { 1546 | "semver": { 1547 | "version": "5.7.1", 1548 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 1549 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 1550 | "dev": true 1551 | } 1552 | } 1553 | }, 1554 | "nopt": { 1555 | "version": "3.0.6", 1556 | "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", 1557 | "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", 1558 | "dev": true, 1559 | "requires": { 1560 | "abbrev": "1" 1561 | } 1562 | }, 1563 | "oauth-sign": { 1564 | "version": "0.9.0", 1565 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", 1566 | "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" 1567 | }, 1568 | "object-inspect": { 1569 | "version": "1.6.0", 1570 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz", 1571 | "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==" 1572 | }, 1573 | "object-is": { 1574 | "version": "1.0.1", 1575 | "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.1.tgz", 1576 | "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=", 1577 | "dev": true 1578 | }, 1579 | "object-keys": { 1580 | "version": "1.1.1", 1581 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 1582 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" 1583 | }, 1584 | "object.assign": { 1585 | "version": "4.1.0", 1586 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", 1587 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", 1588 | "dev": true, 1589 | "requires": { 1590 | "define-properties": "^1.1.2", 1591 | "function-bind": "^1.1.1", 1592 | "has-symbols": "^1.0.0", 1593 | "object-keys": "^1.0.11" 1594 | } 1595 | }, 1596 | "object.getownpropertydescriptors": { 1597 | "version": "2.0.3", 1598 | "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz", 1599 | "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=", 1600 | "requires": { 1601 | "define-properties": "^1.1.2", 1602 | "es-abstract": "^1.5.1" 1603 | } 1604 | }, 1605 | "once": { 1606 | "version": "1.4.0", 1607 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 1608 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 1609 | "requires": { 1610 | "wrappy": "1" 1611 | } 1612 | }, 1613 | "onetime": { 1614 | "version": "2.0.1", 1615 | "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", 1616 | "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", 1617 | "dev": true, 1618 | "requires": { 1619 | "mimic-fn": "^1.0.0" 1620 | } 1621 | }, 1622 | "optimist": { 1623 | "version": "0.6.1", 1624 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", 1625 | "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", 1626 | "dev": true, 1627 | "requires": { 1628 | "minimist": "~0.0.1", 1629 | "wordwrap": "~0.0.2" 1630 | }, 1631 | "dependencies": { 1632 | "wordwrap": { 1633 | "version": "0.0.3", 1634 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 1635 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", 1636 | "dev": true 1637 | } 1638 | } 1639 | }, 1640 | "optionator": { 1641 | "version": "0.8.2", 1642 | "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", 1643 | "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", 1644 | "dev": true, 1645 | "requires": { 1646 | "deep-is": "~0.1.3", 1647 | "fast-levenshtein": "~2.0.4", 1648 | "levn": "~0.3.0", 1649 | "prelude-ls": "~1.1.2", 1650 | "type-check": "~0.3.2", 1651 | "wordwrap": "~1.0.0" 1652 | } 1653 | }, 1654 | "os-tmpdir": { 1655 | "version": "1.0.2", 1656 | "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", 1657 | "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", 1658 | "dev": true 1659 | }, 1660 | "p-limit": { 1661 | "version": "2.2.1", 1662 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", 1663 | "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", 1664 | "dev": true, 1665 | "requires": { 1666 | "p-try": "^2.0.0" 1667 | } 1668 | }, 1669 | "p-locate": { 1670 | "version": "3.0.0", 1671 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", 1672 | "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", 1673 | "dev": true, 1674 | "requires": { 1675 | "p-limit": "^2.0.0" 1676 | } 1677 | }, 1678 | "p-try": { 1679 | "version": "2.2.0", 1680 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", 1681 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", 1682 | "dev": true 1683 | }, 1684 | "parent-module": { 1685 | "version": "1.0.1", 1686 | "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", 1687 | "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", 1688 | "dev": true, 1689 | "requires": { 1690 | "callsites": "^3.0.0" 1691 | } 1692 | }, 1693 | "path-exists": { 1694 | "version": "3.0.0", 1695 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", 1696 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", 1697 | "dev": true 1698 | }, 1699 | "path-is-absolute": { 1700 | "version": "1.0.1", 1701 | "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 1702 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" 1703 | }, 1704 | "path-key": { 1705 | "version": "2.0.1", 1706 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 1707 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", 1708 | "dev": true 1709 | }, 1710 | "pathval": { 1711 | "version": "1.1.0", 1712 | "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", 1713 | "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", 1714 | "dev": true 1715 | }, 1716 | "performance-now": { 1717 | "version": "2.1.0", 1718 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 1719 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 1720 | }, 1721 | "prelude-ls": { 1722 | "version": "1.1.2", 1723 | "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", 1724 | "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", 1725 | "dev": true 1726 | }, 1727 | "progress": { 1728 | "version": "2.0.3", 1729 | "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", 1730 | "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", 1731 | "dev": true 1732 | }, 1733 | "propagate": { 1734 | "version": "1.0.0", 1735 | "resolved": "https://registry.npmjs.org/propagate/-/propagate-1.0.0.tgz", 1736 | "integrity": "sha1-AMLa7t2iDofjeCs0Stuhzd1q1wk=", 1737 | "dev": true 1738 | }, 1739 | "psl": { 1740 | "version": "1.1.29", 1741 | "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", 1742 | "integrity": "sha1-YPWA02AXC7cip5fMcEQR5tqFDGc=" 1743 | }, 1744 | "punycode": { 1745 | "version": "2.1.1", 1746 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", 1747 | "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" 1748 | }, 1749 | "qs": { 1750 | "version": "6.5.2", 1751 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", 1752 | "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=" 1753 | }, 1754 | "regexp.prototype.flags": { 1755 | "version": "1.2.0", 1756 | "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", 1757 | "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", 1758 | "dev": true, 1759 | "requires": { 1760 | "define-properties": "^1.1.2" 1761 | } 1762 | }, 1763 | "regexpp": { 1764 | "version": "2.0.1", 1765 | "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", 1766 | "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", 1767 | "dev": true 1768 | }, 1769 | "request": { 1770 | "version": "2.88.0", 1771 | "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", 1772 | "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", 1773 | "requires": { 1774 | "aws-sign2": "~0.7.0", 1775 | "aws4": "^1.8.0", 1776 | "caseless": "~0.12.0", 1777 | "combined-stream": "~1.0.6", 1778 | "extend": "~3.0.2", 1779 | "forever-agent": "~0.6.1", 1780 | "form-data": "~2.3.2", 1781 | "har-validator": "~5.1.0", 1782 | "http-signature": "~1.2.0", 1783 | "is-typedarray": "~1.0.0", 1784 | "isstream": "~0.1.2", 1785 | "json-stringify-safe": "~5.0.1", 1786 | "mime-types": "~2.1.19", 1787 | "oauth-sign": "~0.9.0", 1788 | "performance-now": "^2.1.0", 1789 | "qs": "~6.5.2", 1790 | "safe-buffer": "^5.1.2", 1791 | "tough-cookie": "~2.4.3", 1792 | "tunnel-agent": "^0.6.0", 1793 | "uuid": "^3.3.2" 1794 | } 1795 | }, 1796 | "request-promise": { 1797 | "version": "4.2.4", 1798 | "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.4.tgz", 1799 | "integrity": "sha512-8wgMrvE546PzbR5WbYxUQogUnUDfM0S7QIFZMID+J73vdFARkFy+HElj4T+MWYhpXwlLp0EQ8Zoj8xUA0he4Vg==", 1800 | "requires": { 1801 | "bluebird": "^3.5.0", 1802 | "request-promise-core": "1.1.2", 1803 | "stealthy-require": "^1.1.1", 1804 | "tough-cookie": "^2.3.3" 1805 | } 1806 | }, 1807 | "request-promise-core": { 1808 | "version": "1.1.2", 1809 | "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", 1810 | "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", 1811 | "requires": { 1812 | "lodash": "^4.17.11" 1813 | } 1814 | }, 1815 | "require-directory": { 1816 | "version": "2.1.1", 1817 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 1818 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 1819 | "dev": true 1820 | }, 1821 | "require-main-filename": { 1822 | "version": "2.0.0", 1823 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", 1824 | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", 1825 | "dev": true 1826 | }, 1827 | "resolve": { 1828 | "version": "1.1.7", 1829 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", 1830 | "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", 1831 | "dev": true 1832 | }, 1833 | "resolve-from": { 1834 | "version": "4.0.0", 1835 | "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", 1836 | "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", 1837 | "dev": true 1838 | }, 1839 | "restore-cursor": { 1840 | "version": "2.0.0", 1841 | "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", 1842 | "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", 1843 | "dev": true, 1844 | "requires": { 1845 | "onetime": "^2.0.0", 1846 | "signal-exit": "^3.0.2" 1847 | } 1848 | }, 1849 | "rimraf": { 1850 | "version": "2.6.3", 1851 | "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", 1852 | "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", 1853 | "dev": true, 1854 | "requires": { 1855 | "glob": "^7.1.3" 1856 | } 1857 | }, 1858 | "run-async": { 1859 | "version": "2.3.0", 1860 | "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", 1861 | "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", 1862 | "dev": true, 1863 | "requires": { 1864 | "is-promise": "^2.1.0" 1865 | } 1866 | }, 1867 | "rxjs": { 1868 | "version": "6.5.3", 1869 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", 1870 | "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", 1871 | "dev": true, 1872 | "requires": { 1873 | "tslib": "^1.9.0" 1874 | } 1875 | }, 1876 | "safe-buffer": { 1877 | "version": "5.1.2", 1878 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 1879 | "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=" 1880 | }, 1881 | "safer-buffer": { 1882 | "version": "2.1.2", 1883 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 1884 | "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" 1885 | }, 1886 | "sax": { 1887 | "version": "1.2.4", 1888 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 1889 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 1890 | }, 1891 | "semver": { 1892 | "version": "6.3.0", 1893 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 1894 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 1895 | "dev": true 1896 | }, 1897 | "set-blocking": { 1898 | "version": "2.0.0", 1899 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 1900 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 1901 | "dev": true 1902 | }, 1903 | "shebang-command": { 1904 | "version": "1.2.0", 1905 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 1906 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 1907 | "dev": true, 1908 | "requires": { 1909 | "shebang-regex": "^1.0.0" 1910 | } 1911 | }, 1912 | "shebang-regex": { 1913 | "version": "1.0.0", 1914 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 1915 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", 1916 | "dev": true 1917 | }, 1918 | "signal-exit": { 1919 | "version": "3.0.2", 1920 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", 1921 | "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", 1922 | "dev": true 1923 | }, 1924 | "slice-ansi": { 1925 | "version": "2.1.0", 1926 | "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", 1927 | "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", 1928 | "dev": true, 1929 | "requires": { 1930 | "ansi-styles": "^3.2.0", 1931 | "astral-regex": "^1.0.0", 1932 | "is-fullwidth-code-point": "^2.0.0" 1933 | } 1934 | }, 1935 | "source-map": { 1936 | "version": "0.2.0", 1937 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", 1938 | "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", 1939 | "dev": true, 1940 | "optional": true, 1941 | "requires": { 1942 | "amdefine": ">=0.0.4" 1943 | } 1944 | }, 1945 | "sprintf-js": { 1946 | "version": "1.0.3", 1947 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 1948 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 1949 | "dev": true 1950 | }, 1951 | "sshpk": { 1952 | "version": "1.15.2", 1953 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", 1954 | "integrity": "sha1-yUbWvZsaOdDoY1dj9SQtbtbctik=", 1955 | "requires": { 1956 | "asn1": "~0.2.3", 1957 | "assert-plus": "^1.0.0", 1958 | "bcrypt-pbkdf": "^1.0.0", 1959 | "dashdash": "^1.12.0", 1960 | "ecc-jsbn": "~0.1.1", 1961 | "getpass": "^0.1.1", 1962 | "jsbn": "~0.1.0", 1963 | "safer-buffer": "^2.0.2", 1964 | "tweetnacl": "~0.14.0" 1965 | } 1966 | }, 1967 | "stable": { 1968 | "version": "0.1.8", 1969 | "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", 1970 | "integrity": "sha1-g26zyDgv4pNv6vVEYxAXzn1Ho88=", 1971 | "dev": true 1972 | }, 1973 | "stealthy-require": { 1974 | "version": "1.1.1", 1975 | "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", 1976 | "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" 1977 | }, 1978 | "string-width": { 1979 | "version": "2.1.1", 1980 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", 1981 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", 1982 | "dev": true, 1983 | "requires": { 1984 | "is-fullwidth-code-point": "^2.0.0", 1985 | "strip-ansi": "^4.0.0" 1986 | }, 1987 | "dependencies": { 1988 | "strip-ansi": { 1989 | "version": "4.0.0", 1990 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 1991 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 1992 | "dev": true, 1993 | "requires": { 1994 | "ansi-regex": "^3.0.0" 1995 | } 1996 | } 1997 | } 1998 | }, 1999 | "string.prototype.trimleft": { 2000 | "version": "2.1.0", 2001 | "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.0.tgz", 2002 | "integrity": "sha512-FJ6b7EgdKxxbDxc79cOlok6Afd++TTs5szo+zJTUyow3ycrRfJVE2pq3vcN53XexvKZu/DJMDfeI/qMiZTrjTw==", 2003 | "requires": { 2004 | "define-properties": "^1.1.3", 2005 | "function-bind": "^1.1.1" 2006 | } 2007 | }, 2008 | "string.prototype.trimright": { 2009 | "version": "2.1.0", 2010 | "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.0.tgz", 2011 | "integrity": "sha512-fXZTSV55dNBwv16uw+hh5jkghxSnc5oHq+5K/gXgizHwAvMetdAJlHqqoFC1FSDVPYWLkAKl2cxpUT41sV7nSg==", 2012 | "requires": { 2013 | "define-properties": "^1.1.3", 2014 | "function-bind": "^1.1.1" 2015 | } 2016 | }, 2017 | "strip-ansi": { 2018 | "version": "5.2.0", 2019 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 2020 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 2021 | "dev": true, 2022 | "requires": { 2023 | "ansi-regex": "^4.1.0" 2024 | }, 2025 | "dependencies": { 2026 | "ansi-regex": { 2027 | "version": "4.1.0", 2028 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 2029 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 2030 | "dev": true 2031 | } 2032 | } 2033 | }, 2034 | "strip-indent": { 2035 | "version": "1.0.1", 2036 | "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", 2037 | "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", 2038 | "dev": true, 2039 | "requires": { 2040 | "get-stdin": "^4.0.1" 2041 | } 2042 | }, 2043 | "strip-json-comments": { 2044 | "version": "3.0.1", 2045 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", 2046 | "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", 2047 | "dev": true 2048 | }, 2049 | "supports-color": { 2050 | "version": "5.5.0", 2051 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 2052 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 2053 | "dev": true, 2054 | "requires": { 2055 | "has-flag": "^3.0.0" 2056 | } 2057 | }, 2058 | "table": { 2059 | "version": "5.4.6", 2060 | "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", 2061 | "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", 2062 | "dev": true, 2063 | "requires": { 2064 | "ajv": "^6.10.2", 2065 | "lodash": "^4.17.14", 2066 | "slice-ansi": "^2.1.0", 2067 | "string-width": "^3.0.0" 2068 | }, 2069 | "dependencies": { 2070 | "ajv": { 2071 | "version": "6.10.2", 2072 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", 2073 | "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", 2074 | "dev": true, 2075 | "requires": { 2076 | "fast-deep-equal": "^2.0.1", 2077 | "fast-json-stable-stringify": "^2.0.0", 2078 | "json-schema-traverse": "^0.4.1", 2079 | "uri-js": "^4.2.2" 2080 | } 2081 | }, 2082 | "lodash": { 2083 | "version": "4.17.15", 2084 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 2085 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 2086 | "dev": true 2087 | }, 2088 | "string-width": { 2089 | "version": "3.1.0", 2090 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 2091 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 2092 | "dev": true, 2093 | "requires": { 2094 | "emoji-regex": "^7.0.1", 2095 | "is-fullwidth-code-point": "^2.0.0", 2096 | "strip-ansi": "^5.1.0" 2097 | } 2098 | } 2099 | } 2100 | }, 2101 | "text-table": { 2102 | "version": "0.2.0", 2103 | "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", 2104 | "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", 2105 | "dev": true 2106 | }, 2107 | "through": { 2108 | "version": "2.3.8", 2109 | "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", 2110 | "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", 2111 | "dev": true 2112 | }, 2113 | "tmp": { 2114 | "version": "0.0.33", 2115 | "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", 2116 | "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", 2117 | "dev": true, 2118 | "requires": { 2119 | "os-tmpdir": "~1.0.2" 2120 | } 2121 | }, 2122 | "topo": { 2123 | "version": "3.0.3", 2124 | "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", 2125 | "integrity": "sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ==", 2126 | "requires": { 2127 | "hoek": "6.x.x" 2128 | } 2129 | }, 2130 | "tough-cookie": { 2131 | "version": "2.4.3", 2132 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", 2133 | "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", 2134 | "requires": { 2135 | "psl": "^1.1.24", 2136 | "punycode": "^1.4.1" 2137 | }, 2138 | "dependencies": { 2139 | "punycode": { 2140 | "version": "1.4.1", 2141 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", 2142 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" 2143 | } 2144 | } 2145 | }, 2146 | "tslib": { 2147 | "version": "1.10.0", 2148 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", 2149 | "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", 2150 | "dev": true 2151 | }, 2152 | "tunnel-agent": { 2153 | "version": "0.6.0", 2154 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 2155 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 2156 | "requires": { 2157 | "safe-buffer": "^5.0.1" 2158 | } 2159 | }, 2160 | "tweetnacl": { 2161 | "version": "0.14.5", 2162 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 2163 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" 2164 | }, 2165 | "type-check": { 2166 | "version": "0.3.2", 2167 | "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", 2168 | "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", 2169 | "dev": true, 2170 | "requires": { 2171 | "prelude-ls": "~1.1.2" 2172 | } 2173 | }, 2174 | "type-detect": { 2175 | "version": "4.0.8", 2176 | "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", 2177 | "integrity": "sha1-dkb7XxiHHPu3dJ5pvTmmOI63RQw=", 2178 | "dev": true 2179 | }, 2180 | "uglify-js": { 2181 | "version": "3.4.9", 2182 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", 2183 | "integrity": "sha1-rwLxgMEgfXZDLkc+0koo9KeCuuM=", 2184 | "dev": true, 2185 | "optional": true, 2186 | "requires": { 2187 | "commander": "~2.17.1", 2188 | "source-map": "~0.6.1" 2189 | }, 2190 | "dependencies": { 2191 | "commander": { 2192 | "version": "2.17.1", 2193 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", 2194 | "integrity": "sha1-vXerfebelCBc6sxy8XFtKfIKd78=", 2195 | "dev": true, 2196 | "optional": true 2197 | }, 2198 | "source-map": { 2199 | "version": "0.6.1", 2200 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 2201 | "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=", 2202 | "dev": true, 2203 | "optional": true 2204 | } 2205 | } 2206 | }, 2207 | "uri-js": { 2208 | "version": "4.2.2", 2209 | "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", 2210 | "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", 2211 | "requires": { 2212 | "punycode": "^2.1.0" 2213 | } 2214 | }, 2215 | "util.promisify": { 2216 | "version": "1.0.0", 2217 | "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", 2218 | "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", 2219 | "requires": { 2220 | "define-properties": "^1.1.2", 2221 | "object.getownpropertydescriptors": "^2.0.3" 2222 | } 2223 | }, 2224 | "uuid": { 2225 | "version": "3.3.2", 2226 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", 2227 | "integrity": "sha1-G0r0lV6zB3xQHCOHL8ZROBFYcTE=" 2228 | }, 2229 | "v8-compile-cache": { 2230 | "version": "2.1.0", 2231 | "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", 2232 | "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", 2233 | "dev": true 2234 | }, 2235 | "verror": { 2236 | "version": "1.10.0", 2237 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 2238 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 2239 | "requires": { 2240 | "assert-plus": "^1.0.0", 2241 | "core-util-is": "1.0.2", 2242 | "extsprintf": "^1.2.0" 2243 | } 2244 | }, 2245 | "which": { 2246 | "version": "1.3.1", 2247 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 2248 | "integrity": "sha1-pFBD1U9YBTFtqNYvn1CRjT2nCwo=", 2249 | "dev": true, 2250 | "requires": { 2251 | "isexe": "^2.0.0" 2252 | } 2253 | }, 2254 | "which-module": { 2255 | "version": "2.0.0", 2256 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", 2257 | "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", 2258 | "dev": true 2259 | }, 2260 | "wide-align": { 2261 | "version": "1.1.3", 2262 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 2263 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 2264 | "dev": true, 2265 | "requires": { 2266 | "string-width": "^1.0.2 || 2" 2267 | } 2268 | }, 2269 | "wordwrap": { 2270 | "version": "1.0.0", 2271 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", 2272 | "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", 2273 | "dev": true 2274 | }, 2275 | "wrap-ansi": { 2276 | "version": "5.1.0", 2277 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", 2278 | "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", 2279 | "dev": true, 2280 | "requires": { 2281 | "ansi-styles": "^3.2.0", 2282 | "string-width": "^3.0.0", 2283 | "strip-ansi": "^5.0.0" 2284 | }, 2285 | "dependencies": { 2286 | "string-width": { 2287 | "version": "3.1.0", 2288 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 2289 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 2290 | "dev": true, 2291 | "requires": { 2292 | "emoji-regex": "^7.0.1", 2293 | "is-fullwidth-code-point": "^2.0.0", 2294 | "strip-ansi": "^5.1.0" 2295 | } 2296 | } 2297 | } 2298 | }, 2299 | "wrappy": { 2300 | "version": "1.0.2", 2301 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 2302 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 2303 | }, 2304 | "write": { 2305 | "version": "1.0.3", 2306 | "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", 2307 | "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", 2308 | "dev": true, 2309 | "requires": { 2310 | "mkdirp": "^0.5.1" 2311 | } 2312 | }, 2313 | "xml2js": { 2314 | "version": "0.4.22", 2315 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.22.tgz", 2316 | "integrity": "sha512-MWTbxAQqclRSTnehWWe5nMKzI3VmJ8ltiJEco8akcC6j3miOhjjfzKum5sId+CWhfxdOs/1xauYr8/ZDBtQiRw==", 2317 | "requires": { 2318 | "sax": ">=0.6.0", 2319 | "util.promisify": "~1.0.0", 2320 | "xmlbuilder": "~11.0.0" 2321 | } 2322 | }, 2323 | "xmlbuilder": { 2324 | "version": "11.0.1", 2325 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 2326 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" 2327 | }, 2328 | "y18n": { 2329 | "version": "4.0.0", 2330 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", 2331 | "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", 2332 | "dev": true 2333 | }, 2334 | "yargs": { 2335 | "version": "13.3.0", 2336 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", 2337 | "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", 2338 | "dev": true, 2339 | "requires": { 2340 | "cliui": "^5.0.0", 2341 | "find-up": "^3.0.0", 2342 | "get-caller-file": "^2.0.1", 2343 | "require-directory": "^2.1.1", 2344 | "require-main-filename": "^2.0.0", 2345 | "set-blocking": "^2.0.0", 2346 | "string-width": "^3.0.0", 2347 | "which-module": "^2.0.0", 2348 | "y18n": "^4.0.0", 2349 | "yargs-parser": "^13.1.1" 2350 | }, 2351 | "dependencies": { 2352 | "string-width": { 2353 | "version": "3.1.0", 2354 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 2355 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 2356 | "dev": true, 2357 | "requires": { 2358 | "emoji-regex": "^7.0.1", 2359 | "is-fullwidth-code-point": "^2.0.0", 2360 | "strip-ansi": "^5.1.0" 2361 | } 2362 | } 2363 | } 2364 | }, 2365 | "yargs-parser": { 2366 | "version": "13.1.1", 2367 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", 2368 | "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", 2369 | "dev": true, 2370 | "requires": { 2371 | "camelcase": "^5.0.0", 2372 | "decamelize": "^1.2.0" 2373 | } 2374 | }, 2375 | "yargs-unparser": { 2376 | "version": "1.6.0", 2377 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", 2378 | "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", 2379 | "dev": true, 2380 | "requires": { 2381 | "flat": "^4.1.0", 2382 | "lodash": "^4.17.15", 2383 | "yargs": "^13.3.0" 2384 | }, 2385 | "dependencies": { 2386 | "lodash": { 2387 | "version": "4.17.15", 2388 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 2389 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 2390 | "dev": true 2391 | } 2392 | } 2393 | } 2394 | } 2395 | } 2396 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "codacy-coverage", 3 | "version": "3.4.0", 4 | "description": "Code Coverage reporter for Codacy.com", 5 | "keywords": [ 6 | "codacy", 7 | "coverage", 8 | "code coverage", 9 | "codacy.com" 10 | ], 11 | "homepage": "https://github.com/codacy/node-codacy-coverage", 12 | "repository": { 13 | "type": "git", 14 | "url": "git://github.com/codacy/node-codacy-coverage.git" 15 | }, 16 | "bugs": { 17 | "url": "https://github.com/codacy/node-codacy-coverage/issues" 18 | }, 19 | "author": { 20 | "name": "David Pate", 21 | "email": "davidtpate@gmail.com", 22 | "url": "https://github.com/DavidTPate" 23 | }, 24 | "contributors": [], 25 | "license": "MIT", 26 | "main": "index.js", 27 | "bin": { 28 | "codacy-coverage": "./bin/codacy-coverage.js" 29 | }, 30 | "engines": { 31 | "node": ">= 8.12.0" 32 | }, 33 | "dependencies": { 34 | "bluebird": "^3.7.0", 35 | "commander": "^3.x", 36 | "jacoco-parse": "^2.0.1", 37 | "joi": "^14.x", 38 | "lcov-parse": "^1.x", 39 | "lodash": "^4.17.15", 40 | "log-driver": "^1.x", 41 | "request": "^2.88.0", 42 | "request-promise": "^4.2.4" 43 | }, 44 | "devDependencies": { 45 | "chai": "^4.1.x", 46 | "chai-as-promised": "^7.1.x", 47 | "dirty-chai": "^2.x", 48 | "mocha": "^6.x", 49 | "nock": "^9.1.x", 50 | "istanbul": "~0.x", 51 | "jsinspect": "~0.x", 52 | "eslint": "^6.x" 53 | }, 54 | "scripts": { 55 | "lint-style": "eslint .", 56 | "lint-dependencies": "npm audit", 57 | "test": "istanbul cover node_modules/mocha/bin/_mocha -- --check-leaks --timeout 30000 --reporter spec test/", 58 | "test-all": "npm run lint-style && npm run lint-dependencies && npm run test" 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /test/cli.js: -------------------------------------------------------------------------------- 1 | (function (exec, Joi, parser, helper) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | 6 | describe('Command Line', function () { 7 | it('should be able to parse lcov data', function (done) { 8 | var bodyObject = { 9 | total: 92, 10 | fileReports: [ 11 | { 12 | filename: '/Users/david.pate/Git/codacy-coverage/lib/reporter.js', 13 | coverage: { 14 | 1: 1, 15 | 25: 1, 16 | 39: 1, 17 | 40: 3, 18 | 44: 3, 19 | 45: 0, 20 | 48: 3, 21 | 50: 3, 22 | 52: 3, 23 | 54: 3, 24 | 55: 3, 25 | 61: 3, 26 | 63: 3, 27 | 64: 0, 28 | 67: 3, 29 | 73: 2, 30 | 74: 1, 31 | 75: 1, 32 | 76: 1, 33 | 77: 1, 34 | 79: 2, 35 | 81: 1, 36 | 82: 1, 37 | 83: 1, 38 | 84: 1, 39 | 87: 3 40 | }, 41 | total: 92 42 | } 43 | ] 44 | }; 45 | 46 | helper.setupMockEndpoint('1234', '4321', Joi.compile(bodyObject)).then(function () { 47 | exec('cat ./test/mock/lcov.info | node ./bin/codacy-coverage.js --token 1234 --commit 4321', function (err, res) { 48 | if (!err) { 49 | return done(new Error('Should return with error')); 50 | } 51 | 52 | expect(res).to.match(/Status Code \[404\] - Error \[{"error":"not found"}\]/); 53 | expect(err.code).to.equal(1); 54 | //nock.done(); //TODO: Need to figure out how to use nock here. Since it's a separate process, it's not tied together. 55 | done(); 56 | }); 57 | }); 58 | }); 59 | it('should be able to set options', function (done) { 60 | exec('cat ./test/mock/no-lines.info | node ./bin/codacy-coverage.js --debug --verbose --token 1234 --commit 4321 --prefix asdf/ --endpoint something --format lcov', function (err, res) { 61 | if (!err) { 62 | return done(new Error('Should return with error')); 63 | } 64 | 65 | expect(res).to.match(/Started with: token \["1234"], accountToken \[undefined], username \[undefined], projectName \[undefined], commitId \["4321"], language \[undefined], endpoint \["something"], format \["lcov"], path prefix \["asdf\/"], verbose \[true], debug \[true]/); 66 | expect(res).to.match(/Handling input for: token \["1234"], accountToken \[undefined], username \[undefined], projectName \[undefined], commitId \["4321"], language \[undefined], endpoint \["something"], format \["lcov"], path prefix \["asdf\/"], verbose \[true], debug \[true]/); 67 | expect(err.code).to.equal(1); 68 | done(); 69 | }); 70 | }); 71 | }); 72 | }(require('child_process').exec, require('joi'), require('../'), require('./helper'))); 73 | -------------------------------------------------------------------------------- /test/coverageParser.js: -------------------------------------------------------------------------------- 1 | (function (util, parser, helper) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | var validFormats = ['lcov','jacoco']; 6 | var errorMsg = new Map([ 7 | {lcov: 'Failed to parse string'}, 8 | {jacoco: 'Failed to parse jacoco report: Error: Non-whitespace before first tag'} 9 | ]) 10 | describe('Coverage Parser', function () { 11 | it('should receive an error when trying to use an unsupported format', function () { 12 | expect(function () { 13 | parser.getParser('invalid-format'); 14 | }).to.throw(Error, util.format('Expected one of the following supported formats: %j, but got [%s]', validFormats, 'invalid-format')); 15 | }); 16 | 17 | validFormats.forEach(function (format) { 18 | it('should be able to instantiate the parser for ' + format, function () { 19 | expect(function () { 20 | parser.getParser(format); 21 | }).to.not.throw(); 22 | }); 23 | it('shouldn\'t be able to parse a blank coverage file for ' + format, function () { 24 | return expect(parser.getParser(format).parse('')).to.eventually.be.rejectedWith(Error, '"value" is required'); 25 | }); 26 | it('shouldn\'t be able to parse invalid coverage for ' + format, function () { 27 | return expect(parser.getParser(format).parse('', 'There is no Dana, only Zuul')).to.eventually.be.rejectedWith(Error, errorMsg.get(format)); 28 | }); 29 | it('shouldn\'t be able to parse a non-existent coverage file for ' + format, function () { 30 | return expect(parser.getParser(format).parse('', '/no-exist/lcov')).to.eventually.be.rejectedWith(Error, errorMsg.get(format)); 31 | }); 32 | }); 33 | }); 34 | }(require('util'), require('../lib/coverageParser'), require('./helper'))); 35 | -------------------------------------------------------------------------------- /test/getGitData.js: -------------------------------------------------------------------------------- 1 | (function (util, getGitData, helper) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | var actualTravisCommit = process.env.TRAVIS_COMMIT; // Store the commit id for the test, if we have it 6 | 7 | describe('Get Git Data', function () { 8 | beforeEach(function () { 9 | helper.clearEnvironmentVariables(); 10 | }); 11 | it('should be able to get the commit id when one is passed', function () { 12 | return expect(getGitData.getCommitId('1234')).to.eventually.equal('1234'); 13 | }); 14 | it('should be able to get the commit id from the Codacy environment variable', function () { 15 | process.env.CODACY_GIT_COMMIT = '1234'; 16 | return expect(getGitData.getCommitId()).to.eventually.equal('1234'); 17 | }); 18 | it('should be able to get the commit id from the Travis CI environment variable', function () { 19 | process.env.TRAVIS_COMMIT = '4321'; 20 | return expect(getGitData.getCommitId()).to.eventually.equal('4321'); 21 | }); 22 | it('should be able to get the commit id from the Drone environment variable', function () { 23 | process.env.DRONE_COMMIT = '42'; 24 | return expect(getGitData.getCommitId()).to.eventually.equal('42'); 25 | }); 26 | it('should be able to get the commit id from the Jenkins environment variable', function () { 27 | process.env.GIT_COMMIT = '16'; 28 | return expect(getGitData.getCommitId()).to.eventually.equal('16'); 29 | }); 30 | it('should be able to get the commit id from the Circle CI environment variable', function () { 31 | process.env.CIRCLE_SHA1 = '743'; 32 | return expect(getGitData.getCommitId()).to.eventually.equal('743'); 33 | }); 34 | it('should be able to get the commit id from the CI environment variable', function () { 35 | process.env.CI_COMMIT_ID = '209'; 36 | return expect(getGitData.getCommitId()).to.eventually.equal('209'); 37 | }); 38 | it('should be able to get the commit id from the Wrecker environment variable', function () { 39 | process.env.WERCKER_GIT_COMMIT = '5232'; 40 | return expect(getGitData.getCommitId()).to.eventually.equal('5232'); 41 | }); 42 | it('should be able to get the commit id from the Buildkite environment variable', function () { 43 | process.env.BUILDKITE_COMMIT = '47326'; 44 | return expect(getGitData.getCommitId()).to.eventually.equal('47326'); 45 | }); 46 | it('should be able to get the commit id from Git', function () { 47 | // If we are currently running on Travis, we should be able to use the commit id environment variable 48 | // to check the git commit id method with actual git. But we can't do this for Pull Requests because 49 | // Travis provides the Commit id that triggered the Pull Request not the current Commit Id 50 | if (actualTravisCommit && process.env.TRAVIS_PULL_REQUEST === 'false') { 51 | return expect(getGitData.getCommitId()).to.eventually.equal(actualTravisCommit); 52 | } 53 | return expect(getGitData.getCommitId()).to.eventually.be.fulfilled(); 54 | }); 55 | }); 56 | }(require('util'), require('../lib/getGitData'), require('./helper'))); 57 | -------------------------------------------------------------------------------- /test/handleInput.js: -------------------------------------------------------------------------------- 1 | (function (handleInput, helper, Joi, request, fs, path) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | var lcovData = fs.readFileSync(__dirname + '/mock/lcov.info').toString(); 6 | var originalCodacyToken = process.env.CODACY_PROJECT_TOKEN || process.env.CODACY_REPO_TOKEN; 7 | 8 | describe('Handle Input', function () { 9 | beforeEach(function () { 10 | helper.clearEnvironmentVariables(); 11 | process.env.CODACY_PROJECT_TOKEN = originalCodacyToken; 12 | }); 13 | it('should be able to use the mock end-point', function () { 14 | var bodyValidator = Joi.object({ 15 | total: Joi.number().valid(50), 16 | fileReports: Joi.array().items(Joi.object({ 17 | filename: Joi.string().valid('filename.js'), 18 | total: Joi.number().valid(10), 19 | coverage: Joi.object({ 20 | 1: Joi.number().valid(1), 21 | 2: Joi.number().valid(3) 22 | }) 23 | }).required()) 24 | }); 25 | 26 | var sampleCoverageData = { 27 | total: 50, 28 | fileReports: [ 29 | { 30 | filename: 'filename.js', 31 | total: 10, 32 | coverage: { 33 | 1: 1, 34 | 2: 3 35 | } 36 | } 37 | ] 38 | }; 39 | 40 | return helper.setupMockEndpoint('1234', '4321', bodyValidator) 41 | .then(function () { 42 | return expect(request({ 43 | url: 'https://api.codacy.com/2.0/coverage/4321/javascript', 44 | method: 'POST', 45 | json: sampleCoverageData, 46 | resolveWithFullResponse: true 47 | }).promise()).to.eventually.satisfy(function (res) { 48 | expect(res.statusCode).to.equal(200); 49 | return true; 50 | }); 51 | }); 52 | }); 53 | it('should be able to parse lcov data', function () { 54 | var expectedCoverage = { 55 | total: 92, 56 | fileReports: Joi.array().items(Joi.compile({ 57 | filename: path.normalize('lib/reporter.js'), 58 | coverage: { 59 | 1: 1, 60 | 25: 1, 61 | 39: 1, 62 | 40: 3, 63 | 44: 3, 64 | 45: 0, 65 | 48: 3, 66 | 50: 3, 67 | 52: 3, 68 | 54: 3, 69 | 55: 3, 70 | 61: 3, 71 | 63: 3, 72 | 64: 0, 73 | 67: 3, 74 | 73: 2, 75 | 74: 1, 76 | 75: 1, 77 | 76: 1, 78 | 77: 1, 79 | 79: 2, 80 | 81: 1, 81 | 82: 1, 82 | 83: 1, 83 | 84: 1, 84 | 87: 3 85 | }, 86 | total: 92 87 | })) 88 | }; 89 | 90 | return helper.setupMockEndpoint('1234', '4321', Joi.compile(expectedCoverage)) 91 | .then(function () { 92 | return expect(handleInput(lcovData, { 93 | token: '1234', 94 | commit: '4321' 95 | })).to.eventually.be.fulfilled(); 96 | }); 97 | }); 98 | it('should be able to parse lcov data with path prefix', function () { 99 | var expectedCoverage = { 100 | total: 92, 101 | fileReports: Joi.array().items(Joi.compile({ 102 | filename: path.normalize('my-project/lib/reporter.js'), 103 | coverage: { 104 | 1: 1, 105 | 25: 1, 106 | 39: 1, 107 | 40: 3, 108 | 44: 3, 109 | 45: 0, 110 | 48: 3, 111 | 50: 3, 112 | 52: 3, 113 | 54: 3, 114 | 55: 3, 115 | 61: 3, 116 | 63: 3, 117 | 64: 0, 118 | 67: 3, 119 | 73: 2, 120 | 74: 1, 121 | 75: 1, 122 | 76: 1, 123 | 77: 1, 124 | 79: 2, 125 | 81: 1, 126 | 82: 1, 127 | 83: 1, 128 | 84: 1, 129 | 87: 3 130 | }, 131 | total: 92 132 | })) 133 | }; 134 | 135 | return helper.setupMockEndpoint('1234', '4321', Joi.compile(expectedCoverage)) 136 | .then(function () { 137 | return expect(handleInput(lcovData, { 138 | token: '1234', 139 | commit: '4321', 140 | prefix: 'my-project' + path.sep 141 | })).to.eventually.be.fulfilled(); 142 | }); 143 | }); 144 | it('shouldn\'t be able to send coverage with invalid input', function () { 145 | process.env.CODACY_PROJECT_TOKEN = ''; 146 | return expect(handleInput()).to.eventually.be.rejectedWith(Error, 'Token is required'); 147 | }); 148 | }); 149 | 150 | }(require('../lib/handleInput'), require('./helper'), require('joi'), require('request-promise'), require('fs'), require('path'))); 151 | -------------------------------------------------------------------------------- /test/handleMultiLangInput.js: -------------------------------------------------------------------------------- 1 | (function (handleInput, helper, Joi, request, fs, path, Promise) { 2 | 'use strict'; 3 | /*eslint new-cap: ["error", { "newIsCap": false }]*/ 4 | 5 | var expect = helper.chai.expect; 6 | var lcov2Data = fs.readFileSync(__dirname + '/mock/lcov2.info').toString(); 7 | var lcovMultiData = fs.readFileSync(__dirname + '/mock/lcov-multilang.info').toString(); 8 | var originalCodacyToken = process.env.CODACY_PROJECT_TOKEN || process.env.CODACY_REPO_TOKEN; 9 | 10 | describe('Handle Input', function () { 11 | beforeEach(function () { 12 | helper.clearEnvironmentVariables(); 13 | process.env.CODACY_PROJECT_TOKEN = originalCodacyToken; 14 | }); 15 | it('should be able to parse multiple files lcov data', function () { 16 | var expectedCoverage = { 17 | total: 30, 18 | fileReports: Joi.array().items(Joi.compile({ 19 | filename: path.normalize('FileA.js'), 20 | coverage: { 21 | 1: 0, 22 | 2: 0, 23 | 9: 0, 24 | 19: 0 25 | }, 26 | total: 0 27 | }), 28 | Joi.compile({ 29 | filename: path.normalize('FileB.js'), 30 | coverage: { 31 | 1: 0, 32 | 2: 0 33 | }, 34 | total: 0 35 | }), 36 | Joi.compile({ 37 | filename: path.normalize('FileC.js'), 38 | coverage: { 39 | 1: 1, 40 | 2: 1, 41 | 3: 1, 42 | 7: 0 43 | }, 44 | total: 75 45 | })) 46 | }; 47 | 48 | return helper.setupMockEndpoint('1234', '4321', Joi.compile(expectedCoverage)) 49 | .then(function () { 50 | return expect(handleInput(lcov2Data, { 51 | token: '1234', 52 | commit: '4321' 53 | })).to.eventually.be.fulfilled(); 54 | }); 55 | }); 56 | it('should be able to parse multiple lang files lcov data', function () { 57 | var expectedCoverageJS = { 58 | total: 30, 59 | fileReports: Joi.array().items(Joi.compile({ 60 | filename: path.normalize('FileA.js'), 61 | coverage: { 62 | 1: 0, 63 | 2: 0, 64 | 3: 0, 65 | 4: 0, 66 | 9: 0, 67 | 19: 0 68 | }, 69 | total: 0 70 | }), 71 | Joi.compile({ 72 | filename: path.normalize('FileC.js'), 73 | coverage: { 74 | 1: 1, 75 | 2: 1, 76 | 3: 1, 77 | 7: 0 78 | }, 79 | total: 75 80 | })) 81 | }; 82 | var expectedCoverageTS = { 83 | total: 40, 84 | fileReports: Joi.array().items(Joi.compile({ 85 | filename: path.normalize('FileB.ts'), 86 | coverage: { 87 | 1: 1, 88 | 2: 1, 89 | 3: 0, 90 | 4: 0 91 | }, 92 | total: 50 93 | }), 94 | Joi.compile({ 95 | filename: path.normalize('FileB2.ts'), 96 | coverage: { 97 | 1: 0 98 | }, 99 | total: 0 100 | })) 101 | }; 102 | 103 | return new Promise.all( 104 | [ 105 | helper.setupLangMockEndpoint('1234', '4321', Joi.compile(expectedCoverageJS), 'javascript'), 106 | helper.setupLangMockEndpoint('1234', '4321', Joi.compile(expectedCoverageTS), 'typescript') 107 | ] 108 | ).then(function () { 109 | return expect(handleInput(lcovMultiData, { 110 | token: '1234', 111 | commit: '4321' 112 | })).to.eventually.be.fulfilled(); 113 | }); 114 | }); 115 | }); 116 | 117 | }(require('../lib/handleInput'), require('./helper'), require('joi'), 118 | require('request-promise'), require('fs'), require('path'), require('bluebird'))); 119 | -------------------------------------------------------------------------------- /test/helper.js: -------------------------------------------------------------------------------- 1 | (function (nock, chai, Promise) { 2 | 'use strict'; 3 | 4 | var expect = chai.expect; 5 | chai.use(require('chai-as-promised')); 6 | chai.use(require('dirty-chai')); 7 | chai.config.includeStack = true; 8 | 9 | // Disable outgoing connections to non-mocked endpoints. 10 | nock.disableNetConnect(); 11 | 12 | //Setup mock for the Codacy API endpoint. 13 | function setupMockEndpoint(token, commitId, bodyValidator, statusCode) { 14 | return new Promise(function (resolve) { 15 | expect(token).to.be.ok(); 16 | expect(commitId).to.be.ok(); 17 | expect(bodyValidator).to.be.ok(); 18 | 19 | return resolve(nock('https://api.codacy.com') 20 | .post('/2.0/coverage/' + commitId + '/javascript', function (body) { 21 | var result = bodyValidator.validate(body); 22 | 23 | return !result.error; 24 | }) 25 | .reply(statusCode || 200)); 26 | }); 27 | } 28 | 29 | function setupLangMockEndpoint(token, commitId, bodyValidator, language) { 30 | return new Promise(function (resolve) { 31 | expect(token).to.be.ok(); 32 | expect(commitId).to.be.ok(); 33 | expect(bodyValidator).to.be.ok(); 34 | 35 | return resolve(nock('https://api.codacy.com') 36 | .post('/2.0/coverage/' + commitId + '/' + language, function (body) { 37 | 38 | console.error(''); 39 | console.error(body); 40 | console.error(''); 41 | 42 | var result = bodyValidator.validate(body); 43 | return !(result.error); 44 | }).reply(200)); 45 | }); 46 | } 47 | 48 | function setupMockAccountApiEndpoint(apiToken, commitId, username, projectName, bodyValidator) { 49 | return new Promise(function (resolve) { 50 | expect(apiToken).to.be.ok(); 51 | expect(commitId).to.be.ok(); 52 | expect(username).to.be.ok(); 53 | expect(projectName).to.be.ok(); 54 | expect(bodyValidator).to.be.ok(); 55 | return resolve(nock('https://api.codacy.com') 56 | .post('/2.0/' + username + '/' + projectName + '/commit/' + commitId + '/coverage' + '/javascript', function(body) { 57 | var result = bodyValidator.validate(body); 58 | return !result.error; 59 | }).reply(200)); 60 | }); 61 | } 62 | 63 | module.exports = { 64 | setupMockEndpoint: setupMockEndpoint, 65 | setupLangMockEndpoint: setupLangMockEndpoint, 66 | setupMockAccountApiEndpoint: setupMockAccountApiEndpoint, 67 | chai: chai, 68 | clearEnvironmentVariables: function () { 69 | process.env.CODACY_GIT_COMMIT = ''; 70 | process.env.TRAVIS_COMMIT = ''; 71 | process.env.DRONE_COMMIT = ''; 72 | process.env.GIT_COMMIT = ''; 73 | process.env.CIRCLE_SHA1 = ''; 74 | process.env.CI_COMMIT_ID = ''; 75 | process.env.WERCKER_GIT_COMMIT = ''; 76 | process.env.BUILDKITE_COMMIT = ''; 77 | } 78 | }; 79 | }(require('nock'), require('chai'), require('bluebird'))); 80 | -------------------------------------------------------------------------------- /test/jacoco.js: -------------------------------------------------------------------------------- 1 | (function (fs, parser, helper, path) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | var jacocoData = fs.readFileSync(__dirname + '/mock/jacoco.xml').toString(); 6 | var noStatsJacocoData = fs.readFileSync(__dirname + '/mock/no-lines.xml').toString(); 7 | describe('Jacoco Parser', function () { 8 | 9 | it('should be to parse jacoco data', function () { 10 | return expect(parser.getParser('jacoco').parse('',jacocoData)) 11 | .to.eventually.satisfy(function (data) { 12 | expect(data).to.deep.equal({ 13 | total: 23, 14 | fileReports: [ 15 | { 16 | filename: path.normalize('com/wmbest/myapplicationtest/MainActivity.java'), 17 | coverage: { 18 | 8: 0, 19 | 11: 2, 20 | 12: 1, 21 | 13: 7, 22 | 18: 0, 23 | 19: 0, 24 | 20: 0, 25 | 25: 0, 26 | 26: 0, 27 | 34: 0, 28 | 37: 0, 29 | 38: 0, 30 | 41: 0 31 | }, 32 | total: 23 }] 33 | }); 34 | return true; 35 | }); 36 | }); 37 | 38 | it('should be able to parse jacoco data with path prefix', function () { 39 | return expect(parser.getParser('jacoco').parse(path.normalize('my-project' + path.sep), jacocoData)) 40 | .to.eventually.satisfy(function (data) { 41 | expect(data).to.deep.equal({ 42 | total: 23, 43 | fileReports: [ 44 | { 45 | filename: path.normalize('my-project/com/wmbest/myapplicationtest/MainActivity.java'), 46 | coverage: { 47 | 8: 0, 48 | 11: 2, 49 | 12: 1, 50 | 13: 7, 51 | 18: 0, 52 | 19: 0, 53 | 20: 0, 54 | 25: 0, 55 | 26: 0, 56 | 34: 0, 57 | 37: 0, 58 | 38: 0, 59 | 41: 0 60 | }, 61 | total: 23 }] 62 | }); 63 | return true; 64 | }); 65 | }); 66 | 67 | it('should be able to parse jacoco data without lines', function() { 68 | return expect(parser.getParser('jacoco').parse('', noStatsJacocoData)) 69 | .to.eventually.satisfy(function (data) { 70 | expect(JSON.stringify(data)).to.equal(JSON.stringify({ 71 | total: 0, 72 | fileReports: [ 73 | { 74 | filename: path.normalize('com/wmbest/myapplicationtest/MainActivity.java'), 75 | coverage: {}, 76 | total: 0 77 | }] 78 | })); 79 | return true; 80 | }); 81 | }); 82 | }); 83 | }(require('fs'), require('../lib/coverageParser'),require('./helper'), require('path'))); 84 | -------------------------------------------------------------------------------- /test/jacoco2.js: -------------------------------------------------------------------------------- 1 | (function (fs, parser, helper) { 2 | 'use strict'; 3 | var expectedCoverage = 40; 4 | var expect = helper.chai.expect; 5 | var jacocoData = fs.readFileSync(__dirname + '/mock/jacoco2.xml').toString(); 6 | 7 | describe('Jacoco Parser', function () { 8 | it('should be able to parse jacoco data with empty files', function () { 9 | return expect(parser.getParser('jacoco').parse('', jacocoData)) 10 | .to.eventually.satisfy(function (data) { 11 | expect(data.total).to.equal(expectedCoverage); 12 | return true; 13 | }); 14 | }); 15 | }); 16 | }(require('fs'), require('../lib/coverageParser'), require('./helper'))); 17 | -------------------------------------------------------------------------------- /test/lcov.js: -------------------------------------------------------------------------------- 1 | (function (fs, parser, helper, path) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | var lcovData = fs.readFileSync(__dirname + '/mock/lcov.info').toString(); 6 | var noStatsLcovData = fs.readFileSync(__dirname + '/mock/no-lines.info').toString(); 7 | 8 | describe('Lcov Parser', function () { 9 | it('should be able to parse lcov data', function () { 10 | return expect(parser.getParser('lcov').parse('', lcovData)) 11 | .to.eventually.satisfy(function (data) { 12 | expect(data).to.deep.equal({ 13 | total: 92, 14 | fileReports: [ 15 | { 16 | filename: path.normalize('lib/reporter.js'), 17 | coverage: { 18 | 1: 1, 19 | 25: 1, 20 | 39: 1, 21 | 40: 3, 22 | 44: 3, 23 | 45: 0, 24 | 48: 3, 25 | 50: 3, 26 | 52: 3, 27 | 54: 3, 28 | 55: 3, 29 | 61: 3, 30 | 63: 3, 31 | 64: 0, 32 | 67: 3, 33 | 73: 2, 34 | 74: 1, 35 | 75: 1, 36 | 76: 1, 37 | 77: 1, 38 | 79: 2, 39 | 81: 1, 40 | 82: 1, 41 | 83: 1, 42 | 84: 1, 43 | 87: 3 44 | }, 45 | total: 92 46 | } 47 | ] 48 | }); 49 | return true; 50 | }); 51 | }); 52 | it('should be able to parse lcov data with path prefix', function () { 53 | return expect(parser.getParser('lcov').parse(path.normalize('my-project' + path.sep), lcovData)) 54 | .to.eventually.satisfy(function (data) { 55 | expect(data).to.deep.equal({ 56 | total: 92, 57 | fileReports: [ 58 | { 59 | filename: path.normalize('my-project/lib/reporter.js'), 60 | coverage: { 61 | 1: 1, 62 | 25: 1, 63 | 39: 1, 64 | 40: 3, 65 | 44: 3, 66 | 45: 0, 67 | 48: 3, 68 | 50: 3, 69 | 52: 3, 70 | 54: 3, 71 | 55: 3, 72 | 61: 3, 73 | 63: 3, 74 | 64: 0, 75 | 67: 3, 76 | 73: 2, 77 | 74: 1, 78 | 75: 1, 79 | 76: 1, 80 | 77: 1, 81 | 79: 2, 82 | 81: 1, 83 | 82: 1, 84 | 83: 1, 85 | 84: 1, 86 | 87: 3 87 | }, 88 | total: 92 89 | } 90 | ] 91 | }); 92 | return true; 93 | }); 94 | }); 95 | it('should be able to parse lcov data without lines', function () { 96 | return expect(parser.getParser('lcov').parse('', noStatsLcovData)) 97 | .to.eventually.satisfy(function (data) { 98 | expect(JSON.stringify(data)).to.equal(JSON.stringify({ 99 | total: 0, 100 | fileReports: [ 101 | { 102 | filename: path.normalize('lib/reporter.js'), 103 | coverage: {}, 104 | total: 0 105 | } 106 | ] 107 | })); 108 | return true; 109 | }); 110 | }); 111 | }); 112 | }(require('fs'), require('../lib/coverageParser'), require('./helper'), require('path'))); 113 | -------------------------------------------------------------------------------- /test/lcov2.js: -------------------------------------------------------------------------------- 1 | (function (fs, parser, helper) { 2 | 'use strict'; 3 | 4 | var expectedCoverage = 30; 5 | 6 | var expect = helper.chai.expect; 7 | var lcovData = fs.readFileSync(__dirname + '/mock/lcov2.info').toString(); 8 | 9 | describe('Lcov Parser', function () { 10 | it('should be able to parse lcov data with empty files', function () { 11 | return expect(parser.getParser('lcov').parse('', lcovData)) 12 | .to.eventually.satisfy(function (data) { 13 | expect(data.total).to.equal(expectedCoverage); 14 | return true; 15 | }); 16 | }); 17 | }); 18 | }(require('fs'), require('../lib/coverageParser'), require('./helper'))); 19 | -------------------------------------------------------------------------------- /test/logger.js: -------------------------------------------------------------------------------- 1 | (function (helper) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | var logger; 6 | 7 | describe('Logger', function () { 8 | beforeEach(function () { 9 | process.env.CODACY_VERBOSE = ''; 10 | process.env.CODACY_DEBUG = ''; 11 | 12 | delete require.cache[require.resolve('log-driver')]; 13 | delete require.cache[require.resolve('../lib/logger')]; 14 | logger = require('../lib/logger'); 15 | }); 16 | it('should be able to instantiate the logger without options', function () { 17 | var loggerImpl = logger(); 18 | expect(loggerImpl.level).to.equal('warn'); 19 | }); 20 | it('should be able to instantiate the logger in verbose mode', function () { 21 | var loggerImpl = logger({verbose: true}); 22 | expect(loggerImpl.level).to.equal('debug'); 23 | }); 24 | it('should be able to instantiate the logger in debug mode', function () { 25 | var loggerImpl = logger({debug: true}); 26 | expect(loggerImpl.level).to.equal('trace'); 27 | }); 28 | it('should be able to instantiate the logger in debug mode without environment variables overriding', function () { 29 | process.env.CODACY_VERBOSE = true; 30 | 31 | var loggerImpl = logger({debug: true}); 32 | expect(loggerImpl.level).to.equal('trace'); 33 | }); 34 | it('should be able to instantiate the logger in verbose mode without environment variables overriding', function () { 35 | process.env.CODACY_DEBUG = true; 36 | 37 | var loggerImpl = logger({verbose: true}); 38 | expect(loggerImpl.level).to.equal('debug'); 39 | }); 40 | it('should be able to instantiate the logger in verbose mode with an environment variable', function () { 41 | process.env.CODACY_VERBOSE = true; 42 | 43 | var loggerImpl = logger(); 44 | expect(loggerImpl.level).to.equal('debug'); 45 | }); 46 | it('should be able to instantiate the logger in debug mode', function () { 47 | process.env.CODACY_DEBUG = true; 48 | 49 | var loggerImpl = logger(); 50 | expect(loggerImpl.level).to.equal('trace'); 51 | }); 52 | it('should be able to instantiate the logger and retrieve the instance of it', function () { 53 | var loggerImpl = logger(); 54 | expect(loggerImpl.level).to.equal('warn'); 55 | 56 | expect(logger()).to.be.ok(); 57 | expect(logger().level).to.equal('warn'); 58 | }); 59 | }); 60 | }(require('./helper'))); -------------------------------------------------------------------------------- /test/mock/jacoco.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /test/mock/jacoco2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /test/mock/lcov-multilang.info: -------------------------------------------------------------------------------- 1 | TN: 2 | SF:FileA.js 3 | FN:1,(anonymous_0) 4 | FN:8,(anonymous_1) 5 | FNF:2 6 | FNH:0 7 | FNDA:0,(anonymous_0) 8 | FNDA:0,(anonymous_1) 9 | DA:1,0 10 | DA:2,0 11 | DA:3,0 12 | DA:4,0 13 | DA:9,0 14 | DA:19,0 15 | LF:6 16 | LH:0 17 | BRF:0 18 | BRH:0 19 | end_of_record 20 | TN: 21 | SF:FileB.ts 22 | FN:1,(anonymous_0) 23 | FNF:1 24 | FNH:0 25 | FNDA:0,(anonymous_0) 26 | DA:1,1 27 | DA:2,1 28 | DA:3,0 29 | DA:4,0 30 | LF:4 31 | LH:2 32 | BRF:0 33 | BRH:0 34 | end_of_record 35 | TN: 36 | SF:FileB2.ts 37 | FN:1,(anonymous_0) 38 | FNF:1 39 | FNH:0 40 | FNDA:0,(anonymous_0) 41 | DA:1,0 42 | LF:1 43 | LH:0 44 | BRF:0 45 | BRH:0 46 | end_of_record 47 | TN: 48 | SF:FileC.js 49 | FNF:0 50 | FNH:0 51 | DA:1,1 52 | DA:2,1 53 | DA:3,1 54 | DA:7,0 55 | LF:4 56 | LH:3 57 | BRF:0 58 | BRH:0 59 | end_of_record 60 | TN: 61 | -------------------------------------------------------------------------------- /test/mock/lcov.info: -------------------------------------------------------------------------------- 1 | TN: 2 | SF:lib/reporter.js 3 | FN:1,(anonymous_1) 4 | FN:39,(anonymous_2) 5 | FN:51,sendCoverage 6 | FN:54,(anonymous_4) 7 | FN:72,(anonymous_5) 8 | FN:80,(anonymous_6) 9 | FNF:6 10 | FNH:6 11 | FNDA:1,(anonymous_1) 12 | FNDA:3,(anonymous_2) 13 | FNDA:3,sendCoverage 14 | FNDA:3,(anonymous_4) 15 | FNDA:2,(anonymous_5) 16 | FNDA:1,(anonymous_6) 17 | DA:1,1 18 | DA:25,1 19 | DA:39,1 20 | DA:40,3 21 | DA:44,3 22 | DA:45,0 23 | DA:48,3 24 | DA:50,3 25 | DA:52,3 26 | DA:54,3 27 | DA:55,3 28 | DA:61,3 29 | DA:63,3 30 | DA:64,0 31 | DA:67,3 32 | DA:73,2 33 | DA:74,1 34 | DA:75,1 35 | DA:76,1 36 | DA:77,1 37 | DA:79,2 38 | DA:81,1 39 | DA:82,1 40 | DA:83,1 41 | DA:84,1 42 | DA:87,3 43 | LF:26 44 | LH:24 45 | BRDA:44,1,0,0 46 | BRDA:44,1,1,3 47 | BRDA:48,2,0,3 48 | BRDA:48,2,1,0 49 | BRDA:61,3,0,3 50 | BRDA:61,3,1,3 51 | BRDA:61,3,2,3 52 | BRDA:63,4,0,0 53 | BRDA:63,4,1,3 54 | BRDA:73,5,0,1 55 | BRDA:73,5,1,1 56 | BRF:11 57 | BRH:8 58 | end_of_record 59 | -------------------------------------------------------------------------------- /test/mock/lcov2.info: -------------------------------------------------------------------------------- 1 | TN: 2 | SF:FileA.js 3 | FN:1,(anonymous_0) 4 | FN:8,(anonymous_1) 5 | FNF:2 6 | FNH:0 7 | FNDA:0,(anonymous_0) 8 | FNDA:0,(anonymous_1) 9 | DA:1,0 10 | DA:2,0 11 | DA:9,0 12 | DA:19,0 13 | LF:4 14 | LH:0 15 | BRF:0 16 | BRH:0 17 | end_of_record 18 | TN: 19 | SF:FileB.js 20 | FN:1,(anonymous_0) 21 | FNF:1 22 | FNH:0 23 | FNDA:0,(anonymous_0) 24 | DA:1,0 25 | DA:2,0 26 | LF:2 27 | LH:0 28 | BRF:0 29 | BRH:0 30 | end_of_record 31 | TN: 32 | SF:FileC.js 33 | FNF:0 34 | FNH:0 35 | DA:1,1 36 | DA:2,1 37 | DA:3,1 38 | DA:7,0 39 | LF:4 40 | LH:3 41 | BRF:0 42 | BRH:0 43 | end_of_record 44 | TN: 45 | -------------------------------------------------------------------------------- /test/mock/no-lines.info: -------------------------------------------------------------------------------- 1 | TN: 2 | SF:lib/reporter.js 3 | FN:1,(anonymous_1) 4 | FN:39,(anonymous_2) 5 | FN:51,sendCoverage 6 | FN:54,(anonymous_4) 7 | FN:72,(anonymous_5) 8 | FN:80,(anonymous_6) 9 | FNF:6 10 | FNH:6 11 | FNDA:1,(anonymous_1) 12 | FNDA:3,(anonymous_2) 13 | FNDA:3,sendCoverage 14 | FNDA:3,(anonymous_4) 15 | FNDA:2,(anonymous_5) 16 | FNDA:1,(anonymous_6) 17 | BRDA:44,1,0,0 18 | BRDA:44,1,1,3 19 | BRDA:48,2,0,3 20 | BRDA:48,2,1,0 21 | BRDA:61,3,0,3 22 | BRDA:61,3,1,3 23 | BRDA:61,3,2,3 24 | BRDA:63,4,0,0 25 | BRDA:63,4,1,3 26 | BRDA:73,5,0,1 27 | BRDA:73,5,1,1 28 | BRF:11 29 | BRH:8 30 | end_of_record 31 | -------------------------------------------------------------------------------- /test/mock/no-lines.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /test/reporter.js: -------------------------------------------------------------------------------- 1 | (function (Joi, request, reporter, helper) { 2 | 'use strict'; 3 | 4 | var expect = helper.chai.expect; 5 | 6 | describe('Codacy Reporter', function () { 7 | var bodyValidator, 8 | sampleCoverageData; 9 | 10 | beforeEach(function () { 11 | bodyValidator = Joi.object({ 12 | total: Joi.number().valid(50), 13 | fileReports: Joi.array().items(Joi.object({ 14 | filename: Joi.string().valid('filename.js'), 15 | total: Joi.number().valid(10), 16 | coverage: Joi.object({ 17 | 1: Joi.number().valid(1), 18 | 2: Joi.number().valid(3) 19 | }) 20 | })) 21 | }); 22 | 23 | sampleCoverageData = { 24 | total: 50, 25 | fileReports: [ 26 | { 27 | filename: 'filename.js', 28 | total: 10, 29 | coverage: { 30 | 1: 1, 31 | 2: 3 32 | } 33 | } 34 | ] 35 | }; 36 | }); 37 | 38 | it('should be able to use the mock end-point', function () { 39 | return helper.setupMockEndpoint('1234', '4321', bodyValidator) 40 | .then(function () { 41 | return expect(request({ 42 | url: 'https://api.codacy.com/2.0/coverage/4321/javascript', 43 | method: 'POST', 44 | json: sampleCoverageData, 45 | resolveWithFullResponse: true 46 | }).promise()).to.eventually.satisfy(function (res) { 47 | expect(res.statusCode).to.equal(200); 48 | return true; 49 | }); 50 | }); 51 | }); 52 | it('should be able to use the account api mock end-point', function() { 53 | return helper.setupMockAccountApiEndpoint('1234', '4321', 'username', 'project-name', bodyValidator) 54 | .then(function() { 55 | return expect(request({ 56 | url: 'https://api.codacy.com/2.0/username/project-name/commit/4321/coverage/javascript', 57 | method: 'POST', 58 | json: sampleCoverageData, 59 | resolveWithFullResponse: true 60 | }).promise()).to.eventually.satisfy(function (res) { 61 | expect(res.statusCode).to.equal(200); 62 | return true; 63 | }); 64 | }); 65 | }); 66 | it('shouldn\'t be able to create a reporter with invalid options', function () { 67 | return expect(function () { 68 | reporter({endpoint: 1}); 69 | }).to.throw(Error, 'child "endpoint" fails because ["endpoint" must be a string]'); 70 | }); 71 | it('should be able to use the reporter to send coverage data', function () { 72 | return helper.setupMockEndpoint('1234', '4321', bodyValidator) 73 | .then(function () { 74 | return expect(reporter({}) 75 | .sendCoverage('1234', '4321', 'javascript', sampleCoverageData)) 76 | .to.eventually.be.fulfilled(); 77 | }); 78 | }); 79 | it('should receive error when non-200 status code', function () { 80 | return helper.setupMockEndpoint('1234', '4321', bodyValidator, 204) 81 | .then(function () { 82 | return expect(reporter({}) 83 | .sendCoverage('1234', '4321', 'javascript', sampleCoverageData)) 84 | .to.eventually.be.rejectedWith(Error, 'Expected Status Code of 200, but got [204]'); 85 | }); 86 | }); 87 | it('should receive error when 400 level status code', function () { 88 | return helper.setupMockEndpoint('1234', '4321', bodyValidator, 418) 89 | .then(function () { 90 | return expect(reporter({}) 91 | .sendCoverage('1234', '4321', 'javascript', sampleCoverageData)) 92 | .to.eventually.be.rejectedWith(Error, 'Expected Successful Status Code, but got [418]'); 93 | }); 94 | }); 95 | it('should be able to report data with an api token', function() { 96 | return helper.setupMockAccountApiEndpoint('1234', '4321', 'username', 'project-name', bodyValidator) 97 | .then(function() { 98 | return expect(reporter({accountToken: '1234'}) 99 | .sendCoverage(null, '4321', 'javascript', sampleCoverageData, '1234', 'username', 'project-name')) 100 | .to.eventually.be.fulfilled(); 101 | }); 102 | }); 103 | it('should not report data without a project name', function() { 104 | return helper.setupMockAccountApiEndpoint('1234', '4321', 'username', 'project-name', bodyValidator) 105 | .then(function() { 106 | return expect(reporter({accountToken: '1234'}) 107 | .sendCoverage(null, '4321', 'javascript', sampleCoverageData, '1234', null, 'project-name')) 108 | .to.eventually.be.rejected(); 109 | }); 110 | }); 111 | }); 112 | 113 | }(require('joi'), require('request-promise'), require('../lib/reporter'), require('./helper'))); 114 | --------------------------------------------------------------------------------