From 91a749fa347cfdc4e87483ac291a50d856560d01 Mon Sep 17 00:00:00 2001 From: Eric Jizba Date: Tue, 7 Apr 2020 17:39:34 -0700 Subject: [PATCH] Durable templates should always be associated with a bundle (#2026) --- src/utils/bundleFeedUtils.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/utils/bundleFeedUtils.ts b/src/utils/bundleFeedUtils.ts index 2cc012c7d..105bdfb3f 100644 --- a/src/utils/bundleFeedUtils.ts +++ b/src/utils/bundleFeedUtils.ts @@ -56,7 +56,7 @@ export namespace bundleFeedUtils { } export function isBundleTemplate(template: IFunctionTemplate | IBindingTemplate): boolean { - return !template.isHttpTrigger && !template.isTimerTrigger; + return (!template.isHttpTrigger && !template.isTimerTrigger) || isDurableTemplate(template); } export async function getLatestVersionRange(): Promise { @@ -78,6 +78,10 @@ export namespace bundleFeedUtils { }; } + function isDurableTemplate(template: Partial): boolean { + return !!template.id?.toLowerCase().includes('durable'); + } + async function getBundleFeed(bundleMetadata: IBundleMetadata | undefined): Promise { const bundleId: string = bundleMetadata && bundleMetadata.id || defaultBundleId;