mirror of
https://github.com/DeLaGuardo/setup-clojure.git
synced 2024-12-27 08:31:04 +08:00
Upgrade dependencies and nodejs
This commit is contained in:
parent
45c53ddafe
commit
0b7739d599
@ -1 +1 @@
|
|||||||
14.16.1
|
14.17.0
|
||||||
|
276
dist/index.js
vendored
276
dist/index.js
vendored
@ -987,6 +987,25 @@ module.exports = require("tls");
|
|||||||
|
|
||||||
"use strict";
|
"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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@ -996,14 +1015,8 @@ 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 __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 });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports._readLinuxVersionFile = exports._getOsVersion = exports._findMatch = void 0;
|
||||||
const semver = __importStar(__webpack_require__(280));
|
const semver = __importStar(__webpack_require__(280));
|
||||||
const core_1 = __webpack_require__(470);
|
const core_1 = __webpack_require__(470);
|
||||||
// needs to be require for core node modules to be mocked
|
// needs to be require for core node modules to be mocked
|
||||||
@ -1103,6 +1116,7 @@ exports._readLinuxVersionFile = _readLinuxVersionFile;
|
|||||||
// 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 */
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.toCommandValue = void 0;
|
||||||
/**
|
/**
|
||||||
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
* Sanitizes an input into a string so it can be passed into issueCommand safely
|
||||||
* @param input input to sanitize into a string
|
* @param input input to sanitize into a string
|
||||||
@ -1134,14 +1148,27 @@ module.exports = require("os");
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
// For internal use, subject to change.
|
// For internal use, subject to change.
|
||||||
|
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) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
result["default"] = mod;
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.issueCommand = 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(__webpack_require__(747));
|
const fs = __importStar(__webpack_require__(747));
|
||||||
@ -3219,14 +3246,27 @@ module.exports = require("crypto");
|
|||||||
|
|
||||||
"use strict";
|
"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) {
|
var __importStar = (this && this.__importStar) || function (mod) {
|
||||||
if (mod && mod.__esModule) return mod;
|
if (mod && mod.__esModule) return mod;
|
||||||
var result = {};
|
var result = {};
|
||||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
result["default"] = mod;
|
__setModuleDefault(result, mod);
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.issue = exports.issueCommand = void 0;
|
||||||
const os = __importStar(__webpack_require__(87));
|
const os = __importStar(__webpack_require__(87));
|
||||||
const utils_1 = __webpack_require__(82);
|
const utils_1 = __webpack_require__(82);
|
||||||
/**
|
/**
|
||||||
@ -3378,8 +3418,8 @@ function installLeiningen(binScript, destinationFolder) {
|
|||||||
const version_cmd = IS_WINDOWS
|
const version_cmd = IS_WINDOWS
|
||||||
? 'powershell .\\lein.ps1 self-install'
|
? 'powershell .\\lein.ps1 self-install'
|
||||||
: './lein version';
|
: './lein version';
|
||||||
let env = {
|
const env = {
|
||||||
LEIN_HOME: path.join(destinationFolder, 'leiningen'),
|
LEIN_HOME: path.join(destinationFolder, 'leiningen')
|
||||||
};
|
};
|
||||||
if (process.env['PATH']) {
|
if (process.env['PATH']) {
|
||||||
env['PATH'] = process.env['PATH'];
|
env['PATH'] = process.env['PATH'];
|
||||||
@ -3389,7 +3429,7 @@ function installLeiningen(binScript, destinationFolder) {
|
|||||||
}
|
}
|
||||||
yield exec.exec(version_cmd, [], {
|
yield exec.exec(version_cmd, [], {
|
||||||
cwd: path.join(destinationFolder, 'leiningen', 'bin'),
|
cwd: path.join(destinationFolder, 'leiningen', 'bin'),
|
||||||
env: env
|
env
|
||||||
});
|
});
|
||||||
return path.join(destinationFolder, 'leiningen');
|
return path.join(destinationFolder, 'leiningen');
|
||||||
}
|
}
|
||||||
@ -3491,6 +3531,25 @@ run();
|
|||||||
|
|
||||||
"use strict";
|
"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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@ -3500,14 +3559,8 @@ 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 __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 });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
|
||||||
const command_1 = __webpack_require__(431);
|
const command_1 = __webpack_require__(431);
|
||||||
const file_command_1 = __webpack_require__(102);
|
const file_command_1 = __webpack_require__(102);
|
||||||
const utils_1 = __webpack_require__(82);
|
const utils_1 = __webpack_require__(82);
|
||||||
@ -3574,7 +3627,9 @@ function addPath(inputPath) {
|
|||||||
}
|
}
|
||||||
exports.addPath = addPath;
|
exports.addPath = addPath;
|
||||||
/**
|
/**
|
||||||
* Gets the value of an input. The value is also trimmed.
|
* Gets the value of an input.
|
||||||
|
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
|
||||||
|
* Returns an empty string if the value is not defined.
|
||||||
*
|
*
|
||||||
* @param name name of the input to get
|
* @param name name of the input to get
|
||||||
* @param options optional. See InputOptions.
|
* @param options optional. See InputOptions.
|
||||||
@ -3585,9 +3640,34 @@ function getInput(name, options) {
|
|||||||
if (options && options.required && !val) {
|
if (options && options.required && !val) {
|
||||||
throw new Error(`Input required and not supplied: ${name}`);
|
throw new Error(`Input required and not supplied: ${name}`);
|
||||||
}
|
}
|
||||||
|
if (options && options.trimWhitespace === false) {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
return val.trim();
|
return val.trim();
|
||||||
}
|
}
|
||||||
exports.getInput = getInput;
|
exports.getInput = getInput;
|
||||||
|
/**
|
||||||
|
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
|
||||||
|
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
|
||||||
|
* The return value is also in boolean type.
|
||||||
|
* ref: https://yaml.org/spec/1.2/spec.html#id2804923
|
||||||
|
*
|
||||||
|
* @param name name of the input to get
|
||||||
|
* @param options optional. See InputOptions.
|
||||||
|
* @returns boolean
|
||||||
|
*/
|
||||||
|
function getBooleanInput(name, options) {
|
||||||
|
const trueValue = ['true', 'True', 'TRUE'];
|
||||||
|
const falseValue = ['false', 'False', 'FALSE'];
|
||||||
|
const val = getInput(name, options);
|
||||||
|
if (trueValue.includes(val))
|
||||||
|
return true;
|
||||||
|
if (falseValue.includes(val))
|
||||||
|
return false;
|
||||||
|
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
|
||||||
|
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
|
||||||
|
}
|
||||||
|
exports.getBooleanInput = getBooleanInput;
|
||||||
/**
|
/**
|
||||||
* Sets the value of an output.
|
* Sets the value of an output.
|
||||||
*
|
*
|
||||||
@ -3860,6 +3940,25 @@ function readWriteAsync(file, replacement) {
|
|||||||
|
|
||||||
"use strict";
|
"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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@ -3869,17 +3968,11 @@ 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 __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;
|
|
||||||
};
|
|
||||||
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.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;
|
||||||
const core = __importStar(__webpack_require__(470));
|
const core = __importStar(__webpack_require__(470));
|
||||||
const io = __importStar(__webpack_require__(1));
|
const io = __importStar(__webpack_require__(1));
|
||||||
const fs = __importStar(__webpack_require__(747));
|
const fs = __importStar(__webpack_require__(747));
|
||||||
@ -3911,9 +4004,10 @@ const userAgent = 'actions/tool-cache';
|
|||||||
* @param url url of tool to download
|
* @param url url of tool to download
|
||||||
* @param dest path to download tool
|
* @param dest path to download tool
|
||||||
* @param auth authorization header
|
* @param auth authorization header
|
||||||
|
* @param headers other headers
|
||||||
* @returns path to downloaded tool
|
* @returns path to downloaded tool
|
||||||
*/
|
*/
|
||||||
function downloadTool(url, dest, auth) {
|
function downloadTool(url, dest, auth, headers) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
dest = dest || path.join(_getTempDirectory(), v4_1.default());
|
dest = dest || path.join(_getTempDirectory(), v4_1.default());
|
||||||
yield io.mkdirP(path.dirname(dest));
|
yield io.mkdirP(path.dirname(dest));
|
||||||
@ -3924,7 +4018,7 @@ function downloadTool(url, dest, auth) {
|
|||||||
const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);
|
const maxSeconds = _getGlobal('TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS', 20);
|
||||||
const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);
|
const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds);
|
||||||
return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
|
return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
|
||||||
return yield downloadToolAttempt(url, dest || '', auth);
|
return yield downloadToolAttempt(url, dest || '', auth, headers);
|
||||||
}), (err) => {
|
}), (err) => {
|
||||||
if (err instanceof HTTPError && err.httpStatusCode) {
|
if (err instanceof HTTPError && err.httpStatusCode) {
|
||||||
// Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests
|
// Don't retry anything less than 500, except 408 Request Timeout and 429 Too Many Requests
|
||||||
@ -3940,7 +4034,7 @@ function downloadTool(url, dest, auth) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.downloadTool = downloadTool;
|
exports.downloadTool = downloadTool;
|
||||||
function downloadToolAttempt(url, dest, auth) {
|
function downloadToolAttempt(url, dest, auth, headers) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
if (fs.existsSync(dest)) {
|
if (fs.existsSync(dest)) {
|
||||||
throw new Error(`Destination file path ${dest} already exists`);
|
throw new Error(`Destination file path ${dest} already exists`);
|
||||||
@ -3949,12 +4043,12 @@ function downloadToolAttempt(url, dest, auth) {
|
|||||||
const http = new httpm.HttpClient(userAgent, [], {
|
const http = new httpm.HttpClient(userAgent, [], {
|
||||||
allowRetries: false
|
allowRetries: false
|
||||||
});
|
});
|
||||||
let headers;
|
|
||||||
if (auth) {
|
if (auth) {
|
||||||
core.debug('set auth');
|
core.debug('set auth');
|
||||||
headers = {
|
if (headers === undefined) {
|
||||||
authorization: auth
|
headers = {};
|
||||||
};
|
}
|
||||||
|
headers.authorization = auth;
|
||||||
}
|
}
|
||||||
const response = yield http.get(url, headers);
|
const response = yield http.get(url, headers);
|
||||||
if (response.message.statusCode !== 200) {
|
if (response.message.statusCode !== 200) {
|
||||||
@ -4112,6 +4206,7 @@ function extractTar(file, dest, flags = 'xz') {
|
|||||||
if (isGnuTar) {
|
if (isGnuTar) {
|
||||||
// Suppress warnings when using GNU tar to extract archives created by BSD tar
|
// Suppress warnings when using GNU tar to extract archives created by BSD tar
|
||||||
args.push('--warning=no-unknown-keyword');
|
args.push('--warning=no-unknown-keyword');
|
||||||
|
args.push('--overwrite');
|
||||||
}
|
}
|
||||||
args.push('-C', destArg, '-f', fileArg);
|
args.push('-C', destArg, '-f', fileArg);
|
||||||
yield exec_1.exec(`tar`, args);
|
yield exec_1.exec(`tar`, args);
|
||||||
@ -4177,20 +4272,50 @@ function extractZipWin(file, dest) {
|
|||||||
// build the powershell command
|
// build the powershell command
|
||||||
const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines
|
const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ''); // double-up single quotes, remove double quotes and newlines
|
||||||
const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, '');
|
const escapedDest = dest.replace(/'/g, "''").replace(/"|\n|\r/g, '');
|
||||||
const command = `$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}')`;
|
const pwshPath = yield io.which('pwsh', false);
|
||||||
// run powershell
|
//To match the file overwrite behavior on nix systems, we use the overwrite = true flag for ExtractToDirectory
|
||||||
const powershellPath = yield io.which('powershell', true);
|
//and the -Force flag for Expand-Archive as a fallback
|
||||||
const args = [
|
if (pwshPath) {
|
||||||
'-NoLogo',
|
//attempt to use pwsh with ExtractToDirectory, if this fails attempt Expand-Archive
|
||||||
'-Sta',
|
const pwshCommand = [
|
||||||
'-NoProfile',
|
`$ErrorActionPreference = 'Stop' ;`,
|
||||||
'-NonInteractive',
|
`try { Add-Type -AssemblyName System.IO.Compression.ZipFile } catch { } ;`,
|
||||||
'-ExecutionPolicy',
|
`try { [System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`,
|
||||||
'Unrestricted',
|
`catch { if (($_.Exception.GetType().FullName -eq 'System.Management.Automation.MethodException') -or ($_.Exception.GetType().FullName -eq 'System.Management.Automation.RuntimeException') ){ Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force } else { throw $_ } } ;`
|
||||||
'-Command',
|
].join(' ');
|
||||||
command
|
const args = [
|
||||||
];
|
'-NoLogo',
|
||||||
yield exec_1.exec(`"${powershellPath}"`, args);
|
'-NoProfile',
|
||||||
|
'-NonInteractive',
|
||||||
|
'-ExecutionPolicy',
|
||||||
|
'Unrestricted',
|
||||||
|
'-Command',
|
||||||
|
pwshCommand
|
||||||
|
];
|
||||||
|
core.debug(`Using pwsh at path: ${pwshPath}`);
|
||||||
|
yield exec_1.exec(`"${pwshPath}"`, args);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
const powershellCommand = [
|
||||||
|
`$ErrorActionPreference = 'Stop' ;`,
|
||||||
|
`try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ;`,
|
||||||
|
`if ((Get-Command -Name Expand-Archive -Module Microsoft.PowerShell.Archive -ErrorAction Ignore)) { Expand-Archive -LiteralPath '${escapedFile}' -DestinationPath '${escapedDest}' -Force }`,
|
||||||
|
`else {[System.IO.Compression.ZipFile]::ExtractToDirectory('${escapedFile}', '${escapedDest}', $true) }`
|
||||||
|
].join(' ');
|
||||||
|
const args = [
|
||||||
|
'-NoLogo',
|
||||||
|
'-Sta',
|
||||||
|
'-NoProfile',
|
||||||
|
'-NonInteractive',
|
||||||
|
'-ExecutionPolicy',
|
||||||
|
'Unrestricted',
|
||||||
|
'-Command',
|
||||||
|
powershellCommand
|
||||||
|
];
|
||||||
|
const powershellPath = yield io.which('powershell', true);
|
||||||
|
core.debug(`Using powershell at path: ${powershellPath}`);
|
||||||
|
yield exec_1.exec(`"${powershellPath}"`, args);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function extractZipNix(file, dest) {
|
function extractZipNix(file, dest) {
|
||||||
@ -4200,6 +4325,7 @@ function extractZipNix(file, dest) {
|
|||||||
if (!core.isDebug()) {
|
if (!core.isDebug()) {
|
||||||
args.unshift('-q');
|
args.unshift('-q');
|
||||||
}
|
}
|
||||||
|
args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run
|
||||||
yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest });
|
yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -4282,9 +4408,9 @@ function find(toolName, versionSpec, arch) {
|
|||||||
}
|
}
|
||||||
arch = arch || os.arch();
|
arch = arch || os.arch();
|
||||||
// attempt to resolve an explicit version
|
// attempt to resolve an explicit version
|
||||||
if (!_isExplicitVersion(versionSpec)) {
|
if (!isExplicitVersion(versionSpec)) {
|
||||||
const localVersions = findAllVersions(toolName, arch);
|
const localVersions = findAllVersions(toolName, arch);
|
||||||
const match = _evaluateVersions(localVersions, versionSpec);
|
const match = evaluateVersions(localVersions, versionSpec);
|
||||||
versionSpec = match;
|
versionSpec = match;
|
||||||
}
|
}
|
||||||
// check for the explicit version in the cache
|
// check for the explicit version in the cache
|
||||||
@ -4317,7 +4443,7 @@ function findAllVersions(toolName, arch) {
|
|||||||
if (fs.existsSync(toolPath)) {
|
if (fs.existsSync(toolPath)) {
|
||||||
const children = fs.readdirSync(toolPath);
|
const children = fs.readdirSync(toolPath);
|
||||||
for (const child of children) {
|
for (const child of children) {
|
||||||
if (_isExplicitVersion(child)) {
|
if (isExplicitVersion(child)) {
|
||||||
const fullPath = path.join(toolPath, child, arch || '');
|
const fullPath = path.join(toolPath, child, arch || '');
|
||||||
if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {
|
if (fs.existsSync(fullPath) && fs.existsSync(`${fullPath}.complete`)) {
|
||||||
versions.push(child);
|
versions.push(child);
|
||||||
@ -4400,14 +4526,26 @@ function _completeToolPath(tool, version, arch) {
|
|||||||
fs.writeFileSync(markerPath, '');
|
fs.writeFileSync(markerPath, '');
|
||||||
core.debug('finished caching tool');
|
core.debug('finished caching tool');
|
||||||
}
|
}
|
||||||
function _isExplicitVersion(versionSpec) {
|
/**
|
||||||
|
* Check if version string is explicit
|
||||||
|
*
|
||||||
|
* @param versionSpec version string to check
|
||||||
|
*/
|
||||||
|
function isExplicitVersion(versionSpec) {
|
||||||
const c = semver.clean(versionSpec) || '';
|
const c = semver.clean(versionSpec) || '';
|
||||||
core.debug(`isExplicit: ${c}`);
|
core.debug(`isExplicit: ${c}`);
|
||||||
const valid = semver.valid(c) != null;
|
const valid = semver.valid(c) != null;
|
||||||
core.debug(`explicit? ${valid}`);
|
core.debug(`explicit? ${valid}`);
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
function _evaluateVersions(versions, versionSpec) {
|
exports.isExplicitVersion = isExplicitVersion;
|
||||||
|
/**
|
||||||
|
* Get the highest satisfiying semantic version in `versions` which satisfies `versionSpec`
|
||||||
|
*
|
||||||
|
* @param versions array of versions to evaluate
|
||||||
|
* @param versionSpec semantic version spec to satisfy
|
||||||
|
*/
|
||||||
|
function evaluateVersions(versions, versionSpec) {
|
||||||
let version = '';
|
let version = '';
|
||||||
core.debug(`evaluating ${versions.length} versions`);
|
core.debug(`evaluating ${versions.length} versions`);
|
||||||
versions = versions.sort((a, b) => {
|
versions = versions.sort((a, b) => {
|
||||||
@ -4432,6 +4570,7 @@ function _evaluateVersions(versions, versionSpec) {
|
|||||||
}
|
}
|
||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
exports.evaluateVersions = evaluateVersions;
|
||||||
/**
|
/**
|
||||||
* Gets RUNNER_TOOL_CACHE
|
* Gets RUNNER_TOOL_CACHE
|
||||||
*/
|
*/
|
||||||
@ -5474,6 +5613,25 @@ exports.checkBypass = checkBypass;
|
|||||||
|
|
||||||
"use strict";
|
"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.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
||||||
|
__setModuleDefault(result, mod);
|
||||||
|
return result;
|
||||||
|
};
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
@ -5483,14 +5641,8 @@ 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 __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 });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.RetryHelper = void 0;
|
||||||
const core = __importStar(__webpack_require__(470));
|
const core = __importStar(__webpack_require__(470));
|
||||||
/**
|
/**
|
||||||
* Internal class for retries
|
* Internal class for retries
|
||||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
11578
package-lock.json
generated
11578
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
@ -25,25 +25,25 @@
|
|||||||
"author": "DeLaGuardo",
|
"author": "DeLaGuardo",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.7",
|
"@actions/core": "^1.3.0",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.0.4",
|
||||||
"@actions/io": "^1.1.0",
|
"@actions/io": "^1.1.0",
|
||||||
"@actions/tool-cache": "^1.6.1"
|
"@actions/tool-cache": "^1.7.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.23",
|
"@types/jest": "^26.0.23",
|
||||||
"@types/node": "^15.0.2",
|
"@types/node": "^15.6.1",
|
||||||
"@types/semver": "^7.3.5",
|
"@types/semver": "^7.3.6",
|
||||||
"@typescript-eslint/parser": "^4.22.1",
|
"@typescript-eslint/parser": "^4.26.0",
|
||||||
"@zeit/ncc": "^0.22.3",
|
"@zeit/ncc": "^0.22.3",
|
||||||
"eslint": "^7.26.0",
|
"eslint": "^7.27.0",
|
||||||
"eslint-plugin-github": "^4.1.3",
|
"eslint-plugin-github": "^4.1.3",
|
||||||
"eslint-plugin-jest": "^24.3.6",
|
"eslint-plugin-jest": "^24.3.6",
|
||||||
"jest": "^26.6.3",
|
"jest": "^27.0.3",
|
||||||
"jest-circus": "^26.6.3",
|
"jest-circus": "^27.0.3",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"prettier": "2.3.0",
|
"prettier": "2.3.0",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^27.0.2",
|
||||||
"typescript": "^4.2.4"
|
"typescript": "^4.3.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ async function installBoot(
|
|||||||
await io.mv(bin, path.join(binDir, `boot`))
|
await io.mv(bin, path.join(binDir, `boot`))
|
||||||
fs.chmodSync(path.join(binDir, `boot`), '0755')
|
fs.chmodSync(path.join(binDir, `boot`), '0755')
|
||||||
|
|
||||||
let env: {[key: string]: string} = {};
|
let env: {[key: string]: string} = {}
|
||||||
if (version === 'latest') {
|
if (version === 'latest') {
|
||||||
env = {
|
env = {
|
||||||
BOOT_HOME: path.join(destinationFolder, 'boot')
|
BOOT_HOME: path.join(destinationFolder, 'boot')
|
||||||
@ -87,10 +87,10 @@ async function installBoot(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (process.env['PATH']) {
|
if (process.env['PATH']) {
|
||||||
env['PATH'] = process.env['PATH']
|
env['PATH'] = process.env['PATH']
|
||||||
}
|
}
|
||||||
if (process.env['JAVA_CMD']) {
|
if (process.env['JAVA_CMD']) {
|
||||||
env['JAVA_CMD'] = process.env['JAVA_CMD']
|
env['JAVA_CMD'] = process.env['JAVA_CMD']
|
||||||
}
|
}
|
||||||
|
|
||||||
await exec.exec(`./boot ${version === 'latest' ? '-u' : '-V'}`, [], {
|
await exec.exec(`./boot ${version === 'latest' ? '-u' : '-V'}`, [], {
|
||||||
|
@ -65,20 +65,20 @@ async function installLeiningen(
|
|||||||
? 'powershell .\\lein.ps1 self-install'
|
? 'powershell .\\lein.ps1 self-install'
|
||||||
: './lein version'
|
: './lein version'
|
||||||
|
|
||||||
let env: {[key: string]: string} = {
|
const env: {[key: string]: string} = {
|
||||||
LEIN_HOME: path.join(destinationFolder, 'leiningen'),
|
LEIN_HOME: path.join(destinationFolder, 'leiningen')
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env['PATH']) {
|
if (process.env['PATH']) {
|
||||||
env['PATH'] = process.env['PATH']
|
env['PATH'] = process.env['PATH']
|
||||||
}
|
}
|
||||||
if (process.env['JAVA_CMD']) {
|
if (process.env['JAVA_CMD']) {
|
||||||
env['JAVA_CMD'] = process.env['JAVA_CMD']
|
env['JAVA_CMD'] = process.env['JAVA_CMD']
|
||||||
}
|
}
|
||||||
|
|
||||||
await exec.exec(version_cmd, [], {
|
await exec.exec(version_cmd, [], {
|
||||||
cwd: path.join(destinationFolder, 'leiningen', 'bin'),
|
cwd: path.join(destinationFolder, 'leiningen', 'bin'),
|
||||||
env: env
|
env
|
||||||
})
|
})
|
||||||
|
|
||||||
return path.join(destinationFolder, 'leiningen')
|
return path.join(destinationFolder, 'leiningen')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user