├── .gitignore ├── .jshintrc ├── .travis.yml ├── LICENSE ├── README.md ├── package-lock.json ├── package.json ├── src ├── index.ts └── logger.ts ├── test ├── index.ts └── logger.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Projects files 2 | keys.sh 3 | dist 4 | 5 | # OS Artifacts 6 | *.DS_Store 7 | 8 | # Vagrant Artifacts 9 | .vagrant 10 | Berksfile.lock 11 | 12 | # NPM Artifacts 13 | node_modules 14 | npm-debug.log 15 | libpeerconnection.log 16 | 17 | # Docco artifacts 18 | docs 19 | 20 | # IDE Artifacts 21 | .idea 22 | *.iml 23 | *.sublime-* 24 | 25 | # Jekyll artifacts 26 | _site 27 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "bitwise" : true, 3 | "curly" : true, 4 | "eqeqeq" : true, 5 | "immed" : true, 6 | "latedef" : true, 7 | "newcap" : true, 8 | "noarg" : true, 9 | "noempty" : true, 10 | "nonew" : true, 11 | "plusplus" : true, 12 | "regexp" : true, 13 | "undef" : true, 14 | "strict" : true, 15 | "trailing" : true, 16 | "unused" : true, 17 | "loopfunc" : true, 18 | 19 | "asi" : false, 20 | "boss" : false, 21 | "debug" : false, 22 | "eqnull" : false, 23 | "es5" : false, 24 | "esnext" : false, 25 | "evil" : false, 26 | "expr" : true, 27 | "forin" : false, 28 | "funcscope" : false, 29 | "globalstrict" : false, 30 | "iterator" : false, 31 | "lastsemic" : false, 32 | "laxbreak" : false, 33 | "laxcomma" : false, 34 | "quotmark" : false, 35 | "multistr" : false, 36 | "onecase" : false, 37 | "proto" : false, 38 | "regexdash" : false, 39 | "scripturl" : false, 40 | "smarttabs" : false, 41 | "shadow" : false, 42 | "sub" : false, 43 | "supernew" : false, 44 | "validthis" : false, 45 | 46 | "browser" : false, 47 | "couch" : false, 48 | "devel" : false, 49 | "dojo" : false, 50 | "jquery" : false, 51 | "mootools" : false, 52 | "node" : true, 53 | "nonstandard" : false, 54 | "prototypejs" : false, 55 | "rhino" : false, 56 | "wsh" : false, 57 | 58 | "nomen" : false, 59 | "onevar" : false, 60 | "passfail" : false, 61 | "white" : false, 62 | 63 | "maxerr" : 100, 64 | "predef" : [ 65 | "describe", 66 | "it", 67 | "after", 68 | "before", 69 | "beforeEach" 70 | ], 71 | "indent" : 2, 72 | "maxstatements" : 60, 73 | "maxcomplexity" : 15 74 | } 75 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '8.9.0' 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Papiel SAS 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Heroku self ping 2 | ================ 3 | 4 | To avoid the thirty minutes time limit on your dyno, use this npm module: 5 | 6 | ```js 7 | require('heroku-self-ping').default("http://your-app-url"); 8 | ``` 9 | 10 | or: 11 | ```js 12 | import hsp from 'heroku-self-ping'; 13 | 14 | hsp("http://your-app-url"); 15 | ``` 16 | 17 | This will register a timer self-pinging your app every 20 minutes. 18 | 19 | This timer will only activate when your app is running on Heroku platform. The script is a no-op on any other environment, including local and CI. 20 | 21 | ## Parameters 22 | * `your-app-url` can be any URL to access your app -- an `herokuapp.com` subdomain or any custom domain defined with your app. 23 | 24 | > Heroku doesn't allow an app to retrieve its current name, which is why you need to manually specify the URL. 25 | 26 | * `options`, optional object with the following keys: 27 | * `interval` number of ms between two heartbeats calls. Default to `20 * 60 * 1000` (20 minutes). 28 | * `logger` function to use for logging. Default to `console.log` 29 | * `verbose` send more information to logger function. Default to `false`. 30 | 31 | ## Return 32 | The function returns an [interval id](https://developer.mozilla.org/en/docs/Web/API/window.setInterval) when running on Heroku and the URL is not falsy, and `false` in other cases. 33 | 34 | ## Usage 35 | We recommend you set a custom env variable, for instance `heroku config:set APP_URL http://yourapp.herokuapp.com` and access it later from `process.env.APP_URL`. 36 | 37 | The lib won't do anything when passed an empty `url`. 38 | 39 | You can also use 40 | 41 | `https://${process.env.HEROKU_APP_NAME}.herokuapp.com` 42 | 43 | if you first run 44 | 45 | heroku labs:enable runtime-dyno-metadata -a 46 | 47 | See here for details: https://devcenter.heroku.com/articles/dyno-metadata 48 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "heroku-self-ping", 3 | "version": "2.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@types/cookiejar": { 8 | "version": "2.1.1", 9 | "resolved": "https://registry.npmjs.org/@types/cookiejar/-/cookiejar-2.1.1.tgz", 10 | "integrity": "sha512-aRnpPa7ysx3aNW60hTiCtLHlQaIFsXFCgQlpakNgDNVFzbtusSY8PwjAQgRWfSk0ekNoBjO51eQRB6upA9uuyw==", 11 | "dev": true 12 | }, 13 | "@types/mocha": { 14 | "version": "5.2.5", 15 | "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", 16 | "integrity": "sha512-lAVp+Kj54ui/vLUFxsJTMtWvZraZxum3w3Nwkble2dNuV5VnPA+Mi2oGX9XYJAaIvZi3tn3cbjS/qcJXRb6Bww==", 17 | "dev": true 18 | }, 19 | "@types/node": { 20 | "version": "10.12.10", 21 | "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.10.tgz", 22 | "integrity": "sha512-8xZEYckCbUVgK8Eg7lf5Iy4COKJ5uXlnIOnePN0WUwSQggy9tolM+tDJf7wMOnT/JT/W9xDYIaYggt3mRV2O5w==", 23 | "dev": true 24 | }, 25 | "@types/superagent": { 26 | "version": "4.1.7", 27 | "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.7.tgz", 28 | "integrity": "sha512-JSwNPgRYjIC4pIeOqLwWwfGj6iP1n5NE6kNBEbGx2V8H78xCPwx7QpNp9plaI30+W3cFEzJO7BIIsXE+dbtaGg==", 29 | "dev": true, 30 | "requires": { 31 | "@types/cookiejar": "*", 32 | "@types/node": "*" 33 | } 34 | }, 35 | "ansi-colors": { 36 | "version": "3.2.3", 37 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", 38 | "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", 39 | "dev": true 40 | }, 41 | "ansi-regex": { 42 | "version": "3.0.0", 43 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", 44 | "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", 45 | "dev": true 46 | }, 47 | "ansi-styles": { 48 | "version": "3.2.1", 49 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 50 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 51 | "dev": true, 52 | "requires": { 53 | "color-convert": "^1.9.0" 54 | } 55 | }, 56 | "anymatch": { 57 | "version": "3.1.1", 58 | "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", 59 | "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", 60 | "dev": true, 61 | "requires": { 62 | "normalize-path": "^3.0.0", 63 | "picomatch": "^2.0.4" 64 | } 65 | }, 66 | "argparse": { 67 | "version": "1.0.10", 68 | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", 69 | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", 70 | "dev": true, 71 | "requires": { 72 | "sprintf-js": "~1.0.2" 73 | } 74 | }, 75 | "arrify": { 76 | "version": "1.0.1", 77 | "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", 78 | "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", 79 | "dev": true 80 | }, 81 | "asynckit": { 82 | "version": "0.4.0", 83 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 84 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 85 | }, 86 | "balanced-match": { 87 | "version": "1.0.0", 88 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 89 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 90 | "dev": true 91 | }, 92 | "binary-extensions": { 93 | "version": "2.0.0", 94 | "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", 95 | "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", 96 | "dev": true 97 | }, 98 | "brace-expansion": { 99 | "version": "1.1.11", 100 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 101 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 102 | "dev": true, 103 | "requires": { 104 | "balanced-match": "^1.0.0", 105 | "concat-map": "0.0.1" 106 | } 107 | }, 108 | "braces": { 109 | "version": "3.0.2", 110 | "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", 111 | "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", 112 | "dev": true, 113 | "requires": { 114 | "fill-range": "^7.0.1" 115 | } 116 | }, 117 | "browser-stdout": { 118 | "version": "1.3.1", 119 | "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", 120 | "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", 121 | "dev": true 122 | }, 123 | "buffer-from": { 124 | "version": "1.1.1", 125 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 126 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", 127 | "dev": true 128 | }, 129 | "camelcase": { 130 | "version": "5.3.1", 131 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 132 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", 133 | "dev": true 134 | }, 135 | "chalk": { 136 | "version": "2.4.2", 137 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 138 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 139 | "dev": true, 140 | "requires": { 141 | "ansi-styles": "^3.2.1", 142 | "escape-string-regexp": "^1.0.5", 143 | "supports-color": "^5.3.0" 144 | }, 145 | "dependencies": { 146 | "supports-color": { 147 | "version": "5.5.0", 148 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 149 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 150 | "dev": true, 151 | "requires": { 152 | "has-flag": "^3.0.0" 153 | } 154 | } 155 | } 156 | }, 157 | "chokidar": { 158 | "version": "3.3.0", 159 | "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", 160 | "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", 161 | "dev": true, 162 | "requires": { 163 | "anymatch": "~3.1.1", 164 | "braces": "~3.0.2", 165 | "fsevents": "~2.1.1", 166 | "glob-parent": "~5.1.0", 167 | "is-binary-path": "~2.1.0", 168 | "is-glob": "~4.0.1", 169 | "normalize-path": "~3.0.0", 170 | "readdirp": "~3.2.0" 171 | } 172 | }, 173 | "cliui": { 174 | "version": "5.0.0", 175 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", 176 | "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", 177 | "dev": true, 178 | "requires": { 179 | "string-width": "^3.1.0", 180 | "strip-ansi": "^5.2.0", 181 | "wrap-ansi": "^5.1.0" 182 | }, 183 | "dependencies": { 184 | "ansi-regex": { 185 | "version": "4.1.0", 186 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 187 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 188 | "dev": true 189 | }, 190 | "string-width": { 191 | "version": "3.1.0", 192 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 193 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 194 | "dev": true, 195 | "requires": { 196 | "emoji-regex": "^7.0.1", 197 | "is-fullwidth-code-point": "^2.0.0", 198 | "strip-ansi": "^5.1.0" 199 | } 200 | }, 201 | "strip-ansi": { 202 | "version": "5.2.0", 203 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 204 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 205 | "dev": true, 206 | "requires": { 207 | "ansi-regex": "^4.1.0" 208 | } 209 | } 210 | } 211 | }, 212 | "color-convert": { 213 | "version": "1.9.3", 214 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 215 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 216 | "dev": true, 217 | "requires": { 218 | "color-name": "1.1.3" 219 | } 220 | }, 221 | "color-name": { 222 | "version": "1.1.3", 223 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 224 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", 225 | "dev": true 226 | }, 227 | "combined-stream": { 228 | "version": "1.0.8", 229 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 230 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 231 | "requires": { 232 | "delayed-stream": "~1.0.0" 233 | } 234 | }, 235 | "component-emitter": { 236 | "version": "1.3.0", 237 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", 238 | "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" 239 | }, 240 | "concat-map": { 241 | "version": "0.0.1", 242 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 243 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 244 | "dev": true 245 | }, 246 | "cookiejar": { 247 | "version": "2.1.2", 248 | "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.2.tgz", 249 | "integrity": "sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA==" 250 | }, 251 | "debug": { 252 | "version": "3.2.6", 253 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", 254 | "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", 255 | "dev": true, 256 | "requires": { 257 | "ms": "^2.1.1" 258 | } 259 | }, 260 | "decamelize": { 261 | "version": "1.2.0", 262 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 263 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 264 | "dev": true 265 | }, 266 | "define-properties": { 267 | "version": "1.1.3", 268 | "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", 269 | "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", 270 | "dev": true, 271 | "requires": { 272 | "object-keys": "^1.0.12" 273 | } 274 | }, 275 | "delayed-stream": { 276 | "version": "1.0.0", 277 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 278 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 279 | }, 280 | "diff": { 281 | "version": "3.5.0", 282 | "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", 283 | "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", 284 | "dev": true 285 | }, 286 | "emoji-regex": { 287 | "version": "7.0.3", 288 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 289 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 290 | "dev": true 291 | }, 292 | "es-abstract": { 293 | "version": "1.17.5", 294 | "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", 295 | "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", 296 | "dev": true, 297 | "requires": { 298 | "es-to-primitive": "^1.2.1", 299 | "function-bind": "^1.1.1", 300 | "has": "^1.0.3", 301 | "has-symbols": "^1.0.1", 302 | "is-callable": "^1.1.5", 303 | "is-regex": "^1.0.5", 304 | "object-inspect": "^1.7.0", 305 | "object-keys": "^1.1.1", 306 | "object.assign": "^4.1.0", 307 | "string.prototype.trimleft": "^2.1.1", 308 | "string.prototype.trimright": "^2.1.1" 309 | } 310 | }, 311 | "es-to-primitive": { 312 | "version": "1.2.1", 313 | "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", 314 | "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", 315 | "dev": true, 316 | "requires": { 317 | "is-callable": "^1.1.4", 318 | "is-date-object": "^1.0.1", 319 | "is-symbol": "^1.0.2" 320 | } 321 | }, 322 | "escape-string-regexp": { 323 | "version": "1.0.5", 324 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 325 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", 326 | "dev": true 327 | }, 328 | "esprima": { 329 | "version": "4.0.1", 330 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", 331 | "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", 332 | "dev": true 333 | }, 334 | "fast-safe-stringify": { 335 | "version": "2.0.7", 336 | "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", 337 | "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" 338 | }, 339 | "fill-range": { 340 | "version": "7.0.1", 341 | "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", 342 | "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", 343 | "dev": true, 344 | "requires": { 345 | "to-regex-range": "^5.0.1" 346 | } 347 | }, 348 | "find-up": { 349 | "version": "3.0.0", 350 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", 351 | "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", 352 | "dev": true, 353 | "requires": { 354 | "locate-path": "^3.0.0" 355 | } 356 | }, 357 | "flat": { 358 | "version": "4.1.0", 359 | "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", 360 | "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", 361 | "dev": true, 362 | "requires": { 363 | "is-buffer": "~2.0.3" 364 | } 365 | }, 366 | "formidable": { 367 | "version": "1.2.2", 368 | "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.2.tgz", 369 | "integrity": "sha512-V8gLm+41I/8kguQ4/o1D3RIHRmhYFG4pnNyonvua+40rqcEmT4+V71yaZ3B457xbbgCsCfjSPi65u/W6vK1U5Q==" 370 | }, 371 | "fs.realpath": { 372 | "version": "1.0.0", 373 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 374 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 375 | "dev": true 376 | }, 377 | "fsevents": { 378 | "version": "2.1.2", 379 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", 380 | "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", 381 | "dev": true, 382 | "optional": true 383 | }, 384 | "function-bind": { 385 | "version": "1.1.1", 386 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 387 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 388 | "dev": true 389 | }, 390 | "get-caller-file": { 391 | "version": "2.0.5", 392 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", 393 | "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", 394 | "dev": true 395 | }, 396 | "glob": { 397 | "version": "7.1.3", 398 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 399 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", 400 | "dev": true, 401 | "requires": { 402 | "fs.realpath": "^1.0.0", 403 | "inflight": "^1.0.4", 404 | "inherits": "2", 405 | "minimatch": "^3.0.4", 406 | "once": "^1.3.0", 407 | "path-is-absolute": "^1.0.0" 408 | } 409 | }, 410 | "glob-parent": { 411 | "version": "5.1.1", 412 | "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", 413 | "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", 414 | "dev": true, 415 | "requires": { 416 | "is-glob": "^4.0.1" 417 | } 418 | }, 419 | "growl": { 420 | "version": "1.10.5", 421 | "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", 422 | "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", 423 | "dev": true 424 | }, 425 | "has": { 426 | "version": "1.0.3", 427 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 428 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 429 | "dev": true, 430 | "requires": { 431 | "function-bind": "^1.1.1" 432 | } 433 | }, 434 | "has-flag": { 435 | "version": "3.0.0", 436 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 437 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", 438 | "dev": true 439 | }, 440 | "has-symbols": { 441 | "version": "1.0.1", 442 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", 443 | "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", 444 | "dev": true 445 | }, 446 | "he": { 447 | "version": "1.2.0", 448 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 449 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 450 | "dev": true 451 | }, 452 | "inflight": { 453 | "version": "1.0.6", 454 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 455 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 456 | "dev": true, 457 | "requires": { 458 | "once": "^1.3.0", 459 | "wrappy": "1" 460 | } 461 | }, 462 | "inherits": { 463 | "version": "2.0.3", 464 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 465 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 466 | }, 467 | "is-binary-path": { 468 | "version": "2.1.0", 469 | "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", 470 | "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", 471 | "dev": true, 472 | "requires": { 473 | "binary-extensions": "^2.0.0" 474 | } 475 | }, 476 | "is-buffer": { 477 | "version": "2.0.4", 478 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", 479 | "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", 480 | "dev": true 481 | }, 482 | "is-callable": { 483 | "version": "1.1.5", 484 | "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", 485 | "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", 486 | "dev": true 487 | }, 488 | "is-date-object": { 489 | "version": "1.0.2", 490 | "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", 491 | "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", 492 | "dev": true 493 | }, 494 | "is-extglob": { 495 | "version": "2.1.1", 496 | "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", 497 | "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", 498 | "dev": true 499 | }, 500 | "is-fullwidth-code-point": { 501 | "version": "2.0.0", 502 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 503 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 504 | "dev": true 505 | }, 506 | "is-glob": { 507 | "version": "4.0.1", 508 | "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", 509 | "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", 510 | "dev": true, 511 | "requires": { 512 | "is-extglob": "^2.1.1" 513 | } 514 | }, 515 | "is-heroku": { 516 | "version": "2.0.0", 517 | "resolved": "https://registry.npmjs.org/is-heroku/-/is-heroku-2.0.0.tgz", 518 | "integrity": "sha512-c4vHXwxwfIZlKOEAyk25XICIfKlqWwYct+2zt1IQfpn2qt6SNqTp41QabAUN5B9JJMj6WQ7prN4HeM2KUF/gKw==" 519 | }, 520 | "is-number": { 521 | "version": "7.0.0", 522 | "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", 523 | "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", 524 | "dev": true 525 | }, 526 | "is-regex": { 527 | "version": "1.0.5", 528 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", 529 | "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", 530 | "dev": true, 531 | "requires": { 532 | "has": "^1.0.3" 533 | } 534 | }, 535 | "is-symbol": { 536 | "version": "1.0.3", 537 | "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", 538 | "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", 539 | "dev": true, 540 | "requires": { 541 | "has-symbols": "^1.0.1" 542 | } 543 | }, 544 | "isexe": { 545 | "version": "2.0.0", 546 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 547 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", 548 | "dev": true 549 | }, 550 | "js-yaml": { 551 | "version": "3.13.1", 552 | "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", 553 | "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", 554 | "dev": true, 555 | "requires": { 556 | "argparse": "^1.0.7", 557 | "esprima": "^4.0.0" 558 | } 559 | }, 560 | "locate-path": { 561 | "version": "3.0.0", 562 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", 563 | "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", 564 | "dev": true, 565 | "requires": { 566 | "p-locate": "^3.0.0", 567 | "path-exists": "^3.0.0" 568 | } 569 | }, 570 | "lodash": { 571 | "version": "4.17.15", 572 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", 573 | "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", 574 | "dev": true 575 | }, 576 | "log-symbols": { 577 | "version": "3.0.0", 578 | "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz", 579 | "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==", 580 | "dev": true, 581 | "requires": { 582 | "chalk": "^2.4.2" 583 | } 584 | }, 585 | "make-error": { 586 | "version": "1.3.5", 587 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", 588 | "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==", 589 | "dev": true 590 | }, 591 | "methods": { 592 | "version": "1.1.2", 593 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 594 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 595 | }, 596 | "mime": { 597 | "version": "2.4.4", 598 | "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz", 599 | "integrity": "sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA==" 600 | }, 601 | "mime-db": { 602 | "version": "1.43.0", 603 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", 604 | "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" 605 | }, 606 | "mime-types": { 607 | "version": "2.1.26", 608 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", 609 | "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", 610 | "requires": { 611 | "mime-db": "1.43.0" 612 | } 613 | }, 614 | "minimatch": { 615 | "version": "3.0.4", 616 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 617 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 618 | "dev": true, 619 | "requires": { 620 | "brace-expansion": "^1.1.7" 621 | } 622 | }, 623 | "minimist": { 624 | "version": "1.2.5", 625 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 626 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 627 | "dev": true 628 | }, 629 | "mkdirp": { 630 | "version": "0.5.5", 631 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 632 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 633 | "dev": true, 634 | "requires": { 635 | "minimist": "^1.2.5" 636 | }, 637 | "dependencies": { 638 | "minimist": { 639 | "version": "1.2.5", 640 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 641 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 642 | "dev": true 643 | } 644 | } 645 | }, 646 | "mocha": { 647 | "version": "7.1.1", 648 | "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz", 649 | "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==", 650 | "dev": true, 651 | "requires": { 652 | "ansi-colors": "3.2.3", 653 | "browser-stdout": "1.3.1", 654 | "chokidar": "3.3.0", 655 | "debug": "3.2.6", 656 | "diff": "3.5.0", 657 | "escape-string-regexp": "1.0.5", 658 | "find-up": "3.0.0", 659 | "glob": "7.1.3", 660 | "growl": "1.10.5", 661 | "he": "1.2.0", 662 | "js-yaml": "3.13.1", 663 | "log-symbols": "3.0.0", 664 | "minimatch": "3.0.4", 665 | "mkdirp": "0.5.3", 666 | "ms": "2.1.1", 667 | "node-environment-flags": "1.0.6", 668 | "object.assign": "4.1.0", 669 | "strip-json-comments": "2.0.1", 670 | "supports-color": "6.0.0", 671 | "which": "1.3.1", 672 | "wide-align": "1.1.3", 673 | "yargs": "13.3.2", 674 | "yargs-parser": "13.1.2", 675 | "yargs-unparser": "1.6.0" 676 | }, 677 | "dependencies": { 678 | "mkdirp": { 679 | "version": "0.5.3", 680 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz", 681 | "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==", 682 | "dev": true, 683 | "requires": { 684 | "minimist": "^1.2.5" 685 | } 686 | } 687 | } 688 | }, 689 | "ms": { 690 | "version": "2.1.1", 691 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 692 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", 693 | "dev": true 694 | }, 695 | "node-environment-flags": { 696 | "version": "1.0.6", 697 | "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz", 698 | "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==", 699 | "dev": true, 700 | "requires": { 701 | "object.getownpropertydescriptors": "^2.0.3", 702 | "semver": "^5.7.0" 703 | }, 704 | "dependencies": { 705 | "semver": { 706 | "version": "5.7.1", 707 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 708 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", 709 | "dev": true 710 | } 711 | } 712 | }, 713 | "normalize-path": { 714 | "version": "3.0.0", 715 | "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", 716 | "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", 717 | "dev": true 718 | }, 719 | "object-inspect": { 720 | "version": "1.7.0", 721 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", 722 | "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", 723 | "dev": true 724 | }, 725 | "object-keys": { 726 | "version": "1.1.1", 727 | "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", 728 | "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", 729 | "dev": true 730 | }, 731 | "object.assign": { 732 | "version": "4.1.0", 733 | "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", 734 | "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", 735 | "dev": true, 736 | "requires": { 737 | "define-properties": "^1.1.2", 738 | "function-bind": "^1.1.1", 739 | "has-symbols": "^1.0.0", 740 | "object-keys": "^1.0.11" 741 | } 742 | }, 743 | "object.getownpropertydescriptors": { 744 | "version": "2.1.0", 745 | "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", 746 | "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", 747 | "dev": true, 748 | "requires": { 749 | "define-properties": "^1.1.3", 750 | "es-abstract": "^1.17.0-next.1" 751 | } 752 | }, 753 | "once": { 754 | "version": "1.4.0", 755 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 756 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 757 | "dev": true, 758 | "requires": { 759 | "wrappy": "1" 760 | } 761 | }, 762 | "p-limit": { 763 | "version": "2.2.2", 764 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", 765 | "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", 766 | "dev": true, 767 | "requires": { 768 | "p-try": "^2.0.0" 769 | } 770 | }, 771 | "p-locate": { 772 | "version": "3.0.0", 773 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", 774 | "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", 775 | "dev": true, 776 | "requires": { 777 | "p-limit": "^2.0.0" 778 | } 779 | }, 780 | "p-try": { 781 | "version": "2.2.0", 782 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", 783 | "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", 784 | "dev": true 785 | }, 786 | "path-exists": { 787 | "version": "3.0.0", 788 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", 789 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", 790 | "dev": true 791 | }, 792 | "path-is-absolute": { 793 | "version": "1.0.1", 794 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 795 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 796 | "dev": true 797 | }, 798 | "picomatch": { 799 | "version": "2.2.2", 800 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", 801 | "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", 802 | "dev": true 803 | }, 804 | "qs": { 805 | "version": "6.9.3", 806 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.3.tgz", 807 | "integrity": "sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw==" 808 | }, 809 | "readable-stream": { 810 | "version": "3.6.0", 811 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", 812 | "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", 813 | "requires": { 814 | "inherits": "^2.0.3", 815 | "string_decoder": "^1.1.1", 816 | "util-deprecate": "^1.0.1" 817 | } 818 | }, 819 | "readdirp": { 820 | "version": "3.2.0", 821 | "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", 822 | "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", 823 | "dev": true, 824 | "requires": { 825 | "picomatch": "^2.0.4" 826 | } 827 | }, 828 | "require-directory": { 829 | "version": "2.1.1", 830 | "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", 831 | "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", 832 | "dev": true 833 | }, 834 | "require-main-filename": { 835 | "version": "2.0.0", 836 | "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", 837 | "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", 838 | "dev": true 839 | }, 840 | "safe-buffer": { 841 | "version": "5.2.0", 842 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", 843 | "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" 844 | }, 845 | "semver": { 846 | "version": "6.3.0", 847 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 848 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" 849 | }, 850 | "set-blocking": { 851 | "version": "2.0.0", 852 | "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", 853 | "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", 854 | "dev": true 855 | }, 856 | "source-map": { 857 | "version": "0.6.1", 858 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 859 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 860 | "dev": true 861 | }, 862 | "source-map-support": { 863 | "version": "0.5.9", 864 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.9.tgz", 865 | "integrity": "sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==", 866 | "dev": true, 867 | "requires": { 868 | "buffer-from": "^1.0.0", 869 | "source-map": "^0.6.0" 870 | } 871 | }, 872 | "sprintf-js": { 873 | "version": "1.0.3", 874 | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", 875 | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", 876 | "dev": true 877 | }, 878 | "string-width": { 879 | "version": "2.1.1", 880 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", 881 | "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", 882 | "dev": true, 883 | "requires": { 884 | "is-fullwidth-code-point": "^2.0.0", 885 | "strip-ansi": "^4.0.0" 886 | } 887 | }, 888 | "string.prototype.trimend": { 889 | "version": "1.0.0", 890 | "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz", 891 | "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==", 892 | "dev": true, 893 | "requires": { 894 | "define-properties": "^1.1.3", 895 | "es-abstract": "^1.17.5" 896 | } 897 | }, 898 | "string.prototype.trimleft": { 899 | "version": "2.1.2", 900 | "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", 901 | "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", 902 | "dev": true, 903 | "requires": { 904 | "define-properties": "^1.1.3", 905 | "es-abstract": "^1.17.5", 906 | "string.prototype.trimstart": "^1.0.0" 907 | } 908 | }, 909 | "string.prototype.trimright": { 910 | "version": "2.1.2", 911 | "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", 912 | "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", 913 | "dev": true, 914 | "requires": { 915 | "define-properties": "^1.1.3", 916 | "es-abstract": "^1.17.5", 917 | "string.prototype.trimend": "^1.0.0" 918 | } 919 | }, 920 | "string.prototype.trimstart": { 921 | "version": "1.0.0", 922 | "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz", 923 | "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==", 924 | "dev": true, 925 | "requires": { 926 | "define-properties": "^1.1.3", 927 | "es-abstract": "^1.17.5" 928 | } 929 | }, 930 | "string_decoder": { 931 | "version": "1.3.0", 932 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", 933 | "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", 934 | "requires": { 935 | "safe-buffer": "~5.2.0" 936 | } 937 | }, 938 | "strip-ansi": { 939 | "version": "4.0.0", 940 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", 941 | "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", 942 | "dev": true, 943 | "requires": { 944 | "ansi-regex": "^3.0.0" 945 | } 946 | }, 947 | "strip-json-comments": { 948 | "version": "2.0.1", 949 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 950 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 951 | "dev": true 952 | }, 953 | "superagent": { 954 | "version": "5.2.2", 955 | "resolved": "https://registry.npmjs.org/superagent/-/superagent-5.2.2.tgz", 956 | "integrity": "sha512-pMWBUnIllK4ZTw7p/UaobiQPwAO5w/1NRRTDpV0FTVNmECztsxKspj3ZWEordVEaqpZtmOQJJna4yTLyC/q7PQ==", 957 | "requires": { 958 | "component-emitter": "^1.3.0", 959 | "cookiejar": "^2.1.2", 960 | "debug": "^4.1.1", 961 | "fast-safe-stringify": "^2.0.7", 962 | "form-data": "^3.0.0", 963 | "formidable": "^1.2.1", 964 | "methods": "^1.1.2", 965 | "mime": "^2.4.4", 966 | "qs": "^6.9.1", 967 | "readable-stream": "^3.4.0", 968 | "semver": "^6.3.0" 969 | }, 970 | "dependencies": { 971 | "debug": { 972 | "version": "4.1.1", 973 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 974 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 975 | "requires": { 976 | "ms": "^2.1.1" 977 | } 978 | }, 979 | "form-data": { 980 | "version": "3.0.0", 981 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", 982 | "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", 983 | "requires": { 984 | "asynckit": "^0.4.0", 985 | "combined-stream": "^1.0.8", 986 | "mime-types": "^2.1.12" 987 | } 988 | }, 989 | "ms": { 990 | "version": "2.1.2", 991 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 992 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 993 | } 994 | } 995 | }, 996 | "supports-color": { 997 | "version": "6.0.0", 998 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", 999 | "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", 1000 | "dev": true, 1001 | "requires": { 1002 | "has-flag": "^3.0.0" 1003 | } 1004 | }, 1005 | "to-regex-range": { 1006 | "version": "5.0.1", 1007 | "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", 1008 | "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", 1009 | "dev": true, 1010 | "requires": { 1011 | "is-number": "^7.0.0" 1012 | } 1013 | }, 1014 | "ts-node": { 1015 | "version": "7.0.1", 1016 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz", 1017 | "integrity": "sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw==", 1018 | "dev": true, 1019 | "requires": { 1020 | "arrify": "^1.0.0", 1021 | "buffer-from": "^1.1.0", 1022 | "diff": "^3.1.0", 1023 | "make-error": "^1.1.1", 1024 | "minimist": "^1.2.0", 1025 | "mkdirp": "^0.5.1", 1026 | "source-map-support": "^0.5.6", 1027 | "yn": "^2.0.0" 1028 | }, 1029 | "dependencies": { 1030 | "minimist": { 1031 | "version": "1.2.5", 1032 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 1033 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 1034 | "dev": true 1035 | } 1036 | } 1037 | }, 1038 | "typescript": { 1039 | "version": "3.1.6", 1040 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.6.tgz", 1041 | "integrity": "sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==", 1042 | "dev": true 1043 | }, 1044 | "util-deprecate": { 1045 | "version": "1.0.2", 1046 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1047 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1048 | }, 1049 | "which": { 1050 | "version": "1.3.1", 1051 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 1052 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 1053 | "dev": true, 1054 | "requires": { 1055 | "isexe": "^2.0.0" 1056 | } 1057 | }, 1058 | "which-module": { 1059 | "version": "2.0.0", 1060 | "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", 1061 | "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", 1062 | "dev": true 1063 | }, 1064 | "wide-align": { 1065 | "version": "1.1.3", 1066 | "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", 1067 | "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", 1068 | "dev": true, 1069 | "requires": { 1070 | "string-width": "^1.0.2 || 2" 1071 | } 1072 | }, 1073 | "wrap-ansi": { 1074 | "version": "5.1.0", 1075 | "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", 1076 | "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", 1077 | "dev": true, 1078 | "requires": { 1079 | "ansi-styles": "^3.2.0", 1080 | "string-width": "^3.0.0", 1081 | "strip-ansi": "^5.0.0" 1082 | }, 1083 | "dependencies": { 1084 | "ansi-regex": { 1085 | "version": "4.1.0", 1086 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 1087 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 1088 | "dev": true 1089 | }, 1090 | "string-width": { 1091 | "version": "3.1.0", 1092 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 1093 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 1094 | "dev": true, 1095 | "requires": { 1096 | "emoji-regex": "^7.0.1", 1097 | "is-fullwidth-code-point": "^2.0.0", 1098 | "strip-ansi": "^5.1.0" 1099 | } 1100 | }, 1101 | "strip-ansi": { 1102 | "version": "5.2.0", 1103 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 1104 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 1105 | "dev": true, 1106 | "requires": { 1107 | "ansi-regex": "^4.1.0" 1108 | } 1109 | } 1110 | } 1111 | }, 1112 | "wrappy": { 1113 | "version": "1.0.2", 1114 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1115 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 1116 | "dev": true 1117 | }, 1118 | "y18n": { 1119 | "version": "4.0.0", 1120 | "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", 1121 | "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", 1122 | "dev": true 1123 | }, 1124 | "yargs": { 1125 | "version": "13.3.2", 1126 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", 1127 | "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", 1128 | "dev": true, 1129 | "requires": { 1130 | "cliui": "^5.0.0", 1131 | "find-up": "^3.0.0", 1132 | "get-caller-file": "^2.0.1", 1133 | "require-directory": "^2.1.1", 1134 | "require-main-filename": "^2.0.0", 1135 | "set-blocking": "^2.0.0", 1136 | "string-width": "^3.0.0", 1137 | "which-module": "^2.0.0", 1138 | "y18n": "^4.0.0", 1139 | "yargs-parser": "^13.1.2" 1140 | }, 1141 | "dependencies": { 1142 | "ansi-regex": { 1143 | "version": "4.1.0", 1144 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 1145 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 1146 | "dev": true 1147 | }, 1148 | "string-width": { 1149 | "version": "3.1.0", 1150 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 1151 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 1152 | "dev": true, 1153 | "requires": { 1154 | "emoji-regex": "^7.0.1", 1155 | "is-fullwidth-code-point": "^2.0.0", 1156 | "strip-ansi": "^5.1.0" 1157 | } 1158 | }, 1159 | "strip-ansi": { 1160 | "version": "5.2.0", 1161 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 1162 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 1163 | "dev": true, 1164 | "requires": { 1165 | "ansi-regex": "^4.1.0" 1166 | } 1167 | } 1168 | } 1169 | }, 1170 | "yargs-parser": { 1171 | "version": "13.1.2", 1172 | "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", 1173 | "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", 1174 | "dev": true, 1175 | "requires": { 1176 | "camelcase": "^5.0.0", 1177 | "decamelize": "^1.2.0" 1178 | } 1179 | }, 1180 | "yargs-unparser": { 1181 | "version": "1.6.0", 1182 | "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", 1183 | "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", 1184 | "dev": true, 1185 | "requires": { 1186 | "flat": "^4.1.0", 1187 | "lodash": "^4.17.15", 1188 | "yargs": "^13.3.0" 1189 | } 1190 | }, 1191 | "yn": { 1192 | "version": "2.0.0", 1193 | "resolved": "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz", 1194 | "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=", 1195 | "dev": true 1196 | } 1197 | } 1198 | } 1199 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "heroku-self-ping", 3 | "version": "2.0.1", 4 | "author": "Matthieu Bacconnier ", 5 | "description": "Node.js script for keeping your Heroku application alive. Avoid time limit on your dyno.", 6 | "bin": {}, 7 | "scripts": { 8 | "prepare": "npm run build", 9 | "prepublishOnly": "npm test", 10 | "build": "tsc", 11 | "test": "NODE_ENV=test mocha --reporter spec --require ts-node/register test/**/*.ts --exit" 12 | }, 13 | "main": "dist/index.js", 14 | "types": "dist/index.d.ts", 15 | "repository": { 16 | "type": "git", 17 | "url": "https://github.com/Neamar/heroku-self-ping" 18 | }, 19 | "keywords": [ 20 | "anyfetch", 21 | "hydrater", 22 | "filecleaner" 23 | ], 24 | "license": "MIT", 25 | "dependencies": { 26 | "is-heroku": "^2.0.0", 27 | "superagent": "^5.2.2" 28 | }, 29 | "devDependencies": { 30 | "@types/mocha": "^5.2.5", 31 | "@types/node": "^10.12.10", 32 | "@types/superagent": "^4.1.7", 33 | "mocha": "~7.1.1", 34 | "ts-node": "^7.0.1", 35 | "typescript": "^3.1.6" 36 | }, 37 | "licence": "MIT", 38 | "engines": { 39 | "node": ">=8.0.0" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import * as request from 'superagent'; 2 | import logger from './logger' 3 | 4 | interface IOptions { 5 | interval?: number, 6 | logger?: (arg: string) => any, 7 | verbose?: boolean 8 | } 9 | 10 | export default (url?: string, options: IOptions = {}): boolean | NodeJS.Timeout => { 11 | 12 | if (!url) { 13 | options.verbose && options.logger("heroku-self-ping: no url provided. Exiting."); 14 | return false; 15 | } 16 | 17 | options.interval = options.interval || 20 * 1000 * 60; 18 | logger.setLogger(options.logger || console.log) 19 | logger.setIsVerbose(options.verbose || false) 20 | 21 | const isHeroku = require('is-heroku') 22 | 23 | if (!isHeroku) { 24 | logger.verbose("heroku-self-ping: heroku not detected. Exiting.") 25 | return false; 26 | } 27 | logger.verbose(`heroku-self-ping: Setting up heartbeat to ${url} every ${options.interval} ms.`) 28 | 29 | return setInterval(() => { 30 | logger.log(`heroku-self-ping: Sending heartbeat to ${url}`); 31 | 32 | request.get(url); 33 | }, options.interval); 34 | }; 35 | -------------------------------------------------------------------------------- /src/logger.ts: -------------------------------------------------------------------------------- 1 | namespace Logger { 2 | let logger = console.log 3 | let isVerbose = false 4 | 5 | 6 | export const setLogger = (newLogger: (arg: string) => any) => { 7 | if (typeof logger !== 'function') { 8 | throw 'Error: Provided logger is not a function!' 9 | } 10 | logger = newLogger 11 | } 12 | 13 | export const setIsVerbose = (value: boolean) => { 14 | isVerbose = value 15 | } 16 | 17 | export const log = (arg: string) => { 18 | logger(arg) 19 | } 20 | 21 | export const verbose = (arg: string) => { 22 | isVerbose && logger(arg) 23 | } 24 | } 25 | 26 | export default Logger -------------------------------------------------------------------------------- /test/index.ts: -------------------------------------------------------------------------------- 1 | import * as assert from 'assert'; 2 | import herokuSelfPing from './../src/index'; 3 | 4 | const TEST_URL = "http://mypp.herokuapp.com"; 5 | 6 | describe("Heroku self ping", () => { 7 | it("should skip when URL is not defined", () => { 8 | 9 | const output = herokuSelfPing(null, { 10 | logger: text => { 11 | assert.strictEqual(text, 'heroku-self-ping: no url provided. Exiting.'); 12 | } 13 | }); 14 | assert.ok(!output); 15 | }); 16 | 17 | it("should skip when not on Heroku", () => { 18 | const output = herokuSelfPing(TEST_URL, { 19 | logger: text => { 20 | assert.strictEqual(text, 'heroku-self-ping: heroku not detected. Exiting.') 21 | } 22 | }) 23 | assert.ok(!output); 24 | }); 25 | 26 | it('should set an interval on Heroku', () => { 27 | // Fake an Heroku env 28 | process.env.HEROKU = 'true'; 29 | // Dirty hack to force a reload of "is-heroku" module, 30 | // else we're stuck with the previously cached value 31 | delete require.cache[require.resolve('is-heroku')]; 32 | 33 | const interval = herokuSelfPing(TEST_URL) as NodeJS.Timeout 34 | assert.ok(interval); 35 | 36 | // Cleanup 37 | delete process.env.HEROKU; 38 | clearInterval(interval); 39 | }); 40 | 41 | it('check if interval is ticking and logs correct message on Heroku', async () => { 42 | // Fake an Heroku env 43 | process.env.HEROKU = 'true'; 44 | // Dirty hack to force a reload of "is-heroku" module, 45 | // else we're stuck with the previously cached value 46 | delete require.cache[require.resolve('is-heroku')]; 47 | 48 | const INTERVAL = 2 // ms 49 | const expectedLogOutput = `heroku-self-ping: Sending heartbeat to ${TEST_URL}` 50 | 51 | const interval = herokuSelfPing(TEST_URL, { 52 | interval: INTERVAL, 53 | logger: text => { 54 | assert.strictEqual(text, expectedLogOutput) 55 | } 56 | }) as NodeJS.Timeout 57 | assert.ok(interval); 58 | 59 | // Wait for 5 ticks, check if logged output is correct 60 | await new Promise(resolve => { 61 | setTimeout(() => { 62 | resolve() 63 | }, 5 * INTERVAL) 64 | }) 65 | // Cleanup 66 | delete process.env.HEROKU; 67 | clearInterval(interval); 68 | }); 69 | }); 70 | -------------------------------------------------------------------------------- /test/logger.ts: -------------------------------------------------------------------------------- 1 | import * as assert from 'assert'; 2 | import logger from './../src/logger'; 3 | 4 | 5 | describe("Logger", () => { 6 | it('should set custom logger and log messages to it', () => { 7 | const message = 'TEST' 8 | logger.setLogger(text => { 9 | assert.strictEqual(message, text) 10 | }) 11 | logger.log(message) 12 | }) 13 | 14 | it('should not log verbose if verbose is false', () => { 15 | const message = 'TEST' 16 | logger.setIsVerbose(false) 17 | logger.setLogger(text => { 18 | throw 'This should never be called' 19 | }) 20 | logger.verbose(message) 21 | }) 22 | 23 | it('should log verbose when verbose is true', () => { 24 | const message = 'TEST' 25 | logger.setIsVerbose(true) 26 | logger.setLogger(text => { 27 | assert.strictEqual(text, message) 28 | }) 29 | logger.verbose(message) 30 | }) 31 | 32 | }) 33 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "lib": ["es2017", "es6", "dom"], 6 | "declaration": true, 7 | "noImplicitAny": true, 8 | "outDir": "./dist", 9 | "sourceMap": true 10 | }, 11 | "include": ["./src/**/*"], 12 | "exclude": ["node_modules"] 13 | } 14 | --------------------------------------------------------------------------------