Skip to content

Commit

Permalink
TRIGGER_API_KEY -> TRIGGER_SECRET_KEY in v3
Browse files Browse the repository at this point in the history
  • Loading branch information
ericallam committed Mar 4, 2024
1 parent b784568 commit 64401ee
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/cli-v3/src/commands/dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ function useDev({
dependencies,
env: {
TRIGGER_API_URL: apiUrl,
TRIGGER_API_KEY: apiKey,
TRIGGER_SECRET_KEY: apiKey,
...(environmentVariablesResponse.success
? environmentVariablesResponse.data.variables
: {}),
Expand Down
4 changes: 2 additions & 2 deletions packages/cli-v3/src/prod-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const logger = new SimpleLogger(`[${MACHINE_NAME}][${SHORT_HASH}]`);

class ProdWorker {
private apiUrl = process.env.TRIGGER_API_URL!;
private apiKey = process.env.TRIGGER_API_KEY!;
private apiKey = process.env.TRIGGER_SECRET_KEY!;
private contentHash = process.env.TRIGGER_CONTENT_HASH!;
private projectDir = process.env.TRIGGER_PROJECT_DIR!;
private projectRef = process.env.TRIGGER_PROJECT_REF!;
Expand All @@ -45,7 +45,7 @@ class ProdWorker {
projectDir: this.projectDir,
env: {
TRIGGER_API_URL: this.apiUrl,
TRIGGER_API_KEY: this.apiKey,
TRIGGER_SECRET_KEY: this.apiKey,
},
contentHash: this.contentHash,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { logger } from "./logger.js";

type VariableNames = "TRIGGER_API_URL" | "TRIGGER_API_KEY" | "TRIGGER_LOG_LEVEL";
type VariableNames = "TRIGGER_API_URL" | "TRIGGER_SECRET_KEY" | "TRIGGER_LOG_LEVEL";

type DeprecatedNames = "";

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/v3/apiClient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class ApiClientManager {

get accessToken(): string | undefined {
const store = this.#getStore();
return store?.accessToken ?? getEnvVar("TRIGGER_API_KEY");
return store?.accessToken ?? getEnvVar("TRIGGER_SECRET_KEY");
}

get client(): ApiClient | undefined {
Expand Down

0 comments on commit 64401ee

Please sign in to comment.