@contextos/cli 0.4.2 → 0.4.4
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/dist/index.js +19 -5
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -207,10 +207,12 @@ var indexCommand = new Command2("index").description("Index the project for cont
|
|
|
207
207
|
}
|
|
208
208
|
} catch (error) {
|
|
209
209
|
spinner.fail("Indexing failed");
|
|
210
|
-
if (error instanceof Error && error.message.includes("not initialized")) {
|
|
211
|
-
console.log(chalk2.
|
|
210
|
+
if (error instanceof Error && error.message.includes("ContextOS not initialized")) {
|
|
211
|
+
console.log(chalk2.red("\n\u274C Environment not initialized."));
|
|
212
|
+
console.log(chalk2.yellow(` ${error.message}`));
|
|
213
|
+
console.log(chalk2.green('\n \u{1F449} Run "ctx init" to set up your project.\n'));
|
|
212
214
|
} else {
|
|
213
|
-
console.error(chalk2.red("Error:"), error);
|
|
215
|
+
console.error(chalk2.red("Error:"), error instanceof Error ? error.message : String(error));
|
|
214
216
|
}
|
|
215
217
|
process.exit(1);
|
|
216
218
|
}
|
|
@@ -1970,7 +1972,13 @@ var generateCommand = new Command14("generate").description("Generate code using
|
|
|
1970
1972
|
}
|
|
1971
1973
|
} catch (error) {
|
|
1972
1974
|
spinner.fail("Generation failed");
|
|
1973
|
-
|
|
1975
|
+
if (error instanceof Error && error.message.includes("ContextOS not initialized")) {
|
|
1976
|
+
console.log(chalk17.red("\n\u274C Environment not initialized."));
|
|
1977
|
+
console.log(chalk17.yellow(` ${error.message}`));
|
|
1978
|
+
console.log(chalk17.green('\n \u{1F449} Run "ctx init" to set up your project.\n'));
|
|
1979
|
+
} else {
|
|
1980
|
+
console.error(chalk17.red("\nError:"), error instanceof Error ? error.message : String(error));
|
|
1981
|
+
}
|
|
1974
1982
|
process.exit(1);
|
|
1975
1983
|
}
|
|
1976
1984
|
});
|
|
@@ -2008,7 +2016,13 @@ var fixCommand = new Command14("fix").description("Fix code issues using AI").ar
|
|
|
2008
2016
|
}
|
|
2009
2017
|
} catch (error) {
|
|
2010
2018
|
spinner.fail("Fix failed");
|
|
2011
|
-
|
|
2019
|
+
if (error instanceof Error && error.message.includes("ContextOS not initialized")) {
|
|
2020
|
+
console.log(chalk17.red("\n\u274C Environment not initialized."));
|
|
2021
|
+
console.log(chalk17.yellow(` ${error.message}`));
|
|
2022
|
+
console.log(chalk17.green('\n \u{1F449} Run "ctx init" to set up your project.\n'));
|
|
2023
|
+
} else {
|
|
2024
|
+
console.error(chalk17.red("\nError:"), error instanceof Error ? error.message : String(error));
|
|
2025
|
+
}
|
|
2012
2026
|
process.exit(1);
|
|
2013
2027
|
}
|
|
2014
2028
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contextos/cli",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "CLI for ContextOS - The Context Server Protocol for AI Coding",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"inquirer": "^9.2.0",
|
|
17
17
|
"ora": "^8.0.0",
|
|
18
18
|
"yaml": "^2.4.0",
|
|
19
|
-
"@contextos/core": "0.4.
|
|
19
|
+
"@contextos/core": "0.4.4"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/inquirer": "^9.0.7",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"build": "tsup src/index.ts --format esm --clean",
|
|
36
36
|
"dev": "tsup src/index.ts --format cjs --dts --watch",
|
|
37
37
|
"start": "node dist/index.js",
|
|
38
|
-
"test": "
|
|
38
|
+
"test": "echo 'No CLI tests yet'",
|
|
39
39
|
"lint": "eslint src/",
|
|
40
40
|
"clean": "rimraf dist"
|
|
41
41
|
}
|