mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-07-28 09:33:49 +07:00
node_modules: upgrade
This commit is contained in:
17
node_modules/@actions/glob/lib/internal-hash-files.js
generated
vendored
17
node_modules/@actions/glob/lib/internal-hash-files.js
generated
vendored
@ -42,24 +42,27 @@ const fs = __importStar(require("fs"));
|
||||
const stream = __importStar(require("stream"));
|
||||
const util = __importStar(require("util"));
|
||||
const path = __importStar(require("path"));
|
||||
function hashFiles(globber) {
|
||||
function hashFiles(globber, currentWorkspace, 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 githubWorkspace = currentWorkspace
|
||||
? currentWorkspace
|
||||
: (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
|
||||
const result = crypto.createHash('sha256');
|
||||
let count = 0;
|
||||
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');
|
||||
@ -81,11 +84,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 '';
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user