mirror of
https://github.com/github/codeql-action.git
synced 2026-10-21 02:01:27 +00:00
Make FS available to init
This commit is contained in:
760
lib/entry-points.js
generated
760
lib/entry-points.js
generated
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
import * as fs from "fs";
|
||||
import * as os from "os";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
@@ -83,7 +84,7 @@ export type ActionState<Fs extends readonly StateFeature[]> = FieldsOf<Fs>;
|
||||
* Each Action can then augment the `state` further if additional features are required.
|
||||
*/
|
||||
export type ActionMain = (
|
||||
state: ActionState<["Base", "Logger", "Env", "Actions"]>,
|
||||
state: ActionState<["Base", "FS", "Logger", "Env", "Actions"]>,
|
||||
) => Promise<void>;
|
||||
|
||||
/** A specification for a CodeQL Action step. */
|
||||
@@ -114,6 +115,7 @@ export async function runInActions(action: Action) {
|
||||
platform: process.platform,
|
||||
arch: process.arch,
|
||||
osRelease: os.release(),
|
||||
fs,
|
||||
logger,
|
||||
env,
|
||||
actions: actionsEnv,
|
||||
|
||||
@@ -199,7 +199,7 @@ async function sendCompletedStatusReport(
|
||||
}
|
||||
|
||||
async function run(
|
||||
actionState: ActionState<["Base", "Logger", "Env", "Actions"]>,
|
||||
actionState: ActionState<["Base", "Logger", "Env", "Actions", "FS"]>,
|
||||
) {
|
||||
// To capture errors appropriately, keep as much code within the try-catch as
|
||||
// possible, and only use safe functions outside.
|
||||
|
||||
Reference in New Issue
Block a user