openkitt 0.2.4 → 0.2.6
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/cli.js +15 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -265562,7 +265562,7 @@ async function helpCommand(_context, _args) {
|
|
|
265562
265562
|
// package.json
|
|
265563
265563
|
var package_default = {
|
|
265564
265564
|
name: "openkitt",
|
|
265565
|
-
version: "0.2.
|
|
265565
|
+
version: "0.2.6",
|
|
265566
265566
|
description: "AI-powered monorepo scaffolding CLI",
|
|
265567
265567
|
keywords: [
|
|
265568
265568
|
"cli",
|
|
@@ -265806,7 +265806,14 @@ async function dispatchCommand(commandLine, context) {
|
|
|
265806
265806
|
console.log(import_picocolors12.default.red(`✗ ${authCheck.message}`));
|
|
265807
265807
|
return "continue";
|
|
265808
265808
|
}
|
|
265809
|
-
|
|
265809
|
+
if (process.stdin.isTTY)
|
|
265810
|
+
process.stdin.setRawMode(false);
|
|
265811
|
+
try {
|
|
265812
|
+
await resolveAndRunHandler(route, context, parsed.args, parsed.key);
|
|
265813
|
+
} finally {
|
|
265814
|
+
if (process.stdin.isTTY)
|
|
265815
|
+
process.stdin.setRawMode(true);
|
|
265816
|
+
}
|
|
265810
265817
|
return "continue";
|
|
265811
265818
|
}
|
|
265812
265819
|
async function runSingleCommand(commandLine, context) {
|
|
@@ -265936,8 +265943,12 @@ async function startRepl(context) {
|
|
|
265936
265943
|
console.log("Use /exit to quit.");
|
|
265937
265944
|
rl.prompt();
|
|
265938
265945
|
});
|
|
265946
|
+
let intentionalClose = false;
|
|
265939
265947
|
rl.on("close", () => {
|
|
265940
|
-
|
|
265948
|
+
if (intentionalClose)
|
|
265949
|
+
process.exit(0);
|
|
265950
|
+
else
|
|
265951
|
+
rl.prompt();
|
|
265941
265952
|
});
|
|
265942
265953
|
rl.prompt();
|
|
265943
265954
|
rl.on("line", async (line) => {
|
|
@@ -265945,6 +265956,7 @@ async function startRepl(context) {
|
|
|
265945
265956
|
try {
|
|
265946
265957
|
const result = await dispatchCommand(line, context);
|
|
265947
265958
|
if (result === "exit") {
|
|
265959
|
+
intentionalClose = true;
|
|
265948
265960
|
rl.close();
|
|
265949
265961
|
return;
|
|
265950
265962
|
}
|