@akanjs/cli 0.0.151 → 0.0.153

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
@@ -1436,19 +1436,19 @@ var Executor = class _Executor {
1436
1436
  ...options
1437
1437
  });
1438
1438
  let stdout = "";
1439
+ let stderr = "";
1439
1440
  proc.stdout?.on("data", (data) => {
1440
1441
  stdout += data;
1441
- });
1442
- proc.stdout?.on("data", (data) => {
1443
1442
  this.#stdout(data);
1444
1443
  });
1445
1444
  proc.stderr?.on("data", (data) => {
1445
+ stderr += data;
1446
1446
  this.#stdout(data);
1447
1447
  });
1448
1448
  return new Promise((resolve, reject) => {
1449
1449
  proc.on("exit", (code, signal) => {
1450
1450
  if (!!code || signal)
1451
- reject({ code, signal, stdout });
1451
+ reject({ code, signal, stdout, stderr });
1452
1452
  else
1453
1453
  resolve(stdout);
1454
1454
  });
@@ -2895,7 +2895,6 @@ var runCommands = async (...commands) => {
2895
2895
  } catch (e) {
2896
2896
  const errMsg = e instanceof Error ? e.message : typeof e === "string" ? e : JSON.stringify(e);
2897
2897
  Logger.error(`Command Error: ${import_chalk4.default.red(errMsg)}`);
2898
- console.error(e);
2899
2898
  throw e;
2900
2899
  }
2901
2900
  });
@@ -3206,6 +3205,7 @@ var Builder = class {
3206
3205
  format,
3207
3206
  outdir: `${this.#distExecutor.cwdPath}/${format}`,
3208
3207
  logLevel: "error",
3208
+ // external: ["react", "react-dom"],
3209
3209
  loader: assetLoader
3210
3210
  };
3211
3211
  }
@@ -3526,7 +3526,8 @@ var ApplicationRunner = class {
3526
3526
  if (target === "frontend") {
3527
3527
  await app.exec("rm -rf .next");
3528
3528
  app.writeFile("next.config.ts", defaultNextConfigFile);
3529
- }
3529
+ } else if (target === "csr")
3530
+ await app.workspace.exec("rm -rf node_modules/.vite");
3530
3531
  return { env: this.#getEnv(app, { AKAN_COMMAND_TYPE: type }) };
3531
3532
  }
3532
3533
  async buildBackend(app) {
@@ -3614,7 +3615,7 @@ var ApplicationRunner = class {
3614
3615
  if (open2)
3615
3616
  setTimeout(() => (0, import_open.default)("http://localhost:4200"), 3e3);
3616
3617
  onStart?.();
3617
- await app.spawn("npx", ["next", "dev", "-p", "4200", ...turbo ? ["--turbo"] : []], { env });
3618
+ await app.spawn("npx", ["next", "dev", "-p", "4200", ...turbo ? ["--turbo"] : []], { env, stdio: "inherit" });
3618
3619
  }
3619
3620
  async #getViteConfig(app, command) {
3620
3621
  const { env } = await this.#prepareCommand(app, command, "csr");
@@ -1,5 +1,5 @@
1
1
  @import "tailwindcss";
2
- @import "@akanjs/config/styles.css";
2
+ @import "@akanjs/ui/styles.css";
3
3
 
4
4
  @plugin "daisyui" {
5
5
  logs: false;
package/esm/index.js CHANGED
@@ -1423,19 +1423,19 @@ var Executor = class _Executor {
1423
1423
  ...options
1424
1424
  });
1425
1425
  let stdout = "";
1426
+ let stderr = "";
1426
1427
  proc.stdout?.on("data", (data) => {
1427
1428
  stdout += data;
1428
- });
1429
- proc.stdout?.on("data", (data) => {
1430
1429
  this.#stdout(data);
1431
1430
  });
1432
1431
  proc.stderr?.on("data", (data) => {
1432
+ stderr += data;
1433
1433
  this.#stdout(data);
1434
1434
  });
1435
1435
  return new Promise((resolve, reject) => {
1436
1436
  proc.on("exit", (code, signal) => {
1437
1437
  if (!!code || signal)
1438
- reject({ code, signal, stdout });
1438
+ reject({ code, signal, stdout, stderr });
1439
1439
  else
1440
1440
  resolve(stdout);
1441
1441
  });
@@ -2882,7 +2882,6 @@ var runCommands = async (...commands) => {
2882
2882
  } catch (e) {
2883
2883
  const errMsg = e instanceof Error ? e.message : typeof e === "string" ? e : JSON.stringify(e);
2884
2884
  Logger.error(`Command Error: ${chalk4.red(errMsg)}`);
2885
- console.error(e);
2886
2885
  throw e;
2887
2886
  }
2888
2887
  });
@@ -3198,6 +3197,7 @@ var Builder = class {
3198
3197
  format,
3199
3198
  outdir: `${this.#distExecutor.cwdPath}/${format}`,
3200
3199
  logLevel: "error",
3200
+ // external: ["react", "react-dom"],
3201
3201
  loader: assetLoader
3202
3202
  };
3203
3203
  }
@@ -3518,7 +3518,8 @@ var ApplicationRunner = class {
3518
3518
  if (target === "frontend") {
3519
3519
  await app.exec("rm -rf .next");
3520
3520
  app.writeFile("next.config.ts", defaultNextConfigFile);
3521
- }
3521
+ } else if (target === "csr")
3522
+ await app.workspace.exec("rm -rf node_modules/.vite");
3522
3523
  return { env: this.#getEnv(app, { AKAN_COMMAND_TYPE: type }) };
3523
3524
  }
3524
3525
  async buildBackend(app) {
@@ -3606,7 +3607,7 @@ var ApplicationRunner = class {
3606
3607
  if (open2)
3607
3608
  setTimeout(() => openBrowser("http://localhost:4200"), 3e3);
3608
3609
  onStart?.();
3609
- await app.spawn("npx", ["next", "dev", "-p", "4200", ...turbo ? ["--turbo"] : []], { env });
3610
+ await app.spawn("npx", ["next", "dev", "-p", "4200", ...turbo ? ["--turbo"] : []], { env, stdio: "inherit" });
3610
3611
  }
3611
3612
  async #getViteConfig(app, command) {
3612
3613
  const { env } = await this.#prepareCommand(app, command, "csr");
@@ -1,5 +1,5 @@
1
1
  @import "tailwindcss";
2
- @import "@akanjs/config/styles.css";
2
+ @import "@akanjs/ui/styles.css";
3
3
 
4
4
  @plugin "daisyui" {
5
5
  logs: false;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "sourceType": "module",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.151",
4
+ "version": "0.0.153",
5
5
  "bin": {
6
6
  "akan": "cjs/index.js"
7
7
  },