From ff78ea69115ad604e7885131785bc3e6ffa8279a Mon Sep 17 00:00:00 2001 From: Marc Bernard <59966492+mbtools@users.noreply.github.com> Date: Wed, 11 Dec 2024 13:40:02 -0500 Subject: [PATCH] chore: local storage debug messages (#4992) --- .changeset/thirty-comics-trade.md | 5 +++++ packages/plugins/local-storage/src/local-fs.ts | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/thirty-comics-trade.md diff --git a/.changeset/thirty-comics-trade.md b/.changeset/thirty-comics-trade.md new file mode 100644 index 000000000..e2caa3a7c --- /dev/null +++ b/.changeset/thirty-comics-trade.md @@ -0,0 +1,5 @@ +--- +'@verdaccio/local-storage': patch +--- + +chore: local storage debug messages diff --git a/packages/plugins/local-storage/src/local-fs.ts b/packages/plugins/local-storage/src/local-fs.ts index 324ad1bf5..51706e008 100644 --- a/packages/plugins/local-storage/src/local-fs.ts +++ b/packages/plugins/local-storage/src/local-fs.ts @@ -170,7 +170,7 @@ export default class LocalFS implements ILocalFSPackageManager { * @param manifest package manifest */ public async createPackage(name: string, manifest: Manifest): Promise { - debug('create a a new package %o', name); + debug('create a new package %o', name); const pathPackage = this._getStorage(packageJSONFileName); try { // https://nodejs.org/dist/latest-v17.x/docs/api/fs.html#file-system-flags @@ -325,7 +325,7 @@ export default class LocalFS implements ILocalFSPackageManager { } }); readStream.on('error', (error) => { - debug('not tarball found %o for %s message %s', pathName, tarballName, error.message); + debug('no tarball found %o for %s message %s', pathName, tarballName, error.message); }); return readStream; } @@ -333,7 +333,6 @@ export default class LocalFS implements ILocalFSPackageManager { private async _readStorageFile(name: string): Promise { debug('reading the file: %o', name); try { - debug('reading the file: %o', name); return await readFilePromise(name); } catch (err: any) { debug('error reading the file: %o with error %o', name, err.message);