@kubb/mcp 5.0.0-beta.6 → 5.0.0-beta.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,20 +0,0 @@
1
- import path from 'node:path'
2
- import type { Config } from '@kubb/core'
3
-
4
- /**
5
- * Determine the root directory based on userConfig.root and resolvedConfigDir
6
- * 1. If userConfig.root exists and is absolute, use it as-is
7
- * 2. If userConfig.root exists and is relative, resolve it relative to config directory
8
- * 3. Otherwise, use the config directory as root
9
- */
10
- export function resolveCwd(userConfig: Config, cwd: string): string {
11
- if (userConfig.root) {
12
- if (path.isAbsolute(userConfig.root)) {
13
- return userConfig.root
14
- }
15
-
16
- return path.resolve(cwd, userConfig.root)
17
- }
18
-
19
- return cwd
20
- }
@@ -1,13 +0,0 @@
1
- import { isPromise } from '@internals/utils'
2
- import type { CLIOptions, Config, PossibleConfig } from '@kubb/core'
3
-
4
- export type ResolveUserConfigOptions = {
5
- configPath?: string
6
- logLevel?: string
7
- }
8
-
9
- export async function resolveUserConfig(config: PossibleConfig<CLIOptions>, options: ResolveUserConfigOptions): Promise<Config> {
10
- const result = typeof config === 'function' ? config({ logLevel: options.logLevel as CLIOptions['logLevel'], config: options.configPath }) : config
11
- const resolved = isPromise(result) ? await result : result
12
- return (Array.isArray(resolved) ? resolved[0] : resolved) as Config
13
- }
File without changes