From ee124b1288886006e1101adf3bdbd25983eb73d0 Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Tue, 11 Oct 2022 17:33:09 -0400 Subject: [PATCH] Update dist --- dist/index.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0fb19de1..833caf19 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2915,14 +2915,14 @@ exports.create = create; * @param patterns Patterns separated by newlines * @param options Glob options */ -function hashFiles(patterns, options) { +function hashFiles(patterns, options, verbose = false) { return __awaiter(this, void 0, void 0, function* () { let followSymbolicLinks = true; if (options && typeof options.followSymbolicLinks === 'boolean') { followSymbolicLinks = options.followSymbolicLinks; } const globber = yield create(patterns, { followSymbolicLinks }); - return internal_hash_files_1.hashFiles(globber); + return internal_hash_files_1.hashFiles(globber, verbose); }); } exports.hashFiles = hashFiles; @@ -9095,10 +9095,11 @@ const fs = __importStar(__webpack_require__(747)); const stream = __importStar(__webpack_require__(413)); const util = __importStar(__webpack_require__(669)); const path = __importStar(__webpack_require__(622)); -function hashFiles(globber) { +function hashFiles(globber, verbose = false) { var e_1, _a; var _b; return __awaiter(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core.info : core.debug; let hasMatch = false; const githubWorkspace = (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd(); const result = crypto.createHash('sha256'); @@ -9106,13 +9107,13 @@ function hashFiles(globber) { try { for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) { const file = _d.value; - core.debug(file); + writeDelegate(file); if (!file.startsWith(`${githubWorkspace}${path.sep}`)) { - core.debug(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } if (fs.statSync(file).isDirectory()) { - core.debug(`Skip directory '${file}'.`); + writeDelegate(`Skip directory '${file}'.`); continue; } const hash = crypto.createHash('sha256'); @@ -9134,11 +9135,11 @@ function hashFiles(globber) { } result.end(); if (hasMatch) { - core.debug(`Found ${count} files to hash.`); + writeDelegate(`Found ${count} files to hash.`); return result.digest('hex'); } else { - core.debug(`No matches found for glob`); + writeDelegate(`No matches found for glob`); return ''; } });