add debug logs

This commit is contained in:
Joseph Garrone 2024-10-05 22:28:36 +02:00
parent 49b064b5f2
commit 9e9ffcd586
2 changed files with 8 additions and 1 deletions

View File

@ -168,8 +168,12 @@ program
handler: async ({ projectDirPath }) => { handler: async ({ projectDirPath }) => {
const buildContext = getBuildContext({ projectDirPath }); const buildContext = getBuildContext({ projectDirPath });
console.log("before callHandlerIfAny");
callHandlerIfAny({ buildContext, commandName }); callHandlerIfAny({ buildContext, commandName });
console.log("after callHandlerIfAny");
const { command } = await import("./eject-page"); const { command } = await import("./eject-page");
await command({ buildContext }); await command({ buildContext });

View File

@ -33,7 +33,10 @@ export function callHandlerIfAny(params: {
[CUSTOM_HANDLER_ENV_NAMES.BUILD_CONTEXT]: JSON.stringify(buildContext) [CUSTOM_HANDLER_ENV_NAMES.BUILD_CONTEXT]: JSON.stringify(buildContext)
} }
}); });
} catch (error) { } catch (error: any) {
console.log(error.message);
console.log(error.status);
assert(is<child_process.ExecException>(error)); assert(is<child_process.ExecException>(error));
if (error.code === NOT_IMPLEMENTED_EXIT_CODE) { if (error.code === NOT_IMPLEMENTED_EXIT_CODE) {