Upgrade dependencies of the project

This commit is contained in:
Thach Nguyen 2022-07-28 21:11:33 +07:00
parent 0bac8fc957
commit c970051976
6 changed files with 1409 additions and 2966 deletions

View File

@ -18,7 +18,8 @@ jobs:
Clone this repository and build the project with command
```batch
docker run --rm -it -v "%PWD%:/usr/src/app" -w /usr/src/app node:12-alpine /bin/sh -c "npm i --no-bin-links && npm test && npm run build"
docker run --rm -it -v "%PWD%:/usr/src/app" -w /usr/src/app node:16-alpine /bin/sh -c ^
"npm i --no-bin-links --no-save && npm run lint && npm test && npm run build"
```
**Note** that `%PWD%` is the project working directory in `Unix` format, such as: `/c/Users/source/repos/setup-maven`

View File

@ -0,0 +1,5 @@
describe('maven installer tests', () => {
it('square root of 4 to equal 2', () => {
expect(Math.sqrt(4)).toBe(2);
});
});

View File

@ -7,5 +7,5 @@ inputs:
required: false
default: '3.8.2'
runs:
using: 'node12'
using: 'node16'
main: 'dist/index.js'

536
dist/index.js generated vendored
View File

@ -1,9 +1,8 @@
module.exports =
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 351:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -15,8 +14,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const os = __importStar(__webpack_require__(87));
const utils_1 = __webpack_require__(278);
const os = __importStar(__nccwpck_require__(37));
const utils_1 = __nccwpck_require__(278);
/**
* Commands
*
@ -89,7 +88,7 @@ function escapeProperty(s) {
/***/ }),
/***/ 186:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -110,11 +109,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const command_1 = __webpack_require__(351);
const file_command_1 = __webpack_require__(717);
const utils_1 = __webpack_require__(278);
const os = __importStar(__webpack_require__(87));
const path = __importStar(__webpack_require__(622));
const command_1 = __nccwpck_require__(351);
const file_command_1 = __nccwpck_require__(717);
const utils_1 = __nccwpck_require__(278);
const os = __importStar(__nccwpck_require__(37));
const path = __importStar(__nccwpck_require__(17));
/**
* The code to exit an action
*/
@ -334,7 +333,7 @@ exports.getState = getState;
/***/ }),
/***/ 717:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -349,9 +348,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
Object.defineProperty(exports, "__esModule", ({ value: true }));
// We use any as a valid input type
/* eslint-disable @typescript-eslint/no-explicit-any */
const fs = __importStar(__webpack_require__(747));
const os = __importStar(__webpack_require__(87));
const utils_1 = __webpack_require__(278);
const fs = __importStar(__nccwpck_require__(147));
const os = __importStar(__nccwpck_require__(37));
const utils_1 = __nccwpck_require__(278);
function issueCommand(command, message) {
const filePath = process.env[`GITHUB_${command}`];
if (!filePath) {
@ -396,7 +395,7 @@ exports.toCommandValue = toCommandValue;
/***/ }),
/***/ 514:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -417,7 +416,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const tr = __importStar(__webpack_require__(159));
const tr = __importStar(__nccwpck_require__(159));
/**
* Exec a command.
* Output will be streamed to the live console.
@ -447,7 +446,7 @@ exports.exec = exec;
/***/ }),
/***/ 159:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -468,12 +467,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const os = __importStar(__webpack_require__(87));
const events = __importStar(__webpack_require__(614));
const child = __importStar(__webpack_require__(129));
const path = __importStar(__webpack_require__(622));
const io = __importStar(__webpack_require__(436));
const ioUtil = __importStar(__webpack_require__(962));
const os = __importStar(__nccwpck_require__(37));
const events = __importStar(__nccwpck_require__(361));
const child = __importStar(__nccwpck_require__(81));
const path = __importStar(__nccwpck_require__(17));
const io = __importStar(__nccwpck_require__(436));
const ioUtil = __importStar(__nccwpck_require__(962));
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
@ -1054,15 +1053,14 @@ class ExecState extends events.EventEmitter {
/***/ }),
/***/ 925:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const url = __webpack_require__(835);
const http = __webpack_require__(605);
const https = __webpack_require__(211);
const pm = __webpack_require__(443);
const http = __nccwpck_require__(685);
const https = __nccwpck_require__(687);
const pm = __nccwpck_require__(443);
let tunnel;
var HttpCodes;
(function (HttpCodes) {
@ -1108,7 +1106,7 @@ var MediaTypes;
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
function getProxyUrl(serverUrl) {
let proxyUrl = pm.getProxyUrl(url.parse(serverUrl));
let proxyUrl = pm.getProxyUrl(new URL(serverUrl));
return proxyUrl ? proxyUrl.href : '';
}
exports.getProxyUrl = getProxyUrl;
@ -1127,6 +1125,15 @@ const HttpResponseRetryCodes = [
const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
const ExponentialBackoffCeiling = 10;
const ExponentialBackoffTimeSlice = 5;
class HttpClientError extends Error {
constructor(message, statusCode) {
super(message);
this.name = 'HttpClientError';
this.statusCode = statusCode;
Object.setPrototypeOf(this, HttpClientError.prototype);
}
}
exports.HttpClientError = HttpClientError;
class HttpClientResponse {
constructor(message) {
this.message = message;
@ -1145,7 +1152,7 @@ class HttpClientResponse {
}
exports.HttpClientResponse = HttpClientResponse;
function isHttps(requestUrl) {
let parsedUrl = url.parse(requestUrl);
let parsedUrl = new URL(requestUrl);
return parsedUrl.protocol === 'https:';
}
exports.isHttps = isHttps;
@ -1250,7 +1257,7 @@ class HttpClient {
if (this._disposed) {
throw new Error('Client has already been disposed.');
}
let parsedUrl = url.parse(requestUrl);
let parsedUrl = new URL(requestUrl);
let info = this._prepareRequest(verb, parsedUrl, headers);
// Only perform retries on reads since writes may not be idempotent.
let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
@ -1289,7 +1296,7 @@ class HttpClient {
// if there's no location to redirect to, we won't
break;
}
let parsedRedirectUrl = url.parse(redirectUrl);
let parsedRedirectUrl = new URL(redirectUrl);
if (parsedUrl.protocol == 'https:' &&
parsedUrl.protocol != parsedRedirectUrl.protocol &&
!this._allowRedirectDowngrade) {
@ -1405,7 +1412,7 @@ class HttpClient {
* @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
*/
getAgent(serverUrl) {
let parsedUrl = url.parse(serverUrl);
let parsedUrl = new URL(serverUrl);
return this._getAgent(parsedUrl);
}
_prepareRequest(method, requestUrl, headers) {
@ -1472,13 +1479,15 @@ class HttpClient {
if (useProxy) {
// If using proxy, need tunnel
if (!tunnel) {
tunnel = __webpack_require__(294);
tunnel = __nccwpck_require__(294);
}
const agentOptions = {
maxSockets: maxSockets,
keepAlive: this._keepAlive,
proxy: {
proxyAuth: proxyUrl.auth,
...((proxyUrl.username || proxyUrl.password) && {
proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`
}),
host: proxyUrl.hostname,
port: proxyUrl.port
}
@ -1573,12 +1582,8 @@ class HttpClient {
else {
msg = 'Failed request: (' + statusCode + ')';
}
let err = new Error(msg);
// attach statusCode and body obj (if available) to the error object
err['statusCode'] = statusCode;
if (response.result) {
err['result'] = response.result;
}
let err = new HttpClientError(msg, statusCode);
err.result = response.result;
reject(err);
}
else {
@ -1593,12 +1598,11 @@ exports.HttpClient = HttpClient;
/***/ }),
/***/ 443:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
const url = __webpack_require__(835);
function getProxyUrl(reqUrl) {
let usingSsl = reqUrl.protocol === 'https:';
let proxyUrl;
@ -1613,7 +1617,7 @@ function getProxyUrl(reqUrl) {
proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
}
if (proxyVar) {
proxyUrl = url.parse(proxyVar);
proxyUrl = new URL(proxyVar);
}
return proxyUrl;
}
@ -1659,7 +1663,7 @@ exports.checkBypass = checkBypass;
/***/ }),
/***/ 962:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -1674,9 +1678,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
};
var _a;
Object.defineProperty(exports, "__esModule", ({ value: true }));
const assert_1 = __webpack_require__(357);
const fs = __webpack_require__(747);
const path = __webpack_require__(622);
const assert_1 = __nccwpck_require__(491);
const fs = __nccwpck_require__(147);
const path = __nccwpck_require__(17);
_a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
exports.IS_WINDOWS = process.platform === 'win32';
function exists(fsPath) {
@ -1861,7 +1865,7 @@ function isUnixExecutable(stats) {
/***/ }),
/***/ 436:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -1875,10 +1879,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const childProcess = __webpack_require__(129);
const path = __webpack_require__(622);
const util_1 = __webpack_require__(669);
const ioUtil = __webpack_require__(962);
const childProcess = __nccwpck_require__(81);
const path = __nccwpck_require__(17);
const util_1 = __nccwpck_require__(837);
const ioUtil = __nccwpck_require__(962);
const exec = util_1.promisify(childProcess.exec);
/**
* Copies a file or folder.
@ -2157,8 +2161,8 @@ function copyFile(srcFile, destFile, force) {
/***/ }),
/***/ 279:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ 473:
/***/ (function(module, exports, __nccwpck_require__) {
"use strict";
@ -2179,7 +2183,120 @@ var __importStar = (this && this.__importStar) || function (mod) {
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__webpack_require__(186));
const semver = __importStar(__nccwpck_require__(911));
const core_1 = __nccwpck_require__(186);
// needs to be require for core node modules to be mocked
/* eslint @typescript-eslint/no-require-imports: 0 */
const os = __nccwpck_require__(37);
const cp = __nccwpck_require__(81);
const fs = __nccwpck_require__(147);
function _findMatch(versionSpec, stable, candidates, archFilter) {
return __awaiter(this, void 0, void 0, function* () {
const platFilter = os.platform();
let result;
let match;
let file;
for (const candidate of candidates) {
const version = candidate.version;
core_1.debug(`check ${version} satisfies ${versionSpec}`);
if (semver.satisfies(version, versionSpec) &&
(!stable || candidate.stable === stable)) {
file = candidate.files.find(item => {
core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);
let chk = item.arch === archFilter && item.platform === platFilter;
if (chk && item.platform_version) {
const osVersion = module.exports._getOsVersion();
if (osVersion === item.platform_version) {
chk = true;
}
else {
chk = semver.satisfies(osVersion, item.platform_version);
}
}
return chk;
});
if (file) {
core_1.debug(`matched ${candidate.version}`);
match = candidate;
break;
}
}
}
if (match && file) {
// clone since we're mutating the file list to be only the file that matches
result = Object.assign({}, match);
result.files = [file];
}
return result;
});
}
exports._findMatch = _findMatch;
function _getOsVersion() {
// TODO: add windows and other linux, arm variants
// right now filtering on version is only an ubuntu and macos scenario for tools we build for hosted (python)
const plat = os.platform();
let version = '';
if (plat === 'darwin') {
version = cp.execSync('sw_vers -productVersion').toString();
}
else if (plat === 'linux') {
// lsb_release process not in some containers, readfile
// Run cat /etc/lsb-release
// DISTRIB_ID=Ubuntu
// DISTRIB_RELEASE=18.04
// DISTRIB_CODENAME=bionic
// DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
const lsbContents = module.exports._readLinuxVersionFile();
if (lsbContents) {
const lines = lsbContents.split('\n');
for (const line of lines) {
const parts = line.split('=');
if (parts.length === 2 && parts[0].trim() === 'DISTRIB_RELEASE') {
version = parts[1].trim();
break;
}
}
}
}
return version;
}
exports._getOsVersion = _getOsVersion;
function _readLinuxVersionFile() {
const lsbFile = '/etc/lsb-release';
let contents = '';
if (fs.existsSync(lsbFile)) {
contents = fs.readFileSync(lsbFile).toString();
}
return contents;
}
exports._readLinuxVersionFile = _readLinuxVersionFile;
//# sourceMappingURL=manifest.js.map
/***/ }),
/***/ 279:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __awaiter = (this && this.__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());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__nccwpck_require__(186));
/**
* Internal class for retries
*/
@ -2235,7 +2352,7 @@ exports.RetryHelper = RetryHelper;
/***/ }),
/***/ 784:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@ -2259,37 +2376,40 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__webpack_require__(186));
const io = __importStar(__webpack_require__(436));
const fs = __importStar(__webpack_require__(747));
const os = __importStar(__webpack_require__(87));
const path = __importStar(__webpack_require__(622));
const httpm = __importStar(__webpack_require__(925));
const semver = __importStar(__webpack_require__(911));
const stream = __importStar(__webpack_require__(413));
const util = __importStar(__webpack_require__(669));
const v4_1 = __importDefault(__webpack_require__(824));
const exec_1 = __webpack_require__(514);
const assert_1 = __webpack_require__(357);
const retry_helper_1 = __webpack_require__(279);
const core = __importStar(__nccwpck_require__(186));
const io = __importStar(__nccwpck_require__(436));
const fs = __importStar(__nccwpck_require__(147));
const mm = __importStar(__nccwpck_require__(473));
const os = __importStar(__nccwpck_require__(37));
const path = __importStar(__nccwpck_require__(17));
const httpm = __importStar(__nccwpck_require__(925));
const semver = __importStar(__nccwpck_require__(911));
const stream = __importStar(__nccwpck_require__(781));
const util = __importStar(__nccwpck_require__(837));
const v4_1 = __importDefault(__nccwpck_require__(824));
const exec_1 = __nccwpck_require__(514);
const assert_1 = __nccwpck_require__(491);
const retry_helper_1 = __nccwpck_require__(279);
class HTTPError extends Error {
constructor(httpStatusCode) {
super(`Unexpected HTTP response: ${httpStatusCode}`);
this.httpStatusCode = httpStatusCode;
Object.setPrototypeOf(this, /* unsupported import.meta.prototype */ undefined);
Object.setPrototypeOf(this, new.target.prototype);
}
}
exports.HTTPError = HTTPError;
const IS_WINDOWS = process.platform === 'win32';
const IS_MAC = process.platform === 'darwin';
const userAgent = 'actions/tool-cache';
/**
* Download a tool from an url and stream it into a file
*
* @param url url of tool to download
* @param dest path to download tool
* @param auth authorization header
* @returns path to downloaded tool
*/
function downloadTool(url, dest) {
function downloadTool(url, dest, auth) {
return __awaiter(this, void 0, void 0, function* () {
dest = dest || path.join(_getTempDirectory(), v4_1.default());
yield io.mkdirP(path.dirname(dest));
@ -2300,7 +2420,7 @@ function downloadTool(url, dest) {
const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);
const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);
return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
return yield downloadToolAttempt(url, dest || '');
return yield downloadToolAttempt(url, dest || '', auth);
}), (err) => {
if (err instanceof HTTPError && err.httpStatusCode) {
// Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests
@ -2316,7 +2436,7 @@ function downloadTool(url, dest) {
});
}
exports.downloadTool = downloadTool;
function downloadToolAttempt(url, dest) {
function downloadToolAttempt(url, dest, auth) {
return __awaiter(this, void 0, void 0, function* () {
if (fs.existsSync(dest)) {
throw new Error(`Destination file path ${dest} already exists`);
@ -2325,7 +2445,14 @@ function downloadToolAttempt(url, dest) {
const http = new httpm.HttpClient(userAgent, [], {
allowRetries: false
});
const response = yield http.get(url);
let headers;
if (auth) {
core.debug('set auth');
headers = {
authorization: auth
};
}
const response = yield http.get(url, headers);
if (response.message.statusCode !== 200) {
const err = new HTTPError(response.message.statusCode);
core.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`);
@ -2459,7 +2586,13 @@ function extractTar(file, dest, flags = 'xz') {
core.debug(versionOutput.trim());
const isGnuTar = versionOutput.toUpperCase().includes('GNU TAR');
// Initialize args
const args = [flags];
let args;
if (flags instanceof Array) {
args = flags;
}
else {
args = [flags];
}
if (core.isDebug() && !flags.includes('v')) {
args.push('-v');
}
@ -2482,6 +2615,36 @@ function extractTar(file, dest, flags = 'xz') {
});
}
exports.extractTar = extractTar;
/**
* Extract a xar compatible archive
*
* @param file path to the archive
* @param dest destination directory. Optional.
* @param flags flags for the xar. Optional.
* @returns path to the destination directory
*/
function extractXar(file, dest, flags = []) {
return __awaiter(this, void 0, void 0, function* () {
assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');
assert_1.ok(file, 'parameter "file" is required');
dest = yield _createExtractFolder(dest);
let args;
if (flags instanceof Array) {
args = flags;
}
else {
args = [flags];
}
args.push('-x', '-C', dest, '-f', file);
if (core.isDebug()) {
args.push('-v');
}
const xarPath = yield io.which('xar', true);
yield exec_1.exec(`"${xarPath}"`, _unique(args));
return dest;
});
}
exports.extractXar = extractXar;
/**
* Extract a zip
*
@ -2661,6 +2824,51 @@ function findAllVersions(toolName, arch) {
return versions;
}
exports.findAllVersions = findAllVersions;
function getManifestFromRepo(owner, repo, auth, branch = 'master') {
return __awaiter(this, void 0, void 0, function* () {
let releases = [];
const treeUrl = `https://api.github.com/repos/${owner}/${repo}/git/trees/${branch}`;
const http = new httpm.HttpClient('tool-cache');
const headers = {};
if (auth) {
core.debug('set auth');
headers.authorization = auth;
}
const response = yield http.getJson(treeUrl, headers);
if (!response.result) {
return releases;
}
let manifestUrl = '';
for (const item of response.result.tree) {
if (item.path === 'versions-manifest.json') {
manifestUrl = item.url;
break;
}
}
headers['accept'] = 'application/vnd.github.VERSION.raw';
let versionsRaw = yield (yield http.get(manifestUrl, headers)).readBody();
if (versionsRaw) {
// shouldn't be needed but protects against invalid json saved with BOM
versionsRaw = versionsRaw.replace(/^\uFEFF/, '');
try {
releases = JSON.parse(versionsRaw);
}
catch (_a) {
core.debug('Invalid json');
}
}
return releases;
});
}
exports.getManifestFromRepo = getManifestFromRepo;
function findFromManifest(versionSpec, stable, manifest, archFilter = os.arch()) {
return __awaiter(this, void 0, void 0, function* () {
// wrap the internal impl
const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter);
return match;
});
}
exports.findFromManifest = findFromManifest;
function _createExtractFolder(dest) {
return __awaiter(this, void 0, void 0, function* () {
if (!dest) {
@ -2745,6 +2953,13 @@ function _getGlobal(key, defaultValue) {
/* eslint-enable @typescript-eslint/no-explicit-any */
return value !== undefined ? value : defaultValue;
}
/**
* Returns an array of unique values.
* @param values Values to make unique.
*/
function _unique(values) {
return Array.from(new Set(values));
}
//# sourceMappingURL=tool-cache.js.map
/***/ }),
@ -4353,26 +4568,26 @@ function coerce (version, options) {
/***/ }),
/***/ 294:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
module.exports = __webpack_require__(219);
module.exports = __nccwpck_require__(219);
/***/ }),
/***/ 219:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
"use strict";
var net = __webpack_require__(631);
var tls = __webpack_require__(16);
var http = __webpack_require__(605);
var https = __webpack_require__(211);
var events = __webpack_require__(614);
var assert = __webpack_require__(357);
var util = __webpack_require__(669);
var net = __nccwpck_require__(808);
var tls = __nccwpck_require__(404);
var http = __nccwpck_require__(685);
var https = __nccwpck_require__(687);
var events = __nccwpck_require__(361);
var assert = __nccwpck_require__(491);
var util = __nccwpck_require__(837);
exports.httpOverHttp = httpOverHttp;
@ -4648,14 +4863,16 @@ function bytesToUuid(buf, offset) {
var i = offset || 0;
var bth = byteToHex;
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
return ([bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]]]).join('');
return ([
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]], '-',
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]],
bth[buf[i++]], bth[buf[i++]]
]).join('');
}
module.exports = bytesToUuid;
@ -4664,12 +4881,12 @@ module.exports = bytesToUuid;
/***/ }),
/***/ 859:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
// Unique ID creation requires a high quality random # generator. In node.js
// this is pretty straight-forward - we use the crypto API.
var crypto = __webpack_require__(417);
var crypto = __nccwpck_require__(113);
module.exports = function nodeRNG() {
return crypto.randomBytes(16);
@ -4679,10 +4896,10 @@ module.exports = function nodeRNG() {
/***/ }),
/***/ 824:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
var rng = __webpack_require__(859);
var bytesToUuid = __webpack_require__(707);
var rng = __nccwpck_require__(859);
var bytesToUuid = __nccwpck_require__(707);
function v4(options, buf, offset) {
var i = buf && offset || 0;
@ -4715,10 +4932,29 @@ module.exports = v4;
/***/ }),
/***/ 574:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__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];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__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;
};
var __awaiter = (this && this.__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) {
@ -4728,17 +4964,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__webpack_require__(186));
const tc = __importStar(__webpack_require__(784));
const path = __importStar(__webpack_require__(622));
exports.getMaven = void 0;
const core = __importStar(__nccwpck_require__(186));
const tc = __importStar(__nccwpck_require__(784));
const path = __importStar(__nccwpck_require__(17));
function getMaven(version) {
return __awaiter(this, void 0, void 0, function* () {
let toolPath = tc.find('maven', version);
@ -4766,10 +4996,29 @@ function downloadMaven(version) {
/***/ }),
/***/ 587:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__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];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__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;
};
var __awaiter = (this && this.__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) {
@ -4779,16 +5028,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const core = __importStar(__webpack_require__(186));
const installer = __importStar(__webpack_require__(574));
const core = __importStar(__nccwpck_require__(186));
const installer = __importStar(__nccwpck_require__(574));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@ -4808,7 +5050,7 @@ run();
/***/ }),
/***/ 357:
/***/ 491:
/***/ ((module) => {
"use strict";
@ -4816,7 +5058,7 @@ module.exports = require("assert");
/***/ }),
/***/ 129:
/***/ 81:
/***/ ((module) => {
"use strict";
@ -4824,7 +5066,7 @@ module.exports = require("child_process");
/***/ }),
/***/ 417:
/***/ 113:
/***/ ((module) => {
"use strict";
@ -4832,7 +5074,7 @@ module.exports = require("crypto");
/***/ }),
/***/ 614:
/***/ 361:
/***/ ((module) => {
"use strict";
@ -4840,7 +5082,7 @@ module.exports = require("events");
/***/ }),
/***/ 747:
/***/ 147:
/***/ ((module) => {
"use strict";
@ -4848,7 +5090,7 @@ module.exports = require("fs");
/***/ }),
/***/ 605:
/***/ 685:
/***/ ((module) => {
"use strict";
@ -4856,7 +5098,7 @@ module.exports = require("http");
/***/ }),
/***/ 211:
/***/ 687:
/***/ ((module) => {
"use strict";
@ -4864,7 +5106,7 @@ module.exports = require("https");
/***/ }),
/***/ 631:
/***/ 808:
/***/ ((module) => {
"use strict";
@ -4872,7 +5114,7 @@ module.exports = require("net");
/***/ }),
/***/ 87:
/***/ 37:
/***/ ((module) => {
"use strict";
@ -4880,7 +5122,7 @@ module.exports = require("os");
/***/ }),
/***/ 622:
/***/ 17:
/***/ ((module) => {
"use strict";
@ -4888,7 +5130,7 @@ module.exports = require("path");
/***/ }),
/***/ 413:
/***/ 781:
/***/ ((module) => {
"use strict";
@ -4896,7 +5138,7 @@ module.exports = require("stream");
/***/ }),
/***/ 16:
/***/ 404:
/***/ ((module) => {
"use strict";
@ -4904,15 +5146,7 @@ module.exports = require("tls");
/***/ }),
/***/ 835:
/***/ ((module) => {
"use strict";
module.exports = require("url");
/***/ }),
/***/ 669:
/***/ 837:
/***/ ((module) => {
"use strict";
@ -4926,10 +5160,11 @@ module.exports = require("util");
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ function __nccwpck_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(__webpack_module_cache__[moduleId]) {
/******/ return __webpack_module_cache__[moduleId].exports;
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
@ -4941,7 +5176,7 @@ module.exports = require("util");
/******/ // Execute the module function
/******/ var threw = true;
/******/ try {
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nccwpck_require__);
/******/ threw = false;
/******/ } finally {
/******/ if(threw) delete __webpack_module_cache__[moduleId];
@ -4954,10 +5189,15 @@ module.exports = require("util");
/************************************************************************/
/******/ /* webpack/runtime/compat */
/******/
/******/ __webpack_require__.ab = __dirname + "/";/************************************************************************/
/******/ // module exports must be returned from runtime so entry inlining is disabled
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ return __webpack_require__(587);
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __nccwpck_require__(587);
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()
;

3803
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,11 +6,11 @@
"main": "dist/index.js",
"scripts": {
"build": "npm run ncc -- build -o dist src/setup-maven.ts",
"test": "node node_modules/jest/bin/jest.js",
"format": "npm run prettier -- \"{,!(dist)/**/}?*.*\" --write",
"lint": "npm run prettier -- \"{,!(dist)/**/}?*.*\" --check",
"ncc": "node node_modules/@vercel/ncc/dist/ncc/cli.js",
"prettier": "node node_modules/prettier/bin-prettier.js --ignore-path .gitignore",
"test": "npm run lint && node node_modules/jest/bin/jest.js"
"prettier": "node node_modules/prettier/bin-prettier.js --ignore-path .gitignore"
},
"keywords": [
"actions",
@ -21,21 +21,21 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.0",
"@actions/http-client": "^1.0.8",
"@actions/tool-cache": "^1.3.1",
"@actions/exec": "^1.0.4",
"@actions/http-client": "^1.0.11",
"@actions/tool-cache": "^1.6.1",
"semver": "^6.1.1"
},
"devDependencies": {
"@types/jest": "^26.0.15",
"@types/node": "^12.0.4",
"@types/jest": "^27.0.2",
"@types/node": "^16.11.25",
"@types/semver": "^6.0.0",
"@vercel/ncc": "^0.24.1",
"jest": "^26.3.0",
"jest-circus": "^26.3.0",
"prettier": "^1.17.1",
"ts-jest": "^26.2.0",
"typescript": "^3.5.1"
"@vercel/ncc": "^0.33.4",
"jest": "^27.2.5",
"jest-circus": "^27.2.5",
"prettier": "^1.19.1",
"ts-jest": "^27.0.5",
"typescript": "^4.2.3"
},
"prettier": {
"semi": true,