create index.ts and adjust imports and exports
This commit is contained in:
@@ -4,7 +4,7 @@ import { AstViewer } from "./astViewer";
|
||||
import {
|
||||
TemplatePrintAstProvider,
|
||||
TemplatePrintCfgProvider,
|
||||
} from "./language-support/contextual/template-provider";
|
||||
} from "./language-support";
|
||||
import { AstCfgCommands } from "./common/commands";
|
||||
import { LocalQueries } from "./local-queries";
|
||||
|
||||
|
||||
@@ -39,15 +39,13 @@ import {
|
||||
install,
|
||||
spawnIdeServer,
|
||||
getQueryEditorCommands,
|
||||
} from "./language-support";
|
||||
import { DatabaseManager } from "./local-databases";
|
||||
import { DatabaseUI } from "./local-databases-ui";
|
||||
import {
|
||||
TemplatePrintAstProvider,
|
||||
TemplatePrintCfgProvider,
|
||||
TemplateQueryDefinitionProvider,
|
||||
TemplateQueryReferenceProvider,
|
||||
} from "./language-support/contextual/template-provider";
|
||||
} from "./language-support";
|
||||
import { DatabaseManager } from "./local-databases";
|
||||
import { DatabaseUI } from "./local-databases-ui";
|
||||
import {
|
||||
DEFAULT_DISTRIBUTION_VERSION_RANGE,
|
||||
DistributionKind,
|
||||
|
||||
@@ -6,15 +6,15 @@ import {
|
||||
} from "../../pure/bqrs-cli-types";
|
||||
import { DatabaseItem } from "../../local-databases";
|
||||
import { ChildAstItem, AstItem } from "../../astViewer";
|
||||
import fileRangeFromURI from "./file-range-from-uri";
|
||||
import { Uri } from "vscode";
|
||||
import { QueryOutputDir } from "../../run-queries-shared";
|
||||
import { fileRangeFromURI } from ".";
|
||||
|
||||
/**
|
||||
* A class that wraps a tree of QL results from a query that
|
||||
* has an @kind of graph
|
||||
*/
|
||||
export default class AstBuilder {
|
||||
export class AstBuilder {
|
||||
private roots: AstItem[] | undefined;
|
||||
private bqrsPath: string;
|
||||
constructor(
|
||||
|
||||
@@ -4,7 +4,7 @@ import { UrlValue, LineColumnLocation } from "../../pure/bqrs-cli-types";
|
||||
import { isEmptyPath } from "../../pure/bqrs-utils";
|
||||
import { DatabaseItem } from "../../local-databases";
|
||||
|
||||
export default function fileRangeFromURI(
|
||||
export function fileRangeFromURI(
|
||||
uri: UrlValue | undefined,
|
||||
db: DatabaseItem,
|
||||
): vscode.Location | undefined {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from "./ast-builder";
|
||||
export * from "./file-range-from-uri";
|
||||
export * from "./key-type";
|
||||
export * from "./location-finder";
|
||||
export * from "./query-resolver";
|
||||
export * from "./template-provider";
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
} from "../../pure/bqrs-cli-types";
|
||||
import { CodeQLCliServer } from "../../cli";
|
||||
import { DatabaseManager, DatabaseItem } from "../../local-databases";
|
||||
import fileRangeFromURI from "./file-range-from-uri";
|
||||
import { ProgressCallback } from "../../progress";
|
||||
import { KeyType } from "./key-type";
|
||||
import {
|
||||
@@ -22,6 +21,7 @@ import { CancellationToken, LocationLink, Uri } from "vscode";
|
||||
import { QueryOutputDir } from "../../run-queries-shared";
|
||||
import { QueryRunner } from "../../query-server";
|
||||
import { QueryResultType } from "../../pure/new-messages";
|
||||
import { fileRangeFromURI } from ".";
|
||||
|
||||
export const SELECT_QUERY_NAME = "#select";
|
||||
export const TEMPLATE_NAME = "selectedSourceFile";
|
||||
|
||||
@@ -19,7 +19,6 @@ import { CodeQLCliServer } from "../../cli";
|
||||
import { DatabaseManager } from "../../local-databases";
|
||||
import { CachedOperation } from "../../helpers";
|
||||
import { ProgressCallback, withProgress } from "../../progress";
|
||||
import AstBuilder from "./ast-builder";
|
||||
import { KeyType } from "./key-type";
|
||||
import {
|
||||
FullLocationLink,
|
||||
@@ -33,6 +32,7 @@ import {
|
||||
} from "./query-resolver";
|
||||
import { isCanary, NO_CACHE_AST_VIEWER } from "../../config";
|
||||
import { CoreCompletedQuery, QueryRunner } from "../../query-server";
|
||||
import { AstBuilder } from ".";
|
||||
|
||||
/**
|
||||
* Runs templated CodeQL queries to find definitions in
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from "./contextual";
|
||||
export * from "./ide-server";
|
||||
export * from "./language-support";
|
||||
export * from "./query-editor";
|
||||
|
||||
@@ -24,7 +24,7 @@ import { ensureMetadataIsComplete, InitialQueryInfo } from "./query-results";
|
||||
import { isQuickQueryPath } from "./local-queries";
|
||||
import { nanoid } from "nanoid";
|
||||
import { CodeQLCliServer } from "./cli";
|
||||
import { SELECT_QUERY_NAME } from "./language-support/contextual/location-finder";
|
||||
import { SELECT_QUERY_NAME } from "./language-support";
|
||||
import { DatabaseManager } from "./local-databases";
|
||||
import { DecodedBqrsChunk, EntityValue } from "./pure/bqrs-cli-types";
|
||||
import { BaseLogger, extLogger } from "./common";
|
||||
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
CoreCompletedQuery,
|
||||
QueryRunner,
|
||||
} from "../../../src/query-server/query-runner";
|
||||
import { SELECT_QUERY_NAME } from "../../../src/language-support/contextual/location-finder";
|
||||
import { SELECT_QUERY_NAME } from "../../../src/language-support";
|
||||
import { LocalQueries } from "../../../src/local-queries";
|
||||
import { QueryResultType } from "../../../src/pure/new-messages";
|
||||
import { createVSCodeCommandManager } from "../../../src/common/vscode/commands";
|
||||
|
||||
@@ -9,8 +9,7 @@ import {
|
||||
getQlPackForDbscheme,
|
||||
languageToDbScheme,
|
||||
} from "../../../src/helpers";
|
||||
import { resolveQueries } from "../../../src/language-support/contextual/query-resolver";
|
||||
import { KeyType } from "../../../src/language-support/contextual/key-type";
|
||||
import { KeyType, resolveQueries } from "../../../src/language-support";
|
||||
import { faker } from "@faker-js/faker";
|
||||
import { getActivatedExtension } from "../global.helper";
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { readFileSync } from "fs-extra";
|
||||
|
||||
import AstBuilder from "../../../../../src/language-support/contextual/ast-builder";
|
||||
import { CodeQLCliServer } from "../../../../../src/cli";
|
||||
import { Uri } from "vscode";
|
||||
import { QueryOutputDir } from "../../../../../src/run-queries-shared";
|
||||
import { mockDatabaseItem, mockedObject } from "../../../utils/mocking.helpers";
|
||||
import path from "path";
|
||||
import { AstBuilder } from "../../../../../src/language-support";
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Uri, Range } from "vscode";
|
||||
|
||||
import fileRangeFromURI from "../../../../../src/language-support/contextual/file-range-from-uri";
|
||||
import { DatabaseItem } from "../../../../../src/local-databases";
|
||||
import {
|
||||
WholeFileLocation,
|
||||
LineColumnLocation,
|
||||
} from "../../../../../src/pure/bqrs-cli-types";
|
||||
import { mockDatabaseItem } from "../../../utils/mocking.helpers";
|
||||
import { fileRangeFromURI } from "../../../../../src/language-support";
|
||||
|
||||
describe("fileRangeFromURI", () => {
|
||||
it("should return undefined when value is not a file URI", () => {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { load } from "js-yaml";
|
||||
import * as fs from "fs-extra";
|
||||
|
||||
import { KeyType } from "../../../../../src/language-support/contextual/key-type";
|
||||
import { getErrorMessage } from "../../../../../src/pure/helpers-pure";
|
||||
|
||||
import * as helpers from "../../../../../src/helpers";
|
||||
import {
|
||||
KeyType,
|
||||
qlpackOfDatabase,
|
||||
resolveQueries,
|
||||
} from "../../../../../src/language-support/contextual/query-resolver";
|
||||
} from "../../../../../src/language-support";
|
||||
import { CodeQLCliServer } from "../../../../../src/cli";
|
||||
import { mockDatabaseItem, mockedObject } from "../../../utils/mocking.helpers";
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import * as config from "../../../src/config";
|
||||
import { tmpDir } from "../../../src/helpers";
|
||||
import { CodeQLCliServer } from "../../../src/cli";
|
||||
import { SELECT_QUERY_NAME } from "../../../src/language-support/contextual/location-finder";
|
||||
import { SELECT_QUERY_NAME } from "../../../src/language-support";
|
||||
import {
|
||||
QueryInProgress,
|
||||
compileQuery as compileQueryLegacy,
|
||||
|
||||
Reference in New Issue
Block a user