@oclif/core 2.0.5 → 2.0.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.
@@ -58,8 +58,8 @@ export type DefaultContext<T> = {
58
58
  options: T;
59
59
  flags: Record<string, string>;
60
60
  };
61
- export type FlagDefault<T, P = CustomOptions> = T | ((context: DefaultContext<OptionFlag<T, P> & P>) => Promise<T>);
62
- export type FlagDefaultHelp<T, P = CustomOptions> = T | ((context: DefaultContext<OptionFlag<T, P> & P>) => Promise<string | undefined>);
61
+ export type FlagDefault<T, P = CustomOptions> = T | ((context: DefaultContext<P & OptionFlag<T, P>>) => Promise<T>);
62
+ export type FlagDefaultHelp<T, P = CustomOptions> = T | ((context: DefaultContext<P & OptionFlag<T, P>>) => Promise<string | undefined>);
63
63
  export type ArgDefault<T, P = CustomOptions> = T | ((context: DefaultContext<Arg<T, P>>) => Promise<T>);
64
64
  export type ArgDefaultHelp<T, P = CustomOptions> = T | ((context: DefaultContext<Arg<T, P>>) => Promise<string | undefined>);
65
65
  export type FlagRelationship = string | {
@@ -199,13 +199,13 @@ export type BooleanFlag<T> = FlagProps & BooleanFlagProps & {
199
199
  parse: (input: boolean, context: Command, opts: FlagProps & BooleanFlagProps) => Promise<T>;
200
200
  };
201
201
  export type OptionFlagDefaults<T, P = CustomOptions, M = false> = FlagProps & OptionFlagProps & {
202
- parse: FlagParser<T, string, P & OptionFlag<T, P>>;
202
+ parse: FlagParser<T, string, P>;
203
203
  defaultHelp?: FlagDefaultHelp<T>;
204
204
  input: string[];
205
205
  default?: M extends true ? FlagDefault<T[] | undefined, P> : FlagDefault<T | undefined, P>;
206
206
  };
207
207
  export type OptionFlag<T, P = CustomOptions> = FlagProps & OptionFlagProps & {
208
- parse: FlagParser<T, string, P & OptionFlag<T, P>>;
208
+ parse: FlagParser<T, string, P>;
209
209
  defaultHelp?: FlagDefaultHelp<T, P>;
210
210
  input: string[];
211
211
  } & ({
@@ -225,13 +225,13 @@ export type FlagDefinition<T, P = CustomOptions> = {
225
225
  }) & Partial<OptionFlag<T, P>>): OptionFlag<T[]>;
226
226
  (options: P & {
227
227
  multiple: true;
228
- } & Partial<OptionFlag<T>>): OptionFlag<T[] | undefined, P>;
228
+ } & Partial<OptionFlag<T>>): OptionFlag<T[] | undefined>;
229
229
  (options: P & ({
230
230
  required: true;
231
231
  } | {
232
232
  default: FlagDefault<T>;
233
- }) & Partial<OptionFlag<T>>): OptionFlag<T, P>;
234
- (options?: P & Partial<OptionFlag<T>>): OptionFlag<T | undefined, P>;
233
+ }) & Partial<OptionFlag<T>>): OptionFlag<T>;
234
+ (options?: P & Partial<OptionFlag<T>>): OptionFlag<T | undefined>;
235
235
  };
236
236
  export type Flag<T> = BooleanFlag<T> | OptionFlag<T>;
237
237
  export type Input<TFlags extends FlagOutput, BFlags extends FlagOutput, AFlags extends ArgOutput> = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "2.0.5",
4
+ "version": "2.0.6",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {