Skip to content

Commit

Permalink
Change --component-path to --component in the CLI (#29945)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 328980b57004bd144a1c0b15c84c10eb69c5031f
  • Loading branch information
sujayakar authored and Convex, Inc. committed Sep 18, 2024
1 parent b999487 commit 4539827
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/cli/convexImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const convexImport = new Command("import")
)
.addOption(
new Option(
"--component-path <path>",
"--component <path>",
"Path to the component in the component tree defined in convex.config.ts",
// TODO(ENG-6967): Remove hideHelp before launching components
).hideHelp(),
Expand Down Expand Up @@ -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,
};
Expand Down
6 changes: 3 additions & 3 deletions src/cli/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const data = new Command("data")
)
.addOption(
new Option(
"--component-path <path>",
"--component <path>",
"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
Expand All @@ -67,15 +67,15 @@ 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(
ctx,
deploymentUrl,
adminKey,
deploymentName,
options.componentPath ?? "",
options.component ?? "",
);
}
});
Expand Down
6 changes: 3 additions & 3 deletions src/cli/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const run = new Command("run")
)
.addOption(
new Option(
"--component-path <path>",
"--component <path>",
"Path to the component in the component tree defined in convex.config.ts",
// TODO(ENG-6967): Remove hideHelp before launching components
).hideHelp(),
Expand Down Expand Up @@ -104,7 +104,7 @@ export const run = new Command("run")
adminKey,
functionName,
args,
options.componentPath,
options.component,
);
}
return await runFunctionAndLog(
Expand All @@ -113,6 +113,6 @@ export const run = new Command("run")
adminKey,
functionName,
args,
options.componentPath,
options.component,
);
});

0 comments on commit 4539827

Please sign in to comment.