Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

493 B
Raw Blame
import { existsSync } from 'node:fs'

export function runtimeConfigFile(fileName: string): string | undefined {
  const config = `${fileName}.config.ts`
  return existsSync(config.startsWith('file:') ? new URL(config) : config) ? config : undefined
}

export function operationConfigFile(
  fileName: string,
  kind: 'queries' | 'errors',
): string | undefined {
  const file = `${fileName}.${kind}.ts`
  return existsSync(file.startsWith('file:') ? new URL(file) : file) ? file : undefined
}