@nasti-toolchain/nasti 1.5.1 → 1.5.2

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/dist/cli.js CHANGED
@@ -744,9 +744,17 @@ function getReactRefreshRuntimeEsm() {
744
744
  if (__refreshRuntimeCache) return __refreshRuntimeCache;
745
745
  let cjsPath;
746
746
  try {
747
- cjsPath = __require.resolve("react-refresh/cjs/react-refresh-runtime.development.js");
748
- } catch {
747
+ const pkgPath = __require.resolve("react-refresh/package.json");
748
+ cjsPath = path4.join(path4.dirname(pkgPath), "cjs", "react-refresh-runtime.development.js");
749
+ } catch (err) {
749
750
  cjsPath = path4.resolve(__dirname_esm, "../../node_modules/react-refresh/cjs/react-refresh-runtime.development.js");
751
+ if (!fs4.existsSync(cjsPath)) {
752
+ const origMsg = err instanceof Error ? err.message : String(err);
753
+ throw new Error(
754
+ `[nasti] Missing dependency "react-refresh". Install it with: npm install react-refresh
755
+ Original resolve error: ${origMsg}`
756
+ );
757
+ }
750
758
  }
751
759
  const cjsSource = fs4.readFileSync(cjsPath, "utf-8");
752
760
  __refreshRuntimeCache = `// Wrapped react-refresh runtime -> ESM
@@ -1629,7 +1637,7 @@ async function createServer(inlineConfig = {}) {
1629
1637
  const localUrl = `http://localhost:${actualPort}`;
1630
1638
  const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
1631
1639
  console.log();
1632
- console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.5.1"}`));
1640
+ console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.5.2"}`));
1633
1641
  console.log();
1634
1642
  console.log(` ${pc.green(">")} Local: ${pc.cyan(localUrl)}`);
1635
1643
  if (networkUrl) {
@@ -1752,7 +1760,7 @@ import pc2 from "picocolors";
1752
1760
  async function build(inlineConfig = {}) {
1753
1761
  const config = await resolveConfig(inlineConfig, "build");
1754
1762
  const startTime = performance.now();
1755
- console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.5.1"}`));
1763
+ console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.5.2"}`));
1756
1764
  console.log(pc2.dim(` root: ${config.root}`));
1757
1765
  console.log(pc2.dim(` mode: ${config.mode}`));
1758
1766
  const outDir = path10.resolve(config.root, config.build.outDir);
@@ -1912,7 +1920,7 @@ async function buildElectron(inlineConfig = {}) {
1912
1920
  const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
1913
1921
  const startTime = performance.now();
1914
1922
  assertElectronVersion(config);
1915
- console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.5.1"}`));
1923
+ console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.5.2"}`));
1916
1924
  console.log(pc3.dim(` root: ${config.root}`));
1917
1925
  console.log(pc3.dim(` mode: ${config.mode}`));
1918
1926
  console.log(pc3.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
@@ -2066,7 +2074,7 @@ async function startElectronDev(inlineConfig = {}) {
2066
2074
  const { noSpawn, ...rest } = inlineConfig;
2067
2075
  const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
2068
2076
  warnElectronVersion(config);
2069
- console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.5.1"}`));
2077
+ console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.5.2"}`));
2070
2078
  const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
2071
2079
  const server = await createServer2({ ...rest, target: "electron" });
2072
2080
  await server.listen();
@@ -2391,6 +2399,6 @@ cli.command("preview [root]", "Preview production build").option("--port <port>"
2391
2399
  }
2392
2400
  });
2393
2401
  cli.help();
2394
- cli.version("1.5.1");
2402
+ cli.version("1.5.2");
2395
2403
  cli.parse();
2396
2404
  //# sourceMappingURL=cli.js.map