javascript-action/dist/index.js.map

1 line
17 KiB
Plaintext
Raw Normal View History

2021-01-15 13:02:50 +00:00
{"version":3,"file":"index.js","sources":["../webpack://javascript-action/./index.js","../webpack://javascript-action/./node_modules/@actions/core/lib/command.js","../webpack://javascript-action/./node_modules/@actions/core/lib/core.js","../webpack://javascript-action/./node_modules/@actions/core/lib/file-command.js","../webpack://javascript-action/./node_modules/@actions/core/lib/utils.js","../webpack://javascript-action/./wait.js","../webpack://javascript-action/external \"fs\"","../webpack://javascript-action/external \"os\"","../webpack://javascript-action/external \"path\"","../webpack://javascript-action/webpack/bootstrap","../webpack://javascript-action/webpack/runtime/compat","../webpack://javascript-action/webpack/startup"],"sourcesContent":["const core = require('@actions/core');\nconst wait = require('./wait');\n\n\n// most @actions toolkit packages have async methods\nasync function run() {\n try {\n const ms = core.getInput('milliseconds');\n core.info(`Waiting ${ms} milliseconds ...`);\n\n core.debug((new Date()).toTimeString()); // debug is only output if you set the secret `ACTIONS_RUNNER_DEBUG` to true\n await wait(parseInt(ms));\n core.info((new Date()).toTimeString());\n\n core.setOutput('time', new Date().toTimeString());\n } catch (error) {\n core.setFailed(error.message);\n }\n}\n\nrun();\n","\"use strict\";\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n