@akanjs/devkit 0.0.121 → 0.0.122

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.
@@ -178,6 +178,7 @@ const runCommands = async (...commands) => {
178
178
  const errMsg = e instanceof Error ? e.message : typeof e === "string" ? e : JSON.stringify(e);
179
179
  import_common.Logger.error(`Command Error: ${import_chalk.default.red(errMsg)}`);
180
180
  console.error(e);
181
+ throw e;
181
182
  }
182
183
  });
183
184
  }
@@ -56,10 +56,10 @@ class Executor {
56
56
  exec(command, options = {}) {
57
57
  const proc = (0, import_child_process.exec)(command, { cwd: this.cwdPath, ...options });
58
58
  proc.stdout?.on("data", (data) => {
59
- import_common.Logger.raw(data.toString());
59
+ import_common.Logger.raw(import_chalk.default.dim(data.toString()));
60
60
  });
61
61
  proc.stderr?.on("data", (data) => {
62
- import_common.Logger.raw(import_chalk.default.red(data.toString()));
62
+ import_common.Logger.raw(import_chalk.default.dim(data.toString()));
63
63
  });
64
64
  return new Promise((resolve, reject) => {
65
65
  proc.on("exit", (code, signal) => {
@@ -589,11 +589,11 @@ class SysExecutor extends Executor {
589
589
  return viewComponents;
590
590
  }
591
591
  async getUnitComponents() {
592
- const unitComponents = (await import_promises.default.readdir(`${this.cwdPath}/lib`)).filter((name) => name.startsWith("_") && !name.startsWith("__")).filter((name) => import_fs.default.existsSync(`${this.cwdPath}/lib/${name}/${name}.Unit.tsx`));
592
+ const unitComponents = (await import_promises.default.readdir(`${this.cwdPath}/lib`)).filter((name) => !name.startsWith("_") && !name.startsWith("__") && !name.endsWith(".ts")).filter((name) => import_fs.default.existsSync(`${this.cwdPath}/lib/${name}/${name}.Unit.tsx`));
593
593
  return unitComponents;
594
594
  }
595
595
  async getTemplateComponents() {
596
- const templateComponents = (await import_promises.default.readdir(`${this.cwdPath}/lib`)).filter((name) => name.startsWith("_") && !name.startsWith("__")).filter((name) => import_fs.default.existsSync(`${this.cwdPath}/lib/${name}/${name}.Template.tsx`));
596
+ const templateComponents = (await import_promises.default.readdir(`${this.cwdPath}/lib`)).filter((name) => !name.startsWith("_") && !name.startsWith("__") && !name.endsWith(".ts")).filter((name) => import_fs.default.existsSync(`${this.cwdPath}/lib/${name}/${name}.Template.tsx`));
597
597
  return templateComponents;
598
598
  }
599
599
  async getViewsSourceCode() {
@@ -146,6 +146,7 @@ const runCommands = async (...commands) => {
146
146
  const errMsg = e instanceof Error ? e.message : typeof e === "string" ? e : JSON.stringify(e);
147
147
  Logger.error(`Command Error: ${chalk.red(errMsg)}`);
148
148
  console.error(e);
149
+ throw e;
149
150
  }
150
151
  });
151
152
  }
@@ -23,10 +23,10 @@ class Executor {
23
23
  exec(command, options = {}) {
24
24
  const proc = exec(command, { cwd: this.cwdPath, ...options });
25
25
  proc.stdout?.on("data", (data) => {
26
- Logger.raw(data.toString());
26
+ Logger.raw(chalk.dim(data.toString()));
27
27
  });
28
28
  proc.stderr?.on("data", (data) => {
29
- Logger.raw(chalk.red(data.toString()));
29
+ Logger.raw(chalk.dim(data.toString()));
30
30
  });
31
31
  return new Promise((resolve, reject) => {
32
32
  proc.on("exit", (code, signal) => {
@@ -556,11 +556,11 @@ class SysExecutor extends Executor {
556
556
  return viewComponents;
557
557
  }
558
558
  async getUnitComponents() {
559
- const unitComponents = (await fsPromise.readdir(`${this.cwdPath}/lib`)).filter((name) => name.startsWith("_") && !name.startsWith("__")).filter((name) => fs.existsSync(`${this.cwdPath}/lib/${name}/${name}.Unit.tsx`));
559
+ const unitComponents = (await fsPromise.readdir(`${this.cwdPath}/lib`)).filter((name) => !name.startsWith("_") && !name.startsWith("__") && !name.endsWith(".ts")).filter((name) => fs.existsSync(`${this.cwdPath}/lib/${name}/${name}.Unit.tsx`));
560
560
  return unitComponents;
561
561
  }
562
562
  async getTemplateComponents() {
563
- const templateComponents = (await fsPromise.readdir(`${this.cwdPath}/lib`)).filter((name) => name.startsWith("_") && !name.startsWith("__")).filter((name) => fs.existsSync(`${this.cwdPath}/lib/${name}/${name}.Template.tsx`));
563
+ const templateComponents = (await fsPromise.readdir(`${this.cwdPath}/lib`)).filter((name) => !name.startsWith("_") && !name.startsWith("__") && !name.endsWith(".ts")).filter((name) => fs.existsSync(`${this.cwdPath}/lib/${name}/${name}.Template.tsx`));
564
564
  return templateComponents;
565
565
  }
566
566
  async getViewsSourceCode() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "0.0.121",
3
+ "version": "0.0.122",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -52,7 +52,7 @@ export declare class WorkspaceExecutor extends Executor {
52
52
  getBaseDevEnv(): {
53
53
  repoName: string;
54
54
  serveDomain: string;
55
- env: "testing" | "local" | "debug" | "develop" | "main";
55
+ env: "debug" | "testing" | "local" | "develop" | "main";
56
56
  name?: string | undefined;
57
57
  };
58
58
  scan(): Promise<WorkspaceScanResult>;