devwing 0.1.19 → 0.1.20
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 +10 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -543,8 +543,6 @@ async function loginCommand() {
|
|
|
543
543
|
return;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
|
-
logger.printBanner();
|
|
547
|
-
logger.newline();
|
|
548
546
|
const { method } = await inquirer5.prompt([
|
|
549
547
|
{
|
|
550
548
|
type: "list",
|
|
@@ -569,7 +567,6 @@ async function loginCommand() {
|
|
|
569
567
|
if (error.message) {
|
|
570
568
|
logger.error(error.message);
|
|
571
569
|
}
|
|
572
|
-
process.exit(1);
|
|
573
570
|
}
|
|
574
571
|
}
|
|
575
572
|
async function loginWithEmail() {
|
|
@@ -779,7 +776,6 @@ async function logoutCommand() {
|
|
|
779
776
|
} catch (error) {
|
|
780
777
|
logger.error("Logout failed");
|
|
781
778
|
logger.error(error.message || "Unknown error");
|
|
782
|
-
process.exit(1);
|
|
783
779
|
}
|
|
784
780
|
}
|
|
785
781
|
async function statusCommand() {
|
|
@@ -822,7 +818,6 @@ async function statusCommand() {
|
|
|
822
818
|
} catch (error) {
|
|
823
819
|
logger.error("Failed to check status");
|
|
824
820
|
logger.error(error.message || "Unknown error");
|
|
825
|
-
process.exit(1);
|
|
826
821
|
}
|
|
827
822
|
}
|
|
828
823
|
function showQuickStart() {
|
|
@@ -2761,6 +2756,7 @@ function isDemoMode() {
|
|
|
2761
2756
|
}
|
|
2762
2757
|
var __sessionFile = fileURLToPath(import.meta.url);
|
|
2763
2758
|
var __sessionDir = dirname(__sessionFile);
|
|
2759
|
+
var sleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
2764
2760
|
function getVersion() {
|
|
2765
2761
|
const paths = [
|
|
2766
2762
|
join(__sessionDir, "../package.json"),
|
|
@@ -2775,7 +2771,7 @@ function getVersion() {
|
|
|
2775
2771
|
continue;
|
|
2776
2772
|
}
|
|
2777
2773
|
}
|
|
2778
|
-
return "0.1.
|
|
2774
|
+
return "0.1.20";
|
|
2779
2775
|
}
|
|
2780
2776
|
var DEMO_USER2 = {
|
|
2781
2777
|
id: "usr_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
@@ -2907,17 +2903,17 @@ var InteractiveSession = class {
|
|
|
2907
2903
|
}
|
|
2908
2904
|
resetStdin() {
|
|
2909
2905
|
try {
|
|
2910
|
-
if (process.stdin.isPaused()) {
|
|
2911
|
-
process.stdin.resume();
|
|
2912
|
-
}
|
|
2913
|
-
process.stdin.removeAllListeners("keypress");
|
|
2914
|
-
process.stdin.removeAllListeners("data");
|
|
2915
2906
|
if (typeof process.stdin.setRawMode === "function") {
|
|
2916
2907
|
try {
|
|
2917
2908
|
process.stdin.setRawMode(false);
|
|
2918
2909
|
} catch {
|
|
2919
2910
|
}
|
|
2920
2911
|
}
|
|
2912
|
+
process.stdin.removeAllListeners("keypress");
|
|
2913
|
+
process.stdin.removeAllListeners("data");
|
|
2914
|
+
if (process.stdin.isPaused()) {
|
|
2915
|
+
process.stdin.resume();
|
|
2916
|
+
}
|
|
2921
2917
|
} catch {
|
|
2922
2918
|
}
|
|
2923
2919
|
}
|
|
@@ -3073,6 +3069,7 @@ var InteractiveSession = class {
|
|
|
3073
3069
|
logger.error(error.message || "Command failed");
|
|
3074
3070
|
}
|
|
3075
3071
|
this.resetStdin();
|
|
3072
|
+
await sleep2(80);
|
|
3076
3073
|
this.recreateReadline();
|
|
3077
3074
|
}
|
|
3078
3075
|
// ============================================================
|
|
@@ -3098,6 +3095,7 @@ var InteractiveSession = class {
|
|
|
3098
3095
|
logger.error(error.message || "Command failed");
|
|
3099
3096
|
}
|
|
3100
3097
|
this.resetStdin();
|
|
3098
|
+
await sleep2(80);
|
|
3101
3099
|
this.recreateReadline();
|
|
3102
3100
|
return;
|
|
3103
3101
|
}
|
|
@@ -3175,6 +3173,7 @@ ${recent[recent.length - 1].content}`;
|
|
|
3175
3173
|
// ============================================================
|
|
3176
3174
|
exitSession() {
|
|
3177
3175
|
if (this.sigintTimer) clearTimeout(this.sigintTimer);
|
|
3176
|
+
this.resetStdin();
|
|
3178
3177
|
console.log();
|
|
3179
3178
|
console.log(chalk7.dim(" Goodbye! Happy coding."));
|
|
3180
3179
|
console.log();
|