Skip to content

Commit

Permalink
refactor: remove net6 templates (#13059)
Browse files Browse the repository at this point in the history
* refactor: remove Azure Functions .net 6 templates and unify the template id

* refactor: remove isolated question logic
  • Loading branch information
HuihuiWu-Microsoft authored Jan 17, 2025
1 parent 3b8dd69 commit dc12c6b
Show file tree
Hide file tree
Showing 142 changed files with 65 additions and 3,855 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ export enum TemplateNames {
DashboardTab = "dashboard-tab",
NotificationExpress = "notification-express",
NotificationWebApi = "notification-webapi",
NotificationHttpTriggerIsolated = "notification-http-trigger-isolated",
NotificationHttpTrigger = "notification-http-trigger",
NotificationTimerTriggerIsolated = "notification-timer-trigger-isolated",
NotificationTimerTrigger = "notification-timer-trigger",
NotificationHttpTimerTriggerIsolated = "notification-http-timer-trigger-isolated",
NotificationHttpTimerTrigger = "notification-http-timer-trigger",
CommandAndResponse = "command-and-response",
Workflow = "workflow",
Expand Down Expand Up @@ -76,21 +73,12 @@ export const Feature2TemplateName = {
[`${CapabilityOptions.notificationBot().id}:${
NotificationTriggerOptions.functionsHttpTrigger().id
}`]: TemplateNames.NotificationHttpTrigger,
[`${CapabilityOptions.notificationBot().id}:${
NotificationTriggerOptions.functionsHttpTriggerIsolated().id
}`]: TemplateNames.NotificationHttpTriggerIsolated,
[`${CapabilityOptions.notificationBot().id}:${
NotificationTriggerOptions.functionsTimerTrigger().id
}`]: TemplateNames.NotificationTimerTrigger,
[`${CapabilityOptions.notificationBot().id}:${
NotificationTriggerOptions.functionsTimerTriggerIsolated().id
}`]: TemplateNames.NotificationTimerTriggerIsolated,
[`${CapabilityOptions.notificationBot().id}:${
NotificationTriggerOptions.functionsHttpAndTimerTrigger().id
}`]: TemplateNames.NotificationHttpTimerTrigger,
[`${CapabilityOptions.notificationBot().id}:${
NotificationTriggerOptions.functionsHttpAndTimerTriggerIsolated().id
}`]: TemplateNames.NotificationHttpTimerTriggerIsolated,
[`${CapabilityOptions.commandBot().id}:undefined`]: TemplateNames.CommandAndResponse,
[`${CapabilityOptions.workflowBot().id}:undefined`]: TemplateNames.Workflow,
[`${CapabilityOptions.basicBot().id}:undefined`]: TemplateNames.DefaultBot,
Expand Down Expand Up @@ -180,47 +168,20 @@ export const inputsToTemplateName: Map<{ [key: string]: any }, TemplateNames> =
},
TemplateNames.NotificationWebApi,
],
[
{
[QuestionNames.ProgrammingLanguage]: ProgrammingLanguage.CSharp,
[QuestionNames.Capabilities]: CapabilityOptions.notificationBot().id,
[QuestionNames.BotTrigger]: NotificationTriggerOptions.functionsHttpTrigger().id,
["isIsolated"]: true,
},
TemplateNames.NotificationHttpTriggerIsolated,
],
[
{
[QuestionNames.Capabilities]: CapabilityOptions.notificationBot().id,
[QuestionNames.BotTrigger]: NotificationTriggerOptions.functionsHttpTrigger().id,
},
TemplateNames.NotificationHttpTrigger,
],
[
{
[QuestionNames.ProgrammingLanguage]: ProgrammingLanguage.CSharp,
[QuestionNames.Capabilities]: CapabilityOptions.notificationBot().id,
[QuestionNames.BotTrigger]: NotificationTriggerOptions.functionsTimerTrigger().id,
["isIsolated"]: true,
},
TemplateNames.NotificationTimerTriggerIsolated,
],
[
{
[QuestionNames.Capabilities]: CapabilityOptions.notificationBot().id,
[QuestionNames.BotTrigger]: NotificationTriggerOptions.functionsTimerTrigger().id,
},
TemplateNames.NotificationTimerTrigger,
],
[
{
[QuestionNames.ProgrammingLanguage]: ProgrammingLanguage.CSharp,
[QuestionNames.Capabilities]: CapabilityOptions.notificationBot().id,
[QuestionNames.BotTrigger]: NotificationTriggerOptions.functionsHttpAndTimerTrigger().id,
["isIsolated"]: true,
},
TemplateNames.NotificationHttpTimerTriggerIsolated,
],
[
{
[QuestionNames.Capabilities]: CapabilityOptions.notificationBot().id,
Expand Down
33 changes: 0 additions & 33 deletions packages/fx-core/src/question/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -938,17 +938,6 @@ export class NotificationTriggerOptions {
};
}

static functionsTimerTriggerIsolated(): HostTypeTriggerOptionItem {
return {
id: "timer-functions-isolated",
hostType: HostType.Functions,
triggers: [NotificationTriggers.TIMER],
label: getLocalizedString("plugins.bot.triggers.timer-functions.label"),
description: getLocalizedString("plugins.bot.triggers.timer-functions.description"),
detail: getLocalizedString("plugins.bot.triggers.timer-functions.detail"),
};
}

static functionsHttpAndTimerTrigger(): HostTypeTriggerOptionItem {
return {
id: "http-and-timer-functions",
Expand All @@ -960,17 +949,6 @@ export class NotificationTriggerOptions {
};
}

static functionsHttpAndTimerTriggerIsolated(): HostTypeTriggerOptionItem {
return {
id: "http-and-timer-functions-isolated",
hostType: HostType.Functions,
triggers: [NotificationTriggers.HTTP, NotificationTriggers.TIMER],
label: getLocalizedString("plugins.bot.triggers.http-and-timer-functions.label"),
description: getLocalizedString("plugins.bot.triggers.http-and-timer-functions.description"),
detail: getLocalizedString("plugins.bot.triggers.http-and-timer-functions.detail"),
};
}

static functionsHttpTrigger(): HostTypeTriggerOptionItem {
return {
id: "http-functions",
Expand All @@ -982,17 +960,6 @@ export class NotificationTriggerOptions {
};
}

static functionsHttpTriggerIsolated(): HostTypeTriggerOptionItem {
return {
id: "http-functions-isolated",
hostType: HostType.Functions,
triggers: [NotificationTriggers.HTTP],
label: getLocalizedString("plugins.bot.triggers.http-functions.label"),
description: getLocalizedString("plugins.bot.triggers.http-functions.description"),
detail: getLocalizedString("plugins.bot.triggers.http-functions.detail"),
};
}

static functionsTriggers(): HostTypeTriggerOptionItem[] {
return [
NotificationTriggerOptions.functionsHttpAndTimerTrigger(),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit dc12c6b

Please sign in to comment.