@akanjs/cli 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.
Files changed (2) hide show
  1. package/index.js +8 -10
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1385,7 +1385,7 @@ var SysExecutor = class extends Executor {
1385
1385
  files,
1386
1386
  libDeps,
1387
1387
  pkgDeps,
1388
- dependencies: [...npmDepSet],
1388
+ dependencies: [...npmDepSet].filter((dep) => !dep.startsWith("@akanjs")),
1389
1389
  libs: Object.fromEntries(libDeps.map((libName) => [libName, libScanResults[libName]]))
1390
1390
  };
1391
1391
  await this.applyTemplate({ basePath: "lib", template: "lib", scanResult });
@@ -1933,8 +1933,8 @@ var getArgumentValue = async (argMeta, value, workspace) => {
1933
1933
  if (argMeta.type === "Workspace")
1934
1934
  return workspace;
1935
1935
  const sysType = argMeta.type.toLowerCase();
1936
+ const [appNames, libNames] = await workspace.getSyss();
1936
1937
  if (sysType === "sys") {
1937
- const [appNames, libNames] = await workspace.getSyss();
1938
1938
  const sysName = await (0, import_prompts3.select)({
1939
1939
  message: `Select the App or Lib name`,
1940
1940
  choices: [...appNames, ...libNames]
@@ -1944,21 +1944,19 @@ var getArgumentValue = async (argMeta, value, workspace) => {
1944
1944
  else
1945
1945
  return LibExecutor.from(workspace, sysName);
1946
1946
  } else if (sysType === "app") {
1947
- if (value)
1947
+ if (value && appNames.includes(value))
1948
1948
  return AppExecutor.from(workspace, value);
1949
- const apps = await workspace.getApps();
1950
- const appName = await (0, import_prompts3.select)({ message: `Select the ${sysType} name`, choices: apps });
1949
+ const appName = await (0, import_prompts3.select)({ message: `Select the ${sysType} name`, choices: appNames });
1951
1950
  return AppExecutor.from(workspace, appName);
1952
1951
  } else if (sysType === "lib") {
1953
- if (value)
1952
+ if (value && libNames.includes(value))
1954
1953
  return LibExecutor.from(workspace, value);
1955
- const libs = await workspace.getLibs();
1956
- const libName = await (0, import_prompts3.select)({ message: `Select the ${sysType} name`, choices: libs });
1954
+ const libName = await (0, import_prompts3.select)({ message: `Select the ${sysType} name`, choices: libNames });
1957
1955
  return LibExecutor.from(workspace, libName);
1958
1956
  } else if (sysType === "pkg") {
1959
- if (value)
1960
- return PkgExecutor.from(workspace, value);
1961
1957
  const pkgs = await workspace.getPkgs();
1958
+ if (value && pkgs.includes(value))
1959
+ return PkgExecutor.from(workspace, value);
1962
1960
  const pkgName = await (0, import_prompts3.select)({ message: `Select the ${sysType} name`, choices: pkgs });
1963
1961
  return PkgExecutor.from(workspace, pkgName);
1964
1962
  } else
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "@akanjs/cli",
4
- "version": "0.0.69",
4
+ "version": "0.0.70",
5
5
  "bin": {
6
6
  "akan": "index.js"
7
7
  },