@akanjs/devkit 0.0.77 → 0.0.79

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.77",
3
+ "version": "0.0.79",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -95,14 +95,22 @@ const getArgumentValue = async (argMeta, value, workspace) => {
95
95
  const sysType = argMeta.type.toLowerCase();
96
96
  const [appNames, libNames] = await workspace.getSyss();
97
97
  if (sysType === "sys") {
98
- const sysName = await (0, import_prompts.select)({
99
- message: `Select the App or Lib name`,
100
- choices: [...appNames, ...libNames]
101
- });
102
- if (appNames.includes(sysName))
103
- return import_executors.AppExecutor.from(workspace, sysName);
104
- else
105
- return import_executors.LibExecutor.from(workspace, sysName);
98
+ if (value && appNames.includes(value))
99
+ return import_executors.AppExecutor.from(workspace, value);
100
+ else if (value && libNames.includes(value))
101
+ return import_executors.LibExecutor.from(workspace, value);
102
+ else {
103
+ const sysName = await (0, import_prompts.select)({
104
+ message: `Select the App or Lib name`,
105
+ choices: [...appNames, ...libNames]
106
+ });
107
+ if (appNames.includes(sysName))
108
+ return import_executors.AppExecutor.from(workspace, sysName);
109
+ else if (libNames.includes(sysName))
110
+ return import_executors.LibExecutor.from(workspace, sysName);
111
+ else
112
+ throw new Error(`Invalid system name: ${sysName}`);
113
+ }
106
114
  } else if (sysType === "app") {
107
115
  if (value && appNames.includes(value))
108
116
  return import_executors.AppExecutor.from(workspace, value);
@@ -63,14 +63,22 @@ const getArgumentValue = async (argMeta, value, workspace) => {
63
63
  const sysType = argMeta.type.toLowerCase();
64
64
  const [appNames, libNames] = await workspace.getSyss();
65
65
  if (sysType === "sys") {
66
- const sysName = await select({
67
- message: `Select the App or Lib name`,
68
- choices: [...appNames, ...libNames]
69
- });
70
- if (appNames.includes(sysName))
71
- return AppExecutor.from(workspace, sysName);
72
- else
73
- return LibExecutor.from(workspace, sysName);
66
+ if (value && appNames.includes(value))
67
+ return AppExecutor.from(workspace, value);
68
+ else if (value && libNames.includes(value))
69
+ return LibExecutor.from(workspace, value);
70
+ else {
71
+ const sysName = await select({
72
+ message: `Select the App or Lib name`,
73
+ choices: [...appNames, ...libNames]
74
+ });
75
+ if (appNames.includes(sysName))
76
+ return AppExecutor.from(workspace, sysName);
77
+ else if (libNames.includes(sysName))
78
+ return LibExecutor.from(workspace, sysName);
79
+ else
80
+ throw new Error(`Invalid system name: ${sysName}`);
81
+ }
74
82
  } else if (sysType === "app") {
75
83
  if (value && appNames.includes(value))
76
84
  return AppExecutor.from(workspace, value);