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

Method isMatch

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

Source from the content-addressed store, hash-verified

15 name = "Remix";
16
17 async isMatch(path: string, packageManager: PackageManager): Promise<boolean> {
18 //check for remix.config.js
19 const hasConfigFile = await pathExists(pathModule.join(path, "remix.config.js"));
20 if (hasConfigFile) {
21 return true;
22 }
23
24 //check for any packages starting with @remix-run
25 const packageJsonContent = await readPackageJson(path);
26 if (!packageJsonContent) {
27 return false;
28 }
29
30 const keys = Object.keys(packageJsonContent.dependencies || {});
31 const dependencyWithRemix = keys.find((key) => key.startsWith("@remix-run"));
32 if (dependencyWithRemix) {
33 return true;
34 }
35
36 return false;
37 }
38
39 async dependencies(): Promise<InstallPackage[]> {
40 return [

Callers

nothing calls this directly

Calls 4

pathExistsFunction · 0.90
readPackageJsonFunction · 0.90
keysMethod · 0.80
findMethod · 0.80

Tested by

no test coverage detected