@actions/core
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -50,2 +50,11 @@ /** | ||
/** | ||
* Gets the values of an multiline input. Each value is also trimmed. | ||
* | ||
* @param name name of the input to get | ||
* @param options optional. See InputOptions. | ||
* @returns string[] | ||
* | ||
*/ | ||
export declare function getMultilineInput(name: string, options?: InputOptions): string[]; | ||
/** | ||
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. | ||
@@ -52,0 +61,0 @@ * Support boolean input list: `true | True | TRUE | false | False | FALSE` . |
@@ -31,3 +31,3 @@ "use strict"; | ||
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; | ||
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; | ||
const command_1 = require("./command"); | ||
@@ -119,2 +119,17 @@ const file_command_1 = require("./file-command"); | ||
/** | ||
* Gets the values of an multiline input. Each value is also trimmed. | ||
* | ||
* @param name name of the input to get | ||
* @param options optional. See InputOptions. | ||
* @returns string[] | ||
* | ||
*/ | ||
function getMultilineInput(name, options) { | ||
const inputs = getInput(name, options) | ||
.split('\n') | ||
.filter(x => x !== ''); | ||
return inputs; | ||
} | ||
exports.getMultilineInput = getMultilineInput; | ||
/** | ||
* Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. | ||
@@ -121,0 +136,0 @@ * Support boolean input list: `true | True | TRUE | false | False | FALSE` . |
{ | ||
"name": "@actions/core", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Actions core lib", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -26,2 +26,3 @@ # `@actions/core` | ||
const myBooleanInput = core.getBooleanInput('booleanInputName', { required: true }); | ||
const myMultilineInput = core.getMultilineInput('multilineInputName', { required: true }); | ||
core.setOutput('outputKey', 'outputVal'); | ||
@@ -28,0 +29,0 @@ ``` |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35969
613
210