MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / create

Method create

src/config/ServerConfig.ts:245–264  ·  view source on GitHub ↗

* Step 3–5: merges CLI and config-file layers (`CLI > config file`), * validates conflicts and implications, and applies defaults.

(options: ServerConfigCreateOptions)

Source from the content-addressed store, hash-verified

243 * validates conflicts and implications, and applies defaults.
244 */
245 static create(options: ServerConfigCreateOptions): ServerConfig {
246 const explicitArgs: Partial<ParsedArguments> = {
247 ...options.fileArgs,
248 ...options.cliArgs,
249 ...(options.configPath ? {config: options.configPath} : {}),
250 };
251 ServerConfig.validateConflicts(explicitArgs);
252 ServerConfig.validateImplications(explicitArgs);
253 const resolved = ServerConfig.applyDefaults(explicitArgs, {
254 env: options.env,
255 suppressUsageStatisticsNotice: options.suppressUsageStatisticsNotice,
256 });
257 return new ServerConfig({
258 cliArgs: options.cliArgs,
259 fileArgs: options.fileArgs,
260 configPath: options.configPath,
261 env: options.env,
262 resolved,
263 });
264 }
265
266 get cliArgs(): Readonly<Partial<ParsedArguments>> {
267 return this.#cliArgs;

Callers 4

withTimeoutFunction · 0.45
withFileArgsMethod · 0.45
mergeReloadableMethod · 0.45
#resolveConfigMethod · 0.45

Calls 3

validateConflictsMethod · 0.80
validateImplicationsMethod · 0.80
applyDefaultsMethod · 0.80

Tested by

no test coverage detected