@microsoft/teamsfx-core 3.0.10-alpha.ba75ce957.0 → 3.0.10-alpha.c67b3c0ec.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/build/common/featureFlags.d.ts +5 -20
  2. package/build/common/featureFlags.d.ts.map +1 -1
  3. package/build/common/featureFlags.js +6 -20
  4. package/build/common/featureFlags.js.map +1 -1
  5. package/build/common/telemetry.d.ts +2 -0
  6. package/build/common/telemetry.d.ts.map +1 -1
  7. package/build/common/telemetry.js +2 -0
  8. package/build/common/telemetry.js.map +1 -1
  9. package/build/common/templates-config.json +1 -1
  10. package/build/component/coordinator/index.d.ts.map +1 -1
  11. package/build/component/coordinator/index.js +0 -11
  12. package/build/component/coordinator/index.js.map +1 -1
  13. package/build/component/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
  14. package/build/component/deps-checker/internal/dotnetChecker.js +3 -7
  15. package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
  16. package/build/component/driver/script/scriptDriver.js +1 -1
  17. package/build/component/driver/script/scriptDriver.js.map +1 -1
  18. package/build/component/generator/configFiles/configGenerator.d.ts +15 -0
  19. package/build/component/generator/configFiles/configGenerator.d.ts.map +1 -0
  20. package/build/component/generator/configFiles/configGenerator.js +168 -0
  21. package/build/component/generator/configFiles/configGenerator.js.map +1 -0
  22. package/build/component/generator/configFiles/copyPolicy.d.ts +12 -0
  23. package/build/component/generator/configFiles/copyPolicy.d.ts.map +1 -0
  24. package/build/component/generator/configFiles/copyPolicy.js +63 -0
  25. package/build/component/generator/configFiles/copyPolicy.js.map +1 -0
  26. package/build/component/generator/configFiles/jsonMerger.d.ts +11 -0
  27. package/build/component/generator/configFiles/jsonMerger.d.ts.map +1 -0
  28. package/build/component/generator/configFiles/jsonMerger.js +83 -0
  29. package/build/component/generator/configFiles/jsonMerger.js.map +1 -0
  30. package/build/component/generator/configFiles/renderTemplate.d.ts +2 -0
  31. package/build/component/generator/configFiles/renderTemplate.d.ts.map +1 -0
  32. package/build/component/generator/configFiles/renderTemplate.js +16 -0
  33. package/build/component/generator/configFiles/renderTemplate.js.map +1 -0
  34. package/build/component/generator/declarativeAgent/generator.d.ts +5 -0
  35. package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
  36. package/build/component/generator/declarativeAgent/generator.js +76 -36
  37. package/build/component/generator/declarativeAgent/generator.js.map +1 -1
  38. package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
  39. package/build/component/generator/declarativeAgent/helper.js +0 -1
  40. package/build/component/generator/declarativeAgent/helper.js.map +1 -1
  41. package/build/component/generator/openApiSpec/common.d.ts.map +1 -1
  42. package/build/component/generator/openApiSpec/common.js +11 -22
  43. package/build/component/generator/openApiSpec/common.js.map +1 -1
  44. package/build/component/generator/openApiSpec/kiota.d.ts +0 -6
  45. package/build/component/generator/openApiSpec/kiota.d.ts.map +1 -1
  46. package/build/component/generator/openApiSpec/kiota.js +2 -17
  47. package/build/component/generator/openApiSpec/kiota.js.map +1 -1
  48. package/build/component/generator/templates/templateInfo.d.ts +1 -1
  49. package/build/component/generator/templates/templateInfo.d.ts.map +1 -1
  50. package/build/component/generator/utils.d.ts +2 -2
  51. package/build/component/generator/utils.d.ts.map +1 -1
  52. package/build/component/generator/utils.js.map +1 -1
  53. package/build/component/m365/packageService.d.ts.map +1 -1
  54. package/build/component/m365/packageService.js +16 -20
  55. package/build/component/m365/packageService.js.map +1 -1
  56. package/build/component/utils/pathUtils.d.ts +2 -1
  57. package/build/component/utils/pathUtils.d.ts.map +1 -1
  58. package/build/component/utils/pathUtils.js +19 -3
  59. package/build/component/utils/pathUtils.js.map +1 -1
  60. package/build/component/utils/settingsUtil.d.ts +1 -1
  61. package/build/component/utils/settingsUtil.d.ts.map +1 -1
  62. package/build/component/utils/settingsUtil.js +20 -7
  63. package/build/component/utils/settingsUtil.js.map +1 -1
  64. package/build/core/FxCore.d.ts +6 -2
  65. package/build/core/FxCore.d.ts.map +1 -1
  66. package/build/core/FxCore.declarativeAgent.d.ts +6 -0
  67. package/build/core/FxCore.declarativeAgent.d.ts.map +1 -0
  68. package/build/core/FxCore.declarativeAgent.js +210 -0
  69. package/build/core/FxCore.declarativeAgent.js.map +1 -0
  70. package/build/core/FxCore.js +43 -246
  71. package/build/core/FxCore.js.map +1 -1
  72. package/build/core/generateConfigFiles.d.ts +4 -0
  73. package/build/core/generateConfigFiles.d.ts.map +1 -0
  74. package/build/core/generateConfigFiles.js +64 -0
  75. package/build/core/generateConfigFiles.js.map +1 -0
  76. package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
  77. package/build/core/middleware/projectSettingsLoader.js +8 -2
  78. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  79. package/build/question/other.d.ts.map +1 -1
  80. package/build/question/other.js +0 -2
  81. package/build/question/other.js.map +1 -1
  82. package/build/question/questionNames.d.ts +0 -3
  83. package/build/question/questionNames.d.ts.map +1 -1
  84. package/build/question/questionNames.js +0 -3
  85. package/build/question/questionNames.js.map +1 -1
  86. package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts +0 -1
  87. package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts.map +1 -1
  88. package/build/question/scaffold/vsc/ProjectTypeOptions.js +1 -14
  89. package/build/question/scaffold/vsc/ProjectTypeOptions.js.map +1 -1
  90. package/build/question/scaffold/vsc/createRootNode.d.ts.map +1 -1
  91. package/build/question/scaffold/vsc/createRootNode.js +1 -5
  92. package/build/question/scaffold/vsc/createRootNode.js.map +1 -1
  93. package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
  94. package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -2
  95. package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
  96. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.d.ts +0 -1
  97. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.d.ts.map +1 -1
  98. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.js +2 -51
  99. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.js.map +1 -1
  100. package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
  101. package/build/question/scaffold/vsc/teamsProjectTypeNode.js +4 -15
  102. package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
  103. package/package.json +4 -4
  104. package/resource/package.nls.cs.json +4 -5
  105. package/resource/package.nls.de.json +3 -4
  106. package/resource/package.nls.es.json +4 -5
  107. package/resource/package.nls.fr.json +3 -4
  108. package/resource/package.nls.it.json +4 -5
  109. package/resource/package.nls.ja.json +4 -5
  110. package/resource/package.nls.json +2 -3
  111. package/resource/package.nls.ko.json +3 -4
  112. package/resource/package.nls.pl.json +4 -5
  113. package/resource/package.nls.pt-BR.json +4 -5
  114. package/resource/package.nls.ru.json +3 -4
  115. package/resource/package.nls.tr.json +3 -4
  116. package/resource/package.nls.zh-Hans.json +4 -5
  117. package/resource/package.nls.zh-Hant.json +4 -5
  118. package/templates/configs/local/python/.vscode/launch.json.tpl +93 -0
  119. package/templates/configs/local/python/.vscode/tasks.json.tpl +103 -0
  120. package/templates/configs/local/python/env/.env.local +6 -0
  121. package/templates/configs/local/python/m365agents.local.yml.tpl +121 -0
  122. package/templates/configs/local/typescript/.gitignore +1 -0
  123. package/templates/configs/local/typescript/.vscode/launch.json.tpl +147 -0
  124. package/templates/configs/local/typescript/.vscode/tasks.json.tpl +129 -0
  125. package/templates/configs/local/typescript/env/.env.local +6 -0
  126. package/templates/configs/local/typescript/m365agents.local.yml.tpl +129 -0
  127. package/templates/configs/local/typescript/package.json +8 -0
  128. package/templates/configs/playground/python/.vscode/launch.json +46 -0
  129. package/templates/configs/playground/python/.vscode/tasks.json +35 -0
  130. package/templates/configs/playground/python/env/.env.playground +7 -0
  131. package/templates/configs/playground/python/env/.env.playground.user +0 -0
  132. package/templates/configs/playground/python/m365agents.playground.yml +14 -0
  133. package/templates/configs/playground/typescript/.gitignore +4 -0
  134. package/templates/configs/playground/typescript/.vscode/launch.json +31 -0
  135. package/templates/configs/playground/typescript/.vscode/tasks.json +104 -0
  136. package/templates/configs/playground/typescript/env/.env.playground +7 -0
  137. package/templates/configs/playground/typescript/env/.env.playground.user +0 -0
  138. package/templates/configs/playground/typescript/m365agents.playground.yml +23 -0
  139. package/templates/configs/playground/typescript/package.json +9 -0
  140. package/templates/configs/remote/python/.vscode/launch.json.tpl +70 -0
  141. package/templates/configs/remote/python/.webappignore +11 -0
  142. package/templates/configs/remote/python/env/.env.dev +11 -0
  143. package/templates/configs/remote/python/infra/azure.bicep.tpl +108 -0
  144. package/templates/configs/remote/python/infra/azure.parameters.json.tpl +20 -0
  145. package/templates/configs/remote/python/infra/botRegistration/azurebot.bicep +42 -0
  146. package/templates/configs/remote/python/infra/botRegistration/readme.md +1 -0
  147. package/templates/configs/remote/python/m365agents.yml.tpl +131 -0
  148. package/templates/configs/remote/typescript/.vscode/launch.json.tpl +70 -0
  149. package/templates/configs/remote/typescript/.webappignore +27 -0
  150. package/templates/configs/remote/typescript/env/.env.dev +11 -0
  151. package/templates/configs/remote/typescript/infra/azure.bicep.tpl +105 -0
  152. package/templates/configs/remote/typescript/infra/azure.parameters.json.tpl +17 -0
  153. package/templates/configs/remote/typescript/infra/botRegistration/azurebot.bicep +42 -0
  154. package/templates/configs/remote/typescript/infra/botRegistration/readme.md +1 -0
  155. package/templates/configs/remote/typescript/m365agents.yml.tpl +142 -0
  156. package/templates/configs/remote/typescript/web.config +60 -0
  157. package/templates/fallback/common.zip +0 -0
  158. package/templates/fallback/csharp.zip +0 -0
  159. package/templates/fallback/js.zip +0 -0
  160. package/templates/fallback/python.zip +0 -0
  161. package/templates/fallback/ts.zip +0 -0
  162. package/templates/metadata.zip +0 -0
@@ -0,0 +1,108 @@
1
+ @maxLength(20)
2
+ @minLength(4)
3
+ @description('Used to generate names for all resources in this file')
4
+ param resourceBaseName string
5
+
6
+ param webAppSku string
7
+ param linuxFxVersion string
8
+
9
+ param serverfarmsName string = resourceBaseName
10
+ param webAppName string = resourceBaseName
11
+ param location string = resourceGroup().location
12
+ param pythonVersion string = linuxFxVersion
13
+ {{#hasAzureBot}}
14
+ @maxLength(42)
15
+ param botDisplayName string
16
+ {{/hasAzureBot}}
17
+
18
+ {{#hasAzureBot}}
19
+ resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
20
+ location: location
21
+ name: resourceBaseName
22
+ }
23
+ {{/hasAzureBot}}
24
+
25
+
26
+ resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
27
+ kind: 'app,linux'
28
+ location: location
29
+ name: serverfarmsName
30
+ sku: {
31
+ name: webAppSku
32
+ }
33
+ properties:{
34
+ reserved: true
35
+ }
36
+ }
37
+
38
+ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
39
+ kind: 'app,linux'
40
+ location: location
41
+ name: webAppName
42
+ properties: {
43
+ serverFarmId: serverfarm.id
44
+ httpsOnly: true
45
+ siteConfig: {
46
+ alwaysOn: true
47
+ appCommandLine: 'python app.py'
48
+ linuxFxVersion: linuxFxVersion
49
+ appSettings: [
50
+ {
51
+ name: 'WEBSITES_CONTAINER_START_TIME_LIMIT'
52
+ value: '900'
53
+ }
54
+ {
55
+ name: 'SCM_DO_BUILD_DURING_DEPLOYMENT'
56
+ value: 'true'
57
+ }
58
+ {{#hasAzureBot}}
59
+ {
60
+ name: 'CLIENT_ID'
61
+ value: identity.properties.clientId
62
+ }
63
+ {
64
+ name: 'TENANT_ID'
65
+ value: identity.properties.tenantId
66
+ }
67
+ {
68
+ name: 'BOT_TYPE'
69
+ value: 'UserAssignedMsi'
70
+ }
71
+ {{/hasAzureBot}}
72
+ ]
73
+ ftpsState: 'FtpsOnly'
74
+ }
75
+ }
76
+ {{#hasAzureBot}}
77
+ identity: {
78
+ type: 'UserAssigned'
79
+ userAssignedIdentities: {
80
+ '${identity.id}': {}
81
+ }
82
+ }
83
+ {{/hasAzureBot}}
84
+ }
85
+
86
+ {{#hasAzureBot}}
87
+ // Register your web service as a bot with the Bot Framework
88
+ module azureBotRegistration './botRegistration/azurebot.bicep' = {
89
+ name: 'Azure-Bot-registration'
90
+ params: {
91
+ resourceBaseName: resourceBaseName
92
+ botDisplayName: botDisplayName
93
+ identityResourceId: identity.id
94
+ identityClientId: identity.properties.clientId
95
+ identityTenantId: identity.properties.tenantId
96
+ botAppDomain: webApp.properties.defaultHostName
97
+ }
98
+ }
99
+ {{/hasAzureBot}}
100
+
101
+ // The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details.
102
+ output AZURE_APP_SERVICE_RESOURCE_ID string = webApp.id // used in deploy stage
103
+ output BOT_DOMAIN string = webApp.properties.defaultHostName
104
+ output BOT_ENDPOINT string = 'https://${webApp.properties.defaultHostName}'
105
+ {{#hasAzureBot}}
106
+ output BOT_ID string = identity.properties.clientId
107
+ output BOT_TENANT_ID string = identity.properties.tenantId
108
+ {{/hasAzureBot}}
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3
+ "contentVersion": "1.0.0.0",
4
+ "parameters": {
5
+ {{#hasAzureBot}}
6
+ "botDisplayName": {
7
+ "value": "{{appName}}"
8
+ },
9
+ {{/hasAzureBot}}
10
+ "resourceBaseName": {
11
+ "value": "app$\{{RESOURCE_SUFFIX}}"
12
+ },
13
+ "webAppSku": {
14
+ "value": "B3"
15
+ },
16
+ "linuxFxVersion": {
17
+ "value": "PYTHON|3.12"
18
+ }
19
+ }
20
+ }
@@ -0,0 +1,42 @@
1
+ @maxLength(20)
2
+ @minLength(4)
3
+ @description('Used to generate names for all resources in this file')
4
+ param resourceBaseName string
5
+
6
+ @maxLength(42)
7
+ param botDisplayName string
8
+
9
+ param botServiceName string = resourceBaseName
10
+ param botServiceSku string = 'F0'
11
+ param identityResourceId string
12
+ param identityClientId string
13
+ param identityTenantId string
14
+ param botAppDomain string
15
+
16
+ // Register your web service as a bot with the Bot Framework
17
+ resource botService 'Microsoft.BotService/botServices@2021-03-01' = {
18
+ kind: 'azurebot'
19
+ location: 'global'
20
+ name: botServiceName
21
+ properties: {
22
+ displayName: botDisplayName
23
+ endpoint: 'https://${botAppDomain}/api/messages'
24
+ msaAppId: identityClientId
25
+ msaAppMSIResourceId: identityResourceId
26
+ msaAppTenantId:identityTenantId
27
+ msaAppType:'UserAssignedMSI'
28
+ }
29
+ sku: {
30
+ name: botServiceSku
31
+ }
32
+ }
33
+
34
+ // Connect the bot service to Microsoft Teams
35
+ resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
36
+ parent: botService
37
+ location: 'global'
38
+ name: 'MsTeamsChannel'
39
+ properties: {
40
+ channelName: 'MsTeamsChannel'
41
+ }
42
+ }
@@ -0,0 +1 @@
1
+ The `azurebot.bicep` module is provided to help you create Azure Bot service when you don't use Azure to host your app. If you use Azure as infrastrcture for your app, `azure.bicep` under infra folder already leverages this module to create Azure Bot service for you. You don't need to deploy `azurebot.bicep` again.
@@ -0,0 +1,131 @@
1
+ # yaml-language-server: $schema=https://aka.ms/m365-agents-toolkits/v1.11/yaml.schema.json
2
+ # Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
3
+ # Visit https://aka.ms/teamsfx-actions for details on actions
4
+ version: v1.11
5
+
6
+ provision:
7
+ # Creates an app
8
+ - uses: teamsApp/create
9
+ with:
10
+ # app name
11
+ name: {{appName}}$\{{APP_NAME_SUFFIX}}
12
+ # Write the information of created resources into environment file for
13
+ # the specified environment variable(s).
14
+ writeToEnvironmentFile:
15
+ teamsAppId: TEAMS_APP_ID
16
+
17
+ - uses: arm/deploy # Deploy given ARM templates parallelly.
18
+ with:
19
+ # AZURE_SUBSCRIPTION_ID is a built-in environment variable,
20
+ # if its value is empty, toolkit will prompt you to select a subscription.
21
+ # Referencing other environment variables with empty values
22
+ # will skip the subscription selection prompt.
23
+ subscriptionId: $\{{AZURE_SUBSCRIPTION_ID}}
24
+ # AZURE_RESOURCE_GROUP_NAME is a built-in environment variable,
25
+ # if its value is empty, toolkit will prompt you to select or create one
26
+ # resource group.
27
+ # Referencing other environment variables with empty values
28
+ # will skip the resource group selection prompt.
29
+ resourceGroupName: $\{{AZURE_RESOURCE_GROUP_NAME}}
30
+ templates:
31
+ - path: ./infra/azure.bicep # Relative path to this file
32
+ # Placeholders will be replaced with corresponding environment
33
+ # variable before ARM deployment.
34
+ parameters: ./infra/azure.parameters.json
35
+ # Required when deploying ARM template
36
+ deploymentName: Create-resources
37
+ # Microsoft 365 Agents Toolkit will download this bicep CLI version from github for you,
38
+ # will use bicep CLI in PATH if you remove this config.
39
+ bicepCliVersion: v0.9.1
40
+
41
+ # Validate using manifest schema
42
+ - uses: teamsApp/validateManifest
43
+ with:
44
+ # Path to manifest template
45
+ manifestPath: ./appPackage/manifest.json
46
+
47
+ # Build app package with latest env value
48
+ - uses: teamsApp/zipAppPackage
49
+ with:
50
+ # Path to manifest template
51
+ manifestPath: ./appPackage/manifest.json
52
+ outputZipPath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
53
+ outputFolder: ./appPackage/build
54
+
55
+ # Validate app package using validation rules
56
+ - uses: teamsApp/validateAppPackage
57
+ with:
58
+ # Relative path to this file. This is the path for built zip file.
59
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
60
+
61
+ # Apply the app manifest to an existing app in Developer Portal.
62
+ # Will use the app id in manifest file to determine which app to update.
63
+ - uses: teamsApp/update
64
+ with:
65
+ # Relative path to this file. This is the path for built zip file.
66
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
67
+
68
+ {{#hasCopilot}}
69
+ - uses: teamsApp/extendToM365
70
+ with:
71
+ # Relative path to the build app package.
72
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
73
+ # Write the information of created resources into environment file for
74
+ # the specified environment variable(s).
75
+ writeToEnvironmentFile:
76
+ titleId: M365_TITLE_ID
77
+ appId: M365_APP_ID
78
+ {{/hasCopilot}}
79
+
80
+ deploy:
81
+ # Deploy your application to Azure App Service using the zip deploy feature.
82
+ # For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
83
+ - uses: azureAppService/zipDeploy
84
+ with:
85
+ # Deploy base folder
86
+ artifactFolder: src
87
+ # Ignore file location, leave blank will ignore nothing
88
+ ignoreFile: .webappignore
89
+ # The resource id of the cloud resource to be deployed to.
90
+ # This key will be generated by arm/deploy action automatically.
91
+ # You can replace it with your existing Azure Resource id
92
+ # or add it to your environment variable file.
93
+ resourceId: $\{{AZURE_APP_SERVICE_RESOURCE_ID}}
94
+
95
+ publish:
96
+ # Validate using manifest schema
97
+ - uses: teamsApp/validateManifest
98
+ with:
99
+ # Path to manifest template
100
+ manifestPath: ./appPackage/manifest.json
101
+
102
+ # Build app package with latest env value
103
+ - uses: teamsApp/zipAppPackage
104
+ with:
105
+ # Path to manifest template
106
+ manifestPath: ./appPackage/manifest.json
107
+ outputZipPath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
108
+ outputFolder: ./appPackage/build
109
+
110
+ # Validate app package using validation rules
111
+ - uses: teamsApp/validateAppPackage
112
+ with:
113
+ # Relative path to this file. This is the path for built zip file.
114
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
115
+
116
+ # Apply the app manifest to an existing app in Developer Portal.
117
+ # Will use the app id in manifest file to determine which app to update.
118
+ - uses: teamsApp/update
119
+ with:
120
+ # Relative path to this file. This is the path for built zip file.
121
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
122
+
123
+ # Publish the app to Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps)
124
+ # for review and approval
125
+ - uses: teamsApp/publishAppPackage
126
+ with:
127
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
128
+ # Write the information of created resources into environment file for
129
+ # the specified environment variable(s).
130
+ writeToEnvironmentFile:
131
+ publishedAppId: TEAMS_APP_PUBLISHED_APP_ID
@@ -0,0 +1,70 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {{#supportCopilot}}
5
+ {
6
+ "name": "(Preview) View Remote Agent in Copilot (Edge)",
7
+ "type": "msedge",
8
+ "request": "launch",
9
+ "url": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${agent-hint}?auth=2&${account-hint}&developerMode=Basic",
10
+ "presentation": {
11
+ "group": "3-remote",
12
+ "order": 1
13
+ },
14
+ "internalConsoleOptions": "neverOpen",
15
+ "runtimeArgs": [
16
+ "--remote-debugging-port=9222",
17
+ "--no-first-run"
18
+ ]
19
+ },
20
+ {
21
+ "name": "(Preview) View Remote Agent in Copilot (Chrome)",
22
+ "type": "chrome",
23
+ "request": "launch",
24
+ "url": "https://m365.cloud.microsoft/chat/entity1-d870f6cd-4aa5-4d42-9626-ab690c041429/${agent-hint}?auth=2&${account-hint}&developerMode=Basic",
25
+ "presentation": {
26
+ "group": "3-remote",
27
+ "order": 2
28
+ },
29
+ "internalConsoleOptions": "neverOpen",
30
+ "runtimeArgs": [
31
+ "--remote-debugging-port=9223",
32
+ "--no-first-run"
33
+ ]
34
+ },
35
+ {{/supportCopilot}}
36
+ {
37
+ "name": "View Remote App in Teams (Edge)",
38
+ "type": "msedge",
39
+ "request": "launch",
40
+ "url": "https://teams.microsoft.com/l/app/$\{{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
41
+ "presentation": {
42
+ "group": "3-remote",
43
+ "order": 4
44
+ },
45
+ "internalConsoleOptions": "neverOpen"
46
+ },
47
+ {
48
+ "name": "View Remote App in Teams (Chrome)",
49
+ "type": "chrome",
50
+ "request": "launch",
51
+ "url": "https://teams.microsoft.com/l/app/$\{{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
52
+ "presentation": {
53
+ "group": "3-remote",
54
+ "order": 5
55
+ },
56
+ "internalConsoleOptions": "neverOpen"
57
+ },
58
+ {
59
+ "name": "View Remote App in Teams (Desktop)",
60
+ "type": "node",
61
+ "request": "launch",
62
+ "preLaunchTask": "Start App in Desktop Client (Remote)",
63
+ "presentation": {
64
+ "group": "3-remote",
65
+ "order": 6
66
+ },
67
+ "internalConsoleOptions": "neverOpen",
68
+ }
69
+ ]
70
+ }
@@ -0,0 +1,27 @@
1
+ .webappignore
2
+ .deployment
3
+ .localConfigs
4
+ .localConfigs.playground
5
+ .notification.localstore.json
6
+ .notification.playgroundstore.json
7
+ .vscode
8
+ *.js.map
9
+ *.ts.map
10
+ *.ts
11
+ .git*
12
+ .tsbuildinfo
13
+ CHANGELOG.md
14
+ README.md
15
+ local.settings.json
16
+ test
17
+ tsconfig.json
18
+ .DS_Store
19
+ m365agents.yml
20
+ m365agents.*.yml
21
+ /env/
22
+ /node_modules/.bin
23
+ /node_modules/ts-node
24
+ /node_modules/typescript
25
+ /appPackage/
26
+ /infra/
27
+ /devTools/
@@ -0,0 +1,11 @@
1
+ TEAMSFX_ENV=dev
2
+ APP_NAME_SUFFIX=dev
3
+
4
+ # Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups.
5
+ AZURE_SUBSCRIPTION_ID=
6
+ AZURE_RESOURCE_GROUP_NAME=
7
+ RESOURCE_SUFFIX=
8
+
9
+ TEAMS_APP_ID=
10
+ BOT_ENDPOINT=
11
+ BOT_DOMAIN=
@@ -0,0 +1,105 @@
1
+ @maxLength(20)
2
+ @minLength(4)
3
+ @description('Used to generate names for all resources in this file')
4
+ param resourceBaseName string
5
+
6
+ param webAppSku string
7
+
8
+ param serverfarmsName string = resourceBaseName
9
+ param webAppName string = resourceBaseName
10
+ param location string = resourceGroup().location
11
+ {{#hasAzureBot}}
12
+ @maxLength(42)
13
+ param botDisplayName string
14
+ {{/hasAzureBot}}
15
+
16
+ {{#hasAzureBot}}
17
+ resource identity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = {
18
+ location: location
19
+ name: resourceBaseName
20
+ }
21
+ {{/hasAzureBot}}
22
+
23
+
24
+ resource serverfarm 'Microsoft.Web/serverfarms@2021-02-01' = {
25
+ kind: 'app'
26
+ location: location
27
+ name: serverfarmsName
28
+ sku: {
29
+ name: webAppSku
30
+ }
31
+ }
32
+
33
+ resource webApp 'Microsoft.Web/sites@2021-02-01' = {
34
+ kind: 'app'
35
+ location: location
36
+ name: webAppName
37
+ properties: {
38
+ serverFarmId: serverfarm.id
39
+ httpsOnly: true
40
+ siteConfig: {
41
+ alwaysOn: true
42
+ appSettings: [
43
+ {
44
+ name: 'WEBSITE_RUN_FROM_PACKAGE'
45
+ value: '1' // Run Azure App Service from a package file
46
+ }
47
+ {
48
+ name: 'WEBSITE_NODE_DEFAULT_VERSION'
49
+ value: '~22' // Set NodeJS version to 22.x for your site
50
+ }
51
+ {
52
+ name: 'RUNNING_ON_AZURE'
53
+ value: '1'
54
+ }
55
+ {{#hasAzureBot}}
56
+ {
57
+ name: 'clientId'
58
+ value: identity.properties.clientId
59
+ }
60
+ {
61
+ name: 'tenantId'
62
+ value: identity.properties.tenantId
63
+ }
64
+ {
65
+ name: 'botType'
66
+ value: 'UserAssignedMsi'
67
+ }
68
+ {{/hasAzureBot}}
69
+ ]
70
+ ftpsState: 'FtpsOnly'
71
+ }
72
+ }
73
+ {{#hasAzureBot}}
74
+ identity: {
75
+ type: 'UserAssigned'
76
+ userAssignedIdentities: {
77
+ '${identity.id}': {}
78
+ }
79
+ }
80
+ {{/hasAzureBot}}
81
+ }
82
+
83
+ {{#hasAzureBot}}
84
+ // Register your web service as a bot with the Bot Framework
85
+ module azureBotRegistration './botRegistration/azurebot.bicep' = {
86
+ name: 'Azure-Bot-registration'
87
+ params: {
88
+ resourceBaseName: resourceBaseName
89
+ botDisplayName: botDisplayName
90
+ identityResourceId: identity.id
91
+ identityClientId: identity.properties.clientId
92
+ identityTenantId: identity.properties.tenantId
93
+ botAppDomain: webApp.properties.defaultHostName
94
+ }
95
+ }
96
+ {{/hasAzureBot}}
97
+
98
+ // The output will be persisted in .env.{envName}. Visit https://aka.ms/teamsfx-actions/arm-deploy for more details.
99
+ output AZURE_APP_SERVICE_RESOURCE_ID string = webApp.id // used in deploy stage
100
+ output BOT_DOMAIN string = webApp.properties.defaultHostName
101
+ output BOT_ENDPOINT string = 'https://${webApp.properties.defaultHostName}'
102
+ {{#hasAzureBot}}
103
+ output BOT_ID string = identity.properties.clientId
104
+ output BOT_TENANT_ID string = identity.properties.tenantId
105
+ {{/hasAzureBot}}
@@ -0,0 +1,17 @@
1
+ {
2
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3
+ "contentVersion": "1.0.0.0",
4
+ "parameters": {
5
+ {{#hasAzureBot}}
6
+ "botDisplayName": {
7
+ "value": "{{appName}}"
8
+ },
9
+ {{/hasAzureBot}}
10
+ "resourceBaseName": {
11
+ "value": "app$\{{RESOURCE_SUFFIX}}"
12
+ },
13
+ "webAppSku": {
14
+ "value": "B1"
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,42 @@
1
+ @maxLength(20)
2
+ @minLength(4)
3
+ @description('Used to generate names for all resources in this file')
4
+ param resourceBaseName string
5
+
6
+ @maxLength(42)
7
+ param botDisplayName string
8
+
9
+ param botServiceName string = resourceBaseName
10
+ param botServiceSku string = 'F0'
11
+ param identityResourceId string
12
+ param identityClientId string
13
+ param identityTenantId string
14
+ param botAppDomain string
15
+
16
+ // Register your web service as a bot with the Bot Framework
17
+ resource botService 'Microsoft.BotService/botServices@2021-03-01' = {
18
+ kind: 'azurebot'
19
+ location: 'global'
20
+ name: botServiceName
21
+ properties: {
22
+ displayName: botDisplayName
23
+ endpoint: 'https://${botAppDomain}/api/messages'
24
+ msaAppId: identityClientId
25
+ msaAppMSIResourceId: identityResourceId
26
+ msaAppTenantId:identityTenantId
27
+ msaAppType:'UserAssignedMSI'
28
+ }
29
+ sku: {
30
+ name: botServiceSku
31
+ }
32
+ }
33
+
34
+ // Connect the bot service to Microsoft Teams
35
+ resource botServiceMsTeamsChannel 'Microsoft.BotService/botServices/channels@2021-03-01' = {
36
+ parent: botService
37
+ location: 'global'
38
+ name: 'MsTeamsChannel'
39
+ properties: {
40
+ channelName: 'MsTeamsChannel'
41
+ }
42
+ }
@@ -0,0 +1 @@
1
+ The `azurebot.bicep` module is provided to help you create Azure Bot service when you don't use Azure to host your app. If you use Azure as infrastrcture for your app, `azure.bicep` under infra folder already leverages this module to create Azure Bot service for you. You don't need to deploy `azurebot.bicep` again.