@neuraiproject/neurai-depin-terminal 2.0.0 → 2.0.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuraiproject/neurai-depin-terminal",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Neurai DePIN terminal messaging client",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -58,4 +58,4 @@
58
58
  "esbuild": "^0.27.2",
59
59
  "pkg": "^5.8.1"
60
60
  }
61
- }
61
+ }
@@ -18,7 +18,7 @@ import {
18
18
  SUCCESS_MESSAGES
19
19
  } from '../constants.js';
20
20
  import { ConfigError, PasswordError, EncryptionError } from '../errors.js';
21
- import { readPassword, validatePassword, isValidUrl, isValidTimezone } from '../utils.js';
21
+ import { readPassword, validatePassword, isValidUrl, isValidTimezone, drainInput } from '../utils.js';
22
22
 
23
23
  /**
24
24
  * Manages application configuration with encrypted private key storage
@@ -225,6 +225,9 @@ export class ConfigManager {
225
225
  * @returns {Promise<void>}
226
226
  */
227
227
  async runWizard() {
228
+ // Ensure input buffer is clean before starting wizard
229
+ await drainInput(process.stdin);
230
+
228
231
  const rl = readline.createInterface({
229
232
  input: process.stdin,
230
233
  output: process.stdout
@@ -296,9 +299,9 @@ export class ConfigManager {
296
299
  rl2,
297
300
  'Timezone offset (e.g., +1, -5, +5.5, UTC) [default: UTC]: '
298
301
  );
299
-
302
+
300
303
  const candidate = input || 'UTC';
301
-
304
+
302
305
  if (isValidTimezone(candidate)) {
303
306
  timezone = candidate;
304
307
  } else {