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

Method create

src/config/ServerConfig.ts:239–258  ·  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

237 * validates conflicts and implications, and applies defaults.
238 */
239 static create(options: ServerConfigCreateOptions): ServerConfig {
240 const explicitArgs: Partial<ParsedArguments> = {
241 ...options.fileArgs,
242 ...options.cliArgs,
243 ...(options.configPath ? {config: options.configPath} : {}),
244 };
245 ServerConfig.validateConflicts(explicitArgs);
246 ServerConfig.validateImplications(explicitArgs);
247 const resolved = ServerConfig.applyDefaults(explicitArgs, {
248 env: options.env,
249 suppressUsageStatisticsNotice: options.suppressUsageStatisticsNotice,
250 });
251 return new ServerConfig({
252 cliArgs: options.cliArgs,
253 fileArgs: options.fileArgs,
254 configPath: options.configPath,
255 env: options.env,
256 resolved,
257 });
258 }
259
260 get cliArgs(): Readonly<Partial<ParsedArguments>> {
261 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