From d548766dc9371cb0f77ed278ed655a64ab4bb999 Mon Sep 17 00:00:00 2001 From: ckawell-sb Date: Wed, 4 Dec 2024 10:19:34 -0600 Subject: [PATCH 1/2] feat: QPPA-9642 add programName Enum --- index.ts | 13 ++++++++++++- util/interfaces/program-names.ts | 26 +++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index c9caffa2..746d1fc1 100644 --- a/index.ts +++ b/index.ts @@ -3,7 +3,7 @@ import * as fse from 'fs-extra'; import * as path from 'path'; import * as YAML from 'yaml'; import { Constants } from './constants'; -import { ProgramNames } from './util/interfaces/program-names'; +import { ProgramNames, ProgramNamesEnum } from './util/interfaces/program-names'; import { BenchmarksData } from './util/interfaces/benchmarks'; import { BenchmarksExclusionReasons } from './util/interfaces/benchmarks-exclusion-reasons'; import { CostNationalAverage } from './util/interfaces/cost-national-average'; @@ -71,6 +71,17 @@ export function getProgramNames(): ProgramNames { } } +/** + * + * @return {ProgramNames} - program names - + * An Enum containing all program names. + * This is an "all-encompassing" list containing past and present program-name values. + * IE, this enum is not performance-year conscious. + */ +export function getProgramNamesEnum(): ProgramNames { + return ProgramNamesEnum; +} + /** * * @return {BenchmarksData} - benchmarks data - diff --git a/util/interfaces/program-names.ts b/util/interfaces/program-names.ts index e38c2758..012addad 100644 --- a/util/interfaces/program-names.ts +++ b/util/interfaces/program-names.ts @@ -21,5 +21,29 @@ export interface ProgramNames { "M1367": "M1367", "M1368": "M1368", "M1369": "M1369", - "M1370": "M1370" + "M1370": "M1370", +} + +export enum ProgramNamesEnum { + mips = "mips", + cpcPlus = "cpcPlus", + pcf = "pcf", + app1 = "app1", + DEFAULT = "mips", + G0053 = "G0053", + G0054 = "G0054", + G0055 = "G0055", + G0056 = "G0056", + G0057 = "G0057", + G0058 = "G0058", + G0059 = "G0059", + M0001 = "M0001", + M0005 = "M0005", + M0002 = "M0002", + M0003 = "M0003", + M0004 = "M0004", + M1366 = "M1366", + M1367 = "M1367", + M1368 = "M1368", + M1369 = "M1369" } From 060f5f4d586f26312ebd3d493ee29f821d12a0ec Mon Sep 17 00:00:00 2001 From: ckawell-sb Date: Wed, 4 Dec 2024 10:21:56 -0600 Subject: [PATCH 2/2] feat: QPPA-9642 fix enum --- util/interfaces/program-names.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/interfaces/program-names.ts b/util/interfaces/program-names.ts index 012addad..b034089d 100644 --- a/util/interfaces/program-names.ts +++ b/util/interfaces/program-names.ts @@ -45,5 +45,6 @@ export enum ProgramNamesEnum { M1366 = "M1366", M1367 = "M1367", M1368 = "M1368", - M1369 = "M1369" + M1369 = "M1369", + M1370 = "M1370" }