├── commit.png ├── action.yml ├── package.json ├── index.js ├── .gitignore ├── README.md └── dist └── licenses.txt /commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nrwl/last-successful-commit-action/HEAD/commit.png -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Last successful commit' 2 | description: 'Get the commit hash of the last successful workflow run on a given branch' 3 | inputs: 4 | branch: # branch to analyze 5 | description: 'Branch to get last successful commit from' 6 | required: true 7 | default: 'main' 8 | github_token: # github token to use 9 | description: 'Your GitHub access token' 10 | required: true 11 | workflow_id: # ID or filename of the workflow 12 | description: 'ID or filename of the workflow' 13 | required: true 14 | outputs: 15 | commit_hash: # hash of the last successful workflow run 16 | description: 'Last successful commit' 17 | runs: 18 | using: 'node12' 19 | main: 'dist/index.js' 20 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "last-successful-commit-action", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "ncc build index.js --license licenses.txt" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/rarmatei/last-successful-commit-action.git" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC", 17 | "bugs": { 18 | "url": "https://github.com/rarmatei/last-successful-commit-action/issues" 19 | }, 20 | "homepage": "https://github.com/rarmatei/last-successful-commit-action#readme", 21 | "dependencies": { 22 | "@actions/core": "^1.2.6", 23 | "@actions/github": "^4.0.0", 24 | "@vercel/ncc": "^0.25.1" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | const core = require("@actions/core"); 2 | const github = require("@actions/github"); 3 | 4 | try { 5 | const octokit = github.getOctokit(core.getInput("github_token")); 6 | const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/"); 7 | octokit.actions 8 | .listWorkflowRuns({ 9 | owner, 10 | repo, 11 | workflow_id: core.getInput("workflow_id"), 12 | status: "success", 13 | branch: core.getInput("branch"), 14 | event: "push", 15 | }) 16 | .then((res) => { 17 | const lastSuccessCommitHash = 18 | res.data.workflow_runs.length > 0 19 | ? res.data.workflow_runs[0].head_commit.id 20 | : ""; 21 | core.setOutput("commit_hash", lastSuccessCommitHash); 22 | }) 23 | .catch((e) => { 24 | core.setFailed(e.message); 25 | }); 26 | } catch (e) { 27 | core.setFailed(e.message); 28 | } 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # Snowpack dependency directory (https://snowpack.dev/) 45 | web_modules/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | .parcel-cache 78 | 79 | # Next.js build output 80 | .next 81 | out 82 | 83 | # Nuxt.js build / generate output 84 | .nuxt 85 | 86 | # Gatsby files 87 | .cache/ 88 | # Comment in the public line in if your project uses Gatsby and not Next.js 89 | # https://nextjs.org/blog/next-9-1#public-directory-support 90 | # public 91 | 92 | # vuepress build output 93 | .vuepress/dist 94 | 95 | # Serverless directories 96 | .serverless/ 97 | 98 | # FuseBox cache 99 | .fusebox/ 100 | 101 | # DynamoDB Local files 102 | .dynamodb/ 103 | 104 | # TernJS port file 105 | .tern-port 106 | .idea/ 107 | 108 | # Stores VSCode versions used for testing VSCode extensions 109 | .vscode-test 110 | 111 | # yarn v2 112 | .yarn/cache 113 | .yarn/unplugged 114 | .yarn/build-state.yml 115 | .yarn/install-state.gz 116 | .pnp.* 117 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > __Warning__ This action has been deprecated in favor of [Nx-Set-Shas](https://github.com/marketplace/actions/nx-set-shas). You can find more details on functionality and ergonomics on the [official repo](https://github.com/nrwl/nx-set-shas) 2 | 3 | # "Last successful commit" action 4 | 5 | This action returns the commit hash when a given workflow was last successful. 6 | 7 | This is especially useful when we have a workflow where we need to know what changed 8 | in on a given branch between two commits, so we can run some tasks on those 9 | changes. 10 | 11 | Scroll down to the **Background** section below for more info around 12 | why this would be useful. 13 | 14 | ## Inputs 15 | 16 | ### `branch` 17 | 18 | **Required** Branch to get last successful commit from. 19 | **Default**: `main` 20 | 21 | ### `github_token` 22 | 23 | **Required** Your GitHub access token (see Usage below). 24 | 25 | ### `workflow_id` 26 | 27 | **Required** ID or filename of the workflow (e.g. `deploy.yml`). 28 | 29 | ## Outputs 30 | 31 | ### `commit_hash` 32 | 33 | Hash of the last successful commit. 34 | 35 | ## Example usage 36 | 37 | ```yaml 38 | name: Deploy Website 39 | 40 | on: 41 | push: 42 | branches: 43 | - main 44 | 45 | jobs: 46 | build: 47 | runs-on: ubuntu-latest 48 | name: Deploying affected apps 49 | steps: 50 | - uses: actions/checkout@v1 51 | - uses: bahmutov/npm-install@v1.4.5 52 | - uses: nrwl/last-successful-commit-action@v1 53 | id: last_successful_commit 54 | with: 55 | branch: 'master' 56 | workflow_id: 'deploy.yml' 57 | github_token: ${{ secrets.GITHUB_TOKEN }} 58 | - run: npm run nx affected -- --target=build --base=${{ steps.last_successful_commit.outputs.commit_hash }} --parallel --configuration=production 59 | ``` 60 | 61 | # Background 62 | 63 | When using a tool like [Nx](https://nx.dev/), for example, it has a feature 64 | where you give it 2 commits, and it calculates [which projects in your repository changed 65 | between those 2 commits](https://nx.dev/latest/angular/tutorial/11-test-affected-projects#step-11-test-affected-projects 66 | ). We can then run a set of tasks (like building or linting) only 67 | on those **affected** projects. 68 | 69 | This makes it easy to set-up a CI system that scales really well with the 70 | continous growth of your repository, as you add more and more projects. 71 | 72 | 73 | ### Problem 74 | 75 | On a CI system that runs on submitted PRs, it's easy to determine what commits to include in the **affected** calculation: 76 | everything between latest `origin/master` and `HEAD-commit-of-my-PRs-branch`. 77 | As that includes all the changes our PR will introduce to `master`. 78 | 79 | But what if we want to set up a continuous deployment system 80 | that, as changes get pushed to `master`, it builds and deploys 81 | only the affected projects? 82 | 83 | What are the `FROM` and `TO` commits in that case? 84 | 85 | They can't be just `HEAD` and `HEAD~1` - as we might push a bunch 86 | of commits into master. We want to include ALL those commits when determining 87 | affected. 88 | 89 | There's also the issue of failures - if a few deployments fail one after 90 | another, that means that we're accumulating a list of affected projects 91 | that are not getting deployed. Anytime we retry the deployment, we want to include 92 | **every commit since the last time we deployed successfully**. That way we ensure 93 | we don't accidentally skip deploying a project that has changed. 94 | 95 | Here's an attempt at demonstrating the problem above: 96 | 97 | ![Failed deployments](./commit.png) 98 | -------------------------------------------------------------------------------- /dist/licenses.txt: -------------------------------------------------------------------------------- 1 | @actions/core 2 | MIT 3 | The MIT License (MIT) 4 | 5 | Copyright 2019 GitHub 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | 13 | @actions/github 14 | MIT 15 | 16 | @actions/http-client 17 | MIT 18 | Actions Http Client for Node.js 19 | 20 | Copyright (c) GitHub, Inc. 21 | 22 | All rights reserved. 23 | 24 | MIT License 25 | 26 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 27 | associated documentation files (the "Software"), to deal in the Software without restriction, 28 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 29 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 30 | subject to the following conditions: 31 | 32 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 33 | 34 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 35 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 36 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 37 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 38 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 39 | 40 | 41 | @octokit/auth-token 42 | MIT 43 | The MIT License 44 | 45 | Copyright (c) 2019 Octokit contributors 46 | 47 | Permission is hereby granted, free of charge, to any person obtaining a copy 48 | of this software and associated documentation files (the "Software"), to deal 49 | in the Software without restriction, including without limitation the rights 50 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 51 | copies of the Software, and to permit persons to whom the Software is 52 | furnished to do so, subject to the following conditions: 53 | 54 | The above copyright notice and this permission notice shall be included in 55 | all copies or substantial portions of the Software. 56 | 57 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 58 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 59 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 60 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 61 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 62 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 63 | THE SOFTWARE. 64 | 65 | 66 | @octokit/core 67 | MIT 68 | The MIT License 69 | 70 | Copyright (c) 2019 Octokit contributors 71 | 72 | Permission is hereby granted, free of charge, to any person obtaining a copy 73 | of this software and associated documentation files (the "Software"), to deal 74 | in the Software without restriction, including without limitation the rights 75 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 76 | copies of the Software, and to permit persons to whom the Software is 77 | furnished to do so, subject to the following conditions: 78 | 79 | The above copyright notice and this permission notice shall be included in 80 | all copies or substantial portions of the Software. 81 | 82 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 83 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 84 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 85 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 86 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 87 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 88 | THE SOFTWARE. 89 | 90 | 91 | @octokit/endpoint 92 | MIT 93 | The MIT License 94 | 95 | Copyright (c) 2018 Octokit contributors 96 | 97 | Permission is hereby granted, free of charge, to any person obtaining a copy 98 | of this software and associated documentation files (the "Software"), to deal 99 | in the Software without restriction, including without limitation the rights 100 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 101 | copies of the Software, and to permit persons to whom the Software is 102 | furnished to do so, subject to the following conditions: 103 | 104 | The above copyright notice and this permission notice shall be included in 105 | all copies or substantial portions of the Software. 106 | 107 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 108 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 109 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 110 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 111 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 112 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 113 | THE SOFTWARE. 114 | 115 | 116 | @octokit/graphql 117 | MIT 118 | The MIT License 119 | 120 | Copyright (c) 2018 Octokit contributors 121 | 122 | Permission is hereby granted, free of charge, to any person obtaining a copy 123 | of this software and associated documentation files (the "Software"), to deal 124 | in the Software without restriction, including without limitation the rights 125 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 126 | copies of the Software, and to permit persons to whom the Software is 127 | furnished to do so, subject to the following conditions: 128 | 129 | The above copyright notice and this permission notice shall be included in 130 | all copies or substantial portions of the Software. 131 | 132 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 133 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 134 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 135 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 136 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 137 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 138 | THE SOFTWARE. 139 | 140 | 141 | @octokit/plugin-paginate-rest 142 | MIT 143 | MIT License Copyright (c) 2019 Octokit contributors 144 | 145 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 146 | 147 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 148 | 149 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 150 | 151 | 152 | @octokit/plugin-rest-endpoint-methods 153 | MIT 154 | MIT License Copyright (c) 2019 Octokit contributors 155 | 156 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 157 | 158 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 159 | 160 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 161 | 162 | 163 | @octokit/request 164 | MIT 165 | The MIT License 166 | 167 | Copyright (c) 2018 Octokit contributors 168 | 169 | Permission is hereby granted, free of charge, to any person obtaining a copy 170 | of this software and associated documentation files (the "Software"), to deal 171 | in the Software without restriction, including without limitation the rights 172 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 173 | copies of the Software, and to permit persons to whom the Software is 174 | furnished to do so, subject to the following conditions: 175 | 176 | The above copyright notice and this permission notice shall be included in 177 | all copies or substantial portions of the Software. 178 | 179 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 180 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 181 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 182 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 183 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 184 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 185 | THE SOFTWARE. 186 | 187 | 188 | @octokit/request-error 189 | MIT 190 | The MIT License 191 | 192 | Copyright (c) 2019 Octokit contributors 193 | 194 | Permission is hereby granted, free of charge, to any person obtaining a copy 195 | of this software and associated documentation files (the "Software"), to deal 196 | in the Software without restriction, including without limitation the rights 197 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 198 | copies of the Software, and to permit persons to whom the Software is 199 | furnished to do so, subject to the following conditions: 200 | 201 | The above copyright notice and this permission notice shall be included in 202 | all copies or substantial portions of the Software. 203 | 204 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 205 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 206 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 207 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 208 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 209 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 210 | THE SOFTWARE. 211 | 212 | 213 | @vercel/ncc 214 | MIT 215 | Copyright 2018 ZEIT, Inc. 216 | 217 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 218 | 219 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 220 | 221 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 222 | 223 | before-after-hook 224 | Apache-2.0 225 | Apache License 226 | Version 2.0, January 2004 227 | http://www.apache.org/licenses/ 228 | 229 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 230 | 231 | 1. Definitions. 232 | 233 | "License" shall mean the terms and conditions for use, reproduction, 234 | and distribution as defined by Sections 1 through 9 of this document. 235 | 236 | "Licensor" shall mean the copyright owner or entity authorized by 237 | the copyright owner that is granting the License. 238 | 239 | "Legal Entity" shall mean the union of the acting entity and all 240 | other entities that control, are controlled by, or are under common 241 | control with that entity. For the purposes of this definition, 242 | "control" means (i) the power, direct or indirect, to cause the 243 | direction or management of such entity, whether by contract or 244 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 245 | outstanding shares, or (iii) beneficial ownership of such entity. 246 | 247 | "You" (or "Your") shall mean an individual or Legal Entity 248 | exercising permissions granted by this License. 249 | 250 | "Source" form shall mean the preferred form for making modifications, 251 | including but not limited to software source code, documentation 252 | source, and configuration files. 253 | 254 | "Object" form shall mean any form resulting from mechanical 255 | transformation or translation of a Source form, including but 256 | not limited to compiled object code, generated documentation, 257 | and conversions to other media types. 258 | 259 | "Work" shall mean the work of authorship, whether in Source or 260 | Object form, made available under the License, as indicated by a 261 | copyright notice that is included in or attached to the work 262 | (an example is provided in the Appendix below). 263 | 264 | "Derivative Works" shall mean any work, whether in Source or Object 265 | form, that is based on (or derived from) the Work and for which the 266 | editorial revisions, annotations, elaborations, or other modifications 267 | represent, as a whole, an original work of authorship. For the purposes 268 | of this License, Derivative Works shall not include works that remain 269 | separable from, or merely link (or bind by name) to the interfaces of, 270 | the Work and Derivative Works thereof. 271 | 272 | "Contribution" shall mean any work of authorship, including 273 | the original version of the Work and any modifications or additions 274 | to that Work or Derivative Works thereof, that is intentionally 275 | submitted to Licensor for inclusion in the Work by the copyright owner 276 | or by an individual or Legal Entity authorized to submit on behalf of 277 | the copyright owner. For the purposes of this definition, "submitted" 278 | means any form of electronic, verbal, or written communication sent 279 | to the Licensor or its representatives, including but not limited to 280 | communication on electronic mailing lists, source code control systems, 281 | and issue tracking systems that are managed by, or on behalf of, the 282 | Licensor for the purpose of discussing and improving the Work, but 283 | excluding communication that is conspicuously marked or otherwise 284 | designated in writing by the copyright owner as "Not a Contribution." 285 | 286 | "Contributor" shall mean Licensor and any individual or Legal Entity 287 | on behalf of whom a Contribution has been received by Licensor and 288 | subsequently incorporated within the Work. 289 | 290 | 2. Grant of Copyright License. Subject to the terms and conditions of 291 | this License, each Contributor hereby grants to You a perpetual, 292 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 293 | copyright license to reproduce, prepare Derivative Works of, 294 | publicly display, publicly perform, sublicense, and distribute the 295 | Work and such Derivative Works in Source or Object form. 296 | 297 | 3. Grant of Patent License. Subject to the terms and conditions of 298 | this License, each Contributor hereby grants to You a perpetual, 299 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 300 | (except as stated in this section) patent license to make, have made, 301 | use, offer to sell, sell, import, and otherwise transfer the Work, 302 | where such license applies only to those patent claims licensable 303 | by such Contributor that are necessarily infringed by their 304 | Contribution(s) alone or by combination of their Contribution(s) 305 | with the Work to which such Contribution(s) was submitted. If You 306 | institute patent litigation against any entity (including a 307 | cross-claim or counterclaim in a lawsuit) alleging that the Work 308 | or a Contribution incorporated within the Work constitutes direct 309 | or contributory patent infringement, then any patent licenses 310 | granted to You under this License for that Work shall terminate 311 | as of the date such litigation is filed. 312 | 313 | 4. Redistribution. You may reproduce and distribute copies of the 314 | Work or Derivative Works thereof in any medium, with or without 315 | modifications, and in Source or Object form, provided that You 316 | meet the following conditions: 317 | 318 | (a) You must give any other recipients of the Work or 319 | Derivative Works a copy of this License; and 320 | 321 | (b) You must cause any modified files to carry prominent notices 322 | stating that You changed the files; and 323 | 324 | (c) You must retain, in the Source form of any Derivative Works 325 | that You distribute, all copyright, patent, trademark, and 326 | attribution notices from the Source form of the Work, 327 | excluding those notices that do not pertain to any part of 328 | the Derivative Works; and 329 | 330 | (d) If the Work includes a "NOTICE" text file as part of its 331 | distribution, then any Derivative Works that You distribute must 332 | include a readable copy of the attribution notices contained 333 | within such NOTICE file, excluding those notices that do not 334 | pertain to any part of the Derivative Works, in at least one 335 | of the following places: within a NOTICE text file distributed 336 | as part of the Derivative Works; within the Source form or 337 | documentation, if provided along with the Derivative Works; or, 338 | within a display generated by the Derivative Works, if and 339 | wherever such third-party notices normally appear. The contents 340 | of the NOTICE file are for informational purposes only and 341 | do not modify the License. You may add Your own attribution 342 | notices within Derivative Works that You distribute, alongside 343 | or as an addendum to the NOTICE text from the Work, provided 344 | that such additional attribution notices cannot be construed 345 | as modifying the License. 346 | 347 | You may add Your own copyright statement to Your modifications and 348 | may provide additional or different license terms and conditions 349 | for use, reproduction, or distribution of Your modifications, or 350 | for any such Derivative Works as a whole, provided Your use, 351 | reproduction, and distribution of the Work otherwise complies with 352 | the conditions stated in this License. 353 | 354 | 5. Submission of Contributions. Unless You explicitly state otherwise, 355 | any Contribution intentionally submitted for inclusion in the Work 356 | by You to the Licensor shall be under the terms and conditions of 357 | this License, without any additional terms or conditions. 358 | Notwithstanding the above, nothing herein shall supersede or modify 359 | the terms of any separate license agreement you may have executed 360 | with Licensor regarding such Contributions. 361 | 362 | 6. Trademarks. This License does not grant permission to use the trade 363 | names, trademarks, service marks, or product names of the Licensor, 364 | except as required for reasonable and customary use in describing the 365 | origin of the Work and reproducing the content of the NOTICE file. 366 | 367 | 7. Disclaimer of Warranty. Unless required by applicable law or 368 | agreed to in writing, Licensor provides the Work (and each 369 | Contributor provides its Contributions) on an "AS IS" BASIS, 370 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 371 | implied, including, without limitation, any warranties or conditions 372 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 373 | PARTICULAR PURPOSE. You are solely responsible for determining the 374 | appropriateness of using or redistributing the Work and assume any 375 | risks associated with Your exercise of permissions under this License. 376 | 377 | 8. Limitation of Liability. In no event and under no legal theory, 378 | whether in tort (including negligence), contract, or otherwise, 379 | unless required by applicable law (such as deliberate and grossly 380 | negligent acts) or agreed to in writing, shall any Contributor be 381 | liable to You for damages, including any direct, indirect, special, 382 | incidental, or consequential damages of any character arising as a 383 | result of this License or out of the use or inability to use the 384 | Work (including but not limited to damages for loss of goodwill, 385 | work stoppage, computer failure or malfunction, or any and all 386 | other commercial damages or losses), even if such Contributor 387 | has been advised of the possibility of such damages. 388 | 389 | 9. Accepting Warranty or Additional Liability. While redistributing 390 | the Work or Derivative Works thereof, You may choose to offer, 391 | and charge a fee for, acceptance of support, warranty, indemnity, 392 | or other liability obligations and/or rights consistent with this 393 | License. However, in accepting such obligations, You may act only 394 | on Your own behalf and on Your sole responsibility, not on behalf 395 | of any other Contributor, and only if You agree to indemnify, 396 | defend, and hold each Contributor harmless for any liability 397 | incurred by, or claims asserted against, such Contributor by reason 398 | of your accepting any such warranty or additional liability. 399 | 400 | END OF TERMS AND CONDITIONS 401 | 402 | APPENDIX: How to apply the Apache License to your work. 403 | 404 | To apply the Apache License to your work, attach the following 405 | boilerplate notice, with the fields enclosed by brackets "{}" 406 | replaced with your own identifying information. (Don't include 407 | the brackets!) The text should be enclosed in the appropriate 408 | comment syntax for the file format. We also recommend that a 409 | file or class name and description of purpose be included on the 410 | same "printed page" as the copyright notice for easier 411 | identification within third-party archives. 412 | 413 | Copyright 2018 Gregor Martynus and other contributors. 414 | 415 | Licensed under the Apache License, Version 2.0 (the "License"); 416 | you may not use this file except in compliance with the License. 417 | You may obtain a copy of the License at 418 | 419 | http://www.apache.org/licenses/LICENSE-2.0 420 | 421 | Unless required by applicable law or agreed to in writing, software 422 | distributed under the License is distributed on an "AS IS" BASIS, 423 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 424 | See the License for the specific language governing permissions and 425 | limitations under the License. 426 | 427 | 428 | deprecation 429 | ISC 430 | The ISC License 431 | 432 | Copyright (c) Gregor Martynus and contributors 433 | 434 | Permission to use, copy, modify, and/or distribute this software for any 435 | purpose with or without fee is hereby granted, provided that the above 436 | copyright notice and this permission notice appear in all copies. 437 | 438 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 439 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 440 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 441 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 442 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 443 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 444 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 445 | 446 | 447 | is-plain-object 448 | MIT 449 | The MIT License (MIT) 450 | 451 | Copyright (c) 2014-2017, Jon Schlinkert. 452 | 453 | Permission is hereby granted, free of charge, to any person obtaining a copy 454 | of this software and associated documentation files (the "Software"), to deal 455 | in the Software without restriction, including without limitation the rights 456 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 457 | copies of the Software, and to permit persons to whom the Software is 458 | furnished to do so, subject to the following conditions: 459 | 460 | The above copyright notice and this permission notice shall be included in 461 | all copies or substantial portions of the Software. 462 | 463 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 464 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 465 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 466 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 467 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 468 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 469 | THE SOFTWARE. 470 | 471 | 472 | node-fetch 473 | MIT 474 | The MIT License (MIT) 475 | 476 | Copyright (c) 2016 David Frank 477 | 478 | Permission is hereby granted, free of charge, to any person obtaining a copy 479 | of this software and associated documentation files (the "Software"), to deal 480 | in the Software without restriction, including without limitation the rights 481 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 482 | copies of the Software, and to permit persons to whom the Software is 483 | furnished to do so, subject to the following conditions: 484 | 485 | The above copyright notice and this permission notice shall be included in all 486 | copies or substantial portions of the Software. 487 | 488 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 489 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 490 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 491 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 492 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 493 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 494 | SOFTWARE. 495 | 496 | 497 | 498 | once 499 | ISC 500 | The ISC License 501 | 502 | Copyright (c) Isaac Z. Schlueter and Contributors 503 | 504 | Permission to use, copy, modify, and/or distribute this software for any 505 | purpose with or without fee is hereby granted, provided that the above 506 | copyright notice and this permission notice appear in all copies. 507 | 508 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 509 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 510 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 511 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 512 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 513 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 514 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 515 | 516 | 517 | tunnel 518 | MIT 519 | The MIT License (MIT) 520 | 521 | Copyright (c) 2012 Koichi Kobayashi 522 | 523 | Permission is hereby granted, free of charge, to any person obtaining a copy 524 | of this software and associated documentation files (the "Software"), to deal 525 | in the Software without restriction, including without limitation the rights 526 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 527 | copies of the Software, and to permit persons to whom the Software is 528 | furnished to do so, subject to the following conditions: 529 | 530 | The above copyright notice and this permission notice shall be included in 531 | all copies or substantial portions of the Software. 532 | 533 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 534 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 535 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 536 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 537 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 538 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 539 | THE SOFTWARE. 540 | 541 | 542 | universal-user-agent 543 | ISC 544 | # [ISC License](https://spdx.org/licenses/ISC) 545 | 546 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 547 | 548 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 549 | 550 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 551 | 552 | 553 | wrappy 554 | ISC 555 | The ISC License 556 | 557 | Copyright (c) Isaac Z. Schlueter and Contributors 558 | 559 | Permission to use, copy, modify, and/or distribute this software for any 560 | purpose with or without fee is hereby granted, provided that the above 561 | copyright notice and this permission notice appear in all copies. 562 | 563 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 564 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 565 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 566 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 567 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 568 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 569 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 570 | --------------------------------------------------------------------------------