| 13 | }; |
| 14 | |
| 15 | export 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. */ |
| 57 | const frameworks: Framework[] = [new NextJs(), new Remix(), new Astro(), new Express(), new Hono()]; |
no outgoing calls
no test coverage detected
searching dependent graphs…