MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / checkApiKeyIsDevServer

Function checkApiKeyIsDevServer

packages/cli/src/utils/getApiKeyType.ts:15–32  ·  view source on GitHub ↗
(apiKey: string)

Source from the content-addressed store, hash-verified

13 };
14
15export function checkApiKeyIsDevServer(apiKey: string): Result {
16 const type = getApiKeyType(apiKey);
17
18 if (!type) {
19 return { success: false, type: undefined };
20 }
21
22 if (type.environment === "dev" && type.type === "server") {
23 return {
24 success: true,
25 };
26 }
27
28 return {
29 success: false,
30 type,
31 };
32}
33
34export function getApiKeyType(apiKey: string): ApiKeyType | undefined {
35 if (apiKey.startsWith("tr_dev_")) {

Callers 3

getTriggerApiDetailsFunction · 0.90
promptApiKeyFunction · 0.90

Calls 1

getApiKeyTypeFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…