Rename SKELETON_WIZARD_FOLDER -> QL_PACK_LOCATION

To make it clear what it's supposed to be storing.
This commit is contained in:
Elena Tanasoiu
2023-04-27 10:00:35 +00:00
parent 4e2b26f285
commit 9aeb520841
2 changed files with 10 additions and 10 deletions

View File

@@ -621,19 +621,19 @@ export function allowHttp(): boolean {
}
/**
* The name of the folder where we want to create skeleton wizard QL packs.
* The name of the folder where we want to create QL packs.
**/
const SKELETON_WIZARD_FOLDER = new Setting(
const QL_PACK_LOCATION = new Setting(
"qlPackLocation",
new Setting("createQuery", ROOT_SETTING),
);
export function getSkeletonWizardFolder(): string | undefined {
return SKELETON_WIZARD_FOLDER.getValue<string>() || undefined;
export function getQlPackLocation(): string | undefined {
return QL_PACK_LOCATION.getValue<string>() || undefined;
}
export async function setSkeletonWizardFolder(folder: string | undefined) {
await SKELETON_WIZARD_FOLDER.updateValue(folder, ConfigurationTarget.Global);
export async function setQlPackLocation(folder: string | undefined) {
await QL_PACK_LOCATION.updateValue(folder, ConfigurationTarget.Global);
}
/**

View File

@@ -18,9 +18,9 @@ import {
downloadGitHubDatabase,
} from "./databases/database-fetcher";
import {
getSkeletonWizardFolder,
getQlPackLocation,
isCodespacesTemplate,
setSkeletonWizardFolder,
setQlPackLocation,
} from "./config";
import { existsSync } from "fs-extra";
@@ -112,7 +112,7 @@ export class SkeletonQueryWizard {
return firstStorageFolder;
}
let storageFolder = getSkeletonWizardFolder();
let storageFolder = getQlPackLocation();
if (storageFolder === undefined || !existsSync(storageFolder)) {
storageFolder = await Window.showInputBox({
@@ -133,7 +133,7 @@ export class SkeletonQueryWizard {
);
}
await setSkeletonWizardFolder(storageFolder);
await setQlPackLocation(storageFolder);
return storageFolder;
}