setup-php 2.36.0 → 2.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/lib/core.d.ts +8 -0
- package/lib/core.js +55 -0
- package/lib/core.js.map +1 -0
- package/lib/extensions.js +9 -8
- package/lib/extensions.js.map +1 -1
- package/lib/fetch.js +25 -70
- package/lib/fetch.js.map +1 -1
- package/lib/install.js +1 -1
- package/lib/install.js.map +1 -1
- package/lib/tools.d.ts +48 -21
- package/lib/tools.js +170 -150
- package/lib/tools.js.map +1 -1
- package/lib/utils.js +4 -4
- package/lib/utils.js.map +1 -1
- package/package.json +20 -20
- package/src/configs/brew_extensions +19 -0
- package/src/core.ts +112 -0
- package/src/extensions.ts +16 -15
- package/src/fetch.ts +28 -42
- package/src/install.ts +1 -1
- package/src/scripts/darwin.sh +12 -6
- package/src/scripts/extensions/couchbase.sh +13 -2
- package/src/scripts/extensions/firebird.sh +6 -23
- package/src/scripts/extensions/http.ps1 +7 -5
- package/src/scripts/extensions/relay.sh +5 -2
- package/src/scripts/extensions/source.sh +3 -1
- package/src/scripts/extensions/sqlsrv.ps1 +2 -0
- package/src/scripts/extensions/sqlsrv.sh +2 -0
- package/src/scripts/linux.sh +49 -9
- package/src/scripts/tools/add_tools.ps1 +52 -26
- package/src/scripts/tools/add_tools.sh +41 -19
- package/src/scripts/tools/blackfire.sh +1 -1
- package/src/scripts/tools/brew.sh +130 -0
- package/src/scripts/tools/grpc_php_plugin.sh +2 -2
- package/src/scripts/tools/ppa.sh +5 -1
- package/src/scripts/unix.sh +7 -3
- package/src/scripts/win32.ps1 +4 -2
- package/src/tools.ts +307 -199
- package/src/utils.ts +5 -6
package/src/utils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import * as path from 'path';
|
|
3
|
-
import * as core from '
|
|
3
|
+
import * as core from './core';
|
|
4
4
|
import * as fetch from './fetch';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -62,7 +62,7 @@ export async function getManifestURLS(): Promise<string[]> {
|
|
|
62
62
|
*/
|
|
63
63
|
export async function parseVersion(version: string): Promise<string> {
|
|
64
64
|
switch (true) {
|
|
65
|
-
case /^(latest|lowest|highest|nightly|\d+\.x)$/.test(version):
|
|
65
|
+
case /^(latest|lowest|highest|nightly|master|\d+\.x)$/.test(version):
|
|
66
66
|
for (const manifestURL of await getManifestURLS()) {
|
|
67
67
|
const fetchResult = await fetch.fetch(manifestURL);
|
|
68
68
|
if (fetchResult['data'] ?? false) {
|
|
@@ -97,9 +97,8 @@ export async function parseIniFile(ini_file: string): Promise<string> {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
/**
|
|
100
|
-
* Async foreach loop
|
|
100
|
+
* Async foreach loop using modern for...of pattern
|
|
101
101
|
*
|
|
102
|
-
* @author https://github.com/Atinux
|
|
103
102
|
* @param array
|
|
104
103
|
* @param callback
|
|
105
104
|
*/
|
|
@@ -111,8 +110,8 @@ export async function asyncForEach(
|
|
|
111
110
|
array: Array<string>
|
|
112
111
|
) => Promise<void>
|
|
113
112
|
): Promise<void> {
|
|
114
|
-
for (
|
|
115
|
-
await callback(
|
|
113
|
+
for (const [index, element] of array.entries()) {
|
|
114
|
+
await callback(element, index, array);
|
|
116
115
|
}
|
|
117
116
|
}
|
|
118
117
|
|