inquirerer 4.5.1 → 4.5.2

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/esm/keypress.js CHANGED
@@ -121,6 +121,9 @@ export class TerminalKeypress {
121
121
  pause() {
122
122
  this.active = false;
123
123
  this.clearHandlers();
124
+ if (typeof this.input.setRawMode === 'function') {
125
+ this.input.setRawMode(false);
126
+ }
124
127
  }
125
128
  resume() {
126
129
  this.active = true;
package/esm/prompt.js CHANGED
@@ -1133,7 +1133,11 @@ export class Inquirerer {
1133
1133
  close() {
1134
1134
  if (this.rl) {
1135
1135
  this.rl.close();
1136
+ this.rl = null;
1137
+ }
1138
+ if (this.keypress) {
1136
1139
  this.keypress.destroy();
1140
+ this.keypress = null;
1137
1141
  }
1138
1142
  }
1139
1143
  }
package/keypress.js CHANGED
@@ -124,6 +124,9 @@ class TerminalKeypress {
124
124
  pause() {
125
125
  this.active = false;
126
126
  this.clearHandlers();
127
+ if (typeof this.input.setRawMode === 'function') {
128
+ this.input.setRawMode(false);
129
+ }
127
130
  }
128
131
  resume() {
129
132
  this.active = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inquirerer",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
4
4
  "author": "Constructive <developers@constructive.io>",
5
5
  "description": "TypeScript-first library for building beautiful CLI interfaces with interactive prompts",
6
6
  "main": "index.js",
@@ -46,5 +46,5 @@
46
46
  "makage": "0.1.10",
47
47
  "string-width": "4.2.3"
48
48
  },
49
- "gitHead": "1d2795da97e2217a7df24b2942a0b4e5879ac16f"
49
+ "gitHead": "d591a7599e3e6ac48ade4eea3c0efe0f9f8af87b"
50
50
  }
package/prompt.js CHANGED
@@ -1140,7 +1140,11 @@ class Inquirerer {
1140
1140
  close() {
1141
1141
  if (this.rl) {
1142
1142
  this.rl.close();
1143
+ this.rl = null;
1144
+ }
1145
+ if (this.keypress) {
1143
1146
  this.keypress.destroy();
1147
+ this.keypress = null;
1144
1148
  }
1145
1149
  }
1146
1150
  }