UNPKG

@redwoodjs/sdk

Version:

A full-stack webapp toolkit designed for TypeScript, Vite, and React Server Components

13 lines (12 loc) 457 B
import { pathExists } from "fs-extra"; import { resolve } from "path"; export const findWranglerConfig = async (projectRootDir) => { const configFiles = ["wrangler.jsonc", "wrangler.json", "wrangler.toml"]; for (const file of configFiles) { const fullPath = resolve(projectRootDir, file); if (await pathExists(fullPath)) { return fullPath; } } throw new Error("No wrangler configuration file found."); };