mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-13 08:15:14 +02:00
feat(cli): redesign database scope picker for searchable schema-first setup (#203)
* feat: add searchable setup prompt pickers * fix: make snowflake scope discovery single query * fix: make bigquery table discovery schema scoped * fix: honor mysql and clickhouse database scope * feat: wire schema scope discovery for all relational setup drivers * feat: add schema-first database scope picker * test: update setup prompt stubs for type-check * docs: document database scope picker fields * Fix database setup edit preservation --------- Co-authored-by: Andrey Avtomonov <7889985+andreybavt@users.noreply.github.com>
This commit is contained in:
parent
fd2ba62d92
commit
c87d14a554
30 changed files with 1530 additions and 331 deletions
|
|
@ -71,6 +71,11 @@ export interface KtxSetupSourcesPromptAdapter {
|
|||
required?: boolean;
|
||||
}): Promise<string[]>;
|
||||
select(options: { message: string; options: KtxSetupPromptOption[] }): Promise<string>;
|
||||
autocomplete(options: {
|
||||
message: string;
|
||||
placeholder?: string;
|
||||
options: KtxSetupPromptOption[];
|
||||
}): Promise<string>;
|
||||
text(options: { message: string; placeholder?: string; initialValue?: string }): Promise<string | undefined>;
|
||||
password(options: { message: string }): Promise<string | undefined>;
|
||||
cancel(message: string): void;
|
||||
|
|
@ -931,8 +936,9 @@ async function chooseMetabaseDatabaseId(input: {
|
|||
return discovered[0].id;
|
||||
}
|
||||
if (discovered.length > 1) {
|
||||
const selected = await input.prompts.select({
|
||||
const selected = await input.prompts.autocomplete({
|
||||
message: 'Metabase database',
|
||||
placeholder: 'Type to search databases',
|
||||
options: [
|
||||
...discovered
|
||||
.slice()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue