Skip to content

Commit 22c64ac

Browse files
authored
Update @actions/core to 1.2.6 (#449)
1 parent 8819edf commit 22c64ac

5 files changed

Lines changed: 224 additions & 112 deletions

File tree

‎.licenses/npm/@actions/core.dep.yml‎

Lines changed: 10 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/restore/index.js‎

Lines changed: 104 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,31 @@ if (typeof Symbol === undefined || !Symbol.asyncIterator) {
15201520
/* 79 */,
15211521
/* 80 */,
15221522
/* 81 */,
1523-
/* 82 */,
1523+
/* 82 */
1524+
/***/ (function(__unusedmodule, exports) {
1525+
1526+
"use strict";
1527+
1528+
// We use any as a valid input type
1529+
/* eslint-disable @typescript-eslint/no-explicit-any */
1530+
Object.defineProperty(exports, "__esModule", { value: true });
1531+
/**
1532+
* Sanitizes an input into a string so it can be passed into issueCommand safely
1533+
* @param input input to sanitize into a string
1534+
*/
1535+
function toCommandValue(input) {
1536+
if (input === null || input === undefined) {
1537+
return '';
1538+
}
1539+
else if (typeof input === 'string' || input instanceof String) {
1540+
return input;
1541+
}
1542+
return JSON.stringify(input);
1543+
}
1544+
exports.toCommandValue = toCommandValue;
1545+
//# sourceMappingURL=utils.js.map
1546+
1547+
/***/ }),
15241548
/* 83 */,
15251549
/* 84 */,
15261550
/* 85 */,
@@ -2730,31 +2754,38 @@ Object.defineProperty(exports, "__esModule", { value: true });
27302754
/* 100 */,
27312755
/* 101 */,
27322756
/* 102 */
2733-
/***/ (function(__unusedmodule, exports) {
2757+
/***/ (function(__unusedmodule, exports, __webpack_require__) {
27342758

27352759
"use strict";
27362760

2737-
/*
2738-
* Copyright The OpenTelemetry Authors
2739-
*
2740-
* Licensed under the Apache License, Version 2.0 (the "License");
2741-
* you may not use this file except in compliance with the License.
2742-
* You may obtain a copy of the License at
2743-
*
2744-
* https://www.apache.org/licenses/LICENSE-2.0
2745-
*
2746-
* Unless required by applicable law or agreed to in writing, software
2747-
* distributed under the License is distributed on an "AS IS" BASIS,
2748-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2749-
* See the License for the specific language governing permissions and
2750-
* limitations under the License.
2751-
*/
2761+
// For internal use, subject to change.
2762+
var __importStar = (this && this.__importStar) || function (mod) {
2763+
if (mod && mod.__esModule) return mod;
2764+
var result = {};
2765+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
2766+
result["default"] = mod;
2767+
return result;
2768+
};
27522769
Object.defineProperty(exports, "__esModule", { value: true });
2753-
exports._globalThis = void 0;
2754-
/** only globals that common to node and browsers are allowed */
2755-
// eslint-disable-next-line node/no-unsupported-features/es-builtins
2756-
exports._globalThis = typeof globalThis === 'object' ? globalThis : global;
2757-
//# sourceMappingURL=globalThis.js.map
2770+
// We use any as a valid input type
2771+
/* eslint-disable @typescript-eslint/no-explicit-any */
2772+
const fs = __importStar(__webpack_require__(747));
2773+
const os = __importStar(__webpack_require__(87));
2774+
const utils_1 = __webpack_require__(82);
2775+
function issueCommand(command, message) {
2776+
const filePath = process.env[`GITHUB_${command}`];
2777+
if (!filePath) {
2778+
throw new Error(`Unable to find environment variable for file command ${command}`);
2779+
}
2780+
if (!fs.existsSync(filePath)) {
2781+
throw new Error(`Missing file at path: ${filePath}`);
2782+
}
2783+
fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {
2784+
encoding: 'utf8'
2785+
});
2786+
}
2787+
exports.issueCommand = issueCommand;
2788+
//# sourceMappingURL=file-command.js.map
27582789

27592790
/***/ }),
27602791
/* 103 */,
@@ -3992,7 +4023,34 @@ var __createBinding;
39924023

39934024

39944025
/***/ }),
3995-
/* 145 */,
4026+
/* 145 */
4027+
/***/ (function(__unusedmodule, exports) {
4028+
4029+
"use strict";
4030+
4031+
/*
4032+
* Copyright The OpenTelemetry Authors
4033+
*
4034+
* Licensed under the Apache License, Version 2.0 (the "License");
4035+
* you may not use this file except in compliance with the License.
4036+
* You may obtain a copy of the License at
4037+
*
4038+
* https://www.apache.org/licenses/LICENSE-2.0
4039+
*
4040+
* Unless required by applicable law or agreed to in writing, software
4041+
* distributed under the License is distributed on an "AS IS" BASIS,
4042+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4043+
* See the License for the specific language governing permissions and
4044+
* limitations under the License.
4045+
*/
4046+
Object.defineProperty(exports, "__esModule", { value: true });
4047+
exports._globalThis = void 0;
4048+
/** only globals that common to node and browsers are allowed */
4049+
// eslint-disable-next-line node/no-unsupported-features/es-builtins
4050+
exports._globalThis = typeof globalThis === 'object' ? globalThis : global;
4051+
//# sourceMappingURL=globalThis.js.map
4052+
4053+
/***/ }),
39964054
/* 146 */,
39974055
/* 147 */
39984056
/***/ (function(__unusedmodule, exports) {
@@ -36521,6 +36579,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
3652136579
};
3652236580
Object.defineProperty(exports, "__esModule", { value: true });
3652336581
const os = __importStar(__webpack_require__(87));
36582+
const utils_1 = __webpack_require__(82);
3652436583
/**
3652536584
* Commands
3652636585
*
@@ -36574,28 +36633,14 @@ class Command {
3657436633
return cmdStr;
3657536634
}
3657636635
}
36577-
/**
36578-
* Sanitizes an input into a string so it can be passed into issueCommand safely
36579-
* @param input input to sanitize into a string
36580-
*/
36581-
function toCommandValue(input) {
36582-
if (input === null || input === undefined) {
36583-
return '';
36584-
}
36585-
else if (typeof input === 'string' || input instanceof String) {
36586-
return input;
36587-
}
36588-
return JSON.stringify(input);
36589-
}
36590-
exports.toCommandValue = toCommandValue;
3659136636
function escapeData(s) {
36592-
return toCommandValue(s)
36637+
return utils_1.toCommandValue(s)
3659336638
.replace(/%/g, '%25')
3659436639
.replace(/\r/g, '%0D')
3659536640
.replace(/\n/g, '%0A');
3659636641
}
3659736642
function escapeProperty(s) {
36598-
return toCommandValue(s)
36643+
return utils_1.toCommandValue(s)
3659936644
.replace(/%/g, '%25')
3660036645
.replace(/\r/g, '%0D')
3660136646
.replace(/\n/g, '%0A')
@@ -38967,6 +39012,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
3896739012
};
3896839013
Object.defineProperty(exports, "__esModule", { value: true });
3896939014
const command_1 = __webpack_require__(431);
39015+
const file_command_1 = __webpack_require__(102);
39016+
const utils_1 = __webpack_require__(82);
3897039017
const os = __importStar(__webpack_require__(87));
3897139018
const path = __importStar(__webpack_require__(622));
3897239019
/**
@@ -38993,9 +39040,17 @@ var ExitCode;
3899339040
*/
3899439041
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3899539042
function exportVariable(name, val) {
38996-
const convertedVal = command_1.toCommandValue(val);
39043+
const convertedVal = utils_1.toCommandValue(val);
3899739044
process.env[name] = convertedVal;
38998-
command_1.issueCommand('set-env', { name }, convertedVal);
39045+
const filePath = process.env['GITHUB_ENV'] || '';
39046+
if (filePath) {
39047+
const delimiter = '_GitHubActionsFileCommandDelimeter_';
39048+
const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
39049+
file_command_1.issueCommand('ENV', commandValue);
39050+
}
39051+
else {
39052+
command_1.issueCommand('set-env', { name }, convertedVal);
39053+
}
3899939054
}
3900039055
exports.exportVariable = exportVariable;
3900139056
/**
@@ -39011,7 +39066,13 @@ exports.setSecret = setSecret;
3901139066
* @param inputPath
3901239067
*/
3901339068
function addPath(inputPath) {
39014-
command_1.issueCommand('add-path', {}, inputPath);
39069+
const filePath = process.env['GITHUB_PATH'] || '';
39070+
if (filePath) {
39071+
file_command_1.issueCommand('PATH', inputPath);
39072+
}
39073+
else {
39074+
command_1.issueCommand('add-path', {}, inputPath);
39075+
}
3901539076
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
3901639077
}
3901739078
exports.addPath = addPath;
@@ -45375,7 +45436,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
4537545436
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
4537645437
};
4537745438
Object.defineProperty(exports, "__esModule", { value: true });
45378-
__exportStar(__webpack_require__(102), exports);
45439+
__exportStar(__webpack_require__(145), exports);
4537945440
//# sourceMappingURL=index.js.map
4538045441

4538145442
/***/ }),

0 commit comments

Comments
 (0)