From 7555e2dfd82f1139e5e078e95b4c616f88e0ed2f Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 26 Jun 2023 22:26:43 -0700 Subject: [PATCH] refactor: Update logging. --- src/lib/command.ts | 4 +--- src/lib/configuration/loader.ts | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/command.ts b/src/lib/command.ts index c59f9be..27560a0 100644 --- a/src/lib/command.ts +++ b/src/lib/command.ts @@ -128,8 +128,6 @@ export default function buildCommand< }); if (configResult) { - log.verbose(`Loaded configuration file from ${log.chalk.green(configResult.filepath)}.`); - if (configResult.config) { context.config = camelcaseKeys(configResult.config, { deep: true }); } @@ -147,7 +145,7 @@ export default function buildCommand< } }); } else { - log.warn(log.prefix('loadConfiguration'), `Cannot merge configuration of type "${typeof configResult.config}" with arguments.`); + log.warn(log.prefix('handler'), `Auto-configuration is enabled, but the command's arguments (type "object") cannot merged with configuration of type "${typeof configResult.config}".`); } } } diff --git a/src/lib/configuration/loader.ts b/src/lib/configuration/loader.ts index 5bf881f..a4681fb 100644 --- a/src/lib/configuration/loader.ts +++ b/src/lib/configuration/loader.ts @@ -16,6 +16,8 @@ import { getPackageInfo } from 'lib/package'; export default async function configurationLoader(filePath: string /* , content: string */) { const errors: Array = []; + log.verbose(log.prefix('configurationLoader'), `Using configuration file: ${log.chalk.green(filePath)}`); + const pkgInfo = getPackageInfo({ cwd: path.dirname(filePath) }); if (!pkgInfo?.root) throw new Error(`${log.prefix('configurationLoader')} Unable to compute host package root directory.`);