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

Function resolveOptions

packages/cli/src/commands/dev.ts:341–371  ·  view source on GitHub ↗
(
  framework: Framework | undefined,
  path: string,
  unresolvedOptions: DevCommandOptions
)

Source from the content-addressed store, hash-verified

339}
340
341async 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
373async function verifyEndpoint(
374 resolvedOptions: ResolvedOptions,

Callers 1

devCommandFunction · 0.85

Calls 3

getEnvFilenameFunction · 0.90
infoMethod · 0.65
possibleEnvFilenamesMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…