mirror of
https://gitea.com/actions/setup-node.git
synced 2025-12-14 12:41:33 +08:00
Merge c955c43bf4 into eff380dfbc
This commit is contained in:
8
dist/cache-save/index.js
vendored
8
dist/cache-save/index.js
vendored
@@ -83849,7 +83849,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
|
||||
exports.defaultIfEmpty = exports.getNpmrcLocation = exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const io = __importStar(__nccwpck_require__(7436));
|
||||
@@ -83947,6 +83947,12 @@ const unique = () => {
|
||||
};
|
||||
};
|
||||
exports.unique = unique;
|
||||
const getNpmrcLocation = () => {
|
||||
return path_1.default.resolve(process.env['RUNNER_TEMP'] || process.cwd(), '.npmrc');
|
||||
};
|
||||
exports.getNpmrcLocation = getNpmrcLocation;
|
||||
const defaultIfEmpty = (input, defaultValue) => input.length === 0 ? defaultValue : input;
|
||||
exports.defaultIfEmpty = defaultIfEmpty;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
34
dist/setup/index.js
vendored
34
dist/setup/index.js
vendored
@@ -94156,6 +94156,29 @@ class CanaryBuild extends base_distribution_prerelease_1.default {
|
||||
exports["default"] = CanaryBuild;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 6572:
|
||||
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.ignoreScriptsInNpmConfig = void 0;
|
||||
const fs_1 = __nccwpck_require__(7147);
|
||||
const util_1 = __nccwpck_require__(2629);
|
||||
const ignoreScriptsInNpmConfig = (ignore) => {
|
||||
const nonEmptyInput = (0, util_1.defaultIfEmpty)(ignore, 'false');
|
||||
const ignored = JSON.parse(nonEmptyInput);
|
||||
appendToNpmrc(ignored);
|
||||
};
|
||||
exports.ignoreScriptsInNpmConfig = ignoreScriptsInNpmConfig;
|
||||
const appendToNpmrc = (ignoreScripts) => {
|
||||
const npmrc = (0, util_1.getNpmrcLocation)();
|
||||
(0, fs_1.writeFileSync)(npmrc, `\nignore-scripts=${ignoreScripts}\n`, { flag: 'a' });
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 399:
|
||||
@@ -94209,6 +94232,7 @@ const cache_utils_1 = __nccwpck_require__(1678);
|
||||
const installer_factory_1 = __nccwpck_require__(5617);
|
||||
const util_1 = __nccwpck_require__(2629);
|
||||
const constants_1 = __nccwpck_require__(9042);
|
||||
const ignore_scripts_1 = __nccwpck_require__(6572);
|
||||
function run() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
try {
|
||||
@@ -94248,6 +94272,8 @@ function run() {
|
||||
if (registryUrl) {
|
||||
auth.configAuthentication(registryUrl, alwaysAuth);
|
||||
}
|
||||
const ignoreScripts = core.getInput('ignore-scripts');
|
||||
(0, ignore_scripts_1.ignoreScriptsInNpmConfig)(ignoreScripts);
|
||||
if (cache && (0, cache_utils_1.isCacheFeatureAvailable)()) {
|
||||
core.saveState(constants_1.State.CachePackageManager, cache);
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path');
|
||||
@@ -94331,7 +94357,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
|
||||
exports.defaultIfEmpty = exports.getNpmrcLocation = exports.unique = exports.printEnvDetailsAndSetOutput = exports.getNodeVersionFromFile = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const io = __importStar(__nccwpck_require__(7436));
|
||||
@@ -94429,6 +94455,12 @@ const unique = () => {
|
||||
};
|
||||
};
|
||||
exports.unique = unique;
|
||||
const getNpmrcLocation = () => {
|
||||
return path_1.default.resolve(process.env['RUNNER_TEMP'] || process.cwd(), '.npmrc');
|
||||
};
|
||||
exports.getNpmrcLocation = getNpmrcLocation;
|
||||
const defaultIfEmpty = (input, defaultValue) => input.length === 0 ? defaultValue : input;
|
||||
exports.defaultIfEmpty = defaultIfEmpty;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
Reference in New Issue
Block a user