MCPcopy Create free account
hub / github.com/arktypeio/arktype / detectedToolsOf

Function detectedToolsOf

ark/type/cli.ts:110–136  ·  view source on GitHub ↗
(
	manifest: PackageManifest | undefined,
	projectRoot: string
)

Source from the content-addressed store, hash-verified

108 : `npm i -D ${pkg}`
109
110const detectedToolsOf = (
111 manifest: PackageManifest | undefined,
112 projectRoot: string
113): string[] => {
114 const deps = { ...manifest?.dependencies, ...manifest?.devDependencies }
115 const tools: string[] = []
116 for (const name of [
117 "next",
118 "vite",
119 "vitest",
120 "webpack",
121 "esbuild",
122 "rollup",
123 "rspack",
124 "tsup",
125 "tsdown"
126 ])
127 if (name in deps) tools.push(name)
128 if (
129 "bun" in deps ||
130 existsSync(join(projectRoot, "bun.lock")) ||
131 existsSync(join(projectRoot, "bun.lockb")) ||
132 existsSync(join(projectRoot, "bunfig.toml"))
133 )
134 tools.push("bun")
135 return tools
136}
137
138const migrationSources: readonly MigrationSource[] = [
139 "zod",

Callers 1

runInitFunction · 0.85

Calls 2

joinFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected