@microsoft/teamsfx-core 3.0.10-beta.2026011907.0 → 3.0.10-beta.2026012905.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.
- package/build/common/templates-config.json +2 -2
- package/build/component/driver/script/scriptDriver.js +1 -1
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/generator/configFiles/configGenerator.d.ts.map +1 -1
- package/build/component/generator/configFiles/configGenerator.js +1 -0
- package/build/component/generator/configFiles/configGenerator.js.map +1 -1
- package/build/component/generator/configFiles/copyPolicy.d.ts +2 -0
- package/build/component/generator/configFiles/copyPolicy.d.ts.map +1 -1
- package/build/component/generator/configFiles/copyPolicy.js +24 -2
- package/build/component/generator/configFiles/copyPolicy.js.map +1 -1
- package/build/core/generateConfigFiles.d.ts.map +1 -1
- package/build/core/generateConfigFiles.js +4 -1
- package/build/core/generateConfigFiles.js.map +1 -1
- package/package.json +4 -4
- package/resource/package.nls.cs.json +4 -5
- package/resource/package.nls.de.json +3 -4
- package/resource/package.nls.es.json +4 -5
- package/resource/package.nls.fr.json +3 -4
- package/resource/package.nls.it.json +4 -5
- package/resource/package.nls.ja.json +4 -5
- package/resource/package.nls.ko.json +3 -4
- package/resource/package.nls.pl.json +4 -5
- package/resource/package.nls.pt-BR.json +4 -5
- package/resource/package.nls.ru.json +3 -4
- package/resource/package.nls.tr.json +3 -4
- package/resource/package.nls.zh-Hans.json +4 -5
- package/resource/package.nls.zh-Hant.json +4 -5
- package/templates/configs/local/typescript/.vscode/launch.json.tpl +5 -5
- package/templates/configs/local/typescript/.vscode/tasks.json.tpl +1 -1
- package/templates/configs/remote/python/.vscode/launch.json.tpl +70 -0
- package/templates/configs/remote/python/.webappignore +11 -0
- package/templates/configs/remote/python/env/.env.dev +11 -0
- package/templates/configs/remote/python/infra/azure.bicep.tpl +108 -0
- package/templates/configs/remote/python/infra/azure.parameters.json.tpl +20 -0
- package/templates/configs/remote/python/infra/botRegistration/azurebot.bicep +42 -0
- package/templates/configs/remote/python/infra/botRegistration/readme.md +1 -0
- package/templates/configs/remote/python/m365agents.yml.tpl +131 -0
- package/templates/configs/remote/typescript/.vscode/launch.json.tpl +70 -0
- package/templates/configs/remote/typescript/.webappignore +27 -0
- package/templates/configs/remote/typescript/env/.env.dev +11 -0
- package/templates/configs/remote/typescript/infra/azure.bicep.tpl +105 -0
- package/templates/configs/remote/typescript/infra/azure.parameters.json.tpl +17 -0
- package/templates/configs/remote/typescript/infra/botRegistration/azurebot.bicep +42 -0
- package/templates/configs/remote/typescript/infra/botRegistration/readme.md +1 -0
- package/templates/configs/remote/typescript/m365agents.yml.tpl +142 -0
- package/templates/configs/remote/typescript/web.config +60 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- 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
|
package/templates/metadata.zip
CHANGED
|
Binary file
|