Add color

This commit is contained in:
Varun Sharma 2021-11-25 16:29:46 -08:00
commit b1777d55ae
5 changed files with 9 additions and 5 deletions

2
dist/index.js vendored
View file

@ -26,7 +26,7 @@ __nccwpck_require__.r(__webpack_exports__);
;// CONCATENATED MODULE: ./src/common.ts
function printInfo(web_url) {
console.log("View security insights and recommended policy at:");
console.log("\x1b[32m%s\x1b[0m", "View security insights and recommended policy at:");
console.log(`${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`);
}

2
dist/index.js.map vendored
View file

@ -1 +1 @@
{"version":3,"file":"index.js","sources":["../webpack://step-security-harden-runner/webpack/bootstrap","../webpack://step-security-harden-runner/webpack/runtime/make namespace object","../webpack://step-security-harden-runner/webpack/runtime/compat","../webpack://step-security-harden-runner/./src/common.ts","../webpack://step-security-harden-runner/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","export function printInfo(web_url) {\n console.log(\"View security insights and recommended policy at:\");\n console.log(\n `${web_url}/github/${process.env[\"GITHUB_REPOSITORY\"]}/actions/runs/${process.env[\"GITHUB_RUN_ID\"]}`\n );\n}\n","import { printInfo } from \"./common\";\n\n(async () => {\n if (process.platform !== \"linux\") {\n console.log(\"Only runs on linux\");\n return;\n }\n\n var web_url = \"https://app.stepsecurity.io\";\n printInfo(web_url);\n})();\n"],"mappings":";;AAAA;AACA;AACA;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACNA;AACA;;;;;;;;ACDA;AACA;AACA;AAGA;;;;;;;;;;;;ACLA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;A","sourceRoot":""}
{"version":3,"file":"index.js","sources":["../webpack://step-security-harden-runner/webpack/bootstrap","../webpack://step-security-harden-runner/webpack/runtime/make namespace object","../webpack://step-security-harden-runner/webpack/runtime/compat","../webpack://step-security-harden-runner/./src/common.ts","../webpack://step-security-harden-runner/./src/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","export function printInfo(web_url) {\n console.log(\n \"\\x1b[32m%s\\x1b[0m\",\n \"View security insights and recommended policy at:\"\n );\n\n console.log(\n `${web_url}/github/${process.env[\"GITHUB_REPOSITORY\"]}/actions/runs/${process.env[\"GITHUB_RUN_ID\"]}`\n );\n}\n","import { printInfo } from \"./common\";\n\n(async () => {\n if (process.platform !== \"linux\") {\n console.log(\"Only runs on linux\");\n return;\n }\n\n var web_url = \"https://app.stepsecurity.io\";\n printInfo(web_url);\n})();\n"],"mappings":";;AAAA;AACA;AACA;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACNA;AACA;;;;;;;;ACDA;AACA;AAKA;AAGA;;;;;;;;;;;;ACTA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;A","sourceRoot":""}

2
dist/pre/index.js vendored
View file

@ -2372,7 +2372,7 @@ const parse = dist/* parse */.Qc;
;// CONCATENATED MODULE: ./src/common.ts
function printInfo(web_url) {
console.log("View security insights and recommended policy at:");
console.log("\x1b[32m%s\x1b[0m", "View security insights and recommended policy at:");
console.log(`${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`);
}

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,9 @@
export function printInfo(web_url) {
console.log("View security insights and recommended policy at:");
console.log(
"\x1b[32m%s\x1b[0m",
"View security insights and recommended policy at:"
);
console.log(
`${web_url}/github/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`
);