From 41046ebd37f800136ef5ff0595b3d5cd302d429e Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Sun, 26 May 2024 14:03:32 -0500 Subject: [PATCH] fix config fn unresolved name --- src/create-publish.mts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/create-publish.mts b/src/create-publish.mts index 3593791..c699658 100644 --- a/src/create-publish.mts +++ b/src/create-publish.mts @@ -79,9 +79,7 @@ for await (const absPath of filePaths) { commandModule = commandModule.default; } - if (typeof config === 'function') { - config = config(absPath, commandModule); - } + try { commandModule = commandModule.getInstance(); @@ -96,6 +94,9 @@ for await (const absPath of filePaths) { commandModule.absPath = absPath; modules.push({ commandModule, config }); } + if (typeof config === 'function') { + config = config(absPath, commandModule); + } } const cacheDir = resolve('./.sern');