Skip to content

Commit 77db83e

Browse files
author
GitHub Actions
committed
chore: Update dist
1 parent 7e1dbf6 commit 77db83e

File tree

2 files changed

+188
-24
lines changed

2 files changed

+188
-24
lines changed

dist/cleanup/index.js

Lines changed: 94 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ module.exports =
5757
// We use any as a valid input type
5858
/* eslint-disable @typescript-eslint/no-explicit-any */
5959
Object.defineProperty(exports, "__esModule", { value: true });
60+
exports.toCommandValue = void 0;
6061
/**
6162
* Sanitizes an input into a string so it can be passed into issueCommand safely
6263
* @param input input to sanitize into a string
@@ -88,14 +89,27 @@ module.exports = require("os");
8889
"use strict";
8990

9091
// For internal use, subject to change.
92+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
93+
if (k2 === undefined) k2 = k;
94+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
95+
}) : (function(o, m, k, k2) {
96+
if (k2 === undefined) k2 = k;
97+
o[k2] = m[k];
98+
}));
99+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
100+
Object.defineProperty(o, "default", { enumerable: true, value: v });
101+
}) : function(o, v) {
102+
o["default"] = v;
103+
});
91104
var __importStar = (this && this.__importStar) || function (mod) {
92105
if (mod && mod.__esModule) return mod;
93106
var result = {};
94-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
95-
result["default"] = mod;
107+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
108+
__setModuleDefault(result, mod);
96109
return result;
97110
};
98111
Object.defineProperty(exports, "__esModule", { value: true });
112+
exports.issueCommand = void 0;
99113
// We use any as a valid input type
100114
/* eslint-disable @typescript-eslint/no-explicit-any */
101115
const fs = __importStar(__webpack_require__(747));
@@ -166,14 +180,27 @@ if (require.main === require.cache[eval('__filename')]) {
166180

167181
"use strict";
168182

183+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
184+
if (k2 === undefined) k2 = k;
185+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
186+
}) : (function(o, m, k, k2) {
187+
if (k2 === undefined) k2 = k;
188+
o[k2] = m[k];
189+
}));
190+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
191+
Object.defineProperty(o, "default", { enumerable: true, value: v });
192+
}) : function(o, v) {
193+
o["default"] = v;
194+
});
169195
var __importStar = (this && this.__importStar) || function (mod) {
170196
if (mod && mod.__esModule) return mod;
171197
var result = {};
172-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
173-
result["default"] = mod;
198+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
199+
__setModuleDefault(result, mod);
174200
return result;
175201
};
176202
Object.defineProperty(exports, "__esModule", { value: true });
203+
exports.issue = exports.issueCommand = void 0;
177204
const os = __importStar(__webpack_require__(87));
178205
const utils_1 = __webpack_require__(82);
179206
/**
@@ -252,6 +279,25 @@ function escapeProperty(s) {
252279

253280
"use strict";
254281

282+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
283+
if (k2 === undefined) k2 = k;
284+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
285+
}) : (function(o, m, k, k2) {
286+
if (k2 === undefined) k2 = k;
287+
o[k2] = m[k];
288+
}));
289+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
290+
Object.defineProperty(o, "default", { enumerable: true, value: v });
291+
}) : function(o, v) {
292+
o["default"] = v;
293+
});
294+
var __importStar = (this && this.__importStar) || function (mod) {
295+
if (mod && mod.__esModule) return mod;
296+
var result = {};
297+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
298+
__setModuleDefault(result, mod);
299+
return result;
300+
};
255301
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
256302
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
257303
return new (P || (P = Promise))(function (resolve, reject) {
@@ -261,14 +307,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
261307
step((generator = generator.apply(thisArg, _arguments || [])).next());
262308
});
263309
};
264-
var __importStar = (this && this.__importStar) || function (mod) {
265-
if (mod && mod.__esModule) return mod;
266-
var result = {};
267-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
268-
result["default"] = mod;
269-
return result;
270-
};
271310
Object.defineProperty(exports, "__esModule", { value: true });
311+
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.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;
272312
const command_1 = __webpack_require__(431);
273313
const file_command_1 = __webpack_require__(102);
274314
const utils_1 = __webpack_require__(82);
@@ -335,7 +375,9 @@ function addPath(inputPath) {
335375
}
336376
exports.addPath = addPath;
337377
/**
338-
* Gets the value of an input. The value is also trimmed.
378+
* Gets the value of an input.
379+
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
380+
* Returns an empty string if the value is not defined.
339381
*
340382
* @param name name of the input to get
341383
* @param options optional. See InputOptions.
@@ -346,9 +388,49 @@ function getInput(name, options) {
346388
if (options && options.required && !val) {
347389
throw new Error(`Input required and not supplied: ${name}`);
348390
}
391+
if (options && options.trimWhitespace === false) {
392+
return val;
393+
}
349394
return val.trim();
350395
}
351396
exports.getInput = getInput;
397+
/**
398+
* Gets the values of an multiline input. Each value is also trimmed.
399+
*
400+
* @param name name of the input to get
401+
* @param options optional. See InputOptions.
402+
* @returns string[]
403+
*
404+
*/
405+
function getMultilineInput(name, options) {
406+
const inputs = getInput(name, options)
407+
.split('\n')
408+
.filter(x => x !== '');
409+
return inputs;
410+
}
411+
exports.getMultilineInput = getMultilineInput;
412+
/**
413+
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
414+
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
415+
* The return value is also in boolean type.
416+
* ref: https://yaml.org/spec/1.2/spec.html#id2804923
417+
*
418+
* @param name name of the input to get
419+
* @param options optional. See InputOptions.
420+
* @returns boolean
421+
*/
422+
function getBooleanInput(name, options) {
423+
const trueValue = ['true', 'True', 'TRUE'];
424+
const falseValue = ['false', 'False', 'FALSE'];
425+
const val = getInput(name, options);
426+
if (trueValue.includes(val))
427+
return true;
428+
if (falseValue.includes(val))
429+
return false;
430+
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
431+
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
432+
}
433+
exports.getBooleanInput = getBooleanInput;
352434
/**
353435
* Sets the value of an output.
354436
*

dist/index.js

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

0 commit comments

Comments
 (0)