@akanjs/cli 0.9.25 → 0.9.27

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/cjs/index.js CHANGED
@@ -3765,22 +3765,6 @@ var Start = ({ appName, bcp, fcp, csr, onExit, maxLength = 100 }) => {
3765
3765
  csr.on("clearScreen", (type) => {
3766
3766
  saveLog("clearScreen", type, setCsrLogs);
3767
3767
  });
3768
- const destroy = async () => {
3769
- bcp.kill();
3770
- fcp.kill();
3771
- bcp.stdin?.end();
3772
- fcp.stdin?.end();
3773
- csr.removeAllListeners();
3774
- await onExit();
3775
- exit();
3776
- process.exit(0);
3777
- };
3778
- process.on("SIGINT", async () => {
3779
- await destroy();
3780
- });
3781
- return () => {
3782
- void destroy();
3783
- };
3784
3768
  }, []);
3785
3769
  return /* @__PURE__ */ import_react3.default.createElement(import_react3.default.Fragment, null, /* @__PURE__ */ import_react3.default.createElement(import_ink3.Box, { borderColor: "#ff493b", height, width, flexDirection: "row" }, /* @__PURE__ */ import_react3.default.createElement(
3786
3770
  MultiScrollList,
@@ -4461,13 +4445,15 @@ var ApplicationScript = class {
4461
4445
  const backend = await this.startBackend(app, { open: open2, withInk: true });
4462
4446
  const frontend = await this.startFrontend(app, { open: open2, withInk: true });
4463
4447
  const { server: csrServer, eventEmitter: csr } = await this.startCsr(app, { open: open2, withInk: true });
4464
- Interface.Start(app.name, backend, frontend, csr, async () => {
4448
+ process.on("SIGINT", async () => {
4465
4449
  await csrServer.close();
4466
4450
  backend.kill();
4467
4451
  frontend.kill();
4468
4452
  csr.removeAllListeners();
4469
4453
  process.exit(0);
4470
4454
  });
4455
+ Interface.Start(app.name, backend, frontend, csr, () => {
4456
+ });
4471
4457
  }
4472
4458
  async buildBackend(app, { sync = true } = {}) {
4473
4459
  if (sync)
package/esm/index.js CHANGED
@@ -3747,22 +3747,6 @@ var Start = ({ appName, bcp, fcp, csr, onExit, maxLength = 100 }) => {
3747
3747
  csr.on("clearScreen", (type) => {
3748
3748
  saveLog("clearScreen", type, setCsrLogs);
3749
3749
  });
3750
- const destroy = async () => {
3751
- bcp.kill();
3752
- fcp.kill();
3753
- bcp.stdin?.end();
3754
- fcp.stdin?.end();
3755
- csr.removeAllListeners();
3756
- await onExit();
3757
- exit();
3758
- process.exit(0);
3759
- };
3760
- process.on("SIGINT", async () => {
3761
- await destroy();
3762
- });
3763
- return () => {
3764
- void destroy();
3765
- };
3766
3750
  }, []);
3767
3751
  return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Box2, { borderColor: "#ff493b", height, width, flexDirection: "row" }, /* @__PURE__ */ React2.createElement(
3768
3752
  MultiScrollList,
@@ -4443,13 +4427,15 @@ var ApplicationScript = class {
4443
4427
  const backend = await this.startBackend(app, { open: open2, withInk: true });
4444
4428
  const frontend = await this.startFrontend(app, { open: open2, withInk: true });
4445
4429
  const { server: csrServer, eventEmitter: csr } = await this.startCsr(app, { open: open2, withInk: true });
4446
- Interface.Start(app.name, backend, frontend, csr, async () => {
4430
+ process.on("SIGINT", async () => {
4447
4431
  await csrServer.close();
4448
4432
  backend.kill();
4449
4433
  frontend.kill();
4450
4434
  csr.removeAllListeners();
4451
4435
  process.exit(0);
4452
4436
  });
4437
+ Interface.Start(app.name, backend, frontend, csr, () => {
4438
+ });
4453
4439
  }
4454
4440
  async buildBackend(app, { sync = true } = {}) {
4455
4441
  if (sync)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "sourceType": "module",
4
4
  "name": "@akanjs/cli",
5
- "version": "0.9.25",
5
+ "version": "0.9.27",
6
6
  "bin": {
7
7
  "akan": "esm/index.js"
8
8
  },