@akanjs/cli 0.0.68 → 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/index.js +11 -12
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -905,7 +905,7 @@ var TypeScriptDependencyScanner = class {
|
|
|
905
905
|
imports.push(arg.text);
|
|
906
906
|
}
|
|
907
907
|
}
|
|
908
|
-
if (ts2.isArrowFunction(node.expression)
|
|
908
|
+
if (ts2.isArrowFunction(node.expression)) {
|
|
909
909
|
const body = node.expression.body;
|
|
910
910
|
if (ts2.isCallExpression(body) && body.expression.kind === ts2.SyntaxKind.ImportKeyword) {
|
|
911
911
|
if (body.arguments.length > 0) {
|
|
@@ -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
|
|
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
|
|
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
|
|
@@ -2119,6 +2117,7 @@ var LibraryRunner = class {
|
|
|
2119
2117
|
const newRootPackageJson = { ...rootPackageJson, dependencies, devDependencies };
|
|
2120
2118
|
lib.workspace.writeJson("package.json", newRootPackageJson);
|
|
2121
2119
|
await lib.workspace.spawn("pnpm", ["install"]);
|
|
2120
|
+
await lib.workspace.commit(`Merge ${lib.name} library dependencies`);
|
|
2122
2121
|
}
|
|
2123
2122
|
async pushLibrary(lib, branch) {
|
|
2124
2123
|
await lib.workspace.exec(
|
|
@@ -4044,7 +4043,7 @@ var PackageRunner = class {
|
|
|
4044
4043
|
dependencies,
|
|
4045
4044
|
...pkgJson.peerDependencies ? {
|
|
4046
4045
|
peerDependencies: Object.fromEntries(
|
|
4047
|
-
Object.keys(pkgJson.peerDependencies).sort().map((dep) => [dep, allDependencies[dep] ?? pkgJson.peerDependencies?.[dep]
|
|
4046
|
+
Object.keys(pkgJson.peerDependencies).sort().map((dep) => [dep, allDependencies[dep] ?? pkgJson.peerDependencies?.[dep]])
|
|
4048
4047
|
)
|
|
4049
4048
|
} : {},
|
|
4050
4049
|
...["@akanjs/config", "@akanjs/cli"].includes(pkg.name) ? {} : {
|