Skip to content
Merged
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 src/templates/script/getScriptVerifiedTemplateIds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function getScriptVerifiedTemplateIds(version: string): (string | RegExp)

// The Entity templates aren't supported in PowerShell at all, and the DurableFunctionsEntityHttpStart template is not yet supported in Python.
// As a result, we need to manually create their respective regular expressions to account for these edge cases
const entityRegExps = [new RegExp(`^DurableFunctionsEntity-(JavaScript|TypeScript|Python|Custom)$`, 'i'), new RegExp(`^DurableFunctionsEntityHttpStart-(JavaScript|TypeScript|Custom)$`, 'i')];
const entityRegExps = [new RegExp(`^DurableFunctionsEntity-(JavaScript(-4.x)?|TypeScript(-4.x)?|Python|Custom)$`, 'i'), new RegExp(`^DurableFunctionsEntityHttpStart-(JavaScript(-4.x)?|TypeScript(-4.x)?|Custom)$`, 'i')];
return regExps.concat(entityRegExps);
}
}
3 changes: 2 additions & 1 deletion src/utils/durableUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,8 @@ export namespace durableUtils {

async function installNodeDependencies(context: IFunctionWizardContext): Promise<void> {
try {
await cpUtils.executeCommand(ext.outputChannel, context.projectPath, 'npm', 'install', durableUtils.nodeDfPackage);
const packageVersion = context.languageModel === 4 ? 'preview' : '2';
await cpUtils.executeCommand(ext.outputChannel, context.projectPath, 'npm', 'install', `${durableUtils.nodeDfPackage}@${packageVersion}`);
} catch (error) {
const pError: IParsedError = parseError(error);
const dfDepInstallFailed: string = localize('failedToAddDurableNodeDependency', 'Failed to add or install the "{0}" dependency. Please inspect and verify if it needs to be added manually.', durableUtils.nodeDfPackage);
Expand Down