Notably, this gets us `@actions/github` 6.0.1, which is necessary for `github.context.runAttempt` (so I have also updated `package.json` accordingly). On that note... great job following semver, GitHub! Between this and the non-breaking major version change on `@actions/cache`, I'm starting to feel like nobody on the Actions team understands how software versioning works.
36 lines
994 B
TypeScript
36 lines
994 B
TypeScript
/**
|
|
* Plugin options derived from an options spec.
|
|
*/
|
|
export declare type Options<S extends OptionSpecs> = {
|
|
[K in keyof S]: boolean;
|
|
};
|
|
declare type OptionSpecs = Record<string, OptionSpec>;
|
|
declare type OptionSpec = {
|
|
kind: "flag";
|
|
/**
|
|
* A description for this option.
|
|
*/
|
|
description: string;
|
|
/**
|
|
* If this option is set, setting any of the following other options is an error.
|
|
*/
|
|
excludes?: readonly string[];
|
|
/**
|
|
* If this option is set, the following other options must be set as well.
|
|
*/
|
|
requires?: readonly string[];
|
|
};
|
|
/**
|
|
* Function to parse raw options into typed options.
|
|
* May throw an error.
|
|
*/
|
|
export declare type OptionsParseFn<S extends OptionSpecs> = (input: string | {
|
|
key: string;
|
|
value: string;
|
|
}[]) => Options<S>;
|
|
/**
|
|
* Create a function for parsing options from an options spec.
|
|
*/
|
|
export declare function createOptionParser<S extends OptionSpecs>(optionSpecs: S): OptionsParseFn<S>;
|
|
export {};
|