Merge branch 'main' into robertbrignull/move-pure-1

This commit is contained in:
Robert
2023-06-21 11:23:42 +01:00
80 changed files with 127 additions and 107 deletions

View File

@@ -4,7 +4,7 @@ import { join } from "path";
import { pathExists } from "fs-extra";
import { isCodespacesTemplate } from "./config";
import { showBinaryChoiceDialog } from "./common/vscode/dialog";
import { extLogger } from "./common";
import { extLogger } from "./common/logging/vscode";
/**
* Check if the current workspace is the CodeTour and open the workspace folder.

View File

@@ -1,6 +1,6 @@
import * as semver from "semver";
import { runCodeQlCliCommand } from "./cli";
import { Logger } from "../common";
import { Logger } from "../common/logging";
import { getErrorMessage } from "../common/helpers-pure";
/**

View File

@@ -24,7 +24,8 @@ import {
} from "../common/helpers-pure";
import { walkDirectory } from "../common/files";
import { QueryMetadata, SortDirection } from "../pure/interface-types";
import { BaseLogger, Logger, ProgressReporter } from "../common";
import { BaseLogger, Logger } from "../common/logging";
import { ProgressReporter } from "../common/logging/vscode";
import { CompilationMessage } from "../pure/legacy-messages";
import { sarifParser } from "../common/sarif-parser";
import { App } from "../common/app";

View File

@@ -6,7 +6,7 @@ import * as semver from "semver";
import { URL } from "url";
import { ExtensionContext, Event } from "vscode";
import { DistributionConfig } from "../config";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { getCodeQlCliVersion } from "./cli-version";
import {
ProgressCallback,

View File

@@ -2,7 +2,7 @@ import { CodeQLCliServer } from "./cli";
import { Uri, window } from "vscode";
import { isQueryLanguage, QueryLanguage } from "../common/query-language";
import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { UserCancellationException } from "../common/vscode/progress";
import { showAndLogErrorMessage } from "../common/logging";

View File

@@ -1,6 +1,6 @@
import { CodeQLCliServer } from "./cli";
import { QueryMetadata } from "../pure/interface-types";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
/**
* Gets metadata for a query, if it exists.

View File

@@ -1 +0,0 @@
export * from "./logging";

View File

@@ -2,5 +2,3 @@ export * from "./logger";
export * from "./notification-logger";
export * from "./notifications";
export * from "./tee-logger";
export * from "./vscode/loggers";
export * from "./vscode/output-channel-logger";

View File

@@ -0,0 +1,2 @@
export * from "./loggers";
export * from "./output-channel-logger";

View File

@@ -1,7 +1,7 @@
import { pathExists } from "fs-extra";
import * as unzipper from "unzipper";
import * as vscode from "vscode";
import { extLogger } from "..";
import { extLogger } from "../logging/vscode";
// All path operations in this file must be on paths *within* the zip
// archive.

View File

@@ -1,13 +1,17 @@
import { commands, Disposable } from "vscode";
import { CommandFunction, CommandManager } from "../../packages/commands";
import {
extLogger,
NotificationLogger,
showAndLogWarningMessage,
showAndLogExceptionWithTelemetry,
} from "../logging";
import { asError, getErrorMessage, getErrorStack } from "../helpers-pure";
import { redactableError } from "../errors";
import { extLogger } from "../logging/vscode";
import {
asError,
getErrorMessage,
getErrorStack,
} from "../../common/helpers-pure";
import { redactableError } from "../../common/errors";
import { UserCancellationException } from "./progress";
import { telemetryListener } from "./telemetry";
import { AppTelemetry } from "../telemetry";

View File

@@ -1,9 +1,14 @@
import { Uri, window } from "vscode";
import { AppCommandManager } from "../commands";
import { showBinaryChoiceDialog } from "./dialog";
import { redactableError } from "../errors";
import { asError, getErrorMessage, getErrorStack } from "../helpers-pure";
import { extLogger, showAndLogExceptionWithTelemetry } from "../logging";
import { redactableError } from "../../common/errors";
import {
asError,
getErrorMessage,
getErrorStack,
} from "../../common/helpers-pure";
import { showAndLogExceptionWithTelemetry } from "../logging";
import { extLogger } from "../logging/vscode";
import { telemetryListener } from "./telemetry";
export async function tryOpenExternalFile(

View File

@@ -9,7 +9,7 @@ import {
} from "vscode";
import { MultiFileSystemWatcher } from "./multi-file-system-watcher";
import { AppEventEmitter } from "../events";
import { extLogger } from "..";
import { extLogger } from "../logging/vscode";
import { lstat } from "fs-extra";
import { containsPath, isIOError } from "../files";
import {

View File

@@ -15,7 +15,7 @@ import {
isCanary,
} from "../../config";
import * as appInsights from "applicationinsights";
import { extLogger } from "../index";
import { extLogger } from "../logging/vscode";
import { UserCancellationException } from "./progress";
import { showBinaryChoiceWithUrlDialog } from "./dialog";
import { RedactableError } from "../errors";

View File

@@ -3,7 +3,8 @@ import { VSCodeCredentials } from "./authentication";
import { Disposable } from "../disposable-object";
import { App, AppMode, EnvironmentContext } from "../app";
import { AppEventEmitter } from "../events";
import { extLogger, NotificationLogger, queryServerLogger } from "../logging";
import { NotificationLogger } from "../logging";
import { extLogger, queryServerLogger } from "../logging/vscode";
import { Memento } from "../memento";
import { VSCodeAppEventEmitter } from "./events";
import { AppCommandManager, QueryServerCommandManager } from "../commands";

View File

@@ -5,8 +5,8 @@ import {
ToCompareViewMessage,
QueryCompareResult,
} from "../pure/interface-types";
import { extLogger, Logger } from "../common";
import { showAndLogExceptionWithTelemetry } from "../common/logging";
import { Logger, showAndLogExceptionWithTelemetry } from "../common/logging";
import { extLogger } from "../common/logging/vscode";
import { CodeQLCliServer } from "../codeql-cli/cli";
import { DatabaseManager } from "../databases/local-databases";
import { jumpToLocation } from "../databases/local-databases/locations";

View File

@@ -7,7 +7,7 @@ import {
ConfigurationTarget,
} from "vscode";
import { DistributionManager } from "./codeql-cli/distribution";
import { extLogger } from "./common";
import { extLogger } from "./common/logging/vscode";
import { ONE_DAY_IN_MS } from "./pure/time";
import {
FilterKey,

View File

@@ -3,8 +3,8 @@ import { dir } from "tmp-promise";
import { writeFile } from "fs-extra";
import { dump as dumpYaml } from "js-yaml";
import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";
import { extLogger, TeeLogger } from "../common";
import { showAndLogExceptionWithTelemetry } from "../common/logging";
import { extLogger } from "../common/logging/vscode";
import { showAndLogExceptionWithTelemetry, TeeLogger } from "../common/logging";
import { isQueryLanguage } from "../common/query-language";
import { CancellationToken } from "vscode";
import { CodeQLCliServer } from "../codeql-cli/cli";

View File

@@ -3,8 +3,8 @@ import { DatabaseItem } from "../databases/local-databases";
import { basename } from "path";
import { QueryRunner } from "../query-server";
import { CodeQLCliServer } from "../codeql-cli/cli";
import { extLogger, TeeLogger } from "../common";
import { showAndLogExceptionWithTelemetry } from "../common/logging";
import { showAndLogExceptionWithTelemetry, TeeLogger } from "../common/logging";
import { extLogger } from "../common/logging/vscode";
import { extensiblePredicateDefinitions } from "./predicates";
import { ProgressCallback } from "../common/vscode/progress";
import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";

View File

@@ -22,7 +22,7 @@ import {
reportStreamProgress,
ProgressCallback,
} from "../common/vscode/progress";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { getErrorMessage } from "../common/helpers-pure";
import {
getNwoFromGitHubUrl,

View File

@@ -1,6 +1,6 @@
import { window } from "vscode";
import { App } from "../common/app";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { DisposableObject } from "../common/disposable-object";
import { DbConfigStore } from "./config/db-config-store";
import { DbManager } from "./db-manager";

View File

@@ -1,6 +1,6 @@
import vscode, { ExtensionContext } from "vscode";
import { extLogger, Logger } from "../../common";
import { showAndLogExceptionWithTelemetry } from "../../common/logging";
import { Logger, showAndLogExceptionWithTelemetry } from "../../common/logging";
import { extLogger } from "../../common/logging/vscode";
import { DisposableObject } from "../../common/disposable-object";
import { App } from "../../common/app";
import { QueryRunner } from "../../query-server";

View File

@@ -12,7 +12,7 @@ import {
showAndLogInformationMessage,
showAndLogWarningMessage,
} from "../../common/logging";
import { extLogger } from "../../common";
import { extLogger } from "../../common/logging/vscode";
export class DatabaseResolver {
public static async resolveDatabaseContents(

View File

@@ -20,7 +20,7 @@ import {
tryGetResolvableLocation,
} from "../../common/bqrs-utils";
import { getErrorMessage } from "../../common/helpers-pure";
import { Logger } from "../../common";
import { Logger } from "../../common/logging";
import { DatabaseItem } from "./database-item";
import { DatabaseManager } from "./database-manager";

View File

@@ -5,7 +5,7 @@ import { load } from "js-yaml";
import { readFile } from "fs-extra";
import { getQlPackPath } from "../pure/ql";
import { CodeQLCliServer, QlpacksInfo } from "../codeql-cli/cli";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";
export interface QlPacksForLanguage {

View File

@@ -10,7 +10,7 @@ import { getQuickEvalContext, validateQueryPath } from "../run-queries-shared";
import * as CodeQLProtocol from "./debug-protocol";
import { getErrorMessage } from "../common/helpers-pure";
import { showAndLogErrorMessage } from "../common/logging";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
/**
* The CodeQL launch arguments, as specified in "launch.json".

View File

@@ -12,7 +12,8 @@ import {
import { DebugProtocol as Protocol } from "@vscode/debugprotocol";
import { Disposable } from "vscode";
import { CancellationTokenSource } from "vscode-jsonrpc";
import { BaseLogger, LogOptions, queryServerLogger } from "../common";
import { BaseLogger, LogOptions } from "../common/logging";
import { queryServerLogger } from "../common/logging/vscode";
import { QueryResultType } from "../pure/new-messages";
import { CoreQueryResults, CoreQueryRun, QueryRunner } from "../query-server";
import * as CodeQLProtocol from "./debug-protocol";

View File

@@ -75,17 +75,17 @@ import {
} from "./local-queries";
import {
BaseLogger,
extLogger,
ideServerLogger,
ProgressReporter,
queryServerLogger,
} from "./common";
import {
showAndLogExceptionWithTelemetry,
showAndLogErrorMessage,
showAndLogInformationMessage,
showAndLogWarningMessage,
} from "./common/logging";
import {
extLogger,
ideServerLogger,
ProgressReporter,
queryServerLogger,
} from "./common/logging/vscode";
import { QueryHistoryManager } from "./query-history/query-history-manager";
import { CompletedLocalQueryInfo } from "./query-results";
import {

View File

@@ -27,7 +27,7 @@ import { DisposableObject } from "../../common/disposable-object";
import { asError, getErrorMessage } from "../../common/helpers-pure";
import { redactableError } from "../../common/errors";
import { AstViewerCommands } from "../../common/commands";
import { extLogger } from "../../common";
import { extLogger } from "../../common/logging/vscode";
import { showAndLogExceptionWithTelemetry } from "../../common/logging";
import { telemetryListener } from "../../common/vscode/telemetry";

View File

@@ -17,8 +17,11 @@ import {
} from "./key-type";
import { CodeQLCliServer } from "../../codeql-cli/cli";
import { DatabaseItem } from "../../databases/local-databases";
import { extLogger, TeeLogger } from "../../common";
import { showAndLogExceptionWithTelemetry } from "../../common/logging";
import { extLogger } from "../../common/logging/vscode";
import {
showAndLogExceptionWithTelemetry,
TeeLogger,
} from "../../common/logging";
import { CancellationToken } from "vscode";
import { ProgressCallback } from "../../common/vscode/progress";
import { CoreCompletedQuery, QueryRunner } from "../../query-server";

View File

@@ -2,7 +2,7 @@ import { ProgressLocation, window } from "vscode";
import { StreamInfo } from "vscode-languageclient/node";
import { shouldDebugIdeServer, spawnServer } from "../codeql-cli/cli";
import { QueryServerConfig } from "../config";
import { ideServerLogger } from "../common";
import { ideServerLogger } from "../common/logging/vscode";
/**
* Managing the language server for CodeQL.

View File

@@ -5,7 +5,7 @@ import { basename, join } from "path";
import { getErrorMessage } from "../common/helpers-pure";
import { redactableError } from "../common/errors";
import { AppCommandManager, QueryEditorCommands } from "../common/commands";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { showAndLogExceptionWithTelemetry } from "../common/logging";
import { telemetryListener } from "../common/vscode/telemetry";

View File

@@ -12,7 +12,11 @@ import {
window,
workspace,
} from "vscode";
import { TeeLogger } from "../common";
import {
TeeLogger,
showAndLogErrorMessage,
showAndLogWarningMessage,
} from "../common/logging";
import { isCanary, MAX_QUERIES } from "../config";
import { gatherQlFiles } from "../common/files";
import { basename } from "path";
@@ -43,10 +47,6 @@ import { DisposableObject } from "../common/disposable-object";
import { SkeletonQueryWizard } from "../skeleton-query-wizard";
import { LocalQueryRun } from "./local-query-run";
import { createMultiSelectionCommand } from "../common/vscode/selection-commands";
import {
showAndLogErrorMessage,
showAndLogWarningMessage,
} from "../common/logging";
import { findLanguage } from "../codeql-cli/query-language";
interface DatabaseQuickPickItem extends QuickPickItem {

View File

@@ -1,5 +1,7 @@
import { BaseLogger, extLogger, Logger } from "../common";
import { extLogger } from "../common/logging/vscode";
import {
BaseLogger,
Logger,
showAndLogExceptionWithTelemetry,
showAndLogWarningMessage,
} from "../common/logging";

View File

@@ -40,8 +40,8 @@ import {
getDefaultResultSetName,
ParsedResultSets,
} from "../pure/interface-types";
import { extLogger, Logger } from "../common";
import { showAndLogExceptionWithTelemetry } from "../common/logging";
import { extLogger } from "../common/logging/vscode";
import { Logger, showAndLogExceptionWithTelemetry } from "../common/logging";
import {
CompletedQueryInfo,
interpretResultsSarif,

View File

@@ -7,7 +7,7 @@ import {
} from "./log-scanner";
import { PipelineInfo, SummarySymbols } from "./summary-parser";
import { readFile } from "fs-extra";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { QueryHistoryManager } from "../query-history/query-history-manager";
/**

View File

@@ -12,7 +12,7 @@ import {
workspace,
} from "vscode";
import { DisposableObject } from "../common/disposable-object";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { getErrorMessage } from "../common/helpers-pure";
import { SummaryLanguageSupportCommands } from "../common/commands";
import { App } from "../common/app";

View File

@@ -6,7 +6,7 @@ import {
UserCancellationException,
withProgress,
} from "../common/vscode/progress";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import {
showAndLogExceptionWithTelemetry,
showAndLogInformationMessage,

View File

@@ -1,5 +1,5 @@
import { CodeQLCliServer } from "../codeql-cli/cli";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { App } from "../common/app";
import { isCanary, showQueriesPanel } from "../config";
import { DisposableObject } from "../common/disposable-object";

View File

@@ -5,7 +5,7 @@ import { QueryLanguage, dbSchemeToLanguage } from "../common/query-language";
import { FALLBACK_QLPACK_FILENAME, QLPACK_FILENAMES } from "../pure/ql";
import { FilePathDiscovery } from "../common/vscode/file-path-discovery";
import { getErrorMessage } from "../common/helpers-pure";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { EOL } from "os";
import { containsPath } from "../common/files";
import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";

View File

@@ -12,7 +12,7 @@ import { DisposableObject } from "../common/disposable-object";
import { asError, getErrorMessage } from "../common/helpers-pure";
import { redactableError } from "../common/errors";
import { EvalLogViewerCommands } from "../common/commands";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { showAndLogExceptionWithTelemetry } from "../common/logging";
import { telemetryListener } from "../common/vscode/telemetry";

View File

@@ -2,7 +2,7 @@ import { pathExists, stat, remove, readFile } from "fs-extra";
import { EOL } from "os";
import { join } from "path";
import { Disposable, ExtensionContext } from "vscode";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { readDirFullPaths } from "../common/files";
import { QueryHistoryDirs } from "./query-history-dirs";
import { QueryHistoryManager } from "./query-history-manager";

View File

@@ -12,7 +12,7 @@ import { redactableError } from "../../common/errors";
import { QueryHistoryDto, QueryHistoryItemDto } from "./query-history-dto";
import { mapQueryHistoryToDomainModel } from "./query-history-dto-mapper";
import { mapQueryHistoryToDto } from "./query-history-domain-mapper";
import { extLogger } from "../../common";
import { extLogger } from "../../common/logging/vscode";
import { showAndLogExceptionWithTelemetry } from "../../common/logging";
import { telemetryListener } from "../../common/vscode/telemetry";

View File

@@ -1,7 +1,7 @@
import { CancellationToken } from "vscode";
import { CodeQLCliServer } from "../../codeql-cli/cli";
import { ProgressCallback } from "../../common/vscode/progress";
import { Logger } from "../../common";
import { Logger } from "../../common/logging";
import { DatabaseItem } from "../../databases/local-databases";
import {
Dataset,

View File

@@ -5,7 +5,8 @@ import { CancellationToken } from "vscode";
import { createMessageConnection, RequestType } from "vscode-jsonrpc/node";
import * as cli from "../../codeql-cli/cli";
import { QueryServerConfig } from "../../config";
import { Logger, ProgressReporter } from "../../common";
import { Logger } from "../../common/logging";
import { ProgressReporter } from "../../common/logging/vscode";
import {
completeQuery,
EvaluationResult,

View File

@@ -12,8 +12,9 @@ import {
import { tmpDir } from "../../tmp-dir";
import { ProgressCallback } from "../../common/vscode/progress";
import { QueryMetadata } from "../../pure/interface-types";
import { extLogger, Logger } from "../../common";
import { extLogger } from "../../common/logging/vscode";
import {
Logger,
showAndLogExceptionWithTelemetry,
showAndLogWarningMessage,
} from "../../common/logging";

View File

@@ -5,7 +5,7 @@ import {
ProgressCallback,
UserCancellationException,
} from "../../common/vscode/progress";
import { extLogger } from "../../common";
import { extLogger } from "../../common/logging/vscode";
import { showAndLogExceptionWithTelemetry } from "../../common/logging";
import * as messages from "../../pure/legacy-messages";
import * as qsClient from "./query-server-client";

View File

@@ -18,7 +18,7 @@ import { compileAndRunQueryAgainstDatabaseCore } from "./run-queries";
import * as vscode from "vscode";
import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";
import { CodeQLCliServer } from "../codeql-cli/cli";
import { Logger } from "../common";
import { Logger } from "../common/logging";
import { QueryOutputDir } from "../run-queries-shared";
export class NewQueryRunner extends QueryRunner {

View File

@@ -4,7 +4,7 @@ import { ProgressCallback } from "../common/vscode/progress";
import { DatabaseItem } from "../databases/local-databases";
import { QueryOutputDir } from "../run-queries-shared";
import { Position, QueryResultType } from "../pure/new-messages";
import { BaseLogger, Logger } from "../common";
import { BaseLogger, Logger } from "../common/logging";
import { basename, join } from "path";
import { nanoid } from "nanoid";

View File

@@ -5,7 +5,8 @@ import { CancellationToken } from "vscode";
import { createMessageConnection, RequestType } from "vscode-jsonrpc/node";
import * as cli from "../codeql-cli/cli";
import { QueryServerConfig } from "../config";
import { extLogger, Logger, ProgressReporter } from "../common";
import { Logger, showAndLogErrorMessage } from "../common/logging";
import { extLogger, ProgressReporter } from "../common/logging/vscode";
import {
progress,
ProgressMessage,
@@ -19,8 +20,6 @@ import {
import { ServerProcess } from "./server-process";
import { App } from "../common/app";
import { showAndLogErrorMessage } from "../common/logging";
type ServerOpts = {
logger: Logger;
contextStoragePath: string;

View File

@@ -4,7 +4,7 @@ import * as messages from "../pure/new-messages";
import { QueryOutputDir } from "../run-queries-shared";
import * as qsClient from "./query-server-client";
import { CoreQueryResults, CoreQueryTarget } from "./query-runner";
import { Logger } from "../common";
import { Logger } from "../common/logging";
/**
* run-queries.ts

View File

@@ -1,4 +1,4 @@
import { Logger } from "../common";
import { Logger } from "../common/logging";
import * as cp from "child_process";
import { Disposable } from "vscode";
import { MessageConnection } from "vscode-jsonrpc";

View File

@@ -12,7 +12,7 @@ import { MultiFileSystemWatcher } from "../common/vscode/multi-file-system-watch
import { CodeQLCliServer } from "../codeql-cli/cli";
import { pathExists } from "fs-extra";
import { FileTreeDirectory, FileTreeLeaf } from "../common/file-tree-nodes";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
/**
* Discovers all QL tests contained in the QL packs in a given workspace folder.

View File

@@ -17,7 +17,7 @@ import { QLTestDiscovery } from "./qltest-discovery";
import { Event, EventEmitter, CancellationTokenSource } from "vscode";
import { DisposableObject } from "../common/disposable-object";
import { CodeQLCliServer, TestCompleted } from "../codeql-cli/cli";
import { testLogger } from "../common";
import { testLogger } from "../common/logging/vscode";
import { TestRunner } from "./test-runner";
import {
FileTreeDirectory,

View File

@@ -19,7 +19,7 @@ import { DisposableObject } from "../common/disposable-object";
import { QLTestDiscovery } from "./qltest-discovery";
import { CodeQLCliServer } from "../codeql-cli/cli";
import { getErrorMessage } from "../common/helpers-pure";
import { BaseLogger, LogOptions } from "../common";
import { BaseLogger, LogOptions } from "../common/logging";
import { TestRunner } from "./test-runner";
import { TestManagerBase } from "./test-manager-base";
import { App } from "../common/app";

View File

@@ -5,8 +5,9 @@ import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";
import { asError, getErrorMessage } from "../common/helpers-pure";
import { redactableError } from "../common/errors";
import { access } from "fs-extra";
import { BaseLogger, extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import {
BaseLogger,
showAndLogExceptionWithTelemetry,
showAndLogWarningMessage,
} from "../common/logging";

View File

@@ -28,10 +28,10 @@ import { CodeQLCliServer } from "./codeql-cli/cli";
import { SELECT_QUERY_NAME } from "./language-support";
import { DatabaseManager } from "./databases/local-databases";
import { DecodedBqrsChunk, EntityValue } from "./common/bqrs-cli-types";
import { BaseLogger, extLogger } from "./common";
import { BaseLogger, showAndLogWarningMessage } from "./common/logging";
import { extLogger } from "./common/logging/vscode";
import { generateSummarySymbolsFile } from "./log-insights/summary-parser";
import { getErrorMessage } from "./common/helpers-pure";
import { showAndLogWarningMessage } from "./common/logging";
/**
* run-queries.ts

View File

@@ -1,7 +1,7 @@
import { join } from "path";
import { Uri, workspace, window as Window } from "vscode";
import { CodeQLCliServer } from "./codeql-cli/cli";
import { BaseLogger } from "./common";
import { BaseLogger } from "./common/logging";
import { Credentials } from "./common/authentication";
import { QueryLanguage } from "./common/query-language";
import {

View File

@@ -1,5 +1,5 @@
import { dirSync } from "tmp-promise";
import { extLogger } from "./common";
import { extLogger } from "./common/logging/vscode";
// Shared temporary folder for the extension.
export const tmpDir = dirSync({

View File

@@ -1,5 +1,5 @@
import { CodeQLCliServer } from "../codeql-cli/cli";
import { Logger } from "../common";
import { Logger } from "../common/logging";
import { transformBqrsResultSet } from "../common/bqrs-cli-types";
import { AnalysisRawResults } from "./shared/analysis-result";
import { MAX_RAW_RESULTS } from "./shared/result-limits";

View File

@@ -11,7 +11,7 @@ import {
} from "../pure/interface-types";
import { DataFlowPaths } from "./shared/data-flow-paths";
import { redactableError } from "../common/errors";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { showAndLogExceptionWithTelemetry } from "../common/logging";
export class DataFlowPathsView extends AbstractWebview<

View File

@@ -8,7 +8,7 @@ import {
withProgress,
} from "../common/vscode/progress";
import { showInformationMessageWithAction } from "../common/vscode/dialog";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import { createGist } from "./gh-api/gh-api-client";
import {
generateVariantAnalysisMarkdown,

View File

@@ -7,7 +7,7 @@ import { tmpDir } from "../tmp-dir";
import { getOnDiskWorkspaceFolders } from "../common/vscode/workspace-folders";
import { Credentials } from "../common/authentication";
import * as cli from "../codeql-cli/cli";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
import {
getActionBranch,
getRemoteControllerRepo,

View File

@@ -3,7 +3,7 @@ import { URLSearchParams } from "url";
import { SHOW_QUERY_TEXT_MSG } from "../query-history/query-history-manager";
import { VariantAnalysisManager } from "./variant-analysis-manager";
import { showAndLogWarningMessage } from "../common/logging";
import { extLogger } from "../common";
import { extLogger } from "../common/logging/vscode";
export const createVariantAnalysisContentProvider = (
variantAnalysisManager: VariantAnalysisManager,

View File

@@ -3,7 +3,7 @@ import fetch from "node-fetch";
import { EOL } from "os";
import { join } from "path";
import { Logger } from "../common";
import { Logger } from "../common/logging";
import { AnalysisAlert, AnalysisRawResults } from "./shared/analysis-result";
import { sarifParser } from "../common/sarif-parser";
import { extractAnalysisAlerts } from "./sarif-processing";

View File

@@ -8,7 +8,7 @@ import { testCredentialsWithStub } from "../factories/authentication";
import { Credentials } from "../../src/common/authentication";
import { AppCommandManager } from "../../src/common/commands";
import { createMockCommandManager } from "./commandsMock";
import { NotificationLogger } from "../../src/common";
import { NotificationLogger } from "../../src/common/logging";
import { AppTelemetry } from "../../src/common/telemetry";
import { createMockTelemetryReporter } from "./telemetryMock";

View File

@@ -1,4 +1,4 @@
import { NotificationLogger } from "../../src/common";
import { NotificationLogger } from "../../src/common/logging";
export function createMockLogger(): NotificationLogger {
return {

View File

@@ -1,12 +1,8 @@
import { readdirSync, readFileSync } from "fs-extra";
import { join } from "path";
import * as tmp from "tmp";
import {
BaseLogger,
Logger,
OutputChannelLogger,
TeeLogger,
} from "../../../src/common";
import { BaseLogger, Logger, TeeLogger } from "../../../src/common/logging";
import { OutputChannelLogger } from "../../../src/common/logging/vscode";
jest.setTimeout(999999);

View File

@@ -7,7 +7,7 @@ import {
window,
workspace,
} from "vscode";
import { extLogger } from "../../../../src/common";
import { extLogger } from "../../../../src/common/logging/vscode";
import * as ghApiClient from "../../../../src/variant-analysis/gh-api/gh-api-client";
import * as ghActionsApiClient from "../../../../src/variant-analysis/gh-api/gh-actions-api-client";
import * as fs from "fs-extra";

View File

@@ -1,4 +1,4 @@
import { extLogger } from "../../../../src/common";
import { extLogger } from "../../../../src/common/logging/vscode";
import * as fs from "fs-extra";
import { join, resolve } from "path";
import { Readable } from "stream";

View File

@@ -9,7 +9,10 @@ import * as cli from "../../../src/codeql-cli/cli";
import { CellValue } from "../../../src/common/bqrs-cli-types";
import { describeWithCodeQL } from "../cli";
import { QueryServerClient } from "../../../src/query-server/legacy/query-server-client";
import { extLogger, ProgressReporter } from "../../../src/common";
import {
extLogger,
ProgressReporter,
} from "../../../src/common/logging/vscode";
import { createMockApp } from "../../__mocks__/appMock";
import { getActivatedExtension } from "../global.helper";

View File

@@ -7,7 +7,10 @@ import * as cli from "../../../src/codeql-cli/cli";
import { CellValue } from "../../../src/common/bqrs-cli-types";
import { describeWithCodeQL } from "../cli";
import { QueryServerClient } from "../../../src/query-server/query-server-client";
import { extLogger, ProgressReporter } from "../../../src/common";
import {
extLogger,
ProgressReporter,
} from "../../../src/common/logging/vscode";
import { QueryResultType } from "../../../src/pure/new-messages";
import { ensureTestDatabase, getActivatedExtension } from "../global.helper";
import { createMockApp } from "../../__mocks__/appMock";

View File

@@ -11,7 +11,7 @@ import { getOnDiskWorkspaceFolders } from "../../../src/common/vscode/workspace-
import { KeyType, resolveQueries } from "../../../src/language-support";
import { faker } from "@faker-js/faker";
import { getActivatedExtension } from "../global.helper";
import { BaseLogger } from "../../../src/common";
import { BaseLogger } from "../../../src/common/logging";
import { getQlPackForDbscheme } from "../../../src/databases/qlpack";
import { dbSchemeToLanguage } from "../../../src/common/query-language";

View File

@@ -6,7 +6,7 @@ import {
import { mockedObject, mockedQuickPickItem } from "../utils/mocking.helpers";
import * as tmp from "tmp";
import { TextDocument, window, workspace, WorkspaceFolder } from "vscode";
import { extLogger } from "../../../src/common";
import { extLogger } from "../../../src/common/logging/vscode";
import { QlPackGenerator } from "../../../src/qlpack-generator";
import * as workspaceFolders from "../../../src/common/vscode/workspace-folders";
import { createFileSync, ensureDirSync, removeSync } from "fs-extra";

View File

@@ -1,5 +1,5 @@
import { CancellationTokenSource, commands, Uri, window } from "vscode";
import { extLogger } from "../../../../src/common";
import { extLogger } from "../../../../src/common/logging/vscode";
import { setRemoteControllerRepo } from "../../../../src/config";
import * as ghApiClient from "../../../../src/variant-analysis/gh-api/gh-api-client";
import { join } from "path";

View File

@@ -11,7 +11,7 @@ import {
DatabaseResolver,
FullDatabaseOptions,
} from "../../../src/databases/local-databases";
import { Logger } from "../../../src/common";
import { Logger } from "../../../src/common/logging";
import { CodeQLCliServer, DbInfo } from "../../../src/codeql-cli/cli";
import {
encodeArchiveBasePath,

View File

@@ -2,7 +2,7 @@ import * as fetch from "node-fetch";
import { Range } from "semver";
import * as log from "../../../../src/common/logging/notifications";
import { extLogger } from "../../../../src/common";
import { extLogger } from "../../../../src/common/logging/vscode";
import * as fs from "fs-extra";
import * as path from "path";
import * as os from "os";

View File

@@ -1,7 +1,7 @@
import { join } from "path";
import * as vscode from "vscode";
import { extLogger } from "../../../../src/common";
import { extLogger } from "../../../../src/common/logging/vscode";
import { QueryHistoryConfigListener } from "../../../../src/config";
import { LocalQueryInfo } from "../../../../src/query-results";
import { DatabaseManager } from "../../../../src/databases/local-databases";

View File

@@ -1,7 +1,7 @@
import { join } from "path";
import * as vscode from "vscode";
import { extLogger } from "../../../../src/common";
import { extLogger } from "../../../../src/common/logging/vscode";
import { QueryHistoryManager } from "../../../../src/query-history/query-history-manager";
import { QueryHistoryConfigListener } from "../../../../src/config";
import { LocalQueryInfo } from "../../../../src/query-results";

View File

@@ -2,7 +2,7 @@ import { readdirSync, mkdirSync, writeFileSync } from "fs-extra";
import { join } from "path";
import * as vscode from "vscode";
import { extLogger } from "../../../../src/common";
import { extLogger } from "../../../../src/common/logging/vscode";
import { registerQueryHistoryScrubber } from "../../../../src/query-history/query-history-scrubber";
import { QueryHistoryManager } from "../../../../src/query-history/query-history-manager";
import { dirSync } from "tmp-promise";