if specified, add api url to dev command shown after init
This commit is contained in:
@@ -30,6 +30,8 @@ import { logger } from "../utilities/logger";
|
||||
import { cliRootPath } from "../utilities/resolveInternalFilePath";
|
||||
import { login } from "./login";
|
||||
import { spinner } from "../utilities/windows";
|
||||
import { CLOUD_API_URL } from "../consts";
|
||||
import * as packageJson from "../../package.json";
|
||||
|
||||
const InitCommandOptions = CommonCommandOptions.extend({
|
||||
projectRef: z.string().optional(),
|
||||
@@ -53,7 +55,7 @@ export function configureInitCommand(program: Command) {
|
||||
.option(
|
||||
"-t, --tag <package tag>",
|
||||
"The version of the @trigger.dev/sdk package to install",
|
||||
"beta"
|
||||
packageJson.version
|
||||
)
|
||||
.option("--skip-package-install", "Skip installing the @trigger.dev/sdk package")
|
||||
.option("--override-config", "Override the existing config file if it exists")
|
||||
@@ -160,7 +162,9 @@ async function _initCommand(dir: string, options: InitCommandOptions) {
|
||||
log.info("Next steps:");
|
||||
log.info(
|
||||
` 1. To start developing, run ${chalk.green(
|
||||
`npx trigger.dev@${options.tag} dev`
|
||||
`npx trigger.dev@${options.tag} dev${
|
||||
options.apiUrl === CLOUD_API_URL ? "" : ` -a ${options.apiUrl}`
|
||||
}`
|
||||
)} in your project directory`
|
||||
);
|
||||
log.info(` 2. Visit your ${projectDashboard} to view your newly created tasks.`);
|
||||
|
||||
Reference in New Issue
Block a user