mirror of
https://gitea.com/actions/setup-java.git
synced 2025-11-19 04:36:25 +08:00
Compare commits
4 Commits
test-macos
...
a368ab84e0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a368ab84e0 | ||
|
|
b78a0ce7c7 | ||
|
|
30bab15302 | ||
|
|
ca7d0c6d8c |
20
.github/workflows/e2e-cache.yml
vendored
20
.github/workflows/e2e-cache.yml
vendored
@@ -3,7 +3,7 @@ name: Validate cache
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- test-macos-x64-runner
|
- main
|
||||||
- releases/*
|
- releases/*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
@@ -21,7 +21,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
needs: gradle-save
|
needs: gradle-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -70,7 +70,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -93,7 +93,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
needs: maven-save
|
needs: maven-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -121,7 +121,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-22.04]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: sbt
|
cache: sbt
|
||||||
- name: Setup SBT
|
- name: Setup SBT
|
||||||
if: matrix.os == 'macos-14-large'
|
if: matrix.os == 'macos-13'
|
||||||
run: |
|
run: |
|
||||||
echo ""Installing SBT...""
|
echo ""Installing SBT...""
|
||||||
brew install sbt
|
brew install sbt
|
||||||
@@ -141,7 +141,7 @@ jobs:
|
|||||||
run: sbt update
|
run: sbt update
|
||||||
|
|
||||||
- name: Check files to cache on macos-latest
|
- name: Check files to cache on macos-latest
|
||||||
if: matrix.os == 'macos-14-large'
|
if: matrix.os == 'macos-13'
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
if [ ! -d ~/Library/Caches/Coursier ]; then
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
||||||
@@ -170,7 +170,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-22.04]
|
||||||
needs: sbt-save
|
needs: sbt-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -184,7 +184,7 @@ jobs:
|
|||||||
cache: sbt
|
cache: sbt
|
||||||
|
|
||||||
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
||||||
if: matrix.os == 'macos-14-large'
|
if: matrix.os == 'macos-13'
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
if [ ! -d ~/Library/Caches/Coursier ]; then
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
||||||
|
|||||||
12
.github/workflows/e2e-versions.yml
vendored
12
.github/workflows/e2e-versions.yml
vendored
@@ -3,7 +3,7 @@ name: Validate Java e2e
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- test-macos-x64-runner
|
- main
|
||||||
- releases/*
|
- releases/*
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- '**.md'
|
- '**.md'
|
||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
distribution: [
|
distribution: [
|
||||||
'temurin',
|
'temurin',
|
||||||
'adopt',
|
'adopt',
|
||||||
@@ -39,10 +39,10 @@ jobs:
|
|||||||
- distribution: microsoft
|
- distribution: microsoft
|
||||||
version: 8
|
version: 8
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: macos-14-large
|
os: macos-13
|
||||||
include:
|
include:
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: macos-14-large
|
os: macos-13
|
||||||
version: 17
|
version: 17
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
@@ -220,7 +220,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
version: ['17-ea', '15.0.0-ea.14']
|
version: ['17-ea', '15.0.0-ea.14']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -286,7 +286,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-14-large]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
distribution:
|
distribution:
|
||||||
['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains']
|
['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine', 'jetbrains']
|
||||||
java-package: ['jre']
|
java-package: ['jre']
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ name: 'Publish Immutable Action Version'
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [released]
|
types: [published]
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
|
|||||||
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: 4.0.3
|
version: 4.0.2
|
||||||
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
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: "@actions/glob"
|
name: "@actions/glob"
|
||||||
version: 0.5.0
|
version: 0.4.0
|
||||||
type: npm
|
type: npm
|
||||||
summary: Actions glob lib
|
summary: Actions glob lib
|
||||||
homepage: https://github.com/actions/toolkit/tree/main/packages/glob
|
homepage: https://github.com/actions/toolkit/tree/main/packages/glob
|
||||||
2
.licenses/npm/undici.dep.yml
generated
2
.licenses/npm/undici.dep.yml
generated
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
name: undici
|
name: undici
|
||||||
version: 5.29.0
|
version: 5.28.5
|
||||||
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
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,9 @@ describe('getAvailableVersions', () => {
|
|||||||
expect(availableVersions).not.toBeNull();
|
expect(availableVersions).not.toBeNull();
|
||||||
|
|
||||||
const length =
|
const length =
|
||||||
os.platform() === 'win32' ? manifestData.length : manifestData.length + 2;
|
os.platform() === 'win32'
|
||||||
|
? manifestData.length - 1
|
||||||
|
: manifestData.length + 1;
|
||||||
expect(availableVersions.length).toBe(length);
|
expect(availableVersions.length).toBe(length);
|
||||||
}, 10_000);
|
}, 10_000);
|
||||||
});
|
});
|
||||||
|
|||||||
282
dist/cleanup/index.js
vendored
282
dist/cleanup/index.js
vendored
@@ -220,7 +220,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
};
|
};
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
core.debug(`Cache not found for keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
core.info(`Cache hit for: ${request.key}`);
|
core.info(`Cache hit for: ${request.key}`);
|
||||||
@@ -2204,7 +2204,6 @@ const cacheUtils_1 = __nccwpck_require__(1518);
|
|||||||
const auth_1 = __nccwpck_require__(5526);
|
const auth_1 = __nccwpck_require__(5526);
|
||||||
const http_client_1 = __nccwpck_require__(6255);
|
const http_client_1 = __nccwpck_require__(6255);
|
||||||
const cache_twirp_client_1 = __nccwpck_require__(2655);
|
const cache_twirp_client_1 = __nccwpck_require__(2655);
|
||||||
const util_1 = __nccwpck_require__(1953);
|
|
||||||
/**
|
/**
|
||||||
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||||
*
|
*
|
||||||
@@ -2264,7 +2263,6 @@ class CacheServiceClient {
|
|||||||
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
||||||
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
||||||
const body = JSON.parse(rawBody);
|
const body = JSON.parse(rawBody);
|
||||||
(0, util_1.maskSecretUrls)(body);
|
|
||||||
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
||||||
if (this.isSuccessStatusCode(statusCode)) {
|
if (this.isSuccessStatusCode(statusCode)) {
|
||||||
return { response, body };
|
return { response, body };
|
||||||
@@ -2446,87 +2444,6 @@ exports.getUserAgentString = getUserAgentString;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 1953:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.maskSecretUrls = exports.maskSigUrl = void 0;
|
|
||||||
const core_1 = __nccwpck_require__(2186);
|
|
||||||
/**
|
|
||||||
* Masks the `sig` parameter in a URL and sets it as a secret.
|
|
||||||
*
|
|
||||||
* @param url - The URL containing the signature parameter to mask
|
|
||||||
* @remarks
|
|
||||||
* This function attempts to parse the provided URL and identify the 'sig' query parameter.
|
|
||||||
* If found, it registers both the raw and URL-encoded signature values as secrets using
|
|
||||||
* the Actions `setSecret` API, which prevents them from being displayed in logs.
|
|
||||||
*
|
|
||||||
* The function handles errors gracefully if URL parsing fails, logging them as debug messages.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* // Mask a signature in an Azure SAS token URL
|
|
||||||
* maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01');
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
function maskSigUrl(url) {
|
|
||||||
if (!url)
|
|
||||||
return;
|
|
||||||
try {
|
|
||||||
const parsedUrl = new URL(url);
|
|
||||||
const signature = parsedUrl.searchParams.get('sig');
|
|
||||||
if (signature) {
|
|
||||||
(0, core_1.setSecret)(signature);
|
|
||||||
(0, core_1.setSecret)(encodeURIComponent(signature));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
(0, core_1.debug)(`Failed to parse URL: ${url} ${error instanceof Error ? error.message : String(error)}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.maskSigUrl = maskSigUrl;
|
|
||||||
/**
|
|
||||||
* Masks sensitive information in URLs containing signature parameters.
|
|
||||||
* Currently supports masking 'sig' parameters in the 'signed_upload_url'
|
|
||||||
* and 'signed_download_url' properties of the provided object.
|
|
||||||
*
|
|
||||||
* @param body - The object should contain a signature
|
|
||||||
* @remarks
|
|
||||||
* This function extracts URLs from the object properties and calls maskSigUrl
|
|
||||||
* on each one to redact sensitive signature information. The function doesn't
|
|
||||||
* modify the original object; it only marks the signatures as secrets for
|
|
||||||
* logging purposes.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const responseBody = {
|
|
||||||
* signed_upload_url: 'https://blob.core.windows.net/?sig=abc123',
|
|
||||||
* signed_download_url: 'https://blob.core/windows.net/?sig=def456'
|
|
||||||
* };
|
|
||||||
* maskSecretUrls(responseBody);
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
function maskSecretUrls(body) {
|
|
||||||
if (typeof body !== 'object' || body === null) {
|
|
||||||
(0, core_1.debug)('body is not an object or is null');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ('signed_upload_url' in body &&
|
|
||||||
typeof body.signed_upload_url === 'string') {
|
|
||||||
maskSigUrl(body.signed_upload_url);
|
|
||||||
}
|
|
||||||
if ('signed_download_url' in body &&
|
|
||||||
typeof body.signed_download_url === 'string') {
|
|
||||||
maskSigUrl(body.signed_download_url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.maskSecretUrls = maskSecretUrls;
|
|
||||||
//# sourceMappingURL=util.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 6490:
|
/***/ 6490:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
@@ -7711,7 +7628,7 @@ function hashFiles(patterns, currentWorkspace = '', options, verbose = false) {
|
|||||||
followSymbolicLinks = options.followSymbolicLinks;
|
followSymbolicLinks = options.followSymbolicLinks;
|
||||||
}
|
}
|
||||||
const globber = yield create(patterns, { followSymbolicLinks });
|
const globber = yield create(patterns, { followSymbolicLinks });
|
||||||
return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose);
|
return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.hashFiles = hashFiles;
|
exports.hashFiles = hashFiles;
|
||||||
@@ -7726,11 +7643,7 @@ exports.hashFiles = hashFiles;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -7743,7 +7656,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -7758,8 +7671,7 @@ function getOptions(copy) {
|
|||||||
followSymbolicLinks: true,
|
followSymbolicLinks: true,
|
||||||
implicitDescendants: true,
|
implicitDescendants: true,
|
||||||
matchDirectories: true,
|
matchDirectories: true,
|
||||||
omitBrokenSymbolicLinks: true,
|
omitBrokenSymbolicLinks: true
|
||||||
excludeHiddenFiles: false
|
|
||||||
};
|
};
|
||||||
if (copy) {
|
if (copy) {
|
||||||
if (typeof copy.followSymbolicLinks === 'boolean') {
|
if (typeof copy.followSymbolicLinks === 'boolean') {
|
||||||
@@ -7778,10 +7690,6 @@ function getOptions(copy) {
|
|||||||
result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
|
result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
|
||||||
core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
|
core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
|
||||||
}
|
}
|
||||||
if (typeof copy.excludeHiddenFiles === 'boolean') {
|
|
||||||
result.excludeHiddenFiles = copy.excludeHiddenFiles;
|
|
||||||
core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -7797,11 +7705,7 @@ exports.getOptions = getOptions;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -7814,7 +7718,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -7868,21 +7772,19 @@ class DefaultGlobber {
|
|||||||
return this.searchPaths.slice();
|
return this.searchPaths.slice();
|
||||||
}
|
}
|
||||||
glob() {
|
glob() {
|
||||||
var _a, e_1, _b, _c;
|
var e_1, _a;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const result = [];
|
const result = [];
|
||||||
try {
|
try {
|
||||||
for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
|
||||||
_c = _f.value;
|
const itemPath = _c.value;
|
||||||
_d = false;
|
|
||||||
const itemPath = _c;
|
|
||||||
result.push(itemPath);
|
result.push(itemPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||||
finally {
|
finally {
|
||||||
try {
|
try {
|
||||||
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
||||||
}
|
}
|
||||||
finally { if (e_1) throw e_1.error; }
|
finally { if (e_1) throw e_1.error; }
|
||||||
}
|
}
|
||||||
@@ -7940,10 +7842,6 @@ class DefaultGlobber {
|
|||||||
if (!stats) {
|
if (!stats) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Hidden file or directory?
|
|
||||||
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// Directory
|
// Directory
|
||||||
if (stats.isDirectory()) {
|
if (stats.isDirectory()) {
|
||||||
// Matched
|
// Matched
|
||||||
@@ -8049,11 +7947,7 @@ exports.DefaultGlobber = DefaultGlobber;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8066,7 +7960,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8095,21 +7989,19 @@ const stream = __importStar(__nccwpck_require__(2781));
|
|||||||
const util = __importStar(__nccwpck_require__(3837));
|
const util = __importStar(__nccwpck_require__(3837));
|
||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
function hashFiles(globber, currentWorkspace, verbose = false) {
|
function hashFiles(globber, currentWorkspace, verbose = false) {
|
||||||
var _a, e_1, _b, _c;
|
var e_1, _a;
|
||||||
var _d;
|
var _b;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const writeDelegate = verbose ? core.info : core.debug;
|
const writeDelegate = verbose ? core.info : core.debug;
|
||||||
let hasMatch = false;
|
let hasMatch = false;
|
||||||
const githubWorkspace = currentWorkspace
|
const githubWorkspace = currentWorkspace
|
||||||
? currentWorkspace
|
? currentWorkspace
|
||||||
: (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd();
|
: (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
|
||||||
const result = crypto.createHash('sha256');
|
const result = crypto.createHash('sha256');
|
||||||
let count = 0;
|
let count = 0;
|
||||||
try {
|
try {
|
||||||
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
|
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
|
||||||
_c = _g.value;
|
const file = _d.value;
|
||||||
_e = false;
|
|
||||||
const file = _c;
|
|
||||||
writeDelegate(file);
|
writeDelegate(file);
|
||||||
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
|
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
|
||||||
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
|
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
|
||||||
@@ -8132,7 +8024,7 @@ function hashFiles(globber, currentWorkspace, verbose = false) {
|
|||||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||||
finally {
|
finally {
|
||||||
try {
|
try {
|
||||||
if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
|
if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
|
||||||
}
|
}
|
||||||
finally { if (e_1) throw e_1.error; }
|
finally { if (e_1) throw e_1.error; }
|
||||||
}
|
}
|
||||||
@@ -8172,7 +8064,7 @@ var MatchKind;
|
|||||||
MatchKind[MatchKind["File"] = 2] = "File";
|
MatchKind[MatchKind["File"] = 2] = "File";
|
||||||
/** Matched */
|
/** Matched */
|
||||||
MatchKind[MatchKind["All"] = 3] = "All";
|
MatchKind[MatchKind["All"] = 3] = "All";
|
||||||
})(MatchKind || (exports.MatchKind = MatchKind = {}));
|
})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));
|
||||||
//# sourceMappingURL=internal-match-kind.js.map
|
//# sourceMappingURL=internal-match-kind.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -8184,11 +8076,7 @@ var MatchKind;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8201,7 +8089,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8251,8 +8139,8 @@ exports.dirname = dirname;
|
|||||||
* or `C:` are expanded based on the current working directory.
|
* or `C:` are expanded based on the current working directory.
|
||||||
*/
|
*/
|
||||||
function ensureAbsoluteRoot(root, itemPath) {
|
function ensureAbsoluteRoot(root, itemPath) {
|
||||||
(0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
|
assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
|
||||||
(0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
|
||||||
// Already rooted
|
// Already rooted
|
||||||
if (hasAbsoluteRoot(itemPath)) {
|
if (hasAbsoluteRoot(itemPath)) {
|
||||||
return itemPath;
|
return itemPath;
|
||||||
@@ -8262,7 +8150,7 @@ function ensureAbsoluteRoot(root, itemPath) {
|
|||||||
// Check for itemPath like C: or C:foo
|
// Check for itemPath like C: or C:foo
|
||||||
if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
|
if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
|
||||||
let cwd = process.cwd();
|
let cwd = process.cwd();
|
||||||
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
||||||
// Drive letter matches cwd? Expand to cwd
|
// Drive letter matches cwd? Expand to cwd
|
||||||
if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
|
if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
|
||||||
// Drive only, e.g. C:
|
// Drive only, e.g. C:
|
||||||
@@ -8287,11 +8175,11 @@ function ensureAbsoluteRoot(root, itemPath) {
|
|||||||
// Check for itemPath like \ or \foo
|
// Check for itemPath like \ or \foo
|
||||||
else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
|
else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
|
||||||
const cwd = process.cwd();
|
const cwd = process.cwd();
|
||||||
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
||||||
return `${cwd[0]}:\\${itemPath.substr(1)}`;
|
return `${cwd[0]}:\\${itemPath.substr(1)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
|
assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
|
||||||
// Otherwise ensure root ends with a separator
|
// Otherwise ensure root ends with a separator
|
||||||
if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
|
if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
|
||||||
// Intentionally empty
|
// Intentionally empty
|
||||||
@@ -8308,7 +8196,7 @@ exports.ensureAbsoluteRoot = ensureAbsoluteRoot;
|
|||||||
* `\\hello\share` and `C:\hello` (and using alternate separator).
|
* `\\hello\share` and `C:\hello` (and using alternate separator).
|
||||||
*/
|
*/
|
||||||
function hasAbsoluteRoot(itemPath) {
|
function hasAbsoluteRoot(itemPath) {
|
||||||
(0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
|
||||||
// Normalize separators
|
// Normalize separators
|
||||||
itemPath = normalizeSeparators(itemPath);
|
itemPath = normalizeSeparators(itemPath);
|
||||||
// Windows
|
// Windows
|
||||||
@@ -8325,7 +8213,7 @@ exports.hasAbsoluteRoot = hasAbsoluteRoot;
|
|||||||
* `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
|
* `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
|
||||||
*/
|
*/
|
||||||
function hasRoot(itemPath) {
|
function hasRoot(itemPath) {
|
||||||
(0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);
|
||||||
// Normalize separators
|
// Normalize separators
|
||||||
itemPath = normalizeSeparators(itemPath);
|
itemPath = normalizeSeparators(itemPath);
|
||||||
// Windows
|
// Windows
|
||||||
@@ -8393,11 +8281,7 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8410,7 +8294,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8435,7 +8319,7 @@ class Path {
|
|||||||
this.segments = [];
|
this.segments = [];
|
||||||
// String
|
// String
|
||||||
if (typeof itemPath === 'string') {
|
if (typeof itemPath === 'string') {
|
||||||
(0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);
|
||||||
// Normalize slashes and trim unnecessary trailing slash
|
// Normalize slashes and trim unnecessary trailing slash
|
||||||
itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
|
itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
|
||||||
// Not rooted
|
// Not rooted
|
||||||
@@ -8462,24 +8346,24 @@ class Path {
|
|||||||
// Array
|
// Array
|
||||||
else {
|
else {
|
||||||
// Must not be empty
|
// Must not be empty
|
||||||
(0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
|
assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
|
||||||
// Each segment
|
// Each segment
|
||||||
for (let i = 0; i < itemPath.length; i++) {
|
for (let i = 0; i < itemPath.length; i++) {
|
||||||
let segment = itemPath[i];
|
let segment = itemPath[i];
|
||||||
// Must not be empty
|
// Must not be empty
|
||||||
(0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`);
|
assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);
|
||||||
// Normalize slashes
|
// Normalize slashes
|
||||||
segment = pathHelper.normalizeSeparators(itemPath[i]);
|
segment = pathHelper.normalizeSeparators(itemPath[i]);
|
||||||
// Root segment
|
// Root segment
|
||||||
if (i === 0 && pathHelper.hasRoot(segment)) {
|
if (i === 0 && pathHelper.hasRoot(segment)) {
|
||||||
segment = pathHelper.safeTrimTrailingSeparator(segment);
|
segment = pathHelper.safeTrimTrailingSeparator(segment);
|
||||||
(0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
|
assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
|
||||||
this.segments.push(segment);
|
this.segments.push(segment);
|
||||||
}
|
}
|
||||||
// All other segments
|
// All other segments
|
||||||
else {
|
else {
|
||||||
// Must not contain slash
|
// Must not contain slash
|
||||||
(0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
|
assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
|
||||||
this.segments.push(segment);
|
this.segments.push(segment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8517,11 +8401,7 @@ exports.Path = Path;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8534,7 +8414,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8622,11 +8502,7 @@ exports.partialMatch = partialMatch;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8639,7 +8515,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8671,9 +8547,9 @@ class Pattern {
|
|||||||
else {
|
else {
|
||||||
// Convert to pattern
|
// Convert to pattern
|
||||||
segments = segments || [];
|
segments = segments || [];
|
||||||
(0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`);
|
assert_1.default(segments.length, `Parameter 'segments' must not empty`);
|
||||||
const root = Pattern.getLiteral(segments[0]);
|
const root = Pattern.getLiteral(segments[0]);
|
||||||
(0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
|
assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
|
||||||
pattern = new internal_path_1.Path(segments).toString().trim();
|
pattern = new internal_path_1.Path(segments).toString().trim();
|
||||||
if (patternOrNegate) {
|
if (patternOrNegate) {
|
||||||
pattern = `!${pattern}`;
|
pattern = `!${pattern}`;
|
||||||
@@ -8767,13 +8643,13 @@ class Pattern {
|
|||||||
*/
|
*/
|
||||||
static fixupPattern(pattern, homedir) {
|
static fixupPattern(pattern, homedir) {
|
||||||
// Empty
|
// Empty
|
||||||
(0, assert_1.default)(pattern, 'pattern cannot be empty');
|
assert_1.default(pattern, 'pattern cannot be empty');
|
||||||
// Must not contain `.` segment, unless first segment
|
// Must not contain `.` segment, unless first segment
|
||||||
// Must not contain `..` segment
|
// Must not contain `..` segment
|
||||||
const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
|
const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
|
||||||
(0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
|
assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
|
||||||
// Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
|
// Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
|
||||||
(0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
|
assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
|
||||||
// Normalize slashes
|
// Normalize slashes
|
||||||
pattern = pathHelper.normalizeSeparators(pattern);
|
pattern = pathHelper.normalizeSeparators(pattern);
|
||||||
// Replace leading `.` segment
|
// Replace leading `.` segment
|
||||||
@@ -8783,8 +8659,8 @@ class Pattern {
|
|||||||
// Replace leading `~` segment
|
// Replace leading `~` segment
|
||||||
else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
|
else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
|
||||||
homedir = homedir || os.homedir();
|
homedir = homedir || os.homedir();
|
||||||
(0, assert_1.default)(homedir, 'Unable to determine HOME directory');
|
assert_1.default(homedir, 'Unable to determine HOME directory');
|
||||||
(0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
|
assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
|
||||||
pattern = Pattern.globEscape(homedir) + pattern.substr(1);
|
pattern = Pattern.globEscape(homedir) + pattern.substr(1);
|
||||||
}
|
}
|
||||||
// Replace relative drive root, e.g. pattern is C: or C:foo
|
// Replace relative drive root, e.g. pattern is C: or C:foo
|
||||||
@@ -71116,7 +70992,7 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
const { parseSetCookie } = __nccwpck_require__(4408)
|
const { parseSetCookie } = __nccwpck_require__(4408)
|
||||||
const { stringify } = __nccwpck_require__(3121)
|
const { stringify, getHeadersList } = __nccwpck_require__(3121)
|
||||||
const { webidl } = __nccwpck_require__(1744)
|
const { webidl } = __nccwpck_require__(1744)
|
||||||
const { Headers } = __nccwpck_require__(554)
|
const { Headers } = __nccwpck_require__(554)
|
||||||
|
|
||||||
@@ -71192,13 +71068,14 @@ function getSetCookies (headers) {
|
|||||||
|
|
||||||
webidl.brandCheck(headers, Headers, { strict: false })
|
webidl.brandCheck(headers, Headers, { strict: false })
|
||||||
|
|
||||||
const cookies = headers.getSetCookie()
|
const cookies = getHeadersList(headers).cookies
|
||||||
|
|
||||||
if (!cookies) {
|
if (!cookies) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
return cookies.map((pair) => parseSetCookie(pair))
|
// In older versions of undici, cookies is a list of name:value.
|
||||||
|
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71626,15 +71503,14 @@ module.exports = {
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 3121:
|
/***/ 3121:
|
||||||
/***/ ((module) => {
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
/**
|
const assert = __nccwpck_require__(9491)
|
||||||
* @param {string} value
|
const { kHeadersList } = __nccwpck_require__(2785)
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
function isCTLExcludingHtab (value) {
|
function isCTLExcludingHtab (value) {
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
return false
|
return false
|
||||||
@@ -71895,13 +71771,31 @@ function stringify (cookie) {
|
|||||||
return out.join('; ')
|
return out.join('; ')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let kHeadersListNode
|
||||||
|
|
||||||
|
function getHeadersList (headers) {
|
||||||
|
if (headers[kHeadersList]) {
|
||||||
|
return headers[kHeadersList]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!kHeadersListNode) {
|
||||||
|
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
|
||||||
|
(symbol) => symbol.description === 'headers list'
|
||||||
|
)
|
||||||
|
|
||||||
|
assert(kHeadersListNode, 'Headers cannot be parsed')
|
||||||
|
}
|
||||||
|
|
||||||
|
const headersList = headers[kHeadersListNode]
|
||||||
|
assert(headersList)
|
||||||
|
|
||||||
|
return headersList
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isCTLExcludingHtab,
|
isCTLExcludingHtab,
|
||||||
validateCookieName,
|
stringify,
|
||||||
validateCookiePath,
|
getHeadersList
|
||||||
validateCookieValue,
|
|
||||||
toIMFDate,
|
|
||||||
stringify
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -75905,7 +75799,6 @@ const {
|
|||||||
isValidHeaderName,
|
isValidHeaderName,
|
||||||
isValidHeaderValue
|
isValidHeaderValue
|
||||||
} = __nccwpck_require__(2538)
|
} = __nccwpck_require__(2538)
|
||||||
const util = __nccwpck_require__(3837)
|
|
||||||
const { webidl } = __nccwpck_require__(1744)
|
const { webidl } = __nccwpck_require__(1744)
|
||||||
const assert = __nccwpck_require__(9491)
|
const assert = __nccwpck_require__(9491)
|
||||||
|
|
||||||
@@ -76459,9 +76352,6 @@ Object.defineProperties(Headers.prototype, {
|
|||||||
[Symbol.toStringTag]: {
|
[Symbol.toStringTag]: {
|
||||||
value: 'Headers',
|
value: 'Headers',
|
||||||
configurable: true
|
configurable: true
|
||||||
},
|
|
||||||
[util.inspect.custom]: {
|
|
||||||
enumerable: false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -85638,20 +85528,6 @@ class Pool extends PoolBase {
|
|||||||
? { ...options.interceptors }
|
? { ...options.interceptors }
|
||||||
: undefined
|
: undefined
|
||||||
this[kFactory] = factory
|
this[kFactory] = factory
|
||||||
|
|
||||||
this.on('connectionError', (origin, targets, error) => {
|
|
||||||
// If a connection error occurs, we remove the client from the pool,
|
|
||||||
// and emit a connectionError event. They will not be re-used.
|
|
||||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
|
||||||
for (const target of targets) {
|
|
||||||
// Do not use kRemoveClient here, as it will close the client,
|
|
||||||
// but the client cannot be closed in this state.
|
|
||||||
const idx = this[kClients].indexOf(target)
|
|
||||||
if (idx !== -1) {
|
|
||||||
this[kClients].splice(idx, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[kGetDispatcher] () {
|
[kGetDispatcher] () {
|
||||||
@@ -95590,7 +95466,7 @@ module.exports = parseParams
|
|||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.3","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.2","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|||||||
340
dist/setup/index.js
vendored
340
dist/setup/index.js
vendored
@@ -220,7 +220,7 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
};
|
};
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
core.debug(`Cache not found for version ${request.version} of keys: ${keys.join(', ')}`);
|
core.debug(`Cache not found for keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
core.info(`Cache hit for: ${request.key}`);
|
core.info(`Cache hit for: ${request.key}`);
|
||||||
@@ -2204,7 +2204,6 @@ const cacheUtils_1 = __nccwpck_require__(91518);
|
|||||||
const auth_1 = __nccwpck_require__(35526);
|
const auth_1 = __nccwpck_require__(35526);
|
||||||
const http_client_1 = __nccwpck_require__(96255);
|
const http_client_1 = __nccwpck_require__(96255);
|
||||||
const cache_twirp_client_1 = __nccwpck_require__(42655);
|
const cache_twirp_client_1 = __nccwpck_require__(42655);
|
||||||
const util_1 = __nccwpck_require__(61953);
|
|
||||||
/**
|
/**
|
||||||
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||||
*
|
*
|
||||||
@@ -2264,7 +2263,6 @@ class CacheServiceClient {
|
|||||||
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
(0, core_1.debug)(`[Response] - ${response.message.statusCode}`);
|
||||||
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
(0, core_1.debug)(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`);
|
||||||
const body = JSON.parse(rawBody);
|
const body = JSON.parse(rawBody);
|
||||||
(0, util_1.maskSecretUrls)(body);
|
|
||||||
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
(0, core_1.debug)(`Body: ${JSON.stringify(body, null, 2)}`);
|
||||||
if (this.isSuccessStatusCode(statusCode)) {
|
if (this.isSuccessStatusCode(statusCode)) {
|
||||||
return { response, body };
|
return { response, body };
|
||||||
@@ -2446,87 +2444,6 @@ exports.getUserAgentString = getUserAgentString;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 61953:
|
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.maskSecretUrls = exports.maskSigUrl = void 0;
|
|
||||||
const core_1 = __nccwpck_require__(42186);
|
|
||||||
/**
|
|
||||||
* Masks the `sig` parameter in a URL and sets it as a secret.
|
|
||||||
*
|
|
||||||
* @param url - The URL containing the signature parameter to mask
|
|
||||||
* @remarks
|
|
||||||
* This function attempts to parse the provided URL and identify the 'sig' query parameter.
|
|
||||||
* If found, it registers both the raw and URL-encoded signature values as secrets using
|
|
||||||
* the Actions `setSecret` API, which prevents them from being displayed in logs.
|
|
||||||
*
|
|
||||||
* The function handles errors gracefully if URL parsing fails, logging them as debug messages.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* // Mask a signature in an Azure SAS token URL
|
|
||||||
* maskSigUrl('https://example.blob.core.windows.net/container/file.txt?sig=abc123&se=2023-01-01');
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
function maskSigUrl(url) {
|
|
||||||
if (!url)
|
|
||||||
return;
|
|
||||||
try {
|
|
||||||
const parsedUrl = new URL(url);
|
|
||||||
const signature = parsedUrl.searchParams.get('sig');
|
|
||||||
if (signature) {
|
|
||||||
(0, core_1.setSecret)(signature);
|
|
||||||
(0, core_1.setSecret)(encodeURIComponent(signature));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
(0, core_1.debug)(`Failed to parse URL: ${url} ${error instanceof Error ? error.message : String(error)}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.maskSigUrl = maskSigUrl;
|
|
||||||
/**
|
|
||||||
* Masks sensitive information in URLs containing signature parameters.
|
|
||||||
* Currently supports masking 'sig' parameters in the 'signed_upload_url'
|
|
||||||
* and 'signed_download_url' properties of the provided object.
|
|
||||||
*
|
|
||||||
* @param body - The object should contain a signature
|
|
||||||
* @remarks
|
|
||||||
* This function extracts URLs from the object properties and calls maskSigUrl
|
|
||||||
* on each one to redact sensitive signature information. The function doesn't
|
|
||||||
* modify the original object; it only marks the signatures as secrets for
|
|
||||||
* logging purposes.
|
|
||||||
*
|
|
||||||
* @example
|
|
||||||
* ```typescript
|
|
||||||
* const responseBody = {
|
|
||||||
* signed_upload_url: 'https://blob.core.windows.net/?sig=abc123',
|
|
||||||
* signed_download_url: 'https://blob.core/windows.net/?sig=def456'
|
|
||||||
* };
|
|
||||||
* maskSecretUrls(responseBody);
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
function maskSecretUrls(body) {
|
|
||||||
if (typeof body !== 'object' || body === null) {
|
|
||||||
(0, core_1.debug)('body is not an object or is null');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ('signed_upload_url' in body &&
|
|
||||||
typeof body.signed_upload_url === 'string') {
|
|
||||||
maskSigUrl(body.signed_upload_url);
|
|
||||||
}
|
|
||||||
if ('signed_download_url' in body &&
|
|
||||||
typeof body.signed_download_url === 'string') {
|
|
||||||
maskSigUrl(body.signed_download_url);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.maskSecretUrls = maskSecretUrls;
|
|
||||||
//# sourceMappingURL=util.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 56490:
|
/***/ 56490:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
@@ -7711,7 +7628,7 @@ function hashFiles(patterns, currentWorkspace = '', options, verbose = false) {
|
|||||||
followSymbolicLinks = options.followSymbolicLinks;
|
followSymbolicLinks = options.followSymbolicLinks;
|
||||||
}
|
}
|
||||||
const globber = yield create(patterns, { followSymbolicLinks });
|
const globber = yield create(patterns, { followSymbolicLinks });
|
||||||
return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose);
|
return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.hashFiles = hashFiles;
|
exports.hashFiles = hashFiles;
|
||||||
@@ -7726,11 +7643,7 @@ exports.hashFiles = hashFiles;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -7743,7 +7656,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -7758,8 +7671,7 @@ function getOptions(copy) {
|
|||||||
followSymbolicLinks: true,
|
followSymbolicLinks: true,
|
||||||
implicitDescendants: true,
|
implicitDescendants: true,
|
||||||
matchDirectories: true,
|
matchDirectories: true,
|
||||||
omitBrokenSymbolicLinks: true,
|
omitBrokenSymbolicLinks: true
|
||||||
excludeHiddenFiles: false
|
|
||||||
};
|
};
|
||||||
if (copy) {
|
if (copy) {
|
||||||
if (typeof copy.followSymbolicLinks === 'boolean') {
|
if (typeof copy.followSymbolicLinks === 'boolean') {
|
||||||
@@ -7778,10 +7690,6 @@ function getOptions(copy) {
|
|||||||
result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
|
result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
|
||||||
core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
|
core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
|
||||||
}
|
}
|
||||||
if (typeof copy.excludeHiddenFiles === 'boolean') {
|
|
||||||
result.excludeHiddenFiles = copy.excludeHiddenFiles;
|
|
||||||
core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -7797,11 +7705,7 @@ exports.getOptions = getOptions;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -7814,7 +7718,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -7868,21 +7772,19 @@ class DefaultGlobber {
|
|||||||
return this.searchPaths.slice();
|
return this.searchPaths.slice();
|
||||||
}
|
}
|
||||||
glob() {
|
glob() {
|
||||||
var _a, e_1, _b, _c;
|
var e_1, _a;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const result = [];
|
const result = [];
|
||||||
try {
|
try {
|
||||||
for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
|
||||||
_c = _f.value;
|
const itemPath = _c.value;
|
||||||
_d = false;
|
|
||||||
const itemPath = _c;
|
|
||||||
result.push(itemPath);
|
result.push(itemPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||||
finally {
|
finally {
|
||||||
try {
|
try {
|
||||||
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
||||||
}
|
}
|
||||||
finally { if (e_1) throw e_1.error; }
|
finally { if (e_1) throw e_1.error; }
|
||||||
}
|
}
|
||||||
@@ -7940,10 +7842,6 @@ class DefaultGlobber {
|
|||||||
if (!stats) {
|
if (!stats) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Hidden file or directory?
|
|
||||||
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// Directory
|
// Directory
|
||||||
if (stats.isDirectory()) {
|
if (stats.isDirectory()) {
|
||||||
// Matched
|
// Matched
|
||||||
@@ -8049,11 +7947,7 @@ exports.DefaultGlobber = DefaultGlobber;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8066,7 +7960,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8095,21 +7989,19 @@ const stream = __importStar(__nccwpck_require__(12781));
|
|||||||
const util = __importStar(__nccwpck_require__(73837));
|
const util = __importStar(__nccwpck_require__(73837));
|
||||||
const path = __importStar(__nccwpck_require__(71017));
|
const path = __importStar(__nccwpck_require__(71017));
|
||||||
function hashFiles(globber, currentWorkspace, verbose = false) {
|
function hashFiles(globber, currentWorkspace, verbose = false) {
|
||||||
var _a, e_1, _b, _c;
|
var e_1, _a;
|
||||||
var _d;
|
var _b;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const writeDelegate = verbose ? core.info : core.debug;
|
const writeDelegate = verbose ? core.info : core.debug;
|
||||||
let hasMatch = false;
|
let hasMatch = false;
|
||||||
const githubWorkspace = currentWorkspace
|
const githubWorkspace = currentWorkspace
|
||||||
? currentWorkspace
|
? currentWorkspace
|
||||||
: (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd();
|
: (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
|
||||||
const result = crypto.createHash('sha256');
|
const result = crypto.createHash('sha256');
|
||||||
let count = 0;
|
let count = 0;
|
||||||
try {
|
try {
|
||||||
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
|
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
|
||||||
_c = _g.value;
|
const file = _d.value;
|
||||||
_e = false;
|
|
||||||
const file = _c;
|
|
||||||
writeDelegate(file);
|
writeDelegate(file);
|
||||||
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
|
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
|
||||||
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
|
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
|
||||||
@@ -8132,7 +8024,7 @@ function hashFiles(globber, currentWorkspace, verbose = false) {
|
|||||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||||
finally {
|
finally {
|
||||||
try {
|
try {
|
||||||
if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
|
if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
|
||||||
}
|
}
|
||||||
finally { if (e_1) throw e_1.error; }
|
finally { if (e_1) throw e_1.error; }
|
||||||
}
|
}
|
||||||
@@ -8172,7 +8064,7 @@ var MatchKind;
|
|||||||
MatchKind[MatchKind["File"] = 2] = "File";
|
MatchKind[MatchKind["File"] = 2] = "File";
|
||||||
/** Matched */
|
/** Matched */
|
||||||
MatchKind[MatchKind["All"] = 3] = "All";
|
MatchKind[MatchKind["All"] = 3] = "All";
|
||||||
})(MatchKind || (exports.MatchKind = MatchKind = {}));
|
})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));
|
||||||
//# sourceMappingURL=internal-match-kind.js.map
|
//# sourceMappingURL=internal-match-kind.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -8184,11 +8076,7 @@ var MatchKind;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8201,7 +8089,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8251,8 +8139,8 @@ exports.dirname = dirname;
|
|||||||
* or `C:` are expanded based on the current working directory.
|
* or `C:` are expanded based on the current working directory.
|
||||||
*/
|
*/
|
||||||
function ensureAbsoluteRoot(root, itemPath) {
|
function ensureAbsoluteRoot(root, itemPath) {
|
||||||
(0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
|
assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
|
||||||
(0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
|
||||||
// Already rooted
|
// Already rooted
|
||||||
if (hasAbsoluteRoot(itemPath)) {
|
if (hasAbsoluteRoot(itemPath)) {
|
||||||
return itemPath;
|
return itemPath;
|
||||||
@@ -8262,7 +8150,7 @@ function ensureAbsoluteRoot(root, itemPath) {
|
|||||||
// Check for itemPath like C: or C:foo
|
// Check for itemPath like C: or C:foo
|
||||||
if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
|
if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
|
||||||
let cwd = process.cwd();
|
let cwd = process.cwd();
|
||||||
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
||||||
// Drive letter matches cwd? Expand to cwd
|
// Drive letter matches cwd? Expand to cwd
|
||||||
if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
|
if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
|
||||||
// Drive only, e.g. C:
|
// Drive only, e.g. C:
|
||||||
@@ -8287,11 +8175,11 @@ function ensureAbsoluteRoot(root, itemPath) {
|
|||||||
// Check for itemPath like \ or \foo
|
// Check for itemPath like \ or \foo
|
||||||
else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
|
else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
|
||||||
const cwd = process.cwd();
|
const cwd = process.cwd();
|
||||||
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
|
||||||
return `${cwd[0]}:\\${itemPath.substr(1)}`;
|
return `${cwd[0]}:\\${itemPath.substr(1)}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
|
assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
|
||||||
// Otherwise ensure root ends with a separator
|
// Otherwise ensure root ends with a separator
|
||||||
if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
|
if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
|
||||||
// Intentionally empty
|
// Intentionally empty
|
||||||
@@ -8308,7 +8196,7 @@ exports.ensureAbsoluteRoot = ensureAbsoluteRoot;
|
|||||||
* `\\hello\share` and `C:\hello` (and using alternate separator).
|
* `\\hello\share` and `C:\hello` (and using alternate separator).
|
||||||
*/
|
*/
|
||||||
function hasAbsoluteRoot(itemPath) {
|
function hasAbsoluteRoot(itemPath) {
|
||||||
(0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
|
||||||
// Normalize separators
|
// Normalize separators
|
||||||
itemPath = normalizeSeparators(itemPath);
|
itemPath = normalizeSeparators(itemPath);
|
||||||
// Windows
|
// Windows
|
||||||
@@ -8325,7 +8213,7 @@ exports.hasAbsoluteRoot = hasAbsoluteRoot;
|
|||||||
* `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
|
* `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
|
||||||
*/
|
*/
|
||||||
function hasRoot(itemPath) {
|
function hasRoot(itemPath) {
|
||||||
(0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);
|
||||||
// Normalize separators
|
// Normalize separators
|
||||||
itemPath = normalizeSeparators(itemPath);
|
itemPath = normalizeSeparators(itemPath);
|
||||||
// Windows
|
// Windows
|
||||||
@@ -8393,11 +8281,7 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8410,7 +8294,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8435,7 +8319,7 @@ class Path {
|
|||||||
this.segments = [];
|
this.segments = [];
|
||||||
// String
|
// String
|
||||||
if (typeof itemPath === 'string') {
|
if (typeof itemPath === 'string') {
|
||||||
(0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`);
|
assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);
|
||||||
// Normalize slashes and trim unnecessary trailing slash
|
// Normalize slashes and trim unnecessary trailing slash
|
||||||
itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
|
itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
|
||||||
// Not rooted
|
// Not rooted
|
||||||
@@ -8462,24 +8346,24 @@ class Path {
|
|||||||
// Array
|
// Array
|
||||||
else {
|
else {
|
||||||
// Must not be empty
|
// Must not be empty
|
||||||
(0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
|
assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
|
||||||
// Each segment
|
// Each segment
|
||||||
for (let i = 0; i < itemPath.length; i++) {
|
for (let i = 0; i < itemPath.length; i++) {
|
||||||
let segment = itemPath[i];
|
let segment = itemPath[i];
|
||||||
// Must not be empty
|
// Must not be empty
|
||||||
(0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`);
|
assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);
|
||||||
// Normalize slashes
|
// Normalize slashes
|
||||||
segment = pathHelper.normalizeSeparators(itemPath[i]);
|
segment = pathHelper.normalizeSeparators(itemPath[i]);
|
||||||
// Root segment
|
// Root segment
|
||||||
if (i === 0 && pathHelper.hasRoot(segment)) {
|
if (i === 0 && pathHelper.hasRoot(segment)) {
|
||||||
segment = pathHelper.safeTrimTrailingSeparator(segment);
|
segment = pathHelper.safeTrimTrailingSeparator(segment);
|
||||||
(0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
|
assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
|
||||||
this.segments.push(segment);
|
this.segments.push(segment);
|
||||||
}
|
}
|
||||||
// All other segments
|
// All other segments
|
||||||
else {
|
else {
|
||||||
// Must not contain slash
|
// Must not contain slash
|
||||||
(0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
|
assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
|
||||||
this.segments.push(segment);
|
this.segments.push(segment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8517,11 +8401,7 @@ exports.Path = Path;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8534,7 +8414,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8622,11 +8502,7 @@ exports.partialMatch = partialMatch;
|
|||||||
|
|
||||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
var desc = Object.getOwnPropertyDescriptor(m, k);
|
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
||||||
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
||||||
}
|
|
||||||
Object.defineProperty(o, k2, desc);
|
|
||||||
}) : (function(o, m, k, k2) {
|
}) : (function(o, m, k, k2) {
|
||||||
if (k2 === undefined) k2 = k;
|
if (k2 === undefined) k2 = k;
|
||||||
o[k2] = m[k];
|
o[k2] = m[k];
|
||||||
@@ -8639,7 +8515,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|||||||
var __importStar = (this && this.__importStar) || function (mod) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
__setModuleDefault(result, mod);
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
@@ -8671,9 +8547,9 @@ class Pattern {
|
|||||||
else {
|
else {
|
||||||
// Convert to pattern
|
// Convert to pattern
|
||||||
segments = segments || [];
|
segments = segments || [];
|
||||||
(0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`);
|
assert_1.default(segments.length, `Parameter 'segments' must not empty`);
|
||||||
const root = Pattern.getLiteral(segments[0]);
|
const root = Pattern.getLiteral(segments[0]);
|
||||||
(0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
|
assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
|
||||||
pattern = new internal_path_1.Path(segments).toString().trim();
|
pattern = new internal_path_1.Path(segments).toString().trim();
|
||||||
if (patternOrNegate) {
|
if (patternOrNegate) {
|
||||||
pattern = `!${pattern}`;
|
pattern = `!${pattern}`;
|
||||||
@@ -8767,13 +8643,13 @@ class Pattern {
|
|||||||
*/
|
*/
|
||||||
static fixupPattern(pattern, homedir) {
|
static fixupPattern(pattern, homedir) {
|
||||||
// Empty
|
// Empty
|
||||||
(0, assert_1.default)(pattern, 'pattern cannot be empty');
|
assert_1.default(pattern, 'pattern cannot be empty');
|
||||||
// Must not contain `.` segment, unless first segment
|
// Must not contain `.` segment, unless first segment
|
||||||
// Must not contain `..` segment
|
// Must not contain `..` segment
|
||||||
const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
|
const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
|
||||||
(0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
|
assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
|
||||||
// Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
|
// Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
|
||||||
(0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
|
assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
|
||||||
// Normalize slashes
|
// Normalize slashes
|
||||||
pattern = pathHelper.normalizeSeparators(pattern);
|
pattern = pathHelper.normalizeSeparators(pattern);
|
||||||
// Replace leading `.` segment
|
// Replace leading `.` segment
|
||||||
@@ -8783,8 +8659,8 @@ class Pattern {
|
|||||||
// Replace leading `~` segment
|
// Replace leading `~` segment
|
||||||
else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
|
else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
|
||||||
homedir = homedir || os.homedir();
|
homedir = homedir || os.homedir();
|
||||||
(0, assert_1.default)(homedir, 'Unable to determine HOME directory');
|
assert_1.default(homedir, 'Unable to determine HOME directory');
|
||||||
(0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
|
assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
|
||||||
pattern = Pattern.globEscape(homedir) + pattern.substr(1);
|
pattern = Pattern.globEscape(homedir) + pattern.substr(1);
|
||||||
}
|
}
|
||||||
// Replace relative drive root, e.g. pattern is C: or C:foo
|
// Replace relative drive root, e.g. pattern is C: or C:foo
|
||||||
@@ -95970,7 +95846,7 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
const { parseSetCookie } = __nccwpck_require__(24408)
|
const { parseSetCookie } = __nccwpck_require__(24408)
|
||||||
const { stringify } = __nccwpck_require__(43121)
|
const { stringify, getHeadersList } = __nccwpck_require__(43121)
|
||||||
const { webidl } = __nccwpck_require__(21744)
|
const { webidl } = __nccwpck_require__(21744)
|
||||||
const { Headers } = __nccwpck_require__(10554)
|
const { Headers } = __nccwpck_require__(10554)
|
||||||
|
|
||||||
@@ -96046,13 +95922,14 @@ function getSetCookies (headers) {
|
|||||||
|
|
||||||
webidl.brandCheck(headers, Headers, { strict: false })
|
webidl.brandCheck(headers, Headers, { strict: false })
|
||||||
|
|
||||||
const cookies = headers.getSetCookie()
|
const cookies = getHeadersList(headers).cookies
|
||||||
|
|
||||||
if (!cookies) {
|
if (!cookies) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
return cookies.map((pair) => parseSetCookie(pair))
|
// In older versions of undici, cookies is a list of name:value.
|
||||||
|
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -96480,15 +96357,14 @@ module.exports = {
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 43121:
|
/***/ 43121:
|
||||||
/***/ ((module) => {
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
/**
|
const assert = __nccwpck_require__(39491)
|
||||||
* @param {string} value
|
const { kHeadersList } = __nccwpck_require__(72785)
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
|
||||||
function isCTLExcludingHtab (value) {
|
function isCTLExcludingHtab (value) {
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
return false
|
return false
|
||||||
@@ -96749,13 +96625,31 @@ function stringify (cookie) {
|
|||||||
return out.join('; ')
|
return out.join('; ')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let kHeadersListNode
|
||||||
|
|
||||||
|
function getHeadersList (headers) {
|
||||||
|
if (headers[kHeadersList]) {
|
||||||
|
return headers[kHeadersList]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!kHeadersListNode) {
|
||||||
|
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
|
||||||
|
(symbol) => symbol.description === 'headers list'
|
||||||
|
)
|
||||||
|
|
||||||
|
assert(kHeadersListNode, 'Headers cannot be parsed')
|
||||||
|
}
|
||||||
|
|
||||||
|
const headersList = headers[kHeadersListNode]
|
||||||
|
assert(headersList)
|
||||||
|
|
||||||
|
return headersList
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
isCTLExcludingHtab,
|
isCTLExcludingHtab,
|
||||||
validateCookieName,
|
stringify,
|
||||||
validateCookiePath,
|
getHeadersList
|
||||||
validateCookieValue,
|
|
||||||
toIMFDate,
|
|
||||||
stringify
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -100759,7 +100653,6 @@ const {
|
|||||||
isValidHeaderName,
|
isValidHeaderName,
|
||||||
isValidHeaderValue
|
isValidHeaderValue
|
||||||
} = __nccwpck_require__(52538)
|
} = __nccwpck_require__(52538)
|
||||||
const util = __nccwpck_require__(73837)
|
|
||||||
const { webidl } = __nccwpck_require__(21744)
|
const { webidl } = __nccwpck_require__(21744)
|
||||||
const assert = __nccwpck_require__(39491)
|
const assert = __nccwpck_require__(39491)
|
||||||
|
|
||||||
@@ -101313,9 +101206,6 @@ Object.defineProperties(Headers.prototype, {
|
|||||||
[Symbol.toStringTag]: {
|
[Symbol.toStringTag]: {
|
||||||
value: 'Headers',
|
value: 'Headers',
|
||||||
configurable: true
|
configurable: true
|
||||||
},
|
|
||||||
[util.inspect.custom]: {
|
|
||||||
enumerable: false
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -110492,20 +110382,6 @@ class Pool extends PoolBase {
|
|||||||
? { ...options.interceptors }
|
? { ...options.interceptors }
|
||||||
: undefined
|
: undefined
|
||||||
this[kFactory] = factory
|
this[kFactory] = factory
|
||||||
|
|
||||||
this.on('connectionError', (origin, targets, error) => {
|
|
||||||
// If a connection error occurs, we remove the client from the pool,
|
|
||||||
// and emit a connectionError event. They will not be re-used.
|
|
||||||
// Fixes https://github.com/nodejs/undici/issues/3895
|
|
||||||
for (const target of targets) {
|
|
||||||
// Do not use kRemoveClient here, as it will close the client,
|
|
||||||
// but the client cannot be closed in this state.
|
|
||||||
const idx = this[kClients].indexOf(target)
|
|
||||||
if (idx !== -1) {
|
|
||||||
this[kClients].splice(idx, 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[kGetDispatcher] () {
|
[kGetDispatcher] () {
|
||||||
@@ -128793,38 +128669,15 @@ class JavaBase {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info('Trying to resolve the latest version from remote');
|
core.info('Trying to resolve the latest version from remote');
|
||||||
try {
|
const javaRelease = yield this.findPackageForDownload(this.version);
|
||||||
const javaRelease = yield this.findPackageForDownload(this.version);
|
core.info(`Resolved latest version as ${javaRelease.version}`);
|
||||||
core.info(`Resolved latest version as ${javaRelease.version}`);
|
if ((foundJava === null || foundJava === void 0 ? void 0 : foundJava.version) === javaRelease.version) {
|
||||||
if ((foundJava === null || foundJava === void 0 ? void 0 : foundJava.version) === javaRelease.version) {
|
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||||
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
core.info('Trying to download...');
|
|
||||||
foundJava = yield this.downloadTool(javaRelease);
|
|
||||||
core.info(`Java ${foundJava.version} was downloaded`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (error) {
|
else {
|
||||||
if (error instanceof tc.HTTPError) {
|
core.info('Trying to download...');
|
||||||
if (error.httpStatusCode === 403) {
|
foundJava = yield this.downloadTool(javaRelease);
|
||||||
core.error('HTTP 403: Permission denied or access restricted.');
|
core.info(`Java ${foundJava.version} was downloaded`);
|
||||||
}
|
|
||||||
else if (error.httpStatusCode === 429) {
|
|
||||||
core.warning('HTTP 429: Rate limit exceeded. Please retry later.');
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
core.error(`HTTP ${error.httpStatusCode}: ${error.message}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
||||||
core.error(`Java setup failed due to network issue or timeout: ${message}`);
|
|
||||||
}
|
|
||||||
if (error instanceof Error && error.stack) {
|
|
||||||
core.debug(error.stack);
|
|
||||||
}
|
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// JDK folder may contain postfix "Contents/Home" on macOS
|
// JDK folder may contain postfix "Contents/Home" on macOS
|
||||||
@@ -129695,12 +129548,7 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
|
|||||||
// url is identical except page_index so print it once for debug
|
// url is identical except page_index so print it once for debug
|
||||||
core.debug(`Gathering available versions from '${rawUrl}'`);
|
core.debug(`Gathering available versions from '${rawUrl}'`);
|
||||||
}
|
}
|
||||||
const paginationPageResult = (yield this.http.getJson(rawUrl, requestHeaders)).result;
|
const paginationPage = (yield this.http.getJson(rawUrl, requestHeaders)).result;
|
||||||
if (!paginationPageResult || paginationPageResult.length === 0) {
|
|
||||||
// break infinity loop because we have reached end of pagination
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
const paginationPage = paginationPageResult.filter(version => this.stable ? !version.prerelease : version.prerelease);
|
|
||||||
if (!paginationPage || paginationPage.length === 0) {
|
if (!paginationPage || paginationPage.length === 0) {
|
||||||
// break infinity loop because we have reached end of pagination
|
// break infinity loop because we have reached end of pagination
|
||||||
break;
|
break;
|
||||||
@@ -129708,11 +129556,9 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
|
|||||||
rawVersions.push(...paginationPage);
|
rawVersions.push(...paginationPage);
|
||||||
page_index++;
|
page_index++;
|
||||||
}
|
}
|
||||||
if (this.stable) {
|
// Add versions not available from the API but are downloadable
|
||||||
// Add versions not available from the API but are downloadable
|
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
|
||||||
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
|
rawVersions.push(...hidden.map(tag => ({ tag_name: tag, name: tag })));
|
||||||
rawVersions.push(...hidden.map(tag => ({ tag_name: tag, name: tag, prerelease: false })));
|
|
||||||
}
|
|
||||||
const versions0 = rawVersions.map((v) => __awaiter(this, void 0, void 0, function* () {
|
const versions0 = rawVersions.map((v) => __awaiter(this, void 0, void 0, function* () {
|
||||||
var _a;
|
var _a;
|
||||||
// Release tags look like one of these:
|
// Release tags look like one of these:
|
||||||
@@ -129731,7 +129577,7 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
|
|||||||
.replace('-', '');
|
.replace('-', '');
|
||||||
const vsplit = vstring.split('b');
|
const vsplit = vstring.split('b');
|
||||||
let semver = vsplit[0];
|
let semver = vsplit[0];
|
||||||
const build = vsplit[1];
|
const build = +vsplit[1];
|
||||||
// Normalize semver
|
// Normalize semver
|
||||||
if (!semver.includes('.') && !semver.includes('_'))
|
if (!semver.includes('.') && !semver.includes('_'))
|
||||||
semver = `${semver}.0.0`;
|
semver = `${semver}.0.0`;
|
||||||
@@ -130215,7 +130061,7 @@ class MicrosoftDistributions extends base_installer_1.JavaBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
core.debug(`Http request for microsoft-openjdk-versions.json failed with status code: ${response === null || response === void 0 ? void 0 : response.statusCode}. Error: ${err}`);
|
core.debug(`Http request for microsoft-openjdk-versions.json failed with status code: ${response === null || response === void 0 ? void 0 : response.statusCode}`);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (response.result) {
|
if (response.result) {
|
||||||
@@ -133625,7 +133471,7 @@ module.exports = parseParams
|
|||||||
/***/ ((module) => {
|
/***/ ((module) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.3","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/node":"^22.13.9","@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
module.exports = JSON.parse('{"name":"@actions/cache","version":"4.0.2","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.11.1","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","@protobuf-ts/plugin":"^2.9.4","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
|
|||||||
@@ -215,6 +215,20 @@ The available package types are:
|
|||||||
- `jdk+ft` - JBRSDK (FreeType)
|
- `jdk+ft` - JBRSDK (FreeType)
|
||||||
- `jre+ft` - JBR (FreeType)
|
- `jre+ft` - JBR (FreeType)
|
||||||
|
|
||||||
|
### GraalVM
|
||||||
|
**NOTE:** Oracle GraalVM is only available for JDK 17 and later.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'graalvm'
|
||||||
|
java-version: '21'
|
||||||
|
- run: |
|
||||||
|
java -cp java HelloWorldApp
|
||||||
|
native-image -cp java HelloWorldApp
|
||||||
|
```
|
||||||
|
|
||||||
## Installing custom Java package type
|
## Installing custom Java package type
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
1938
package-lock.json
generated
1938
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -26,10 +26,10 @@
|
|||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "^4.0.3",
|
"@actions/cache": "^4.0.2",
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/glob": "^0.5.0",
|
"@actions/glob": "^0.4.0",
|
||||||
"@actions/http-client": "^2.2.3",
|
"@actions/http-client": "^2.2.3",
|
||||||
"@actions/io": "^1.0.2",
|
"@actions/io": "^1.0.2",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
@@ -40,12 +40,12 @@
|
|||||||
"@types/jest": "^29.5.14",
|
"@types/jest": "^29.5.14",
|
||||||
"@types/node": "^20.11.24",
|
"@types/node": "^20.11.24",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.35.1",
|
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||||
"@typescript-eslint/parser": "^8.35.1",
|
"@typescript-eslint/parser": "^5.54.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.57.0",
|
"eslint": "^8.57.0",
|
||||||
"eslint-config-prettier": "^8.6.0",
|
"eslint-config-prettier": "^8.6.0",
|
||||||
"eslint-plugin-jest": "^29.0.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",
|
||||||
|
|||||||
@@ -51,36 +51,14 @@ export abstract class JavaBase {
|
|||||||
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||||
} else {
|
} else {
|
||||||
core.info('Trying to resolve the latest version from remote');
|
core.info('Trying to resolve the latest version from remote');
|
||||||
try {
|
const javaRelease = await this.findPackageForDownload(this.version);
|
||||||
const javaRelease = await this.findPackageForDownload(this.version);
|
core.info(`Resolved latest version as ${javaRelease.version}`);
|
||||||
core.info(`Resolved latest version as ${javaRelease.version}`);
|
if (foundJava?.version === javaRelease.version) {
|
||||||
if (foundJava?.version === javaRelease.version) {
|
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
||||||
core.info(`Resolved Java ${foundJava.version} from tool-cache`);
|
} else {
|
||||||
} else {
|
core.info('Trying to download...');
|
||||||
core.info('Trying to download...');
|
foundJava = await this.downloadTool(javaRelease);
|
||||||
foundJava = await this.downloadTool(javaRelease);
|
core.info(`Java ${foundJava.version} was downloaded`);
|
||||||
core.info(`Java ${foundJava.version} was downloaded`);
|
|
||||||
}
|
|
||||||
} catch (error: any) {
|
|
||||||
if (error instanceof tc.HTTPError) {
|
|
||||||
if (error.httpStatusCode === 403) {
|
|
||||||
core.error('HTTP 403: Permission denied or access restricted.');
|
|
||||||
} else if (error.httpStatusCode === 429) {
|
|
||||||
core.warning('HTTP 429: Rate limit exceeded. Please retry later.');
|
|
||||||
} else {
|
|
||||||
core.error(`HTTP ${error.httpStatusCode}: ${error.message}`);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
const message =
|
|
||||||
error instanceof Error ? error.message : JSON.stringify(error);
|
|
||||||
core.error(
|
|
||||||
`Java setup failed due to network issue or timeout: ${message}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (error instanceof Error && error.stack) {
|
|
||||||
core.debug(error.stack);
|
|
||||||
}
|
|
||||||
throw error;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,18 +113,9 @@ export class JetBrainsDistribution extends JavaBase {
|
|||||||
core.debug(`Gathering available versions from '${rawUrl}'`);
|
core.debug(`Gathering available versions from '${rawUrl}'`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const paginationPageResult = (
|
const paginationPage = (
|
||||||
await this.http.getJson<IJetBrainsRawVersion[]>(rawUrl, requestHeaders)
|
await this.http.getJson<IJetBrainsRawVersion[]>(rawUrl, requestHeaders)
|
||||||
).result;
|
).result;
|
||||||
if (!paginationPageResult || paginationPageResult.length === 0) {
|
|
||||||
// break infinity loop because we have reached end of pagination
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
const paginationPage: IJetBrainsRawVersion[] =
|
|
||||||
paginationPageResult.filter(version =>
|
|
||||||
this.stable ? !version.prerelease : version.prerelease
|
|
||||||
);
|
|
||||||
if (!paginationPage || paginationPage.length === 0) {
|
if (!paginationPage || paginationPage.length === 0) {
|
||||||
// break infinity loop because we have reached end of pagination
|
// break infinity loop because we have reached end of pagination
|
||||||
break;
|
break;
|
||||||
@@ -134,13 +125,9 @@ export class JetBrainsDistribution extends JavaBase {
|
|||||||
page_index++;
|
page_index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.stable) {
|
// Add versions not available from the API but are downloadable
|
||||||
// Add versions not available from the API but are downloadable
|
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
|
||||||
const hidden = ['11_0_10b1145.115', '11_0_11b1341.60'];
|
rawVersions.push(...hidden.map(tag => ({tag_name: tag, name: tag})));
|
||||||
rawVersions.push(
|
|
||||||
...hidden.map(tag => ({tag_name: tag, name: tag, prerelease: false}))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const versions0 = rawVersions.map(async v => {
|
const versions0 = rawVersions.map(async v => {
|
||||||
// Release tags look like one of these:
|
// Release tags look like one of these:
|
||||||
@@ -161,7 +148,7 @@ export class JetBrainsDistribution extends JavaBase {
|
|||||||
|
|
||||||
const vsplit = vstring.split('b');
|
const vsplit = vstring.split('b');
|
||||||
let semver = vsplit[0];
|
let semver = vsplit[0];
|
||||||
const build = vsplit[1];
|
const build = +vsplit[1];
|
||||||
|
|
||||||
// Normalize semver
|
// Normalize semver
|
||||||
if (!semver.includes('.') && !semver.includes('_'))
|
if (!semver.includes('.') && !semver.includes('_'))
|
||||||
|
|||||||
@@ -3,12 +3,11 @@
|
|||||||
export interface IJetBrainsRawVersion {
|
export interface IJetBrainsRawVersion {
|
||||||
tag_name: string;
|
tag_name: string;
|
||||||
name: string;
|
name: string;
|
||||||
prerelease: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IJetBrainsVersion {
|
export interface IJetBrainsVersion {
|
||||||
tag_name: string;
|
tag_name: string;
|
||||||
semver: string;
|
semver: string;
|
||||||
build: string;
|
build: number;
|
||||||
url: string;
|
url: string;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export class MicrosoftDistributions extends JavaBase {
|
|||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.debug(
|
core.debug(
|
||||||
`Http request for microsoft-openjdk-versions.json failed with status code: ${response?.statusCode}. Error: ${err}`
|
`Http request for microsoft-openjdk-versions.json failed with status code: ${response?.statusCode}`
|
||||||
);
|
);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user