@akanjs/devkit 0.0.114 → 0.0.116
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.
|
@@ -133,8 +133,8 @@ const getArgumentValue = async (argMeta, value, workspace) => {
|
|
|
133
133
|
throw new Error(`Invalid system type: ${argMeta.type}`);
|
|
134
134
|
};
|
|
135
135
|
const runCommands = async (...commands) => {
|
|
136
|
-
const hasPackageJson = import_fs.default.existsSync(`${__dirname}
|
|
137
|
-
const version = hasPackageJson ? JSON.parse(import_fs.default.readFileSync(`${__dirname}
|
|
136
|
+
const hasPackageJson = import_fs.default.existsSync(`${__dirname}/../package.json`);
|
|
137
|
+
const version = hasPackageJson ? JSON.parse(import_fs.default.readFileSync(`${__dirname}/../package.json`, "utf8")).version : "0.0.1";
|
|
138
138
|
import_commander.program.version(version).description("Akan CLI");
|
|
139
139
|
for (const command of commands) {
|
|
140
140
|
const targetMetas = (0, import_targetMeta.getTargetMetas)(command);
|
|
@@ -101,8 +101,8 @@ const getArgumentValue = async (argMeta, value, workspace) => {
|
|
|
101
101
|
throw new Error(`Invalid system type: ${argMeta.type}`);
|
|
102
102
|
};
|
|
103
103
|
const runCommands = async (...commands) => {
|
|
104
|
-
const hasPackageJson = fs.existsSync(`${__dirname}
|
|
105
|
-
const version = hasPackageJson ? JSON.parse(fs.readFileSync(`${__dirname}
|
|
104
|
+
const hasPackageJson = fs.existsSync(`${__dirname}/../package.json`);
|
|
105
|
+
const version = hasPackageJson ? JSON.parse(fs.readFileSync(`${__dirname}/../package.json`, "utf8")).version : "0.0.1";
|
|
106
106
|
program.version(version).description("Akan CLI");
|
|
107
107
|
for (const command of commands) {
|
|
108
108
|
const targetMetas = getTargetMetas(command);
|