@merkur/cli 0.37.3 → 0.37.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkur/cli",
3
- "version": "0.37.3",
3
+ "version": "0.37.4",
4
4
  "description": "Merkur is tiny and extensible library for creating front-end microservices.",
5
5
  "bin": {
6
6
  "merkur": "./bin/merkur.mjs"
@@ -67,5 +67,5 @@
67
67
  "engines": {
68
68
  "node": ">=20"
69
69
  },
70
- "gitHead": "7237693f163d80defa4a19071419c697cc8785fa"
70
+ "gitHead": "d54912205822efbb7d3ca53f8dee0775d299853a"
71
71
  }
@@ -79,6 +79,7 @@ export async function createBuildConfig({
79
79
  },
80
80
  definition,
81
81
  config,
82
+ merkurConfig,
82
83
  cliConfig,
83
84
  context,
84
85
  [RESULT_KEY]: 'build',
@@ -37,7 +37,7 @@ export async function createMerkurConfig({ cliConfig, context, args } = {}) {
37
37
 
38
38
  await loadExtender({ merkurConfig, cliConfig, logger, context });
39
39
 
40
- await registerHooks({ merkurConfig });
40
+ registerHooks({ merkurConfig });
41
41
 
42
42
  cliConfig = await updateCLIConfig({ args, cliConfig, context });
43
43
 
@@ -60,13 +60,16 @@ async function loadExtender({ merkurConfig, cliConfig, logger, context }) {
60
60
  merkurConfig?.extends?.map(async (modulePath) => {
61
61
  try {
62
62
  const file = await import(`${modulePath}`);
63
- await file.default({
63
+ const hooks = await file.default({
64
64
  cliConfig,
65
65
  merkurConfig,
66
66
  context,
67
67
  emitter,
68
68
  EMITTER_EVENTS,
69
+ logger,
69
70
  });
71
+
72
+ registerHooks({ merkurConfig: hooks ?? {} });
70
73
  } catch (error) {
71
74
  logger.error(error);
72
75
  }
@@ -74,7 +77,7 @@ async function loadExtender({ merkurConfig, cliConfig, logger, context }) {
74
77
  );
75
78
  }
76
79
 
77
- async function registerHooks({ merkurConfig }) {
80
+ function registerHooks({ merkurConfig }) {
78
81
  Object.values(EMITTER_EVENTS)
79
82
  .filter((eventName) => eventName in merkurConfig)
80
83
  .forEach((eventName) => {