( framework: Framework | undefined, path: string, unresolvedOptions: DevCommandOptions )
| 339 | } |
| 340 | |
| 341 | async function resolveOptions( |
| 342 | framework: Framework | undefined, |
| 343 | path: string, |
| 344 | unresolvedOptions: DevCommandOptions |
| 345 | ): Promise<ResolvedOptions> { |
| 346 | if (!framework) { |
| 347 | logger.info(" [trigger.dev] Failed to detect framework, using default values"); |
| 348 | return { |
| 349 | port: unresolvedOptions.port ?? 3000, |
| 350 | hostname: unresolvedOptions.hostname ?? "localhost", |
| 351 | envFile: unresolvedOptions.envFile ?? ".env", |
| 352 | handlerPath: unresolvedOptions.handlerPath, |
| 353 | clientId: unresolvedOptions.clientId, |
| 354 | tunnel: unresolvedOptions.tunnel, |
| 355 | https: unresolvedOptions.https, |
| 356 | }; |
| 357 | } |
| 358 | |
| 359 | //get env filename |
| 360 | const envName = await getEnvFilename(path, framework.possibleEnvFilenames()); |
| 361 | |
| 362 | return { |
| 363 | port: unresolvedOptions.port, |
| 364 | hostname: unresolvedOptions.hostname, |
| 365 | envFile: unresolvedOptions.envFile ?? envName ?? ".env", |
| 366 | handlerPath: unresolvedOptions.handlerPath, |
| 367 | clientId: unresolvedOptions.clientId, |
| 368 | tunnel: unresolvedOptions.tunnel, |
| 369 | https: unresolvedOptions.https, |
| 370 | }; |
| 371 | } |
| 372 | |
| 373 | async function verifyEndpoint( |
| 374 | resolvedOptions: ResolvedOptions, |
no test coverage detected
searching dependent graphs…