Skip to content

Commit

Permalink
enhance(pods): configure import and export pods
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinslin committed Sep 14, 2020
1 parent 68c9069 commit 363285f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions packages/plugin-core/src/commands/ConfigurePodCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
getAllExportPods,
PodClassEntryV2,
podClassEntryToPodItem,
getAllImportPods,
} from "@dendronhq/pods-core";
import { Uri } from "vscode";
import { VSCodeUtils } from "../utils";
Expand All @@ -28,8 +29,11 @@ export class ConfigurePodCommand extends BasicCommand<
}

async gatherInputs(): Promise<CommandInput | undefined> {
const pods = getAllExportPods();
const podItems: PodItem[] = pods.map((p) => podClassEntryToPodItem(p));
const podsImport = getAllImportPods();
const podsExport = getAllExportPods();
const podItems: PodItem[] = podsExport
.map((p) => podClassEntryToPodItem(p))
.concat(podsImport.map((p) => podClassEntryToPodItem(p)));
const userPick = await showPodQuickPickItems(podItems);
if (!userPick) {
return;
Expand Down
4 changes: 2 additions & 2 deletions packages/pods-core/src/builtin/JSONPod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type ImportPodConfig = ImportConfig & {

export class JSONImportPod extends ImportPodBaseV2<ImportPodConfig> {
static id: string = ID;
static description: string = "import to json";
static description: string = "import json";

static config = (): PodConfigEntry[] => {
return [
Expand Down Expand Up @@ -97,7 +97,7 @@ export class JSONImportPod extends ImportPodBaseV2<ImportPodConfig> {
export class JSONExportPod extends ExportPodBaseV2
implements ExportPod<ExportConfig> {
static id: string = ID;
static description: string = "import from json";
static description: string = "export json";

static config = (): PodConfigEntry[] => {
return [
Expand Down

0 comments on commit 363285f

Please sign in to comment.