Add more log messages

This commit is contained in:
Riccardo Rigutini 2023-08-14 08:42:22 +00:00
parent e378d12e74
commit b7bc514a9a
3 changed files with 5 additions and 5 deletions

4
dist/index.js generated vendored
View File

@ -35,10 +35,10 @@ function run() {
return;
}
(0, core_1.info)(`Found ${filePaths.length} files for the given pattern.`);
(0, core_1.info)(`Replacing text...`);
(0, core_1.info)(`Replacing "${searchText}" with "${replaceText}".`);
const encoding = inputEncoding;
const promises = filePaths.map((filePath) => __awaiter(this, void 0, void 0, function* () {
(0, core_1.debug)(`Replacing text in file ${filePath}`);
(0, core_1.info)(`Replacing text in file ${filePath}`);
yield (0, utils_1.replaceTextInFile)(filePath, searchText, replaceText, encoding);
}));
yield Promise.all(promises);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -25,12 +25,12 @@ async function run(): Promise<void> {
}
info(`Found ${filePaths.length} files for the given pattern.`);
info(`Replacing text...`);
info(`Replacing "${searchText}" with "${replaceText}".`);
const encoding = inputEncoding as Encoding;
const promises: Promise<void>[] = filePaths.map(
async (filePath: string) => {
debug(`Replacing text in file ${filePath}`);
info(`Replacing text in file ${filePath}`);
await replaceTextInFile(filePath, searchText, replaceText, encoding);
},
);