@nasti-toolchain/nasti 1.4.0 → 1.5.0

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
@@ -1417,15 +1417,6 @@ async function createServer(inlineConfig = {}) {
1417
1417
  watcher.on("add", (file) => {
1418
1418
  handleFileChange(file, server);
1419
1419
  });
1420
- const postMiddlewares = [];
1421
- for (const plugin of allPlugins) {
1422
- if (plugin.configureServer) {
1423
- const result = await plugin.configureServer(server);
1424
- if (typeof result === "function") {
1425
- postMiddlewares.push(result);
1426
- }
1427
- }
1428
- }
1429
1420
  server = {
1430
1421
  config: configWithPlugins,
1431
1422
  middlewares: app,
@@ -1444,7 +1435,7 @@ async function createServer(inlineConfig = {}) {
1444
1435
  const localUrl = `http://localhost:${actualPort}`;
1445
1436
  const networkUrl = host === "0.0.0.0" ? `http://${getNetworkAddress()}:${actualPort}` : null;
1446
1437
  console.log();
1447
- console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.4.0"}`));
1438
+ console.log(pc.cyan(" nasti dev server") + pc.dim(` v${"1.5.0"}`));
1448
1439
  console.log();
1449
1440
  console.log(` ${pc.green(">")} Local: ${pc.cyan(localUrl)}`);
1450
1441
  if (networkUrl) {
@@ -1477,6 +1468,16 @@ async function createServer(inlineConfig = {}) {
1477
1468
  httpServer.close();
1478
1469
  }
1479
1470
  };
1471
+ const postMiddlewares = [];
1472
+ for (const plugin of allPlugins) {
1473
+ if (plugin.configureServer) {
1474
+ const result = await plugin.configureServer(server);
1475
+ if (typeof result === "function") {
1476
+ postMiddlewares.push(result);
1477
+ }
1478
+ }
1479
+ }
1480
+ for (const run of postMiddlewares) run();
1480
1481
  return server;
1481
1482
  }
1482
1483
  function getNetworkAddress() {
@@ -1557,7 +1558,7 @@ import pc2 from "picocolors";
1557
1558
  async function build(inlineConfig = {}) {
1558
1559
  const config = await resolveConfig(inlineConfig, "build");
1559
1560
  const startTime = performance.now();
1560
- console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.4.0"}`));
1561
+ console.log(pc2.cyan("\n\u{1F528} nasti build") + pc2.dim(` v${"1.5.0"}`));
1561
1562
  console.log(pc2.dim(` root: ${config.root}`));
1562
1563
  console.log(pc2.dim(` mode: ${config.mode}`));
1563
1564
  const outDir = path10.resolve(config.root, config.build.outDir);
@@ -1717,7 +1718,7 @@ async function buildElectron(inlineConfig = {}) {
1717
1718
  const config = await resolveConfig({ ...inlineConfig, target: "electron" }, "build");
1718
1719
  const startTime = performance.now();
1719
1720
  assertElectronVersion(config);
1720
- console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.4.0"}`));
1721
+ console.log(pc3.cyan("\n\u26A1 nasti build (electron)") + pc3.dim(` v${"1.5.0"}`));
1721
1722
  console.log(pc3.dim(` root: ${config.root}`));
1722
1723
  console.log(pc3.dim(` mode: ${config.mode}`));
1723
1724
  console.log(pc3.dim(` target: electron (\u2265 ${config.electron.minVersion})`));
@@ -1871,7 +1872,7 @@ async function startElectronDev(inlineConfig = {}) {
1871
1872
  const { noSpawn, ...rest } = inlineConfig;
1872
1873
  const config = await resolveConfig({ ...rest, target: "electron" }, "serve");
1873
1874
  warnElectronVersion(config);
1874
- console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.4.0"}`));
1875
+ console.log(pc4.cyan("\n\u26A1 nasti electron dev") + pc4.dim(` v${"1.5.0"}`));
1875
1876
  const { createServer: createServer2 } = await Promise.resolve().then(() => (init_server(), server_exports));
1876
1877
  const server = await createServer2({ ...rest, target: "electron" });
1877
1878
  await server.listen();
@@ -2179,6 +2180,6 @@ cli.command("preview [root]", "Preview production build").option("--port <port>"
2179
2180
  }
2180
2181
  });
2181
2182
  cli.help();
2182
- cli.version("1.4.0");
2183
+ cli.version("1.5.0");
2183
2184
  cli.parse();
2184
2185
  //# sourceMappingURL=cli.js.map