Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 .changeset/healthy-cherries-joke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"trigger.dev": patch
---

fix(cli): header will always print the correct profile
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export function configureDeployCommand(program: Command) {
)
.action(async (path, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await deployCommand(path, options);
});
})
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ async function startDev(options: StartDevOptions) {
logger.loggerLevel = options.logLevel;
}

await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);

let displayedUpdateMessage = false;

Expand Down
6 changes: 3 additions & 3 deletions 6 packages/cli-v3/src/commands/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export function configureEnvCommand(program: Command) {
)
).action(async (options) => {
await handleTelemetry(async () => {
await printInitialBanner(false);
await printInitialBanner(false, options.profile);
await envListCommand(options);
});
});
Expand All @@ -95,7 +95,7 @@ export function configureEnvCommand(program: Command) {
).action(async (name, options) => {
await handleTelemetry(async () => {
if (!options.raw) {
await printInitialBanner(false);
await printInitialBanner(false, options.profile);
}
await envGetCommand({ ...options, name });
});
Expand All @@ -120,7 +120,7 @@ export function configureEnvCommand(program: Command) {
.option("--force", "Overwrite the output file if it exists")
).action(async (options) => {
await handleTelemetry(async () => {
await printInitialBanner(false);
await printInitialBanner(false, options.profile);
await envPullCommand(options);
});
});
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function configureInitCommand(program: Command) {
)
.action(async (path, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await initCommand(path, options);
});
});
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function configureLoginCommand(program: Command) {
.version(VERSION, "-v, --version", "Display the version number")
.action(async (options) => {
await handleTelemetry(async () => {
await printInitialBanner(false);
await printInitialBanner(false, options.profile);
await loginCommand(options);
});
});
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function configureLogoutCommand(program: Command) {
return commonOptions(program.command("logout").description("Logout of Trigger.dev")).action(
async (options) => {
await handleTelemetry(async () => {
await printInitialBanner(false);
await printInitialBanner(false, options.profile);
await logoutCommand(options);
});
}
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/mcp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function configureMcpCommand(program: Command) {

export async function mcpCommand(options: McpCommandOptions) {
if (process.stdout.isTTY) {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);

intro("Welcome to the Trigger.dev MCP server install wizard 🧙");

Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export function configurePreviewCommand(program: Command) {
)
).action(async (path, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await previewArchiveCommand(path, options);
});
});
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/promote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function configurePromoteCommand(program: Command) {
)
).action(async (version, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await promoteCommand(version, options);
});
});
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function configureTriggerTaskCommand(program: Command) {

export async function triggerTaskCommand(taskName: string, options: unknown) {
return await wrapCommandAction("trigger", TriggerTaskOptions, options, async (opts) => {
await printInitialBanner(false);
await printInitialBanner(false, opts.profile);
return await triggerTask(taskName, opts);
});
}
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/whoami.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function configureWhoamiCommand(program: Command) {
)
).action(async (options) => {
await handleTelemetry(async () => {
await printInitialBanner(false);
await printInitialBanner(false, options.profile);
await whoAmICommand(options);
});
});
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/workers/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export function configureWorkersBuildCommand(program: Command) {
.option("--save-logs", "If provided, will save logs even for successful builds")
.action(async (path, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await workersBuildCommand(path, options);
});
});
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/workers/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function configureWorkersCreateCommand(program: Command) {
)
.action(async (path, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await workersCreateCommand(path, options);
});
})
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/workers/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function configureWorkersListCommand(program: Command) {
)
.action(async (path, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await workersListCommand(path, options);
});
})
Expand Down
2 changes: 1 addition & 1 deletion 2 packages/cli-v3/src/commands/workers/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function configureWorkersRunCommand(program: Command) {
.option("--network <mode>", "The networking mode for the container", "host")
.action(async (path, options) => {
await handleTelemetry(async () => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await workersRunCommand(path, options);
});
})
Expand Down
12 changes: 6 additions & 6 deletions 12 packages/cli-v3/src/utilities/initialBanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
} from "./configFiles.js";
import { CLOUD_API_URL } from "../consts.js";

function getProfileInfo() {
const currentProfile = readAuthConfigCurrentProfileName();
function getProfileInfo(profileName?: string) {
const currentProfile = profileName ?? readAuthConfigCurrentProfileName();
const profile = readAuthConfigProfile(currentProfile);

if (currentProfile === DEFFAULT_PROFILE || !profile) {
Expand All @@ -24,8 +24,8 @@ function getProfileInfo() {
}`;
}

export async function printInitialBanner(performUpdateCheck = true) {
const profileInfo = getProfileInfo();
export async function printInitialBanner(performUpdateCheck = true, profile?: string) {
const profileInfo = getProfileInfo(profile);

const text = `\n${logo()} ${chalkGrey(`(${VERSION})`)}${
profileInfo ? chalkGrey(` | ${profileInfo}`) : ""
Expand Down Expand Up @@ -62,8 +62,8 @@ After installation, run Trigger.dev with \`npx trigger.dev\`.`
}
}

export async function printStandloneInitialBanner(performUpdateCheck = true) {
const profileInfo = getProfileInfo();
export async function printStandloneInitialBanner(performUpdateCheck = true, profile?: string) {
const profileInfo = getProfileInfo(profile);
const profileText = profileInfo ? chalkGrey(` | ${profileInfo}`) : "";

let versionText = `\n${logo()} ${chalkGrey(`(${VERSION})`)}`;
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.