Merge pull request #2193 from github/nora/query-history-data-model

Move query-serialization
This commit is contained in:
Nora
2023-03-21 12:23:18 +01:00
committed by GitHub
3 changed files with 21 additions and 18 deletions

View File

@@ -48,7 +48,7 @@ import {
import {
deserializeQueryHistory,
serializeQueryHistory,
} from "../query-serialization";
} from "./store/query-history-store";
import { pathExists } from "fs-extra";
import { CliVersionConstraint } from "../cli";
import { HistoryItemLabelProvider } from "./history-item-label-provider";

View File

@@ -1,18 +1,18 @@
import { pathExists, readFile, remove, mkdir, writeFile } from "fs-extra";
import { dirname } from "path";
import { showAndLogExceptionWithTelemetry } from "./helpers";
import { showAndLogExceptionWithTelemetry } from "../../helpers";
import {
asError,
asyncFilter,
getErrorMessage,
getErrorStack,
} from "./pure/helpers-pure";
import { CompletedQueryInfo, LocalQueryInfo } from "./query-results";
import { QueryHistoryInfo } from "./query-history/query-history-info";
import { QueryEvaluationInfo } from "./run-queries-shared";
import { QueryResultType } from "./pure/legacy-messages";
import { redactableError } from "./pure/errors";
} from "../../pure/helpers-pure";
import { CompletedQueryInfo, LocalQueryInfo } from "../../query-results";
import { QueryHistoryInfo } from "../query-history-info";
import { QueryEvaluationInfo } from "../../run-queries-shared";
import { QueryResultType } from "../../pure/legacy-messages";
import { redactableError } from "../../pure/errors";
export async function deserializeQueryHistory(
fsPath: string,

View File

@@ -1,19 +1,22 @@
import {
deserializeQueryHistory,
serializeQueryHistory,
} from "../../../src/query-serialization";
} from "../../../../../src/query-history/store/query-history-store";
import { join } from "path";
import { writeFileSync, mkdirpSync, writeFile } from "fs-extra";
import { LocalQueryInfo, InitialQueryInfo } from "../../../src/query-results";
import { QueryWithResults } from "../../../src/run-queries-shared";
import { DatabaseInfo } from "../../../src/pure/interface-types";
import {
LocalQueryInfo,
InitialQueryInfo,
} from "../../../../../src/query-results";
import { QueryWithResults } from "../../../../../src/run-queries-shared";
import { DatabaseInfo } from "../../../../../src/pure/interface-types";
import { CancellationTokenSource, Uri } from "vscode";
import { tmpDir } from "../../../src/helpers";
import { QueryResultType } from "../../../src/pure/legacy-messages";
import { QueryInProgress } from "../../../src/legacy-query-server/run-queries";
import { VariantAnalysisHistoryItem } from "../../../src/query-history/variant-analysis-history-item";
import { QueryHistoryInfo } from "../../../src/query-history/query-history-info";
import { createMockVariantAnalysisHistoryItem } from "../../factories/query-history/variant-analysis-history-item";
import { tmpDir } from "../../../../../src/helpers";
import { QueryResultType } from "../../../../../src/pure/legacy-messages";
import { QueryInProgress } from "../../../../../src/legacy-query-server/run-queries";
import { VariantAnalysisHistoryItem } from "../../../../../src/query-history/variant-analysis-history-item";
import { QueryHistoryInfo } from "../../../../../src/query-history/query-history-info";
import { createMockVariantAnalysisHistoryItem } from "../../../../factories/query-history/variant-analysis-history-item";
import { nanoid } from "nanoid";
describe("serialize and deserialize", () => {