@oclif/core 1.13.10 → 1.13.11
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/CHANGELOG.md +7 -0
- package/lib/interfaces/parser.d.ts +8 -1
- package/lib/parser/flags.d.ts +44 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.13.11](https://github.com/oclif/core/compare/v1.13.10...v1.13.11) (2022-08-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* more custom flag type overloads ([#471](https://github.com/oclif/core/issues/471)) ([ac4baf2](https://github.com/oclif/core/commit/ac4baf260f8e87bb5618c7b790f35372d55096c7))
|
|
11
|
+
|
|
5
12
|
### [1.13.10](https://github.com/oclif/core/compare/v1.13.9...v1.13.10) (2022-08-09)
|
|
6
13
|
|
|
7
14
|
### [1.13.9](https://github.com/oclif/core/compare/v1.13.8...v1.13.9) (2022-08-09)
|
|
@@ -146,7 +146,14 @@ export declare type OptionFlag<T> = FlagBase<T, string> & OptionFlagProps & {
|
|
|
146
146
|
export declare type Definition<T> = {
|
|
147
147
|
(options: {
|
|
148
148
|
multiple: true;
|
|
149
|
-
} &
|
|
149
|
+
} & ({
|
|
150
|
+
required: true;
|
|
151
|
+
} | {
|
|
152
|
+
default: Default<T>;
|
|
153
|
+
}) & Partial<OptionFlag<T>>): OptionFlag<T[]>;
|
|
154
|
+
(options: {
|
|
155
|
+
multiple: true;
|
|
156
|
+
} & Partial<OptionFlag<T[]>>): OptionFlag<T[] | undefined>;
|
|
150
157
|
(options: ({
|
|
151
158
|
required: true;
|
|
152
159
|
} | {
|
package/lib/parser/flags.d.ts
CHANGED
|
@@ -6,6 +6,22 @@ export declare function build<T>(defaults: {
|
|
|
6
6
|
} & Partial<OptionFlag<T>>): Definition<T>;
|
|
7
7
|
export declare function build(defaults: Partial<OptionFlag<string>>): Definition<string>;
|
|
8
8
|
export declare function boolean<T = boolean>(options?: Partial<BooleanFlag<T>>): BooleanFlag<T>;
|
|
9
|
+
export declare function integer(opts: Partial<OptionFlag<number>> & {
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
|
+
} & {
|
|
13
|
+
multiple: true;
|
|
14
|
+
} & ({
|
|
15
|
+
required: true;
|
|
16
|
+
} | {
|
|
17
|
+
default: Default<number>;
|
|
18
|
+
})): OptionFlag<number[]>;
|
|
19
|
+
export declare function integer(opts: Partial<OptionFlag<number>> & {
|
|
20
|
+
min?: number;
|
|
21
|
+
max?: number;
|
|
22
|
+
} & {
|
|
23
|
+
multiple: true;
|
|
24
|
+
}): OptionFlag<number[] | undefined>;
|
|
9
25
|
export declare function integer(opts: Partial<OptionFlag<number>> & {
|
|
10
26
|
min?: number;
|
|
11
27
|
max?: number;
|
|
@@ -18,6 +34,20 @@ export declare function integer(opts?: Partial<OptionFlag<number>> & {
|
|
|
18
34
|
min?: number;
|
|
19
35
|
max?: number;
|
|
20
36
|
}): OptionFlag<number | undefined>;
|
|
37
|
+
export declare function directory(opts: Partial<OptionFlag<string>> & {
|
|
38
|
+
exists?: boolean;
|
|
39
|
+
} & {
|
|
40
|
+
multiple: true;
|
|
41
|
+
} & ({
|
|
42
|
+
required: true;
|
|
43
|
+
} | {
|
|
44
|
+
default: Default<string>;
|
|
45
|
+
})): OptionFlag<string[]>;
|
|
46
|
+
export declare function directory(opts: Partial<OptionFlag<string>> & {
|
|
47
|
+
exists?: boolean;
|
|
48
|
+
} & {
|
|
49
|
+
multiple: true;
|
|
50
|
+
}): OptionFlag<string[] | undefined>;
|
|
21
51
|
export declare function directory(opts: {
|
|
22
52
|
exists?: boolean;
|
|
23
53
|
} & Partial<OptionFlag<string>> & ({
|
|
@@ -28,6 +58,20 @@ export declare function directory(opts: {
|
|
|
28
58
|
export declare function directory(opts?: {
|
|
29
59
|
exists?: boolean;
|
|
30
60
|
} & Partial<OptionFlag<string>>): OptionFlag<string | undefined>;
|
|
61
|
+
export declare function file(opts: Partial<OptionFlag<string>> & {
|
|
62
|
+
exists?: boolean;
|
|
63
|
+
} & {
|
|
64
|
+
multiple: true;
|
|
65
|
+
} & ({
|
|
66
|
+
required: true;
|
|
67
|
+
} | {
|
|
68
|
+
default: Default<string>;
|
|
69
|
+
})): OptionFlag<string[]>;
|
|
70
|
+
export declare function file(opts: Partial<OptionFlag<string>> & {
|
|
71
|
+
exists?: boolean;
|
|
72
|
+
} & {
|
|
73
|
+
multiple: true;
|
|
74
|
+
}): OptionFlag<string[] | undefined>;
|
|
31
75
|
export declare function file(opts: {
|
|
32
76
|
exists?: boolean;
|
|
33
77
|
} & Partial<OptionFlag<string>> & ({
|