@microsoft/teamsfx-core 1.22.1-alpha.d2fbcaf19.0 → 1.22.1-alpha.ecf7bf89a.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/checkerFactory.d.ts.map +1 -1
- package/build/common/deps-checker/checkerFactory.js +2 -0
- package/build/common/deps-checker/checkerFactory.js.map +1 -1
- package/build/common/deps-checker/constant/helpLink.d.ts +1 -0
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/common/deps-checker/constant/helpLink.js +2 -1
- package/build/common/deps-checker/constant/helpLink.js.map +1 -1
- package/build/common/deps-checker/constant/message.d.ts +2 -1
- package/build/common/deps-checker/constant/message.d.ts.map +1 -1
- package/build/common/deps-checker/constant/message.js +4 -1
- package/build/common/deps-checker/constant/message.js.map +1 -1
- package/build/common/deps-checker/constant/telemetry.d.ts +1 -0
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -1
- package/build/common/deps-checker/constant/telemetry.js +1 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -1
- package/build/common/deps-checker/depsChecker.d.ts +5 -1
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -1
- package/build/common/deps-checker/depsChecker.js +1 -0
- package/build/common/deps-checker/depsChecker.js.map +1 -1
- package/build/common/deps-checker/depsError.d.ts +4 -1
- package/build/common/deps-checker/depsError.d.ts.map +1 -1
- package/build/common/deps-checker/depsError.js +11 -4
- package/build/common/deps-checker/depsError.js.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.d.ts +13 -7
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/funcToolChecker.js +75 -44
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.d.ts +17 -6
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/nodeChecker.js +44 -22
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.d.ts +3 -3
- package/build/common/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -1
- package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -1
- package/build/common/m365/packageService.d.ts +1 -1
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +7 -4
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/m365/serviceConstant.d.ts +2 -2
- package/build/common/m365/serviceConstant.d.ts.map +1 -1
- package/build/common/m365/serviceConstant.js +2 -2
- package/build/common/m365/serviceConstant.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +4 -2
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/samples-config-v3.json +12 -22
- package/build/common/samples-config.json +1 -1
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +7 -4
- package/build/common/tools.js.map +1 -1
- package/build/common/versionMetadata.d.ts +23 -0
- package/build/common/versionMetadata.d.ts.map +1 -1
- package/build/common/versionMetadata.js +22 -2
- package/build/common/versionMetadata.js.map +1 -1
- package/build/component/configManager/error.d.ts +3 -0
- package/build/component/configManager/error.d.ts.map +1 -1
- package/build/component/configManager/error.js +15 -1
- package/build/component/configManager/error.js.map +1 -1
- package/build/component/configManager/interface.d.ts +2 -0
- package/build/component/configManager/interface.d.ts.map +1 -1
- package/build/component/configManager/interface.js.map +1 -1
- package/build/component/configManager/parser.d.ts +1 -0
- package/build/component/configManager/parser.d.ts.map +1 -1
- package/build/component/configManager/parser.js +14 -3
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/constant/commonConstant.d.ts +9 -1
- package/build/component/constant/commonConstant.d.ts.map +1 -1
- package/build/component/constant/commonConstant.js +8 -0
- package/build/component/constant/commonConstant.js.map +1 -1
- package/build/component/constant/deployConstant.d.ts +5 -0
- package/build/component/constant/deployConstant.d.ts.map +1 -1
- package/build/component/constant/deployConstant.js +19 -1
- package/build/component/constant/deployConstant.js.map +1 -1
- package/build/component/constants.d.ts +8 -0
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +12 -4
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts +0 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +78 -62
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/coordinator/summary.d.ts +13 -2
- package/build/component/coordinator/summary.d.ts.map +1 -1
- package/build/component/coordinator/summary.js +2 -2
- package/build/component/coordinator/summary.js.map +1 -1
- package/build/component/debugHandler/bot.d.ts.map +1 -1
- package/build/component/debugHandler/bot.js +5 -1
- package/build/component/debugHandler/bot.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +1 -0
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +5 -7
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/error/missingEnvError.d.ts.map +1 -1
- package/build/component/driver/aad/error/missingEnvError.js +2 -2
- package/build/component/driver/aad/error/missingEnvError.js.map +1 -1
- package/build/component/driver/aad/error/missingEnvInFileError.d.ts +5 -0
- package/build/component/driver/aad/error/missingEnvInFileError.d.ts.map +1 -0
- package/build/component/driver/aad/error/missingEnvInFileError.js +33 -0
- package/build/component/driver/aad/error/missingEnvInFileError.js.map +1 -0
- package/build/component/driver/aad/interface/updateAadAppArgs.d.ts +1 -1
- package/build/component/driver/aad/interface/updateAadAppArgs.d.ts.map +1 -1
- package/build/component/driver/aad/update.js +4 -4
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.d.ts +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.d.ts.map +1 -1
- package/build/component/driver/aad/utility/buildAadManifest.js +7 -10
- package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts +5 -11
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +22 -47
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts +5 -14
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +23 -45
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts +6 -2
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +21 -13
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts +45 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +150 -0
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -0
- package/build/component/driver/deploy/azure/{azureDeployDriver.d.ts → impl/azureDeployImpl.d.ts} +7 -31
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -0
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +146 -0
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -0
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.d.ts +42 -0
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.d.ts.map +1 -0
- package/build/component/driver/deploy/azure/{baseDeployDriver.js → impl/baseDeployImpl.js} +47 -33
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -0
- package/build/component/driver/deploy/azure/impl/progressBarHelper.d.ts +3 -0
- package/build/component/driver/deploy/azure/impl/progressBarHelper.d.ts.map +1 -0
- package/build/component/driver/deploy/azure/impl/progressBarHelper.js +15 -0
- package/build/component/driver/deploy/azure/impl/progressBarHelper.js.map +1 -0
- package/build/component/driver/file/updateEnv.js +1 -1
- package/build/component/driver/file/updateEnv.js.map +1 -1
- package/build/component/driver/file/{appsettingsGenerate.d.ts → updateJson.d.ts} +2 -2
- package/build/component/driver/file/updateJson.d.ts.map +1 -0
- package/build/component/driver/file/{appsettingsGenerate.js → updateJson.js} +12 -14
- package/build/component/driver/file/updateJson.js.map +1 -0
- package/build/component/driver/index.d.ts +2 -1
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +2 -1
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/m365/acquire.d.ts +15 -0
- package/build/component/driver/m365/acquire.d.ts.map +1 -0
- package/build/component/driver/m365/acquire.js +104 -0
- package/build/component/driver/m365/acquire.js.map +1 -0
- package/build/component/driver/m365/error/FileNotFoundUserError.d.ts +5 -0
- package/build/component/driver/m365/error/FileNotFoundUserError.d.ts.map +1 -0
- package/build/component/driver/m365/error/FileNotFoundUserError.js +22 -0
- package/build/component/driver/m365/error/FileNotFoundUserError.js.map +1 -0
- package/build/component/driver/m365/error/invalidParameterUserError.d.ts +5 -0
- package/build/component/driver/m365/error/invalidParameterUserError.d.ts.map +1 -0
- package/build/component/driver/m365/error/invalidParameterUserError.js +29 -0
- package/build/component/driver/m365/error/invalidParameterUserError.js.map +1 -0
- package/build/component/driver/m365/error/unhandledError.d.ts +5 -0
- package/build/component/driver/m365/error/unhandledError.d.ts.map +1 -0
- package/build/component/driver/m365/error/unhandledError.js +25 -0
- package/build/component/driver/m365/error/unhandledError.js.map +1 -0
- package/build/component/generator/generator.js +2 -2
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +12 -4
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +3 -7
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/officeAddin/question.d.ts +1 -2
- package/build/component/generator/officeAddin/question.d.ts.map +1 -1
- package/build/component/generator/officeAddin/question.js +1 -10
- package/build/component/generator/officeAddin/question.js.map +1 -1
- package/build/component/generator/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfxGenerator.js +5 -4
- package/build/component/generator/spfxGenerator.js.map +1 -1
- package/build/component/messages.d.ts +11 -11
- package/build/component/messages.d.ts.map +1 -1
- package/build/component/messages.js +11 -11
- package/build/component/messages.js.map +1 -1
- package/build/component/middleware/envMW.d.ts.map +1 -1
- package/build/component/middleware/envMW.js +15 -19
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/question.d.ts.map +1 -1
- package/build/component/question.js +7 -16
- package/build/component/question.js.map +1 -1
- package/build/component/resource/appManifest/appStudioClient.d.ts +1 -0
- package/build/component/resource/appManifest/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/appManifest/appStudioClient.js +17 -7
- package/build/component/resource/appManifest/appStudioClient.js.map +1 -1
- package/build/component/resource/appManifest/constants.d.ts +6 -0
- package/build/component/resource/appManifest/constants.d.ts.map +1 -1
- package/build/component/resource/appManifest/constants.js +3 -0
- package/build/component/resource/appManifest/constants.js.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils/ManifestUtils.js +6 -2
- package/build/component/resource/appManifest/utils/ManifestUtils.js.map +1 -1
- package/build/component/resource/appManifest/utils/utils.d.ts.map +1 -1
- package/build/component/resource/appManifest/utils/utils.js +15 -8
- package/build/component/resource/appManifest/utils/utils.js.map +1 -1
- package/build/component/resource/azureAppService/azureAppService.js +1 -1
- package/build/component/resource/azureAppService/azureAppService.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts +5 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +69 -46
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/resource/botService/botService.d.ts +3 -0
- package/build/component/resource/botService/botService.d.ts.map +1 -1
- package/build/component/resource/botService/botService.js +7 -4
- package/build/component/resource/botService/botService.js.map +1 -1
- package/build/component/resource/botService/common.d.ts +2 -0
- package/build/component/resource/botService/common.d.ts.map +1 -1
- package/build/component/resource/botService/common.js +8 -1
- package/build/component/resource/botService/common.js.map +1 -1
- package/build/component/resource/botService/constants.d.ts +7 -1
- package/build/component/resource/botService/constants.d.ts.map +1 -1
- package/build/component/resource/botService/constants.js +7 -1
- package/build/component/resource/botService/constants.js.map +1 -1
- package/build/component/resource/botService/errors.d.ts +9 -0
- package/build/component/resource/botService/errors.d.ts.map +1 -1
- package/build/component/resource/botService/errors.js +22 -1
- package/build/component/resource/botService/errors.js.map +1 -1
- package/build/component/resource/botService/messages.d.ts +5 -1
- package/build/component/resource/botService/messages.d.ts.map +1 -1
- package/build/component/resource/botService/messages.js +17 -25
- package/build/component/resource/botService/messages.js.map +1 -1
- package/build/component/resource/botService/retryHandler.d.ts.map +1 -1
- package/build/component/resource/botService/retryHandler.js +6 -1
- package/build/component/resource/botService/retryHandler.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +19 -0
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +54 -11
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts +10 -0
- package/build/component/utils/pathUtils.d.ts.map +1 -0
- package/build/component/utils/pathUtils.js +52 -0
- package/build/component/utils/pathUtils.js.map +1 -0
- package/build/component/utils/settingsUtil.d.ts.map +1 -1
- package/build/component/utils/settingsUtil.js +31 -13
- package/build/component/utils/settingsUtil.js.map +1 -1
- package/build/core/FxCoreImplementV3.d.ts.map +1 -1
- package/build/core/FxCoreImplementV3.js +31 -11
- package/build/core/FxCoreImplementV3.js.map +1 -1
- package/build/core/environment.d.ts +1 -1
- package/build/core/environment.d.ts.map +1 -1
- package/build/core/environment.js +20 -6
- package/build/core/environment.js.map +1 -1
- package/build/core/error.d.ts +2 -1
- package/build/core/error.d.ts.map +1 -1
- package/build/core/error.js +7 -3
- package/build/core/error.js.map +1 -1
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +1 -1
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/envInfoLoaderV3.js +2 -2
- package/build/core/middleware/envInfoLoaderV3.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +12 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +59 -82
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +13 -13
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/middleware/projectSettingsWriter.d.ts.map +1 -1
- package/build/core/middleware/projectSettingsWriter.js +1 -10
- package/build/core/middleware/projectSettingsWriter.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.d.ts.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +23 -10
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/types.d.ts +2 -1
- package/build/core/middleware/types.d.ts.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts +2 -0
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.js +12 -4
- package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts +13 -0
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/appLocalYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts +2 -3
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +17 -20
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.d.ts.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +28 -224
- package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
- package/build/core/middleware/utils/migrationContext.d.ts +2 -2
- package/build/core/middleware/utils/migrationContext.d.ts.map +1 -1
- package/build/core/middleware/utils/migrationContext.js +9 -10
- package/build/core/middleware/utils/migrationContext.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.d.ts +4 -4
- package/build/core/middleware/utils/v3MigrationUtils.d.ts.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +33 -11
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/question.d.ts +4 -1
- package/build/core/question.d.ts.map +1 -1
- package/build/core/question.js +13 -15
- package/build/core/question.js.map +1 -1
- package/build/core/types.d.ts +1 -0
- package/build/core/types.d.ts.map +1 -1
- package/package.json +13 -6
- package/resource/package.nls.cs.json +63 -44
- package/resource/package.nls.de.json +63 -44
- package/resource/package.nls.es.json +63 -44
- package/resource/package.nls.fr.json +63 -44
- package/resource/package.nls.it.json +63 -44
- package/resource/package.nls.ja.json +63 -44
- package/resource/package.nls.json +58 -38
- package/resource/package.nls.ko.json +63 -44
- package/resource/package.nls.pl.json +63 -44
- package/resource/package.nls.pt-BR.json +63 -44
- package/resource/package.nls.ru.json +63 -44
- package/resource/package.nls.tr.json +63 -44
- package/resource/package.nls.zh-Hans.json +63 -44
- package/resource/package.nls.zh-Hant.json +63 -44
- package/templates/bicep/azureWebApp.provision.module.bicep +1 -1
- package/templates/core/v3Migration/csharp.app.local.yml +6 -6
- package/templates/core/v3Migration/csharp.app.yml +11 -7
- package/templates/core/v3Migration/js.ts.app.local.yml +120 -24
- package/templates/core/v3Migration/js.ts.app.yml +10 -6
- package/templates/core/v3Migration/spfx.app.yml +7 -5
- package/templates/core/v3Migration/upgradeReport.md +36 -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.csharp.workflow.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.js.workflow.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/bot.ts.workflow.zip +0 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.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/js.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.dashboard.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.dashboard.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/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/bot/README.md +6 -6
- package/templates/plugins/resource/aad/auth/bot/README.txt +36 -3
- package/templates/plugins/resource/apim/README.md +1 -1
- package/templates/plugins/resource/bot/bicep/botProvision.template.bicep +1 -1
- package/templates/plugins/resource/hosting/bicep/webapp/webappProvision.template.bicep +1 -1
- package/templates/plugins/resource/spfx/solution/README.md +1 -1
- package/build/component/driver/deploy/azure/azureDeployDriver.d.ts.map +0 -1
- package/build/component/driver/deploy/azure/azureDeployDriver.js +0 -237
- package/build/component/driver/deploy/azure/azureDeployDriver.js.map +0 -1
- package/build/component/driver/deploy/azure/baseDeployDriver.d.ts +0 -25
- package/build/component/driver/deploy/azure/baseDeployDriver.d.ts.map +0 -1
- package/build/component/driver/deploy/azure/baseDeployDriver.js.map +0 -1
- package/build/component/driver/file/appsettingsGenerate.d.ts.map +0 -1
- package/build/component/driver/file/appsettingsGenerate.js.map +0 -1
- package/build/component/driver/interface/baseDeployStepDriver.d.ts +0 -19
- package/build/component/driver/interface/baseDeployStepDriver.d.ts.map +0 -1
- package/build/component/driver/interface/baseDeployStepDriver.js +0 -30
- package/build/component/driver/interface/baseDeployStepDriver.js.map +0 -1
- package/templates/core/v3Migration/migrationReport.md +0 -37
|
@@ -1,76 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
|
+
var AzureAppServiceDeployDriver_1;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
6
|
+
exports.AzureAppServiceDeployDriver = void 0;
|
|
6
7
|
const tslib_1 = require("tslib");
|
|
7
|
-
const azureDeployDriver_1 = require("./azureDeployDriver");
|
|
8
8
|
const typedi_1 = require("typedi");
|
|
9
|
-
const common_1 = require("../../../utils/common");
|
|
10
9
|
const lib_1 = require("@feathersjs/hooks/lib");
|
|
11
10
|
const addStartAndEndTelemetry_1 = require("../../middleware/addStartAndEndTelemetry");
|
|
12
11
|
const commonConstant_1 = require("../../../constant/commonConstant");
|
|
13
|
-
const deployConstant_1 = require("../../../constant/deployConstant");
|
|
14
|
-
const messages_1 = require("../../../messages");
|
|
15
12
|
const localizeUtils_1 = require("../../../../common/localizeUtils");
|
|
13
|
+
const AzureZipDeployImpl_1 = require("./impl/AzureZipDeployImpl");
|
|
16
14
|
const ACTION_NAME = "azureAppService/deploy";
|
|
17
|
-
let AzureAppServiceDeployDriver = class AzureAppServiceDeployDriver {
|
|
15
|
+
let AzureAppServiceDeployDriver = AzureAppServiceDeployDriver_1 = class AzureAppServiceDeployDriver {
|
|
18
16
|
constructor() {
|
|
19
17
|
this.description = localizeUtils_1.getLocalizedString("driver.deploy.deployToAzureAppServiceDescription");
|
|
20
18
|
}
|
|
21
19
|
async run(args, context) {
|
|
22
|
-
const impl = new
|
|
23
|
-
return
|
|
20
|
+
const impl = new AzureZipDeployImpl_1.AzureZipDeployImpl(args, context, AzureAppServiceDeployDriver_1.SERVICE_NAME, "https://aka.ms/teamsfx-actions/azure-app-service-deploy", AzureAppServiceDeployDriver_1.SUMMARY, AzureAppServiceDeployDriver_1.SUMMARY_PREPARE);
|
|
21
|
+
return (await impl.run()).result;
|
|
24
22
|
}
|
|
25
23
|
async execute(args, ctx) {
|
|
26
|
-
const impl = new
|
|
27
|
-
|
|
28
|
-
if (impl.dryRun) {
|
|
29
|
-
return common_1.wrapSummary(async () => {
|
|
30
|
-
return res;
|
|
31
|
-
}, ["driver.deploy.notice.deployDryRunComplete"]);
|
|
32
|
-
}
|
|
33
|
-
return common_1.wrapSummary(async () => {
|
|
34
|
-
return res;
|
|
35
|
-
}, ["driver.deploy.azureAppServiceDeploySummary"]);
|
|
24
|
+
const impl = new AzureZipDeployImpl_1.AzureZipDeployImpl(args, ctx, AzureAppServiceDeployDriver_1.SERVICE_NAME, "https://aka.ms/teamsfx-actions/azure-app-service-deploy", AzureAppServiceDeployDriver_1.SUMMARY, AzureAppServiceDeployDriver_1.SUMMARY_PREPARE);
|
|
25
|
+
return await impl.run();
|
|
36
26
|
}
|
|
37
27
|
};
|
|
28
|
+
AzureAppServiceDeployDriver.SERVICE_NAME = "Azure App Service";
|
|
29
|
+
AzureAppServiceDeployDriver.SUMMARY = [
|
|
30
|
+
localizeUtils_1.getLocalizedString("driver.deploy.azureAppServiceDeploySummary"),
|
|
31
|
+
];
|
|
32
|
+
AzureAppServiceDeployDriver.SUMMARY_PREPARE = [
|
|
33
|
+
localizeUtils_1.getLocalizedString("driver.deploy.notice.deployDryRunComplete"),
|
|
34
|
+
];
|
|
38
35
|
tslib_1.__decorate([
|
|
39
36
|
lib_1.hooks([addStartAndEndTelemetry_1.addStartAndEndTelemetry(ACTION_NAME, commonConstant_1.TelemetryConstant.DEPLOY_COMPONENT_NAME)]),
|
|
40
37
|
tslib_1.__metadata("design:type", Function),
|
|
41
38
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
42
39
|
tslib_1.__metadata("design:returntype", Promise)
|
|
43
40
|
], AzureAppServiceDeployDriver.prototype, "run", null);
|
|
44
|
-
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
lib_1.hooks([addStartAndEndTelemetry_1.addStartAndEndTelemetry(ACTION_NAME, commonConstant_1.TelemetryConstant.DEPLOY_COMPONENT_NAME)]),
|
|
43
|
+
tslib_1.__metadata("design:type", Function),
|
|
44
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
45
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
46
|
+
], AzureAppServiceDeployDriver.prototype, "execute", null);
|
|
47
|
+
AzureAppServiceDeployDriver = AzureAppServiceDeployDriver_1 = tslib_1.__decorate([
|
|
45
48
|
typedi_1.Service(ACTION_NAME)
|
|
46
49
|
], AzureAppServiceDeployDriver);
|
|
47
50
|
exports.AzureAppServiceDeployDriver = AzureAppServiceDeployDriver;
|
|
48
|
-
class AzureAppServiceDeployDriverImpl extends azureDeployDriver_1.AzureDeployDriver {
|
|
49
|
-
constructor() {
|
|
50
|
-
super(...arguments);
|
|
51
|
-
this.pattern = /\/subscriptions\/([^\/]*)\/resourceGroups\/([^\/]*)\/providers\/Microsoft.Web\/sites\/([^\/]*)/i;
|
|
52
|
-
this.helpLink = "https://aka.ms/teamsfx-actions/azure-app-service-deploy";
|
|
53
|
-
}
|
|
54
|
-
async azureDeploy(args, azureResource, azureCredential) {
|
|
55
|
-
var _a, _b, _c, _d, _e;
|
|
56
|
-
await ((_a = this.progressBar) === null || _a === void 0 ? void 0 : _a.start());
|
|
57
|
-
const cost = await this.zipDeploy(args, azureResource, azureCredential);
|
|
58
|
-
if (this.dryRun) {
|
|
59
|
-
await ((_b = this.progressBar) === null || _b === void 0 ? void 0 : _b.end(true));
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
await ((_c = this.progressBar) === null || _c === void 0 ? void 0 : _c.next(messages_1.ProgressMessages.restartAzureService));
|
|
63
|
-
await this.restartFunctionApp(azureResource);
|
|
64
|
-
await ((_d = this.progressBar) === null || _d === void 0 ? void 0 : _d.end(true));
|
|
65
|
-
if (cost > deployConstant_1.DeployConstant.DEPLOY_OVER_TIME) {
|
|
66
|
-
await ((_e = this.context.logProvider) === null || _e === void 0 ? void 0 : _e.info(messages_1.getLocalizedMessage("driver.deploy.notice.deployAcceleration", "https://aka.ms/teamsfx-config-run-from-package").localized));
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
createProgressBar(ui) {
|
|
70
|
-
var _a;
|
|
71
|
-
const steps = this.dryRun ? 1 : 6;
|
|
72
|
-
return ui === null || ui === void 0 ? void 0 : ui.createProgressBar(`Deploying ${(_a = this.workingDirectory) !== null && _a !== void 0 ? _a : ""} to Azure App Service`, steps);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.AzureAppServiceDeployDriverImpl = AzureAppServiceDeployDriverImpl;
|
|
76
51
|
//# sourceMappingURL=azureAppServiceDeployDriver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureAppServiceDeployDriver.js","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureAppServiceDeployDriver.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"azureAppServiceDeployDriver.js","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureAppServiceDeployDriver.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;AAGlC,mCAAiC;AAGjC,+CAA8C;AAC9C,sFAAmF;AACnF,qEAAqE;AACrE,oEAAsE;AACtE,kEAA+D;AAE/D,MAAM,WAAW,GAAG,wBAAwB,CAAC;AAG7C,IAAa,2BAA2B,mCAAxC,MAAa,2BAA2B;IAAxC;QACW,gBAAW,GAAW,kCAAkB,CAC/C,kDAAkD,CACnD,CAAC;IAkCJ,CAAC;IAxBC,KAAK,CAAC,GAAG,CAAC,IAAa,EAAE,OAAsB;QAC7C,MAAM,IAAI,GAAG,IAAI,uCAAkB,CACjC,IAAI,EACJ,OAAO,EACP,6BAA2B,CAAC,YAAY,EACxC,yDAAyD,EACzD,6BAA2B,CAAC,OAAO,EACnC,6BAA2B,CAAC,eAAe,CAC5C,CAAC;QACF,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;IACnC,CAAC;IAGD,KAAK,CAAC,OAAO,CAAC,IAAa,EAAE,GAAkB;QAC7C,MAAM,IAAI,GAAG,IAAI,uCAAkB,CACjC,IAAI,EACJ,GAAG,EACH,6BAA2B,CAAC,YAAY,EACxC,yDAAyD,EACzD,6BAA2B,CAAC,OAAO,EACnC,6BAA2B,CAAC,eAAe,CAC5C,CAAC;QACF,OAAO,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;IAC1B,CAAC;CACF,CAAA;AAjCyB,wCAAY,GAAG,mBAAmB,CAAC;AACnC,mCAAO,GAAG;IAChC,kCAAkB,CAAC,4CAA4C,CAAC;CACjE,CAAC;AACsB,2CAAe,GAAG;IACxC,kCAAkB,CAAC,2CAA2C,CAAC;CAChE,CAAC;AAGF;IADC,WAAK,CAAC,CAAC,iDAAuB,CAAC,WAAW,EAAE,kCAAiB,CAAC,qBAAqB,CAAC,CAAC,CAAC;;;;sDAWtF;AAGD;IADC,WAAK,CAAC,CAAC,iDAAuB,CAAC,WAAW,EAAE,kCAAiB,CAAC,qBAAqB,CAAC,CAAC,CAAC;;;;0DAWtF;AApCU,2BAA2B;IADvC,gBAAO,CAAC,WAAW,CAAC;GACR,2BAA2B,CAqCvC;AArCY,kEAA2B"}
|
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import { DeployStepArgs } from "../../interface/buildAndDeployArgs";
|
|
2
|
-
import { AzureDeployDriver } from "./azureDeployDriver";
|
|
3
1
|
import { ExecutionResult, StepDriver } from "../../interface/stepDriver";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { FxError, IProgressHandler, Result, UserInteraction } from "@microsoft/teamsfx-api";
|
|
2
|
+
import { DriverContext } from "../../interface/commonArgs";
|
|
3
|
+
import { FxError, Result } from "@microsoft/teamsfx-api";
|
|
7
4
|
export declare class AzureFunctionDeployDriver implements StepDriver {
|
|
8
5
|
readonly description: string;
|
|
6
|
+
private static readonly SERVICE_NAME;
|
|
7
|
+
private static readonly SUMMARY;
|
|
8
|
+
private static readonly SUMMARY_PREPARE;
|
|
9
9
|
run(args: unknown, context: DriverContext): Promise<Result<Map<string, string>, FxError>>;
|
|
10
10
|
execute(args: unknown, ctx: DriverContext): Promise<ExecutionResult>;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* deploy to Azure Function
|
|
14
|
-
*/
|
|
15
|
-
export declare class AzureFunctionDeployDriverImpl extends AzureDeployDriver {
|
|
16
|
-
pattern: RegExp;
|
|
17
|
-
protected helpLink: string;
|
|
18
|
-
azureDeploy(args: DeployStepArgs, azureResource: AzureResourceInfo, azureCredential: TokenCredential): Promise<void>;
|
|
19
|
-
createProgressBar(ui?: UserInteraction): IProgressHandler | undefined;
|
|
20
|
-
}
|
|
21
12
|
//# sourceMappingURL=azureFunctionDeployDriver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureFunctionDeployDriver.d.ts","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureFunctionDeployDriver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"azureFunctionDeployDriver.d.ts","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureFunctionDeployDriver.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AASzD,qBACa,yBAA0B,YAAW,UAAU;IAC1D,QAAQ,CAAC,WAAW,EAAE,MAAM,CAE1B;IACF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAwB;IAC5D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAG7B;IACF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAErC;IAGI,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;IAazF,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;CAW3E"}
|
|
@@ -1,74 +1,52 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
|
+
var AzureFunctionDeployDriver_1;
|
|
4
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
6
|
+
exports.AzureFunctionDeployDriver = void 0;
|
|
6
7
|
const tslib_1 = require("tslib");
|
|
7
|
-
const azureDeployDriver_1 = require("./azureDeployDriver");
|
|
8
8
|
const typedi_1 = require("typedi");
|
|
9
|
-
const common_1 = require("../../../utils/common");
|
|
10
|
-
const messages_1 = require("../../../messages");
|
|
11
9
|
const hooks_1 = require("@feathersjs/hooks");
|
|
12
10
|
const addStartAndEndTelemetry_1 = require("../../middleware/addStartAndEndTelemetry");
|
|
13
11
|
const commonConstant_1 = require("../../../constant/commonConstant");
|
|
14
12
|
const localizeUtils_1 = require("../../../../common/localizeUtils");
|
|
13
|
+
const AzureZipDeployImpl_1 = require("./impl/AzureZipDeployImpl");
|
|
15
14
|
const ACTION_NAME = "azureFunctions/deploy";
|
|
16
|
-
let AzureFunctionDeployDriver = class AzureFunctionDeployDriver {
|
|
15
|
+
let AzureFunctionDeployDriver = AzureFunctionDeployDriver_1 = class AzureFunctionDeployDriver {
|
|
17
16
|
constructor() {
|
|
18
17
|
this.description = localizeUtils_1.getLocalizedString("driver.deploy.deployToAzureFunctionsDescription");
|
|
19
18
|
}
|
|
20
19
|
async run(args, context) {
|
|
21
|
-
const impl = new
|
|
22
|
-
return
|
|
20
|
+
const impl = new AzureZipDeployImpl_1.AzureZipDeployImpl(args, context, AzureFunctionDeployDriver_1.SERVICE_NAME, "https://aka.ms/teamsfx-actions/azure-functions-deploy", AzureFunctionDeployDriver_1.SUMMARY, AzureFunctionDeployDriver_1.SUMMARY_PREPARE);
|
|
21
|
+
return (await impl.run()).result;
|
|
23
22
|
}
|
|
24
23
|
async execute(args, ctx) {
|
|
25
|
-
const impl = new
|
|
26
|
-
|
|
27
|
-
if (impl.dryRun) {
|
|
28
|
-
return common_1.wrapSummary(async () => {
|
|
29
|
-
return res;
|
|
30
|
-
}, ["driver.deploy.notice.deployDryRunComplete"]);
|
|
31
|
-
}
|
|
32
|
-
return common_1.wrapSummary(async () => {
|
|
33
|
-
return res;
|
|
34
|
-
// eslint-disable-next-line no-secrets/no-secrets
|
|
35
|
-
}, ["driver.deploy.azureFunctionsDeploySummary"]);
|
|
24
|
+
const impl = new AzureZipDeployImpl_1.AzureZipDeployImpl(args, ctx, AzureFunctionDeployDriver_1.SERVICE_NAME, "https://aka.ms/teamsfx-actions/azure-functions-deploy", AzureFunctionDeployDriver_1.SUMMARY, AzureFunctionDeployDriver_1.SUMMARY_PREPARE);
|
|
25
|
+
return await impl.run();
|
|
36
26
|
}
|
|
37
27
|
};
|
|
28
|
+
AzureFunctionDeployDriver.SERVICE_NAME = "Azure Function App";
|
|
29
|
+
AzureFunctionDeployDriver.SUMMARY = [
|
|
30
|
+
// eslint-disable-next-line no-secrets/no-secrets
|
|
31
|
+
localizeUtils_1.getLocalizedString("driver.deploy.azureFunctionsDeploySummary"),
|
|
32
|
+
];
|
|
33
|
+
AzureFunctionDeployDriver.SUMMARY_PREPARE = [
|
|
34
|
+
localizeUtils_1.getLocalizedString("driver.deploy.notice.deployDryRunComplete"),
|
|
35
|
+
];
|
|
38
36
|
tslib_1.__decorate([
|
|
39
37
|
hooks_1.hooks([addStartAndEndTelemetry_1.addStartAndEndTelemetry(ACTION_NAME, commonConstant_1.TelemetryConstant.DEPLOY_COMPONENT_NAME)]),
|
|
40
38
|
tslib_1.__metadata("design:type", Function),
|
|
41
39
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
42
40
|
tslib_1.__metadata("design:returntype", Promise)
|
|
43
41
|
], AzureFunctionDeployDriver.prototype, "run", null);
|
|
44
|
-
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
hooks_1.hooks([addStartAndEndTelemetry_1.addStartAndEndTelemetry(ACTION_NAME, commonConstant_1.TelemetryConstant.DEPLOY_COMPONENT_NAME)]),
|
|
44
|
+
tslib_1.__metadata("design:type", Function),
|
|
45
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
46
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
47
|
+
], AzureFunctionDeployDriver.prototype, "execute", null);
|
|
48
|
+
AzureFunctionDeployDriver = AzureFunctionDeployDriver_1 = tslib_1.__decorate([
|
|
45
49
|
typedi_1.Service(ACTION_NAME)
|
|
46
50
|
], AzureFunctionDeployDriver);
|
|
47
51
|
exports.AzureFunctionDeployDriver = AzureFunctionDeployDriver;
|
|
48
|
-
/**
|
|
49
|
-
* deploy to Azure Function
|
|
50
|
-
*/
|
|
51
|
-
class AzureFunctionDeployDriverImpl extends azureDeployDriver_1.AzureDeployDriver {
|
|
52
|
-
constructor() {
|
|
53
|
-
super(...arguments);
|
|
54
|
-
this.pattern = /\/subscriptions\/([^\/]*)\/resourceGroups\/([^\/]*)\/providers\/Microsoft.Web\/sites\/([^\/]*)/i;
|
|
55
|
-
this.helpLink = "https://aka.ms/teamsfx-actions/azure-functions-deploy";
|
|
56
|
-
}
|
|
57
|
-
async azureDeploy(args, azureResource, azureCredential) {
|
|
58
|
-
var _a, _b, _c;
|
|
59
|
-
await ((_a = this.progressBar) === null || _a === void 0 ? void 0 : _a.start());
|
|
60
|
-
await this.zipDeploy(args, azureResource, azureCredential);
|
|
61
|
-
if (!this.dryRun) {
|
|
62
|
-
await ((_b = this.progressBar) === null || _b === void 0 ? void 0 : _b.next(messages_1.ProgressMessages.restartAzureFunctionApp));
|
|
63
|
-
await this.restartFunctionApp(azureResource);
|
|
64
|
-
}
|
|
65
|
-
await ((_c = this.progressBar) === null || _c === void 0 ? void 0 : _c.end(true));
|
|
66
|
-
}
|
|
67
|
-
createProgressBar(ui) {
|
|
68
|
-
var _a;
|
|
69
|
-
const steps = this.dryRun ? 1 : 6;
|
|
70
|
-
return ui === null || ui === void 0 ? void 0 : ui.createProgressBar(`Deploying ${(_a = this.workingDirectory) !== null && _a !== void 0 ? _a : ""} to Azure Function App`, steps);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
exports.AzureFunctionDeployDriverImpl = AzureFunctionDeployDriverImpl;
|
|
74
52
|
//# sourceMappingURL=azureFunctionDeployDriver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureFunctionDeployDriver.js","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureFunctionDeployDriver.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC
|
|
1
|
+
{"version":3,"file":"azureFunctionDeployDriver.js","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureFunctionDeployDriver.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;;AAElC,mCAAiC;AAIjC,6CAA0C;AAC1C,sFAAmF;AACnF,qEAAqE;AACrE,oEAAsE;AACtE,kEAA+D;AAE/D,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAG5C,IAAa,yBAAyB,iCAAtC,MAAa,yBAAyB;IAAtC;QACW,gBAAW,GAAW,kCAAkB,CAC/C,iDAAiD,CAClD,CAAC;IAmCJ,CAAC;IAxBC,KAAK,CAAC,GAAG,CAAC,IAAa,EAAE,OAAsB;QAC7C,MAAM,IAAI,GAAG,IAAI,uCAAkB,CACjC,IAAI,EACJ,OAAO,EACP,2BAAyB,CAAC,YAAY,EACtC,uDAAuD,EACvD,2BAAyB,CAAC,OAAO,EACjC,2BAAyB,CAAC,eAAe,CAC1C,CAAC;QACF,OAAO,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;IACnC,CAAC;IAGD,KAAK,CAAC,OAAO,CAAC,IAAa,EAAE,GAAkB;QAC7C,MAAM,IAAI,GAAG,IAAI,uCAAkB,CACjC,IAAI,EACJ,GAAG,EACH,2BAAyB,CAAC,YAAY,EACtC,uDAAuD,EACvD,2BAAyB,CAAC,OAAO,EACjC,2BAAyB,CAAC,eAAe,CAC1C,CAAC;QACF,OAAO,MAAM,IAAI,CAAC,GAAG,EAAE,CAAC;IAC1B,CAAC;CACF,CAAA;AAlCyB,sCAAY,GAAG,oBAAoB,CAAC;AACpC,iCAAO,GAAG;IAChC,iDAAiD;IACjD,kCAAkB,CAAC,2CAA2C,CAAC;CAChE,CAAC;AACsB,yCAAe,GAAG;IACxC,kCAAkB,CAAC,2CAA2C,CAAC;CAChE,CAAC;AAGF;IADC,aAAK,CAAC,CAAC,iDAAuB,CAAC,WAAW,EAAE,kCAAiB,CAAC,qBAAqB,CAAC,CAAC,CAAC;;;;oDAWtF;AAGD;IADC,aAAK,CAAC,CAAC,iDAAuB,CAAC,WAAW,EAAE,kCAAiB,CAAC,qBAAqB,CAAC,CAAC,CAAC;;;;wDAWtF;AArCU,yBAAyB;IADrC,gBAAO,CAAC,WAAW,CAAC;GACR,yBAAyB,CAsCrC;AAtCY,8DAAyB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AzureDeployImpl } from "./impl/azureDeployImpl";
|
|
2
2
|
import { DeployStepArgs } from "../../interface/buildAndDeployArgs";
|
|
3
3
|
import { FxError, IProgressHandler, Result, UserInteraction } from "@microsoft/teamsfx-api";
|
|
4
4
|
import { ExecutionResult, StepDriver } from "../../interface/stepDriver";
|
|
@@ -12,7 +12,11 @@ export declare class AzureStorageDeployDriver implements StepDriver {
|
|
|
12
12
|
/**
|
|
13
13
|
* deploy to Azure Storage
|
|
14
14
|
*/
|
|
15
|
-
export declare class AzureStorageDeployDriverImpl extends
|
|
15
|
+
export declare class AzureStorageDeployDriverImpl extends AzureDeployImpl {
|
|
16
|
+
protected summaries: string[];
|
|
17
|
+
protected summaryPrepare: string[];
|
|
18
|
+
protected progressHandler: AsyncIterableIterator<void>;
|
|
19
|
+
protected progressNames: (() => string)[];
|
|
16
20
|
pattern: RegExp;
|
|
17
21
|
protected helpLink: string;
|
|
18
22
|
azureDeploy(args: DeployStepArgs, azureResource: AzureResourceInfo, azureCredential: TokenCredential): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureStorageDeployDriver.d.ts","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureStorageDeployDriver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"azureStorageDeployDriver.d.ts","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureStorageDeployDriver.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAcpE,OAAO,EACL,OAAO,EACP,gBAAgB,EAEhB,MAAM,EACN,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE9E,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AASlD,qBACa,wBAAyB,YAAW,UAAU;IACzD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAE1B;IAEI,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;IAM/F,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;CAIrE;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,eAAe;IAC/D,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,CAAmE;IAChG,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,CAAM;IACxC,SAAS,CAAC,eAAe,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAEpD;IACF,SAAS,CAAC,aAAa,mBAA+D;IAEtF,OAAO,SAC2G;IAElH,SAAS,CAAC,QAAQ,SAAyD;IAErE,WAAW,CACf,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,iBAAiB,EAChC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,IAAI,CAAC;mBAiDK,qBAAqB;YAc5B,cAAc;IA4B5B,OAAO,CAAC,MAAM,CAAC,UAAU;IAIzB,iBAAiB,CAAC,EAAE,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS;CAMtE"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.AzureStorageDeployDriverImpl = exports.AzureStorageDeployDriver = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
|
-
const
|
|
7
|
+
const azureDeployImpl_1 = require("./impl/azureDeployImpl");
|
|
8
8
|
const deployConstant_1 = require("../../../constant/deployConstant");
|
|
9
9
|
const deployError_1 = require("../../../error/deployError");
|
|
10
10
|
const fileOperation_1 = require("../../../utils/fileOperation");
|
|
@@ -12,12 +12,11 @@ const path_1 = tslib_1.__importDefault(require("path"));
|
|
|
12
12
|
const mime = tslib_1.__importStar(require("mime"));
|
|
13
13
|
const typedi_1 = require("typedi");
|
|
14
14
|
const azureResourceOperation_1 = require("../../../utils/azureResourceOperation");
|
|
15
|
-
const common_1 = require("../../../utils/common");
|
|
16
15
|
const hooks_1 = require("@feathersjs/hooks");
|
|
17
16
|
const addStartAndEndTelemetry_1 = require("../../middleware/addStartAndEndTelemetry");
|
|
18
17
|
const commonConstant_1 = require("../../../constant/commonConstant");
|
|
19
|
-
const messages_1 = require("../../../messages");
|
|
20
18
|
const localizeUtils_1 = require("../../../../common/localizeUtils");
|
|
19
|
+
const progressBarHelper_1 = require("./impl/progressBarHelper");
|
|
21
20
|
const ACTION_NAME = "azureStorage/deploy";
|
|
22
21
|
let AzureStorageDeployDriver = class AzureStorageDeployDriver {
|
|
23
22
|
constructor() {
|
|
@@ -25,10 +24,11 @@ let AzureStorageDeployDriver = class AzureStorageDeployDriver {
|
|
|
25
24
|
}
|
|
26
25
|
async run(args, context) {
|
|
27
26
|
const impl = new AzureStorageDeployDriverImpl(args, context);
|
|
28
|
-
return
|
|
27
|
+
return (await impl.run()).result;
|
|
29
28
|
}
|
|
30
29
|
execute(args, ctx) {
|
|
31
|
-
|
|
30
|
+
const impl = new AzureStorageDeployDriverImpl(args, ctx);
|
|
31
|
+
return impl.run();
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
tslib_1.__decorate([
|
|
@@ -37,6 +37,12 @@ tslib_1.__decorate([
|
|
|
37
37
|
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
38
38
|
tslib_1.__metadata("design:returntype", Promise)
|
|
39
39
|
], AzureStorageDeployDriver.prototype, "run", null);
|
|
40
|
+
tslib_1.__decorate([
|
|
41
|
+
hooks_1.hooks([addStartAndEndTelemetry_1.addStartAndEndTelemetry(ACTION_NAME, commonConstant_1.TelemetryConstant.DEPLOY_COMPONENT_NAME)]),
|
|
42
|
+
tslib_1.__metadata("design:type", Function),
|
|
43
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
44
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
45
|
+
], AzureStorageDeployDriver.prototype, "execute", null);
|
|
40
46
|
AzureStorageDeployDriver = tslib_1.__decorate([
|
|
41
47
|
typedi_1.Service(ACTION_NAME)
|
|
42
48
|
], AzureStorageDeployDriver);
|
|
@@ -44,25 +50,28 @@ exports.AzureStorageDeployDriver = AzureStorageDeployDriver;
|
|
|
44
50
|
/**
|
|
45
51
|
* deploy to Azure Storage
|
|
46
52
|
*/
|
|
47
|
-
class AzureStorageDeployDriverImpl extends
|
|
53
|
+
class AzureStorageDeployDriverImpl extends azureDeployImpl_1.AzureDeployImpl {
|
|
48
54
|
constructor() {
|
|
49
55
|
super(...arguments);
|
|
56
|
+
this.summaries = [localizeUtils_1.getLocalizedString("driver.deploy.azureStorageDeploySummary")];
|
|
57
|
+
this.summaryPrepare = [];
|
|
58
|
+
this.progressHandler = progressBarHelper_1.progressBarHelper(deployConstant_1.ProgressBarConstant.UPLOAD_DEPLOY_TO_AZURE_STORAGE_PROGRESS);
|
|
59
|
+
this.progressNames = deployConstant_1.ProgressBarConstant.UPLOAD_DEPLOY_TO_AZURE_STORAGE_PROGRESS;
|
|
50
60
|
this.pattern = /\/subscriptions\/([^\/]*)\/resourceGroups\/([^\/]*)\/providers\/Microsoft.Storage\/storageAccounts\/([^\/]*)/i;
|
|
51
61
|
this.helpLink = "https://aka.ms/teamsfx-actions/azure-storage-deploy";
|
|
52
62
|
}
|
|
53
63
|
async azureDeploy(args, azureResource, azureCredential) {
|
|
54
|
-
var _a, _b, _c
|
|
55
|
-
await ((_a = this.progressBar) === null || _a === void 0 ? void 0 : _a.start());
|
|
64
|
+
var _a, _b, _c;
|
|
56
65
|
await this.context.logProvider.debug("Start deploying to Azure Storage Service");
|
|
57
66
|
await this.context.logProvider.debug("Get Azure Storage Service deploy credential");
|
|
58
|
-
await ((
|
|
67
|
+
await ((_a = this.progressHandler) === null || _a === void 0 ? void 0 : _a.next());
|
|
59
68
|
const containerClient = await AzureStorageDeployDriverImpl.createContainerClient(azureResource, azureCredential);
|
|
60
69
|
// delete all existing blobs
|
|
61
|
-
await ((
|
|
70
|
+
await ((_b = this.progressHandler) === null || _b === void 0 ? void 0 : _b.next());
|
|
62
71
|
await this.deleteAllBlobs(containerClient, azureResource.instanceId, this.context.logProvider);
|
|
63
72
|
await this.context.logProvider.debug("Uploading files to Azure Storage Service");
|
|
64
73
|
// upload all to storage
|
|
65
|
-
await ((
|
|
74
|
+
await ((_c = this.progressHandler) === null || _c === void 0 ? void 0 : _c.next());
|
|
66
75
|
const ig = await this.handleIgnore(args, this.context);
|
|
67
76
|
const sourceFolder = this.distDirectory;
|
|
68
77
|
const tasks = [];
|
|
@@ -87,7 +96,6 @@ class AzureStorageDeployDriverImpl extends azureDeployDriver_1.AzureDeployDriver
|
|
|
87
96
|
throw deployError_1.DeployExternalApiCallError.uploadToStorageError(sourceFolder, errorResponse, this.helpLink);
|
|
88
97
|
}
|
|
89
98
|
await this.context.logProvider.debug("Upload files to Azure Storage Service successfully");
|
|
90
|
-
await ((_e = this.progressBar) === null || _e === void 0 ? void 0 : _e.end(true));
|
|
91
99
|
return;
|
|
92
100
|
}
|
|
93
101
|
static async createContainerClient(azureResource, azureCredential) {
|
|
@@ -129,7 +137,7 @@ class AzureStorageDeployDriverImpl extends azureDeployDriver_1.AzureDeployDriver
|
|
|
129
137
|
}
|
|
130
138
|
createProgressBar(ui) {
|
|
131
139
|
var _a;
|
|
132
|
-
return ui === null || ui === void 0 ? void 0 : ui.createProgressBar(`Deploying ${(_a = this.workingDirectory) !== null && _a !== void 0 ? _a : ""} to Azure Storage Service`,
|
|
140
|
+
return ui === null || ui === void 0 ? void 0 : ui.createProgressBar(`Deploying ${(_a = this.workingDirectory) !== null && _a !== void 0 ? _a : ""} to Azure Storage Service`, this.progressNames.length);
|
|
133
141
|
}
|
|
134
142
|
}
|
|
135
143
|
exports.AzureStorageDeployDriverImpl = AzureStorageDeployDriverImpl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureStorageDeployDriver.js","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureStorageDeployDriver.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,
|
|
1
|
+
{"version":3,"file":"azureStorageDeployDriver.js","sourceRoot":"","sources":["../../../../../src/component/driver/deploy/azure/azureStorageDeployDriver.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,4DAAyD;AASzD,qEAAuF;AACvF,4DAAwE;AACxE,gEAAiE;AAEjE,wD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AtHD,oEAsHC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { AzureDeployImpl } from "./azureDeployImpl";
|
|
3
|
+
import { AzureUploadConfig, DeployStepArgs } from "../../../interface/buildAndDeployArgs";
|
|
4
|
+
import { AzureResourceInfo, DriverContext } from "../../../interface/commonArgs";
|
|
5
|
+
import { TokenCredential } from "@azure/core-auth";
|
|
6
|
+
import { IProgressHandler, LogProvider, UserInteraction } from "@microsoft/teamsfx-api";
|
|
7
|
+
export declare class AzureZipDeployImpl extends AzureDeployImpl {
|
|
8
|
+
pattern: RegExp;
|
|
9
|
+
private readonly serviceName;
|
|
10
|
+
protected helpLink: string;
|
|
11
|
+
protected summaries: string[];
|
|
12
|
+
protected summaryPrepare: string[];
|
|
13
|
+
protected zipBuffer: Buffer | undefined;
|
|
14
|
+
protected progressHandler?: AsyncIterableIterator<void>;
|
|
15
|
+
protected progressNames: (() => string)[];
|
|
16
|
+
constructor(args: unknown, context: DriverContext, serviceName: string, helpLink: string, summaries: string[], summaryPrepare: string[]);
|
|
17
|
+
azureDeploy(args: DeployStepArgs, azureResource: AzureResourceInfo, azureCredential: TokenCredential): Promise<void>;
|
|
18
|
+
protected prepare: (args: DeployStepArgs) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* deploy to azure app service or azure function use zip deploy method
|
|
21
|
+
* @param args local file needed to be deployed
|
|
22
|
+
* @param azureResource azure resource info
|
|
23
|
+
* @param azureCredential azure user login credential
|
|
24
|
+
* @return the zip deploy time cost
|
|
25
|
+
* @protected
|
|
26
|
+
*/
|
|
27
|
+
zipDeploy(args: DeployStepArgs, azureResource: AzureResourceInfo, azureCredential: TokenCredential): Promise<number>;
|
|
28
|
+
/**
|
|
29
|
+
* call azure app service or azure function zip deploy method
|
|
30
|
+
* @param zipDeployEndpoint azure zip deploy endpoint
|
|
31
|
+
* @param zipBuffer zip file buffer
|
|
32
|
+
* @param config azure upload config, including azure account credential
|
|
33
|
+
* @param logger log provider
|
|
34
|
+
* @protected
|
|
35
|
+
*/
|
|
36
|
+
protected zipDeployPackage(zipDeployEndpoint: string, zipBuffer: Buffer, config: AzureUploadConfig, logger?: LogProvider): Promise<string>;
|
|
37
|
+
/**
|
|
38
|
+
* create azure zip deploy endpoint
|
|
39
|
+
* @param siteName azure app service or azure function name
|
|
40
|
+
* @protected
|
|
41
|
+
*/
|
|
42
|
+
protected getZipDeployEndpoint(siteName: string): string;
|
|
43
|
+
createProgressBar(ui?: UserInteraction): IProgressHandler | undefined;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=AzureZipDeployImpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AzureZipDeployImpl.d.ts","sourceRoot":"","sources":["../../../../../../src/component/driver/deploy/azure/impl/AzureZipDeployImpl.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAEL,iBAAiB,EACjB,cAAc,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAQxF,qBAAa,kBAAmB,SAAQ,eAAe;IACrD,OAAO,SAC6F;IACpG,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,SAAS,CAAC,QAAQ,SAAC;IACnB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAC9B,SAAS,CAAC,cAAc,EAAE,MAAM,EAAE,CAAC;IACnC,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,SAAS,CAAC,eAAe,CAAC,EAAE,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACxD,SAAS,CAAC,aAAa,EAAE,CAAC,MAAM,MAAM,CAAC,EAAE,CAAC;gBAGxC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,aAAa,EACtB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EAAE,EACnB,cAAc,EAAE,MAAM,EAAE;IAWpB,WAAW,CACf,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,iBAAiB,EAChC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,IAAI,CAAC;IAchB,SAAS,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAGxD;IAEF;;;;;;;OAOG;IACU,SAAS,CACpB,IAAI,EAAE,cAAc,EACpB,aAAa,EAAE,iBAAiB,EAChC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAAC,MAAM,CAAC;IA0ClB;;;;;;;OAOG;cACa,gBAAgB,CAC9B,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,iBAAiB,EACzB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,MAAM,CAAC;IA8DlB;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIxD,iBAAiB,CAAC,EAAE,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,SAAS;CAMtE"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
|
3
|
+
// Licensed under the MIT license.
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.AzureZipDeployImpl = void 0;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
7
|
+
const azureDeployImpl_1 = require("./azureDeployImpl");
|
|
8
|
+
const messages_1 = require("../../../../messages");
|
|
9
|
+
const deployConstant_1 = require("../../../../constant/deployConstant");
|
|
10
|
+
const crypto_1 = require("crypto");
|
|
11
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
12
|
+
const deployError_1 = require("../../../../error/deployError");
|
|
13
|
+
const commonConstant_1 = require("../../../../constant/commonConstant");
|
|
14
|
+
class AzureZipDeployImpl extends azureDeployImpl_1.AzureDeployImpl {
|
|
15
|
+
constructor(args, context, serviceName, helpLink, summaries, summaryPrepare) {
|
|
16
|
+
super(args, context);
|
|
17
|
+
this.pattern = /\/subscriptions\/([^\/]*)\/resourceGroups\/([^\/]*)\/providers\/Microsoft.Web\/sites\/([^\/]*)/i;
|
|
18
|
+
this.prepare = async (args) => {
|
|
19
|
+
var _a;
|
|
20
|
+
await ((_a = this.progressHandler) === null || _a === void 0 ? void 0 : _a.next());
|
|
21
|
+
await this.packageToZip(args, this.context);
|
|
22
|
+
};
|
|
23
|
+
this.helpLink = helpLink;
|
|
24
|
+
this.serviceName = serviceName;
|
|
25
|
+
this.summaries = summaries;
|
|
26
|
+
this.summaryPrepare = summaryPrepare;
|
|
27
|
+
this.progressNames = deployConstant_1.ProgressBarConstant.ZIP_DEPLOY_IN_AZURE_PROGRESS;
|
|
28
|
+
this.progressPrepare = deployConstant_1.ProgressBarConstant.DRY_RUN_ZIP_DEPLOY_IN_AZURE_PROGRESS;
|
|
29
|
+
}
|
|
30
|
+
async azureDeploy(args, azureResource, azureCredential) {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
const cost = await this.zipDeploy(args, azureResource, azureCredential);
|
|
33
|
+
await ((_a = this.progressHandler) === null || _a === void 0 ? void 0 : _a.next());
|
|
34
|
+
await this.restartFunctionApp(azureResource);
|
|
35
|
+
if (cost > deployConstant_1.DeployConstant.DEPLOY_OVER_TIME) {
|
|
36
|
+
await ((_b = this.context.logProvider) === null || _b === void 0 ? void 0 : _b.info(messages_1.getLocalizedMessage("driver.deploy.notice.deployAcceleration", "https://aka.ms/teamsfx-config-run-from-package").localized));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* deploy to azure app service or azure function use zip deploy method
|
|
41
|
+
* @param args local file needed to be deployed
|
|
42
|
+
* @param azureResource azure resource info
|
|
43
|
+
* @param azureCredential azure user login credential
|
|
44
|
+
* @return the zip deploy time cost
|
|
45
|
+
* @protected
|
|
46
|
+
*/
|
|
47
|
+
async zipDeploy(args, azureResource, azureCredential) {
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
49
|
+
await ((_a = this.progressHandler) === null || _a === void 0 ? void 0 : _a.next());
|
|
50
|
+
const zipBuffer = await this.packageToZip(args, this.context);
|
|
51
|
+
await ((_b = this.progressHandler) === null || _b === void 0 ? void 0 : _b.next());
|
|
52
|
+
await this.context.logProvider.debug("Start to get Azure account info for deploy");
|
|
53
|
+
const config = await this.createAzureDeployConfig(azureResource, azureCredential);
|
|
54
|
+
await this.context.logProvider.debug("Get Azure account info for deploy complete");
|
|
55
|
+
await ((_c = this.progressHandler) === null || _c === void 0 ? void 0 : _c.next());
|
|
56
|
+
const endpoint = this.getZipDeployEndpoint(azureResource.instanceId);
|
|
57
|
+
await this.context.logProvider.debug(`Start to upload code to ${endpoint}`);
|
|
58
|
+
await ((_d = this.progressHandler) === null || _d === void 0 ? void 0 : _d.next());
|
|
59
|
+
const startTime = Date.now();
|
|
60
|
+
const location = await this.zipDeployPackage(endpoint, zipBuffer, config, this.context.logProvider);
|
|
61
|
+
await this.context.logProvider.debug("Upload code to Azure complete");
|
|
62
|
+
await ((_e = this.progressHandler) === null || _e === void 0 ? void 0 : _e.next());
|
|
63
|
+
await this.context.logProvider.debug("Start to check Azure deploy status");
|
|
64
|
+
const deployRes = await this.checkDeployStatus(location, config, this.context.logProvider);
|
|
65
|
+
await this.context.logProvider.debug("Check Azure deploy status complete");
|
|
66
|
+
const cost = Date.now() - startTime;
|
|
67
|
+
(_f = this.context.telemetryReporter) === null || _f === void 0 ? void 0 : _f.sendTelemetryEvent("deployResponse", {
|
|
68
|
+
time_cost: cost.toString(),
|
|
69
|
+
status: (_g = deployRes === null || deployRes === void 0 ? void 0 : deployRes.status.toString()) !== null && _g !== void 0 ? _g : "",
|
|
70
|
+
message: (_h = deployRes === null || deployRes === void 0 ? void 0 : deployRes.message) !== null && _h !== void 0 ? _h : "",
|
|
71
|
+
received_time: (_j = deployRes === null || deployRes === void 0 ? void 0 : deployRes.received_time) !== null && _j !== void 0 ? _j : "",
|
|
72
|
+
started_time: (_k = deployRes === null || deployRes === void 0 ? void 0 : deployRes.start_time.toString()) !== null && _k !== void 0 ? _k : "",
|
|
73
|
+
end_time: (_l = deployRes === null || deployRes === void 0 ? void 0 : deployRes.end_time.toString()) !== null && _l !== void 0 ? _l : "",
|
|
74
|
+
last_success_end_time: (_m = deployRes === null || deployRes === void 0 ? void 0 : deployRes.last_success_end_time.toString()) !== null && _m !== void 0 ? _m : "",
|
|
75
|
+
complete: (_o = deployRes === null || deployRes === void 0 ? void 0 : deployRes.complete.toString()) !== null && _o !== void 0 ? _o : "",
|
|
76
|
+
active: (_p = deployRes === null || deployRes === void 0 ? void 0 : deployRes.active.toString()) !== null && _p !== void 0 ? _p : "",
|
|
77
|
+
is_readonly: (_q = deployRes === null || deployRes === void 0 ? void 0 : deployRes.is_readonly.toString()) !== null && _q !== void 0 ? _q : "",
|
|
78
|
+
site_name_hash: (deployRes === null || deployRes === void 0 ? void 0 : deployRes.site_name)
|
|
79
|
+
? crypto_1.createHash("sha256").update(deployRes.site_name).digest("hex")
|
|
80
|
+
: "",
|
|
81
|
+
});
|
|
82
|
+
return cost;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* call azure app service or azure function zip deploy method
|
|
86
|
+
* @param zipDeployEndpoint azure zip deploy endpoint
|
|
87
|
+
* @param zipBuffer zip file buffer
|
|
88
|
+
* @param config azure upload config, including azure account credential
|
|
89
|
+
* @param logger log provider
|
|
90
|
+
* @protected
|
|
91
|
+
*/
|
|
92
|
+
async zipDeployPackage(zipDeployEndpoint, zipBuffer, config, logger) {
|
|
93
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
94
|
+
let res;
|
|
95
|
+
let retryCount = 0;
|
|
96
|
+
while (true) {
|
|
97
|
+
try {
|
|
98
|
+
res = await azureDeployImpl_1.AzureDeployImpl.AXIOS_INSTANCE.post(zipDeployEndpoint, zipBuffer, config);
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
if (axios_1.default.isAxiosError(e)) {
|
|
103
|
+
// if the error is remote server error, retry
|
|
104
|
+
if (((_b = (_a = e.response) === null || _a === void 0 ? void 0 : _a.status) !== null && _b !== void 0 ? _b : commonConstant_1.HttpStatusCode.OK) >= commonConstant_1.HttpStatusCode.INTERNAL_SERVER_ERROR) {
|
|
105
|
+
retryCount += 1;
|
|
106
|
+
if (retryCount < deployConstant_1.DeployConstant.DEPLOY_UPLOAD_RETRY_TIMES) {
|
|
107
|
+
await (logger === null || logger === void 0 ? void 0 : logger.warning(`Upload zip file failed with response status code: ${(_d = (_c = e.response) === null || _c === void 0 ? void 0 : _c.status) !== null && _d !== void 0 ? _d : "NA"}. Retrying...`));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
// if retry times exceed, throw error
|
|
111
|
+
await (logger === null || logger === void 0 ? void 0 : logger.warning(`Retry times exceeded. Upload zip file failed with remote server error. Message: ${JSON.stringify((_e = e.response) === null || _e === void 0 ? void 0 : _e.data)}`));
|
|
112
|
+
throw deployError_1.DeployExternalApiCallError.zipDeployWithRemoteError(e, undefined, this.helpLink);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
// None server error, throw
|
|
117
|
+
await (logger === null || logger === void 0 ? void 0 : logger.error(`Upload zip file failed with response status code: ${(_g = (_f = e.response) === null || _f === void 0 ? void 0 : _f.status) !== null && _g !== void 0 ? _g : "NA"}, message: ${JSON.stringify((_h = e.response) === null || _h === void 0 ? void 0 : _h.data)}`));
|
|
118
|
+
throw deployError_1.DeployExternalApiCallError.zipDeployError(e, (_k = (_j = e.response) === null || _j === void 0 ? void 0 : _j.status) !== null && _k !== void 0 ? _k : -1, this.helpLink);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
// if the error is not axios error, throw
|
|
123
|
+
await (logger === null || logger === void 0 ? void 0 : logger.error(`Upload zip file failed with error: ${JSON.stringify(e)}`));
|
|
124
|
+
throw deployError_1.DeployExternalApiCallError.zipDeployError(e, -1, this.helpLink);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
if ((res === null || res === void 0 ? void 0 : res.status) !== commonConstant_1.HttpStatusCode.OK && (res === null || res === void 0 ? void 0 : res.status) !== commonConstant_1.HttpStatusCode.ACCEPTED) {
|
|
129
|
+
if (res === null || res === void 0 ? void 0 : res.status) {
|
|
130
|
+
await (logger === null || logger === void 0 ? void 0 : logger.error(`Deployment is failed with error code: ${res.status}.`));
|
|
131
|
+
}
|
|
132
|
+
throw deployError_1.DeployExternalApiCallError.zipDeployError(res, res.status, this.helpLink);
|
|
133
|
+
}
|
|
134
|
+
return res.headers.location;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* create azure zip deploy endpoint
|
|
138
|
+
* @param siteName azure app service or azure function name
|
|
139
|
+
* @protected
|
|
140
|
+
*/
|
|
141
|
+
getZipDeployEndpoint(siteName) {
|
|
142
|
+
return `https://${siteName}.scm.azurewebsites.net/api/zipdeploy?isAsync=true`;
|
|
143
|
+
}
|
|
144
|
+
createProgressBar(ui) {
|
|
145
|
+
var _a;
|
|
146
|
+
return ui === null || ui === void 0 ? void 0 : ui.createProgressBar(`Deploying ${(_a = this.workingDirectory) !== null && _a !== void 0 ? _a : ""} to ${this.serviceName}`, this.progressNames.length);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.AzureZipDeployImpl = AzureZipDeployImpl;
|
|
150
|
+
//# sourceMappingURL=AzureZipDeployImpl.js.map
|