Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 52 additions & 29 deletions src/vscode-bicep/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/vscode-bicep/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@
"@vscode/codicons": "^0.0.45",
"fs-extra": "^11.3.5",
"triple-beam": "^1.4.1",
"vscode-languageclient": "^9.0.1",
"vscode-languageclient": "^10.0.0",
"vscode-nls": "^5.2.0",
"winston": "^3.17.0",
"winston-transport": "^4.9.0"
Expand Down
12 changes: 10 additions & 2 deletions src/vscode-bicep/src/azure/azureClients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,24 @@
import { ManagementGroupsAPI } from "@azure/arm-managementgroups";
import { ResourceManagementClient } from "@azure/arm-resources";
import { SubscriptionClient } from "@azure/arm-resources-subscriptions";
import { TokenCredential } from "@azure/core-auth";
import {
AzExtClientContext,
createAzureClient,
createAzureSubscriptionClient,
parseClientContext,
} from "@microsoft/vscode-azext-azureutils";

// Lazy-load @azure packages to improve startup performance.

export async function createResourceManagementClient(context: AzExtClientContext): Promise<ResourceManagementClient> {
return createAzureClient(context, (await import("@azure/arm-resources")).ResourceManagementClient);
const parsedContext = parseClientContext(context);
return new ResourceManagementClient(
parsedContext.credentials as TokenCredential,
parsedContext.subscriptionId,
{
endpoint: parsedContext.environment.resourceManagerEndpointUrl,
},
);
}

export async function createSubscriptionClient(context: AzExtClientContext): Promise<SubscriptionClient> {
Expand Down
2 changes: 1 addition & 1 deletion src/vscode-bicep/src/language/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export async function createLanguageService(
enableRegistryContent: true,
},
progressOnInitialization: true,
outputChannel,
outputChannelName: outputChannel.name,
synchronize: {
configurationSection: "bicep",
fileEvents: [
Expand Down
2 changes: 1 addition & 1 deletion src/vscode-bicep/src/visualizer/viewManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class BicepVisualizerViewManager extends Disposable implements vscode.Web
super();

this.register(vscode.window.registerWebviewPanelSerializer(BicepVisualizerView.viewType, this));

const existingMiddleware = languageClient.clientOptions.middleware?.handleDiagnostics;

this.languageClient.clientOptions.middleware = {
Expand Down
4 changes: 2 additions & 2 deletions src/vscode-bicep/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"compilerOptions": {
"target": "es6",
"lib": ["dom", "dom.iterable", "es2020", "ES2021.String", "ES2022.Error"],
"module": "commonjs",
"moduleResolution": "node",
"module": "Node16",
"moduleResolution": "node16",
"esModuleInterop": true,
"outDir": "out",
"sourceMap": true,
Expand Down
2 changes: 1 addition & 1 deletion src/vscode-bicep/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const extensionConfig: webpack.Configuration = {
],
resolve: {
extensions: [".ts", ".js"],
conditionNames: ["import", "require"],
conditionNames: ["node", "import", "require", "..."],
},
};

Expand Down
Loading