Skip to content

Commit

Permalink
Durable templates should always be associated with a bundle (#2026)
Browse files Browse the repository at this point in the history
  • Loading branch information
ejizba authored Apr 8, 2020
1 parent cf3c601 commit 91a749f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/utils/bundleFeedUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
Expand All @@ -78,6 +78,10 @@ export namespace bundleFeedUtils {
};
}

function isDurableTemplate(template: Partial<IFunctionTemplate>): boolean {
return !!template.id?.toLowerCase().includes('durable');
}

async function getBundleFeed(bundleMetadata: IBundleMetadata | undefined): Promise<IBundleFeed> {
const bundleId: string = bundleMetadata && bundleMetadata.id || defaultBundleId;

Expand Down

0 comments on commit 91a749f

Please sign in to comment.