Skip to content

Commit 52498ca

Browse files
committed
Bump dependency
1 parent c19ecea commit 52498ca

File tree

1 file changed

+80
-12
lines changed

1 file changed

+80
-12
lines changed

dist/index.js

Lines changed: 80 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,27 @@ run();
2121

2222
"use strict";
2323

24+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
25+
if (k2 === undefined) k2 = k;
26+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
27+
}) : (function(o, m, k, k2) {
28+
if (k2 === undefined) k2 = k;
29+
o[k2] = m[k];
30+
}));
31+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
32+
Object.defineProperty(o, "default", { enumerable: true, value: v });
33+
}) : function(o, v) {
34+
o["default"] = v;
35+
});
2436
var __importStar = (this && this.__importStar) || function (mod) {
2537
if (mod && mod.__esModule) return mod;
2638
var result = {};
27-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
28-
result["default"] = mod;
39+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
40+
__setModuleDefault(result, mod);
2941
return result;
3042
};
3143
Object.defineProperty(exports, "__esModule", ({ value: true }));
44+
exports.issue = exports.issueCommand = void 0;
3245
const os = __importStar(__nccwpck_require__(87));
3346
const utils_1 = __nccwpck_require__(278);
3447
/**
@@ -107,6 +120,25 @@ function escapeProperty(s) {
107120

108121
"use strict";
109122

123+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
124+
if (k2 === undefined) k2 = k;
125+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
126+
}) : (function(o, m, k, k2) {
127+
if (k2 === undefined) k2 = k;
128+
o[k2] = m[k];
129+
}));
130+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
131+
Object.defineProperty(o, "default", { enumerable: true, value: v });
132+
}) : function(o, v) {
133+
o["default"] = v;
134+
});
135+
var __importStar = (this && this.__importStar) || function (mod) {
136+
if (mod && mod.__esModule) return mod;
137+
var result = {};
138+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
139+
__setModuleDefault(result, mod);
140+
return result;
141+
};
110142
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
111143
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
112144
return new (P || (P = Promise))(function (resolve, reject) {
@@ -116,14 +148,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
116148
step((generator = generator.apply(thisArg, _arguments || [])).next());
117149
});
118150
};
119-
var __importStar = (this && this.__importStar) || function (mod) {
120-
if (mod && mod.__esModule) return mod;
121-
var result = {};
122-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
123-
result["default"] = mod;
124-
return result;
125-
};
126151
Object.defineProperty(exports, "__esModule", ({ value: true }));
152+
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;
127153
const command_1 = __nccwpck_require__(351);
128154
const file_command_1 = __nccwpck_require__(717);
129155
const utils_1 = __nccwpck_require__(278);
@@ -190,7 +216,9 @@ function addPath(inputPath) {
190216
}
191217
exports.addPath = addPath;
192218
/**
193-
* Gets the value of an input. The value is also trimmed.
219+
* Gets the value of an input.
220+
* Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
221+
* Returns an empty string if the value is not defined.
194222
*
195223
* @param name name of the input to get
196224
* @param options optional. See InputOptions.
@@ -201,9 +229,34 @@ function getInput(name, options) {
201229
if (options && options.required && !val) {
202230
throw new Error(`Input required and not supplied: ${name}`);
203231
}
232+
if (options && options.trimWhitespace === false) {
233+
return val;
234+
}
204235
return val.trim();
205236
}
206237
exports.getInput = getInput;
238+
/**
239+
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
240+
* Support boolean input list: `true | True | TRUE | false | False | FALSE` .
241+
* The return value is also in boolean type.
242+
* ref: https://yaml.org/spec/1.2/spec.html#id2804923
243+
*
244+
* @param name name of the input to get
245+
* @param options optional. See InputOptions.
246+
* @returns boolean
247+
*/
248+
function getBooleanInput(name, options) {
249+
const trueValue = ['true', 'True', 'TRUE'];
250+
const falseValue = ['false', 'False', 'FALSE'];
251+
const val = getInput(name, options);
252+
if (trueValue.includes(val))
253+
return true;
254+
if (falseValue.includes(val))
255+
return false;
256+
throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name}\n` +
257+
`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``);
258+
}
259+
exports.getBooleanInput = getBooleanInput;
207260
/**
208261
* Sets the value of an output.
209262
*
@@ -212,6 +265,7 @@ exports.getInput = getInput;
212265
*/
213266
// eslint-disable-next-line @typescript-eslint/no-explicit-any
214267
function setOutput(name, value) {
268+
process.stdout.write(os.EOL);
215269
command_1.issueCommand('set-output', { name }, value);
216270
}
217271
exports.setOutput = setOutput;
@@ -353,14 +407,27 @@ exports.getState = getState;
353407
"use strict";
354408

355409
// For internal use, subject to change.
410+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
411+
if (k2 === undefined) k2 = k;
412+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
413+
}) : (function(o, m, k, k2) {
414+
if (k2 === undefined) k2 = k;
415+
o[k2] = m[k];
416+
}));
417+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
418+
Object.defineProperty(o, "default", { enumerable: true, value: v });
419+
}) : function(o, v) {
420+
o["default"] = v;
421+
});
356422
var __importStar = (this && this.__importStar) || function (mod) {
357423
if (mod && mod.__esModule) return mod;
358424
var result = {};
359-
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
360-
result["default"] = mod;
425+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
426+
__setModuleDefault(result, mod);
361427
return result;
362428
};
363429
Object.defineProperty(exports, "__esModule", ({ value: true }));
430+
exports.issueCommand = void 0;
364431
// We use any as a valid input type
365432
/* eslint-disable @typescript-eslint/no-explicit-any */
366433
const fs = __importStar(__nccwpck_require__(747));
@@ -391,6 +458,7 @@ exports.issueCommand = issueCommand;
391458
// We use any as a valid input type
392459
/* eslint-disable @typescript-eslint/no-explicit-any */
393460
Object.defineProperty(exports, "__esModule", ({ value: true }));
461+
exports.toCommandValue = void 0;
394462
/**
395463
* Sanitizes an input into a string so it can be passed into issueCommand safely
396464
* @param input input to sanitize into a string

0 commit comments

Comments
 (0)