@@ -8,36 +8,35 @@ import { type AppSettingsClientProvider, type IAppSettingsClient } from "@micros
88import { AzExtFsExtra , callWithTelemetryAndErrorHandling , type IActionContext } from "@microsoft/vscode-azext-utils" ;
99import * as vscode from 'vscode' ;
1010import { type ILocalSettingsJson } from "../../../funcConfig/local.settings" ;
11- import { type LocalProjectTreeItem } from "../../../tree/localProject/LocalProjectTreeItem" ;
1211import { decryptLocalSettings } from "./decryptLocalSettings" ;
1312import { encryptLocalSettings } from "./encryptLocalSettings" ;
1413import { getLocalSettingsFileNoPrompt } from "./getLocalSettingsFile" ;
1514
1615export 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
2726export 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