diff --git a/.changeset/gold-squids-watch.md b/.changeset/gold-squids-watch.md new file mode 100644 index 000000000..c952ff432 --- /dev/null +++ b/.changeset/gold-squids-watch.md @@ -0,0 +1,8 @@ +--- +'@verdaccio/server': patch +'@verdaccio/store': patch +'@verdaccio/auth': patch +'@verdaccio/web': patch +--- + +chore: add info to log when audit, htpasswd, theme are used diff --git a/packages/auth/src/auth.ts b/packages/auth/src/auth.ts index 47c6ffcbf..277206ffe 100644 --- a/packages/auth/src/auth.ts +++ b/packages/auth/src/auth.ts @@ -94,6 +94,10 @@ class Auth implements IAuthMiddleware, TokenEncryption, pluginUtils.IBasicAuth { { file: './htpasswd' }, pluginOptions as any as pluginUtils.PluginOptions ); + this.logger.info( + { name: 'verdaccio-htpasswd', pluginCategory: PLUGIN_CATEGORY.AUTHENTICATION }, + 'plugin @{name} successfully loaded (@{pluginCategory})' + ); } catch (error: any) { debug('error on loading auth htpasswd plugin stack: %o', error); this.logger.info({}, 'no auth plugin has been found'); diff --git a/packages/server/express/src/server.ts b/packages/server/express/src/server.ts index b96f68de7..848754444 100644 --- a/packages/server/express/src/server.ts +++ b/packages/server/express/src/server.ts @@ -78,9 +78,15 @@ const defineAPI = async function (config: IConfig, storage: Storage): Promise) => { @@ -97,7 +103,7 @@ const defineAPI = async function (config: IConfig, storage: Storage): Promise 1) { - logger.warn('multiple ui themes are not supported , only the first plugin is used used'); + logger.warn('multiple ui themes are not supported; only the first plugin is used'); } return _.head(plugin); } } -export default async (config, auth, storage) => { - const pluginOptions = (await loadTheme(config)) || require('@verdaccio/ui-theme')(config.web); +export default async (config, auth, storage, logger) => { + let pluginOptions = await loadTheme(config); + if (!pluginOptions) { + pluginOptions = require('@verdaccio/ui-theme')(config.web); + logger.info( + { name: '@verdaccio/ui-theme', pluginCategory: PLUGIN_CATEGORY.THEME }, + 'plugin @{name} successfully loaded (@{pluginCategory})' + ); + } // eslint-disable-next-line new-cap const router = express.Router();