aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/node_modules/@actions/core/lib/core.d.ts
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-12-11 15:42:38 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2022-12-11 15:42:38 +0100
commit9857fae4d1136ef2ebfeffaaaf6ba22e1015401a (patch)
tree8d88c98d2100e29b668df3845088565cde9d80c6 /node_modules/@actions/core/lib/core.d.ts
parentbump Node version (diff)
downloadcleanup-path-9857fae4d1136ef2ebfeffaaaf6ba22e1015401a.tar.gz
cleanup-path-9857fae4d1136ef2ebfeffaaaf6ba22e1015401a.zip
upgrade actions/core
Diffstat (limited to 'node_modules/@actions/core/lib/core.d.ts')
-rw-r--r--node_modules/@actions/core/lib/core.d.ts84
1 files changed, 80 insertions, 4 deletions
diff --git a/node_modules/@actions/core/lib/core.d.ts b/node_modules/@actions/core/lib/core.d.ts
index 8bb5093..1defb57 100644
--- a/node_modules/@actions/core/lib/core.d.ts
+++ b/node_modules/@actions/core/lib/core.d.ts
@@ -4,6 +4,8 @@
export interface InputOptions {
/** Optional. Whether the input is required. If required and not present, will throw. Defaults to false */
required?: boolean;
+ /** Optional. Whether leading/trailing whitespace will be trimmed for the input. Defaults to true */
+ trimWhitespace?: boolean;
}
/**
* The code to exit an action
@@ -19,6 +21,37 @@ export declare enum ExitCode {
Failure = 1
}
/**
+ * Optional properties that can be sent with annotatation commands (notice, error, and warning)
+ * See: https://docs.github.com/en/rest/reference/checks#create-a-check-run for more information about annotations.
+ */
+export interface AnnotationProperties {
+ /**
+ * A title for the annotation.
+ */
+ title?: string;
+ /**
+ * The path of the file for which the annotation should be created.
+ */
+ file?: string;
+ /**
+ * The start line for the annotation.
+ */
+ startLine?: number;
+ /**
+ * The end line for the annotation. Defaults to `startLine` when `startLine` is provided.
+ */
+ endLine?: number;
+ /**
+ * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values.
+ */
+ startColumn?: number;
+ /**
+ * The start column for the annotation. Cannot be sent when `startLine` and `endLine` are different values.
+ * Defaults to `startColumn` when `startColumn` is provided.
+ */
+ endColumn?: number;
+}
+/**
* Sets env variable for this action and future actions in the job
* @param name the name of the variable to set
* @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
@@ -35,7 +68,9 @@ export declare function setSecret(secret: string): void;
*/
export declare function addPath(inputPath: string): void;
/**
- * Gets the value of an input. The value is also trimmed.
+ * Gets the value of an input.
+ * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
+ * Returns an empty string if the value is not defined.
*
* @param name name of the input to get
* @param options optional. See InputOptions.
@@ -43,6 +78,26 @@ export declare function addPath(inputPath: string): void;
*/
export declare function getInput(name: string, options?: InputOptions): string;
/**
+ * Gets the values of an multiline input. Each value is also trimmed.
+ *
+ * @param name name of the input to get
+ * @param options optional. See InputOptions.
+ * @returns string[]
+ *
+ */
+export declare function getMultilineInput(name: string, options?: InputOptions): string[];
+/**
+ * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
+ * Support boolean input list: `true | True | TRUE | false | False | FALSE` .
+ * The return value is also in boolean type.
+ * ref: https://yaml.org/spec/1.2/spec.html#id2804923
+ *
+ * @param name name of the input to get
+ * @param options optional. See InputOptions.
+ * @returns boolean
+ */
+export declare function getBooleanInput(name: string, options?: InputOptions): boolean;
+/**
* Sets the value of an output.
*
* @param name name of the output to set
@@ -73,13 +128,21 @@ export declare function debug(message: string): void;
/**
* Adds an error issue
* @param message error issue message. Errors will be converted to string via toString()
+ * @param properties optional properties to add to the annotation.
*/
-export declare function error(message: string | Error): void;
+export declare function error(message: string | Error, properties?: AnnotationProperties): void;
/**
- * Adds an warning issue
+ * Adds a warning issue
* @param message warning issue message. Errors will be converted to string via toString()
+ * @param properties optional properties to add to the annotation.
*/
-export declare function warning(message: string | Error): void;
+export declare function warning(message: string | Error, properties?: AnnotationProperties): void;
+/**
+ * Adds a notice issue
+ * @param message notice issue message. Errors will be converted to string via toString()
+ * @param properties optional properties to add to the annotation.
+ */
+export declare function notice(message: string | Error, properties?: AnnotationProperties): void;
/**
* Writes info to log with console.log.
* @param message info message
@@ -120,3 +183,16 @@ export declare function saveState(name: string, value: any): void;
* @returns string
*/
export declare function getState(name: string): string;
+export declare function getIDToken(aud?: string): Promise<string>;
+/**
+ * Summary exports
+ */
+export { summary } from './summary';
+/**
+ * @deprecated use core.summary
+ */
+export { markdownSummary } from './summary';
+/**
+ * Path exports
+ */
+export { toPosixPath, toWin32Path, toPlatformPath } from './path-utils';