Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5f2538b
remove dead code in init script project classes
andrew-eldridge Jul 14, 2026
bcaf80c
tasks.json single source of truth, remove unused init project classes
andrew-eldridge Jul 15, 2026
1bf16ea
update enableDevContainer to use new tasks.json generator, remove tem…
andrew-eldridge Jul 15, 2026
13d2dd2
add generator for remaining .vscode files (launch.json, settings.json…
andrew-eldridge Jul 16, 2026
ee4d4d7
move tryGetTargetFramework to dotnet utils
andrew-eldridge Jul 16, 2026
c871904
remove old custom code steps (dead code)
andrew-eldridge Jul 16, 2026
2ee5934
Merge branch 'main' of github.com:Azure/LogicAppsUX into aeldridge/vs…
andrew-eldridge Jul 17, 2026
eecb29a
fix validate/overwrites tasks.json, silent write when missing
andrew-eldridge Jul 20, 2026
fef1ab3
remove project language prompt on init, instead infer from project co…
andrew-eldridge Jul 21, 2026
7ef8c06
Merge branch 'main' of github.com:Azure/LogicAppsUX into aeldridge/vs…
andrew-eldridge Jul 21, 2026
d80b7cb
Merge branch 'main' of github.com:Azure/LogicAppsUX into aeldridge/vs…
andrew-eldridge Jul 23, 2026
fe947b2
remove unneeded tests
andrew-eldridge Jul 23, 2026
f816317
add hostGenerator for host.json
andrew-eldridge Jul 23, 2026
44b86d8
remove old tests
andrew-eldridge Jul 23, 2026
ebf1300
add localSettingsGenerator
andrew-eldridge Jul 24, 2026
512b60f
collapse InitProjectStep/InitProjectStepBase into one class
andrew-eldridge Jul 24, 2026
b37bcf4
consolidate .vscode files consistency checks in ensureVSCodeFiles, fi…
andrew-eldridge Jul 24, 2026
bd45ef0
reorganize project consistency files
andrew-eldridge Jul 24, 2026
9ee9a23
fix tests
andrew-eldridge Jul 25, 2026
003684e
remove dead code
andrew-eldridge Jul 25, 2026
ee22b3d
clean up code
andrew-eldridge Jul 25, 2026
a4a7b97
remove dead code
andrew-eldridge Jul 25, 2026
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
4 changes: 0 additions & 4 deletions .github/workflows/pr-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,8 @@ jobs:
apps/vs-code-designer/src/app/utils/vsCodeConfig/tasks.ts
apps/vs-code-designer/src/app/debug/validatePreDebug.ts
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateLogicAppVSCodeContents.ts
apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/initCustomCodeProjectStep.ts
apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/initCustomCodeProjectStepBase.ts
apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/initCustomCodeScriptProjectStep.ts
apps/vs-code-designer/src/app/commands/initProjectForVSCode/initDotnetProjectStep.ts
apps/vs-code-designer/src/app/commands/initProjectForVSCode/initProjectStep.ts
apps/vs-code-designer/src/app/commands/initProjectForVSCode/initScriptProjectStep.ts

- name: Check coverage on changed files
id: coverage-check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,20 @@ import {
functionsExtensionId,
vscodeFolderName,
extensionsFileName,
launchFileName,
settingsFileName,
tasksFileName,
extensionCommand,
} from '../../../../constants';
import { FuncVersion, type IProjectWizardContext } from '@microsoft/vscode-extension-logic-apps';
import { type IProjectWizardContext } from '@microsoft/vscode-extension-logic-apps';
import { TargetFramework, ProjectType } from '@microsoft/vscode-extension-logic-apps';
import * as fs from 'fs-extra';
import * as path from 'path';
import { getAssetsRoot } from '../../../utils/assets';
import { getDebugConfigs, updateDebugConfigs } from '../../../utils/vsCodeConfig/launch';
import { getContainingWorkspace, isMultiRootWorkspace } from '../../../utils/workspace';
import { localize } from '../../../../localize';
import * as vscode from 'vscode';
import { getCustomCodeRuntime } from '../../../utils/debug';
import { createCsFile, createProgramFile, createRulesFiles, createCsprojFile } from '../../../utils/functionProjectFiles';

/**
* This class represents a prompt step that allows the user to set up an Azure Function project.
*/
export class CreateFunctionAppFiles {
// Hide the step count in the wizard UI
public hideStepCount = true;

/**
* Sets up an Azure Function project by creating all necessary files.
* @param context The project wizard context.
Expand Down Expand Up @@ -85,91 +75,6 @@ export class CreateFunctionAppFiles {
await fs.writeJson(filePath, content, { spaces: 2 });
}

/**
* Updates the launch.json file for the logic app corresponding to this functions app.
* @param folderPath The functions app folder path.
* @param targetFramework The target framework of the functions app.
* @param funcVersion The version of the functions app.
* @param logicAppName The name of the logic app.
*/
private async updateLogicAppLaunchJson(
folderPath: string,
targetFramework: TargetFramework,
funcVersion: FuncVersion,
logicAppName: string
): Promise<void> {
const logicAppLaunchJsonPath = path.join(folderPath, '..', '..', logicAppName, vscodeFolderName, launchFileName);
let logicAppWorkspaceFolder = getContainingWorkspace(logicAppLaunchJsonPath);
if (logicAppWorkspaceFolder === undefined) {
// Traverse up the directory tree to find a .code-workspace file
let currentPath = path.dirname(logicAppLaunchJsonPath);
let workspaceFile: string | undefined;

while (currentPath !== path.parse(currentPath).root) {
const files = await fs.readdir(currentPath);
const codeWorkspaceFile = files.find((file) => file.endsWith('.code-workspace'));

if (codeWorkspaceFile) {
workspaceFile = path.join(currentPath, codeWorkspaceFile);
break;
}

currentPath = path.dirname(currentPath);
}

// If no workspace file found, cannot update launch.json
if (workspaceFile) {
logicAppWorkspaceFolder = {
uri: vscode.Uri.file(currentPath),
name: path.basename(currentPath),
index: 0,
};
}
}
const debugConfigs = getDebugConfigs(logicAppWorkspaceFolder);
const updatedDebugConfigs = debugConfigs.some((debugConfig) => debugConfig.type === 'logicapp')
? debugConfigs.map((debugConfig) => {
// Update the logic app debug configuration to use the correct runtime for custom code
if (debugConfig.type === 'logicapp') {
return {
...debugConfig,
customCodeRuntime: getCustomCodeRuntime(targetFramework),
isCodeless: true,
};
}
return debugConfig;
})
: [
{
name: localize('debugLogicApp', `Run/Debug logic app with local function ${logicAppName}`),
type: 'logicapp',
request: 'launch',
funcRuntime: funcVersion === FuncVersion.v1 ? 'clr' : 'coreclr',
customCodeRuntime: getCustomCodeRuntime(targetFramework),
isCodeless: true,
},
...debugConfigs.filter(
(debugConfig) => debugConfig.request !== 'attach' || debugConfig.processId !== `\${command:${extensionCommand.pickProcess}}`
),
];

if (isMultiRootWorkspace()) {
let launchJsonContent: any;
if (await fs.pathExists(logicAppLaunchJsonPath)) {
launchJsonContent = await fs.readJson(logicAppLaunchJsonPath);
launchJsonContent['configurations'] = updatedDebugConfigs;
} else {
launchJsonContent = {
version: '0.2.0',
configurations: updatedDebugConfigs,
};
}
await fs.writeJson(logicAppLaunchJsonPath, launchJsonContent, { spaces: 2 });
} else {
updateDebugConfigs(logicAppWorkspaceFolder, updatedDebugConfigs);
}
}

/**
* Generates the settings.json file in the specified folder.
* @param folderPath The path to the folder where the settings.json file should be generated.
Expand Down
Loading
Loading