Skip to content

Commit

Permalink
utilise folder movement changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thewahome committed Oct 14, 2024
1 parent 9bda66f commit aea6eeb
Show file tree
Hide file tree
Showing 28 changed files with 51 additions and 604 deletions.
4 changes: 0 additions & 4 deletions vscode/microsoft-kiota/src/GeneratedOutputState.ts

This file was deleted.

6 changes: 0 additions & 6 deletions vscode/microsoft-kiota/src/apiManifest.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ import * as path from "path";
import * as vscode from "vscode";

import { API_MANIFEST_FILE, extensionId, treeViewFocusCommand, treeViewId } from "../../constants";
import { GenerationType, KiotaGenerationLanguage, KiotaPluginType } from "../../enums";
import { ExtensionSettings, getExtensionSettings } from "../../extensionSettings";
import { GeneratedOutputState } from "../../GeneratedOutputState";
import { getLanguageInformation, getLanguageInformationForDescription } from "../../getLanguageInformation";
import { setGenerationConfiguration } from "../../handlers/configurationHandler";
import { clearDeepLinkParams, getDeepLinkParams } from "../../handlers/deepLinkParamsHandler";
import { ConsumerOperation, generationLanguageToString, getLogEntriesForLevel, KiotaLogEntry, LogLevel } from "../../kiotaInterop";
import { DependenciesViewProvider } from "../../providers/dependenciesViewProvider";
import { OpenApiTreeProvider } from "../../providers/openApiTreeProvider";
import { GenerateState, generateSteps } from "../../steps";
import { GenerationType, KiotaGenerationLanguage, KiotaPluginType } from "../../types/enums";
import { ExtensionSettings, getExtensionSettings } from "../../types/extensionSettings";
import { GeneratedOutputState } from "../../types/GeneratedOutputState";
import { WorkspaceGenerationContext } from "../../types/WorkspaceGenerationContext";
import { getSanitizedString, getWorkspaceJsonDirectory, parseGenerationLanguage, parseGenerationType, parsePluginType, updateTreeViewIcons } from "../../util";
import { isDeeplinkEnabled, transformToGenerationConfig } from "../../utilities/deep-linking";
Expand All @@ -22,6 +21,7 @@ import { Command } from "../Command";
import { generateClient } from "./generateClient";
import { generatePlugin } from "./generatePlugin";
import { checkForSuccess, displayGenerationResults } from "./generation-util";
import { getLanguageInformation, getLanguageInformationForDescription } from "./getLanguageInformation";

export class GenerateClientCommand extends Command {
private _openApiTreeProvider: OpenApiTreeProvider;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import * as vscode from "vscode";
import * as rpc from "vscode-jsonrpc/node";
import { KiotaPluginType } from "../../enums";

import { connectToKiota, ConsumerOperation, GenerationConfiguration, KiotaLogEntry } from "../../kiotaInterop";
import { KiotaPluginType } from "../../types/enums";
import { getWorkspaceJsonDirectory } from "../../util";

export function generatePlugin(context: vscode.ExtensionContext,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { connectToKiota, LanguagesInformation } from "./kiotaInterop";
import * as rpc from "vscode-jsonrpc/node";
import * as vscode from "vscode";
import * as rpc from "vscode-jsonrpc/node";

import { connectToKiota, LanguagesInformation } from "../../kiotaInterop";

let _languageInformation: LanguagesInformation | undefined; // doesn't change over the lifecycle of the extension
export async function getLanguageInformation(context: vscode.ExtensionContext): Promise<LanguagesInformation | undefined> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { connectToKiota, KiotaLogEntry, LogLevel } from "./kiotaInterop";
import * as rpc from "vscode-jsonrpc/node";
import * as vscode from "vscode";
import { KIOTA_LOCK_FILE } from "./constants";
import { getWorkspaceJsonPath, handleMigration } from "./util";
import * as rpc from "vscode-jsonrpc/node";

import { KIOTA_LOCK_FILE } from "../../constants";
import { connectToKiota, KiotaLogEntry, LogLevel } from "../../kiotaInterop";
import { getWorkspaceJsonPath, handleMigration } from "../../util";

export function migrateFromLockFile(context: vscode.ExtensionContext, lockFileDirectory: string): Promise<KiotaLogEntry[] | undefined> {
return connectToKiota(context, async (connection) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as vscode from "vscode";
import { ExtensionContext, Uri, workspace } from "vscode";

import { extensionId } from "../constants";
import { Command } from "./Command";
import { handleMigration } from "../util";
import { extensionId } from "../../constants";
import { handleMigration } from "../../util";
import { Command } from "../Command";

export class MigrateFromLockFileCommand extends Command {
private _context: ExtensionContext;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as rpc from "vscode-jsonrpc/node";
import * as vscode from "vscode";

import { KiotaSearchResultItem, connectToKiota, KiotaSearchResult } from "../../../kiotaInterop";
import { KiotaSearchResultItem, connectToKiota, KiotaSearchResult } from "../../kiotaInterop";

export function searchDescription(context: vscode.ExtensionContext, searchTerm: string, clearCache: boolean): Promise<Record<string, KiotaSearchResultItem> | undefined> {
return connectToKiota<Record<string, KiotaSearchResultItem>>(context, async (connection) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import TelemetryReporter from "@vscode/extension-telemetry";
import * as vscode from "vscode";

import { extensionId, treeViewId } from "../../../constants";
import { getExtensionSettings } from "../../../extensionSettings";
import { setDeepLinkParams } from "../../../handlers/deepLinkParamsHandler";
import { OpenApiTreeProvider } from "../../../providers/openApiTreeProvider";
import { searchSteps } from "../../../steps";
import { IntegrationParams, validateDeepLinkQueryParams } from "../../../utilities/deep-linking";
import { Command } from "../../Command";
import { extensionId, treeViewId } from "../../constants";
import { setDeepLinkParams } from "../../handlers/deepLinkParamsHandler";
import { OpenApiTreeProvider } from "../../providers/openApiTreeProvider";
import { searchSteps } from "../../steps";
import { getExtensionSettings } from "../../types/extensionSettings";
import { IntegrationParams, validateDeepLinkQueryParams } from "../../utilities/deep-linking";
import { openTreeViewWithProgress } from "../../utilities/progress";
import { Command } from "../Command";
import { searchDescription } from "./searchDescription";
import { openTreeViewWithProgress } from "../../../utilities/progress";

export class SearchOrOpenApiDescriptionCommand extends Command {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import * as vscode from "vscode";
import { ExtensionContext } from "vscode";

import { extensionId } from "../../constants";
import { KiotaGenerationLanguage, KiotaPluginType } from "../../enums";
import { ExtensionSettings } from "../../extensionSettings";
import { generateClient } from "../../generateClient";
import { generatePlugin } from "../generate/generatePlugin";
import { ClientObjectProperties, ClientOrPluginProperties, ConsumerOperation, getLogEntriesForLevel, LogLevel, PluginObjectProperties } from "../../kiotaInterop";
import { OpenApiTreeProvider } from "../../providers/openApiTreeProvider";
import { KiotaGenerationLanguage, KiotaPluginType } from "../../types/enums";
import { ExtensionSettings } from "../../types/extensionSettings";
import { parseGenerationLanguage, parsePluginType } from "../../util";
import { exportLogsAndShowErrors } from "../../utilities/logging";
import { generateClient } from "../generate/generateClient";
import { generatePlugin } from "../generate/generatePlugin";
import { checkForSuccess } from "../generate/generation-util";

export class RegenerateService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import * as vscode from "vscode";
import { ExtensionContext } from "vscode";

import { extensionId, treeViewId } from "../../constants";
import { getExtensionSettings } from "../../extensionSettings";
import { getGenerationConfiguration, setGenerationConfiguration } from "../../handlers/configurationHandler";
import { OpenApiTreeProvider } from "../../providers/openApiTreeProvider";
import { getExtensionSettings } from "../../types/extensionSettings";
import { WorkspaceGenerationContext } from "../../types/WorkspaceGenerationContext";
import { isClientType, isPluginType } from "../../util";
import { confirmOverride } from "../../utilities/regeneration";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as vscode from "vscode";
import { ExtensionContext } from "vscode";

import { extensionId, KIOTA_WORKSPACE_FILE } from "../../constants";
import { getExtensionSettings } from "../../extensionSettings";
import { OpenApiTreeProvider } from "../../providers/openApiTreeProvider";
import { getExtensionSettings } from "../../types/extensionSettings";
import { WorkspaceGenerationContext } from "../../types/WorkspaceGenerationContext";
import { isClientType, isPluginType } from "../../util";
import { confirmOverride } from "../../utilities/regeneration";
Expand Down
38 changes: 0 additions & 38 deletions vscode/microsoft-kiota/src/enums.ts

This file was deleted.

24 changes: 12 additions & 12 deletions vscode/microsoft-kiota/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,32 @@ import { CloseDescriptionCommand } from './commands/closeDescriptionCommand';
import { EditPathsCommand } from './commands/editPathsCommand';
import { GenerateClientCommand } from './commands/generate/generateClientCommand';
import { displayGenerationResults } from './commands/generate/generation-util';
import { MigrateFromLockFileCommand } from './commands/migrateFromLockFileCommand';
import { AddAllToSelectedEndpointsCommand } from './commands/open-api-tree-view/addAllToSelectedEndpointsCommand';
import { AddToSelectedEndpointsCommand } from './commands/open-api-tree-view/addToSelectedEndpointsCommand';
import { FilterDescriptionCommand } from './commands/open-api-tree-view/filterDescriptionCommand';
import { OpenDocumentationPageCommand } from './commands/open-api-tree-view/openDocumentationPageCommand';
import { RemoveAllFromSelectedEndpointsCommand } from './commands/open-api-tree-view/removeAllFromSelectedEndpointsCommand';
import { RemoveFromSelectedEndpointsCommand } from './commands/open-api-tree-view/removeFromSelectedEndpointsCommand';
import { SearchOrOpenApiDescriptionCommand } from './commands/open-api-tree-view/search-or-open-api-description/searchOrOpenApiDescriptionCommand';
import { checkForLockFileAndPrompt } from "./commands/migrate/migrateFromLockFile";
import { MigrateFromLockFileCommand } from './commands/migrate/migrateFromLockFileCommand';
import { AddAllToSelectedEndpointsCommand } from './commands/openApiTreeView/addAllToSelectedEndpointsCommand';
import { AddToSelectedEndpointsCommand } from './commands/openApiTreeView/addToSelectedEndpointsCommand';
import { FilterDescriptionCommand } from './commands/openApiTreeView/filterDescriptionCommand';
import { OpenDocumentationPageCommand } from './commands/openApiTreeView/openDocumentationPageCommand';
import { RemoveAllFromSelectedEndpointsCommand } from './commands/openApiTreeView/removeAllFromSelectedEndpointsCommand';
import { RemoveFromSelectedEndpointsCommand } from './commands/openApiTreeView/removeFromSelectedEndpointsCommand';
import { SearchOrOpenApiDescriptionCommand } from './commands/openApidescription/searchOrOpenApiDescriptionCommand';
import { RegenerateButtonCommand } from './commands/regenerate/regenerateButtonCommand';
import { RegenerateCommand } from './commands/regenerate/regenerateCommand';
import { SelectLockCommand } from './commands/selectLockCommand';
import { StatusCommand } from './commands/statusCommand';
import { API_MANIFEST_FILE, dependenciesInfo, extensionId, statusBarCommandId, treeViewId } from "./constants";
import { getExtensionSettings } from "./extensionSettings";
import { GeneratedOutputState } from './GeneratedOutputState';
import { getKiotaVersion } from "./getKiotaVersion";
import { getGenerationConfiguration } from './handlers/configurationHandler';
import { UriHandler } from './handlers/uriHandler';
import {
ClientOrPluginProperties
} from "./kiotaInterop";
import { checkForLockFileAndPrompt } from "./migrateFromLockFile";
import { getKiotaVersion } from './kiotaInterop/getKiotaVersion';
import { CodeLensProvider } from './providers/codelensProvider';
import { DependenciesViewProvider } from "./providers/dependenciesViewProvider";
import { OpenApiTreeNode, OpenApiTreeProvider } from "./providers/openApiTreeProvider";
import { loadTreeView } from './providers/workspaceTreeProvider';
import { getExtensionSettings } from "./types/extensionSettings";
import { GeneratedOutputState } from './types/GeneratedOutputState';
import { WorkspaceGenerationContext } from "./types/WorkspaceGenerationContext";
import { updateClients } from "./updateClients";
import { IntegrationParams } from './utilities/deep-linking';
Expand Down
53 changes: 0 additions & 53 deletions vscode/microsoft-kiota/src/extensionSettings.ts

This file was deleted.

20 changes: 0 additions & 20 deletions vscode/microsoft-kiota/src/getKiotaVersion.ts

This file was deleted.

Loading

0 comments on commit aea6eeb

Please sign in to comment.