Skip to content

Commit 5ad2fa4

Browse files
committed
createUserConfig => parseUserConfig
1 parent 4b8fe45 commit 5ad2fa4

File tree

6 files changed

+49
-49
lines changed

6 files changed

+49
-49
lines changed

eslint-rules/enforce-zod-v4.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from "path";
44
// The file that is allowed to import from zod/v4
55
const allowedFilePaths = [
66
path.resolve(import.meta.dirname, "../src/common/config/userConfig.ts"),
7-
path.resolve(import.meta.dirname, "../src/common/config/createUserConfig.ts"),
7+
path.resolve(import.meta.dirname, "../src/common/config/parseUserConfig.ts"),
88
];
99

1010
// Ref: https://eslint.org/docs/latest/extend/custom-rules

src/common/config/createUserConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ export const defaultParserOptions = {
2929
},
3030
} satisfies ParserOptions;
3131

32-
export function createUserConfig({
32+
export function parseUserConfig({
3333
args,
3434
overrides,
3535
parserOptions = defaultParserOptions,
3636
}: {
3737
args: string[];
3838
overrides?: z4.ZodRawShape;
39-
parserOptions?: ParserOptions;
39+
parserOptions: ParserOptions;
4040
}): {
4141
warnings: string[];
4242
parsed: UserConfig | undefined;

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ enableFipsIfRequested();
3737

3838
import crypto from "crypto";
3939
import { ConsoleLogger, LogId } from "./common/logger.js";
40-
import { createUserConfig } from "./common/config/createUserConfig.js";
40+
import { parseUserConfig } from "./common/config/parseUserConfig.js";
4141
import { type UserConfig } from "./common/config/userConfig.js";
4242
import { packageInfo } from "./common/packageInfo.js";
4343
import { StdioRunner } from "./transports/stdio.js";
@@ -53,7 +53,7 @@ async function main(): Promise<void> {
5353
error,
5454
warnings,
5555
parsed: config,
56-
} = createUserConfig({
56+
} = parseUserConfig({
5757
args: process.argv.slice(2),
5858
});
5959

src/lib.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export { Server, type ServerOptions } from "./server.js";
22
export { Session, type SessionOptions } from "./common/session.js";
33
export { type UserConfig, UserConfigSchema } from "./common/config/userConfig.js";
4-
export { createUserConfig, defaultParserOptions, type ParserOptions } from "./common/config/createUserConfig.js";
4+
export { parseUserConfig, defaultParserOptions, type ParserOptions } from "./common/config/parseUserConfig.js";
55
export { LoggerBase, type LogPayload, type LoggerType, type LogLevel } from "./common/logger.js";
66
export { StreamableHttpRunner } from "./transports/streamableHttp.js";
77
export { StdioRunner } from "./transports/stdio.js";

src/transports/base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export type TransportRunnerConfig = {
7474
* `UserConfig`.
7575
*
7676
* To parse CLI arguments and environment variables in order to generate a
77-
* `UserConfig` object, you can use `createUserConfig` function, also
77+
* `UserConfig` object, you can use `parseUserConfig` function, also
7878
* exported as `parseUserConfig` through MCP server library
7979
* exports.
8080
*

0 commit comments

Comments
 (0)