Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ const OPTIONS = {
"tlsDisabledProtocols",
"username",
"atlasTemporaryDatabaseUserLifetimeMs",
"exportsPath",
"exportTimeoutMs",
"exportCleanupIntervalMs",
],
boolean: [
"apiDeprecationErrors",
Expand All @@ -72,7 +75,7 @@ const OPTIONS = {
"tlsFIPSMode",
"version",
],
array: ["disabledTools", "loggers"],
array: ["disabledTools", "loggers", "confirmationRequiredTools"],
alias: {
h: "help",
p: "password",
Expand All @@ -91,19 +94,22 @@ const OPTIONS = {
"greedy-arrays": true,
"short-option-groups": false,
},
object: ["httpHeaders"],
} as Readonly<Options>;

interface Options {
string: string[];
boolean: string[];
array: string[];
object: string[];
alias: Record<string, string>;
configuration: Record<string, boolean>;
}

export const ALL_CONFIG_KEYS = new Set(
(OPTIONS.string as readonly string[])
.concat(OPTIONS.array)
.concat(OPTIONS.object)
.concat(OPTIONS.boolean)
.concat(Object.keys(OPTIONS.alias))
);
Expand Down Expand Up @@ -358,7 +364,7 @@ export function warnAboutDeprecatedOrUnknownCliArgs(
if (knownArgs.connectionString) {
usedDeprecatedArgument = true;
warn(
"The --connectionString argument is deprecated. Prefer using the first positional argument for the connection string or the MDB_MCP_CONNECTION_STRING environment variable."
"The --connectionString argument is deprecated. Prefer using the MDB_MCP_CONNECTION_STRING environment variable or the first positional argument for the connection string."
);
}

Expand Down
Loading