@inquirer/core 1.1.3 → 1.2.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.
|
@@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Separator = void 0;
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const figures_1 = __importDefault(require("figures"));
|
|
9
|
+
/**
|
|
10
|
+
* Separator object
|
|
11
|
+
* Used to space/separate choices group
|
|
12
|
+
*/
|
|
9
13
|
class Separator {
|
|
10
14
|
constructor(separator) {
|
|
11
15
|
Object.defineProperty(this, "separator", {
|
|
@@ -24,5 +28,8 @@ class Separator {
|
|
|
24
28
|
this.separator = separator;
|
|
25
29
|
}
|
|
26
30
|
}
|
|
31
|
+
static isSeparator(choice) {
|
|
32
|
+
return Boolean(choice && choice.type === 'separator');
|
|
33
|
+
}
|
|
27
34
|
}
|
|
28
35
|
exports.Separator = Separator;
|
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
* Separator object
|
|
3
3
|
* Used to space/separate choices group
|
|
4
4
|
*/
|
|
5
|
-
export type SeparatorType = {
|
|
6
|
-
type: 'separator';
|
|
7
|
-
separator: string;
|
|
8
|
-
};
|
|
9
5
|
export declare class Separator {
|
|
10
|
-
separator: string;
|
|
6
|
+
readonly separator: string;
|
|
11
7
|
readonly type = "separator";
|
|
12
8
|
constructor(separator?: string);
|
|
9
|
+
static isSeparator(choice: undefined | Separator | Record<string, unknown>): choice is Separator;
|
|
13
10
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import figures from 'figures';
|
|
3
|
+
/**
|
|
4
|
+
* Separator object
|
|
5
|
+
* Used to space/separate choices group
|
|
6
|
+
*/
|
|
3
7
|
export class Separator {
|
|
4
8
|
separator = chalk.dim(new Array(15).join(figures.line));
|
|
5
9
|
type = 'separator';
|
|
@@ -8,4 +12,7 @@ export class Separator {
|
|
|
8
12
|
this.separator = separator;
|
|
9
13
|
}
|
|
10
14
|
}
|
|
15
|
+
static isSeparator(choice) {
|
|
16
|
+
return Boolean(choice && choice.type === 'separator');
|
|
17
|
+
}
|
|
11
18
|
}
|
|
@@ -2,12 +2,9 @@
|
|
|
2
2
|
* Separator object
|
|
3
3
|
* Used to space/separate choices group
|
|
4
4
|
*/
|
|
5
|
-
export type SeparatorType = {
|
|
6
|
-
type: 'separator';
|
|
7
|
-
separator: string;
|
|
8
|
-
};
|
|
9
5
|
export declare class Separator {
|
|
10
|
-
separator: string;
|
|
6
|
+
readonly separator: string;
|
|
11
7
|
readonly type = "separator";
|
|
12
8
|
constructor(separator?: string);
|
|
9
|
+
static isSeparator(choice: undefined | Separator | Record<string, unknown>): choice is Separator;
|
|
13
10
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inquirer/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14.18.0"
|
|
6
6
|
},
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "f3a176d916fe26038c9fb57f1ab485aa79c053ce"
|
|
98
98
|
}
|