Import methods instead of whole databaseFetcher object
This commit is contained in:
@@ -8,8 +8,8 @@ import { askForLanguage, isFolderAlreadyInWorkspace } from "./helpers";
|
||||
import { getErrorMessage } from "./pure/helpers-pure";
|
||||
import { QlPackGenerator } from "./qlpack-generator";
|
||||
import { DatabaseItem, DatabaseManager } from "./local-databases";
|
||||
import * as databaseFetcher from "./databaseFetcher";
|
||||
import { ProgressCallback, UserCancellationException } from "./progress";
|
||||
import { askForGitHubRepo, downloadGitHubDatabase } from "./databaseFetcher";
|
||||
|
||||
type QueryLanguagesToDatabaseMap = Record<string, string>;
|
||||
|
||||
@@ -214,16 +214,13 @@ export class SkeletonQueryWizard {
|
||||
});
|
||||
|
||||
const githubRepoNwo = QUERY_LANGUAGE_TO_DATABASE_REPO[this.language];
|
||||
const chosenRepo = await databaseFetcher.askForGitHubRepo(
|
||||
undefined,
|
||||
githubRepoNwo,
|
||||
);
|
||||
const chosenRepo = await askForGitHubRepo(undefined, githubRepoNwo);
|
||||
|
||||
if (!chosenRepo) {
|
||||
throw new UserCancellationException("No GitHub repository provided");
|
||||
}
|
||||
|
||||
await databaseFetcher.downloadGitHubDatabase(
|
||||
await downloadGitHubDatabase(
|
||||
chosenRepo,
|
||||
this.databaseManager,
|
||||
this.databaseStoragePath,
|
||||
|
||||
Reference in New Issue
Block a user