From 82ce3131fa65b23f3c03925a4ed8f5b23c40895c Mon Sep 17 00:00:00 2001 From: Angela P Wen Date: Wed, 11 Sep 2024 16:36:48 -0700 Subject: [PATCH] Remove unused helper file --- lib/analyze-action-post-helper.js | 37 --------------------------- lib/analyze-action-post-helper.js.map | 1 - lib/analyze-action-post.js | 2 -- lib/analyze-action-post.js.map | 2 +- src/analyze-action-post-helper.ts | 14 ---------- src/analyze-action-post.ts | 3 --- 6 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 lib/analyze-action-post-helper.js delete mode 100644 lib/analyze-action-post-helper.js.map delete mode 100644 src/analyze-action-post-helper.ts diff --git a/lib/analyze-action-post-helper.js b/lib/analyze-action-post-helper.js deleted file mode 100644 index 19a9e79ce..000000000 --- a/lib/analyze-action-post-helper.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); -}) : function(o, v) { - o["default"] = v; -}); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.run = run; -const actionsUtil = __importStar(require("./actions-util")); -const config_utils_1 = require("./config-utils"); -const logging_1 = require("./logging"); -async function run() { - const logger = (0, logging_1.getActionsLogger)(); - const config = await (0, config_utils_1.getConfig)(actionsUtil.getTemporaryDirectory(), logger); - if (config === undefined) { - throw new Error("Config file could not be found at expected location. Did the 'init' action fail to start?"); - } -} -//# sourceMappingURL=analyze-action-post-helper.js.map \ No newline at end of file diff --git a/lib/analyze-action-post-helper.js.map b/lib/analyze-action-post-helper.js.map deleted file mode 100644 index 35bdce3e3..000000000 --- a/lib/analyze-action-post-helper.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"analyze-action-post-helper.js","sourceRoot":"","sources":["../src/analyze-action-post-helper.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,kBASC;AAbD,4DAA8C;AAC9C,iDAA2C;AAC3C,uCAA6C;AAEtC,KAAK,UAAU,GAAG;IACvB,MAAM,MAAM,GAAG,IAAA,0BAAgB,GAAE,CAAC;IAElC,MAAM,MAAM,GAAG,MAAM,IAAA,wBAAS,EAAC,WAAW,CAAC,qBAAqB,EAAE,EAAE,MAAM,CAAC,CAAC;IAC5E,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,2FAA2F,CAC5F,CAAC;IACJ,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 742566769..95e6d3e41 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -29,14 +29,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); * other `post:` hooks. */ const core = __importStar(require("@actions/core")); -const analyzeActionPostHelper = __importStar(require("./analyze-action-post-helper")); const debugArtifacts = __importStar(require("./debug-artifacts")); const environment_1 = require("./environment"); const uploadSarifActionPostHelper = __importStar(require("./upload-sarif-action-post-helper")); const util_1 = require("./util"); async function runWrapper() { try { - await analyzeActionPostHelper.run(); // Upload SARIF artifacts if we determine that this is a first-party analysis run. // For third-party runs, this artifact will be uploaded in the `upload-sarif-post` step. if (process.env[environment_1.EnvVar.INIT_ACTION_HAS_RUN] === "true") { diff --git a/lib/analyze-action-post.js.map b/lib/analyze-action-post.js.map index 99730c95f..90ccc54bb 100644 --- a/lib/analyze-action-post.js.map +++ b/lib/analyze-action-post.js.map @@ -1 +1 @@ -{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,sFAAwE;AACxE,kEAAoD;AACpD,+CAAuC;AACvC,+FAAiF;AACjF,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,MAAM,uBAAuB,CAAC,GAAG,EAAE,CAAC;QAEpC,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,2BAA2B,CAAC,eAAe,CAC/C,cAAc,CAAC,oBAAoB,CACpC,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"analyze-action-post.js","sourceRoot":"","sources":["../src/analyze-action-post.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;GAIG;AACH,oDAAsC;AAEtC,kEAAoD;AACpD,+CAAuC;AACvC,+FAAiF;AACjF,iCAAmC;AAEnC,KAAK,UAAU,UAAU;IACvB,IAAI,CAAC;QACH,kFAAkF;QAClF,wFAAwF;QACxF,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAM,CAAC,mBAAmB,CAAC,KAAK,MAAM,EAAE,CAAC;YACvD,MAAM,2BAA2B,CAAC,eAAe,CAC/C,cAAc,CAAC,oBAAoB,CACpC,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CACZ,oCAAoC,IAAA,gBAAS,EAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAC/D,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,EAAE,CAAC"} \ No newline at end of file diff --git a/src/analyze-action-post-helper.ts b/src/analyze-action-post-helper.ts deleted file mode 100644 index dc4040794..000000000 --- a/src/analyze-action-post-helper.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as actionsUtil from "./actions-util"; -import { getConfig } from "./config-utils"; -import { getActionsLogger } from "./logging"; - -export async function run() { - const logger = getActionsLogger(); - - const config = await getConfig(actionsUtil.getTemporaryDirectory(), logger); - if (config === undefined) { - throw new Error( - "Config file could not be found at expected location. Did the 'init' action fail to start?", - ); - } -} diff --git a/src/analyze-action-post.ts b/src/analyze-action-post.ts index a68154a2f..dbd98777a 100644 --- a/src/analyze-action-post.ts +++ b/src/analyze-action-post.ts @@ -5,7 +5,6 @@ */ import * as core from "@actions/core"; -import * as analyzeActionPostHelper from "./analyze-action-post-helper"; import * as debugArtifacts from "./debug-artifacts"; import { EnvVar } from "./environment"; import * as uploadSarifActionPostHelper from "./upload-sarif-action-post-helper"; @@ -13,8 +12,6 @@ import { wrapError } from "./util"; async function runWrapper() { try { - await analyzeActionPostHelper.run(); - // Upload SARIF artifacts if we determine that this is a first-party analysis run. // For third-party runs, this artifact will be uploaded in the `upload-sarif-post` step. if (process.env[EnvVar.INIT_ACTION_HAS_RUN] === "true") {