@microsoft/teamsfx-core 3.0.10-alpha.bd1eea45e.0 → 3.0.10-alpha.edb63176e.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 (202) hide show
  1. package/build/client/graphClient.d.ts +1 -0
  2. package/build/client/graphClient.d.ts.map +1 -1
  3. package/build/client/teamsDevPortalClient.d.ts +1 -0
  4. package/build/client/teamsDevPortalClient.d.ts.map +1 -1
  5. package/build/common/featureFlags.d.ts +10 -20
  6. package/build/common/featureFlags.d.ts.map +1 -1
  7. package/build/common/featureFlags.js +12 -21
  8. package/build/common/featureFlags.js.map +1 -1
  9. package/build/common/telemetry.d.ts +2 -0
  10. package/build/common/telemetry.d.ts.map +1 -1
  11. package/build/common/telemetry.js +2 -0
  12. package/build/common/telemetry.js.map +1 -1
  13. package/build/common/templates-config.json +1 -1
  14. package/build/component/coordinator/index.d.ts.map +1 -1
  15. package/build/component/coordinator/index.js +0 -11
  16. package/build/component/coordinator/index.js.map +1 -1
  17. package/build/component/deps-checker/internal/dotnetChecker.d.ts +5 -1
  18. package/build/component/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
  19. package/build/component/deps-checker/internal/dotnetChecker.js +16 -8
  20. package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
  21. package/build/component/driver/deploy/spfx/utility/spoClient.d.ts +1 -0
  22. package/build/component/driver/deploy/spfx/utility/spoClient.d.ts.map +1 -1
  23. package/build/component/driver/devTool/httpClient.d.ts +1 -0
  24. package/build/component/driver/devTool/httpClient.d.ts.map +1 -1
  25. package/build/component/driver/devTool/nodeInstaller.d.ts +1 -0
  26. package/build/component/driver/devTool/nodeInstaller.d.ts.map +1 -1
  27. package/build/component/driver/script/scriptDriver.d.ts +1 -0
  28. package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
  29. package/build/component/driver/script/scriptDriver.js +1 -1
  30. package/build/component/driver/script/scriptDriver.js.map +1 -1
  31. package/build/component/driver/share/utils.d.ts.map +1 -1
  32. package/build/component/driver/share/utils.js +6 -0
  33. package/build/component/driver/share/utils.js.map +1 -1
  34. package/build/component/driver/teamsApp/constants.d.ts +1 -1
  35. package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
  36. package/build/component/driver/teamsApp/constants.js +2 -2
  37. package/build/component/driver/teamsApp/constants.js.map +1 -1
  38. package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts +1 -0
  39. package/build/component/driver/teamsApp/copyAppPackageToSPFx.d.ts.map +1 -1
  40. package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
  41. package/build/component/driver/teamsApp/createAppPackage.js +12 -1
  42. package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
  43. package/build/component/driver/teamsApp/interfaces/appdefinitions/appPackage.d.ts +1 -0
  44. package/build/component/driver/teamsApp/interfaces/appdefinitions/appPackage.d.ts.map +1 -1
  45. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -0
  46. package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
  47. package/build/component/generator/configFiles/configGenerator.d.ts +15 -0
  48. package/build/component/generator/configFiles/configGenerator.d.ts.map +1 -0
  49. package/build/component/generator/configFiles/configGenerator.js +168 -0
  50. package/build/component/generator/configFiles/configGenerator.js.map +1 -0
  51. package/build/component/generator/configFiles/copyPolicy.d.ts +12 -0
  52. package/build/component/generator/configFiles/copyPolicy.d.ts.map +1 -0
  53. package/build/component/generator/configFiles/copyPolicy.js +63 -0
  54. package/build/component/generator/configFiles/copyPolicy.js.map +1 -0
  55. package/build/component/generator/configFiles/jsonMerger.d.ts +11 -0
  56. package/build/component/generator/configFiles/jsonMerger.d.ts.map +1 -0
  57. package/build/component/generator/configFiles/jsonMerger.js +83 -0
  58. package/build/component/generator/configFiles/jsonMerger.js.map +1 -0
  59. package/build/component/generator/configFiles/renderTemplate.d.ts +2 -0
  60. package/build/component/generator/configFiles/renderTemplate.d.ts.map +1 -0
  61. package/build/component/generator/configFiles/renderTemplate.js +16 -0
  62. package/build/component/generator/configFiles/renderTemplate.js.map +1 -0
  63. package/build/component/generator/declarativeAgent/generator.d.ts +5 -0
  64. package/build/component/generator/declarativeAgent/generator.d.ts.map +1 -1
  65. package/build/component/generator/declarativeAgent/generator.js +76 -36
  66. package/build/component/generator/declarativeAgent/generator.js.map +1 -1
  67. package/build/component/generator/declarativeAgent/helper.d.ts.map +1 -1
  68. package/build/component/generator/declarativeAgent/helper.js +0 -1
  69. package/build/component/generator/declarativeAgent/helper.js.map +1 -1
  70. package/build/component/generator/generatorAction.d.ts +1 -0
  71. package/build/component/generator/generatorAction.d.ts.map +1 -1
  72. package/build/component/generator/openApiSpec/common.d.ts.map +1 -1
  73. package/build/component/generator/openApiSpec/common.js +11 -22
  74. package/build/component/generator/openApiSpec/common.js.map +1 -1
  75. package/build/component/generator/openApiSpec/kiota.d.ts +0 -6
  76. package/build/component/generator/openApiSpec/kiota.d.ts.map +1 -1
  77. package/build/component/generator/openApiSpec/kiota.js +2 -17
  78. package/build/component/generator/openApiSpec/kiota.js.map +1 -1
  79. package/build/component/generator/templates/templateInfo.d.ts +1 -1
  80. package/build/component/generator/templates/templateInfo.d.ts.map +1 -1
  81. package/build/component/generator/utils.d.ts +3 -2
  82. package/build/component/generator/utils.d.ts.map +1 -1
  83. package/build/component/generator/utils.js.map +1 -1
  84. package/build/component/m365/packageService.d.ts.map +1 -1
  85. package/build/component/m365/packageService.js +16 -20
  86. package/build/component/m365/packageService.js.map +1 -1
  87. package/build/component/middleware/envMW.d.ts.map +1 -1
  88. package/build/component/middleware/envMW.js +7 -0
  89. package/build/component/middleware/envMW.js.map +1 -1
  90. package/build/component/utils/envUtil.d.ts +1 -0
  91. package/build/component/utils/envUtil.d.ts.map +1 -1
  92. package/build/component/utils/odrProvider.d.ts +13 -0
  93. package/build/component/utils/odrProvider.d.ts.map +1 -1
  94. package/build/component/utils/odrProvider.js +25 -0
  95. package/build/component/utils/odrProvider.js.map +1 -1
  96. package/build/component/utils/pathUtils.d.ts +2 -1
  97. package/build/component/utils/pathUtils.d.ts.map +1 -1
  98. package/build/component/utils/pathUtils.js +19 -3
  99. package/build/component/utils/pathUtils.js.map +1 -1
  100. package/build/component/utils/settingsUtil.d.ts +1 -1
  101. package/build/component/utils/settingsUtil.d.ts.map +1 -1
  102. package/build/component/utils/settingsUtil.js +20 -7
  103. package/build/component/utils/settingsUtil.js.map +1 -1
  104. package/build/core/FxCore.d.ts +6 -2
  105. package/build/core/FxCore.d.ts.map +1 -1
  106. package/build/core/FxCore.declarativeAgent.d.ts +6 -0
  107. package/build/core/FxCore.declarativeAgent.d.ts.map +1 -0
  108. package/build/core/FxCore.declarativeAgent.js +210 -0
  109. package/build/core/FxCore.declarativeAgent.js.map +1 -0
  110. package/build/core/FxCore.js +45 -231
  111. package/build/core/FxCore.js.map +1 -1
  112. package/build/core/generateConfigFiles.d.ts +4 -0
  113. package/build/core/generateConfigFiles.d.ts.map +1 -0
  114. package/build/core/generateConfigFiles.js +64 -0
  115. package/build/core/generateConfigFiles.js.map +1 -0
  116. package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
  117. package/build/core/middleware/projectSettingsLoader.js +8 -2
  118. package/build/core/middleware/projectSettingsLoader.js.map +1 -1
  119. package/build/question/other.d.ts.map +1 -1
  120. package/build/question/other.js +0 -2
  121. package/build/question/other.js.map +1 -1
  122. package/build/question/questionNames.d.ts +0 -3
  123. package/build/question/questionNames.d.ts.map +1 -1
  124. package/build/question/questionNames.js +0 -3
  125. package/build/question/questionNames.js.map +1 -1
  126. package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts +0 -1
  127. package/build/question/scaffold/vsc/ProjectTypeOptions.d.ts.map +1 -1
  128. package/build/question/scaffold/vsc/ProjectTypeOptions.js +1 -14
  129. package/build/question/scaffold/vsc/ProjectTypeOptions.js.map +1 -1
  130. package/build/question/scaffold/vsc/createRootNode.d.ts.map +1 -1
  131. package/build/question/scaffold/vsc/createRootNode.js +1 -5
  132. package/build/question/scaffold/vsc/createRootNode.js.map +1 -1
  133. package/build/question/scaffold/vsc/daProjectTypeNode.d.ts.map +1 -1
  134. package/build/question/scaffold/vsc/daProjectTypeNode.js +1 -2
  135. package/build/question/scaffold/vsc/daProjectTypeNode.js.map +1 -1
  136. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.d.ts +0 -1
  137. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.d.ts.map +1 -1
  138. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.js +2 -51
  139. package/build/question/scaffold/vsc/officeAddinProjectTypeNode.js.map +1 -1
  140. package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
  141. package/build/question/scaffold/vsc/teamsProjectTypeNode.js +5 -16
  142. package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
  143. package/package.json +5 -5
  144. package/resource/package.nls.cs.json +4 -4
  145. package/resource/package.nls.de.json +16 -16
  146. package/resource/package.nls.es.json +15 -15
  147. package/resource/package.nls.fr.json +4 -4
  148. package/resource/package.nls.it.json +4 -4
  149. package/resource/package.nls.ja.json +5 -5
  150. package/resource/package.nls.json +4 -4
  151. package/resource/package.nls.ko.json +15 -15
  152. package/resource/package.nls.pl.json +15 -15
  153. package/resource/package.nls.pt-BR.json +11 -11
  154. package/resource/package.nls.ru.json +6 -6
  155. package/resource/package.nls.tr.json +4 -4
  156. package/resource/package.nls.zh-Hans.json +4 -4
  157. package/resource/package.nls.zh-Hant.json +9 -9
  158. package/templates/configs/local/python/.vscode/launch.json.tpl +93 -0
  159. package/templates/configs/local/python/.vscode/tasks.json.tpl +103 -0
  160. package/templates/configs/local/python/env/.env.local +6 -0
  161. package/templates/configs/local/python/m365agents.local.yml.tpl +121 -0
  162. package/templates/configs/local/typescript/.gitignore +1 -0
  163. package/templates/configs/local/typescript/.vscode/launch.json.tpl +147 -0
  164. package/templates/configs/local/typescript/.vscode/tasks.json.tpl +129 -0
  165. package/templates/configs/local/typescript/env/.env.local +6 -0
  166. package/templates/configs/local/typescript/m365agents.local.yml.tpl +129 -0
  167. package/templates/configs/local/typescript/package.json +8 -0
  168. package/templates/configs/playground/python/.vscode/launch.json +46 -0
  169. package/templates/configs/playground/python/.vscode/tasks.json +35 -0
  170. package/templates/configs/playground/python/env/.env.playground +7 -0
  171. package/templates/configs/playground/python/env/.env.playground.user +0 -0
  172. package/templates/configs/playground/python/m365agents.playground.yml +14 -0
  173. package/templates/configs/playground/typescript/.gitignore +4 -0
  174. package/templates/configs/playground/typescript/.vscode/launch.json +31 -0
  175. package/templates/configs/playground/typescript/.vscode/tasks.json +104 -0
  176. package/templates/configs/playground/typescript/env/.env.playground +7 -0
  177. package/templates/configs/playground/typescript/env/.env.playground.user +0 -0
  178. package/templates/configs/playground/typescript/m365agents.playground.yml +23 -0
  179. package/templates/configs/playground/typescript/package.json +9 -0
  180. package/templates/configs/remote/python/.vscode/launch.json.tpl +70 -0
  181. package/templates/configs/remote/python/.webappignore +11 -0
  182. package/templates/configs/remote/python/env/.env.dev +11 -0
  183. package/templates/configs/remote/python/infra/azure.bicep.tpl +108 -0
  184. package/templates/configs/remote/python/infra/azure.parameters.json.tpl +20 -0
  185. package/templates/configs/remote/python/infra/botRegistration/azurebot.bicep +42 -0
  186. package/templates/configs/remote/python/infra/botRegistration/readme.md +1 -0
  187. package/templates/configs/remote/python/m365agents.yml.tpl +131 -0
  188. package/templates/configs/remote/typescript/.vscode/launch.json.tpl +70 -0
  189. package/templates/configs/remote/typescript/.webappignore +27 -0
  190. package/templates/configs/remote/typescript/env/.env.dev +11 -0
  191. package/templates/configs/remote/typescript/infra/azure.bicep.tpl +105 -0
  192. package/templates/configs/remote/typescript/infra/azure.parameters.json.tpl +17 -0
  193. package/templates/configs/remote/typescript/infra/botRegistration/azurebot.bicep +42 -0
  194. package/templates/configs/remote/typescript/infra/botRegistration/readme.md +1 -0
  195. package/templates/configs/remote/typescript/m365agents.yml.tpl +142 -0
  196. package/templates/configs/remote/typescript/web.config +60 -0
  197. package/templates/fallback/common.zip +0 -0
  198. package/templates/fallback/csharp.zip +0 -0
  199. package/templates/fallback/js.zip +0 -0
  200. package/templates/fallback/python.zip +0 -0
  201. package/templates/fallback/ts.zip +0 -0
  202. package/templates/metadata.zip +0 -0
@@ -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.
@@ -0,0 +1,142 @@
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
+ # Run npm command
82
+ - uses: cli/runNpmCommand
83
+ name: install dependencies
84
+ with:
85
+ args: install
86
+
87
+ - uses: cli/runNpmCommand
88
+ name: build app
89
+ with:
90
+ args: run build --if-present
91
+
92
+ # Deploy your application to Azure App Service using the zip deploy feature.
93
+ # For additional details, refer to https://aka.ms/zip-deploy-to-app-services.
94
+ - uses: azureAppService/zipDeploy
95
+ with:
96
+ # Deploy base folder
97
+ artifactFolder: .
98
+ # Ignore file location, leave blank will ignore nothing
99
+ ignoreFile: .webappignore
100
+ # The resource id of the cloud resource to be deployed to.
101
+ # This key will be generated by arm/deploy action automatically.
102
+ # You can replace it with your existing Azure Resource id
103
+ # or add it to your environment variable file.
104
+ resourceId: $\{{AZURE_APP_SERVICE_RESOURCE_ID}}
105
+
106
+ publish:
107
+ # Validate using manifest schema
108
+ - uses: teamsApp/validateManifest
109
+ with:
110
+ # Path to manifest template
111
+ manifestPath: ./appPackage/manifest.json
112
+
113
+ # Build app package with latest env value
114
+ - uses: teamsApp/zipAppPackage
115
+ with:
116
+ # Path to manifest template
117
+ manifestPath: ./appPackage/manifest.json
118
+ outputZipPath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
119
+ outputFolder: ./appPackage/build
120
+
121
+ # Validate app package using validation rules
122
+ - uses: teamsApp/validateAppPackage
123
+ with:
124
+ # Relative path to this file. This is the path for built zip file.
125
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
126
+
127
+ # Apply the app manifest to an existing app in Developer Portal.
128
+ # Will use the app id in manifest file to determine which app to update.
129
+ - uses: teamsApp/update
130
+ with:
131
+ # Relative path to this file. This is the path for built zip file.
132
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
133
+
134
+ # Publish the app to Teams Admin Center (https://admin.teams.microsoft.com/policies/manage-apps)
135
+ # for review and approval
136
+ - uses: teamsApp/publishAppPackage
137
+ with:
138
+ appPackagePath: ./appPackage/build/appPackage.$\{{TEAMSFX_ENV}}.zip
139
+ # Write the information of created resources into environment file for
140
+ # the specified environment variable(s).
141
+ writeToEnvironmentFile:
142
+ publishedAppId: TEAMS_APP_PUBLISHED_APP_ID
@@ -0,0 +1,60 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!--
3
+ This configuration file is required if iisnode is used to run node processes behind
4
+ IIS or IIS Express. For more information, visit:
5
+
6
+ https://github.com/tjanczuk/iisnode/blob/master/lib/src/samples/configuration/web.config
7
+ -->
8
+
9
+ <configuration>
10
+ <system.webServer>
11
+ <webSocket enabled="false" />
12
+ <handlers>
13
+ <!-- Indicates that the server.js file is a node.js site to be handled by the iisnode module -->
14
+ <add name="iisnode" path="dist/index.js" verb="*" modules="iisnode"/>
15
+ </handlers>
16
+ <rewrite>
17
+ <rules>
18
+ <!-- Do not interfere with requests for node-inspector debugging -->
19
+ <rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
20
+ <match url="^dist/index.js\/debug[\/]?" />
21
+ </rule>
22
+
23
+ <!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
24
+ <rule name="StaticContent">
25
+ <action type="Rewrite" url="public{PATH_INFO}"/>
26
+ </rule>
27
+
28
+ <!-- All other URLs are mapped to the node.js site entry point -->
29
+ <rule name="DynamicContent">
30
+ <conditions>
31
+ <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
32
+ </conditions>
33
+ <action type="Rewrite" url="dist/index.js"/>
34
+ </rule>
35
+ </rules>
36
+ </rewrite>
37
+
38
+ <!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
39
+ <security>
40
+ <requestFiltering>
41
+ <hiddenSegments>
42
+ <remove segment="bin"/>
43
+ </hiddenSegments>
44
+ </requestFiltering>
45
+ </security>
46
+
47
+ <!-- Make sure error responses are left untouched -->
48
+ <httpErrors existingResponse="PassThrough" />
49
+
50
+ <!--
51
+ You can control how Node is hosted within IIS using the following options:
52
+ * watchedFiles: semi-colon separated list of files that will be watched for changes to restart the server
53
+ * node_env: will be propagated to node as NODE_ENV environment variable
54
+ * debuggingEnabled - controls whether the built-in debugger is enabled
55
+
56
+ See https://github.com/tjanczuk/iisnode/blob/master/lib/src/samples/configuration/web.config for a full list of options
57
+ -->
58
+ <!--<iisnode watchedFiles="web.config;*.js"/>-->
59
+ </system.webServer>
60
+ </configuration>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file