mirror of
https://github.com/actions/setup-go.git
synced 2025-06-16 02:27:13 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
0a12ed9d6a | |||
4ab57d7ea2 | |||
cdcb360436 | |||
99176a8f9a | |||
be1aa1186e | |||
6c1fd22b67 |
14
.github/workflows/versions.yml
vendored
14
.github/workflows/versions.yml
vendored
@ -71,7 +71,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
go: [1.17, 1.18, 1.19]
|
go: [1.20.14, 1.21.10, 1.22.3]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -91,7 +91,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
go-version: [1.16, 1.17]
|
go-version: [1.20.14, 1.21]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Go and check latest
|
- name: Setup Go and check latest
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: __tests__/data/go.mod
|
go-version-file: __tests__/data/go.mod
|
||||||
- name: verify go
|
- name: verify go
|
||||||
run: __tests__/verify-go.sh 1.14
|
run: __tests__/verify-go.sh 1.20.14
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
go-version-file-with-gowork:
|
go-version-file-with-gowork:
|
||||||
@ -131,7 +131,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version-file: __tests__/data/go.work
|
go-version-file: __tests__/data/go.work
|
||||||
- name: verify go
|
- name: verify go
|
||||||
run: __tests__/verify-go.sh 1.19
|
run: __tests__/verify-go.sh 1.21
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-versions-from-manifest:
|
setup-versions-from-manifest:
|
||||||
@ -141,7 +141,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
go: [1.12.16, 1.13.11, 1.14.3]
|
go: [1.20.14, 1.21.10, 1.22.3]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -162,7 +162,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
go: [1.9, 1.8.6]
|
go: [1.20.14, 1.21]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@ -182,7 +182,7 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
go-version: [1.16, 1.17]
|
go-version: [1.20.14, 1.21]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Go and check latest
|
- name: Setup Go and check latest
|
||||||
|
2
.licenses/npm/@actions/cache.dep.yml
generated
2
.licenses/npm/@actions/cache.dep.yml
generated
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/cache"
|
name: "@actions/cache"
|
||||||
version: 3.2.2
|
version: 3.2.4
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions cache lib
|
summary: Actions cache lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
|
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
|
||||||
|
2
.licenses/npm/@actions/http-client.dep.yml
generated
2
.licenses/npm/@actions/http-client.dep.yml
generated
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/http-client"
|
name: "@actions/http-client"
|
||||||
version: 2.2.0
|
version: 2.2.1
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions Http Client
|
summary: Actions Http Client
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||||
|
2
.licenses/npm/@types/node.dep.yml
generated
2
.licenses/npm/@types/node.dep.yml
generated
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@types/node"
|
name: "@types/node"
|
||||||
version: 20.10.3
|
version: 20.11.28
|
||||||
type: npm
|
type: npm
|
||||||
summary: TypeScript definitions for node
|
summary: TypeScript definitions for node
|
||||||
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
name: semver
|
name: semver
|
||||||
version: 7.5.4
|
version: 7.6.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: The semantic version parser used by npm.
|
summary: The semantic version parser used by npm.
|
||||||
homepage:
|
homepage:
|
||||||
license: isc
|
license: isc
|
||||||
licenses:
|
licenses:
|
||||||
- sources: LICENSE
|
- sources: LICENSE
|
2
.licenses/npm/undici.dep.yml
generated
2
.licenses/npm/undici.dep.yml
generated
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: undici
|
name: undici
|
||||||
version: 5.28.2
|
version: 5.28.4
|
||||||
type: npm
|
type: npm
|
||||||
summary: An HTTP/1.1 client, written from scratch for Node.js
|
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||||
homepage: https://undici.nodejs.org
|
homepage: https://undici.nodejs.org
|
||||||
|
47
README.md
47
README.md
@ -8,6 +8,14 @@ This action sets up a go environment for use in actions by:
|
|||||||
- Optionally downloading and caching a version of Go by version and adding to `PATH`.
|
- Optionally downloading and caching a version of Go by version and adding to `PATH`.
|
||||||
- Registering problem matchers for error output.
|
- Registering problem matchers for error output.
|
||||||
|
|
||||||
|
# V5
|
||||||
|
|
||||||
|
The V5 edition of the action offers:
|
||||||
|
|
||||||
|
- Upgraded Node.js runtime from node16 to node20
|
||||||
|
|
||||||
|
See full release notes on the [releases page](https://github.com/actions/setup-go/releases).
|
||||||
|
|
||||||
# V4
|
# V4
|
||||||
|
|
||||||
The V4 edition of the action offers:
|
The V4 edition of the action offers:
|
||||||
@ -43,7 +51,7 @@ Matching by [semver spec](https://github.com/npm/node-semver):
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
|
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
|
||||||
- run: go version
|
- run: go version
|
||||||
@ -52,7 +60,7 @@ steps:
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.17.0'
|
go-version: '>=1.17.0'
|
||||||
- run: go version
|
- run: go version
|
||||||
@ -62,15 +70,16 @@ steps:
|
|||||||
>
|
>
|
||||||
> ```yaml
|
> ```yaml
|
||||||
> go-version: '1.20'
|
> go-version: '1.20'
|
||||||
> ```
|
> ```
|
||||||
>
|
>
|
||||||
> The recommendation is based on the YAML parser's behavior, which interprets non-wrapped values as numbers and, in the case of version 1.20, trims it down to 1.2, which may not be very obvious.
|
> The recommendation is based on the YAML parser's behavior, which interprets non-wrapped values as numbers and, in the case of version 1.20, trims it down to 1.2, which may not be very obvious.
|
||||||
|
|
||||||
Matching an unstable pre-release:
|
Matching an unstable pre-release:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.18.0-rc.1' # The Go version to download (if necessary) and use.
|
go-version: '1.18.0-rc.1' # The Go version to download (if necessary) and use.
|
||||||
- run: go version
|
- run: go version
|
||||||
@ -79,7 +88,7 @@ steps:
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.16.0-beta.1' # The Go version to download (if necessary) and use.
|
go-version: '1.16.0-beta.1' # The Go version to download (if necessary) and use.
|
||||||
- run: go version
|
- run: go version
|
||||||
@ -94,7 +103,7 @@ See [action.yml](action.yml)
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.16.1' # The Go version to download (if necessary) and use.
|
go-version: '1.16.1' # The Go version to download (if necessary) and use.
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
@ -115,7 +124,7 @@ want the most up-to-date Go version to always be used.
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.14'
|
go-version: '1.14'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
@ -136,7 +145,7 @@ set to `true`
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 'stable'
|
go-version: 'stable'
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
@ -145,7 +154,7 @@ steps:
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 'oldstable'
|
go-version: 'oldstable'
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
@ -168,7 +177,7 @@ If some problem that prevents success caching happens then the action issues the
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.17'
|
go-version: '1.17'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
@ -182,11 +191,13 @@ steps:
|
|||||||
|
|
||||||
## Getting go version from the go.mod file
|
## Getting go version from the go.mod file
|
||||||
|
|
||||||
The `go-version-file` input accepts a path to a `go.mod` file or a `go.work` file that contains the version of Go to be
|
The `go-version-file` input accepts a path to a `go.mod` file or a `go.work` file that contains the version of Go to be used by a project.
|
||||||
used by a project. As the `go.mod` file contains only major and minor (e.g. 1.18) tags, the action will search for the
|
|
||||||
latest available patch version sequentially in the runner's directory with the cached tools, in
|
The `go` directive in `go.mod` can specify a patch version or omit it altogether (e.g., `go 1.22.0` or `go 1.22`).
|
||||||
the [versions-manifest.json](https://github.com/actions/go-versions/blob/main/versions-manifest.json) file or at the go
|
If a patch version is specified, that specific patch version will be used.
|
||||||
servers.
|
If no patch version is specified, it will search for the latest available patch version in the cache,
|
||||||
|
[versions-manifest.json](https://github.com/actions/go-versions/blob/main/versions-manifest.json), and the
|
||||||
|
[official Go language website](https://golang.org/dl/?mode=json&include=all), in that order.
|
||||||
|
|
||||||
If both the `go-version` and the `go-version-file` inputs are provided then the `go-version` input is used.
|
If both the `go-version` and the `go-version-file` inputs are provided then the `go-version` input is used.
|
||||||
> The action will search for the `go.mod` file relative to the repository root
|
> The action will search for the `go.mod` file relative to the repository root
|
||||||
@ -194,7 +205,7 @@ If both the `go-version` and the `go-version-file` inputs are provided then the
|
|||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-go@v4
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: 'path/to/go.mod'
|
go-version-file: 'path/to/go.mod'
|
||||||
- run: go version
|
- run: go version
|
||||||
@ -213,7 +224,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
- run: go run hello.go
|
- run: go run hello.go
|
||||||
@ -245,7 +256,7 @@ can [generate a personal access token on github.com](https://github.com/settings
|
|||||||
input for the action:
|
input for the action:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: actions/setup-go@v4
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
||||||
go-version: '1.18'
|
go-version: '1.18'
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
module example.com/mymodule
|
module example.com/mymodule
|
||||||
|
|
||||||
go 1.14
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
example.com/othermodule v1.2.3
|
example.com/othermodule v1.2.3
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
go 1.19
|
go 1.21
|
||||||
|
|
||||||
use .
|
use .
|
||||||
|
353
dist/cache-save/index.js
vendored
353
dist/cache-save/index.js
vendored
@ -319,7 +319,8 @@ function createHttpClient() {
|
|||||||
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
|
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
|
||||||
}
|
}
|
||||||
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
|
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
|
||||||
const components = paths;
|
// don't pass changes upstream
|
||||||
|
const components = paths.slice();
|
||||||
// Add compression method to cache version to restore
|
// Add compression method to cache version to restore
|
||||||
// compressed cache as per compression method
|
// compressed cache as per compression method
|
||||||
if (compressionMethod) {
|
if (compressionMethod) {
|
||||||
@ -608,26 +609,21 @@ function resolvePaths(patterns) {
|
|||||||
implicitDescendants: false
|
implicitDescendants: false
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
|
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
|
||||||
_c = _g.value;
|
_c = _g.value;
|
||||||
_e = false;
|
_e = false;
|
||||||
try {
|
const file = _c;
|
||||||
const file = _c;
|
const relativeFile = path
|
||||||
const relativeFile = path
|
.relative(workspace, file)
|
||||||
.relative(workspace, file)
|
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
|
||||||
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
|
core.debug(`Matched: ${relativeFile}`);
|
||||||
core.debug(`Matched: ${relativeFile}`);
|
// Paths are made relative so the tar entries are all relative to the root of the workspace.
|
||||||
// Paths are made relative so the tar entries are all relative to the root of the workspace.
|
if (relativeFile === '') {
|
||||||
if (relativeFile === '') {
|
// path.relative returns empty string if workspace and file are equal
|
||||||
// path.relative returns empty string if workspace and file are equal
|
paths.push('.');
|
||||||
paths.push('.');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
paths.push(`${relativeFile}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
finally {
|
else {
|
||||||
_e = true;
|
paths.push(`${relativeFile}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -711,7 +707,10 @@ function assertDefined(name, value) {
|
|||||||
exports.assertDefined = assertDefined;
|
exports.assertDefined = assertDefined;
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||||
|
const isGitHubHost = hostname === 'GITHUB.COM';
|
||||||
|
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
|
||||||
|
return !isGitHubHost && !isGheHost;
|
||||||
}
|
}
|
||||||
exports.isGhes = isGhes;
|
exports.isGhes = isGhes;
|
||||||
//# sourceMappingURL=cacheUtils.js.map
|
//# sourceMappingURL=cacheUtils.js.map
|
||||||
@ -729,7 +728,7 @@ var CacheFilename;
|
|||||||
(function (CacheFilename) {
|
(function (CacheFilename) {
|
||||||
CacheFilename["Gzip"] = "cache.tgz";
|
CacheFilename["Gzip"] = "cache.tgz";
|
||||||
CacheFilename["Zstd"] = "cache.tzst";
|
CacheFilename["Zstd"] = "cache.tzst";
|
||||||
})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {}));
|
})(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
|
||||||
var CompressionMethod;
|
var CompressionMethod;
|
||||||
(function (CompressionMethod) {
|
(function (CompressionMethod) {
|
||||||
CompressionMethod["Gzip"] = "gzip";
|
CompressionMethod["Gzip"] = "gzip";
|
||||||
@ -737,12 +736,12 @@ var CompressionMethod;
|
|||||||
// This enum is for earlier version of zstd that does not have --long support
|
// This enum is for earlier version of zstd that does not have --long support
|
||||||
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
|
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
|
||||||
CompressionMethod["Zstd"] = "zstd";
|
CompressionMethod["Zstd"] = "zstd";
|
||||||
})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {}));
|
})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
|
||||||
var ArchiveToolType;
|
var ArchiveToolType;
|
||||||
(function (ArchiveToolType) {
|
(function (ArchiveToolType) {
|
||||||
ArchiveToolType["GNU"] = "gnu";
|
ArchiveToolType["GNU"] = "gnu";
|
||||||
ArchiveToolType["BSD"] = "bsd";
|
ArchiveToolType["BSD"] = "bsd";
|
||||||
})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {}));
|
})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
|
||||||
// The default number of retry attempts.
|
// The default number of retry attempts.
|
||||||
exports.DefaultRetryAttempts = 2;
|
exports.DefaultRetryAttempts = 2;
|
||||||
// The default delay in milliseconds between retry attempts.
|
// The default delay in milliseconds between retry attempts.
|
||||||
@ -7359,7 +7358,7 @@ class HttpClient {
|
|||||||
if (this._keepAlive && useProxy) {
|
if (this._keepAlive && useProxy) {
|
||||||
agent = this._proxyAgent;
|
agent = this._proxyAgent;
|
||||||
}
|
}
|
||||||
if (this._keepAlive && !useProxy) {
|
if (!useProxy) {
|
||||||
agent = this._agent;
|
agent = this._agent;
|
||||||
}
|
}
|
||||||
// if agent is already assigned use that agent.
|
// if agent is already assigned use that agent.
|
||||||
@ -7391,16 +7390,12 @@ class HttpClient {
|
|||||||
agent = tunnelAgent(agentOptions);
|
agent = tunnelAgent(agentOptions);
|
||||||
this._proxyAgent = agent;
|
this._proxyAgent = agent;
|
||||||
}
|
}
|
||||||
// if reusing agent across request and tunneling agent isn't assigned create a new agent
|
// if tunneling agent isn't assigned create a new agent
|
||||||
if (this._keepAlive && !agent) {
|
if (!agent) {
|
||||||
const options = { keepAlive: this._keepAlive, maxSockets };
|
const options = { keepAlive: this._keepAlive, maxSockets };
|
||||||
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
||||||
this._agent = agent;
|
this._agent = agent;
|
||||||
}
|
}
|
||||||
// if not using private agent and tunnel agent isn't setup then use global agent
|
|
||||||
if (!agent) {
|
|
||||||
agent = usingSsl ? https.globalAgent : http.globalAgent;
|
|
||||||
}
|
|
||||||
if (usingSsl && this._ignoreSslError) {
|
if (usingSsl && this._ignoreSslError) {
|
||||||
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
||||||
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
||||||
@ -57969,6 +57964,132 @@ function onConnectTimeout (socket) {
|
|||||||
module.exports = buildConnector
|
module.exports = buildConnector
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 4462:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {Record<string, string | undefined>} */
|
||||||
|
const headerNameLowerCasedRecord = {}
|
||||||
|
|
||||||
|
// https://developer.mozilla.org/docs/Web/HTTP/Headers
|
||||||
|
const wellknownHeaderNames = [
|
||||||
|
'Accept',
|
||||||
|
'Accept-Encoding',
|
||||||
|
'Accept-Language',
|
||||||
|
'Accept-Ranges',
|
||||||
|
'Access-Control-Allow-Credentials',
|
||||||
|
'Access-Control-Allow-Headers',
|
||||||
|
'Access-Control-Allow-Methods',
|
||||||
|
'Access-Control-Allow-Origin',
|
||||||
|
'Access-Control-Expose-Headers',
|
||||||
|
'Access-Control-Max-Age',
|
||||||
|
'Access-Control-Request-Headers',
|
||||||
|
'Access-Control-Request-Method',
|
||||||
|
'Age',
|
||||||
|
'Allow',
|
||||||
|
'Alt-Svc',
|
||||||
|
'Alt-Used',
|
||||||
|
'Authorization',
|
||||||
|
'Cache-Control',
|
||||||
|
'Clear-Site-Data',
|
||||||
|
'Connection',
|
||||||
|
'Content-Disposition',
|
||||||
|
'Content-Encoding',
|
||||||
|
'Content-Language',
|
||||||
|
'Content-Length',
|
||||||
|
'Content-Location',
|
||||||
|
'Content-Range',
|
||||||
|
'Content-Security-Policy',
|
||||||
|
'Content-Security-Policy-Report-Only',
|
||||||
|
'Content-Type',
|
||||||
|
'Cookie',
|
||||||
|
'Cross-Origin-Embedder-Policy',
|
||||||
|
'Cross-Origin-Opener-Policy',
|
||||||
|
'Cross-Origin-Resource-Policy',
|
||||||
|
'Date',
|
||||||
|
'Device-Memory',
|
||||||
|
'Downlink',
|
||||||
|
'ECT',
|
||||||
|
'ETag',
|
||||||
|
'Expect',
|
||||||
|
'Expect-CT',
|
||||||
|
'Expires',
|
||||||
|
'Forwarded',
|
||||||
|
'From',
|
||||||
|
'Host',
|
||||||
|
'If-Match',
|
||||||
|
'If-Modified-Since',
|
||||||
|
'If-None-Match',
|
||||||
|
'If-Range',
|
||||||
|
'If-Unmodified-Since',
|
||||||
|
'Keep-Alive',
|
||||||
|
'Last-Modified',
|
||||||
|
'Link',
|
||||||
|
'Location',
|
||||||
|
'Max-Forwards',
|
||||||
|
'Origin',
|
||||||
|
'Permissions-Policy',
|
||||||
|
'Pragma',
|
||||||
|
'Proxy-Authenticate',
|
||||||
|
'Proxy-Authorization',
|
||||||
|
'RTT',
|
||||||
|
'Range',
|
||||||
|
'Referer',
|
||||||
|
'Referrer-Policy',
|
||||||
|
'Refresh',
|
||||||
|
'Retry-After',
|
||||||
|
'Sec-WebSocket-Accept',
|
||||||
|
'Sec-WebSocket-Extensions',
|
||||||
|
'Sec-WebSocket-Key',
|
||||||
|
'Sec-WebSocket-Protocol',
|
||||||
|
'Sec-WebSocket-Version',
|
||||||
|
'Server',
|
||||||
|
'Server-Timing',
|
||||||
|
'Service-Worker-Allowed',
|
||||||
|
'Service-Worker-Navigation-Preload',
|
||||||
|
'Set-Cookie',
|
||||||
|
'SourceMap',
|
||||||
|
'Strict-Transport-Security',
|
||||||
|
'Supports-Loading-Mode',
|
||||||
|
'TE',
|
||||||
|
'Timing-Allow-Origin',
|
||||||
|
'Trailer',
|
||||||
|
'Transfer-Encoding',
|
||||||
|
'Upgrade',
|
||||||
|
'Upgrade-Insecure-Requests',
|
||||||
|
'User-Agent',
|
||||||
|
'Vary',
|
||||||
|
'Via',
|
||||||
|
'WWW-Authenticate',
|
||||||
|
'X-Content-Type-Options',
|
||||||
|
'X-DNS-Prefetch-Control',
|
||||||
|
'X-Frame-Options',
|
||||||
|
'X-Permitted-Cross-Domain-Policies',
|
||||||
|
'X-Powered-By',
|
||||||
|
'X-Requested-With',
|
||||||
|
'X-XSS-Protection'
|
||||||
|
]
|
||||||
|
|
||||||
|
for (let i = 0; i < wellknownHeaderNames.length; ++i) {
|
||||||
|
const key = wellknownHeaderNames[i]
|
||||||
|
const lowerCasedKey = key.toLowerCase()
|
||||||
|
headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] =
|
||||||
|
lowerCasedKey
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.
|
||||||
|
Object.setPrototypeOf(headerNameLowerCasedRecord, null)
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
wellknownHeaderNames,
|
||||||
|
headerNameLowerCasedRecord
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 8045:
|
/***/ 8045:
|
||||||
@ -58801,6 +58922,7 @@ const { InvalidArgumentError } = __nccwpck_require__(8045)
|
|||||||
const { Blob } = __nccwpck_require__(4300)
|
const { Blob } = __nccwpck_require__(4300)
|
||||||
const nodeUtil = __nccwpck_require__(3837)
|
const nodeUtil = __nccwpck_require__(3837)
|
||||||
const { stringify } = __nccwpck_require__(3477)
|
const { stringify } = __nccwpck_require__(3477)
|
||||||
|
const { headerNameLowerCasedRecord } = __nccwpck_require__(4462)
|
||||||
|
|
||||||
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))
|
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))
|
||||||
|
|
||||||
@ -59010,6 +59132,15 @@ function parseKeepAliveTimeout (val) {
|
|||||||
return m ? parseInt(m[1], 10) * 1000 : null
|
return m ? parseInt(m[1], 10) * 1000 : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a header name and returns its lowercase value.
|
||||||
|
* @param {string | Buffer} value Header name
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function headerNameToString (value) {
|
||||||
|
return headerNameLowerCasedRecord[value] || value.toLowerCase()
|
||||||
|
}
|
||||||
|
|
||||||
function parseHeaders (headers, obj = {}) {
|
function parseHeaders (headers, obj = {}) {
|
||||||
// For H2 support
|
// For H2 support
|
||||||
if (!Array.isArray(headers)) return headers
|
if (!Array.isArray(headers)) return headers
|
||||||
@ -59281,6 +59412,7 @@ module.exports = {
|
|||||||
isIterable,
|
isIterable,
|
||||||
isAsyncIterable,
|
isAsyncIterable,
|
||||||
isDestroyed,
|
isDestroyed,
|
||||||
|
headerNameToString,
|
||||||
parseRawHeaders,
|
parseRawHeaders,
|
||||||
parseHeaders,
|
parseHeaders,
|
||||||
parseKeepAliveTimeout,
|
parseKeepAliveTimeout,
|
||||||
@ -63417,6 +63549,9 @@ function httpRedirectFetch (fetchParams, response) {
|
|||||||
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
||||||
request.headersList.delete('authorization')
|
request.headersList.delete('authorization')
|
||||||
|
|
||||||
|
// https://fetch.spec.whatwg.org/#authentication-entries
|
||||||
|
request.headersList.delete('proxy-authorization', true)
|
||||||
|
|
||||||
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
||||||
request.headersList.delete('cookie')
|
request.headersList.delete('cookie')
|
||||||
request.headersList.delete('host')
|
request.headersList.delete('host')
|
||||||
@ -65925,14 +66060,18 @@ const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(3983
|
|||||||
const assert = __nccwpck_require__(9491)
|
const assert = __nccwpck_require__(9491)
|
||||||
const { isUint8Array } = __nccwpck_require__(9830)
|
const { isUint8Array } = __nccwpck_require__(9830)
|
||||||
|
|
||||||
|
let supportedHashes = []
|
||||||
|
|
||||||
// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
|
// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
|
||||||
/** @type {import('crypto')|undefined} */
|
/** @type {import('crypto')|undefined} */
|
||||||
let crypto
|
let crypto
|
||||||
|
|
||||||
try {
|
try {
|
||||||
crypto = __nccwpck_require__(6113)
|
crypto = __nccwpck_require__(6113)
|
||||||
|
const possibleRelevantHashes = ['sha256', 'sha384', 'sha512']
|
||||||
|
supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash))
|
||||||
|
/* c8 ignore next 3 */
|
||||||
} catch {
|
} catch {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function responseURL (response) {
|
function responseURL (response) {
|
||||||
@ -66460,66 +66599,56 @@ function bytesMatch (bytes, metadataList) {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. If parsedMetadata is the empty set, return true.
|
// 3. If response is not eligible for integrity validation, return false.
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// 4. If parsedMetadata is the empty set, return true.
|
||||||
if (parsedMetadata.length === 0) {
|
if (parsedMetadata.length === 0) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Let metadata be the result of getting the strongest
|
// 5. Let metadata be the result of getting the strongest
|
||||||
// metadata from parsedMetadata.
|
// metadata from parsedMetadata.
|
||||||
const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo))
|
const strongest = getStrongestMetadata(parsedMetadata)
|
||||||
// get the strongest algorithm
|
const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest)
|
||||||
const strongest = list[0].algo
|
|
||||||
// get all entries that use the strongest algorithm; ignore weaker
|
|
||||||
const metadata = list.filter((item) => item.algo === strongest)
|
|
||||||
|
|
||||||
// 5. For each item in metadata:
|
// 6. For each item in metadata:
|
||||||
for (const item of metadata) {
|
for (const item of metadata) {
|
||||||
// 1. Let algorithm be the alg component of item.
|
// 1. Let algorithm be the alg component of item.
|
||||||
const algorithm = item.algo
|
const algorithm = item.algo
|
||||||
|
|
||||||
// 2. Let expectedValue be the val component of item.
|
// 2. Let expectedValue be the val component of item.
|
||||||
let expectedValue = item.hash
|
const expectedValue = item.hash
|
||||||
|
|
||||||
// See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e
|
// See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e
|
||||||
// "be liberal with padding". This is annoying, and it's not even in the spec.
|
// "be liberal with padding". This is annoying, and it's not even in the spec.
|
||||||
|
|
||||||
if (expectedValue.endsWith('==')) {
|
|
||||||
expectedValue = expectedValue.slice(0, -2)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Let actualValue be the result of applying algorithm to bytes.
|
// 3. Let actualValue be the result of applying algorithm to bytes.
|
||||||
let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')
|
let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')
|
||||||
|
|
||||||
if (actualValue.endsWith('==')) {
|
if (actualValue[actualValue.length - 1] === '=') {
|
||||||
actualValue = actualValue.slice(0, -2)
|
if (actualValue[actualValue.length - 2] === '=') {
|
||||||
|
actualValue = actualValue.slice(0, -2)
|
||||||
|
} else {
|
||||||
|
actualValue = actualValue.slice(0, -1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. If actualValue is a case-sensitive match for expectedValue,
|
// 4. If actualValue is a case-sensitive match for expectedValue,
|
||||||
// return true.
|
// return true.
|
||||||
if (actualValue === expectedValue) {
|
if (compareBase64Mixed(actualValue, expectedValue)) {
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url')
|
|
||||||
|
|
||||||
if (actualBase64URL.endsWith('==')) {
|
|
||||||
actualBase64URL = actualBase64URL.slice(0, -2)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actualBase64URL === expectedValue) {
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6. Return false.
|
// 7. Return false.
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options
|
// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options
|
||||||
// https://www.w3.org/TR/CSP2/#source-list-syntax
|
// https://www.w3.org/TR/CSP2/#source-list-syntax
|
||||||
// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1
|
// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1
|
||||||
const parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i
|
const parseHashWithOptions = /(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
|
* @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
|
||||||
@ -66533,8 +66662,6 @@ function parseMetadata (metadata) {
|
|||||||
// 2. Let empty be equal to true.
|
// 2. Let empty be equal to true.
|
||||||
let empty = true
|
let empty = true
|
||||||
|
|
||||||
const supportedHashes = crypto.getHashes()
|
|
||||||
|
|
||||||
// 3. For each token returned by splitting metadata on spaces:
|
// 3. For each token returned by splitting metadata on spaces:
|
||||||
for (const token of metadata.split(' ')) {
|
for (const token of metadata.split(' ')) {
|
||||||
// 1. Set empty to false.
|
// 1. Set empty to false.
|
||||||
@ -66544,7 +66671,11 @@ function parseMetadata (metadata) {
|
|||||||
const parsedToken = parseHashWithOptions.exec(token)
|
const parsedToken = parseHashWithOptions.exec(token)
|
||||||
|
|
||||||
// 3. If token does not parse, continue to the next token.
|
// 3. If token does not parse, continue to the next token.
|
||||||
if (parsedToken === null || parsedToken.groups === undefined) {
|
if (
|
||||||
|
parsedToken === null ||
|
||||||
|
parsedToken.groups === undefined ||
|
||||||
|
parsedToken.groups.algo === undefined
|
||||||
|
) {
|
||||||
// Note: Chromium blocks the request at this point, but Firefox
|
// Note: Chromium blocks the request at this point, but Firefox
|
||||||
// gives a warning that an invalid integrity was given. The
|
// gives a warning that an invalid integrity was given. The
|
||||||
// correct behavior is to ignore these, and subsequently not
|
// correct behavior is to ignore these, and subsequently not
|
||||||
@ -66553,11 +66684,11 @@ function parseMetadata (metadata) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 4. Let algorithm be the hash-algo component of token.
|
// 4. Let algorithm be the hash-algo component of token.
|
||||||
const algorithm = parsedToken.groups.algo
|
const algorithm = parsedToken.groups.algo.toLowerCase()
|
||||||
|
|
||||||
// 5. If algorithm is a hash function recognized by the user
|
// 5. If algorithm is a hash function recognized by the user
|
||||||
// agent, add the parsed token to result.
|
// agent, add the parsed token to result.
|
||||||
if (supportedHashes.includes(algorithm.toLowerCase())) {
|
if (supportedHashes.includes(algorithm)) {
|
||||||
result.push(parsedToken.groups)
|
result.push(parsedToken.groups)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -66570,6 +66701,82 @@ function parseMetadata (metadata) {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList
|
||||||
|
*/
|
||||||
|
function getStrongestMetadata (metadataList) {
|
||||||
|
// Let algorithm be the algo component of the first item in metadataList.
|
||||||
|
// Can be sha256
|
||||||
|
let algorithm = metadataList[0].algo
|
||||||
|
// If the algorithm is sha512, then it is the strongest
|
||||||
|
// and we can return immediately
|
||||||
|
if (algorithm[3] === '5') {
|
||||||
|
return algorithm
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 1; i < metadataList.length; ++i) {
|
||||||
|
const metadata = metadataList[i]
|
||||||
|
// If the algorithm is sha512, then it is the strongest
|
||||||
|
// and we can break the loop immediately
|
||||||
|
if (metadata.algo[3] === '5') {
|
||||||
|
algorithm = 'sha512'
|
||||||
|
break
|
||||||
|
// If the algorithm is sha384, then a potential sha256 or sha384 is ignored
|
||||||
|
} else if (algorithm[3] === '3') {
|
||||||
|
continue
|
||||||
|
// algorithm is sha256, check if algorithm is sha384 and if so, set it as
|
||||||
|
// the strongest
|
||||||
|
} else if (metadata.algo[3] === '3') {
|
||||||
|
algorithm = 'sha384'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return algorithm
|
||||||
|
}
|
||||||
|
|
||||||
|
function filterMetadataListByAlgorithm (metadataList, algorithm) {
|
||||||
|
if (metadataList.length === 1) {
|
||||||
|
return metadataList
|
||||||
|
}
|
||||||
|
|
||||||
|
let pos = 0
|
||||||
|
for (let i = 0; i < metadataList.length; ++i) {
|
||||||
|
if (metadataList[i].algo === algorithm) {
|
||||||
|
metadataList[pos++] = metadataList[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
metadataList.length = pos
|
||||||
|
|
||||||
|
return metadataList
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two base64 strings, allowing for base64url
|
||||||
|
* in the second string.
|
||||||
|
*
|
||||||
|
* @param {string} actualValue always base64
|
||||||
|
* @param {string} expectedValue base64 or base64url
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
function compareBase64Mixed (actualValue, expectedValue) {
|
||||||
|
if (actualValue.length !== expectedValue.length) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for (let i = 0; i < actualValue.length; ++i) {
|
||||||
|
if (actualValue[i] !== expectedValue[i]) {
|
||||||
|
if (
|
||||||
|
(actualValue[i] === '+' && expectedValue[i] === '-') ||
|
||||||
|
(actualValue[i] === '/' && expectedValue[i] === '_')
|
||||||
|
) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request
|
// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request
|
||||||
function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
|
function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
|
||||||
// TODO
|
// TODO
|
||||||
@ -66985,7 +67192,8 @@ module.exports = {
|
|||||||
urlHasHttpsScheme,
|
urlHasHttpsScheme,
|
||||||
urlIsHttpHttpsScheme,
|
urlIsHttpHttpsScheme,
|
||||||
readAllBytes,
|
readAllBytes,
|
||||||
normalizeMethodRecord
|
normalizeMethodRecord,
|
||||||
|
parseMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -69072,12 +69280,17 @@ function parseLocation (statusCode, headers) {
|
|||||||
|
|
||||||
// https://tools.ietf.org/html/rfc7231#section-6.4.4
|
// https://tools.ietf.org/html/rfc7231#section-6.4.4
|
||||||
function shouldRemoveHeader (header, removeContent, unknownOrigin) {
|
function shouldRemoveHeader (header, removeContent, unknownOrigin) {
|
||||||
return (
|
if (header.length === 4) {
|
||||||
(header.length === 4 && header.toString().toLowerCase() === 'host') ||
|
return util.headerNameToString(header) === 'host'
|
||||||
(removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||
|
}
|
||||||
(unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||
|
if (removeContent && util.headerNameToString(header).startsWith('content-')) {
|
||||||
(unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')
|
return true
|
||||||
)
|
}
|
||||||
|
if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {
|
||||||
|
const name = util.headerNameToString(header)
|
||||||
|
return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc7231#section-6.4
|
// https://tools.ietf.org/html/rfc7231#section-6.4
|
||||||
|
394
dist/setup/index.js
vendored
394
dist/setup/index.js
vendored
@ -319,7 +319,8 @@ function createHttpClient() {
|
|||||||
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
|
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
|
||||||
}
|
}
|
||||||
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
|
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
|
||||||
const components = paths;
|
// don't pass changes upstream
|
||||||
|
const components = paths.slice();
|
||||||
// Add compression method to cache version to restore
|
// Add compression method to cache version to restore
|
||||||
// compressed cache as per compression method
|
// compressed cache as per compression method
|
||||||
if (compressionMethod) {
|
if (compressionMethod) {
|
||||||
@ -608,26 +609,21 @@ function resolvePaths(patterns) {
|
|||||||
implicitDescendants: false
|
implicitDescendants: false
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
|
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
|
||||||
_c = _g.value;
|
_c = _g.value;
|
||||||
_e = false;
|
_e = false;
|
||||||
try {
|
const file = _c;
|
||||||
const file = _c;
|
const relativeFile = path
|
||||||
const relativeFile = path
|
.relative(workspace, file)
|
||||||
.relative(workspace, file)
|
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
|
||||||
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
|
core.debug(`Matched: ${relativeFile}`);
|
||||||
core.debug(`Matched: ${relativeFile}`);
|
// Paths are made relative so the tar entries are all relative to the root of the workspace.
|
||||||
// Paths are made relative so the tar entries are all relative to the root of the workspace.
|
if (relativeFile === '') {
|
||||||
if (relativeFile === '') {
|
// path.relative returns empty string if workspace and file are equal
|
||||||
// path.relative returns empty string if workspace and file are equal
|
paths.push('.');
|
||||||
paths.push('.');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
paths.push(`${relativeFile}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
finally {
|
else {
|
||||||
_e = true;
|
paths.push(`${relativeFile}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -711,7 +707,10 @@ function assertDefined(name, value) {
|
|||||||
exports.assertDefined = assertDefined;
|
exports.assertDefined = assertDefined;
|
||||||
function isGhes() {
|
function isGhes() {
|
||||||
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
||||||
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
||||||
|
const isGitHubHost = hostname === 'GITHUB.COM';
|
||||||
|
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
|
||||||
|
return !isGitHubHost && !isGheHost;
|
||||||
}
|
}
|
||||||
exports.isGhes = isGhes;
|
exports.isGhes = isGhes;
|
||||||
//# sourceMappingURL=cacheUtils.js.map
|
//# sourceMappingURL=cacheUtils.js.map
|
||||||
@ -729,7 +728,7 @@ var CacheFilename;
|
|||||||
(function (CacheFilename) {
|
(function (CacheFilename) {
|
||||||
CacheFilename["Gzip"] = "cache.tgz";
|
CacheFilename["Gzip"] = "cache.tgz";
|
||||||
CacheFilename["Zstd"] = "cache.tzst";
|
CacheFilename["Zstd"] = "cache.tzst";
|
||||||
})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {}));
|
})(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
|
||||||
var CompressionMethod;
|
var CompressionMethod;
|
||||||
(function (CompressionMethod) {
|
(function (CompressionMethod) {
|
||||||
CompressionMethod["Gzip"] = "gzip";
|
CompressionMethod["Gzip"] = "gzip";
|
||||||
@ -737,12 +736,12 @@ var CompressionMethod;
|
|||||||
// This enum is for earlier version of zstd that does not have --long support
|
// This enum is for earlier version of zstd that does not have --long support
|
||||||
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
|
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
|
||||||
CompressionMethod["Zstd"] = "zstd";
|
CompressionMethod["Zstd"] = "zstd";
|
||||||
})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {}));
|
})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
|
||||||
var ArchiveToolType;
|
var ArchiveToolType;
|
||||||
(function (ArchiveToolType) {
|
(function (ArchiveToolType) {
|
||||||
ArchiveToolType["GNU"] = "gnu";
|
ArchiveToolType["GNU"] = "gnu";
|
||||||
ArchiveToolType["BSD"] = "bsd";
|
ArchiveToolType["BSD"] = "bsd";
|
||||||
})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {}));
|
})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
|
||||||
// The default number of retry attempts.
|
// The default number of retry attempts.
|
||||||
exports.DefaultRetryAttempts = 2;
|
exports.DefaultRetryAttempts = 2;
|
||||||
// The default delay in milliseconds between retry attempts.
|
// The default delay in milliseconds between retry attempts.
|
||||||
@ -8551,7 +8550,7 @@ class HttpClient {
|
|||||||
if (this._keepAlive && useProxy) {
|
if (this._keepAlive && useProxy) {
|
||||||
agent = this._proxyAgent;
|
agent = this._proxyAgent;
|
||||||
}
|
}
|
||||||
if (this._keepAlive && !useProxy) {
|
if (!useProxy) {
|
||||||
agent = this._agent;
|
agent = this._agent;
|
||||||
}
|
}
|
||||||
// if agent is already assigned use that agent.
|
// if agent is already assigned use that agent.
|
||||||
@ -8583,16 +8582,12 @@ class HttpClient {
|
|||||||
agent = tunnelAgent(agentOptions);
|
agent = tunnelAgent(agentOptions);
|
||||||
this._proxyAgent = agent;
|
this._proxyAgent = agent;
|
||||||
}
|
}
|
||||||
// if reusing agent across request and tunneling agent isn't assigned create a new agent
|
// if tunneling agent isn't assigned create a new agent
|
||||||
if (this._keepAlive && !agent) {
|
if (!agent) {
|
||||||
const options = { keepAlive: this._keepAlive, maxSockets };
|
const options = { keepAlive: this._keepAlive, maxSockets };
|
||||||
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
||||||
this._agent = agent;
|
this._agent = agent;
|
||||||
}
|
}
|
||||||
// if not using private agent and tunnel agent isn't setup then use global agent
|
|
||||||
if (!agent) {
|
|
||||||
agent = usingSsl ? https.globalAgent : http.globalAgent;
|
|
||||||
}
|
|
||||||
if (usingSsl && this._ignoreSslError) {
|
if (usingSsl && this._ignoreSslError) {
|
||||||
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
||||||
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
||||||
@ -55566,35 +55561,43 @@ const coerce = (version, options) => {
|
|||||||
|
|
||||||
let match = null
|
let match = null
|
||||||
if (!options.rtl) {
|
if (!options.rtl) {
|
||||||
match = version.match(re[t.COERCE])
|
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
|
||||||
} else {
|
} else {
|
||||||
// Find the right-most coercible string that does not share
|
// Find the right-most coercible string that does not share
|
||||||
// a terminus with a more left-ward coercible string.
|
// a terminus with a more left-ward coercible string.
|
||||||
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
||||||
|
// With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
|
||||||
//
|
//
|
||||||
// Walk through the string checking with a /g regexp
|
// Walk through the string checking with a /g regexp
|
||||||
// Manually set the index so as to pick up overlapping matches.
|
// Manually set the index so as to pick up overlapping matches.
|
||||||
// Stop when we get a match that ends at the string end, since no
|
// Stop when we get a match that ends at the string end, since no
|
||||||
// coercible string can be more right-ward without the same terminus.
|
// coercible string can be more right-ward without the same terminus.
|
||||||
|
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
|
||||||
let next
|
let next
|
||||||
while ((next = re[t.COERCERTL].exec(version)) &&
|
while ((next = coerceRtlRegex.exec(version)) &&
|
||||||
(!match || match.index + match[0].length !== version.length)
|
(!match || match.index + match[0].length !== version.length)
|
||||||
) {
|
) {
|
||||||
if (!match ||
|
if (!match ||
|
||||||
next.index + next[0].length !== match.index + match[0].length) {
|
next.index + next[0].length !== match.index + match[0].length) {
|
||||||
match = next
|
match = next
|
||||||
}
|
}
|
||||||
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
|
||||||
}
|
}
|
||||||
// leave it in a clean state
|
// leave it in a clean state
|
||||||
re[t.COERCERTL].lastIndex = -1
|
coerceRtlRegex.lastIndex = -1
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match === null) {
|
if (match === null) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
|
const major = match[2]
|
||||||
|
const minor = match[3] || '0'
|
||||||
|
const patch = match[4] || '0'
|
||||||
|
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
|
||||||
|
const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
|
||||||
|
|
||||||
|
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
|
||||||
}
|
}
|
||||||
module.exports = coerce
|
module.exports = coerce
|
||||||
|
|
||||||
@ -56286,12 +56289,17 @@ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
|
|||||||
|
|
||||||
// Coercion.
|
// Coercion.
|
||||||
// Extract anything that could conceivably be a part of a valid semver
|
// Extract anything that could conceivably be a part of a valid semver
|
||||||
createToken('COERCE', `${'(^|[^\\d])' +
|
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
|
||||||
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
|
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
|
||||||
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
||||||
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
|
||||||
|
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
|
||||||
|
createToken('COERCEFULL', src[t.COERCEPLAIN] +
|
||||||
|
`(?:${src[t.PRERELEASE]})?` +
|
||||||
|
`(?:${src[t.BUILD]})?` +
|
||||||
`(?:$|[^\\d])`)
|
`(?:$|[^\\d])`)
|
||||||
createToken('COERCERTL', src[t.COERCE], true)
|
createToken('COERCERTL', src[t.COERCE], true)
|
||||||
|
createToken('COERCERTLFULL', src[t.COERCEFULL], true)
|
||||||
|
|
||||||
// Tilde ranges.
|
// Tilde ranges.
|
||||||
// Meaning is "reasonably at or greater than"
|
// Meaning is "reasonably at or greater than"
|
||||||
@ -64974,6 +64982,132 @@ function onConnectTimeout (socket) {
|
|||||||
module.exports = buildConnector
|
module.exports = buildConnector
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 4462:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {Record<string, string | undefined>} */
|
||||||
|
const headerNameLowerCasedRecord = {}
|
||||||
|
|
||||||
|
// https://developer.mozilla.org/docs/Web/HTTP/Headers
|
||||||
|
const wellknownHeaderNames = [
|
||||||
|
'Accept',
|
||||||
|
'Accept-Encoding',
|
||||||
|
'Accept-Language',
|
||||||
|
'Accept-Ranges',
|
||||||
|
'Access-Control-Allow-Credentials',
|
||||||
|
'Access-Control-Allow-Headers',
|
||||||
|
'Access-Control-Allow-Methods',
|
||||||
|
'Access-Control-Allow-Origin',
|
||||||
|
'Access-Control-Expose-Headers',
|
||||||
|
'Access-Control-Max-Age',
|
||||||
|
'Access-Control-Request-Headers',
|
||||||
|
'Access-Control-Request-Method',
|
||||||
|
'Age',
|
||||||
|
'Allow',
|
||||||
|
'Alt-Svc',
|
||||||
|
'Alt-Used',
|
||||||
|
'Authorization',
|
||||||
|
'Cache-Control',
|
||||||
|
'Clear-Site-Data',
|
||||||
|
'Connection',
|
||||||
|
'Content-Disposition',
|
||||||
|
'Content-Encoding',
|
||||||
|
'Content-Language',
|
||||||
|
'Content-Length',
|
||||||
|
'Content-Location',
|
||||||
|
'Content-Range',
|
||||||
|
'Content-Security-Policy',
|
||||||
|
'Content-Security-Policy-Report-Only',
|
||||||
|
'Content-Type',
|
||||||
|
'Cookie',
|
||||||
|
'Cross-Origin-Embedder-Policy',
|
||||||
|
'Cross-Origin-Opener-Policy',
|
||||||
|
'Cross-Origin-Resource-Policy',
|
||||||
|
'Date',
|
||||||
|
'Device-Memory',
|
||||||
|
'Downlink',
|
||||||
|
'ECT',
|
||||||
|
'ETag',
|
||||||
|
'Expect',
|
||||||
|
'Expect-CT',
|
||||||
|
'Expires',
|
||||||
|
'Forwarded',
|
||||||
|
'From',
|
||||||
|
'Host',
|
||||||
|
'If-Match',
|
||||||
|
'If-Modified-Since',
|
||||||
|
'If-None-Match',
|
||||||
|
'If-Range',
|
||||||
|
'If-Unmodified-Since',
|
||||||
|
'Keep-Alive',
|
||||||
|
'Last-Modified',
|
||||||
|
'Link',
|
||||||
|
'Location',
|
||||||
|
'Max-Forwards',
|
||||||
|
'Origin',
|
||||||
|
'Permissions-Policy',
|
||||||
|
'Pragma',
|
||||||
|
'Proxy-Authenticate',
|
||||||
|
'Proxy-Authorization',
|
||||||
|
'RTT',
|
||||||
|
'Range',
|
||||||
|
'Referer',
|
||||||
|
'Referrer-Policy',
|
||||||
|
'Refresh',
|
||||||
|
'Retry-After',
|
||||||
|
'Sec-WebSocket-Accept',
|
||||||
|
'Sec-WebSocket-Extensions',
|
||||||
|
'Sec-WebSocket-Key',
|
||||||
|
'Sec-WebSocket-Protocol',
|
||||||
|
'Sec-WebSocket-Version',
|
||||||
|
'Server',
|
||||||
|
'Server-Timing',
|
||||||
|
'Service-Worker-Allowed',
|
||||||
|
'Service-Worker-Navigation-Preload',
|
||||||
|
'Set-Cookie',
|
||||||
|
'SourceMap',
|
||||||
|
'Strict-Transport-Security',
|
||||||
|
'Supports-Loading-Mode',
|
||||||
|
'TE',
|
||||||
|
'Timing-Allow-Origin',
|
||||||
|
'Trailer',
|
||||||
|
'Transfer-Encoding',
|
||||||
|
'Upgrade',
|
||||||
|
'Upgrade-Insecure-Requests',
|
||||||
|
'User-Agent',
|
||||||
|
'Vary',
|
||||||
|
'Via',
|
||||||
|
'WWW-Authenticate',
|
||||||
|
'X-Content-Type-Options',
|
||||||
|
'X-DNS-Prefetch-Control',
|
||||||
|
'X-Frame-Options',
|
||||||
|
'X-Permitted-Cross-Domain-Policies',
|
||||||
|
'X-Powered-By',
|
||||||
|
'X-Requested-With',
|
||||||
|
'X-XSS-Protection'
|
||||||
|
]
|
||||||
|
|
||||||
|
for (let i = 0; i < wellknownHeaderNames.length; ++i) {
|
||||||
|
const key = wellknownHeaderNames[i]
|
||||||
|
const lowerCasedKey = key.toLowerCase()
|
||||||
|
headerNameLowerCasedRecord[key] = headerNameLowerCasedRecord[lowerCasedKey] =
|
||||||
|
lowerCasedKey
|
||||||
|
}
|
||||||
|
|
||||||
|
// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`.
|
||||||
|
Object.setPrototypeOf(headerNameLowerCasedRecord, null)
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
wellknownHeaderNames,
|
||||||
|
headerNameLowerCasedRecord
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 8045:
|
/***/ 8045:
|
||||||
@ -65806,6 +65940,7 @@ const { InvalidArgumentError } = __nccwpck_require__(8045)
|
|||||||
const { Blob } = __nccwpck_require__(4300)
|
const { Blob } = __nccwpck_require__(4300)
|
||||||
const nodeUtil = __nccwpck_require__(3837)
|
const nodeUtil = __nccwpck_require__(3837)
|
||||||
const { stringify } = __nccwpck_require__(3477)
|
const { stringify } = __nccwpck_require__(3477)
|
||||||
|
const { headerNameLowerCasedRecord } = __nccwpck_require__(4462)
|
||||||
|
|
||||||
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))
|
const [nodeMajor, nodeMinor] = process.versions.node.split('.').map(v => Number(v))
|
||||||
|
|
||||||
@ -66015,6 +66150,15 @@ function parseKeepAliveTimeout (val) {
|
|||||||
return m ? parseInt(m[1], 10) * 1000 : null
|
return m ? parseInt(m[1], 10) * 1000 : null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves a header name and returns its lowercase value.
|
||||||
|
* @param {string | Buffer} value Header name
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function headerNameToString (value) {
|
||||||
|
return headerNameLowerCasedRecord[value] || value.toLowerCase()
|
||||||
|
}
|
||||||
|
|
||||||
function parseHeaders (headers, obj = {}) {
|
function parseHeaders (headers, obj = {}) {
|
||||||
// For H2 support
|
// For H2 support
|
||||||
if (!Array.isArray(headers)) return headers
|
if (!Array.isArray(headers)) return headers
|
||||||
@ -66286,6 +66430,7 @@ module.exports = {
|
|||||||
isIterable,
|
isIterable,
|
||||||
isAsyncIterable,
|
isAsyncIterable,
|
||||||
isDestroyed,
|
isDestroyed,
|
||||||
|
headerNameToString,
|
||||||
parseRawHeaders,
|
parseRawHeaders,
|
||||||
parseHeaders,
|
parseHeaders,
|
||||||
parseKeepAliveTimeout,
|
parseKeepAliveTimeout,
|
||||||
@ -70422,6 +70567,9 @@ function httpRedirectFetch (fetchParams, response) {
|
|||||||
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
||||||
request.headersList.delete('authorization')
|
request.headersList.delete('authorization')
|
||||||
|
|
||||||
|
// https://fetch.spec.whatwg.org/#authentication-entries
|
||||||
|
request.headersList.delete('proxy-authorization', true)
|
||||||
|
|
||||||
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
||||||
request.headersList.delete('cookie')
|
request.headersList.delete('cookie')
|
||||||
request.headersList.delete('host')
|
request.headersList.delete('host')
|
||||||
@ -72930,14 +73078,18 @@ const { isBlobLike, toUSVString, ReadableStreamFrom } = __nccwpck_require__(3983
|
|||||||
const assert = __nccwpck_require__(9491)
|
const assert = __nccwpck_require__(9491)
|
||||||
const { isUint8Array } = __nccwpck_require__(9830)
|
const { isUint8Array } = __nccwpck_require__(9830)
|
||||||
|
|
||||||
|
let supportedHashes = []
|
||||||
|
|
||||||
// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
|
// https://nodejs.org/api/crypto.html#determining-if-crypto-support-is-unavailable
|
||||||
/** @type {import('crypto')|undefined} */
|
/** @type {import('crypto')|undefined} */
|
||||||
let crypto
|
let crypto
|
||||||
|
|
||||||
try {
|
try {
|
||||||
crypto = __nccwpck_require__(6113)
|
crypto = __nccwpck_require__(6113)
|
||||||
|
const possibleRelevantHashes = ['sha256', 'sha384', 'sha512']
|
||||||
|
supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash))
|
||||||
|
/* c8 ignore next 3 */
|
||||||
} catch {
|
} catch {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function responseURL (response) {
|
function responseURL (response) {
|
||||||
@ -73465,66 +73617,56 @@ function bytesMatch (bytes, metadataList) {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. If parsedMetadata is the empty set, return true.
|
// 3. If response is not eligible for integrity validation, return false.
|
||||||
|
// TODO
|
||||||
|
|
||||||
|
// 4. If parsedMetadata is the empty set, return true.
|
||||||
if (parsedMetadata.length === 0) {
|
if (parsedMetadata.length === 0) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. Let metadata be the result of getting the strongest
|
// 5. Let metadata be the result of getting the strongest
|
||||||
// metadata from parsedMetadata.
|
// metadata from parsedMetadata.
|
||||||
const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo))
|
const strongest = getStrongestMetadata(parsedMetadata)
|
||||||
// get the strongest algorithm
|
const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest)
|
||||||
const strongest = list[0].algo
|
|
||||||
// get all entries that use the strongest algorithm; ignore weaker
|
|
||||||
const metadata = list.filter((item) => item.algo === strongest)
|
|
||||||
|
|
||||||
// 5. For each item in metadata:
|
// 6. For each item in metadata:
|
||||||
for (const item of metadata) {
|
for (const item of metadata) {
|
||||||
// 1. Let algorithm be the alg component of item.
|
// 1. Let algorithm be the alg component of item.
|
||||||
const algorithm = item.algo
|
const algorithm = item.algo
|
||||||
|
|
||||||
// 2. Let expectedValue be the val component of item.
|
// 2. Let expectedValue be the val component of item.
|
||||||
let expectedValue = item.hash
|
const expectedValue = item.hash
|
||||||
|
|
||||||
// See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e
|
// See https://github.com/web-platform-tests/wpt/commit/e4c5cc7a5e48093220528dfdd1c4012dc3837a0e
|
||||||
// "be liberal with padding". This is annoying, and it's not even in the spec.
|
// "be liberal with padding". This is annoying, and it's not even in the spec.
|
||||||
|
|
||||||
if (expectedValue.endsWith('==')) {
|
|
||||||
expectedValue = expectedValue.slice(0, -2)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. Let actualValue be the result of applying algorithm to bytes.
|
// 3. Let actualValue be the result of applying algorithm to bytes.
|
||||||
let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')
|
let actualValue = crypto.createHash(algorithm).update(bytes).digest('base64')
|
||||||
|
|
||||||
if (actualValue.endsWith('==')) {
|
if (actualValue[actualValue.length - 1] === '=') {
|
||||||
actualValue = actualValue.slice(0, -2)
|
if (actualValue[actualValue.length - 2] === '=') {
|
||||||
|
actualValue = actualValue.slice(0, -2)
|
||||||
|
} else {
|
||||||
|
actualValue = actualValue.slice(0, -1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 4. If actualValue is a case-sensitive match for expectedValue,
|
// 4. If actualValue is a case-sensitive match for expectedValue,
|
||||||
// return true.
|
// return true.
|
||||||
if (actualValue === expectedValue) {
|
if (compareBase64Mixed(actualValue, expectedValue)) {
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest('base64url')
|
|
||||||
|
|
||||||
if (actualBase64URL.endsWith('==')) {
|
|
||||||
actualBase64URL = actualBase64URL.slice(0, -2)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actualBase64URL === expectedValue) {
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6. Return false.
|
// 7. Return false.
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options
|
// https://w3c.github.io/webappsec-subresource-integrity/#grammardef-hash-with-options
|
||||||
// https://www.w3.org/TR/CSP2/#source-list-syntax
|
// https://www.w3.org/TR/CSP2/#source-list-syntax
|
||||||
// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1
|
// https://www.rfc-editor.org/rfc/rfc5234#appendix-B.1
|
||||||
const parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i
|
const parseHashWithOptions = /(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
|
* @see https://w3c.github.io/webappsec-subresource-integrity/#parse-metadata
|
||||||
@ -73538,8 +73680,6 @@ function parseMetadata (metadata) {
|
|||||||
// 2. Let empty be equal to true.
|
// 2. Let empty be equal to true.
|
||||||
let empty = true
|
let empty = true
|
||||||
|
|
||||||
const supportedHashes = crypto.getHashes()
|
|
||||||
|
|
||||||
// 3. For each token returned by splitting metadata on spaces:
|
// 3. For each token returned by splitting metadata on spaces:
|
||||||
for (const token of metadata.split(' ')) {
|
for (const token of metadata.split(' ')) {
|
||||||
// 1. Set empty to false.
|
// 1. Set empty to false.
|
||||||
@ -73549,7 +73689,11 @@ function parseMetadata (metadata) {
|
|||||||
const parsedToken = parseHashWithOptions.exec(token)
|
const parsedToken = parseHashWithOptions.exec(token)
|
||||||
|
|
||||||
// 3. If token does not parse, continue to the next token.
|
// 3. If token does not parse, continue to the next token.
|
||||||
if (parsedToken === null || parsedToken.groups === undefined) {
|
if (
|
||||||
|
parsedToken === null ||
|
||||||
|
parsedToken.groups === undefined ||
|
||||||
|
parsedToken.groups.algo === undefined
|
||||||
|
) {
|
||||||
// Note: Chromium blocks the request at this point, but Firefox
|
// Note: Chromium blocks the request at this point, but Firefox
|
||||||
// gives a warning that an invalid integrity was given. The
|
// gives a warning that an invalid integrity was given. The
|
||||||
// correct behavior is to ignore these, and subsequently not
|
// correct behavior is to ignore these, and subsequently not
|
||||||
@ -73558,11 +73702,11 @@ function parseMetadata (metadata) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 4. Let algorithm be the hash-algo component of token.
|
// 4. Let algorithm be the hash-algo component of token.
|
||||||
const algorithm = parsedToken.groups.algo
|
const algorithm = parsedToken.groups.algo.toLowerCase()
|
||||||
|
|
||||||
// 5. If algorithm is a hash function recognized by the user
|
// 5. If algorithm is a hash function recognized by the user
|
||||||
// agent, add the parsed token to result.
|
// agent, add the parsed token to result.
|
||||||
if (supportedHashes.includes(algorithm.toLowerCase())) {
|
if (supportedHashes.includes(algorithm)) {
|
||||||
result.push(parsedToken.groups)
|
result.push(parsedToken.groups)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -73575,6 +73719,82 @@ function parseMetadata (metadata) {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {{ algo: 'sha256' | 'sha384' | 'sha512' }[]} metadataList
|
||||||
|
*/
|
||||||
|
function getStrongestMetadata (metadataList) {
|
||||||
|
// Let algorithm be the algo component of the first item in metadataList.
|
||||||
|
// Can be sha256
|
||||||
|
let algorithm = metadataList[0].algo
|
||||||
|
// If the algorithm is sha512, then it is the strongest
|
||||||
|
// and we can return immediately
|
||||||
|
if (algorithm[3] === '5') {
|
||||||
|
return algorithm
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 1; i < metadataList.length; ++i) {
|
||||||
|
const metadata = metadataList[i]
|
||||||
|
// If the algorithm is sha512, then it is the strongest
|
||||||
|
// and we can break the loop immediately
|
||||||
|
if (metadata.algo[3] === '5') {
|
||||||
|
algorithm = 'sha512'
|
||||||
|
break
|
||||||
|
// If the algorithm is sha384, then a potential sha256 or sha384 is ignored
|
||||||
|
} else if (algorithm[3] === '3') {
|
||||||
|
continue
|
||||||
|
// algorithm is sha256, check if algorithm is sha384 and if so, set it as
|
||||||
|
// the strongest
|
||||||
|
} else if (metadata.algo[3] === '3') {
|
||||||
|
algorithm = 'sha384'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return algorithm
|
||||||
|
}
|
||||||
|
|
||||||
|
function filterMetadataListByAlgorithm (metadataList, algorithm) {
|
||||||
|
if (metadataList.length === 1) {
|
||||||
|
return metadataList
|
||||||
|
}
|
||||||
|
|
||||||
|
let pos = 0
|
||||||
|
for (let i = 0; i < metadataList.length; ++i) {
|
||||||
|
if (metadataList[i].algo === algorithm) {
|
||||||
|
metadataList[pos++] = metadataList[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
metadataList.length = pos
|
||||||
|
|
||||||
|
return metadataList
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compares two base64 strings, allowing for base64url
|
||||||
|
* in the second string.
|
||||||
|
*
|
||||||
|
* @param {string} actualValue always base64
|
||||||
|
* @param {string} expectedValue base64 or base64url
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
function compareBase64Mixed (actualValue, expectedValue) {
|
||||||
|
if (actualValue.length !== expectedValue.length) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
for (let i = 0; i < actualValue.length; ++i) {
|
||||||
|
if (actualValue[i] !== expectedValue[i]) {
|
||||||
|
if (
|
||||||
|
(actualValue[i] === '+' && expectedValue[i] === '-') ||
|
||||||
|
(actualValue[i] === '/' && expectedValue[i] === '_')
|
||||||
|
) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request
|
// https://w3c.github.io/webappsec-upgrade-insecure-requests/#upgrade-request
|
||||||
function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
|
function tryUpgradeRequestToAPotentiallyTrustworthyURL (request) {
|
||||||
// TODO
|
// TODO
|
||||||
@ -73990,7 +74210,8 @@ module.exports = {
|
|||||||
urlHasHttpsScheme,
|
urlHasHttpsScheme,
|
||||||
urlIsHttpHttpsScheme,
|
urlIsHttpHttpsScheme,
|
||||||
readAllBytes,
|
readAllBytes,
|
||||||
normalizeMethodRecord
|
normalizeMethodRecord,
|
||||||
|
parseMetadata
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -76077,12 +76298,17 @@ function parseLocation (statusCode, headers) {
|
|||||||
|
|
||||||
// https://tools.ietf.org/html/rfc7231#section-6.4.4
|
// https://tools.ietf.org/html/rfc7231#section-6.4.4
|
||||||
function shouldRemoveHeader (header, removeContent, unknownOrigin) {
|
function shouldRemoveHeader (header, removeContent, unknownOrigin) {
|
||||||
return (
|
if (header.length === 4) {
|
||||||
(header.length === 4 && header.toString().toLowerCase() === 'host') ||
|
return util.headerNameToString(header) === 'host'
|
||||||
(removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||
|
}
|
||||||
(unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||
|
if (removeContent && util.headerNameToString(header).startsWith('content-')) {
|
||||||
(unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')
|
return true
|
||||||
)
|
}
|
||||||
|
if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) {
|
||||||
|
const name = util.headerNameToString(header)
|
||||||
|
return name === 'authorization' || name === 'cookie' || name === 'proxy-authorization'
|
||||||
|
}
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://tools.ietf.org/html/rfc7231#section-6.4
|
// https://tools.ietf.org/html/rfc7231#section-6.4
|
||||||
@ -88028,9 +88254,9 @@ const sys = __importStar(__nccwpck_require__(5632));
|
|||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const os_1 = __importDefault(__nccwpck_require__(2037));
|
const os_1 = __importDefault(__nccwpck_require__(2037));
|
||||||
const utils_1 = __nccwpck_require__(1314);
|
const utils_1 = __nccwpck_require__(1314);
|
||||||
function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
function getGo(versionSpec_1, checkLatest_1, auth_1) {
|
||||||
var _a;
|
return __awaiter(this, arguments, void 0, function* (versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
var _a;
|
||||||
let manifest;
|
let manifest;
|
||||||
const osPlat = os_1.default.platform();
|
const osPlat = os_1.default.platform();
|
||||||
if (versionSpec === utils_1.StableReleaseAlias.Stable ||
|
if (versionSpec === utils_1.StableReleaseAlias.Stable ||
|
||||||
@ -88206,8 +88432,8 @@ function getManifest(auth) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.getManifest = getManifest;
|
exports.getManifest = getManifest;
|
||||||
function getInfoFromManifest(versionSpec, stable, auth, arch = os_1.default.arch(), manifest) {
|
function getInfoFromManifest(versionSpec_1, stable_1, auth_1) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, arguments, void 0, function* (versionSpec, stable, auth, arch = os_1.default.arch(), manifest) {
|
||||||
let info = null;
|
let info = null;
|
||||||
if (!manifest) {
|
if (!manifest) {
|
||||||
core.debug('No manifest cached');
|
core.debug('No manifest cached');
|
||||||
@ -88241,8 +88467,8 @@ function getInfoFromDist(versionSpec, arch) {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function findMatch(versionSpec, arch = os_1.default.arch()) {
|
function findMatch(versionSpec_1) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, arguments, void 0, function* (versionSpec, arch = os_1.default.arch()) {
|
||||||
const archFilter = sys.getArch(arch);
|
const archFilter = sys.getArch(arch);
|
||||||
const platFilter = sys.getPlatform();
|
const platFilter = sys.getPlatform();
|
||||||
let result;
|
let result;
|
||||||
|
@ -6,13 +6,13 @@ We have prepared a short guide so that the process of making your contribution i
|
|||||||
|
|
||||||
## How can I contribute...
|
## How can I contribute...
|
||||||
|
|
||||||
* [Contribute Documentation:green_book:](#contribute-documentation)
|
* [Contribute Documentation :green_book:](#contribute-documentation)
|
||||||
|
|
||||||
* [Contribute Code :computer:](#contribute-code)
|
* [Contribute Code :computer:](#contribute-code)
|
||||||
|
|
||||||
* [Provide Support on Issues:pencil:](#provide-support-on-issues)
|
* [Provide Support on Issues :pencil:](#provide-support-on-issues)
|
||||||
|
|
||||||
* [Review Pull Requests:mag:](#review-pull-requests)
|
* [Review Pull Requests :mag:](#review-pull-requests)
|
||||||
|
|
||||||
## Contribute documentation
|
## Contribute documentation
|
||||||
|
|
||||||
@ -113,4 +113,4 @@ Another great way to contribute is pull request reviews. Please, be extra kind:
|
|||||||
- Make sure you're familiar with the code or documentation is updated, unless it's a minor change (spellchecking, minor formatting, etc.)
|
- Make sure you're familiar with the code or documentation is updated, unless it's a minor change (spellchecking, minor formatting, etc.)
|
||||||
- Review changes using the GitHub functionality. You can ask a clarifying question, point out an error or suggest an alternative.
|
- Review changes using the GitHub functionality. You can ask a clarifying question, point out an error or suggest an alternative.
|
||||||
> Note: You may ask for minor changes - "nitpicks", but consider whether they are real blockers to merging or not
|
> Note: You may ask for minor changes - "nitpicks", but consider whether they are real blockers to merging or not
|
||||||
- Submit your review, which may include comments, an approval, or a changes request
|
- Submit your review, which may include comments, an approval, or a changes request
|
||||||
|
132
package-lock.json
generated
132
package-lock.json
generated
@ -9,32 +9,32 @@
|
|||||||
"version": "5.0.0",
|
"version": "5.0.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^3.2.1",
|
"@actions/cache": "^3.2.4",
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.0",
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/glob": "^0.4.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.2.1",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"semver": "^7.5.4"
|
"semver": "^7.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.10",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^20.10.3",
|
"@types/node": "^20.11.28",
|
||||||
"@types/semver": "^7.5.6",
|
"@types/semver": "^7.5.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
"@typescript-eslint/parser": "^5.54.0",
|
"@typescript-eslint/parser": "^5.54.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-jest": "^27.2.1",
|
"eslint-plugin-jest": "^27.9.0",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^29.7.0",
|
"jest-circus": "^29.7.0",
|
||||||
"nock": "^10.0.6",
|
"nock": "^10.0.6",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.4",
|
||||||
"ts-jest": "^29.1.1",
|
"ts-jest": "^29.1.2",
|
||||||
"typescript": "^5.3.2"
|
"typescript": "^5.4.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@aashutoshrathi/word-wrap": {
|
"node_modules/@aashutoshrathi/word-wrap": {
|
||||||
@ -47,9 +47,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/cache": {
|
"node_modules/@actions/cache": {
|
||||||
"version": "3.2.2",
|
"version": "3.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.2.4.tgz",
|
||||||
"integrity": "sha512-6D0Jq5JrLZRQ3VApeQwQkkV20ZZXjXsHNYXd9VjNUdi9E0h93wESpxfMJ2JWLCUCgHNLcfY0v3GjNM+2FdRMlg==",
|
"integrity": "sha512-RuHnwfcDagtX+37s0ZWy7clbOfnZ7AlDJQ7k/9rzt2W4Gnwde3fa/qjSjVuz4vLcLIpc7fUob27CMrqiWZytYA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.0.1",
|
"@actions/exec": "^1.0.1",
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"@azure/abort-controller": "^1.1.0",
|
"@azure/abort-controller": "^1.1.0",
|
||||||
"@azure/ms-rest-js": "^2.6.0",
|
"@azure/ms-rest-js": "^2.6.0",
|
||||||
"@azure/storage-blob": "^12.13.0",
|
"@azure/storage-blob": "^12.13.0",
|
||||||
"semver": "^6.1.0",
|
"semver": "^6.3.1",
|
||||||
"uuid": "^3.3.3"
|
"uuid": "^3.3.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -115,9 +115,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.1.tgz",
|
||||||
"integrity": "sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==",
|
"integrity": "sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tunnel": "^0.0.6",
|
"tunnel": "^0.0.6",
|
||||||
"undici": "^5.25.4"
|
"undici": "^5.25.4"
|
||||||
@ -1034,9 +1034,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@eslint/js": {
|
"node_modules/@eslint/js": {
|
||||||
"version": "8.55.0",
|
"version": "8.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz",
|
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
|
||||||
"integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==",
|
"integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||||
@ -1051,13 +1051,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/config-array": {
|
"node_modules/@humanwhocodes/config-array": {
|
||||||
"version": "0.11.13",
|
"version": "0.11.14",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
|
||||||
"integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
|
"integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@humanwhocodes/object-schema": "^2.0.1",
|
"@humanwhocodes/object-schema": "^2.0.2",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.3.1",
|
||||||
"minimatch": "^3.0.5"
|
"minimatch": "^3.0.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -1078,9 +1078,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@humanwhocodes/object-schema": {
|
"node_modules/@humanwhocodes/object-schema": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
|
||||||
"integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
|
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@istanbuljs/load-nyc-config": {
|
"node_modules/@istanbuljs/load-nyc-config": {
|
||||||
@ -1659,9 +1659,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/jest": {
|
"node_modules/@types/jest": {
|
||||||
"version": "29.5.10",
|
"version": "29.5.12",
|
||||||
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz",
|
||||||
"integrity": "sha512-tE4yxKEphEyxj9s4inideLHktW/x6DwesIwWZ9NN1FKf9zbJYsnhBoA9vrHA/IuIOKwPa5PcFBNV4lpMIOEzyQ==",
|
"integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"expect": "^29.0.0",
|
"expect": "^29.0.0",
|
||||||
@ -1675,9 +1675,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.10.3",
|
"version": "20.11.28",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.28.tgz",
|
||||||
"integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==",
|
"integrity": "sha512-M/GPWVS2wLkSkNHVeLkrF2fD5Lx5UC4PxA0uZcKc6QqbIQUJyW1jVjueJYi1z8n0I5PxYrtpnPnWglE+y9A0KA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
}
|
}
|
||||||
@ -1705,9 +1705,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/semver": {
|
"node_modules/@types/semver": {
|
||||||
"version": "7.5.6",
|
"version": "7.5.8",
|
||||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",
|
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz",
|
||||||
"integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",
|
"integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/stack-utils": {
|
"node_modules/@types/stack-utils": {
|
||||||
@ -2214,12 +2214,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/braces": {
|
"node_modules/braces": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fill-range": "^7.0.1"
|
"fill-range": "^7.1.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
@ -2731,16 +2731,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.55.0",
|
"version": "8.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
|
||||||
"integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==",
|
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@eslint-community/eslint-utils": "^4.2.0",
|
"@eslint-community/eslint-utils": "^4.2.0",
|
||||||
"@eslint-community/regexpp": "^4.6.1",
|
"@eslint-community/regexpp": "^4.6.1",
|
||||||
"@eslint/eslintrc": "^2.1.4",
|
"@eslint/eslintrc": "^2.1.4",
|
||||||
"@eslint/js": "8.55.0",
|
"@eslint/js": "8.57.0",
|
||||||
"@humanwhocodes/config-array": "^0.11.13",
|
"@humanwhocodes/config-array": "^0.11.14",
|
||||||
"@humanwhocodes/module-importer": "^1.0.1",
|
"@humanwhocodes/module-importer": "^1.0.1",
|
||||||
"@nodelib/fs.walk": "^1.2.8",
|
"@nodelib/fs.walk": "^1.2.8",
|
||||||
"@ungap/structured-clone": "^1.2.0",
|
"@ungap/structured-clone": "^1.2.0",
|
||||||
@ -2817,9 +2817,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/eslint-plugin-jest": {
|
"node_modules/eslint-plugin-jest": {
|
||||||
"version": "27.6.0",
|
"version": "27.9.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz",
|
||||||
"integrity": "sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==",
|
"integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@typescript-eslint/utils": "^5.10.0"
|
"@typescript-eslint/utils": "^5.10.0"
|
||||||
@ -2828,7 +2828,7 @@
|
|||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0",
|
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
||||||
"eslint": "^7.0.0 || ^8.0.0",
|
"eslint": "^7.0.0 || ^8.0.0",
|
||||||
"jest": "*"
|
"jest": "*"
|
||||||
},
|
},
|
||||||
@ -3175,9 +3175,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fill-range": {
|
"node_modules/fill-range": {
|
||||||
"version": "7.0.1",
|
"version": "7.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"to-regex-range": "^5.0.1"
|
"to-regex-range": "^5.0.1"
|
||||||
@ -5310,9 +5310,9 @@
|
|||||||
"integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA=="
|
"integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA=="
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.5.4",
|
"version": "7.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
|
||||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
},
|
},
|
||||||
@ -5616,9 +5616,9 @@
|
|||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
||||||
},
|
},
|
||||||
"node_modules/ts-jest": {
|
"node_modules/ts-jest": {
|
||||||
"version": "29.1.1",
|
"version": "29.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz",
|
||||||
"integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==",
|
"integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bs-logger": "0.x",
|
"bs-logger": "0.x",
|
||||||
@ -5634,7 +5634,7 @@
|
|||||||
"ts-jest": "cli.js"
|
"ts-jest": "cli.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^16.10.0 || ^18.0.0 || >=20.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@babel/core": ">=7.0.0-beta.0 <8",
|
"@babel/core": ">=7.0.0-beta.0 <8",
|
||||||
@ -5726,9 +5726,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/typescript": {
|
"node_modules/typescript": {
|
||||||
"version": "5.3.2",
|
"version": "5.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz",
|
||||||
"integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==",
|
"integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"tsc": "bin/tsc",
|
"tsc": "bin/tsc",
|
||||||
@ -5739,9 +5739,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.28.2",
|
"version": "5.28.4",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
|
||||||
"integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==",
|
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/busboy": "^2.0.0"
|
"@fastify/busboy": "^2.0.0"
|
||||||
},
|
},
|
||||||
|
20
package.json
20
package.json
@ -25,31 +25,31 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^3.2.1",
|
"@actions/cache": "^3.2.4",
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.0",
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/glob": "^0.4.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.2.1",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
"semver": "^7.5.4"
|
"semver": "^7.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.10",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^20.10.3",
|
"@types/node": "^20.11.28",
|
||||||
"@types/semver": "^7.5.6",
|
"@types/semver": "^7.5.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
"@typescript-eslint/parser": "^5.54.0",
|
"@typescript-eslint/parser": "^5.54.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.35.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-jest": "^27.2.1",
|
"eslint-plugin-jest": "^27.9.0",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^29.7.0",
|
"jest-circus": "^29.7.0",
|
||||||
"nock": "^10.0.6",
|
"nock": "^10.0.6",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^2.8.4",
|
||||||
"ts-jest": "^29.1.1",
|
"ts-jest": "^29.1.2",
|
||||||
"typescript": "^5.3.2"
|
"typescript": "^5.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user