host-mdx 2.4.2 → 2.4.3

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.
Files changed (2) hide show
  1. package/index.js +6 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -466,6 +466,12 @@ export async function createSite(inputPath = "", outputPath = "", pathsToCreate
466
466
  // Broadcast site creation ended
467
467
  log(wasInterrupted ? `Site creation was interrupted!` : `Completed site creation at ${outputPath}`);
468
468
  await configs?.onSiteCreateEnd?.(inputPath, outputPath, !isHardReloading, wasInterrupted);
469
+
470
+
471
+ // Throw error on interruption, This was done to make sure `alteredPaths` retains old values
472
+ if (wasInterrupted) {
473
+ throw new Error(`Site creation interrupted!`);
474
+ }
469
475
  }
470
476
 
471
477
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "host-mdx",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "A cli tool to create and serve a static html website from a given mdx directory",
5
5
  "main": "index.js",
6
6
  "type": "module",