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
3 changes: 2 additions & 1 deletion 3 packages/cli-v3/src/commands/analyze.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's revert this file, no need for profile here

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { tryCatch } from "@trigger.dev/core";
const AnalyzeOptions = CommonCommandOptions.pick({
logLevel: true,
skipTelemetry: true,
profile: true,
}).extend({
verbose: z.boolean().optional().default(false),
});
Expand All @@ -39,7 +40,7 @@ export function configureAnalyzeCommand(program: Command) {

export async function analyzeCommand(dir: string | undefined, options: unknown) {
return await wrapCommandAction("analyze", AnalyzeOptions, options, async (opts) => {
await printInitialBanner(false);
await printInitialBanner(false, opts.profile);
return await analyze(dir, opts);
});
}
Expand Down
3 changes: 2 additions & 1 deletion 3 packages/cli-v3/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,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 Expand Up @@ -676,6 +676,7 @@ async function failDeploy(

switch (serverDeployment.status) {
case "PENDING":
case "INSTALLING":
case "DEPLOYING":
case "BUILDING": {
await doOutputLogs();
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 @@ -203,7 +203,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/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/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function configureUpdateCommand(program: Command) {
.option("--skip-telemetry", "Opt-out of sending telemetry")
.action(async (path, options) => {
wrapCommandAction("dev", UpdateCommandOptions, options, async (opts) => {
await printStandloneInitialBanner(true);
await printStandloneInitialBanner(true, options.profile);
await updateCommand(path, 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(profileOption?: string) {
const currentProfile = profileOption ?? 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, profileOption?: string) {
const profileInfo = getProfileInfo(profileOption);

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, profileOption?: string) {
const profileInfo = getProfileInfo(profileOption);
const profileText = profileInfo ? chalkGrey(` | ${profileInfo}`) : "";

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