@kiyeonjeon21/ncli 0.1.5 → 0.1.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.
@@ -4,17 +4,18 @@ import { createInterface } from "readline";
4
4
  import { NCLI_DIR, NCLI_ENV_PATH, loadConfig } from "../core/config.js";
5
5
  import { printJson } from "../core/output.js";
6
6
  function prompt(question, mask = false) {
7
- return new Promise((resolve) => {
8
- process.stderr.write(question);
9
- if (!mask) {
10
- const rl = createInterface({ input: process.stdin, output: process.stderr });
11
- rl.question("", (answer) => {
7
+ if (!mask) {
8
+ const rl = createInterface({ input: process.stdin, output: process.stderr });
9
+ return new Promise((resolve) => {
10
+ rl.question(question, (answer) => {
12
11
  rl.close();
13
12
  resolve(answer.trim());
14
13
  });
15
- return;
16
- }
17
- // Masked input
14
+ });
15
+ }
16
+ // Masked input
17
+ return new Promise((resolve) => {
18
+ process.stderr.write(question);
18
19
  const stdin = process.stdin;
19
20
  const wasRaw = stdin.isRaw;
20
21
  if (stdin.isTTY)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiyeonjeon21/ncli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Agent-native CLI for Naver Open APIs",
5
5
  "type": "module",
6
6
  "bin": {