Skip to content

Commit b75809a

Browse files
committed
more changes
1 parent 562fad5 commit b75809a

File tree

10 files changed

+147
-175
lines changed

10 files changed

+147
-175
lines changed

package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,12 @@
496496
},
497497
{
498498
"command": "azureFunctions.convertLocalConnections",
499-
"when": "view == azureWorkspace && viewItem =~ /(azFuncLocalProject|applicationSettingItem.*localSettings)/i",
499+
"when": "view == azureWorkspace && viewItem =~ /(azFuncLocalProject.*convert|applicationSettingItem.*localSettings)/i",
500500
"group": "1@3"
501501
},
502502
{
503503
"command": "azureFunctions.convertRemoteConnections",
504-
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /azFunc(ProductionSlot|Flex)/i",
504+
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /applicationSettingItem.*azFunc/i",
505505
"group": "1@4"
506506
},
507507
{
@@ -1366,7 +1366,7 @@
13661366
"@azure/storage-blob": "^12.5.0",
13671367
"@microsoft/vscode-azext-azureappservice": "^3.3.1",
13681368
"@microsoft/vscode-azext-azureappsettings": "file:../vscode-azuretools/appsettings/microsoft-vscode-azext-azureappsettings-0.2.2.tgz",
1369-
"@microsoft/vscode-azext-azureutils": "file:../vscode-azuretools/azure/microsoft-vscode-azext-azureutils-3.1.2.tgz",
1369+
"@microsoft/vscode-azext-azureutils": "file:../vscode-azuretools/azure/microsoft-vscode-azext-azureutils-3.1.4.tgz",
13701370
"@microsoft/vscode-azext-serviceconnector": "^0.1.3",
13711371
"@microsoft/vscode-azext-utils": "^2.5.7",
13721372
"@microsoft/vscode-azureresources-api": "^2.0.4",

src/LocalResourceProvider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ export class FunctionsLocalResourceProvider implements WorkspaceResourceProvider
1818

1919
public async provideResources(parent: AzExtParentTreeItem): Promise<AzExtTreeItem[] | null | undefined> {
2020
const children: AzExtTreeItem[] = [];
21-
2221
Disposable.from(...this._projectDisposables).dispose();
2322
this._projectDisposables = [];
2423

2524
const localProjects = await listLocalProjects();
2625
let hasLocalProject = false;
2726

2827
for (const project of localProjects.initializedProjects) {
29-
const treeItem: LocalProjectTreeItem = new LocalProjectTreeItem(parent, project as LocalProjectInternal);
28+
const treeItem: LocalProjectTreeItem = await LocalProjectTreeItem.createLocalProjectTreeItem(parent, project as LocalProjectInternal);
3029
this._projectDisposables.push(treeItem);
3130
children.push(treeItem);
3231
}

src/commands/appSettings/localSettings/LocalSettingsClient.ts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,35 @@ import { type AppSettingsClientProvider, type IAppSettingsClient } from "@micros
88
import { AzExtFsExtra, callWithTelemetryAndErrorHandling, type IActionContext } from "@microsoft/vscode-azext-utils";
99
import * as vscode from 'vscode';
1010
import { type ILocalSettingsJson } from "../../../funcConfig/local.settings";
11-
import { type LocalProjectTreeItem } from "../../../tree/localProject/LocalProjectTreeItem";
1211
import { decryptLocalSettings } from "./decryptLocalSettings";
1312
import { encryptLocalSettings } from "./encryptLocalSettings";
1413
import { getLocalSettingsFileNoPrompt } from "./getLocalSettingsFile";
1514

1615
export class LocalSettingsClientProvider implements AppSettingsClientProvider {
17-
private _node: LocalProjectTreeItem;
18-
constructor(node: LocalProjectTreeItem) {
19-
this._node = node;
16+
private _workspaceFolder: vscode.WorkspaceFolder;
17+
constructor(workspaceFolder: vscode.WorkspaceFolder) {
18+
this._workspaceFolder = workspaceFolder;
2019
}
2120

2221
public async createClient(): Promise<IAppSettingsClient> {
23-
return new LocalSettingsClient(this._node);
22+
return new LocalSettingsClient(this._workspaceFolder);
2423
}
2524
}
2625

2726
export class LocalSettingsClient implements IAppSettingsClient {
2827
public fullName: string;
2928
public isLinux: boolean;
30-
private _node: LocalProjectTreeItem;
29+
private _workspaceFolder: vscode.WorkspaceFolder
3130

32-
constructor(node: LocalProjectTreeItem) {
31+
constructor(workspaceFolder: vscode.WorkspaceFolder) {
3332
this.isLinux = false;
3433
this.fullName = 'local';
35-
this._node = node;
34+
this._workspaceFolder = workspaceFolder;
3635
}
3736

3837
public async listApplicationSettings(): Promise<StringDictionary> {
3938
const result = await callWithTelemetryAndErrorHandling<StringDictionary | undefined>('listApplicationSettings', async (context: IActionContext) => {
40-
const localSettingsPath: string | undefined = await getLocalSettingsFileNoPrompt(context, this._node.workspaceFolder);
39+
const localSettingsPath: string | undefined = await getLocalSettingsFileNoPrompt(context, this._workspaceFolder);
4140
if (localSettingsPath === undefined) {
4241
return { properties: {} };
4342
} else {

0 commit comments

Comments
 (0)