Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b8f19e5
initial commit
motm32 Jan 29, 2025
6979c6e
Add changes
motm32 Feb 24, 2025
f8f10e3
merge main
motm32 Feb 24, 2025
562fad5
add ability to right click from nodes
motm32 Feb 26, 2025
b75809a
more changes
motm32 Feb 28, 2025
5e423da
small changes
motm32 Feb 28, 2025
df7712c
small changes
motm32 Mar 5, 2025
453f0af
add in clientId and credential
motm32 Mar 7, 2025
4387565
don't delete settings
motm32 Mar 10, 2025
2d13d56
requested changes
motm32 Mar 12, 2025
4373847
update appsettings and small changes
motm32 Mar 12, 2025
64cee3d
change warning message
motm32 Mar 13, 2025
3c126a7
remove managed identity step from local
motm32 Mar 13, 2025
2e432f7
fix
motm32 Mar 14, 2025
1d9d860
changed to appSettings package
motm32 Mar 17, 2025
7164e58
add app setting changes
motm32 Mar 18, 2025
af3704b
fix right click on node
motm32 Mar 18, 2025
842b462
requested changes
motm32 Mar 20, 2025
099a0f4
merge main
motm32 Mar 20, 2025
b5250a9
more changes
motm32 Mar 20, 2025
a7520fd
small changes
motm32 Mar 24, 2025
098b932
merge main
motm32 Mar 24, 2025
b6433f8
update
motm32 Mar 24, 2025
28e99cf
add changes
motm32 Mar 25, 2025
87ed16d
change
motm32 Mar 25, 2025
cdfc374
more changes
motm32 Mar 26, 2025
e82e6f6
more changes
motm32 Mar 27, 2025
5a969bc
merge main
motm32 Mar 27, 2025
87d2988
add changed for regex
motm32 Mar 27, 2025
8c63d4f
small changes so nathan hopefully doesn't yell at me
motm32 Mar 28, 2025
b70e19f
merge main
motm32 Mar 28, 2025
f43f490
small change
motm32 Mar 28, 2025
0dd20d5
change package lock
motm32 Mar 28, 2025
e1dafec
merge main
motm32 Mar 28, 2025
e4819a6
Minor fixes
nturinski Mar 28, 2025
4e63165
Merge branch 'main' into meganmott/convertSettings
nturinski Mar 28, 2025
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
26 changes: 14 additions & 12 deletions package-lock.json

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

26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,16 @@
"title": "%azureFunctions.connectToGitHub%",
"category": "Azure Functions"
},
{
"command": "azureFunctions.convertLocalConnections",
"title": "%azureFunctions.convertLocalConnections%",
"category": "Azure Functions"
},
{
"command": "azureFunctions.convertRemoteConnections",
"title": "%azureFunctions.convertRemoteConnections%",
"category": "Azure Functions"
},
{
"command": "azureFunctions.copyFunctionUrl",
"title": "%azureFunctions.copyFunctionUrl%",
Expand Down Expand Up @@ -484,6 +494,16 @@
"when": "view == azureResourceGroups && viewItem =~ /functionapp/i && viewItem =~ /azureResourceTypeGroup/i",
"group": "1@2"
},
{
"command": "azureFunctions.convertLocalConnections",
"when": "view == azureWorkspace && viewItem =~ /(azFuncLocalProject.*convert|applicationSettingItem.*localSettings)/i",
"group": "1@3"
},
{
"command": "azureFunctions.convertRemoteConnections",
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /(applicationSettings|applicationSettingItem).*azFunc.*convert/i",
"group": "1@4"
},
{
"command": "azureFunctions.browseWebsite",
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /azFunc(Production|)(Slot|Flex)(?!s)/",
Expand Down Expand Up @@ -661,7 +681,7 @@
},
{
"command": "azureFunctions.toggleAppSettingVisibility",
"when": "view =~ /(azureResourceGroups|azureFocusView)/ && viewItem =~ /applicationSettingItem.*azFunc/",
"when": "view =~ /(azureResourceGroups|azureFocusView|azureWorkspace)/ && viewItem =~ /applicationSettingItem.*(azFunc|localSettings)/",
"group": "inline"
},
{
Expand Down Expand Up @@ -1345,8 +1365,8 @@
"@azure/core-rest-pipeline": "^1.11.0",
"@azure/storage-blob": "^12.5.0",
"@microsoft/vscode-azext-azureappservice": "^3.3.1",
"@microsoft/vscode-azext-azureappsettings": "^0.2.2",
"@microsoft/vscode-azext-azureutils": "^3.1.3",
"@microsoft/vscode-azext-azureappsettings": "file:../vscode-azuretools/appsettings/microsoft-vscode-azext-azureappsettings-0.2.2.tgz",
"@microsoft/vscode-azext-azureutils": "file:../vscode-azuretools/azure/microsoft-vscode-azext-azureutils-3.1.4.tgz",
"@microsoft/vscode-azext-serviceconnector": "^0.1.3",
"@microsoft/vscode-azext-utils": "^2.5.7",
"@microsoft/vscode-azureresources-api": "^2.0.4",
Expand Down
2 changes: 2 additions & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"azureFunctions.createNewProjectWithDockerfile": "Create New Containerized Project...",
"azureFunctions.createPythonVenv": "Create a virtual environment when creating a new Python project.",
"azureFunctions.createSlot": "Create Slot...",
"azureFunctions.convertLocalConnections": "Convert Local Project Connections to Identity-Based Connections...",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to change the verbiage from "convert" to "add" considering we aren't deleting the old settings anymore.

"azureFunctions.convertRemoteConnections": "Convert Function App Connections to Identity-Based Connections...",
"azureFunctions.deleteFunction": "Delete Function...",
"azureFunctions.deleteFunctionApp": "Delete Function App...",
"azureFunctions.deleteSlot": "Delete Slot...",
Expand Down
3 changes: 1 addition & 2 deletions src/LocalResourceProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@ export class FunctionsLocalResourceProvider implements WorkspaceResourceProvider

public async provideResources(parent: AzExtParentTreeItem): Promise<AzExtTreeItem[] | null | undefined> {
const children: AzExtTreeItem[] = [];

Disposable.from(...this._projectDisposables).dispose();
this._projectDisposables = [];

const localProjects = await listLocalProjects();
let hasLocalProject = false;

for (const project of localProjects.initializedProjects) {
const treeItem: LocalProjectTreeItem = new LocalProjectTreeItem(parent, project as LocalProjectInternal);
const treeItem: LocalProjectTreeItem = await LocalProjectTreeItem.createLocalProjectTreeItem(parent, project as LocalProjectInternal);
this._projectDisposables.push(treeItem);
children.push(treeItem);
}
Expand Down
17 changes: 8 additions & 9 deletions src/commands/appSettings/localSettings/LocalSettingsClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,35 @@ import { type AppSettingsClientProvider, type IAppSettingsClient } from "@micros
import { AzExtFsExtra, callWithTelemetryAndErrorHandling, type IActionContext } from "@microsoft/vscode-azext-utils";
import * as vscode from 'vscode';
import { type ILocalSettingsJson } from "../../../funcConfig/local.settings";
import { type LocalProjectTreeItem } from "../../../tree/localProject/LocalProjectTreeItem";
import { decryptLocalSettings } from "./decryptLocalSettings";
import { encryptLocalSettings } from "./encryptLocalSettings";
import { getLocalSettingsFileNoPrompt } from "./getLocalSettingsFile";

export class LocalSettingsClientProvider implements AppSettingsClientProvider {
private _node: LocalProjectTreeItem;
constructor(node: LocalProjectTreeItem) {
this._node = node;
private _workspaceFolder: vscode.WorkspaceFolder;
constructor(workspaceFolder: vscode.WorkspaceFolder) {
this._workspaceFolder = workspaceFolder;
}

public async createClient(): Promise<IAppSettingsClient> {
return new LocalSettingsClient(this._node);
return new LocalSettingsClient(this._workspaceFolder);
}
}

export class LocalSettingsClient implements IAppSettingsClient {
public fullName: string;
public isLinux: boolean;
private _node: LocalProjectTreeItem;
private _workspaceFolder: vscode.WorkspaceFolder

constructor(node: LocalProjectTreeItem) {
constructor(workspaceFolder: vscode.WorkspaceFolder) {
this.isLinux = false;
this.fullName = 'local';
this._node = node;
this._workspaceFolder = workspaceFolder;
}

public async listApplicationSettings(): Promise<StringDictionary> {
const result = await callWithTelemetryAndErrorHandling<StringDictionary | undefined>('listApplicationSettings', async (context: IActionContext) => {
const localSettingsPath: string | undefined = await getLocalSettingsFileNoPrompt(context, this._node.workspaceFolder);
const localSettingsPath: string | undefined = await getLocalSettingsFileNoPrompt(context, this._workspaceFolder);
if (localSettingsPath === undefined) {
return { properties: {} };
} else {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use your helper function again in here (a couple lines below this).

It also may make more sense to export getLocalSettingsJson from here since it's more related to the LocalSettingsClient than anything else. You could consider adding it to a util file too.

Expand Down
Loading