diff --git a/.changeset/tame-ladybugs-hug.md b/.changeset/tame-ladybugs-hug.md new file mode 100644 index 00000000000..bea1353b635 --- /dev/null +++ b/.changeset/tame-ladybugs-hug.md @@ -0,0 +1,5 @@ +--- +"thirdweb": patch +--- + +Update ordering of commands in npx thirdweb diff --git a/packages/cli/package.json b/packages/cli/package.json index 1057e80939a..c8f49325853 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -81,4 +81,4 @@ "sourcemap": true, "clean": true } -} +} \ No newline at end of file diff --git a/packages/cli/src/cli/index.ts b/packages/cli/src/cli/index.ts index f03790621f9..dbb8bef681c 100644 --- a/packages/cli/src/cli/index.ts +++ b/packages/cli/src/cli/index.ts @@ -39,31 +39,34 @@ $$$$$$\\ $$$$$$$\\ $$\\ $$$$$$\\ $$$$$$$ |$$\\ $$\\ $$\\ $$$$$$\\ $$$$ .version(cliVersion, "-v, --version"); program - .command("detect") + .command("create") .description( - "Compile contracts and detect implemented thirdweb contract extensions", + "Create a thirdweb app from any of our official templates. Checkout some examples you can use here: https://github.com/thirdweb-example/", ) - .option("-p, --path ", "path to project", ".") - .option("-d, --debug", "show debug logs") - .option("-a, --all", "run detection on all contracts") - .action(async (options) => { - await detectExtensions(options); - }); - - program - .command("release") - .description( - "Release contracts, making them available for others to deploy and unlocking SDKs, Dashboards and Analytics.", + .option("--app", `Create a thirdweb app.`) + .option("--contract", `Create a thirdweb contracts project.`) + .option("--ts, --typescript", `Initialize as a TypeScript project.`) + .option("--js, --javascript", `Initialize as a JavaScript project.`) + .option("--forge", `Initialize as a Forge project.`) + .option("--hardhat", `Initialize as a Hardhat project.`) + .option("--cra", `Initialize as a Create React App project.`) + .option("--next", `Initialize as a Next.js project.`) + .option("--vite", `Initialize as a Vite project.`) + .option( + "--use-npm", + `Explicitly tell the CLI to bootstrap the app using npm`, + ) + .option( + "--use-pnpm", + `Explicitly tell the CLI to bootstrap the app using pnpm`, + ) + .option("--framework [name]", `The preferred framework.`) + .option( + "-t, --template [name]", + `A template to start your project from. You can use an template repository name from the official thirdweb-example org.`, ) - .option("-p, --path ", "path to project", ".") - .option("--dry-run", "dry run (skip actually publishing)") - .option("-d, --debug", "show debug logs") - .option("--ci", "Continuous Integration mode") .action(async (options) => { - const url = await processProject(options, "release"); - info(`Open this link to release your contracts:`); - logger.info(chalk.blueBright(url.toString())); - open(url.toString()); + await twCreate(options); }); program @@ -111,34 +114,31 @@ $$$$$$\\ $$$$$$$\\ $$\\ $$$$$$\\ $$$$$$$ |$$\\ $$\\ $$\\ $$$$$$\\ $$$$ }); program - .command("create") + .command("release") .description( - "Create a thirdweb app from any of our official templates. Checkout some examples you can use here: https://github.com/thirdweb-example/", - ) - .option("--app", `Create a thirdweb app.`) - .option("--contract", `Create a thirdweb contracts project.`) - .option("--ts, --typescript", `Initialize as a TypeScript project.`) - .option("--js, --javascript", `Initialize as a JavaScript project.`) - .option("--forge", `Initialize as a Forge project.`) - .option("--hardhat", `Initialize as a Hardhat project.`) - .option("--cra", `Initialize as a Create React App project.`) - .option("--next", `Initialize as a Next.js project.`) - .option("--vite", `Initialize as a Vite project.`) - .option( - "--use-npm", - `Explicitly tell the CLI to bootstrap the app using npm`, - ) - .option( - "--use-pnpm", - `Explicitly tell the CLI to bootstrap the app using pnpm`, + "Release contracts, making them available for others to deploy and unlocking SDKs, Dashboards and Analytics.", ) - .option("--framework [name]", `The preferred framework.`) - .option( - "-t, --template [name]", - `A template to start your project from. You can use an template repository name from the official thirdweb-example org.`, + .option("-p, --path ", "path to project", ".") + .option("--dry-run", "dry run (skip actually publishing)") + .option("-d, --debug", "show debug logs") + .option("--ci", "Continuous Integration mode") + .action(async (options) => { + const url = await processProject(options, "release"); + info(`Open this link to release your contracts:`); + logger.info(chalk.blueBright(url.toString())); + open(url.toString()); + }); + + program + .command("detect") + .description( + "Compile contracts and detect implemented thirdweb contract extensions", ) + .option("-p, --path ", "path to project", ".") + .option("-d, --debug", "show debug logs") + .option("-a, --all", "run detection on all contracts") .action(async (options) => { - await twCreate(options); + await detectExtensions(options); }); program