@neuraiproject/neurai-depin-terminal 2.0.1 → 2.0.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/README.md +3 -2
- package/dist/index.cjs +38 -38
- package/package.json +1 -1
- package/src/config/ConfigManager.js +14 -19
- package/src/utils.js +2 -2
package/package.json
CHANGED
|
@@ -271,24 +271,9 @@ export class ConfigManager {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
//
|
|
275
|
-
rl.close();
|
|
276
|
-
|
|
277
|
-
// Get password and encrypt private key
|
|
278
|
-
const password = await this.promptForPasswordCreation();
|
|
279
|
-
process.stdout.write('Encrypting private key...');
|
|
280
|
-
const encryptedPrivateKey = await this.encryptPrivateKey(privateKey, password);
|
|
281
|
-
process.stdout.write('\r\x1b[K'); // Clear the "Encrypting..." line
|
|
282
|
-
console.log('✓ Private key encrypted successfully\n');
|
|
283
|
-
|
|
284
|
-
// Create new readline for remaining questions
|
|
285
|
-
const rl2 = readline.createInterface({
|
|
286
|
-
input: process.stdin,
|
|
287
|
-
output: process.stdout
|
|
288
|
-
});
|
|
289
|
-
|
|
274
|
+
// Collect polling interval
|
|
290
275
|
const pollIntervalStr = await this.promptInput(
|
|
291
|
-
|
|
276
|
+
rl,
|
|
292
277
|
`Polling interval in ms [${POLLING.DEFAULT_INTERVAL}]: `
|
|
293
278
|
) || String(POLLING.DEFAULT_INTERVAL);
|
|
294
279
|
|
|
@@ -296,7 +281,7 @@ export class ConfigManager {
|
|
|
296
281
|
let timezone = '';
|
|
297
282
|
while (!timezone) {
|
|
298
283
|
const input = await this.promptInput(
|
|
299
|
-
|
|
284
|
+
rl,
|
|
300
285
|
'Timezone offset (e.g., +1, -5, +5.5, UTC) [default: UTC]: '
|
|
301
286
|
);
|
|
302
287
|
|
|
@@ -309,7 +294,17 @@ export class ConfigManager {
|
|
|
309
294
|
}
|
|
310
295
|
}
|
|
311
296
|
|
|
312
|
-
|
|
297
|
+
// Close readline before password input (uses raw mode)
|
|
298
|
+
rl.close();
|
|
299
|
+
|
|
300
|
+
// Get password and encrypt private key
|
|
301
|
+
const password = await this.promptForPasswordCreation();
|
|
302
|
+
process.stdout.write('Encrypting private key...');
|
|
303
|
+
const encryptedPrivateKey = await this.encryptPrivateKey(privateKey, password);
|
|
304
|
+
process.stdout.write('\r\x1b[K'); // Clear the "Encrypting..." line
|
|
305
|
+
console.log('✓ Private key encrypted successfully\n');
|
|
306
|
+
|
|
307
|
+
|
|
313
308
|
|
|
314
309
|
// Build configuration object
|
|
315
310
|
const config = {
|
package/src/utils.js
CHANGED
|
@@ -221,8 +221,8 @@ export async function readPassword(prompt, maskChar = '*') {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
//
|
|
225
|
-
|
|
224
|
+
// Pause stdin to ensure clean state for next consumer (e.g. readline)
|
|
225
|
+
stdin.pause();
|
|
226
226
|
};
|
|
227
227
|
|
|
228
228
|
// Ensure stdin is in correct initial state
|