MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / convertOptionsToAppArguments

Function convertOptionsToAppArguments

lib/app/cli.ts:177–215  ·  view source on GitHub ↗
(
    options: CompilerExplorerOptions,
    gitReleaseName: string,
    releaseBuildNumber: string,
    isWsl: boolean,
)

Source from the content-addressed store, hash-verified

175 * Convert command-line options to AppArguments for the application
176 */
177export function convertOptionsToAppArguments(
178 options: CompilerExplorerOptions,
179 gitReleaseName: string,
180 releaseBuildNumber: string,
181 isWsl: boolean,
182): AppArguments {
183 return {
184 rootDir: options.rootDir,
185 env: options.env,
186 hostname: options.host,
187 port: options.port,
188 gitReleaseName: gitReleaseName,
189 releaseBuildNumber: releaseBuildNumber,
190 wantedLanguages: options.language,
191 doCache: options.cache,
192 fetchCompilersFromRemote: options.remoteFetch,
193 ensureNoCompilerClash: options.ensureNoIdClash,
194 exitOnCompilerFailure: options.exitOnCompilerFailure,
195 prediscovered: options.prediscovered,
196 discoveryOnly: options.discoveryOnly,
197 staticPath: options.static,
198 metricsPort: options.metricsPort,
199 useLocalProps: options.local,
200 propDebug: options.propDebug || false,
201 tmpDir: options.tmpDir,
202 isWsl: isWsl,
203 devMode: options.devMode,
204 instanceColor: options.instanceColor,
205 loggingOptions: {
206 debug: options.debug || false,
207 logHost: options.logHost,
208 logPort: options.logPort,
209 hostnameForLogging: options.hostnameForLogging,
210 loki: options.loki,
211 suppressConsoleLog: options.suppressConsoleLog,
212 paperTrailIdentifier: options.env.join('.'),
213 },
214 };
215}
216
217/**
218 * Parse command-line arguments into an AppArguments object

Callers 2

parseArgsToAppArgumentsFunction · 0.85
cli-tests.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected