@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureAppService.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureAppService.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"azureAppService.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureAppService.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,EACL,SAAS,EACT,OAAO,EACP,qBAAqB,EAErB,kBAAkB,EAClB,eAAe,EACf,MAAM,EACP,MAAM,wBAAwB,CAAC;AAWhC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,8BAAsB,eAAgB,SAAQ,aAAa;IACzD,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAC3C,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IACtC,aAAa,CACjB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IAU9B,MAAM,CACV,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CAsCvC"}
|
|
@@ -13,10 +13,9 @@ const mapping_1 = require("../../../plugins/resource/bot/v2/mapping");
|
|
|
13
13
|
const errors_1 = require("./errors");
|
|
14
14
|
const azureResource_1 = require("./../azureResource");
|
|
15
15
|
const messages_1 = require("./messages");
|
|
16
|
-
const workflow_1 = require("../../workflow");
|
|
17
16
|
const messages_2 = require("../../messages");
|
|
18
17
|
class AzureAppService extends azureResource_1.AzureResource {
|
|
19
|
-
generateBicep(context, inputs) {
|
|
18
|
+
async generateBicep(context, inputs) {
|
|
20
19
|
this.getTemplateContext = (context, inputs) => {
|
|
21
20
|
const configs = [];
|
|
22
21
|
configs.push(mapping_1.getRuntime(mapping_1.getLanguage(context.projectSetting.programmingLanguage)));
|
|
@@ -25,40 +24,29 @@ class AzureAppService extends azureResource_1.AzureResource {
|
|
|
25
24
|
};
|
|
26
25
|
return super.generateBicep(context, inputs);
|
|
27
26
|
}
|
|
28
|
-
deploy(context, inputs) {
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
throw new errors_1.PackDirectoryExistenceError(this.alias);
|
|
52
|
-
}
|
|
53
|
-
const state = ctx.envInfo.state[parent.name];
|
|
54
|
-
const resourceId = errors_1.CheckThrowSomethingMissing(this.alias, this.outputs.resourceId.key, state[this.outputs.resourceId.key]);
|
|
55
|
-
await (progress === null || progress === void 0 ? void 0 : progress.next(messages_2.ProgressMessages.packingCode));
|
|
56
|
-
const zipBuffer = await utils.zipFolderAsync(publishDir, "");
|
|
57
|
-
await utils_1.azureWebSiteDeploy(resourceId, ctx.tokenProvider, zipBuffer, context.logProvider, progress);
|
|
58
|
-
return teamsfx_api_1.ok([messages_2.Plans.deploy(this.displayName, publishDir)]);
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
return teamsfx_api_1.ok(action);
|
|
27
|
+
async deploy(context, inputs) {
|
|
28
|
+
const progressBar = context.userInteraction.createProgressBar(messages_2.ProgressTitles.deploying(this.displayName, inputs.scenario), 2);
|
|
29
|
+
try {
|
|
30
|
+
const ctx = context;
|
|
31
|
+
// Preconditions checking.
|
|
32
|
+
if (!inputs.projectPath || !inputs.artifactFolder) {
|
|
33
|
+
throw new errors_1.PreconditionError(this.alias, messages_1.Messages.WorkingDirIsMissing, []);
|
|
34
|
+
}
|
|
35
|
+
const publishDir = path.resolve(inputs.projectPath, inputs.artifactFolder);
|
|
36
|
+
const packDirExisted = await fs_extra_1.default.pathExists(publishDir);
|
|
37
|
+
if (!packDirExisted) {
|
|
38
|
+
throw new errors_1.PackDirectoryExistenceError(this.alias);
|
|
39
|
+
}
|
|
40
|
+
const state = ctx.envInfo.state[inputs.componentId];
|
|
41
|
+
const resourceId = errors_1.CheckThrowSomethingMissing(this.alias, this.outputs.resourceId.key, state[this.outputs.resourceId.key]);
|
|
42
|
+
await progressBar.next(messages_2.ProgressMessages.packingCode);
|
|
43
|
+
const zipBuffer = await utils.zipFolderAsync(publishDir, "");
|
|
44
|
+
await utils_1.azureWebSiteDeploy(resourceId, ctx.tokenProvider, zipBuffer, context.logProvider, progressBar);
|
|
45
|
+
}
|
|
46
|
+
finally {
|
|
47
|
+
progressBar.end(true);
|
|
48
|
+
}
|
|
49
|
+
return teamsfx_api_1.ok(undefined);
|
|
62
50
|
}
|
|
63
51
|
}
|
|
64
52
|
exports.AzureAppService = AzureAppService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureAppService.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureAppService.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"azureAppService.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureAppService.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDASgC;AAChC,gEAA0B;AAC1B,mDAA6B;AAC7B,+DAAyE;AACzE,0FAAoE;AACpE,sEAAmF;AACnF,qCAIkB;AAClB,sDAAmD;AACnD,yCAAsC;AACtC,6CAAkE;AAElE,MAAsB,eAAgB,SAAQ,6BAAa;IAOzD,KAAK,CAAC,aAAa,CACjB,OAAkB,EAClB,MAA6B;QAE7B,IAAI,CAAC,kBAAkB,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,MAAM,OAAO,GAAa,EAAE,CAAC;YAC7B,OAAO,CAAC,IAAI,CAAC,oBAAU,CAAC,qBAAW,CAAC,OAAO,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;YAClF,IAAI,CAAC,eAAe,CAAC,OAAO,GAAG,OAAO,CAAC;YACvC,OAAO,IAAI,CAAC,eAAe,CAAC;QAC9B,CAAC,CAAC;QACF,OAAO,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,OAA2B,EAC3B,MAA6B;QAE7B,MAAM,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAC3D,yBAAc,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM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AA7DD,0CA6DC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FxError,
|
|
1
|
+
import { FxError, InputsWithProjectPath, ProvisionContextV3, Result } from "@microsoft/teamsfx-api";
|
|
2
2
|
import { AzureAppService } from "./azureAppService";
|
|
3
3
|
export declare class AzureFunctionResource extends AzureAppService {
|
|
4
4
|
readonly name = "azure-function";
|
|
@@ -25,6 +25,6 @@ export declare class AzureFunctionResource extends AzureAppService {
|
|
|
25
25
|
resourceId: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
configure(context:
|
|
28
|
+
configure(context: ProvisionContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
|
|
29
29
|
}
|
|
30
30
|
//# sourceMappingURL=azureFunction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureFunction.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureFunction.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"azureFunction.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureFunction.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EACP,qBAAqB,EAErB,kBAAkB,EAClB,MAAM,EACP,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,qBACa,qBAAsB,SAAQ,eAAe;IACxD,QAAQ,CAAC,IAAI,oBAAoB;IACjC,QAAQ,CAAC,KAAK,QAAQ;IACtB,QAAQ,CAAC,WAAW,qBAAqB;IACzC,QAAQ,CAAC,eAAe,mBAAmB;IAC3C,OAAO;;;;;;;;;;;;;MAAmB;IAC1B,eAAe,WAA8B;IAC7C,eAAe;;;;MAIb;IACI,SAAS,CACb,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CAGvC"}
|
|
@@ -23,31 +23,8 @@ let AzureFunctionResource = class AzureFunctionResource extends azureAppService_
|
|
|
23
23
|
},
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
configure(context, inputs) {
|
|
27
|
-
|
|
28
|
-
name: "azure-function.configure",
|
|
29
|
-
type: "function",
|
|
30
|
-
plan: (context, inputs) => {
|
|
31
|
-
return teamsfx_api_1.ok([
|
|
32
|
-
{
|
|
33
|
-
type: "service",
|
|
34
|
-
name: "azure",
|
|
35
|
-
remarks: "config azure function",
|
|
36
|
-
},
|
|
37
|
-
]);
|
|
38
|
-
},
|
|
39
|
-
execute: async (context, inputs) => {
|
|
40
|
-
// Configure APIM
|
|
41
|
-
return teamsfx_api_1.ok([
|
|
42
|
-
{
|
|
43
|
-
type: "service",
|
|
44
|
-
name: "azure",
|
|
45
|
-
remarks: "config azure function",
|
|
46
|
-
},
|
|
47
|
-
]);
|
|
48
|
-
},
|
|
49
|
-
};
|
|
50
|
-
return teamsfx_api_1.ok(action);
|
|
26
|
+
async configure(context, inputs) {
|
|
27
|
+
return teamsfx_api_1.ok(undefined);
|
|
51
28
|
}
|
|
52
29
|
};
|
|
53
30
|
AzureFunctionResource = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureFunction.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureFunction.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"azureFunction.js","sourceRoot":"","sources":["../../../../src/component/resource/azureAppService/azureFunction.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAMgC;AAChC,mCAAiC;AACjC,+CAAmE;AACnE,uDAAoD;AAEpD,IAAa,qBAAqB,GAAlC,MAAa,qBAAsB,SAAQ,iCAAe;IAA1D;;QACW,SAAI,GAAG,gBAAgB,CAAC;QACxB,UAAK,GAAG,IAAI,CAAC;QACb,gBAAW,GAAG,iBAAiB,CAAC;QAChC,oBAAe,GAAG,eAAe,CAAC;QAC3C,YAAO,GAAG,2BAAe,CAAC;QAC1B,oBAAe,GAAG,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;QAC7C,oBAAe,GAAG;YAChB,QAAQ,EAAE;gBACR,UAAU,EAAE,2BAAe,CAAC,kBAAkB,CAAC,aAAa;aAC7D;SACF,CAAC;IAOJ,CAAC;IANC,KAAK,CAAC,SAAS,CACb,OAA2B,EAC3B,MAA6B;QAE7B,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;CACF,CAAA;AAlBY,qBAAqB;IADjC,gBAAO,CAAC,gBAAgB,CAAC;GACb,qBAAqB,CAkBjC;AAlBY,sDAAqB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FxError, Result,
|
|
1
|
+
import { FxError, Result, Bicep, CloudResource, ContextV3, InputsWithProjectPath, ResourceOutputs } from "@microsoft/teamsfx-api";
|
|
2
2
|
import "reflect-metadata";
|
|
3
3
|
export declare abstract class AzureResource implements CloudResource {
|
|
4
4
|
abstract readonly name: string;
|
|
@@ -7,6 +7,6 @@ export declare abstract class AzureResource implements CloudResource {
|
|
|
7
7
|
abstract readonly finalOutputKeys: string[];
|
|
8
8
|
templateContext: Record<string, any>;
|
|
9
9
|
getTemplateContext?: (context: ContextV3, inputs: InputsWithProjectPath) => Record<string, any>;
|
|
10
|
-
generateBicep(context: ContextV3, inputs: InputsWithProjectPath):
|
|
10
|
+
generateBicep(context: ContextV3, inputs: InputsWithProjectPath): Promise<Result<Bicep[], FxError>>;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=azureResource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureResource.d.ts","sourceRoot":"","sources":["../../../src/component/resource/azureResource.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EAEP,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"azureResource.d.ts","sourceRoot":"","sources":["../../../src/component/resource/azureResource.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EAEP,MAAM,EACN,KAAK,EACL,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,kBAAkB,CAAC;AAI1B,8BAAsB,aAAc,YAAW,aAAa;IAC1D,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IAC1C,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAC3C,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC5C,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC1C,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,qBAAqB,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE1F,aAAa,CACjB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;CA2CrC"}
|
|
@@ -14,55 +14,37 @@ class AzureResource {
|
|
|
14
14
|
constructor() {
|
|
15
15
|
this.templateContext = {};
|
|
16
16
|
}
|
|
17
|
-
generateBicep(context, inputs) {
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
this.templateContext.scenarioInLowerCase = (inputs.scenario || "").toLowerCase();
|
|
45
|
-
let module = await fs_extra_1.default.readFile(pmPath, "utf-8");
|
|
46
|
-
let orchestration = await fs_extra_1.default.readFile(poPath, "utf-8");
|
|
47
|
-
module = tools_1.compileHandlebarsTemplateString(module, this.templateContext);
|
|
48
|
-
orchestration = tools_1.compileHandlebarsTemplateString(orchestration, this.templateContext);
|
|
49
|
-
const parametersPath = path.join(folder_1.getTemplatesFolder(), "bicep", `${this.bicepModuleName}.parameters.json`);
|
|
50
|
-
let params;
|
|
51
|
-
if (await fs_extra_1.default.pathExists(parametersPath)) {
|
|
52
|
-
params = await fs_extra_1.default.readJson(parametersPath);
|
|
53
|
-
}
|
|
54
|
-
const bicep = {
|
|
55
|
-
type: "bicep",
|
|
56
|
-
Provision: {
|
|
57
|
-
Modules: { [moduleName]: module },
|
|
58
|
-
Orchestration: orchestration,
|
|
59
|
-
},
|
|
60
|
-
Parameters: params,
|
|
61
|
-
};
|
|
62
|
-
return teamsfx_api_1.ok([bicep]);
|
|
17
|
+
async generateBicep(context, inputs) {
|
|
18
|
+
const pmPath = path.join(folder_1.getTemplatesFolder(), "bicep", `${this.bicepModuleName}.provision.module.bicep`);
|
|
19
|
+
const poPath = path.join(folder_1.getTemplatesFolder(), "bicep", `${this.bicepModuleName}.provision.orchestration.bicep`);
|
|
20
|
+
if (this.getTemplateContext) {
|
|
21
|
+
try {
|
|
22
|
+
this.templateContext = this.getTemplateContext(context, inputs);
|
|
23
|
+
}
|
|
24
|
+
catch (_a) { }
|
|
25
|
+
}
|
|
26
|
+
const moduleName = this.bicepModuleName + (inputs.scenario || "");
|
|
27
|
+
this.templateContext.componentId = inputs.componentId || "";
|
|
28
|
+
this.templateContext.scenario = inputs.scenario || "";
|
|
29
|
+
this.templateContext.scenarioInLowerCase = (inputs.scenario || "").toLowerCase();
|
|
30
|
+
let module = await fs_extra_1.default.readFile(pmPath, "utf-8");
|
|
31
|
+
let orchestration = await fs_extra_1.default.readFile(poPath, "utf-8");
|
|
32
|
+
module = tools_1.compileHandlebarsTemplateString(module, this.templateContext);
|
|
33
|
+
orchestration = tools_1.compileHandlebarsTemplateString(orchestration, this.templateContext);
|
|
34
|
+
const parametersPath = path.join(folder_1.getTemplatesFolder(), "bicep", `${this.bicepModuleName}.parameters.json`);
|
|
35
|
+
let params;
|
|
36
|
+
if (await fs_extra_1.default.pathExists(parametersPath)) {
|
|
37
|
+
params = await fs_extra_1.default.readJson(parametersPath);
|
|
38
|
+
}
|
|
39
|
+
const bicep = {
|
|
40
|
+
type: "bicep",
|
|
41
|
+
Provision: {
|
|
42
|
+
Modules: { [moduleName]: module },
|
|
43
|
+
Orchestration: orchestration,
|
|
63
44
|
},
|
|
45
|
+
Parameters: params,
|
|
64
46
|
};
|
|
65
|
-
return teamsfx_api_1.ok(
|
|
47
|
+
return teamsfx_api_1.ok([bicep]);
|
|
66
48
|
}
|
|
67
49
|
}
|
|
68
50
|
exports.AzureResource = AzureResource;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureResource.js","sourceRoot":"","sources":["../../../src/component/resource/azureResource.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"azureResource.js","sourceRoot":"","sources":["../../../src/component/resource/azureResource.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDASgC;AAChC,gEAA0B;AAC1B,mDAA6B;AAC7B,4BAA0B;AAC1B,8CAAqE;AACrE,yCAAkD;AAElD,MAAsB,aAAa;IAAnC;QAKE,oBAAe,GAAwB,EAAE,CAAC;IAiD5C,CAAC;IA9CC,KAAK,CAAC,aAAa,CACjB,OAAkB,EAClB,MAA6B;QAE7B,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CACtB,2BAAkB,EAAE,EACpB,OAAO,EACP,GAAG,IAAI,CAAC,eAAe,yBAAy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E,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;SAC5C;QACD,MAAM,KAAK,GAAU;YACnB,IAAI,EAAE,OAAO;YACb,SAAS,EAAE;gBACT,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE;gBACjC,aAAa,EAAE,aAAa;aAC7B;YACD,UAAU,EAAE,MAAM;SACnB,CAAC;QACF,OAAO,gBAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACrB,CAAC;CACF;AAtDD,sCAsDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../../src/component/resource/azureSql/actions/configure.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EACT,qBAAqB,EAErB,cAAc,EACd,kBAAkB,EAClB,EAAE,EACF,oBAAoB,EACpB,WAAW,EACX,MAAM,EACN,OAAO,EACP,MAAM,EACN,SAAS,EACV,MAAM,wBAAwB,CAAC;AAahC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAM3C,OAAO,EAAc,SAAS,EAAY,MAAM,iBAAiB,CAAC;AAClE,qBAAa,wBAAwB;IACnC,MAAM,CAAC,QAAQ,CAAC,MAAM,SAAS;IAC/B,MAAM,CAAC,QAAQ,CAAC,KAAK,oBAAoB;IACzC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,2BAA2B;IACjE,MAAM,CAAC,QAAQ,CAAC,aAAa,qBAAqB;IAClD,MAAM,CAAC,QAAQ,CAAC,eAAe;;;MAG7B;IACF,MAAM,CAAC,QAAQ,CAAC,YAAY,qBAAqB;IACjD,MAAM,CAAC,QAAQ,CAAC,YAAY,YAAa,MAAM,YACS;WAiB3C,OAAO,CAClB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAwErC,MAAM,CAAC,GAAG,IAAI,cAAc;CAU7B;AAED,qBAAa,aAAa;WACX,mBAAmB,CAC9B,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;WAQN,eAAe,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC;WAgB/E,iBAAiB,CAC5B,MAAM,EAAE,EAAE,CAAC,mBAAmB,EAC9B,oBAAoB,EAAE,oBAAoB,GACzC,OAAO,CAAC,OAAO,CAAC;IASnB,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM;WAatC,eAAe,CAC1B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,IAAI,CAAC;IAgChB,MAAM,CAAC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../../src/component/resource/azureSql/actions/configure.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EACT,qBAAqB,EAErB,cAAc,EACd,kBAAkB,EAClB,EAAE,EACF,oBAAoB,EACpB,WAAW,EACX,MAAM,EACN,OAAO,EACP,MAAM,EACN,SAAS,EACV,MAAM,wBAAwB,CAAC;AAahC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAM3C,OAAO,EAAc,SAAS,EAAY,MAAM,iBAAiB,CAAC;AAClE,qBAAa,wBAAwB;IACnC,MAAM,CAAC,QAAQ,CAAC,MAAM,SAAS;IAC/B,MAAM,CAAC,QAAQ,CAAC,KAAK,oBAAoB;IACzC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,2BAA2B;IACjE,MAAM,CAAC,QAAQ,CAAC,aAAa,qBAAqB;IAClD,MAAM,CAAC,QAAQ,CAAC,eAAe;;;MAG7B;IACF,MAAM,CAAC,QAAQ,CAAC,YAAY,qBAAqB;IACjD,MAAM,CAAC,QAAQ,CAAC,YAAY,YAAa,MAAM,YACS;WAiB3C,OAAO,CAClB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAwErC,MAAM,CAAC,GAAG,IAAI,cAAc;CAU7B;AAED,qBAAa,aAAa;WACX,mBAAmB,CAC9B,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,OAAO,CAAC;WAQN,eAAe,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,OAAO,CAAC,SAAS,CAAC;WAgB/E,iBAAiB,CAC5B,MAAM,EAAE,EAAE,CAAC,mBAAmB,EAC9B,oBAAoB,EAAE,oBAAoB,GACzC,OAAO,CAAC,OAAO,CAAC;IASnB,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM;WAatC,eAAe,CAC1B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,gBAAgB,GACjC,OAAO,CAAC,IAAI,CAAC;IAgChB,MAAM,CAAC,iBAAiB,IAAI,SAAS;CAStC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FxError, Result,
|
|
1
|
+
import { FxError, Result, CloudResource, ContextV3, InputsWithProjectPath, Bicep, ProvisionContextV3 } from "@microsoft/teamsfx-api";
|
|
2
2
|
import "reflect-metadata";
|
|
3
3
|
export declare class AzureSqlResource implements CloudResource {
|
|
4
4
|
readonly name: string;
|
|
@@ -17,8 +17,8 @@ export declare class AzureSqlResource implements CloudResource {
|
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
readonly finalOutputKeys: string[];
|
|
20
|
-
generateBicep(context: ContextV3, inputs: InputsWithProjectPath):
|
|
21
|
-
provision(context:
|
|
22
|
-
configure(context:
|
|
20
|
+
generateBicep(context: ContextV3, inputs: InputsWithProjectPath): Promise<Result<Bicep[], FxError>>;
|
|
21
|
+
provision(context: ProvisionContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
|
|
22
|
+
configure(context: ProvisionContextV3, inputs: InputsWithProjectPath): Promise<Result<undefined, FxError>>;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=azureSql.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureSql.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureSql/azureSql.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EAEP,MAAM,EACN,
|
|
1
|
+
{"version":3,"file":"azureSql.d.ts","sourceRoot":"","sources":["../../../../src/component/resource/azureSql/azureSql.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,OAAO,EAEP,MAAM,EACN,aAAa,EACb,SAAS,EACT,qBAAqB,EACrB,KAAK,EACL,kBAAkB,EAEnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAS1B,qBACa,gBAAiB,YAAW,aAAa;IACpD,QAAQ,CAAC,IAAI,SAA2B;IACxC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;MAAmB;IACnC,QAAQ,CAAC,eAAe,WAAiD;IACnE,aAAa,CACjB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IA+B9B,SAAS,CACb,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAKhC,SAAS,CACb,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CAKvC"}
|
|
@@ -9,22 +9,56 @@ require("reflect-metadata");
|
|
|
9
9
|
const typedi_1 = require("typedi");
|
|
10
10
|
const constants_1 = require("../../constants");
|
|
11
11
|
const configure_1 = require("./actions/configure");
|
|
12
|
-
const generateBicep_1 = require("./actions/generateBicep");
|
|
13
12
|
const provision_1 = require("./actions/provision");
|
|
13
|
+
const path = tslib_1.__importStar(require("path"));
|
|
14
|
+
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
15
|
+
const folder_1 = require("../../../folder");
|
|
16
|
+
const tools_1 = require("../../../common/tools");
|
|
14
17
|
let AzureSqlResource = class AzureSqlResource {
|
|
15
18
|
constructor() {
|
|
16
19
|
this.name = constants_1.ComponentNames.AzureSQL;
|
|
17
20
|
this.outputs = constants_1.AzureSqlOutputs;
|
|
18
21
|
this.finalOutputKeys = ["sqlResourceId", "endpoint", "databaseName"];
|
|
19
22
|
}
|
|
20
|
-
generateBicep(context, inputs) {
|
|
21
|
-
|
|
23
|
+
async generateBicep(context, inputs) {
|
|
24
|
+
const prefix = inputs.provisionType === "database"
|
|
25
|
+
? "azureSql.provisionDatabase"
|
|
26
|
+
: "azureSql.provisionServer";
|
|
27
|
+
const mPath = path.join(folder_1.getTemplatesFolder(), "bicep", `${prefix}.module.bicep`);
|
|
28
|
+
const oPath = path.join(folder_1.getTemplatesFolder(), "bicep", `${prefix}.orchestration.bicep`);
|
|
29
|
+
let module = await fs_extra_1.default.readFile(mPath, "utf-8");
|
|
30
|
+
let orch = await fs_extra_1.default.readFile(oPath, "utf-8");
|
|
31
|
+
const suffix = tools_1.getUuid().substring(0, 6);
|
|
32
|
+
const compileCtx = {
|
|
33
|
+
suffix: suffix,
|
|
34
|
+
};
|
|
35
|
+
if (inputs.provisionType === "database") {
|
|
36
|
+
module = await tools_1.generateBicepFromFile(mPath, compileCtx);
|
|
37
|
+
orch = await tools_1.generateBicepFromFile(oPath, compileCtx);
|
|
38
|
+
}
|
|
39
|
+
const bicep = {
|
|
40
|
+
type: "bicep",
|
|
41
|
+
Provision: {
|
|
42
|
+
Modules: { azureSql: module },
|
|
43
|
+
Orchestration: orch,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
if (inputs.provisionType === "server") {
|
|
47
|
+
bicep.Parameters = await fs_extra_1.default.readJson(path.join(folder_1.getTemplatesFolder(), "bicep", "azureSql.parameters.json"));
|
|
48
|
+
}
|
|
49
|
+
return teamsfx_api_1.ok([bicep]);
|
|
22
50
|
}
|
|
23
|
-
provision(context, inputs) {
|
|
24
|
-
|
|
51
|
+
async provision(context, inputs) {
|
|
52
|
+
const res = await provision_1.ProvisionActionImplement.execute(context, inputs);
|
|
53
|
+
if (res.isErr())
|
|
54
|
+
return teamsfx_api_1.err(res.error);
|
|
55
|
+
return teamsfx_api_1.ok(undefined);
|
|
25
56
|
}
|
|
26
|
-
configure(context, inputs) {
|
|
27
|
-
|
|
57
|
+
async configure(context, inputs) {
|
|
58
|
+
const res = await configure_1.ConfigureActionImplement.execute(context, inputs);
|
|
59
|
+
if (res.isErr())
|
|
60
|
+
return teamsfx_api_1.err(res.error);
|
|
61
|
+
return teamsfx_api_1.ok(undefined);
|
|
28
62
|
}
|
|
29
63
|
};
|
|
30
64
|
AzureSqlResource = tslib_1.__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureSql.js","sourceRoot":"","sources":["../../../../src/component/resource/azureSql/azureSql.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"azureSql.js","sourceRoot":"","sources":["../../../../src/component/resource/azureSql/azureSql.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAUgC;AAChC,4BAA0B;AAC1B,mCAAiC;AACjC,+CAAkE;AAClE,mDAA+D;AAC/D,mDAA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AAE;gBACT,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE;gBAC7B,aAAa,EAAE,IAAI;aACpB;SACF,CAAC;QACF,IAAI,MAAM,CAAC,aAAa,KAAK,QAAQ,EAAE;YACrC,KAAK,CAAC,UAAU,GAAG,MAAM,kBAAE,CAAC,QAAQ,CAClC,IAAI,CAAC,IAAI,CAAC,2BAAkB,EAAE,EAAE,OAAO,EAAE,0BAA0B,CAAC,CACrE,CAAC;SACH;QACD,OAAO,gBAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACrB,CAAC;IACD,KAAK,CAAC,SAAS,CACb,OAA2B,EAC3B,MAA6B;QAE7B,MAAM,GAAG,GAAG,MAAM,oCAAwB,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACpE,IAAI,GAAG,CAAC,KAAK,EAAE;YAAE,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;IACD,KAAK,CAAC,SAAS,CACb,OAA2B,EAC3B,MAA6B;QAE7B,MAAM,GAAG,GAAG,MAAM,oCAAwB,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QACpE,IAAI,GAAG,CAAC,KAAK,EAAE;YAAE,OAAO,iBAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACvC,OAAO,gBAAE,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;CACF,CAAA;AAtDY,gBAAgB;IAD5B,gBAAO,CAAC,WAAW,CAAC;GACR,gBAAgB,CAsD5B;AAtDY,4CAAgB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ActionContext, FxError, InputsWithProjectPath, ProvisionContextV3, Result } from "@microsoft/teamsfx-api";
|
|
2
2
|
import "reflect-metadata";
|
|
3
3
|
import { AzureResource } from "./azureResource";
|
|
4
4
|
export declare class AzureStorageResource extends AzureResource {
|
|
@@ -23,7 +23,7 @@ export declare class AzureStorageResource extends AzureResource {
|
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
25
|
readonly finalOutputKeys: string[];
|
|
26
|
-
configure(context:
|
|
27
|
-
deploy():
|
|
26
|
+
configure(context: ProvisionContextV3, inputs: InputsWithProjectPath, actionContext?: ActionContext): Promise<Result<undefined, FxError>>;
|
|
27
|
+
deploy(context: ProvisionContextV3, inputs: InputsWithProjectPath, actionContext?: ActionContext): Promise<Result<undefined, FxError>>;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=azureStorage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureStorage.d.ts","sourceRoot":"","sources":["../../../src/component/resource/azureStorage.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"azureStorage.d.ts","sourceRoot":"","sources":["../../../src/component/resource/azureStorage.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAGb,OAAO,EACP,qBAAqB,EAErB,kBAAkB,EAClB,MAAM,EAGP,MAAM,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAY1B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAMhD,qBACa,oBAAqB,SAAQ,aAAa;IACrD,QAAQ,CAAC,IAAI,mBAAmB;IAChC,QAAQ,CAAC,eAAe,kBAAkB;IAC1C,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;MAAkB;IAClC,QAAQ,CAAC,eAAe,WAAqD;IAcvE,SAAS,CACb,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,qBAAqB,EAC7B,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IA4BhC,MAAM,CACV,OAAO,EAAE,kBAAkB,EAC3B,MAAM,EAAE,qBAAqB,EAC7B,aAAa,CAAC,EAAE,aAAa,GAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;CAqBvC"}
|
|
@@ -14,10 +14,11 @@ const error_1 = require("../../plugins/resource/frontend/v3/error");
|
|
|
14
14
|
const clients_1 = require("../../plugins/resource/frontend/clients");
|
|
15
15
|
const deploy_1 = require("../../plugins/resource/frontend/ops/deploy");
|
|
16
16
|
const azureResource_1 = require("./azureResource");
|
|
17
|
-
const workflow_1 = require("../workflow");
|
|
18
17
|
const constants_1 = require("../../plugins/resource/frontend/constants");
|
|
19
18
|
const constants_2 = require("../constants");
|
|
20
19
|
const messages_1 = require("../messages");
|
|
20
|
+
const lib_1 = require("@feathersjs/hooks/lib");
|
|
21
|
+
const actionExecutionMW_1 = require("../middleware/actionExecutionMW");
|
|
21
22
|
let AzureStorageResource = class AzureStorageResource extends azureResource_1.AzureResource {
|
|
22
23
|
constructor() {
|
|
23
24
|
super(...arguments);
|
|
@@ -26,10 +27,34 @@ let AzureStorageResource = class AzureStorageResource extends azureResource_1.Az
|
|
|
26
27
|
this.outputs = constants_2.StorageOutputs;
|
|
27
28
|
this.finalOutputKeys = ["domain", "endpoint", "resourceId", "indexPath"];
|
|
28
29
|
}
|
|
29
|
-
configure(context, inputs) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
async configure(context, inputs, actionContext) {
|
|
31
|
+
var _a;
|
|
32
|
+
const ctx = context;
|
|
33
|
+
const frontendConfigRes = await buildFrontendConfig(ctx.envInfo, constants_2.ComponentNames.TeamsTab, ctx.tokenProvider.azureAccountProvider);
|
|
34
|
+
if (frontendConfigRes.isErr()) {
|
|
35
|
+
return teamsfx_api_1.err(frontendConfigRes.error);
|
|
36
|
+
}
|
|
37
|
+
(_a = actionContext === null || actionContext === void 0 ? void 0 : actionContext.progressBar) === null || _a === void 0 ? void 0 : _a.next(messages_1.ProgressMessages.enableStaticWebsite);
|
|
38
|
+
const client = new clients_1.AzureStorageClient(frontendConfigRes.value);
|
|
39
|
+
await client.enableStaticWebsite();
|
|
40
|
+
return teamsfx_api_1.ok(undefined);
|
|
41
|
+
}
|
|
42
|
+
async deploy(context, inputs, actionContext) {
|
|
43
|
+
const ctx = context;
|
|
44
|
+
const deployDir = path.resolve(inputs.projectPath, inputs.folder);
|
|
45
|
+
const frontendConfigRes = await buildFrontendConfig(ctx.envInfo, inputs.componentId, ctx.tokenProvider.azureAccountProvider);
|
|
46
|
+
if (frontendConfigRes.isErr()) {
|
|
47
|
+
return teamsfx_api_1.err(frontendConfigRes.error);
|
|
48
|
+
}
|
|
49
|
+
const client = new clients_1.AzureStorageClient(frontendConfigRes.value);
|
|
50
|
+
const envName = ctx.envInfo.envName;
|
|
51
|
+
await deploy_1.FrontendDeployment.doFrontendDeploymentV3(client, deployDir, envName, actionContext === null || actionContext === void 0 ? void 0 : actionContext.progressBar);
|
|
52
|
+
return teamsfx_api_1.ok(undefined);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
tslib_1.__decorate([
|
|
56
|
+
lib_1.hooks([
|
|
57
|
+
actionExecutionMW_1.ActionExecutionMW({
|
|
33
58
|
enableTelemetry: true,
|
|
34
59
|
telemetryComponentName: constants_1.FrontendPluginInfo.PluginName,
|
|
35
60
|
telemetryEventName: "deploy",
|
|
@@ -39,31 +64,15 @@ let AzureStorageResource = class AzureStorageResource extends azureResource_1.Az
|
|
|
39
64
|
enableProgressBar: true,
|
|
40
65
|
progressTitle: messages_1.ProgressTitles.configureStorage,
|
|
41
66
|
progressSteps: 1,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const frontendConfigRes = await buildFrontendConfig(ctx.envInfo, parent.name, ctx.tokenProvider.azureAccountProvider);
|
|
52
|
-
if (frontendConfigRes.isErr()) {
|
|
53
|
-
return teamsfx_api_1.err(frontendConfigRes.error);
|
|
54
|
-
}
|
|
55
|
-
progress === null || progress === void 0 ? void 0 : progress.next(messages_1.ProgressMessages.enableStaticWebsite);
|
|
56
|
-
const client = new clients_1.AzureStorageClient(frontendConfigRes.value);
|
|
57
|
-
await client.enableStaticWebsite();
|
|
58
|
-
return teamsfx_api_1.ok([messages_1.Plans.enableStaticWebsite()]);
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
return teamsfx_api_1.ok(action);
|
|
62
|
-
}
|
|
63
|
-
deploy() {
|
|
64
|
-
const action = {
|
|
65
|
-
name: "azure-storage.deploy",
|
|
66
|
-
type: "function",
|
|
67
|
+
}),
|
|
68
|
+
]),
|
|
69
|
+
tslib_1.__metadata("design:type", Function),
|
|
70
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
71
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
72
|
+
], AzureStorageResource.prototype, "configure", null);
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
lib_1.hooks([
|
|
75
|
+
actionExecutionMW_1.ActionExecutionMW({
|
|
67
76
|
enableTelemetry: true,
|
|
68
77
|
telemetryComponentName: constants_1.FrontendPluginInfo.PluginName,
|
|
69
78
|
telemetryEventName: "deploy",
|
|
@@ -73,32 +82,12 @@ let AzureStorageResource = class AzureStorageResource extends azureResource_1.Az
|
|
|
73
82
|
enableProgressBar: true,
|
|
74
83
|
progressTitle: messages_1.ProgressTitles.deployingStorage,
|
|
75
84
|
progressSteps: 3,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
execute: async (context, inputs, progress) => {
|
|
83
|
-
const ctx = context;
|
|
84
|
-
const parent = workflow_1.getHostingParentComponent(ctx.projectSetting, this.name);
|
|
85
|
-
if (!(parent === null || parent === void 0 ? void 0 : parent.folder)) {
|
|
86
|
-
throw new Error("parent component not found for azure-storage");
|
|
87
|
-
}
|
|
88
|
-
const deployDir = path.resolve(inputs.projectPath, parent.folder);
|
|
89
|
-
const frontendConfigRes = await buildFrontendConfig(ctx.envInfo, parent.name, ctx.tokenProvider.azureAccountProvider);
|
|
90
|
-
if (frontendConfigRes.isErr()) {
|
|
91
|
-
return teamsfx_api_1.err(frontendConfigRes.error);
|
|
92
|
-
}
|
|
93
|
-
const client = new clients_1.AzureStorageClient(frontendConfigRes.value);
|
|
94
|
-
const envName = ctx.envInfo.envName;
|
|
95
|
-
await deploy_1.FrontendDeployment.doFrontendDeploymentV3(client, deployDir, envName, progress);
|
|
96
|
-
return teamsfx_api_1.ok([messages_1.Plans.deploy("Azure Storage", deployDir)]);
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
return teamsfx_api_1.ok(action);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
85
|
+
}),
|
|
86
|
+
]),
|
|
87
|
+
tslib_1.__metadata("design:type", Function),
|
|
88
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object, Object]),
|
|
89
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
90
|
+
], AzureStorageResource.prototype, "deploy", null);
|
|
102
91
|
AzureStorageResource = tslib_1.__decorate([
|
|
103
92
|
typedi_1.Service("azure-storage")
|
|
104
93
|
], AzureStorageResource);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureStorage.js","sourceRoot":"","sources":["../../../src/component/resource/azureStorage.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"azureStorage.js","sourceRoot":"","sources":["../../../src/component/resource/azureStorage.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,wDAWgC;AAChC,4BAA0B;AAC1B,mCAAiC;AACjC,mDAA6B;AAC7B,qEAAyE;AACzE,8CAI4B;AAC5B,oEAAgF;AAChF,qEAA6E;AAC7E,uEAAgF;AAChF,mDAAgD;AAChD,yEAA+E;AAC/E,4CAA8D;AAC9D,0CAA+D;AAC/D,+CAA8C;AAC9C,uEAAoE;AAEpE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