mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-10-21 16:58:56 +08:00
Compare commits
66 Commits
v2.3.0-bet
...
v2.3.3
Author | SHA1 | Date | |
---|---|---|---|
|
3fbe033aaa | ||
|
0842a550d1 | ||
|
3b959539de | ||
|
c267ad1fcb | ||
|
fab7664a6a | ||
|
a5b34e05de | ||
|
a4b5212a9d | ||
|
ad59e53998 | ||
|
c224a16628 | ||
|
ec783957f3 | ||
|
6b08b7d2b5 | ||
|
fd32ae9081 | ||
|
8545e5aed7 | ||
|
d92395703c | ||
|
af916fa394 | ||
|
3d9f1fdd28 | ||
|
387c8bc97a | ||
|
31c4390f56 | ||
|
05b706c1e7 | ||
|
b9a8697f71 | ||
|
394498f89f | ||
|
c295a4096e | ||
|
74a56b60ce | ||
|
aeb3e0fcd7 | ||
|
8a17724c3e | ||
|
76ed799d26 | ||
|
dd8493d4f2 | ||
|
66061a0409 | ||
|
1a66a38284 | ||
|
bf471096d3 | ||
|
e8a7e1402f | ||
|
0e3ce37aac | ||
|
8d2472536e | ||
|
832889a6eb | ||
|
61f7cb1f75 | ||
|
e440eaf750 | ||
|
570f67893a | ||
|
402732a560 | ||
|
a6f860c57c | ||
|
657d21ac23 | ||
|
688380a438 | ||
|
cce16c4e36 | ||
|
b50380a07d | ||
|
aa2854e6ea | ||
|
471bcda20a | ||
|
91306f47ea | ||
|
65c865a172 | ||
|
1761dcff13 | ||
|
356abb47e7 | ||
|
fc9e8feb61 | ||
|
0e4b100458 | ||
|
82bc72e1e7 | ||
|
8be955ee80 | ||
|
531cc21aeb | ||
|
164712adb1 | ||
|
535b494721 | ||
|
d6110ecac2 | ||
|
cc60593845 | ||
|
fb549a8417 | ||
|
c64fe31590 | ||
|
6e56b59601 | ||
|
c77676cc69 | ||
|
f39ea084f9 | ||
|
27a2f232f6 | ||
|
b4c3d51488 | ||
|
99ec710825 |
@@ -28,8 +28,8 @@
|
|||||||
"@typescript-eslint/no-for-in-array": "error",
|
"@typescript-eslint/no-for-in-array": "error",
|
||||||
"@typescript-eslint/no-inferrable-types": "error",
|
"@typescript-eslint/no-inferrable-types": "error",
|
||||||
"@typescript-eslint/no-misused-new": "error",
|
"@typescript-eslint/no-misused-new": "error",
|
||||||
"@typescript-eslint/no-namespace": "error",
|
"@typescript-eslint/no-namespace": "error",
|
||||||
"@typescript-eslint/no-non-null-assertion": "warn",
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
"@typescript-eslint/no-unnecessary-type-assertion": "error",
|
||||||
"@typescript-eslint/no-useless-constructor": "error",
|
"@typescript-eslint/no-useless-constructor": "error",
|
||||||
|
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@@ -49,3 +49,9 @@ updates:
|
|||||||
- gradle-plugin-portal
|
- gradle-plugin-portal
|
||||||
schedule:
|
schedule:
|
||||||
interval: "daily"
|
interval: "daily"
|
||||||
|
- package-ecosystem: "gradle"
|
||||||
|
directory: "test/init-scripts"
|
||||||
|
registries:
|
||||||
|
- gradle-plugin-portal
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
@@ -11,8 +11,8 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("test").configure {
|
tasks.named("test").configure {
|
||||||
// Echo an output value so we can detect configuration-cache usage
|
// Write marker file so we can detect if task was configured
|
||||||
println "::set-output name=task_configured::yes"
|
file("task-configured.txt").text = "true"
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
if (System.properties.verifyCachedBuild) {
|
if (System.properties.verifyCachedBuild) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.enterprise" version "3.11.1"
|
id "com.gradle.enterprise" version "3.11.2"
|
||||||
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.8"
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.8.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
gradleEnterprise {
|
||||||
|
@@ -10,7 +10,7 @@ dependencies {
|
|||||||
api("org.apache.commons:commons-math3:3.6.1")
|
api("org.apache.commons:commons-math3:3.6.1")
|
||||||
implementation("com.google.guava:guava:31.1-jre")
|
implementation("com.google.guava:guava:31.1-jre")
|
||||||
|
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.9.0")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.9.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.test {
|
tasks.test {
|
||||||
@@ -18,8 +18,8 @@ tasks.test {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("test").configure {
|
tasks.named("test").configure {
|
||||||
// Echo an output value so we can detect configuration-cache usage
|
// Write marker file so we can detect if task was configured
|
||||||
println("::set-output name=task_configured::yes")
|
file("task-configured.txt").writeText("true")
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
if (System.getProperties().containsKey("verifyCachedBuild")) {
|
if (System.getProperties().containsKey("verifyCachedBuild")) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("com.gradle.enterprise") version "3.11.1"
|
id("com.gradle.enterprise") version "3.11.2"
|
||||||
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.8"
|
id("com.gradle.common-custom-user-data-gradle-plugin") version "1.8.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
gradleEnterprise {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.build-scan" version "3.11.1"
|
id "com.gradle.build-scan" version "3.11.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
gradleEnterprise {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.gradle.enterprise" version "3.11.1"
|
id "com.gradle.enterprise" version "3.11.2"
|
||||||
}
|
}
|
||||||
|
|
||||||
gradleEnterprise {
|
gradleEnterprise {
|
||||||
|
20
.github/workflows/ci-dependency-review.yml
vendored
Normal file
20
.github/workflows/ci-dependency-review.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
# Dependency Review Action
|
||||||
|
#
|
||||||
|
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
|
||||||
|
#
|
||||||
|
# Source repository: https://github.com/actions/dependency-review-action
|
||||||
|
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
|
||||||
|
name: CI-dependency-review
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
dependency-review:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: 'Checkout Repository'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: 'Dependency Review'
|
||||||
|
uses: actions/dependency-review-action@v2
|
1
.github/workflows/ci-full-check.yml
vendored
1
.github/workflows/ci-full-check.yml
vendored
@@ -20,7 +20,6 @@ jobs:
|
|||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
|
||||||
cache-cleanup:
|
cache-cleanup:
|
||||||
needs: build-distribution
|
|
||||||
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
uses: ./.github/workflows/integ-test-cache-cleanup.yml
|
||||||
with:
|
with:
|
||||||
cache-key-prefix: ${{github.run_number}}-
|
cache-key-prefix: ${{github.run_number}}-
|
||||||
|
2
.github/workflows/ci-verify-outputs.yml
vendored
2
.github/workflows/ci-verify-outputs.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm run all
|
npm run build
|
||||||
|
|
||||||
- name: Compare the expected and actual dist/ directories
|
- name: Compare the expected and actual dist/ directories
|
||||||
run: |
|
run: |
|
||||||
|
@@ -34,7 +34,7 @@ jobs:
|
|||||||
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
cache-read-only: false # For testing, allow writing cache entries on non-default branches
|
||||||
- name: Build with 3.1
|
- name: Build with 3.1
|
||||||
working-directory: test/jest/resources/cache-cleanup
|
working-directory: test/jest/resources/cache-cleanup
|
||||||
run: gradle --no-daemon --build-cache -Dcommons-math3.version=3.1 build
|
run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1" build
|
||||||
|
|
||||||
# Second build will use the cache from the first build, but cleanup should remove unused artifacts
|
# Second build will use the cache from the first build, but cleanup should remove unused artifacts
|
||||||
assemble-build:
|
assemble-build:
|
||||||
@@ -55,7 +55,7 @@ jobs:
|
|||||||
gradle-home-cache-cleanup: true
|
gradle-home-cache-cleanup: true
|
||||||
- name: Build with 3.1.1
|
- name: Build with 3.1.1
|
||||||
working-directory: test/jest/resources/cache-cleanup
|
working-directory: test/jest/resources/cache-cleanup
|
||||||
run: gradle --no-daemon --build-cache -Dcommons-math3.version=3.1.1 build
|
run: gradle --no-daemon --build-cache -Dcommons_math3_version="3.1.1" build
|
||||||
|
|
||||||
check-clean-cache:
|
check-clean-cache:
|
||||||
needs: assemble-build
|
needs: assemble-build
|
||||||
@@ -75,6 +75,7 @@ jobs:
|
|||||||
- name: Report Gradle User Home
|
- name: Report Gradle User Home
|
||||||
run: du -hc ~/.gradle/caches/modules-2
|
run: du -hc ~/.gradle/caches/modules-2
|
||||||
- name: Verify cleaned cache
|
- name: Verify cleaned cache
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ ! -e ~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1.1 ]; then
|
if [ ! -e ~/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-math3/3.1.1 ]; then
|
||||||
echo "::error ::Should find commons-math3 3.1.1 in cache"
|
echo "::error ::Should find commons-math3 3.1.1 in cache"
|
||||||
|
@@ -60,11 +60,13 @@ jobs:
|
|||||||
working-directory: .github/workflow-samples/groovy-dsl
|
working-directory: .github/workflow-samples/groovy-dsl
|
||||||
run: ./gradlew test --configuration-cache
|
run: ./gradlew test --configuration-cache
|
||||||
- name: Check that configuration-cache was used
|
- name: Check that configuration-cache was used
|
||||||
if: ${{ steps.execute.outputs.task_configured == 'yes' }}
|
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('Configuration cache was not used - task was configured unexpectedly')
|
const fs = require('fs')
|
||||||
|
if (fs.existsSync('.github/workflow-samples/groovy-dsl/task-configured.txt')) {
|
||||||
|
core.setFailed('Configuration cache was not used - task was configured unexpectedly')
|
||||||
|
}
|
||||||
|
|
||||||
# Check that the build can run when no extracted cache entries are restored
|
# Check that the build can run when no extracted cache entries are restored
|
||||||
gradle-user-home-not-fully-restored:
|
gradle-user-home-not-fully-restored:
|
||||||
@@ -154,9 +156,11 @@ jobs:
|
|||||||
working-directory: .github/workflow-samples/kotlin-dsl
|
working-directory: .github/workflow-samples/kotlin-dsl
|
||||||
run: ./gradlew test --configuration-cache
|
run: ./gradlew test --configuration-cache
|
||||||
- name: Check that configuration-cache was used
|
- name: Check that configuration-cache was used
|
||||||
if: ${{ steps.execute.outputs.task_configured == 'yes' }}
|
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
core.setFailed('Configuration cache was not used - task was configured unexpectedly')
|
const fs = require('fs')
|
||||||
|
if (fs.existsSync('.github/workflow-samples/kotlin-dsl/task-configured.txt')) {
|
||||||
|
core.setFailed('Configuration cache was not used - task was configured unexpectedly')
|
||||||
|
}
|
||||||
|
|
||||||
|
14
CONTRIBUTING.md
Normal file
14
CONTRIBUTING.md
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
### How to merge a Dependabot PR
|
||||||
|
|
||||||
|
The "distribution" for a GitHub Action is checked into the repository itself.
|
||||||
|
In the case of the `gradle-build-action`, the transpiled sources are committed to the `dist` directory.
|
||||||
|
Any production dependencies are inlined into the distribution.
|
||||||
|
So if a Dependabot PR updates a production dependency (or a dev dependency that changes the distribution, like the Typescript compiler),
|
||||||
|
then a manual step is required to rebuild the dist and commit.
|
||||||
|
|
||||||
|
The simplest process to follow is:
|
||||||
|
1. Checkout the dependabot branch locally eg: `git checkout dependabot/npm_and_yarn/actions/github-5.1.0`
|
||||||
|
2. Run `npm install` to download and the new dependencies and install locally
|
||||||
|
3. Run `npm run build` to regenerate the distribution
|
||||||
|
4. Push the changes to the dependabot branch
|
||||||
|
5. If/when the checks pass, you can merge the dependabot PR
|
15
README.md
15
README.md
@@ -306,6 +306,21 @@ Each build is different, and some builds produce more Gradle User Home content t
|
|||||||
[Cache debugging ](#cache-debugging-and-analysis) can provide insight into which cache entries are the largest,
|
[Cache debugging ](#cache-debugging-and-analysis) can provide insight into which cache entries are the largest,
|
||||||
and you can selectively [exclude content using `gradle-home-cache-exclude`](#gradle-user-home-cache-tuning).
|
and you can selectively [exclude content using `gradle-home-cache-exclude`](#gradle-user-home-cache-tuning).
|
||||||
|
|
||||||
|
#### Removing unused files from Gradle User Home before saving to cache
|
||||||
|
|
||||||
|
The Gradle User Home directory has a tendency to grow over time. When you switch to a new Gradle wrapper version or upgrade a dependency version
|
||||||
|
the old files are not automatically and immediately removed. While this can make sense in a local environment, in a GitHub Actions environment
|
||||||
|
it can lead to ever-larger Gradle User Home cache entries being saved and restored.
|
||||||
|
|
||||||
|
In order to avoid this situation, the `gradle-build-action` supports the `gradle-home-cache-cleanup` parameter.
|
||||||
|
When enabled, this feature will attempt to delete any files in the Gradle User Home that were not used by Gradle during the GitHub Actions workflow,
|
||||||
|
prior to saving the Gradle User Home to the GitHub Actions cache.
|
||||||
|
|
||||||
|
Gradle Home cache cleanup is disabled by default. You can enable this feature for the action as follows:
|
||||||
|
```yaml
|
||||||
|
gradle-home-cache-cleanup: true
|
||||||
|
```
|
||||||
|
|
||||||
## Saving build outputs
|
## Saving build outputs
|
||||||
|
|
||||||
By default, a GitHub Actions workflow using `gradle-build-action` will record the log output and any Build Scan links for your build,
|
By default, a GitHub Actions workflow using `gradle-build-action` will record the log output and any Build Scan links for your build,
|
||||||
|
567
dist/main/index.js
vendored
567
dist/main/index.js
vendored
@@ -1,4 +1,4 @@
|
|||||||
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ 7799:
|
/***/ 7799:
|
||||||
@@ -2483,7 +2483,6 @@ const file_command_1 = __nccwpck_require__(717);
|
|||||||
const utils_1 = __nccwpck_require__(5278);
|
const utils_1 = __nccwpck_require__(5278);
|
||||||
const os = __importStar(__nccwpck_require__(2037));
|
const os = __importStar(__nccwpck_require__(2037));
|
||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
const uuid_1 = __nccwpck_require__(8974);
|
|
||||||
const oidc_utils_1 = __nccwpck_require__(8041);
|
const oidc_utils_1 = __nccwpck_require__(8041);
|
||||||
/**
|
/**
|
||||||
* The code to exit an action
|
* The code to exit an action
|
||||||
@@ -2513,20 +2512,9 @@ function exportVariable(name, val) {
|
|||||||
process.env[name] = convertedVal;
|
process.env[name] = convertedVal;
|
||||||
const filePath = process.env['GITHUB_ENV'] || '';
|
const filePath = process.env['GITHUB_ENV'] || '';
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
|
return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
|
||||||
// These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
|
|
||||||
if (name.includes(delimiter)) {
|
|
||||||
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
|
|
||||||
}
|
|
||||||
if (convertedVal.includes(delimiter)) {
|
|
||||||
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
|
||||||
}
|
|
||||||
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
|
|
||||||
file_command_1.issueCommand('ENV', commandValue);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
command_1.issueCommand('set-env', { name }, convertedVal);
|
|
||||||
}
|
}
|
||||||
|
command_1.issueCommand('set-env', { name }, convertedVal);
|
||||||
}
|
}
|
||||||
exports.exportVariable = exportVariable;
|
exports.exportVariable = exportVariable;
|
||||||
/**
|
/**
|
||||||
@@ -2544,7 +2532,7 @@ exports.setSecret = setSecret;
|
|||||||
function addPath(inputPath) {
|
function addPath(inputPath) {
|
||||||
const filePath = process.env['GITHUB_PATH'] || '';
|
const filePath = process.env['GITHUB_PATH'] || '';
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
file_command_1.issueCommand('PATH', inputPath);
|
file_command_1.issueFileCommand('PATH', inputPath);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
command_1.issueCommand('add-path', {}, inputPath);
|
command_1.issueCommand('add-path', {}, inputPath);
|
||||||
@@ -2584,7 +2572,10 @@ function getMultilineInput(name, options) {
|
|||||||
const inputs = getInput(name, options)
|
const inputs = getInput(name, options)
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.filter(x => x !== '');
|
.filter(x => x !== '');
|
||||||
return inputs;
|
if (options && options.trimWhitespace === false) {
|
||||||
|
return inputs;
|
||||||
|
}
|
||||||
|
return inputs.map(input => input.trim());
|
||||||
}
|
}
|
||||||
exports.getMultilineInput = getMultilineInput;
|
exports.getMultilineInput = getMultilineInput;
|
||||||
/**
|
/**
|
||||||
@@ -2617,8 +2608,12 @@ exports.getBooleanInput = getBooleanInput;
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function setOutput(name, value) {
|
function setOutput(name, value) {
|
||||||
|
const filePath = process.env['GITHUB_OUTPUT'] || '';
|
||||||
|
if (filePath) {
|
||||||
|
return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
|
||||||
|
}
|
||||||
process.stdout.write(os.EOL);
|
process.stdout.write(os.EOL);
|
||||||
command_1.issueCommand('set-output', { name }, value);
|
command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
|
||||||
}
|
}
|
||||||
exports.setOutput = setOutput;
|
exports.setOutput = setOutput;
|
||||||
/**
|
/**
|
||||||
@@ -2747,7 +2742,11 @@ exports.group = group;
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function saveState(name, value) {
|
function saveState(name, value) {
|
||||||
command_1.issueCommand('save-state', { name }, value);
|
const filePath = process.env['GITHUB_STATE'] || '';
|
||||||
|
if (filePath) {
|
||||||
|
return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
|
||||||
|
}
|
||||||
|
command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
|
||||||
}
|
}
|
||||||
exports.saveState = saveState;
|
exports.saveState = saveState;
|
||||||
/**
|
/**
|
||||||
@@ -2813,13 +2812,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.issueCommand = void 0;
|
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
|
||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
const fs = __importStar(__nccwpck_require__(7147));
|
const fs = __importStar(__nccwpck_require__(7147));
|
||||||
const os = __importStar(__nccwpck_require__(2037));
|
const os = __importStar(__nccwpck_require__(2037));
|
||||||
|
const uuid_1 = __nccwpck_require__(8974);
|
||||||
const utils_1 = __nccwpck_require__(5278);
|
const utils_1 = __nccwpck_require__(5278);
|
||||||
function issueCommand(command, message) {
|
function issueFileCommand(command, message) {
|
||||||
const filePath = process.env[`GITHUB_${command}`];
|
const filePath = process.env[`GITHUB_${command}`];
|
||||||
if (!filePath) {
|
if (!filePath) {
|
||||||
throw new Error(`Unable to find environment variable for file command ${command}`);
|
throw new Error(`Unable to find environment variable for file command ${command}`);
|
||||||
@@ -2831,7 +2831,22 @@ function issueCommand(command, message) {
|
|||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.issueCommand = issueCommand;
|
exports.issueFileCommand = issueFileCommand;
|
||||||
|
function prepareKeyValueMessage(key, value) {
|
||||||
|
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
|
||||||
|
const convertedValue = utils_1.toCommandValue(value);
|
||||||
|
// These should realistically never happen, but just in case someone finds a
|
||||||
|
// way to exploit uuid generation let's not allow keys or values that contain
|
||||||
|
// the delimiter.
|
||||||
|
if (key.includes(delimiter)) {
|
||||||
|
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
|
||||||
|
}
|
||||||
|
if (convertedValue.includes(delimiter)) {
|
||||||
|
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
||||||
|
}
|
||||||
|
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
|
||||||
|
}
|
||||||
|
exports.prepareKeyValueMessage = prepareKeyValueMessage;
|
||||||
//# sourceMappingURL=file-command.js.map
|
//# sourceMappingURL=file-command.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -4799,8 +4814,9 @@ exports.context = new Context.Context();
|
|||||||
* @param token the repo PAT or GITHUB_TOKEN
|
* @param token the repo PAT or GITHUB_TOKEN
|
||||||
* @param options other options to set
|
* @param options other options to set
|
||||||
*/
|
*/
|
||||||
function getOctokit(token, options) {
|
function getOctokit(token, options, ...additionalPlugins) {
|
||||||
return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));
|
const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);
|
||||||
|
return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options));
|
||||||
}
|
}
|
||||||
exports.getOctokit = getOctokit;
|
exports.getOctokit = getOctokit;
|
||||||
//# sourceMappingURL=github.js.map
|
//# sourceMappingURL=github.js.map
|
||||||
@@ -4882,7 +4898,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.getOctokitOptions = exports.GitHub = exports.context = void 0;
|
exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;
|
||||||
const Context = __importStar(__nccwpck_require__(4087));
|
const Context = __importStar(__nccwpck_require__(4087));
|
||||||
const Utils = __importStar(__nccwpck_require__(7914));
|
const Utils = __importStar(__nccwpck_require__(7914));
|
||||||
// octokit + plugins
|
// octokit + plugins
|
||||||
@@ -4891,13 +4907,13 @@ const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044);
|
|||||||
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
|
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
|
||||||
exports.context = new Context.Context();
|
exports.context = new Context.Context();
|
||||||
const baseUrl = Utils.getApiBaseUrl();
|
const baseUrl = Utils.getApiBaseUrl();
|
||||||
const defaults = {
|
exports.defaults = {
|
||||||
baseUrl,
|
baseUrl,
|
||||||
request: {
|
request: {
|
||||||
agent: Utils.getProxyAgent(baseUrl)
|
agent: Utils.getProxyAgent(baseUrl)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults);
|
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);
|
||||||
/**
|
/**
|
||||||
* Convience function to correctly format Octokit Options to pass into the constructor.
|
* Convience function to correctly format Octokit Options to pass into the constructor.
|
||||||
*
|
*
|
||||||
@@ -8304,19 +8320,18 @@ function _unique(values) {
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 2557:
|
/***/ 2557:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
|
||||||
var tslib = __nccwpck_require__(9268);
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
var listenersMap = new WeakMap();
|
/// <reference path="../shims-public.d.ts" />
|
||||||
var abortedMap = new WeakMap();
|
const listenersMap = new WeakMap();
|
||||||
|
const abortedMap = new WeakMap();
|
||||||
/**
|
/**
|
||||||
* An aborter instance implements AbortSignal interface, can abort HTTP requests.
|
* An aborter instance implements AbortSignal interface, can abort HTTP requests.
|
||||||
*
|
*
|
||||||
@@ -8330,8 +8345,8 @@ var abortedMap = new WeakMap();
|
|||||||
* await doAsyncWork(AbortSignal.none);
|
* await doAsyncWork(AbortSignal.none);
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
var AbortSignal = /** @class */ (function () {
|
class AbortSignal {
|
||||||
function AbortSignal() {
|
constructor() {
|
||||||
/**
|
/**
|
||||||
* onabort event listener.
|
* onabort event listener.
|
||||||
*/
|
*/
|
||||||
@@ -8339,74 +8354,65 @@ var AbortSignal = /** @class */ (function () {
|
|||||||
listenersMap.set(this, []);
|
listenersMap.set(this, []);
|
||||||
abortedMap.set(this, false);
|
abortedMap.set(this, false);
|
||||||
}
|
}
|
||||||
Object.defineProperty(AbortSignal.prototype, "aborted", {
|
/**
|
||||||
/**
|
* Status of whether aborted or not.
|
||||||
* Status of whether aborted or not.
|
*
|
||||||
*
|
* @readonly
|
||||||
* @readonly
|
*/
|
||||||
*/
|
get aborted() {
|
||||||
get: function () {
|
if (!abortedMap.has(this)) {
|
||||||
if (!abortedMap.has(this)) {
|
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
||||||
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
}
|
||||||
}
|
return abortedMap.get(this);
|
||||||
return abortedMap.get(this);
|
}
|
||||||
},
|
/**
|
||||||
enumerable: false,
|
* Creates a new AbortSignal instance that will never be aborted.
|
||||||
configurable: true
|
*
|
||||||
});
|
* @readonly
|
||||||
Object.defineProperty(AbortSignal, "none", {
|
*/
|
||||||
/**
|
static get none() {
|
||||||
* Creates a new AbortSignal instance that will never be aborted.
|
return new AbortSignal();
|
||||||
*
|
}
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
get: function () {
|
|
||||||
return new AbortSignal();
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
/**
|
/**
|
||||||
* Added new "abort" event listener, only support "abort" event.
|
* Added new "abort" event listener, only support "abort" event.
|
||||||
*
|
*
|
||||||
* @param _type - Only support "abort" event
|
* @param _type - Only support "abort" event
|
||||||
* @param listener - The listener to be added
|
* @param listener - The listener to be added
|
||||||
*/
|
*/
|
||||||
AbortSignal.prototype.addEventListener = function (
|
addEventListener(
|
||||||
// tslint:disable-next-line:variable-name
|
// tslint:disable-next-line:variable-name
|
||||||
_type, listener) {
|
_type, listener) {
|
||||||
if (!listenersMap.has(this)) {
|
if (!listenersMap.has(this)) {
|
||||||
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
||||||
}
|
}
|
||||||
var listeners = listenersMap.get(this);
|
const listeners = listenersMap.get(this);
|
||||||
listeners.push(listener);
|
listeners.push(listener);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* Remove "abort" event listener, only support "abort" event.
|
* Remove "abort" event listener, only support "abort" event.
|
||||||
*
|
*
|
||||||
* @param _type - Only support "abort" event
|
* @param _type - Only support "abort" event
|
||||||
* @param listener - The listener to be removed
|
* @param listener - The listener to be removed
|
||||||
*/
|
*/
|
||||||
AbortSignal.prototype.removeEventListener = function (
|
removeEventListener(
|
||||||
// tslint:disable-next-line:variable-name
|
// tslint:disable-next-line:variable-name
|
||||||
_type, listener) {
|
_type, listener) {
|
||||||
if (!listenersMap.has(this)) {
|
if (!listenersMap.has(this)) {
|
||||||
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
||||||
}
|
}
|
||||||
var listeners = listenersMap.get(this);
|
const listeners = listenersMap.get(this);
|
||||||
var index = listeners.indexOf(listener);
|
const index = listeners.indexOf(listener);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
listeners.splice(index, 1);
|
listeners.splice(index, 1);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* Dispatches a synthetic event to the AbortSignal.
|
* Dispatches a synthetic event to the AbortSignal.
|
||||||
*/
|
*/
|
||||||
AbortSignal.prototype.dispatchEvent = function (_event) {
|
dispatchEvent(_event) {
|
||||||
throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.");
|
throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.");
|
||||||
};
|
}
|
||||||
return AbortSignal;
|
}
|
||||||
}());
|
|
||||||
/**
|
/**
|
||||||
* Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.
|
* Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.
|
||||||
* Will try to trigger abort event for all linked AbortSignal nodes.
|
* Will try to trigger abort event for all linked AbortSignal nodes.
|
||||||
@@ -8424,12 +8430,12 @@ function abortSignal(signal) {
|
|||||||
if (signal.onabort) {
|
if (signal.onabort) {
|
||||||
signal.onabort.call(signal);
|
signal.onabort.call(signal);
|
||||||
}
|
}
|
||||||
var listeners = listenersMap.get(signal);
|
const listeners = listenersMap.get(signal);
|
||||||
if (listeners) {
|
if (listeners) {
|
||||||
// Create a copy of listeners so mutations to the array
|
// Create a copy of listeners so mutations to the array
|
||||||
// (e.g. via removeListener calls) don't affect the listeners
|
// (e.g. via removeListener calls) don't affect the listeners
|
||||||
// we invoke.
|
// we invoke.
|
||||||
listeners.slice().forEach(function (listener) {
|
listeners.slice().forEach((listener) => {
|
||||||
listener.call(signal, { type: "abort" });
|
listener.call(signal, { type: "abort" });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -8455,15 +8461,12 @@ function abortSignal(signal) {
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
var AbortError = /** @class */ (function (_super) {
|
class AbortError extends Error {
|
||||||
tslib.__extends(AbortError, _super);
|
constructor(message) {
|
||||||
function AbortError(message) {
|
super(message);
|
||||||
var _this = _super.call(this, message) || this;
|
this.name = "AbortError";
|
||||||
_this.name = "AbortError";
|
|
||||||
return _this;
|
|
||||||
}
|
}
|
||||||
return AbortError;
|
}
|
||||||
}(Error));
|
|
||||||
/**
|
/**
|
||||||
* An AbortController provides an AbortSignal and the associated controls to signal
|
* An AbortController provides an AbortSignal and the associated controls to signal
|
||||||
* that an asynchronous operation should be aborted.
|
* that an asynchronous operation should be aborted.
|
||||||
@@ -8498,10 +8501,9 @@ var AbortError = /** @class */ (function (_super) {
|
|||||||
* await doAsyncWork(aborter.withTimeout(25 * 1000));
|
* await doAsyncWork(aborter.withTimeout(25 * 1000));
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
var AbortController = /** @class */ (function () {
|
class AbortController {
|
||||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||||
function AbortController(parentSignals) {
|
constructor(parentSignals) {
|
||||||
var _this = this;
|
|
||||||
this._signal = new AbortSignal();
|
this._signal = new AbortSignal();
|
||||||
if (!parentSignals) {
|
if (!parentSignals) {
|
||||||
return;
|
return;
|
||||||
@@ -8511,8 +8513,7 @@ var AbortController = /** @class */ (function () {
|
|||||||
// eslint-disable-next-line prefer-rest-params
|
// eslint-disable-next-line prefer-rest-params
|
||||||
parentSignals = arguments;
|
parentSignals = arguments;
|
||||||
}
|
}
|
||||||
for (var _i = 0, parentSignals_1 = parentSignals; _i < parentSignals_1.length; _i++) {
|
for (const parentSignal of parentSignals) {
|
||||||
var parentSignal = parentSignals_1[_i];
|
|
||||||
// if the parent signal has already had abort() called,
|
// if the parent signal has already had abort() called,
|
||||||
// then call abort on this signal as well.
|
// then call abort on this signal as well.
|
||||||
if (parentSignal.aborted) {
|
if (parentSignal.aborted) {
|
||||||
@@ -8520,47 +8521,42 @@ var AbortController = /** @class */ (function () {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// when the parent signal aborts, this signal should as well.
|
// when the parent signal aborts, this signal should as well.
|
||||||
parentSignal.addEventListener("abort", function () {
|
parentSignal.addEventListener("abort", () => {
|
||||||
_this.abort();
|
this.abort();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object.defineProperty(AbortController.prototype, "signal", {
|
/**
|
||||||
/**
|
* The AbortSignal associated with this controller that will signal aborted
|
||||||
* The AbortSignal associated with this controller that will signal aborted
|
* when the abort method is called on this controller.
|
||||||
* when the abort method is called on this controller.
|
*
|
||||||
*
|
* @readonly
|
||||||
* @readonly
|
*/
|
||||||
*/
|
get signal() {
|
||||||
get: function () {
|
return this._signal;
|
||||||
return this._signal;
|
}
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
/**
|
/**
|
||||||
* Signal that any operations passed this controller's associated abort signal
|
* Signal that any operations passed this controller's associated abort signal
|
||||||
* to cancel any remaining work and throw an `AbortError`.
|
* to cancel any remaining work and throw an `AbortError`.
|
||||||
*/
|
*/
|
||||||
AbortController.prototype.abort = function () {
|
abort() {
|
||||||
abortSignal(this._signal);
|
abortSignal(this._signal);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* Creates a new AbortSignal instance that will abort after the provided ms.
|
* Creates a new AbortSignal instance that will abort after the provided ms.
|
||||||
* @param ms - Elapsed time in milliseconds to trigger an abort.
|
* @param ms - Elapsed time in milliseconds to trigger an abort.
|
||||||
*/
|
*/
|
||||||
AbortController.timeout = function (ms) {
|
static timeout(ms) {
|
||||||
var signal = new AbortSignal();
|
const signal = new AbortSignal();
|
||||||
var timer = setTimeout(abortSignal, ms, signal);
|
const timer = setTimeout(abortSignal, ms, signal);
|
||||||
// Prevent the active Timer from keeping the Node.js event loop active.
|
// Prevent the active Timer from keeping the Node.js event loop active.
|
||||||
if (typeof timer.unref === "function") {
|
if (typeof timer.unref === "function") {
|
||||||
timer.unref();
|
timer.unref();
|
||||||
}
|
}
|
||||||
return signal;
|
return signal;
|
||||||
};
|
}
|
||||||
return AbortController;
|
}
|
||||||
}());
|
|
||||||
|
|
||||||
exports.AbortController = AbortController;
|
exports.AbortController = AbortController;
|
||||||
exports.AbortError = AbortError;
|
exports.AbortError = AbortError;
|
||||||
@@ -8568,319 +8564,6 @@ exports.AbortSignal = AbortSignal;
|
|||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 9268:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
||||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
||||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
||||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
||||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
***************************************************************************** */
|
|
||||||
/* global global, define, System, Reflect, Promise */
|
|
||||||
var __extends;
|
|
||||||
var __assign;
|
|
||||||
var __rest;
|
|
||||||
var __decorate;
|
|
||||||
var __param;
|
|
||||||
var __metadata;
|
|
||||||
var __awaiter;
|
|
||||||
var __generator;
|
|
||||||
var __exportStar;
|
|
||||||
var __values;
|
|
||||||
var __read;
|
|
||||||
var __spread;
|
|
||||||
var __spreadArrays;
|
|
||||||
var __spreadArray;
|
|
||||||
var __await;
|
|
||||||
var __asyncGenerator;
|
|
||||||
var __asyncDelegator;
|
|
||||||
var __asyncValues;
|
|
||||||
var __makeTemplateObject;
|
|
||||||
var __importStar;
|
|
||||||
var __importDefault;
|
|
||||||
var __classPrivateFieldGet;
|
|
||||||
var __classPrivateFieldSet;
|
|
||||||
var __createBinding;
|
|
||||||
(function (factory) {
|
|
||||||
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
|
||||||
if (typeof define === "function" && define.amd) {
|
|
||||||
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
|
|
||||||
}
|
|
||||||
else if ( true && typeof module.exports === "object") {
|
|
||||||
factory(createExporter(root, createExporter(module.exports)));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
factory(createExporter(root));
|
|
||||||
}
|
|
||||||
function createExporter(exports, previous) {
|
|
||||||
if (exports !== root) {
|
|
||||||
if (typeof Object.create === "function") {
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
exports.__esModule = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
|
|
||||||
}
|
|
||||||
})
|
|
||||||
(function (exporter) {
|
|
||||||
var extendStatics = Object.setPrototypeOf ||
|
|
||||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
||||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
||||||
|
|
||||||
__extends = function (d, b) {
|
|
||||||
if (typeof b !== "function" && b !== null)
|
|
||||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
||||||
extendStatics(d, b);
|
|
||||||
function __() { this.constructor = d; }
|
|
||||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
||||||
};
|
|
||||||
|
|
||||||
__assign = Object.assign || function (t) {
|
|
||||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
||||||
s = arguments[i];
|
|
||||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
};
|
|
||||||
|
|
||||||
__rest = function (s, e) {
|
|
||||||
var t = {};
|
|
||||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
||||||
t[p] = s[p];
|
|
||||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
||||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
||||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
||||||
t[p[i]] = s[p[i]];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
};
|
|
||||||
|
|
||||||
__decorate = function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
|
|
||||||
__param = function (paramIndex, decorator) {
|
|
||||||
return function (target, key) { decorator(target, key, paramIndex); }
|
|
||||||
};
|
|
||||||
|
|
||||||
__metadata = function (metadataKey, metadataValue) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
||||||
};
|
|
||||||
|
|
||||||
__awaiter = function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
__generator = function (thisArg, body) {
|
|
||||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
||||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
||||||
function step(op) {
|
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
|
||||||
while (_) try {
|
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
||||||
switch (op[0]) {
|
|
||||||
case 0: case 1: t = op; break;
|
|
||||||
case 4: _.label++; return { value: op[1], done: false };
|
|
||||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
||||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
||||||
default:
|
|
||||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
||||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
||||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
||||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
||||||
if (t[2]) _.ops.pop();
|
|
||||||
_.trys.pop(); continue;
|
|
||||||
}
|
|
||||||
op = body.call(thisArg, _);
|
|
||||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
||||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
__exportStar = function(m, o) {
|
|
||||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
||||||
};
|
|
||||||
|
|
||||||
__createBinding = Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
});
|
|
||||||
|
|
||||||
__values = function (o) {
|
|
||||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
||||||
if (m) return m.call(o);
|
|
||||||
if (o && typeof o.length === "number") return {
|
|
||||||
next: function () {
|
|
||||||
if (o && i >= o.length) o = void 0;
|
|
||||||
return { value: o && o[i++], done: !o };
|
|
||||||
}
|
|
||||||
};
|
|
||||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
||||||
};
|
|
||||||
|
|
||||||
__read = function (o, n) {
|
|
||||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
||||||
if (!m) return o;
|
|
||||||
var i = m.call(o), r, ar = [], e;
|
|
||||||
try {
|
|
||||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
||||||
}
|
|
||||||
catch (error) { e = { error: error }; }
|
|
||||||
finally {
|
|
||||||
try {
|
|
||||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
||||||
}
|
|
||||||
finally { if (e) throw e.error; }
|
|
||||||
}
|
|
||||||
return ar;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
__spread = function () {
|
|
||||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
||||||
ar = ar.concat(__read(arguments[i]));
|
|
||||||
return ar;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
__spreadArrays = function () {
|
|
||||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
||||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
||||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
||||||
r[k] = a[j];
|
|
||||||
return r;
|
|
||||||
};
|
|
||||||
|
|
||||||
__spreadArray = function (to, from, pack) {
|
|
||||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
||||||
if (ar || !(i in from)) {
|
|
||||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
||||||
ar[i] = from[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return to.concat(ar || Array.prototype.slice.call(from));
|
|
||||||
};
|
|
||||||
|
|
||||||
__await = function (v) {
|
|
||||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
||||||
};
|
|
||||||
|
|
||||||
__asyncGenerator = function (thisArg, _arguments, generator) {
|
|
||||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
||||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
||||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
||||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
||||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
||||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
||||||
function fulfill(value) { resume("next", value); }
|
|
||||||
function reject(value) { resume("throw", value); }
|
|
||||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
||||||
};
|
|
||||||
|
|
||||||
__asyncDelegator = function (o) {
|
|
||||||
var i, p;
|
|
||||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
||||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
||||||
};
|
|
||||||
|
|
||||||
__asyncValues = function (o) {
|
|
||||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
||||||
var m = o[Symbol.asyncIterator], i;
|
|
||||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
||||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
||||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
||||||
};
|
|
||||||
|
|
||||||
__makeTemplateObject = function (cooked, raw) {
|
|
||||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
||||||
return cooked;
|
|
||||||
};
|
|
||||||
|
|
||||||
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
};
|
|
||||||
|
|
||||||
__importStar = function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
__importDefault = function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
|
|
||||||
__classPrivateFieldGet = function (receiver, state, kind, f) {
|
|
||||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
||||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
||||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
||||||
};
|
|
||||||
|
|
||||||
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
|
|
||||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
||||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
||||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
||||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
||||||
};
|
|
||||||
|
|
||||||
exporter("__extends", __extends);
|
|
||||||
exporter("__assign", __assign);
|
|
||||||
exporter("__rest", __rest);
|
|
||||||
exporter("__decorate", __decorate);
|
|
||||||
exporter("__param", __param);
|
|
||||||
exporter("__metadata", __metadata);
|
|
||||||
exporter("__awaiter", __awaiter);
|
|
||||||
exporter("__generator", __generator);
|
|
||||||
exporter("__exportStar", __exportStar);
|
|
||||||
exporter("__createBinding", __createBinding);
|
|
||||||
exporter("__values", __values);
|
|
||||||
exporter("__read", __read);
|
|
||||||
exporter("__spread", __spread);
|
|
||||||
exporter("__spreadArrays", __spreadArrays);
|
|
||||||
exporter("__spreadArray", __spreadArray);
|
|
||||||
exporter("__await", __await);
|
|
||||||
exporter("__asyncGenerator", __asyncGenerator);
|
|
||||||
exporter("__asyncDelegator", __asyncDelegator);
|
|
||||||
exporter("__asyncValues", __asyncValues);
|
|
||||||
exporter("__makeTemplateObject", __makeTemplateObject);
|
|
||||||
exporter("__importStar", __importStar);
|
|
||||||
exporter("__importDefault", __importDefault);
|
|
||||||
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
|
||||||
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 2356:
|
/***/ 2356:
|
||||||
@@ -19822,7 +19505,7 @@ if (logLevelFromEnv) {
|
|||||||
setLogLevel(logLevelFromEnv);
|
setLogLevel(logLevelFromEnv);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -65860,12 +65543,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
||||||
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||||
|
var m = o[Symbol.asyncIterator], i;
|
||||||
|
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||||
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||||
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||||
|
};
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.CacheCleaner = void 0;
|
exports.CacheCleaner = void 0;
|
||||||
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const exec = __importStar(__nccwpck_require__(1514));
|
const exec = __importStar(__nccwpck_require__(1514));
|
||||||
|
const glob = __importStar(__nccwpck_require__(8090));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
class CacheCleaner {
|
class CacheCleaner {
|
||||||
@@ -65896,12 +65588,35 @@ class CacheCleaner {
|
|||||||
}
|
}
|
||||||
ageAllFiles(fileName = '*') {
|
ageAllFiles(fileName = '*') {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '-d', '1970-01-01', '{}', '+'], {});
|
core.debug(`Aging all files in Gradle User Homee with name ${fileName}`);
|
||||||
|
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date(0));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
touchAllFiles(fileName = '*') {
|
touchAllFiles(fileName = '*') {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '{}', '+'], {});
|
core.debug(`Touching all files in Gradle User Home with name ${fileName}`);
|
||||||
|
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setUtimes(pattern, timestamp) {
|
||||||
|
var e_1, _a;
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const globber = yield glob.create(pattern, {
|
||||||
|
implicitDescendants: false
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
for (var _b = __asyncValues(globber.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
|
||||||
|
const file = _c.value;
|
||||||
|
fs_1.default.utimesSync(file, timestamp, timestamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
||||||
|
}
|
||||||
|
finally { if (e_1) throw e_1.error; }
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/main/sourcemap-register.js
vendored
1
dist/main/sourcemap-register.js
vendored
File diff suppressed because one or more lines are too long
567
dist/post/index.js
vendored
567
dist/post/index.js
vendored
@@ -1,4 +1,4 @@
|
|||||||
require('./sourcemap-register.js');/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
/***/ 7799:
|
/***/ 7799:
|
||||||
@@ -2483,7 +2483,6 @@ const file_command_1 = __nccwpck_require__(717);
|
|||||||
const utils_1 = __nccwpck_require__(5278);
|
const utils_1 = __nccwpck_require__(5278);
|
||||||
const os = __importStar(__nccwpck_require__(2037));
|
const os = __importStar(__nccwpck_require__(2037));
|
||||||
const path = __importStar(__nccwpck_require__(1017));
|
const path = __importStar(__nccwpck_require__(1017));
|
||||||
const uuid_1 = __nccwpck_require__(8974);
|
|
||||||
const oidc_utils_1 = __nccwpck_require__(8041);
|
const oidc_utils_1 = __nccwpck_require__(8041);
|
||||||
/**
|
/**
|
||||||
* The code to exit an action
|
* The code to exit an action
|
||||||
@@ -2513,20 +2512,9 @@ function exportVariable(name, val) {
|
|||||||
process.env[name] = convertedVal;
|
process.env[name] = convertedVal;
|
||||||
const filePath = process.env['GITHUB_ENV'] || '';
|
const filePath = process.env['GITHUB_ENV'] || '';
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
|
return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));
|
||||||
// These should realistically never happen, but just in case someone finds a way to exploit uuid generation let's not allow keys or values that contain the delimiter.
|
|
||||||
if (name.includes(delimiter)) {
|
|
||||||
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
|
|
||||||
}
|
|
||||||
if (convertedVal.includes(delimiter)) {
|
|
||||||
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
|
||||||
}
|
|
||||||
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
|
|
||||||
file_command_1.issueCommand('ENV', commandValue);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
command_1.issueCommand('set-env', { name }, convertedVal);
|
|
||||||
}
|
}
|
||||||
|
command_1.issueCommand('set-env', { name }, convertedVal);
|
||||||
}
|
}
|
||||||
exports.exportVariable = exportVariable;
|
exports.exportVariable = exportVariable;
|
||||||
/**
|
/**
|
||||||
@@ -2544,7 +2532,7 @@ exports.setSecret = setSecret;
|
|||||||
function addPath(inputPath) {
|
function addPath(inputPath) {
|
||||||
const filePath = process.env['GITHUB_PATH'] || '';
|
const filePath = process.env['GITHUB_PATH'] || '';
|
||||||
if (filePath) {
|
if (filePath) {
|
||||||
file_command_1.issueCommand('PATH', inputPath);
|
file_command_1.issueFileCommand('PATH', inputPath);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
command_1.issueCommand('add-path', {}, inputPath);
|
command_1.issueCommand('add-path', {}, inputPath);
|
||||||
@@ -2584,7 +2572,10 @@ function getMultilineInput(name, options) {
|
|||||||
const inputs = getInput(name, options)
|
const inputs = getInput(name, options)
|
||||||
.split('\n')
|
.split('\n')
|
||||||
.filter(x => x !== '');
|
.filter(x => x !== '');
|
||||||
return inputs;
|
if (options && options.trimWhitespace === false) {
|
||||||
|
return inputs;
|
||||||
|
}
|
||||||
|
return inputs.map(input => input.trim());
|
||||||
}
|
}
|
||||||
exports.getMultilineInput = getMultilineInput;
|
exports.getMultilineInput = getMultilineInput;
|
||||||
/**
|
/**
|
||||||
@@ -2617,8 +2608,12 @@ exports.getBooleanInput = getBooleanInput;
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function setOutput(name, value) {
|
function setOutput(name, value) {
|
||||||
|
const filePath = process.env['GITHUB_OUTPUT'] || '';
|
||||||
|
if (filePath) {
|
||||||
|
return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));
|
||||||
|
}
|
||||||
process.stdout.write(os.EOL);
|
process.stdout.write(os.EOL);
|
||||||
command_1.issueCommand('set-output', { name }, value);
|
command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));
|
||||||
}
|
}
|
||||||
exports.setOutput = setOutput;
|
exports.setOutput = setOutput;
|
||||||
/**
|
/**
|
||||||
@@ -2747,7 +2742,11 @@ exports.group = group;
|
|||||||
*/
|
*/
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
function saveState(name, value) {
|
function saveState(name, value) {
|
||||||
command_1.issueCommand('save-state', { name }, value);
|
const filePath = process.env['GITHUB_STATE'] || '';
|
||||||
|
if (filePath) {
|
||||||
|
return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));
|
||||||
|
}
|
||||||
|
command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));
|
||||||
}
|
}
|
||||||
exports.saveState = saveState;
|
exports.saveState = saveState;
|
||||||
/**
|
/**
|
||||||
@@ -2813,13 +2812,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.issueCommand = void 0;
|
exports.prepareKeyValueMessage = exports.issueFileCommand = void 0;
|
||||||
// We use any as a valid input type
|
// We use any as a valid input type
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
const fs = __importStar(__nccwpck_require__(7147));
|
const fs = __importStar(__nccwpck_require__(7147));
|
||||||
const os = __importStar(__nccwpck_require__(2037));
|
const os = __importStar(__nccwpck_require__(2037));
|
||||||
|
const uuid_1 = __nccwpck_require__(8974);
|
||||||
const utils_1 = __nccwpck_require__(5278);
|
const utils_1 = __nccwpck_require__(5278);
|
||||||
function issueCommand(command, message) {
|
function issueFileCommand(command, message) {
|
||||||
const filePath = process.env[`GITHUB_${command}`];
|
const filePath = process.env[`GITHUB_${command}`];
|
||||||
if (!filePath) {
|
if (!filePath) {
|
||||||
throw new Error(`Unable to find environment variable for file command ${command}`);
|
throw new Error(`Unable to find environment variable for file command ${command}`);
|
||||||
@@ -2831,7 +2831,22 @@ function issueCommand(command, message) {
|
|||||||
encoding: 'utf8'
|
encoding: 'utf8'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.issueCommand = issueCommand;
|
exports.issueFileCommand = issueFileCommand;
|
||||||
|
function prepareKeyValueMessage(key, value) {
|
||||||
|
const delimiter = `ghadelimiter_${uuid_1.v4()}`;
|
||||||
|
const convertedValue = utils_1.toCommandValue(value);
|
||||||
|
// These should realistically never happen, but just in case someone finds a
|
||||||
|
// way to exploit uuid generation let's not allow keys or values that contain
|
||||||
|
// the delimiter.
|
||||||
|
if (key.includes(delimiter)) {
|
||||||
|
throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`);
|
||||||
|
}
|
||||||
|
if (convertedValue.includes(delimiter)) {
|
||||||
|
throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`);
|
||||||
|
}
|
||||||
|
return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;
|
||||||
|
}
|
||||||
|
exports.prepareKeyValueMessage = prepareKeyValueMessage;
|
||||||
//# sourceMappingURL=file-command.js.map
|
//# sourceMappingURL=file-command.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -4799,8 +4814,9 @@ exports.context = new Context.Context();
|
|||||||
* @param token the repo PAT or GITHUB_TOKEN
|
* @param token the repo PAT or GITHUB_TOKEN
|
||||||
* @param options other options to set
|
* @param options other options to set
|
||||||
*/
|
*/
|
||||||
function getOctokit(token, options) {
|
function getOctokit(token, options, ...additionalPlugins) {
|
||||||
return new utils_1.GitHub(utils_1.getOctokitOptions(token, options));
|
const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins);
|
||||||
|
return new GitHubWithPlugins(utils_1.getOctokitOptions(token, options));
|
||||||
}
|
}
|
||||||
exports.getOctokit = getOctokit;
|
exports.getOctokit = getOctokit;
|
||||||
//# sourceMappingURL=github.js.map
|
//# sourceMappingURL=github.js.map
|
||||||
@@ -4882,7 +4898,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.getOctokitOptions = exports.GitHub = exports.context = void 0;
|
exports.getOctokitOptions = exports.GitHub = exports.defaults = exports.context = void 0;
|
||||||
const Context = __importStar(__nccwpck_require__(4087));
|
const Context = __importStar(__nccwpck_require__(4087));
|
||||||
const Utils = __importStar(__nccwpck_require__(7914));
|
const Utils = __importStar(__nccwpck_require__(7914));
|
||||||
// octokit + plugins
|
// octokit + plugins
|
||||||
@@ -4891,13 +4907,13 @@ const plugin_rest_endpoint_methods_1 = __nccwpck_require__(3044);
|
|||||||
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
|
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
|
||||||
exports.context = new Context.Context();
|
exports.context = new Context.Context();
|
||||||
const baseUrl = Utils.getApiBaseUrl();
|
const baseUrl = Utils.getApiBaseUrl();
|
||||||
const defaults = {
|
exports.defaults = {
|
||||||
baseUrl,
|
baseUrl,
|
||||||
request: {
|
request: {
|
||||||
agent: Utils.getProxyAgent(baseUrl)
|
agent: Utils.getProxyAgent(baseUrl)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(defaults);
|
exports.GitHub = core_1.Octokit.plugin(plugin_rest_endpoint_methods_1.restEndpointMethods, plugin_paginate_rest_1.paginateRest).defaults(exports.defaults);
|
||||||
/**
|
/**
|
||||||
* Convience function to correctly format Octokit Options to pass into the constructor.
|
* Convience function to correctly format Octokit Options to pass into the constructor.
|
||||||
*
|
*
|
||||||
@@ -7407,19 +7423,18 @@ function copyFile(srcFile, destFile, force) {
|
|||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 2557:
|
/***/ 2557:
|
||||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
/***/ ((__unused_webpack_module, exports) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
|
|
||||||
var tslib = __nccwpck_require__(9268);
|
|
||||||
|
|
||||||
// Copyright (c) Microsoft Corporation.
|
// Copyright (c) Microsoft Corporation.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
var listenersMap = new WeakMap();
|
/// <reference path="../shims-public.d.ts" />
|
||||||
var abortedMap = new WeakMap();
|
const listenersMap = new WeakMap();
|
||||||
|
const abortedMap = new WeakMap();
|
||||||
/**
|
/**
|
||||||
* An aborter instance implements AbortSignal interface, can abort HTTP requests.
|
* An aborter instance implements AbortSignal interface, can abort HTTP requests.
|
||||||
*
|
*
|
||||||
@@ -7433,8 +7448,8 @@ var abortedMap = new WeakMap();
|
|||||||
* await doAsyncWork(AbortSignal.none);
|
* await doAsyncWork(AbortSignal.none);
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
var AbortSignal = /** @class */ (function () {
|
class AbortSignal {
|
||||||
function AbortSignal() {
|
constructor() {
|
||||||
/**
|
/**
|
||||||
* onabort event listener.
|
* onabort event listener.
|
||||||
*/
|
*/
|
||||||
@@ -7442,74 +7457,65 @@ var AbortSignal = /** @class */ (function () {
|
|||||||
listenersMap.set(this, []);
|
listenersMap.set(this, []);
|
||||||
abortedMap.set(this, false);
|
abortedMap.set(this, false);
|
||||||
}
|
}
|
||||||
Object.defineProperty(AbortSignal.prototype, "aborted", {
|
/**
|
||||||
/**
|
* Status of whether aborted or not.
|
||||||
* Status of whether aborted or not.
|
*
|
||||||
*
|
* @readonly
|
||||||
* @readonly
|
*/
|
||||||
*/
|
get aborted() {
|
||||||
get: function () {
|
if (!abortedMap.has(this)) {
|
||||||
if (!abortedMap.has(this)) {
|
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
||||||
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
}
|
||||||
}
|
return abortedMap.get(this);
|
||||||
return abortedMap.get(this);
|
}
|
||||||
},
|
/**
|
||||||
enumerable: false,
|
* Creates a new AbortSignal instance that will never be aborted.
|
||||||
configurable: true
|
*
|
||||||
});
|
* @readonly
|
||||||
Object.defineProperty(AbortSignal, "none", {
|
*/
|
||||||
/**
|
static get none() {
|
||||||
* Creates a new AbortSignal instance that will never be aborted.
|
return new AbortSignal();
|
||||||
*
|
}
|
||||||
* @readonly
|
|
||||||
*/
|
|
||||||
get: function () {
|
|
||||||
return new AbortSignal();
|
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
/**
|
/**
|
||||||
* Added new "abort" event listener, only support "abort" event.
|
* Added new "abort" event listener, only support "abort" event.
|
||||||
*
|
*
|
||||||
* @param _type - Only support "abort" event
|
* @param _type - Only support "abort" event
|
||||||
* @param listener - The listener to be added
|
* @param listener - The listener to be added
|
||||||
*/
|
*/
|
||||||
AbortSignal.prototype.addEventListener = function (
|
addEventListener(
|
||||||
// tslint:disable-next-line:variable-name
|
// tslint:disable-next-line:variable-name
|
||||||
_type, listener) {
|
_type, listener) {
|
||||||
if (!listenersMap.has(this)) {
|
if (!listenersMap.has(this)) {
|
||||||
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
||||||
}
|
}
|
||||||
var listeners = listenersMap.get(this);
|
const listeners = listenersMap.get(this);
|
||||||
listeners.push(listener);
|
listeners.push(listener);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* Remove "abort" event listener, only support "abort" event.
|
* Remove "abort" event listener, only support "abort" event.
|
||||||
*
|
*
|
||||||
* @param _type - Only support "abort" event
|
* @param _type - Only support "abort" event
|
||||||
* @param listener - The listener to be removed
|
* @param listener - The listener to be removed
|
||||||
*/
|
*/
|
||||||
AbortSignal.prototype.removeEventListener = function (
|
removeEventListener(
|
||||||
// tslint:disable-next-line:variable-name
|
// tslint:disable-next-line:variable-name
|
||||||
_type, listener) {
|
_type, listener) {
|
||||||
if (!listenersMap.has(this)) {
|
if (!listenersMap.has(this)) {
|
||||||
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
throw new TypeError("Expected `this` to be an instance of AbortSignal.");
|
||||||
}
|
}
|
||||||
var listeners = listenersMap.get(this);
|
const listeners = listenersMap.get(this);
|
||||||
var index = listeners.indexOf(listener);
|
const index = listeners.indexOf(listener);
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
listeners.splice(index, 1);
|
listeners.splice(index, 1);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* Dispatches a synthetic event to the AbortSignal.
|
* Dispatches a synthetic event to the AbortSignal.
|
||||||
*/
|
*/
|
||||||
AbortSignal.prototype.dispatchEvent = function (_event) {
|
dispatchEvent(_event) {
|
||||||
throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.");
|
throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.");
|
||||||
};
|
}
|
||||||
return AbortSignal;
|
}
|
||||||
}());
|
|
||||||
/**
|
/**
|
||||||
* Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.
|
* Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.
|
||||||
* Will try to trigger abort event for all linked AbortSignal nodes.
|
* Will try to trigger abort event for all linked AbortSignal nodes.
|
||||||
@@ -7527,12 +7533,12 @@ function abortSignal(signal) {
|
|||||||
if (signal.onabort) {
|
if (signal.onabort) {
|
||||||
signal.onabort.call(signal);
|
signal.onabort.call(signal);
|
||||||
}
|
}
|
||||||
var listeners = listenersMap.get(signal);
|
const listeners = listenersMap.get(signal);
|
||||||
if (listeners) {
|
if (listeners) {
|
||||||
// Create a copy of listeners so mutations to the array
|
// Create a copy of listeners so mutations to the array
|
||||||
// (e.g. via removeListener calls) don't affect the listeners
|
// (e.g. via removeListener calls) don't affect the listeners
|
||||||
// we invoke.
|
// we invoke.
|
||||||
listeners.slice().forEach(function (listener) {
|
listeners.slice().forEach((listener) => {
|
||||||
listener.call(signal, { type: "abort" });
|
listener.call(signal, { type: "abort" });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -7558,15 +7564,12 @@ function abortSignal(signal) {
|
|||||||
* }
|
* }
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
var AbortError = /** @class */ (function (_super) {
|
class AbortError extends Error {
|
||||||
tslib.__extends(AbortError, _super);
|
constructor(message) {
|
||||||
function AbortError(message) {
|
super(message);
|
||||||
var _this = _super.call(this, message) || this;
|
this.name = "AbortError";
|
||||||
_this.name = "AbortError";
|
|
||||||
return _this;
|
|
||||||
}
|
}
|
||||||
return AbortError;
|
}
|
||||||
}(Error));
|
|
||||||
/**
|
/**
|
||||||
* An AbortController provides an AbortSignal and the associated controls to signal
|
* An AbortController provides an AbortSignal and the associated controls to signal
|
||||||
* that an asynchronous operation should be aborted.
|
* that an asynchronous operation should be aborted.
|
||||||
@@ -7601,10 +7604,9 @@ var AbortError = /** @class */ (function (_super) {
|
|||||||
* await doAsyncWork(aborter.withTimeout(25 * 1000));
|
* await doAsyncWork(aborter.withTimeout(25 * 1000));
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
var AbortController = /** @class */ (function () {
|
class AbortController {
|
||||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||||
function AbortController(parentSignals) {
|
constructor(parentSignals) {
|
||||||
var _this = this;
|
|
||||||
this._signal = new AbortSignal();
|
this._signal = new AbortSignal();
|
||||||
if (!parentSignals) {
|
if (!parentSignals) {
|
||||||
return;
|
return;
|
||||||
@@ -7614,8 +7616,7 @@ var AbortController = /** @class */ (function () {
|
|||||||
// eslint-disable-next-line prefer-rest-params
|
// eslint-disable-next-line prefer-rest-params
|
||||||
parentSignals = arguments;
|
parentSignals = arguments;
|
||||||
}
|
}
|
||||||
for (var _i = 0, parentSignals_1 = parentSignals; _i < parentSignals_1.length; _i++) {
|
for (const parentSignal of parentSignals) {
|
||||||
var parentSignal = parentSignals_1[_i];
|
|
||||||
// if the parent signal has already had abort() called,
|
// if the parent signal has already had abort() called,
|
||||||
// then call abort on this signal as well.
|
// then call abort on this signal as well.
|
||||||
if (parentSignal.aborted) {
|
if (parentSignal.aborted) {
|
||||||
@@ -7623,47 +7624,42 @@ var AbortController = /** @class */ (function () {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// when the parent signal aborts, this signal should as well.
|
// when the parent signal aborts, this signal should as well.
|
||||||
parentSignal.addEventListener("abort", function () {
|
parentSignal.addEventListener("abort", () => {
|
||||||
_this.abort();
|
this.abort();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object.defineProperty(AbortController.prototype, "signal", {
|
/**
|
||||||
/**
|
* The AbortSignal associated with this controller that will signal aborted
|
||||||
* The AbortSignal associated with this controller that will signal aborted
|
* when the abort method is called on this controller.
|
||||||
* when the abort method is called on this controller.
|
*
|
||||||
*
|
* @readonly
|
||||||
* @readonly
|
*/
|
||||||
*/
|
get signal() {
|
||||||
get: function () {
|
return this._signal;
|
||||||
return this._signal;
|
}
|
||||||
},
|
|
||||||
enumerable: false,
|
|
||||||
configurable: true
|
|
||||||
});
|
|
||||||
/**
|
/**
|
||||||
* Signal that any operations passed this controller's associated abort signal
|
* Signal that any operations passed this controller's associated abort signal
|
||||||
* to cancel any remaining work and throw an `AbortError`.
|
* to cancel any remaining work and throw an `AbortError`.
|
||||||
*/
|
*/
|
||||||
AbortController.prototype.abort = function () {
|
abort() {
|
||||||
abortSignal(this._signal);
|
abortSignal(this._signal);
|
||||||
};
|
}
|
||||||
/**
|
/**
|
||||||
* Creates a new AbortSignal instance that will abort after the provided ms.
|
* Creates a new AbortSignal instance that will abort after the provided ms.
|
||||||
* @param ms - Elapsed time in milliseconds to trigger an abort.
|
* @param ms - Elapsed time in milliseconds to trigger an abort.
|
||||||
*/
|
*/
|
||||||
AbortController.timeout = function (ms) {
|
static timeout(ms) {
|
||||||
var signal = new AbortSignal();
|
const signal = new AbortSignal();
|
||||||
var timer = setTimeout(abortSignal, ms, signal);
|
const timer = setTimeout(abortSignal, ms, signal);
|
||||||
// Prevent the active Timer from keeping the Node.js event loop active.
|
// Prevent the active Timer from keeping the Node.js event loop active.
|
||||||
if (typeof timer.unref === "function") {
|
if (typeof timer.unref === "function") {
|
||||||
timer.unref();
|
timer.unref();
|
||||||
}
|
}
|
||||||
return signal;
|
return signal;
|
||||||
};
|
}
|
||||||
return AbortController;
|
}
|
||||||
}());
|
|
||||||
|
|
||||||
exports.AbortController = AbortController;
|
exports.AbortController = AbortController;
|
||||||
exports.AbortError = AbortError;
|
exports.AbortError = AbortError;
|
||||||
@@ -7671,319 +7667,6 @@ exports.AbortSignal = AbortSignal;
|
|||||||
//# sourceMappingURL=index.js.map
|
//# sourceMappingURL=index.js.map
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 9268:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation.
|
|
||||||
|
|
||||||
Permission to use, copy, modify, and/or distribute this software for any
|
|
||||||
purpose with or without fee is hereby granted.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
||||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
||||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
||||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
||||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
||||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
||||||
PERFORMANCE OF THIS SOFTWARE.
|
|
||||||
***************************************************************************** */
|
|
||||||
/* global global, define, System, Reflect, Promise */
|
|
||||||
var __extends;
|
|
||||||
var __assign;
|
|
||||||
var __rest;
|
|
||||||
var __decorate;
|
|
||||||
var __param;
|
|
||||||
var __metadata;
|
|
||||||
var __awaiter;
|
|
||||||
var __generator;
|
|
||||||
var __exportStar;
|
|
||||||
var __values;
|
|
||||||
var __read;
|
|
||||||
var __spread;
|
|
||||||
var __spreadArrays;
|
|
||||||
var __spreadArray;
|
|
||||||
var __await;
|
|
||||||
var __asyncGenerator;
|
|
||||||
var __asyncDelegator;
|
|
||||||
var __asyncValues;
|
|
||||||
var __makeTemplateObject;
|
|
||||||
var __importStar;
|
|
||||||
var __importDefault;
|
|
||||||
var __classPrivateFieldGet;
|
|
||||||
var __classPrivateFieldSet;
|
|
||||||
var __createBinding;
|
|
||||||
(function (factory) {
|
|
||||||
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
|
||||||
if (typeof define === "function" && define.amd) {
|
|
||||||
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
|
|
||||||
}
|
|
||||||
else if ( true && typeof module.exports === "object") {
|
|
||||||
factory(createExporter(root, createExporter(module.exports)));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
factory(createExporter(root));
|
|
||||||
}
|
|
||||||
function createExporter(exports, previous) {
|
|
||||||
if (exports !== root) {
|
|
||||||
if (typeof Object.create === "function") {
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
exports.__esModule = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
|
|
||||||
}
|
|
||||||
})
|
|
||||||
(function (exporter) {
|
|
||||||
var extendStatics = Object.setPrototypeOf ||
|
|
||||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
||||||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
||||||
|
|
||||||
__extends = function (d, b) {
|
|
||||||
if (typeof b !== "function" && b !== null)
|
|
||||||
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
||||||
extendStatics(d, b);
|
|
||||||
function __() { this.constructor = d; }
|
|
||||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
||||||
};
|
|
||||||
|
|
||||||
__assign = Object.assign || function (t) {
|
|
||||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
||||||
s = arguments[i];
|
|
||||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
};
|
|
||||||
|
|
||||||
__rest = function (s, e) {
|
|
||||||
var t = {};
|
|
||||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
||||||
t[p] = s[p];
|
|
||||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
||||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
||||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
||||||
t[p[i]] = s[p[i]];
|
|
||||||
}
|
|
||||||
return t;
|
|
||||||
};
|
|
||||||
|
|
||||||
__decorate = function (decorators, target, key, desc) {
|
|
||||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
||||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
||||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
||||||
};
|
|
||||||
|
|
||||||
__param = function (paramIndex, decorator) {
|
|
||||||
return function (target, key) { decorator(target, key, paramIndex); }
|
|
||||||
};
|
|
||||||
|
|
||||||
__metadata = function (metadataKey, metadataValue) {
|
|
||||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
||||||
};
|
|
||||||
|
|
||||||
__awaiter = function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
__generator = function (thisArg, body) {
|
|
||||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
||||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
||||||
function step(op) {
|
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
|
||||||
while (_) try {
|
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
||||||
switch (op[0]) {
|
|
||||||
case 0: case 1: t = op; break;
|
|
||||||
case 4: _.label++; return { value: op[1], done: false };
|
|
||||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
||||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
||||||
default:
|
|
||||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
||||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
||||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
||||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
||||||
if (t[2]) _.ops.pop();
|
|
||||||
_.trys.pop(); continue;
|
|
||||||
}
|
|
||||||
op = body.call(thisArg, _);
|
|
||||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
||||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
__exportStar = function(m, o) {
|
|
||||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);
|
|
||||||
};
|
|
||||||
|
|
||||||
__createBinding = Object.create ? (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
||||||
}) : (function(o, m, k, k2) {
|
|
||||||
if (k2 === undefined) k2 = k;
|
|
||||||
o[k2] = m[k];
|
|
||||||
});
|
|
||||||
|
|
||||||
__values = function (o) {
|
|
||||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
||||||
if (m) return m.call(o);
|
|
||||||
if (o && typeof o.length === "number") return {
|
|
||||||
next: function () {
|
|
||||||
if (o && i >= o.length) o = void 0;
|
|
||||||
return { value: o && o[i++], done: !o };
|
|
||||||
}
|
|
||||||
};
|
|
||||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
||||||
};
|
|
||||||
|
|
||||||
__read = function (o, n) {
|
|
||||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
||||||
if (!m) return o;
|
|
||||||
var i = m.call(o), r, ar = [], e;
|
|
||||||
try {
|
|
||||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
||||||
}
|
|
||||||
catch (error) { e = { error: error }; }
|
|
||||||
finally {
|
|
||||||
try {
|
|
||||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
||||||
}
|
|
||||||
finally { if (e) throw e.error; }
|
|
||||||
}
|
|
||||||
return ar;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
__spread = function () {
|
|
||||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
||||||
ar = ar.concat(__read(arguments[i]));
|
|
||||||
return ar;
|
|
||||||
};
|
|
||||||
|
|
||||||
/** @deprecated */
|
|
||||||
__spreadArrays = function () {
|
|
||||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
||||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
||||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
||||||
r[k] = a[j];
|
|
||||||
return r;
|
|
||||||
};
|
|
||||||
|
|
||||||
__spreadArray = function (to, from, pack) {
|
|
||||||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
||||||
if (ar || !(i in from)) {
|
|
||||||
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
||||||
ar[i] = from[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return to.concat(ar || Array.prototype.slice.call(from));
|
|
||||||
};
|
|
||||||
|
|
||||||
__await = function (v) {
|
|
||||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
||||||
};
|
|
||||||
|
|
||||||
__asyncGenerator = function (thisArg, _arguments, generator) {
|
|
||||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
||||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
||||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
||||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
||||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
||||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
||||||
function fulfill(value) { resume("next", value); }
|
|
||||||
function reject(value) { resume("throw", value); }
|
|
||||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
||||||
};
|
|
||||||
|
|
||||||
__asyncDelegator = function (o) {
|
|
||||||
var i, p;
|
|
||||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
||||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
||||||
};
|
|
||||||
|
|
||||||
__asyncValues = function (o) {
|
|
||||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
||||||
var m = o[Symbol.asyncIterator], i;
|
|
||||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
||||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
||||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
||||||
};
|
|
||||||
|
|
||||||
__makeTemplateObject = function (cooked, raw) {
|
|
||||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
||||||
return cooked;
|
|
||||||
};
|
|
||||||
|
|
||||||
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
||||||
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
||||||
}) : function(o, v) {
|
|
||||||
o["default"] = v;
|
|
||||||
};
|
|
||||||
|
|
||||||
__importStar = function (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
__importDefault = function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
|
|
||||||
__classPrivateFieldGet = function (receiver, state, kind, f) {
|
|
||||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
||||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
||||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
||||||
};
|
|
||||||
|
|
||||||
__classPrivateFieldSet = function (receiver, state, value, kind, f) {
|
|
||||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
||||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
||||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
||||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
||||||
};
|
|
||||||
|
|
||||||
exporter("__extends", __extends);
|
|
||||||
exporter("__assign", __assign);
|
|
||||||
exporter("__rest", __rest);
|
|
||||||
exporter("__decorate", __decorate);
|
|
||||||
exporter("__param", __param);
|
|
||||||
exporter("__metadata", __metadata);
|
|
||||||
exporter("__awaiter", __awaiter);
|
|
||||||
exporter("__generator", __generator);
|
|
||||||
exporter("__exportStar", __exportStar);
|
|
||||||
exporter("__createBinding", __createBinding);
|
|
||||||
exporter("__values", __values);
|
|
||||||
exporter("__read", __read);
|
|
||||||
exporter("__spread", __spread);
|
|
||||||
exporter("__spreadArrays", __spreadArrays);
|
|
||||||
exporter("__spreadArray", __spreadArray);
|
|
||||||
exporter("__await", __await);
|
|
||||||
exporter("__asyncGenerator", __asyncGenerator);
|
|
||||||
exporter("__asyncDelegator", __asyncDelegator);
|
|
||||||
exporter("__asyncValues", __asyncValues);
|
|
||||||
exporter("__makeTemplateObject", __makeTemplateObject);
|
|
||||||
exporter("__importStar", __importStar);
|
|
||||||
exporter("__importDefault", __importDefault);
|
|
||||||
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
|
||||||
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 2356:
|
/***/ 2356:
|
||||||
@@ -18925,7 +18608,7 @@ if (logLevelFromEnv) {
|
|||||||
setLogLevel(logLevelFromEnv);
|
setLogLevel(logLevelFromEnv);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -64911,12 +64594,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
||||||
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||||
|
var m = o[Symbol.asyncIterator], i;
|
||||||
|
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||||
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||||
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||||
|
};
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.CacheCleaner = void 0;
|
exports.CacheCleaner = void 0;
|
||||||
|
const core = __importStar(__nccwpck_require__(2186));
|
||||||
const exec = __importStar(__nccwpck_require__(1514));
|
const exec = __importStar(__nccwpck_require__(1514));
|
||||||
|
const glob = __importStar(__nccwpck_require__(8090));
|
||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||||
const path_1 = __importDefault(__nccwpck_require__(1017));
|
const path_1 = __importDefault(__nccwpck_require__(1017));
|
||||||
class CacheCleaner {
|
class CacheCleaner {
|
||||||
@@ -64947,12 +64639,35 @@ class CacheCleaner {
|
|||||||
}
|
}
|
||||||
ageAllFiles(fileName = '*') {
|
ageAllFiles(fileName = '*') {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '-d', '1970-01-01', '{}', '+'], {});
|
core.debug(`Aging all files in Gradle User Homee with name ${fileName}`);
|
||||||
|
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date(0));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
touchAllFiles(fileName = '*') {
|
touchAllFiles(fileName = '*') {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
yield exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '{}', '+'], {});
|
core.debug(`Touching all files in Gradle User Home with name ${fileName}`);
|
||||||
|
yield this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setUtimes(pattern, timestamp) {
|
||||||
|
var e_1, _a;
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
const globber = yield glob.create(pattern, {
|
||||||
|
implicitDescendants: false
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
for (var _b = __asyncValues(globber.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
|
||||||
|
const file = _c.value;
|
||||||
|
fs_1.default.utimesSync(file, timestamp, timestamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
|
||||||
|
}
|
||||||
|
finally { if (e_1) throw e_1.error; }
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/post/sourcemap-register.js
vendored
1
dist/post/sourcemap-register.js
vendored
File diff suppressed because one or more lines are too long
524
package-lock.json
generated
524
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@@ -8,7 +8,7 @@
|
|||||||
"format": "prettier --write **/*.ts",
|
"format": "prettier --write **/*.ts",
|
||||||
"format-check": "prettier --check **/*.ts",
|
"format-check": "prettier --check **/*.ts",
|
||||||
"lint": "eslint src/**/*.ts",
|
"lint": "eslint src/**/*.ts",
|
||||||
"compile": "ncc build src/main.ts --out dist/main --source-map && ncc build src/post.ts --out dist/post --source-map",
|
"compile": "ncc build src/main.ts --out dist/main --source-map --no-source-map-register && ncc build src/post.ts --out dist/post --source-map --no-source-map-register",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"check": "npm run format && npm run lint",
|
"check": "npm run format && npm run lint",
|
||||||
"build": "npm run check && npm run compile",
|
"build": "npm run check && npm run compile",
|
||||||
@@ -26,10 +26,10 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/cache": "3.0.4",
|
"@actions/cache": "3.0.6",
|
||||||
"@actions/core": "1.9.1",
|
"@actions/core": "1.10.0",
|
||||||
"@actions/exec": "1.1.1",
|
"@actions/exec": "1.1.1",
|
||||||
"@actions/github": "5.0.3",
|
"@actions/github": "5.1.1",
|
||||||
"@actions/glob": "0.3.0",
|
"@actions/glob": "0.3.0",
|
||||||
"@actions/http-client": "2.0.1",
|
"@actions/http-client": "2.0.1",
|
||||||
"@actions/tool-cache": "2.0.1",
|
"@actions/tool-cache": "2.0.1",
|
||||||
@@ -39,16 +39,16 @@
|
|||||||
"@types/jest": "28.1.7",
|
"@types/jest": "28.1.7",
|
||||||
"@types/node": "16.11.21",
|
"@types/node": "16.11.21",
|
||||||
"@types/unzipper": "0.10.5",
|
"@types/unzipper": "0.10.5",
|
||||||
"@typescript-eslint/parser": "5.33.1",
|
"@typescript-eslint/parser": "5.40.1",
|
||||||
"@vercel/ncc": "0.34.0",
|
"@vercel/ncc": "0.34.0",
|
||||||
"eslint": "8.22.0",
|
"eslint": "8.25.0",
|
||||||
"eslint-plugin-github": "4.3.7",
|
"eslint-plugin-github": "4.4.0",
|
||||||
"eslint-plugin-jest": "26.8.3",
|
"eslint-plugin-jest": "27.1.3",
|
||||||
"jest": "28.1.3",
|
"jest": "28.1.3",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"patch-package": "6.4.7",
|
"patch-package": "6.4.7",
|
||||||
"prettier": "2.7.1",
|
"prettier": "2.7.1",
|
||||||
"ts-jest": "28.0.8",
|
"ts-jest": "28.0.8",
|
||||||
"typescript": "4.7.4"
|
"typescript": "4.8.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
29
patches/@azure+logger+1.0.3.patch
Normal file
29
patches/@azure+logger+1.0.3.patch
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Patch removes logging of the AZURE_LOG_LEVEL env var value
|
||||||
|
# This logging triggers a high severity Warning from CodeQL, which can prevent organizational users from adopting the action.
|
||||||
|
|
||||||
|
diff --git a/node_modules/@azure/logger/dist-esm/src/index.js b/node_modules/@azure/logger/dist-esm/src/index.js
|
||||||
|
index 116b59e..cf87f3c 100644
|
||||||
|
--- a/node_modules/@azure/logger/dist-esm/src/index.js
|
||||||
|
+++ b/node_modules/@azure/logger/dist-esm/src/index.js
|
||||||
|
@@ -20,7 +20,7 @@ if (logLevelFromEnv) {
|
||||||
|
setLogLevel(logLevelFromEnv);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
- console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
+ console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
diff --git a/node_modules/@azure/logger/dist/index.js b/node_modules/@azure/logger/dist/index.js
|
||||||
|
index 327fbdb..4432d73 100644
|
||||||
|
--- a/node_modules/@azure/logger/dist/index.js
|
||||||
|
+++ b/node_modules/@azure/logger/dist/index.js
|
||||||
|
@@ -122,7 +122,7 @@ if (logLevelFromEnv) {
|
||||||
|
setLogLevel(logLevelFromEnv);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
- console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
+ console.error(`AZURE_LOG_LEVEL set to unknown log level; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(", ")}.`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
@@ -1,4 +1,6 @@
|
|||||||
|
import * as core from '@actions/core'
|
||||||
import * as exec from '@actions/exec'
|
import * as exec from '@actions/exec'
|
||||||
|
import * as glob from '@actions/glob'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
@@ -46,14 +48,21 @@ export class CacheCleaner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async ageAllFiles(fileName = '*'): Promise<void> {
|
private async ageAllFiles(fileName = '*'): Promise<void> {
|
||||||
await exec.exec(
|
core.debug(`Aging all files in Gradle User Homee with name ${fileName}`)
|
||||||
'find',
|
await this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date(0))
|
||||||
[this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '-d', '1970-01-01', '{}', '+'],
|
|
||||||
{}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async touchAllFiles(fileName = '*'): Promise<void> {
|
private async touchAllFiles(fileName = '*'): Promise<void> {
|
||||||
await exec.exec('find', [this.gradleUserHome, '-name', fileName, '-exec', 'touch', '-m', '{}', '+'], {})
|
core.debug(`Touching all files in Gradle User Home with name ${fileName}`)
|
||||||
|
await this.setUtimes(`${this.gradleUserHome}/**/${fileName}`, new Date())
|
||||||
|
}
|
||||||
|
|
||||||
|
private async setUtimes(pattern: string, timestamp: Date): Promise<void> {
|
||||||
|
const globber = await glob.create(pattern, {
|
||||||
|
implicitDescendants: false
|
||||||
|
})
|
||||||
|
for await (const file of globber.globGenerator()) {
|
||||||
|
fs.utimesSync(file, timestamp, timestamp)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -54,6 +54,8 @@ abstract class BuildResultsRecorder implements BuildService<BuildResultsRecorder
|
|||||||
def buildResultsDir = new File(runnerTempDir, ".build-results")
|
def buildResultsDir = new File(runnerTempDir, ".build-results")
|
||||||
buildResultsDir.mkdirs()
|
buildResultsDir.mkdirs()
|
||||||
def buildResultsFile = new File(buildResultsDir, githubActionStep + getParameters().getInvocationId().get() + ".json")
|
def buildResultsFile = new File(buildResultsDir, githubActionStep + getParameters().getInvocationId().get() + ".json")
|
||||||
buildResultsFile << groovy.json.JsonOutput.toJson(buildResults)
|
if (!buildResultsFile.exists()) {
|
||||||
|
buildResultsFile << groovy.json.JsonOutput.toJson(buildResults)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,8 @@ if (isTopLevelBuild) {
|
|||||||
if (gradle.rootProject.pluginManager.hasPlugin("com.gradle.build-scan")) {
|
if (gradle.rootProject.pluginManager.hasPlugin("com.gradle.build-scan")) {
|
||||||
captureUsingBuildScanPublished(gradle.rootProject.extensions["buildScan"], gradle.rootProject, invocationId)
|
captureUsingBuildScanPublished(gradle.rootProject.extensions["buildScan"], gradle.rootProject, invocationId)
|
||||||
}
|
}
|
||||||
// We need to capture in buildFinished in case the plugin is applied but no build scan is published
|
// Always attempt to capture in buildFinished in case the plugin is applied but no build scan is published
|
||||||
|
// The `buildScanPublished` results will NOT be overwritten by this call
|
||||||
captureUsingBuildFinished(gradle, invocationId)
|
captureUsingBuildFinished(gradle, invocationId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -50,7 +51,13 @@ def captureUsingBuildScanPublished(buildScanExtension, rootProject, invocationId
|
|||||||
buildResults.setBuildScanUri(buildScan.buildScanUri.toASCIIString())
|
buildResults.setBuildScanUri(buildScan.buildScanUri.toASCIIString())
|
||||||
buildResults.writeToResultsFile(true)
|
buildResults.writeToResultsFile(true)
|
||||||
|
|
||||||
println("::set-output name=build-scan-url::${buildScan.buildScanUri}")
|
def githubOutput = System.getenv("GITHUB_OUTPUT")
|
||||||
|
if (githubOutput) {
|
||||||
|
new File(githubOutput) << "build-scan-url=${buildScan.buildScanUri}\n"
|
||||||
|
} else {
|
||||||
|
// Retained for compatibility with older GitHub Enterprise versions
|
||||||
|
println("::set-output name=build-scan-url::${buildScan.buildScanUri}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onError { error ->
|
onError { error ->
|
||||||
|
@@ -14,13 +14,13 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation gradleTestKit()
|
testImplementation gradleTestKit()
|
||||||
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0'
|
testImplementation 'org.spockframework:spock-core:2.3-groovy-3.0'
|
||||||
testImplementation('org.spockframework:spock-junit4:2.1-groovy-3.0')
|
testImplementation('org.spockframework:spock-junit4:2.3-groovy-3.0')
|
||||||
|
|
||||||
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
|
testImplementation ('io.ratpack:ratpack-groovy-test:1.9.0') {
|
||||||
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
|
||||||
}
|
}
|
||||||
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.13.3'
|
testImplementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.13.4'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
@@ -1 +1,14 @@
|
|||||||
|
plugins {
|
||||||
|
id "com.gradle.enterprise" version "3.11.2"
|
||||||
|
id "com.gradle.common-custom-user-data-gradle-plugin" version "1.8.2"
|
||||||
|
}
|
||||||
|
|
||||||
|
gradleEnterprise {
|
||||||
|
buildScan {
|
||||||
|
termsOfServiceUrl = "https://gradle.com/terms-of-service"
|
||||||
|
termsOfServiceAgree = "yes"
|
||||||
|
publishAlways()
|
||||||
|
uploadInBackground = false
|
||||||
|
}
|
||||||
|
}
|
||||||
rootProject.name = 'test-init-scripts'
|
rootProject.name = 'test-init-scripts'
|
||||||
|
@@ -63,17 +63,17 @@ test('will cleanup unused gradle versions', async () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
async function runGradleBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
async function runGradleBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
||||||
const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons-math3.version=${version} ${args}`, [], {
|
const status31 = await exec.exec(`gradle -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||||
cwd: projectRoot
|
cwd: projectRoot
|
||||||
})
|
})
|
||||||
console.log(`Gradle User Home initialized with commons-math3.version=${version} ${args}`)
|
console.log(`Gradle User Home initialized with commons_math3_version=${version} ${args}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
async function runGradleWrapperBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
async function runGradleWrapperBuild(projectRoot: string, args: string, version: string = '3.1'): Promise<void> {
|
||||||
const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons-math3.version=${version} ${args}`, [], {
|
const status31 = await exec.exec(`./gradlew -g HOME --no-daemon --build-cache -Dcommons_math3_version="${version}" ${args}`, [], {
|
||||||
cwd: projectRoot
|
cwd: projectRoot
|
||||||
})
|
})
|
||||||
console.log(`Gradle User Home initialized with commons-math3.version=${version} ${args}`)
|
console.log(`Gradle User Home initialized with commons_math3_version="${version}" ${args}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
function prepareTestProject(): string {
|
function prepareTestProject(): string {
|
||||||
|
@@ -7,5 +7,5 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api "org.apache.commons:commons-math3:${System.properties['commons-math3.version']}"
|
api "org.apache.commons:commons-math3:${System.properties['commons_math3_version']}"
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
# Deliberately not using the latest Gradle version for cache cleanup testing
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
Reference in New Issue
Block a user