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

Interface Framework

packages/cli/src/frameworks/index.ts:15–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13};
14
15export interface Framework {
16 /** A unique id for the framework */
17 id: string;
18
19 /** Display to the user in messages */
20 name: string;
21
22 /** Is this folder a project using this framework? */
23 isMatch(path: string, packageManager: PackageManager): Promise<boolean>;
24
25 /** List of packages to install */
26 dependencies(): Promise<InstallPackage[]>;
27
28 /** Priority list of env filenames, e.g. ".env" */
29 possibleEnvFilenames(): string[];
30
31 /** Defaults to TRIGGER_PUBLIC_API_KEY */
32 publicKeyEnvName?: string;
33
34 /** Install the required files */
35 install(path: string, options: ProjectInstallOptions): Promise<void>;
36
37 /** You can check for middleware, add extra instructions, etc */
38 postInstall(path: string, options: ProjectInstallOptions): Promise<void>;
39
40 /** You can (optionally) override the initComplete messages */
41 printInstallationComplete?(projectUrl: string): Promise<void>;
42
43 /** Used by the dev command, if a hostname isn't passed in */
44 defaultHostnames: string[];
45
46 /** Used by the dev command, if a port isn't passed in */
47 defaultPorts: number[];
48
49 /** These filenames are watched for changes with the dev command, can use globs. */
50 watchFilePaths: string[];
51
52 /** These folders are ignored when watching for changes with the dev command */
53 watchIgnoreRegex: RegExp;
54}
55
56/** The order of these matters. The first one that matches the folder will be used, so stricter ones should be first. */
57const frameworks: Framework[] = [new NextJs(), new Remix(), new Astro(), new Express(), new Hono()];

Callers 10

getFrameworkFunction · 0.65
initCommandFunction · 0.65
initCommandFunction · 0.65
resolveOptionsFunction · 0.65
initCommandFunction · 0.65
remix.test.tsFile · 0.65
astro.test.tsFile · 0.65
nextjs.test.tsFile · 0.65
initCommandFunction · 0.65
initCommandFunction · 0.65

Implementers 5

Honopackages/cli/src/frameworks/hono/index
Expresspackages/cli/src/frameworks/express/in
Remixpackages/cli/src/frameworks/remix/inde
Astropackages/cli/src/frameworks/astro/inde
NextJspackages/cli/src/frameworks/nextjs/ind

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…