@kubb/cli 4.21.1 → 4.22.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.
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-C1_xRkKa.cjs');
2
- const require_package = require('./package-DlWy5In7.cjs');
2
+ const require_package = require('./package-Cnl_fuIC.cjs');
3
3
  let citty = require("citty");
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -1643,7 +1643,7 @@ async function startStreamServer({ port, host, configPath, config, input, args }
1643
1643
  res.end();
1644
1644
  return;
1645
1645
  }
1646
- if (req.url === "/health" && req.method === "GET") {
1646
+ if (req.url === "/api/health" && req.method === "GET") {
1647
1647
  res.writeHead(200, { "Content-Type": "application/json" });
1648
1648
  const body = {
1649
1649
  status: "ok",
@@ -1699,7 +1699,7 @@ async function startStreamServer({ port, host, configPath, config, input, args }
1699
1699
  _clack_prompts.log.info(picocolors.default.dim(`Config: ${node_path.default.relative(node_process.default.cwd(), configPath)}`));
1700
1700
  _clack_prompts.log.info(picocolors.default.dim(`Connect: ${serverUrl}/api/info`));
1701
1701
  _clack_prompts.log.info(picocolors.default.dim(`Stream: ${serverUrl}/api/stream`));
1702
- _clack_prompts.log.info(picocolors.default.dim(`Health: ${serverUrl}/health`));
1702
+ _clack_prompts.log.info(picocolors.default.dim(`Health: ${serverUrl}/api/health`));
1703
1703
  _clack_prompts.log.step(picocolors.default.yellow("Waiting for requests... (Press Ctrl+C to stop)"));
1704
1704
  });
1705
1705
  node_process.default.on("SIGINT", () => {
@@ -1719,10 +1719,11 @@ async function handleGenerate(res, config, input, args) {
1719
1719
  Connection: "keep-alive"
1720
1720
  });
1721
1721
  function send(type, ...data) {
1722
- res.write(`data: ${JSON.stringify({
1722
+ const streamEvent = {
1723
1723
  type,
1724
1724
  data
1725
- })}\n\n`);
1725
+ };
1726
+ res.write(`data: ${JSON.stringify(streamEvent)}\n\n`);
1726
1727
  }
1727
1728
  await createStreamLogger(res).install(events, { logLevel });
1728
1729
  try {
@@ -1897,4 +1898,4 @@ var generate_default = command;
1897
1898
 
1898
1899
  //#endregion
1899
1900
  exports.default = generate_default;
1900
- //# sourceMappingURL=generate-ZQmGWQph.cjs.map
1901
+ //# sourceMappingURL=generate-BJyvkuLI.cjs.map