├── .gitignore ├── .nowignore ├── LICENSE ├── README.md ├── deploy.sh ├── github_action.js ├── hacktoberfest.js ├── index.js ├── issue_comment.js ├── messages.js ├── now.json ├── package-lock.json ├── package.json ├── pull_request.js ├── pull_request_review.js ├── slash_commands.js └── webhooks.js /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Runtime data 9 | pids 10 | *.pid 11 | *.seed 12 | *.pid.lock 13 | 14 | # Directory for instrumented libs generated by jscoverage/JSCover 15 | lib-cov 16 | 17 | # Coverage directory used by tools like istanbul 18 | coverage 19 | 20 | # nyc test coverage 21 | .nyc_output 22 | 23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 24 | .grunt 25 | 26 | # Bower dependency directory (https://bower.io/) 27 | bower_components 28 | 29 | # node-waf configuration 30 | .lock-wscript 31 | 32 | # Compiled binary addons (https://nodejs.org/api/addons.html) 33 | build/Release 34 | 35 | # Dependency directories 36 | node_modules/ 37 | jspm_packages/ 38 | 39 | # TypeScript v1 declaration files 40 | typings/ 41 | 42 | # Optional npm cache directory 43 | .npm 44 | 45 | # Optional eslint cache 46 | .eslintcache 47 | 48 | # Optional REPL history 49 | .node_repl_history 50 | 51 | # Output of 'npm pack' 52 | *.tgz 53 | 54 | # Yarn Integrity file 55 | .yarn-integrity 56 | 57 | # dotenv environment variables file 58 | .env 59 | 60 | # next.js build output 61 | .next 62 | 63 | .vercel 64 | -------------------------------------------------------------------------------- /.nowignore: -------------------------------------------------------------------------------- 1 | deploy.sh 2 | .env -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Hasura 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hasura-bot :robot: 2 | 3 | Hasura's own GitHub bot, currently tasked with commenting on pull requests when they are opened/closed/merged. 4 | Deployed on [Zeit Now](https://zeit.co/now): https://hasura-github-bot.now.sh 5 | 6 | ## Local Setup 7 | 8 | - Fork this repo and clone it on your system: 9 | ```bash 10 | git clone https://github.com//github-bot 11 | ``` 12 | - Navigate into the repo and install the dependencies: 13 | ```bash 14 | cd github-bot 15 | npm install 16 | ``` 17 | - Create a `.env` file and set `GITHUB_TOKEN` and `WEBHOOK_SECRET` env variables. 18 | - Start a local server using `vercel`: 19 | ```bash 20 | npm run dev 21 | ``` 22 | **Note:** By default `vercel` starts the server on port 3000. You can set a different port using the `--listen` flag. 23 | ```bash 24 | npm run dev -- --listen 25 | ``` 26 | - Set up port forwarding with `ngrok`(install `ngrok` from [here](https://ngrok.com/download) if you don't already have it): 27 | ```bash 28 | ngrok http 29 | ``` 30 | In the webhook settings on Github, set the "Payload URL" to the one provided by ngrok. 31 | **Note:** Also make sure that the "Content type" field in the webhook settings is set to `application/json`. 32 | 33 | ## Contribution guidelines 34 | - Create a new branch: 35 | ```bash 36 | git checkout -b 37 | ``` 38 | - Make the required changes in the code. 39 | - Stage and commit your changes: 40 | ```bash 41 | git add . 42 | git commit -m "" 43 | ``` 44 | - Push the changes to your fork: 45 | ```bash 46 | git push -u origin 47 | ``` 48 | - Create a pull request to this repo. 49 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | now -e GITHUB_TOKEN=@hasura-bot-github-commenter-token -e WEBHOOK_SECRET=@hasura-bot-github-commenter-webhook-secret 4 | now alias 5 | now remove hasura-github-bot --safe -y 6 | -------------------------------------------------------------------------------- /github_action.js: -------------------------------------------------------------------------------- 1 | export function monoRepoWorkflowDispatch(octokit, name) { 2 | return async (inputs) => { 3 | try { 4 | console.log(`dispatching github workflow: ${name}`); 5 | await octokit.actions.createWorkflowDispatch({ 6 | owner: 'hasura', 7 | repo: 'graphql-engine-mono', 8 | workflow_id: `${name}.yml`, 9 | ref: 'main', 10 | inputs, 11 | }); 12 | } catch (e) { 13 | console.error(`failed to dispatch github workflow: ${name}`); 14 | console.error(e); 15 | } 16 | }; 17 | } 18 | 19 | export function engineV3WorkflowDispatch(octokit, name) { 20 | return async (inputs) => { 21 | try { 22 | console.log(`dispatching github workflow: ${name}`); 23 | await octokit.actions.createWorkflowDispatch({ 24 | owner: 'hasura', 25 | repo: 'v3-engine', 26 | workflow_id: `${name}.yml`, 27 | ref: 'main', 28 | inputs, 29 | }); 30 | } catch (e) { 31 | console.error(`failed to dispatch github workflow: ${name}`); 32 | console.error(e); 33 | } 34 | }; 35 | } 36 | -------------------------------------------------------------------------------- /hacktoberfest.js: -------------------------------------------------------------------------------- 1 | // hacktoberfest.js: all hacktoberfest related handlers 2 | 3 | import fetch from 'node-fetch'; 4 | 5 | const isHacktoberfestUser = (user) => { 6 | return new Promise((resolve, reject) => { 7 | fetch(`https://hacktoberfest.digitalocean.com/stats/${user}`) 8 | .then(res => { 9 | resolve(res.status === 200); 10 | }) 11 | .catch(err => { 12 | console.error(err); 13 | reject(err); 14 | }); 15 | }); 16 | }; 17 | 18 | export default { 19 | isHacktoberfestUser, 20 | }; 21 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | require = require("esm")(module); 2 | module.exports = require("./webhooks.js"); 3 | -------------------------------------------------------------------------------- /issue_comment.js: -------------------------------------------------------------------------------- 1 | import { handleSlashCommands } from './slash_commands'; 2 | 3 | const issueCommentHandler = (octokit) => { 4 | return async ({ id, name, payload }) => { 5 | console.log(`received issue comment event: ${id}`); 6 | 7 | if (payload.action !== 'created') { 8 | console.log(`ignoring event as it was triggered by ${payload.action}`); 9 | return; 10 | } 11 | 12 | if (!payload.issue.pull_request) { 13 | console.log('ignoring event as it is not a pull request comment'); 14 | return; 15 | } 16 | 17 | const { comment: {body}, issue: {number: prNumber, pull_request: {html_url: prLink}}} = payload; 18 | await handleSlashCommands(body, {octokit, prLink, prNumber}); 19 | }; 20 | }; 21 | 22 | export default issueCommentHandler; 23 | -------------------------------------------------------------------------------- /messages.js: -------------------------------------------------------------------------------- 1 | // messages.js: messages used to comment etc. 2 | 3 | const prOpened = (login) => { 4 | return `:robot: 5 | 6 | Thanks for your PR @${login}! 7 | 8 | A member of our team will review it and provide feedback shortly. We appreciate your patience and enthusiasm in improving Hasura. 9 | 10 | Thank you for your contribution :rocket:`; 11 | }; 12 | 13 | const prClosed = (login) => { 14 | return `:robot: 15 | 16 | Hi, @${login} — 17 | 18 | We regret to inform you that your PR has not been merged. However, your efforts are greatly appreciated, and we encourage you to stay involved. 19 | 20 | Please consider contributing to other [open issues](https://github.com/hasura/graphql-engine/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) that might align with your expertise. Our community is active on [Discord](https://discord.gg/3FNQnWj), and we're here to support you with any questions you might have. 21 | 22 | Thank you for your understanding and continued support.` 23 | }; 24 | 25 | const prNovalue = (login) => { 26 | return `:robot: 27 | 28 | Thank you for your submission. We value your contribution, although after careful review, we've determined that this PR doesn't align with our current project needs. 29 | 30 | This does not reflect the quality of your work, and we encourage you to explore other [open issues](https://github.com/hasura/graphql-engine/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22) labeled as [\`good first issue\`](https://github.com/hasura/graphql-engine/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22) or [\`hacktoberfest\`](https://github.com/hasura/graphql-engine/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Ahacktoberfest). We're here to assist on [Discord](https://discord.gg/3FNQnWj) if you have any questions. 31 | 32 | Keep up the great work, and we look forward to your future contributions!`; 33 | }; 34 | 35 | const prMerged = (login) => { 36 | return `:robot: 37 | 38 | ![GIF](https://media1.tenor.com/images/15ae412a294bf128f6ba7e60aa0ea8e1/tenor.gif) 39 | 40 | Awesome work, @${login}! 41 | 42 | Your changes were [merged successfully](https://github.com/hasura/graphql-engine/commits/master). All of us at Hasura :heart: what you did. 43 | 44 | Thanks again :rocket:`; 45 | }; 46 | 47 | const depGraphHelpMessage = `Available commands: 48 | 49 | \`/dep-graph help\`: Display this help message 50 | 51 | \`/dep-graph server\`: Comment dependency graph for changes in server codebase 52 | 53 | \`/dep-graph pro-server\`: Comment dependency graph for changes in pro server codebase 54 | 55 | \`/dep-graph all\`: Comment dependency graph for changes in all supported codebases 56 | `; 57 | 58 | export { 59 | prOpened, 60 | prClosed, 61 | prNovalue, 62 | prMerged, 63 | depGraphHelpMessage, 64 | }; 65 | -------------------------------------------------------------------------------- /now.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 2, 3 | "public": true, 4 | "alias": "hasura-github-bot", 5 | "name": "hasura-github-bot", 6 | "builds": [ 7 | {"src": "index.js", "use": "@now/node"} 8 | ], 9 | "env": { 10 | "GITHUB_TOKEN": "@hasura-bot-github-commenter-token", 11 | "WEBHOOK_SECRET": "@hasura-bot-github-commenter-webhook-secret" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hasura-github-bot", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@octokit/auth-token": { 8 | "version": "2.4.5", 9 | "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz", 10 | "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==", 11 | "requires": { 12 | "@octokit/types": "^6.0.3" 13 | } 14 | }, 15 | "@octokit/core": { 16 | "version": "3.2.5", 17 | "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.5.tgz", 18 | "integrity": "sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg==", 19 | "requires": { 20 | "@octokit/auth-token": "^2.4.4", 21 | "@octokit/graphql": "^4.5.8", 22 | "@octokit/request": "^5.4.12", 23 | "@octokit/types": "^6.0.3", 24 | "before-after-hook": "^2.1.0", 25 | "universal-user-agent": "^6.0.0" 26 | } 27 | }, 28 | "@octokit/endpoint": { 29 | "version": "6.0.11", 30 | "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.11.tgz", 31 | "integrity": "sha512-fUIPpx+pZyoLW4GCs3yMnlj2LfoXTWDUVPTC4V3MUEKZm48W+XYpeWSZCv+vYF1ZABUm2CqnDVf1sFtIYrj7KQ==", 32 | "requires": { 33 | "@octokit/types": "^6.0.3", 34 | "is-plain-object": "^5.0.0", 35 | "universal-user-agent": "^6.0.0" 36 | } 37 | }, 38 | "@octokit/graphql": { 39 | "version": "4.6.0", 40 | "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.0.tgz", 41 | "integrity": "sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ==", 42 | "requires": { 43 | "@octokit/request": "^5.3.0", 44 | "@octokit/types": "^6.0.3", 45 | "universal-user-agent": "^6.0.0" 46 | } 47 | }, 48 | "@octokit/openapi-types": { 49 | "version": "4.0.0", 50 | "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-4.0.0.tgz", 51 | "integrity": "sha512-o4Q9VPYaIdzxskfVuWk7Dcb6Ldq2xbd1QKmPCRx29nFdFxm+2Py74QLfbB3CgankZerHnNJ9wgINOkwa/O2qRg==" 52 | }, 53 | "@octokit/plugin-paginate-rest": { 54 | "version": "2.9.1", 55 | "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.9.1.tgz", 56 | "integrity": "sha512-8wnuWGjwDIEobbBet2xAjZwgiMVTgIer5wBsnGXzV3lJ4yqphLU2FEMpkhSrDx7y+WkZDfZ+V+1cFMZ1mAaFag==", 57 | "requires": { 58 | "@octokit/types": "^6.8.0" 59 | } 60 | }, 61 | "@octokit/plugin-request-log": { 62 | "version": "1.0.3", 63 | "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz", 64 | "integrity": "sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ==" 65 | }, 66 | "@octokit/plugin-rest-endpoint-methods": { 67 | "version": "4.10.1", 68 | "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.10.1.tgz", 69 | "integrity": "sha512-YGMiEidTORzgUmYZu0eH4q2k8kgQSHQMuBOBYiKxUYs/nXea4q/Ze6tDzjcRAPmHNJYXrENs1bEMlcdGKT+8ug==", 70 | "requires": { 71 | "@octokit/types": "^6.8.2", 72 | "deprecation": "^2.3.1" 73 | } 74 | }, 75 | "@octokit/request": { 76 | "version": "5.4.14", 77 | "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz", 78 | "integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==", 79 | "requires": { 80 | "@octokit/endpoint": "^6.0.1", 81 | "@octokit/request-error": "^2.0.0", 82 | "@octokit/types": "^6.7.1", 83 | "deprecation": "^2.0.0", 84 | "is-plain-object": "^5.0.0", 85 | "node-fetch": "^2.6.1", 86 | "once": "^1.4.0", 87 | "universal-user-agent": "^6.0.0" 88 | } 89 | }, 90 | "@octokit/request-error": { 91 | "version": "2.0.5", 92 | "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.5.tgz", 93 | "integrity": "sha512-T/2wcCFyM7SkXzNoyVNWjyVlUwBvW3igM3Btr/eKYiPmucXTtkxt2RBsf6gn3LTzaLSLTQtNmvg+dGsOxQrjZg==", 94 | "requires": { 95 | "@octokit/types": "^6.0.3", 96 | "deprecation": "^2.0.0", 97 | "once": "^1.4.0" 98 | } 99 | }, 100 | "@octokit/rest": { 101 | "version": "18.1.0", 102 | "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.1.0.tgz", 103 | "integrity": "sha512-YQfpTzWV3jdzDPyXQVO54f5I2t1zxk/S53Vbe+Aa5vQj6MdTx6sNEWzmUzUO8lSVowbGOnjcQHzW1A8ATr+/7g==", 104 | "requires": { 105 | "@octokit/core": "^3.2.3", 106 | "@octokit/plugin-paginate-rest": "^2.6.2", 107 | "@octokit/plugin-request-log": "^1.0.2", 108 | "@octokit/plugin-rest-endpoint-methods": "4.10.1" 109 | } 110 | }, 111 | "@octokit/types": { 112 | "version": "6.8.2", 113 | "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.8.2.tgz", 114 | "integrity": "sha512-RpG0NJd7OKSkWptiFhy1xCLkThs5YoDIKM21lEtDmUvSpbaIEfrxzckWLUGDFfF8RydSyngo44gDv8m2hHruUg==", 115 | "requires": { 116 | "@octokit/openapi-types": "^4.0.0", 117 | "@types/node": ">= 8" 118 | } 119 | }, 120 | "@octokit/webhooks": { 121 | "version": "5.4.1", 122 | "resolved": "https://registry.npmjs.org/@octokit/webhooks/-/webhooks-5.4.1.tgz", 123 | "integrity": "sha512-vslTwKYAQY6lFgKIpwEvID+TfKFuKHpLFJ10mdTLjQnG22ywo/T9Kfz0SvIWshtAA0thvndhXeZU0v6cFpAlEQ==", 124 | "requires": { 125 | "buffer-equal-constant-time": "^1.0.1", 126 | "debug": "^4.0.0" 127 | }, 128 | "dependencies": { 129 | "debug": { 130 | "version": "4.3.1", 131 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", 132 | "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", 133 | "requires": { 134 | "ms": "2.1.2" 135 | } 136 | }, 137 | "ms": { 138 | "version": "2.1.2", 139 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 140 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" 141 | } 142 | } 143 | }, 144 | "@sindresorhus/is": { 145 | "version": "0.14.0", 146 | "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", 147 | "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", 148 | "dev": true 149 | }, 150 | "@szmarczak/http-timer": { 151 | "version": "1.1.2", 152 | "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", 153 | "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", 154 | "dev": true, 155 | "requires": { 156 | "defer-to-connect": "^1.0.1" 157 | } 158 | }, 159 | "@types/node": { 160 | "version": "14.14.22", 161 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz", 162 | "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==" 163 | }, 164 | "@vercel/build-utils": { 165 | "version": "2.8.1-canary.0", 166 | "resolved": "https://registry.npmjs.org/@vercel/build-utils/-/build-utils-2.8.1-canary.0.tgz", 167 | "integrity": "sha512-xNC9bsXYkhjkXQ4RMTSUyYh4JPCJIFy7Sr1Gx8mCv9nRc6yu7TqEOeu16oJUO6IeBFS3XyfoKAwCDk7ElVhJfg==", 168 | "dev": true 169 | }, 170 | "@vercel/go": { 171 | "version": "1.1.8", 172 | "resolved": "https://registry.npmjs.org/@vercel/go/-/go-1.1.8.tgz", 173 | "integrity": "sha512-vqW1ALevLbgyIJ5YwJU05BwStWPflyB+tt0Au9Ko00BX3TOdsyzl8CX2ARtMtYW8+qtkn51z2CfasA0mC3D8vA==", 174 | "dev": true 175 | }, 176 | "@vercel/node": { 177 | "version": "1.9.1-canary.0", 178 | "resolved": "https://registry.npmjs.org/@vercel/node/-/node-1.9.1-canary.0.tgz", 179 | "integrity": "sha512-dZUxOuB7YvQIYK7HwhQal0AfPI++NT4fyaWFcH173hK+C4ILlamfmWIWR9v/w0jdbaYb2tuaYPd/4gumAcsyRg==", 180 | "dev": true, 181 | "requires": { 182 | "@types/node": "*", 183 | "ts-node": "8.9.1", 184 | "typescript": "3.9.3" 185 | } 186 | }, 187 | "@vercel/python": { 188 | "version": "1.2.5-canary.1", 189 | "resolved": "https://registry.npmjs.org/@vercel/python/-/python-1.2.5-canary.1.tgz", 190 | "integrity": "sha512-xiITthPmixLaef+XZYNHEDO53EpQUdUUKTNFk9Rt4aePSwniHdIaHkAuLELDM/69LUoPYZiwsI5oeUOXQyr5Kw==", 191 | "dev": true 192 | }, 193 | "@vercel/ruby": { 194 | "version": "1.2.6-canary.0", 195 | "resolved": "https://registry.npmjs.org/@vercel/ruby/-/ruby-1.2.6-canary.0.tgz", 196 | "integrity": "sha512-m9mIcnOrx/mdMUUr7Ns6/Atv82qgNhlhGLKsZOM/AsifqJqsFZB3/5K8MTEkYN36Bf5pjxh3rIWg9KveKuZUSQ==", 197 | "dev": true 198 | }, 199 | "ansi-align": { 200 | "version": "3.0.0", 201 | "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", 202 | "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", 203 | "dev": true, 204 | "requires": { 205 | "string-width": "^3.0.0" 206 | }, 207 | "dependencies": { 208 | "string-width": { 209 | "version": "3.1.0", 210 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", 211 | "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", 212 | "dev": true, 213 | "requires": { 214 | "emoji-regex": "^7.0.1", 215 | "is-fullwidth-code-point": "^2.0.0", 216 | "strip-ansi": "^5.1.0" 217 | } 218 | } 219 | } 220 | }, 221 | "ansi-regex": { 222 | "version": "4.1.0", 223 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", 224 | "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", 225 | "dev": true 226 | }, 227 | "ansi-styles": { 228 | "version": "4.3.0", 229 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 230 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 231 | "dev": true, 232 | "requires": { 233 | "color-convert": "^2.0.1" 234 | } 235 | }, 236 | "arg": { 237 | "version": "4.1.3", 238 | "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", 239 | "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", 240 | "dev": true 241 | }, 242 | "before-after-hook": { 243 | "version": "2.1.1", 244 | "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.1.tgz", 245 | "integrity": "sha512-5ekuQOvO04MDj7kYZJaMab2S8SPjGJbotVNyv7QYFCOAwrGZs/YnoDNlh1U+m5hl7H2D/+n0taaAV/tfyd3KMA==" 246 | }, 247 | "boxen": { 248 | "version": "4.2.0", 249 | "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", 250 | "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", 251 | "dev": true, 252 | "requires": { 253 | "ansi-align": "^3.0.0", 254 | "camelcase": "^5.3.1", 255 | "chalk": "^3.0.0", 256 | "cli-boxes": "^2.2.0", 257 | "string-width": "^4.1.0", 258 | "term-size": "^2.1.0", 259 | "type-fest": "^0.8.1", 260 | "widest-line": "^3.1.0" 261 | } 262 | }, 263 | "buffer-equal-constant-time": { 264 | "version": "1.0.1", 265 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 266 | "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" 267 | }, 268 | "buffer-from": { 269 | "version": "1.1.1", 270 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 271 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", 272 | "dev": true 273 | }, 274 | "cacheable-request": { 275 | "version": "6.1.0", 276 | "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", 277 | "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", 278 | "dev": true, 279 | "requires": { 280 | "clone-response": "^1.0.2", 281 | "get-stream": "^5.1.0", 282 | "http-cache-semantics": "^4.0.0", 283 | "keyv": "^3.0.0", 284 | "lowercase-keys": "^2.0.0", 285 | "normalize-url": "^4.1.0", 286 | "responselike": "^1.0.2" 287 | }, 288 | "dependencies": { 289 | "get-stream": { 290 | "version": "5.2.0", 291 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", 292 | "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", 293 | "dev": true, 294 | "requires": { 295 | "pump": "^3.0.0" 296 | } 297 | }, 298 | "lowercase-keys": { 299 | "version": "2.0.0", 300 | "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", 301 | "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", 302 | "dev": true 303 | } 304 | } 305 | }, 306 | "camelcase": { 307 | "version": "5.3.1", 308 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", 309 | "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", 310 | "dev": true 311 | }, 312 | "chalk": { 313 | "version": "3.0.0", 314 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", 315 | "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", 316 | "dev": true, 317 | "requires": { 318 | "ansi-styles": "^4.1.0", 319 | "supports-color": "^7.1.0" 320 | } 321 | }, 322 | "ci-info": { 323 | "version": "2.0.0", 324 | "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", 325 | "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", 326 | "dev": true 327 | }, 328 | "cli-boxes": { 329 | "version": "2.2.1", 330 | "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", 331 | "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", 332 | "dev": true 333 | }, 334 | "clone-response": { 335 | "version": "1.0.2", 336 | "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", 337 | "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", 338 | "dev": true, 339 | "requires": { 340 | "mimic-response": "^1.0.0" 341 | } 342 | }, 343 | "color-convert": { 344 | "version": "2.0.1", 345 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 346 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 347 | "dev": true, 348 | "requires": { 349 | "color-name": "~1.1.4" 350 | } 351 | }, 352 | "color-name": { 353 | "version": "1.1.4", 354 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 355 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 356 | "dev": true 357 | }, 358 | "configstore": { 359 | "version": "5.0.1", 360 | "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", 361 | "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", 362 | "dev": true, 363 | "requires": { 364 | "dot-prop": "^5.2.0", 365 | "graceful-fs": "^4.1.2", 366 | "make-dir": "^3.0.0", 367 | "unique-string": "^2.0.0", 368 | "write-file-atomic": "^3.0.0", 369 | "xdg-basedir": "^4.0.0" 370 | } 371 | }, 372 | "crypto-random-string": { 373 | "version": "2.0.0", 374 | "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", 375 | "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", 376 | "dev": true 377 | }, 378 | "decompress-response": { 379 | "version": "3.3.0", 380 | "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", 381 | "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", 382 | "dev": true, 383 | "requires": { 384 | "mimic-response": "^1.0.0" 385 | } 386 | }, 387 | "deep-extend": { 388 | "version": "0.6.0", 389 | "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", 390 | "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", 391 | "dev": true 392 | }, 393 | "defer-to-connect": { 394 | "version": "1.1.3", 395 | "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", 396 | "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", 397 | "dev": true 398 | }, 399 | "deprecation": { 400 | "version": "2.3.1", 401 | "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", 402 | "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" 403 | }, 404 | "diff": { 405 | "version": "4.0.2", 406 | "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", 407 | "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", 408 | "dev": true 409 | }, 410 | "dot-prop": { 411 | "version": "5.3.0", 412 | "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", 413 | "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", 414 | "dev": true, 415 | "requires": { 416 | "is-obj": "^2.0.0" 417 | } 418 | }, 419 | "duplexer3": { 420 | "version": "0.1.4", 421 | "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", 422 | "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", 423 | "dev": true 424 | }, 425 | "emoji-regex": { 426 | "version": "7.0.3", 427 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", 428 | "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", 429 | "dev": true 430 | }, 431 | "end-of-stream": { 432 | "version": "1.4.4", 433 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 434 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 435 | "dev": true, 436 | "requires": { 437 | "once": "^1.4.0" 438 | } 439 | }, 440 | "escape-goat": { 441 | "version": "2.1.1", 442 | "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", 443 | "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", 444 | "dev": true 445 | }, 446 | "esm": { 447 | "version": "3.2.25", 448 | "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz", 449 | "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==" 450 | }, 451 | "eventsource": { 452 | "version": "1.0.7", 453 | "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz", 454 | "integrity": "sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ==", 455 | "dev": true, 456 | "requires": { 457 | "original": "^1.0.0" 458 | } 459 | }, 460 | "get-stream": { 461 | "version": "4.1.0", 462 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", 463 | "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", 464 | "dev": true, 465 | "requires": { 466 | "pump": "^3.0.0" 467 | } 468 | }, 469 | "global-dirs": { 470 | "version": "2.1.0", 471 | "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", 472 | "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", 473 | "dev": true, 474 | "requires": { 475 | "ini": "1.3.7" 476 | } 477 | }, 478 | "got": { 479 | "version": "9.6.0", 480 | "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", 481 | "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", 482 | "dev": true, 483 | "requires": { 484 | "@sindresorhus/is": "^0.14.0", 485 | "@szmarczak/http-timer": "^1.1.2", 486 | "cacheable-request": "^6.0.0", 487 | "decompress-response": "^3.3.0", 488 | "duplexer3": "^0.1.4", 489 | "get-stream": "^4.1.0", 490 | "lowercase-keys": "^1.0.1", 491 | "mimic-response": "^1.0.1", 492 | "p-cancelable": "^1.0.0", 493 | "to-readable-stream": "^1.0.0", 494 | "url-parse-lax": "^3.0.0" 495 | } 496 | }, 497 | "graceful-fs": { 498 | "version": "4.2.4", 499 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 500 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", 501 | "dev": true 502 | }, 503 | "has-flag": { 504 | "version": "4.0.0", 505 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 506 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 507 | "dev": true 508 | }, 509 | "has-yarn": { 510 | "version": "2.1.0", 511 | "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", 512 | "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", 513 | "dev": true 514 | }, 515 | "http-cache-semantics": { 516 | "version": "4.1.0", 517 | "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", 518 | "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", 519 | "dev": true 520 | }, 521 | "import-lazy": { 522 | "version": "2.1.0", 523 | "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", 524 | "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", 525 | "dev": true 526 | }, 527 | "imurmurhash": { 528 | "version": "0.1.4", 529 | "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", 530 | "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", 531 | "dev": true 532 | }, 533 | "ini": { 534 | "version": "1.3.7", 535 | "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", 536 | "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", 537 | "dev": true 538 | }, 539 | "is-ci": { 540 | "version": "2.0.0", 541 | "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", 542 | "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", 543 | "dev": true, 544 | "requires": { 545 | "ci-info": "^2.0.0" 546 | } 547 | }, 548 | "is-fullwidth-code-point": { 549 | "version": "2.0.0", 550 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", 551 | "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", 552 | "dev": true 553 | }, 554 | "is-installed-globally": { 555 | "version": "0.3.2", 556 | "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", 557 | "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", 558 | "dev": true, 559 | "requires": { 560 | "global-dirs": "^2.0.1", 561 | "is-path-inside": "^3.0.1" 562 | } 563 | }, 564 | "is-npm": { 565 | "version": "4.0.0", 566 | "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", 567 | "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", 568 | "dev": true 569 | }, 570 | "is-obj": { 571 | "version": "2.0.0", 572 | "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", 573 | "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", 574 | "dev": true 575 | }, 576 | "is-path-inside": { 577 | "version": "3.0.2", 578 | "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", 579 | "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", 580 | "dev": true 581 | }, 582 | "is-plain-object": { 583 | "version": "5.0.0", 584 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", 585 | "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" 586 | }, 587 | "is-typedarray": { 588 | "version": "1.0.0", 589 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 590 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", 591 | "dev": true 592 | }, 593 | "is-yarn-global": { 594 | "version": "0.3.0", 595 | "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", 596 | "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", 597 | "dev": true 598 | }, 599 | "json-buffer": { 600 | "version": "3.0.0", 601 | "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", 602 | "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", 603 | "dev": true 604 | }, 605 | "keyv": { 606 | "version": "3.1.0", 607 | "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", 608 | "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", 609 | "dev": true, 610 | "requires": { 611 | "json-buffer": "3.0.0" 612 | } 613 | }, 614 | "latest-version": { 615 | "version": "5.1.0", 616 | "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", 617 | "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", 618 | "dev": true, 619 | "requires": { 620 | "package-json": "^6.3.0" 621 | } 622 | }, 623 | "lowercase-keys": { 624 | "version": "1.0.1", 625 | "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", 626 | "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", 627 | "dev": true 628 | }, 629 | "make-dir": { 630 | "version": "3.1.0", 631 | "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", 632 | "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", 633 | "dev": true, 634 | "requires": { 635 | "semver": "^6.0.0" 636 | }, 637 | "dependencies": { 638 | "semver": { 639 | "version": "6.3.0", 640 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 641 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 642 | "dev": true 643 | } 644 | } 645 | }, 646 | "make-error": { 647 | "version": "1.3.6", 648 | "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", 649 | "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", 650 | "dev": true 651 | }, 652 | "mimic-response": { 653 | "version": "1.0.1", 654 | "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", 655 | "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", 656 | "dev": true 657 | }, 658 | "minimist": { 659 | "version": "1.2.5", 660 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 661 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", 662 | "dev": true 663 | }, 664 | "node-fetch": { 665 | "version": "2.6.1", 666 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", 667 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" 668 | }, 669 | "normalize-url": { 670 | "version": "4.5.0", 671 | "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", 672 | "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", 673 | "dev": true 674 | }, 675 | "once": { 676 | "version": "1.4.0", 677 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 678 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 679 | "requires": { 680 | "wrappy": "1" 681 | } 682 | }, 683 | "original": { 684 | "version": "1.0.2", 685 | "resolved": "https://registry.npmjs.org/original/-/original-1.0.2.tgz", 686 | "integrity": "sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg==", 687 | "dev": true, 688 | "requires": { 689 | "url-parse": "^1.4.3" 690 | } 691 | }, 692 | "p-cancelable": { 693 | "version": "1.1.0", 694 | "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", 695 | "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", 696 | "dev": true 697 | }, 698 | "package-json": { 699 | "version": "6.5.0", 700 | "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", 701 | "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", 702 | "dev": true, 703 | "requires": { 704 | "got": "^9.6.0", 705 | "registry-auth-token": "^4.0.0", 706 | "registry-url": "^5.0.0", 707 | "semver": "^6.2.0" 708 | }, 709 | "dependencies": { 710 | "semver": { 711 | "version": "6.3.0", 712 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 713 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 714 | "dev": true 715 | } 716 | } 717 | }, 718 | "prepend-http": { 719 | "version": "2.0.0", 720 | "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", 721 | "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", 722 | "dev": true 723 | }, 724 | "pump": { 725 | "version": "3.0.0", 726 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 727 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 728 | "dev": true, 729 | "requires": { 730 | "end-of-stream": "^1.1.0", 731 | "once": "^1.3.1" 732 | } 733 | }, 734 | "pupa": { 735 | "version": "2.1.1", 736 | "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", 737 | "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", 738 | "dev": true, 739 | "requires": { 740 | "escape-goat": "^2.0.0" 741 | } 742 | }, 743 | "querystringify": { 744 | "version": "2.2.0", 745 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", 746 | "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", 747 | "dev": true 748 | }, 749 | "rc": { 750 | "version": "1.2.8", 751 | "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", 752 | "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", 753 | "dev": true, 754 | "requires": { 755 | "deep-extend": "^0.6.0", 756 | "ini": "~1.3.0", 757 | "minimist": "^1.2.0", 758 | "strip-json-comments": "~2.0.1" 759 | } 760 | }, 761 | "registry-auth-token": { 762 | "version": "4.2.1", 763 | "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", 764 | "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", 765 | "dev": true, 766 | "requires": { 767 | "rc": "^1.2.8" 768 | } 769 | }, 770 | "registry-url": { 771 | "version": "5.1.0", 772 | "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", 773 | "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", 774 | "dev": true, 775 | "requires": { 776 | "rc": "^1.2.8" 777 | } 778 | }, 779 | "requires-port": { 780 | "version": "1.0.0", 781 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 782 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", 783 | "dev": true 784 | }, 785 | "responselike": { 786 | "version": "1.0.2", 787 | "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", 788 | "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", 789 | "dev": true, 790 | "requires": { 791 | "lowercase-keys": "^1.0.0" 792 | } 793 | }, 794 | "semver-diff": { 795 | "version": "3.1.1", 796 | "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", 797 | "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", 798 | "dev": true, 799 | "requires": { 800 | "semver": "^6.3.0" 801 | }, 802 | "dependencies": { 803 | "semver": { 804 | "version": "6.3.0", 805 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", 806 | "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", 807 | "dev": true 808 | } 809 | } 810 | }, 811 | "signal-exit": { 812 | "version": "3.0.3", 813 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 814 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", 815 | "dev": true 816 | }, 817 | "source-map": { 818 | "version": "0.6.1", 819 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 820 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 821 | "dev": true 822 | }, 823 | "source-map-support": { 824 | "version": "0.5.19", 825 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", 826 | "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", 827 | "dev": true, 828 | "requires": { 829 | "buffer-from": "^1.0.0", 830 | "source-map": "^0.6.0" 831 | } 832 | }, 833 | "string-width": { 834 | "version": "4.2.0", 835 | "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", 836 | "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", 837 | "dev": true, 838 | "requires": { 839 | "emoji-regex": "^8.0.0", 840 | "is-fullwidth-code-point": "^3.0.0", 841 | "strip-ansi": "^6.0.0" 842 | }, 843 | "dependencies": { 844 | "ansi-regex": { 845 | "version": "5.0.0", 846 | "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", 847 | "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", 848 | "dev": true 849 | }, 850 | "emoji-regex": { 851 | "version": "8.0.0", 852 | "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", 853 | "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", 854 | "dev": true 855 | }, 856 | "is-fullwidth-code-point": { 857 | "version": "3.0.0", 858 | "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", 859 | "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", 860 | "dev": true 861 | }, 862 | "strip-ansi": { 863 | "version": "6.0.0", 864 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", 865 | "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", 866 | "dev": true, 867 | "requires": { 868 | "ansi-regex": "^5.0.0" 869 | } 870 | } 871 | } 872 | }, 873 | "strip-ansi": { 874 | "version": "5.2.0", 875 | "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", 876 | "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", 877 | "dev": true, 878 | "requires": { 879 | "ansi-regex": "^4.1.0" 880 | } 881 | }, 882 | "strip-json-comments": { 883 | "version": "2.0.1", 884 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", 885 | "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", 886 | "dev": true 887 | }, 888 | "supports-color": { 889 | "version": "7.2.0", 890 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 891 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 892 | "dev": true, 893 | "requires": { 894 | "has-flag": "^4.0.0" 895 | } 896 | }, 897 | "term-size": { 898 | "version": "2.2.1", 899 | "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", 900 | "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", 901 | "dev": true 902 | }, 903 | "to-readable-stream": { 904 | "version": "1.0.0", 905 | "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", 906 | "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", 907 | "dev": true 908 | }, 909 | "ts-node": { 910 | "version": "8.9.1", 911 | "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.9.1.tgz", 912 | "integrity": "sha512-yrq6ODsxEFTLz0R3BX2myf0WBCSQh9A+py8PBo1dCzWIOcvisbyH6akNKqDHMgXePF2kir5mm5JXJTH3OUJYOQ==", 913 | "dev": true, 914 | "requires": { 915 | "arg": "^4.1.0", 916 | "diff": "^4.0.1", 917 | "make-error": "^1.1.1", 918 | "source-map-support": "^0.5.17", 919 | "yn": "3.1.1" 920 | } 921 | }, 922 | "type-fest": { 923 | "version": "0.8.1", 924 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", 925 | "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", 926 | "dev": true 927 | }, 928 | "typedarray-to-buffer": { 929 | "version": "3.1.5", 930 | "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", 931 | "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", 932 | "dev": true, 933 | "requires": { 934 | "is-typedarray": "^1.0.0" 935 | } 936 | }, 937 | "typescript": { 938 | "version": "3.9.3", 939 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.3.tgz", 940 | "integrity": "sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==", 941 | "dev": true 942 | }, 943 | "unique-string": { 944 | "version": "2.0.0", 945 | "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", 946 | "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", 947 | "dev": true, 948 | "requires": { 949 | "crypto-random-string": "^2.0.0" 950 | } 951 | }, 952 | "universal-user-agent": { 953 | "version": "6.0.0", 954 | "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", 955 | "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" 956 | }, 957 | "update-notifier": { 958 | "version": "4.1.0", 959 | "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.0.tgz", 960 | "integrity": "sha512-w3doE1qtI0/ZmgeoDoARmI5fjDoT93IfKgEGqm26dGUOh8oNpaSTsGNdYRN/SjOuo10jcJGwkEL3mroKzktkew==", 961 | "dev": true, 962 | "requires": { 963 | "boxen": "^4.2.0", 964 | "chalk": "^3.0.0", 965 | "configstore": "^5.0.1", 966 | "has-yarn": "^2.1.0", 967 | "import-lazy": "^2.1.0", 968 | "is-ci": "^2.0.0", 969 | "is-installed-globally": "^0.3.1", 970 | "is-npm": "^4.0.0", 971 | "is-yarn-global": "^0.3.0", 972 | "latest-version": "^5.0.0", 973 | "pupa": "^2.0.1", 974 | "semver-diff": "^3.1.1", 975 | "xdg-basedir": "^4.0.0" 976 | } 977 | }, 978 | "url-parse": { 979 | "version": "1.4.7", 980 | "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", 981 | "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", 982 | "dev": true, 983 | "requires": { 984 | "querystringify": "^2.1.1", 985 | "requires-port": "^1.0.0" 986 | } 987 | }, 988 | "url-parse-lax": { 989 | "version": "3.0.0", 990 | "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", 991 | "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", 992 | "dev": true, 993 | "requires": { 994 | "prepend-http": "^2.0.0" 995 | } 996 | }, 997 | "vercel": { 998 | "version": "21.2.2", 999 | "resolved": "https://registry.npmjs.org/vercel/-/vercel-21.2.2.tgz", 1000 | "integrity": "sha512-bLg1yY9lsO8JS8QP8i/J/sbsC9oL0RsU/K6Z/OseOScBBlBdVkY3iesEPAZ0ODXcpP6Fw6Jojw73E6K4RWj96A==", 1001 | "dev": true, 1002 | "requires": { 1003 | "@vercel/build-utils": "2.8.1-canary.0", 1004 | "@vercel/go": "1.1.8", 1005 | "@vercel/node": "1.9.1-canary.0", 1006 | "@vercel/python": "1.2.5-canary.1", 1007 | "@vercel/ruby": "1.2.6-canary.0", 1008 | "update-notifier": "4.1.0" 1009 | } 1010 | }, 1011 | "widest-line": { 1012 | "version": "3.1.0", 1013 | "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", 1014 | "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", 1015 | "dev": true, 1016 | "requires": { 1017 | "string-width": "^4.0.0" 1018 | } 1019 | }, 1020 | "wrappy": { 1021 | "version": "1.0.2", 1022 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 1023 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 1024 | }, 1025 | "write-file-atomic": { 1026 | "version": "3.0.3", 1027 | "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", 1028 | "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", 1029 | "dev": true, 1030 | "requires": { 1031 | "imurmurhash": "^0.1.4", 1032 | "is-typedarray": "^1.0.0", 1033 | "signal-exit": "^3.0.2", 1034 | "typedarray-to-buffer": "^3.1.5" 1035 | } 1036 | }, 1037 | "xdg-basedir": { 1038 | "version": "4.0.0", 1039 | "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", 1040 | "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", 1041 | "dev": true 1042 | }, 1043 | "yn": { 1044 | "version": "3.1.1", 1045 | "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", 1046 | "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", 1047 | "dev": true 1048 | } 1049 | } 1050 | } 1051 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hasura-github-bot", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "engines": { 7 | "node": ">=10" 8 | }, 9 | "scripts": { 10 | "test": "echo \"Error: no test specified\" && exit 1", 11 | "start": "node -r esm index.js", 12 | "dev": "vercel dev" 13 | }, 14 | "author": "", 15 | "license": "ISC", 16 | "dependencies": { 17 | "@octokit/rest": "^18.1.0", 18 | "@octokit/webhooks": "^5.0.2", 19 | "node-fetch": "^2.2.0", 20 | "esm": "^3.2.25" 21 | }, 22 | "devDependencies": { 23 | "esm": "^3.2.25", 24 | "eventsource": "^1.0.7", 25 | "vercel": "^21.2.2" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /pull_request.js: -------------------------------------------------------------------------------- 1 | // pull_request.js: all PR related handlers 2 | 3 | import { prOpened, prClosed, prNovalue, prMerged } from './messages'; 4 | import { engineV3WorkflowDispatch, monoRepoWorkflowDispatch } from './github_action'; 5 | 6 | const pullRequestHandler = (octokit) => { 7 | const shadowOssPr = (input) => Promise.all([ 8 | monoRepoWorkflowDispatch(octokit, 'migrate-hge-pr')(input), 9 | engineV3WorkflowDispatch(octokit, 'migrate-hge-pr')(input), 10 | ]); 11 | 12 | return async ({ id, name, payload }) => { 13 | 14 | console.log(`received pull request event: ${id}`); 15 | 16 | // extract relevant information 17 | const {action, number, repository, sender, label} = payload; 18 | const {pull_request: {html_url: prLink, merged, body, labels, user: {login}}} = payload; 19 | 20 | if (repository.name !== 'graphql-engine') { 21 | console.log(`ignoring event as it originated from ${repository.name}`); 22 | return; 23 | } 24 | 25 | if ((action === 'opened') || (action === 'synchronize')) { 26 | // There could be PRs which are shadowed from monorepo to oss repo 27 | // via devbot. Such PRs are identified by a `` prefix. 28 | // Shadowing such PRs is essential to avoid cyclic shadowing. 29 | if (body && !body.startsWith('')) { 30 | await shadowOssPr({ossPrNumber: `${number}`}); 31 | } 32 | } 33 | 34 | let isHasuraOrgMember = false; 35 | try { 36 | let result = await octokit.orgs.checkMembershipForUser({ 37 | org: 'hasura', 38 | username: login 39 | }); 40 | console.log('checking user membership'); 41 | if (result.status === 204 || result.status === 302) { 42 | // establish user is not a hasura org member 43 | console.log(login, 'is a hasura org member'); 44 | isHasuraOrgMember = true; 45 | } 46 | } catch (e) { 47 | if (e.status === 404) { 48 | console.log(login, 'is not a hasura org member'); 49 | } else { 50 | console.error('error while checking for hasura org membership: ', e.toString()); 51 | // cannot reliably do anything, so do nothing 52 | return; 53 | } 54 | } 55 | 56 | // do nothing if the user is a Hasura org member 57 | if(isHasuraOrgMember) { 58 | console.log(`${login} is hasura org member, do nothing`); 59 | return; 60 | } 61 | 62 | // pull_requst opened event (not from hasura) 63 | if (action === 'opened') { 64 | console.log(`${login} opened a pull request, make a welcome comment`); 65 | 66 | // comment on the PR 67 | const result = await octokit.issues.createComment({ 68 | owner: repository.owner.login, 69 | repo: repository.name, 70 | issue_number: number, 71 | body: prOpened(login) 72 | }); 73 | } 74 | 75 | // pull_request closed 76 | if (action === 'closed') { 77 | 78 | // closed by author themselves, do nothing 79 | if (sender.login === login) { 80 | console.log(`author closed the pull request, do nothing`); 81 | return; 82 | } 83 | 84 | let message; 85 | 86 | // pr is closed without invalid label 87 | if (!merged) { 88 | console.log(`pr closed, send a sorry`); 89 | message = prClosed(login); 90 | } 91 | 92 | // pr has an invalid label and closed, reply with novalue comment 93 | if (!merged && hasLabel(labels, 'invalid 🚫')) { 94 | console.log(`pr is closed with invalid label, send a bitter sorry`); 95 | message = prNovalue(login); 96 | } 97 | 98 | // pr is merged 99 | if (merged || hasLabel(labels, 'merged')) { 100 | console.log(`pr is merged, congratulate`); 101 | message = prMerged(login); 102 | } 103 | 104 | // comment with a thank you note 105 | const result = await octokit.issues.createComment({ 106 | owner: repository.owner.login, 107 | repo: repository.name, 108 | issue_number: number, 109 | body: message 110 | }); 111 | } 112 | }; 113 | }; 114 | 115 | const hasLabel = (labels, target) => { 116 | for (let label of labels) { 117 | if (label.name === target) { 118 | return true; 119 | } 120 | } 121 | return false; 122 | }; 123 | 124 | export default pullRequestHandler; 125 | -------------------------------------------------------------------------------- /pull_request_review.js: -------------------------------------------------------------------------------- 1 | import { handleSlashCommands } from './slash_commands'; 2 | 3 | const pullRequestReviewHandler = (octokit) => { 4 | return async ({ id, name, payload }) => { 5 | console.log(`received pull request review event: ${id}`); 6 | 7 | if (payload.action !== 'submitted') { 8 | console.log(`ignoring event as it was triggered by ${payload.action}`); 9 | return; 10 | } 11 | 12 | const {review: {body}, pull_request: {number: prNumber, html_url: prLink}} = payload; 13 | await handleSlashCommands(body, {octokit, prLink, prNumber}); 14 | }; 15 | }; 16 | 17 | export default pullRequestReviewHandler; 18 | -------------------------------------------------------------------------------- /slash_commands.js: -------------------------------------------------------------------------------- 1 | import { monoRepoWorkflowDispatch } from './github_action'; 2 | import { depGraphHelpMessage } from './messages'; 3 | 4 | export const handleSlashCommands = async (message, data) => { 5 | if (!message) { 6 | return; 7 | } 8 | message = message.toUpperCase(); 9 | 10 | const slashCommands = [heroku, changelog, depGraph]; 11 | 12 | for (let slashCommand of slashCommands) { 13 | if (slashCommand.check(message)) { 14 | await slashCommand.handle(message, data); 15 | return; 16 | } 17 | } 18 | console.log('no supported slash command found'); 19 | } 20 | 21 | const slashCommandChecker = (slashCommand) => { 22 | return (message) => { 23 | if (!message) { 24 | return false; 25 | } 26 | return message.toUpperCase().startsWith(slashCommand.toUpperCase()); 27 | } 28 | } 29 | 30 | const subCommandMatcher = (slashCommand, subCommands) => { 31 | return async (message, data) => { 32 | message = message.toUpperCase(); 33 | const subCommand = message.replace(slashCommand.toUpperCase(), '').trim() 34 | const subCommandHandler = subCommands[subCommand.toUpperCase()] 35 | 36 | if (!subCommandHandler) { 37 | console.log('no handler present for subcommand') 38 | return; 39 | } 40 | 41 | await subCommandHandler(data); 42 | } 43 | } 44 | 45 | const heroku = { 46 | slashCommand: '/heroku' 47 | }; 48 | 49 | heroku.check = slashCommandChecker(heroku.slashCommand); 50 | heroku.handle = subCommandMatcher(heroku.slashCommand, { 51 | 'DEPLOY': async ({octokit, prLink}) => { 52 | console.log('triggering heroku deploy'); 53 | const createReviewApp = monoRepoWorkflowDispatch(octokit, 'create-review-app'); 54 | await createReviewApp({prLink}); 55 | }, 56 | 'DELETE': async ({octokit, prLink}) => { 57 | console.log('triggering heroku delete'); 58 | const deleteReviewApp = monoRepoWorkflowDispatch(octokit, 'delete-review-app'); 59 | await deleteReviewApp({prLink}); 60 | } 61 | }); 62 | 63 | const changelog = { 64 | slashCommand: '/changelog', 65 | }; 66 | 67 | changelog.check = slashCommandChecker(changelog.slashCommand); 68 | changelog.handle = subCommandMatcher(changelog.slashCommand, { 69 | 'OK': async ({octokit, prNumber}) => { 70 | console.log('triggering changelog check'); 71 | const checkChangelog = monoRepoWorkflowDispatch(octokit, 'check-changelog'); 72 | await checkChangelog({prNumber: `${prNumber}`}); 73 | } 74 | }); 75 | 76 | const depGraph = { 77 | slashCommand: '/dep-graph' 78 | }; 79 | const commentDepGraphHelpMessage = ({octokit, prLink}) => { 80 | const prLinkRegex = /https:\/\/github.com\/hasura\/(.*)\/pull\/(\d+)/; 81 | const [, repoName, prNumber] = prLink.match(prLinkRegex); 82 | 83 | octokit.issues.createComment({ 84 | owner: 'hasura', 85 | repo: repoName, 86 | issue_number: prNumber, 87 | body: depGraphHelpMessage 88 | }); 89 | } 90 | 91 | depGraph.check = slashCommandChecker(depGraph.slashCommand); 92 | depGraph.handle = subCommandMatcher(depGraph.slashCommand, { 93 | 'SERVER': async ({octokit, prLink}) => { 94 | console.log('commenting dependency graph for server changes'); 95 | const commentDepGraph = monoRepoWorkflowDispatch(octokit, 'comment-dependency-graph'); 96 | await commentDepGraph({ 97 | prLink, 98 | context: 'server' 99 | }); 100 | }, 101 | 'PRO-SERVER': async ({octokit, prLink}) => { 102 | console.log('commenting dependency graph for pro server changes'); 103 | const commentDepGraph = monoRepoWorkflowDispatch(octokit, 'comment-dependency-graph'); 104 | await commentDepGraph({ 105 | prLink, 106 | context: 'pro-server' 107 | }); 108 | }, 109 | 'ALL': async ({octokit, prLink}) => { 110 | console.log('commenting dependency graph for all changes'); 111 | const commentDepGraph = monoRepoWorkflowDispatch(octokit, 'comment-dependency-graph'); 112 | await commentDepGraph({ 113 | prLink, 114 | context: 'all' 115 | }); 116 | }, 117 | '': async ({octokit, prLink}) => { 118 | console.log('commenting help message'); 119 | await commentDepGraphHelpMessage({octokit, prLink}); 120 | }, 121 | 'HELP': async ({octokit, prLink}) => { 122 | console.log('commenting help message'); 123 | await commentDepGraphHelpMessage({octokit, prLink}); 124 | } 125 | }); 126 | -------------------------------------------------------------------------------- /webhooks.js: -------------------------------------------------------------------------------- 1 | import WebhooksApi from '@octokit/webhooks'; 2 | import { Octokit } from '@octokit/rest'; 3 | import fetch from 'node-fetch'; 4 | 5 | import pullRequestHandler from './pull_request'; 6 | import issueCommentHandler from './issue_comment'; 7 | import pullRequestReviewHandler from './pull_request_review'; 8 | 9 | const WEBHOOK_SECRET = process.env['WEBHOOK_SECRET']; 10 | const GITHUB_TOKEN = process.env['GITHUB_TOKEN']; 11 | 12 | const webhooks = new WebhooksApi({ 13 | secret: WEBHOOK_SECRET || 'mysecret' 14 | }); 15 | 16 | const octokit = new Octokit({ 17 | auth: GITHUB_TOKEN, 18 | }); 19 | 20 | webhooks.on('issue_comment', issueCommentHandler(octokit)); 21 | webhooks.on('pull_request', pullRequestHandler(octokit)); 22 | webhooks.on('pull_request_review', pullRequestReviewHandler(octokit)); 23 | 24 | webhooks.on('error', (error) => { 25 | console.log(`Error occured in "${error.event.name} handler: ${error.stack}"`); 26 | }); 27 | 28 | 29 | module.exports = (req, res) => { 30 | if (req.method === 'POST') { 31 | webhooks.verifyAndReceive({ 32 | id: req.headers['x-github-delivery'], 33 | name: req.headers['x-github-event'], 34 | payload: req.body, 35 | signature: req.headers['x-hub-signature'] 36 | }).then(() => { 37 | console.log('handled event'); 38 | return res.status(200).send('OK'); 39 | }, (e) => { 40 | console.error('ERROR: ', e); 41 | return res.status(500).send('ERROR'); 42 | }).catch((e) => { 43 | console.error('EXCEPTION: ', e); 44 | return res.status(500).send('ERROR'); 45 | }); 46 | } else { 47 | return res.status(404).send('Looking for post?'); 48 | } 49 | }; 50 | 51 | --------------------------------------------------------------------------------