Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.1
22.18
685 changes: 384 additions & 301 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@
"@types/fs-extra": "^11.0.4",
"@types/gulp": "^4.0.6",
"@types/mocha": "^7.0.2",
"@types/node": "18.19.x",
"@types/node": "22.18.x",
"@types/semver": "^7.3.12",
"@types/uuid": "^9.0.1",
"@types/vscode": "1.105.0",
Expand All @@ -938,7 +938,7 @@
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "^5.1.3",
"webpack": "^5.95.0",
"webpack": "^5.102.1",
"webpack-cli": "^4.6.0"
},
"dependencies": {
Expand All @@ -950,6 +950,8 @@
"buffer": "^6.0.3",
"form-data": "^4.0.4",
"fs-extra": "^11.3.0",
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.6",
"jsonc-parser": "^2.2.1",
"node-fetch": "^3.3.2",
"uuid": "^9.0.0",
Expand Down
12 changes: 6 additions & 6 deletions src/cloudConsole/cloudConsole.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TenantIdDescription } from '@azure/arm-resources-subscriptions';
import { AzureSubscriptionProvider, getConfiguredAzureEnv } from '@microsoft/vscode-azext-azureauth';
import { IActionContext, IAzureQuickPickItem, IParsedError, callWithTelemetryAndErrorHandlingSync, nonNullProp, parseError } from '@microsoft/vscode-azext-utils';
import * as cp from 'child_process';
import * as FormData from 'form-data';
import FormData from 'form-data';
import { ReadStream } from 'fs';
import { ClientRequest } from 'http';
import { Socket } from 'net';
Expand Down Expand Up @@ -594,15 +594,15 @@ export async function getUserSettings(accessToken: string): Promise<UserSettings
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
return (await response.json()).properties;
return (await response.json() as { properties?: UserSettings }).properties;
}

/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */
export async function provisionConsole(accessToken: string, userSettings: UserSettings, osType: string): Promise<string> {
let response = await createTerminal(accessToken, userSettings, osType, true);
for (let i = 0; i < 10; i++, response = await createTerminal(accessToken, userSettings, osType, false)) {
if (response.status < 200 || response.status > 299) {
const body = await response.json();
const body = await response.json() as { error?: { code?: string; message?: string } };
if (response.status === 409 && response.body && body.error && body.error.code === Errors.DeploymentOsTypeConflict) {
throw new Error(Errors.DeploymentOsTypeConflict);
} else if (body && body.error && body.error.message) {
Expand All @@ -612,7 +612,7 @@ export async function provisionConsole(accessToken: string, userSettings: UserSe
}
}

const consoleResource = await response.json();
const consoleResource = await response.json() as { properties: { provisioningState: string; uri: string } };
if (consoleResource.properties.provisioningState === 'Succeeded') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return consoleResource.properties.uri;
Expand Down Expand Up @@ -653,7 +653,7 @@ export async function resetConsole(accessToken: string, armEndpoint: string) {
});

/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */
const body = await response.json();
const body = await response.json() as { error?: { message?: string } };
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
if (response.status < 200 || response.status > 299) {
if (body && body.error && body.error.message) {
Expand All @@ -670,7 +670,7 @@ export async function connectTerminal(accessToken: string, consoleUri: string, s
/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */
const response = await initializeTerminal(accessToken, consoleUri, shellType, initialSize);

const body = await response.json();
const body = await response.json() as { id: string; socketUri: string, error?: { message?: string } };
if (response.status < 200 || response.status > 299) {
if (response.status !== 503 && response.status !== 504 && body && body.error) {
if (body && body.error && body.error.message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import * as http from 'http';
import { HttpProxyAgent } from 'http-proxy-agent';
import { HttpsProxyAgent } from 'https-proxy-agent';
import * as WS from 'ws';
import WS from 'ws';
import { readJSON } from './readJSON';

function delay<T = void>(ms: number, result?: T | PromiseLike<T>): Promise<T | PromiseLike<T> | undefined> {
Expand Down
4 changes: 3 additions & 1 deletion src/tree/wrapTreeForVSCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ class OnRefreshTreeDataProvider implements TreeDataProvider<TreeDataItem> {
return this.treeDataProvider.getChildren(element);
}

onDidChangeTreeData?: Event<void | TreeDataItem | TreeDataItem[] | null | TreeDataItem> = this.treeDataProvider.onDidChangeTreeData;
get onDidChangeTreeData(): Event<void | TreeDataItem | TreeDataItem[] | null | TreeDataItem> | undefined {
return this.treeDataProvider.onDidChangeTreeData;
}
}
2 changes: 1 addition & 1 deletion src/utils/logging/nodeFetch/nodeFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ext } from "../../../extensionVariables";
import { HttpLogger } from "../HttpLogger";
import { NodeFetchNormalizer } from "./NodeFetchNormalizer";

export async function fetchWithLogging(url: RequestInfo, init?: RequestInit): Promise<Response> {
export async function fetchWithLogging(url: string, init?: RequestInit): Promise<Response> {
const nodeFetchLogger = new HttpLogger(ext.outputChannel, 'NodeFetch', new NodeFetchNormalizer());
const request = new Request(url, init);
const response = await fetch(request);
Expand Down
4 changes: 2 additions & 2 deletions test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import * as glob from 'glob';
import * as Mocha from 'mocha';
import glob from 'glob';
import Mocha from 'mocha';
import * as path from 'path';

export async function run(): Promise<void> {
Expand Down
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"module": "nodenext",
"moduleResolution": "nodenext",
"target": "es2022",
"outDir": "out",
"lib": [
"es6",
"DOM"
"es2022"
],
"sourceMap": true,
"rootDir": ".",
Expand Down
Loading