MCPcopy
hub / github.com/triggerdotdev/trigger.dev / isMatch

Method isMatch

packages/cli/src/frameworks/astro/index.ts:17–37  ·  view source on GitHub ↗
(path: string, packageManager: PackageManager)

Source from the content-addressed store, hash-verified

15 name = "Astro";
16
17 async isMatch(path: string, packageManager: PackageManager): Promise<boolean> {
18 const configFilenames = [
19 "astro.config.js",
20 "astro.config.mjs",
21 "astro.config.cjs",
22 "astro.config.ts",
23 ];
24 //check for astro.config.mjs
25 const hasConfigFile = await someFileExists(path, configFilenames);
26 if (hasConfigFile) {
27 return true;
28 }
29
30 //check for the astro package
31 const packageJsonContent = await readPackageJson(path);
32 if (packageJsonContent?.dependencies?.astro) {
33 return true;
34 }
35
36 return false;
37 }
38
39 async dependencies(): Promise<InstallPackage[]> {
40 return [

Callers

nothing calls this directly

Calls 2

someFileExistsFunction · 0.90
readPackageJsonFunction · 0.90

Tested by

no test coverage detected