inquirerer 1.3.0 → 1.5.0
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/commander.js +1 -1
- package/esm/commander.js +1 -1
- package/esm/keypress.js +1 -1
- package/esm/prompt.js +2 -0
- package/keypress.js +1 -1
- package/package.json +2 -2
- package/prompt.js +2 -0
package/commander.js
CHANGED
|
@@ -10,7 +10,7 @@ const prompt_1 = require("./prompt");
|
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
exports.defaultCLIOptions = {
|
|
12
12
|
version: `inquirerer@${(0, utils_1.getVersion)()}`,
|
|
13
|
-
noTty:
|
|
13
|
+
noTty: false,
|
|
14
14
|
input: process.stdin,
|
|
15
15
|
output: process.stdout,
|
|
16
16
|
minimistOpts: {
|
package/esm/commander.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Inquirerer } from './prompt';
|
|
|
4
4
|
import { getVersion } from './utils';
|
|
5
5
|
export const defaultCLIOptions = {
|
|
6
6
|
version: `inquirerer@${getVersion()}`,
|
|
7
|
-
noTty:
|
|
7
|
+
noTty: false,
|
|
8
8
|
input: process.stdin,
|
|
9
9
|
output: process.stdout,
|
|
10
10
|
minimistOpts: {
|
package/esm/keypress.js
CHANGED
|
@@ -9,7 +9,7 @@ export const KEY_CODES = {
|
|
|
9
9
|
ENTER: '\r',
|
|
10
10
|
SPACE: ' ',
|
|
11
11
|
CTRL_C: '\u0003',
|
|
12
|
-
BACKSPACE: '\x7f',
|
|
12
|
+
BACKSPACE: '\x7f', // Commonly used BACKSPACE key in Unix-like systems
|
|
13
13
|
BACKSPACE_LEGACY: '\x08' // For compatibility with some systems
|
|
14
14
|
};
|
|
15
15
|
export class TerminalKeypress {
|
package/esm/prompt.js
CHANGED
|
@@ -554,6 +554,8 @@ export class Inquirerer {
|
|
|
554
554
|
input = input.toLowerCase(); // Normalize input for case-insensitive comparison
|
|
555
555
|
// Fuzzy matching: Check if all characters of the input can be found in the option name in order
|
|
556
556
|
const fuzzyMatch = (option, input) => {
|
|
557
|
+
if (!input || !input.trim().length)
|
|
558
|
+
return true;
|
|
557
559
|
const length = input.length;
|
|
558
560
|
let position = 0; // Position in the input string
|
|
559
561
|
// Iterate over each character in the option name
|
package/keypress.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.KEY_CODES = {
|
|
|
12
12
|
ENTER: '\r',
|
|
13
13
|
SPACE: ' ',
|
|
14
14
|
CTRL_C: '\u0003',
|
|
15
|
-
BACKSPACE: '\x7f',
|
|
15
|
+
BACKSPACE: '\x7f', // Commonly used BACKSPACE key in Unix-like systems
|
|
16
16
|
BACKSPACE_LEGACY: '\x08' // For compatibility with some systems
|
|
17
17
|
};
|
|
18
18
|
class TerminalKeypress {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inquirerer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"author": "Dan Lynch <pyramation@gmail.com>",
|
|
5
5
|
"description": "inquirerer",
|
|
6
6
|
"main": "index.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"minimist": "^1.2.8"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [],
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "624206356e03bb9c096b0a33f4dff5c28f50b3e4"
|
|
39
39
|
}
|
package/prompt.js
CHANGED
|
@@ -560,6 +560,8 @@ class Inquirerer {
|
|
|
560
560
|
input = input.toLowerCase(); // Normalize input for case-insensitive comparison
|
|
561
561
|
// Fuzzy matching: Check if all characters of the input can be found in the option name in order
|
|
562
562
|
const fuzzyMatch = (option, input) => {
|
|
563
|
+
if (!input || !input.trim().length)
|
|
564
|
+
return true;
|
|
563
565
|
const length = input.length;
|
|
564
566
|
let position = 0; // Position in the input string
|
|
565
567
|
// Iterate over each character in the option name
|