import { FootprintsMapping, IGeneralArgs, ITestListenerArgs, ITokenData } from 'common/contracts'; import { BuildSessionData } from '../common/http/contracts'; import { SourceMapsEraserModes } from '../build-scanner/source-map-eraser/interface'; export interface IUpgradeConfiguration { componentName: 'slnodejs'; customerId: string; appName: string; branchName: string; buildName: string; testStage?: string; } export interface IBuildSessionResponse { customerId: string; appName: string; branchName: string; buildName: string; buildSessionType: string; created: number; trackingId: string; additionalParams: object; buildSessionId: string; } export interface IRecommendedAgentResponse { type: string; generated: number; meta: object; agent: IRecommendedAgent; } export interface IRecommendedAgent { name?: string; version?: string; url?: string; } export interface IBaseData extends ITokenData, BuildSessionData { proxy: string; labid?: string; teststage?: string; } export interface IBuildArgs extends IGeneralArgs { workspacepath: string; scm: string; excludedpaths: string[]; outputpath: string; logsUrl: string; dependenciesFile: string; recursive: boolean; instrumentForBrowsers: boolean; instrumentationOnly: boolean; scmProvider: string; scmBaseUrl: string; scmVersion: string; babylonPlugins: string; projectRoot: string; labid: string; allowCORS?: string; enableOpenTelemetry?: boolean; awsConfigure?: boolean; awsConfigKeysToIgnore?: string[]; excludeTokenFromBrowserConfig?: boolean; compressSlMapping?: boolean; ctxPropagationOnly: boolean; enableLineCoverage: boolean; embedCorrectUniqueId: boolean; autoResolveProjectRoot: boolean; toggleBasedBrowserInstrumentation: boolean; allowedDomains?: string; recognizeBabelCreateClass: boolean; preferSourceMapFromFile: boolean; enrichByMethodRange: boolean; experimentalDeduplicateEnrichedMethodsWithOriginals: boolean; jobName: string; dependency: string[]; commit: string; uniqueModuleId: string; usebranchcoverage: boolean; delayShutdownInSeconds: number; resolveWithoutHash: boolean; sourceHash: boolean; es6Modules: boolean; useBabylon: boolean; sendContributors: boolean; args?: string[]; useModulePrefix?: boolean; collectorUrl?: string; footprintsMapping?: FootprintsMapping; excludeSourceMapFiles: string | boolean; es6Classes: boolean; enrichPrivateMethods: boolean; hashIncludeNestedMethods: boolean; excludeNestedMethods: boolean; rawCoverage: boolean; enrichByLinesMatch: boolean; partialBuildMapping: number; scanDotFolders?: boolean; splitPreambleIntoFile: boolean; useRelativeSlMapping: boolean; preambleFileName?: string; preambleFileUrl?: string; skipInstrumentingFilesWithoutSourceMap: boolean; } export interface IInstrumentationArgs extends IGeneralArgs { workspacePath: string; distfolderpath?: string; distpath?: string; distributablepath?: string; outputPath: string; labid: string; allowCORS: boolean; enableOpenTelemetry: boolean; excludeTokenFromBrowserConfig?: boolean; ctxPropagationOnly: boolean; toggleBasedBrowserInstrumentation: boolean; allowedDomains?: string; delayShutdownInSeconds: number; es6Modules: boolean; collectorUrl?: string; footprintsMapping: FootprintsMapping; removeSensitiveData: boolean; reduceFileSize: boolean; splitPreambleIntoFile: boolean; preambleFileName?: string; preambleFileUrl?: string; } export interface IMochaArgs extends ITestListenerArgs { tiaDisabled: boolean; resolveWithoutHash: boolean; } export interface IRunArgs extends ITestListenerArgs { useinitialcolor: boolean; workspacepath: string; collectorUrl: string; libraries?: string; omitFootprintsLeadingSlash?: boolean; forwardSignals?: boolean; signalForwardingTimeout?: number; } export interface ITestExecutionArgs extends ITestListenerArgs { labid: string; } export interface IStartExecutionArgs extends ITestListenerArgs { teststage: string; } export interface IUploadReportArgs extends ITestExecutionArgs { reportFile: string[]; reportFilesFolder: string[]; source: string; type: string; hasMoreRequests: boolean; } export interface INycReportArgs extends IGeneralArgs { report: string; projectRoot: string; labid: string; } export interface IIntegrationBuildUpdateArgs extends IGeneralArgs { componentIds?: string[]; componentFile?: string; } export interface IBuildEndArgs extends IGeneralArgs { ok?: boolean; failed?: boolean; args?: string[]; } export interface IBuildEndData { appName: string; build: string; branch: string; status: IBuildEndStatus; } export interface IBuildEndStatus { success: boolean; } export interface IBuildScanData { buildSessionId: string; appname: string; build: string; branch: string; token: string; server: string; agentId: string; customerId: string; workspacepath: string; scm: string; excludedpaths: string[]; outputpath: string; logsUrl: string; dependenciesFile: string; recursive: boolean; instrumentForBrowsers: boolean; instrumentationOnly: boolean; scmProvider: string; scmBaseUrl: string; scmVersion: string; babylonPlugins: string; projectRoot: string; labid: string; proxy: string; jobName: string; dependency: string[]; commit: string; uniqueModuleId: string; usebranchcoverage: boolean; delayShutdownInSeconds: number; resolveWithoutHash: boolean; sourceHash: boolean; es6Modules: boolean; useBabylon: boolean; sendContributors: boolean; useRelativeSlMapping?: boolean; useModulePrefix?: boolean; collectorUrl?: string; enableDiagnostic?: boolean; footprintsMapping?: FootprintsMapping; additionalGitDetails?: boolean; removeSensitiveData?: boolean; excludeSourceMapFiles?: SourceMapsEraserModes; es6Classes: boolean; enrichPrivateMethods: boolean; hashIncludeNestedMethods: boolean; excludeNestedMethods: boolean; experimentalSizeReduction?: boolean; splitPreambleIntoFile: boolean; preambleFileName?: string; preambleFileUrl?: string; useBranchCoverage?: boolean; awsConfigure?: boolean; rawCoverage: boolean; enrichByLinesMatch: boolean; newInstrumenter?: boolean; partialBuildMapping: number; reduceInstrumentedFileSize?: boolean; scanDotFolders?: boolean; awsConfigKeysToIgnore?: string[]; excludeTokenFromBrowserConfig?: boolean; overrideServer?: string; compressSlMapping?: boolean; ctxPropagationOnly: boolean; enableLineCoverage: boolean; embedCorrectUniqueId: boolean; autoResolveProjectRoot: boolean; skipInstrumentingFilesWithoutSourceMap: boolean; toggleBasedBrowserInstrumentation: boolean; recognizeBabelCreateClass: boolean; preferSourceMapFromFile: boolean; enrichByMethodRange: boolean; experimentalDeduplicateEnrichedMethodsWithOriginals: boolean; allowedDomains: string[]; } export interface IInstrumentationData { appName: string; build: string; customerId: string; branch: string; buildSessionId: string; token: string; proxy: string; labId: string; agentId: string; collectorUrl?: string; esModules: boolean; server: string; overrideServer: string; workspacePath: string; outputPath: string; delayShutdownInSeconds: number; slMappingPath: string; slMappingUrl: string; enableOpenTelemetry: boolean; allowCORS: boolean; removeSensitiveData: boolean; reduceInstrumentedFileSize: boolean; excludeTokenFromBrowserConfig: boolean; footprintsMapping: FootprintsMapping; ctxPropagationOnly: boolean; splitPreambleIntoFile: boolean; preambleFileName?: string; preambleFileUrl?: string; embedCorrectUniqueId?: boolean; toggleBasedBrowserInstrumentation: boolean; allowedDomains: string[]; } export interface ITestListenerData { appname: string; branch: string; build: string; buildSessionId: string; buildsessionid: string; customerid: string; labid: string; proxy: string; server: string; teststage: string; token: string; usebranchcoverage: boolean; testProjectId: string; prID: string; es6Modules?: boolean; } export interface IMochaData extends ITestListenerData { resolveWithoutHash: boolean; tiaDisabled: boolean; } export interface IRunData extends ITestListenerData { useinitialcolor: boolean; workspacepath: string; } export interface INycReportData extends IBaseData { projectRoot: string; branch: string; build: string; labId: string; } export interface IProcessedFiles { instrumented: string[]; notInstrumented: string[]; withInstrumentationErrors: IErrorFileEntry[]; withCopyErrors: IErrorFileEntry[]; } export interface IDryRunResult { err: Error; processedFiles: IProcessedFiles; } export interface IErrorFileEntry { file: string; error: Error; } export interface IDryRunArgs extends IBuildArgs { scm: string; excludedpaths: string[]; outputpath: string; instrumentForBrowsers: boolean; babylonPlugins: string; buildScanProjectRoot: string; nycProjectRoot: string; usebranchcoverage: boolean; es6Modules: boolean; useBabylon: boolean; folderDepth: string; hasNycReport: boolean; report: string; verbose: boolean; scanDotFolders?: boolean; } export declare enum COMMANDS { CONFIG = "config", PR_CONFIG = "prConfig", BUILD = "build", SCAN = "scan", MOCHA = "mocha", JASMINE = "jasmine", MOCHA_PHANTOM_JS = "mochaPhantomjs", RUN = "run", START = "start", END = "end", UPLOAD_REPORTS = "uploadReports", EXTERNAL_REPORT = "externalReport", NYC_REPORT = "nycReport", INSTALL_BABEL = "installBabel", COMPONENT_UPDATE = "componentUpdate", COMPONENT_DELETE = "componentDelete", BUILD_END = "buildend", SCANNED = "scanned", DRY_RUN = "dryRun", INSTRUMENT = "instrument" } export declare enum COMMAND_ARGS { USE_OTEL = "useOtel", ENABLE_OPEN_TELEMETRY = "enableOpenTelemetry", INSTRUMENT_FOR_BROWSERS = "instrumentForBrowsers" }