Skip to content

Commit 0352cda

Browse files
committed
prepare publish: add verbose option
1 parent 54ba6fc commit 0352cda

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

bin/cli.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ program.command('compile-library', 'Compile library')
4040
program.command('prepare-publish', 'Compile and update')
4141
.configure({ visible: false, strictOptions: false })
4242
.option('--library <library>', 'Library name', { required: false, validator: program.STRING })
43+
.option('--verbose', 'Enable verbose logging', { required: false, validator: program.BOOLEAN, default: false })
4344
.action(async ({ logger, args, options }) => {
45+
if (options.verbose) {
46+
logger.level = "debug";
47+
logger.silent = false;
48+
}
49+
4450
logger.info('Preparing package to publish...');
4551
await updateNpmdef({ logger });
4652
await compile({ logger });

src/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export function tryGatherFullErrorLog(errorString, options = {}) {
5959
} catch (e) {
6060
options?.logger?.error(`Failed to read log file at ${logfilePath}: ${e.message}`);
6161
}
62-
62+
}
63+
else {
64+
options?.logger?.debug(`No complete log file path found in error message.`);
6365
}
6466
return null;
6567
}

0 commit comments

Comments
 (0)