MCPcopy Create free account
hub / github.com/langgenius/dify / watchDevProxyConfig

Function watchDevProxyConfig

packages/dev-proxy/src/config.ts:150–162  ·  view source on GitHub ↗
(
  configPath = DEFAULT_CONFIG_FILE,
  cwd = process.cwd(),
  options: DevProxyConfigLoadOptions & Pick<WatchConfigOptions<DevProxyConfig>, 'onUpdate'> = {},
)

Source from the content-addressed store, hash-verified

148}
149
150export const watchDevProxyConfig = async (
151 configPath = DEFAULT_CONFIG_FILE,
152 cwd = process.cwd(),
153 options: DevProxyConfigLoadOptions & Pick<WatchConfigOptions<DevProxyConfig>, 'onUpdate'> = {},
154) => {
155 const watcher = await watchConfig<DevProxyConfig>({
156 ...createC12ConfigOptions(configPath, cwd, options),
157 onUpdate: options.onUpdate,
158 })
159
160 assertDevProxyConfig(watcher.config)
161 return watcher
162}
163
164export const defineDevProxyConfig = (config: DevProxyConfig) => config

Callers 1

mainFunction · 0.90

Calls 2

createC12ConfigOptionsFunction · 0.85
assertDevProxyConfigFunction · 0.85

Tested by

no test coverage detected