@microsoft/teamsfx-core 1.13.0 → 1.13.1-alpha.ae549cb45.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/deps-checker/depsChecker.d.ts +15 -5
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
- package/build/common/deps-checker/depsChecker.js.map +1 -1
- package/build/common/deps-checker/depsManager.d.ts +1 -15
- package/build/common/deps-checker/depsManager.d.ts.map +1 -1
- package/build/common/deps-checker/depsManager.js +4 -17
- package/build/common/deps-checker/depsManager.js.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.d.ts +4 -5
- package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/dotnetChecker.js +22 -19
- package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +11 -7
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +40 -28
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/ngrokChecker.d.ts +4 -6
- package/build/common/deps-checker/internal/ngrokChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/ngrokChecker.js +21 -13
- package/build/common/deps-checker/internal/ngrokChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts +8 -6
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +44 -48
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/component/bicep.d.ts +4 -4
- package/build/component/bicep.d.ts.map +1 -1
- package/build/component/bicep.js +29 -79
- package/build/component/bicep.js.map +1 -1
- package/build/component/code/apiCode.d.ts +4 -4
- package/build/component/code/apiCode.d.ts.map +1 -1
- package/build/component/code/apiCode.js +56 -70
- package/build/component/code/apiCode.js.map +1 -1
- package/build/component/code/botCode.d.ts +4 -4
- package/build/component/code/botCode.d.ts.map +1 -1
- package/build/component/code/botCode.js +127 -136
- package/build/component/code/botCode.js.map +1 -1
- package/build/component/code/spfxTabCode.d.ts +3 -3
- package/build/component/code/spfxTabCode.d.ts.map +1 -1
- package/build/component/code/spfxTabCode.js +25 -28
- package/build/component/code/spfxTabCode.js.map +1 -1
- package/build/component/code/tabCode.d.ts +5 -5
- package/build/component/code/tabCode.d.ts.map +1 -1
- package/build/component/code/tabCode.js +139 -160
- package/build/component/code/tabCode.js.map +1 -1
- package/build/component/connection/apimConfig.d.ts +0 -2
- package/build/component/connection/apimConfig.d.ts.map +1 -1
- package/build/component/connection/apimConfig.js +2 -16
- package/build/component/connection/apimConfig.js.map +1 -1
- package/build/component/connection/azureFunctionConfig.d.ts +0 -2
- package/build/component/connection/azureFunctionConfig.d.ts.map +1 -1
- package/build/component/connection/azureFunctionConfig.js +2 -15
- package/build/component/connection/azureFunctionConfig.js.map +1 -1
- package/build/component/connection/azureResourceConfig.d.ts +2 -2
- package/build/component/connection/azureResourceConfig.d.ts.map +1 -1
- package/build/component/connection/azureResourceConfig.js +43 -60
- package/build/component/connection/azureResourceConfig.js.map +1 -1
- package/build/component/connection/azureWebAppConfig.d.ts +0 -2
- package/build/component/connection/azureWebAppConfig.d.ts.map +1 -1
- package/build/component/connection/azureWebAppConfig.js +2 -14
- package/build/component/connection/azureWebAppConfig.js.map +1 -1
- package/build/component/constants.d.ts +1 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +6 -1
- package/build/component/constants.js.map +1 -1
- package/build/component/core.d.ts +22 -25
- package/build/component/core.d.ts.map +1 -1
- package/build/component/core.js +442 -449
- package/build/component/core.js.map +1 -1
- package/build/component/debug.d.ts +1 -7
- package/build/component/debug.d.ts.map +1 -1
- package/build/component/debug.js +1 -70
- package/build/component/debug.js.map +1 -1
- package/build/component/envManager.d.ts +2 -5
- package/build/component/envManager.d.ts.map +1 -1
- package/build/component/envManager.js +10 -129
- package/build/component/envManager.js.map +1 -1
- package/build/component/feature/api.d.ts +1 -7
- package/build/component/feature/api.d.ts.map +1 -1
- package/build/component/feature/api.js +112 -145
- package/build/component/feature/api.js.map +1 -1
- package/build/component/feature/apim.d.ts.map +1 -1
- package/build/component/feature/apim.js +64 -86
- package/build/component/feature/apim.js.map +1 -1
- package/build/component/feature/bot.d.ts +3 -12
- package/build/component/feature/bot.d.ts.map +1 -1
- package/build/component/feature/bot.js +221 -210
- package/build/component/feature/bot.js.map +1 -1
- package/build/component/feature/keyVault.d.ts.map +1 -1
- package/build/component/feature/keyVault.js +48 -101
- package/build/component/feature/keyVault.js.map +1 -1
- package/build/component/feature/spfx.d.ts.map +1 -1
- package/build/component/feature/spfx.js +52 -55
- package/build/component/feature/spfx.js.map +1 -1
- package/build/component/feature/sql.d.ts +0 -6
- package/build/component/feature/sql.d.ts.map +1 -1
- package/build/component/feature/sql.js +57 -113
- package/build/component/feature/sql.js.map +1 -1
- package/build/component/feature/sso.d.ts +5 -7
- package/build/component/feature/sso.d.ts.map +1 -1
- package/build/component/feature/sso.js +101 -175
- package/build/component/feature/sso.js.map +1 -1
- package/build/component/feature/tab.d.ts +1 -6
- package/build/component/feature/tab.d.ts.map +1 -1
- package/build/component/feature/tab.js +165 -197
- package/build/component/feature/tab.js.map +1 -1
- package/build/component/messages.d.ts +3 -0
- package/build/component/messages.d.ts.map +1 -1
- package/build/component/messages.js +3 -0
- package/build/component/messages.js.map +1 -1
- package/build/component/middleware/actionExecutionMW.d.ts +20 -0
- package/build/component/middleware/actionExecutionMW.d.ts.map +1 -0
- package/build/component/middleware/actionExecutionMW.js +100 -0
- package/build/component/middleware/actionExecutionMW.js.map +1 -0
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +2 -26
- package/build/component/migrate.js.map +1 -1
- package/build/component/questionV3.d.ts +1 -0
- package/build/component/questionV3.d.ts.map +1 -1
- package/build/component/questionV3.js +42 -10
- package/build/component/questionV3.js.map +1 -1
- package/build/component/resource/aadApp/aadApp.d.ts +7 -7
- package/build/component/resource/aadApp/aadApp.d.ts.map +1 -1
- package/build/component/resource/aadApp/aadApp.js +56 -18
- package/build/component/resource/aadApp/aadApp.js.map +1 -1
- package/build/component/resource/aadApp/actions/configure.js +2 -2
- package/build/component/resource/aadApp/actions/configure.js.map +1 -1
- package/build/component/resource/aadApp/actions/deploy.d.ts +3 -0
- package/build/component/resource/aadApp/actions/deploy.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/deploy.js +70 -0
- package/build/component/resource/aadApp/actions/deploy.js.map +1 -0
- package/build/component/resource/aadApp/actions/generateManifest.d.ts.map +1 -1
- package/build/component/resource/aadApp/actions/generateManifest.js +3 -1
- package/build/component/resource/aadApp/actions/generateManifest.js.map +1 -1
- package/build/component/resource/aadApp/actions/provision.d.ts +1 -2
- package/build/component/resource/aadApp/actions/provision.d.ts.map +1 -1
- package/build/component/resource/aadApp/actions/provision.js +3 -33
- package/build/component/resource/aadApp/actions/provision.js.map +1 -1
- package/build/component/resource/aadApp/actions/setApplication.js +2 -2
- package/build/component/resource/aadApp/actions/setApplication.js.map +1 -1
- package/build/component/resource/aadApp/actions/utils.d.ts +3 -0
- package/build/component/resource/aadApp/actions/utils.d.ts.map +1 -0
- package/build/component/resource/aadApp/actions/utils.js +38 -0
- package/build/component/resource/aadApp/actions/utils.js.map +1 -0
- package/build/component/resource/apim.d.ts +4 -5
- package/build/component/resource/apim.d.ts.map +1 -1
- package/build/component/resource/apim.js +21 -63
- package/build/component/resource/apim.js.map +1 -1
- package/build/component/resource/appManifest/appManifest.d.ts +5 -5
- package/build/component/resource/appManifest/appManifest.d.ts.map +1 -1
- package/build/component/resource/appManifest/appManifest.js +82 -117
- package/build/component/resource/appManifest/appManifest.js.map +1 -1
- package/build/component/resource/azureAppService/azureAppService.d.ts +3 -3
- package/build/component/resource/azureAppService/azureAppService.d.ts.map +1 -1
- package/build/component/resource/azureAppService/azureAppService.js +24 -36
- package/build/component/resource/azureAppService/azureAppService.js.map +1 -1
- package/build/component/resource/azureAppService/azureFunction.d.ts +2 -2
- package/build/component/resource/azureAppService/azureFunction.d.ts.map +1 -1
- package/build/component/resource/azureAppService/azureFunction.js +2 -25
- package/build/component/resource/azureAppService/azureFunction.js.map +1 -1
- package/build/component/resource/azureResource.d.ts +2 -2
- package/build/component/resource/azureResource.d.ts.map +1 -1
- package/build/component/resource/azureResource.js +29 -47
- package/build/component/resource/azureResource.js.map +1 -1
- package/build/component/resource/azureSql/actions/configure.d.ts.map +1 -1
- package/build/component/resource/azureSql/azureSql.d.ts +4 -4
- package/build/component/resource/azureSql/azureSql.d.ts.map +1 -1
- package/build/component/resource/azureSql/azureSql.js +41 -7
- package/build/component/resource/azureSql/azureSql.js.map +1 -1
- package/build/component/resource/azureStorage.d.ts +3 -3
- package/build/component/resource/azureStorage.d.ts.map +1 -1
- package/build/component/resource/azureStorage.js +45 -56
- package/build/component/resource/azureStorage.js.map +1 -1
- package/build/component/resource/botService.d.ts +4 -4
- package/build/component/resource/botService.d.ts.map +1 -1
- package/build/component/resource/botService.js +66 -74
- package/build/component/resource/botService.js.map +1 -1
- package/build/component/resource/identity.d.ts.map +1 -1
- package/build/component/resource/identity.js +9 -4
- package/build/component/resource/identity.js.map +1 -1
- package/build/component/resource/spfx.d.ts +2 -2
- package/build/component/resource/spfx.d.ts.map +1 -1
- package/build/component/resource/spfx.js +23 -34
- package/build/component/resource/spfx.js.map +1 -1
- package/build/component/utils.d.ts +12 -1
- package/build/component/utils.d.ts.map +1 -1
- package/build/component/utils.js +108 -45
- package/build/component/utils.js.map +1 -1
- package/build/component/workflow.d.ts +2 -1
- package/build/component/workflow.d.ts.map +1 -1
- package/build/component/workflow.js +41 -29
- package/build/component/workflow.js.map +1 -1
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +9 -65
- package/build/core/FxCore.js.map +1 -1
- package/build/core/middleware/questionModel.d.ts.map +1 -1
- package/build/core/middleware/questionModel.js +19 -5
- package/build/core/middleware/questionModel.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/plugin.js +6 -3
- package/build/plugins/resource/frontend/dotnet/plugin.js.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts +2 -1
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.d.ts.map +1 -1
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js +3 -2
- package/build/plugins/resource/frontend/dotnet/resources/templateInfo.js.map +1 -1
- package/build/plugins/solution/fx-solution/solution.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/solution.js +1 -1
- package/build/plugins/solution/fx-solution/solution.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js +1 -1
- package/build/plugins/solution/fx-solution/v2/provisionLocal.js.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.d.ts +2 -2
- package/build/plugins/solution/fx-solution/v2/utils.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v2/utils.js +19 -6
- package/build/plugins/solution/fx-solution/v2/utils.js.map +1 -1
- package/build/plugins/solution/fx-solution/v3/provision.d.ts.map +1 -1
- package/build/plugins/solution/fx-solution/v3/provision.js +41 -30
- package/build/plugins/solution/fx-solution/v3/provision.js.map +1 -1
- package/package.json +4 -4
- package/resource/package.nls.cs.json +20 -16
- package/resource/package.nls.de.json +20 -16
- package/resource/package.nls.es.json +21 -17
- package/resource/package.nls.fr.json +20 -16
- package/resource/package.nls.it.json +20 -16
- package/resource/package.nls.ja.json +21 -17
- package/resource/package.nls.json +3 -1
- package/resource/package.nls.ko.json +21 -17
- package/resource/package.nls.pl.json +21 -17
- package/resource/package.nls.pt-BR.json +21 -17
- package/resource/package.nls.ru.json +21 -17
- package/resource/package.nls.tr.json +21 -17
- package/resource/package.nls.zh-Hans.json +21 -17
- package/resource/package.nls.zh-Hant.json +21 -17
- package/templates/bicep/apim.config.module.bicep +2 -2
- package/templates/bicep/azureFunction.config.module.bicep +7 -4
- package/templates/bicep/azureFunction.config.orchestration.bicep +2 -2
- package/templates/bicep/azureFunction.provision.orchestration.bicep +5 -0
- package/templates/bicep/azureStorage.provision.orchestration.bicep +6 -0
- package/templates/bicep/azureWebApp.config.module.bicep +5 -5
- package/templates/bicep/azureWebApp.config.orchestration.bicep +1 -1
- package/templates/bicep/azureWebApp.provision.orchestration.bicep +5 -0
- package/templates/fallback/bot.csharp.command-and-response.zip +0 -0
- package/templates/fallback/bot.csharp.default.zip +0 -0
- package/templates/fallback/bot.csharp.notification-function-base.zip +0 -0
- package/templates/fallback/bot.csharp.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.csharp.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.csharp.notification-webapi.zip +0 -0
- package/templates/fallback/bot.js.command-and-response.zip +0 -0
- package/templates/fallback/bot.js.default.zip +0 -0
- package/templates/fallback/bot.js.m365.zip +0 -0
- package/templates/fallback/bot.js.notification-function-base.zip +0 -0
- package/templates/fallback/bot.js.notification-restify.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.js.notification-trigger-timer.zip +0 -0
- package/templates/fallback/bot.ts.command-and-response.zip +0 -0
- package/templates/fallback/bot.ts.default.zip +0 -0
- package/templates/fallback/bot.ts.m365.zip +0 -0
- package/templates/fallback/bot.ts.notification-function-base.zip +0 -0
- package/templates/fallback/bot.ts.notification-restify.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-http.zip +0 -0
- package/templates/fallback/bot.ts.notification-trigger-timer.zip +0 -0
- package/templates/fallback/function-base.js.default.zip +0 -0
- package/templates/fallback/function-base.ts.default.zip +0 -0
- package/templates/fallback/function-triggers.js.HTTPTrigger.zip +0 -0
- package/templates/fallback/function-triggers.ts.HTTPTrigger.zip +0 -0
- package/templates/fallback/tab.csharp.default.zip +0 -0
- package/templates/fallback/tab.csharp.non-sso.zip +0 -0
- package/templates/fallback/tab.js.default.zip +0 -0
- package/templates/fallback/tab.js.m365.zip +0 -0
- package/templates/fallback/tab.js.non-sso.zip +0 -0
- package/templates/fallback/tab.ts.default.zip +0 -0
- package/templates/fallback/tab.ts.m365.zip +0 -0
- package/templates/fallback/tab.ts.non-sso.zip +0 -0
- package/build/component/fx/preDeployAction.d.ts +0 -7
- package/build/component/fx/preDeployAction.d.ts.map +0 -1
- package/build/component/fx/preDeployAction.js +0 -28
- package/build/component/fx/preDeployAction.js.map +0 -1
- package/build/component/fx/preProvisionAction.d.ts +0 -7
- package/build/component/fx/preProvisionAction.d.ts.map +0 -1
- package/build/component/fx/preProvisionAction.js +0 -71
- package/build/component/fx/preProvisionAction.js.map +0 -1
|
@@ -7,12 +7,14 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
8
|
require("reflect-metadata");
|
|
9
9
|
const typedi_1 = require("typedi");
|
|
10
|
-
const
|
|
11
|
-
const workflow_1 = require("../workflow");
|
|
10
|
+
const utils_1 = require("../../common/utils");
|
|
12
11
|
require("../connection/azureWebAppConfig");
|
|
12
|
+
const constants_1 = require("../constants");
|
|
13
|
+
const messages_1 = require("../messages");
|
|
13
14
|
require("../resource/azureSql");
|
|
14
15
|
require("../resource/identity");
|
|
15
|
-
const
|
|
16
|
+
const utils_2 = require("../utils");
|
|
17
|
+
const workflow_1 = require("../workflow");
|
|
16
18
|
let KeyVaultFeature = class KeyVaultFeature {
|
|
17
19
|
constructor() {
|
|
18
20
|
this.name = "key-vault-feature";
|
|
@@ -24,106 +26,51 @@ let KeyVaultFeature = class KeyVaultFeature {
|
|
|
24
26
|
* 4. persist bicep
|
|
25
27
|
*/
|
|
26
28
|
add(context, inputs) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
});
|
|
70
|
-
remarks.push("connect 'key-vault' to component 'azure-web-app' in projectSettings");
|
|
71
|
-
}
|
|
72
|
-
if (functionComponents) {
|
|
73
|
-
functionComponents.forEach((component) => {
|
|
74
|
-
var _a;
|
|
75
|
-
(_a = component.connections) !== null && _a !== void 0 ? _a : (component.connections = []);
|
|
76
|
-
component.connections.push(constants_1.ComponentNames.KeyVault);
|
|
77
|
-
});
|
|
78
|
-
remarks.push("connect 'key-vault' to component 'azure-function' in projectSettings");
|
|
79
|
-
}
|
|
80
|
-
return teamsfx_api_1.ok([
|
|
81
|
-
{
|
|
82
|
-
type: "file",
|
|
83
|
-
operate: "replace",
|
|
84
|
-
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
85
|
-
remarks: remarks.join(";"),
|
|
86
|
-
},
|
|
87
|
-
]);
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: "call:key-vault.generateBicep",
|
|
92
|
-
type: "call",
|
|
93
|
-
required: true,
|
|
94
|
-
targetAction: "key-vault.generateBicep",
|
|
95
|
-
inputs: {
|
|
96
|
-
scenario: "",
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
];
|
|
100
|
-
webAppComponents === null || webAppComponents === void 0 ? void 0 : webAppComponents.forEach((component) => actions.push({
|
|
101
|
-
name: "call:azure-web-app-config.generateBicep",
|
|
102
|
-
type: "call",
|
|
103
|
-
required: true,
|
|
104
|
-
targetAction: "azure-web-app-config.generateBicep",
|
|
105
|
-
inputs: {
|
|
106
|
-
update: true,
|
|
107
|
-
scenario: component.scenario,
|
|
108
|
-
},
|
|
109
|
-
}));
|
|
110
|
-
functionComponents === null || functionComponents === void 0 ? void 0 : functionComponents.forEach((component) => actions.push({
|
|
111
|
-
name: "call:azure-function-config.generateBicep",
|
|
112
|
-
type: "call",
|
|
113
|
-
required: true,
|
|
114
|
-
targetAction: "azure-function-config.generateBicep",
|
|
115
|
-
inputs: {
|
|
116
|
-
update: true,
|
|
117
|
-
scenario: component.scenario,
|
|
29
|
+
const action = {
|
|
30
|
+
name: "key-vault-feature.add",
|
|
31
|
+
type: "function",
|
|
32
|
+
execute: async (context, inputs) => {
|
|
33
|
+
const projectSettings = context.projectSetting;
|
|
34
|
+
const keyVaultComponent = workflow_1.getComponent(projectSettings, constants_1.ComponentNames.KeyVault);
|
|
35
|
+
if (keyVaultComponent)
|
|
36
|
+
return teamsfx_api_1.ok([]);
|
|
37
|
+
const effects = [];
|
|
38
|
+
// config
|
|
39
|
+
projectSettings.components.push({
|
|
40
|
+
name: constants_1.ComponentNames.KeyVault,
|
|
41
|
+
connections: [constants_1.ComponentNames.Identity],
|
|
42
|
+
provision: true,
|
|
43
|
+
});
|
|
44
|
+
effects.push(messages_1.Plans.addFeature("key-vault"));
|
|
45
|
+
// bicep.init
|
|
46
|
+
{
|
|
47
|
+
const bicepComponent = typedi_1.Container.get("bicep");
|
|
48
|
+
const res = await bicepComponent.init(inputs.projectPath);
|
|
49
|
+
if (res.isErr())
|
|
50
|
+
return teamsfx_api_1.err(res.error);
|
|
51
|
+
}
|
|
52
|
+
// key-vault provision bicep
|
|
53
|
+
{
|
|
54
|
+
const keyVaultComponent = typedi_1.Container.get(constants_1.ComponentNames.KeyVault);
|
|
55
|
+
const res = await keyVaultComponent.generateBicep(context, inputs);
|
|
56
|
+
if (res.isErr())
|
|
57
|
+
return teamsfx_api_1.err(res.error);
|
|
58
|
+
effects.push("generate key-vault provision bicep");
|
|
59
|
+
const persistRes = await utils_2.bicepUtils.persistBiceps(inputs.projectPath, utils_1.convertToAlphanumericOnly(context.projectSetting.appName), res.value);
|
|
60
|
+
if (persistRes.isErr())
|
|
61
|
+
return persistRes;
|
|
62
|
+
}
|
|
63
|
+
// generate config bicep
|
|
64
|
+
{
|
|
65
|
+
const res = await utils_2.generateConfigBiceps(context, inputs);
|
|
66
|
+
if (res.isErr())
|
|
67
|
+
return teamsfx_api_1.err(res.error);
|
|
68
|
+
effects.push("update config biceps");
|
|
69
|
+
}
|
|
70
|
+
return teamsfx_api_1.ok(effects);
|
|
118
71
|
},
|
|
119
|
-
}));
|
|
120
|
-
const group = {
|
|
121
|
-
type: "group",
|
|
122
|
-
name: "key-vault.add",
|
|
123
|
-
mode: "sequential",
|
|
124
|
-
actions: actions,
|
|
125
72
|
};
|
|
126
|
-
return teamsfx_api_1.ok(
|
|
73
|
+
return teamsfx_api_1.ok(action);
|
|
127
74
|
}
|
|
128
75
|
};
|
|
129
76
|
KeyVaultFeature = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyVault.js","sourceRoot":"","sources":["../../../src/component/feature/keyVault.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"keyVault.js","sourceRoot":"","sources":["../../../src/component/feature/keyVault.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAWgC;AAChC,4BAA0B;AAC1B,mCAA4C;AAC5C,8CAA+D;AAE/D,2CAAyC;AACzC,4CAA8C;AAC9C,0CAAoC;AACpC,gCAA8B;AAC9B,gCAA8B;AAE9B,oCAA4D;AAC5D,0CAA2C;AAG3C,IAAa,eAAe,GAA5B,MAAa,eAAe;I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AC;oBACnE,IAAI,GAAG,CAAC,KAAK,EAAE;wBAAE,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACvC,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;oBACnD,MAAM,UAAU,GAAG,MAAM,kBAAU,CAAC,aAAa,CAC/C,MAAM,CAAC,WAAW,EAClB,iCAAyB,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,EACzD,GAAG,CAAC,KAAK,CACV,CAAC;oBACF,IAAI,UAAU,CAAC,KAAK,EAAE;wBAAE,OAAO,UAAU,CAAC;iBAC3C;gBAED,wBAAwB;gBACxB;oBACE,MAAM,GAAG,GAAG,MAAM,4BAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBACxD,IAAI,GAAG,CAAC,KAAK,EAAE;wBAAE,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACvC,OAAO,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;iBACtC;gBAED,OAAO,gBAAE,CAAC,OAAO,CAAC,CAAC;YACrB,CAAC;SACF,CAAC;QACF,OAAO,gBAAE,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AA7DY,eAAe;IAD3B,gBAAO,CAAC,mBAAmB,CAAC;GAChB,eAAe,CA6D3B;AA7DY,0CAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spfx.d.ts","sourceRoot":"","sources":["../../../src/component/feature/spfx.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,MAAM,EACN,SAAS,
|
|
1
|
+
{"version":3,"file":"spfx.d.ts","sourceRoot":"","sources":["../../../src/component/feature/spfx.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,MAAM,EACN,SAAS,EAET,OAAO,EACP,qBAAqB,EACrB,YAAY,EAIZ,MAAM,EACP,MAAM,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAa1B,qBACa,OAAO;IAClB,IAAI,SAA0B;IAC9B,GAAG,CACD,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,YAAY,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;CAuDrD"}
|
|
@@ -6,75 +6,72 @@ exports.SPFxTab = void 0;
|
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
8
|
require("reflect-metadata");
|
|
9
|
-
const typedi_1 = require("typedi");
|
|
9
|
+
const typedi_1 = tslib_1.__importStar(require("typedi"));
|
|
10
10
|
const projectSettingsHelper_1 = require("../../common/projectSettingsHelper");
|
|
11
11
|
const globalVars_1 = require("../../core/globalVars");
|
|
12
12
|
const question_1 = require("../../core/question");
|
|
13
13
|
const questions_1 = require("../../plugins/resource/spfx/utils/questions");
|
|
14
14
|
const constants_1 = require("../constants");
|
|
15
|
+
const debug_1 = require("../debug");
|
|
15
16
|
let SPFxTab = class SPFxTab {
|
|
16
17
|
constructor() {
|
|
17
18
|
this.name = constants_1.ComponentNames.SPFxTab;
|
|
18
19
|
}
|
|
19
20
|
add(context, inputs) {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return teamsfx_api_1.ok(spfx_frontend_host);
|
|
35
|
-
},
|
|
36
|
-
plan: (context, inputs) => {
|
|
37
|
-
return teamsfx_api_1.ok(["config 'teams-tab' in projectSettings"]);
|
|
38
|
-
},
|
|
39
|
-
execute: async (context, inputs) => {
|
|
40
|
-
const projectSettings = context.projectSetting;
|
|
41
|
-
// add teams-tab
|
|
42
|
-
projectSettings.components.push({
|
|
43
|
-
name: "teams-tab",
|
|
44
|
-
hosting: constants_1.ComponentNames.SPFx,
|
|
45
|
-
deploy: true,
|
|
46
|
-
});
|
|
47
|
-
// add hosting component
|
|
48
|
-
projectSettings.components.push({
|
|
49
|
-
name: inputs.hosting,
|
|
50
|
-
provision: true,
|
|
51
|
-
});
|
|
52
|
-
projectSettings.programmingLanguage =
|
|
53
|
-
projectSettings.programmingLanguage || inputs[question_1.CoreQuestionNames.ProgrammingLanguage];
|
|
54
|
-
globalVars_1.globalVars.isVS = projectSettingsHelper_1.isVSProject(projectSettings);
|
|
55
|
-
return teamsfx_api_1.ok(["config 'teams-tab' in projectSettings"]);
|
|
56
|
-
},
|
|
21
|
+
const action = {
|
|
22
|
+
name: "spfx-tab.add",
|
|
23
|
+
type: "function",
|
|
24
|
+
question: (context, inputs) => {
|
|
25
|
+
const spfx_frontend_host = new teamsfx_api_1.QTreeNode({
|
|
26
|
+
type: "group",
|
|
27
|
+
});
|
|
28
|
+
const spfx_version_check = new teamsfx_api_1.QTreeNode(questions_1.versionCheckQuestion);
|
|
29
|
+
spfx_frontend_host.addChild(spfx_version_check);
|
|
30
|
+
const spfx_framework_type = new teamsfx_api_1.QTreeNode(questions_1.frameworkQuestion);
|
|
31
|
+
spfx_version_check.addChild(spfx_framework_type);
|
|
32
|
+
const spfx_webpart_name = new teamsfx_api_1.QTreeNode(questions_1.webpartNameQuestion);
|
|
33
|
+
spfx_version_check.addChild(spfx_webpart_name);
|
|
34
|
+
return teamsfx_api_1.ok(spfx_frontend_host);
|
|
57
35
|
},
|
|
58
|
-
{
|
|
59
|
-
|
|
60
|
-
type: "call",
|
|
61
|
-
required: true,
|
|
62
|
-
targetAction: "spfx-tab-code.generate",
|
|
36
|
+
plan: (context, inputs) => {
|
|
37
|
+
return teamsfx_api_1.ok(["config 'teams-tab' in projectSettings"]);
|
|
63
38
|
},
|
|
64
|
-
{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
39
|
+
execute: async (context, inputs) => {
|
|
40
|
+
const projectSettings = context.projectSetting;
|
|
41
|
+
// add teams-tab
|
|
42
|
+
projectSettings.components.push({
|
|
43
|
+
name: "teams-tab",
|
|
44
|
+
hosting: constants_1.ComponentNames.SPFx,
|
|
45
|
+
deploy: true,
|
|
46
|
+
folder: inputs.folder || "SPFx",
|
|
47
|
+
build: true,
|
|
48
|
+
});
|
|
49
|
+
// add hosting component
|
|
50
|
+
projectSettings.components.push({
|
|
51
|
+
name: constants_1.ComponentNames.SPFx,
|
|
52
|
+
provision: true,
|
|
53
|
+
});
|
|
54
|
+
projectSettings.programmingLanguage =
|
|
55
|
+
projectSettings.programmingLanguage || inputs[question_1.CoreQuestionNames.ProgrammingLanguage];
|
|
56
|
+
globalVars_1.globalVars.isVS = projectSettingsHelper_1.isVSProject(projectSettings);
|
|
57
|
+
const effects = ["config 'teams-tab' in projectSettings"];
|
|
58
|
+
{
|
|
59
|
+
const spfxCode = typedi_1.default.get(constants_1.ComponentNames.SPFxTabCode);
|
|
60
|
+
const res = await spfxCode.generate(context, inputs);
|
|
61
|
+
if (res.isErr())
|
|
62
|
+
return teamsfx_api_1.err(res.error);
|
|
63
|
+
effects.push("scaffold spfx code");
|
|
64
|
+
}
|
|
65
|
+
{
|
|
66
|
+
const res = await debug_1.generateLocalDebugSettings(context, inputs);
|
|
67
|
+
if (res.isErr())
|
|
68
|
+
return teamsfx_api_1.err(res.error);
|
|
69
|
+
effects.push("generate local debug settings");
|
|
70
|
+
}
|
|
71
|
+
return teamsfx_api_1.ok(effects);
|
|
69
72
|
},
|
|
70
|
-
];
|
|
71
|
-
const group = {
|
|
72
|
-
type: "group",
|
|
73
|
-
name: `${this.name}.add`,
|
|
74
|
-
mode: "sequential",
|
|
75
|
-
actions: actions,
|
|
76
73
|
};
|
|
77
|
-
return teamsfx_api_1.ok(
|
|
74
|
+
return teamsfx_api_1.ok(action);
|
|
78
75
|
}
|
|
79
76
|
};
|
|
80
77
|
SPFxTab = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spfx.js","sourceRoot":"","sources":["../../../src/component/feature/spfx.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAWgC;AAChC,4BAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"spfx.js","sourceRoot":"","sources":["../../../src/component/feature/spfx.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAWgC;AAChC,4BAA0B;AAC1B,yDAA4C;AAC5C,8EAAiE;AACjE,sDAAmD;AACnD,kDAAwD;AACxD,2EAIqD;AAErD,4CAA8C;AAC9C,oCAAsD;AAEtD,IAAa,OAAO,GAApB,MAAa,OAAO;IAApB;QACE,SAAI,GAAG,0BAAc,CAAC,OAAO,CAAC;IA2DhC,CAAC;IA1DC,GAAG,CACD,OAAkB,EAClB,MAA6B;QAE7B,MAAM,MAAM,GAAW;YACrB,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,UAAU;YAChB,QAAQ,EAAE,CAAC,OAAkB,EAAE,MAA6B,EAAE,EAAE;gBAC9D,MAAM,kBAAkB,GAAG,IAAI,uBAAS,CAAC;oBACvC,IAAI,EAAE,OAAO;iBACd,CAAC,CAAC;gBACH,MAAM,kBAAkB,GAAG,IAAI,uBAAS,CAAC,gCAAoB,CAAC,CAAC;gBAC/D,kBAAkB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC;gBAChD,MAAM,mBAAmB,GAAG,IAAI,uBAAS,CAAC,6BAAiB,CAAC,CAAC;gBAC7D,kBAAkB,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;gBACjD,MAAM,iBAAiB,GAAG,IAAI,uBAAS,CAAC,+BAAmB,CAAC,CAAC;gBAC7D,kBAAkB,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;gBAC/C,OAAO,gBAAE,CAAC,kBAAkB,CAAC,CAAC;YAChC,CAAC;YACD,IAAI,EAAE,CAAC,OAAkB,EAAE,MAA6B,EAAE,EAAE;gBAC1D,OAAO,g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BAAE,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACvC,OAAO,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAC;iBAC/C;gBAED,OAAO,gBAAE,CAAC,OAAO,CAAC,CAAC;YACrB,CAAC;SACF,CAAC;QACF,OAAO,gBAAE,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AA5DY,OAAO;IADnB,gBAAO,CAAC,0BAAc,CAAC,OAAO,CAAC;GACnB,OAAO,CA4DnB;AA5DY,0BAAO"}
|
|
@@ -5,12 +5,6 @@ import "../resource/azureSql";
|
|
|
5
5
|
import "../resource/identity";
|
|
6
6
|
export declare class Sql {
|
|
7
7
|
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* 1. config sql
|
|
10
|
-
* 2. add sql provision bicep
|
|
11
|
-
* 3. re-generate resources that connect to sql
|
|
12
|
-
* 4. persist bicep
|
|
13
|
-
*/
|
|
14
8
|
add(context: ContextV3, inputs: InputsWithProjectPath): MaybePromise<Result<Action | undefined, FxError>>;
|
|
15
9
|
}
|
|
16
10
|
//# sourceMappingURL=sql.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../../src/component/feature/sql.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,MAAM,EACN,SAAS,
|
|
1
|
+
{"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../../../src/component/feature/sql.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,MAAM,EACN,SAAS,EAET,OAAO,EACP,qBAAqB,EACrB,YAAY,EAGZ,MAAM,EACP,MAAM,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAG1B,OAAO,iCAAiC,CAAC;AACzC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAU9B,qBACa,GAAG;IACd,IAAI,SAAS;IAEb,GAAG,CACD,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,YAAY,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;CA6DrD"}
|
|
@@ -7,133 +7,77 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
8
8
|
require("reflect-metadata");
|
|
9
9
|
const typedi_1 = require("typedi");
|
|
10
|
-
const projectSettingsLoader_1 = require("../../core/middleware/projectSettingsLoader");
|
|
11
10
|
const workflow_1 = require("../workflow");
|
|
12
11
|
require("../connection/azureWebAppConfig");
|
|
13
12
|
require("../resource/azureSql");
|
|
14
13
|
require("../resource/identity");
|
|
15
14
|
const constants_1 = require("../constants");
|
|
16
15
|
const projectSettingsHelperV3_1 = require("../../common/projectSettingsHelperV3");
|
|
16
|
+
const utils_1 = require("../../common/utils");
|
|
17
|
+
const configure_1 = require("../resource/azureSql/actions/configure");
|
|
18
|
+
const utils_2 = require("../utils");
|
|
19
|
+
const lodash_1 = require("lodash");
|
|
17
20
|
let Sql = class Sql {
|
|
18
21
|
constructor() {
|
|
19
22
|
this.name = "sql";
|
|
20
23
|
}
|
|
21
|
-
/**
|
|
22
|
-
* 1. config sql
|
|
23
|
-
* 2. add sql provision bicep
|
|
24
|
-
* 3. re-generate resources that connect to sql
|
|
25
|
-
* 4. persist bicep
|
|
26
|
-
*/
|
|
27
24
|
add(context, inputs) {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
name: "call:teams-api.add",
|
|
37
|
-
type: "call",
|
|
38
|
-
required: true,
|
|
39
|
-
targetAction: "teams-api.add",
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const actions = [
|
|
43
|
-
...dependentActions,
|
|
44
|
-
{
|
|
45
|
-
name: "sql.configSql",
|
|
46
|
-
type: "function",
|
|
47
|
-
plan: (context, inputs) => {
|
|
48
|
-
if (sqlComponent) {
|
|
49
|
-
return teamsfx_api_1.ok([]);
|
|
50
|
-
}
|
|
51
|
-
const remarks = ["add component 'azure-sql' in projectSettings"];
|
|
52
|
-
if (webAppComponent) {
|
|
53
|
-
remarks.push("connect 'azure-sql' to component 'azure-web-app' in projectSettings");
|
|
54
|
-
}
|
|
55
|
-
if (functionComponent) {
|
|
56
|
-
remarks.push("connect 'azure-sql' to component 'azure-function' in projectSettings");
|
|
57
|
-
}
|
|
58
|
-
return teamsfx_api_1.ok([
|
|
59
|
-
{
|
|
60
|
-
type: "file",
|
|
61
|
-
operate: "replace",
|
|
62
|
-
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
63
|
-
remarks: remarks.join(";"),
|
|
64
|
-
},
|
|
65
|
-
]);
|
|
66
|
-
},
|
|
67
|
-
execute: async (context, inputs) => {
|
|
68
|
-
if (sqlComponent)
|
|
69
|
-
return teamsfx_api_1.ok([]);
|
|
70
|
-
const projectSettings = context.projectSetting;
|
|
71
|
-
const remarks = ["add component 'azure-sql' in projectSettings"];
|
|
72
|
-
projectSettings.components.push({
|
|
73
|
-
name: "azure-sql",
|
|
74
|
-
provision: true,
|
|
75
|
-
});
|
|
76
|
-
if (webAppComponent) {
|
|
77
|
-
if (!webAppComponent.connections)
|
|
78
|
-
webAppComponent.connections = [];
|
|
79
|
-
webAppComponent.connections.push("azure-sql");
|
|
80
|
-
remarks.push("connect 'azure-sql' to component 'azure-web-app' in projectSettings");
|
|
81
|
-
}
|
|
82
|
-
if (functionComponent) {
|
|
83
|
-
if (!functionComponent.connections)
|
|
84
|
-
functionComponent.connections = [];
|
|
85
|
-
functionComponent.connections.push("azure-sql");
|
|
86
|
-
remarks.push("connect 'azure-sql' to component 'azure-function' in projectSettings");
|
|
87
|
-
}
|
|
88
|
-
return teamsfx_api_1.ok([
|
|
89
|
-
{
|
|
90
|
-
type: "file",
|
|
91
|
-
operate: "replace",
|
|
92
|
-
filePath: projectSettingsLoader_1.getProjectSettingsPath(inputs.projectPath),
|
|
93
|
-
remarks: remarks.join(";"),
|
|
94
|
-
},
|
|
95
|
-
]);
|
|
96
|
-
},
|
|
25
|
+
const action = {
|
|
26
|
+
type: "function",
|
|
27
|
+
name: "sql.add",
|
|
28
|
+
question: (context, inputs) => {
|
|
29
|
+
if (inputs.platform == teamsfx_api_1.Platform.CLI_HELP) {
|
|
30
|
+
return teamsfx_api_1.ok(configure_1.UtilFunctions.buildQuestionNode());
|
|
31
|
+
}
|
|
32
|
+
return teamsfx_api_1.ok(undefined);
|
|
97
33
|
},
|
|
98
|
-
{
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
34
|
+
execute: async (context, inputs) => {
|
|
35
|
+
const sqlComponent = workflow_1.getComponent(context.projectSetting, constants_1.ComponentNames.AzureSQL);
|
|
36
|
+
const hasFunc = projectSettingsHelperV3_1.hasApi(context.projectSetting);
|
|
37
|
+
if (!hasFunc) {
|
|
38
|
+
const res = await workflow_1.runActionByName("teams-api.add", context, inputs);
|
|
39
|
+
if (res.isErr())
|
|
40
|
+
return teamsfx_api_1.err(res.error);
|
|
41
|
+
}
|
|
42
|
+
const projectSettings = context.projectSetting;
|
|
43
|
+
const remarks = ["config 'azure-sql' in projectSettings"];
|
|
44
|
+
projectSettings.components.push({
|
|
45
|
+
name: "azure-sql",
|
|
46
|
+
provision: true,
|
|
47
|
+
});
|
|
48
|
+
// generate bicep
|
|
49
|
+
// bicep.init
|
|
50
|
+
{
|
|
51
|
+
const bicepComponent = typedi_1.Container.get("bicep");
|
|
52
|
+
const res = await bicepComponent.init(inputs.projectPath);
|
|
53
|
+
if (res.isErr())
|
|
54
|
+
return teamsfx_api_1.err(res.error);
|
|
55
|
+
}
|
|
56
|
+
// sql bicep
|
|
57
|
+
{
|
|
58
|
+
const provisionType = sqlComponent ? "database" : "server";
|
|
59
|
+
const clonedInputs = lodash_1.cloneDeep(inputs);
|
|
60
|
+
clonedInputs.provisionType = provisionType;
|
|
61
|
+
const sqlResource = typedi_1.Container.get(constants_1.ComponentNames.AzureSQL);
|
|
62
|
+
const res = await sqlResource.generateBicep(context, clonedInputs);
|
|
63
|
+
if (res.isErr())
|
|
64
|
+
return teamsfx_api_1.err(res.error);
|
|
65
|
+
const bicepRes = await utils_2.bicepUtils.persistBiceps(inputs.projectPath, utils_1.convertToAlphanumericOnly(context.projectSetting.appName), res.value);
|
|
66
|
+
if (bicepRes.isErr())
|
|
67
|
+
return bicepRes;
|
|
68
|
+
remarks.push("generate sql bicep");
|
|
69
|
+
}
|
|
70
|
+
// generate config bicep
|
|
71
|
+
{
|
|
72
|
+
const res = await utils_2.generateConfigBiceps(context, inputs);
|
|
73
|
+
if (res.isErr())
|
|
74
|
+
return teamsfx_api_1.err(res.error);
|
|
75
|
+
remarks.push("generate config biceps");
|
|
76
|
+
}
|
|
77
|
+
return teamsfx_api_1.ok(remarks);
|
|
106
78
|
},
|
|
107
|
-
];
|
|
108
|
-
if (webAppComponent) {
|
|
109
|
-
actions.push({
|
|
110
|
-
name: "call:azure-web-app-config.generateBicep",
|
|
111
|
-
type: "call",
|
|
112
|
-
required: true,
|
|
113
|
-
targetAction: "azure-web-app-config.generateBicep",
|
|
114
|
-
inputs: {
|
|
115
|
-
update: true,
|
|
116
|
-
},
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
if (functionComponent) {
|
|
120
|
-
actions.push({
|
|
121
|
-
name: "call:azure-function-config.generateBicep",
|
|
122
|
-
type: "call",
|
|
123
|
-
required: true,
|
|
124
|
-
targetAction: "azure-function-config.generateBicep",
|
|
125
|
-
inputs: {
|
|
126
|
-
update: true,
|
|
127
|
-
},
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
const group = {
|
|
131
|
-
type: "group",
|
|
132
|
-
name: "sql.add",
|
|
133
|
-
mode: "sequential",
|
|
134
|
-
actions: actions,
|
|
135
79
|
};
|
|
136
|
-
return teamsfx_api_1.ok(
|
|
80
|
+
return teamsfx_api_1.ok(action);
|
|
137
81
|
}
|
|
138
82
|
};
|
|
139
83
|
Sql = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sql.js","sourceRoot":"","sources":["../../../src/component/feature/sql.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"sql.js","sourceRoot":"","sources":["../../../src/component/feature/sql.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAUgC;AAChC,4BAA0B;AAC1B,mCAA4C;AAC5C,0CAA4D;AAC5D,2CAAyC;AACzC,gCAA8B;AAC9B,gCAA8B;AAC9B,4CAA8C;AAC9C,kFAA8D;AAC9D,8CAA+D;AAG/D,sEAAuE;AACvE,oCAA4D;AAC5D,mCAAmC;AAGnC,IAAa,GAAG,GAAhB,MAAa,GAAG;IAAhB;QACE,SAAI,GAAG,KAAK,CAAC;IAkEf,CAAC;IAhEC,GAAG,CACD,OAAkB,EAClB,MAA6B;QAE7B,MAAM,MAAM,GAAW;YACrB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBAC5B,IAAI,MAAM,CAAC,QAAQ,IAAI,sBAAQ,CAAC,QAAQ,EAAE;oBACxC,OAAO,gBAAE,CAAC,yBAAa,CAAC,iBAAiB,EAAE,CAAC,CAAC;iBAC9C;gBACD,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;YACvB,CAAC;YACD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;gBACjC,MAAM,YAAY,GAAG,uBAAY,CAAC,OAAO,CAAC,cAAc,EAAE,0BAAc,CAAC,QAAQ,CAAC,CAAC;gBACnF,MAAM,OAAO,GAAG,gCAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;gBAC/C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CAAC,aAAa,CAC7C,MAAM,CAAC,WAAW,EAClB,iCAAyB,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,EACzD,GAAG,CAAC,KAAK,CACV,CAAC;oBACF,IAAI,QAAQ,CAAC,KAAK,EAAE;wBAAE,OAAO,QAAQ,CAAC;oBACtC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;iBACpC;gBAED,wBAAwB;gBACxB;oBACE,MAAM,GAAG,GAAG,MAAM,4BAAoB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBACxD,IAAI,GAAG,CAAC,KAAK,EAAE;wBAAE,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;oBACvC,OAAO,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;iBACxC;gBAED,OAAO,gBAAE,CAAC,OAAO,CAAC,CAAC;YACrB,CAAC;SACF,CAAC;QACF,OAAO,gBAAE,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AAnEY,GAAG;IADf,gBAAO,CAAC,KAAK,CAAC;GACF,GAAG,CAmEf;AAnEY,kBAAG"}
|
|
@@ -5,13 +5,11 @@ import "../resource/azureSql";
|
|
|
5
5
|
import "../resource/identity";
|
|
6
6
|
export declare class SSO {
|
|
7
7
|
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* 1. config sso/aad
|
|
10
|
-
* 2. generate aad manifest
|
|
11
|
-
* 3. genearte aad bicep
|
|
12
|
-
* 4. genearte aad auth files
|
|
13
|
-
* 5. update app manifest
|
|
14
|
-
*/
|
|
15
8
|
add(context: ContextV3, inputs: InputsWithProjectPath): MaybePromise<Result<Action | undefined, FxError>>;
|
|
16
9
|
}
|
|
10
|
+
export interface updateComponents {
|
|
11
|
+
bot?: boolean;
|
|
12
|
+
tab?: boolean;
|
|
13
|
+
aad?: boolean;
|
|
14
|
+
}
|
|
17
15
|
//# sourceMappingURL=sso.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../../../src/component/feature/sso.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,MAAM,
|
|
1
|
+
{"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../../../src/component/feature/sso.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,MAAM,EACN,SAAS,EAGT,OAAO,EACP,qBAAqB,EACrB,YAAY,EAGZ,MAAM,EAGP,MAAM,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAG1B,OAAO,iCAAiC,CAAC;AAKzC,OAAO,sBAAsB,CAAC;AAC9B,OAAO,sBAAsB,CAAC;AAI9B,qBACa,GAAG;IACd,IAAI,SAAS;IAEb,GAAG,CACD,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,YAAY,CAAC,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;CAoFrD;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;CACf"}
|