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

Method getProjectEnv

packages/cli-v3/src/apiClient.ts:124–145  ·  view source on GitHub ↗
({
    projectRef,
    env,
  }: {
    projectRef: string;
    env: "dev" | "prod" | "staging";
  })

Source from the content-addressed store, hash-verified

122 }
123
124 async getProjectEnv({
125 projectRef,
126 env,
127 }: {
128 projectRef: string;
129 env: "dev" | "prod" | "staging";
130 }) {
131 if (!this.accessToken) {
132 throw new Error("getProjectDevEnv: No access token");
133 }
134
135 return wrapZodFetch(
136 GetProjectEnvResponse,
137 `${this.apiURL}/api/v1/projects/${projectRef}/${env}`,
138 {
139 headers: {
140 Authorization: `Bearer ${this.accessToken}`,
141 "Content-Type": "application/json",
142 },
143 }
144 );
145 }
146
147 async getEnvironmentVariables(projectRef: string) {
148 if (!this.accessToken) {

Callers 2

_deployCommandFunction · 0.95
getDevReactElementFunction · 0.80

Calls 1

wrapZodFetchFunction · 0.85

Tested by

no test coverage detected