Skip to content

Commit 64401ee

Browse files
committed
TRIGGER_API_KEY -> TRIGGER_SECRET_KEY in v3
1 parent b784568 commit 64401ee

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

packages/cli-v3/src/commands/dev.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ function useDev({
408408
dependencies,
409409
env: {
410410
TRIGGER_API_URL: apiUrl,
411-
TRIGGER_API_KEY: apiKey,
411+
TRIGGER_SECRET_KEY: apiKey,
412412
...(environmentVariablesResponse.success
413413
? environmentVariablesResponse.data.variables
414414
: {}),

packages/cli-v3/src/prod-worker.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const logger = new SimpleLogger(`[${MACHINE_NAME}][${SHORT_HASH}]`);
1919

2020
class ProdWorker {
2121
private apiUrl = process.env.TRIGGER_API_URL!;
22-
private apiKey = process.env.TRIGGER_API_KEY!;
22+
private apiKey = process.env.TRIGGER_SECRET_KEY!;
2323
private contentHash = process.env.TRIGGER_CONTENT_HASH!;
2424
private projectDir = process.env.TRIGGER_PROJECT_DIR!;
2525
private projectRef = process.env.TRIGGER_PROJECT_REF!;
@@ -45,7 +45,7 @@ class ProdWorker {
4545
projectDir: this.projectDir,
4646
env: {
4747
TRIGGER_API_URL: this.apiUrl,
48-
TRIGGER_API_KEY: this.apiKey,
48+
TRIGGER_SECRET_KEY: this.apiKey,
4949
},
5050
contentHash: this.contentHash,
5151
});

packages/cli-v3/src/utilities/getEnvironmentVariableFactory.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { logger } from "./logger.js";
22

3-
type VariableNames = "TRIGGER_API_URL" | "TRIGGER_API_KEY" | "TRIGGER_LOG_LEVEL";
3+
type VariableNames = "TRIGGER_API_URL" | "TRIGGER_SECRET_KEY" | "TRIGGER_LOG_LEVEL";
44

55
type DeprecatedNames = "";
66

packages/core/src/v3/apiClient/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export class ApiClientManager {
7878

7979
get accessToken(): string | undefined {
8080
const store = this.#getStore();
81-
return store?.accessToken ?? getEnvVar("TRIGGER_API_KEY");
81+
return store?.accessToken ?? getEnvVar("TRIGGER_SECRET_KEY");
8282
}
8383

8484
get client(): ApiClient | undefined {

0 commit comments

Comments
 (0)