├── .github ├── FUNDING.yml ├── dependabot.yml └── workflows │ └── workflow.yml ├── .gitignore ├── .prettierrc.json ├── LICENSE ├── README.md ├── __tests__ └── run.test.ts ├── action.yml ├── dist ├── index.js ├── index.js.map ├── licenses.txt └── sourcemap-register.js ├── docs └── contributors.md ├── jest.config.js ├── lib ├── apt-install-php-ubuntu.sh ├── choco-install-php-windows.ps1 ├── installer.js ├── phpenv-install-php-ubuntu.sh └── setup-php.js ├── package-lock.json ├── package.json ├── src ├── installer.ts └── setup-php.ts └── tsconfig.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [nanasess] 4 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates 5 | 6 | version: 2 7 | updates: 8 | - package-ecosystem: "github-actions" 9 | directory: "/" 10 | schedule: 11 | interval: "weekly" 12 | 13 | - package-ecosystem: "npm" 14 | directory: "/" 15 | schedule: 16 | interval: "weekly" 17 | -------------------------------------------------------------------------------- /.github/workflows/workflow.yml: -------------------------------------------------------------------------------- 1 | ## Rest of the file pulled from https://github.com/actions/setup-python/blob/master/.github/workflows/workflow.yml 2 | name: Main workflow 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags: 8 | - '*' 9 | paths: 10 | - '**' 11 | - '!*.md' 12 | pull_request: 13 | paths: 14 | - '**' 15 | - '!*.md' 16 | jobs: 17 | run: 18 | name: Run 19 | runs-on: ${{ matrix.os }} 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019] 24 | php: ['5.4', '5.5', '5.6', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '7.2.11', '7.2.12', '8.1.9', '8.2', '8.3'] 25 | exclude: 26 | - os: windows-2019 27 | php: 5.4 28 | - os: windows-2022 29 | php: 5.4 30 | - os: windows-2019 31 | php: 7.2.11 32 | - os: windows-2019 33 | php: 8.0 34 | - os: windows-2019 35 | php: 8.2 36 | - os: windows-2022 37 | php: 7.2.11 38 | - os: windows-2022 39 | php: 8.0 40 | - os: windows-2022 41 | php: 8.2 42 | - os: ubuntu-20.04 43 | php: 5.4 44 | - os: ubuntu-20.04 45 | php: 5.5 46 | - os: ubuntu-20.04 47 | php: 7.2.11 48 | - os: ubuntu-20.04 49 | php: 7.2.12 50 | - os: ubuntu-22.04 51 | php: 7.2.11 52 | - os: ubuntu-22.04 53 | php: 7.2.12 54 | - os: ubuntu-24.04 55 | php: 5.4 56 | - os: ubuntu-24.04 57 | php: 5.5 58 | - os: ubuntu-24.04 59 | php: 7.2.11 60 | - os: ubuntu-24.04 61 | php: 7.2.12 62 | 63 | steps: 64 | - name: Checkout 65 | uses: actions/checkout@v4 66 | 67 | - name: npm install 68 | if: startsWith(matrix.os, 'ubuntu') 69 | run: npm install 70 | 71 | # - name: Lint 72 | # if: matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-18.04' 73 | # run: npm run format-check 74 | 75 | - name: npm test 76 | if: startsWith(matrix.os, 'ubuntu') 77 | run: npm test 78 | - if: startsWith(matrix.os, 'ubuntu') 79 | run: rm -rf node_modules 80 | - if: startsWith(matrix.os, 'windows') 81 | run: rm -rf node_modules 82 | shell: bash 83 | - name: Setup PHP 84 | uses: ./ 85 | with: 86 | php-version: ${{ matrix.php}} 87 | 88 | - name: php --version 89 | run: | 90 | php -i 91 | php -m 92 | 93 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Explicitly not ignoring node_modules so that they are included in package downloaded by runner 2 | node_modules/ 3 | __tests__/runner/* 4 | 5 | # Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | lerna-debug.log* 13 | 14 | # Diagnostic reports (https://nodejs.org/api/report.html) 15 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 16 | 17 | # Runtime data 18 | pids 19 | *.pid 20 | *.seed 21 | *.pid.lock 22 | 23 | # Directory for instrumented libs generated by jscoverage/JSCover 24 | lib-cov 25 | 26 | # Coverage directory used by tools like istanbul 27 | coverage 28 | *.lcov 29 | 30 | # nyc test coverage 31 | .nyc_output 32 | 33 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 34 | .grunt 35 | 36 | # Bower dependency directory (https://bower.io/) 37 | bower_components 38 | 39 | # node-waf configuration 40 | .lock-wscript 41 | 42 | # Compiled binary addons (https://nodejs.org/api/addons.html) 43 | build/Release 44 | 45 | # Dependency directories 46 | jspm_packages/ 47 | 48 | # TypeScript v1 declaration files 49 | typings/ 50 | 51 | # TypeScript cache 52 | *.tsbuildinfo 53 | 54 | # Optional npm cache directory 55 | .npm 56 | 57 | # Optional eslint cache 58 | .eslintcache 59 | 60 | # Optional REPL history 61 | .node_repl_history 62 | 63 | # Output of 'npm pack' 64 | *.tgz 65 | 66 | # Yarn Integrity file 67 | .yarn-integrity 68 | 69 | # dotenv environment variables file 70 | .env 71 | .env.test 72 | 73 | # parcel-bundler cache (https://parceljs.org/) 74 | .cache 75 | 76 | # next.js build output 77 | .next 78 | 79 | # nuxt.js build output 80 | .nuxt 81 | 82 | # vuepress build output 83 | .vuepress/dist 84 | 85 | # Serverless directories 86 | .serverless/ 87 | 88 | # FuseBox cache 89 | .fusebox/ 90 | 91 | # DynamoDB Local files 92 | .dynamodb/ 93 | 94 | # PhpStorm 95 | .idea/ 96 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 80, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "trailingComma": "none", 8 | "bracketSpacing": false, 9 | "arrowParens": "avoid", 10 | "parser": "typescript" 11 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2018 GitHub, Inc. and contributors 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # setup-php 2 | 3 |

4 | GitHub Actions status 5 | LICENSE 6 | PHP Versions Supported 7 |

8 | 9 | This action sets up a PHP environment for use in actions by: 10 | 11 | - optionally installing a version of PHP and adding to PATH. 12 | - registering problem matchers for error output 13 | 14 | ## PHP version support 15 | 16 | - 5.4(ubuntu-22.04 or ubuntu-20.04 only) 17 | - 5.5(ubuntu-22.04 or ubuntu-20.04 only) 18 | - 5.6 19 | - 7.0 20 | - 7.1 21 | - 7.2 22 | - 7.3 23 | - 7.4 24 | - 8.0 25 | - 8.1 26 | - 8.2 27 | - 8.3 28 | 29 | *Patch version can also be set. e.g. 7.2.11* 30 | 31 | ## OS/Platform support 32 | 33 | - ubuntu-latest, ubuntu-24.04, ubuntu-22.04 or ubuntu-20.04 34 | - windows-latest, windows-2022 or windows-2019 35 | 36 | # Usage 37 | 38 | See [action.yml](action.yml) 39 | 40 | Basic: 41 | ```yaml 42 | steps: 43 | - uses: actions/checkout@v3 44 | - uses: nanasess/setup-php@v4 45 | with: 46 | php-version: '8.2' 47 | - run: php my_script.php 48 | ``` 49 | 50 | Matrix Testing: 51 | ```yaml 52 | jobs: 53 | build: 54 | runs-on: ${{ matrix.operating-system }} 55 | strategy: 56 | matrix: 57 | operating-system: [ ubuntu-latest, windows-latest ] 58 | php: [ '5.6', '7.1', '7.2', '7.3', '7.4', '7.3.3' ] 59 | name: PHP ${{ matrix.php }} sample 60 | steps: 61 | - uses: actions/checkout@v3 62 | - name: Setup PHP 63 | uses: nanasess/setup-php@v4 64 | with: 65 | php-version: ${{ matrix.php }} 66 | - run: php my_script.php 67 | ``` 68 | 69 | # License 70 | 71 | The scripts and documentation in this project are released under the [MIT License](LICENSE) 72 | 73 | # Contributions 74 | 75 | Contributions are welcome! See [Contributor's Guide](docs/contributors.md) 76 | -------------------------------------------------------------------------------- /__tests__/run.test.ts: -------------------------------------------------------------------------------- 1 | import * as installer from '../src/installer'; 2 | 3 | jest.setTimeout(10000); 4 | describe('example tests', () => { 5 | it('testing', () => { 6 | expect(true).toBe(true); 7 | }); 8 | it('hasPatchVersion tests', () => { 9 | expect(installer.hasPatchVersion('5')).toBe(false); 10 | expect(installer.hasPatchVersion('5.5')).toBe(false); 11 | expect(installer.hasPatchVersion('5.5.5')).toBe(true); 12 | expect(installer.hasPatchVersion('8.2snapshot')).toBe(true); 13 | }); 14 | it('hasAptVersion tests', () => { 15 | expect(installer.hasAptVersion('5')).toBe(false); 16 | expect(installer.hasAptVersion('5.5')).toBe(false); 17 | expect(installer.hasAptVersion('5.5.5')).toBe(false); 18 | expect(installer.hasAptVersion('5.6.40')).toBe(false); 19 | expect(installer.hasAptVersion('5.6')).toBe(true); 20 | expect(installer.hasAptVersion('5.7')).toBe(false); 21 | expect(installer.hasAptVersion('7.0')).toBe(true); 22 | expect(installer.hasAptVersion('7.1')).toBe(true); 23 | expect(installer.hasAptVersion('7.2')).toBe(true); 24 | expect(installer.hasAptVersion('7.3')).toBe(true); 25 | expect(installer.hasAptVersion('7.4')).toBe(true); 26 | expect(installer.hasAptVersion('8.0')).toBe(true); 27 | expect(installer.hasAptVersion('8.1')).toBe(true); 28 | expect(installer.hasAptVersion(new Number('8').toFixed(1))).toBe(true); 29 | expect(installer.hasAptVersion('8.2snapshot')).toBe(false); 30 | expect(installer.hasAptVersion('8.2')).toBe(true); 31 | expect(installer.hasAptVersion('8.3')).toBe(true); 32 | }); 33 | it('convertInstallVersion tests', async () => { 34 | expect(await installer.convertInstallVersion('5')).toBe('5'); 35 | expect(await installer.convertInstallVersion('5.4')).toBe('5.4.45'); 36 | expect(await installer.convertInstallVersion('5.5')).toBe('5.5.38'); 37 | expect(await installer.convertInstallVersion('5.6')).toBe('5.6.40'); 38 | expect(await installer.convertInstallVersion('7')).toBe('7'); 39 | expect(await installer.convertInstallVersion('7.1')).toBe('7.1.33'); 40 | expect(await installer.convertInstallVersion('7.2')).toBe('7.2.34'); 41 | // expect(await installer.convertInstallVersion('7.3')).toBe('7.3.28'); 42 | // expect(await installer.convertInstallVersion('7.4')).toBe('7.4.19'); 43 | // expect(await installer.convertInstallVersion('8.0')).toBe('8.0.6'); 44 | // expect(await installer.convertInstallVersion('8.1')).toBe('8.1.2'); 45 | expect(await installer.convertInstallVersion('7.3.8')).toBe('7.3.8'); 46 | // expect(await installer.convertInstallVersion('8.3')).toBe('8.3.0'); 47 | // expect(await installer.convertInstallVersion('8.2snapshot')).toBe('8.2snapshot'); 48 | }); 49 | }); 50 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Setup PHP environment' 2 | description: 'Setup a PHP environment and add it to the PATH, additionally providing proxy support' 3 | author: 'nanasess' 4 | branding: 5 | color: purple 6 | icon: code 7 | inputs: 8 | php-version: 9 | description: 'Version Spec of the version to use. Examples: 8.1' 10 | default: '8.3' 11 | scope: 12 | description: 'Optional scope for authenticating against scoped registries' 13 | runs: 14 | using: 'node20' 15 | main: 'dist/index.js' 16 | -------------------------------------------------------------------------------- /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/exec 14 | MIT 15 | The MIT License (MIT) 16 | 17 | Copyright 2019 GitHub 18 | 19 | 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: 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 22 | 23 | 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. 24 | 25 | @actions/http-client 26 | MIT 27 | Actions Http Client for Node.js 28 | 29 | Copyright (c) GitHub, Inc. 30 | 31 | All rights reserved. 32 | 33 | MIT License 34 | 35 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 36 | associated documentation files (the "Software"), to deal in the Software without restriction, 37 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 38 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 39 | subject to the following conditions: 40 | 41 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 42 | 43 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 44 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 45 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 46 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 47 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 48 | 49 | 50 | @actions/io 51 | MIT 52 | The MIT License (MIT) 53 | 54 | Copyright 2019 GitHub 55 | 56 | 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: 57 | 58 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 59 | 60 | 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. 61 | 62 | asap 63 | MIT 64 | 65 | Copyright 2009–2014 Contributors. All rights reserved. 66 | 67 | Permission is hereby granted, free of charge, to any person obtaining a copy 68 | of this software and associated documentation files (the "Software"), to 69 | deal in the Software without restriction, including without limitation the 70 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 71 | sell copies of the Software, and to permit persons to whom the Software is 72 | furnished to do so, subject to the following conditions: 73 | 74 | The above copyright notice and this permission notice shall be included in 75 | all copies or substantial portions of the Software. 76 | 77 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 78 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 79 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 80 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 81 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 82 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 83 | IN THE SOFTWARE. 84 | 85 | 86 | 87 | asynckit 88 | MIT 89 | The MIT License (MIT) 90 | 91 | Copyright (c) 2016 Alex Indigo 92 | 93 | Permission is hereby granted, free of charge, to any person obtaining a copy 94 | of this software and associated documentation files (the "Software"), to deal 95 | in the Software without restriction, including without limitation the rights 96 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 97 | copies of the Software, and to permit persons to whom the Software is 98 | furnished to do so, subject to the following conditions: 99 | 100 | The above copyright notice and this permission notice shall be included in all 101 | copies or substantial portions of the Software. 102 | 103 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 104 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 105 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 106 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 107 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 108 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 109 | SOFTWARE. 110 | 111 | 112 | call-bind 113 | MIT 114 | MIT License 115 | 116 | Copyright (c) 2020 Jordan Harband 117 | 118 | Permission is hereby granted, free of charge, to any person obtaining a copy 119 | of this software and associated documentation files (the "Software"), to deal 120 | in the Software without restriction, including without limitation the rights 121 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 122 | copies of the Software, and to permit persons to whom the Software is 123 | furnished to do so, subject to the following conditions: 124 | 125 | The above copyright notice and this permission notice shall be included in all 126 | copies or substantial portions of the Software. 127 | 128 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 129 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 130 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 131 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 132 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 133 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 134 | SOFTWARE. 135 | 136 | 137 | combined-stream 138 | MIT 139 | Copyright (c) 2011 Debuggable Limited 140 | 141 | Permission is hereby granted, free of charge, to any person obtaining a copy 142 | of this software and associated documentation files (the "Software"), to deal 143 | in the Software without restriction, including without limitation the rights 144 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 145 | copies of the Software, and to permit persons to whom the Software is 146 | furnished to do so, subject to the following conditions: 147 | 148 | The above copyright notice and this permission notice shall be included in 149 | all copies or substantial portions of the Software. 150 | 151 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 152 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 153 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 154 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 155 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 156 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 157 | THE SOFTWARE. 158 | 159 | 160 | cookiejar 161 | MIT 162 | The MIT License (MIT) 163 | Copyright (c) 2013 Bradley Meck 164 | 165 | 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: 166 | 167 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 168 | 169 | 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. 170 | 171 | 172 | 173 | debug 174 | MIT 175 | (The MIT License) 176 | 177 | Copyright (c) 2014-2017 TJ Holowaychuk 178 | Copyright (c) 2018-2021 Josh Junon 179 | 180 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 181 | and associated documentation files (the 'Software'), to deal in the Software without restriction, 182 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 183 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 184 | subject to the following conditions: 185 | 186 | The above copyright notice and this permission notice shall be included in all copies or substantial 187 | portions of the Software. 188 | 189 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 190 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 191 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 192 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 193 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 194 | 195 | 196 | 197 | delayed-stream 198 | MIT 199 | Copyright (c) 2011 Debuggable Limited 200 | 201 | Permission is hereby granted, free of charge, to any person obtaining a copy 202 | of this software and associated documentation files (the "Software"), to deal 203 | in the Software without restriction, including without limitation the rights 204 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 205 | copies of the Software, and to permit persons to whom the Software is 206 | furnished to do so, subject to the following conditions: 207 | 208 | The above copyright notice and this permission notice shall be included in 209 | all copies or substantial portions of the Software. 210 | 211 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 212 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 213 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 214 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 215 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 216 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 217 | THE SOFTWARE. 218 | 219 | 220 | dezalgo 221 | ISC 222 | The ISC License 223 | 224 | Copyright (c) Isaac Z. Schlueter and Contributors 225 | 226 | Permission to use, copy, modify, and/or distribute this software for any 227 | purpose with or without fee is hereby granted, provided that the above 228 | copyright notice and this permission notice appear in all copies. 229 | 230 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 231 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 232 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 233 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 234 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 235 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 236 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 237 | 238 | 239 | fast-safe-stringify 240 | MIT 241 | The MIT License (MIT) 242 | 243 | Copyright (c) 2016 David Mark Clements 244 | Copyright (c) 2017 David Mark Clements & Matteo Collina 245 | Copyright (c) 2018 David Mark Clements, Matteo Collina & Ruben Bridgewater 246 | 247 | Permission is hereby granted, free of charge, to any person obtaining a copy 248 | of this software and associated documentation files (the "Software"), to deal 249 | in the Software without restriction, including without limitation the rights 250 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 251 | copies of the Software, and to permit persons to whom the Software is 252 | furnished to do so, subject to the following conditions: 253 | 254 | The above copyright notice and this permission notice shall be included in all 255 | copies or substantial portions of the Software. 256 | 257 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 258 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 259 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 260 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 261 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 262 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 263 | SOFTWARE. 264 | 265 | 266 | form-data 267 | MIT 268 | Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and contributors 269 | 270 | Permission is hereby granted, free of charge, to any person obtaining a copy 271 | of this software and associated documentation files (the "Software"), to deal 272 | in the Software without restriction, including without limitation the rights 273 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 274 | copies of the Software, and to permit persons to whom the Software is 275 | furnished to do so, subject to the following conditions: 276 | 277 | The above copyright notice and this permission notice shall be included in 278 | all copies or substantial portions of the Software. 279 | 280 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 281 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 282 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 283 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 284 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 285 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 286 | THE SOFTWARE. 287 | 288 | 289 | formidable 290 | MIT 291 | The MIT License (MIT) 292 | 293 | Copyright (c) 2011-present Felix Geisendörfer, and contributors. 294 | 295 | Permission is hereby granted, free of charge, to any person obtaining a copy 296 | of this software and associated documentation files (the "Software"), to deal 297 | in the Software without restriction, including without limitation the rights 298 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 299 | copies of the Software, and to permit persons to whom the Software is 300 | furnished to do so, subject to the following conditions: 301 | 302 | The above copyright notice and this permission notice shall be included in all 303 | copies or substantial portions of the Software. 304 | 305 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 306 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 307 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 308 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 309 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 310 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 311 | SOFTWARE. 312 | 313 | 314 | function-bind 315 | MIT 316 | Copyright (c) 2013 Raynos. 317 | 318 | Permission is hereby granted, free of charge, to any person obtaining a copy 319 | of this software and associated documentation files (the "Software"), to deal 320 | in the Software without restriction, including without limitation the rights 321 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 322 | copies of the Software, and to permit persons to whom the Software is 323 | furnished to do so, subject to the following conditions: 324 | 325 | The above copyright notice and this permission notice shall be included in 326 | all copies or substantial portions of the Software. 327 | 328 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 329 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 330 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 331 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 332 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 333 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 334 | THE SOFTWARE. 335 | 336 | 337 | 338 | get-intrinsic 339 | MIT 340 | MIT License 341 | 342 | Copyright (c) 2020 Jordan Harband 343 | 344 | Permission is hereby granted, free of charge, to any person obtaining a copy 345 | of this software and associated documentation files (the "Software"), to deal 346 | in the Software without restriction, including without limitation the rights 347 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 348 | copies of the Software, and to permit persons to whom the Software is 349 | furnished to do so, subject to the following conditions: 350 | 351 | The above copyright notice and this permission notice shall be included in all 352 | copies or substantial portions of the Software. 353 | 354 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 355 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 356 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 357 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 358 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 359 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 360 | SOFTWARE. 361 | 362 | 363 | has 364 | MIT 365 | Copyright (c) 2013 Thiago de Arruda 366 | 367 | Permission is hereby granted, free of charge, to any person 368 | obtaining a copy of this software and associated documentation 369 | files (the "Software"), to deal in the Software without 370 | restriction, including without limitation the rights to use, 371 | copy, modify, merge, publish, distribute, sublicense, and/or sell 372 | copies of the Software, and to permit persons to whom the 373 | Software is furnished to do so, subject to the following 374 | conditions: 375 | 376 | The above copyright notice and this permission notice shall be 377 | included in all copies or substantial portions of the Software. 378 | 379 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 380 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 381 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 382 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 383 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 384 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 385 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 386 | OTHER DEALINGS IN THE SOFTWARE. 387 | 388 | 389 | has-flag 390 | MIT 391 | MIT License 392 | 393 | Copyright (c) Sindre Sorhus (sindresorhus.com) 394 | 395 | 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: 396 | 397 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 398 | 399 | 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. 400 | 401 | 402 | has-symbols 403 | MIT 404 | MIT License 405 | 406 | Copyright (c) 2016 Jordan Harband 407 | 408 | Permission is hereby granted, free of charge, to any person obtaining a copy 409 | of this software and associated documentation files (the "Software"), to deal 410 | in the Software without restriction, including without limitation the rights 411 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 412 | copies of the Software, and to permit persons to whom the Software is 413 | furnished to do so, subject to the following conditions: 414 | 415 | The above copyright notice and this permission notice shall be included in all 416 | copies or substantial portions of the Software. 417 | 418 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 419 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 420 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 421 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 422 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 423 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 424 | SOFTWARE. 425 | 426 | 427 | hexoid 428 | MIT 429 | MIT License 430 | 431 | Copyright (c) Luke Edwards (lukeed.com) 432 | 433 | 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: 434 | 435 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 436 | 437 | 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. 438 | 439 | 440 | lru-cache 441 | ISC 442 | The ISC License 443 | 444 | Copyright (c) Isaac Z. Schlueter and Contributors 445 | 446 | Permission to use, copy, modify, and/or distribute this software for any 447 | purpose with or without fee is hereby granted, provided that the above 448 | copyright notice and this permission notice appear in all copies. 449 | 450 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 451 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 452 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 453 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 454 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 455 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 456 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 457 | 458 | 459 | methods 460 | MIT 461 | (The MIT License) 462 | 463 | Copyright (c) 2013-2014 TJ Holowaychuk 464 | Copyright (c) 2015-2016 Douglas Christopher Wilson 465 | 466 | Permission is hereby granted, free of charge, to any person obtaining 467 | a copy of this software and associated documentation files (the 468 | 'Software'), to deal in the Software without restriction, including 469 | without limitation the rights to use, copy, modify, merge, publish, 470 | distribute, sublicense, and/or sell copies of the Software, and to 471 | permit persons to whom the Software is furnished to do so, subject to 472 | the following conditions: 473 | 474 | The above copyright notice and this permission notice shall be 475 | included in all copies or substantial portions of the Software. 476 | 477 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 478 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 479 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 480 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 481 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 482 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 483 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 484 | 485 | 486 | 487 | mime 488 | MIT 489 | The MIT License (MIT) 490 | 491 | Copyright (c) 2010 Benjamin Thomas, Robert Kieffer 492 | 493 | Permission is hereby granted, free of charge, to any person obtaining a copy 494 | of this software and associated documentation files (the "Software"), to deal 495 | in the Software without restriction, including without limitation the rights 496 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 497 | copies of the Software, and to permit persons to whom the Software is 498 | furnished to do so, subject to the following conditions: 499 | 500 | The above copyright notice and this permission notice shall be included in 501 | all copies or substantial portions of the Software. 502 | 503 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 504 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 505 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 506 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 507 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 508 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 509 | THE SOFTWARE. 510 | 511 | 512 | mime-db 513 | MIT 514 | 515 | The MIT License (MIT) 516 | 517 | Copyright (c) 2014 Jonathan Ong me@jongleberry.com 518 | 519 | Permission is hereby granted, free of charge, to any person obtaining a copy 520 | of this software and associated documentation files (the "Software"), to deal 521 | in the Software without restriction, including without limitation the rights 522 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 523 | copies of the Software, and to permit persons to whom the Software is 524 | furnished to do so, subject to the following conditions: 525 | 526 | The above copyright notice and this permission notice shall be included in 527 | all copies or substantial portions of the Software. 528 | 529 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 530 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 531 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 532 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 533 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 534 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 535 | THE SOFTWARE. 536 | 537 | 538 | mime-types 539 | MIT 540 | (The MIT License) 541 | 542 | Copyright (c) 2014 Jonathan Ong 543 | Copyright (c) 2015 Douglas Christopher Wilson 544 | 545 | Permission is hereby granted, free of charge, to any person obtaining 546 | a copy of this software and associated documentation files (the 547 | 'Software'), to deal in the Software without restriction, including 548 | without limitation the rights to use, copy, modify, merge, publish, 549 | distribute, sublicense, and/or sell copies of the Software, and to 550 | permit persons to whom the Software is furnished to do so, subject to 551 | the following conditions: 552 | 553 | The above copyright notice and this permission notice shall be 554 | included in all copies or substantial portions of the Software. 555 | 556 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 557 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 558 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 559 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 560 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 561 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 562 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 563 | 564 | 565 | ms 566 | MIT 567 | The MIT License (MIT) 568 | 569 | Copyright (c) 2016 Zeit, Inc. 570 | 571 | Permission is hereby granted, free of charge, to any person obtaining a copy 572 | of this software and associated documentation files (the "Software"), to deal 573 | in the Software without restriction, including without limitation the rights 574 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 575 | copies of the Software, and to permit persons to whom the Software is 576 | furnished to do so, subject to the following conditions: 577 | 578 | The above copyright notice and this permission notice shall be included in all 579 | copies or substantial portions of the Software. 580 | 581 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 582 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 583 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 584 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 585 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 586 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 587 | SOFTWARE. 588 | 589 | 590 | object-inspect 591 | MIT 592 | MIT License 593 | 594 | Copyright (c) 2013 James Halliday 595 | 596 | Permission is hereby granted, free of charge, to any person obtaining a copy 597 | of this software and associated documentation files (the "Software"), to deal 598 | in the Software without restriction, including without limitation the rights 599 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 600 | copies of the Software, and to permit persons to whom the Software is 601 | furnished to do so, subject to the following conditions: 602 | 603 | The above copyright notice and this permission notice shall be included in all 604 | copies or substantial portions of the Software. 605 | 606 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 607 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 608 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 609 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 610 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 611 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 612 | SOFTWARE. 613 | 614 | 615 | once 616 | ISC 617 | The ISC License 618 | 619 | Copyright (c) Isaac Z. Schlueter and Contributors 620 | 621 | Permission to use, copy, modify, and/or distribute this software for any 622 | purpose with or without fee is hereby granted, provided that the above 623 | copyright notice and this permission notice appear in all copies. 624 | 625 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 626 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 627 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 628 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 629 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 630 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 631 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 632 | 633 | 634 | qs 635 | BSD-3-Clause 636 | BSD 3-Clause License 637 | 638 | Copyright (c) 2014, Nathan LaFreniere and other [contributors](https://github.com/ljharb/qs/graphs/contributors) 639 | All rights reserved. 640 | 641 | Redistribution and use in source and binary forms, with or without 642 | modification, are permitted provided that the following conditions are met: 643 | 644 | 1. Redistributions of source code must retain the above copyright notice, this 645 | list of conditions and the following disclaimer. 646 | 647 | 2. Redistributions in binary form must reproduce the above copyright notice, 648 | this list of conditions and the following disclaimer in the documentation 649 | and/or other materials provided with the distribution. 650 | 651 | 3. Neither the name of the copyright holder nor the names of its 652 | contributors may be used to endorse or promote products derived from 653 | this software without specific prior written permission. 654 | 655 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 656 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 657 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 658 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 659 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 660 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 661 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 662 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 663 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 664 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 665 | 666 | 667 | semver 668 | ISC 669 | The ISC License 670 | 671 | Copyright (c) Isaac Z. Schlueter and Contributors 672 | 673 | Permission to use, copy, modify, and/or distribute this software for any 674 | purpose with or without fee is hereby granted, provided that the above 675 | copyright notice and this permission notice appear in all copies. 676 | 677 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 678 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 679 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 680 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 681 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 682 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 683 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 684 | 685 | 686 | side-channel 687 | MIT 688 | MIT License 689 | 690 | Copyright (c) 2019 Jordan Harband 691 | 692 | Permission is hereby granted, free of charge, to any person obtaining a copy 693 | of this software and associated documentation files (the "Software"), to deal 694 | in the Software without restriction, including without limitation the rights 695 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 696 | copies of the Software, and to permit persons to whom the Software is 697 | furnished to do so, subject to the following conditions: 698 | 699 | The above copyright notice and this permission notice shall be included in all 700 | copies or substantial portions of the Software. 701 | 702 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 703 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 704 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 705 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 706 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 707 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 708 | SOFTWARE. 709 | 710 | 711 | superagent 712 | MIT 713 | (The MIT License) 714 | 715 | Copyright (c) 2014-2016 TJ Holowaychuk 716 | 717 | Permission is hereby granted, free of charge, to any person obtaining 718 | a copy of this software and associated documentation files (the 719 | 'Software'), to deal in the Software without restriction, including 720 | without limitation the rights to use, copy, modify, merge, publish, 721 | distribute, sublicense, and/or sell copies of the Software, and to 722 | permit persons to whom the Software is furnished to do so, subject to 723 | the following conditions: 724 | 725 | The above copyright notice and this permission notice shall be 726 | included in all copies or substantial portions of the Software. 727 | 728 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 729 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 730 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 731 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 732 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 733 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 734 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 735 | 736 | 737 | supports-color 738 | MIT 739 | MIT License 740 | 741 | Copyright (c) Sindre Sorhus (sindresorhus.com) 742 | 743 | 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: 744 | 745 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 746 | 747 | 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. 748 | 749 | 750 | tunnel 751 | MIT 752 | The MIT License (MIT) 753 | 754 | Copyright (c) 2012 Koichi Kobayashi 755 | 756 | Permission is hereby granted, free of charge, to any person obtaining a copy 757 | of this software and associated documentation files (the "Software"), to deal 758 | in the Software without restriction, including without limitation the rights 759 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 760 | copies of the Software, and to permit persons to whom the Software is 761 | furnished to do so, subject to the following conditions: 762 | 763 | The above copyright notice and this permission notice shall be included in 764 | all copies or substantial portions of the Software. 765 | 766 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 767 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 768 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 769 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 770 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 771 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 772 | THE SOFTWARE. 773 | 774 | 775 | uuid 776 | MIT 777 | The MIT License (MIT) 778 | 779 | Copyright (c) 2010-2020 Robert Kieffer and other contributors 780 | 781 | 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: 782 | 783 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 784 | 785 | 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. 786 | 787 | 788 | wrappy 789 | ISC 790 | The ISC License 791 | 792 | Copyright (c) Isaac Z. Schlueter and Contributors 793 | 794 | Permission to use, copy, modify, and/or distribute this software for any 795 | purpose with or without fee is hereby granted, provided that the above 796 | copyright notice and this permission notice appear in all copies. 797 | 798 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 799 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 800 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 801 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 802 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 803 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 804 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 805 | 806 | 807 | yallist 808 | ISC 809 | The ISC License 810 | 811 | Copyright (c) Isaac Z. Schlueter and Contributors 812 | 813 | Permission to use, copy, modify, and/or distribute this software for any 814 | purpose with or without fee is hereby granted, provided that the above 815 | copyright notice and this permission notice appear in all copies. 816 | 817 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 818 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 819 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 820 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 821 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 822 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 823 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 824 | -------------------------------------------------------------------------------- /dist/sourcemap-register.js: -------------------------------------------------------------------------------- 1 | (()=>{var e={650:e=>{var r=Object.prototype.toString;var n=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(e){return r.call(e).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(e,r,t){r>>>=0;var o=e.byteLength-r;if(o<0){throw new RangeError("'offset' is out of bounds")}if(t===undefined){t=o}else{t>>>=0;if(t>o){throw new RangeError("'length' is out of bounds")}}return n?Buffer.from(e.slice(r,r+t)):new Buffer(new Uint8Array(e.slice(r,r+t)))}function fromString(e,r){if(typeof r!=="string"||r===""){r="utf8"}if(!Buffer.isEncoding(r)){throw new TypeError('"encoding" must be a valid string encoding')}return n?Buffer.from(e,r):new Buffer(e,r)}function bufferFrom(e,r,t){if(typeof e==="number"){throw new TypeError('"value" argument must not be a number')}if(isArrayBuffer(e)){return fromArrayBuffer(e,r,t)}if(typeof e==="string"){return fromString(e,r)}return n?Buffer.from(e):new Buffer(e)}e.exports=bufferFrom},274:(e,r,n)=>{var t=n(339);var o=Object.prototype.hasOwnProperty;var i=typeof Map!=="undefined";function ArraySet(){this._array=[];this._set=i?new Map:Object.create(null)}ArraySet.fromArray=function ArraySet_fromArray(e,r){var n=new ArraySet;for(var t=0,o=e.length;t=0){return r}}else{var n=t.toSetString(e);if(o.call(this._set,n)){return this._set[n]}}throw new Error('"'+e+'" is not in the set.')};ArraySet.prototype.at=function ArraySet_at(e){if(e>=0&&e{var t=n(190);var o=5;var i=1<>1;return r?-n:n}r.encode=function base64VLQ_encode(e){var r="";var n;var i=toVLQSigned(e);do{n=i&a;i>>>=o;if(i>0){n|=u}r+=t.encode(n)}while(i>0);return r};r.decode=function base64VLQ_decode(e,r,n){var i=e.length;var s=0;var l=0;var c,p;do{if(r>=i){throw new Error("Expected more digits in base 64 VLQ value.")}p=t.decode(e.charCodeAt(r++));if(p===-1){throw new Error("Invalid base64 digit: "+e.charAt(r-1))}c=!!(p&u);p&=a;s=s+(p<{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(e){if(0<=e&&e{r.GREATEST_LOWER_BOUND=1;r.LEAST_UPPER_BOUND=2;function recursiveSearch(e,n,t,o,i,a){var u=Math.floor((n-e)/2)+e;var s=i(t,o[u],true);if(s===0){return u}else if(s>0){if(n-u>1){return recursiveSearch(u,n,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return n1){return recursiveSearch(e,u,t,o,i,a)}if(a==r.LEAST_UPPER_BOUND){return u}else{return e<0?-1:e}}}r.search=function search(e,n,t,o){if(n.length===0){return-1}var i=recursiveSearch(-1,n.length,e,n,t,o||r.GREATEST_LOWER_BOUND);if(i<0){return-1}while(i-1>=0){if(t(n[i],n[i-1],true)!==0){break}--i}return i}},680:(e,r,n)=>{var t=n(339);function generatedPositionAfter(e,r){var n=e.generatedLine;var o=r.generatedLine;var i=e.generatedColumn;var a=r.generatedColumn;return o>n||o==n&&a>=i||t.compareByGeneratedPositionsInflated(e,r)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(e,r){this._array.forEach(e,r)};MappingList.prototype.add=function MappingList_add(e){if(generatedPositionAfter(this._last,e)){this._last=e;this._array.push(e)}else{this._sorted=false;this._array.push(e)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(t.compareByGeneratedPositionsInflated);this._sorted=true}return this._array};r.H=MappingList},758:(e,r)=>{function swap(e,r,n){var t=e[r];e[r]=e[n];e[n]=t}function randomIntInRange(e,r){return Math.round(e+Math.random()*(r-e))}function doQuickSort(e,r,n,t){if(n{var t;var o=n(339);var i=n(345);var a=n(274).I;var u=n(449);var s=n(758).U;function SourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}return n.sections!=null?new IndexedSourceMapConsumer(n,r):new BasicSourceMapConsumer(n,r)}SourceMapConsumer.fromSourceMap=function(e,r){return BasicSourceMapConsumer.fromSourceMap(e,r)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{configurable:true,enumerable:true,get:function(){if(!this.__generatedMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{configurable:true,enumerable:true,get:function(){if(!this.__originalMappings){this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._charIsMappingSeparator=function SourceMapConsumer_charIsMappingSeparator(e,r){var n=e.charAt(r);return n===";"||n===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(e,r){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(e,r,n){var t=r||null;var i=n||SourceMapConsumer.GENERATED_ORDER;var a;switch(i){case SourceMapConsumer.GENERATED_ORDER:a=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:a=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;a.map((function(e){var r=e.source===null?null:this._sources.at(e.source);r=o.computeSourceURL(u,r,this._sourceMapURL);return{source:r,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name===null?null:this._names.at(e.name)}}),this).forEach(e,t)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(e){var r=o.getArg(e,"line");var n={source:o.getArg(e,"source"),originalLine:r,originalColumn:o.getArg(e,"column",0)};n.source=this._findSourceIndex(n.source);if(n.source<0){return[]}var t=[];var a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(a>=0){var u=this._originalMappings[a];if(e.column===undefined){var s=u.originalLine;while(u&&u.originalLine===s){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}else{var l=u.originalColumn;while(u&&u.originalLine===r&&u.originalColumn==l){t.push({line:o.getArg(u,"generatedLine",null),column:o.getArg(u,"generatedColumn",null),lastColumn:o.getArg(u,"lastGeneratedColumn",null)});u=this._originalMappings[++a]}}}return t};r.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sources");var u=o.getArg(n,"names",[]);var s=o.getArg(n,"sourceRoot",null);var l=o.getArg(n,"sourcesContent",null);var c=o.getArg(n,"mappings");var p=o.getArg(n,"file",null);if(t!=this._version){throw new Error("Unsupported version: "+t)}if(s){s=o.normalize(s)}i=i.map(String).map(o.normalize).map((function(e){return s&&o.isAbsolute(s)&&o.isAbsolute(e)?o.relative(s,e):e}));this._names=a.fromArray(u.map(String),true);this._sources=a.fromArray(i,true);this._absoluteSources=this._sources.toArray().map((function(e){return o.computeSourceURL(s,e,r)}));this.sourceRoot=s;this.sourcesContent=l;this._mappings=c;this._sourceMapURL=r;this.file=p}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.prototype._findSourceIndex=function(e){var r=e;if(this.sourceRoot!=null){r=o.relative(this.sourceRoot,r)}if(this._sources.has(r)){return this._sources.indexOf(r)}var n;for(n=0;n1){v.source=l+_[1];l+=_[1];v.originalLine=i+_[2];i=v.originalLine;v.originalLine+=1;v.originalColumn=a+_[3];a=v.originalColumn;if(_.length>4){v.name=c+_[4];c+=_[4]}}m.push(v);if(typeof v.originalLine==="number"){d.push(v)}}}s(m,o.compareByGeneratedPositionsDeflated);this.__generatedMappings=m;s(d,o.compareByOriginalPositions);this.__originalMappings=d};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(e,r,n,t,o,a){if(e[n]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+e[n])}if(e[t]<0){throw new TypeError("Column must be greater than or equal to 0, got "+e[t])}return i.search(e,r,o,a)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var e=0;e=0){var t=this._generatedMappings[n];if(t.generatedLine===r.generatedLine){var i=o.getArg(t,"source",null);if(i!==null){i=this._sources.at(i);i=o.computeSourceURL(this.sourceRoot,i,this._sourceMapURL)}var a=o.getArg(t,"name",null);if(a!==null){a=this._names.at(a)}return{source:i,line:o.getArg(t,"originalLine",null),column:o.getArg(t,"originalColumn",null),name:a}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.hasContentsOfAllSources=function BasicSourceMapConsumer_hasContentsOfAllSources(){if(!this.sourcesContent){return false}return this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return e==null}))};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(e,r){if(!this.sourcesContent){return null}var n=this._findSourceIndex(e);if(n>=0){return this.sourcesContent[n]}var t=e;if(this.sourceRoot!=null){t=o.relative(this.sourceRoot,t)}var i;if(this.sourceRoot!=null&&(i=o.urlParse(this.sourceRoot))){var a=t.replace(/^file:\/\//,"");if(i.scheme=="file"&&this._sources.has(a)){return this.sourcesContent[this._sources.indexOf(a)]}if((!i.path||i.path=="/")&&this._sources.has("/"+t)){return this.sourcesContent[this._sources.indexOf("/"+t)]}}if(r){return null}else{throw new Error('"'+t+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(e){var r=o.getArg(e,"source");r=this._findSourceIndex(r);if(r<0){return{line:null,column:null,lastColumn:null}}var n={source:r,originalLine:o.getArg(e,"line"),originalColumn:o.getArg(e,"column")};var t=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",o.compareByOriginalPositions,o.getArg(e,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(t>=0){var i=this._originalMappings[t];if(i.source===n.source){return{line:o.getArg(i,"generatedLine",null),column:o.getArg(i,"generatedColumn",null),lastColumn:o.getArg(i,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};t=BasicSourceMapConsumer;function IndexedSourceMapConsumer(e,r){var n=e;if(typeof e==="string"){n=o.parseSourceMapInput(e)}var t=o.getArg(n,"version");var i=o.getArg(n,"sections");if(t!=this._version){throw new Error("Unsupported version: "+t)}this._sources=new a;this._names=new a;var u={line:-1,column:0};this._sections=i.map((function(e){if(e.url){throw new Error("Support for url field in sections not implemented.")}var n=o.getArg(e,"offset");var t=o.getArg(n,"line");var i=o.getArg(n,"column");if(t{var t=n(449);var o=n(339);var i=n(274).I;var a=n(680).H;function SourceMapGenerator(e){if(!e){e={}}this._file=o.getArg(e,"file",null);this._sourceRoot=o.getArg(e,"sourceRoot",null);this._skipValidation=o.getArg(e,"skipValidation",false);this._sources=new i;this._names=new i;this._mappings=new a;this._sourcesContents=null}SourceMapGenerator.prototype._version=3;SourceMapGenerator.fromSourceMap=function SourceMapGenerator_fromSourceMap(e){var r=e.sourceRoot;var n=new SourceMapGenerator({file:e.file,sourceRoot:r});e.eachMapping((function(e){var t={generated:{line:e.generatedLine,column:e.generatedColumn}};if(e.source!=null){t.source=e.source;if(r!=null){t.source=o.relative(r,t.source)}t.original={line:e.originalLine,column:e.originalColumn};if(e.name!=null){t.name=e.name}}n.addMapping(t)}));e.sources.forEach((function(t){var i=t;if(r!==null){i=o.relative(r,t)}if(!n._sources.has(i)){n._sources.add(i)}var a=e.sourceContentFor(t);if(a!=null){n.setSourceContent(t,a)}}));return n};SourceMapGenerator.prototype.addMapping=function SourceMapGenerator_addMapping(e){var r=o.getArg(e,"generated");var n=o.getArg(e,"original",null);var t=o.getArg(e,"source",null);var i=o.getArg(e,"name",null);if(!this._skipValidation){this._validateMapping(r,n,t,i)}if(t!=null){t=String(t);if(!this._sources.has(t)){this._sources.add(t)}}if(i!=null){i=String(i);if(!this._names.has(i)){this._names.add(i)}}this._mappings.add({generatedLine:r.line,generatedColumn:r.column,originalLine:n!=null&&n.line,originalColumn:n!=null&&n.column,source:t,name:i})};SourceMapGenerator.prototype.setSourceContent=function SourceMapGenerator_setSourceContent(e,r){var n=e;if(this._sourceRoot!=null){n=o.relative(this._sourceRoot,n)}if(r!=null){if(!this._sourcesContents){this._sourcesContents=Object.create(null)}this._sourcesContents[o.toSetString(n)]=r}else if(this._sourcesContents){delete this._sourcesContents[o.toSetString(n)];if(Object.keys(this._sourcesContents).length===0){this._sourcesContents=null}}};SourceMapGenerator.prototype.applySourceMap=function SourceMapGenerator_applySourceMap(e,r,n){var t=r;if(r==null){if(e.file==null){throw new Error("SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, "+'or the source map\'s "file" property. Both were omitted.')}t=e.file}var a=this._sourceRoot;if(a!=null){t=o.relative(a,t)}var u=new i;var s=new i;this._mappings.unsortedForEach((function(r){if(r.source===t&&r.originalLine!=null){var i=e.originalPositionFor({line:r.originalLine,column:r.originalColumn});if(i.source!=null){r.source=i.source;if(n!=null){r.source=o.join(n,r.source)}if(a!=null){r.source=o.relative(a,r.source)}r.originalLine=i.line;r.originalColumn=i.column;if(i.name!=null){r.name=i.name}}}var l=r.source;if(l!=null&&!u.has(l)){u.add(l)}var c=r.name;if(c!=null&&!s.has(c)){s.add(c)}}),this);this._sources=u;this._names=s;e.sources.forEach((function(r){var t=e.sourceContentFor(r);if(t!=null){if(n!=null){r=o.join(n,r)}if(a!=null){r=o.relative(a,r)}this.setSourceContent(r,t)}}),this)};SourceMapGenerator.prototype._validateMapping=function SourceMapGenerator_validateMapping(e,r,n,t){if(r&&typeof r.line!=="number"&&typeof r.column!=="number"){throw new Error("original.line and original.column are not numbers -- you probably meant to omit "+"the original mapping entirely and only map the generated position. If so, pass "+"null for the original mapping instead of an object with empty or null values.")}if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!r&&!n&&!t){return}else if(e&&"line"in e&&"column"in e&&r&&"line"in r&&"column"in r&&e.line>0&&e.column>=0&&r.line>0&&r.column>=0&&n){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:r,name:t}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var e=0;var r=1;var n=0;var i=0;var a=0;var u=0;var s="";var l;var c;var p;var f;var g=this._mappings.toArray();for(var h=0,d=g.length;h0){if(!o.compareByGeneratedPositionsInflated(c,g[h-1])){continue}l+=","}}l+=t.encode(c.generatedColumn-e);e=c.generatedColumn;if(c.source!=null){f=this._sources.indexOf(c.source);l+=t.encode(f-u);u=f;l+=t.encode(c.originalLine-1-i);i=c.originalLine-1;l+=t.encode(c.originalColumn-n);n=c.originalColumn;if(c.name!=null){p=this._names.indexOf(c.name);l+=t.encode(p-a);a=p}}s+=l}return s};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(e,r){return e.map((function(e){if(!this._sourcesContents){return null}if(r!=null){e=o.relative(r,e)}var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){e.file=this._file}if(this._sourceRoot!=null){e.sourceRoot=this._sourceRoot}if(this._sourcesContents){e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)}return e};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};r.h=SourceMapGenerator},351:(e,r,n)=>{var t;var o=n(591).h;var i=n(339);var a=/(\r?\n)/;var u=10;var s="$$$isSourceNode$$$";function SourceNode(e,r,n,t,o){this.children=[];this.sourceContents={};this.line=e==null?null:e;this.column=r==null?null:r;this.source=n==null?null:n;this.name=o==null?null:o;this[s]=true;if(t!=null)this.add(t)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(e,r,n){var t=new SourceNode;var o=e.split(a);var u=0;var shiftNextLine=function(){var e=getNextLine();var r=getNextLine()||"";return e+r;function getNextLine(){return u=0;r--){this.prepend(e[r])}}else if(e[s]||typeof e==="string"){this.children.unshift(e)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e)}return this};SourceNode.prototype.walk=function SourceNode_walk(e){var r;for(var n=0,t=this.children.length;n0){r=[];for(n=0;n{function getArg(e,r,n){if(r in e){return e[r]}else if(arguments.length===3){return n}else{throw new Error('"'+r+'" is a required argument.')}}r.getArg=getArg;var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;var t=/^data:.+\,.+$/;function urlParse(e){var r=e.match(n);if(!r){return null}return{scheme:r[1],auth:r[2],host:r[3],port:r[4],path:r[5]}}r.urlParse=urlParse;function urlGenerate(e){var r="";if(e.scheme){r+=e.scheme+":"}r+="//";if(e.auth){r+=e.auth+"@"}if(e.host){r+=e.host}if(e.port){r+=":"+e.port}if(e.path){r+=e.path}return r}r.urlGenerate=urlGenerate;function normalize(e){var n=e;var t=urlParse(e);if(t){if(!t.path){return e}n=t.path}var o=r.isAbsolute(n);var i=n.split(/\/+/);for(var a,u=0,s=i.length-1;s>=0;s--){a=i[s];if(a==="."){i.splice(s,1)}else if(a===".."){u++}else if(u>0){if(a===""){i.splice(s+1,u);u=0}else{i.splice(s,2);u--}}}n=i.join("/");if(n===""){n=o?"/":"."}if(t){t.path=n;return urlGenerate(t)}return n}r.normalize=normalize;function join(e,r){if(e===""){e="."}if(r===""){r="."}var n=urlParse(r);var o=urlParse(e);if(o){e=o.path||"/"}if(n&&!n.scheme){if(o){n.scheme=o.scheme}return urlGenerate(n)}if(n||r.match(t)){return r}if(o&&!o.host&&!o.path){o.host=r;return urlGenerate(o)}var i=r.charAt(0)==="/"?r:normalize(e.replace(/\/+$/,"")+"/"+r);if(o){o.path=i;return urlGenerate(o)}return i}r.join=join;r.isAbsolute=function(e){return e.charAt(0)==="/"||n.test(e)};function relative(e,r){if(e===""){e="."}e=e.replace(/\/$/,"");var n=0;while(r.indexOf(e+"/")!==0){var t=e.lastIndexOf("/");if(t<0){return r}e=e.slice(0,t);if(e.match(/^([^\/]+:\/)?\/*$/)){return r}++n}return Array(n+1).join("../")+r.substr(e.length+1)}r.relative=relative;var o=function(){var e=Object.create(null);return!("__proto__"in e)}();function identity(e){return e}function toSetString(e){if(isProtoString(e)){return"$"+e}return e}r.toSetString=o?identity:toSetString;function fromSetString(e){if(isProtoString(e)){return e.slice(1)}return e}r.fromSetString=o?identity:fromSetString;function isProtoString(e){if(!e){return false}var r=e.length;if(r<9){return false}if(e.charCodeAt(r-1)!==95||e.charCodeAt(r-2)!==95||e.charCodeAt(r-3)!==111||e.charCodeAt(r-4)!==116||e.charCodeAt(r-5)!==111||e.charCodeAt(r-6)!==114||e.charCodeAt(r-7)!==112||e.charCodeAt(r-8)!==95||e.charCodeAt(r-9)!==95){return false}for(var n=r-10;n>=0;n--){if(e.charCodeAt(n)!==36){return false}}return true}function compareByOriginalPositions(e,r,n){var t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0||n){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0){return t}t=e.generatedLine-r.generatedLine;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByOriginalPositions=compareByOriginalPositions;function compareByGeneratedPositionsDeflated(e,r,n){var t=e.generatedLine-r.generatedLine;if(t!==0){return t}t=e.generatedColumn-r.generatedColumn;if(t!==0||n){return t}t=strcmp(e.source,r.source);if(t!==0){return t}t=e.originalLine-r.originalLine;if(t!==0){return t}t=e.originalColumn-r.originalColumn;if(t!==0){return t}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsDeflated=compareByGeneratedPositionsDeflated;function strcmp(e,r){if(e===r){return 0}if(e===null){return 1}if(r===null){return-1}if(e>r){return 1}return-1}function compareByGeneratedPositionsInflated(e,r){var n=e.generatedLine-r.generatedLine;if(n!==0){return n}n=e.generatedColumn-r.generatedColumn;if(n!==0){return n}n=strcmp(e.source,r.source);if(n!==0){return n}n=e.originalLine-r.originalLine;if(n!==0){return n}n=e.originalColumn-r.originalColumn;if(n!==0){return n}return strcmp(e.name,r.name)}r.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;function parseSourceMapInput(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))}r.parseSourceMapInput=parseSourceMapInput;function computeSourceURL(e,r,n){r=r||"";if(e){if(e[e.length-1]!=="/"&&r[0]!=="/"){e+="/"}r=e+r}if(n){var t=urlParse(n);if(!t){throw new Error("sourceMapURL could not be parsed")}if(t.path){var o=t.path.lastIndexOf("/");if(o>=0){t.path=t.path.substring(0,o+1)}}r=join(urlGenerate(t),r)}return normalize(r)}r.computeSourceURL=computeSourceURL},997:(e,r,n)=>{n(591).h;r.SourceMapConsumer=n(952).SourceMapConsumer;n(351)},284:(e,r,n)=>{e=n.nmd(e);var t=n(997).SourceMapConsumer;var o=n(17);var i;try{i=n(147);if(!i.existsSync||!i.readFileSync){i=null}}catch(e){}var a=n(650);function dynamicRequire(e,r){return e.require(r)}var u=false;var s=false;var l=false;var c="auto";var p={};var f={};var g=/^data:application\/json[^,]+base64,/;var h=[];var d=[];function isInBrowser(){if(c==="browser")return true;if(c==="node")return false;return typeof window!=="undefined"&&typeof XMLHttpRequest==="function"&&!(window.require&&window.module&&window.process&&window.process.type==="renderer")}function hasGlobalProcessEventEmitter(){return typeof process==="object"&&process!==null&&typeof process.on==="function"}function globalProcessVersion(){if(typeof process==="object"&&process!==null){return process.version}else{return""}}function globalProcessStderr(){if(typeof process==="object"&&process!==null){return process.stderr}}function globalProcessExit(e){if(typeof process==="object"&&process!==null&&typeof process.exit==="function"){return process.exit(e)}}function handlerExec(e){return function(r){for(var n=0;n"}var n=this.getLineNumber();if(n!=null){r+=":"+n;var t=this.getColumnNumber();if(t){r+=":"+t}}}var o="";var i=this.getFunctionName();var a=true;var u=this.isConstructor();var s=!(this.isToplevel()||u);if(s){var l=this.getTypeName();if(l==="[object Object]"){l="null"}var c=this.getMethodName();if(i){if(l&&i.indexOf(l)!=0){o+=l+"."}o+=i;if(c&&i.indexOf("."+c)!=i.length-c.length-1){o+=" [as "+c+"]"}}else{o+=l+"."+(c||"")}}else if(u){o+="new "+(i||"")}else if(i){o+=i}else{o+=r;a=false}if(a){o+=" ("+r+")"}return o}function cloneCallSite(e){var r={};Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){r[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]}));r.toString=CallSiteToString;return r}function wrapCallSite(e,r){if(r===undefined){r={nextPosition:null,curPosition:null}}if(e.isNative()){r.curPosition=null;return e}var n=e.getFileName()||e.getScriptNameOrSourceURL();if(n){var t=e.getLineNumber();var o=e.getColumnNumber()-1;var i=/^v(10\.1[6-9]|10\.[2-9][0-9]|10\.[0-9]{3,}|1[2-9]\d*|[2-9]\d|\d{3,}|11\.11)/;var a=i.test(globalProcessVersion())?0:62;if(t===1&&o>a&&!isInBrowser()&&!e.isEval()){o-=a}var u=mapSourcePosition({source:n,line:t,column:o});r.curPosition=u;e=cloneCallSite(e);var s=e.getFunctionName;e.getFunctionName=function(){if(r.nextPosition==null){return s()}return r.nextPosition.name||s()};e.getFileName=function(){return u.source};e.getLineNumber=function(){return u.line};e.getColumnNumber=function(){return u.column+1};e.getScriptNameOrSourceURL=function(){return u.source};return e}var l=e.isEval()&&e.getEvalOrigin();if(l){l=mapEvalOrigin(l);e=cloneCallSite(e);e.getEvalOrigin=function(){return l};return e}return e}function prepareStackTrace(e,r){if(l){p={};f={}}var n=e.name||"Error";var t=e.message||"";var o=n+": "+t;var i={nextPosition:null,curPosition:null};var a=[];for(var u=r.length-1;u>=0;u--){a.push("\n at "+wrapCallSite(r[u],i));i.nextPosition=i.curPosition}i.curPosition=i.nextPosition=null;return o+a.reverse().join("")}function getErrorSource(e){var r=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(r){var n=r[1];var t=+r[2];var o=+r[3];var a=p[n];if(!a&&i&&i.existsSync(n)){try{a=i.readFileSync(n,"utf8")}catch(e){a=""}}if(a){var u=a.split(/(?:\r\n|\r|\n)/)[t-1];if(u){return n+":"+t+"\n"+u+"\n"+new Array(o).join(" ")+"^"}}}return null}function printErrorAndExit(e){var r=getErrorSource(e);var n=globalProcessStderr();if(n&&n._handle&&n._handle.setBlocking){n._handle.setBlocking(true)}if(r){console.error();console.error(r)}console.error(e.stack);globalProcessExit(1)}function shimEmitUncaughtException(){var e=process.emit;process.emit=function(r){if(r==="uncaughtException"){var n=arguments[1]&&arguments[1].stack;var t=this.listeners(r).length>0;if(n&&!t){return printErrorAndExit(arguments[1])}}return e.apply(this,arguments)}}var S=h.slice(0);var _=d.slice(0);r.wrapCallSite=wrapCallSite;r.getErrorSource=getErrorSource;r.mapSourcePosition=mapSourcePosition;r.retrieveSourceMap=v;r.install=function(r){r=r||{};if(r.environment){c=r.environment;if(["node","browser","auto"].indexOf(c)===-1){throw new Error("environment "+c+" was unknown. Available options are {auto, browser, node}")}}if(r.retrieveFile){if(r.overrideRetrieveFile){h.length=0}h.unshift(r.retrieveFile)}if(r.retrieveSourceMap){if(r.overrideRetrieveSourceMap){d.length=0}d.unshift(r.retrieveSourceMap)}if(r.hookRequire&&!isInBrowser()){var n=dynamicRequire(e,"module");var t=n.prototype._compile;if(!t.__sourceMapSupport){n.prototype._compile=function(e,r){p[r]=e;f[r]=undefined;return t.call(this,e,r)};n.prototype._compile.__sourceMapSupport=true}}if(!l){l="emptyCacheBetweenOperations"in r?r.emptyCacheBetweenOperations:false}if(!u){u=true;Error.prepareStackTrace=prepareStackTrace}if(!s){var o="handleUncaughtExceptions"in r?r.handleUncaughtExceptions:true;try{var i=dynamicRequire(e,"worker_threads");if(i.isMainThread===false){o=false}}catch(e){}if(o&&hasGlobalProcessEventEmitter()){s=true;shimEmitUncaughtException()}}};r.resetRetrieveHandlers=function(){h.length=0;d.length=0;h=S.slice(0);d=_.slice(0);v=handlerExec(d);m=handlerExec(h)}},147:e=>{"use strict";e.exports=require("fs")},17:e=>{"use strict";e.exports=require("path")}};var r={};function __webpack_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={id:n,loaded:false,exports:{}};var i=true;try{e[n](o,o.exports,__webpack_require__);i=false}finally{if(i)delete r[n]}o.loaded=true;return o.exports}(()=>{__webpack_require__.nmd=e=>{e.paths=[];if(!e.children)e.children=[];return e}})();if(typeof __webpack_require__!=="undefined")__webpack_require__.ab=__dirname+"/";var n={};(()=>{__webpack_require__(284).install()})();module.exports=n})(); -------------------------------------------------------------------------------- /docs/contributors.md: -------------------------------------------------------------------------------- 1 | # Contributors 2 | 3 | ### Checkin 4 | 5 | - Do checkin source (src) 6 | - Do checkin build output (lib) 7 | - Do checkin runtime node_modules 8 | - Do not checkin devDependency node_modules (husky can help see below) 9 | 10 | ### devDependencies 11 | 12 | In order to handle correctly checking in node_modules without devDependencies, we run [Husky](https://github.com/typicode/husky) before each commit. 13 | This step ensures that formatting and checkin rules are followed and that devDependencies are excluded. To make sure Husky runs correctly, please use the following workflow: 14 | 15 | ``` 16 | npm install # installs all devDependencies including Husky 17 | git add abc.ext # Add the files you've changed. This should include files in src, lib, and node_modules (see above) 18 | git commit -m "Informative commit message" # Commit. This will run Husky 19 | ``` 20 | 21 | During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier) as well as pruning out devDependencies using `npm prune --production`. 22 | It will also make sure these changes are appropriately included in your commit (no further work is needed) -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | clearMocks: true, 3 | moduleFileExtensions: ['js', 'ts'], 4 | testEnvironment: 'node', 5 | testMatch: ['**/*.test.ts'], 6 | transform: { 7 | '^.+\\.ts$': 'ts-jest' 8 | }, 9 | verbose: true 10 | } 11 | -------------------------------------------------------------------------------- /lib/apt-install-php-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | release=$(lsb_release -cs) 6 | version=$1 7 | 8 | # Suppression to startup failure 9 | if [ -f /lib/systemd/system/php${version}-fpm.service ] 10 | then 11 | sudo systemctl disable php${version}-fpm 12 | fi 13 | 14 | sudo apt-get update 15 | 16 | if ! command -v apt-fast >/dev/null; then 17 | sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast 18 | trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit 19 | fi 20 | 21 | if [[ $version = '5.6' ]] \ 22 | || [[ `echo "$version >= 8.2" | bc` == 1 ]] \ 23 | || [[ $release = 'noble' && `echo "$version < 8.2" | bc` == 1 ]] \ 24 | || [[ $release = 'jammy' && `echo "$version < 8.1" | bc` == 1 ]] \ 25 | || [[ $release = 'focal' && `echo "$version < 7.4 || $version >= 8.0" | bc` == 1 ]] \ 26 | || [[ $release = 'bionic' && `echo "$version < 7.4 || $version >= 8.0" | bc` == 1 ]] 27 | then 28 | sudo add-apt-repository ppa:ondrej/php 29 | sudo apt-fast install -y build-essential debconf-utils unzip autogen autoconf libtool pkg-config 30 | 31 | sudo apt-fast install -y \ 32 | php${version}-bcmath \ 33 | php${version}-bz2 \ 34 | php${version}-cgi \ 35 | php${version}-cli \ 36 | php${version}-common \ 37 | php${version}-curl \ 38 | php${version}-dba \ 39 | php${version}-enchant \ 40 | php${version}-gd \ 41 | php${version}-mbstring \ 42 | php${version}-mysql \ 43 | php${version}-odbc \ 44 | php${version}-opcache \ 45 | php${version}-pgsql \ 46 | php${version}-readline \ 47 | php${version}-soap \ 48 | php${version}-sqlite3 \ 49 | php${version}-xml \ 50 | php${version}-xsl \ 51 | php${version}-zip 52 | fi 53 | 54 | if [[ $release = 'focal' && `echo "$version < 8.0" | bc` == 1 ]] 55 | then 56 | sudo apt-fast install -y \ 57 | php${version}-json \ 58 | php${version}-xmlrpc 59 | fi 60 | 61 | sudo apt-fast install -y \ 62 | php${version}-dev \ 63 | php${version}-phpdbg \ 64 | php${version}-intl \ 65 | php${version}-xml 66 | 67 | sudo update-alternatives --set php /usr/bin/php${version} 68 | sudo update-alternatives --set phar /usr/bin/phar${version} 69 | sudo update-alternatives --set phpdbg /usr/bin/phpdbg${version} 70 | # sudo update-alternatives --set php-cgi /usr/bin/php-cgi${version} 71 | # sudo update-alternatives --set phar.phar /usr/bin/phar.phar${version} 72 | sudo phpdismod -s cli xdebug 73 | 74 | sudo bash -c 'echo "opcache.enable_cli=1" >> /etc/php/'$version'/cli/conf.d/10-opcache.ini' 75 | sudo bash -c 'echo "apc.enable_cli=1" >> /etc/php/'$version'/cli/conf.d/20-apcu.ini' 76 | 77 | if [[ `echo "$version >= 8.1" | bc` == 1 ]] 78 | then 79 | sudo bash -c 'echo "opcache.enable = 1" >> /etc/php/'$version'/cli/conf.d/10-opcache.ini' 80 | sudo bash -c 'echo "opcache.jit = tracing" >> /etc/php/'$version'/cli/conf.d/10-opcache.ini' 81 | sudo bash -c 'echo "opcache.jit_buffer_size = 128M" >> /etc/php/'$version'/cli/conf.d/10-opcache.ini' 82 | fi 83 | -------------------------------------------------------------------------------- /lib/choco-install-php-windows.ps1: -------------------------------------------------------------------------------- 1 | Param( 2 | [string]$version 3 | ) 4 | 5 | choco install -y php --force --version $version --package-parameters='"/InstallDir:C:\tools\php"""' 6 | 7 | Write-Host "`$LASTEXITCODE = $LASTEXITCODE" 8 | 9 | cd c:\tools\php 10 | copy php.ini-production php.ini 11 | Write-Output extension_dir='C:/tools/php/ext' | Add-Content php.ini -Encoding Default 12 | Write-Output extension=php_intl.dll | Add-Content php.ini -Encoding Default 13 | Write-Output extension=php_fileinfo.dll | Add-Content php.ini -Encoding Default 14 | Write-Output extension=php_openssl.dll | Add-Content php.ini -Encoding Default 15 | Write-Output extension=php_gd2.dll | Add-Content php.ini -Encoding Default 16 | Write-Output extension=php_mbstring.dll | Add-Content php.ini -Encoding Default 17 | Write-Output extension=php_sqlite3.dll | Add-Content php.ini -Encoding Default 18 | Write-Output extension=php_pgsql.dll | Add-Content php.ini -Encoding Default 19 | Write-Output extension=php_mysqli.dll | Add-Content php.ini -Encoding Default 20 | Write-Output extension=php_pdo_sqlite.dll | Add-Content php.ini -Encoding Default 21 | Write-Output extension=php_pdo_mysql.dll | Add-Content php.ini -Encoding Default 22 | Write-Output extension=php_pdo_pgsql.dll | Add-Content php.ini -Encoding Default 23 | Write-Output extension=php_curl.dll | Add-Content php.ini -Encoding Default 24 | 25 | Write-Host "`$LASTEXITCODE = $LASTEXITCODE" 26 | if ($LASTEXITCODE -eq 3010) { 27 | Write-Host "`$LASTEXITCODE is 3010 is reboot a required and will be ignored." 28 | exit 0 29 | } else { 30 | exit $LASTEXITCODE 31 | } 32 | -------------------------------------------------------------------------------- /lib/installer.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 14 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 15 | }) : function(o, v) { 16 | o["default"] = v; 17 | }); 18 | var __importStar = (this && this.__importStar) || function (mod) { 19 | if (mod && mod.__esModule) return mod; 20 | var result = {}; 21 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 22 | __setModuleDefault(result, mod); 23 | return result; 24 | }; 25 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 26 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 27 | return new (P || (P = Promise))(function (resolve, reject) { 28 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 29 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 30 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 31 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 32 | }); 33 | }; 34 | var __importDefault = (this && this.__importDefault) || function (mod) { 35 | return (mod && mod.__esModule) ? mod : { "default": mod }; 36 | }; 37 | Object.defineProperty(exports, "__esModule", { value: true }); 38 | exports.convertInstallVersion = exports.hasPatchVersion = exports.hasAptVersion = exports.installPhp = void 0; 39 | const core = __importStar(require("@actions/core")); 40 | const exec = __importStar(require("@actions/exec")); 41 | const path = __importStar(require("path")); 42 | const semver = __importStar(require("semver")); 43 | const superagent_1 = __importDefault(require("superagent")); 44 | const PHP_RELEASES_URL = 'https://www.php.net/releases/index.php?json=true'; 45 | function installPhp(version) { 46 | return __awaiter(this, void 0, void 0, function* () { 47 | const installVersion = yield convertInstallVersion(version); 48 | core.info(`Installing PHP ${installVersion}`); 49 | if (process.platform === 'linux') { 50 | const hasPatch = hasPatchVersion(version); 51 | core.info(`hasPatchVersion(${version}): ${hasPatch}`); 52 | const hasApt = hasAptVersion(version); 53 | core.info(`hasAptVersion(${version}): ${hasApt}`); 54 | if (!hasPatchVersion(version) && hasAptVersion(version)) { 55 | core.info(`Installing PHP ${version} via apt`); 56 | return yield exec.exec(path.join(__dirname, '../lib', 'apt-install-php-ubuntu.sh'), [new Number(version).toFixed(1)]); 57 | } 58 | else { 59 | core.info(`Installing PHP ${installVersion} via phpenv`); 60 | return yield exec.exec(path.join(__dirname, '../lib', 'phpenv-install-php-ubuntu.sh'), [installVersion]); 61 | } 62 | } 63 | else if (process.platform === 'win32') { 64 | return yield exec.exec('powershell -File ' + 65 | path.join(__dirname, '../lib', 'choco-install-php-windows.ps1 -version ' + installVersion)); 66 | } 67 | // Illegal process.platform 68 | return -1; 69 | }); 70 | } 71 | exports.installPhp = installPhp; 72 | function hasAptVersion(version) { 73 | if (hasPatchVersion(version)) 74 | return false; 75 | const Semver = semver.coerce(version); 76 | if (Semver === null) 77 | return false; 78 | if (Semver.major == 5) { 79 | if (Semver.minor != 6) { 80 | return false; 81 | } 82 | } 83 | return semver.satisfies(Semver.version, '5.6 || <=7.4 || <= 8.3'); 84 | } 85 | exports.hasAptVersion = hasAptVersion; 86 | function hasPatchVersion(version) { 87 | const Semver = semver.coerce(version); 88 | if (Semver === null) 89 | return false; 90 | if (version.endsWith('snapshot')) { 91 | return true; 92 | } 93 | return Semver.version === version; 94 | } 95 | exports.hasPatchVersion = hasPatchVersion; 96 | function convertInstallVersion(version) { 97 | return __awaiter(this, void 0, void 0, function* () { 98 | switch (version) { 99 | case '5': 100 | case '7': 101 | case '8': 102 | return version; 103 | default: 104 | // The last version of PHP7.3.x series in chocolatey is 7.3.30 105 | // see https://community.chocolatey.org/packages/php/7.3.30 106 | if (process.platform === 'win32' && version === '7.3') { 107 | return '7.3.30'; 108 | } 109 | try { 110 | const json = (yield superagent_1.default 111 | .get(`${PHP_RELEASES_URL}&version=${version}`) 112 | .then(response => response.body)); 113 | if (json.version === undefined) { 114 | throw new Error('version is undefined'); 115 | } 116 | return json.version; 117 | } 118 | catch (error) { 119 | switch (version) { 120 | case '5.4': 121 | return '5.4.45'; 122 | case '5.5': 123 | return '5.5.38'; 124 | case '5.6': 125 | return '5.6.40'; 126 | case '7.0': 127 | return '7.0.33'; 128 | case '7.1': 129 | return '7.1.33'; 130 | case '7.2': 131 | return '7.2.34'; 132 | case '7.3': 133 | return '7.3.33'; 134 | case '7.4': 135 | return '7.4.28'; 136 | case '8.0': 137 | return '8.0.16'; 138 | case '8.1': 139 | return '8.1.3'; 140 | case '8.2': 141 | return '8.2.0'; 142 | case '8.3': 143 | return '8.3.0'; 144 | default: 145 | return version; 146 | } 147 | } 148 | } 149 | }); 150 | } 151 | exports.convertInstallVersion = convertInstallVersion; 152 | -------------------------------------------------------------------------------- /lib/phpenv-install-php-ubuntu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -eo pipefail 4 | 5 | release=$(lsb_release -cs) 6 | version=$1 7 | 8 | install_openssl1_0() 9 | { 10 | cd /tmp 11 | curl -L --retry-connrefused --retry 10 --retry-delay 10 --max-time 30 -O https://github.com/openssl/openssl/archive/OpenSSL_1_0_2p.tar.gz 12 | tar xf OpenSSL_1_0_2p.tar.gz 13 | cd openssl-OpenSSL_1_0_2p 14 | ./config -fPIC shared --prefix=/usr/local --openssldir=/usr/local/openssl 15 | make -j $(nproc) 16 | sudo make install 17 | } 18 | 19 | install_postgresql() 20 | { 21 | cd /tmp 22 | curl -L --retry-connrefused --retry 10 --retry-delay 10 --max-time 30 -O https://ftp.postgresql.org/pub/source/v9.6.15/postgresql-9.6.15.tar.bz2 23 | tar xf postgresql-9.6.15.tar.bz2 24 | cd postgresql-9.6.15 25 | ./configure --prefix=/usr/local 26 | make -j $(nproc) 27 | sudo make install 28 | } 29 | 30 | install_ext_openssl() 31 | { 32 | cd $PHP_BUILD_TMPDIR/source/$version/ext/openssl 33 | cp config0.m4 config.m4 34 | $(phpenv root)/versions/${version}/bin/phpize 35 | ./configure --with-php-config=$(phpenv root)/versions/${version}/bin/php-config 36 | make -j $(nproc) 37 | sudo make install 38 | echo "extension=openssl.so" > $(phpenv root)/versions/${version}/etc/conf.d/openssl.ini 39 | } 40 | 41 | git clone https://github.com/phpenv/phpenv.git $HOME/.phpenv 42 | export PATH="$HOME/.phpenv/bin:$PATH" 43 | eval "$(phpenv init -)" 44 | git clone https://github.com/php-build/php-build $(phpenv root)/plugins/php-build 45 | 46 | if ! command -v apt-fast >/dev/null; then 47 | sudo ln -sf /usr/bin/apt-get /usr/bin/apt-fast 48 | trap "sudo rm -f /usr/bin/apt-fast 2>/dev/null" exit 49 | fi 50 | 51 | sudo apt-fast update 52 | 53 | # sudo apt-get purge 'php*' 54 | sudo apt-fast install -y libjpeg-dev re2c libxml2-dev \ 55 | libtidy-dev libxslt1-dev libmcrypt-dev libreadline-dev libfreetype6-dev \ 56 | libonig-dev zlib1g-dev 57 | 58 | if [ $release == 'noble' ] 59 | then 60 | sudo apt-fast install -y libcurl4-openssl-dev libsqlite3-dev libzip-dev 61 | fi 62 | if [ $release == 'bionic' ] 63 | then 64 | sudo apt-fast install -y mysql-client libcurl4-nss-dev 65 | fi 66 | if [ $release == 'focal' ] || [ $release == 'jammy' ] 67 | then 68 | sudo apt-fast install -y libzip-dev libmariadb-dev libfreetype-dev libcurl4-nss-dev 69 | fi 70 | 71 | sudo ln -s /usr/include/x86_64-linux-gnu/curl /usr/local/include/curl 72 | 73 | install_openssl1_0 74 | install_postgresql 75 | 76 | cat < $(phpenv root)/plugins/php-build/share/php-build/default_configure_options 77 | --without-pear 78 | --with-gd 79 | --enable-sockets 80 | --with-jpeg-dir=/usr 81 | --with-png-dir=/usr 82 | --enable-exif 83 | --enable-zip 84 | --with-zlib 85 | --with-zlib-dir=/usr 86 | --with-bz2 87 | --with-kerberos 88 | --enable-soap 89 | --enable-xmlreader 90 | --with-xsl 91 | --with-curl=/usr 92 | --with-tidy 93 | --with-xmlrpc 94 | --enable-sysvsem 95 | --enable-sysvshm 96 | --enable-shmop 97 | --with-mysqli=mysqlnd 98 | --with-pdo-mysql=mysqlnd 99 | --with-pdo-sqlite 100 | --enable-pcntl 101 | --with-readline 102 | --enable-mbstring 103 | --disable-debug 104 | --enable-bcmath 105 | --with-pgsql=/usr/local 106 | --with-pdo-pgsql 107 | EOF 108 | 109 | # Since icu-config and freetype-config were disabled in Ubuntu-20.04 and later, enable the option only in PHP5.6 and later. 110 | error_code=0 111 | dpkg --compare-versions "$version" "lt" "5.6" || error_code=$? 112 | if [ "$error_code" -eq 1 ] 113 | then 114 | echo "--enable-intl" >> $(phpenv root)/plugins/php-build/share/php-build/default_configure_options 115 | echo "--with-freetype-dir=/usr" >> $(phpenv root)/plugins/php-build/share/php-build/default_configure_options 116 | fi 117 | 118 | export PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j$(nproc)" 119 | export PHP_BUILD_KEEP_OBJECT_FILES="on" 120 | export PHP_BUILD_XDEBUG_ENABLE="off" 121 | export PHP_BUILD_TMPDIR=/tmp/php-build 122 | export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 123 | 124 | if [ ! -d "${PHP_BUILD_TMPDIR}/packages" ] 125 | then 126 | mkdir -p ${PHP_BUILD_TMPDIR}/packages 127 | fi 128 | if [ ! -d "${PHP_BUILD_TMPDIR}/source" ] 129 | then 130 | mkdir -p ${PHP_BUILD_TMPDIR}/source 131 | fi 132 | if [ ! -d "${PHP_BUILD_TMPDIR}/source/${version}" ] 133 | then 134 | mkdir -p ${PHP_BUILD_TMPDIR}/source/${version} 135 | fi 136 | 137 | if [[ $version = 8.2snapshot ]] 138 | then 139 | git clone -b PHP-8.2 https://github.com/php/php-src.git ${PHP_BUILD_TMPDIR}/source/${version} 140 | cat ${PHP_BUILD_TMPDIR}/source/${version}/main/php_version.h 141 | else 142 | curl -L --retry-connrefused --retry 10 --retry-delay 10 --max-time 30 -o ${PHP_BUILD_TMPDIR}/packages/php-${version}.tar.bz2 https://www.php.net/distributions/php-${version}.tar.bz2 143 | tar -x --strip-components 1 -f ${PHP_BUILD_TMPDIR}/packages/php-${version}.tar.bz2 -C ${PHP_BUILD_TMPDIR}/source/${version} 144 | fi 145 | 146 | phpenv install -v -s $version 147 | install_ext_openssl 148 | 149 | sudo update-alternatives --install /usr/bin/php php $(phpenv root)/versions/${version}/bin/php 10 150 | sudo update-alternatives --install /usr/bin/phar phar $(phpenv root)/versions/${version}/bin/phar 10 151 | # sudo update-alternatives --install /usr/bin/phpdbg phpdbg $(phpenv root)/versions/${version}/bin/phpdbg 10 152 | sudo update-alternatives --install /usr/bin/php-cgi php-cgi $(phpenv root)/versions/${version}/bin/php-cgi 10 153 | sudo update-alternatives --install /usr/bin/phar.phar phar.phar $(phpenv root)/versions/${version}/bin/phar.phar 10 154 | 155 | sudo update-alternatives --set php $(phpenv root)/versions/${version}/bin/php 156 | sudo update-alternatives --set phar $(phpenv root)/versions/${version}/bin/phar 157 | # sudo update-alternatives --set phpdbg $(phpenv root)/versions/${version}/bin/phpdbg 158 | sudo update-alternatives --set php-cgi $(phpenv root)/versions/${version}/bin/php-cgi 159 | sudo update-alternatives --set phar.phar $(phpenv root)/versions/${version}/bin/phar.phar 160 | 161 | php -i 162 | -------------------------------------------------------------------------------- /lib/setup-php.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { 3 | if (k2 === undefined) k2 = k; 4 | var desc = Object.getOwnPropertyDescriptor(m, k); 5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { 6 | desc = { enumerable: true, get: function() { return m[k]; } }; 7 | } 8 | Object.defineProperty(o, k2, desc); 9 | }) : (function(o, m, k, k2) { 10 | if (k2 === undefined) k2 = k; 11 | o[k2] = m[k]; 12 | })); 13 | var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { 14 | Object.defineProperty(o, "default", { enumerable: true, value: v }); 15 | }) : function(o, v) { 16 | o["default"] = v; 17 | }); 18 | var __importStar = (this && this.__importStar) || function (mod) { 19 | if (mod && mod.__esModule) return mod; 20 | var result = {}; 21 | if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); 22 | __setModuleDefault(result, mod); 23 | return result; 24 | }; 25 | var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { 26 | function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } 27 | return new (P || (P = Promise))(function (resolve, reject) { 28 | function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } 29 | function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } 30 | function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } 31 | step((generator = generator.apply(thisArg, _arguments || [])).next()); 32 | }); 33 | }; 34 | Object.defineProperty(exports, "__esModule", { value: true }); 35 | const core = __importStar(require("@actions/core")); 36 | const installer_1 = require("./installer"); 37 | function run() { 38 | return __awaiter(this, void 0, void 0, function* () { 39 | try { 40 | const phpSpec = core.getInput('php-version', { required: true }); 41 | core.info(`Installing PHP ${phpSpec}`); 42 | const exitCode = yield (0, installer_1.installPhp)(phpSpec); 43 | if (exitCode !== 0) { 44 | throw new Error(`An error occurred while installing PHP(Code: ${exitCode}`); 45 | } 46 | } 47 | catch (error) { 48 | if (error instanceof Error) { 49 | core.setFailed(error.message); 50 | } 51 | else { 52 | throw error; 53 | } 54 | } 55 | }); 56 | } 57 | run(); 58 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "setup-php", 3 | "version": "4.0.1", 4 | "private": true, 5 | "description": "setup php action", 6 | "main": "dist/index.js", 7 | "scripts": { 8 | "build": "tsc", 9 | "package": "ncc build --source-map --license licenses.txt", 10 | "format": "prettier --write **/*.ts", 11 | "format-check": "prettier --check **/*.ts", 12 | "test": "jest" 13 | }, 14 | "repository": { 15 | "type": "git", 16 | "url": "git+https://github.com/nanasess/setup-php.git" 17 | }, 18 | "keywords": [ 19 | "actions", 20 | "php", 21 | "setup" 22 | ], 23 | "author": "nanasess", 24 | "license": "MIT", 25 | "dependencies": { 26 | "@actions/core": "^1.10.1", 27 | "@actions/exec": "^1.1.1", 28 | "@actions/github": "^6.0.0", 29 | "@actions/io": "^1.1.3", 30 | "@actions/tool-cache": "^2.0.1", 31 | "@vercel/ncc": "^0.38.1", 32 | "node-notifier": "^10.0.1", 33 | "semver": "^7.6.0", 34 | "superagent": "^10.1.0", 35 | "typed-rest-client": "^1.8.11" 36 | }, 37 | "devDependencies": { 38 | "@types/jest": "^27.4.1", 39 | "@types/node": "^22.7.5", 40 | "@types/semver": "^7.5.8", 41 | "@types/superagent": "^8.1.6", 42 | "@types/yauzl": "^2.10.3", 43 | "husky": "^9.1.6", 44 | "jest": "^27.5.1", 45 | "jest-circus": "^29.7.0", 46 | "minimist": "^1.2.8", 47 | "prettier": "^3.2.5", 48 | "ts-jest": "^27.1.3", 49 | "typescript": "^4.9.5" 50 | }, 51 | "husky": { 52 | "skipCI": true, 53 | "hooks": { 54 | "pre-commit": "npm run build && npm run format", 55 | "post-commit": "npm prune --production && git add node_modules/* && git commit -m \"Husky commit correct node modules\"" 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/installer.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import * as exec from '@actions/exec'; 3 | import * as path from 'path'; 4 | import * as semver from 'semver'; 5 | import superagent from 'superagent'; 6 | 7 | const PHP_RELEASES_URL = 'https://www.php.net/releases/index.php?json=true'; 8 | 9 | export async function installPhp(version: string): Promise { 10 | const installVersion = await convertInstallVersion(version); 11 | 12 | core.info(`Installing PHP ${installVersion}`); 13 | if (process.platform === 'linux') { 14 | const hasPatch = hasPatchVersion(version); 15 | core.info(`hasPatchVersion(${version}): ${hasPatch}`); 16 | const hasApt = hasAptVersion(version); 17 | core.info(`hasAptVersion(${version}): ${hasApt}`); 18 | if (!hasPatchVersion(version) && hasAptVersion(version)) { 19 | core.info(`Installing PHP ${version} via apt`); 20 | return await exec.exec( 21 | path.join(__dirname, '../lib', 'apt-install-php-ubuntu.sh'), 22 | [new Number(version).toFixed(1)] 23 | ); 24 | } else { 25 | core.info(`Installing PHP ${installVersion} via phpenv`); 26 | return await exec.exec( 27 | path.join(__dirname, '../lib', 'phpenv-install-php-ubuntu.sh'), 28 | [installVersion] 29 | ); 30 | } 31 | } else if (process.platform === 'win32') { 32 | return await exec.exec( 33 | 'powershell -File ' + 34 | path.join( 35 | __dirname, 36 | '../lib', 37 | 'choco-install-php-windows.ps1 -version ' + installVersion 38 | ) 39 | ); 40 | } 41 | 42 | // Illegal process.platform 43 | return -1; 44 | } 45 | export function hasAptVersion(version: string): boolean { 46 | if (hasPatchVersion(version)) return false; 47 | const Semver = semver.coerce(version); 48 | if (Semver === null) return false; 49 | if (Semver.major == 5) { 50 | if (Semver.minor != 6) { 51 | return false; 52 | } 53 | } 54 | return semver.satisfies(Semver.version, '5.6 || <=7.4 || <= 8.3'); 55 | } 56 | export function hasPatchVersion(version: string): boolean { 57 | const Semver = semver.coerce(version); 58 | if (Semver === null) return false; 59 | if (version.endsWith('snapshot')) { 60 | return true; 61 | } 62 | return Semver.version === version; 63 | } 64 | type PHPReleaseJson = { 65 | announcement: boolean; 66 | date: string; 67 | source: any; 68 | version: string; 69 | }; 70 | 71 | export async function convertInstallVersion(version: string): Promise { 72 | switch (version) { 73 | case '5': 74 | case '7': 75 | case '8': 76 | return version; 77 | default: 78 | // The last version of PHP7.3.x series in chocolatey is 7.3.30 79 | // see https://community.chocolatey.org/packages/php/7.3.30 80 | if (process.platform === 'win32' && version === '7.3') { 81 | return '7.3.30'; 82 | } 83 | try { 84 | const json = (await superagent 85 | .get(`${PHP_RELEASES_URL}&version=${version}`) 86 | .then(response => response.body)) as PHPReleaseJson; 87 | 88 | if (json.version === undefined) { 89 | throw new Error('version is undefined'); 90 | } 91 | 92 | return json.version; 93 | } catch (error) { 94 | switch (version) { 95 | case '5.4': 96 | return '5.4.45'; 97 | case '5.5': 98 | return '5.5.38'; 99 | case '5.6': 100 | return '5.6.40'; 101 | case '7.0': 102 | return '7.0.33'; 103 | case '7.1': 104 | return '7.1.33'; 105 | case '7.2': 106 | return '7.2.34'; 107 | case '7.3': 108 | return '7.3.33'; 109 | case '7.4': 110 | return '7.4.28'; 111 | case '8.0': 112 | return '8.0.16'; 113 | case '8.1': 114 | return '8.1.3'; 115 | case '8.2': 116 | return '8.2.0'; 117 | case '8.3': 118 | return '8.3.0'; 119 | default: 120 | return version; 121 | } 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /src/setup-php.ts: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core'; 2 | import {installPhp} from './installer'; 3 | 4 | async function run() { 5 | try { 6 | const phpSpec = core.getInput('php-version', {required: true}); 7 | core.info(`Installing PHP ${phpSpec}`); 8 | const exitCode = await installPhp(phpSpec); 9 | if (exitCode !== 0) { 10 | throw new Error( 11 | `An error occurred while installing PHP(Code: ${exitCode}` 12 | ); 13 | } 14 | } catch (error) { 15 | if (error instanceof Error) { 16 | core.setFailed(error.message); 17 | } else { 18 | throw error; 19 | } 20 | } 21 | } 22 | 23 | run(); 24 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true, /* Enable incremental compilation */ 5 | "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 6 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | "lib": [ 8 | "es6" 9 | ], 10 | // "allowJs": true, /* Allow javascript files to be compiled. */ 11 | // "checkJs": true, /* Report errors in .js files. */ 12 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 13 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 14 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 15 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 16 | // "outFile": "./", /* Concatenate and emit output to single file. */ 17 | "outDir": "./lib", /* Redirect output structure to the directory. */ 18 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 19 | // "composite": true, /* Enable project compilation */ 20 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 21 | // "removeComments": true, /* Do not emit comments to output. */ 22 | // "noEmit": true, /* Do not emit outputs. */ 23 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 24 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 26 | 27 | /* Strict Type-Checking Options */ 28 | "strict": true, /* Enable all strict type-checking options. */ 29 | "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ 30 | // "strictNullChecks": true, /* Enable strict null checks. */ 31 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 32 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 33 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 34 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 35 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 36 | 37 | /* Additional Checks */ 38 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 39 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 40 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 41 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 42 | 43 | /* Module Resolution Options */ 44 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 45 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 46 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 47 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 48 | // "typeRoots": [], /* List of folders to include type definitions from. */ 49 | // "types": [], /* Type declaration files to be included in compilation. */ 50 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 51 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 52 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 53 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 54 | 55 | /* Source Map Options */ 56 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 58 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 59 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 60 | 61 | /* Experimental Options */ 62 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 63 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 64 | }, 65 | "exclude": ["node_modules", "**/*.test.ts"] 66 | } 67 | --------------------------------------------------------------------------------