diff --git a/.github/SECURITY.md b/.github/SECURITY.md index a129b4c0..cceb3682 100644 --- a/.github/SECURITY.md +++ b/.github/SECURITY.md @@ -7,7 +7,7 @@ The following versions of this project are supported for security updates. | Version | Supported | | ------- | ------------------ | | 1.9.x | :white_check_mark: | -| 2.3.x | :white_check_mark: | +| 2.4.x | :white_check_mark: | ## Supported PHP Versions diff --git a/.github/workflows/node-workflow.yml b/.github/workflows/node-workflow.yml index 5e7b899b..a4ef4811 100644 --- a/.github/workflows/node-workflow.yml +++ b/.github/workflows/node-workflow.yml @@ -48,4 +48,4 @@ jobs: - name: Send Coverage continue-on-error: true timeout-minutes: 1 - run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }}-php${{ matrix.php-versions }} + run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }} diff --git a/README.md b/README.md index d5d1cd9a..da71b113 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ with: These tools can be setup globally using the `tools` input. -`blackfire`, `blackfire-player`, `codeception`, `composer`, `composer-normalize`, `composer-prefetcher`, `composer-require-checker`, `composer-unused`, `cs2pr`, `deployer`, `flex`, `infection`, `pecl`, `phan`, `phinx`, `phive`, `phpcbf`, `phpcpd`, `php-config`, `php-cs-fixer`, `phpcs`, `phpize`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`, `symfony`, `vapor-cli` +`blackfire`, `blackfire-player`, `codeception`, `composer`, `composer-normalize`, `composer-prefetcher`, `composer-require-checker`, `composer-unused`, `cs2pr`, `deployer`, `flex`, `grpc_php_plugin`, `infection`, `pecl`, `phan`, `phinx`, `phive`, `phpcbf`, `phpcpd`, `php-config`, `php-cs-fixer`, `phpcs`, `phpize`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `protoc`, `psalm`, `symfony`, `vapor-cli` ```yaml uses: shivammathur/setup-php@v2 @@ -544,7 +544,7 @@ If your project has node.js dependencies, you can persist npm's or yarn's cache ### Composer GitHub OAuth -If you have a number of workflows which setup multiple tools or have many composer dependencies, you might hit the GitHub's rate limit for composer. To avoid that you can add a `OAuth` token to the composer's config by setting `COMPOSER_TOKEN` environment variable. You can use [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token "GITHUB_TOKEN documentation") secret for this purpose. +If you have a number of workflows which setup multiple tools or have many composer dependencies, you might hit the GitHub's rate limit for composer. To avoid that you can add an `OAuth` token to the composer's config by setting `COMPOSER_TOKEN` environment variable. You can use [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token "GITHUB_TOKEN documentation") secret for this purpose. ```yaml - name: Setup PHP @@ -634,7 +634,7 @@ Examples of using `setup-php` with various PHP Frameworks and Packages. ## :scroll: License - The scripts and documentation in this project are released under the [MIT License](LICENSE "License for shivammathur/setup-php"). -- This project has multiple [dependencies](#bookmark-dependencies "Dependencies for this PHP Action"). Their licenses can be found in their respective repositories. +- This project has multiple [dependencies](#package-dependencies "Dependencies for this PHP Action"). Their licenses can be found in their respective repositories. - The logo for `setup-php` is a derivative work of [php.net logo](https://www.php.net/download-logos.php) and is licensed under the [CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/ "Creative Commons License"). ## :+1: Contributions diff --git a/__tests__/extensions.test.ts b/__tests__/extensions.test.ts index 4c259209..b5fc8c60 100644 --- a/__tests__/extensions.test.ts +++ b/__tests__/extensions.test.ts @@ -1,14 +1,6 @@ import * as extensions from '../src/extensions'; describe('Extension tests', () => { - it('checking getXdebugVersion', async () => { - expect(await extensions.getXdebugVersion('5.3')).toContain('2.2.7'); - expect(await extensions.getXdebugVersion('5.4')).toContain('2.4.1'); - expect(await extensions.getXdebugVersion('5.5')).toContain('2.5.5'); - expect(await extensions.getXdebugVersion('5.6')).toContain('2.5.5'); - expect(await extensions.getXdebugVersion('7.0')).toContain('2.7.2'); - expect(await extensions.getXdebugVersion('7.2')).toContain('2.9.6'); - }); it('checking addExtensionOnWindows', async () => { let win32: string = await extensions.addExtension( 'Xdebug, pcov, sqlite, :intl, phalcon4, ioncube, oci8, pdo_oci, ast-beta, grpc-1.2.3, inotify-1.2.3alpha2', @@ -19,14 +11,19 @@ describe('Extension tests', () => { expect(win32).toContain('Add-Extension pcov'); expect(win32).toContain('Add-Extension sqlite3'); expect(win32).toContain('Remove-Extension intl'); - expect(win32).toContain('phalcon.ps1 phalcon4'); - expect(win32).toContain('ioncube.ps1 7.4'); - expect(win32).toContain('oci.ps1 oci8 7.4'); - expect(win32).toContain('oci.ps1 pdo_oci 7.4'); + expect(win32).toContain('Add-Phalcon phalcon4'); + expect(win32).toContain('Add-Ioncube'); + expect(win32).toContain('Add-OCI oci8'); + expect(win32).toContain('Add-OCI pdo_oci'); expect(win32).toContain('Add-Extension ast beta'); expect(win32).toContain('Add-Extension grpc stable 1.2.3'); expect(win32).toContain('Add-Extension inotify alpha 1.2.3'); + win32 = await extensions.addExtension('pcov', '5.6', 'win32'); + expect(win32).toContain( + 'Add-Log "$cross" "pcov" "pcov is not supported on PHP 5.6"' + ); + win32 = await extensions.addExtension('mysql', '7.4', 'win32'); expect(win32).toContain('Add-Extension mysqli'); expect(win32).toContain('Add-Extension mysqlnd'); @@ -46,17 +43,17 @@ describe('Extension tests', () => { 'win32', true ); - expect(win32).toContain('phalcon.ps1 phalcon3'); + expect(win32).toContain('Add-Phalcon phalcon3'); expect(win32).toContain('Add-Extension does_not_exist'); win32 = await extensions.addExtension('xdebug', '7.2', 'fedora'); expect(win32).toContain('Platform fedora is not supported'); win32 = await extensions.addExtension('blackfire', '7.3', 'win32'); - expect(win32).toContain('blackfire.ps1 7.3 blackfire'); + expect(win32).toContain('Add-Blackfire blackfire'); win32 = await extensions.addExtension('blackfire-1.31.0', '7.3', 'win32'); - expect(win32).toContain('blackfire.ps1 7.3 blackfire-1.31.0'); + expect(win32).toContain('Add-Blackfire blackfire-1.31.0'); }); it('checking addExtensionOnLinux', async () => { @@ -65,7 +62,6 @@ describe('Extension tests', () => { '7.4', 'linux' ); - expect(linux).toContain('update_extension xdebug 2.9.6'); expect(linux).toContain( 'add_extension_from_source xdebug xdebug/xdebug master --enable-xdebug zend_extension' ); @@ -89,39 +85,35 @@ describe('Extension tests', () => { 'sudo $debconf_fix apt-get install -y php8.0-xdebug' ); + linux = await extensions.addExtension('pcov', '5.6', 'linux'); + expect(linux).toContain( + 'add_log "$cross" "pcov" "pcov is not supported on PHP 5.6"' + ); + linux = await extensions.addExtension('gearman', '7.0', 'linux'); - expect(linux).toContain('gearman.sh 7.0'); - linux = await extensions.addExtension('gearman', '7.1', 'linux'); - expect(linux).toContain('gearman.sh 7.1'); - - linux = await extensions.addExtension('gearman', '7.2', 'linux'); - expect(linux).toContain('gearman.sh 7.2'); - - linux = await extensions.addExtension('gearman', '7.3', 'linux'); - expect(linux).toContain('gearman.sh 7.3'); - + expect(linux).toContain('add_gearman'); linux = await extensions.addExtension('gearman', '7.4', 'linux'); - expect(linux).toContain('gearman.sh 7.4'); + expect(linux).toContain('add_gearman'); linux = await extensions.addExtension('xdebug', '7.2', 'fedora'); expect(linux).toContain('Platform fedora is not supported'); linux = await extensions.addExtension('phalcon3, phalcon4', '7.3', 'linux'); - expect(linux).toContain('phalcon.sh phalcon3 7.3'); - expect(linux).toContain('phalcon.sh phalcon4 7.3'); + expect(linux).toContain('add_phalcon phalcon3'); + expect(linux).toContain('add_phalcon phalcon4'); linux = await extensions.addExtension('ioncube', '7.3', 'linux'); - expect(linux).toContain('ioncube.sh 7.3'); + expect(linux).toContain('add_ioncube'); linux = await extensions.addExtension('oci8, pdo_oci', '7.3', 'linux'); - expect(linux).toContain('oci.sh oci8 7.3'); - expect(linux).toContain('oci.sh pdo_oci 7.3'); + expect(linux).toContain('add_oci oci8'); + expect(linux).toContain('add_oci pdo_oci'); linux = await extensions.addExtension('blackfire', '7.3', 'linux'); - expect(linux).toContain('blackfire.sh 7.3 blackfire'); + expect(linux).toContain('add_blackfire blackfire'); linux = await extensions.addExtension('blackfire-1.31.0', '7.3', 'linux'); - expect(linux).toContain('blackfire.sh 7.3 blackfire-1.31.0'); + expect(linux).toContain('add_blackfire blackfire-1.31.0'); }); it('checking addExtensionOnDarwin', async () => { @@ -135,39 +127,32 @@ describe('Extension tests', () => { expect(darwin).toContain('add_brew_extension grpc'); expect(darwin).toContain('add_brew_extension protobuf'); expect(darwin).toContain('add_brew_extension swoole'); - expect(darwin).toContain('sudo pecl install -f sqlite3'); + expect(darwin).toContain('pecl_install sqlite3'); expect(darwin).toContain('remove_extension intl'); expect(darwin).toContain('add_unstable_extension ast beta extension'); expect(darwin).toContain('add_pecl_extension grpc 1.2.3 extension'); darwin = await extensions.addExtension('phalcon3', '7.0', 'darwin'); - expect(darwin).toContain('phalcon_darwin.sh phalcon3 7.0'); + expect(darwin).toContain('add_phalcon phalcon3'); darwin = await extensions.addExtension('phalcon4', '7.3', 'darwin'); - expect(darwin).toContain('phalcon_darwin.sh phalcon4 7.3'); + expect(darwin).toContain('add_phalcon phalcon4'); darwin = await extensions.addExtension('ioncube', '7.3', 'darwin'); - expect(darwin).toContain('ioncube.sh 7.3'); + expect(darwin).toContain('add_ioncube'); darwin = await extensions.addExtension('oci8, pdo_oci', '7.3', 'darwin'); - expect(darwin).toContain('oci.sh oci8 7.3'); - expect(darwin).toContain('oci.sh pdo_oci 7.3'); + expect(darwin).toContain('add_oci oci8'); + expect(darwin).toContain('add_oci pdo_oci'); darwin = await extensions.addExtension('pcov', '5.6', 'darwin'); - expect(darwin).toContain('sudo pecl install -f pcov'); + expect(darwin).toContain( + 'add_log "$cross" "pcov" "pcov is not supported on PHP 5.6"' + ); darwin = await extensions.addExtension('pcov', '7.2', 'darwin'); expect(darwin).toContain('add_brew_extension pcov'); - darwin = await extensions.addExtension('xdebug', '5.3', 'darwin'); - expect(darwin).toContain('sudo pecl install -f xdebug-2.2.7'); - - darwin = await extensions.addExtension('xdebug', '5.4', 'darwin'); - expect(darwin).toContain('sudo pecl install -f xdebug-2.4.1'); - - darwin = await extensions.addExtension('xdebug', '5.5', 'darwin'); - expect(darwin).toContain('sudo pecl install -f xdebug-2.5.5'); - darwin = await extensions.addExtension('xdebug', '5.6', 'darwin'); expect(darwin).toContain('add_brew_extension xdebug'); @@ -178,24 +163,24 @@ describe('Extension tests', () => { expect(darwin).toContain('add_brew_extension xdebug'); darwin = await extensions.addExtension('redis', '5.6', 'darwin'); - expect(darwin).toContain('sudo pecl install -f redis-2.2.8'); + expect(darwin).toContain('pecl_install redis-2.2.8'); darwin = await extensions.addExtension('redis', '7.2', 'darwin'); - expect(darwin).toContain('sudo pecl install -f redis'); + expect(darwin).toContain('pecl_install redis'); darwin = await extensions.addExtension('imagick', '5.6', 'darwin'); expect(darwin).toContain('brew install pkg-config imagemagick'); - expect(darwin).toContain('sudo pecl install -f imagick'); + expect(darwin).toContain('pecl_install imagick'); darwin = await extensions.addExtension('imagick', '7.4', 'darwin'); expect(darwin).toContain('brew install pkg-config imagemagick'); - expect(darwin).toContain('sudo pecl install -f imagick'); + expect(darwin).toContain('pecl_install imagick'); darwin = await extensions.addExtension('blackfire', '7.3', 'darwin'); - expect(darwin).toContain('blackfire_darwin.sh 7.3 blackfire'); + expect(darwin).toContain('add_blackfire blackfire'); darwin = await extensions.addExtension('blackfire-1.31.0', '7.3', 'darwin'); - expect(darwin).toContain('blackfire_darwin.sh 7.3 blackfire-1.31.0'); + expect(darwin).toContain('add_blackfire blackfire-1.31.0'); darwin = await extensions.addExtension( 'does_not_exist', diff --git a/__tests__/tools.test.ts b/__tests__/tools.test.ts index 5b1f04e5..a81e6bc8 100644 --- a/__tests__/tools.test.ts +++ b/__tests__/tools.test.ts @@ -402,9 +402,20 @@ describe('Tools tests', () => { expect(script).toContain('Platform fedora is not supported'); }); + it('checking addCustomTool', async () => { + let script: string = await tools.addCustomTool('tool', '1.2.3', 'linux'); + expect(script).toContain('tool.sh\nadd_tool 1.2.3'); + + script = await tools.addCustomTool('tool', '1.2.3', 'darwin'); + expect(script).toContain('tool.sh\nadd_tool 1.2.3'); + + script = await tools.addCustomTool('tool', '1.2.3', 'win32'); + expect(script).toContain('tool.ps1\nAdd-Tool 1.2.3'); + }); + it('checking addTools on linux', async () => { const script: string = await tools.addTools( - 'blackfire, blackfire-player, cs2pr, flex, php-cs-fixer, phplint, phpstan, phpunit, pecl, phinx, phinx:1.2.3, phive, php-config, phpize, symfony, wp-cli', + 'blackfire, blackfire-player, cs2pr, flex, grpc_php_plugin, php-cs-fixer, phplint, phpstan, phpunit, pecl, phinx, phinx:1.2.3, phive, php-config, phpize, protoc, symfony, wp-cli', '7.4', 'linux' ); @@ -436,6 +447,8 @@ describe('Tools tests', () => { expect(script).toContain( 'add_tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli' ); + expect(script).toContain('add_protoc latest'); + expect(script).toContain('add_grpc_php_plugin latest'); expect(script).toContain('add_pecl'); expect(script).toContain('add_composertool flex flex symfony/'); expect(script).toContain('add_composertool phinx phinx robmorgan/'); @@ -455,6 +468,7 @@ describe('Tools tests', () => { 'composer-unused', 'cs2pr:1.2.3', 'flex', + 'grpc_php_plugin:1.2.3', 'infection', 'phan', 'phan:2.7.2', @@ -466,6 +480,7 @@ describe('Tools tests', () => { 'phpcs', 'phpize', 'phpmd', + 'protoc:v1.2.3', 'psalm', 'symfony', 'symfony:1.2.3', @@ -519,6 +534,8 @@ describe('Tools tests', () => { expect(script).toContain( 'https://github.com/vimeo/psalm/releases/latest/download/psalm.phar psalm' ); + expect(script).toContain('add_grpc_php_plugin 1.2.3'); + expect(script).toContain('add_protoc 1.2.3'); expect(script).toContain('add_composertool vapor-cli vapor-cli laravel/'); expect(script).toContain('add_composertool flex flex symfony/'); expect(script).toContain('add_composertool phinx phinx robmorgan/'); diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts index 8b0dcc2e..d137f9b5 100644 --- a/__tests__/utils.test.ts +++ b/__tests__/utils.test.ts @@ -167,4 +167,23 @@ describe('Utils tests', () => { 'Platform fedora is not supported' ); }); + + it('checking getUnsupportedLog', async () => { + expect(await utils.getUnsupportedLog('ext', '5.6', 'linux')).toContain( + 'add_log "$cross" "ext" "ext is not supported on PHP 5.6"' + ); + }); + + it('checking joins', async () => { + expect(await utils.joins('a', 'b', 'c')).toBe('a b c'); + }); + + it('checking scriptExtension', async () => { + expect(await utils.scriptExtension('linux')).toBe('.sh'); + expect(await utils.scriptExtension('darwin')).toBe('.sh'); + expect(await utils.scriptExtension('win32')).toBe('.ps1'); + expect(await utils.scriptExtension('fedora')).toContain( + 'Platform fedora is not supported' + ); + }); }); diff --git a/dist/index.js b/dist/index.js index d11cf2a2..99b81b43 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1314,7 +1314,7 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.suppressOutput = exports.getExtensionPrefix = exports.CSVArray = exports.extensionArray = exports.writeScript = exports.readScript = exports.addLog = exports.stepLog = exports.log = exports.color = exports.asyncForEach = exports.getInput = void 0; +exports.scriptExtension = exports.joins = exports.getUnsupportedLog = exports.suppressOutput = exports.getExtensionPrefix = exports.CSVArray = exports.extensionArray = exports.writeScript = exports.readScript = exports.addLog = exports.stepLog = exports.log = exports.color = exports.asyncForEach = exports.getInput = void 0; const fs = __importStar(__webpack_require__(747)); const path = __importStar(__webpack_require__(622)); const core = __importStar(__webpack_require__(470)); @@ -1529,6 +1529,45 @@ async function suppressOutput(os_version) { } } exports.suppressOutput = suppressOutput; +/** + * Function to get script to log unsupported extensions. + * + * @param extension + * @param version + * @param os_version + */ +async function getUnsupportedLog(extension, version, os_version) { + return ('\n' + + (await addLog('$cross', extension, [extension, 'is not supported on PHP', version].join(' '), os_version)) + + '\n'); +} +exports.getUnsupportedLog = getUnsupportedLog; +/** + * Function to join strings with space + * + * @param str + */ +async function joins(...str) { + return [...str].join(' '); +} +exports.joins = joins; +/** + * Function to get script extensions + * + * @param os_version + */ +async function scriptExtension(os_version) { + switch (os_version) { + case 'win32': + return '.ps1'; + case 'linux': + case 'darwin': + return '.sh'; + default: + return await log('Platform ' + os_version + ' is not supported', os_version, 'error'); + } +} +exports.scriptExtension = scriptExtension; /***/ }), @@ -1908,9 +1947,10 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.addTools = exports.addPackage = exports.addDevTools = exports.addArchive = exports.getCleanedToolsList = exports.getComposerUrl = exports.addComposer = exports.getWpCliUrl = exports.getSymfonyUri = exports.getDeployerUrl = exports.getPharUrl = exports.addPhive = exports.getCodeceptionUri = exports.getCodeceptionUriBuilder = exports.getUri = exports.parseTool = exports.getToolVersion = exports.getCommand = void 0; +exports.addTools = exports.addCustomTool = exports.addPackage = exports.addDevTools = exports.addArchive = exports.getCleanedToolsList = exports.getComposerUrl = exports.addComposer = exports.getWpCliUrl = exports.getSymfonyUri = exports.getDeployerUrl = exports.getPharUrl = exports.addPhive = exports.getCodeceptionUri = exports.getCodeceptionUriBuilder = exports.getUri = exports.parseTool = exports.getToolVersion = exports.getCommand = void 0; const utils = __importStar(__webpack_require__(163)); const httpm = __importStar(__webpack_require__(539)); +const path = __importStar(__webpack_require__(622)); /** * Function to get command to setup tools * @@ -1940,6 +1980,8 @@ async function getToolVersion(version) { const composer_regex = /^stable$|^preview$|^snapshot$|^v?[1|2]$/; version = version.replace(/[><=^]*/, ''); switch (true) { + case version.charAt(0) == 'v': + return version.replace('v', ''); case composer_regex.test(version): case semver_regex.test(version): return version; @@ -2217,7 +2259,7 @@ async function getCleanedToolsList(tools_csv) { .map(function (extension) { return extension .trim() - .replace(/hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//, ''); + .replace(/-agent|hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//, ''); }) .filter(Boolean); return [...new Set(tools_list)]; @@ -2269,6 +2311,20 @@ async function addPackage(tool, release, prefix, os_version) { return tool_command + tool + ' ' + release + ' ' + prefix; } exports.addPackage = addPackage; +/** + * Function to get script to add tools with custom support. + * + * @param tool + * @param version + * @param os_version + */ +async function addCustomTool(tool, version, os_version) { + const script_extension = await utils.scriptExtension(os_version); + const script = path.join(__dirname, '../src/scripts/tools/' + tool + script_extension); + const command = await getCommand(os_version, tool); + return '. ' + script + '\n' + command + version; +} +exports.addCustomTool = addCustomTool; /** * Setup tools * @@ -2289,8 +2345,9 @@ async function addTools(tools_csv, php_version, os_version) { let url = ''; switch (tool) { case 'blackfire': - case 'blackfire-agent': - script += await getCommand(os_version, 'blackfire'); + case 'grpc_php_plugin': + case 'protoc': + script += await addCustomTool(tool, version, os_version); break; case 'blackfire-player': url = await getPharUrl('https://get.blackfire.io', tool, 'v', version); @@ -3568,30 +3625,22 @@ var __importStar = (this && this.__importStar) || function (mod) { return result; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.addExtension = exports.addExtensionLinux = exports.addExtensionWindows = exports.addExtensionDarwin = exports.getXdebugVersion = void 0; +exports.addExtension = exports.addExtensionLinux = exports.addExtensionWindows = exports.addExtensionDarwin = exports.customExtension = void 0; const path = __importStar(__webpack_require__(622)); const utils = __importStar(__webpack_require__(163)); /** - * Function to get Xdebug version compatible with php versions + * Function to get script to install custom extensions * - * @param version + * @param script + * @param command */ -async function getXdebugVersion(version) { - switch (version) { - case '5.3': - return '2.2.7'; - case '5.4': - return '2.4.1'; - case '5.5': - case '5.6': - return '2.5.5'; - case '7.0': - return '2.7.2'; - default: - return '2.9.6'; - } +async function customExtension(script, ...command) { + return ('\n. ' + + path.join(__dirname, '../src/scripts/ext/' + script) + + '\n' + + (await utils.joins(...command))); } -exports.getXdebugVersion = getXdebugVersion; +exports.customExtension = customExtension; /** * Install and enable extensions for darwin * @@ -3607,7 +3656,7 @@ async function addExtensionDarwin(extension_csv, version, pipe) { const version_extension = version + extension; const [ext_name, ext_version] = extension.split('-'); const ext_prefix = await utils.getExtensionPrefix(ext_name); - const command_prefix = 'sudo pecl install -f '; + const command_prefix = 'pecl_install '; let command = ''; switch (true) { // match :extension @@ -3617,44 +3666,37 @@ async function addExtensionDarwin(extension_csv, version, pipe) { // match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire // match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0 case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): - command = - 'bash ' + - path.join(__dirname, '../src/scripts/ext/blackfire_darwin.sh') + - ' ' + - version + - ' ' + - extension; - break; + add_script += await customExtension('blackfire.sh', 'add_blackfire', extension); + return; + // match pdo_oci and oci8 + case /^pdo_oci$|^oci8$/.test(extension): + add_script += await customExtension('oci.sh', 'add_oci', extension); + return; + // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube + case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): + add_script += await customExtension('ioncube.sh', 'add_ioncube'); + return; + // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 + case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): + add_script += await customExtension('phalcon.sh', 'add_phalcon', extension); + return; // match pre-release versions. For example - xdebug-beta case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): - add_script += - '\nadd_unstable_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; + add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix); return; // match semver case /.*-\d+\.\d+\.\d+.*/.test(version_extension): - add_script += - '\nadd_pecl_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; + add_script += await utils.joins('\nadd_pecl_extension', ext_name, ext_version, ext_prefix); + return; + // match 5.3pcov to 7.0pcov + case /(5\.[3-6]|7\.0)pcov/.test(version_extension): + add_script += await utils.getUnsupportedLog('pcov', version, 'darwin'); return; - // match 5.3xdebug...5.5xdebug - case /5\.[3-5]xdebug/.test(version_extension): - command = - command_prefix + 'xdebug-' + (await getXdebugVersion(version)); - break; // match 5.6xdebug to 8.0xdebug, 5.6swoole to 8.0swoole // match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf // match 7.1pcov to 8.0pcov - case /(5\.6|7\.[0-4]|8\.[0-9])(xdebug|swoole)/.test(version_extension): - case /(5\.6|7\.[0-4])(grpc|protobuf)/.test(version_extension): + case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension): + case /(5\.6|7\.[0-4])(grpc|protobuf|swoole)/.test(version_extension): case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension): command = 'add_brew_extension ' + ext_name; break; @@ -3664,53 +3706,18 @@ async function addExtensionDarwin(extension_csv, version, pipe) { break; // match imagick case /^imagick$/.test(extension): - command = - 'brew install pkg-config imagemagick' + - pipe + - ' && ' + - command_prefix + - 'imagick' + - pipe; + command = await utils.joins('brew install pkg-config imagemagick' + pipe, '&& ' + command_prefix + 'imagick' + pipe); break; // match sqlite case /^sqlite$/.test(extension): extension = 'sqlite3'; command = command_prefix + extension; break; - // match pdo_oci and oci8 - case /^pdo_oci$|^oci8$/.test(extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/oci.sh') + - ' ' + - extension + - ' ' + - version; - return; - // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube - case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/ioncube.sh') + - ' ' + - version; - return; - // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 - case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/phalcon_darwin.sh') + - ' ' + - extension + - ' ' + - version; - return; default: command = command_prefix + extension; break; } - add_script += - '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; + add_script += await utils.joins('\nadd_extension', extension, '"' + command + '"', ext_prefix); }); return add_script + remove_script; } @@ -3733,32 +3740,41 @@ async function addExtensionWindows(extension_csv, version) { // Match :extension case /^:/.test(ext_name): remove_script += '\nRemove-Extension ' + ext_name.slice(1); - return; + break; // match 5.4blackfire...5.6blackfire, 7.0blackfire...7.4blackfire // match 5.4blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0 case /^(5\.[4-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/blackfire.ps1') + - ' ' + - version + - ' ' + - extension; - return; + add_script += await customExtension('blackfire.ps1', 'Add-Blackfire', extension); + break; + // match pdo_oci and oci8 + case /^pdo_oci$|^oci8$/.test(extension): + add_script += await customExtension('oci.ps1', 'Add-OCI', extension); + break; + // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube + case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): + add_script += await customExtension('ioncube.ps1', 'Add-Ioncube'); + break; + // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 + case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): + add_script += await customExtension('phalcon.ps1', 'Add-Phalcon', extension); + break; // match pre-release versions. For example - xdebug-beta case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): - add_script += '\nAdd-Extension ' + ext_name + ' ' + ext_version; + add_script += await utils.joins('\nAdd-Extension', ext_name, ext_version); break; // match semver without state case /.*-\d+\.\d+\.\d+$/.test(version_extension): - add_script += '\nAdd-Extension ' + ext_name + ' stable ' + ext_version; - return; + add_script += await utils.joins('\nAdd-Extension', ext_name, 'stable', ext_version); + break; // match semver with state case /.*-(\d+\.\d+\.\d)(beta|alpha|devel|snapshot)\d*/.test(version_extension): matches = /.*-(\d+\.\d+\.\d)(beta|alpha|devel|snapshot)\d*/.exec(version_extension); - add_script += - '\nAdd-Extension ' + ext_name + ' ' + matches[2] + ' ' + matches[1]; - return; + add_script += await utils.joins('\nAdd-Extension', ext_name, matches[2], matches[1]); + break; + // match 5.3pcov to 7.0pcov + case /(5\.[3-6]|7\.0)pcov/.test(version_extension): + add_script += await utils.getUnsupportedLog('pcov', version, 'win32'); + break; // match 5.3mysql..5.6mysql // match 5.3mysqli..5.6mysqli // match 5.3mysqlnd..5.6mysqlnd @@ -3775,38 +3791,7 @@ async function addExtensionWindows(extension_csv, version) { // match sqlite case /^sqlite$/.test(extension): extension = 'sqlite3'; - add_script += '\nAdd-Extension ' + extension; - break; - // match pdo_oci and oci8 - case /^pdo_oci$|^oci8$/.test(extension): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/oci.ps1') + - ' ' + - extension + - ' ' + - version + - '\n'; - break; - // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube - case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/ioncube.ps1') + - ' ' + - version + - '\n'; - break; - // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 - case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/phalcon.ps1') + - ' ' + - extension + - ' ' + - version + - '\n'; + add_script += await utils.joins('\nAdd-Extension', extension); break; default: add_script += '\nAdd-Extension ' + extension; @@ -3841,70 +3826,35 @@ async function addExtensionLinux(extension_csv, version, pipe) { // match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire // match 5.3blackfire-{semver}...5.6blackfire-{semver}, 7.0blackfire-{semver}...7.4blackfire-{semver} case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test(version_extension): - command = - 'bash ' + - path.join(__dirname, '../src/scripts/ext/blackfire.sh') + - ' ' + - version + - ' ' + - extension; - break; - // match pre-release versions. For example - xdebug-beta - case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): - add_script += - '\nadd_unstable_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; + add_script += await customExtension('blackfire.sh', 'add_blackfire', extension); return; - // match semver versions - case /.*-\d+\.\d+\.\d+.*/.test(version_extension): - add_script += - '\nadd_pecl_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; - return; - // match 5.6gearman..7.4gearman - case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension): - command = - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/gearman.sh') + - ' ' + - version + - pipe; - break; // match pdo_oci and oci8 case /^pdo_oci$|^oci8$/.test(extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/oci.sh') + - ' ' + - extension + - ' ' + - version; + add_script += await customExtension('oci.sh', 'add_oci', extension); return; // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/ioncube.sh') + - ' ' + - version; + add_script += await customExtension('ioncube.sh', 'add_ioncube'); return; - // match 7.0phalcon3...7.3phalcon3 or 7.2phalcon4...7.4phalcon4 + // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/phalcon.sh') + - ' ' + - extension + - ' ' + - version; + add_script += await customExtension('phalcon.sh', 'add_phalcon', extension); + return; + // match 5.6gearman..7.4gearman + case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension): + add_script += await customExtension('gearman.sh', 'add_gearman'); + return; + // match pre-release versions. For example - xdebug-beta + case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): + add_script += await utils.joins('\nadd_unstable_extension', ext_name, ext_version, ext_prefix); + return; + // match semver versions + case /.*-\d+\.\d+\.\d+.*/.test(version_extension): + add_script += await utils.joins('\nadd_pecl_extension', ext_name, ext_version, ext_prefix); + return; + // match 5.3pcov to 7.0pcov + case /(5\.[3-6]|7\.0)pcov/.test(version_extension): + add_script += await utils.getUnsupportedLog('pcov', version, 'linux'); return; // match 7.2xdebug3..7.4xdebug3 case /^7\.[2-4]xdebug3$/.test(version_extension): @@ -3916,20 +3866,9 @@ async function addExtensionLinux(extension_csv, version, pipe) { extension = 'xdebug'; command = command_prefix + version + '-' + extension + pipe; break; - // match 7.1xdebug..7.4xdebug - case /^7\.[1-4]xdebug$/.test(version_extension): - add_script += - '\nupdate_extension xdebug 2.9.6' + - pipe + - '\n' + - (await utils.addLog('$tick', 'xdebug', 'Enabled', 'linux')); - return; // match pdo extensions case /.*pdo[_-].*/.test(version_extension): - extension = extension - .replace('pdo_', '') - .replace('pdo-', '') - .replace('sqlite3', 'sqlite'); + extension = extension.replace(/pdo[_-]|3/, ''); add_script += '\nadd_pdo_extension ' + extension; return; // match ast and uopz @@ -3945,8 +3884,7 @@ async function addExtensionLinux(extension_csv, version, pipe) { command = command_prefix + version + '-' + extension + pipe; break; } - add_script += - '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; + add_script += await utils.joins('\nadd_extension', extension, '"' + command + '"', ext_prefix); }); return add_script + remove_script; } diff --git a/package-lock.json b/package-lock.json index 83f50c74..4732412b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "setup-php", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -40,19 +40,19 @@ } }, "@babel/core": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", - "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.11.0.tgz", + "integrity": "sha512-mkLq8nwaXmDtFmRkQ8ED/eA2CnVw4zr7dCztKalZXBvdK5EeNUAesrrwUqjQEzFgomJssayzB0aqlOsP1vGLqg==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.5", - "@babel/helper-module-transforms": "^7.10.5", + "@babel/generator": "^7.11.0", + "@babel/helper-module-transforms": "^7.11.0", "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.10.5", + "@babel/parser": "^7.11.0", "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.5", - "@babel/types": "^7.10.5", + "@babel/traverse": "^7.11.0", + "@babel/types": "^7.11.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", @@ -87,12 +87,12 @@ } }, "@babel/generator": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz", - "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.11.0.tgz", + "integrity": "sha512-fEm3Uzw7Mc9Xi//qU20cBKatTfs2aOtKqmvy/Vm7RkJEGFQ4xc9myCfbXxqK//ZS8MR/ciOHw6meGASJuKmDfQ==", "dev": true, "requires": { - "@babel/types": "^7.10.5", + "@babel/types": "^7.11.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" }, @@ -126,12 +126,12 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz", - "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.11.0.tgz", + "integrity": "sha512-JbFlKHFntRV5qKw3YC0CvQnDZ4XMwgzzBbld7Ly4Mj4cbFy3KywcR8NtNctRToMWJOVvLINJv525Gd6wwVEx/Q==", "dev": true, "requires": { - "@babel/types": "^7.10.5" + "@babel/types": "^7.11.0" } }, "@babel/helper-module-imports": { @@ -144,17 +144,17 @@ } }, "@babel/helper-module-transforms": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz", - "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz", + "integrity": "sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.10.4", "@babel/helper-replace-supers": "^7.10.4", "@babel/helper-simple-access": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", "@babel/template": "^7.10.4", - "@babel/types": "^7.10.5", + "@babel/types": "^7.11.0", "lodash": "^4.17.19" } }, @@ -196,12 +196,12 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz", - "integrity": "sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", "dev": true, "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.11.0" } }, "@babel/helper-validator-identifier": { @@ -285,9 +285,9 @@ } }, "@babel/parser": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz", - "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.0.tgz", + "integrity": "sha512-qvRvi4oI8xii8NllyEc4MDJjuZiNaRzyb7Y7lup1NqJV8TZHF4O27CcP+72WPn/k1zkgJ6WJfnIbk4jTsVAZHw==", "dev": true }, "@babel/plugin-syntax-async-generators": { @@ -401,17 +401,17 @@ } }, "@babel/traverse": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz", - "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.11.0.tgz", + "integrity": "sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.5", + "@babel/generator": "^7.11.0", "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", - "@babel/parser": "^7.10.5", - "@babel/types": "^7.10.5", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.11.0", + "@babel/types": "^7.11.0", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.19" @@ -426,9 +426,9 @@ } }, "@babel/types": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz", - "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==", + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", + "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.10.4", @@ -529,26 +529,28 @@ "dev": true }, "@jest/console": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.1.0.tgz", - "integrity": "sha512-+0lpTHMd/8pJp+Nd4lyip+/Iyf2dZJvcCqrlkeZQoQid+JlThA4M9vxHtheyrQ99jJTMQam+es4BcvZ5W5cC3A==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.2.0.tgz", + "integrity": "sha512-mXQfx3nSLwiHm1i7jbu+uvi+vvpVjNGzIQYLCfsat9rapC+MJkS4zBseNrgJE0vU921b3P67bQzhduphjY3Tig==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", + "@types/node": "*", "chalk": "^4.0.0", - "jest-message-util": "^26.1.0", - "jest-util": "^26.1.0", + "jest-message-util": "^26.2.0", + "jest-util": "^26.2.0", "slash": "^3.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -566,33 +568,34 @@ } }, "@jest/core": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.1.0.tgz", - "integrity": "sha512-zyizYmDJOOVke4OO/De//aiv8b07OwZzL2cfsvWF3q9YssfpcKfcnZAwDY8f+A76xXSMMYe8i/f/LPocLlByfw==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.2.2.tgz", + "integrity": "sha512-UwA8gNI8aeV4FHGfGAUfO/DHjrFVvlBravF1Tm9Kt6qFE+6YHR47kFhgdepOFpADEKstyO+MVdPvkV6/dyt9sA==", "dev": true, "requires": { - "@jest/console": "^26.1.0", - "@jest/reporters": "^26.1.0", - "@jest/test-result": "^26.1.0", - "@jest/transform": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/console": "^26.2.0", + "@jest/reporters": "^26.2.2", + "@jest/test-result": "^26.2.0", + "@jest/transform": "^26.2.2", + "@jest/types": "^26.2.0", + "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-changed-files": "^26.1.0", - "jest-config": "^26.1.0", - "jest-haste-map": "^26.1.0", - "jest-message-util": "^26.1.0", + "jest-changed-files": "^26.2.0", + "jest-config": "^26.2.2", + "jest-haste-map": "^26.2.2", + "jest-message-util": "^26.2.0", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.1.0", - "jest-resolve-dependencies": "^26.1.0", - "jest-runner": "^26.1.0", - "jest-runtime": "^26.1.0", - "jest-snapshot": "^26.1.0", - "jest-util": "^26.1.0", - "jest-validate": "^26.1.0", - "jest-watcher": "^26.1.0", + "jest-resolve": "^26.2.2", + "jest-resolve-dependencies": "^26.2.2", + "jest-runner": "^26.2.2", + "jest-runtime": "^26.2.2", + "jest-snapshot": "^26.2.2", + "jest-util": "^26.2.0", + "jest-validate": "^26.2.0", + "jest-watcher": "^26.2.0", "micromatch": "^4.0.2", "p-each-series": "^2.1.0", "rimraf": "^3.0.0", @@ -601,13 +604,14 @@ }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -634,24 +638,26 @@ } }, "@jest/environment": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.1.0.tgz", - "integrity": "sha512-86+DNcGongbX7ai/KE/S3/NcUVZfrwvFzOOWX/W+OOTvTds7j07LtC+MgGydH5c8Ri3uIrvdmVgd1xFD5zt/xA==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.2.0.tgz", + "integrity": "sha512-oCgp9NmEiJ5rbq9VI/v/yYLDpladAAVvFxZgNsnJxOETuzPZ0ZcKKHYjKYwCtPOP1WCrM5nmyuOhMStXFGHn+g==", "dev": true, "requires": { - "@jest/fake-timers": "^26.1.0", - "@jest/types": "^26.1.0", - "jest-mock": "^26.1.0" + "@jest/fake-timers": "^26.2.0", + "@jest/types": "^26.2.0", + "@types/node": "*", + "jest-mock": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -669,26 +675,28 @@ } }, "@jest/fake-timers": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.1.0.tgz", - "integrity": "sha512-Y5F3kBVWxhau3TJ825iuWy++BAuQzK/xEa+wD9vDH3RytW9f2DbMVodfUQC54rZDX3POqdxCgcKdgcOL0rYUpA==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.2.0.tgz", + "integrity": "sha512-45Gfe7YzYTKqTayBrEdAF0qYyAsNRBzfkV0IyVUm3cx7AsCWlnjilBM4T40w7IXT5VspOgMPikQlV0M6gHwy/g==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "@sinonjs/fake-timers": "^6.0.1", - "jest-message-util": "^26.1.0", - "jest-mock": "^26.1.0", - "jest-util": "^26.1.0" + "@types/node": "*", + "jest-message-util": "^26.2.0", + "jest-mock": "^26.2.0", + "jest-util": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -706,24 +714,25 @@ } }, "@jest/globals": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.1.0.tgz", - "integrity": "sha512-MKiHPNaT+ZoG85oMaYUmGHEqu98y3WO2yeIDJrs2sJqHhYOy3Z6F7F/luzFomRQ8SQ1wEkmahFAz2291Iv8EAw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.2.0.tgz", + "integrity": "sha512-Hoc6ScEIPaym7RNytIL2ILSUWIGKlwEv+JNFof9dGYOdvPjb2evEURSslvCMkNuNg1ECEClTE8PH7ULlMJntYA==", "dev": true, "requires": { - "@jest/environment": "^26.1.0", - "@jest/types": "^26.1.0", - "expect": "^26.1.0" + "@jest/environment": "^26.2.0", + "@jest/types": "^26.2.0", + "expect": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -741,16 +750,16 @@ } }, "@jest/reporters": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.1.0.tgz", - "integrity": "sha512-SVAysur9FOIojJbF4wLP0TybmqwDkdnFxHSPzHMMIYyBtldCW9gG+Q5xWjpMFyErDiwlRuPyMSJSU64A67Pazg==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.2.2.tgz", + "integrity": "sha512-7854GPbdFTAorWVh+RNHyPO9waRIN6TcvCezKVxI1khvFq9YjINTW7J3WU+tbR038Ynn6WjYred6vtT0YmIWVQ==", "dev": true, "requires": { "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^26.1.0", - "@jest/test-result": "^26.1.0", - "@jest/transform": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/console": "^26.2.0", + "@jest/test-result": "^26.2.0", + "@jest/transform": "^26.2.2", + "@jest/types": "^26.2.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", @@ -761,10 +770,10 @@ "istanbul-lib-report": "^3.0.0", "istanbul-lib-source-maps": "^4.0.0", "istanbul-reports": "^3.0.2", - "jest-haste-map": "^26.1.0", - "jest-resolve": "^26.1.0", - "jest-util": "^26.1.0", - "jest-worker": "^26.1.0", + "jest-haste-map": "^26.2.2", + "jest-resolve": "^26.2.2", + "jest-util": "^26.2.0", + "jest-worker": "^26.2.1", "node-notifier": "^7.0.0", "slash": "^3.0.0", "source-map": "^0.6.0", @@ -774,13 +783,14 @@ }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -809,25 +819,26 @@ } }, "@jest/test-result": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.1.0.tgz", - "integrity": "sha512-Xz44mhXph93EYMA8aYDz+75mFbarTV/d/x0yMdI3tfSRs/vh4CqSxgzVmCps1fPkHDCtn0tU8IH9iCKgGeGpfw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.2.0.tgz", + "integrity": "sha512-kgPlmcVafpmfyQEu36HClK+CWI6wIaAWDHNxfQtGuKsgoa2uQAYdlxjMDBEa3CvI40+2U3v36gQF6oZBkoKatw==", "dev": true, "requires": { - "@jest/console": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/console": "^26.2.0", + "@jest/types": "^26.2.0", "@types/istanbul-lib-coverage": "^2.0.0", "collect-v8-coverage": "^1.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -845,34 +856,34 @@ } }, "@jest/test-sequencer": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.1.0.tgz", - "integrity": "sha512-Z/hcK+rTq56E6sBwMoQhSRDVjqrGtj1y14e2bIgcowARaIE1SgOanwx6gvY4Q9gTKMoZQXbXvptji+q5GYxa6Q==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.2.2.tgz", + "integrity": "sha512-SliZWon5LNqV/lVXkeowSU6L8++FGOu3f43T01L1Gv6wnFDP00ER0utV9jyK9dVNdXqfMNCN66sfcyar/o7BNw==", "dev": true, "requires": { - "@jest/test-result": "^26.1.0", + "@jest/test-result": "^26.2.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.1.0", - "jest-runner": "^26.1.0", - "jest-runtime": "^26.1.0" + "jest-haste-map": "^26.2.2", + "jest-runner": "^26.2.2", + "jest-runtime": "^26.2.2" } }, "@jest/transform": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.1.0.tgz", - "integrity": "sha512-ICPm6sUXmZJieq45ix28k0s+d/z2E8CHDsq+WwtWI6kW8m7I8kPqarSEcUN86entHQ570ZBRci5OWaKL0wlAWw==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.2.2.tgz", + "integrity": "sha512-c1snhvi5wRVre1XyoO3Eef5SEWpuBCH/cEbntBUd9tI5sNYiBDmO0My/lc5IuuGYKp/HFIHV1eZpSx5yjdkhKw==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.1.0", + "jest-haste-map": "^26.2.2", "jest-regex-util": "^26.0.0", - "jest-util": "^26.1.0", + "jest-util": "^26.2.0", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", @@ -881,13 +892,14 @@ }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -1022,9 +1034,9 @@ } }, "@types/jest": { - "version": "26.0.5", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.5.tgz", - "integrity": "sha512-heU+7w8snfwfjtcj2H458aTx3m5unIToOJhx75ebHilBiiQ39OIdA18WkG4LP08YKeAoWAGvWg8s+22w/PeJ6w==", + "version": "26.0.8", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.8.tgz", + "integrity": "sha512-eo3VX9jGASSuv680D4VQ89UmuLZneNxv2MCZjfwlInav05zXVJTzfc//lavdV0GPwSxsXJTy2jALscB7Acqg0g==", "dev": true, "requires": { "jest-diff": "^25.2.1", @@ -1044,9 +1056,9 @@ "dev": true }, "@types/node": { - "version": "14.0.23", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.23.tgz", - "integrity": "sha512-Z4U8yDAl5TFkmYsZdFPdjeMa57NOvnaf1tljHzhouaPEp7LCj2JKkejpI1ODviIAQuW4CcQmxkQ77rnLsOOoKw==", + "version": "14.0.27", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.27.tgz", + "integrity": "sha512-kVrqXhbclHNHGu9ztnAwSncIgJv/FaxmzXJvGXNdcCpV1b8u1/Mi6z6m0vwy0LzKeXFTPLH0NzwmoJ3fNCIq0g==", "dev": true }, "@types/normalize-package-data": { @@ -1089,12 +1101,12 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.6.1.tgz", - "integrity": "sha512-06lfjo76naNeOMDl+mWG9Fh/a0UHKLGhin+mGaIw72FUMbMGBkdi/FEJmgEDzh4eE73KIYzHWvOCYJ0ak7nrJQ==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.7.1.tgz", + "integrity": "sha512-3DB9JDYkMrc8Au00rGFiJLK2Ja9CoMP6Ut0sHsXp3ZtSugjNxvSSHTnKLfo4o+QmjYBJqEznDqsG1zj4F2xnsg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "3.6.1", + "@typescript-eslint/experimental-utils": "3.7.1", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -1103,45 +1115,45 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.6.1.tgz", - "integrity": "sha512-oS+hihzQE5M84ewXrTlVx7eTgc52eu+sVmG7ayLfOhyZmJ8Unvf3osyFQNADHP26yoThFfbxcibbO0d2FjnYhg==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.1.tgz", + "integrity": "sha512-TqE97pv7HrqWcGJbLbZt1v59tcqsSVpWTOf1AqrWK7n8nok2sGgVtYRuGXeNeLw3wXlLEbY1MKP3saB2HsO/Ng==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.6.1", - "@typescript-eslint/typescript-estree": "3.6.1", + "@typescript-eslint/types": "3.7.1", + "@typescript-eslint/typescript-estree": "3.7.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.6.1.tgz", - "integrity": "sha512-SLihQU8RMe77YJ/jGTqOt0lMq7k3hlPVfp7v/cxMnXA9T0bQYoMDfTsNgHXpwSJM1Iq2aAJ8WqekxUwGv5F67Q==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.7.1.tgz", + "integrity": "sha512-W4QV/gXvfIsccN8225784LNOorcm7ch68Fi3V4Wg7gmkWSQRKevO4RrRqWo6N/Z/myK1QAiGgeaXN57m+R/8iQ==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.6.1", - "@typescript-eslint/types": "3.6.1", - "@typescript-eslint/typescript-estree": "3.6.1", + "@typescript-eslint/experimental-utils": "3.7.1", + "@typescript-eslint/types": "3.7.1", + "@typescript-eslint/typescript-estree": "3.7.1", "eslint-visitor-keys": "^1.1.0" } }, "@typescript-eslint/types": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.6.1.tgz", - "integrity": "sha512-NPxd5yXG63gx57WDTW1rp0cF3XlNuuFFB5G+Kc48zZ+51ZnQn9yjDEsjTPQ+aWM+V+Z0I4kuTFKjKvgcT1F7xQ==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.1.tgz", + "integrity": "sha512-PZe8twm5Z4b61jt7GAQDor6KiMhgPgf4XmUb9zdrwTbgtC/Sj29gXP1dws9yEn4+aJeyXrjsD9XN7AWFhmnUfg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.6.1.tgz", - "integrity": "sha512-G4XRe/ZbCZkL1fy09DPN3U0mR6SayIv1zSeBNquRFRk7CnVLgkC2ZPj8llEMJg5Y8dJ3T76SvTGtceytniaztQ==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.1.tgz", + "integrity": "sha512-m97vNZkI08dunYOr2lVZOHoyfpqRs0KDpd6qkGaIcLGhQ2WPtgHOd/eVbsJZ0VYCQvupKrObAGTOvk3tfpybYA==", "dev": true, "requires": { - "@typescript-eslint/types": "3.6.1", - "@typescript-eslint/visitor-keys": "3.6.1", + "@typescript-eslint/types": "3.7.1", + "@typescript-eslint/visitor-keys": "3.7.1", "debug": "^4.1.1", "glob": "^7.1.6", "is-glob": "^4.0.1", @@ -1151,9 +1163,9 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.6.1.tgz", - "integrity": "sha512-qC8Olwz5ZyMTZrh4Wl3K4U6tfms0R/mzU4/5W3XeUZptVraGVmbptJbn6h2Ey6Rb3hOs3zWoAUebZk8t47KGiQ==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.1.tgz", + "integrity": "sha512-xn22sQbEya+Utj2IqJHGLA3i1jDzR43RzWupxojbSWnj3nnPLavaQmWe5utw03CwYao3r00qzXfgJMGNkrzrAA==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" @@ -1166,9 +1178,9 @@ "dev": true }, "abab": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", - "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.4.tgz", + "integrity": "sha512-Eu9ELJWCz/c1e9gTiCY+FceWxcqzjYEbqMgtndnuSqZSUCOL73TWNK2mHfIj4Cw2E/ongOp+JISVNCmovt2KYQ==", "dev": true }, "acorn": { @@ -1366,29 +1378,30 @@ "dev": true }, "babel-jest": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.1.0.tgz", - "integrity": "sha512-Nkqgtfe7j6PxLO6TnCQQlkMm8wdTdnIF8xrdpooHCuD5hXRzVEPbPneTJKknH5Dsv3L8ip9unHDAp48YQ54Dkg==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.2.2.tgz", + "integrity": "sha512-JmLuePHgA+DSOdOL8lPxCgD2LhPPm+rdw1vnxR73PpIrnmKCS2/aBhtkAcxQWuUcW2hBrH8MJ3LKXE7aWpNZyA==", "dev": true, "requires": { - "@jest/transform": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/transform": "^26.2.2", + "@jest/types": "^26.2.0", "@types/babel__core": "^7.1.7", "babel-plugin-istanbul": "^6.0.0", - "babel-preset-jest": "^26.1.0", + "babel-preset-jest": "^26.2.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "slash": "^3.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -1419,9 +1432,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.1.0.tgz", - "integrity": "sha512-qhqLVkkSlqmC83bdMhM8WW4Z9tB+JkjqAqlbbohS9sJLT5Ha2vfzuKqg5yenXrAjOPG2YC0WiXdH3a9PvB+YYw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.2.0.tgz", + "integrity": "sha512-B/hVMRv8Nh1sQ1a3EY8I0n4Y1Wty3NrR5ebOyVT302op+DOAau+xNEImGMsUWOC3++ZlMooCytKz+NgN8aKGbA==", "dev": true, "requires": { "@babel/template": "^7.3.3", @@ -1450,12 +1463,12 @@ } }, "babel-preset-jest": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.1.0.tgz", - "integrity": "sha512-na9qCqFksknlEj5iSdw1ehMVR06LCCTkZLGKeEtxDDdhg8xpUF09m29Kvh1pRbZ07h7AQ5ttLYUwpXL4tO6w7w==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.2.0.tgz", + "integrity": "sha512-R1k8kdP3R9phYQugXeNnK/nvCGlBzG4m3EoIIukC80GXb6wCv2XiwPhK6K9MAkQcMszWBYvl2Wm+yigyXFQqXg==", "dev": true, "requires": { - "babel-plugin-jest-hoist": "^26.1.0", + "babel-plugin-jest-hoist": "^26.2.0", "babel-preset-current-node-syntax": "^0.1.2" } }, @@ -1808,9 +1821,9 @@ }, "dependencies": { "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.1.tgz", + "integrity": "sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -2030,6 +2043,12 @@ "safer-buffer": "^2.1.0" } }, + "emittery": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.1.tgz", + "integrity": "sha512-d34LN4L6h18Bzz9xpoku2nPwKxCPlPMr3EEKTkoEBi+1/+b0lcRkRJ1UVyyZaKNeqGR3swcGl6s390DNO4YVgQ==", + "dev": true + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -2154,9 +2173,9 @@ } }, "eslint": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.5.0.tgz", - "integrity": "sha512-vlUP10xse9sWt9SGRtcr1LAC67BENcQMFeV+w5EvLEoFe3xJ8cF1Skd0msziRx/VMC+72B4DxreCE+OR12OA6Q==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.6.0.tgz", + "integrity": "sha512-QlAManNtqr7sozWm5TF4wIH9gmUm2hE3vNRUvyoYAa4y1l5/jxD/PQStEjBMQtCqZmSep8UxrcecI60hOpe61w==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -2321,9 +2340,9 @@ } }, "eslint-plugin-jest": { - "version": "23.18.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.18.0.tgz", - "integrity": "sha512-wLPM/Rm1SGhxrFQ2TKM/BYsYPhn7ch6ZEK92S2o/vGkAAnDXM0I4nTIo745RIX+VlCRMFgBuJEax6XfTHMdeKg==", + "version": "23.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz", + "integrity": "sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==", "dev": true, "requires": { "@typescript-eslint/experimental-utils": "^2.5.0" @@ -2576,27 +2595,28 @@ } }, "expect": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.1.0.tgz", - "integrity": "sha512-QbH4LZXDsno9AACrN9eM0zfnby9G+OsdNgZUohjg/P0mLy1O+/bzTAJGT6VSIjVCe8yKM6SzEl/ckEOFBT7Vnw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.2.0.tgz", + "integrity": "sha512-8AMBQ9UVcoUXt0B7v+5/U5H6yiUR87L6eKCfjE3spx7Ya5lF+ebUo37MCFBML2OiLfkX1sxmQOZhIDonyVTkcw==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-styles": "^4.0.0", "jest-get-type": "^26.0.0", - "jest-matcher-utils": "^26.1.0", - "jest-message-util": "^26.1.0", + "jest-matcher-utils": "^26.2.0", + "jest-message-util": "^26.2.0", "jest-regex-util": "^26.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -2965,12 +2985,12 @@ "dev": true }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -3389,9 +3409,9 @@ } }, "is-docker": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.0.0.tgz", - "integrity": "sha512-pJEdRugimx4fBMra5z2/5iRdZ63OhYV0vr0Dwm5+xtW4D1FvRkB8hamMIhnWfyJeDdyr/aa7BDyNbtG38VxgoQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.0.tgz", + "integrity": "sha512-mB2WygGsSeoXtLKpSYzP6sa0Z9DyU9ZyKlnvuZWxCociaI0qsF8u12sR72DFTX236g1u6oWSWYFuUk09nGQEjg==", "dev": true, "optional": true }, @@ -3584,24 +3604,25 @@ } }, "jest": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-26.1.0.tgz", - "integrity": "sha512-LIti8jppw5BcQvmNJe4w2g1N/3V68HUfAv9zDVm7v+VAtQulGhH0LnmmiVkbNE4M4I43Bj2fXPiBGKt26k9tHw==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.2.2.tgz", + "integrity": "sha512-EkJNyHiAG1+A8pqSz7cXttoVa34hOEzN/MrnJhYnfp5VHxflVcf2pu3oJSrhiy6LfIutLdWo+n6q63tjcoIeig==", "dev": true, "requires": { - "@jest/core": "^26.1.0", + "@jest/core": "^26.2.2", "import-local": "^3.0.2", - "jest-cli": "^26.1.0" + "jest-cli": "^26.2.2" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -3617,22 +3638,22 @@ } }, "jest-cli": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.1.0.tgz", - "integrity": "sha512-Imumvjgi3rU7stq6SJ1JUEMaV5aAgJYXIs0jPqdUnF47N/Tk83EXfmtvNKQ+SnFVI6t6mDOvfM3aA9Sg6kQPSw==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.2.2.tgz", + "integrity": "sha512-vVcly0n/ijZvdy6gPQiQt0YANwX2hLTPQZHtW7Vi3gcFdKTtif7YpI85F8R8JYy5DFSWz4x1OW0arnxlziu5Lw==", "dev": true, "requires": { - "@jest/core": "^26.1.0", - "@jest/test-result": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/core": "^26.2.2", + "@jest/test-result": "^26.2.0", + "@jest/types": "^26.2.0", "chalk": "^4.0.0", "exit": "^0.1.2", "graceful-fs": "^4.2.4", "import-local": "^3.0.2", "is-ci": "^2.0.0", - "jest-config": "^26.1.0", - "jest-util": "^26.1.0", - "jest-validate": "^26.1.0", + "jest-config": "^26.2.2", + "jest-util": "^26.2.0", + "jest-validate": "^26.2.0", "prompts": "^2.0.1", "yargs": "^15.3.1" } @@ -3640,24 +3661,25 @@ } }, "jest-changed-files": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.1.0.tgz", - "integrity": "sha512-HS5MIJp3B8t0NRKGMCZkcDUZo36mVRvrDETl81aqljT1S9tqiHRSpyoOvWg9ZilzZG9TDisDNaN1IXm54fLRZw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.2.0.tgz", + "integrity": "sha512-+RyJb+F1K/XBLIYiL449vo5D+CvlHv29QveJUWNPXuUicyZcq+tf1wNxmmFeRvAU1+TzhwqczSjxnCCFt7+8iA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "execa": "^4.0.0", "throat": "^5.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -3716,39 +3738,42 @@ } }, "jest-circus": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-26.1.0.tgz", - "integrity": "sha512-V5h5XJLPf0XXwP92GIOx8n0Q6vdPDcFPBuEVQ9/OPzpsx3gquL8fdxaJGZ5TsvkU3zWM7mDWULAKYJMRkA2e+g==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-26.2.2.tgz", + "integrity": "sha512-o8yaf3atbWED1dfM/Vxl7VsgN/tDskh5ptqsTF/oCCLPo5RVV39Ubr5/Y9fdW/mP/gNQe+QsrqcHKXHdK/00GQ==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.1.0", - "@jest/test-result": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/environment": "^26.2.0", + "@jest/test-result": "^26.2.0", + "@jest/types": "^26.2.0", + "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", "dedent": "^0.7.0", - "expect": "^26.1.0", + "expect": "^26.2.0", "is-generator-fn": "^2.0.0", - "jest-each": "^26.1.0", - "jest-matcher-utils": "^26.1.0", - "jest-message-util": "^26.1.0", - "jest-runtime": "^26.1.0", - "jest-snapshot": "^26.1.0", - "jest-util": "^26.1.0", - "pretty-format": "^26.1.0", + "jest-each": "^26.2.0", + "jest-matcher-utils": "^26.2.0", + "jest-message-util": "^26.2.0", + "jest-runner": "^26.2.2", + "jest-runtime": "^26.2.2", + "jest-snapshot": "^26.2.2", + "jest-util": "^26.2.0", + "pretty-format": "^26.2.0", "stack-utils": "^2.0.2", "throat": "^5.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -3764,12 +3789,12 @@ } }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -3778,39 +3803,40 @@ } }, "jest-config": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.1.0.tgz", - "integrity": "sha512-ONTGeoMbAwGCdq4WuKkMcdMoyfs5CLzHEkzFOlVvcDXufZSaIWh/OXMLa2fwKXiOaFcqEw8qFr4VOKJQfn4CVw==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.2.2.tgz", + "integrity": "sha512-2lhxH0y4YFOijMJ65usuf78m7+9/8+hAb1PZQtdRdgnQpAb4zP6KcVDDktpHEkspBKnc2lmFu+RQdHukUUbiTg==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^26.1.0", - "@jest/types": "^26.1.0", - "babel-jest": "^26.1.0", + "@jest/test-sequencer": "^26.2.2", + "@jest/types": "^26.2.0", + "babel-jest": "^26.2.2", "chalk": "^4.0.0", "deepmerge": "^4.2.2", "glob": "^7.1.1", "graceful-fs": "^4.2.4", - "jest-environment-jsdom": "^26.1.0", - "jest-environment-node": "^26.1.0", + "jest-environment-jsdom": "^26.2.0", + "jest-environment-node": "^26.2.0", "jest-get-type": "^26.0.0", - "jest-jasmine2": "^26.1.0", + "jest-jasmine2": "^26.2.2", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.1.0", - "jest-util": "^26.1.0", - "jest-validate": "^26.1.0", + "jest-resolve": "^26.2.2", + "jest-util": "^26.2.0", + "jest-validate": "^26.2.0", "micromatch": "^4.0.2", - "pretty-format": "^26.1.0" + "pretty-format": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -3832,12 +3858,12 @@ "dev": true }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -3867,26 +3893,27 @@ } }, "jest-each": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.1.0.tgz", - "integrity": "sha512-lYiSo4Igr81q6QRsVQq9LIkJW0hZcKxkIkHzNeTMPENYYDw/W/Raq28iJ0sLlNFYz2qxxeLnc5K2gQoFYlu2bA==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.2.0.tgz", + "integrity": "sha512-gHPCaho1twWHB5bpcfnozlc6mrMi+VAewVPNgmwf81x2Gzr6XO4dl+eOrwPWxbkYlgjgrYjWK2xgKnixbzH3Ew==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0", - "jest-util": "^26.1.0", - "pretty-format": "^26.1.0" + "jest-util": "^26.2.0", + "pretty-format": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -3908,12 +3935,12 @@ "dev": true }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -3922,27 +3949,29 @@ } }, "jest-environment-jsdom": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.1.0.tgz", - "integrity": "sha512-dWfiJ+spunVAwzXbdVqPH1LbuJW/kDL+FyqgA5YzquisHqTi0g9hquKif9xKm7c1bKBj6wbmJuDkeMCnxZEpUw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.2.0.tgz", + "integrity": "sha512-sDG24+5M4NuIGzkI3rJW8XUlrpkvIdE9Zz4jhD8OBnVxAw+Y1jUk9X+lAOD48nlfUTlnt3lbAI3k2Ox+WF3S0g==", "dev": true, "requires": { - "@jest/environment": "^26.1.0", - "@jest/fake-timers": "^26.1.0", - "@jest/types": "^26.1.0", - "jest-mock": "^26.1.0", - "jest-util": "^26.1.0", + "@jest/environment": "^26.2.0", + "@jest/fake-timers": "^26.2.0", + "@jest/types": "^26.2.0", + "@types/node": "*", + "jest-mock": "^26.2.0", + "jest-util": "^26.2.0", "jsdom": "^16.2.2" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -3960,26 +3989,28 @@ } }, "jest-environment-node": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.1.0.tgz", - "integrity": "sha512-DNm5x1aQH0iRAe9UYAkZenuzuJ69VKzDCAYISFHQ5i9e+2Tbeu2ONGY7YStubCLH8a1wdKBgqScYw85+ySxqxg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.2.0.tgz", + "integrity": "sha512-4M5ExTYkJ19efBzkiXtBi74JqKLDciEk4CEsp5tTjWGYMrlKFQFtwIVG3tW1OGE0AlXhZjuHPwubuRYY4j4uOw==", "dev": true, "requires": { - "@jest/environment": "^26.1.0", - "@jest/fake-timers": "^26.1.0", - "@jest/types": "^26.1.0", - "jest-mock": "^26.1.0", - "jest-util": "^26.1.0" + "@jest/environment": "^26.2.0", + "@jest/fake-timers": "^26.2.0", + "@jest/types": "^26.2.0", + "@types/node": "*", + "jest-mock": "^26.2.0", + "jest-util": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4003,34 +4034,36 @@ "dev": true }, "jest-haste-map": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.1.0.tgz", - "integrity": "sha512-WeBS54xCIz9twzkEdm6+vJBXgRBQfdbbXD0dk8lJh7gLihopABlJmIQFdWSDDtuDe4PRiObsjZSUjbJ1uhWEpA==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.2.2.tgz", + "integrity": "sha512-3sJlMSt+NHnzCB+0KhJ1Ut4zKJBiJOlbrqEYNdRQGlXTv8kqzZWjUKQRY3pkjmlf+7rYjAV++MQ4D6g4DhAyOg==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "@types/graceful-fs": "^4.1.2", + "@types/node": "*", "anymatch": "^3.0.3", "fb-watchman": "^2.0.0", "fsevents": "^2.1.2", "graceful-fs": "^4.2.4", - "jest-serializer": "^26.1.0", - "jest-util": "^26.1.0", - "jest-worker": "^26.1.0", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.2.0", + "jest-util": "^26.2.0", + "jest-worker": "^26.2.1", "micromatch": "^4.0.2", "sane": "^4.0.3", - "walker": "^1.0.7", - "which": "^2.0.2" + "walker": "^1.0.7" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4048,38 +4081,40 @@ } }, "jest-jasmine2": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.1.0.tgz", - "integrity": "sha512-1IPtoDKOAG+MeBrKvvuxxGPJb35MTTRSDglNdWWCndCB3TIVzbLThRBkwH9P081vXLgiJHZY8Bz3yzFS803xqQ==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.2.2.tgz", + "integrity": "sha512-Q8AAHpbiZMVMy4Hz9j1j1bg2yUmPa1W9StBvcHqRaKa9PHaDUMwds8LwaDyzP/2fkybcTQE4+pTMDOG9826tEw==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^26.1.0", + "@jest/environment": "^26.2.0", "@jest/source-map": "^26.1.0", - "@jest/test-result": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/test-result": "^26.2.0", + "@jest/types": "^26.2.0", + "@types/node": "*", "chalk": "^4.0.0", "co": "^4.6.0", - "expect": "^26.1.0", + "expect": "^26.2.0", "is-generator-fn": "^2.0.0", - "jest-each": "^26.1.0", - "jest-matcher-utils": "^26.1.0", - "jest-message-util": "^26.1.0", - "jest-runtime": "^26.1.0", - "jest-snapshot": "^26.1.0", - "jest-util": "^26.1.0", - "pretty-format": "^26.1.0", + "jest-each": "^26.2.0", + "jest-matcher-utils": "^26.2.0", + "jest-message-util": "^26.2.0", + "jest-runtime": "^26.2.2", + "jest-snapshot": "^26.2.2", + "jest-util": "^26.2.0", + "pretty-format": "^26.2.0", "throat": "^5.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4095,12 +4130,12 @@ } }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -4109,23 +4144,24 @@ } }, "jest-leak-detector": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.1.0.tgz", - "integrity": "sha512-dsMnKF+4BVOZwvQDlgn3MG+Ns4JuLv8jNvXH56bgqrrboyCbI1rQg6EI5rs+8IYagVcfVP2yZFKfWNZy0rK0Hw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.2.0.tgz", + "integrity": "sha512-aQdzTX1YiufkXA1teXZu5xXOJgy7wZQw6OJ0iH5CtQlOETe6gTSocaYKUNui1SzQ91xmqEUZ/WRavg9FD82rtQ==", "dev": true, "requires": { "jest-get-type": "^26.0.0", - "pretty-format": "^26.1.0" + "pretty-format": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4147,12 +4183,12 @@ "dev": true }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -4161,25 +4197,26 @@ } }, "jest-matcher-utils": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.1.0.tgz", - "integrity": "sha512-PW9JtItbYvES/xLn5mYxjMd+Rk+/kIt88EfH3N7w9KeOrHWaHrdYPnVHndGbsFGRJ2d5gKtwggCvkqbFDoouQA==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.2.0.tgz", + "integrity": "sha512-2cf/LW2VFb3ayPHrH36ZDjp9+CAeAe/pWBAwsV8t3dKcrINzXPVxq8qMWOxwt5BaeBCx4ZupVGH7VIgB8v66vQ==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^26.1.0", + "jest-diff": "^26.2.0", "jest-get-type": "^26.0.0", - "pretty-format": "^26.1.0" + "pretty-format": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4201,15 +4238,15 @@ "dev": true }, "jest-diff": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.1.0.tgz", - "integrity": "sha512-GZpIcom339y0OXznsEKjtkfKxNdg7bVbEofK8Q6MnevTIiR1jNhDWKhRX6X0SDXJlwn3dy59nZ1z55fLkAqPWg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.2.0.tgz", + "integrity": "sha512-Wu4Aopi2nzCsHWLBlD48TgRy3Z7OsxlwvHNd1YSnHc7q1NJfrmyCPoUXrTIrydQOG5ApaYpsAsdfnMbJqV1/wQ==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^26.0.0", "jest-get-type": "^26.0.0", - "pretty-format": "^26.1.0" + "pretty-format": "^26.2.0" } }, "jest-get-type": { @@ -4219,12 +4256,12 @@ "dev": true }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -4233,13 +4270,13 @@ } }, "jest-message-util": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.1.0.tgz", - "integrity": "sha512-dY0+UlldiAJwNDJ08SF0HdF32g9PkbF2NRK/+2iMPU40O6q+iSn1lgog/u0UH8ksWoPv0+gNq8cjhYO2MFtT0g==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.2.0.tgz", + "integrity": "sha512-g362RhZaJuqeqG108n1sthz5vNpzTNy926eNDszo4ncRbmmcMRIUAZibnd6s5v2XSBCChAxQtCoN25gnzp7JbQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "@types/stack-utils": "^1.0.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -4249,13 +4286,14 @@ }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4273,22 +4311,24 @@ } }, "jest-mock": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.1.0.tgz", - "integrity": "sha512-1Rm8EIJ3ZFA8yCIie92UbxZWj9SuVmUGcyhLHyAhY6WI3NIct38nVcfOPWhJteqSn8V8e3xOMha9Ojfazfpovw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.2.0.tgz", + "integrity": "sha512-XeC7yWtWmWByoyVOHSsE7NYsbXJLtJNgmhD7z4MKumKm6ET0si81bsSLbQ64L5saK3TgsHo2B/UqG5KNZ1Sp/Q==", "dev": true, "requires": { - "@jest/types": "^26.1.0" + "@jest/types": "^26.2.0", + "@types/node": "*" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4318,29 +4358,30 @@ "dev": true }, "jest-resolve": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.1.0.tgz", - "integrity": "sha512-KsY1JV9FeVgEmwIISbZZN83RNGJ1CC+XUCikf/ZWJBX/tO4a4NvA21YixokhdR9UnmPKKAC4LafVixJBrwlmfg==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.2.2.tgz", + "integrity": "sha512-ye9Tj/ILn/0OgFPE/3dGpQPUqt4dHwIocxt5qSBkyzxQD8PbL0bVxBogX2FHxsd3zJA7V2H/cHXnBnNyyT9YoQ==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", - "jest-pnp-resolver": "^1.2.1", - "jest-util": "^26.1.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.2.0", "read-pkg-up": "^7.0.1", "resolve": "^1.17.0", "slash": "^3.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4399,9 +4440,9 @@ "dev": true }, "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.1.tgz", + "integrity": "sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -4450,24 +4491,25 @@ } }, "jest-resolve-dependencies": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.1.0.tgz", - "integrity": "sha512-fQVEPHHQ1JjHRDxzlLU/buuQ9om+hqW6Vo928aa4b4yvq4ZHBtRSDsLdKQLuCqn5CkTVpYZ7ARh2fbA8WkRE6g==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.2.2.tgz", + "integrity": "sha512-S5vufDmVbQXnpP7435gr710xeBGUFcKNpNswke7RmFvDQtmqPjPVU/rCeMlEU0p6vfpnjhwMYeaVjKZAy5QYJA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "jest-regex-util": "^26.0.0", - "jest-snapshot": "^26.1.0" + "jest-snapshot": "^26.2.2" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4485,40 +4527,42 @@ } }, "jest-runner": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.1.0.tgz", - "integrity": "sha512-elvP7y0fVDREnfqit0zAxiXkDRSw6dgCkzPCf1XvIMnSDZ8yogmSKJf192dpOgnUVykmQXwYYJnCx641uLTgcw==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.2.2.tgz", + "integrity": "sha512-/qb6ptgX+KQ+aNMohJf1We695kaAfuu3u3ouh66TWfhTpLd9WbqcF6163d/tMoEY8GqPztXPLuyG0rHRVDLxCA==", "dev": true, "requires": { - "@jest/console": "^26.1.0", - "@jest/environment": "^26.1.0", - "@jest/test-result": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/console": "^26.2.0", + "@jest/environment": "^26.2.0", + "@jest/test-result": "^26.2.0", + "@jest/types": "^26.2.0", + "@types/node": "*", "chalk": "^4.0.0", + "emittery": "^0.7.1", "exit": "^0.1.2", "graceful-fs": "^4.2.4", - "jest-config": "^26.1.0", + "jest-config": "^26.2.2", "jest-docblock": "^26.0.0", - "jest-haste-map": "^26.1.0", - "jest-jasmine2": "^26.1.0", - "jest-leak-detector": "^26.1.0", - "jest-message-util": "^26.1.0", - "jest-resolve": "^26.1.0", - "jest-runtime": "^26.1.0", - "jest-util": "^26.1.0", - "jest-worker": "^26.1.0", + "jest-haste-map": "^26.2.2", + "jest-leak-detector": "^26.2.0", + "jest-message-util": "^26.2.0", + "jest-resolve": "^26.2.2", + "jest-runtime": "^26.2.2", + "jest-util": "^26.2.0", + "jest-worker": "^26.2.1", "source-map-support": "^0.5.6", "throat": "^5.0.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4536,47 +4580,48 @@ } }, "jest-runtime": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.1.0.tgz", - "integrity": "sha512-1qiYN+EZLmG1QV2wdEBRf+Ci8i3VSfIYLF02U18PiUDrMbhfpN/EAMMkJtT02jgJUoaEOpHAIXG6zS3QRMzRmA==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.2.2.tgz", + "integrity": "sha512-a8VXM3DxCDnCIdl9+QucWFfQ28KdqmyVFqeKLigHdErtsx56O2ZIdQkhFSuP1XtVrG9nTNHbKxjh5XL1UaFDVQ==", "dev": true, "requires": { - "@jest/console": "^26.1.0", - "@jest/environment": "^26.1.0", - "@jest/fake-timers": "^26.1.0", - "@jest/globals": "^26.1.0", + "@jest/console": "^26.2.0", + "@jest/environment": "^26.2.0", + "@jest/fake-timers": "^26.2.0", + "@jest/globals": "^26.2.0", "@jest/source-map": "^26.1.0", - "@jest/test-result": "^26.1.0", - "@jest/transform": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/test-result": "^26.2.0", + "@jest/transform": "^26.2.2", + "@jest/types": "^26.2.0", "@types/yargs": "^15.0.0", "chalk": "^4.0.0", "collect-v8-coverage": "^1.0.0", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.2.4", - "jest-config": "^26.1.0", - "jest-haste-map": "^26.1.0", - "jest-message-util": "^26.1.0", - "jest-mock": "^26.1.0", + "jest-config": "^26.2.2", + "jest-haste-map": "^26.2.2", + "jest-message-util": "^26.2.0", + "jest-mock": "^26.2.0", "jest-regex-util": "^26.0.0", - "jest-resolve": "^26.1.0", - "jest-snapshot": "^26.1.0", - "jest-util": "^26.1.0", - "jest-validate": "^26.1.0", + "jest-resolve": "^26.2.2", + "jest-snapshot": "^26.2.2", + "jest-util": "^26.2.0", + "jest-validate": "^26.2.0", "slash": "^3.0.0", "strip-bom": "^4.0.0", "yargs": "^15.3.1" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4600,45 +4645,47 @@ } }, "jest-serializer": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.1.0.tgz", - "integrity": "sha512-eqZOQG/0+MHmr25b2Z86g7+Kzd5dG9dhCiUoyUNJPgiqi38DqbDEOlHcNijyfZoj74soGBohKBZuJFS18YTJ5w==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.2.0.tgz", + "integrity": "sha512-V7snZI9IVmyJEu0Qy0inmuXgnMWDtrsbV2p9CRAcmlmPVwpC2ZM8wXyYpiugDQnwLHx0V4+Pnog9Exb3UO8M6Q==", "dev": true, "requires": { + "@types/node": "*", "graceful-fs": "^4.2.4" } }, "jest-snapshot": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.1.0.tgz", - "integrity": "sha512-YhSbU7eMTVQO/iRbNs8j0mKRxGp4plo7sJ3GzOQ0IYjvsBiwg0T1o0zGQAYepza7lYHuPTrG5J2yDd0CE2YxSw==", + "version": "26.2.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.2.2.tgz", + "integrity": "sha512-NdjD8aJS7ePu268Wy/n/aR1TUisG0BOY+QOW4f6h46UHEKOgYmmkvJhh2BqdVZQ0BHSxTMt04WpCf9njzx8KtA==", "dev": true, "requires": { "@babel/types": "^7.0.0", - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.1.0", + "expect": "^26.2.0", "graceful-fs": "^4.2.4", - "jest-diff": "^26.1.0", + "jest-diff": "^26.2.0", "jest-get-type": "^26.0.0", - "jest-haste-map": "^26.1.0", - "jest-matcher-utils": "^26.1.0", - "jest-message-util": "^26.1.0", - "jest-resolve": "^26.1.0", + "jest-haste-map": "^26.2.2", + "jest-matcher-utils": "^26.2.0", + "jest-message-util": "^26.2.0", + "jest-resolve": "^26.2.2", "natural-compare": "^1.4.0", - "pretty-format": "^26.1.0", + "pretty-format": "^26.2.0", "semver": "^7.3.2" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4660,15 +4707,15 @@ "dev": true }, "jest-diff": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.1.0.tgz", - "integrity": "sha512-GZpIcom339y0OXznsEKjtkfKxNdg7bVbEofK8Q6MnevTIiR1jNhDWKhRX6X0SDXJlwn3dy59nZ1z55fLkAqPWg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.2.0.tgz", + "integrity": "sha512-Wu4Aopi2nzCsHWLBlD48TgRy3Z7OsxlwvHNd1YSnHc7q1NJfrmyCPoUXrTIrydQOG5ApaYpsAsdfnMbJqV1/wQ==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^26.0.0", "jest-get-type": "^26.0.0", - "pretty-format": "^26.1.0" + "pretty-format": "^26.2.0" } }, "jest-get-type": { @@ -4678,12 +4725,12 @@ "dev": true }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -4692,12 +4739,13 @@ } }, "jest-util": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.1.0.tgz", - "integrity": "sha512-rNMOwFQevljfNGvbzNQAxdmXQ+NawW/J72dmddsK0E8vgxXCMtwQ/EH0BiWEIxh0hhMcTsxwAxINt7Lh46Uzbg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.2.0.tgz", + "integrity": "sha512-YmDwJxLZ1kFxpxPfhSJ0rIkiZOM0PQbRcfH0TzJOhqCisCAsI1WcmoQqO83My9xeVA2k4n+rzg2UuexVKzPpig==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", + "@types/node": "*", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "is-ci": "^2.0.0", @@ -4705,13 +4753,14 @@ }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4729,27 +4778,28 @@ } }, "jest-validate": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.1.0.tgz", - "integrity": "sha512-WPApOOnXsiwhZtmkDsxnpye+XLb/tUISP+H6cHjfUIXvlG+eKwP+isnivsxlHCPaO9Q5wvbhloIBkdF3qUn+Nw==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.2.0.tgz", + "integrity": "sha512-8XKn3hM6VIVmLNuyzYLCPsRCT83o8jMZYhbieh4dAyKLc4Ypr36rVKC+c8WMpWkfHHpGnEkvWUjjIAyobEIY/Q==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "camelcase": "^6.0.0", "chalk": "^4.0.0", "jest-get-type": "^26.0.0", "leven": "^3.1.0", - "pretty-format": "^26.1.0" + "pretty-format": "^26.2.0" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4777,12 +4827,12 @@ "dev": true }, "pretty-format": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.1.0.tgz", - "integrity": "sha512-GmeO1PEYdM+non4BKCj+XsPJjFOJIPnsLewqhDVoqY1xo0yNmDas7tC2XwpMrRAHR3MaE2hPo37deX5OisJ2Wg==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.2.0.tgz", + "integrity": "sha512-qi/8IuBu2clY9G7qCXgCdD1Bf9w+sXakdHTRToknzMtVy0g7c4MBWaZy7MfB7ndKZovRO6XRwJiAYqq+MC7SDA==", "dev": true, "requires": { - "@jest/types": "^26.1.0", + "@jest/types": "^26.2.0", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", "react-is": "^16.12.0" @@ -4791,27 +4841,29 @@ } }, "jest-watcher": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.1.0.tgz", - "integrity": "sha512-ffEOhJl2EvAIki613oPsSG11usqnGUzIiK7MMX6hE4422aXOcVEG3ySCTDFLn1+LZNXGPE8tuJxhp8OBJ1pgzQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.2.0.tgz", + "integrity": "sha512-674Boco4Joe0CzgKPL6K4Z9LgyLx+ZvW2GilbpYb8rFEUkmDGgsZdv1Hv5rxsRpb1HLgKUOL/JfbttRCuFdZXQ==", "dev": true, "requires": { - "@jest/test-result": "^26.1.0", - "@jest/types": "^26.1.0", + "@jest/test-result": "^26.2.0", + "@jest/types": "^26.2.0", + "@types/node": "*", "ansi-escapes": "^4.2.1", "chalk": "^4.0.0", - "jest-util": "^26.1.0", + "jest-util": "^26.2.0", "string-length": "^4.0.1" }, "dependencies": { "@jest/types": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.1.0.tgz", - "integrity": "sha512-GXigDDsp6ZlNMhXQDeuy/iYCDsRIHJabWtDzvnn36+aqFfG14JmFV0e/iXxY4SP9vbXSiPNOWdehU5MeqrYHBQ==", + "version": "26.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.2.0.tgz", + "integrity": "sha512-lvm3rJvctxd7+wxKSxxbzpDbr4FXDLaC57WEKdUIZ2cjTYuxYSc0zlyD7Z4Uqr5VdKxRUrtwIkiqBuvgf8uKJA==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-reports": "^1.1.1", + "@types/node": "*", "@types/yargs": "^15.0.0", "chalk": "^4.0.0" } @@ -4829,11 +4881,12 @@ } }, "jest-worker": { - "version": "26.1.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.1.0.tgz", - "integrity": "sha512-Z9P5pZ6UC+kakMbNJn+tA2RdVdNX5WH1x+5UCBZ9MxIK24pjYtFt96fK+UwBTrjLYm232g1xz0L3eTh51OW+yQ==", + "version": "26.2.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.2.1.tgz", + "integrity": "sha512-+XcGMMJDTeEGncRb5M5Zq9P7K4sQ1sirhjdOxsN1462h6lFo9w59bl2LVQmdGEEeU3m+maZCkS2Tcc9SfCHO4A==", "dev": true, "requires": { + "@types/node": "*", "merge-stream": "^2.0.0", "supports-color": "^7.0.0" } @@ -5204,17 +5257,17 @@ "dev": true }, "node-notifier": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-7.0.1.tgz", - "integrity": "sha512-VkzhierE7DBmQEElhTGJIoiZa1oqRijOtgOlsXg32KrJRXsPy0NXFBqWGW/wTswnJlDCs5viRYaqWguqzsKcmg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-7.0.2.tgz", + "integrity": "sha512-ux+n4hPVETuTL8+daJXTOC6uKLgMsl1RYfFv7DKRzyvzBapqco0rZZ9g72ZN8VS6V+gvNYHYa/ofcCY8fkJWsA==", "dev": true, "optional": true, "requires": { "growly": "^1.3.0", - "is-wsl": "^2.1.1", - "semver": "^7.2.1", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", "shellwords": "^0.1.1", - "uuid": "^7.0.3", + "uuid": "^8.2.0", "which": "^2.0.2" } }, @@ -5368,9 +5421,9 @@ } }, "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.1.tgz", + "integrity": "sha512-ZpZpjcJeugQfWsfyQlshVoowIIQ1qBGSVll4rfDq6JJVO//fesjoX808hXWfBjY+ROZgpKDI5TRSRBSoJiZ8eg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -5731,21 +5784,21 @@ } }, "request-promise-core": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", - "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", "dev": true, "requires": { - "lodash": "^4.17.15" + "lodash": "^4.17.19" } }, "request-promise-native": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.8.tgz", - "integrity": "sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", "dev": true, "requires": { - "request-promise-core": "1.1.3", + "request-promise-core": "1.1.4", "stealthy-require": "^1.1.1", "tough-cookie": "^2.3.3" }, @@ -6634,9 +6687,9 @@ } }, "ts-jest": { - "version": "26.1.3", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.1.3.tgz", - "integrity": "sha512-beUTSvuqR9SmKQEylewqJdnXWMVGJRFqSz2M8wKJe7GBMmLZ5zw6XXKSJckbHNMxn+zdB3guN2eOucSw2gBMnw==", + "version": "26.1.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.1.4.tgz", + "integrity": "sha512-Nd7diUX6NZWfWq6FYyvcIPR/c7GbEF75fH1R6coOp3fbNzbRJBZZAn0ueVS0r8r9ral1VcrpneAFAwB3TsVS1Q==", "dev": true, "requires": { "bs-logger": "0.x", @@ -6825,9 +6878,9 @@ "dev": true }, "uuid": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz", - "integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", + "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==", "dev": true, "optional": true }, diff --git a/package.json b/package.json index c0745553..479f3034 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-php", - "version": "2.4.0", + "version": "2.4.1", "private": false, "description": "Setup PHP for use with GitHub Actions", "main": "dist/index.js", @@ -31,21 +31,21 @@ "fs": "0.0.1-security" }, "devDependencies": { - "@types/jest": "^26.0.5", - "@types/node": "^14.0.23", - "@typescript-eslint/eslint-plugin": "^3.6.1", - "@typescript-eslint/parser": "^3.6.1", + "@types/jest": "^26.0.8", + "@types/node": "^14.0.27", + "@typescript-eslint/eslint-plugin": "^3.7.1", + "@typescript-eslint/parser": "^3.7.1", "@zeit/ncc": "^0.22.3", - "eslint": "^7.5.0", + "eslint": "^7.6.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-import": "^2.22.0", - "eslint-plugin-jest": "^23.18.0", + "eslint-plugin-jest": "^23.20.0", "eslint-plugin-prettier": "^3.1.4", "husky": "^4.2.5", - "jest": "^26.1.0", - "jest-circus": "^26.1.0", + "jest": "^26.2.2", + "jest-circus": "^26.2.2", "prettier": "^2.0.5", - "ts-jest": "^26.1.3", + "ts-jest": "^26.1.4", "typescript": "^3.9.7" }, "husky": { diff --git a/src/extensions.ts b/src/extensions.ts index e694d994..4870ee60 100644 --- a/src/extensions.ts +++ b/src/extensions.ts @@ -2,24 +2,21 @@ import * as path from 'path'; import * as utils from './utils'; /** - * Function to get Xdebug version compatible with php versions + * Function to get script to install custom extensions * - * @param version + * @param script + * @param command */ -export async function getXdebugVersion(version: string): Promise { - switch (version) { - case '5.3': - return '2.2.7'; - case '5.4': - return '2.4.1'; - case '5.5': - case '5.6': - return '2.5.5'; - case '7.0': - return '2.7.2'; - default: - return '2.9.6'; - } +export async function customExtension( + script: string, + ...command: string[] +): Promise { + return ( + '\n. ' + + path.join(__dirname, '../src/scripts/ext/' + script) + + '\n' + + (await utils.joins(...command)) + ); } /** @@ -41,7 +38,7 @@ export async function addExtensionDarwin( const version_extension: string = version + extension; const [ext_name, ext_version]: string[] = extension.split('-'); const ext_prefix = await utils.getExtensionPrefix(ext_name); - const command_prefix = 'sudo pecl install -f '; + const command_prefix = 'pecl_install '; let command = ''; switch (true) { // match :extension @@ -53,44 +50,55 @@ export async function addExtensionDarwin( case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test( version_extension ): - command = - 'bash ' + - path.join(__dirname, '../src/scripts/ext/blackfire_darwin.sh') + - ' ' + - version + - ' ' + - extension; - break; + add_script += await customExtension( + 'blackfire.sh', + 'add_blackfire', + extension + ); + return; + // match pdo_oci and oci8 + case /^pdo_oci$|^oci8$/.test(extension): + add_script += await customExtension('oci.sh', 'add_oci', extension); + return; + // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube + case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): + add_script += await customExtension('ioncube.sh', 'add_ioncube'); + return; + // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 + case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): + add_script += await customExtension( + 'phalcon.sh', + 'add_phalcon', + extension + ); + return; // match pre-release versions. For example - xdebug-beta case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): - add_script += - '\nadd_unstable_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; + add_script += await utils.joins( + '\nadd_unstable_extension', + ext_name, + ext_version, + ext_prefix + ); return; // match semver case /.*-\d+\.\d+\.\d+.*/.test(version_extension): - add_script += - '\nadd_pecl_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; + add_script += await utils.joins( + '\nadd_pecl_extension', + ext_name, + ext_version, + ext_prefix + ); + return; + // match 5.3pcov to 7.0pcov + case /(5\.[3-6]|7\.0)pcov/.test(version_extension): + add_script += await utils.getUnsupportedLog('pcov', version, 'darwin'); return; - // match 5.3xdebug...5.5xdebug - case /5\.[3-5]xdebug/.test(version_extension): - command = - command_prefix + 'xdebug-' + (await getXdebugVersion(version)); - break; // match 5.6xdebug to 8.0xdebug, 5.6swoole to 8.0swoole // match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf // match 7.1pcov to 8.0pcov - case /(5\.6|7\.[0-4]|8\.[0-9])(xdebug|swoole)/.test(version_extension): - case /(5\.6|7\.[0-4])(grpc|protobuf)/.test(version_extension): + case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension): + case /(5\.6|7\.[0-4])(grpc|protobuf|swoole)/.test(version_extension): case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension): command = 'add_brew_extension ' + ext_name; break; @@ -100,53 +108,26 @@ export async function addExtensionDarwin( break; // match imagick case /^imagick$/.test(extension): - command = - 'brew install pkg-config imagemagick' + - pipe + - ' && ' + - command_prefix + - 'imagick' + - pipe; + command = await utils.joins( + 'brew install pkg-config imagemagick' + pipe, + '&& ' + command_prefix + 'imagick' + pipe + ); break; // match sqlite case /^sqlite$/.test(extension): extension = 'sqlite3'; command = command_prefix + extension; break; - // match pdo_oci and oci8 - case /^pdo_oci$|^oci8$/.test(extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/oci.sh') + - ' ' + - extension + - ' ' + - version; - return; - // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube - case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/ioncube.sh') + - ' ' + - version; - return; - // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 - case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/phalcon_darwin.sh') + - ' ' + - extension + - ' ' + - version; - return; default: command = command_prefix + extension; break; } - add_script += - '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; + add_script += await utils.joins( + '\nadd_extension', + extension, + '"' + command + '"', + ext_prefix + ); }); return add_script + remove_script; } @@ -172,28 +153,51 @@ export async function addExtensionWindows( // Match :extension case /^:/.test(ext_name): remove_script += '\nRemove-Extension ' + ext_name.slice(1); - return; + break; // match 5.4blackfire...5.6blackfire, 7.0blackfire...7.4blackfire // match 5.4blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0 case /^(5\.[4-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test( version_extension ): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/blackfire.ps1') + - ' ' + - version + - ' ' + - extension; - return; + add_script += await customExtension( + 'blackfire.ps1', + 'Add-Blackfire', + extension + ); + break; + // match pdo_oci and oci8 + case /^pdo_oci$|^oci8$/.test(extension): + add_script += await customExtension('oci.ps1', 'Add-OCI', extension); + break; + // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube + case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): + add_script += await customExtension('ioncube.ps1', 'Add-Ioncube'); + break; + // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 + case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): + add_script += await customExtension( + 'phalcon.ps1', + 'Add-Phalcon', + extension + ); + break; // match pre-release versions. For example - xdebug-beta case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): - add_script += '\nAdd-Extension ' + ext_name + ' ' + ext_version; + add_script += await utils.joins( + '\nAdd-Extension', + ext_name, + ext_version + ); break; // match semver without state case /.*-\d+\.\d+\.\d+$/.test(version_extension): - add_script += '\nAdd-Extension ' + ext_name + ' stable ' + ext_version; - return; + add_script += await utils.joins( + '\nAdd-Extension', + ext_name, + 'stable', + ext_version + ); + break; // match semver with state case /.*-(\d+\.\d+\.\d)(beta|alpha|devel|snapshot)\d*/.test( version_extension @@ -201,9 +205,17 @@ export async function addExtensionWindows( matches = /.*-(\d+\.\d+\.\d)(beta|alpha|devel|snapshot)\d*/.exec( version_extension ) as RegExpExecArray; - add_script += - '\nAdd-Extension ' + ext_name + ' ' + matches[2] + ' ' + matches[1]; - return; + add_script += await utils.joins( + '\nAdd-Extension', + ext_name, + matches[2], + matches[1] + ); + break; + // match 5.3pcov to 7.0pcov + case /(5\.[3-6]|7\.0)pcov/.test(version_extension): + add_script += await utils.getUnsupportedLog('pcov', version, 'win32'); + break; // match 5.3mysql..5.6mysql // match 5.3mysqli..5.6mysqli // match 5.3mysqlnd..5.6mysqlnd @@ -220,38 +232,7 @@ export async function addExtensionWindows( // match sqlite case /^sqlite$/.test(extension): extension = 'sqlite3'; - add_script += '\nAdd-Extension ' + extension; - break; - // match pdo_oci and oci8 - case /^pdo_oci$|^oci8$/.test(extension): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/oci.ps1') + - ' ' + - extension + - ' ' + - version + - '\n'; - break; - // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube - case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/ioncube.ps1') + - ' ' + - version + - '\n'; - break; - // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 - case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): - add_script += - '\n& ' + - path.join(__dirname, '../src/scripts/ext/phalcon.ps1') + - ' ' + - extension + - ' ' + - version + - '\n'; + add_script += await utils.joins('\nAdd-Extension', extension); break; default: add_script += '\nAdd-Extension ' + extension; @@ -292,70 +273,53 @@ export async function addExtensionLinux( case /^(5\.[3-6]|7\.[0-4])blackfire(-\d+\.\d+\.\d+)?$/.test( version_extension ): - command = - 'bash ' + - path.join(__dirname, '../src/scripts/ext/blackfire.sh') + - ' ' + - version + - ' ' + - extension; - break; - // match pre-release versions. For example - xdebug-beta - case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): - add_script += - '\nadd_unstable_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; + add_script += await customExtension( + 'blackfire.sh', + 'add_blackfire', + extension + ); return; - // match semver versions - case /.*-\d+\.\d+\.\d+.*/.test(version_extension): - add_script += - '\nadd_pecl_extension ' + - ext_name + - ' ' + - ext_version + - ' ' + - ext_prefix; - return; - // match 5.6gearman..7.4gearman - case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension): - command = - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/gearman.sh') + - ' ' + - version + - pipe; - break; // match pdo_oci and oci8 case /^pdo_oci$|^oci8$/.test(extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/oci.sh') + - ' ' + - extension + - ' ' + - version; + add_script += await customExtension('oci.sh', 'add_oci', extension); return; // match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube case /^5\.[3-6]ioncube$|^7\.[0-4]ioncube$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/ioncube.sh') + - ' ' + - version; + add_script += await customExtension('ioncube.sh', 'add_ioncube'); return; - // match 7.0phalcon3...7.3phalcon3 or 7.2phalcon4...7.4phalcon4 + // match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4 case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension): - add_script += - '\nbash ' + - path.join(__dirname, '../src/scripts/ext/phalcon.sh') + - ' ' + - extension + - ' ' + - version; + add_script += await customExtension( + 'phalcon.sh', + 'add_phalcon', + extension + ); + return; + // match 5.6gearman..7.4gearman + case /^((5\.6)|(7\.[0-4]))gearman$/.test(version_extension): + add_script += await customExtension('gearman.sh', 'add_gearman'); + return; + // match pre-release versions. For example - xdebug-beta + case /.*-(beta|alpha|devel|snapshot)/.test(version_extension): + add_script += await utils.joins( + '\nadd_unstable_extension', + ext_name, + ext_version, + ext_prefix + ); + return; + // match semver versions + case /.*-\d+\.\d+\.\d+.*/.test(version_extension): + add_script += await utils.joins( + '\nadd_pecl_extension', + ext_name, + ext_version, + ext_prefix + ); + return; + // match 5.3pcov to 7.0pcov + case /(5\.[3-6]|7\.0)pcov/.test(version_extension): + add_script += await utils.getUnsupportedLog('pcov', version, 'linux'); return; // match 7.2xdebug3..7.4xdebug3 case /^7\.[2-4]xdebug3$/.test(version_extension): @@ -367,20 +331,9 @@ export async function addExtensionLinux( extension = 'xdebug'; command = command_prefix + version + '-' + extension + pipe; break; - // match 7.1xdebug..7.4xdebug - case /^7\.[1-4]xdebug$/.test(version_extension): - add_script += - '\nupdate_extension xdebug 2.9.6' + - pipe + - '\n' + - (await utils.addLog('$tick', 'xdebug', 'Enabled', 'linux')); - return; // match pdo extensions case /.*pdo[_-].*/.test(version_extension): - extension = extension - .replace('pdo_', '') - .replace('pdo-', '') - .replace('sqlite3', 'sqlite'); + extension = extension.replace(/pdo[_-]|3/, ''); add_script += '\nadd_pdo_extension ' + extension; return; // match ast and uopz @@ -396,8 +349,12 @@ export async function addExtensionLinux( command = command_prefix + version + '-' + extension + pipe; break; } - add_script += - '\nadd_extension ' + extension + ' "' + command + '" ' + ext_prefix; + add_script += await utils.joins( + '\nadd_extension', + extension, + '"' + command + '"', + ext_prefix + ); }); return add_script + remove_script; } diff --git a/src/scripts/darwin.sh b/src/scripts/darwin.sh index f84fd030..e27c4d59 100644 --- a/src/scripts/darwin.sh +++ b/src/scripts/darwin.sh @@ -16,6 +16,16 @@ add_log() { fi } +# Function to log result of installing extension. +add_extension_log() { + extension=$1 + status=$2 + extension_name=$(echo "$extension" | cut -d '-' -f 1) + ( + check_extension "$extension_name" && add_log "$tick" "$extension_name" "$status" + ) || add_log "$cross" "$extension_name" "Could not install $extension on PHP $semver" +} + # Function to read env inputs. read_env() { [[ -z "${update}" ]] && update='false' && UPDATE='false' || update="${update}" @@ -27,9 +37,9 @@ read_env() { # Function to setup environment for self-hosted runners. self_hosted_setup() { if [[ $(command -v brew) == "" ]]; then - step_log "Setup Brew" - curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash -s >/dev/null 2>&1 - add_log "$tick" "Brew" "Installed Homebrew" + step_log "Setup Brew" + curl "${curl_opts[@]}" https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash -s >/dev/null 2>&1 + add_log "$tick" "Brew" "Installed Homebrew" fi } @@ -41,7 +51,7 @@ remove_extension() { sudo rm -rf "$scan_dir"/*"$extension"* >/dev/null 2>&1 sudo rm -rf "$ext_dir"/"$extension".so >/dev/null 2>&1 (! check_extension "$extension" && add_log "$tick" ":$extension" "Removed") || - add_log "$cross" ":$extension" "Could not remove $extension on PHP $semver" + add_log "$cross" ":$extension" "Could not remove $extension on PHP $semver" else add_log "$tick" ":$extension" "Could not find $extension on PHP $semver" fi @@ -62,7 +72,7 @@ get_pecl_version() { extension=$1 stability="$(echo "$2" | grep -m 1 -Eio "(alpha|beta|rc|snapshot)")" pecl_rest='https://pecl.php.net/rest/r/' - response=$(curl -q -sSL "$pecl_rest$extension"/allreleases.xml) + response=$(curl "${curl_opts[@]}" "$pecl_rest$extension"/allreleases.xml) pecl_version=$(echo "$response" | grep -m 1 -Eio "(\d*\.\d*\.\d*$stability\d*)") if [ ! "$pecl_version" ]; then pecl_version=$(echo "$response" | grep -m 1 -Eo "(\d*\.\d*\.\d*)") @@ -70,6 +80,12 @@ get_pecl_version() { echo "$pecl_version" } +# Function to install PECL extensions and accept default options +pecl_install() { + local extension=$1 + yes '' | sudo pecl install -f "$extension" >/dev/null 2>&1 +} + # Function to install a specific version of PECL extension. add_pecl_extension() { extension=$1 @@ -86,11 +102,8 @@ add_pecl_extension() { add_log "$tick" "$extension" "Enabled" else remove_extension "$extension" >/dev/null 2>&1 - ( - sudo pecl install -f "$extension-$pecl_version" >/dev/null 2>&1 && - check_extension "$extension" && - add_log "$tick" "$extension" "Installed and enabled" - ) || add_log "$cross" "$extension" "Could not install $extension-$pecl_version on PHP $semver" + pecl_install "$extension-$pecl_version" + add_extension_log "$extension-$pecl_version" "Installed and enabled" fi } @@ -115,9 +128,8 @@ add_extension() { add_log "$tick" "$extension" "Enabled" elif ! check_extension "$extension"; then eval "$install_command" >/dev/null 2>&1 && - if [[ "$version" =~ $old_versions ]]; then echo "$prefix=$ext_dir/$extension.so" >>"$ini_file"; fi - (check_extension "$extension" && add_log "$tick" "$extension" "Installed and enabled") || - add_log "$cross" "$extension" "Could not install $extension on PHP $semver" + if [[ "$version" =~ $old_versions ]]; then echo "$prefix=$ext_dir/$extension.so" >>"$ini_file"; fi + add_extension_log "$extension" "Installed and enabled" fi } @@ -137,17 +149,13 @@ configure_composer() { php -r "try {\$p=new Phar('$tool_path.phar', 0);exit(0);} catch(Exception \$e) {exit(1);}" if [ $? -eq 1 ]; then add_log "$cross" "composer" "Could not download composer" - exit 1; + exit 1 fi composer -q global config process-timeout 0 echo "::add-path::/Users/$USER/.composer/vendor/bin" if [ -n "$COMPOSER_TOKEN" ]; then composer -q global config github-oauth.github.com "$COMPOSER_TOKEN" fi - # TODO: Remove after composer 2.0 update, fixes peer fingerprint error - if [[ "$version" =~ $old_versions ]]; then - composer -q global config repos.packagist composer https://repo-ca-bhs-1.packagist.org - fi } # Function to setup a remote tool. @@ -159,18 +167,18 @@ add_tool() { rm -rf "$tool_path" fi - status_code=$(sudo curl -s -w "%{http_code}" -o "$tool_path" -L "$url") + status_code=$(sudo curl -s -w "%{http_code}" -o "$tool_path" "${curl_opts[@]}" "$url") if [ "$status_code" = "200" ]; then sudo chmod a+x "$tool_path" if [ "$tool" = "composer" ]; then configure_composer "$tool_path" elif [ "$tool" = "phan" ]; then - add_extension fileinfo "sudo pecl install -f fileinfo" extension >/dev/null 2>&1 - add_extension ast "sudo pecl install -f ast" extension >/dev/null 2>&1 + add_extension fileinfo "pecl_install fileinfo" extension >/dev/null 2>&1 + add_extension ast "pecl_install ast" extension >/dev/null 2>&1 elif [ "$tool" = "phive" ]; then - add_extension curl "sudo pecl install -f curl" extension >/dev/null 2>&1 - add_extension mbstring "sudo pecl install -f mbstring" extension >/dev/null 2>&1 - add_extension xml "sudo pecl install -f xml" extension >/dev/null 2>&1 + add_extension curl "pecl_install curl" extension >/dev/null 2>&1 + add_extension mbstring "pecl_install mbstring" extension >/dev/null 2>&1 + add_extension xml "pecl_install xml" extension >/dev/null 2>&1 elif [ "$tool" = "cs2pr" ]; then sudo sed -i '' 's/exit(9)/exit(0)/' "$tool_path" tr -d '\r' <"$tool_path" | sudo tee "$tool_path.tmp" >/dev/null 2>&1 && sudo mv "$tool_path.tmp" "$tool_path" @@ -190,26 +198,10 @@ add_composertool() { release=$2 prefix=$3 ( - composer global require "$prefix$release" >/dev/null 2>&1 && - add_log "$tick" "$tool" "Added" + composer global require "$prefix$release" >/dev/null 2>&1 && add_log "$tick" "$tool" "Added" ) || add_log "$cross" "$tool" "Could not setup $tool" } -add_blackfire() { - sudo mkdir -p usr/local/var/run - brew tap --shallow blackfireio/homebrew-blackfire >/dev/null 2>&1 - brew install blackfire-agent >/dev/null 2>&1 - if [[ -n $BLACKFIRE_SERVER_ID ]] && [[ -n $BLACKFIRE_SERVER_TOKEN ]]; then - blackfire-agent --register --server-id="$BLACKFIRE_SERVER_ID" --server-token="$BLACKFIRE_SERVER_TOKEN" >/dev/null 2>&1 - brew services start blackfire-agent >/dev/null 2>&1 - fi - if [[ -n $BLACKFIRE_CLIENT_ID ]] && [[ -n $BLACKFIRE_CLIENT_TOKEN ]]; then - blackfire config --client-id="$BLACKFIRE_CLIENT_ID" --client-token="$BLACKFIRE_CLIENT_TOKEN" >/dev/null 2>&1 - fi - add_log "$tick" "blackfire" "Added" - add_log "$tick" "blackfire-agent" "Added" -} - # Function to configure PECL configure_pecl() { for tool in pear pecl; do @@ -243,6 +235,7 @@ version=$1 nodot_version=${1/./} old_versions="5.[3-5]" tool_path_dir="/usr/local/bin" +curl_opts=(-sSL --retry 5 --retry-delay 1) existing_version=$(php-config --version 2>/dev/null | cut -c 1-3) read_env @@ -258,7 +251,7 @@ fi # Setup PHP step_log "Setup PHP" if [[ "$version" =~ $old_versions ]]; then - curl -sSL https://github.com/shivammathur/php5-darwin/releases/latest/download/install.sh | bash -s "$nodot_version" >/dev/null 2>&1 && + curl "${curl_opts[@]}" https://github.com/shivammathur/php5-darwin/releases/latest/download/install.sh | bash -s "$nodot_version" >/dev/null 2>&1 status="Installed" elif [ "$existing_version" != "$version" ]; then setup_php "install" >/dev/null 2>&1 diff --git a/src/scripts/ext/blackfire.ps1 b/src/scripts/ext/blackfire.ps1 index 3de80037..f889881d 100644 --- a/src/scripts/ext/blackfire.ps1 +++ b/src/scripts/ext/blackfire.ps1 @@ -1,35 +1,28 @@ -Param ( +# Function to install blackfire extension. +Function Add-Blackfire() { + Param ( [Parameter(Position = 0, Mandatory = $true)] [ValidateNotNull()] [string] - $version, - [Parameter(Position = 1, Mandatory = $true)] - [ValidateNotNull()] - [string] $extension -) - -$tick = ([char]8730) -$php_dir = 'C:\tools\php' -if($env:RUNNER -eq 'self-hosted') { $php_dir = "$php_dir$version" } -$ext_dir = "$php_dir\ext" -$arch='x64' -if ($version -lt '7.0') { $arch='x86' } -$version = $version.replace('.', '') -$extension_version = $extension.split('-')[1] -if ($extension_version -notmatch "\S") { - $ext_data = Invoke-WebRequest https://blackfire.io/docs/up-and-running/update | ForEach-Object { $_.tostring() -split "[`r`n]" | Select-String '' | Select-Object -Index 2 } - $extension_version = [regex]::Matches($ext_data, '(.+)') | ForEach-Object { $_.Captures[0].Groups[1].value } + ) + try { + $no_dot_version = $version.replace('.', '') + $extension_version = $extension.split('-')[1] + if ($extension_version -notmatch "\S") { + $extension_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).probe.php + } + if (Test-Path $ext_dir\blackfire.dll) { + Enable-PhpExtension -Extension blackfire -Path $php_dir + $status="Enabled" + } else { + $nts = if (!$installed.ThreadSafe) { "_nts" } else { "" } + Invoke-WebRequest -UseBasicParsing -Uri "https://packages.blackfire.io/binaries/blackfire-php/${extension_version}/blackfire-php-windows_${arch}-php-${no_dot_version}${nts}.dll" -OutFile $ext_dir\blackfire.dll > $null 2>&1 + Enable-PhpExtension -Extension blackfire -Path $php_dir + $status="Installed and enabled" + } + Add-Log $tick $extension $status + } catch { + Add-Log $cross $extension "Could not install $extension on PHP $($installed.FullVersion)" + } } -if (Test-Path $ext_dir\blackfire.dll) { - Enable-PhpExtension -Extension blackfire -Path $php_dir - $status="Enabled" -} else { - $installed = Get-Php -Path $php_dir - $nts = if (!$installed.ThreadSafe) { "_nts" } else { "" } - Invoke-WebRequest -UseBasicParsing -Uri "https://packages.blackfire.io/binaries/blackfire-php/${extension_version}/blackfire-php-windows_${arch}-php-${version}${nts}.dll" -OutFile $ext_dir\blackfire.dll > $null 2>&1 - Enable-PhpExtension -Extension blackfire -Path $php_dir - $status="Installed and enabled" -} -printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "32" $tick "blackfire" "$status" - diff --git a/src/scripts/ext/blackfire.sh b/src/scripts/ext/blackfire.sh index ed499108..31ebbdb3 100644 --- a/src/scripts/ext/blackfire.sh +++ b/src/scripts/ext/blackfire.sh @@ -1,11 +1,17 @@ -version=${1/./} -extension=${2} -extension_version=$(echo "$extension" | cut -d '-' -f 2) -if [ "$extension_version" = "blackfire" ]; then - extension_version=$(curl -sSL https://blackfire.io/docs/up-and-running/update | grep 'class="version"' | sed -e 's/<[^>]*>\| //g' | sed -n '3,3p') -fi -ext_dir=$(php -i | grep "extension_dir => /" | sed -e "s|.*=> s*||") -scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||") -ini_file="$scan_dir/50-blackfire.ini" -sudo curl -o $ext_dir/blackfire.so -SL https://packages.blackfire.io/binaries/blackfire-php/$extension_version/blackfire-php-linux_amd64-php-$version.so -echo "extension=blackfire.so" | sudo tee -a "$ini_file" \ No newline at end of file +# Function to install blackfire extension. +add_blackfire() { + extension=$1 + version=${version:?} + no_dot_version=${version/./} + platform=$(uname -s | tr '[:upper:]' '[:lower:]') + extension_version=$(echo "$extension" | cut -d '-' -f 2) + blackfire_ini_file="${scan_dir:?}/50-blackfire.ini" + if [ ! -e "${ext_dir:?}/blackfire.so" ]; then + if [ "$extension_version" = "blackfire" ]; then + extension_version=$(curl -sSL https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3) + fi + sudo curl -o "${ext_dir:?}/blackfire.so" "${curl_opts[@]:?}" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_amd64-php-"$no_dot_version".so >/dev/null 2>&1 + fi + echo "extension=blackfire.so" | sudo tee -a "$blackfire_ini_file" >/dev/null 2>&1 + add_extension_log "$extension-$extension_version" "Installed and enabled" +} diff --git a/src/scripts/ext/blackfire_darwin.sh b/src/scripts/ext/blackfire_darwin.sh deleted file mode 100644 index 34a7bfdd..00000000 --- a/src/scripts/ext/blackfire_darwin.sh +++ /dev/null @@ -1,11 +0,0 @@ -version=${1/./} -extension=${2} -extension_version=$(echo "$extension" | cut -d '-' -f 2) -if [ "$extension_version" = "blackfire" ]; then - extension_version=$(curl -sSL https://blackfire.io/docs/up-and-running/update | grep 'class="version"' | sed -e "s/ //g" | sed -n '3,3p' | cut -d '>' -f 2 | cut -d '<' -f 1) -fi -ext_dir=$(php -i | grep -Ei "extension_dir => /usr" | sed -e "s|.*=> s*||") -scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||") -ini_file="$scan_dir/50-blackfire.ini" -sudo curl -o $ext_dir/blackfire.so -SL https://packages.blackfire.io/binaries/blackfire-php/$extension_version/blackfire-php-darwin_amd64-php-$version.so -echo "extension=blackfire.so" | sudo tee -a "$ini_file" \ No newline at end of file diff --git a/src/scripts/ext/gearman.sh b/src/scripts/ext/gearman.sh index 31e61506..bf3e8681 100644 --- a/src/scripts/ext/gearman.sh +++ b/src/scripts/ext/gearman.sh @@ -1,9 +1,23 @@ -release_version=$(lsb_release -s -r) -sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:ondrej/pkg-gearman -y -sudo DEBIAN_FRONTEND=noninteractive apt-get update -y +# Helper function to add gearman extension. +add_gearman_helper() { + sudo "${debconf_fix:?}" add-apt-repository ppa:ondrej/pkg-gearman -y + if [ -e "${ext_dir:?}/gearman.so" ] && [ "$DISTRIB_RELEASE" != "16.04" ]; then + ${apt_install:?} libgearman-dev + echo "extension=gearman.so" | sudo tee -a "${scan_dir:?}/20-gearman.ini" >/dev/null 2>&1 + else + status="Installed and enabled" + if [ "$DISTRIB_RELEASE" = "16.04" ]; then + sudo "${debconf_fix:?}" apt-get update -y + ${apt_install:?} php"${version:?}"-gearman + else + ${apt_install:?} libgearman-dev php"${version:?}"-gearman + fi + fi +} -if [ "$release_version" = "18.04" ]; then - sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y libgearman-dev php"$1"-gearman -elif [ "$release_version" = "16.04" ]; then - sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$1"-gearman -fi \ No newline at end of file +# Function to add gearman extension. +add_gearman() { + status="Enabled" + add_gearman_helper >/dev/null 2>&1 + add_extension_log "gearman" "$status" +} diff --git a/src/scripts/ext/ioncube.ps1 b/src/scripts/ext/ioncube.ps1 index 53c78ed0..f2af1329 100644 --- a/src/scripts/ext/ioncube.ps1 +++ b/src/scripts/ext/ioncube.ps1 @@ -1,48 +1,32 @@ -Param ( - [Parameter(Position = 0, Mandatory = $true)] - [ValidateNotNull()] - [ValidateLength(1, [int]::MaxValue)] - [string] - $version -) - # Function to log result of a operation. -Function Add-Log($mark, $subject, $message) { - if ($mark -eq $tick) { - printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "32" $mark $subject $message - printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "ioncube" "Click to read the ioncube loader license information" - Get-Content $ext_dir\ioncube\LICENSE.txt - Write-Output "::endgroup::" - } else { - printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "31" $mark $subject $message - } +Function Add-LicenseLog() { + printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "ioncube" "Click to read the ioncube loader license information" + Get-Content $ext_dir\ioncube\LICENSE.txt + Write-Output "::endgroup::" } -$tick = ([char]8730) -$cross = ([char]10007) -$status = 'Enabled' -$php_dir = 'C:\tools\php' -if($env:RUNNER -eq 'self-hosted') { $php_dir = "$php_dir$version" } -$ext_dir = "$php_dir\ext" -$installed = Get-Php $php_dir -try { - if (-not(Test-Path $ext_dir\php_ioncube.dll)) { - $status = 'Installed and enabled' - $arch = 'x86-64' - if (-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') { - $arch = 'x86' +# Function to add ioncube extension. +Function Add-Ioncube() { + try { + if (-not(Test-Path $ext_dir\php_ioncube.dll)) { + $status = 'Installed and enabled' + $arch_part = $arch + if ($arch -eq 'x64') { + $arch_part = 'x86-64' + } + $vc = $installed.VCVersion + $ts_part = "" + if (-not($installed.ThreadSafe)) { + $ts_part = "_nonts" + } + Invoke-WebRequest -UseBasicParsing -Uri "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win$ts_part`_vc$vc`_$arch_part.zip" -OutFile $ext_dir\ioncube.zip + Expand-Archive -Path $ext_dir\ioncube.zip -DestinationPath $ext_dir -Force + Copy-Item $ext_dir\ioncube\ioncube_loader_win_$version.dll $ext_dir\php_ioncube.dll } - $vc = $installed.VCVersion - $ts = "" - if (-not($installed.ThreadSafe)) { - $ts = "_nonts" - } - Invoke-WebRequest -UseBasicParsing -Uri "https://downloads.ioncube.com/loader_downloads/ioncube_loaders_win$ts`_vc$vc`_$arch.zip" -OutFile $ext_dir\ioncube.zip - Expand-Archive -Path $ext_dir\ioncube.zip -DestinationPath $ext_dir -Force - Copy-Item $ext_dir\ioncube\ioncube_loader_win_$version.dll $ext_dir\php_ioncube.dll + "zend_extension=$ext_dir\php_ioncube.dll`r`n" + (Get-Content $php_dir\php.ini -Raw) | Set-Content $php_dir\php.ini + Add-Log $tick "ioncube" $status + Add-LicenseLog + } catch { + Add-Log $cross "ioncube" "Could not install ioncube on PHP $($installed.FullVersion)" } - "zend_extension=$ext_dir\php_ioncube.dll`r`n" + (Get-Content $php_dir\php.ini -Raw) | Set-Content $php_dir\php.ini - Add-Log $tick "ioncube" $status -} catch { - Add-Log $cross "ioncube" "Could not install ioncube on PHP $($installed.FullVersion)" -} \ No newline at end of file +} diff --git a/src/scripts/ext/ioncube.sh b/src/scripts/ext/ioncube.sh index a5d1108e..67e3773e 100644 --- a/src/scripts/ext/ioncube.sh +++ b/src/scripts/ext/ioncube.sh @@ -1,41 +1,19 @@ # Function to log result of a operation. -add_log() { - mark=$1 - subject=$2 - message=$3 - if [ "$mark" = "$tick" ]; then - printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" - printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "ioncube" "Click to read the ioncube loader license information" - cat /tmp/ioncube/LICENSE.txt - echo "::endgroup::" - else - printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" - fi -} - -# Function to test if extension is loaded. -check_extension() { - extension=$1 - php -m | grep -i -q -w "$extension" +add_license_log() { + printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "ioncube" "Click to read the ioncube loader license information" + cat /tmp/ioncube/LICENSE.txt + echo "::endgroup::" } # Function to install ioncube. -install_ioncube() { - if [ ! -e "$ext_dir/ioncube.so" ]; then - os_name='lin' +add_ioncube() { + if [ ! -e "${ext_dir:?}/ioncube.so" ]; then status='Installed and enabled' - [ "$(uname -s)" = "Darwin" ] && os_name='mac' - curl -sSL https://downloads.ioncube.com/loader_downloads/ioncube_loaders_"$os_name"_x86-64.tar.gz | tar -xzf - -C /tmp - sudo mv /tmp/ioncube/ioncube_loader_"$os_name"_"$version".so "$ext_dir/ioncube.so" + os_name='lin' && [ "$(uname -s)" = "Darwin" ] && os_name='mac' + curl "${curl_opts[@]:?}" https://downloads.ioncube.com/loader_downloads/ioncube_loaders_"$os_name"_x86-64.tar.gz | tar -xzf - -C /tmp + sudo mv /tmp/ioncube/ioncube_loader_"$os_name"_"${version:?}".so "$ext_dir/ioncube.so" fi - echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "$scan_dir/00-ioncube.ini" + echo "zend_extension=$ext_dir/ioncube.so" | sudo tee "${scan_dir:?}/00-ioncube.ini" >/dev/null 2>&1 + add_extension_log "ioncube" "$status" + check_extension "ioncube" && add_license_log } - -version=$1 -tick='✓' -cross='✗' -scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||") -ext_dir=$(php -i | grep "extension_dir => /" | sed -e "s|.*=> s*||") -status='Enabled' -install_ioncube >/dev/null 2>&1 -(check_extension "ioncube" && add_log "$tick" "ioncube" "$status") || add_log "$cross" "ioncube" "Could not install ioncube" diff --git a/src/scripts/ext/oci.ps1 b/src/scripts/ext/oci.ps1 index c94bd5f9..525bdccb 100644 --- a/src/scripts/ext/oci.ps1 +++ b/src/scripts/ext/oci.ps1 @@ -1,68 +1,55 @@ -Param ( - [Parameter(Position = 0, Mandatory = $true)] - [ValidateNotNull()] - [ValidateSet('oci8', 'pdo_oci')] - [string] - $extension, - [Parameter(Position = 1, Mandatory = $true)] - [ValidateNotNull()] - [ValidateLength(1, [int]::MaxValue)] - [string] - $version -) - -# Function to log result of a operation. -Function Add-Log($mark, $subject, $message) { - if ($mark -eq $tick) { - printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "32" $mark $subject $message +# Function to log license information. +Function Add-LicenseLog() { printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $extension "Click to read the $extension related license information" printf "Oracle Instant Client package is required for %s extension.\n" $extension printf "It is provided under the Oracle Technology Network Development and Distribution License.\n" printf "Refer to: \033[35;1m%s \033[0m\n" "https://www.oracle.com/downloads/licenses/instant-client-lic.html" Write-Output "::endgroup::" - } else { - printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "31" $mark $subject $message - } } -$tick = ([char]8730) -$cross = ([char]10007) -$php_dir = 'C:\tools\php' -$status = 'Enabled' -if($env:RUNNER -eq 'self-hosted') { $php_dir = "$php_dir$version" } -$ext_dir = "$php_dir\ext" -$installed = Get-Php -Path $php_dir -try -{ +# Function to get instantclinet. +Function Add-InstantClient() { if (-not(Test-Path $php_dir\oci.dll)) { $suffix = 'windows' - if (-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') - { + if ($arch -eq 'x86') { $suffix = 'nt' } Invoke-WebRequest -UseBasicParsing -Uri https://download.oracle.com/otn_software/nt/instantclient/instantclient-basiclite-$suffix.zip -OutFile $php_dir\instantclient.zip Expand-Archive -Path $php_dir\instantclient.zip -DestinationPath $php_dir -Force Copy-Item $php_dir\instantclient*\* $php_dir } - if ($extension -eq "pdo_oci") { - Enable-PhpExtension pdo_oci -Path $php_dir - } else { - $status = 'Installed and enabled' - $ociVersion = '2.2.0' - if ($version -eq '7.0') - { - $ociVersion = '2.1.8' - } - elseif ($version -lt '7.0') - { - $ociVersion = '2.0.12' - } - $ociUrl = Get-PeclArchiveUrl oci8 $ociVersion $installed - Invoke-WebRequest -UseBasicParsing -Uri $ociUrl -OutFile $php_dir\oci8.zip - Expand-Archive -Path $php_dir\oci8.zip -DestinationPath $ext_dir -Force - Add-Content -Value "`r`nextension=php_oci8.dll" -Path $php_dir\php.ini - } - Add-Log $tick $extension $status -} catch { - Add-Log $cross $extension "Could not install $extension on PHP $($installed.FullVersion)" +} + +# Function to install oci8 and pdo_oci. +Function Add-OCI() { + Param ( + [Parameter(Position = 0, Mandatory = $true)] + [ValidateNotNull()] + [ValidateSet('oci8', 'pdo_oci')] + [string] + $extension + ) + try { + $status = 'Enabled' + Add-InstantClient + if ($extension -eq "pdo_oci") { + Enable-PhpExtension pdo_oci -Path $php_dir + } else { + $status = 'Installed and enabled' + $ociVersion = '2.2.0' + if ($version -eq '7.0') { + $ociVersion = '2.1.8' + } elseif ($version -lt '7.0') { + $ociVersion = '2.0.12' + } + $ociUrl = Get-PeclArchiveUrl oci8 $ociVersion $installed + Invoke-WebRequest -UseBasicParsing -Uri $ociUrl -OutFile $php_dir\oci8.zip + Expand-Archive -Path $php_dir\oci8.zip -DestinationPath $ext_dir -Force + Add-Content -Value "`r`nextension=php_oci8.dll" -Path $php_dir\php.ini + } + Add-Log $tick $extension $status + Add-LicenseLog + } catch { + Add-Log $cross $extension "Could not install $extension on PHP $( $installed.FullVersion )" + } } diff --git a/src/scripts/ext/oci.sh b/src/scripts/ext/oci.sh index a54aaff2..8a197048 100644 --- a/src/scripts/ext/oci.sh +++ b/src/scripts/ext/oci.sh @@ -1,38 +1,24 @@ # Function to log result of a operation. -add_log() { - mark=$1 - subject=$2 - message=$3 - if [ "$mark" = "$tick" ]; then - printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" - printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "$ext" "Click to read the $ext related license information" - printf "Oracle Instant Client package is required for %s extension.\n" "$ext" - printf "It is provided under the Oracle Technology Network Development and Distribution License.\n" - printf "Refer to: \033[35;1m%s \033[0m\n" "https://www.oracle.com/downloads/licenses/instant-client-lic.html" - echo "::endgroup::" - else - printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" - fi -} - -# Function to test if extension is loaded. -check_extension() { - extension=$1 - php -m | grep -i -q -w "$extension" +add_license_log() { + printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "$ext" "Click to read the $ext related license information" + printf "Oracle Instant Client package is required for %s extension.\n" "$ext" + printf "It is provided under the Oracle Technology Network Development and Distribution License.\n" + printf "Refer to: \033[35;1m%s \033[0m\n" "https://www.oracle.com/downloads/licenses/instant-client-lic.html" + echo "::endgroup::" } # Function to get the tag for a php version. get_tag() { master_version='8.0' tag='master' - if [ ! "$version" = "$master_version" ]; then - tag="php-$(php -v | head -n 1 | cut -f 2 -d ' ' | cut -f 1 -d '-')" + if [ ! "${version:?}" = "$master_version" ]; then + tag="php-$(php -v | head -n 1 | cut -f 2 -d ' ' | cut -f 1 -d '-')" fi echo "$tag" } # Function to install instantclient and SDK. -install_client() { +add_client() { sudo mkdir -p -m 777 "$oracle_home" if [ ! -e "$oracle_client" ]; then for package in basiclite sdk; do @@ -47,7 +33,7 @@ install_client() { arch='macos' lib_ext='dylib' fi - curl -o "/opt/oracle/$package.zip" -sSL "https://download.oracle.com/otn_software/$os_name/instantclient/instantclient-$package-$arch.zip" + curl -o "/opt/oracle/$package.zip" "${curl_opts[@]:?}" "https://download.oracle.com/otn_software/$os_name/instantclient/instantclient-$package-$arch.zip" unzip "/opt/oracle/$package.zip" -d "$oracle_home" done sudo ln -sf /opt/oracle/instantclient*/*.$lib_ext* $libs @@ -57,15 +43,15 @@ install_client() { # Function to get PHP source. get_php() { - [ ! -d "/opt/oracle/php-src-$tag" ] && curl -sSL "https://github.com/php/php-src/archive/$tag.tar.gz" | tar xzf - -C "$oracle_home/" + [ ! -d "/opt/oracle/php-src-$tag" ] && curl "${curl_opts[@]}" "https://github.com/php/php-src/archive/$tag.tar.gz" | tar xzf - -C "$oracle_home/" } # Function to get phpize location on darwin. get_phpize() { if [[ "$version" =~ 5.[3-5] ]]; then - echo '/opt/local/bin/phpize' + echo '/opt/local/bin/phpize' else - echo "/usr/local/bin/$(readlink /usr/local/bin/phpize)" + echo "/usr/local/bin/$(readlink /usr/local/bin/phpize)" fi } @@ -86,55 +72,54 @@ restore_phpize() { # Function to patch pdo_oci. patch_pdo_oci_config() { - curl -sSLO https://raw.githubusercontent.com/php/php-src/master/ext/pdo_oci/config.m4 + curl -O "${curl_opts[@]}" https://raw.githubusercontent.com/php/php-src/master/ext/pdo_oci/config.m4 sudo sed -i '' "/PHP_CHECK_PDO_INCLUDES/d" config.m4 || sudo sed -i "/PHP_CHECK_PDO_INCLUDES/d" config.m4 } # Function to install the dependencies. -install_dependencies() { +add_dependencies() { if [ "$os" = 'Linux' ]; then - if [ "$runner" = "self-hosted" ] || [ "$RUNNER" = "self-hosted" ]; then - sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y autoconf automake libaio-dev gcc g++ php"$version"-dev + if [ "${runner:?}" = "self-hosted" ]; then + ${apt_install:?} autoconf automake libaio-dev gcc g++ php"$version"-dev else - sudo DEBIAN_FRONTEND=noninteractive apt-fast install -y php"$version"-dev + update_lists + ${apt_install:?} php"$version"-dev fi sudo update-alternatives --set php-config /usr/bin/php-config"$version" sudo update-alternatives --set phpize /usr/bin/phpize"$version" fi } -# Function to install the extension. -install_extension() { - if ! [ -e "$ext_dir/$ext.so" ]; then +# Function to install oci8 and pdo_oci. +add_oci_helper() { + if ! [ -e "${ext_dir:?}/$ext.so" ]; then + status='Installed and enabled' + phpize_orig=$(get_phpize) + tag=$(get_tag) + get_php + patch_phpize ( - status='Installed and enabled' - phpize_orig=$(get_phpize) - tag=$(get_tag) - get_php - patch_phpize cd "/opt/oracle/php-src-$tag/ext/$ext" || exit 1 [ "$ext" = "pdo_oci" ] && patch_pdo_oci_config sudo phpize && ./configure --with-php-config="$(command -v php-config)" --with-"${ext/_/-}"=instantclient,"$oracle_client" sudo make -j"$(nproc)" sudo cp ./modules/* "$ext_dir/" - restore_phpize ) + restore_phpize fi - echo "extension=$ext.so" | sudo tee "$scan_dir/99-$ext.ini" + echo "extension=$ext.so" | sudo tee "${scan_dir:?}/99-$ext.ini" } -ext=$1 -version=$2 -tick='✓' -cross='✗' -status='Enabled' -oracle_home='/opt/oracle' -oracle_client=$oracle_home/instantclient -runner="${runner:-github}" && RUNNER="${RUNNER:-github}" -os=$(uname -s) -scan_dir=$(php --ini | grep additional | sed -e "s|.*: s*||") -ext_dir=$(php -i | grep "extension_dir => /" | sed -e "s|.*=> s*||") -install_client >/dev/null 2>&1 -install_dependencies >/dev/null 2>&1 -install_extension >/dev/null 2>&1 -(check_extension "$ext" && add_log "$tick" "$ext" "$status") || add_log "$cross" "$ext" "Could not install $ext" \ No newline at end of file +# Function to add oci extension oci8 and pdo_oci. +add_oci() { + ext=$1 + status='Enabled' + oracle_home='/opt/oracle' + oracle_client=$oracle_home/instantclient + os=$(uname -s) + add_client >/dev/null 2>&1 + add_dependencies >/dev/null 2>&1 + add_oci_helper >/dev/null 2>&1 + add_extension_log "$ext" "$status" + check_extension "$ext" && add_license_log +} diff --git a/src/scripts/ext/pcov.sh b/src/scripts/ext/pcov.sh deleted file mode 100644 index 0837f5b3..00000000 --- a/src/scripts/ext/pcov.sh +++ /dev/null @@ -1,5 +0,0 @@ -cd ~ && git clone --depth=1 https://github.com/krakjoe/pcov.git -cd pcov && phpize -./configure --enable-pcov -make -sudo make install \ No newline at end of file diff --git a/src/scripts/ext/phalcon.ps1 b/src/scripts/ext/phalcon.ps1 index d201d52b..e4980436 100644 --- a/src/scripts/ext/phalcon.ps1 +++ b/src/scripts/ext/phalcon.ps1 @@ -1,57 +1,55 @@ -Param ( +# Function to install phalcon +Function Add-PhalconHelper() { + if ($extension_version -eq '4') { + Install-Phpextension phalcon -MinimumStability stable -Path $php_dir + } else { + $domain = 'https://github.com' + $nts = if (!$installed.ThreadSafe) { "_nts" } else { "" } + $match = Invoke-WebRequest -UseBasicParsing -Uri $domain/phalcon/cphalcon/releases | Select-String -Pattern "href=`"(.*phalcon_x64_.*_php${version}_${extension_version}.*[0-9]${nts}.zip)`"" + $zip_file = $match.Matches[0].Groups[1].Value + Invoke-WebRequest -UseBasicParsing -Uri $domain/$zip_file -OutFile $ENV:RUNNER_TOOL_CACHE\phalcon.zip > $null 2>&1 + Expand-Archive -Path $ENV:RUNNER_TOOL_CACHE\phalcon.zip -DestinationPath $ENV:RUNNER_TOOL_CACHE\phalcon -Force > $null 2>&1 + Copy-Item -Path "$ENV:RUNNER_TOOL_CACHE\phalcon\php_phalcon.dll" -Destination "$ext_dir\php_phalcon.dll" + Enable-PhpExtension -Extension phalcon -Path $php_dir + } +} + +Function Add-Phalcon() { + Param ( [Parameter(Position = 0, Mandatory = $true)] [ValidateNotNull()] [ValidateSet('phalcon3', 'phalcon4')] [string] - $extension, - [Parameter(Position = 1, Mandatory = $true)] - [ValidateNotNull()] - [ValidateLength(1, [int]::MaxValue)] - [string] - $version -) + $extension + ) + try { + $status = 'Enabled' + $extension_version = $extension.substring($extension.Length - 1) -# Function to install phalcon -Function Install-Phalcon() { - if ($extension_version -eq '4') { - Install-Phpextension phalcon -MinimumStability stable -Path $php_dir - } else { - $installed = Get-Php -Path $php_dir - $nts = if (!$installed.ThreadSafe) { "_nts" } else { "" } - $match = Invoke-WebRequest -UseBasicParsing -Uri $domain/phalcon/cphalcon/releases | Select-String -Pattern "href=`"(.*phalcon_x64_.*_php${version}_${extension_version}.*[0-9]${nts}.zip)`"" - $zip_file = $match.Matches[0].Groups[1].Value - Invoke-WebRequest -UseBasicParsing -Uri $domain/$zip_file -OutFile $ENV:RUNNER_TOOL_CACHE\phalcon.zip > $null 2>&1 - Expand-Archive -Path $ENV:RUNNER_TOOL_CACHE\phalcon.zip -DestinationPath $ENV:RUNNER_TOOL_CACHE\phalcon -Force > $null 2>&1 - Copy-Item -Path "$ENV:RUNNER_TOOL_CACHE\phalcon\php_phalcon.dll" -Destination "$ext_dir\php_phalcon.dll" - Enable-PhpExtension -Extension phalcon -Path $php_dir - } - printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "32" $tick $extension "Installed and enabled" -} - -$tick = ([char]8730) -$domain = 'https://github.com' -$php_dir = 'C:\tools\php' -if($env:RUNNER -eq 'self-hosted') { $php_dir = "$php_dir$version" } -$ext_dir = "$php_dir\ext" -$extension_version = $extension.substring($extension.Length - 1) - -if($extension_version -eq '4') { - if (Test-Path $ext_dir\php_psr.dll) { + if($extension_version -eq '4') { + if (Test-Path $ext_dir\php_psr.dll) { Enable-PhpExtension -Extension psr -Path $php_dir - } else { + } else { Install-Phpextension psr -MinimumStability stable -Path $php_dir + } } -} -if(Test-Path $ext_dir\php_phalcon.dll) { - $phalcon = Get-PhpExtension $ext_dir\php_phalcon.dll - if($phalcon.Version[0] -eq $extension_version) { + if(Test-Path $ext_dir\php_phalcon.dll) { + $phalcon = Get-PhpExtension $ext_dir\php_phalcon.dll + if($phalcon.Version[0] -eq $extension_version) { Enable-PhpExtension -Extension phalcon -Path $php_dir - printf "\033[%s;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "32" $tick $extension "Enabled" - } else { + } else { + $status = 'Installed and enabled' Remove-Item $ext_dir\php_phalcon.dll - Install-Phalcon + Add-PhalconHelper + } + } else { + $status = 'Installed and enabled' + Add-PhalconHelper } -} else { - Install-Phalcon -} \ No newline at end of file + Add-Log $tick $extension $status + } catch [Exception] { + Write-Output $_.Exception|format-list -force + Add-Log $cross $extension "Could not install $extension on PHP $($installed.FullVersion)" + } +} diff --git a/src/scripts/ext/phalcon.sh b/src/scripts/ext/phalcon.sh index acd8ffa6..aa46df8e 100644 --- a/src/scripts/ext/phalcon.sh +++ b/src/scripts/ext/phalcon.sh @@ -1,71 +1,65 @@ -# Function to log result of a operation -add_log() { - mark=$1 - subject=$2 - message=$3 - if [ "$mark" = "$tick" ]; then - printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" +# Helper function to add phalcon. +add_phalcon_helper() { + status='Installed and enabled' + if [ "$os_name" = "Linux" ]; then + update_lists + ${apt_install:?} "php${version:?}-$extension" else - printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" + phalcon_ini_file=${ini_file:?} + sed -i '' '/extension.*psr/d' "${ini_file:?}" + brew tap shivammathur/homebrew-phalcon + brew install phalcon@"${version:?}"_"$extension_major_version" + sudo cp /usr/local/opt/psr@"${version:?}"/psr.so "${ext_dir:?}" + sudo cp /usr/local/opt/phalcon@"${version:?}"_"$extension_major_version"/phalcon.so "${ext_dir:?}" fi } -# Function to update php ppa -update_ppa() { - if [ "$ppa_updated" = "false" ]; then - find /etc/apt/sources.list.d -type f -name 'ondrej-ubuntu-php*.list' -exec sudo DEBIAN_FRONTEND=noninteractive apt-get update -o Dir::Etc::sourcelist="{}" ';' >/dev/null 2>&1 - ppa_updated="true" - fi +# Function to add phalcon3. +add_phalcon3() { + if [ -e "${ext_dir:?}/phalcon.so" ]; then + phalcon_version=$(php -d="extension=phalcon.so" -r "echo phpversion('phalcon');" | cut -d'.' -f 1) + if [ "$phalcon_version" != "$extension_major_version" ]; then + add_phalcon_helper + else + echo "extension=phalcon.so" | sudo tee -a "$phalcon_ini_file" + fi + else + add_phalcon_helper + fi } -# Function to install phalcon -install_phalcon() { - extension=$1 - version=$2 - (update_ppa && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y "php$version-$extension" >/dev/null 2>&1 && add_log "$tick" "$extension" "Installed and enabled") || - add_log "$cross" "$extension" "Could not install $extension on PHP $semver" -} - -ini_file="/etc/php/$2/cli/conf.d/50-phalcon.ini" -ext_dir=$(php -i | grep "extension_dir => /usr" | sed -e "s|.*=> s*||") -semver=$(php -v | head -n 1 | cut -f 2 -d ' ' | cut -f 1 -d '-') -extension_major_version=$(echo "$1" | grep -i -Po '\d') -ppa_updated="false" -tick="✓" -cross="✗" - -if [ "$extension_major_version" = "4" ]; then - if [ -e "$ext_dir/psr.so" ] && ! php -m | grep -i -q -w psr; then - echo "extension=psr.so" | sudo tee -a "$ini_file" >/dev/null 2>&1 +# Function to add phalcon4. +add_phalcon4() { + if [ -e "${ext_dir:?}/psr.so" ] && ! php -m | grep -i -q -w psr; then + echo "extension=psr.so" | sudo tee -a "${ini_file:?}" fi - if [ -e "$ext_dir/phalcon.so" ]; then if php -m | grep -i -q -w psr; then phalcon_version=$(php -d="extension=phalcon" -r "echo phpversion('phalcon');" | cut -d'.' -f 1) if [ "$phalcon_version" != "$extension_major_version" ]; then - install_phalcon "$1" "$2" + add_phalcon_helper else - echo "extension=phalcon.so" | sudo tee -a "$ini_file" >/dev/null 2>&1 - add_log "$tick" "$1" "Enabled" + echo "extension=phalcon.so" | sudo tee -a "$phalcon_ini_file" fi else - install_phalcon "$1" "$2" + add_phalcon_helper fi else - install_phalcon "$1" "$2" - fi -fi + add_phalcon_helper + fi +} -if [ "$extension_major_version" = "3" ]; then - if [ -e "$ext_dir/phalcon.so" ]; then - phalcon_version=$(php -d="extension=phalcon.so" -r "echo phpversion('phalcon');" | cut -d'.' -f 1) - if [ "$phalcon_version" != "$extension_major_version" ]; then - install_phalcon "$1" "$2" - else - echo "extension=phalcon.so" | sudo tee -a "$ini_file" >/dev/null 2>&1 - add_log "$tick" "$1" "Enabled" - fi - else - install_phalcon "$1" "$2" +# Function to add phalcon. +add_phalcon() { + extension=$1 + status='Enabled' + os_name=$(uname -s) + phalcon_ini_file="${scan_dir:?}/50-phalcon.ini" + extension_major_version=${extension: -1} + if [ "$extension_major_version" = "4" ]; then + add_phalcon4 >/dev/null 2>&1 + elif [ "$extension_major_version" = "3" ]; then + add_phalcon3 >/dev/null 2>&1 fi -fi + add_extension_log "phalcon" "$status" +} diff --git a/src/scripts/ext/phalcon_darwin.sh b/src/scripts/ext/phalcon_darwin.sh deleted file mode 100644 index d1edf06d..00000000 --- a/src/scripts/ext/phalcon_darwin.sh +++ /dev/null @@ -1,47 +0,0 @@ -# Function to log result of a operation -add_log() { - mark=$1 - subject=$2 - message=$3 - if [ "$mark" = "$tick" ]; then - printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" - else - printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" - fi -} - -# Function to install phalcon -install_phalcon() { - ( - sed -i '' '/extension.*psr/d' "$ini_file" - brew tap shivammathur/homebrew-phalcon >/dev/null 2>&1 - brew install phalcon@"$php_version"_"$extension_major" >/dev/null 2>&1 - sudo cp /usr/local/opt/psr@"$php_version"/psr.so "$ext_dir" >/dev/null 2>&1 - sudo cp /usr/local/opt/phalcon@"$php_version"_"$extension_major"/phalcon.so "$ext_dir" >/dev/null 2>&1 - add_log "$tick" "$extension" "Installed and enabled" - ) || add_log "$cross" "$extension" "Could not install $extension on PHP $semver" -} - -tick="✓" -cross="✗" -extension=$1 -extension_major=${extension: -1} -php_version=$2 -semver=$(php -v | head -n 1 | cut -f 2 -d ' ') -ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g") -ext_dir=$(php -i | grep "extension_dir => /usr" | sed -e "s|.*=> s*||") -if [ -e "$ext_dir/psr.so" ] && [ -e "$ext_dir/phalcon.so" ]; then - phalcon_version=$(php -d="extension=psr.so" -d="extension=phalcon.so" -r "echo phpversion('phalcon');" 2>/dev/null | cut -d'.' -f 1) - if php -m | grep -i -q -w psr; then - phalcon_version=$(php -d="extension=phalcon.so" -r "echo phpversion('phalcon');" 2>/dev/null | cut -d'.' -f 1) - fi - if [ "$phalcon_version" != "$extension_major" ]; then - install_phalcon - else - if ! php -m | grep -i -q -w psr; then echo "extension=psr.so" >>"$ini_file"; fi - echo "extension=phalcon.so" >>"$ini_file" - add_log "$tick" "$extension" "Enabled" - fi -else - install_phalcon -fi diff --git a/src/scripts/linux.sh b/src/scripts/linux.sh index fffe5215..adcf9f23 100644 --- a/src/scripts/linux.sh +++ b/src/scripts/linux.sh @@ -16,6 +16,16 @@ add_log() { fi } +# Function to log result of installing extension. +add_extension_log() { + extension=$1 + status=$2 + extension_name=$(echo "$extension" | cut -d '-' -f 1) + ( + check_extension "$extension_name" && add_log "$tick" "$extension_name" "$status" + ) || add_log "$cross" "$extension_name" "Could not install $extension on PHP $semver" +} + # Function to read env inputs. read_env() { . /etc/lsb-release @@ -35,15 +45,6 @@ cleanup_lists() { fi } -# Function to update the package lists. -update_lists() { - if [ "$lists_updated" = "false" ]; then - cleanup_lists - sudo "$debconf_fix" apt-get update >/dev/null 2>&1 - lists_updated="true" - fi -} - # Function to add ppa:ondrej/php. add_ppa() { if ! apt-cache policy | grep -q ondrej/php; then @@ -55,6 +56,16 @@ add_ppa() { fi } +# Function to update the package lists. +update_lists() { + if [ ! -e /tmp/setup_php ]; then + [ "$DISTRIB_RELEASE" = "20.04" ] && add_ppa >/dev/null 2>&1 + cleanup_lists + sudo "$debconf_fix" apt-get update >/dev/null 2>&1 + echo '' | sudo tee "/tmp/setup_php" >/dev/null 2>&1 + fi +} + # Function to setup environment for self-hosted runners. self_hosted_setup() { echo "Set disable_coredump false" | sudo tee -a /etc/sudo.conf @@ -82,7 +93,7 @@ get_pecl_version() { extension=$1 stability="$(echo "$2" | grep -m 1 -Eio "(alpha|beta|rc|snapshot)")" pecl_rest='https://pecl.php.net/rest/r/' - response=$(curl -q -sSL "$pecl_rest$extension"/allreleases.xml) + response=$(curl "${curl_opts[@]}" "$pecl_rest$extension"/allreleases.xml) pecl_version=$(echo "$response" | grep -m 1 -Pio "(\d*\.\d*\.\d*$stability\d*)") if [ ! "$pecl_version" ]; then pecl_version=$(echo "$response" | grep -m 1 -Po "(\d*\.\d*\.\d*)") @@ -90,6 +101,12 @@ get_pecl_version() { echo "$pecl_version" } +# Function to install PECL extensions and accept default options +pecl_install() { + local extension=$1 + yes '' | sudo pecl install -f "$extension" >/dev/null 2>&1 +} + # Function to check if an extension is loaded. check_extension() { extension=$1 @@ -148,8 +165,7 @@ add_pdo_extension() { fi add_extension "$ext_name" "$apt_install php$version-$ext" "extension" >/dev/null 2>&1 enable_extension "$pdo_ext" "extension" - (check_extension "$pdo_ext" && add_log "$tick" "$pdo_ext" "Enabled") || - add_log "$cross" "$pdo_ext" "Could not install $pdo_ext on PHP $semver" + add_extension_log "$pdo_ext" "Enabled" fi } @@ -166,10 +182,8 @@ add_extension() { install_command="update_lists && ${install_command/5\.[4-5]-$extension/5-$extension=$release_version}" fi eval "$install_command" >/dev/null 2>&1 || - (update_lists && eval "$install_command" >/dev/null 2>&1) || - sudo pecl install -f "$extension" >/dev/null 2>&1 - (check_extension "$extension" && add_log "$tick" "$extension" "Installed and enabled") || - add_log "$cross" "$extension" "Could not install $extension on PHP $semver" + (update_lists && eval "$install_command" >/dev/null 2>&1) || pecl_install "$extension" + add_extension_log "$extension" "Installed and enabled" fi sudo chmod 777 "$ini_file" } @@ -190,11 +204,8 @@ add_pecl_extension() { add_log "$tick" "$extension" "Enabled" else delete_extension "$extension" - ( - sudo pecl install -f "$extension-$pecl_version" >/dev/null 2>&1 && - check_extension "$extension" && - add_log "$tick" "$extension" "Installed and enabled" - ) || add_log "$cross" "$extension" "Could not install $extension-$pecl_version on PHP $semver" + pecl_install "$extension-$pecl_version" + add_extension_log "$extension-$pecl_version" "Installed and enabled" fi } @@ -207,21 +218,6 @@ add_unstable_extension() { add_pecl_extension "$extension" "$pecl_version" "$prefix" } -# Function to update extension. -update_extension() { - extension=$1 - latest_version=$2 - current_version=$(php -r "echo phpversion('$extension');") - final_version=$(printf "%s\n%s" "$current_version" "$latest_version" | sort | tail -n 1) - if [ "$final_version" != "$current_version" ]; then - version_exists=$(apt-cache policy -- *"$extension" | grep "$final_version") - if [ -z "$version_exists" ]; then - update_lists - fi - $apt_install php"$version"-"$extension" - fi -} - # Function to install extension from source add_extension_from_source() { extension=$1 @@ -232,15 +228,13 @@ add_extension_from_source() { ( add_devtools delete_extension "$extension" - curl -o /tmp/"$extension".tar.gz -sSL https://github.com/"$repo"/archive/"$release".tar.gz + curl -o /tmp/"$extension".tar.gz "${curl_opts[@]}" https://github.com/"$repo"/archive/"$release".tar.gz tar xf /tmp/"$extension".tar.gz -C /tmp cd /tmp/"$extension-$release" || exit 1 phpize && ./configure "$args" && make && sudo make install enable_extension "$extension" "$prefix" ) >/dev/null 2>&1 - ( - check_extension "$extension" && add_log "$tick" "$extension" "Installed and enabled" - ) || add_log "$cross" "$extension" "Could not install $extension-$release on PHP $semver" + add_extension_log "$extension-$release" "Installed and enabled" } # Function to configure composer @@ -257,10 +251,6 @@ configure_composer() { if [ -n "$COMPOSER_TOKEN" ]; then composer -q global config github-oauth.github.com "$COMPOSER_TOKEN" fi - # TODO: Remove after composer 2.0 update, fixes peer fingerprint error - if [[ "$version" =~ $old_versions ]]; then - composer -q global config repos.packagist composer https://repo-ca-bhs-1.packagist.org - fi } # Function to setup a remote tool. @@ -271,7 +261,7 @@ add_tool() { if [ ! -e "$tool_path" ]; then rm -rf "$tool_path" fi - status_code=$(sudo curl -s -w "%{http_code}" -o "$tool_path" -L "$url") + status_code=$(sudo curl -s -w "%{http_code}" -o "$tool_path" "${curl_opts[@]}" "$url") if [ "$status_code" = "200" ]; then sudo chmod a+x "$tool_path" if [ "$tool" = "composer" ]; then @@ -315,32 +305,14 @@ add_devtools() { configure_pecl >/dev/null 2>&1 } -# Function to add blackfire and blackfire-agent. -add_blackfire() { - sudo mkdir -p /var/run/blackfire - sudo curl -sSL https://packages.blackfire.io/gpg.key | sudo apt-key add - >/dev/null 2>&1 - echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list >/dev/null 2>&1 - sudo "$debconf_fix" apt-get update >/dev/null 2>&1 - $apt_install blackfire-agent >/dev/null 2>&1 - if [[ -n $BLACKFIRE_SERVER_ID ]] && [[ -n $BLACKFIRE_SERVER_TOKEN ]]; then - sudo blackfire-agent --register --server-id="$BLACKFIRE_SERVER_ID" --server-token="$BLACKFIRE_SERVER_TOKEN" >/dev/null 2>&1 - sudo /etc/init.d/blackfire-agent restart >/dev/null 2>&1 - fi - if [[ -n $BLACKFIRE_CLIENT_ID ]] && [[ -n $BLACKFIRE_CLIENT_TOKEN ]]; then - blackfire config --client-id="$BLACKFIRE_CLIENT_ID" --client-token="$BLACKFIRE_CLIENT_TOKEN" >/dev/null 2>&1 - fi - add_log "$tick" "blackfire" "Added" - add_log "$tick" "blackfire-agent" "Added" -} - # Function to setup the nightly build from master branch. setup_master() { - curl -sSL "$github"/php-builder/releases/latest/download/install.sh | bash -s "$runner" + curl "${curl_opts[@]}" "$github"/php-builder/releases/latest/download/install.sh | bash -s "$runner" } # Function to setup PHP 5.3, PHP 5.4 and PHP 5.5. setup_old_versions() { - curl -sSL "$github"/php5-ubuntu/releases/latest/download/install.sh | bash -s "$version" + curl "${curl_opts[@]}" "$github"/php5-ubuntu/releases/latest/download/install.sh | bash -s "$version" configure_pecl release_version=$(php -v | head -n 1 | cut -d' ' -f 2) } @@ -349,7 +321,7 @@ setup_old_versions() { add_pecl() { add_devtools >/dev/null 2>&1 if [ ! -e /usr/bin/pecl ]; then - $apt_install php-pear >/dev/null 2>&1 + $apt_install php-pear >/dev/null 2>&1 || update_lists && $apt_install php-pear >/dev/null 2>&1 fi configure_pecl >/dev/null 2>&1 add_log "$tick" "PECL" "Added" @@ -375,14 +347,19 @@ php_semver() { # Function to install packaged PHP add_packaged_php() { - update_lists - IFS=' ' read -r -a packages <<< "$(echo "cli curl mbstring xml intl" | sed "s/[^ ]*/php$version-&/g")" - $apt_install "${packages[@]}" + if [ "$runner" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then + update_lists + IFS=' ' read -r -a packages <<< "$(echo "cli curl mbstring xml intl" | sed "s/[^ ]*/php$version-&/g")" + $apt_install "${packages[@]}" + else + curl "${curl_opts[@]}" "$github"/php-ubuntu/releases/latest/download/install.sh | bash -s "$version" + fi } # Function to update PHP. update_php() { initial_version=$(php_semver) + use_package_cache="false" add_packaged_php updated_version=$(php_semver) if [ "$updated_version" != "$initial_version" ]; then @@ -407,7 +384,6 @@ add_php() { # Variables tick="✓" cross="✗" -lists_updated="false" pecl_config="false" version=$1 master_version="8.0" @@ -416,6 +392,7 @@ debconf_fix="DEBIAN_FRONTEND=noninteractive" github="https://github.com/shivammathur" apt_install="sudo $debconf_fix apt-fast install -y" tool_path_dir="/usr/local/bin" +curl_opts=(-sSL --retry 5 --retry-delay 1) existing_version=$(php-config --version 2>/dev/null | cut -c 1-3) read_env @@ -426,8 +403,6 @@ if [ "$runner" = "self-hosted" ]; then else self_hosted_setup >/dev/null 2>&1 fi -elif [ "$DISTRIB_RELEASE" = "20.04" ]; then - add_ppa >/dev/null 2>&1 fi # Setup PHP diff --git a/src/scripts/tools/blackfire.ps1 b/src/scripts/tools/blackfire.ps1 new file mode 100644 index 00000000..5dca721d --- /dev/null +++ b/src/scripts/tools/blackfire.ps1 @@ -0,0 +1,17 @@ +# Function to add blackfire and blackfire-agent. +Function Add-Blackfire() { + $agent_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).agent + $url = "https://packages.blackfire.io/binaries/blackfire-agent/${agent_version}/blackfire-agent-windows_${arch_name}.zip" + Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $bin_dir\blackfire.zip >$null 2>&1 + Expand-Archive -Path $bin_dir\blackfire.zip -DestinationPath $bin_dir -Force >$null 2>&1 + Add-ToProfile $current_profile 'blackfire' "New-Alias blackfire $bin_dir\blackfire.exe" + Add-ToProfile $current_profile 'blackfire-agent' "New-Alias blackfire-agent $bin_dir\blackfire-agent.exe" + if ((Test-Path env:BLACKFIRE_SERVER_ID) -and (Test-Path env:BLACKFIRE_SERVER_TOKEN)) { + blackfire-agent --register --server-id=$env:BLACKFIRE_SERVER_ID --server-token=$env:BLACKFIRE_SERVER_TOKEN >$null 2>&1 + } + if ((Test-Path env:BLACKFIRE_CLIENT_ID) -and (Test-Path env:BLACKFIRE_CLIENT_TOKEN)) { + blackfire config --client-id=$env:BLACKFIRE_CLIENT_ID --client-token=$env:BLACKFIRE_CLIENT_TOKEN --ca-cert=$php_dir\ssl\cacert.pem >$null 2>&1 + } + Add-Log $tick "blackfire" "Added" + Add-Log $tick "blackfire-agent" "Added" +} diff --git a/src/scripts/tools/blackfire.sh b/src/scripts/tools/blackfire.sh new file mode 100644 index 00000000..a41b8717 --- /dev/null +++ b/src/scripts/tools/blackfire.sh @@ -0,0 +1,34 @@ +add_blackfire_linux() { + sudo mkdir -p /var/run/blackfire + sudo curl "${curl_opts[@]:?}" https://packages.blackfire.io/gpg.key | sudo apt-key add - + echo "deb http://packages.blackfire.io/debian any main" | sudo tee /etc/apt/sources.list.d/blackfire.list + sudo "${debconf_fix:?}" apt-get update + ${apt_install:?} blackfire-agent +} + +add_blackfire_darwin() { + sudo mkdir -p /usr/local/var/run + brew tap --shallow blackfireio/homebrew-blackfire + brew install blackfire-agent +} + +blackfire_config() { + if [[ -n $BLACKFIRE_SERVER_ID ]] && [[ -n $BLACKFIRE_SERVER_TOKEN ]]; then + sudo blackfire-agent --register --server-id="$BLACKFIRE_SERVER_ID" --server-token="$BLACKFIRE_SERVER_TOKEN" + [ "$os" = "Linux" ] && sudo /etc/init.d/blackfire-agent restart + [ "$os" = "Darwin" ] && brew services start blackfire-agent + fi + if [[ -n $BLACKFIRE_CLIENT_ID ]] && [[ -n $BLACKFIRE_CLIENT_TOKEN ]]; then + blackfire config --client-id="$BLACKFIRE_CLIENT_ID" --client-token="$BLACKFIRE_CLIENT_TOKEN" + fi +} + +# Function to add blackfire and blackfire-agent. +add_blackfire() { + os="$(uname -s)" + [ "$os" = "Linux" ] && add_blackfire_linux >/dev/null 2>&1 + [ "$os" = "Darwin" ] && add_blackfire_darwin >/dev/null 2>&1 + blackfire_config >/dev/null 2>&1 + add_log "${tick:?}" "blackfire" "Added" + add_log "${tick:?}" "blackfire-agent" "Added" +} diff --git a/src/scripts/tools/grpc_php_plugin.ps1 b/src/scripts/tools/grpc_php_plugin.ps1 new file mode 100644 index 00000000..103b2f61 --- /dev/null +++ b/src/scripts/tools/grpc_php_plugin.ps1 @@ -0,0 +1,20 @@ +Function Add-Msys2() { + $msys_location = 'C:\msys64' + if (-not(Test-Path $msys_location)) { + choco install msys2 -y >$null 2>&1 + $msys_location = 'C:\tools\msys64' + } + return $msys_location +} + +Function Add-Grpc_php_plugin() { + $msys_location = Add-Msys2 + . $msys_location\usr\bin\bash -l -c "pacman -S --noconfirm mingw-w64-x86_64-grpc" >$null 2>&1 + Write-Output "::add-path::$msys_location\mingw64\bin" + Write-Output "::set-output name=grpc_php_plugin_path::$msys_location\mingw64\bin\grpc_php_plugin.exe" + Add-ToProfile $current_profile 'grpc_php_plugin' "New-Alias grpc_php_plugin $msys_location\mingw64\bin\grpc_php_plugin.exe" + Add-Log $tick "grpc_php_plugin" "Added" + printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "grpc_php_plugin" "Click to read the grpc_php_plugin related license information" + Write-Output (Invoke-WebRequest https://raw.githubusercontent.com/grpc/grpc/master/LICENSE).Content + Write-Output "::endgroup::" +} diff --git a/src/scripts/tools/grpc_php_plugin.sh b/src/scripts/tools/grpc_php_plugin.sh new file mode 100644 index 00000000..a209a4ab --- /dev/null +++ b/src/scripts/tools/grpc_php_plugin.sh @@ -0,0 +1,51 @@ +add_bazel() { + if [ ! "$(command -v bazel)" ]; then + os=$(uname -s) + if [ "$os" = "Linux" ]; then + ${apt_install:?} curl gnupg + curl "${curl_opts[@]:?}" https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - + echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list + sudo "${debconf_fix:?}" apt-get update -y + ${apt_install:?} bazel + elif [ "$os" = "Darwin" ]; then + brew install bazel + fi + fi +} + +get_grpc_tag() { + if [ "$grpc_tag" = "latest" ]; then + grpc_tag=$(curl "${curl_opts[@]:?}" https://grpc.io/release) + else + status_code=$(sudo curl -s -w "%{http_code}" -o /tmp/grpc.tmp "${curl_opts[@]:?}" "https://github.com/grpc/grpc/releases/tag/v$grpc_tag") + if [ "$status_code" = "200" ]; then + grpc_tag="v$grpc_tag" + else + grpc_tag=$(curl "${curl_opts[@]:?}" https://grpc.io/release) + fi + fi +} + +add_grpc_php_plugin() { + grpc_tag=$1 + get_grpc_tag + ( + curl "${curl_opts[@]:?}" "https://github.com/grpc/grpc/archive/$grpc_tag.tar.gz" | tar -xz -C /tmp + cd "/tmp/grpc-${grpc_tag:1}" || exit + add_bazel + echo "os: $os" + echo "release: $DISTRIB_RELEASE" + if [ "$DISTRIB_RELEASE" = "16.04" ]; then + CC="$(command -v gcc)" CXX="$(command -v g++)" ./tools/bazel build src/compiler:grpc_php_plugin + else + ./tools/bazel build src/compiler:grpc_php_plugin + fi + sudo mv ./bazel-bin/src/compiler/grpc_php_plugin /usr/local/bin/grpc_php_plugin + sudo chmod a+x /usr/local/bin/grpc_php_plugin + ) >/dev/null 2>&1 + echo "::set-output name=grpc_php_plugin_path::/usr/local/bin/grpc_php_plugin" + add_log "${tick:?}" "grpc_php_plugin" "Added" + printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "grpc_php_plugin" "Click to read the grpc_php_plugin related license information" + cat "/tmp/grpc-${grpc_tag:1}/LICENSE" + echo "::endgroup::" +} diff --git a/src/scripts/tools/protoc.ps1 b/src/scripts/tools/protoc.ps1 new file mode 100644 index 00000000..48680f86 --- /dev/null +++ b/src/scripts/tools/protoc.ps1 @@ -0,0 +1,38 @@ +Function Get-ProtobufTag() { + if("$protobuf_tag" -eq "latest") { + $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/tags).Name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 + } else { + try { + [net.httpWebRequest] $request = [net.webRequest]::create("https://github.com/protocolbuffers/protobuf/releases/tag/v$protobuf_tag") + $req.Method = "HEAD" + [net.httpWebResponse] $response = $request.getResponse() + $response.Close() + $protobuf_tag = "v$protobuf_tag" + } catch { + $protobuf_tag = (Invoke-RestMethod https://api.github.com/repos/protocolbuffers/protobuf/tags).Name | Where-Object { $_ -match "v\d+.\d+.\d+$" } | Select-Object -First 1 + } + } + return $protobuf_tag +} + +Function Add-Protoc() { + param( + [Parameter(Mandatory = $true, Position = 0, HelpMessage = 'The PHP version to be installed')] + [ValidatePattern('^latest$|^(v?)\d+\.\d+\.\d+$')] + [string] $protobuf_tag + ) + $protobuf_tag = Get-ProtobufTag + $arch_num = '64' + if(-not([Environment]::Is64BitOperatingSystem)) { + $arch_num = '32' + } + $url = "https://github.com/protocolbuffers/protobuf/releases/download/$protobuf_tag/protoc-$($protobuf_tag -replace 'v', '')-win$arch_num.zip" + Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $bin_dir\protoc.zip >$null 2>&1 + Expand-Archive -Path $bin_dir\protoc.zip -DestinationPath $bin_dir\protoc -Force >$null 2>&1 + Move-Item -Path $bin_dir\protoc\bin\protoc.exe -Destination $bin_dir\protoc.exe + Add-ToProfile $current_profile 'protoc' "New-Alias protoc $bin_dir\protoc.exe" + Add-Log $tick "protoc" "Added" + printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information" + Write-Output (Invoke-WebRequest https://raw.githubusercontent.com/protocolbuffers/protobuf/master/LICENSE).Content + Write-Output "::endgroup::" +} diff --git a/src/scripts/tools/protoc.sh b/src/scripts/tools/protoc.sh new file mode 100644 index 00000000..545077e6 --- /dev/null +++ b/src/scripts/tools/protoc.sh @@ -0,0 +1,28 @@ +get_protobuf_tag() { + if [ "$protobuf_tag" = "latest" ]; then + protobuf_tag=$(curl "${curl_opts[@]:?}" https://github.com/protocolbuffers/protobuf/releases/latest 2<&1 | grep -m 1 -Eo "(v[0-9]+.[0-9]+.[0-9]+)" | head -n 1) + else + status_code=$(sudo curl -s -w "%{http_code}" -o /tmp/protobuf.tmp "${curl_opts[@]:?}" "https://github.com/protocolbuffers/protobuf/releases/tag/v$protobuf_tag") + if [ "$status_code" = "200" ]; then + protobuf_tag="v$protobuf_tag" + else + protobuf_tag=$(curl "${curl_opts[@]:?}" https://github.com/protocolbuffers/protobuf/releases/latest 2<&1 | grep -m 1 -Eo "(v[0-9]+.[0-9]+.[0-9]+)" | head -n 1) + fi + fi +} + +add_protoc() { + protobuf_tag=$1 + get_protobuf_tag + ( + platform='linux' + [ "$(uname -s)" = "Darwin" ] && platform='osx' + curl -o /tmp/protobuf.zip "${curl_opts[@]:?}" "https://github.com/protocolbuffers/protobuf/releases/download/$protobuf_tag/protoc-${protobuf_tag:1}-$platform-x86_64.zip" + sudo unzip /tmp/protobuf.zip -d /usr/local/ + sudo chmod a+x /usr/local/bin/protoc + ) >/dev/null 2>&1 + add_log "${tick:?}" "protoc" "Added" + printf "::group::\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "protoc" "Click to read the protoc related license information" + curl "${curl_opts[@]:?}" https://raw.githubusercontent.com/protocolbuffers/protobuf/master/LICENSE + echo "::endgroup::" +} diff --git a/src/scripts/win32.ps1 b/src/scripts/win32.ps1 index 0381f078..9731dcbc 100644 --- a/src/scripts/win32.ps1 +++ b/src/scripts/win32.ps1 @@ -180,10 +180,6 @@ Function Edit-ComposerConfig() { if (Test-Path env:COMPOSER_TOKEN) { composer -q global config github-oauth.github.com $env:COMPOSER_TOKEN } - # TODO: Remove after composer 2.0 update, fixes peer fingerprint error - if ($version -lt 5.6) { - composer -q global config repos.packagist composer https://repo-ca-bhs-1.packagist.org - } } # Function to add tools. @@ -269,25 +265,6 @@ Function Add-Pecl() { Add-Log $tick "PECL" "Use extensions input to setup PECL extensions on windows" } -# Function to add blackfire and blackfire-agent. -Function Add-Blackfire() { - $agent_data = Invoke-WebRequest https://blackfire.io/docs/up-and-running/update | ForEach-Object { $_.tostring() -split "[`r`n]" | Select-String '' | Select-Object -Index 0 } - $agent_version = [regex]::Matches($agent_data, '(.+)') | ForEach-Object {$_.Captures[0].Groups[1].value } - $url = "https://packages.blackfire.io/binaries/blackfire-agent/${agent_version}/blackfire-agent-windows_${arch_name}.zip" - Invoke-WebRequest -UseBasicParsing -Uri $url -OutFile $bin_dir\blackfire.zip >$null 2>&1 - Expand-Archive -Path $bin_dir\blackfire.zip -DestinationPath $bin_dir -Force >$null 2>&1 - Add-ToProfile $current_profile 'blackfire' "New-Alias blackfire $bin_dir\blackfire.exe" - Add-ToProfile $current_profile 'blackfire-agent' "New-Alias blackfire-agent $bin_dir\blackfire-agent.exe" - if ((Test-Path env:BLACKFIRE_SERVER_ID) -and (Test-Path env:BLACKFIRE_SERVER_TOKEN)) { - blackfire-agent --register --server-id=$env:BLACKFIRE_SERVER_ID --server-token=$env:BLACKFIRE_SERVER_TOKEN >$null 2>&1 - } - if ((Test-Path env:BLACKFIRE_CLIENT_ID) -and (Test-Path env:BLACKFIRE_CLIENT_TOKEN)) { - blackfire config --client-id=$env:BLACKFIRE_CLIENT_ID --client-token=$env:BLACKFIRE_CLIENT_TOKEN --ca-cert=$php_dir\ssl\cacert.pem >$null 2>&1 - } - Add-Log $tick "blackfire" "Added" - Add-Log $tick "blackfire-agent" "Added" -} - # Variables $tick = ([char]8730) $cross = ([char]10007) @@ -358,9 +335,11 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version } if ($version -eq $master_version) { $version = 'master' + Invoke-WebRequest -UseBasicParsing -Uri https://dl.bintray.com/shivammathur/php/Install-PhpMaster.ps1 -OutFile $php_dir\Install-PhpMaster.ps1 > $null 2>&1 + & $php_dir\Install-PhpMaster.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir + } else { + Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1 } - - Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1 } else { if($env:update -eq 'true') { Update-Php $php_dir >$null 2>&1 @@ -382,10 +361,4 @@ if($version -lt "5.5") { Enable-PhpExtension -Extension openssl, curl, opcache, mbstring -Path $php_dir } Update-PhpCAInfo -Path $php_dir -Source $cert_source -if ($version -eq 'master') { - Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/shivammathur/php-extensions-windows/releases/latest/download/php_$env:phpts`_$arch`_pcov.dll" -OutFile $ext_dir"\php_pcov.dll" >$null 2>&1 - Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/shivammathur/php-extensions-windows/releases/latest/download/php_$env:phpts`_$arch`_xdebug.dll" -OutFile $ext_dir"\php_xdebug.dll" >$null 2>&1 - Set-PhpIniKey -Key 'opcache.jit_buffer_size' -Value '256M' -Path $php_dir - Set-PhpIniKey -Key 'opcache.jit' -Value '1235' -Path $php_dir -} Add-Log $tick "PHP" "$status PHP $($installed.FullVersion)" diff --git a/src/tools.ts b/src/tools.ts index c5ed8a56..50677a05 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -1,6 +1,7 @@ import * as utils from './utils'; import * as httpm from '@actions/http-client'; import {IHttpClientResponse as hcr} from '@actions/http-client/interfaces'; +import * as path from 'path'; /** * Function to get command to setup tools @@ -38,6 +39,8 @@ export async function getToolVersion(version: string): Promise { const composer_regex = /^stable$|^preview$|^snapshot$|^v?[1|2]$/; version = version.replace(/[><=^]*/, ''); switch (true) { + case version.charAt(0) == 'v': + return version.replace('v', ''); case composer_regex.test(version): case semver_regex.test(version): return version; @@ -361,7 +364,7 @@ export async function getCleanedToolsList( return extension .trim() .replace( - /hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//, + /-agent|hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//, '' ); }) @@ -439,6 +442,27 @@ export async function addPackage( return tool_command + tool + ' ' + release + ' ' + prefix; } +/** + * Function to get script to add tools with custom support. + * + * @param tool + * @param version + * @param os_version + */ +export async function addCustomTool( + tool: string, + version: string, + os_version: string +): Promise { + const script_extension: string = await utils.scriptExtension(os_version); + const script: string = path.join( + __dirname, + '../src/scripts/tools/' + tool + script_extension + ); + const command: string = await getCommand(os_version, tool); + return '. ' + script + '\n' + command + version; +} + /** * Setup tools * @@ -470,8 +494,9 @@ export async function addTools( let url = ''; switch (tool) { case 'blackfire': - case 'blackfire-agent': - script += await getCommand(os_version, 'blackfire'); + case 'grpc_php_plugin': + case 'protoc': + script += await addCustomTool(tool, version, os_version); break; case 'blackfire-player': url = await getPharUrl('https://get.blackfire.io', tool, 'v', version); diff --git a/src/utils.ts b/src/utils.ts index f63a3c69..20c37350 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -259,3 +259,57 @@ export async function suppressOutput(os_version: string): Promise { ); } } + +/** + * Function to get script to log unsupported extensions. + * + * @param extension + * @param version + * @param os_version + */ +export async function getUnsupportedLog( + extension: string, + version: string, + os_version: string +): Promise { + return ( + '\n' + + (await addLog( + '$cross', + extension, + [extension, 'is not supported on PHP', version].join(' '), + os_version + )) + + '\n' + ); +} + +/** + * Function to join strings with space + * + * @param str + */ +export async function joins(...str: string[]): Promise { + return [...str].join(' '); +} + +/** + * Function to get script extensions + * + * @param os_version + */ +export async function scriptExtension(os_version: string): Promise { + switch (os_version) { + case 'win32': + return '.ps1'; + case 'linux': + case 'darwin': + return '.sh'; + default: + return await log( + 'Platform ' + os_version + ' is not supported', + os_version, + 'error' + ); + } +}