mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-10-15 20:06:58 +00:00
Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19d3947a16 | ||
|
|
5a89ae6dd6 | ||
|
|
b828e3206e | ||
|
|
c463b1d02f | ||
|
|
db75472672 | ||
|
|
40d4c7a0d3 | ||
|
|
f5a207e3fa | ||
|
|
11b9f9a7f0 | ||
|
|
f1477a078f | ||
|
|
0534f032be | ||
|
|
eb7c497e18 | ||
|
|
7d671baa10 | ||
|
|
57747c1c10 | ||
|
|
421f97feaf | ||
|
|
dc7811a514 | ||
|
|
79322934d8 | ||
|
|
87d00bde25 | ||
|
|
f458a145e3 |
No files matched your search
@@ -88,7 +88,7 @@ body:
|
||||
label: "Are you willing to submit a PR?"
|
||||
description: "We accept pull requests targeting the develop branch."
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
- "Yes"
|
||||
validations:
|
||||
required: true
|
||||
@@ -26,13 +26,13 @@ jobs:
|
||||
persist-credentials: false
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4
|
||||
uses: github/codeql-action/init@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
|
||||
with:
|
||||
config-file: ./.github/codeql/codeql-configuration.yml
|
||||
languages: javascript
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4
|
||||
uses: github/codeql-action/autobuild@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4
|
||||
uses: github/codeql-action/analyze@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4
|
||||
@@ -23,7 +23,7 @@ jobs:
|
||||
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6', '8.7']
|
||||
steps:
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
|
||||
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
tools: none
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
- name: Setup cache environment
|
||||
id: cache-env
|
||||
uses: shivammathur/cache-extensions@de3c642a5fce0ef91581a1c9831e229f525196d6 # v1
|
||||
uses: shivammathur/cache-extensions@22e24453af1bf3851994136f122ce065ab828a74 # v1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions || env.default-php-version }}
|
||||
extensions: ${{ env.extensions }}
|
||||
|
||||
@@ -82,7 +82,6 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
|
||||
| macOS Golden Gate 27.x | arm64 | `xcode-27` | - |
|
||||
| macOS Tahoe 26.x | arm64 | `macos-latest` or `macos-26` | - |
|
||||
| macOS Sequoia 15.x | arm64 | `macos-15` | - |
|
||||
| macOS Sonoma 14.x | arm64 | `macos-14` | - |
|
||||
| macOS Tahoe 26.x | x86_64 | `macos-26-intel` | `PHP 8.5` |
|
||||
| macOS Sequoia 15.x | x86_64 | `macos-15-intel` | `PHP 8.5` |
|
||||
|
||||
@@ -112,8 +111,8 @@ Both `GitHub-hosted` and `self-hosted` runners are supported by `setup-php` on t
|
||||
|
||||
On all supported OS/Platforms, the following PHP versions can be set up as per the runner.
|
||||
|
||||
- PHP 5.3 to PHP 8.7 on GitHub-hosted runners, except for macOS ARM64 runners (macos-14).
|
||||
- PHP 5.6 to PHP 8.7 on GitHub-hosted macOS ARM64 runners (macos-14).
|
||||
- PHP 5.3 to PHP 8.7 on GitHub-hosted runners, except for macOS ARM64 runners.
|
||||
- PHP 5.6 to PHP 8.7 on GitHub-hosted macOS ARM64 runners.
|
||||
- PHP 5.6 to PHP 8.7 on self-hosted runners.
|
||||
|
||||
| PHP Version | Stability | Release Support | Runner Support |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as config from '../src/config';
|
||||
import * as config from '../src/config.js';
|
||||
|
||||
describe('Config tests', () => {
|
||||
it.each`
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as core from '../src/core';
|
||||
import {jest} from '@jest/globals';
|
||||
import * as core from '../src/core.js';
|
||||
|
||||
describe('Core tests', () => {
|
||||
const originalEnv = process.env;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as coverage from '../src/coverage';
|
||||
import * as coverage from '../src/coverage.js';
|
||||
|
||||
describe('Config tests', () => {
|
||||
it.each`
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as fs from 'fs';
|
||||
import * as extensions from '../src/extensions';
|
||||
import * as extensions from '../src/extensions.js';
|
||||
|
||||
describe('Extension tests', () => {
|
||||
it.each`
|
||||
|
||||
+17
-5
@@ -1,6 +1,19 @@
|
||||
import * as fetch from '../src/fetch';
|
||||
import * as fetch from '../src/fetch.js';
|
||||
import nock from 'nock';
|
||||
|
||||
beforeAll(() => nock.disableNetConnect());
|
||||
|
||||
afterEach(() => {
|
||||
const pending = nock.pendingMocks();
|
||||
nock.cleanAll();
|
||||
expect(pending).toEqual([]);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
nock.enableNetConnect();
|
||||
nock.restore();
|
||||
});
|
||||
|
||||
it('checking fetch', async () => {
|
||||
const host_url = 'https://example.com';
|
||||
const manifest_url = host_url + '/manifest';
|
||||
@@ -9,9 +22,8 @@ it('checking fetch', async () => {
|
||||
nock(host_url)
|
||||
.get('/manifest')
|
||||
.reply(200, {latest: 'latest'})
|
||||
.get('/manifest', '', {
|
||||
reqheaders: {authorization: 'Bearer invalid_token'}
|
||||
})
|
||||
.get('/manifest')
|
||||
.matchHeader('authorization', 'Bearer invalid_token')
|
||||
.reply(401, {error: '401: Unauthorized'})
|
||||
.get('/ping')
|
||||
.twice()
|
||||
@@ -36,7 +48,7 @@ it('checking fetch', async () => {
|
||||
expect(response.data).toBe(undefined);
|
||||
|
||||
response = await fetch.fetch(manifest_url, 'invalid_token');
|
||||
expect(response.error).not.toBe(undefined);
|
||||
expect(response.error).toBe('401: Unauthorized');
|
||||
expect(response.data).toBe(undefined);
|
||||
|
||||
response = await fetch.fetch(host_url + '/error');
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import * as install from '../src/install';
|
||||
import * as utils from '../src/utils';
|
||||
import {jest} from '@jest/globals';
|
||||
|
||||
/**
|
||||
* Mock install.ts
|
||||
*/
|
||||
jest.mock('../src/install', () => ({
|
||||
jest.unstable_mockModule('../src/install.js', () => ({
|
||||
getScript: jest
|
||||
.fn()
|
||||
.fn<typeof import('../src/install.js').getScript>()
|
||||
.mockImplementation(async (os: string): Promise<string> => {
|
||||
const filename = os + (await utils.scriptExtension(os));
|
||||
const version: string = await utils.parseVersion(
|
||||
@@ -36,7 +35,7 @@ jest.mock('../src/install', () => ({
|
||||
/**
|
||||
* Mock fetch.ts
|
||||
*/
|
||||
jest.mock('../src/fetch', () => ({
|
||||
jest.unstable_mockModule('../src/fetch.js', () => ({
|
||||
fetch: jest.fn().mockImplementation(() => {
|
||||
return {
|
||||
data: '{ "latest": "8.3", "lowest": "8.1", "highest": "8.3", "nightly": "8.4", "5.x": "5.6" }'
|
||||
@@ -44,6 +43,9 @@ jest.mock('../src/fetch', () => ({
|
||||
})
|
||||
}));
|
||||
|
||||
const utils = await import('../src/utils.js');
|
||||
const install = await import('../src/install.js');
|
||||
|
||||
describe('Install', () => {
|
||||
it.each`
|
||||
version | os | extension_csv | ini_file | ini_values_csv | coverage_driver | tools | output
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
import * as packagist from '../src/packagist';
|
||||
import * as packagist from '../src/packagist.js';
|
||||
import nock from 'nock';
|
||||
|
||||
beforeAll(() => nock.disableNetConnect());
|
||||
|
||||
afterEach(() => {
|
||||
const pending = nock.pendingMocks();
|
||||
nock.cleanAll();
|
||||
expect(pending).toEqual([]);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
nock.enableNetConnect();
|
||||
nock.restore();
|
||||
});
|
||||
|
||||
describe('search function', () => {
|
||||
const mockResponse = {
|
||||
packages: {
|
||||
|
||||
+74
-51
@@ -1,6 +1,6 @@
|
||||
import * as fs from 'fs';
|
||||
import * as tools from '../src/tools';
|
||||
import {ToolData, ToolInput} from '../src/tools';
|
||||
import {jest} from '@jest/globals';
|
||||
import fs from 'fs';
|
||||
import type {ToolData, ToolInput} from '../src/tools.js';
|
||||
|
||||
function getData(data: Partial<ToolData>): ToolData {
|
||||
const tool = data.tool || 'tool';
|
||||
@@ -40,9 +40,9 @@ function unsetComposerAuthEnv(): void {
|
||||
/**
|
||||
* Mock fetch.ts
|
||||
*/
|
||||
jest.mock('../src/fetch', () => ({
|
||||
jest.unstable_mockModule('../src/fetch.js', () => ({
|
||||
fetch: jest
|
||||
.fn()
|
||||
.fn<typeof import('../src/fetch.js').fetch>()
|
||||
.mockImplementation(
|
||||
async (url: string, token?: string): Promise<Record<string, string>> => {
|
||||
if (url.includes('deployer')) {
|
||||
@@ -86,9 +86,9 @@ jest.mock('../src/fetch', () => ({
|
||||
)
|
||||
}));
|
||||
|
||||
jest.mock('../src/packagist', () => ({
|
||||
jest.unstable_mockModule('../src/packagist.js', () => ({
|
||||
search: jest
|
||||
.fn()
|
||||
.fn<typeof import('../src/packagist.js').search>()
|
||||
.mockImplementation(
|
||||
async (
|
||||
package_name: string,
|
||||
@@ -102,6 +102,10 @@ jest.mock('../src/packagist', () => ({
|
||||
)
|
||||
}));
|
||||
|
||||
const tools = await import('../src/tools.js');
|
||||
|
||||
afterEach(() => jest.restoreAllMocks());
|
||||
|
||||
describe('Tools tests', () => {
|
||||
it.each`
|
||||
token | version
|
||||
@@ -381,6 +385,56 @@ describe('Tools tests', () => {
|
||||
}
|
||||
);
|
||||
|
||||
it.each`
|
||||
release | resolved
|
||||
${'phpstan'} | ${'latest/download'}
|
||||
${'phpstan:0.12.68'} | ${'download/0.12.68'}
|
||||
${'phpstan:^0.12.68'} | ${'download/0.12.68'}
|
||||
${'phpstan:0.12'} | ${'download/1.2.3'}
|
||||
${'phpstan:0.12.x'} | ${'download/1.2.3'}
|
||||
${'phpstan:0.12.*'} | ${'download/1.2.3'}
|
||||
`(
|
||||
'resolving PHPStan PHAR fallback for $release',
|
||||
async ({release, resolved}) => {
|
||||
unsetComposerAuthEnv();
|
||||
for (const os of ['linux', 'darwin', 'win32']) {
|
||||
const data = await tools.getData(release, '8.0', os);
|
||||
const script = await tools.addPackage(data);
|
||||
expect(script).toContain(
|
||||
'scoped https://github.com/phpstan/phpstan/releases/' +
|
||||
resolved +
|
||||
'/phpstan.phar "-V"'
|
||||
);
|
||||
expect(data.type).toBe('composer');
|
||||
expect(data.release).toContain('phpstan');
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
it('keeps Composer available when the fallback version lookup fails', async () => {
|
||||
process.env['GITHUB_TOKEN'] = 'invalid_token';
|
||||
const data = await tools.getData('phpstan:0.12', '8.0', 'linux');
|
||||
expect(await tools.addPackage(data)).toBe(
|
||||
'add_composer_tool phpstan "phpstan:0.12.*" phpstan/ scoped'
|
||||
);
|
||||
unsetComposerAuthEnv();
|
||||
});
|
||||
|
||||
it('uses fallback settings independently of the Composer repository', async () => {
|
||||
const data = await tools.getData('vendor/tool:1.2.3', '8.0', 'linux', {
|
||||
fallback: {
|
||||
type: 'phar',
|
||||
repository: 'releases/tool',
|
||||
domain: 'https://example.com',
|
||||
extension: '.phar',
|
||||
version_prefix: 'v'
|
||||
}
|
||||
});
|
||||
expect(await tools.addPackage(data)).toBe(
|
||||
'add_composer_tool tool tool:1.2.3 vendor/ global https://example.com/releases/tool/v1.2.3/tool.phar ""'
|
||||
);
|
||||
});
|
||||
|
||||
it.each`
|
||||
version | php_version | os | script
|
||||
${'latest'} | ${'8.0'} | ${'linux'} | ${'add_tool https://github.com/phar-io/phive/releases/download/3.2.1/phive-3.2.1.phar phive'}
|
||||
@@ -527,30 +581,11 @@ describe('Tools tests', () => {
|
||||
});
|
||||
|
||||
it('checking affected composer version with CRLF ranges', async () => {
|
||||
let affected = false;
|
||||
let fixed = true;
|
||||
await jest.isolateModulesAsync(async () => {
|
||||
jest.doMock('fs', () => ({
|
||||
...jest.requireActual('fs'),
|
||||
readFileSync: (
|
||||
filePath: fs.PathOrFileDescriptor,
|
||||
options?: unknown
|
||||
) => {
|
||||
if (String(filePath).includes('composer-gh-auth-no-op')) {
|
||||
return '1.0.0-0 1.10.28\r\n2.0.0-0 2.2.28\r\n2.3.0-0 2.9.8';
|
||||
}
|
||||
return (jest.requireActual('fs') as typeof fs).readFileSync(
|
||||
filePath,
|
||||
options as fs.ObjectEncodingOptions & {flag?: string}
|
||||
);
|
||||
}
|
||||
}));
|
||||
const isolatedTools = jest.requireActual<typeof tools>('../src/tools');
|
||||
affected = isolatedTools.skipGitHubAuthForComposerVersion('2.9.7');
|
||||
fixed = isolatedTools.skipGitHubAuthForComposerVersion('2.9.8');
|
||||
});
|
||||
expect(affected).toBe(true);
|
||||
expect(fixed).toBe(false);
|
||||
jest
|
||||
.spyOn(fs, 'readFileSync')
|
||||
.mockReturnValue('1.0.0-0 1.10.28\r\n2.0.0-0 2.2.28\r\n2.3.0-0 2.9.8');
|
||||
expect(tools.skipGitHubAuthForComposerVersion('2.9.7')).toBe(true);
|
||||
expect(tools.skipGitHubAuthForComposerVersion('2.9.8')).toBe(false);
|
||||
});
|
||||
|
||||
it.each`
|
||||
@@ -655,7 +690,7 @@ describe('Tools tests', () => {
|
||||
'add_tool https://github.com/humbug/php-scoper/releases/latest/download/php-scoper.phar php-scoper "--version"',
|
||||
'add_tool https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar phpDocumentor "--version"',
|
||||
'add_composer_tool phplint phplint overtrue/',
|
||||
'add_tool https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar phpstan "-V"',
|
||||
'add_composer_tool phpstan phpstan phpstan/ scoped',
|
||||
'add_tool https://phar.phpunit.de/phpunit-7.4.0.phar,https://phar.phpunit.de/phpunit-7.phar phpunit "--version"',
|
||||
'add_pecl',
|
||||
'add_tool https://www.phing.info/get/phing-latest.phar phing "-v"',
|
||||
@@ -948,26 +983,14 @@ describe('Tools tests', () => {
|
||||
}
|
||||
});
|
||||
|
||||
let result: string = '';
|
||||
await jest.isolateModulesAsync(async () => {
|
||||
jest.doMock('fs', () => ({
|
||||
...jest.requireActual('fs'),
|
||||
readFileSync: (
|
||||
filePath: fs.PathOrFileDescriptor,
|
||||
options?: unknown
|
||||
) => {
|
||||
if (String(filePath).includes('tools.json')) {
|
||||
return brokenToolsJson;
|
||||
}
|
||||
return (jest.requireActual('fs') as typeof fs).readFileSync(
|
||||
filePath,
|
||||
options as fs.ObjectEncodingOptions & {flag?: string}
|
||||
);
|
||||
}
|
||||
}));
|
||||
const isolatedTools = jest.requireActual<typeof tools>('../src/tools');
|
||||
result = await isolatedTools.addTools('broken-tool', '7.4', 'linux');
|
||||
const readFileSync = fs.readFileSync;
|
||||
jest.spyOn(fs, 'readFileSync').mockImplementation((filePath, options) => {
|
||||
if (String(filePath).includes('tools.json')) {
|
||||
return brokenToolsJson;
|
||||
}
|
||||
return readFileSync(filePath, options);
|
||||
});
|
||||
const result = await tools.addTools('broken-tool', '7.4', 'linux');
|
||||
|
||||
expect(result).toContain(
|
||||
'add_log "$cross" "broken-tool" "broken-tool has no function defined. Please report this issue."'
|
||||
|
||||
+18
-329
@@ -1,9 +1,13 @@
|
||||
import {fileURLToPath} from 'url';
|
||||
import {jest} from '@jest/globals';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import {spawnSync} from 'child_process';
|
||||
import * as path from 'path';
|
||||
import * as utils from '../src/utils';
|
||||
import * as fetchModule from '../src/fetch';
|
||||
const fetchMock = jest.fn<typeof import('../src/fetch.js').fetch>();
|
||||
jest.unstable_mockModule('../src/fetch.js', () => ({fetch: fetchMock}));
|
||||
const utils = await import('../src/utils.js');
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
describe('Utils tests', () => {
|
||||
it('checking readEnv', async () => {
|
||||
@@ -41,9 +45,9 @@ describe('Utils tests', () => {
|
||||
});
|
||||
|
||||
it('checking parseVersion', async () => {
|
||||
const fetchSpy = jest.spyOn(fetchModule, 'fetch').mockResolvedValue({
|
||||
const fetchSpy = fetchMock.mockResolvedValue({
|
||||
data: fs.readFileSync(
|
||||
path.join(__dirname, '../src/configs/php-versions.json'),
|
||||
path.join(dirname, '../src/configs/php-versions.json'),
|
||||
'utf8'
|
||||
)
|
||||
});
|
||||
@@ -54,6 +58,9 @@ describe('Utils tests', () => {
|
||||
expect(await utils.parseVersion('8.7.0')).toBe('8.7');
|
||||
expect(await utils.parseVersion('7')).toBe('7.0');
|
||||
expect(await utils.parseVersion('7.4')).toBe('7.4');
|
||||
expect(await utils.parseVersion('8.10')).toBe('8.10');
|
||||
expect(await utils.parseVersion('10')).toBe('10.0');
|
||||
expect(await utils.parseVersion('10.0')).toBe('10.0');
|
||||
expect(await utils.parseVersion('5.x')).toBe('5.6');
|
||||
expect(await utils.parseVersion('pre')).toBe('pre');
|
||||
expect(await utils.parseVersion('pre-installed')).toBe('pre');
|
||||
@@ -325,8 +332,8 @@ describe('Utils tests', () => {
|
||||
"Could not find '.phpenv-version' file."
|
||||
);
|
||||
|
||||
const existsSync = jest.spyOn(fs, 'existsSync').mockImplementation();
|
||||
const readFileSync = jest.spyOn(fs, 'readFileSync').mockImplementation();
|
||||
const existsSync = jest.spyOn(fs, 'existsSync').mockReturnValue(false);
|
||||
const readFileSync = jest.spyOn(fs, 'readFileSync').mockReturnValue('');
|
||||
|
||||
existsSync.mockReturnValue(true);
|
||||
readFileSync.mockReturnValue('8.1');
|
||||
@@ -392,8 +399,8 @@ describe('Utils tests', () => {
|
||||
});
|
||||
|
||||
it('readPHPVersion rejects unsupported values from each source', async () => {
|
||||
const existsSync = jest.spyOn(fs, 'existsSync').mockImplementation();
|
||||
const readFileSync = jest.spyOn(fs, 'readFileSync').mockImplementation();
|
||||
const existsSync = jest.spyOn(fs, 'existsSync').mockReturnValue(false);
|
||||
const readFileSync = jest.spyOn(fs, 'readFileSync').mockReturnValue('');
|
||||
|
||||
process.env['php-version'] = '$0';
|
||||
await expect(utils.readPHPVersion()).rejects.toThrow('php-version input');
|
||||
@@ -447,20 +454,8 @@ describe('Utils tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
const hasPwsh =
|
||||
spawnSync('pwsh', ['-NoProfile', '-Command', 'exit 0']).status === 0;
|
||||
const scripts = path.join(__dirname, '../src/scripts');
|
||||
const unixInit = fs.readFileSync(path.join(scripts, 'unix.sh'), 'utf8');
|
||||
const windowsSource = fs.readFileSync(path.join(scripts, 'win32.ps1'), 'utf8');
|
||||
const windowsInit = [
|
||||
windowsSource.match(/Function Invoke-WithoutTrace[\s\S]*?\n}/)![0],
|
||||
windowsSource.match(
|
||||
/\$setup_php_trace = 0\r?\nif \(\$env:SETUP_PHP_TRACE[\s\S]*?\n}/
|
||||
)![0]
|
||||
].join('\n');
|
||||
|
||||
describe.each(['linux', 'darwin', 'win32'])(
|
||||
'Verbose scripts on %s',
|
||||
'Verbose script preparation on %s',
|
||||
platform => {
|
||||
let root: string;
|
||||
let run: string;
|
||||
@@ -473,19 +468,12 @@ describe.each(['linux', 'darwin', 'win32'])(
|
||||
const scripts = path.join(root, 'src', 'scripts');
|
||||
const extension = platform === 'win32' ? '.ps1' : '.sh';
|
||||
fs.mkdirSync(path.join(scripts, 'tools'), {recursive: true});
|
||||
const init = path.join(scripts, 'init' + extension);
|
||||
fs.writeFileSync(
|
||||
init,
|
||||
platform === 'win32'
|
||||
? windowsInit
|
||||
: unixInit + '\nrunner=self-hosted read_env\n'
|
||||
);
|
||||
helper = path.join(scripts, 'tools', 'helper' + extension);
|
||||
run = path.join(scripts, 'run' + extension);
|
||||
fs.writeFileSync(helper, 'echo helper-output\n');
|
||||
fs.writeFileSync(
|
||||
run,
|
||||
`. '${init}'\n. '${helper}' ${platform === 'win32' ? '>$null' : '>/dev/null'} 2>&1\n`
|
||||
`. '${helper}' ${platform === 'win32' ? '>$null' : '>/dev/null'} 2>&1\n`
|
||||
);
|
||||
delete process.env.verbose;
|
||||
delete process.env.VERBOSE;
|
||||
@@ -516,22 +504,6 @@ describe.each(['linux', 'darwin', 'win32'])(
|
||||
tracing ? String(verbose!.length - 1) : '0'
|
||||
);
|
||||
expect(fs.readFileSync(run, 'utf8')).toBe(original);
|
||||
if (platform === 'win32' ? hasPwsh : process.platform !== 'win32') {
|
||||
const result = spawnSync(
|
||||
platform === 'win32' ? 'pwsh' : 'bash',
|
||||
platform === 'win32'
|
||||
? ['-NoProfile', '-File', prepared]
|
||||
: [prepared],
|
||||
{encoding: 'utf8', env: process.env}
|
||||
);
|
||||
expect(result.status).toBe(0);
|
||||
expect(/helper-output\r?\n/.test(result.stdout)).toBe(enabled);
|
||||
expect(
|
||||
platform === 'win32'
|
||||
? result.stdout.includes('DEBUG:')
|
||||
: result.stderr.includes('+ ')
|
||||
).toBe(tracing);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
@@ -556,18 +528,6 @@ describe.each(['linux', 'darwin', 'win32'])(
|
||||
`echo nested-output ${platform === 'win32' ? '2>&1 | Out-Host' : ''}\n${probe}\n`
|
||||
);
|
||||
expect(fs.readFileSync(helper, 'utf8')).toContain(pipe);
|
||||
const shell = platform === 'win32' ? 'pwsh' : 'bash';
|
||||
if (platform === 'win32' ? hasPwsh : process.platform !== 'win32') {
|
||||
const result = spawnSync(
|
||||
shell,
|
||||
platform === 'win32'
|
||||
? ['-NoProfile', '-File', prepared]
|
||||
: [prepared],
|
||||
{encoding: 'utf8', env: process.env}
|
||||
);
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stdout).toMatch(/nested-output\r?\n/);
|
||||
}
|
||||
process.env.verbose = 'false';
|
||||
expect(await utils.addVerbose(run, platform)).toBe(run);
|
||||
expect(process.env.SETUP_PHP_TRACE).toBe('0');
|
||||
@@ -591,277 +551,6 @@ describe.each(['linux', 'darwin', 'win32'])(
|
||||
}
|
||||
);
|
||||
|
||||
it.each(['true', 'vv', 'vvv'])(
|
||||
'protects nested sensitive calls and restores tracing for verbose=%s',
|
||||
async verbose => {
|
||||
const windows = platform === 'win32';
|
||||
if (windows ? !hasPwsh : process.platform === 'win32') return;
|
||||
process.env.verbose = verbose;
|
||||
process.env.GITHUB_TOKEN = 'example-github-token';
|
||||
process.env.TRACE_TEST_OUTPUT = path.join(root, 'tokens');
|
||||
fs.writeFileSync(
|
||||
helper,
|
||||
windows
|
||||
? `$result = 0
|
||||
try {
|
||||
Invoke-WithoutTrace {
|
||||
Invoke-WithoutTrace {
|
||||
$token = $env:GITHUB_TOKEN
|
||||
Set-Content $env:TRACE_TEST_OUTPUT $token
|
||||
}
|
||||
$token = $env:GITHUB_TOKEN
|
||||
Add-Content $env:TRACE_TEST_OUTPUT $token
|
||||
if ($env:TRACE_TEST_STATUS -ne '0') { throw 'example-failure' }
|
||||
}
|
||||
} catch {
|
||||
if ($_.Exception.Message -ne 'example-failure') { throw }
|
||||
$result = [int]$env:TRACE_TEST_STATUS
|
||||
}
|
||||
$after_wrapper = 'after-wrapper'
|
||||
Write-Output $after_wrapper
|
||||
Write-Output "status=$result"
|
||||
`
|
||||
: `inner_sensitive() {
|
||||
token="$GITHUB_TOKEN"
|
||||
printf '%s\\n' "$token" > "$TRACE_TEST_OUTPUT"
|
||||
return "$TRACE_TEST_STATUS"
|
||||
}
|
||||
outer_sensitive() {
|
||||
without_trace inner_sensitive
|
||||
local result=$?
|
||||
token="$GITHUB_TOKEN"
|
||||
printf '%s\\n' "$token" >> "$TRACE_TEST_OUTPUT"
|
||||
return "$result"
|
||||
}
|
||||
without_trace outer_sensitive
|
||||
result=$?
|
||||
echo "\${token:+state-preserved}"
|
||||
echo after-wrapper
|
||||
exit "$result"
|
||||
`
|
||||
);
|
||||
const prepared = await utils.addVerbose(run, platform);
|
||||
for (const status of [0, 37]) {
|
||||
const result = spawnSync(
|
||||
windows ? 'pwsh' : 'bash',
|
||||
windows ? ['-NoProfile', '-File', prepared] : [prepared],
|
||||
{
|
||||
encoding: 'utf8',
|
||||
env: {...process.env, TRACE_TEST_STATUS: String(status)}
|
||||
}
|
||||
);
|
||||
expect(result.status).toBe(windows ? 0 : status);
|
||||
expect(result.stdout + result.stderr).not.toContain(
|
||||
'example-github-token'
|
||||
);
|
||||
expect(result.stdout).toContain('after-wrapper');
|
||||
expect(
|
||||
windows
|
||||
? /DEBUG:.*Write-Output \$after_wrapper/.test(result.stdout)
|
||||
: result.stderr.includes('+ echo after-wrapper')
|
||||
).toBe(verbose !== 'true');
|
||||
if (windows) {
|
||||
expect(result.stdout).toContain('status=' + status);
|
||||
expect(/DEBUG:\s+!\s+SET \$after_wrapper/.test(result.stdout)).toBe(
|
||||
verbose === 'vvv'
|
||||
);
|
||||
} else {
|
||||
expect(result.stdout).toContain('state-preserved');
|
||||
}
|
||||
expect(
|
||||
fs
|
||||
.readFileSync(process.env.TRACE_TEST_OUTPUT!, 'utf8')
|
||||
.trim()
|
||||
.split(/\r?\n/)
|
||||
).toEqual(['example-github-token', 'example-github-token']);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
it.each(['true', 'vv', 'vvv'])(
|
||||
'keeps Blackfire credentials out of traces for verbose=%s',
|
||||
async verbose => {
|
||||
const windows = platform === 'win32';
|
||||
if (windows ? !hasPwsh : process.platform === 'win32') return;
|
||||
process.env.verbose = verbose;
|
||||
process.env.TRACE_TEST_OUTPUT = path.join(root, 'blackfire-config');
|
||||
process.env.BLACKFIRE_SERVER_ID = 'example-blackfire-server-id';
|
||||
process.env.BLACKFIRE_SERVER_TOKEN = 'example-blackfire-server-token';
|
||||
process.env.BLACKFIRE_CLIENT_ID = 'example-blackfire-client-id';
|
||||
process.env.BLACKFIRE_CLIENT_TOKEN = 'example-blackfire-client-token';
|
||||
fs.writeFileSync(
|
||||
helper,
|
||||
fs.readFileSync(
|
||||
path.join(
|
||||
scripts,
|
||||
'tools',
|
||||
'blackfire' + (windows ? '.ps1' : '.sh')
|
||||
),
|
||||
'utf8'
|
||||
) +
|
||||
(windows
|
||||
? `
|
||||
function Invoke-RestMethod { @{cli='1.2.3'} }
|
||||
function Get-File {}
|
||||
function Expand-Archive {}
|
||||
function Add-ToProfile {}
|
||||
function Add-Log {}
|
||||
function blackfire { Add-Content $env:TRACE_TEST_OUTPUT ($args -join ' ') }
|
||||
$version = '8.4'
|
||||
$bin_dir = 'unused'
|
||||
Add-Blackfire
|
||||
Write-Output after-blackfire
|
||||
`
|
||||
: `
|
||||
blackfire() { printf '%s\\n' "$@" >> "$TRACE_TEST_OUTPUT"; }
|
||||
os=Test
|
||||
blackfire_config
|
||||
echo after-blackfire
|
||||
`)
|
||||
);
|
||||
const prepared = await utils.addVerbose(run, platform);
|
||||
const result = spawnSync(
|
||||
windows ? 'pwsh' : 'bash',
|
||||
windows ? ['-NoProfile', '-File', prepared] : [prepared],
|
||||
{encoding: 'utf8', env: process.env}
|
||||
);
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stdout + result.stderr).not.toContain(
|
||||
'example-blackfire-'
|
||||
);
|
||||
expect(result.stdout).toContain('after-blackfire');
|
||||
expect(
|
||||
windows
|
||||
? /DEBUG:.*Write-Output after-blackfire/.test(result.stdout)
|
||||
: result.stderr.includes('+ echo after-blackfire')
|
||||
).toBe(verbose !== 'true');
|
||||
const config = fs.readFileSync(process.env.TRACE_TEST_OUTPUT!, 'utf8');
|
||||
for (const value of [
|
||||
'server-id',
|
||||
'server-token',
|
||||
'client-id',
|
||||
'client-token'
|
||||
]) {
|
||||
expect(config).toContain('example-blackfire-' + value);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
it('keeps Composer credentials out of traces and resumes tracing', async () => {
|
||||
if (platform === 'win32' ? !hasPwsh : process.platform === 'win32')
|
||||
return;
|
||||
process.env.verbose = 'vvv';
|
||||
process.env.GITHUB_TOKEN = 'example-github-token';
|
||||
process.env.COMPOSER_TOKEN = 'example-composer-token';
|
||||
process.env.PACKAGIST_TOKEN = 'example-packagist-token';
|
||||
process.env.COMPOSER_AUTH_JSON =
|
||||
'{"bearer":{"example.org":"example-json-token"}}';
|
||||
process.env.GITHUB_SERVER_URL = 'https://github.com';
|
||||
const windows = platform === 'win32';
|
||||
const source = fs.readFileSync(
|
||||
path.join(scripts, 'tools', 'add_tools' + (windows ? '.ps1' : '.sh')),
|
||||
'utf8'
|
||||
);
|
||||
fs.writeFileSync(
|
||||
helper,
|
||||
source +
|
||||
(windows
|
||||
? `\n$composer_home='${root}'\nSet-ComposerAuth\nWrite-Output after-auth\n`
|
||||
: `\ncomposer_home='${root}'\nset_composer_auth\necho after-auth\n`)
|
||||
);
|
||||
const prepared = await utils.addVerbose(run, platform);
|
||||
const result = spawnSync(
|
||||
windows ? 'pwsh' : 'bash',
|
||||
windows ? ['-NoProfile', '-File', prepared] : [prepared],
|
||||
{encoding: 'utf8', env: process.env}
|
||||
);
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stdout + result.stderr).not.toMatch(
|
||||
/example-(github|composer|packagist|json)-token/
|
||||
);
|
||||
expect(windows ? result.stdout : result.stderr).toMatch(
|
||||
windows ? /DEBUG:.*Write-Output after-auth/ : /\+ echo after-auth/
|
||||
);
|
||||
const auth = JSON.parse(
|
||||
fs.readFileSync(path.join(root, 'auth.json'), 'utf8')
|
||||
);
|
||||
expect(auth['github-oauth']['github.com']).toBe('example-composer-token');
|
||||
expect(auth['http-basic']['repo.packagist.com'].password).toBe(
|
||||
'example-packagist-token'
|
||||
);
|
||||
expect(auth.bearer['example.org']).toBe('example-json-token');
|
||||
});
|
||||
|
||||
if (platform !== 'win32') {
|
||||
(process.platform === 'win32' ? it.skip : it).each([
|
||||
['exit 37', 37],
|
||||
['set -e\nfalse', 1]
|
||||
])('preserves shell termination for %s', async (failure, status) => {
|
||||
process.env.verbose = 'vvv';
|
||||
process.env.GITHUB_TOKEN = 'example-github-token';
|
||||
fs.writeFileSync(
|
||||
helper,
|
||||
`
|
||||
sensitive_failure() {
|
||||
token="$GITHUB_TOKEN"
|
||||
${failure}
|
||||
echo should-not-run
|
||||
}
|
||||
trap 'echo cleanup' EXIT
|
||||
without_trace sensitive_failure
|
||||
echo should-not-run
|
||||
`
|
||||
);
|
||||
const prepared = await utils.addVerbose(run, platform);
|
||||
const result = spawnSync('bash', [prepared], {
|
||||
encoding: 'utf8',
|
||||
env: process.env
|
||||
});
|
||||
expect(result.status).toBe(status);
|
||||
expect(result.stdout).toBe('cleanup\n');
|
||||
expect(result.stdout + result.stderr).not.toContain(
|
||||
'example-github-token'
|
||||
);
|
||||
});
|
||||
|
||||
(process.platform === 'win32' ? it.skip : it).each(['true', 'vv', 'vvv'])(
|
||||
'protects Relay credentials and preserves tracing and status for verbose=%s',
|
||||
async verbose => {
|
||||
process.env.verbose = verbose;
|
||||
const ini = path.join(root, 'relay.ini');
|
||||
fs.writeFileSync(
|
||||
helper,
|
||||
fs.readFileSync(path.join(scripts, 'extensions/relay.sh'), 'utf8') +
|
||||
'\nsudo() { if [ "$1" = rm ]; then return "$RELAY_TEST_STATUS"; fi; "$@"; }\n' +
|
||||
`init_relay_ini '${ini}'\nrelay_status=$?\necho after-relay\nexit "$relay_status"\n`
|
||||
);
|
||||
const prepared = await utils.addVerbose(run, platform);
|
||||
for (const status of [0, 37]) {
|
||||
fs.writeFileSync(ini, '; relay.key =\n');
|
||||
const result = spawnSync('bash', [prepared], {
|
||||
encoding: 'utf8',
|
||||
env: {
|
||||
...process.env,
|
||||
RELAY_KEY: 'example-relay-key',
|
||||
RELAY_TEST_STATUS: String(status)
|
||||
}
|
||||
});
|
||||
expect(result.status).toBe(status);
|
||||
expect(result.stdout + result.stderr).not.toContain(
|
||||
'example-relay-key'
|
||||
);
|
||||
expect(result.stdout).toContain('after-relay');
|
||||
expect(result.stderr.includes('+ echo after-relay')).toBe(
|
||||
verbose !== 'true'
|
||||
);
|
||||
expect(fs.readFileSync(ini, 'utf8')).toBe(
|
||||
'relay.key = example-relay-key\n'
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
(process.platform === 'win32' ? it.skip : it)(
|
||||
'uses fresh copies without writing through source symlinks',
|
||||
async () => {
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(()=>{var e={472:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),i=0;i<r.length;i++)if(r[i]!=="default")n(t,e,r[i]);s(t,e);return t}}();Object.defineProperty(t,"__esModule",{value:true});t.addINIValuesUnix=addINIValuesUnix;t.addINIValuesWindows=addINIValuesWindows;t.addINIValues=addINIValues;const o=i(r(277));async function addINIValuesUnix(e){const t=await o.CSVArray(e);let r="";await o.asyncForEach(t,async function(e){r+="\n"+await o.addLog("$tick",e,"Added to php.ini","linux")});return'echo "'+t.map(e=>o.escapeForShell(e,"linux")).join("\n")+'" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1'+r}async function addINIValuesWindows(e){const t=await o.CSVArray(e);let r="\n";await o.asyncForEach(t,async function(e){r+=await o.addLog("$tick",e,"Added to php.ini","win32")+"\n"});return'Add-Content "$php_dir\\php.ini" "'+t.map(e=>o.escapeForShell(e,"win32")).join("\n")+'"'+r}async function addINIValues(e,t,r=false){let n="\n";switch(r){case true:n+=await o.stepLog("Add php.ini values",t)+await o.suppressOutput(t)+"\n";break;case false:default:n+=await o.stepLog("Add php.ini values",t)+"\n";break}switch(t){case"win32":return n+await addINIValuesWindows(e);case"darwin":case"linux":return n+await addINIValuesUnix(e);default:return await o.log("Platform "+t+" is not supported",t,"error")}}},469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=issueCommand;t.error=error;t.setFailed=setFailed;t.getInput=getInput;const n=r(857);function toCommandValue(e){if(e instanceof Error){return e.toString()}return e}function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return e.replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}function issueCommand(e,t,r){let s=`::${e}`;if(t&&Object.keys(t).length>0){s+=" ";const e=Object.entries(t).filter(([,e])=>e).map(([e,t])=>`${e}=${escapeProperty(t)}`).join(",");s+=e}s+=`::${escapeData(r)}`;process.stdout.write(s+n.EOL)}function error(e){issueCommand("error",{},e)}function setFailed(e){process.exitCode=1;error(e)}function getInput(e,t=false){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&!r){throw new Error(`Input required and not supplied: ${e}`)}return r.trim()}},524:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;var s=Object.getOwnPropertyDescriptor(t,r);if(!s||("get"in s?!t.__esModule:s.writable||s.configurable)){s={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,n,s)}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var i=this&&this.__importStar||function(){var ownKeys=function(e){ownKeys=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[t.length]=r;return t};return ownKeys(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=ownKeys(e),i=0;i<r.length;i++)if(r[i]!=="default")n(t,e,r[i]);s(t,e);return t}}();Object.defineProperty(t,"__esModule",{value:true});t.checkXdebugError=checkXdebugError;t.addCoverageXdebug=addCoverageXdebug;t.addCoveragePCOV=addCoveragePCOV;t.disableCoverage=disableCoverage;t.addCoverage=addCoverage;const o=i(r(277));const a=i(r(252));const c=i(r(472));async function checkXdebugError(e,t){if(/^5\.[3-6]$|^7\.[0-1]$/.test(t)&&e=="xdebug3"||/^8\.[0-9]$/.test(t)&&e=="xdebug2"){return e+" is not supported on PHP "+t}return""}async function addCoverageXdebug(e,t,r,n){let s="\n";const i=await checkXdebugError(e,t);if(!i){s+=await a.addExtension(":pcov:false",t,r,true)+n;e=e=="xdebug3"?"xdebug":e;s+=await a.addExtension(e,t,r,true)+n;s+=await o.setVariable("xdebug_version","php -r \"echo phpversion('xdebug');\"",r);s+=await o.getCommand(r,"extension_log")+'xdebug "Xdebug $xdebug_version enabled as coverage driver"'}else{s+=await o.addLog("$cross",e,i,r)}return s}async function addCoveragePCOV(e,t,r){let n="\n";switch(true){default:n+=await a.addExtension(":xdebug:Line truncated
|
||||
import{createRequire as e}from"module";var t={26:function(e,t){(function(e,s){true?s(t):0})(this,function(e){"use strict";const t=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;const validateAndParse=e=>{if(typeof e!=="string"){throw new TypeError("Invalid argument expected string")}const s=e.match(t);if(!s){throw new Error(`Invalid argument not valid semver ('${e}' received)`)}s.shift();return s};const isWildcard=e=>e==="*"||e==="x"||e==="X";const tryParse=e=>{const t=parseInt(e,10);return isNaN(t)?e:t};const forceType=(e,t)=>typeof e!==typeof t?[String(e),String(t)]:[e,t];const compareStrings=(e,t)=>{if(isWildcard(e)||isWildcard(t))return 0;const[s,r]=forceType(tryParse(e),tryParse(t));if(s>r)return 1;if(s<r)return-1;return 0};const compareSegments=(e,t)=>{for(let s=0;s<Math.max(e.length,t.length);s++){const r=compareStrings(e[s]||"0",t[s]||"0");if(r!==0)return r}return 0};const compareVersions=(e,t)=>{const s=validateAndParse(e);const r=validateAndParse(t);const n=s.pop();const i=r.pop();const o=compareSegments(s,r);if(o!==0)return o;if(n&&i){return compareSegments(n.split("."),i.split("."))}else if(n||i){return n?-1:1}return 0};const compare=(e,t,r)=>{assertValidOperator(r);const n=compareVersions(e,t);return s[r].includes(n)};const s={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};const r=Object.keys(s);const assertValidOperator=e=>{if(typeof e!=="string"){throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`)}if(r.indexOf(e)===-1){throw new Error(`Invalid operator, expected one of ${r.join("|")}`)}};const satisfies=(e,t)=>{t=t.replace(/([><=]+)\s+/g,"$1");if(t.includes("||")){return t.split("||").some(t=>satisfies(e,t))}else if(t.includes(" - ")){const[s,r]=t.split(" - ",2);return satisfies(e,`>=${s} <=${r}`)}else if(t.includes(" ")){return t.trim().replace(/\s{2,}/g," ").split(" ").every(t=>satisfies(e,t))}const s=t.match(/^([<>=~^]+)/);const r=s?s[1]:"=";if(r!=="^"&&r!=="~")return compare(e,t,r);const[n,i,o,,a]=validateAndParse(e);const[c,l,d,,u]=validateAndParse(t);const p=[n,i,o];const f=[c,l!==null&&l!==void 0?l:"x",d!==null&&d!==void 0?d:"x"];if(u){if(!a)return false;if(compareSegments(p,f)!==0)return false;if(compareSegments(a.split("."),u.split("."))===-1)return false}const h=f.findIndex(e=>e!=="0")+1;const w=r==="~"?2:h>1?h:1;if(compareSegments(p.slice(0,w),f.slice(0,w))!==0)return false;if(compareSegments(p.slice(w),f.slice(w))===-1)return false;return true};const validate=e=>typeof e==="string"&&/^[v\d]/.test(e)&&t.test(e);const validateStrict=e=>typeof e==="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(e);e.compare=compare;e.compareVersions=compareVersions;e.satisfies=satisfies;e.validate=validate;e.validateStrict=validateStrict})}};var s={};function __nccwpck_require__(e){var r=s[e];if(r!==undefined){return r.exports}var n=s[e]={exports:{}};var i=true;try{t[e].call(n.exports,n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete s[e]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=decodeURIComponent(new URL(".",import.meta.url).pathname).slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";(()=>{__nccwpck_require__.d=(e,t)=>{for(var s in t){if(__nccwpck_require__.o(t,s)&&!__nccwpck_require__.o(e,s)){Object.defineProperty(e,s,{enumerable:true,get:t[s]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();var r={};__nccwpck_require__.d(r,{IT:()=>getScript,eF:()=>run,GJ:()=>setEnv});const n=e(import.meta.url)("url");const i=e(import.meta.url)("path");const o=e(import.meta.url)("string_decoder");const a=e(import.meta.url)("os");const c=e(import.meta.url)("events");const l=e(import.meta.url)("child_process");const d=e(import.meta.url)("assert");const u=e(import.meta.url)("fs");var p=undefined&&undefined.__awaiter||function(e,t,s,r){function adopt(e){return e instanceof s?e:new s(function(t){t(e)})}return new(s||(s=Promise))(function(s,n){function fulfilled(e){try{step(r.next(e))}catch(e){n(e)}}function rejected(e){try{step(r["throw"](e))}catch(e){n(e)}}function step(e){e.done?s(e.value):adopt(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())})};const{chmod:f,copyFile:h,lstat:w,mkdir:m,open:g,readdir:v,rename:y,rm:_,rmdir:x,stat:b,symlink:$,unlink:E}=u.promises;const P=process.platform==="win32";function readlink(e){return p(this,void 0,void 0,function*(){const t=yield fs.promises.readlink(e);if(P&&!t.endsWith("\\")){return`${t}\\`}return t})}const k=268435456;const S=u.constants.O_RDONLY;function exists(e){return p(this,void 0,void 0,function*(){try{yield b(e)}catch(e){if(e.code==="ENOENT"){return false}throw e}return true})}function isDirectory(e){return p(this,arguments,void 0,function*(e,t=false){const s=t?yieLine truncated
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
+6
-2
@@ -1,11 +1,15 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ['js', 'ts'],
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
moduleNameMapper: {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1'
|
||||
},
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/*.test.ts'],
|
||||
testRunner: 'jest-circus/runner',
|
||||
transform: {
|
||||
'^.+\\.ts$': ['ts-jest', {tsconfig: 'tsconfig.test.json'}]
|
||||
'^.+\\.ts$': ['ts-jest', {tsconfig: 'tsconfig.test.json', useESM: true}]
|
||||
},
|
||||
verbose: true,
|
||||
collectCoverage: true
|
||||
|
||||
Generated
+233
-250
@@ -1,55 +1,55 @@
|
||||
{
|
||||
"name": "setup-php",
|
||||
"version": "2.40.0-beta",
|
||||
"version": "2.40.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "setup-php",
|
||||
"version": "2.40.0-beta",
|
||||
"version": "2.40.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/exec": "^3.0.0",
|
||||
"compare-versions": "^6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.1.1",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^26.6.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
||||
"@typescript-eslint/parser": "^8.70.0",
|
||||
"@types/node": "^26.6.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
||||
"@typescript-eslint/parser": "^8.71.1",
|
||||
"@typescript/native": "npm:typescript@^7.0.2",
|
||||
"@vercel/ncc": "^0.45.0",
|
||||
"eslint": "^10.11.0",
|
||||
"eslint": "^10.12.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.5",
|
||||
"eslint-plugin-import-x": "^4.17.1",
|
||||
"eslint-plugin-jest": "^29.16.6",
|
||||
"eslint-plugin-prettier": "^5.5.6",
|
||||
"globals": "^17.12.0",
|
||||
"globals": "^17.13.0",
|
||||
"jest": "^30.5.2",
|
||||
"jest-circus": "^30.5.2",
|
||||
"nock": "^14.0.17",
|
||||
"prettier": "^3.9.8",
|
||||
"nock": "^15.0.1",
|
||||
"prettier": "^3.9.9",
|
||||
"simple-git-hooks": "^2.14.0",
|
||||
"ts-jest": "^29.4.12",
|
||||
"ts-jest": "^29.4.14",
|
||||
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/exec": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
||||
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz",
|
||||
"integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^2.0.0"
|
||||
"@actions/io": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
||||
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz",
|
||||
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@@ -119,14 +119,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/generator": {
|
||||
"version": "7.29.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz",
|
||||
"integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==",
|
||||
"version": "7.29.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz",
|
||||
"integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.29.7",
|
||||
"@babel/types": "^7.29.7",
|
||||
"@babel/parser": "^7.29.8",
|
||||
"@babel/types": "^7.29.8",
|
||||
"@jridgewell/gen-mapping": "^0.3.12",
|
||||
"@jridgewell/trace-mapping": "^0.3.28",
|
||||
"jsesc": "^3.0.2"
|
||||
@@ -245,27 +245,27 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helpers": {
|
||||
"version": "7.29.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",
|
||||
"integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",
|
||||
"version": "7.29.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.10.tgz",
|
||||
"integrity": "sha512-EMCx3AGZ3WfAl6ht7AyQoPm2Lh+BGYEMdc4Q6Hf7uSCDOZFuLq44qNwL+iaim8VlyYhRAo4X43+weadK8ZB4Yg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/template": "^7.29.7",
|
||||
"@babel/types": "^7.29.7"
|
||||
"@babel/types": "^7.29.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/parser": {
|
||||
"version": "7.29.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz",
|
||||
"integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==",
|
||||
"version": "7.29.9",
|
||||
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.9.tgz",
|
||||
"integrity": "sha512-CjXrNHTnvqBVqHgdBysY3vk2T8tpJHb5/RMeHJBTyVa9xgugCB0CJTx/3oO8RV2QRQP391RWpB7D6hLjm8V9uA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/types": "^7.29.7"
|
||||
"@babel/types": "^7.29.8"
|
||||
},
|
||||
"bin": {
|
||||
"parser": "bin/babel-parser.js"
|
||||
@@ -330,13 +330,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/plugin-syntax-import-attributes": {
|
||||
"version": "7.28.6",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.28.6.tgz",
|
||||
"integrity": "sha512-jiLC0ma9XkQT3TKJ9uYvlakm66Pamywo+qwL+oL8HJOvc6TWdZXVfhqJr8CCzbSGUAbDOzlGHJC1U+vRfLQDvw==",
|
||||
"version": "7.29.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz",
|
||||
"integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.28.6"
|
||||
"@babel/helper-plugin-utils": "^7.29.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
@@ -529,18 +529,18 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/traverse": {
|
||||
"version": "7.29.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz",
|
||||
"integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==",
|
||||
"version": "7.29.10",
|
||||
"resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.10.tgz",
|
||||
"integrity": "sha512-B3lYAs2nkKskbgQ1nfy8Ma9ao9Q1rntTAQHrzzyDuj+TSO+X3le6PfWwqDvodsb+OumE10eMFfuMCTQSQ5iuIQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.29.7",
|
||||
"@babel/generator": "^7.29.7",
|
||||
"@babel/generator": "^7.29.8",
|
||||
"@babel/helper-globals": "^7.29.7",
|
||||
"@babel/parser": "^7.29.7",
|
||||
"@babel/parser": "^7.29.9",
|
||||
"@babel/template": "^7.29.7",
|
||||
"@babel/types": "^7.29.7",
|
||||
"@babel/types": "^7.29.8",
|
||||
"debug": "^4.3.1"
|
||||
},
|
||||
"engines": {
|
||||
@@ -548,9 +548,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.29.7",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz",
|
||||
"integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==",
|
||||
"version": "7.29.8",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz",
|
||||
"integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -627,9 +627,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint-community/eslint-utils": {
|
||||
"version": "4.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz",
|
||||
"integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==",
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz",
|
||||
"integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1098,9 +1098,9 @@
|
||||
},
|
||||
"node_modules/@jest/react-is-19": {
|
||||
"name": "react-is",
|
||||
"version": "19.2.8",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.8.tgz",
|
||||
"integrity": "sha512-s5un28nYxKJw5gvUHyW5PCC28CvBqLu9r3cWgzHT4Vo/5fqqkFcdRYsGcKf50WMPpjjFZS5d76fn3YCo2njKwQ==",
|
||||
"version": "19.3.0",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.0.tgz",
|
||||
"integrity": "sha512-UpMYezM4v5/18F28aC66AEsjXIgE02kyEMH6yLdgLXu/UTfa1Ntwck/nNLrbqJsEXW7gPb0coNO9FQse9WTovA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1302,9 +1302,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@jridgewell/sourcemap-codec": {
|
||||
"version": "1.5.5",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
|
||||
"integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
|
||||
"version": "1.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
|
||||
"integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -1344,27 +1344,27 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@mswjs/interceptors": {
|
||||
"version": "0.41.9",
|
||||
"resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.41.9.tgz",
|
||||
"integrity": "sha512-VVPPgHyQ6ShqnrmDWuxjmUIsO9gWyOZFmuOfLd9LfBGQJwZfy0gvv9pbHSJuoFNIYC7ZDX9aoFwowjcdSC4E8w==",
|
||||
"version": "0.44.0",
|
||||
"resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.44.0.tgz",
|
||||
"integrity": "sha512-IYHevRStF4ijM20GI9c9Ndhw483NSAjCydQhUr4/zIB0BNLsTVw3vFAxTo6TlvX4QnV60wEHttUa9539TTAq+A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@open-draft/deferred-promise": "^2.2.0",
|
||||
"@open-draft/logger": "^0.3.0",
|
||||
"@open-draft/until": "^2.0.0",
|
||||
"@open-draft/until": "^3.0.1",
|
||||
"@types/debug": "^4.1.13",
|
||||
"debug": "^4.4.3",
|
||||
"is-node-process": "^1.2.0",
|
||||
"outvariant": "^1.4.3",
|
||||
"strict-event-emitter": "^0.5.1"
|
||||
"rettime": "^0.11.11"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
"node": ">=22"
|
||||
}
|
||||
},
|
||||
"node_modules/@napi-rs/wasm-runtime": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.3.tgz",
|
||||
"integrity": "sha512-UMduMbqO5s5zF2NkNacMT/yK5Y5QiKvWr2+50bzIIxFDwVJ2h49b+oyjaCGPhJxd2/gC2x39EHv/gHVuu36x2Q==",
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.5.tgz",
|
||||
"integrity": "sha512-HshSvXzmBxNzqejd3k/KemgQ3hdREUYFRRrgxOZ+gPljDIsO2SDZrVZMd4Z/HsxudQbE62OVyVFE8z9BCurfjA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
@@ -1383,31 +1383,16 @@
|
||||
"@emnapi/runtime": "^1.7.1 || ^2.0.0-alpha.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@open-draft/deferred-promise": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz",
|
||||
"integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@open-draft/logger": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz",
|
||||
"integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==",
|
||||
"node_modules/@open-draft/until": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@open-draft/until/-/until-3.0.1.tgz",
|
||||
"integrity": "sha512-s7/9ELP4aP9YZtW7RJaa0Xf3RISaRH9+EFN18FtykJYRHGNrl8f9ymvoNXzjhrjmftFvkQudtuDU9RYhk0xs3A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"is-node-process": "^1.2.0",
|
||||
"outvariant": "^1.4.0"
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/kettanaito"
|
||||
}
|
||||
},
|
||||
"node_modules/@open-draft/until": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz",
|
||||
"integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@parcel/watcher": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.6.0.tgz",
|
||||
@@ -1754,9 +1739,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@tybys/wasm-util": {
|
||||
"version": "0.10.3",
|
||||
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz",
|
||||
"integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==",
|
||||
"version": "0.10.4",
|
||||
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz",
|
||||
"integrity": "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
@@ -1809,6 +1794,16 @@
|
||||
"@babel/types": "^7.28.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/debug": {
|
||||
"version": "4.1.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz",
|
||||
"integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/ms": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/esrecurse": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
|
||||
@@ -1868,10 +1863,17 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/ms": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz",
|
||||
"integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "26.6.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.2.tgz",
|
||||
"integrity": "sha512-X1P21scMv4zGKLYqjdGjaKa7COa0RKVYYZZN/NfvLQ1JegxFhdhpZG/Lyn8AXx6CDUavKAd11v6BvfpkDByK8g==",
|
||||
"version": "26.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.4.tgz",
|
||||
"integrity": "sha512-ldVPDCzj7fsaGZrLB0NuHuTvJcsNasysBAqMolr/cgxrLd1xbqxIr3XJiPnHHJUCxj5sNF1vnRj9aWnrVh5Jcg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -1903,17 +1905,17 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.70.0.tgz",
|
||||
"integrity": "sha512-/v8HZt6RlyIZxB3ntehELOcUcfxKPVGWXnQdJuHRmzrqgF8nQypcC/oxGW+Ot4VGKDq81XugPKxx0n5PBtf9PA==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.71.1.tgz",
|
||||
"integrity": "sha512-nNlBf6HuotqMgZvSkWD5hNdemiBIxQ2NmrlgfcUIeZRs+BbakjscCQRq/Hb74EFVnFiSWWdL12JruqwBy3ERDw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
"@typescript-eslint/scope-manager": "8.70.0",
|
||||
"@typescript-eslint/type-utils": "8.70.0",
|
||||
"@typescript-eslint/utils": "8.70.0",
|
||||
"@typescript-eslint/visitor-keys": "8.70.0",
|
||||
"@typescript-eslint/scope-manager": "8.71.1",
|
||||
"@typescript-eslint/type-utils": "8.71.1",
|
||||
"@typescript-eslint/utils": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1",
|
||||
"ignore": "^7.0.5",
|
||||
"natural-compare": "^1.4.0",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
@@ -1926,22 +1928,22 @@
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^8.70.0",
|
||||
"@typescript-eslint/parser": "^8.71.1",
|
||||
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
|
||||
"typescript": ">=4.8.4 <6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.70.0.tgz",
|
||||
"integrity": "sha512-zYvrmj9Yxd63UGaXw+kdt6A0F0s0qveJyuatIM77bYC2DE4pgmg7a50u8LR7PRtXd0x+h+Tl3eXabGm06SWd3Q==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.71.1.tgz",
|
||||
"integrity": "sha512-oM/5sAqz/l1v/zYK1qTOPrn2+JIrBGC1V6uNYucRO5gh6eT9vWJ/RhPbGE59byvZEUQ4VP6XkLBaS5Jti5jpvw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.70.0",
|
||||
"@typescript-eslint/types": "8.70.0",
|
||||
"@typescript-eslint/typescript-estree": "8.70.0",
|
||||
"@typescript-eslint/visitor-keys": "8.70.0",
|
||||
"@typescript-eslint/scope-manager": "8.71.1",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/typescript-estree": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1957,14 +1959,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/project-service": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.70.0.tgz",
|
||||
"integrity": "sha512-hFHbTNqhU9G+2eKFXCBVb1tjFT/LceiJ4+HfLO4pTpDI0KHi6iajpcFFkaSQ9gXmCh7n82A0PthaayEdN6mspQ==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.71.1.tgz",
|
||||
"integrity": "sha512-Oijc9RUsohHjncg6iGi7gCtjnEjYt9FWv9u6ygK8uKcHK5eLjLAkqERQ9BaytbpceOFdk6kifPCS/zAZE+A99g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/tsconfig-utils": "^8.70.0",
|
||||
"@typescript-eslint/types": "^8.70.0",
|
||||
"@typescript-eslint/tsconfig-utils": "^8.71.1",
|
||||
"@typescript-eslint/types": "^8.71.1",
|
||||
"debug": "^4.4.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -1979,14 +1981,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.70.0.tgz",
|
||||
"integrity": "sha512-8nP3Kwh5hlgZ4FicGvmznAmJe8UL4sdU8tLukrPaMuQmDuk4Y8xYfzu/aYZW4xT2JCgc7H/TpDI5cGlxcWJSqQ==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.71.1.tgz",
|
||||
"integrity": "sha512-1YUDZXdTnXLlob03SFHBipdyMBsDVm7zoSz0ytTJ39dk5J1TgsTK03VlR/dLXG/RLLUrPcYbD4rp23BmHxHP0w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.70.0",
|
||||
"@typescript-eslint/visitor-keys": "8.70.0"
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -1997,9 +1999,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/tsconfig-utils": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.70.0.tgz",
|
||||
"integrity": "sha512-adnkeeNq9Sq1sUf4+FRVc0KdgYghzsgFpZSQVZVvY0LCuUuN0FnQgyGzCJeC4fW1cdXseBAjU2EOqUIjbNcZUw==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.71.1.tgz",
|
||||
"integrity": "sha512-oTvkml5SxXhgg+WWKhod5qWQICDXtOB+/Hi9VdPKFAANJ2b7YOgMffgvzXuqog7R6A/JtrzRf128dsxummyWhg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2014,15 +2016,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.70.0.tgz",
|
||||
"integrity": "sha512-NUMKIhYVaVIVLnRL9CRt+VVcuLgSHUCpXn4/+K8wql+vdInUzvx8BjUO1oJ7cG9shjFJKtF8F8Hh2kCh3/KBVw==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.71.1.tgz",
|
||||
"integrity": "sha512-kH3t3jZCYv2PZSBEWPKTariLrCaoF1CLoPitYFBJOhAGEwWnSRAtGEifrfrpBa4K9JlwWNZotgA5w3/wLSk/FQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.70.0",
|
||||
"@typescript-eslint/typescript-estree": "8.70.0",
|
||||
"@typescript-eslint/utils": "8.70.0",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/typescript-estree": "8.71.1",
|
||||
"@typescript-eslint/utils": "8.71.1",
|
||||
"debug": "^4.4.3",
|
||||
"ts-api-utils": "^2.5.0"
|
||||
},
|
||||
@@ -2039,9 +2041,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.70.0.tgz",
|
||||
"integrity": "sha512-asTOIYhDg4zdzOScCyaytrsV3cR6B4ecPQlXw/dJIm7J/MZTtCtfVII9JD8Geh4jTCrK/Xe6cg5UevoleMcoJQ==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.71.1.tgz",
|
||||
"integrity": "sha512-ybYnPTUwg3VQQOFEiBPLs8Jxl1ry2vXdn1kVKguomBbvxpetdu3MKTNDqFNUrlG8ylP9MpZosmXMFYlGQHk1oQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -2053,16 +2055,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.70.0.tgz",
|
||||
"integrity": "sha512-d9NmHMPEKQ7QCLLm1jI3zmoQBwT5KwFYjXBJ9ymZfKCUU+5rmTRykKAFvH5Qn/ZCds3CEAFS9OC9M/jkl0X2bA==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.71.1.tgz",
|
||||
"integrity": "sha512-pSKSEK1JJpHs6KiKVtABCE4iJK5d7FLFzDXQNBQ2oRY7LEd3UwOt3TZemTgu9syTIf56dJWlTn/pdmrO9oKUXQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/project-service": "8.70.0",
|
||||
"@typescript-eslint/tsconfig-utils": "8.70.0",
|
||||
"@typescript-eslint/types": "8.70.0",
|
||||
"@typescript-eslint/visitor-keys": "8.70.0",
|
||||
"@typescript-eslint/project-service": "8.71.1",
|
||||
"@typescript-eslint/tsconfig-utils": "8.71.1",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/visitor-keys": "8.71.1",
|
||||
"debug": "^4.4.3",
|
||||
"minimatch": "^10.2.2",
|
||||
"semver": "^7.7.3",
|
||||
@@ -2081,16 +2083,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.70.0.tgz",
|
||||
"integrity": "sha512-oZmtKJz/4fufZ2p3+Cn3ijEojcdfR+1zYDH2xKYrEly0dR/Q/1xUPRCOlKGxod78nWlU2UnDe09GZ3TaknBFGA==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.71.1.tgz",
|
||||
"integrity": "sha512-CBjT6gfAz3DW2j9Q4moFnqt208Aq+506sVGXfpRcyAeqn0EpayL0mjdWoCO2t3RC7GewNrFxdeehuEaPg6DMzQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.9.1",
|
||||
"@typescript-eslint/scope-manager": "8.70.0",
|
||||
"@typescript-eslint/types": "8.70.0",
|
||||
"@typescript-eslint/typescript-estree": "8.70.0"
|
||||
"@typescript-eslint/scope-manager": "8.71.1",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"@typescript-eslint/typescript-estree": "8.71.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
@@ -2105,13 +2107,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "8.70.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.70.0.tgz",
|
||||
"integrity": "sha512-BoC8PiO4Hkdo0TVJh9Ntxr5MxPDI7/oFsrygN5ADelFSeXG/qgNuucIGA+L5Z6JpPTE/uRfcTWtscjbUaufepQ==",
|
||||
"version": "8.71.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.71.1.tgz",
|
||||
"integrity": "sha512-0GxiUGqMU0qXJt58cBsiG3DP8lUmBaFo2vChtUX+CT7PnR3v/VGLLrzVP4K9r1lNiZXjHYefMBbPunplr09v6w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "8.70.0",
|
||||
"@typescript-eslint/types": "8.71.1",
|
||||
"eslint-visitor-keys": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
@@ -2527,9 +2529,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@ungap/structured-clone": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz",
|
||||
"integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==",
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz",
|
||||
"integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -2887,9 +2889,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz",
|
||||
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
||||
"version": "8.19.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz",
|
||||
"integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -3112,9 +3114,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/baseline-browser-mapping": {
|
||||
"version": "2.11.20",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.20.tgz",
|
||||
"integrity": "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw==",
|
||||
"version": "2.11.27",
|
||||
"resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.27.tgz",
|
||||
"integrity": "sha512-ElY12DaROGuan+lMmZ8Cvo/ZUbXPe7Enc/9VU/b1T3Kp4dwytRcNdR8DoSJN5SNJT/CuvcCA0DHDVmMOCePdRQ==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
@@ -3125,9 +3127,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/brace-expansion": {
|
||||
"version": "5.0.9",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
|
||||
"integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
|
||||
"version": "5.0.12",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz",
|
||||
"integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -3138,9 +3140,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/browserslist": {
|
||||
"version": "4.28.8",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz",
|
||||
"integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==",
|
||||
"version": "4.29.3",
|
||||
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.3.tgz",
|
||||
"integrity": "sha512-1R4kiYKXGViqEN0CnoDrXc1StD9niAwu+j2dukWzrD4bJgsD4lDmEp0CRbc6E/vYJIfTHwPmwyaKtVSudICdPA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -3158,11 +3160,11 @@
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.11.12",
|
||||
"caniuse-lite": "^1.0.30001809",
|
||||
"electron-to-chromium": "^1.5.402",
|
||||
"node-releases": "^2.0.53",
|
||||
"update-browserslist-db": "^1.3.0"
|
||||
"baseline-browser-mapping": "^2.11.26",
|
||||
"caniuse-lite": "^1.0.30001813",
|
||||
"electron-to-chromium": "^1.5.439",
|
||||
"node-releases": "^2.0.57",
|
||||
"update-browserslist-db": "^1.3.3"
|
||||
},
|
||||
"bin": {
|
||||
"browserslist": "cli.js"
|
||||
@@ -3229,9 +3231,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001810",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",
|
||||
"integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",
|
||||
"version": "1.0.30001815",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001815.tgz",
|
||||
"integrity": "sha512-uDybUEyfgbyJJ93J1vikTylBX31AkdVYeVPeffMQpf8XN7hSfr0oZOn4VFOIMNvtU5+rHvC5Udg2TgtJKHm23Q==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@@ -3293,9 +3295,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cjs-module-lexer": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.2.1.tgz",
|
||||
"integrity": "sha512-Ca8swihM+/4yKecYHY52kgJd300hi2lADU/a1RxNTRe+RJ9jvqQlESpbz9DnG9mowez8qwXHB8qYdIUw9e+F5Q==",
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.3.0.tgz",
|
||||
"integrity": "sha512-lmNyBzi6iYiqyrExTctfmjd8tInx+dHu9PBomTfH5RXS53c27JMFJgzNv5TyAnm3PgGf+MLy0+Ws41/HlVxdKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -3353,9 +3355,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/comment-parser": {
|
||||
"version": "1.4.6",
|
||||
"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.6.tgz",
|
||||
"integrity": "sha512-ObxuY6vnbWTN6Od72xfwN9DbzC7Y2vv8u1Soi9ahRKL37gb6y1qk6/dgjs+3JWuXJHWvsg3BXIwzd/rkmAwavg==",
|
||||
"version": "1.4.9",
|
||||
"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.9.tgz",
|
||||
"integrity": "sha512-+2AvZKjJaNq9GQljm3tr0utwrig5BL+jgJGvz5rDpGKNIp+ojcRXWUwBbh/sGIi1QCprR6PsKFakub+w1v+4hQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -3461,9 +3463,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron-to-chromium": {
|
||||
"version": "1.5.420",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.420.tgz",
|
||||
"integrity": "sha512-2yD6XreGusOfNV+dUcvipJEXc3n/n7fgr7996aszTG+YY5E4mqM4tOq/3uhP129cazL9YHbVWSpc79ePotWtPA==",
|
||||
"version": "1.5.451",
|
||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.451.tgz",
|
||||
"integrity": "sha512-vUNKPrUzw8ByEMOxloq0a71iD/mPuPxVkbDm3G5YhnxTzOw/I6qAg2MUS0cYj/c267lWmw26yW4Vv7foxTxPLg==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
@@ -3528,9 +3530,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "10.11.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.11.0.tgz",
|
||||
"integrity": "sha512-P7a6UEEqb9G95MYAtqkmsTbVXIYyzIfl6NGOIJk162PaahFxFyeGcrlXYFSiagECg4sEm8IseJdZBKR3rx6MsQ==",
|
||||
"version": "10.12.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-10.12.0.tgz",
|
||||
"integrity": "sha512-npHjrHb2o4ehH3mE+YuxABR+0gyb0aVWCIolgJDArwCiHEIsonBm3ZKjel5b0U5+a+MbEvIyRCGCzD3eKKK2NA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"workspaces": [
|
||||
@@ -4090,9 +4092,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/get-tsconfig": {
|
||||
"version": "4.14.0",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz",
|
||||
"integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==",
|
||||
"version": "4.14.3",
|
||||
"resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.3.tgz",
|
||||
"integrity": "sha512-++QEw4DIY7WGoukz+/+A/8dGYPT9l9yIadnmSgZ8Rjr3YVSVDipQSO9CdnJo9ePqFqUUqh+wk9uIaoiAwsiPkA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -4134,9 +4136,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/globals": {
|
||||
"version": "17.12.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-17.12.0.tgz",
|
||||
"integrity": "sha512-cezEd/DTyyht9cvSSURyygXPfy04GtWO/5e6ZPvH7fCtjKz9PYOmuawphw1Ctd1f6C+5JypXfGD7ahNMXvevBA==",
|
||||
"version": "17.13.0",
|
||||
"resolved": "https://registry.npmjs.org/globals/-/globals-17.13.0.tgz",
|
||||
"integrity": "sha512-RwMTC61u7hrG3ZJMkZQOK4JLJrKS8QtoTii63EmWvFXHqycY9FObBJQCbsLxSO8kjKhWE5kV1GC+Vb1g3RI0Zg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -4154,13 +4156,13 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/handlebars": {
|
||||
"version": "4.7.9",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz",
|
||||
"integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==",
|
||||
"version": "4.7.10",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.10.tgz",
|
||||
"integrity": "sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"minimist": "^1.2.5",
|
||||
"minimist": "^1.2.8",
|
||||
"neo-async": "^2.6.2",
|
||||
"source-map": "^0.6.1",
|
||||
"wordwrap": "^1.0.0"
|
||||
@@ -4223,9 +4225,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ignore": {
|
||||
"version": "7.0.5",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
|
||||
"integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
|
||||
"version": "7.0.12",
|
||||
"resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.12.tgz",
|
||||
"integrity": "sha512-/8UvqAPU9DGTI9k4mxtf49U37Isfwr8Uts96+SBHIkFxPJnHS0Ew4f00sM4Scd8V8EjM0jUNtVDdv1kPdt35lg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -5046,13 +5048,6 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/json-stringify-safe": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
|
||||
"integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/json5": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||
@@ -5181,13 +5176,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minimatch": {
|
||||
"version": "10.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz",
|
||||
"integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==",
|
||||
"version": "10.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
|
||||
"integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"dependencies": {
|
||||
"brace-expansion": "^5.0.5"
|
||||
"brace-expansion": "^5.0.8"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18 || 20 || >=22"
|
||||
@@ -5254,18 +5249,16 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/nock": {
|
||||
"version": "14.0.17",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-14.0.17.tgz",
|
||||
"integrity": "sha512-EjRr1weMa4ALQX35AgZTEnP+weJJjlW1KGDiNM2IQC2069YDHas4f4B4UUYR+TTLyKWxJvOz2wObDKQs/LNreA==",
|
||||
"version": "15.0.1",
|
||||
"resolved": "https://registry.npmjs.org/nock/-/nock-15.0.1.tgz",
|
||||
"integrity": "sha512-Mjx5Xl4t9vP13eUZPWqwwpjjXNjvhUTo1qTdryVM3+7t6Z2w6WHZ9GVZk/zQ8Ym1vbmloWaglye3cloyHAJ8FA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@mswjs/interceptors": "^0.41.0",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"propagate": "^2.0.0"
|
||||
"@mswjs/interceptors": "^0.44.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.20.0 <20 || >=20.12.1"
|
||||
"node": ">=20.12.1"
|
||||
}
|
||||
},
|
||||
"node_modules/node-addon-api": {
|
||||
@@ -5283,9 +5276,9 @@
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/node-releases": {
|
||||
"version": "2.0.54",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz",
|
||||
"integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",
|
||||
"version": "2.0.57",
|
||||
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.57.tgz",
|
||||
"integrity": "sha512-kQK9LGGFiHtrWiNhZtA7Qbw17AQz+dmsEKODRIVTXA9+e5MS/2gZEBhYJt13GrAz5/IOZKddH/0Z3TP/Zgo+yw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -5455,9 +5448,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/path-scurry/node_modules/lru-cache": {
|
||||
"version": "11.3.6",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.3.6.tgz",
|
||||
"integrity": "sha512-Gf/KoL3C/MlI7Bt0PGI9I+TeTC/I6r/csU58N4BSNc4lppLBeKsOdFYkK+dX0ABDUMJNfCHTyPpzwwO21Awd3A==",
|
||||
"version": "11.5.3",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
|
||||
"integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
|
||||
"dev": true,
|
||||
"license": "BlueOak-1.0.0",
|
||||
"engines": {
|
||||
@@ -5472,9 +5465,9 @@
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
|
||||
"integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
|
||||
"version": "4.0.7",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
|
||||
"integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -5574,9 +5567,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.9.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.8.tgz",
|
||||
"integrity": "sha512-WRFq3Wn3WId7LLROfMLdH7xaFr2jR62wU8nLO6rQUOLOxNZUviyJQs1M0iIhLexSFy+L+w0ch66wtoO2jRjG0A==",
|
||||
"version": "3.9.9",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.9.tgz",
|
||||
"integrity": "sha512-Z/CJHIkdujO/OtN7nXUii0Rf3VT5SRuhjBA82Xvu2XhBUgX3nhP67T0LHceBdQLex7OOFGTox+Q5Yg8Jk2Qivg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
@@ -5631,16 +5624,6 @@
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/propagate": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz",
|
||||
"integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/punycode": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
|
||||
@@ -5731,6 +5714,13 @@
|
||||
"url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/rettime": {
|
||||
"version": "0.11.12",
|
||||
"resolved": "https://registry.npmjs.org/rettime/-/rettime-0.11.12.tgz",
|
||||
"integrity": "sha512-5ExtR1ppiDBQkVoPw5NAqdbfH4Iq2VOmQKHMtUoaFxA9bo2krzFYBtyq6K40xxbYp+2w/YOr6D+1ToF6tTN53A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.8.5",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
|
||||
@@ -5838,13 +5828,6 @@
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strict-event-emitter": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz",
|
||||
"integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/string-length": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
|
||||
@@ -5965,9 +5948,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/tinyglobby": {
|
||||
"version": "0.2.16",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz",
|
||||
"integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==",
|
||||
"version": "0.2.17",
|
||||
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
|
||||
"integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -5995,9 +5978,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ts-jest": {
|
||||
"version": "29.4.12",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.12.tgz",
|
||||
"integrity": "sha512-Ov6ClY53Fflh6BGAnY2DlTq1hYDrTycz2PVTXBWFW2CU+9zrEqAp9fWdGXl42EXO5RLSFAcAZ2JFKbP+zBTFfw==",
|
||||
"version": "29.4.14",
|
||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.14.tgz",
|
||||
"integrity": "sha512-+943G6wCX5E3VpzTQhBGBFntCmdT+QAkTvUlp03edTONFBvqskuXPhpyX16xdUotO4P5HQKyppldSWjocoltLQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -6018,7 +6001,7 @@
|
||||
"node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@babel/core": ">=7.0.0-beta.0 <8",
|
||||
"@babel/core": ">=7.0.0-beta.0 <9",
|
||||
"@jest/transform": "^29.0.0 || ^30.0.0",
|
||||
"@jest/types": "^29.0.0 || ^30.0.0",
|
||||
"babel-jest": "^29.0.0 || ^30.0.0",
|
||||
@@ -6178,9 +6161,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.3.2",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",
|
||||
"integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz",
|
||||
"integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
|
||||
+15
-13
@@ -1,8 +1,9 @@
|
||||
{
|
||||
"name": "setup-php",
|
||||
"version": "2.40.0-beta",
|
||||
"version": "2.40.0",
|
||||
"private": false,
|
||||
"description": "Setup PHP for use with GitHub Actions",
|
||||
"type": "module",
|
||||
"main": "lib/install.js",
|
||||
"types": "lib/install.d.ts",
|
||||
"directories": {
|
||||
@@ -21,7 +22,7 @@
|
||||
"format-check": "prettier --check **/src/*.ts **/__tests__/*.ts",
|
||||
"release": "ncc build -m -o dist && git add -f dist/",
|
||||
"typecheck": "tsc --project tsconfig.test.json --noEmit",
|
||||
"test": "jest"
|
||||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -35,31 +36,31 @@
|
||||
"author": "shivammathur",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/exec": "^3.0.0",
|
||||
"compare-versions": "^6.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^2.1.1",
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/node": "^26.6.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
||||
"@typescript-eslint/parser": "^8.70.0",
|
||||
"@types/node": "^26.6.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.71.1",
|
||||
"@typescript-eslint/parser": "^8.71.1",
|
||||
"@typescript/native": "npm:typescript@^7.0.2",
|
||||
"@vercel/ncc": "^0.45.0",
|
||||
"eslint": "^10.11.0",
|
||||
"eslint": "^10.12.0",
|
||||
"eslint-config-prettier": "^10.1.8",
|
||||
"eslint-import-resolver-typescript": "^4.4.5",
|
||||
"eslint-plugin-import-x": "^4.17.1",
|
||||
"eslint-plugin-jest": "^29.16.6",
|
||||
"eslint-plugin-prettier": "^5.5.6",
|
||||
"globals": "^17.12.0",
|
||||
"globals": "^17.13.0",
|
||||
"jest": "^30.5.2",
|
||||
"jest-circus": "^30.5.2",
|
||||
"nock": "^14.0.17",
|
||||
"prettier": "^3.9.8",
|
||||
"nock": "^15.0.1",
|
||||
"prettier": "^3.9.9",
|
||||
"simple-git-hooks": "^2.14.0",
|
||||
"ts-jest": "^29.4.12",
|
||||
"ts-jest": "^29.4.14",
|
||||
"typescript": "npm:@typescript/typescript6@^6.0.2"
|
||||
},
|
||||
"overrides": {
|
||||
@@ -76,8 +77,9 @@
|
||||
"pre-commit": "npm run format && npm run lint && npm run test && npm run build && npm run release"
|
||||
},
|
||||
"allowScripts": {
|
||||
"@parcel/watcher@2.6.0": true,
|
||||
"fsevents@2.3.3": true,
|
||||
"simple-git-hooks@2.13.1": true,
|
||||
"unrs-resolver@1.11.1": true
|
||||
"simple-git-hooks@2.14.0": true,
|
||||
"unrs-resolver@1.12.2": true
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as utils from './utils';
|
||||
import * as utils from './utils.js';
|
||||
|
||||
/**
|
||||
* Add script to set custom ini values for unix
|
||||
|
||||
+10
-5
@@ -153,12 +153,17 @@
|
||||
"version_parameter": "-V"
|
||||
},
|
||||
"phpstan": {
|
||||
"type": "phar",
|
||||
"type": "composer",
|
||||
"repository": "phpstan/phpstan",
|
||||
"extension": ".phar",
|
||||
"domain": "https://github.com",
|
||||
"version_prefix": "",
|
||||
"version_parameter": "-V"
|
||||
"scope": "scoped",
|
||||
"fallback": {
|
||||
"type": "phar",
|
||||
"repository": "phpstan/phpstan",
|
||||
"extension": ".phar",
|
||||
"domain": "https://github.com",
|
||||
"version_prefix": "",
|
||||
"version_parameter": "-V"
|
||||
}
|
||||
},
|
||||
"pie": {
|
||||
"type": "phar",
|
||||
|
||||
+152
-114
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/tools_schema.json",
|
||||
"type": "object",
|
||||
"title": "Tools",
|
||||
@@ -14,123 +14,161 @@
|
||||
"function": "function_name",
|
||||
"repository": "user/tool",
|
||||
"packagist": "user/tool",
|
||||
"scope": "global, scoped",
|
||||
"type": "phar, composer, custom-package or custom-function",
|
||||
"scope": "scoped",
|
||||
"type": "composer",
|
||||
"version_parameter": "--version",
|
||||
"version_prefix": "v"
|
||||
"version_prefix": "v",
|
||||
"fallback": {
|
||||
"type": "phar",
|
||||
"repository": "user/tool",
|
||||
"domain": "https://github.com",
|
||||
"extension": ".phar",
|
||||
"version_prefix": "v",
|
||||
"version_parameter": "--version"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"items": {
|
||||
"properties": {
|
||||
"alias": {
|
||||
"$id": "#/items/properties/alias",
|
||||
"type": "string",
|
||||
"title": "The alias schema",
|
||||
"description": "Alias for a tool.",
|
||||
"examples": [
|
||||
"tool_alias"
|
||||
]
|
||||
"additionalProperties": {
|
||||
"$ref": "#/$defs/tool"
|
||||
},
|
||||
"$defs": {
|
||||
"tool": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"alias": {
|
||||
"type": "string",
|
||||
"title": "The alias schema",
|
||||
"description": "Alias for a tool.",
|
||||
"examples": [
|
||||
"tool_alias"
|
||||
]
|
||||
},
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"title": "The domain schema",
|
||||
"description": "Domain URL of the tool.",
|
||||
"examples": [
|
||||
"https://example.com"
|
||||
]
|
||||
},
|
||||
"extension": {
|
||||
"type": "string",
|
||||
"title": "The extension schema",
|
||||
"description": "File extension of the tool.",
|
||||
"examples": [
|
||||
".ext"
|
||||
]
|
||||
},
|
||||
"fetch_latest": {
|
||||
"type": "string",
|
||||
"title": "The fetch_latest schema",
|
||||
"description": "Fetch the latest version from GitHub releases.",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
]
|
||||
},
|
||||
"function": {
|
||||
"type": "string",
|
||||
"title": "The function schema",
|
||||
"description": "Function name in tools.ts which returns the script to setup the tool.",
|
||||
"examples": [
|
||||
"function_name"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"title": "The repository schema",
|
||||
"description": "GitHub repository of the tool.",
|
||||
"examples": [
|
||||
"user/tool"
|
||||
]
|
||||
},
|
||||
"packagist": {
|
||||
"type": "string",
|
||||
"title": "The repository schema",
|
||||
"description": "Packagist repository of the tool in case different from repository.",
|
||||
"examples": [
|
||||
"user/tool"
|
||||
]
|
||||
},
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"title": "The scope schema",
|
||||
"description": "Scope of tool installation: global or scoped",
|
||||
"enum": [
|
||||
"global",
|
||||
"scoped"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"title": "The type schema",
|
||||
"description": "Type of tool: phar, composer, custom-package or custom-function.",
|
||||
"enum": [
|
||||
"phar",
|
||||
"composer",
|
||||
"custom-package",
|
||||
"custom-function"
|
||||
]
|
||||
},
|
||||
"version_parameter": {
|
||||
"type": "string",
|
||||
"title": "The version_parameter schema",
|
||||
"description": "Parameter to get the tool version.",
|
||||
"examples": [
|
||||
"--version"
|
||||
]
|
||||
},
|
||||
"version_prefix": {
|
||||
"type": "string",
|
||||
"title": "The version_prefix schema",
|
||||
"description": "Prefix of the version in the download URL.",
|
||||
"examples": [
|
||||
"v"
|
||||
]
|
||||
},
|
||||
"fallback": {
|
||||
"$ref": "#/$defs/pharFallback"
|
||||
}
|
||||
},
|
||||
"domain": {
|
||||
"$id": "#/items/properties/domain",
|
||||
"type": "string",
|
||||
"title": "The domain schema",
|
||||
"description": "Domain URL of the tool.",
|
||||
"examples": [
|
||||
"https://example.com"
|
||||
]
|
||||
},
|
||||
"extension": {
|
||||
"$id": "#/items/properties/extension",
|
||||
"type": "string",
|
||||
"title": "The extension schema",
|
||||
"description": "File extension of the tool.",
|
||||
"examples": [
|
||||
".ext"
|
||||
]
|
||||
},
|
||||
"fetch_latest": {
|
||||
"$id": "#/items/properties/fetch_latest",
|
||||
"type": "string",
|
||||
"title": "The fetch_latest schema",
|
||||
"description": "Fetch the latest version from GitHub releases.",
|
||||
"enum": [
|
||||
"true",
|
||||
"false"
|
||||
]
|
||||
},
|
||||
"function": {
|
||||
"$id": "#/items/properties/function",
|
||||
"type": "string",
|
||||
"title": "The function schema",
|
||||
"description": "Function name in tools.ts which returns the script to setup the tool.",
|
||||
"examples": [
|
||||
"function_name"
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"$id": "#/items/properties/repository",
|
||||
"type": "string",
|
||||
"title": "The repository schema",
|
||||
"description": "GitHub repository of the tool.",
|
||||
"examples": [
|
||||
"user/tool"
|
||||
]
|
||||
},
|
||||
"packagist": {
|
||||
"$id": "#/items/properties/packagist",
|
||||
"type": "string",
|
||||
"title": "The repository schema",
|
||||
"description": "Packagist repository of the tool in case different from repository.",
|
||||
"examples": [
|
||||
"user/tool"
|
||||
]
|
||||
},
|
||||
"scope": {
|
||||
"$id": "#/items/properties/scope",
|
||||
"type": "string",
|
||||
"title": "The scope schema",
|
||||
"description": "Scope of tool installation: global or scoped",
|
||||
"enum": [
|
||||
"global",
|
||||
"scoped"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"$id": "#/items/properties/type",
|
||||
"type": "string",
|
||||
"title": "The type schema",
|
||||
"description": "Type of tool: phar, composer, custom-package or custom-function.",
|
||||
"enum": [
|
||||
"phar",
|
||||
"composer",
|
||||
"custom-package",
|
||||
"custom-function"
|
||||
]
|
||||
},
|
||||
"version_parameter": {
|
||||
"$id": "#/items/properties/version_parameter",
|
||||
"type": "string",
|
||||
"title": "The version_parameter schema",
|
||||
"description": "Parameter to get the tool version.",
|
||||
"examples": [
|
||||
"--version"
|
||||
]
|
||||
},
|
||||
"version_prefix": {
|
||||
"$id": "#/items/properties/version_prefix",
|
||||
"type": "string",
|
||||
"title": "The version_prefix schema",
|
||||
"description": "Prefix of the version in the download URL.",
|
||||
"examples": [
|
||||
"v"
|
||||
]
|
||||
}
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"additionalProperties": true
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"additionalProperties": true
|
||||
"pharFallback": {
|
||||
"type": "object",
|
||||
"title": "The fallback schema",
|
||||
"description": "PHAR installation settings used when Composer installation fails.",
|
||||
"properties": {
|
||||
"type": {
|
||||
"const": "phar"
|
||||
},
|
||||
"repository": {
|
||||
"$ref": "#/$defs/tool/properties/repository"
|
||||
},
|
||||
"domain": {
|
||||
"$ref": "#/$defs/tool/properties/domain"
|
||||
},
|
||||
"extension": {
|
||||
"$ref": "#/$defs/tool/properties/extension"
|
||||
},
|
||||
"fetch_latest": {
|
||||
"$ref": "#/$defs/tool/properties/fetch_latest"
|
||||
},
|
||||
"version_parameter": {
|
||||
"$ref": "#/$defs/tool/properties/version_parameter"
|
||||
},
|
||||
"version_prefix": {
|
||||
"$ref": "#/$defs/tool/properties/version_prefix"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import * as utils from './utils';
|
||||
import * as extensions from './extensions';
|
||||
import * as config from './config';
|
||||
import * as utils from './utils.js';
|
||||
import * as extensions from './extensions.js';
|
||||
import * as config from './config.js';
|
||||
|
||||
export async function checkXdebugError(
|
||||
extension: string,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import * as utils from './utils';
|
||||
import * as utils from './utils.js';
|
||||
|
||||
/**
|
||||
* Install and enable extensions for darwin
|
||||
|
||||
+11
-8
@@ -1,12 +1,15 @@
|
||||
import {fileURLToPath} from 'url';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import {exec} from '@actions/exec';
|
||||
import * as config from './config';
|
||||
import * as core from './core';
|
||||
import * as coverage from './coverage';
|
||||
import * as extensions from './extensions';
|
||||
import * as tools from './tools';
|
||||
import * as utils from './utils';
|
||||
import fs from 'fs';
|
||||
import * as config from './config.js';
|
||||
import * as core from './core.js';
|
||||
import * as coverage from './coverage.js';
|
||||
import * as extensions from './extensions.js';
|
||||
import * as tools from './tools.js';
|
||||
import * as utils from './utils.js';
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
/**
|
||||
* Build the script
|
||||
@@ -16,7 +19,7 @@ import * as utils from './utils';
|
||||
export async function getScript(os: string): Promise<string> {
|
||||
const url = 'https://setup-php.com/sponsor';
|
||||
const filename = os + (await utils.scriptExtension(os));
|
||||
const script_path = path.join(__dirname, '../src/scripts', filename);
|
||||
const script_path = path.join(dirname, '../src/scripts', filename);
|
||||
const run_path = script_path.replace(os, 'run');
|
||||
const extension_csv: string = utils.sanitizeShellInput(
|
||||
await utils.getInput('extensions', false),
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import * as cv from 'compare-versions';
|
||||
import * as fetch from './fetch';
|
||||
import * as fetch from './fetch.js';
|
||||
|
||||
type RS = Record<string, string>;
|
||||
type RSRS = Record<string, RS>;
|
||||
|
||||
+14
-5
@@ -168,8 +168,12 @@ patch_brew() {
|
||||
# Function to update dependencies.
|
||||
update_dependencies() {
|
||||
if ! [ -e /tmp/update_dependencies ]; then
|
||||
for repo in "$brew_repo" "${core_repo:?}"; do
|
||||
if [ -e "$repo" ]; then
|
||||
local repos=("$brew_repo")
|
||||
if [ -n "${HOMEBREW_NO_INSTALL_FROM_API:-}" ]; then
|
||||
repos+=("${core_repo:?}")
|
||||
fi
|
||||
for repo in "${repos[@]}"; do
|
||||
if [ -d "$repo" ]; then
|
||||
git_retry -C "$repo" fetch origin main && git -C "$repo" reset --hard origin/main || return $?
|
||||
fi
|
||||
done
|
||||
@@ -199,20 +203,26 @@ setup_cached_versions() {
|
||||
|
||||
# Function to setup PHP 5.6 and newer using Homebrew.
|
||||
add_php() {
|
||||
local exit_code
|
||||
local exit_code php_alias
|
||||
action=$1
|
||||
existing_version=$2
|
||||
suffix="$(get_php_formula_suffix)"
|
||||
php_keg="php@$version$suffix"
|
||||
php_formula="shivammathur/php/$php_keg"
|
||||
if [[ "$existing_version" = "false" || -n "$suffix" || "$action" = "upgrade" ]]; then
|
||||
if [ "$(uname -m)" = "x86_64" ] || { [ "${runner:?}" != "self-hosted" ] && [ "${use_package_cache:-true}" != "false" ]; }; then
|
||||
if [ "$(uname -m)" = "x86_64" ] || { [ "${runner:?}" != "self-hosted" ] && [ "${use_builds_cache:-true}" != "false" ]; }; then
|
||||
setup_cached_versions && return 0
|
||||
[ "$(uname -m)" != "x86_64" ] || return 1
|
||||
fi
|
||||
update_dependencies
|
||||
add_brew_tap "$php_tap"
|
||||
fi
|
||||
# Resolve PHP aliases before invoking brew to avoid scanning unrelated installed formulae.
|
||||
php_alias="$tap_dir/$php_tap/Aliases/$php_keg"
|
||||
if [ -L "$php_alias" ]; then
|
||||
php_keg="$(basename "$(readlink "$php_alias")" .rb)"
|
||||
php_formula="shivammathur/php/$php_keg"
|
||||
fi
|
||||
if [[ "$existing_version" != "false" && -z "$suffix" ]]; then
|
||||
if [ "$action" = "upgrade" ]; then
|
||||
safe_brew install --only-dependencies "$php_formula" || return $?
|
||||
@@ -335,7 +345,6 @@ export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||
|
||||
# shellcheck source=.
|
||||
. "${scripts:?}"/unix.sh
|
||||
|
||||
@@ -226,7 +226,7 @@ update_php() {
|
||||
|
||||
# Function to install PHP.
|
||||
add_php() {
|
||||
if [ "${runner:?}" = "self-hosted" ] || [ "${use_package_cache:-true}" = "false" ]; then
|
||||
if [ "${runner:?}" = "self-hosted" ] || [ "${use_builds_cache:-true}" = "false" ]; then
|
||||
if [[ "$version" =~ ${php_builder_versions:?} || "$ts" = "zts" ]]; then
|
||||
setup_php_builder
|
||||
else
|
||||
@@ -285,6 +285,9 @@ add_php_config() {
|
||||
# Function to Setup PHP
|
||||
setup_php() {
|
||||
step_log "Setup PHP"
|
||||
if [ "${builds_cache_warning:-false}" = "true" ]; then
|
||||
add_log "!" "PHP" "Cached PHP builds are experimental on this runner and may fail to install"
|
||||
fi
|
||||
sudo mkdir -m 777 -p /var/run /run/php
|
||||
php_config="$(command -v php-config)"
|
||||
check_pre_installed
|
||||
|
||||
@@ -237,6 +237,26 @@ Function Add-ToolsHelper() {
|
||||
}
|
||||
}
|
||||
|
||||
# Function to find the newest stable release containing a tool asset.
|
||||
Function Get-LastRelease($url) {
|
||||
$releases_url = $url.Split('/latest/download/')[0]
|
||||
$asset = $url.Split('/')[-1]
|
||||
$page = 1
|
||||
do {
|
||||
$releases = (Get-File -Url "${releases_url}?page=$page&q=prerelease%3Afalse").Content
|
||||
foreach ($match in [regex]::Matches($releases, 'src="([^"]+/releases/expanded_assets/[^"]+)"')) {
|
||||
$assets_url = $match.Groups[1].Value
|
||||
if (-not $assets_url.StartsWith("$releases_url/expanded_assets/")) { continue }
|
||||
$download_path = $assets_url.Substring('https://github.com'.Length).Replace('/expanded_assets/', '/download/') + "/$asset"
|
||||
$assets = (Get-File -Url $assets_url).Content
|
||||
if ($assets.Contains("href=`"$download_path`"")) {
|
||||
return "https://github.com$download_path"
|
||||
}
|
||||
}
|
||||
$page++
|
||||
} while ($releases.Contains('class="next_page"'))
|
||||
}
|
||||
|
||||
# Function to add tools.
|
||||
Function Add-Tool() {
|
||||
Param (
|
||||
@@ -288,15 +308,17 @@ Function Add-Tool() {
|
||||
try {
|
||||
$status_code = (Invoke-WebRequest -Passthru -Uri $url -OutFile $tool_path).StatusCode
|
||||
} catch {
|
||||
if($url -match '.*github.com.*releases.*latest.*') {
|
||||
$status_code = 0
|
||||
if($url -match '^https://github\.com/[^/]+/[^/]+/releases/latest/download/[^/?#]+$') {
|
||||
try {
|
||||
$url = $url.replace("releases/latest/download", "releases/download/" + ([regex]::match((Get-File -Url ($url.split('/release')[0] + "/releases")).Content, "([0-9]+\.[0-9]+\.[0-9]+)/" + ($url.Substring($url.LastIndexOf("/") + 1))).Groups[0].Value).split('/')[0])
|
||||
$status_code = (Invoke-WebRequest -Passthru -Uri $url -OutFile $tool_path).StatusCode
|
||||
$release_url = Get-LastRelease $url
|
||||
if ($release_url) {
|
||||
$url = $release_url
|
||||
$status_code = (Invoke-WebRequest -Passthru -Uri $url -OutFile $tool_path).StatusCode
|
||||
}
|
||||
} catch {
|
||||
$status_code = 0
|
||||
}
|
||||
} else {
|
||||
$status_code = 0
|
||||
}
|
||||
}
|
||||
if($status_code -eq 200 -and (Test-Path $tool_path)) {
|
||||
@@ -375,23 +397,33 @@ Function Add-ComposerToolHelper() {
|
||||
composer global config --no-plugins allow-plugins."$prefix$tool" true >$null 2>&1
|
||||
}
|
||||
composer global require $prefix$release $composer_args >$null 2>&1
|
||||
if($LASTEXITCODE -ne 0) {
|
||||
return
|
||||
}
|
||||
return composer global show $prefix$tool 2>&1 | findstr '^versions'
|
||||
} else {
|
||||
$release_stream = [System.IO.MemoryStream]::New([System.Text.Encoding]::ASCII.GetBytes($release))
|
||||
$scoped_dir_suffix = (Get-FileHash -InputStream $release_stream -Algorithm sha256).Hash
|
||||
$scoped_dir = "$composer_bin\_tools\$tool-$scoped_dir_suffix"
|
||||
$unix_scoped_dir = $scoped_dir.replace('\', '/')
|
||||
if(-not(Test-Path $scoped_dir)) {
|
||||
if(-not(Test-Path $scoped_dir\vendor\autoload.php)) {
|
||||
New-Item -ItemType Directory -Force -Path $scoped_dir > $null 2>&1
|
||||
Set-Content -Path $scoped_dir\composer.json -Value "{}"
|
||||
if((composer show $prefix$tool $tool_version -d $unix_scoped_dir -a 2>&1 | findstr '^type *: *composer-plugin') -and ($composer_args -ne '')) {
|
||||
composer config -d $unix_scoped_dir --no-plugins allow-plugins."$prefix$tool" true >$null 2>&1
|
||||
}
|
||||
composer require $prefix$release -d $unix_scoped_dir $composer_args >$null 2>&1
|
||||
if($LASTEXITCODE -ne 0) {
|
||||
return
|
||||
}
|
||||
}
|
||||
$log = composer show $prefix$tool -d $unix_scoped_dir 2>&1 | findstr '^versions'
|
||||
if(-not $log) {
|
||||
return
|
||||
}
|
||||
[System.Environment]::SetEnvironmentVariable(($tool.replace('-', '_') + '_bin'), "$scoped_dir\vendor\bin")
|
||||
Add-Path $scoped_dir\vendor\bin
|
||||
return composer show $prefix$tool -d $unix_scoped_dir 2>&1 | findstr '^versions'
|
||||
return $log
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +449,13 @@ Function Add-ComposerTool() {
|
||||
[ValidateNotNull()]
|
||||
[ValidateLength(1, [int]::MaxValue)]
|
||||
[string]
|
||||
$scope
|
||||
$scope,
|
||||
[Parameter(Position = 4, Mandatory = $false)]
|
||||
[string]
|
||||
$fallback_url,
|
||||
[Parameter(Position = 5, Mandatory = $false)]
|
||||
[string]
|
||||
$fallback_version_parameter
|
||||
)
|
||||
$composer_args = ""
|
||||
if($composer_version.split('.')[0] -ne "1") {
|
||||
@@ -433,10 +471,13 @@ Function Add-ComposerTool() {
|
||||
if(Test-Path $composer_bin\composer) {
|
||||
Copy-Item -Path "$bin_dir\composer" -Destination "$composer_bin\composer" -Force
|
||||
}
|
||||
Add-ToolsHelper $tool
|
||||
if($log) {
|
||||
$tool_version = Get-ToolVersion "Write-Output" "$log"
|
||||
Add-ToolsHelper $tool
|
||||
Add-Log $tick $tool "Added $tool $tool_version"
|
||||
} elseif($fallback_url) {
|
||||
Add-Log "!" $tool "Could not setup $tool using Composer. Falling back to PHAR."
|
||||
Add-Tool $fallback_url $tool $fallback_version_parameter
|
||||
} else {
|
||||
Add-Log $cross $tool "Could not setup $tool"
|
||||
}
|
||||
|
||||
@@ -203,6 +203,27 @@ add_tools_helper() {
|
||||
done
|
||||
}
|
||||
|
||||
# Function to find the newest stable release containing a tool asset.
|
||||
get_last_release() {
|
||||
local releases_url="${1%/latest/download/*}"
|
||||
local asset="${1##*/}"
|
||||
local page=1 releases assets_url tag download_path
|
||||
while true; do
|
||||
releases=$(get -s -n "" "$releases_url?page=$page&q=prerelease%3Afalse") || return 1
|
||||
while IFS= read -r assets_url; do
|
||||
[[ "$assets_url" = "$releases_url/expanded_assets/"* ]] || continue
|
||||
tag="${assets_url#"$releases_url/expanded_assets/"}"
|
||||
download_path="${releases_url#https://github.com}/download/$tag/$asset"
|
||||
if get -s -n "" "$assets_url" | grep -Fq "href=\"$download_path\""; then
|
||||
printf 'https://github.com%s\n' "$download_path"
|
||||
return 0
|
||||
fi
|
||||
done <<< "$(printf '%s' "$releases" | grep -Eo 'src="[^"]+/releases/expanded_assets/[^"]+"' | cut -d '"' -f 2)"
|
||||
[[ "$releases" = *'class="next_page"'* ]] || return 1
|
||||
page=$((page + 1))
|
||||
done
|
||||
}
|
||||
|
||||
# Function to setup a remote tool.
|
||||
add_tool() {
|
||||
url=$1
|
||||
@@ -243,9 +264,12 @@ add_tool() {
|
||||
else
|
||||
[ -f "$tool_path" ] && sudo cp -a "$tool_path" "$tool_path.bak"
|
||||
status_code=$(get -v -e "$tool_path" "${url[@]}")
|
||||
if [ "$status_code" != "200" ] && [[ "${url[0]}" =~ .*github.com.*releases.*latest.* ]]; then
|
||||
url[0]="${url[0]//releases\/latest\/download/releases/download/$(get -s -n "" "$(echo "${url[0]}" | cut -d '/' -f '1-5')/releases" | grep -Eo -m 1 "([0-9]+\.[0-9]+\.[0-9]+)/$(echo "${url[0]}" | sed -e "s/.*\///")" | cut -d '/' -f 1)}"
|
||||
status_code=$(get -v -e "$tool_path" "${url[0]}")
|
||||
if [ "$status_code" != "200" ] && [[ "${url[0]}" =~ ^https://github\.com/[^/]+/[^/]+/releases/latest/download/[^/?#]+$ ]]; then
|
||||
local release_url
|
||||
if release_url=$(get_last_release "${url[0]}"); then
|
||||
url[0]="$release_url"
|
||||
status_code=$(get -v -e "$tool_path" "${url[0]}")
|
||||
fi
|
||||
fi
|
||||
if [ "$status_code" = "200" ]; then
|
||||
if [ -n "$checksum" ] && ! verify_checksum "$tool_path" "$checksum"; then
|
||||
@@ -293,19 +317,20 @@ add_composer_tool_helper() {
|
||||
if composer global show "$prefix$tool" "$tool_version" -a 2>&1 | grep -qE '^type *: *composer-plugin' && [ -n "$composer_args" ]; then
|
||||
composer global config --no-plugins allow-plugins."$prefix$tool" true >/dev/null 2>&1
|
||||
fi
|
||||
composer global require "$prefix$release" "$composer_args" >/dev/null 2>&1
|
||||
composer global require "$prefix$release" "$composer_args" >/dev/null 2>&1 || return 1
|
||||
composer global show "$prefix$tool" 2>&1 | grep -E ^versions | sudo tee /tmp/composer.log >/dev/null 2>&1
|
||||
else
|
||||
scoped_dir="$composer_bin/_tools/$tool-$(echo -n "$release" | shasum -a 256 | cut -d ' ' -f 1)"
|
||||
if ! [ -d "$scoped_dir" ]; then
|
||||
if ! [ -f "$scoped_dir/vendor/autoload.php" ]; then
|
||||
mkdir -p "$scoped_dir"
|
||||
echo '{}' | tee "$scoped_dir/composer.json" >/dev/null
|
||||
if composer show "$prefix$tool" "$tool_version" -d "$scoped_dir" -a 2>&1 | grep -qE '^type *: *composer-plugin' && [ -n "$composer_args" ]; then
|
||||
composer config -d "$scoped_dir" --no-plugins allow-plugins."$prefix$tool" true >/dev/null 2>&1
|
||||
fi
|
||||
composer require "$prefix$release" -d "$scoped_dir" "$composer_args" >/dev/null 2>&1
|
||||
composer show "$prefix$tool" -d "$scoped_dir" 2>&1 | grep -E ^versions | sudo tee /tmp/composer.log >/dev/null 2>&1
|
||||
composer require "$prefix$release" -d "$scoped_dir" "$composer_args" >/dev/null 2>&1 || return 1
|
||||
fi
|
||||
composer show "$prefix$tool" -d "$scoped_dir" 2>&1 | grep -E ^versions | sudo tee /tmp/composer.log >/dev/null 2>&1
|
||||
[ -s /tmp/composer.log ] || return 1
|
||||
add_path "$scoped_dir"/vendor/bin
|
||||
fi
|
||||
}
|
||||
@@ -316,6 +341,7 @@ add_composer_tool() {
|
||||
release=$2
|
||||
prefix=$3
|
||||
scope=$4
|
||||
local fallback_url=${5:-} fallback_version_parameter=${6:-}
|
||||
composer_args=
|
||||
composer_major_version=$(cut -d'.' -f 1 /tmp/composer_version)
|
||||
if [ "$composer_major_version" != "1" ]; then
|
||||
@@ -326,11 +352,17 @@ add_composer_tool() {
|
||||
return
|
||||
fi
|
||||
fi
|
||||
add_composer_tool_helper "$tool" "$release" "$prefix" "$scope" "$composer_args"
|
||||
tool_version=$(get_tool_version cat /tmp/composer.log)
|
||||
([ -s /tmp/composer.log ] && add_log "$tick" "$tool" "Added $tool $tool_version"
|
||||
) || add_log "$cross" "$tool" "Could not setup $tool"
|
||||
add_tools_helper "$tool"
|
||||
sudo rm -f /tmp/composer.log
|
||||
if add_composer_tool_helper "$tool" "$release" "$prefix" "$scope" "$composer_args" && [ -s /tmp/composer.log ]; then
|
||||
tool_version=$(get_tool_version cat /tmp/composer.log)
|
||||
add_tools_helper "$tool"
|
||||
add_log "$tick" "$tool" "Added $tool $tool_version"
|
||||
elif [ -n "$fallback_url" ]; then
|
||||
add_log "!" "$tool" "Could not setup $tool using Composer. Falling back to PHAR."
|
||||
add_tool "$fallback_url" "$tool" "$fallback_version_parameter"
|
||||
else
|
||||
add_log "$cross" "$tool" "Could not setup $tool"
|
||||
fi
|
||||
if [ -e "$composer_bin/composer" ]; then
|
||||
sudo cp -a "$tool_path_dir/composer" "$composer_bin"
|
||||
fi
|
||||
|
||||
@@ -225,6 +225,11 @@ configure_brew() {
|
||||
tap_dir="$brew_repo"/Library/Taps
|
||||
core_repo="$tap_dir"/homebrew/homebrew-core
|
||||
|
||||
if [ -d "$core_repo" ]; then
|
||||
export HOMEBREW_NO_INSTALL_FROM_API=1
|
||||
else
|
||||
unset HOMEBREW_NO_INSTALL_FROM_API
|
||||
fi
|
||||
export HOMEBREW_CHANGE_ARCH_TO_ARM=1
|
||||
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||
export HOMEBREW_NO_ENV_HINTS=1
|
||||
|
||||
@@ -33,6 +33,8 @@ add_log() {
|
||||
local 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"
|
||||
elif [ "$mark" = "!" ]; then
|
||||
printf "\033[33;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"
|
||||
[ "$fail_fast" = "true" ] && exit 1
|
||||
@@ -58,6 +60,22 @@ without_trace() {
|
||||
return "$setup_php_trace_status"
|
||||
}
|
||||
|
||||
# Function to check third-party runners eligible for the builds cache.
|
||||
check_builds_cache_runner() {
|
||||
local pid=$PPID executable
|
||||
while [[ "$pid" =~ ^[0-9]+$ && "$pid" -gt 1 ]]; do
|
||||
executable="$(readlink -f "/proc/$pid/exe")" || return 1
|
||||
if [[ "$executable" = */bin/Runner.Worker ]]; then
|
||||
jq -e --arg name "${RUNNER_NAME:-}" \
|
||||
'.AgentName == $name and (.AgentName | test("^(blacksmith|depot)-"))' \
|
||||
"${executable%/bin/Runner.Worker}/.runner" >/dev/null 2>&1
|
||||
return $?
|
||||
fi
|
||||
pid="$(awk '$1 == "PPid:" {print $2}' "/proc/$pid/status")" || return 1
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
# Function to read env inputs.
|
||||
read_env() {
|
||||
if [[ "${SETUP_PHP_TRACE:-0}" =~ ^[12]$ ]]; then
|
||||
@@ -67,10 +85,19 @@ read_env() {
|
||||
[ "${debug:-${DEBUG:-false}}" = "true" ] && debug=debug && update=true || debug=release
|
||||
[[ "${phpts:-${PHPTS:-nts}}" = "ts" || "${phpts:-${PHPTS:-nts}}" = "zts" ]] && ts=zts && update=true || ts=nts
|
||||
fail_fast="${fail_fast:-${FAIL_FAST:-false}}"
|
||||
use_builds_cache="${use_builds_cache:-${use_package_cache:-}}"
|
||||
[[ ( -z "$ImageOS" && -z "$ImageVersion" ) ||
|
||||
( -n "$RUNNER_ENVIRONMENT" && "$RUNNER_ENVIRONMENT" = "self-hosted" ) ||
|
||||
-n "$ACT" || -n "$CONTAINER" ]] && _runner=self-hosted || _runner=github
|
||||
runner="${runner:-${RUNNER:-$_runner}}"
|
||||
if [[ $_runner = "self-hosted" && "${use_builds_cache:-false}" = "true" ]]; then
|
||||
runner=github
|
||||
if [[ "${ID:-}" = "ubuntu" && -z "$ACT" && -z "$CONTAINER" &&
|
||||
( -n "${BLACKSMITH_VM_ID:-}" || "${RUNNER_NAME:-}" =~ ^(blacksmith|depot)- ) ]] && check_builds_cache_runner; then
|
||||
_runner=github
|
||||
builds_cache_warning=true
|
||||
fi
|
||||
fi
|
||||
tool_path_dir="${setup_php_tools_dir:-${SETUP_PHP_TOOLS_DIR:-/usr/local/bin}}"
|
||||
tool_cache_path_dir="${setup_php_tool_cache_dir:-${SETUP_PHP_TOOL_CACHE_DIR:-${RUNNER_TOOL_CACHE:-/opt/hostedtoolcache}/setup-php/tools}}"
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ Function Step-Log($message) {
|
||||
Function Add-Log($mark, $subject, $message) {
|
||||
if ($mark -eq $tick) {
|
||||
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message
|
||||
} elseif ($mark -eq "!") {
|
||||
printf "\033[33;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
|
||||
if($env:fail_fast -eq 'true') {
|
||||
|
||||
+42
-8
@@ -1,9 +1,12 @@
|
||||
import {fileURLToPath} from 'url';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import * as cv from 'compare-versions';
|
||||
import * as fetch from './fetch';
|
||||
import * as packagist from './packagist';
|
||||
import * as utils from './utils';
|
||||
import * as fetch from './fetch.js';
|
||||
import * as packagist from './packagist.js';
|
||||
import * as utils from './utils.js';
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
/**
|
||||
* Valid function names for custom tool handlers
|
||||
@@ -48,6 +51,7 @@ export interface ToolData {
|
||||
url: string;
|
||||
uri?: string;
|
||||
error?: string;
|
||||
fallback?: ToolFallback;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,8 +76,19 @@ interface ToolConfig {
|
||||
version_parameter?: string;
|
||||
version_prefix?: string;
|
||||
packagist?: string;
|
||||
fallback?: ToolFallback;
|
||||
}
|
||||
|
||||
type ToolFallback = Pick<
|
||||
ToolConfig,
|
||||
| 'repository'
|
||||
| 'domain'
|
||||
| 'extension'
|
||||
| 'fetch_latest'
|
||||
| 'version_parameter'
|
||||
| 'version_prefix'
|
||||
> & {type: 'phar'};
|
||||
|
||||
/**
|
||||
* Regex to match a checksum suffix in a tool release - tool:version@sha256:<hash>
|
||||
*/
|
||||
@@ -155,7 +170,7 @@ export function skipGitHubAuthForComposerVersion(version: string): boolean {
|
||||
}
|
||||
return fs
|
||||
.readFileSync(
|
||||
path.join(__dirname, '../src/configs/composer-gh-auth-no-op'),
|
||||
path.join(dirname, '../src/configs/composer-gh-auth-no-op'),
|
||||
'utf8'
|
||||
)
|
||||
.trim()
|
||||
@@ -414,7 +429,23 @@ export async function addPackage(data: ToolData): Promise<string> {
|
||||
const args = [parts[1], data.release, parts[0] + '/', data.scope]
|
||||
.map(a => utils.safeArg(a, data.os))
|
||||
.join(' ');
|
||||
return command + args;
|
||||
if (!data.fallback) return command + args;
|
||||
const fallback = await getData(
|
||||
data.release.replace(/\.\*$/, ''),
|
||||
data.php_version,
|
||||
data.os,
|
||||
data.fallback
|
||||
);
|
||||
// A failed version lookup must not prevent a successful Composer install.
|
||||
if (fallback.error) return command + args;
|
||||
return (
|
||||
command +
|
||||
args +
|
||||
' ' +
|
||||
utils.safeArg(fallback.url, data.os) +
|
||||
' ' +
|
||||
(fallback.version_parameter || '""')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -670,9 +701,10 @@ export async function addWPCLI(data: ToolData): Promise<string> {
|
||||
export async function getData(
|
||||
release: string,
|
||||
php_version: string,
|
||||
os: string
|
||||
os: string,
|
||||
overrides: ToolConfig = {}
|
||||
): Promise<ToolData> {
|
||||
const json_file_path = path.join(__dirname, '../src/configs/tools.json');
|
||||
const json_file_path = path.join(dirname, '../src/configs/tools.json');
|
||||
const json_file: string = fs.readFileSync(json_file_path, 'utf8');
|
||||
const json_objects: Record<string, ToolConfig> = JSON.parse(json_file);
|
||||
release = release.replace(/\s+/g, '');
|
||||
@@ -702,6 +734,7 @@ export async function getData(
|
||||
config = {tool};
|
||||
}
|
||||
}
|
||||
config = {...config, ...overrides};
|
||||
const github = 'https://github.com';
|
||||
const domain = config.domain ?? github;
|
||||
const data: ToolData = {
|
||||
@@ -727,7 +760,8 @@ export async function getData(
|
||||
packagist: config.packagist ?? config.repository ?? '',
|
||||
type: config.type,
|
||||
function: config.function,
|
||||
alias: config.alias
|
||||
alias: config.alias,
|
||||
fallback: config.fallback
|
||||
};
|
||||
data.checksum = checksum_data.checksum;
|
||||
data.error = checksum_data.error;
|
||||
|
||||
+9
-9
@@ -1,7 +1,10 @@
|
||||
import {fileURLToPath} from 'url';
|
||||
import fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as core from './core';
|
||||
import * as fetch from './fetch';
|
||||
import * as core from './core.js';
|
||||
import * as fetch from './fetch.js';
|
||||
|
||||
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
/**
|
||||
* Function to read environment variable and return a string value.
|
||||
@@ -88,12 +91,9 @@ export async function parseVersion(version: string): Promise<string> {
|
||||
if (!/^\d+(\.\d+){0,2}$/.test(version)) {
|
||||
throw new Error(`Invalid PHP version: ${version.slice(0, 20)}`);
|
||||
}
|
||||
switch (true) {
|
||||
case version.length > 1:
|
||||
return version.slice(0, 3);
|
||||
default:
|
||||
return version + '.0';
|
||||
}
|
||||
return version.includes('.')
|
||||
? version.split('.').slice(0, 2).join('.')
|
||||
: version + '.0';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ export async function customPackage(
|
||||
const pkg_name: string = pkg.replace(/\d+|(pdo|pecl)[_-]|[_-]db2/, '');
|
||||
const script_extension: string = await scriptExtension(os);
|
||||
const script: string = path.join(
|
||||
__dirname,
|
||||
dirname,
|
||||
'../src/scripts/' + type + '/' + pkg_name + script_extension
|
||||
);
|
||||
const command: string = await getCommand(os, pkg_name);
|
||||
|
||||
+2
-2
@@ -5,8 +5,8 @@
|
||||
"lib": [
|
||||
"ES2025"
|
||||
],
|
||||
"module": "Node20",
|
||||
"moduleResolution": "Node16",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"noImplicitAny": true,
|
||||
"outDir": "./lib",
|
||||
"removeComments": true,
|
||||
|
||||
Reference in new issue
Block a user