inquirer-plugins 1.0.5 → 1.0.7
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 +4 -0
- package/dist/lib/_internal/plugins/table/types/columns.d.ts +15 -18
- package/dist/lib/_internal/plugins/table/types/common.d.ts +16 -16
- package/dist/lib/_internal/plugins/table/utils.d.ts.map +1 -1
- package/dist/lib/_internal/plugins/table.d.ts +4 -16
- package/dist/lib/_internal/plugins/table.d.ts.map +1 -1
- package/dist/lib/_internal/types/chalk.d.ts +5 -5
- package/dist/lib/_internal/types/inquirer.d.ts +1 -2
- package/dist/lib/_internal/types/inquirer.d.ts.map +1 -1
- package/dist/lib/_internal/types/parse-types.d.ts +6 -6
- package/dist/lib/_internal/types/parse-types.js +4 -4
- package/dist/lib/_internal/types/table.d.ts +11 -11
- package/dist/lib/_internal/utils/chalk.d.ts +12 -12
- package/dist/lib/_internal/utils/chalk.d.ts.map +1 -1
- package/dist/lib/_internal/utils/common.d.ts +4 -4
- package/dist/lib/_internal/utils/common.d.ts.map +1 -1
- package/dist/lib/_internal/utils/keypress.d.ts +12 -12
- package/dist/lib/_internal/utils/keypress.d.ts.map +1 -1
- package/dist/lib/_internal/utils/keypress.js +28 -28
- package/dist/lib/_internal/utils/parse-types.d.ts +4 -4
- package/dist/lib/_internal/utils/parse-types.d.ts.map +1 -1
- package/dist/lib/_internal/utils/parse-types.js +21 -21
- package/dist/lib/_internal/utils/table/arrow-key.d.ts +5 -14
- package/dist/lib/_internal/utils/table/arrow-key.d.ts.map +1 -1
- package/dist/lib/_internal/utils/table/cell.d.ts +3 -3
- package/dist/lib/_internal/utils/table/cell.d.ts.map +1 -1
- package/dist/lib/_internal/utils/table/columns.d.ts.map +1 -1
- package/dist/lib/_internal/utils/table/pagenate.d.ts +4 -4
- package/dist/lib/_internal/utils/table/pagenate.d.ts.map +1 -1
- package/dist/lib/_internal/utils/table/rows.d.ts +3 -3
- package/dist/lib/_internal/utils/table/rows.d.ts.map +1 -1
- package/dist/lib/modules/table.d.ts +2 -2
- package/dist/lib/modules/table.js +1 -1
- package/package.json +5 -5
- package/dist/lib/_internal/plugins/table/table.d.ts +0 -2
- package/dist/lib/_internal/plugins/table/table.d.ts.map +0 -1
- package/dist/lib/_internal/plugins/table/table.js +0 -1
- package/dist/lib/_internal/utils/columns.d.ts +0 -7
- package/dist/lib/_internal/utils/columns.d.ts.map +0 -1
- package/dist/lib/_internal/utils/columns.js +0 -28
package/README.md
CHANGED
|
@@ -31,10 +31,13 @@ This plugin has been customized to support TypeScript and symbol input.
|
|
|
31
31
|
all: true
|
|
32
32
|
linked: true
|
|
33
33
|
-->
|
|
34
|
+
|
|
34
35
|
[TABLE PLUGIN][md_hopper:inquirer-plugins-table]
|
|
36
|
+
|
|
35
37
|
<!-- MD_HOPPER: END_LINKS: -->
|
|
36
38
|
|
|
37
39
|
<!-- MD_HOPPER: BEGIN_DEFINE_LINKS: -->
|
|
40
|
+
|
|
38
41
|
[md_hopper:main]: ../../README.md 'MyPackages'
|
|
39
42
|
[md_hopper:inquirer-plugins-table]: ./src/lib/_internal/plugins/table/README.md 'TABLE PLUGIN'
|
|
40
43
|
[md_hopper:md-hopper]: ../md-hopper/README.md 'MD HOPPER'
|
|
@@ -43,4 +46,5 @@ linked: true
|
|
|
43
46
|
[md_hopper:my-gadgetry-dev-ops]: ../my-gadgetry/src/lib/_internal/dev-ops/README.md 'Dev Ops'
|
|
44
47
|
[md_hopper:test]: ../test/README.md 'test'
|
|
45
48
|
[md_hopper:plugins-builder]: ../../plugins/builder/README.md 'builder'
|
|
49
|
+
|
|
46
50
|
<!-- MD_HOPPER: END_DEFINE_LINKS: -->
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { ParseType } from '../../../types/parse-types.js'
|
|
2
|
-
import { Message } from '../../../types/chalk.js'
|
|
3
|
-
import { ValidateResult } from './common.js'
|
|
1
|
+
import { ParseType } from '../../../types/parse-types.js';
|
|
2
|
+
import { Message } from '../../../types/chalk.js';
|
|
3
|
+
import { ValidateResult } from './common.js';
|
|
4
4
|
interface DisabledColumn {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
name: Message;
|
|
6
|
+
value: string;
|
|
7
|
+
disabled: true;
|
|
8
8
|
}
|
|
9
|
-
interface EditableColumn<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
type: ParseType
|
|
16
|
-
validate?: V
|
|
17
|
-
parser?: P
|
|
9
|
+
interface EditableColumn<P extends (...args: any[]) => any = (...args: any[]) => any, V extends (...args: any[]) => ValidateResult = (...args: any[]) => ValidateResult> {
|
|
10
|
+
name: Message;
|
|
11
|
+
value: string;
|
|
12
|
+
type: ParseType;
|
|
13
|
+
validate?: V;
|
|
14
|
+
parser?: P;
|
|
18
15
|
}
|
|
19
|
-
export type Column = DisabledColumn | EditableColumn
|
|
20
|
-
export {}
|
|
21
|
-
//# sourceMappingURL=columns.d.ts.map
|
|
16
|
+
export type Column = DisabledColumn | EditableColumn;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=columns.d.ts.map
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { Cell } from '../../../types/table.js'
|
|
2
|
-
import { ChalkInstance } from 'chalk'
|
|
3
|
-
export declare const DEFAULT_PAGE_SIZE = 5
|
|
1
|
+
import { Cell } from '../../../types/table.js';
|
|
2
|
+
import { ChalkInstance } from 'chalk';
|
|
3
|
+
export declare const DEFAULT_PAGE_SIZE = 5;
|
|
4
4
|
export declare const END_STATUSES: Readonly<{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export type EndStatus = (typeof END_STATUSES)[keyof typeof END_STATUSES]
|
|
5
|
+
readonly confirmed: "confirmed";
|
|
6
|
+
readonly escaped: "escaped";
|
|
7
|
+
}>;
|
|
8
|
+
export type EndStatus = (typeof END_STATUSES)[keyof typeof END_STATUSES];
|
|
9
9
|
export interface ValidateResult {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
isValid: boolean;
|
|
11
|
+
message: string;
|
|
12
12
|
}
|
|
13
13
|
export interface Colors {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
selected: ChalkInstance;
|
|
15
|
+
editable: ChalkInstance;
|
|
16
|
+
editing: ChalkInstance;
|
|
17
17
|
}
|
|
18
18
|
export interface Typing {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
current: Cell;
|
|
20
|
+
backup: Cell;
|
|
21
21
|
}
|
|
22
22
|
export interface NextClose {
|
|
23
|
-
|
|
23
|
+
escape: boolean;
|
|
24
24
|
}
|
|
25
|
-
//# sourceMappingURL=common.d.ts.map
|
|
25
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/plugins/table/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EACL,MAAM,EACN,IAAI,EAEJ,WAAW,EACX,MAAM,EAEN,MAAM,EACN,SAAS,EAET,SAAS,EACT,cAAc,EACd,OAAO,EACP,IAAI,EACL,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,SAAS,EAAE,cAAc,EAAgB,aAAa,EAAQ,MAAM,iBAAiB,CAAA;AAG9F,OAAO,EAAE,WAAW,EAAY,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAe,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,KAA4B,MAAM,YAAY,CAAA;AAKrD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAEzC,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/plugins/table/utils.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
table: Record<string, number | boolean | string | null>[];
|
|
6
|
-
}>;
|
|
7
|
-
}, {
|
|
8
|
-
columns: import("./table/types.js").Column[];
|
|
9
|
-
rows: import("../types/table.js").Rows;
|
|
10
|
-
colors?: Partial<import("./table/types.js").Colors> | undefined;
|
|
11
|
-
title?: string | import("chalk").ChalkInstance | undefined;
|
|
12
|
-
description?: string | import("chalk").ChalkInstance | undefined;
|
|
13
|
-
messages?: import("./table/types.js").Messages | undefined;
|
|
14
|
-
validate?: ((...args: any[]) => import("./table/types.js").ValidateResult) | undefined;
|
|
15
|
-
pageSize?: import("../types/table.js").PageSize | undefined;
|
|
16
|
-
}>;
|
|
1
|
+
import { createPrompt } from '@inquirer/core';
|
|
2
|
+
import { PartialTableConfig, Answers } from './table/types.js';
|
|
3
|
+
import { DoneIf } from '../types/inquirer.js';
|
|
4
|
+
export declare const TablePlugin: ReturnType<typeof createPrompt<DoneIf<Answers>, PartialTableConfig>>;
|
|
17
5
|
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/plugins/table.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/plugins/table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA2D,MAAM,gBAAgB,CAAA;AAEtG,OAAO,EACL,kBAAkB,EAQlB,OAAO,EAER,MAAM,kBAAkB,CAAA;AAiBzB,OAAO,EAAY,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAoCrD,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC,CAyJ5F,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ChalkInstance } from 'chalk'
|
|
2
|
-
export type Message = string | ChalkInstance
|
|
1
|
+
import { ChalkInstance } from 'chalk';
|
|
2
|
+
export type Message = string | ChalkInstance;
|
|
3
3
|
export interface ExtractedAnsiText {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
text: string;
|
|
5
|
+
attach: (v: any) => string;
|
|
6
6
|
}
|
|
7
|
-
//# sourceMappingURL=chalk.d.ts.map
|
|
7
|
+
//# sourceMappingURL=chalk.d.ts.map
|
|
@@ -2,11 +2,10 @@ import { Status } from '@inquirer/core';
|
|
|
2
2
|
import { type Prettify } from '@inquirer/type';
|
|
3
3
|
export type Answers<T> = Readonly<T>;
|
|
4
4
|
export type SetUseState<Value> = (newValue: Value) => void;
|
|
5
|
-
interface DoneIf<T> {
|
|
5
|
+
export interface DoneIf<T> {
|
|
6
6
|
status: Status;
|
|
7
7
|
data: T;
|
|
8
8
|
}
|
|
9
9
|
export type Done<T> = (arg: Prettify<DoneIf<T>>) => void;
|
|
10
10
|
export declare const STATUSES: Record<Status, Status>;
|
|
11
|
-
export {};
|
|
12
11
|
//# sourceMappingURL=inquirer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inquirer.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/types/inquirer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAA;AACpC,MAAM,MAAM,WAAW,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAA;AAE1D,
|
|
1
|
+
{"version":3,"file":"inquirer.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/types/inquirer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAA;AACpC,MAAM,MAAM,WAAW,CAAC,KAAK,IAAI,CAAC,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAA;AAE1D,MAAM,WAAW,MAAM,CAAC,CAAC;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,CAAC,CAAA;CACR;AACD,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;AAExD,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIjC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const PARSE_TYPES: Readonly<{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export type ParseType = (typeof PARSE_TYPES)[keyof typeof PARSE_TYPES]
|
|
7
|
-
//# sourceMappingURL=parse-types.d.ts.map
|
|
2
|
+
readonly input: "input";
|
|
3
|
+
readonly number: "number";
|
|
4
|
+
readonly confirm: "confirm";
|
|
5
|
+
}>;
|
|
6
|
+
export type ParseType = (typeof PARSE_TYPES)[keyof typeof PARSE_TYPES];
|
|
7
|
+
//# sourceMappingURL=parse-types.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const PARSE_TYPES = Object.freeze({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
})
|
|
2
|
+
input: 'input',
|
|
3
|
+
number: 'number',
|
|
4
|
+
confirm: 'confirm',
|
|
5
|
+
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ExtractedAnsiText } from './chalk.js'
|
|
2
|
-
export type PageSize = number | null
|
|
1
|
+
import { ExtractedAnsiText } from './chalk.js';
|
|
2
|
+
export type PageSize = number | null;
|
|
3
3
|
export interface Paginator {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
indexFrom: number;
|
|
5
|
+
indexTo: number | null;
|
|
6
6
|
}
|
|
7
7
|
export interface PointerIndexes {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
row: number;
|
|
9
|
+
column: number;
|
|
10
10
|
}
|
|
11
|
-
export type Cell = number | string | boolean
|
|
12
|
-
export type Rows = Cell[][]
|
|
13
|
-
export type ExtractedRow = ExtractedAnsiText
|
|
14
|
-
export type ExtractedRows = ExtractedAnsiText[][]
|
|
15
|
-
//# sourceMappingURL=table.d.ts.map
|
|
11
|
+
export type Cell = number | string | boolean;
|
|
12
|
+
export type Rows = Cell[][];
|
|
13
|
+
export type ExtractedRow = ExtractedAnsiText;
|
|
14
|
+
export type ExtractedRows = ExtractedAnsiText[][];
|
|
15
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ExtractedAnsiText } from '../types/chalk.js'
|
|
2
|
-
export declare const trim: (txt: string) => string
|
|
3
|
-
export declare const extractAnsiWrapper: (val: number | string | boolean) => ExtractedAnsiText
|
|
4
|
-
export declare const success: import(
|
|
5
|
-
export declare const warn: import(
|
|
6
|
-
export declare const info: import(
|
|
7
|
-
export declare const error: import(
|
|
8
|
-
export declare const hop: import(
|
|
9
|
-
export declare const cyan: import(
|
|
10
|
-
export declare const bold: import(
|
|
11
|
-
export declare const dim: import(
|
|
12
|
-
//# sourceMappingURL=chalk.d.ts.map
|
|
1
|
+
import { ExtractedAnsiText } from '../types/chalk.js';
|
|
2
|
+
export declare const trim: (txt: string) => string;
|
|
3
|
+
export declare const extractAnsiWrapper: (val: number | string | boolean) => ExtractedAnsiText;
|
|
4
|
+
export declare const success: import("chalk").ChalkInstance;
|
|
5
|
+
export declare const warn: import("chalk").ChalkInstance;
|
|
6
|
+
export declare const info: import("chalk").ChalkInstance;
|
|
7
|
+
export declare const error: import("chalk").ChalkInstance;
|
|
8
|
+
export declare const hop: import("chalk").ChalkInstance;
|
|
9
|
+
export declare const cyan: import("chalk").ChalkInstance;
|
|
10
|
+
export declare const bold: import("chalk").ChalkInstance;
|
|
11
|
+
export declare const dim: import("chalk").ChalkInstance;
|
|
12
|
+
//# sourceMappingURL=chalk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chalk.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/chalk.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAGnD,eAAO,MAAM,IAAI,
|
|
1
|
+
{"version":3,"file":"chalk.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/chalk.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAGnD,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,WAAyC,CAAA;AAEzE,eAAO,MAAM,kBAAkB,GAAI,KAAK,MAAM,GAAG,MAAM,GAAG,OAAO,KAAG,iBAkBnE,CAAA;AAED,eAAO,MAAM,OAAO,+BAAc,CAAA;AAClC,eAAO,MAAM,IAAI,+BAAuB,CAAA;AACxC,eAAO,MAAM,IAAI,+BAAuB,CAAA;AACxC,eAAO,MAAM,KAAK,+BAAY,CAAA;AAC9B,eAAO,MAAM,GAAG,+BAAuB,CAAA;AACvC,eAAO,MAAM,IAAI,+BAAa,CAAA;AAC9B,eAAO,MAAM,IAAI,+BAAa,CAAA;AAC9B,eAAO,MAAM,GAAG,+BAAY,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Cell } from '../types/table.js'
|
|
2
|
-
export declare const isTrue: (value: Cell) => boolean
|
|
3
|
-
export declare const getCheckbox: (bool: Cell) => string
|
|
4
|
-
//# sourceMappingURL=common.d.ts.map
|
|
1
|
+
import { Cell } from '../types/table.js';
|
|
2
|
+
export declare const isTrue: (value: Cell) => boolean;
|
|
3
|
+
export declare const getCheckbox: (bool: Cell) => string;
|
|
4
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAGtC,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAGtC,eAAO,MAAM,MAAM,GAAI,OAAO,IAAI,KAAG,OAA6C,CAAA;AAClF,eAAO,MAAM,WAAW,GAAI,MAAM,IAAI,WAA8D,CAAA"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { Key } from 'readline'
|
|
2
|
-
export declare const getKeypressValue: (key: Key) => string
|
|
3
|
-
export declare const getBackspaceText: (str: string) => string
|
|
4
|
-
export declare const isUpKey: (key: Key) => boolean
|
|
5
|
-
export declare const isDownKey: (key: Key) => boolean
|
|
6
|
-
export declare const isLeftKey: (key: Key) => boolean
|
|
7
|
-
export declare const isRightKey: (key: Key) => boolean
|
|
8
|
-
export declare const isEscapeKey: (key: Key) => boolean
|
|
9
|
-
export declare const isSpaceKey: (key: Key) => boolean
|
|
10
|
-
export declare const isDeleteKey: (key: Key) => boolean
|
|
11
|
-
export declare const isBackspaceKey: (key: Key) => boolean
|
|
12
|
-
//# sourceMappingURL=keypress.d.ts.map
|
|
1
|
+
import { Key } from 'readline';
|
|
2
|
+
export declare const getKeypressValue: (key: Key) => string;
|
|
3
|
+
export declare const getBackspaceText: (str: string) => string;
|
|
4
|
+
export declare const isUpKey: (key: Key) => boolean;
|
|
5
|
+
export declare const isDownKey: (key: Key) => boolean;
|
|
6
|
+
export declare const isLeftKey: (key: Key) => boolean;
|
|
7
|
+
export declare const isRightKey: (key: Key) => boolean;
|
|
8
|
+
export declare const isEscapeKey: (key: Key) => boolean;
|
|
9
|
+
export declare const isSpaceKey: (key: Key) => boolean;
|
|
10
|
+
export declare const isDeleteKey: (key: Key) => boolean;
|
|
11
|
+
export declare const isBackspaceKey: (key: Key) => boolean;
|
|
12
|
+
//# sourceMappingURL=keypress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keypress.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/keypress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"keypress.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/keypress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAE9B,eAAO,MAAM,gBAAgB,GAAI,KAAK,GAAG,WAaxC,CAAA;AAED,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,WAK3C,CAAA;AAED,eAAO,MAAM,OAAO,GAAI,KAAK,GAAG,YAAsB,CAAA;AACtD,eAAO,MAAM,SAAS,GAAI,KAAK,GAAG,YAAwB,CAAA;AAC1D,eAAO,MAAM,SAAS,GAAI,KAAK,GAAG,YAAwB,CAAA;AAC1D,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,YAAyB,CAAA;AAC5D,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,YAA0B,CAAA;AAC9D,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,YAAyB,CAAA;AAC5D,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,YAA0B,CAAA;AAC9D,eAAO,MAAM,cAAc,GAAI,KAAK,GAAG,YAA6B,CAAA"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
export const getKeypressValue = key => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
export const getBackspaceText = str => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
export const isUpKey = key => key.name === 'up'
|
|
22
|
-
export const isDownKey = key => key.name === 'down'
|
|
23
|
-
export const isLeftKey = key => key.name === 'left'
|
|
24
|
-
export const isRightKey = key => key.name === 'right'
|
|
25
|
-
export const isEscapeKey = key => key.name === 'escape'
|
|
26
|
-
export const isSpaceKey = key => key.name === 'space'
|
|
27
|
-
export const isDeleteKey = key => key.name === 'delete'
|
|
28
|
-
export const isBackspaceKey = key => key.name === 'backspace'
|
|
1
|
+
export const getKeypressValue = (key) => {
|
|
2
|
+
switch (key.name) {
|
|
3
|
+
case 'escape':
|
|
4
|
+
case 'delete':
|
|
5
|
+
case 'backspace':
|
|
6
|
+
case 'down':
|
|
7
|
+
case 'up':
|
|
8
|
+
case 'left':
|
|
9
|
+
case 'right':
|
|
10
|
+
return '';
|
|
11
|
+
default:
|
|
12
|
+
return key.sequence || '';
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export const getBackspaceText = (str) => {
|
|
16
|
+
if (!str) {
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
19
|
+
return str.slice(0, -1);
|
|
20
|
+
};
|
|
21
|
+
export const isUpKey = (key) => key.name === 'up';
|
|
22
|
+
export const isDownKey = (key) => key.name === 'down';
|
|
23
|
+
export const isLeftKey = (key) => key.name === 'left';
|
|
24
|
+
export const isRightKey = (key) => key.name === 'right';
|
|
25
|
+
export const isEscapeKey = (key) => key.name === 'escape';
|
|
26
|
+
export const isSpaceKey = (key) => key.name === 'space';
|
|
27
|
+
export const isDeleteKey = (key) => key.name === 'delete';
|
|
28
|
+
export const isBackspaceKey = (key) => key.name === 'backspace';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParseType } from '../types/parse-types.js'
|
|
2
|
-
export declare const parse: (value: string, type: ParseType) => string | number | boolean
|
|
3
|
-
export declare const parseView: (value: string, type: ParseType) => string | number | boolean
|
|
4
|
-
//# sourceMappingURL=parse-types.d.ts.map
|
|
1
|
+
import { ParseType } from '../types/parse-types.js';
|
|
2
|
+
export declare const parse: (value: string, type: ParseType) => string | number | boolean;
|
|
3
|
+
export declare const parseView: (value: string, type: ParseType) => string | number | boolean;
|
|
4
|
+
//# sourceMappingURL=parse-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-types.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/parse-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAI9D,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"parse-types.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/parse-types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAI9D,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,MAAM,SAAS,8BASnD,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,EAAE,MAAM,SAAS,8BASvD,CAAA"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { isNumber } from 'my-gadgetry/type-check'
|
|
2
|
-
import { PARSE_TYPES } from '../types/parse-types.js'
|
|
3
|
-
const BOOL_VALUES = Object.freeze(['Y', 'y', 'yes', 'YES', 'x', 'v', 'o', 'true'])
|
|
1
|
+
import { isNumber } from 'my-gadgetry/type-check';
|
|
2
|
+
import { PARSE_TYPES } from '../types/parse-types.js';
|
|
3
|
+
const BOOL_VALUES = Object.freeze(['Y', 'y', 'yes', 'YES', 'x', 'v', 'o', 'true']);
|
|
4
4
|
export const parse = (value, type) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
5
|
+
switch (type) {
|
|
6
|
+
case PARSE_TYPES.number:
|
|
7
|
+
return isNumber(value, true) ? Number(value) : 0;
|
|
8
|
+
case PARSE_TYPES.confirm:
|
|
9
|
+
return BOOL_VALUES.includes(value);
|
|
10
|
+
default:
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
14
|
export const parseView = (value, type) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
15
|
+
switch (type) {
|
|
16
|
+
case PARSE_TYPES.number:
|
|
17
|
+
return value ? Number(value) : 0;
|
|
18
|
+
case PARSE_TYPES.confirm:
|
|
19
|
+
return value === 'true';
|
|
20
|
+
default:
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import { Key } from 'readline'
|
|
2
|
-
import { PageSize, Paginator, PointerIndexes } from '../../types/table.js'
|
|
3
|
-
import { SetUseState } from '../../types/inquirer.js'
|
|
4
|
-
export declare const onArrowKeyPress: (
|
|
5
|
-
|
|
6
|
-
pointerIndexes: PointerIndexes,
|
|
7
|
-
setPointer: SetUseState<PointerIndexes>,
|
|
8
|
-
setPaginator: SetUseState<Paginator>,
|
|
9
|
-
pageSize: PageSize,
|
|
10
|
-
maxColumnIndex: number,
|
|
11
|
-
maxRowIndex: number,
|
|
12
|
-
disableColumnIndexes: number[]
|
|
13
|
-
) => void
|
|
14
|
-
//# sourceMappingURL=arrow-key.d.ts.map
|
|
1
|
+
import { Key } from 'readline';
|
|
2
|
+
import { PageSize, Paginator, PointerIndexes } from '../../types/table.js';
|
|
3
|
+
import { SetUseState } from '../../types/inquirer.js';
|
|
4
|
+
export declare const onArrowKeyPress: (key: Key, pointerIndexes: PointerIndexes, setPointer: SetUseState<PointerIndexes>, setPaginator: SetUseState<Paginator>, pageSize: PageSize, maxColumnIndex: number, maxRowIndex: number, disableColumnIndexes: number[]) => void;
|
|
5
|
+
//# sourceMappingURL=arrow-key.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrow-key.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/arrow-key.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"arrow-key.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/arrow-key.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhD,eAAO,MAAM,eAAe,GAC1B,KAAK,GAAG,EACR,gBAAgB,cAAc,EAC9B,YAAY,WAAW,CAAC,cAAc,CAAC,EACvC,cAAc,WAAW,CAAC,SAAS,CAAC,EACpC,UAAU,QAAQ,EAClB,gBAAgB,MAAM,EACtB,aAAa,MAAM,EACnB,sBAAsB,MAAM,EAAE,SAoB/B,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ExtractedRows, Cell } from '../../types/table.js'
|
|
2
|
-
export declare const getCellValue: (columnIndex: number, rowIndex: number, rows: ExtractedRows) => Cell
|
|
3
|
-
//# sourceMappingURL=cell.d.ts.map
|
|
1
|
+
import { ExtractedRows, Cell } from '../../types/table.js';
|
|
2
|
+
export declare const getCellValue: (columnIndex: number, rowIndex: number, rows: ExtractedRows) => Cell;
|
|
3
|
+
//# sourceMappingURL=cell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAErD,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAErD,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,EAAE,UAAU,MAAM,EAAE,MAAM,aAAa,KAAG,IAKzF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/columns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/columns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,EAAE,UAAU,MAAM,EAAE,gBAAgB,MAAM,EAAE,YAQ3F,CAAA;AAaD,eAAO,MAAM,cAAc,GACzB,MAAM,MAAM,EACZ,cAAc,MAAM,EACpB,UAAU,MAAM,EAChB,uBAAsB,MAAM,EAAO,WAUpC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Paginator, PointerIndexes, PageSize } from '../../types/table.js'
|
|
2
|
-
export declare const getPageCount: (maxRowIndex: number, pageSize: PageSize) => number
|
|
3
|
-
export declare const paginate: (pointerIndexes: PointerIndexes, pageSize: PageSize, maxRowIndex: number) => Paginator
|
|
4
|
-
//# sourceMappingURL=pagenate.d.ts.map
|
|
1
|
+
import { Paginator, PointerIndexes, PageSize } from '../../types/table.js';
|
|
2
|
+
export declare const getPageCount: (maxRowIndex: number, pageSize: PageSize) => number;
|
|
3
|
+
export declare const paginate: (pointerIndexes: PointerIndexes, pageSize: PageSize, maxRowIndex: number) => Paginator;
|
|
4
|
+
//# sourceMappingURL=pagenate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagenate.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/pagenate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAErE,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"pagenate.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/pagenate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAErE,eAAO,MAAM,YAAY,GAAI,aAAa,MAAM,EAAE,UAAU,QAAQ,WAKnE,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,gBAAgB,cAAc,EAAE,UAAU,QAAQ,EAAE,aAAa,MAAM,KAAG,SAalG,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ExtractedRows, Rows } from '../../types/table.js'
|
|
2
|
-
export declare const getExtractedAnsiRows: (rows: Rows) => ExtractedRows
|
|
3
|
-
//# sourceMappingURL=rows.d.ts.map
|
|
1
|
+
import { ExtractedRows, Rows } from '../../types/table.js';
|
|
2
|
+
export declare const getExtractedAnsiRows: (rows: Rows) => ExtractedRows;
|
|
3
|
+
//# sourceMappingURL=rows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/rows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAGrD,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"rows.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/utils/table/rows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAGrD,eAAO,MAAM,oBAAoB,GAAI,MAAM,IAAI,KAAG,aAEjD,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from '../_internal/plugins/table.js'
|
|
2
|
-
//# sourceMappingURL=table.d.ts.map
|
|
1
|
+
export * from '../_internal/plugins/table.js';
|
|
2
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '../_internal/plugins/table.js'
|
|
1
|
+
export * from '../_internal/plugins/table.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inquirer-plugins",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"!**/*.tsbuildinfo"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@inquirer/core": "^10.1.
|
|
50
|
+
"@inquirer/core": "^10.1.13",
|
|
51
|
+
"@inquirer/type": "^3.0.7",
|
|
51
52
|
"chalk": "^5.4.1",
|
|
52
53
|
"cli-cursor": "^5.0.0",
|
|
53
54
|
"cli-table3": "^0.6.5",
|
|
54
55
|
"figures": "^6.1.0",
|
|
55
|
-
"my-gadgetry": "1.3.
|
|
56
|
-
"tslib": "^2.3.0"
|
|
57
|
-
"@inquirer/type": "3.0.6"
|
|
56
|
+
"my-gadgetry": "^1.3.10",
|
|
57
|
+
"tslib": "^2.3.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../../src/lib/_internal/plugins/table/table.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"columns.d.ts","sourceRoot":"","sources":["../../../../src/lib/_internal/utils/columns.ts"],"names":[],"mappings":"AAoBA,eAAO,MAAM,cAAc,SACnB,MAAM,gBACE,MAAM,YACV,MAAM,yBACM,MAAM,EAAE,WAU/B,CAAA"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const isValidColumnIndex = (index, maxIndex, disableIndexes) => {
|
|
2
|
-
if (index > maxIndex || index < 0) {
|
|
3
|
-
return false
|
|
4
|
-
}
|
|
5
|
-
if (disableIndexes.includes(index)) {
|
|
6
|
-
return false
|
|
7
|
-
}
|
|
8
|
-
return true
|
|
9
|
-
}
|
|
10
|
-
const getNextIndex = (index, maxIndex, num) => {
|
|
11
|
-
if (index + num > maxIndex) {
|
|
12
|
-
return 0
|
|
13
|
-
}
|
|
14
|
-
if (index + num < 0) {
|
|
15
|
-
return maxIndex
|
|
16
|
-
}
|
|
17
|
-
return index + num
|
|
18
|
-
}
|
|
19
|
-
export const getColumnIndex = (diff, currentIndex, maxIndex, disableColumnIndexes = []) => {
|
|
20
|
-
let index = currentIndex
|
|
21
|
-
for (let i = 0; i <= maxIndex; i++) {
|
|
22
|
-
index = getNextIndex(index, maxIndex, diff)
|
|
23
|
-
if (isValidColumnIndex(index, maxIndex, disableColumnIndexes)) {
|
|
24
|
-
break
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return index
|
|
28
|
-
}
|