@akanjs/devkit 0.0.69 → 0.0.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "0.0.69",
3
+ "version": "0.0.70",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -93,8 +93,8 @@ const getArgumentValue = async (argMeta, value, workspace) => {
93
93
  if (argMeta.type === "Workspace")
94
94
  return workspace;
95
95
  const sysType = argMeta.type.toLowerCase();
96
+ const [appNames, libNames] = await workspace.getSyss();
96
97
  if (sysType === "sys") {
97
- const [appNames, libNames] = await workspace.getSyss();
98
98
  const sysName = await (0, import_prompts.select)({
99
99
  message: `Select the App or Lib name`,
100
100
  choices: [...appNames, ...libNames]
@@ -104,21 +104,19 @@ const getArgumentValue = async (argMeta, value, workspace) => {
104
104
  else
105
105
  return import_executors.LibExecutor.from(workspace, sysName);
106
106
  } else if (sysType === "app") {
107
- if (value)
107
+ if (value && appNames.includes(value))
108
108
  return import_executors.AppExecutor.from(workspace, value);
109
- const apps = await workspace.getApps();
110
- const appName = await (0, import_prompts.select)({ message: `Select the ${sysType} name`, choices: apps });
109
+ const appName = await (0, import_prompts.select)({ message: `Select the ${sysType} name`, choices: appNames });
111
110
  return import_executors.AppExecutor.from(workspace, appName);
112
111
  } else if (sysType === "lib") {
113
- if (value)
112
+ if (value && libNames.includes(value))
114
113
  return import_executors.LibExecutor.from(workspace, value);
115
- const libs = await workspace.getLibs();
116
- const libName = await (0, import_prompts.select)({ message: `Select the ${sysType} name`, choices: libs });
114
+ const libName = await (0, import_prompts.select)({ message: `Select the ${sysType} name`, choices: libNames });
117
115
  return import_executors.LibExecutor.from(workspace, libName);
118
116
  } else if (sysType === "pkg") {
119
- if (value)
120
- return import_executors.PkgExecutor.from(workspace, value);
121
117
  const pkgs = await workspace.getPkgs();
118
+ if (value && pkgs.includes(value))
119
+ return import_executors.PkgExecutor.from(workspace, value);
122
120
  const pkgName = await (0, import_prompts.select)({ message: `Select the ${sysType} name`, choices: pkgs });
123
121
  return import_executors.PkgExecutor.from(workspace, pkgName);
124
122
  } else
@@ -61,8 +61,8 @@ const getArgumentValue = async (argMeta, value, workspace) => {
61
61
  if (argMeta.type === "Workspace")
62
62
  return workspace;
63
63
  const sysType = argMeta.type.toLowerCase();
64
+ const [appNames, libNames] = await workspace.getSyss();
64
65
  if (sysType === "sys") {
65
- const [appNames, libNames] = await workspace.getSyss();
66
66
  const sysName = await select({
67
67
  message: `Select the App or Lib name`,
68
68
  choices: [...appNames, ...libNames]
@@ -72,21 +72,19 @@ const getArgumentValue = async (argMeta, value, workspace) => {
72
72
  else
73
73
  return LibExecutor.from(workspace, sysName);
74
74
  } else if (sysType === "app") {
75
- if (value)
75
+ if (value && appNames.includes(value))
76
76
  return AppExecutor.from(workspace, value);
77
- const apps = await workspace.getApps();
78
- const appName = await select({ message: `Select the ${sysType} name`, choices: apps });
77
+ const appName = await select({ message: `Select the ${sysType} name`, choices: appNames });
79
78
  return AppExecutor.from(workspace, appName);
80
79
  } else if (sysType === "lib") {
81
- if (value)
80
+ if (value && libNames.includes(value))
82
81
  return LibExecutor.from(workspace, value);
83
- const libs = await workspace.getLibs();
84
- const libName = await select({ message: `Select the ${sysType} name`, choices: libs });
82
+ const libName = await select({ message: `Select the ${sysType} name`, choices: libNames });
85
83
  return LibExecutor.from(workspace, libName);
86
84
  } else if (sysType === "pkg") {
87
- if (value)
88
- return PkgExecutor.from(workspace, value);
89
85
  const pkgs = await workspace.getPkgs();
86
+ if (value && pkgs.includes(value))
87
+ return PkgExecutor.from(workspace, value);
90
88
  const pkgName = await select({ message: `Select the ${sysType} name`, choices: pkgs });
91
89
  return PkgExecutor.from(workspace, pkgName);
92
90
  } else
package/src/executors.cjs CHANGED
@@ -482,7 +482,7 @@ class SysExecutor extends Executor {
482
482
  files,
483
483
  libDeps,
484
484
  pkgDeps,
485
- dependencies: [...npmDepSet],
485
+ dependencies: [...npmDepSet].filter((dep) => !dep.startsWith("@akanjs")),
486
486
  libs: Object.fromEntries(libDeps.map((libName) => [libName, libScanResults[libName]]))
487
487
  };
488
488
  await this.applyTemplate({ basePath: "lib", template: "lib", scanResult });
package/src/executors.js CHANGED
@@ -446,7 +446,7 @@ class SysExecutor extends Executor {
446
446
  files,
447
447
  libDeps,
448
448
  pkgDeps,
449
- dependencies: [...npmDepSet],
449
+ dependencies: [...npmDepSet].filter((dep) => !dep.startsWith("@akanjs")),
450
450
  libs: Object.fromEntries(libDeps.map((libName) => [libName, libScanResults[libName]]))
451
451
  };
452
452
  await this.applyTemplate({ basePath: "lib", template: "lib", scanResult });