diff --git a/TELEMETRY.md b/TELEMETRY.md index 76126e523d6..2e2874faaa5 100644 --- a/TELEMETRY.md +++ b/TELEMETRY.md @@ -2736,7 +2736,7 @@ No properties for event [src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts) ```typescript -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; export function sendNotebookOrKernelLanguageTelemetry( telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, @@ -8622,7 +8622,7 @@ No description provided [src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts) ```typescript -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; export function sendNotebookOrKernelLanguageTelemetry( telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, @@ -9056,7 +9056,7 @@ No properties for event ## Locations Used -[src/telemetry/envFileTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/envFileTelemetry.node.ts) +[src/platform/telemetry/envFileTelemetry.node.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/envFileTelemetry.node.ts) ```typescript } @@ -9086,7 +9086,7 @@ No properties for event ## Locations Used -[src/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/startupTelemetry.ts) +[src/platform/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/startupTelemetry.ts) ```typescript await activatedPromise; durations.totalActivateTime = stopWatch.elapsedTime; @@ -9098,7 +9098,7 @@ No properties for event ``` -[src/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/startupTelemetry.ts) +[src/platform/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/startupTelemetry.ts) ```typescript traceError('getActivationTelemetryProps() failed.', ex); } @@ -9110,7 +9110,7 @@ No properties for event ``` -[src/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/telemetry/startupTelemetry.ts) +[src/platform/telemetry/startupTelemetry.ts](https://github.com/microsoft/vscode-jupyter/tree/main/src/platform/telemetry/startupTelemetry.ts) ```typescript async function getActivationTelemetryProps( diff --git a/src/platform/common/application/commands.ts b/src/commands.ts similarity index 95% rename from src/platform/common/application/commands.ts rename to src/commands.ts index 1cd23831e59..e2998f3a711 100644 --- a/src/platform/common/application/commands.ts +++ b/src/commands.ts @@ -13,12 +13,12 @@ import { Uri, ViewColumn } from 'vscode'; -import { IShowDataViewerFromVariablePanel } from '../../messageTypes'; -import { Commands as DSCommands } from '../../../platform/common/constants'; -import { PythonEnvironment } from '../../pythonEnvironments/info'; -import { CommandSource } from '../../testing/common/constants'; -import { Channel } from './types'; -import { SelectJupyterUriCommandSource } from '../../../kernels/jupyter/serverSelector'; +import { IShowDataViewerFromVariablePanel } from './platform/messageTypes'; +import { Commands as DSCommands } from './platform/common/constants'; +import { PythonEnvironment } from './platform/pythonEnvironments/info'; +import { CommandSource } from './platform/testing/common/constants'; +import { Channel } from './platform/common/application/types'; +import { SelectJupyterUriCommandSource } from './kernels/jupyter/serverSelector'; export type CommandsWithoutArgs = keyof ICommandNameWithoutArgumentTypeMapping; diff --git a/src/extension.node.ts b/src/extension.node.ts index 6391e982c43..f0fabb804e1 100644 --- a/src/extension.node.ts +++ b/src/extension.node.ts @@ -63,7 +63,7 @@ import { import { createDeferred } from './platform/common/utils/async'; import { Common, OutputChannelNames } from './platform/common/utils/localize'; import { IServiceContainer, IServiceManager } from './platform/ioc/types'; -import { sendErrorTelemetry, sendStartupTelemetry } from './telemetry/startupTelemetry'; +import { sendErrorTelemetry, sendStartupTelemetry } from './platform/telemetry/startupTelemetry'; import { noop } from './platform/common/utils/misc'; import { PythonExtension } from './webviews/webview-side/common/constants'; import { registerTypes as registerPlatformTypes } from './platform/serviceRegistry.node'; @@ -71,7 +71,7 @@ import { registerTypes as registerKernelTypes } from './kernels/serviceRegistry. import { registerTypes as registerNotebookTypes } from './notebooks/serviceRegistry.node'; import { registerTypes as registerInteractiveTypes } from './interactive-window/serviceRegistry.node'; import { registerTypes as registerStandaloneTypes } from './standalone/serviceRegistry.node'; -import { registerTypes as registerTelemetryTypes } from './telemetry/serviceRegistry.node'; +import { registerTypes as registerTelemetryTypes } from './platform/telemetry/serviceRegistry.node'; import { registerTypes as registerIntellisenseTypes } from './intellisense/serviceRegistry.node'; import { registerTypes as registerWebviewTypes } from './webviews/extension-side/serviceRegistry.node'; import { IExtensionActivationManager } from './platform/activation/types'; @@ -80,7 +80,7 @@ import { getDisplayPath } from './platform/common/platform/fs-paths'; import { IFileSystemNode } from './platform/common/platform/types.node'; import { getJupyterOutputChannel } from './standalone/devTools/jupyterOutputChannel'; import { registerLogger, setLoggingLevel } from './platform/logging'; -import { setExtensionInstallTelemetryProperties } from './telemetry/extensionInstallTelemetry.node'; +import { setExtensionInstallTelemetryProperties } from './platform/telemetry/extensionInstallTelemetry.node'; import { Container } from 'inversify/lib/container/container'; import { ServiceContainer } from './platform/ioc/container'; import { ServiceManager } from './platform/ioc/serviceManager'; @@ -88,7 +88,7 @@ import { OutputChannelLogger } from './platform/logging/outputChannelLogger'; import { ConsoleLogger } from './platform/logging/consoleLogger'; import { FileLogger } from './platform/logging/fileLogger.node'; import { createWriteStream } from 'fs-extra'; -import { initializeGlobals as initializeTelemetryGlobals } from './telemetry/telemetry'; +import { initializeGlobals as initializeTelemetryGlobals } from './platform/telemetry/telemetry'; durations.codeLoadingTime = stopWatch.elapsedTime; diff --git a/src/extension.web.ts b/src/extension.web.ts index 1ceaa8dfcae..9903fa4376c 100644 --- a/src/extension.web.ts +++ b/src/extension.web.ts @@ -60,11 +60,11 @@ import { import { createDeferred } from './platform/common/utils/async'; import { Common, OutputChannelNames } from './platform/common/utils/localize'; import { IServiceContainer, IServiceManager } from './platform/ioc/types'; -import { sendErrorTelemetry, sendStartupTelemetry } from './telemetry/startupTelemetry'; +import { sendErrorTelemetry, sendStartupTelemetry } from './platform/telemetry/startupTelemetry'; import { noop } from './platform/common/utils/misc'; import { PythonExtension } from './webviews/webview-side/common/constants'; import { registerTypes as registerPlatformTypes } from './platform/serviceRegistry.web'; -import { registerTypes as registerTelemetryTypes } from './telemetry/serviceRegistry.web'; +import { registerTypes as registerTelemetryTypes } from './platform/telemetry/serviceRegistry.web'; import { registerTypes as registerKernelTypes } from './kernels/serviceRegistry.web'; import { registerTypes as registerNotebookTypes } from './notebooks/serviceRegistry.web'; import { registerTypes as registerInteractiveTypes } from './interactive-window/serviceRegistry.web'; @@ -81,7 +81,7 @@ import { ServiceContainer } from './platform/ioc/container'; import { ServiceManager } from './platform/ioc/serviceManager'; import { OutputChannelLogger } from './platform/logging/outputChannelLogger'; import { ConsoleLogger } from './platform/logging/consoleLogger'; -import { initializeGlobals as initializeTelemetryGlobals } from './telemetry/telemetry'; +import { initializeGlobals as initializeTelemetryGlobals } from './platform/telemetry/telemetry'; durations.codeLoadingTime = stopWatch.elapsedTime; diff --git a/src/interactive-window/commands/commandRegistry.ts b/src/interactive-window/commands/commandRegistry.ts index c3dccfe49ea..48d4ef7b815 100644 --- a/src/interactive-window/commands/commandRegistry.ts +++ b/src/interactive-window/commands/commandRegistry.ts @@ -6,7 +6,7 @@ import { inject, injectable, optional } from 'inversify'; import { CodeLens, ConfigurationTarget, env, Range, Uri, commands } from 'vscode'; import { IKernelProvider } from '../../kernels/types'; -import { ICommandNameArgumentTypeMapping } from '../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../commands'; import { IApplicationShell, ICommandManager, diff --git a/src/kernels/helpers.ts b/src/kernels/helpers.ts index 12c3354c10c..6092b20dcbe 100644 --- a/src/kernels/helpers.ts +++ b/src/kernels/helpers.ts @@ -27,7 +27,7 @@ import { getDisplayPath, getFilePath } from '../platform/common/platform/fs-path import { DataScience } from '../platform/common/utils/localize'; import { SysInfoReason } from '../platform/messageTypes'; import { getNormalizedInterpreterPath, getInterpreterHash } from '../platform/pythonEnvironments/info/interpreter'; -import { getTelemetrySafeVersion } from '../telemetry/helpers'; +import { getTelemetrySafeVersion } from '../platform/telemetry/helpers'; import { EnvironmentType, PythonEnvironment } from '../platform/pythonEnvironments/info'; import { fsPathToUri } from '../platform/vscode-path/utils'; import { deserializePythonEnvironment, serializePythonEnvironment } from '../platform/api/pythonApi'; diff --git a/src/kernels/installer/productInstaller.node.ts b/src/kernels/installer/productInstaller.node.ts index 60f75f0c39c..b8c3f0c9459 100644 --- a/src/kernels/installer/productInstaller.node.ts +++ b/src/kernels/installer/productInstaller.node.ts @@ -29,12 +29,12 @@ import { import { noop } from '../../platform/common/utils/misc'; import { IServiceContainer } from '../../platform/ioc/types'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { InterpreterPackages } from '../../telemetry/interpreterPackages.node'; +import { InterpreterPackages } from '../../platform/telemetry/interpreterPackages.node'; import { getInterpreterHash } from '../../platform/pythonEnvironments/info/interpreter'; import { STANDARD_OUTPUT_CHANNEL } from '../../platform/common/constants'; import { sleep } from '../../platform/common/utils/async'; import { trackPackageInstalledIntoInterpreter } from './productInstaller'; -import { IInterpreterPackages } from '../../telemetry/types'; +import { IInterpreterPackages } from '../../telemetry'; import { translateProductToModule } from './utils'; export async function isModulePresentInEnvironment(memento: Memento, product: Product, interpreter: PythonEnvironment) { diff --git a/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts b/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts index 023064a5dc6..97bcb491340 100644 --- a/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts +++ b/src/kernels/ipywidgets/baseIPyWidgetScriptManager.ts @@ -9,7 +9,7 @@ import { IDisposable } from '../../platform/common/types'; import { traceWarning } from '../../platform/logging'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; import { IKernel, isLocalConnection } from '../types'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import * as stripComments from 'strip-comments'; import { IIPyWidgetScriptManager } from './types'; import { StopWatch } from '../../platform/common/utils/stopWatch'; diff --git a/src/kernels/ipywidgets/commonMessageCoordinator.ts b/src/kernels/ipywidgets/commonMessageCoordinator.ts index 889a297ebce..6589df793d5 100644 --- a/src/kernels/ipywidgets/commonMessageCoordinator.ts +++ b/src/kernels/ipywidgets/commonMessageCoordinator.ts @@ -21,7 +21,7 @@ import { } from '../../platform/messageTypes'; import { IServiceContainer } from '../../platform/ioc/types'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { Commands } from '../../platform/common/constants'; import { IKernelProvider } from '../types'; import { IPyWidgetMessageDispatcherFactory } from './ipyWidgetMessageDispatcherFactory'; diff --git a/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts b/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts index aa6c307cbfa..6f85e542969 100644 --- a/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts +++ b/src/kernels/ipywidgets/ipyWidgetScriptSourceProvider.ts @@ -7,7 +7,7 @@ import '../../platform/common/extensions'; import { traceError, traceInfo } from '../../platform/logging'; import { WidgetCDNs, IConfigurationService, IHttpClient } from '../../platform/common/types'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { IKernel } from '../types'; import { ILocalResourceUriConverter, diff --git a/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts b/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts index ef89ffc7b3e..fd414d08ec4 100644 --- a/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts +++ b/src/kernels/ipywidgets/localIPyWidgetScriptManager.node.ts @@ -7,7 +7,7 @@ import { IFileSystemNode } from '../../platform/common/platform/types.node'; import { IExtensionContext } from '../../platform/common/types'; import { StopWatch } from '../../platform/common/utils/stopWatch'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { IKernel } from '../types'; import { BaseIPyWidgetScriptManager } from './baseIPyWidgetScriptManager'; import { IIPyWidgetScriptManager, INbExtensionsPathProvider } from './types'; diff --git a/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts b/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts index c76acb44b36..9e1c4c17b1f 100644 --- a/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts +++ b/src/kernels/jupyter/jupyterCellOutputMimeTypeTracker.node.ts @@ -12,7 +12,7 @@ import { disposeAllDisposables } from '../../platform/common/helpers'; import { IDisposableRegistry } from '../../platform/common/types'; import { isJupyterNotebook } from '../../platform/common/utils'; import { captureTelemetry, sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { createJupyterCellFromVSCNotebookCell } from '../execution/helpers'; // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const flatten = require('lodash/flatten') as typeof import('lodash/flatten'); diff --git a/src/kernels/kernelDependencyService.node.ts b/src/kernels/kernelDependencyService.node.ts index 421a1184cf3..4e08df90e60 100644 --- a/src/kernels/kernelDependencyService.node.ts +++ b/src/kernels/kernelDependencyService.node.ts @@ -21,7 +21,7 @@ import { DataScience, Common } from '../platform/common/utils/localize'; import { IServiceContainer } from '../platform/ioc/types'; import { EnvironmentType, PythonEnvironment } from '../platform/pythonEnvironments/info'; import { sendTelemetryEvent, Telemetry } from '../telemetry'; -import { getTelemetrySafeHashedString } from '../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../platform/telemetry/helpers'; import { isModulePresentInEnvironmentCache, trackPackageInstalledIntoInterpreter } from './installer/productInstaller'; import { ProductNames } from './installer/productNames'; import { IInstaller, Product, InstallerResponse } from './installer/types'; diff --git a/src/kernels/raw/finder/helper.ts b/src/kernels/raw/finder/helper.ts index 3a406c84614..42000ce22a0 100644 --- a/src/kernels/raw/finder/helper.ts +++ b/src/kernels/raw/finder/helper.ts @@ -3,7 +3,7 @@ import { Telemetry } from '../../../platform/common/constants'; import { sendTelemetryEvent } from '../../../telemetry'; -import { getTelemetrySafeLanguage } from '../../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../../platform/telemetry/helpers'; import { IJupyterKernelSpec } from '../../types'; const shellScripts = ['/bin/sh', '/bin/bash', '/bin/zsh']; diff --git a/src/kernels/telemetry/helper.ts b/src/kernels/telemetry/helper.ts index 39931ddf9eb..16ae7aa89e5 100644 --- a/src/kernels/telemetry/helper.ts +++ b/src/kernels/telemetry/helper.ts @@ -1,13 +1,13 @@ import { Resource } from '../../platform/common/types'; -import { WorkspaceInterpreterTracker } from '../../telemetry/workspaceInterpreterTracker'; +import { WorkspaceInterpreterTracker } from '../../platform/telemetry/workspaceInterpreterTracker'; import { PYTHON_LANGUAGE } from '../../platform/common/constants'; -import { InterpreterCountTracker } from '../../telemetry/interpreterCountTracker'; -import { getTelemetrySafeHashedString, getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { InterpreterCountTracker } from '../../platform/telemetry/interpreterCountTracker'; +import { getTelemetrySafeHashedString, getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; import { getNormalizedInterpreterPath } from '../../platform/pythonEnvironments/info/interpreter'; import { getResourceType } from '../../platform/common/utils'; import { getComparisonKey } from '../../platform/vscode-path/resources'; import { getFilePath } from '../../platform/common/platform/fs-paths'; -import { trackedInfo, pythonEnvironmentsByHash, updatePythonPackages } from '../../telemetry/telemetry'; +import { trackedInfo, pythonEnvironmentsByHash, updatePythonPackages } from '../../platform/telemetry/telemetry'; import { KernelConnectionMetadata } from '../types'; import { setSharedProperty } from '../../telemetry'; diff --git a/src/kernels/telemetry/sendKernelTelemetryEvent.ts b/src/kernels/telemetry/sendKernelTelemetryEvent.ts index ade145eb3f1..b7b46948cbc 100644 --- a/src/kernels/telemetry/sendKernelTelemetryEvent.ts +++ b/src/kernels/telemetry/sendKernelTelemetryEvent.ts @@ -1,8 +1,7 @@ import { Resource } from '../../platform/common/types'; -import { IEventNamePropertyMapping } from '../../telemetry/types'; import { Telemetry } from '../../platform/common/constants'; -import { setSharedProperty, sendTelemetryEvent, waitBeforeSending } from '../../telemetry'; -import { getContextualPropsForTelemetry } from '../../telemetry/telemetry'; +import { setSharedProperty, sendTelemetryEvent, waitBeforeSending, IEventNamePropertyMapping } from '../../telemetry'; +import { getContextualPropsForTelemetry } from '../../platform/telemetry/telemetry'; import { clearInterruptCounter, trackKernelResourceInformation } from './helper'; import { StopWatch } from '../../platform/common/utils/stopWatch'; import { populateTelemetryWithErrorInfo } from '../../platform/errors'; diff --git a/src/notebooks/controllers/notebookControllerManager.ts b/src/notebooks/controllers/notebookControllerManager.ts index 534748252b3..d04e16d6770 100644 --- a/src/notebooks/controllers/notebookControllerManager.ts +++ b/src/notebooks/controllers/notebookControllerManager.ts @@ -63,7 +63,7 @@ import { isPythonNotebook } from '../../kernels/helpers'; import { getNotebookMetadata, getResourceType } from '../../platform/common/utils'; -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; import { INotebookMetadata } from '@jupyterlab/nbformat'; import { ServerConnectionType } from '../../kernels/jupyter/launcher/serverConnectionType'; import { computeServerId } from '../../kernels/jupyter/jupyterUtils'; diff --git a/src/notebooks/telemetry/interpreterPackageTracker.ts b/src/notebooks/telemetry/interpreterPackageTracker.ts index 406270b7a4c..99760d044a2 100644 --- a/src/notebooks/telemetry/interpreterPackageTracker.ts +++ b/src/notebooks/telemetry/interpreterPackageTracker.ts @@ -12,7 +12,7 @@ import { INotebookControllerManager } from '../types'; import { IInstaller, Product } from '../../kernels/installer/types'; import { IVSCodeNotebookController } from '../controllers/types'; import { trackKernelResourceInformation } from '../../kernels/telemetry/helper'; -import { IInterpreterPackages } from '../../telemetry/types'; +import { IInterpreterPackages } from '../../telemetry'; @injectable() export class InterpreterPackageTracker implements IExtensionSingleActivationService { diff --git a/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts b/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts index 45824ef882d..03c0fcfc032 100644 --- a/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts +++ b/src/notebooks/telemetry/notebookOrKernelLanguageTelemetry.ts @@ -3,7 +3,7 @@ 'use strict'; import { sendTelemetryEvent, Telemetry } from '../../telemetry'; -import { getTelemetrySafeLanguage } from '../../telemetry/helpers'; +import { getTelemetrySafeLanguage } from '../../platform/telemetry/helpers'; export function sendNotebookOrKernelLanguageTelemetry( telemetryEvent: Telemetry.SwitchToExistingKernel | Telemetry.NotebookLanguage, diff --git a/src/platform/common/application/commandManager.ts b/src/platform/common/application/commandManager.ts index 4bc1e68d910..6f56ae8ab7f 100644 --- a/src/platform/common/application/commandManager.ts +++ b/src/platform/common/application/commandManager.ts @@ -7,7 +7,7 @@ import { injectable } from 'inversify'; import { commands, Disposable, TextEditor, TextEditorEdit } from 'vscode'; import { sendTelemetryEvent } from '../../../telemetry'; import { Telemetry } from '../constants'; -import { ICommandNameArgumentTypeMapping } from './commands'; +import { ICommandNameArgumentTypeMapping } from '../../../commands'; import { ICommandManager } from './types'; // This contains a list of commands to be ignored when sending telemetry in the command handler. diff --git a/src/platform/common/application/types.ts b/src/platform/common/application/types.ts index f1b79ea0882..9aed13ff3fa 100644 --- a/src/platform/common/application/types.ts +++ b/src/platform/common/application/types.ts @@ -72,7 +72,7 @@ import { } from 'vscode'; import { IAsyncDisposable, Resource } from '../types'; -import { ICommandNameArgumentTypeMapping } from './commands'; +import { ICommandNameArgumentTypeMapping } from '../../../commands'; /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ diff --git a/src/platform/common/experiments/service.ts b/src/platform/common/experiments/service.ts index 2af0022af3c..b0a876d2662 100644 --- a/src/platform/common/experiments/service.ts +++ b/src/platform/common/experiments/service.ts @@ -7,7 +7,7 @@ import { inject, injectable, named } from 'inversify'; import { Memento } from 'vscode'; import { getExperimentationService, IExperimentationService, TargetPopulation } from 'vscode-tas-client'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../telemetry/constants'; import { IApplicationEnvironment } from '../application/types'; import { JVSC_EXTENSION_ID, STANDARD_OUTPUT_CHANNEL } from '../constants'; import { traceVerbose } from '../../logging'; diff --git a/src/platform/common/platform/platformService.node.ts b/src/platform/common/platform/platformService.node.ts index 6c96dc3c970..889464f6db3 100644 --- a/src/platform/common/platform/platformService.node.ts +++ b/src/platform/common/platform/platformService.node.ts @@ -7,7 +7,7 @@ import * as os from 'os'; import { coerce, SemVer } from 'semver'; import { Uri } from 'vscode'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName, PlatformErrors } from '../../../telemetry/constants'; +import { EventName, PlatformErrors } from '../../telemetry/constants'; import { getOSType, OSType } from '../utils/platform'; import { parseVersion } from '../utils/version.node'; import { NON_WINDOWS_PATH_VARIABLE_NAME, WINDOWS_PATH_VARIABLE_NAME } from './constants.node'; diff --git a/src/platform/common/process/environmentActivationService.node.ts b/src/platform/common/process/environmentActivationService.node.ts index c301ec030ae..552411737cd 100644 --- a/src/platform/common/process/environmentActivationService.node.ts +++ b/src/platform/common/process/environmentActivationService.node.ts @@ -24,7 +24,7 @@ import { getDisplayPath } from '../platform/fs-paths'; import { IEnvironmentActivationService } from '../../interpreter/activation/types'; import { IInterpreterService } from '../../interpreter/contracts'; import { CurrentProcess } from './currentProcess.node'; -import { getTelemetrySafeHashedString } from '../../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; import { CondaService } from './condaService.node'; import { condaVersionSupportsLiveStreaming, createCondaEnv } from './pythonEnvironment.node'; import { printEnvVariablesToFile } from './internal/scripts/index.node'; diff --git a/src/platform/common/process/pythonExecutionFactory.node.ts b/src/platform/common/process/pythonExecutionFactory.node.ts index 27570ef3e91..9f5d32b7f56 100644 --- a/src/platform/common/process/pythonExecutionFactory.node.ts +++ b/src/platform/common/process/pythonExecutionFactory.node.ts @@ -6,7 +6,7 @@ import { IEnvironmentActivationService } from '../../interpreter/activation/type import { IServiceContainer } from '../../ioc/types'; import { EnvironmentType, PythonEnvironment } from '../../pythonEnvironments/info'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../telemetry/constants'; import { IWorkspaceService } from '../application/types'; import { ignoreLogging, traceDecoratorVerbose, traceError, traceInfo } from '../../logging'; import { getDisplayPath } from '../platform/fs-paths'; diff --git a/src/platform/common/serviceRegistry.node.ts b/src/platform/common/serviceRegistry.node.ts index 565925b7331..06e86dc96de 100644 --- a/src/platform/common/serviceRegistry.node.ts +++ b/src/platform/common/serviceRegistry.node.ts @@ -45,7 +45,7 @@ import { IsWindows } from './types'; import { IMultiStepInputFactory, MultiStepInputFactory } from './utils/multiStepInput'; -import { LanguageInitializer } from '../../telemetry/languageInitializer'; +import { LanguageInitializer } from '../telemetry/languageInitializer'; import { registerTypes as registerPlatformTypes } from './platform/serviceRegistry.node'; import { registerTypes as processRegisterTypes } from './process/serviceRegistry.node'; import { registerTypes as variableRegisterTypes } from './variables/serviceRegistry.node'; diff --git a/src/platform/common/types.ts b/src/platform/common/types.ts index d14b66569ba..ae2b937c9d1 100644 --- a/src/platform/common/types.ts +++ b/src/platform/common/types.ts @@ -5,7 +5,7 @@ import type * as nbformat from '@jupyterlab/nbformat'; import { ConfigurationTarget, Disposable, Event, Extension, ExtensionContext, OutputChannel, Uri, Range } from 'vscode'; import { PythonEnvironment } from '../pythonEnvironments/info'; -import { CommandsWithoutArgs } from './application/commands'; +import { CommandsWithoutArgs } from '../../commands'; import { ICommandManager } from './application/types'; import { Experiments } from './experiments/groups'; import { ISystemVariables } from './variables/types'; diff --git a/src/platform/common/variables/environment.node.ts b/src/platform/common/variables/environment.node.ts index 3d12c9a43ec..3630f0e75c5 100644 --- a/src/platform/common/variables/environment.node.ts +++ b/src/platform/common/variables/environment.node.ts @@ -4,7 +4,7 @@ import { inject, injectable } from 'inversify'; import * as path from '../../vscode-path/path'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../telemetry/constants'; import { traceError } from '../../logging'; import { isFileNotFoundError } from '../platform/errors'; import { IFileSystemNode } from '../platform/types.node'; diff --git a/src/platform/common/variables/environmentVariablesProvider.node.ts b/src/platform/common/variables/environmentVariablesProvider.node.ts index 593a7304e79..e69ef54160a 100644 --- a/src/platform/common/variables/environmentVariablesProvider.node.ts +++ b/src/platform/common/variables/environmentVariablesProvider.node.ts @@ -4,7 +4,7 @@ import { inject, injectable, optional } from 'inversify'; import * as path from '../../vscode-path/path'; import { ConfigurationChangeEvent, Disposable, Event, EventEmitter, FileSystemWatcher, Uri } from 'vscode'; import { TraceOptions } from '../../logging/types'; -import { sendFileCreationTelemetry } from '../../../telemetry/envFileTelemetry.node'; +import { sendFileCreationTelemetry } from '../../telemetry/envFileTelemetry.node'; import { IWorkspaceService } from '../application/types'; import { IDisposableRegistry } from '../types'; import { InMemoryCache } from '../utils/cacheUtils'; diff --git a/src/platform/errors/index.ts b/src/platform/errors/index.ts index 37c88acf836..7ccf2e417fb 100644 --- a/src/platform/errors/index.ts +++ b/src/platform/errors/index.ts @@ -3,7 +3,7 @@ import { FetchError } from 'node-fetch'; import * as stackTrace from 'stack-trace'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../telemetry/helpers'; import { getErrorTags } from './errors'; import { getLastFrameFromPythonTraceback } from './errorUtils'; import { getErrorCategory, TelemetryErrorProperties, BaseError, WrappedError } from './types'; diff --git a/src/telemetry/constants.ts b/src/platform/telemetry/constants.ts similarity index 100% rename from src/telemetry/constants.ts rename to src/platform/telemetry/constants.ts diff --git a/src/telemetry/envFileTelemetry.node.ts b/src/platform/telemetry/envFileTelemetry.node.ts similarity index 88% rename from src/telemetry/envFileTelemetry.node.ts rename to src/platform/telemetry/envFileTelemetry.node.ts index 1aaed720a1d..4861115518f 100644 --- a/src/telemetry/envFileTelemetry.node.ts +++ b/src/platform/telemetry/envFileTelemetry.node.ts @@ -3,12 +3,12 @@ 'use strict'; -import { IWorkspaceService } from '../platform/common/application/types'; -import { Resource } from '../platform/common/types'; -import { SystemVariables } from '../platform/common/variables/systemVariables.node'; +import { IWorkspaceService } from '../common/application/types'; +import { Resource } from '../common/types'; +import { SystemVariables } from '../common/variables/systemVariables.node'; import { sendTelemetryEvent } from '.'; -import { IFileSystemNode } from '../platform/common/platform/types.node'; +import { IFileSystemNode } from '../common/platform/types.node'; import { EventName } from './constants'; let _defaultEnvFileSetting: string | undefined; diff --git a/src/telemetry/extensionInstallTelemetry.node.ts b/src/platform/telemetry/extensionInstallTelemetry.node.ts similarity index 88% rename from src/telemetry/extensionInstallTelemetry.node.ts rename to src/platform/telemetry/extensionInstallTelemetry.node.ts index 073e5a9e871..b1453040459 100644 --- a/src/telemetry/extensionInstallTelemetry.node.ts +++ b/src/platform/telemetry/extensionInstallTelemetry.node.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as path from '../platform/vscode-path/path'; +import * as path from '../vscode-path/path'; import { setSharedProperty } from '.'; -import { IFileSystemNode } from '../platform/common/platform/types.node'; -import { EXTENSION_ROOT_DIR } from '../platform/constants.node'; +import { IFileSystemNode } from '../common/platform/types.node'; +import { EXTENSION_ROOT_DIR } from '../constants.node'; /** * Sets shared telemetry property about where the extension was installed from diff --git a/src/telemetry/helpers.ts b/src/platform/telemetry/helpers.ts similarity index 93% rename from src/telemetry/helpers.ts rename to src/platform/telemetry/helpers.ts index 76193aec607..f5fc6d5c586 100644 --- a/src/telemetry/helpers.ts +++ b/src/platform/telemetry/helpers.ts @@ -2,8 +2,8 @@ // Licensed under the MIT License. import * as hashjs from 'hash.js'; -import { KnownKernelLanguageAliases, VSCodeKnownNotebookLanguages } from '../platform/common/constants'; -import { traceError } from '../platform/logging'; +import { KnownKernelLanguageAliases, VSCodeKnownNotebookLanguages } from '../common/constants'; +import { traceError } from '../logging'; export function getTelemetrySafeLanguage(language: string = 'unknown') { language = (language || 'unknown').toLowerCase(); diff --git a/src/telemetry/index.ts b/src/platform/telemetry/index.ts similarity index 97% rename from src/telemetry/index.ts rename to src/platform/telemetry/index.ts index 156b9a2450f..cf3840855d3 100644 --- a/src/telemetry/index.ts +++ b/src/platform/telemetry/index.ts @@ -3,14 +3,14 @@ // eslint-disable-next-line import TelemetryReporter from '@vscode/extension-telemetry/lib/telemetryReporter'; -import { IWorkspaceService } from '../platform/common/application/types'; -import { AppinsightsKey, isTestExecution, isUnitTestExecution, JVSC_EXTENSION_ID } from '../platform/common/constants'; -import { traceError, traceEverything } from '../platform/logging'; -import { StopWatch } from '../platform/common/utils/stopWatch'; -import { noop } from '../platform/common/utils/misc'; +import { IWorkspaceService } from '../common/application/types'; +import { AppinsightsKey, isTestExecution, isUnitTestExecution, JVSC_EXTENSION_ID } from '../common/constants'; +import { traceError, traceEverything } from '../logging'; +import { StopWatch } from '../common/utils/stopWatch'; +import { noop } from '../common/utils/misc'; import { isPromise } from 'rxjs/internal-compatibility'; -import { populateTelemetryWithErrorInfo } from '../platform/errors'; -import { IEventNamePropertyMapping } from './types'; +import { populateTelemetryWithErrorInfo } from '../errors'; +import { IEventNamePropertyMapping } from '../../telemetry'; /** * TODO@rebornix @@ -22,7 +22,7 @@ export { NativeMouseCommandTelemetry, Telemetry, VSCodeNativeTelemetry -} from '../platform/common/constants'; +} from '../common/constants'; export const waitBeforeSending = 'waitBeforeSending'; /* eslint-disable @typescript-eslint/no-explicit-any */ diff --git a/src/telemetry/interpreterCountTracker.ts b/src/platform/telemetry/interpreterCountTracker.ts similarity index 84% rename from src/telemetry/interpreterCountTracker.ts rename to src/platform/telemetry/interpreterCountTracker.ts index 0bf267d1657..57b79c5cdb8 100644 --- a/src/telemetry/interpreterCountTracker.ts +++ b/src/platform/telemetry/interpreterCountTracker.ts @@ -1,12 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { IExtensionSingleActivationService } from '../platform/activation/types'; +import { IExtensionSingleActivationService } from '../activation/types'; import { inject, injectable } from 'inversify'; -import { IInterpreterService } from '../platform/interpreter/contracts'; -import { IPythonApiProvider, IPythonExtensionChecker } from '../platform/api/types'; -import { noop } from '../platform/common/utils/misc'; -import { IDisposableRegistry } from '../platform/common/types'; +import { IInterpreterService } from '../interpreter/contracts'; +import { IPythonApiProvider, IPythonExtensionChecker } from '../api/types'; +import { noop } from '../common/utils/misc'; +import { IDisposableRegistry } from '../common/types'; @injectable() export class InterpreterCountTracker implements IExtensionSingleActivationService { diff --git a/src/telemetry/interpreterPackages.node.ts b/src/platform/telemetry/interpreterPackages.node.ts similarity index 91% rename from src/telemetry/interpreterPackages.node.ts rename to src/platform/telemetry/interpreterPackages.node.ts index ea0d312221a..0be4a5f6473 100644 --- a/src/telemetry/interpreterPackages.node.ts +++ b/src/platform/telemetry/interpreterPackages.node.ts @@ -2,16 +2,16 @@ // Licensed under the MIT License. import { inject, injectable } from 'inversify'; -import { IPythonApiProvider, IPythonExtensionChecker } from '../platform/api/types'; -import { IPythonExecutionFactory } from '../platform/common/process/types.node'; -import { IDisposableRegistry, InterpreterUri } from '../platform/common/types'; -import { createDeferred, Deferred } from '../platform/common/utils/async'; -import { isResource, noop } from '../platform/common/utils/misc'; -import { IInterpreterService } from '../platform/interpreter/contracts'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { getComparisonKey } from '../platform/vscode-path/resources'; +import { IPythonApiProvider, IPythonExtensionChecker } from '../api/types'; +import { IPythonExecutionFactory } from '../common/process/types.node'; +import { IDisposableRegistry, InterpreterUri } from '../common/types'; +import { createDeferred, Deferred } from '../common/utils/async'; +import { isResource, noop } from '../common/utils/misc'; +import { IInterpreterService } from '../interpreter/contracts'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { getComparisonKey } from '../vscode-path/resources'; import { getTelemetrySafeHashedString, getTelemetrySafeVersion } from './helpers'; -import { IInterpreterPackages } from './types'; +import { IInterpreterPackages } from '../../telemetry'; const interestedPackages = new Set( [ diff --git a/src/telemetry/interpreterPackages.web.ts b/src/platform/telemetry/interpreterPackages.web.ts similarity index 80% rename from src/telemetry/interpreterPackages.web.ts rename to src/platform/telemetry/interpreterPackages.web.ts index e0a0b314574..1fcd4fdb555 100644 --- a/src/telemetry/interpreterPackages.web.ts +++ b/src/platform/telemetry/interpreterPackages.web.ts @@ -2,9 +2,9 @@ // Licensed under the MIT License. import { injectable } from 'inversify'; -import { InterpreterUri } from '../platform/common/types'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { IInterpreterPackages } from './types'; +import { InterpreterUri } from '../common/types'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { IInterpreterPackages } from '../../telemetry'; /** * Tracks packages in use for interpreters. In the web version this isn't implemented yet. diff --git a/src/telemetry/languageInitializer.ts b/src/platform/telemetry/languageInitializer.ts similarity index 78% rename from src/telemetry/languageInitializer.ts rename to src/platform/telemetry/languageInitializer.ts index 131c716210b..901bf404663 100644 --- a/src/telemetry/languageInitializer.ts +++ b/src/platform/telemetry/languageInitializer.ts @@ -3,9 +3,9 @@ import { injectable } from 'inversify'; import { languages } from 'vscode'; -import { IExtensionSingleActivationService } from '../platform/activation/types'; -import { VSCodeKnownNotebookLanguages } from '../platform/common/constants'; -import { noop } from '../platform/common/utils/misc'; +import { IExtensionSingleActivationService } from '../activation/types'; +import { VSCodeKnownNotebookLanguages } from '../common/constants'; +import { noop } from '../common/utils/misc'; /** * Initializes the list of known languages with whats registered in VS Code. diff --git a/src/telemetry/serviceRegistry.node.ts b/src/platform/telemetry/serviceRegistry.node.ts similarity index 84% rename from src/telemetry/serviceRegistry.node.ts rename to src/platform/telemetry/serviceRegistry.node.ts index 35402628fee..02aa4a97216 100644 --- a/src/telemetry/serviceRegistry.node.ts +++ b/src/platform/telemetry/serviceRegistry.node.ts @@ -3,12 +3,12 @@ 'use strict'; -import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../platform/activation/types'; -import { IServiceManager } from '../platform/ioc/types'; +import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../activation/types'; +import { IServiceManager } from '../ioc/types'; import { InterpreterCountTracker } from './interpreterCountTracker'; import { InterpreterPackages } from './interpreterPackages.node'; import { WorkspaceInterpreterTracker } from './workspaceInterpreterTracker'; -import { IInterpreterPackages } from './types'; +import { IInterpreterPackages } from '../../telemetry'; export function registerTypes(serviceManager: IServiceManager) { serviceManager.addSingleton(IInterpreterPackages, InterpreterPackages); diff --git a/src/telemetry/serviceRegistry.web.ts b/src/platform/telemetry/serviceRegistry.web.ts similarity index 84% rename from src/telemetry/serviceRegistry.web.ts rename to src/platform/telemetry/serviceRegistry.web.ts index 2d497c0c055..8a7d01241f0 100644 --- a/src/telemetry/serviceRegistry.web.ts +++ b/src/platform/telemetry/serviceRegistry.web.ts @@ -3,11 +3,11 @@ 'use strict'; -import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../platform/activation/types'; -import { IServiceManager } from '../platform/ioc/types'; +import { IExtensionSingleActivationService, IExtensionSyncActivationService } from '../activation/types'; +import { IServiceManager } from '../ioc/types'; import { InterpreterCountTracker } from './interpreterCountTracker'; import { WorkspaceInterpreterTracker } from './workspaceInterpreterTracker'; -import { IInterpreterPackages } from './types'; +import { IInterpreterPackages } from '../../telemetry'; import { InterpreterPackages } from './interpreterPackages.web'; export function registerTypes(serviceManager: IServiceManager) { diff --git a/src/telemetry/startupTelemetry.ts b/src/platform/telemetry/startupTelemetry.ts similarity index 88% rename from src/telemetry/startupTelemetry.ts rename to src/platform/telemetry/startupTelemetry.ts index 976b670d465..950224fb81c 100644 --- a/src/telemetry/startupTelemetry.ts +++ b/src/platform/telemetry/startupTelemetry.ts @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { IWorkspaceService } from '../platform/common/application/types'; -import { isTestExecution } from '../platform/common/constants'; -import { traceError } from '../platform/logging'; -import { IServiceContainer } from '../platform/ioc/types'; +import { IWorkspaceService } from '../common/application/types'; +import { isTestExecution } from '../common/constants'; +import { traceError } from '../logging'; +import { IServiceContainer } from '../ioc/types'; import { sendTelemetryEvent } from '.'; import { EventName } from './constants'; -import { IEventNamePropertyMapping } from './types'; +import { IEventNamePropertyMapping } from '../../telemetry'; interface IStopWatch { elapsedTime: number; diff --git a/src/telemetry/telemetry.ts b/src/platform/telemetry/telemetry.ts similarity index 92% rename from src/telemetry/telemetry.ts rename to src/platform/telemetry/telemetry.ts index c9b5aed5bfa..c9806057aba 100644 --- a/src/telemetry/telemetry.ts +++ b/src/platform/telemetry/telemetry.ts @@ -4,14 +4,14 @@ // eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { Uri } from 'vscode'; -import { Resource } from '../platform/common/types'; -import { IInterpreterPackages, ResourceSpecificTelemetryProperties } from './types'; +import { Resource } from '../common/types'; +import { IInterpreterPackages, ResourceSpecificTelemetryProperties } from '../../telemetry'; import { getTelemetrySafeHashedString } from './helpers'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { createDeferred } from '../platform/common/utils/async'; -import { getResourceType } from '../platform/common/utils'; -import { IServiceContainer } from '../platform/ioc/types'; -import { getComparisonKey } from '../platform/vscode-path/resources'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { createDeferred } from '../common/utils/async'; +import { getResourceType } from '../common/utils'; +import { IServiceContainer } from '../ioc/types'; +import { getComparisonKey } from '../vscode-path/resources'; type Context = { previouslySelectedKernelConnectionId: string; diff --git a/src/telemetry/workspaceInterpreterTracker.ts b/src/platform/telemetry/workspaceInterpreterTracker.ts similarity index 84% rename from src/telemetry/workspaceInterpreterTracker.ts rename to src/platform/telemetry/workspaceInterpreterTracker.ts index abb0a654a41..51bc0b75f02 100644 --- a/src/telemetry/workspaceInterpreterTracker.ts +++ b/src/platform/telemetry/workspaceInterpreterTracker.ts @@ -2,14 +2,14 @@ // Licensed under the MIT License. import { Uri } from 'vscode'; -import { IDisposableRegistry, IExtensions, Resource } from '../platform/common/types'; -import { PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { IExtensionSyncActivationService } from '../platform/activation/types'; -import { IWorkspaceService } from '../platform/common/application/types'; +import { IDisposableRegistry, IExtensions, Resource } from '../common/types'; +import { PythonEnvironment } from '../pythonEnvironments/info'; +import { IExtensionSyncActivationService } from '../activation/types'; +import { IWorkspaceService } from '../common/application/types'; import { inject, injectable } from 'inversify'; -import { IInterpreterService } from '../platform/interpreter/contracts'; -import { IPythonExtensionChecker } from '../platform/api/types'; -import { areInterpreterPathsSame } from '../platform/pythonEnvironments/info/interpreter'; +import { IInterpreterService } from '../interpreter/contracts'; +import { IPythonExtensionChecker } from '../api/types'; +import { areInterpreterPathsSame } from '../pythonEnvironments/info/interpreter'; @injectable() export class WorkspaceInterpreterTracker implements IExtensionSyncActivationService { diff --git a/src/platform/terminals/types.ts b/src/platform/terminals/types.ts index 9614d50bccc..ddd1be950ec 100644 --- a/src/platform/terminals/types.ts +++ b/src/platform/terminals/types.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { Terminal, TextEditor, Uri } from 'vscode'; -import { IEventNamePropertyMapping } from '../../telemetry/types'; +import { IEventNamePropertyMapping } from '../../telemetry'; import { Resource } from '../common/types'; export const ICodeExecutionService = Symbol('ICodeExecutionService'); diff --git a/src/platform/tools/telemetryGenerator.node.ts b/src/platform/tools/telemetryGenerator.node.ts index e1b0b243054..9aaee89386a 100644 --- a/src/platform/tools/telemetryGenerator.node.ts +++ b/src/platform/tools/telemetryGenerator.node.ts @@ -332,8 +332,8 @@ function generateDocumentation(fileNames: string[], options: ts.CompilerOptions) const refSourceFile = program?.getSourceFile(r.fileName); if (refSourceFile) { const refNode = findNode(refSourceFile, r.textSpan.start); - // See if this is the special 'types.ts' file that forces telemetry to be type safe - if (refNode && r.fileName.endsWith('src/telemetry/types.ts')) { + // See if this is the special 'telemetry.ts' file that forces telemetry to be type safe + if (refNode && r.fileName.endsWith('src/telemetry.ts')) { entries.push( generateTelemetryEntry( program!, diff --git a/src/standalone/activation/workspaceActivation.node.ts b/src/standalone/activation/workspaceActivation.node.ts index 6628d0ebdf9..eb6bbeaa144 100644 --- a/src/standalone/activation/workspaceActivation.node.ts +++ b/src/standalone/activation/workspaceActivation.node.ts @@ -1,6 +1,6 @@ import { inject, injectable } from 'inversify'; import { TextDocument } from 'vscode'; -import { sendActivationTelemetry } from '../../telemetry/envFileTelemetry.node'; +import { sendActivationTelemetry } from '../../platform/telemetry/envFileTelemetry.node'; import { IPythonExtensionChecker } from '../../platform/api/types'; import { IWorkspaceService, IActiveResourceService, IDocumentManager } from '../../platform/common/application/types'; import { PYTHON_LANGUAGE } from '../../platform/common/constants'; diff --git a/src/standalone/import-export/exportCommands.ts b/src/standalone/import-export/exportCommands.ts index 01efb3bf7c6..064110c3159 100644 --- a/src/standalone/import-export/exportCommands.ts +++ b/src/standalone/import-export/exportCommands.ts @@ -5,7 +5,7 @@ import { NotebookDocument, QuickPickItem, QuickPickOptions, Uri } from 'vscode'; import * as localize from '../../platform/common/utils/localize'; -import { ICommandNameArgumentTypeMapping } from '../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../commands'; import { IApplicationShell, ICommandManager, IVSCodeNotebook } from '../../platform/common/application/types'; import { traceInfo } from '../../platform/logging'; import { IDisposable } from '../../platform/common/types'; diff --git a/src/standalone/import-export/importTracker.node.ts b/src/standalone/import-export/importTracker.node.ts index 96c529ed0ef..fd8b66f39de 100644 --- a/src/standalone/import-export/importTracker.node.ts +++ b/src/standalone/import-export/importTracker.node.ts @@ -14,8 +14,8 @@ import '../../platform/common/extensions'; import { disposeAllDisposables } from '../../platform/common/helpers'; import { IDisposable, IDisposableRegistry } from '../../platform/common/types'; import { noop } from '../../platform/common/utils/misc'; -import { EventName } from '../../telemetry/constants'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { EventName } from '../../platform/telemetry/constants'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { getAssociatedJupyterNotebook, isJupyterNotebook, splitMultilineString } from '../../platform/common/utils'; /* diff --git a/src/telemetry/types.ts b/src/telemetry.ts similarity index 98% rename from src/telemetry/types.ts rename to src/telemetry.ts index bb7c26e06c3..2915a12e26e 100644 --- a/src/telemetry/types.ts +++ b/src/telemetry.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -import { InterpreterUri } from '../platform/common/types'; +import { InterpreterUri } from './platform/common/types'; import type { JSONObject } from '@lumino/coreutils'; // eslint-disable-next-line import { @@ -11,18 +11,20 @@ import { NativeMouseCommandTelemetry, Telemetry, VSCodeNativeTelemetry -} from '../platform/common/constants'; -import { CheckboxState, EventName, PlatformErrors, SliceOperationSource } from './constants'; -import { DebuggingTelemetry } from '../kernels/debugger/constants'; -import { EnvironmentType, PythonEnvironment } from '../platform/pythonEnvironments/info'; -import { TelemetryErrorProperties, ErrorCategory } from '../platform/errors/types'; -import { ExportFormat } from '../notebooks/export/types'; -import { InterruptResult, KernelConnectionMetadata, KernelInterpreterDependencyResponse } from '../kernels/types'; +} from './platform/common/constants'; +import { CheckboxState, EventName, PlatformErrors, SliceOperationSource } from './platform/telemetry/constants'; +import { DebuggingTelemetry } from './kernels/debugger/constants'; +import { EnvironmentType, PythonEnvironment } from './platform/pythonEnvironments/info'; +import { TelemetryErrorProperties, ErrorCategory } from './platform/errors/types'; +import { ExportFormat } from './notebooks/export/types'; +import { InterruptResult, KernelConnectionMetadata, KernelInterpreterDependencyResponse } from './kernels/types'; // eslint-disable-next-line -import { IExportedKernelService } from '../standalone/api/extension'; -import { PreferredKernelExactMatchReason } from '../notebooks/controllers/notebookControllerManager'; -import { SelectJupyterUriCommandSource } from '../kernels/jupyter/serverSelector'; -import { TerminalShellType } from '../platform/terminals/types'; +import { IExportedKernelService } from './standalone/api/extension'; +import { PreferredKernelExactMatchReason } from './notebooks/controllers/notebookControllerManager'; +import { SelectJupyterUriCommandSource } from './kernels/jupyter/serverSelector'; +import { TerminalShellType } from './platform/terminals/types'; + +export * from './platform/telemetry/index'; export type ResourceSpecificTelemetryProperties = Partial<{ resourceType: 'notebook' | 'interactive'; diff --git a/src/test/common/experiments/service.unit.test.ts b/src/test/common/experiments/service.unit.test.ts index b1b3bcb4ca6..8ecee21a7b9 100644 --- a/src/test/common/experiments/service.unit.test.ts +++ b/src/test/common/experiments/service.unit.test.ts @@ -13,8 +13,8 @@ import { WorkspaceService } from '../../../platform/common/application/workspace import { ConfigurationService } from '../../../platform/common/configuration/service.node'; import { ExperimentService } from '../../../platform/common/experiments/service'; import { IConfigurationService } from '../../../platform/common/types'; -import * as Telemetry from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import * as Telemetry from '../../../platform/telemetry/index'; +import { EventName } from '../../../platform/telemetry/constants'; import { JVSC_EXTENSION_ID_FOR_TESTS } from '../../constants.node'; import { MockOutputChannel } from '../../mockClasses'; import { MockMemento } from '../../mocks/mementos'; diff --git a/src/test/common/experiments/telemetry.unit.test.ts b/src/test/common/experiments/telemetry.unit.test.ts index 09fd241a851..05e878d8ec8 100644 --- a/src/test/common/experiments/telemetry.unit.test.ts +++ b/src/test/common/experiments/telemetry.unit.test.ts @@ -6,7 +6,7 @@ import { assert } from 'chai'; import * as sinon from 'sinon'; import { ExperimentationTelemetry } from '../../../platform/common/experiments/telemetry.node'; -import * as Telemetry from '../../../telemetry'; +import * as Telemetry from '../../../platform/telemetry/index'; suite('Experimentation telemetry', () => { const event = 'SomeEventName'; diff --git a/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts b/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts index ee04d2e8202..0c361a99b9f 100644 --- a/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts +++ b/src/test/datascience/ipywidgets/ipyWidgetScriptManager.vscode.common.test.ts @@ -20,7 +20,7 @@ import { PYTHON_LANGUAGE } from '../../../platform/common/constants'; import { traceInfo } from '../../../platform/logging'; import { IKernel, IKernelProvider, isLocalConnection } from '../../../kernels/types'; import { IIPyWidgetScriptManager, IIPyWidgetScriptManagerFactory } from '../../../kernels/ipywidgets/types'; -import { getTelemetrySafeHashedString } from '../../../telemetry/helpers'; +import { getTelemetrySafeHashedString } from '../../../platform/telemetry/helpers'; import { IFileSystem } from '../../../platform/common/platform/types'; import { IFileSystemNode } from '../../../platform/common/platform/types.node'; diff --git a/src/test/datascience/mockCommandManager.ts b/src/test/datascience/mockCommandManager.ts index 29730d0cdcd..6c9c481d867 100644 --- a/src/test/datascience/mockCommandManager.ts +++ b/src/test/datascience/mockCommandManager.ts @@ -3,7 +3,7 @@ 'use strict'; import { Disposable, TextEditor, TextEditorEdit } from 'vscode'; -import { ICommandNameArgumentTypeMapping } from '../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../commands'; import { ICommandManager } from '../../platform/common/application/types'; import { noop } from '../core'; diff --git a/src/test/kernels/installer/productPath.unit.test.ts b/src/test/kernels/installer/productPath.unit.test.ts index da730028a08..8343183a74c 100644 --- a/src/test/kernels/installer/productPath.unit.test.ts +++ b/src/test/kernels/installer/productPath.unit.test.ts @@ -10,7 +10,7 @@ import * as TypeMoq from 'typemoq'; import { Memento, Uri } from 'vscode'; import '../../../platform/common/extensions'; import { IConfigurationService, IOutputChannel } from '../../../platform/common/types'; -import { InterpreterPackages } from '../../../telemetry/interpreterPackages.node'; +import { InterpreterPackages } from '../../../platform/telemetry/interpreterPackages.node'; import { IServiceContainer } from '../../../platform/ioc/types'; import { ProductInstaller } from '../../../kernels/installer/productInstaller.node'; import { BaseProductPathsService } from '../../../kernels/installer/productPath.node'; diff --git a/src/test/telemetry/importTracker.unit.test.ts b/src/test/telemetry/importTracker.unit.test.ts index ad3589b08e8..6e610ab5c08 100644 --- a/src/test/telemetry/importTracker.unit.test.ts +++ b/src/test/telemetry/importTracker.unit.test.ts @@ -17,8 +17,8 @@ import { } from '../../platform/common/constants'; import { disposeAllDisposables } from '../../platform/common/helpers'; import { IDisposable } from '../../platform/common/types'; -import { EventName } from '../../telemetry/constants'; -import { getTelemetrySafeHashedString } from '../../telemetry/helpers'; +import { EventName } from '../../platform/telemetry/constants'; +import { getTelemetrySafeHashedString } from '../../platform/telemetry/helpers'; import { ImportTracker } from '../../standalone/import-export/importTracker.node'; import { createDocument } from '../datascience/editor-integration/helpers'; diff --git a/src/webviews/extension-side/dataviewer/dataViewer.ts b/src/webviews/extension-side/dataviewer/dataViewer.ts index 637038cbcf9..4f39a95cee5 100644 --- a/src/webviews/extension-side/dataviewer/dataViewer.ts +++ b/src/webviews/extension-side/dataviewer/dataViewer.ts @@ -20,7 +20,7 @@ import { IJupyterVariableDataProvider } from './types'; import { isValidSliceExpression, preselectedSliceExpression } from '../../webview-side/data-explorer/helpers'; -import { CheckboxState } from '../../../telemetry/constants'; +import { CheckboxState } from '../../../platform/telemetry/constants'; import { IKernel } from '../../../kernels/types'; import { IWebviewPanelProvider, diff --git a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts index 087bbfdf358..ac11b0646ea 100644 --- a/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts +++ b/src/webviews/extension-side/dataviewer/dataViewerCommandRegistry.ts @@ -9,7 +9,7 @@ import { DebugProtocol } from 'vscode-debugprotocol'; import { convertDebugProtocolVariableToIJupyterVariable } from '../../../kernels/variables/helpers'; import { IJupyterVariables } from '../../../kernels/variables/types'; import { IExtensionSingleActivationService } from '../../../platform/activation/types'; -import { ICommandNameArgumentTypeMapping } from '../../../platform/common/application/commands'; +import { ICommandNameArgumentTypeMapping } from '../../../commands'; import { IApplicationShell, ICommandManager, @@ -26,7 +26,7 @@ import { IInterpreterService } from '../../../platform/interpreter/contracts'; import { traceError, traceInfo } from '../../../platform/logging'; import { IShowDataViewerFromVariablePanel } from '../../../platform/messageTypes'; import { sendTelemetryEvent } from '../../../telemetry'; -import { EventName } from '../../../telemetry/constants'; +import { EventName } from '../../../platform/telemetry/constants'; import { PythonEnvironment } from '../../../standalone/api/extension'; import { IDataScienceErrorHandler } from '../../../kernels/errors/types'; import { DataViewerChecker } from './dataViewerChecker'; diff --git a/src/webviews/extension-side/dataviewer/types.ts b/src/webviews/extension-side/dataviewer/types.ts index de2b07e4012..4c0501ec928 100644 --- a/src/webviews/extension-side/dataviewer/types.ts +++ b/src/webviews/extension-side/dataviewer/types.ts @@ -8,7 +8,7 @@ import { IJupyterVariable } from '../../../kernels/variables/types'; import { IDisposable } from '../../../platform/common/types'; import { SharedMessages } from '../../../platform/messageTypes'; import { PythonEnvironment } from '../../../platform/pythonEnvironments/info'; -import { SliceOperationSource } from '../../../telemetry/constants'; +import { SliceOperationSource } from '../../../platform/telemetry/constants'; export const CellFetchAllLimit = 100000; export const CellFetchSizeFirst = 100000; diff --git a/src/webviews/webview-side/data-explorer/sliceControl.tsx b/src/webviews/webview-side/data-explorer/sliceControl.tsx index 14459cf0408..984b96236e7 100644 --- a/src/webviews/webview-side/data-explorer/sliceControl.tsx +++ b/src/webviews/webview-side/data-explorer/sliceControl.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import { Dropdown, IDropdownOption, ResponsiveMode } from '@fluentui/react'; import * as React from 'react'; -import { SliceOperationSource } from '../../../telemetry/constants'; +import { SliceOperationSource } from '../../../platform/telemetry/constants'; import { IGetSliceRequest } from '../../extension-side/dataviewer/types'; import { getLocString } from '../react-common/locReactSide'; import { measureText } from '../react-common/textMeasure';