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

Function getJsRuntime

packages/cli/src/utils/jsRuntime.ts:22–29  ·  view source on GitHub ↗
(projectRootPath: string, logger: Logger)

Source from the content-addressed store, hash-verified

20}
21
22export async function getJsRuntime(projectRootPath: string, logger: Logger): Promise<JsRuntime> {
23 if (await NodeJsRuntime.isNodeJsRuntime(projectRootPath)) {
24 return new NodeJsRuntime(projectRootPath, logger);
25 } else if (await DenoRuntime.isDenoJsRuntime(projectRootPath)) {
26 return new DenoRuntime(projectRootPath, logger);
27 }
28 throw new Error("Unsupported runtime");
29}
30
31class NodeJsRuntime extends JsRuntime {
32 static async isNodeJsRuntime(projectRootPath: string): Promise<boolean> {

Callers 3

whoamiCommandFunction · 0.90
initCommandFunction · 0.90
devCommandFunction · 0.90

Calls 2

isNodeJsRuntimeMethod · 0.80
isDenoJsRuntimeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…