From 453982787fffd48cb1478395776dc9bb7cb8705d Mon Sep 17 00:00:00 2001 From: Sujay Jayakar Date: Wed, 18 Sep 2024 13:21:24 -0400 Subject: [PATCH] Change --component-path to --component in the CLI (#29945) GitOrigin-RevId: 328980b57004bd144a1c0b15c84c10eb69c5031f --- src/cli/convexImport.ts | 4 ++-- src/cli/data.ts | 6 +++--- src/cli/run.ts | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cli/convexImport.ts b/src/cli/convexImport.ts index fd150e3..b3384ed 100644 --- a/src/cli/convexImport.ts +++ b/src/cli/convexImport.ts @@ -77,7 +77,7 @@ export const convexImport = new Command("import") ) .addOption( new Option( - "--component-path ", + "--component ", "Path to the component in the component tree defined in convex.config.ts", // TODO(ENG-6967): Remove hideHelp before launching components ).hideHelp(), @@ -163,7 +163,7 @@ export const convexImport = new Command("import") } const importArgs = { tableName: tableName === null ? undefined : tableName, - componentPath: options.componentPath, + componentPath: options.component, mode, format, }; diff --git a/src/cli/data.ts b/src/cli/data.ts index bc4c41c..e031e98 100644 --- a/src/cli/data.ts +++ b/src/cli/data.ts @@ -45,7 +45,7 @@ export const data = new Command("data") ) .addOption( new Option( - "--component-path ", + "--component ", "Path to the component in the component tree defined in convex.config.ts.\n" + " By default, inspects data in the root component", // TODO(ENG-6967): Remove hideHelp before launching components @@ -67,7 +67,7 @@ export const data = new Command("data") await listDocuments(ctx, deploymentUrl, adminKey, tableName, { ...options, order: options.order as "asc" | "desc", - componentPath: options.componentPath ?? "", + componentPath: options.component ?? "", }); } else { await listTables( @@ -75,7 +75,7 @@ export const data = new Command("data") deploymentUrl, adminKey, deploymentName, - options.componentPath ?? "", + options.component ?? "", ); } }); diff --git a/src/cli/run.ts b/src/cli/run.ts index 128ea54..3e39a20 100644 --- a/src/cli/run.ts +++ b/src/cli/run.ts @@ -43,7 +43,7 @@ export const run = new Command("run") ) .addOption( new Option( - "--component-path ", + "--component ", "Path to the component in the component tree defined in convex.config.ts", // TODO(ENG-6967): Remove hideHelp before launching components ).hideHelp(), @@ -104,7 +104,7 @@ export const run = new Command("run") adminKey, functionName, args, - options.componentPath, + options.component, ); } return await runFunctionAndLog( @@ -113,6 +113,6 @@ export const run = new Command("run") adminKey, functionName, args, - options.componentPath, + options.component, ); });