@microsoft/teamsfx-core 2.0.10-rc.0 → 2.0.10
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/constants.d.ts +19 -11
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +22 -44
- package/build/common/constants.js.map +1 -1
- package/build/common/correlator.d.ts +0 -1
- package/build/common/correlator.d.ts.map +1 -1
- package/build/common/correlator.js +1 -6
- package/build/common/correlator.js.map +1 -1
- package/build/common/deps-checker/checkerFactory.d.ts.map +1 -0
- package/build/common/deps-checker/checkerFactory.js.map +1 -0
- package/build/{component → common}/deps-checker/constant/helpLink.d.ts +3 -0
- package/build/common/deps-checker/constant/helpLink.d.ts.map +1 -0
- package/build/{component → common}/deps-checker/constant/helpLink.js +6 -1
- package/build/common/deps-checker/constant/helpLink.js.map +1 -0
- package/build/common/deps-checker/constant/index.d.ts.map +1 -0
- package/build/common/deps-checker/constant/index.js.map +1 -0
- package/build/common/deps-checker/constant/message.d.ts.map +1 -0
- package/build/common/deps-checker/constant/message.js +45 -0
- package/build/common/deps-checker/constant/message.js.map +1 -0
- package/build/common/deps-checker/constant/telemetry.d.ts.map +1 -0
- package/build/common/deps-checker/constant/telemetry.js.map +1 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.d.ts.map +1 -0
- package/build/common/deps-checker/coreDepsLoggerAdapter.js.map +1 -0
- package/build/common/deps-checker/coreDepsTelemetryAdapter.d.ts.map +1 -0
- package/build/{component → common}/deps-checker/coreDepsTelemetryAdapter.js +4 -4
- package/build/common/deps-checker/coreDepsTelemetryAdapter.js.map +1 -0
- package/build/common/deps-checker/depsChecker.d.ts.map +1 -0
- package/build/common/deps-checker/depsChecker.js.map +1 -0
- package/build/common/deps-checker/depsError.d.ts.map +1 -0
- package/build/common/deps-checker/depsError.js.map +1 -0
- package/build/common/deps-checker/depsLogger.d.ts.map +1 -0
- package/build/common/deps-checker/depsLogger.js.map +1 -0
- package/build/common/deps-checker/depsManager.d.ts.map +1 -0
- package/build/common/deps-checker/depsManager.js.map +1 -0
- package/build/common/deps-checker/depsTelemetry.d.ts.map +1 -0
- package/build/common/deps-checker/depsTelemetry.js.map +1 -0
- package/build/common/deps-checker/index.d.ts.map +1 -0
- package/build/common/deps-checker/index.js.map +1 -0
- package/build/common/deps-checker/internal/dotnetChecker.d.ts.map +1 -0
- package/build/{component → common}/deps-checker/internal/dotnetChecker.js +14 -14
- package/build/common/deps-checker/internal/dotnetChecker.js.map +1 -0
- package/build/common/deps-checker/internal/funcToolChecker.d.ts.map +1 -0
- package/build/{component → common}/deps-checker/internal/funcToolChecker.js +16 -16
- package/build/common/deps-checker/internal/funcToolChecker.js.map +1 -0
- package/build/common/deps-checker/internal/nodeChecker.d.ts.map +1 -0
- package/build/common/deps-checker/internal/nodeChecker.js.map +1 -0
- package/build/common/deps-checker/internal/testToolChecker.d.ts.map +1 -0
- package/build/{component → common}/deps-checker/internal/testToolChecker.js +22 -22
- package/build/common/deps-checker/internal/testToolChecker.js.map +1 -0
- package/build/common/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -0
- package/build/{component → common}/deps-checker/internal/vxTestAppChecker.js +8 -14
- package/build/common/deps-checker/internal/vxTestAppChecker.js.map +1 -0
- package/build/common/deps-checker/util/cpUtils.d.ts.map +1 -0
- package/build/common/deps-checker/util/cpUtils.js.map +1 -0
- package/build/common/deps-checker/util/downloadHelper.d.ts.map +1 -0
- package/build/common/deps-checker/util/downloadHelper.js.map +1 -0
- package/build/common/deps-checker/util/fileHelper.d.ts.map +1 -0
- package/build/common/deps-checker/util/fileHelper.js.map +1 -0
- package/build/common/deps-checker/util/index.d.ts.map +1 -0
- package/build/common/deps-checker/util/index.js.map +1 -0
- package/build/common/deps-checker/util/progressIndicator.d.ts.map +1 -0
- package/build/common/deps-checker/util/progressIndicator.js.map +1 -0
- package/build/common/deps-checker/util/system.d.ts.map +1 -0
- package/build/common/deps-checker/util/system.js.map +1 -0
- package/build/common/featureFlags.d.ts +22 -61
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +70 -91
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/globalState.js +4 -4
- package/build/common/globalState.js.map +1 -1
- package/build/common/jsonUtils.js +10 -10
- package/build/common/jsonUtils.js.map +1 -1
- package/build/common/local/constants.d.ts +185 -0
- package/build/common/local/constants.d.ts.map +1 -0
- package/build/{component → common}/local/constants.js +0 -1
- package/build/common/local/constants.js.map +1 -0
- package/build/common/local/index.d.ts.map +1 -0
- package/build/common/local/index.js.map +1 -0
- package/build/common/local/localCertificateManager.d.ts.map +1 -0
- package/build/{component → common}/local/localCertificateManager.js +11 -13
- package/build/common/local/localCertificateManager.js.map +1 -0
- package/build/common/local/localEnvManager.d.ts.map +1 -0
- package/build/{component → common}/local/localEnvManager.js +2 -2
- package/build/common/local/localEnvManager.js.map +1 -0
- package/build/common/local/localTelemetryReporter.d.ts.map +1 -0
- package/build/{component → common}/local/localTelemetryReporter.js +4 -4
- package/build/common/local/localTelemetryReporter.js.map +1 -0
- package/build/common/local/npmLogHelper.d.ts.map +1 -0
- package/build/common/local/npmLogHelper.js.map +1 -0
- package/build/common/local/packageJsonHelper.d.ts.map +1 -0
- package/build/common/local/packageJsonHelper.js.map +1 -0
- package/build/common/local/portChecker.d.ts.map +1 -0
- package/build/{component → common}/local/portChecker.js +6 -6
- package/build/common/local/portChecker.js.map +1 -0
- package/build/common/local/process.d.ts.map +1 -0
- package/build/common/local/process.js.map +1 -0
- package/build/common/local/taskDefinition.d.ts.map +1 -0
- package/build/{component → common}/local/taskDefinition.js +6 -6
- package/build/common/local/taskDefinition.js.map +1 -0
- package/build/common/localizeUtils.js +3 -3
- package/build/common/localizeUtils.js.map +1 -1
- package/build/common/m365/constants.d.ts +6 -0
- package/build/common/m365/constants.d.ts.map +1 -0
- package/build/{component → common}/m365/constants.js +1 -4
- package/build/common/m365/constants.js.map +1 -0
- package/build/common/m365/errors.d.ts.map +1 -0
- package/build/{component → common}/m365/errors.js +3 -3
- package/build/common/m365/errors.js.map +1 -0
- package/build/common/m365/launchHelper.d.ts +12 -0
- package/build/common/m365/launchHelper.d.ts.map +1 -0
- package/build/{component → common}/m365/launchHelper.js +30 -38
- package/build/common/m365/launchHelper.js.map +1 -0
- package/build/common/m365/packageService.d.ts.map +1 -0
- package/build/{component → common}/m365/packageService.js +28 -28
- package/build/common/m365/packageService.js.map +1 -0
- package/build/common/m365/serviceConstant.d.ts +3 -0
- package/build/common/m365/serviceConstant.d.ts.map +1 -0
- package/build/common/m365/serviceConstant.js +8 -0
- package/build/common/m365/serviceConstant.js.map +1 -0
- package/build/common/projectSettingsHelper.d.ts +0 -5
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -31
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/projectSettingsHelperV3.d.ts +2 -0
- package/build/common/projectSettingsHelperV3.d.ts.map +1 -0
- package/build/common/projectSettingsHelperV3.js +15 -0
- package/build/common/projectSettingsHelperV3.js.map +1 -0
- package/build/common/projectTypeChecker.js +3 -3
- package/build/common/projectTypeChecker.js.map +1 -1
- package/build/common/samples.d.ts +1 -6
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +7 -7
- package/build/common/samples.js.map +1 -1
- package/build/common/stringUtils.d.ts +5 -11
- package/build/common/stringUtils.d.ts.map +1 -1
- package/build/common/stringUtils.js +101 -71
- package/build/common/stringUtils.js.map +1 -1
- package/build/common/telemetry.d.ts +13 -43
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +74 -97
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/tools.d.ts +32 -2
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +250 -17
- package/build/common/tools.js.map +1 -1
- package/build/common/utils.d.ts +3 -5
- package/build/common/utils.d.ts.map +1 -1
- package/build/common/utils.js +12 -40
- package/build/common/utils.js.map +1 -1
- package/build/common/wrappedAxiosClient.d.ts +0 -1
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +34 -64
- package/build/common/wrappedAxiosClient.js.map +1 -1
- package/build/component/configManager/actionInjector.js +2 -2
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/configManager/lifecycle.js +10 -10
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.js +21 -21
- package/build/component/configManager/parser.js.map +1 -1
- package/build/component/configManager/validator.js +2 -2
- package/build/component/configManager/validator.js.map +1 -1
- package/build/component/constant/commonConstant.d.ts +0 -1
- package/build/component/constant/commonConstant.d.ts.map +1 -1
- package/build/component/constant/commonConstant.js +0 -1
- package/build/component/constant/commonConstant.js.map +1 -1
- package/build/component/constants.d.ts +223 -7
- package/build/component/constants.d.ts.map +1 -1
- package/build/component/constants.js +251 -12
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +234 -125
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/coordinator/summary.js +10 -10
- package/build/component/coordinator/summary.js.map +1 -1
- package/build/component/deployUtils.js +4 -4
- package/build/component/deployUtils.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts +5 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +94 -78
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/create.d.ts.map +1 -1
- package/build/component/driver/aad/create.js +29 -43
- package/build/component/driver/aad/create.js.map +1 -1
- package/build/component/driver/aad/error/aadAppNameTooLongError.js +2 -2
- package/build/component/driver/aad/error/aadAppNameTooLongError.js.map +1 -1
- package/build/component/driver/aad/error/aadManifestError.js +27 -27
- package/build/component/driver/aad/error/aadManifestError.js.map +1 -1
- package/build/component/driver/aad/error/clientSecretNotAllowedError.js +2 -2
- package/build/component/driver/aad/error/clientSecretNotAllowedError.js.map +1 -1
- package/build/component/driver/aad/error/credentialInvalidLifetimeError.js +2 -2
- package/build/component/driver/aad/error/credentialInvalidLifetimeError.js.map +1 -1
- package/build/component/driver/aad/error/invalidFieldInManifestError.js +2 -2
- package/build/component/driver/aad/error/invalidFieldInManifestError.js.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/update.js +16 -16
- package/build/component/driver/aad/update.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +19 -19
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +3 -3
- package/build/component/driver/aad/utility/aadManifestHelper.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 +13 -13
- package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
- package/build/component/driver/aad/utility/constants.d.ts +0 -2
- package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
- package/build/component/driver/aad/utility/constants.js +0 -2
- package/build/component/driver/aad/utility/constants.js.map +1 -1
- package/build/component/driver/add/addWebPart.d.ts +2 -2
- package/build/component/driver/add/addWebPart.d.ts.map +1 -1
- package/build/component/driver/add/addWebPart.js +31 -31
- package/build/component/driver/add/addWebPart.js.map +1 -1
- package/build/component/driver/add/error/noConfigurationError.js +2 -2
- package/build/component/driver/add/error/noConfigurationError.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +27 -30
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js +2 -2
- package/build/component/driver/apiKey/error/apiKeyClientSecretInvalid.js.map +1 -1
- package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js +2 -2
- package/build/component/driver/apiKey/error/apiKeyDomainInvalid.js.map +1 -1
- package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js +2 -2
- package/build/component/driver/apiKey/error/apiKeyFailedToGetDomain.js.map +1 -1
- package/build/component/driver/apiKey/error/apiKeyNameTooLong.js +2 -2
- package/build/component/driver/apiKey/error/apiKeyNameTooLong.js.map +1 -1
- package/build/component/driver/apiKey/update.d.ts +1 -1
- package/build/component/driver/apiKey/update.d.ts.map +1 -1
- package/build/component/driver/apiKey/update.js +27 -27
- package/build/component/driver/apiKey/update.js.map +1 -1
- package/build/component/driver/apiKey/utility/constants.d.ts +1 -1
- package/build/component/driver/apiKey/utility/constants.js +1 -1
- package/build/component/driver/apiKey/utility/utility.js +2 -2
- package/build/component/driver/apiKey/utility/utility.js.map +1 -1
- package/build/component/driver/arm/deploy.js +4 -4
- package/build/component/driver/arm/deploy.js.map +1 -1
- package/build/component/driver/arm/deployImpl.d.ts.map +1 -1
- package/build/component/driver/arm/deployImpl.js +18 -20
- package/build/component/driver/arm/deployImpl.js.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.d.ts.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.js +9 -29
- package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js +10 -10
- package/build/component/driver/arm/util/handleError.js.map +1 -1
- package/build/component/driver/arm/validator.js +3 -3
- package/build/component/driver/arm/validator.js.map +1 -1
- package/build/component/driver/botAadApp/create.d.ts.map +1 -1
- package/build/component/driver/botAadApp/create.js +22 -38
- package/build/component/driver/botAadApp/create.js.map +1 -1
- package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js +2 -2
- package/build/component/driver/botAadApp/error/unexpectedEmptyBotPasswordError.js.map +1 -1
- package/build/component/driver/botAadApp/utility/constants.d.ts +0 -1
- package/build/component/driver/botAadApp/utility/constants.d.ts.map +1 -1
- package/build/component/driver/botAadApp/utility/constants.js +0 -1
- package/build/component/driver/botAadApp/utility/constants.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +14 -14
- package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
- package/build/component/driver/botFramework/error/invalidBotIdError.js +2 -2
- package/build/component/driver/botFramework/error/invalidBotIdError.js.map +1 -1
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js +3 -3
- package/build/component/driver/deploy/azure/azureAppServiceDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js +3 -3
- package/build/component/driver/deploy/azure/azureFunctionDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js +10 -16
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +9 -9
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +15 -15
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +7 -7
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts +4 -4
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +20 -20
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js +11 -11
- package/build/component/driver/deploy/azure/impl/baseDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.d.ts +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.d.ts.map +1 -1
- package/build/component/driver/deploy/spfx/deployDriver.js +28 -29
- package/build/component/driver/deploy/spfx/deployDriver.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js +2 -2
- package/build/component/driver/deploy/spfx/error/createAppCatalogFailedError.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js +2 -2
- package/build/component/driver/deploy/spfx/error/getGraphTokenFailedError.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js +2 -2
- package/build/component/driver/deploy/spfx/error/getSPOTokenFailedError.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/getTenantFailedError.js +2 -2
- package/build/component/driver/deploy/spfx/error/getTenantFailedError.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js +2 -2
- package/build/component/driver/deploy/spfx/error/insufficientPermissionError.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/noSPPackageError.js +2 -2
- package/build/component/driver/deploy/spfx/error/noSPPackageError.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js +2 -2
- package/build/component/driver/deploy/spfx/error/noValidAppCatelogError.js.map +1 -1
- package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js +2 -2
- package/build/component/driver/deploy/spfx/error/uploadAppPackageFailedError.js.map +1 -1
- package/build/component/driver/deploy/spfx/utility/constants.js +5 -5
- package/build/component/driver/deploy/spfx/utility/constants.js.map +1 -1
- package/build/component/driver/devTool/constant.d.ts +8 -8
- package/build/component/driver/devTool/constant.d.ts.map +1 -1
- package/build/component/driver/devTool/constant.js +10 -10
- package/build/component/driver/devTool/constant.js.map +1 -1
- package/build/component/driver/devTool/error/dotnetInstallationUserError.js +4 -4
- package/build/component/driver/devTool/error/dotnetInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/error/funcInstallationUserError.js +4 -4
- package/build/component/driver/devTool/error/funcInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/error/testToolInstallationUserError.js +4 -4
- package/build/component/driver/devTool/error/testToolInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/installDriver.d.ts +1 -1
- package/build/component/driver/devTool/installDriver.d.ts.map +1 -1
- package/build/component/driver/devTool/installDriver.js +12 -12
- package/build/component/driver/devTool/installDriver.js.map +1 -1
- package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js +2 -2
- package/build/component/driver/error/outputEnvironmentVariableUndefinedError.js.map +1 -1
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js +11 -11
- package/build/component/driver/file/createOrUpdateEnvironmentFile.js.map +1 -1
- package/build/component/driver/file/createOrUpdateJsonFile.js +12 -12
- package/build/component/driver/file/createOrUpdateJsonFile.js.map +1 -1
- package/build/component/driver/index.d.ts +0 -1
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +0 -1
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/m365/acquire.js +16 -16
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/middleware/addSWADeployTelemetry.js +7 -7
- package/build/component/driver/middleware/addSWADeployTelemetry.js.map +1 -1
- package/build/component/driver/middleware/addStartAndEndTelemetry.d.ts.map +1 -1
- package/build/component/driver/middleware/addStartAndEndTelemetry.js +3 -3
- package/build/component/driver/middleware/addStartAndEndTelemetry.js.map +1 -1
- package/build/component/driver/oauth/create.d.ts +1 -1
- package/build/component/driver/oauth/create.d.ts.map +1 -1
- package/build/component/driver/oauth/create.js +36 -65
- package/build/component/driver/oauth/create.js.map +1 -1
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js +2 -2
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js.map +1 -1
- package/build/component/driver/oauth/error/oauthDomainInvalid.js +2 -2
- package/build/component/driver/oauth/error/oauthDomainInvalid.js.map +1 -1
- package/build/component/driver/oauth/error/oauthFailedToGetDomain.js +2 -2
- package/build/component/driver/oauth/error/oauthFailedToGetDomain.js.map +1 -1
- package/build/component/driver/oauth/error/oauthNameTooLong.js +2 -2
- package/build/component/driver/oauth/error/oauthNameTooLong.js.map +1 -1
- package/build/component/driver/oauth/interface/createOauthArgs.d.ts +0 -2
- package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -1
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +0 -1
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -1
- package/build/component/driver/oauth/update.d.ts +1 -1
- package/build/component/driver/oauth/update.d.ts.map +1 -1
- package/build/component/driver/oauth/update.js +26 -37
- package/build/component/driver/oauth/update.js.map +1 -1
- package/build/component/driver/oauth/utility/constants.d.ts +1 -1
- package/build/component/driver/oauth/utility/constants.js +1 -1
- package/build/component/driver/oauth/utility/utility.js +6 -5
- package/build/component/driver/oauth/utility/utility.js.map +1 -1
- package/build/component/driver/script/baseBuildDriver.js +8 -8
- package/build/component/driver/script/baseBuildDriver.js.map +1 -1
- package/build/component/driver/script/dotnetBuildDriver.js +3 -3
- package/build/component/driver/script/dotnetBuildDriver.js.map +1 -1
- package/build/component/driver/script/npmBuildDriver.js +3 -3
- package/build/component/driver/script/npmBuildDriver.js.map +1 -1
- package/build/component/driver/script/npxBuildDriver.js +5 -5
- package/build/component/driver/script/npxBuildDriver.js.map +1 -1
- package/build/component/driver/script/scriptDriver.d.ts +0 -2
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +29 -28
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +74 -63
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +4 -7
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +77 -78
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +32 -32
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +3 -15
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +16 -136
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js +8 -8
- package/build/component/driver/teamsApp/copyAppPackageToSPFx.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts +2 -2
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +37 -37
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +1 -3
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +68 -84
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/errors.d.ts +2 -6
- package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
- package/build/component/driver/teamsApp/errors.js +42 -49
- package/build/component/driver/teamsApp/errors.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts +2 -6
- package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +0 -2
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +0 -1
- package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +42 -42
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +49 -48
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +3 -5
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +41 -72
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +2 -3
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +61 -85
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +3 -4
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +18 -36
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +9 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +9 -0
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.d.ts +4 -4
- package/build/component/driver/teamsApp/utils/utils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/utils.js +15 -45
- package/build/component/driver/teamsApp/utils/utils.js.map +1 -1
- package/build/component/driver/teamsApp/validate.js +27 -27
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts +5 -3
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +54 -68
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts +3 -3
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.js +49 -50
- package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
- package/build/component/driver/util/utils.d.ts +0 -3
- package/build/component/driver/util/utils.d.ts.map +1 -1
- package/build/component/driver/util/utils.js +1 -16
- package/build/component/driver/util/utils.js.map +1 -1
- package/build/component/driver/util/wrapUtil.d.ts.map +1 -1
- package/build/component/driver/util/wrapUtil.js +9 -12
- package/build/component/driver/util/wrapUtil.js.map +1 -1
- package/build/component/error/componentError.js +8 -8
- package/build/component/error/componentError.js.map +1 -1
- package/build/component/feature/collaboration.d.ts.map +1 -1
- package/build/component/feature/collaboration.js +59 -60
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/feature/createAuthFiles.js +8 -8
- package/build/component/feature/createAuthFiles.js.map +1 -1
- package/build/component/feature/sso.js +6 -7
- package/build/component/feature/sso.js.map +1 -1
- package/build/component/generator/constant.d.ts +0 -1
- package/build/component/generator/constant.d.ts.map +1 -1
- package/build/component/generator/constant.js +1 -2
- package/build/component/generator/constant.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +13 -0
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -0
- package/build/component/generator/copilotPlugin/generator.js +275 -0
- package/build/component/generator/copilotPlugin/generator.js.map +1 -0
- package/build/component/generator/copilotPlugin/helper.d.ts +45 -0
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -0
- package/build/component/generator/copilotPlugin/helper.js +710 -0
- package/build/component/generator/copilotPlugin/helper.js.map +1 -0
- package/build/component/generator/error.d.ts +1 -1
- package/build/component/generator/error.d.ts.map +1 -1
- package/build/component/generator/error.js +5 -5
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +21 -27
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +1 -1
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +22 -14
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/generatorProvider.d.ts.map +1 -1
- package/build/component/generator/generatorProvider.js +2 -6
- package/build/component/generator/generatorProvider.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts +1 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +73 -72
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +0 -5
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +0 -37
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/officeXMLAddin/generator.d.ts +13 -0
- package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -0
- package/build/component/generator/officeXMLAddin/generator.js +110 -0
- package/build/component/generator/officeXMLAddin/generator.js.map +1 -0
- package/build/component/generator/officeXMLAddin/projectConfig.d.ts +4 -2
- package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -1
- package/build/component/generator/officeXMLAddin/projectConfig.js +86 -1
- package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.js +10 -11
- package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.js +6 -7
- package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/component/generator/spfx/error.d.ts +1 -0
- package/build/component/generator/spfx/error.d.ts.map +1 -1
- package/build/component/generator/spfx/error.js +24 -20
- package/build/component/generator/spfx/error.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts +2 -2
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +105 -102
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.d.ts +13 -0
- package/build/component/generator/spfx/utils/constants.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +24 -9
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/spfx/utils/telemetry-helper.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/telemetry-helper.js +9 -11
- package/build/component/generator/spfx/utils/telemetry-helper.js.map +1 -1
- package/build/component/generator/spfx/utils/utils.d.ts +1 -1
- package/build/component/generator/spfx/utils/utils.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/utils.js +3 -3
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/templates/ssrTabGenerator.d.ts.map +1 -1
- package/build/component/generator/templates/ssrTabGenerator.js +6 -6
- package/build/component/generator/templates/ssrTabGenerator.js.map +1 -1
- package/build/component/generator/templates/templateGenerator.d.ts +3 -3
- package/build/component/generator/templates/templateGenerator.d.ts.map +1 -1
- package/build/component/generator/templates/templateGenerator.js +18 -16
- package/build/component/generator/templates/templateGenerator.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +0 -3
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +112 -109
- package/build/component/generator/templates/templateNames.js.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -1
- package/build/component/generator/templates/templateReplaceMap.js +15 -48
- package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
- package/build/component/generator/utils.d.ts +12 -4
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +80 -49
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/messages.js +7 -7
- package/build/component/messages.js.map +1 -1
- package/build/component/middleware/actionExecutionMW.d.ts +1 -1
- package/build/component/middleware/actionExecutionMW.d.ts.map +1 -1
- package/build/component/middleware/actionExecutionMW.js +13 -13
- package/build/component/middleware/actionExecutionMW.js.map +1 -1
- package/build/component/middleware/envMW.js +9 -9
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/middleware/questionMW.js +4 -4
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/migrate.d.ts +0 -32
- package/build/component/migrate.d.ts.map +1 -1
- package/build/component/migrate.js +35 -112
- package/build/component/migrate.js.map +1 -1
- package/build/component/provisionUtils.d.ts.map +1 -1
- package/build/component/provisionUtils.js +29 -28
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +22 -23
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +8 -11
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js.map +1 -1
- package/build/component/resource/botService/constants.d.ts +13 -0
- package/build/component/resource/botService/constants.d.ts.map +1 -1
- package/build/component/resource/botService/constants.js +15 -1
- package/build/component/resource/botService/constants.js.map +1 -1
- package/build/component/resource/botService/errors.js +2 -2
- package/build/component/resource/botService/errors.js.map +1 -1
- package/build/component/resource/botService/messages.js +6 -6
- package/build/component/resource/botService/messages.js.map +1 -1
- package/build/component/resource/botService/strings.js +1 -1
- package/build/component/resource/botService/strings.js.map +1 -1
- package/build/component/telemetry.d.ts.map +1 -1
- package/build/component/telemetry.js +7 -6
- package/build/component/telemetry.js.map +1 -1
- package/build/component/utils/ResourceGroupHelper.d.ts +2 -10
- package/build/component/utils/ResourceGroupHelper.d.ts.map +1 -1
- package/build/component/utils/ResourceGroupHelper.js +62 -155
- package/build/component/utils/ResourceGroupHelper.js.map +1 -1
- package/build/component/utils/azureResourceOperation.js +2 -2
- package/build/component/utils/azureResourceOperation.js.map +1 -1
- package/build/component/utils/charsetUtils.d.ts +1 -1
- package/build/component/utils/charsetUtils.d.ts.map +1 -1
- package/build/component/utils/charsetUtils.js +1 -3
- package/build/component/utils/charsetUtils.js.map +1 -1
- package/build/component/utils/common.d.ts +3 -4
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +6 -17
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/depsChecker/common.d.ts +3 -1
- package/build/component/utils/depsChecker/common.d.ts.map +1 -1
- package/build/component/utils/depsChecker/common.js +4 -2
- package/build/component/utils/depsChecker/common.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +0 -1
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +20 -20
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/fileOperation.js +4 -3
- package/build/component/utils/fileOperation.js.map +1 -1
- package/build/component/utils/metadataGraphPermssion.js +3 -3
- package/build/component/utils/metadataGraphPermssion.js.map +1 -1
- package/build/component/utils/metadataUtil.js +3 -3
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +16 -14
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/component/utils/settingsUtil.js +8 -8
- package/build/component/utils/settingsUtil.js.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.d.ts.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.js +10 -7
- package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
- package/build/component/utils.d.ts +12 -0
- package/build/component/utils.d.ts.map +1 -0
- package/build/component/utils.js +136 -0
- package/build/component/utils.js.map +1 -0
- package/build/component/workflow.d.ts +4 -0
- package/build/component/workflow.d.ts.map +1 -0
- package/build/component/workflow.js +18 -0
- package/build/component/workflow.js.map +1 -0
- package/build/core/FxCore.d.ts +4 -37
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +477 -750
- package/build/core/FxCore.js.map +1 -1
- package/build/core/callback.d.ts +2 -2
- package/build/core/callback.d.ts.map +1 -1
- package/build/core/callback.js.map +1 -1
- package/build/core/collaborator.d.ts.map +1 -1
- package/build/core/collaborator.js +72 -70
- package/build/core/collaborator.js.map +1 -1
- package/build/core/crypto.d.ts.map +1 -1
- package/build/core/crypto.js +5 -4
- package/build/core/crypto.js.map +1 -1
- package/build/core/environment.js +7 -7
- package/build/core/environment.js.map +1 -1
- package/build/core/environmentName.d.ts +1 -0
- package/build/core/environmentName.d.ts.map +1 -1
- package/build/core/environmentName.js +2 -0
- package/build/core/environmentName.js.map +1 -1
- package/build/core/error.d.ts +32 -0
- package/build/core/error.d.ts.map +1 -0
- package/build/core/error.js +122 -0
- package/build/core/error.js.map +1 -0
- package/build/{common → core}/globalVars.d.ts +1 -3
- package/build/core/globalVars.d.ts.map +1 -0
- package/build/{common → core}/globalVars.js +1 -12
- package/build/core/globalVars.js.map +1 -0
- package/build/core/middleware/concurrentLocker.d.ts.map +1 -1
- package/build/core/middleware/concurrentLocker.js +20 -19
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/errorHandler.js +5 -5
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts +1 -5
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +100 -104
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +4 -4
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +14 -14
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.js +5 -5
- package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts +0 -1
- package/build/core/middleware/utils/appYmlGenerator.d.ts.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.js +9 -15
- package/build/core/middleware/utils/appYmlGenerator.js.map +1 -1
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js +10 -10
- package/build/core/middleware/utils/debug/debugV3MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/debug/taskMigrator.js +74 -74
- package/build/core/middleware/utils/debug/taskMigrator.js.map +1 -1
- package/build/core/middleware/utils/migrationContext.js +1 -1
- package/build/core/middleware/utils/migrationContext.js.map +1 -1
- package/build/core/middleware/utils/v3MigrationUtils.js +13 -13
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/middleware/videoFilterAppBlocker.d.ts +0 -2
- package/build/core/middleware/videoFilterAppBlocker.d.ts.map +1 -1
- package/build/core/middleware/videoFilterAppBlocker.js +5 -21
- package/build/core/middleware/videoFilterAppBlocker.js.map +1 -1
- package/build/core/telemetry.d.ts +5 -0
- package/build/core/telemetry.d.ts.map +1 -1
- package/build/core/telemetry.js +17 -9
- package/build/core/telemetry.js.map +1 -1
- package/build/error/arm.js +10 -10
- package/build/error/arm.js.map +1 -1
- package/build/error/azure.js +20 -20
- package/build/error/azure.js.map +1 -1
- package/build/error/common.d.ts +1 -36
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +64 -175
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.js +24 -24
- package/build/error/deploy.js.map +1 -1
- package/build/error/m365.js +6 -6
- package/build/error/m365.js.map +1 -1
- package/build/error/script.d.ts +2 -2
- package/build/error/script.d.ts.map +1 -1
- package/build/error/script.js +8 -14
- package/build/error/script.js.map +1 -1
- package/build/error/teamsApp.d.ts +0 -3
- package/build/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +7 -20
- package/build/error/teamsApp.js.map +1 -1
- package/build/error/upgrade.js +2 -2
- package/build/error/upgrade.js.map +1 -1
- package/build/error/yml.js +13 -13
- package/build/error/yml.js.map +1 -1
- package/build/failpoint/index.d.ts +3 -0
- package/build/failpoint/index.d.ts.map +1 -0
- package/build/failpoint/index.js +11 -0
- package/build/failpoint/index.js.map +1 -0
- package/build/failpoint/marker.d.ts +13 -0
- package/build/failpoint/marker.d.ts.map +1 -0
- package/build/{question/inputs/SyncManifestInputs.js → failpoint/marker.js} +4 -1
- package/build/failpoint/marker.js.map +1 -0
- package/build/failpoint/runtime.d.ts +12 -0
- package/build/failpoint/runtime.d.ts.map +1 -0
- package/build/failpoint/runtime.js +67 -0
- package/build/failpoint/runtime.js.map +1 -0
- package/build/index.d.ts +36 -61
- package/build/index.d.ts.map +1 -1
- package/build/index.js +53 -132
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +5 -269
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +13 -1107
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +151 -13
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +1386 -542
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +2 -6
- package/build/question/generator.js.map +1 -1
- package/build/question/index.d.ts +3 -3
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +21 -23
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +4 -8
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +8 -14
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/inputs/index.d.ts +0 -2
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +0 -2
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts.map +1 -1
- package/build/question/options/AddPluginOptions.js +10 -19
- package/build/question/options/AddPluginOptions.js.map +1 -1
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +33 -36
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/index.d.ts +0 -2
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +0 -2
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +29 -4
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +343 -284
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +78 -0
- package/build/question/questionNames.d.ts.map +1 -0
- package/build/question/questionNames.js +85 -0
- package/build/question/questionNames.js.map +1 -0
- package/build/question/util.d.ts +2 -0
- package/build/question/util.d.ts.map +1 -0
- package/build/question/util.js +18 -0
- package/build/question/util.js.map +1 -0
- package/build/ui/visitor.d.ts +1 -0
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +38 -57
- package/build/ui/visitor.js.map +1 -1
- package/package.json +14 -21
- package/resource/deps-checker/dotnet-install.ps1 +423 -912
- package/resource/deps-checker/dotnet-install.sh +238 -876
- package/resource/package.nls.json +156 -189
- package/resource/yaml-schema/yaml.schema.json +1 -59
- package/templates/core/v3Migration/js.ts.app.local.yml +3 -3
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/templates/plugins/resource/aad/auth/V3/aad.manifest.template.json +0 -6
- package/templates/plugins/resource/aad/manifest/aad.template.json +0 -6
- package/templates/plugins/resource/aad/manifest/bot/aad.manifest.template.json +0 -6
- package/templates/plugins/resource/aad/manifest/tab/aad.manifest.template.json +0 -6
- package/build/client/teamsDevPortalClient.d.ts +0 -128
- package/build/client/teamsDevPortalClient.d.ts.map +0 -1
- package/build/client/teamsDevPortalClient.js +0 -949
- package/build/client/teamsDevPortalClient.js.map +0 -1
- package/build/common/azureUtils.d.ts +0 -3
- package/build/common/azureUtils.d.ts.map +0 -1
- package/build/common/azureUtils.js +0 -50
- package/build/common/azureUtils.js.map +0 -1
- package/build/common/globalVars.d.ts.map +0 -1
- package/build/common/globalVars.js.map +0 -1
- package/build/common/requestUtils.d.ts +0 -4
- package/build/common/requestUtils.d.ts.map +0 -1
- package/build/common/requestUtils.js +0 -52
- package/build/common/requestUtils.js.map +0 -1
- package/build/common/secretmasker/dict.d.ts +0 -22
- package/build/common/secretmasker/dict.d.ts.map +0 -1
- package/build/common/secretmasker/dict.js +0 -83
- package/build/common/secretmasker/dict.js.map +0 -1
- package/build/common/secretmasker/feature.d.ts +0 -19
- package/build/common/secretmasker/feature.d.ts.map +0 -1
- package/build/common/secretmasker/feature.js +0 -389
- package/build/common/secretmasker/feature.js.map +0 -1
- package/build/common/secretmasker/masker.d.ts +0 -12
- package/build/common/secretmasker/masker.d.ts.map +0 -1
- package/build/common/secretmasker/masker.js +0 -54
- package/build/common/secretmasker/masker.js.map +0 -1
- package/build/component/deps-checker/checkerFactory.d.ts.map +0 -1
- package/build/component/deps-checker/checkerFactory.js.map +0 -1
- package/build/component/deps-checker/constant/helpLink.d.ts.map +0 -1
- package/build/component/deps-checker/constant/helpLink.js.map +0 -1
- package/build/component/deps-checker/constant/index.d.ts.map +0 -1
- package/build/component/deps-checker/constant/index.js.map +0 -1
- package/build/component/deps-checker/constant/message.d.ts.map +0 -1
- package/build/component/deps-checker/constant/message.js +0 -45
- package/build/component/deps-checker/constant/message.js.map +0 -1
- package/build/component/deps-checker/constant/telemetry.d.ts.map +0 -1
- package/build/component/deps-checker/constant/telemetry.js.map +0 -1
- package/build/component/deps-checker/coreDepsLoggerAdapter.d.ts.map +0 -1
- package/build/component/deps-checker/coreDepsLoggerAdapter.js.map +0 -1
- package/build/component/deps-checker/coreDepsTelemetryAdapter.d.ts.map +0 -1
- package/build/component/deps-checker/coreDepsTelemetryAdapter.js.map +0 -1
- package/build/component/deps-checker/depsChecker.d.ts.map +0 -1
- package/build/component/deps-checker/depsChecker.js.map +0 -1
- package/build/component/deps-checker/depsError.d.ts.map +0 -1
- package/build/component/deps-checker/depsError.js.map +0 -1
- package/build/component/deps-checker/depsLogger.d.ts.map +0 -1
- package/build/component/deps-checker/depsLogger.js.map +0 -1
- package/build/component/deps-checker/depsManager.d.ts.map +0 -1
- package/build/component/deps-checker/depsManager.js.map +0 -1
- package/build/component/deps-checker/depsTelemetry.d.ts.map +0 -1
- package/build/component/deps-checker/depsTelemetry.js.map +0 -1
- package/build/component/deps-checker/index.d.ts.map +0 -1
- package/build/component/deps-checker/index.js.map +0 -1
- package/build/component/deps-checker/internal/dotnetChecker.d.ts.map +0 -1
- package/build/component/deps-checker/internal/dotnetChecker.js.map +0 -1
- package/build/component/deps-checker/internal/funcToolChecker.d.ts.map +0 -1
- package/build/component/deps-checker/internal/funcToolChecker.js.map +0 -1
- package/build/component/deps-checker/internal/nodeChecker.d.ts.map +0 -1
- package/build/component/deps-checker/internal/nodeChecker.js.map +0 -1
- package/build/component/deps-checker/internal/testToolChecker.d.ts.map +0 -1
- package/build/component/deps-checker/internal/testToolChecker.js.map +0 -1
- package/build/component/deps-checker/internal/vxTestAppChecker.d.ts.map +0 -1
- package/build/component/deps-checker/internal/vxTestAppChecker.js.map +0 -1
- package/build/component/deps-checker/util/cpUtils.d.ts.map +0 -1
- package/build/component/deps-checker/util/cpUtils.js.map +0 -1
- package/build/component/deps-checker/util/downloadHelper.d.ts.map +0 -1
- package/build/component/deps-checker/util/downloadHelper.js.map +0 -1
- package/build/component/deps-checker/util/fileHelper.d.ts.map +0 -1
- package/build/component/deps-checker/util/fileHelper.js.map +0 -1
- package/build/component/deps-checker/util/index.d.ts.map +0 -1
- package/build/component/deps-checker/util/index.js.map +0 -1
- package/build/component/deps-checker/util/progressIndicator.d.ts.map +0 -1
- package/build/component/deps-checker/util/progressIndicator.js.map +0 -1
- package/build/component/deps-checker/util/system.d.ts.map +0 -1
- package/build/component/deps-checker/util/system.js.map +0 -1
- package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts +0 -5
- package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts.map +0 -1
- package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js +0 -23
- package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js.map +0 -1
- package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts +0 -5
- package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts.map +0 -1
- package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js +0 -21
- package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js.map +0 -1
- package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts +0 -5
- package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts.map +0 -1
- package/build/component/driver/oauth/error/oauthDisablePKCEError.js +0 -21
- package/build/component/driver/oauth/error/oauthDisablePKCEError.js.map +0 -1
- package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts +0 -5
- package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts.map +0 -1
- package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js +0 -21
- package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js.map +0 -1
- package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts +0 -20
- package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts.map +0 -1
- package/build/component/driver/teamsApp/interfaces/SyncManifest.js +0 -5
- package/build/component/driver/teamsApp/interfaces/SyncManifest.js.map +0 -1
- package/build/component/driver/teamsApp/syncManifest.d.ts +0 -14
- package/build/component/driver/teamsApp/syncManifest.d.ts.map +0 -1
- package/build/component/driver/teamsApp/syncManifest.js +0 -226
- package/build/component/driver/teamsApp/syncManifest.js.map +0 -1
- package/build/component/generator/apiSpec/generator.d.ts +0 -15
- package/build/component/generator/apiSpec/generator.d.ts.map +0 -1
- package/build/component/generator/apiSpec/generator.js +0 -274
- package/build/component/generator/apiSpec/generator.js.map +0 -1
- package/build/component/generator/apiSpec/helper.d.ts +0 -50
- package/build/component/generator/apiSpec/helper.d.ts.map +0 -1
- package/build/component/generator/apiSpec/helper.js +0 -834
- package/build/component/generator/apiSpec/helper.js.map +0 -1
- package/build/component/generator/copilotExtension/generator.d.ts +0 -19
- package/build/component/generator/copilotExtension/generator.d.ts.map +0 -1
- package/build/component/generator/copilotExtension/generator.js +0 -116
- package/build/component/generator/copilotExtension/generator.js.map +0 -1
- package/build/component/generator/copilotExtension/helper.d.ts +0 -8
- package/build/component/generator/copilotExtension/helper.d.ts.map +0 -1
- package/build/component/generator/copilotExtension/helper.js +0 -114
- package/build/component/generator/copilotExtension/helper.js.map +0 -1
- package/build/component/local/constants.d.ts +0 -186
- package/build/component/local/constants.d.ts.map +0 -1
- package/build/component/local/constants.js.map +0 -1
- package/build/component/local/index.d.ts.map +0 -1
- package/build/component/local/index.js.map +0 -1
- package/build/component/local/localCertificateManager.d.ts.map +0 -1
- package/build/component/local/localCertificateManager.js.map +0 -1
- package/build/component/local/localEnvManager.d.ts.map +0 -1
- package/build/component/local/localEnvManager.js.map +0 -1
- package/build/component/local/localTelemetryReporter.d.ts.map +0 -1
- package/build/component/local/localTelemetryReporter.js.map +0 -1
- package/build/component/local/npmLogHelper.d.ts.map +0 -1
- package/build/component/local/npmLogHelper.js.map +0 -1
- package/build/component/local/packageJsonHelper.d.ts.map +0 -1
- package/build/component/local/packageJsonHelper.js.map +0 -1
- package/build/component/local/portChecker.d.ts.map +0 -1
- package/build/component/local/portChecker.js.map +0 -1
- package/build/component/local/process.d.ts.map +0 -1
- package/build/component/local/process.js.map +0 -1
- package/build/component/local/taskDefinition.d.ts.map +0 -1
- package/build/component/local/taskDefinition.js.map +0 -1
- package/build/component/m365/constants.d.ts +0 -9
- package/build/component/m365/constants.d.ts.map +0 -1
- package/build/component/m365/constants.js.map +0 -1
- package/build/component/m365/errors.d.ts.map +0 -1
- package/build/component/m365/errors.js.map +0 -1
- package/build/component/m365/launchHelper.d.ts +0 -12
- package/build/component/m365/launchHelper.d.ts.map +0 -1
- package/build/component/m365/launchHelper.js.map +0 -1
- package/build/component/m365/packageService.d.ts.map +0 -1
- package/build/component/m365/packageService.js.map +0 -1
- package/build/component/m365/serviceConstant.d.ts +0 -3
- package/build/component/m365/serviceConstant.d.ts.map +0 -1
- package/build/component/m365/serviceConstant.js +0 -8
- package/build/component/m365/serviceConstant.js.map +0 -1
- package/build/component/utils/envFunctionUtils.d.ts +0 -12
- package/build/component/utils/envFunctionUtils.d.ts.map +0 -1
- package/build/component/utils/envFunctionUtils.js +0 -185
- package/build/component/utils/envFunctionUtils.js.map +0 -1
- package/build/question/inputs/SyncManifestInputs.d.ts +0 -16
- package/build/question/inputs/SyncManifestInputs.d.ts.map +0 -1
- package/build/question/inputs/SyncManifestInputs.js.map +0 -1
- package/build/question/inputs/UninstallInputs.d.ts +0 -22
- package/build/question/inputs/UninstallInputs.d.ts.map +0 -1
- package/build/question/inputs/UninstallInputs.js +0 -5
- package/build/question/inputs/UninstallInputs.js.map +0 -1
- package/build/question/options/SyncManifestOptions.d.ts +0 -10
- package/build/question/options/SyncManifestOptions.d.ts.map +0 -1
- package/build/question/options/SyncManifestOptions.js +0 -28
- package/build/question/options/SyncManifestOptions.js.map +0 -1
- package/build/question/options/UninstallOptions.d.ts +0 -10
- package/build/question/options/UninstallOptions.d.ts.map +0 -1
- package/build/question/options/UninstallOptions.js +0 -44
- package/build/question/options/UninstallOptions.js.map +0 -1
- package/build/tsconfig.tsbuildinfo +0 -1
- package/resource/dict.zip +0 -0
- package/resource/yaml-schema/v1.6/yaml.schema.json +0 -1842
- package/resource/yaml-schema/v1.7/yaml.schema.json +0 -1842
- /package/build/{component → common}/deps-checker/checkerFactory.d.ts +0 -0
- /package/build/{component → common}/deps-checker/checkerFactory.js +0 -0
- /package/build/{component → common}/deps-checker/constant/index.d.ts +0 -0
- /package/build/{component → common}/deps-checker/constant/index.js +0 -0
- /package/build/{component → common}/deps-checker/constant/message.d.ts +0 -0
- /package/build/{component → common}/deps-checker/constant/telemetry.d.ts +0 -0
- /package/build/{component → common}/deps-checker/constant/telemetry.js +0 -0
- /package/build/{component → common}/deps-checker/coreDepsLoggerAdapter.d.ts +0 -0
- /package/build/{component → common}/deps-checker/coreDepsLoggerAdapter.js +0 -0
- /package/build/{component → common}/deps-checker/coreDepsTelemetryAdapter.d.ts +0 -0
- /package/build/{component → common}/deps-checker/depsChecker.d.ts +0 -0
- /package/build/{component → common}/deps-checker/depsChecker.js +0 -0
- /package/build/{component → common}/deps-checker/depsError.d.ts +0 -0
- /package/build/{component → common}/deps-checker/depsError.js +0 -0
- /package/build/{component → common}/deps-checker/depsLogger.d.ts +0 -0
- /package/build/{component → common}/deps-checker/depsLogger.js +0 -0
- /package/build/{component → common}/deps-checker/depsManager.d.ts +0 -0
- /package/build/{component → common}/deps-checker/depsManager.js +0 -0
- /package/build/{component → common}/deps-checker/depsTelemetry.d.ts +0 -0
- /package/build/{component → common}/deps-checker/depsTelemetry.js +0 -0
- /package/build/{component → common}/deps-checker/index.d.ts +0 -0
- /package/build/{component → common}/deps-checker/index.js +0 -0
- /package/build/{component → common}/deps-checker/internal/dotnetChecker.d.ts +0 -0
- /package/build/{component → common}/deps-checker/internal/funcToolChecker.d.ts +0 -0
- /package/build/{component → common}/deps-checker/internal/nodeChecker.d.ts +0 -0
- /package/build/{component → common}/deps-checker/internal/nodeChecker.js +0 -0
- /package/build/{component → common}/deps-checker/internal/testToolChecker.d.ts +0 -0
- /package/build/{component → common}/deps-checker/internal/vxTestAppChecker.d.ts +0 -0
- /package/build/{component → common}/deps-checker/util/cpUtils.d.ts +0 -0
- /package/build/{component → common}/deps-checker/util/cpUtils.js +0 -0
- /package/build/{component → common}/deps-checker/util/downloadHelper.d.ts +0 -0
- /package/build/{component → common}/deps-checker/util/downloadHelper.js +0 -0
- /package/build/{component → common}/deps-checker/util/fileHelper.d.ts +0 -0
- /package/build/{component → common}/deps-checker/util/fileHelper.js +0 -0
- /package/build/{component → common}/deps-checker/util/index.d.ts +0 -0
- /package/build/{component → common}/deps-checker/util/index.js +0 -0
- /package/build/{component → common}/deps-checker/util/progressIndicator.d.ts +0 -0
- /package/build/{component → common}/deps-checker/util/progressIndicator.js +0 -0
- /package/build/{component → common}/deps-checker/util/system.d.ts +0 -0
- /package/build/{component → common}/deps-checker/util/system.js +0 -0
- /package/build/{component → common}/local/index.d.ts +0 -0
- /package/build/{component → common}/local/index.js +0 -0
- /package/build/{component → common}/local/localCertificateManager.d.ts +0 -0
- /package/build/{component → common}/local/localEnvManager.d.ts +0 -0
- /package/build/{component → common}/local/localTelemetryReporter.d.ts +0 -0
- /package/build/{component → common}/local/npmLogHelper.d.ts +0 -0
- /package/build/{component → common}/local/npmLogHelper.js +0 -0
- /package/build/{component → common}/local/packageJsonHelper.d.ts +0 -0
- /package/build/{component → common}/local/packageJsonHelper.js +0 -0
- /package/build/{component → common}/local/portChecker.d.ts +0 -0
- /package/build/{component → common}/local/process.d.ts +0 -0
- /package/build/{component → common}/local/process.js +0 -0
- /package/build/{component → common}/local/taskDefinition.d.ts +0 -0
- /package/build/{component → common}/m365/errors.d.ts +0 -0
- /package/build/{component → common}/m365/packageService.d.ts +0 -0
package/build/core/FxCore.js
CHANGED
|
@@ -14,14 +14,14 @@ const path = tslib_1.__importStar(require("path"));
|
|
|
14
14
|
require("reflect-metadata");
|
|
15
15
|
const typedi_1 = require("typedi");
|
|
16
16
|
const url_1 = require("url");
|
|
17
|
+
const yaml_1 = require("yaml");
|
|
17
18
|
const constants_1 = require("../common/constants");
|
|
18
|
-
const globalVars_1 = require("../common/globalVars");
|
|
19
19
|
const localizeUtils_1 = require("../common/localizeUtils");
|
|
20
|
+
const launchHelper_1 = require("../common/m365/launchHelper");
|
|
20
21
|
const projectSettingsHelper_1 = require("../common/projectSettingsHelper");
|
|
21
22
|
const projectTypeChecker_1 = require("../common/projectTypeChecker");
|
|
22
23
|
const telemetry_1 = require("../common/telemetry");
|
|
23
24
|
const versionMetadata_1 = require("../common/versionMetadata");
|
|
24
|
-
const actionInjector_1 = require("../component/configManager/actionInjector");
|
|
25
25
|
const parser_1 = require("../component/configManager/parser");
|
|
26
26
|
const constants_2 = require("../component/constants");
|
|
27
27
|
const coordinator_1 = require("../component/coordinator");
|
|
@@ -29,19 +29,15 @@ const buildAadManifest_1 = require("../component/driver/aad/utility/buildAadMani
|
|
|
29
29
|
require("../component/driver/index");
|
|
30
30
|
require("../component/driver/script/scriptDriver");
|
|
31
31
|
const appStudio_1 = require("../component/driver/teamsApp/appStudio");
|
|
32
|
-
const errors_1 = require("../component/driver/teamsApp/errors");
|
|
33
|
-
const results_1 = require("../component/driver/teamsApp/results");
|
|
34
32
|
const teamsappMgr_1 = require("../component/driver/teamsApp/teamsappMgr");
|
|
35
|
-
const CopilotGptManifestUtils_1 = require("../component/driver/teamsApp/utils/CopilotGptManifestUtils");
|
|
36
33
|
const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
|
|
37
34
|
const PluginManifestUtils_1 = require("../component/driver/teamsApp/utils/PluginManifestUtils");
|
|
38
35
|
const utils_1 = require("../component/driver/teamsApp/utils/utils");
|
|
39
|
-
const utils_2 = require("../component/driver/util/utils");
|
|
40
36
|
require("../component/feature/sso");
|
|
41
|
-
const helper_1 = require("../component/generator/
|
|
42
|
-
const launchHelper_1 = require("../component/m365/launchHelper");
|
|
37
|
+
const helper_1 = require("../component/generator/copilotPlugin/helper");
|
|
43
38
|
const envMW_1 = require("../component/middleware/envMW");
|
|
44
39
|
const questionMW_1 = require("../component/middleware/questionMW");
|
|
40
|
+
const utils_2 = require("../component/utils");
|
|
45
41
|
const common_1 = require("../component/utils/common");
|
|
46
42
|
const envUtil_1 = require("../component/utils/envUtil");
|
|
47
43
|
const metadataUtil_1 = require("../component/utils/metadataUtil");
|
|
@@ -50,27 +46,30 @@ const settingsUtil_1 = require("../component/utils/settingsUtil");
|
|
|
50
46
|
const common_2 = require("../error/common");
|
|
51
47
|
const upgrade_1 = require("../error/upgrade");
|
|
52
48
|
const yml_1 = require("../error/yml");
|
|
49
|
+
const question_1 = require("../question");
|
|
53
50
|
const constants_3 = require("../question/constants");
|
|
54
51
|
const create_1 = require("../question/create");
|
|
55
52
|
const other_1 = require("../question/other");
|
|
53
|
+
const questionNames_1 = require("../question/questionNames");
|
|
56
54
|
const callback_1 = require("./callback");
|
|
57
55
|
const collaborator_1 = require("./collaborator");
|
|
58
56
|
const crypto_1 = require("./crypto");
|
|
59
57
|
const environmentName_1 = require("./environmentName");
|
|
58
|
+
const error_1 = require("./error");
|
|
59
|
+
const globalVars_1 = require("./globalVars");
|
|
60
60
|
const concurrentLocker_1 = require("./middleware/concurrentLocker");
|
|
61
61
|
const contextInjector_1 = require("./middleware/contextInjector");
|
|
62
62
|
const errorHandler_1 = require("./middleware/errorHandler");
|
|
63
63
|
const projectMigratorV3_1 = require("./middleware/projectMigratorV3");
|
|
64
64
|
const v3MigrationUtils_1 = require("./middleware/utils/v3MigrationUtils");
|
|
65
65
|
const telemetry_2 = require("./telemetry");
|
|
66
|
-
const
|
|
67
|
-
const
|
|
68
|
-
const
|
|
69
|
-
const
|
|
70
|
-
const helper_2 = require("../component/generator/copilotExtension/helper");
|
|
66
|
+
const results_1 = require("../component/driver/teamsApp/results");
|
|
67
|
+
const errors_1 = require("../component/driver/teamsApp/errors");
|
|
68
|
+
const CopilotGptManifestUtils_1 = require("../component/driver/teamsApp/utils/CopilotGptManifestUtils");
|
|
69
|
+
const actionInjector_1 = require("../component/configManager/actionInjector");
|
|
71
70
|
class FxCore {
|
|
72
71
|
constructor(tools) {
|
|
73
|
-
|
|
72
|
+
globalVars_1.setTools(tools);
|
|
74
73
|
}
|
|
75
74
|
/**
|
|
76
75
|
* @todo this's a really primitive implement. Maybe could use Subscription Model to
|
|
@@ -80,19 +79,19 @@ class FxCore {
|
|
|
80
79
|
return callback_1.CallbackRegistry.set(event, callback);
|
|
81
80
|
}
|
|
82
81
|
async createProject(inputs) {
|
|
83
|
-
const context =
|
|
84
|
-
if (inputs[
|
|
85
|
-
return
|
|
82
|
+
const context = utils_2.createContextV3();
|
|
83
|
+
if (inputs[questionNames_1.QuestionNames.ProjectType] === question_1.ProjectTypeOptions.startWithGithubCopilot().id) {
|
|
84
|
+
return teamsfx_api_1.ok({ projectPath: "", shouldInvokeTeamsAgent: true });
|
|
86
85
|
}
|
|
87
|
-
inputs[
|
|
86
|
+
inputs[questionNames_1.QuestionNames.Scratch] = create_1.ScratchOptions.yes().id;
|
|
88
87
|
if (inputs.teamsAppFromTdp) {
|
|
89
88
|
// should never happen as we do same check on Developer Portal.
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
89
|
+
if (utils_1.containsUnsupportedFeature(inputs.teamsAppFromTdp)) {
|
|
90
|
+
return teamsfx_api_1.err(error_1.InvalidInputError("Teams app contains unsupported features"));
|
|
92
91
|
}
|
|
93
92
|
else {
|
|
94
93
|
context.telemetryReporter.sendTelemetryEvent(telemetry_2.CoreTelemetryEvent.CreateFromTdpStart, {
|
|
95
|
-
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppFeatures]:
|
|
94
|
+
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppFeatures]: utils_1.getFeaturesFromAppDefinition(inputs.teamsAppFromTdp).join(","),
|
|
96
95
|
[telemetry_2.CoreTelemetryProperty.TdpTeamsAppId]: inputs.teamsAppFromTdp.teamsAppId,
|
|
97
96
|
});
|
|
98
97
|
}
|
|
@@ -105,41 +104,41 @@ class FxCore {
|
|
|
105
104
|
//1. input validation
|
|
106
105
|
let folder = inputs["folder"];
|
|
107
106
|
if (!folder) {
|
|
108
|
-
return
|
|
107
|
+
return teamsfx_api_1.err(new common_2.MissingRequiredInputError("folder"));
|
|
109
108
|
}
|
|
110
109
|
folder = path.resolve(folder);
|
|
111
110
|
const appName = inputs["app-name"];
|
|
112
111
|
if (undefined === appName)
|
|
113
|
-
return
|
|
112
|
+
return teamsfx_api_1.err(new common_2.MissingRequiredInputError(questionNames_1.QuestionNames.AppName));
|
|
114
113
|
const validateResult = jsonschema.validate(appName, {
|
|
115
|
-
pattern:
|
|
114
|
+
pattern: question_1.AppNamePattern,
|
|
116
115
|
});
|
|
117
116
|
if (validateResult.errors && validateResult.errors.length > 0) {
|
|
118
|
-
return
|
|
117
|
+
return teamsfx_api_1.err(new common_2.InputValidationError(questionNames_1.QuestionNames.AppName, validateResult.errors[0].message));
|
|
119
118
|
}
|
|
120
119
|
const projectPath = path.join(folder, appName);
|
|
121
120
|
//2. run generator
|
|
122
|
-
const context =
|
|
121
|
+
const context = utils_2.createContextV3();
|
|
123
122
|
const genRes = await generator.run(context, inputs, projectPath);
|
|
124
123
|
if (genRes.isErr())
|
|
125
|
-
return
|
|
124
|
+
return teamsfx_api_1.err(genRes.error);
|
|
126
125
|
//3. ensure unique projectId in teamsapp.yaml (optional)
|
|
127
126
|
const ymlPath = path.join(projectPath, versionMetadata_1.MetadataV3.configFile);
|
|
128
127
|
const result = { projectPath: projectPath };
|
|
129
128
|
if (await fs_extra_1.default.pathExists(ymlPath)) {
|
|
130
129
|
const ensureRes = await coordinator_1.coordinator.ensureTrackingId(projectPath, inputs.projectId);
|
|
131
130
|
if (ensureRes.isErr())
|
|
132
|
-
return
|
|
131
|
+
return teamsfx_api_1.err(ensureRes.error);
|
|
133
132
|
result.projectId = ensureRes.value;
|
|
134
133
|
}
|
|
135
|
-
return
|
|
134
|
+
return teamsfx_api_1.ok(result);
|
|
136
135
|
}
|
|
137
136
|
/**
|
|
138
137
|
* lifecycle command: create new sample project
|
|
139
138
|
*/
|
|
140
139
|
async createSampleProject(inputs) {
|
|
141
|
-
const context =
|
|
142
|
-
inputs[
|
|
140
|
+
const context = utils_2.createContextV3();
|
|
141
|
+
inputs[questionNames_1.QuestionNames.Scratch] = create_1.ScratchOptions.no().id;
|
|
143
142
|
const res = await coordinator_1.coordinator.create(context, inputs);
|
|
144
143
|
inputs.projectPath = context.projectPath;
|
|
145
144
|
return res;
|
|
@@ -149,17 +148,17 @@ class FxCore {
|
|
|
149
148
|
*/
|
|
150
149
|
async provisionResources(inputs, ctx) {
|
|
151
150
|
inputs.stage = teamsfx_api_1.Stage.provision;
|
|
152
|
-
const context =
|
|
151
|
+
const context = utils_2.createDriverContext(inputs);
|
|
153
152
|
try {
|
|
154
153
|
const res = await coordinator_1.coordinator.provision(context, inputs);
|
|
155
154
|
if (res.isOk()) {
|
|
156
155
|
ctx.envVars = res.value;
|
|
157
|
-
return
|
|
156
|
+
return teamsfx_api_1.ok(undefined);
|
|
158
157
|
}
|
|
159
158
|
else {
|
|
160
159
|
// for partial success scenario, output is set in inputs object
|
|
161
160
|
ctx.envVars = inputs.envVars;
|
|
162
|
-
return
|
|
161
|
+
return teamsfx_api_1.err(res.error);
|
|
163
162
|
}
|
|
164
163
|
}
|
|
165
164
|
finally {
|
|
@@ -170,266 +169,21 @@ class FxCore {
|
|
|
170
169
|
catch (e) { }
|
|
171
170
|
}
|
|
172
171
|
}
|
|
173
|
-
/**
|
|
174
|
-
* none lifecycle command, uninstall provisioned resources
|
|
175
|
-
*/
|
|
176
|
-
async uninstall(inputs) {
|
|
177
|
-
switch (inputs[constants_3.QuestionNames.UninstallMode]) {
|
|
178
|
-
case constants_3.QuestionNames.UninstallModeManifestId:
|
|
179
|
-
return await this.uninstallByManifestId(inputs);
|
|
180
|
-
case constants_3.QuestionNames.UninstallModeEnv:
|
|
181
|
-
return await this.uninstallByEnv(inputs);
|
|
182
|
-
case constants_3.QuestionNames.UninstallModeTitleId:
|
|
183
|
-
return await this.uninstallByTitleId(inputs);
|
|
184
|
-
default:
|
|
185
|
-
return (0, teamsfx_api_1.err)(new common_2.UnhandledError(new Error("Uninstall mode not supported"), "FxCore"));
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* uninstall provisioned resources by manifest ID
|
|
190
|
-
*/
|
|
191
|
-
async uninstallByManifestId(inputs) {
|
|
192
|
-
const manifestId = inputs[constants_3.QuestionNames.ManifestId];
|
|
193
|
-
if (!manifestId) {
|
|
194
|
-
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("manifest-id", "FxCore"));
|
|
195
|
-
}
|
|
196
|
-
const uninstallOptions = inputs[constants_3.QuestionNames.UninstallOptions];
|
|
197
|
-
const m356AppOption = uninstallOptions === null || uninstallOptions === void 0 ? void 0 : uninstallOptions.includes(constants_3.QuestionNames.UninstallOptionM365);
|
|
198
|
-
const tdpOption = uninstallOptions === null || uninstallOptions === void 0 ? void 0 : uninstallOptions.includes(constants_3.QuestionNames.UninstallOptionTDP);
|
|
199
|
-
const botOption = uninstallOptions === null || uninstallOptions === void 0 ? void 0 : uninstallOptions.includes(constants_3.QuestionNames.UninstallOptionBot);
|
|
200
|
-
if (m356AppOption) {
|
|
201
|
-
const res = await this.uninstallM365App(undefined, manifestId);
|
|
202
|
-
if (res.isErr()) {
|
|
203
|
-
return (0, teamsfx_api_1.err)(res.error);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
if (botOption) {
|
|
207
|
-
const res = await this.uninstallBotFrameworRegistration(undefined, manifestId);
|
|
208
|
-
if (res.isErr()) {
|
|
209
|
-
return (0, teamsfx_api_1.err)(res.error);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// App registraion should be the last to remove, because we might need to query some metadata from TDP.
|
|
213
|
-
if (tdpOption) {
|
|
214
|
-
const res = await this.uninstallAppRegistration(manifestId);
|
|
215
|
-
if (res.isErr()) {
|
|
216
|
-
return (0, teamsfx_api_1.err)(res.error);
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
220
|
-
}
|
|
221
|
-
/**
|
|
222
|
-
* uninstall provisioned resources by a given environment
|
|
223
|
-
*/
|
|
224
|
-
async uninstallByEnv(inputs, ctx) {
|
|
225
|
-
var _a, _b, _c, _d, _e;
|
|
226
|
-
if (!inputs.env) {
|
|
227
|
-
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("env", "FxCore"));
|
|
228
|
-
}
|
|
229
|
-
const teamsappYamlPath = pathUtils_1.pathUtils.getYmlFilePath(inputs.projectPath, inputs.env);
|
|
230
|
-
const yamlProjectModel = await metadataUtil_1.metadataUtil.parse(teamsappYamlPath, inputs.env);
|
|
231
|
-
if (yamlProjectModel.isErr()) {
|
|
232
|
-
return (0, teamsfx_api_1.err)(yamlProjectModel.error);
|
|
233
|
-
}
|
|
234
|
-
const projectModel = yamlProjectModel.value;
|
|
235
|
-
let teamsAppId;
|
|
236
|
-
let botId;
|
|
237
|
-
let m365TitleId;
|
|
238
|
-
let teamsAppIdKeyName = "";
|
|
239
|
-
let botIdKeyName = "";
|
|
240
|
-
let m365TitleIdKeyName = "";
|
|
241
|
-
for (const action of (_b = (_a = projectModel.provision) === null || _a === void 0 ? void 0 : _a.driverDefs) !== null && _b !== void 0 ? _b : []) {
|
|
242
|
-
if (action.uses === "teamsApp/create") {
|
|
243
|
-
teamsAppIdKeyName = ((_c = action.writeToEnvironmentFile) === null || _c === void 0 ? void 0 : _c.teamsAppId) || "TEAMS_APP_ID";
|
|
244
|
-
teamsAppId = process.env[teamsAppIdKeyName];
|
|
245
|
-
}
|
|
246
|
-
else if (action.uses === "botFramework/create") {
|
|
247
|
-
botIdKeyName = ((_d = action.writeToEnvironmentFile) === null || _d === void 0 ? void 0 : _d.botId) || "BOT_ID";
|
|
248
|
-
botId = process.env[botIdKeyName];
|
|
249
|
-
}
|
|
250
|
-
else if (action.uses === "teamsApp/extendToM365") {
|
|
251
|
-
m365TitleIdKeyName = ((_e = action.writeToEnvironmentFile) === null || _e === void 0 ? void 0 : _e.titleId) || "M365_TITLE_ID";
|
|
252
|
-
m365TitleId = process.env[m365TitleIdKeyName];
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
const uninstallOptions = inputs[constants_3.QuestionNames.UninstallOptions];
|
|
256
|
-
const m356AppOption = uninstallOptions === null || uninstallOptions === void 0 ? void 0 : uninstallOptions.includes(constants_3.QuestionNames.UninstallOptionM365);
|
|
257
|
-
const tdpOption = uninstallOptions === null || uninstallOptions === void 0 ? void 0 : uninstallOptions.includes(constants_3.QuestionNames.UninstallOptionTDP);
|
|
258
|
-
const botOption = uninstallOptions === null || uninstallOptions === void 0 ? void 0 : uninstallOptions.includes(constants_3.QuestionNames.UninstallOptionBot);
|
|
259
|
-
if ((teamsAppId || m365TitleId) && m356AppOption) {
|
|
260
|
-
const res = await this.uninstallM365App(m365TitleId, teamsAppId);
|
|
261
|
-
if (res.isErr()) {
|
|
262
|
-
return (0, teamsfx_api_1.err)(res.error);
|
|
263
|
-
}
|
|
264
|
-
this.resetEnvVar(teamsAppIdKeyName, ctx);
|
|
265
|
-
this.resetEnvVar(m365TitleIdKeyName, ctx);
|
|
266
|
-
}
|
|
267
|
-
if (botId && botOption) {
|
|
268
|
-
const res = await this.uninstallBotFrameworRegistration(botId);
|
|
269
|
-
if (res.isErr()) {
|
|
270
|
-
return (0, teamsfx_api_1.err)(res.error);
|
|
271
|
-
}
|
|
272
|
-
this.resetEnvVar(botIdKeyName, ctx);
|
|
273
|
-
}
|
|
274
|
-
// App registraion should be the last to remove, because we might need to query some metadata from TDP.
|
|
275
|
-
if (teamsAppId && tdpOption) {
|
|
276
|
-
const res = await this.uninstallAppRegistration(teamsAppId);
|
|
277
|
-
if (res.isErr()) {
|
|
278
|
-
return (0, teamsfx_api_1.err)(res.error);
|
|
279
|
-
}
|
|
280
|
-
this.resetEnvVar(teamsAppIdKeyName, ctx);
|
|
281
|
-
}
|
|
282
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
283
|
-
}
|
|
284
|
-
resetEnvVar(key, ctx, skipIfNotExist = true, resetValue = "") {
|
|
285
|
-
if (!ctx) {
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
if (!ctx.envVars) {
|
|
289
|
-
ctx.envVars = {};
|
|
290
|
-
}
|
|
291
|
-
if (skipIfNotExist && !ctx.envVars[key]) {
|
|
292
|
-
return;
|
|
293
|
-
}
|
|
294
|
-
ctx.envVars[key] = resetValue;
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* uninstall provisioned resources by title ID. Titlle mode only uninstalls M365 app.
|
|
299
|
-
*/
|
|
300
|
-
async uninstallByTitleId(inputs) {
|
|
301
|
-
const titleId = inputs[constants_3.QuestionNames.TitleId];
|
|
302
|
-
if (!titleId) {
|
|
303
|
-
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("title-id", "FxCore"));
|
|
304
|
-
}
|
|
305
|
-
const res = await this.uninstallM365App(titleId);
|
|
306
|
-
if (res.isErr()) {
|
|
307
|
-
return (0, teamsfx_api_1.err)(res.error);
|
|
308
|
-
}
|
|
309
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* uninstall sideloaded appps in M365
|
|
313
|
-
*/
|
|
314
|
-
async uninstallM365App(titleId, manifestId) {
|
|
315
|
-
var _a, _b, _c, _d;
|
|
316
|
-
if (titleId === undefined && manifestId === undefined) {
|
|
317
|
-
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("title id or manifest id", "FxCore"));
|
|
318
|
-
}
|
|
319
|
-
const sideloadingServiceEndpoint = (_a = process.env.SIDELOADING_SERVICE_ENDPOINT) !== null && _a !== void 0 ? _a : serviceConstant_1.MosServiceEndpoint;
|
|
320
|
-
const sideloadingServiceScope = (_b = process.env.SIDELOADING_SERVICE_SCOPE) !== null && _b !== void 0 ? _b : serviceConstant_1.MosServiceScope;
|
|
321
|
-
const sideloadingTokenRes = await globalVars_1.TOOLS.tokenProvider.m365TokenProvider.getAccessToken({
|
|
322
|
-
scopes: [sideloadingServiceScope],
|
|
323
|
-
});
|
|
324
|
-
if (sideloadingTokenRes.isErr()) {
|
|
325
|
-
return (0, teamsfx_api_1.err)(sideloadingTokenRes.error);
|
|
326
|
-
}
|
|
327
|
-
const packageService = new packageService_1.PackageService(sideloadingServiceEndpoint, globalVars_1.TOOLS.logProvider);
|
|
328
|
-
if (titleId === undefined) {
|
|
329
|
-
try {
|
|
330
|
-
titleId = await packageService.retrieveTitleId(sideloadingTokenRes.value, manifestId !== null && manifestId !== void 0 ? manifestId : "");
|
|
331
|
-
}
|
|
332
|
-
catch (err) {
|
|
333
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.failed.titleId"), false);
|
|
334
|
-
throw (0, common_2.assembleError)(err);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
const confirmRes = await ((_d = (_c = globalVars_1.TOOLS.ui).confirm) === null || _d === void 0 ? void 0 : _d.call(_c, {
|
|
338
|
-
name: "uninstallM365App",
|
|
339
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.uninstall.confirm.m365App", titleId),
|
|
340
|
-
default: true,
|
|
341
|
-
}));
|
|
342
|
-
if ((confirmRes === null || confirmRes === void 0 ? void 0 : confirmRes.isOk()) && confirmRes.value.result === true) {
|
|
343
|
-
await packageService.unacquire(sideloadingTokenRes.value, titleId);
|
|
344
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.m365App", titleId), false);
|
|
345
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.delayWarning"), false);
|
|
346
|
-
}
|
|
347
|
-
else {
|
|
348
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.confirm.cancel.m365App"), false);
|
|
349
|
-
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall M365 App"));
|
|
350
|
-
}
|
|
351
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* uninstall sideloaded apps in Teams Developer Portal
|
|
355
|
-
*/
|
|
356
|
-
async uninstallAppRegistration(manifestId) {
|
|
357
|
-
var _a, _b;
|
|
358
|
-
const appStudioTokenRes = await globalVars_1.TOOLS.tokenProvider.m365TokenProvider.getAccessToken({
|
|
359
|
-
scopes: constants_1.AppStudioScopes,
|
|
360
|
-
});
|
|
361
|
-
if (appStudioTokenRes.isErr()) {
|
|
362
|
-
return (0, teamsfx_api_1.err)(appStudioTokenRes.error);
|
|
363
|
-
}
|
|
364
|
-
const confirmRes = await ((_b = (_a = globalVars_1.TOOLS.ui).confirm) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
365
|
-
name: "uninstallAppRegistration",
|
|
366
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.uninstall.confirm.tdp", manifestId),
|
|
367
|
-
default: true,
|
|
368
|
-
}));
|
|
369
|
-
if ((confirmRes === null || confirmRes === void 0 ? void 0 : confirmRes.isOk()) && confirmRes.value.result === true) {
|
|
370
|
-
const token = appStudioTokenRes.value;
|
|
371
|
-
await teamsDevPortalClient_1.teamsDevPortalClient.deleteApp(token, manifestId);
|
|
372
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.tdp", manifestId), false);
|
|
373
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
374
|
-
}
|
|
375
|
-
else {
|
|
376
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.confirm.cancel.tdp"), false);
|
|
377
|
-
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall App Registration"));
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* uninstall bots created in dev.botframework.com
|
|
382
|
-
*/
|
|
383
|
-
async uninstallBotFrameworRegistration(botId, manifestId) {
|
|
384
|
-
var _a, _b;
|
|
385
|
-
if (!botId && !manifestId) {
|
|
386
|
-
return (0, teamsfx_api_1.err)(new common_2.MissingRequiredInputError("bot id or manifest id", "FxCore"));
|
|
387
|
-
}
|
|
388
|
-
const appStudioTokenRes = await globalVars_1.TOOLS.tokenProvider.m365TokenProvider.getAccessToken({
|
|
389
|
-
scopes: constants_1.AppStudioScopes,
|
|
390
|
-
});
|
|
391
|
-
if (appStudioTokenRes.isErr()) {
|
|
392
|
-
return (0, teamsfx_api_1.err)(appStudioTokenRes.error);
|
|
393
|
-
}
|
|
394
|
-
const token = appStudioTokenRes.value;
|
|
395
|
-
if (!botId) {
|
|
396
|
-
const botIdRes = await teamsDevPortalClient_1.teamsDevPortalClient.getBotId(token, manifestId);
|
|
397
|
-
if (!botIdRes) {
|
|
398
|
-
const msg = (0, localizeUtils_1.getLocalizedString)("core.uninstall.botNotFound", manifestId);
|
|
399
|
-
return (0, teamsfx_api_1.err)(new teamsfx_api_1.UserError("FxCore", "Uninstall", msg, msg));
|
|
400
|
-
}
|
|
401
|
-
botId = botIdRes;
|
|
402
|
-
}
|
|
403
|
-
const confirmRes = await ((_b = (_a = globalVars_1.TOOLS.ui).confirm) === null || _b === void 0 ? void 0 : _b.call(_a, {
|
|
404
|
-
name: "uninstallBotFrameworRegistration",
|
|
405
|
-
title: (0, localizeUtils_1.getLocalizedString)("core.uninstall.confirm.bot", botId),
|
|
406
|
-
default: true,
|
|
407
|
-
}));
|
|
408
|
-
if ((confirmRes === null || confirmRes === void 0 ? void 0 : confirmRes.isOk()) && confirmRes.value.result === true) {
|
|
409
|
-
await teamsDevPortalClient_1.teamsDevPortalClient.deleteBot(token, botId);
|
|
410
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.success.bot", botId), false);
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
413
|
-
await globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.uninstall.confirm.cancel.bot"), false);
|
|
414
|
-
return (0, teamsfx_api_1.err)(new common_2.UserCancelError("Uninstall Bot Framework Registration"));
|
|
415
|
-
}
|
|
416
|
-
return (0, teamsfx_api_1.ok)(undefined);
|
|
417
|
-
}
|
|
418
172
|
/**
|
|
419
173
|
* lifecycle commands: deploy
|
|
420
174
|
*/
|
|
421
175
|
async deployArtifacts(inputs, ctx) {
|
|
422
176
|
inputs.stage = teamsfx_api_1.Stage.deploy;
|
|
423
|
-
const context =
|
|
177
|
+
const context = utils_2.createDriverContext(inputs);
|
|
424
178
|
const res = await coordinator_1.coordinator.deploy(context, inputs);
|
|
425
179
|
if (res.isOk()) {
|
|
426
180
|
ctx.envVars = res.value;
|
|
427
|
-
return
|
|
181
|
+
return teamsfx_api_1.ok(undefined);
|
|
428
182
|
}
|
|
429
183
|
else {
|
|
430
184
|
// for partial success scenario, output is set in inputs object
|
|
431
185
|
ctx.envVars = inputs.envVars;
|
|
432
|
-
return
|
|
186
|
+
return teamsfx_api_1.err(res.error);
|
|
433
187
|
}
|
|
434
188
|
}
|
|
435
189
|
async localDebug(inputs) {
|
|
@@ -443,12 +197,12 @@ class FxCore {
|
|
|
443
197
|
inputs.stage = teamsfx_api_1.Stage.deployAad;
|
|
444
198
|
const updateAadClient = typedi_1.Container.get("aadApp/update");
|
|
445
199
|
// In V3, the aad.template.json exist at .fx folder, and output to root build folder.
|
|
446
|
-
const manifestTemplatePath = inputs[
|
|
200
|
+
const manifestTemplatePath = inputs[questionNames_1.QuestionNames.AadAppManifestFilePath];
|
|
447
201
|
if (!(await fs_extra_1.default.pathExists(manifestTemplatePath))) {
|
|
448
|
-
return
|
|
202
|
+
return teamsfx_api_1.err(new common_2.FileNotFoundError("deployAadManifest", manifestTemplatePath));
|
|
449
203
|
}
|
|
450
204
|
let manifestOutputPath = manifestTemplatePath;
|
|
451
|
-
if (inputs.env && (await
|
|
205
|
+
if (inputs.env && (await other_1.isAadMainifestContainsPlaceholder(inputs))) {
|
|
452
206
|
await fs_extra_1.default.ensureDir(path.join(inputs.projectPath, "build"));
|
|
453
207
|
manifestOutputPath = path.join(inputs.projectPath, "build", `aad.manifest.${inputs.env}.json`);
|
|
454
208
|
}
|
|
@@ -456,77 +210,77 @@ class FxCore {
|
|
|
456
210
|
manifestPath: manifestTemplatePath,
|
|
457
211
|
outputFilePath: manifestOutputPath,
|
|
458
212
|
};
|
|
459
|
-
const Context =
|
|
460
|
-
|
|
213
|
+
const Context = utils_2.createDriverContext(inputs);
|
|
214
|
+
globalVars_1.setErrorContext({ component: "aadAppUpdate" });
|
|
461
215
|
const res = await updateAadClient.execute(inputArgs, Context);
|
|
462
216
|
if (res.result.isErr()) {
|
|
463
|
-
return
|
|
217
|
+
return teamsfx_api_1.err(res.result.error);
|
|
464
218
|
}
|
|
465
219
|
if (Context.platform === teamsfx_api_1.Platform.CLI) {
|
|
466
|
-
const msg =
|
|
220
|
+
const msg = localizeUtils_1.getLocalizedString("core.deploy.aadManifestOnCLISuccessNotice");
|
|
467
221
|
void Context.ui.showMessage("info", msg, false);
|
|
468
222
|
}
|
|
469
223
|
else {
|
|
470
|
-
const msg =
|
|
471
|
-
void Context.ui.showMessage("info", msg, false,
|
|
224
|
+
const msg = localizeUtils_1.getLocalizedString("core.deploy.aadManifestSuccessNotice");
|
|
225
|
+
void Context.ui.showMessage("info", msg, false, localizeUtils_1.getLocalizedString("core.deploy.aadManifestLearnMore")).then((result) => {
|
|
472
226
|
const userSelected = result.isOk() ? result.value : undefined;
|
|
473
|
-
if (userSelected ===
|
|
227
|
+
if (userSelected === localizeUtils_1.getLocalizedString("core.deploy.aadManifestLearnMore")) {
|
|
474
228
|
void Context.ui.openUrl(constants_2.ViewAadAppHelpLinkV5);
|
|
475
229
|
}
|
|
476
230
|
});
|
|
477
231
|
}
|
|
478
|
-
return
|
|
232
|
+
return teamsfx_api_1.ok(undefined);
|
|
479
233
|
}
|
|
480
234
|
/**
|
|
481
235
|
* none lifecycle command, v3 only
|
|
482
236
|
*/
|
|
483
237
|
async addWebpart(inputs) {
|
|
484
|
-
|
|
238
|
+
globalVars_1.setErrorContext({ component: "spfxAdd", method: "run" });
|
|
485
239
|
const driver = typedi_1.Container.get("spfx/add");
|
|
486
240
|
const args = {
|
|
487
|
-
manifestPath: inputs[
|
|
488
|
-
localManifestPath: inputs[
|
|
489
|
-
spfxFolder: inputs[
|
|
490
|
-
webpartName: inputs[
|
|
491
|
-
framework: inputs[
|
|
492
|
-
spfxPackage:
|
|
241
|
+
manifestPath: inputs[constants_2.SPFxQuestionNames.ManifestPath],
|
|
242
|
+
localManifestPath: inputs[constants_2.SPFxQuestionNames.LocalManifestPath],
|
|
243
|
+
spfxFolder: inputs[constants_2.SPFxQuestionNames.SPFxFolder],
|
|
244
|
+
webpartName: inputs[constants_2.SPFxQuestionNames.WebPartName],
|
|
245
|
+
framework: inputs[questionNames_1.QuestionNames.SPFxFramework],
|
|
246
|
+
spfxPackage: create_1.SPFxVersionOptionIds.installLocally,
|
|
493
247
|
};
|
|
494
|
-
const Context =
|
|
248
|
+
const Context = utils_2.createDriverContext(inputs);
|
|
495
249
|
const res = await driver.run(args, Context);
|
|
496
250
|
if (res.isErr()) {
|
|
497
|
-
return
|
|
251
|
+
return teamsfx_api_1.err(res.error);
|
|
498
252
|
}
|
|
499
|
-
return
|
|
253
|
+
return teamsfx_api_1.ok(undefined);
|
|
500
254
|
}
|
|
501
255
|
/**
|
|
502
256
|
* lifecycle command: publish
|
|
503
257
|
*/
|
|
504
258
|
async publishApplication(inputs, ctx) {
|
|
505
259
|
inputs.stage = teamsfx_api_1.Stage.publish;
|
|
506
|
-
const context =
|
|
260
|
+
const context = utils_2.createDriverContext(inputs);
|
|
507
261
|
const res = await coordinator_1.coordinator.publish(context, inputs);
|
|
508
262
|
if (res.isOk()) {
|
|
509
263
|
ctx.envVars = res.value;
|
|
510
|
-
return
|
|
264
|
+
return teamsfx_api_1.ok(undefined);
|
|
511
265
|
}
|
|
512
266
|
else {
|
|
513
267
|
// for partial success scenario, output is set in inputs object
|
|
514
268
|
ctx.envVars = inputs.envVars;
|
|
515
|
-
return
|
|
269
|
+
return teamsfx_api_1.err(res.error);
|
|
516
270
|
}
|
|
517
271
|
}
|
|
518
272
|
/**
|
|
519
273
|
* most commands will be deprecated in V3
|
|
520
274
|
*/
|
|
521
275
|
async executeUserTask(func, inputs) {
|
|
522
|
-
let res =
|
|
523
|
-
const context =
|
|
276
|
+
let res = teamsfx_api_1.ok(undefined);
|
|
277
|
+
const context = utils_2.createDriverContext(inputs);
|
|
524
278
|
if (func.method === "addSso") {
|
|
525
279
|
// used in v3 only in VS
|
|
526
280
|
inputs.stage = teamsfx_api_1.Stage.addFeature;
|
|
527
|
-
inputs[
|
|
281
|
+
inputs[questionNames_1.QuestionNames.Features] = constants_2.SingleSignOnOptionItem.id;
|
|
528
282
|
const component = typedi_1.Container.get("sso");
|
|
529
|
-
|
|
283
|
+
globalVars_1.setErrorContext({ component: "sso", method: "add" });
|
|
530
284
|
res = await component.add(context, inputs);
|
|
531
285
|
}
|
|
532
286
|
return res;
|
|
@@ -539,28 +293,28 @@ class FxCore {
|
|
|
539
293
|
? inputs.AAD_MANIFEST_FILE
|
|
540
294
|
: path.join(inputs.projectPath, constants_2.AadConstants.DefaultTemplateFileName);
|
|
541
295
|
if (!(await fs_extra_1.default.pathExists(manifestTemplatePath))) {
|
|
542
|
-
return
|
|
296
|
+
return teamsfx_api_1.err(new common_2.FileNotFoundError("buildAadManifest", manifestTemplatePath));
|
|
543
297
|
}
|
|
544
298
|
await fs_extra_1.default.ensureDir(path.join(inputs.projectPath, "build"));
|
|
545
299
|
const manifestOutputPath = path.join(inputs.projectPath, "build",
|
|
546
300
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
547
301
|
`aad.${inputs.env}.json`);
|
|
548
|
-
const Context =
|
|
549
|
-
await
|
|
550
|
-
return
|
|
302
|
+
const Context = utils_2.createDriverContext(inputs);
|
|
303
|
+
await buildAadManifest_1.buildAadManifest(Context, manifestTemplatePath, manifestOutputPath);
|
|
304
|
+
return teamsfx_api_1.ok(undefined);
|
|
551
305
|
}
|
|
552
306
|
/**
|
|
553
307
|
* v3 only none lifecycle command
|
|
554
308
|
*/
|
|
555
309
|
async deployTeamsManifest(inputs, ctx) {
|
|
556
|
-
inputs.manifestTemplatePath = inputs[
|
|
557
|
-
const context =
|
|
558
|
-
const res = await
|
|
310
|
+
inputs.manifestTemplatePath = inputs[questionNames_1.QuestionNames.TeamsAppManifestFilePath];
|
|
311
|
+
const context = utils_2.createContextV3();
|
|
312
|
+
const res = await appStudio_1.updateManifestV3(context, inputs);
|
|
559
313
|
if (res.isOk()) {
|
|
560
314
|
ctx.envVars = envUtil_1.envUtil.map2object(res.value);
|
|
561
|
-
return
|
|
315
|
+
return teamsfx_api_1.ok(undefined);
|
|
562
316
|
}
|
|
563
|
-
return
|
|
317
|
+
return teamsfx_api_1.err(res.error);
|
|
564
318
|
}
|
|
565
319
|
/******
|
|
566
320
|
* CLI v3 commands
|
|
@@ -582,9 +336,9 @@ class FxCore {
|
|
|
582
336
|
async packageTeamsAppCLIV3(inputs) {
|
|
583
337
|
const res = await teamsappMgr_1.teamsappMgr.packageTeamsApp(inputs);
|
|
584
338
|
if (res.isErr()) {
|
|
585
|
-
return
|
|
339
|
+
return teamsfx_api_1.err(res.error);
|
|
586
340
|
}
|
|
587
|
-
return
|
|
341
|
+
return teamsfx_api_1.ok(undefined);
|
|
588
342
|
}
|
|
589
343
|
/******
|
|
590
344
|
* CLI v3 commands
|
|
@@ -600,7 +354,7 @@ class FxCore {
|
|
|
600
354
|
if (inputs["manifest-path"]) {
|
|
601
355
|
return await this.validateManifest(inputs);
|
|
602
356
|
}
|
|
603
|
-
else if (inputs[
|
|
357
|
+
else if (inputs[questionNames_1.QuestionNames.ValidateMethod] === other_1.TeamsAppValidationOptions.testCases().id) {
|
|
604
358
|
return await this.validateWithTestCases(inputs);
|
|
605
359
|
}
|
|
606
360
|
else {
|
|
@@ -612,7 +366,7 @@ class FxCore {
|
|
|
612
366
|
*/
|
|
613
367
|
async validateManifest(inputs) {
|
|
614
368
|
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
615
|
-
const context =
|
|
369
|
+
const context = utils_2.createDriverContext(inputs);
|
|
616
370
|
const teamsAppManifestFilePath = inputs["manifest-path"];
|
|
617
371
|
const args = {
|
|
618
372
|
manifestPath: teamsAppManifestFilePath,
|
|
@@ -627,7 +381,7 @@ class FxCore {
|
|
|
627
381
|
*/
|
|
628
382
|
async validateAppPackage(inputs) {
|
|
629
383
|
inputs.stage = teamsfx_api_1.Stage.validateApplication;
|
|
630
|
-
const context =
|
|
384
|
+
const context = utils_2.createDriverContext(inputs);
|
|
631
385
|
const teamsAppPackageFilePath = inputs["app-package-file-path"];
|
|
632
386
|
const args = {
|
|
633
387
|
appPackagePath: teamsAppPackageFilePath,
|
|
@@ -637,7 +391,7 @@ class FxCore {
|
|
|
637
391
|
return (await driver.execute(args, context)).result;
|
|
638
392
|
}
|
|
639
393
|
async validateWithTestCases(inputs) {
|
|
640
|
-
const context =
|
|
394
|
+
const context = utils_2.createDriverContext(inputs);
|
|
641
395
|
const args = {
|
|
642
396
|
appPackagePath: inputs["app-package-file-path"],
|
|
643
397
|
showMessage: true,
|
|
@@ -646,40 +400,25 @@ class FxCore {
|
|
|
646
400
|
const driver = typedi_1.Container.get("teamsApp/validateWithTestCases");
|
|
647
401
|
return (await driver.execute(args, context)).result;
|
|
648
402
|
}
|
|
649
|
-
/**
|
|
650
|
-
* v3 only none lifecycle command
|
|
651
|
-
*/
|
|
652
|
-
async syncManifest(inputs) {
|
|
653
|
-
const context = (0, utils_2.createDriverContext)(inputs);
|
|
654
|
-
const projectPath = inputs[constants_3.QuestionNames.ProjectPath];
|
|
655
|
-
const env = inputs[constants_3.QuestionNames.Env];
|
|
656
|
-
const teamsAppId = inputs[constants_3.QuestionNames.TeamsAppId];
|
|
657
|
-
const args = {
|
|
658
|
-
projectPath: projectPath,
|
|
659
|
-
env: env,
|
|
660
|
-
teamsAppId: teamsAppId,
|
|
661
|
-
};
|
|
662
|
-
const driver = typedi_1.Container.get("teamsApp/syncManifest");
|
|
663
|
-
return (await driver.execute(args, context)).result;
|
|
664
|
-
}
|
|
665
403
|
/**
|
|
666
404
|
* v3 only none lifecycle command
|
|
667
405
|
*/
|
|
668
406
|
async createAppPackage(inputs) {
|
|
669
407
|
var _a, _b, _c;
|
|
670
408
|
inputs.stage = teamsfx_api_1.Stage.createAppPackage;
|
|
671
|
-
const context =
|
|
672
|
-
const teamsAppManifestFilePath = inputs === null || inputs === void 0 ? void 0 : inputs[
|
|
409
|
+
const context = utils_2.createDriverContext(inputs);
|
|
410
|
+
const teamsAppManifestFilePath = inputs === null || inputs === void 0 ? void 0 : inputs[questionNames_1.QuestionNames.TeamsAppManifestFilePath];
|
|
673
411
|
const driver = typedi_1.Container.get("teamsApp/zipAppPackage");
|
|
674
412
|
const args = {
|
|
675
413
|
manifestPath: teamsAppManifestFilePath,
|
|
676
|
-
outputZipPath: (_a = inputs[
|
|
414
|
+
outputZipPath: (_a = inputs[questionNames_1.QuestionNames.OutputZipPathParamName]) !== null && _a !== void 0 ? _a :
|
|
677
415
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
678
416
|
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/appPackage.${process.env
|
|
679
417
|
.TEAMSFX_ENV}.zip`,
|
|
680
|
-
|
|
418
|
+
outputJsonPath: (_b = inputs[questionNames_1.QuestionNames.OutputManifestParamName]) !== null && _b !== void 0 ? _b :
|
|
681
419
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
682
|
-
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}
|
|
420
|
+
`${inputs.projectPath}/${teamsfx_api_1.AppPackageFolderName}/${teamsfx_api_1.BuildFolderName}/manifest.${process.env
|
|
421
|
+
.TEAMSFX_ENV}.json`,
|
|
683
422
|
};
|
|
684
423
|
const result = (await driver.execute(args, context)).result;
|
|
685
424
|
if (context.platform === teamsfx_api_1.Platform.VSCode) {
|
|
@@ -689,11 +428,11 @@ class FxCore {
|
|
|
689
428
|
if (!path.isAbsolute(zipFileName)) {
|
|
690
429
|
zipFileName = path.join(context.projectPath, zipFileName);
|
|
691
430
|
}
|
|
692
|
-
let builtSuccess =
|
|
431
|
+
let builtSuccess = localizeUtils_1.getLocalizedString("plugins.appstudio.buildSucceedNotice.fallback", zipFileName);
|
|
693
432
|
if (isWindows) {
|
|
694
|
-
const folderLink =
|
|
433
|
+
const folderLink = url_1.pathToFileURL(path.dirname(zipFileName));
|
|
695
434
|
const appPackageLink = `${constants_1.VSCodeExtensionCommand.openFolder}?%5B%22${folderLink.toString()}%22%5D`;
|
|
696
|
-
builtSuccess =
|
|
435
|
+
builtSuccess = localizeUtils_1.getLocalizedString("plugins.appstudio.buildSucceedNotice", appPackageLink);
|
|
697
436
|
}
|
|
698
437
|
(_c = context.ui) === null || _c === void 0 ? void 0 : _c.showMessage("info", builtSuccess, false);
|
|
699
438
|
}
|
|
@@ -708,17 +447,16 @@ class FxCore {
|
|
|
708
447
|
*/
|
|
709
448
|
async previewWithManifest(inputs) {
|
|
710
449
|
inputs.stage = teamsfx_api_1.Stage.previewWithManifest;
|
|
711
|
-
const hub = inputs[
|
|
712
|
-
const manifestFilePath = inputs[
|
|
713
|
-
const
|
|
714
|
-
const manifestRes = await ManifestUtils_1.manifestUtils.getManifestV3(manifestFilePath, (0, utils_3.generateDriverContext)(context, inputs), false);
|
|
450
|
+
const hub = inputs[questionNames_1.QuestionNames.M365Host];
|
|
451
|
+
const manifestFilePath = inputs[questionNames_1.QuestionNames.TeamsAppManifestFilePath];
|
|
452
|
+
const manifestRes = await ManifestUtils_1.manifestUtils.getManifestV3(manifestFilePath, undefined, false);
|
|
715
453
|
if (manifestRes.isErr()) {
|
|
716
|
-
return
|
|
454
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
717
455
|
}
|
|
718
456
|
const teamsAppId = manifestRes.value.id;
|
|
719
457
|
const properties = teamsfx_api_1.ManifestUtil.parseCommonProperties(manifestRes.value);
|
|
720
458
|
const launchHelper = new launchHelper_1.LaunchHelper(globalVars_1.TOOLS.tokenProvider.m365TokenProvider, globalVars_1.TOOLS.logProvider);
|
|
721
|
-
const result = await launchHelper.getLaunchUrl(hub, teamsAppId, properties, true);
|
|
459
|
+
const result = await launchHelper.getLaunchUrl(hub, teamsAppId, properties.capabilities, true);
|
|
722
460
|
return result;
|
|
723
461
|
}
|
|
724
462
|
/**
|
|
@@ -726,9 +464,9 @@ class FxCore {
|
|
|
726
464
|
*/
|
|
727
465
|
getQuestions(stage, inputs) {
|
|
728
466
|
if (stage === teamsfx_api_1.Stage.create) {
|
|
729
|
-
return
|
|
467
|
+
return teamsfx_api_1.ok(create_1.createProjectCliHelpNode());
|
|
730
468
|
}
|
|
731
|
-
return
|
|
469
|
+
return teamsfx_api_1.ok(undefined);
|
|
732
470
|
}
|
|
733
471
|
/**
|
|
734
472
|
* get all dot envs
|
|
@@ -736,17 +474,17 @@ class FxCore {
|
|
|
736
474
|
async getDotEnvs(inputs) {
|
|
737
475
|
const envListRes = await envUtil_1.envUtil.listEnv(inputs.projectPath);
|
|
738
476
|
if (envListRes.isErr()) {
|
|
739
|
-
return
|
|
477
|
+
return teamsfx_api_1.err(envListRes.error);
|
|
740
478
|
}
|
|
741
479
|
const res = {};
|
|
742
480
|
for (const env of envListRes.value) {
|
|
743
481
|
const envRes = await envUtil_1.envUtil.readEnv(inputs.projectPath, env, false, false);
|
|
744
482
|
if (envRes.isErr()) {
|
|
745
|
-
return
|
|
483
|
+
return teamsfx_api_1.err(envRes.error);
|
|
746
484
|
}
|
|
747
485
|
res[env] = envRes.value;
|
|
748
486
|
}
|
|
749
|
-
return
|
|
487
|
+
return teamsfx_api_1.ok(res);
|
|
750
488
|
}
|
|
751
489
|
/**
|
|
752
490
|
* given projectPath and filePath, return whether the filePath is a env file
|
|
@@ -755,17 +493,17 @@ class FxCore {
|
|
|
755
493
|
const inputFileName = path.basename(inputFile);
|
|
756
494
|
const envName = envUtil_1.envUtil.extractEnvNameFromFileName(inputFileName);
|
|
757
495
|
if (!envName)
|
|
758
|
-
return
|
|
496
|
+
return teamsfx_api_1.ok(false);
|
|
759
497
|
const folderRes = await pathUtils_1.pathUtils.getEnvFolderPath(projectPath);
|
|
760
498
|
if (folderRes.isErr())
|
|
761
|
-
return
|
|
499
|
+
return teamsfx_api_1.err(folderRes.error);
|
|
762
500
|
const envFolderPath = folderRes.value;
|
|
763
501
|
if (!envFolderPath)
|
|
764
|
-
return
|
|
502
|
+
return teamsfx_api_1.ok(false);
|
|
765
503
|
const inputFileDir = path.dirname(inputFile);
|
|
766
504
|
if (path.resolve(inputFileDir) !== path.resolve(envFolderPath))
|
|
767
|
-
return
|
|
768
|
-
return
|
|
505
|
+
return teamsfx_api_1.ok(false);
|
|
506
|
+
return teamsfx_api_1.ok(true);
|
|
769
507
|
}
|
|
770
508
|
/**
|
|
771
509
|
* get projectId
|
|
@@ -773,18 +511,29 @@ class FxCore {
|
|
|
773
511
|
async getProjectId(projectPath) {
|
|
774
512
|
const res = await this.getProjectMetadata(projectPath);
|
|
775
513
|
if (res.isErr()) {
|
|
776
|
-
return
|
|
514
|
+
return teamsfx_api_1.err(res.error);
|
|
777
515
|
}
|
|
778
|
-
return
|
|
516
|
+
return teamsfx_api_1.ok(res.value.projectId || "");
|
|
779
517
|
}
|
|
780
518
|
/**
|
|
781
519
|
* @description get projectId and version from yml
|
|
782
520
|
*/
|
|
783
521
|
async getProjectMetadata(projectPath) {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
522
|
+
try {
|
|
523
|
+
const ymlPath = pathUtils_1.pathUtils.getYmlFilePath(projectPath, "dev");
|
|
524
|
+
if (!ymlPath || !(await fs_extra_1.default.pathExists(ymlPath))) {
|
|
525
|
+
return teamsfx_api_1.ok({});
|
|
526
|
+
}
|
|
527
|
+
const ymlContent = await fs_extra_1.default.readFile(ymlPath, "utf-8");
|
|
528
|
+
const ymlObject = yaml_1.parse(ymlContent);
|
|
529
|
+
return teamsfx_api_1.ok({
|
|
530
|
+
projectId: (ymlObject === null || ymlObject === void 0 ? void 0 : ymlObject.projectId) ? ymlObject.projectId.toString() : "",
|
|
531
|
+
version: (ymlObject === null || ymlObject === void 0 ? void 0 : ymlObject.version) ? ymlObject.version.toString() : "",
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
catch (_a) {
|
|
535
|
+
return teamsfx_api_1.ok({});
|
|
536
|
+
}
|
|
788
537
|
}
|
|
789
538
|
/**
|
|
790
539
|
* get Teams App Name from yml
|
|
@@ -794,7 +543,7 @@ class FxCore {
|
|
|
794
543
|
const ymlPath = pathUtils_1.pathUtils.getYmlFilePath(projectPath, "dev");
|
|
795
544
|
const maybeProjectModel = await metadataUtil_1.metadataUtil.parse(ymlPath, "dev");
|
|
796
545
|
if (maybeProjectModel.isErr()) {
|
|
797
|
-
return
|
|
546
|
+
return teamsfx_api_1.err(maybeProjectModel.error);
|
|
798
547
|
}
|
|
799
548
|
const projectModel = maybeProjectModel.value;
|
|
800
549
|
if (projectModel.provision) {
|
|
@@ -802,12 +551,12 @@ class FxCore {
|
|
|
802
551
|
if (teamsAppCreate) {
|
|
803
552
|
let name = teamsAppCreate.with.name;
|
|
804
553
|
if (name) {
|
|
805
|
-
name =
|
|
806
|
-
return
|
|
554
|
+
name = common_1.expandEnvironmentVariable(name, { APP_NAME_SUFFIX: "", TEAMSFX_ENV: " " }).trim();
|
|
555
|
+
return teamsfx_api_1.ok(name);
|
|
807
556
|
}
|
|
808
557
|
}
|
|
809
558
|
}
|
|
810
|
-
return
|
|
559
|
+
return teamsfx_api_1.ok("");
|
|
811
560
|
}
|
|
812
561
|
/**
|
|
813
562
|
* get project info
|
|
@@ -817,12 +566,12 @@ class FxCore {
|
|
|
817
566
|
const ymlPath = pathUtils_1.pathUtils.getYmlFilePath(projectPath, env);
|
|
818
567
|
const maybeProjectModel = await metadataUtil_1.metadataUtil.parse(ymlPath, env);
|
|
819
568
|
if (maybeProjectModel.isErr()) {
|
|
820
|
-
return
|
|
569
|
+
return teamsfx_api_1.err(maybeProjectModel.error);
|
|
821
570
|
}
|
|
822
571
|
const projectModel = maybeProjectModel.value;
|
|
823
572
|
const readEnvRes = await envUtil_1.envUtil.readEnv(projectPath, env, false, true);
|
|
824
573
|
if (readEnvRes.isErr()) {
|
|
825
|
-
return
|
|
574
|
+
return teamsfx_api_1.err(readEnvRes.error);
|
|
826
575
|
}
|
|
827
576
|
const envObject = readEnvRes.value;
|
|
828
577
|
const res = {
|
|
@@ -845,13 +594,13 @@ class FxCore {
|
|
|
845
594
|
}
|
|
846
595
|
}
|
|
847
596
|
}
|
|
848
|
-
return
|
|
597
|
+
return teamsfx_api_1.ok(res);
|
|
849
598
|
}
|
|
850
599
|
async grantPermission(inputs) {
|
|
851
600
|
inputs.stage = teamsfx_api_1.Stage.grantPermission;
|
|
852
|
-
const context =
|
|
853
|
-
|
|
854
|
-
const res = await
|
|
601
|
+
const context = utils_2.createContextV3();
|
|
602
|
+
globalVars_1.setErrorContext({ component: "collaborator" });
|
|
603
|
+
const res = await collaborator_1.grantPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
855
604
|
return res;
|
|
856
605
|
}
|
|
857
606
|
/**
|
|
@@ -859,8 +608,8 @@ class FxCore {
|
|
|
859
608
|
*/
|
|
860
609
|
async checkPermission(inputs) {
|
|
861
610
|
inputs.stage = teamsfx_api_1.Stage.checkPermission;
|
|
862
|
-
const context =
|
|
863
|
-
const res = await
|
|
611
|
+
const context = utils_2.createContextV3();
|
|
612
|
+
const res = await collaborator_1.checkPermission(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
864
613
|
return res;
|
|
865
614
|
}
|
|
866
615
|
/**
|
|
@@ -868,21 +617,21 @@ class FxCore {
|
|
|
868
617
|
*/
|
|
869
618
|
async listCollaborator(inputs) {
|
|
870
619
|
inputs.stage = teamsfx_api_1.Stage.listCollaborator;
|
|
871
|
-
const context =
|
|
872
|
-
const res = await
|
|
620
|
+
const context = utils_2.createContextV3();
|
|
621
|
+
const res = await collaborator_1.listCollaborator(context, inputs, globalVars_1.TOOLS.tokenProvider);
|
|
873
622
|
return res;
|
|
874
623
|
}
|
|
875
624
|
getSelectedEnv(inputs) {
|
|
876
|
-
return Promise.resolve(
|
|
625
|
+
return Promise.resolve(teamsfx_api_1.ok(inputs.env)); //work for both v2 and v3
|
|
877
626
|
}
|
|
878
627
|
async createLocalCrypto(projectPath) {
|
|
879
628
|
const settingsRes = await settingsUtil_1.settingsUtil.readSettings(projectPath);
|
|
880
629
|
if (settingsRes.isErr()) {
|
|
881
|
-
return
|
|
630
|
+
return teamsfx_api_1.err(settingsRes.error);
|
|
882
631
|
}
|
|
883
632
|
const projectId = settingsRes.value.trackingId;
|
|
884
633
|
const cryptoProvider = new crypto_1.LocalCrypto(projectId);
|
|
885
|
-
return
|
|
634
|
+
return teamsfx_api_1.ok(cryptoProvider);
|
|
886
635
|
}
|
|
887
636
|
/**
|
|
888
637
|
* only for vs code extension
|
|
@@ -890,7 +639,7 @@ class FxCore {
|
|
|
890
639
|
async encrypt(plaintext, inputs) {
|
|
891
640
|
const res = await this.createLocalCrypto(inputs.projectPath);
|
|
892
641
|
if (res.isErr()) {
|
|
893
|
-
return
|
|
642
|
+
return teamsfx_api_1.err(res.error);
|
|
894
643
|
}
|
|
895
644
|
return res.value.encrypt(plaintext);
|
|
896
645
|
}
|
|
@@ -900,26 +649,26 @@ class FxCore {
|
|
|
900
649
|
async decrypt(ciphertext, inputs) {
|
|
901
650
|
const res = await this.createLocalCrypto(inputs.projectPath);
|
|
902
651
|
if (res.isErr()) {
|
|
903
|
-
return
|
|
652
|
+
return teamsfx_api_1.err(res.error);
|
|
904
653
|
}
|
|
905
654
|
return res.value.decrypt(ciphertext);
|
|
906
655
|
}
|
|
907
656
|
async createEnv(inputs) {
|
|
908
|
-
return this.createEnvCopyV3(inputs[
|
|
657
|
+
return this.createEnvCopyV3(inputs[questionNames_1.QuestionNames.NewTargetEnvName], inputs[questionNames_1.QuestionNames.SourceEnvName], inputs.projectPath);
|
|
909
658
|
}
|
|
910
659
|
async createEnvCopyV3(targetEnvName, sourceEnvName, projectPath) {
|
|
911
660
|
let res = await pathUtils_1.pathUtils.getEnvFilePath(projectPath, sourceEnvName);
|
|
912
661
|
if (res.isErr())
|
|
913
|
-
return
|
|
662
|
+
return teamsfx_api_1.err(res.error);
|
|
914
663
|
const sourceDotEnvFile = res.value;
|
|
915
664
|
res = await pathUtils_1.pathUtils.getEnvFilePath(projectPath, targetEnvName);
|
|
916
665
|
if (res.isErr())
|
|
917
|
-
return
|
|
666
|
+
return teamsfx_api_1.err(res.error);
|
|
918
667
|
const targetDotEnvFile = res.value;
|
|
919
668
|
if (!sourceDotEnvFile || !targetDotEnvFile)
|
|
920
|
-
return
|
|
669
|
+
return teamsfx_api_1.err(new yml_1.YamlFieldMissingError("environmentFolderPath"));
|
|
921
670
|
if (!(await fs_extra_1.default.pathExists(sourceDotEnvFile)))
|
|
922
|
-
return
|
|
671
|
+
return teamsfx_api_1.err(new common_2.FileNotFoundError("createEnvCopyV3", sourceDotEnvFile));
|
|
923
672
|
const source = await fs_extra_1.default.readFile(sourceDotEnvFile);
|
|
924
673
|
const writeStream = fs_extra_1.default.createWriteStream(targetDotEnvFile);
|
|
925
674
|
source
|
|
@@ -945,48 +694,48 @@ class FxCore {
|
|
|
945
694
|
});
|
|
946
695
|
writeStream.end();
|
|
947
696
|
globalVars_1.TOOLS.logProvider.info(`env file created: ${targetDotEnvFile}`);
|
|
948
|
-
return
|
|
697
|
+
return teamsfx_api_1.ok(undefined);
|
|
949
698
|
}
|
|
950
699
|
// a phantom migration method for V3
|
|
951
700
|
async phantomMigrationV3(inputs) {
|
|
952
701
|
// If the project is invalid or upgraded, the ProjectMigratorMWV3 will not take action.
|
|
953
702
|
// Check invaliad/upgraded project here before call ProjectMigratorMWV3
|
|
954
703
|
const projectPath = inputs.projectPath || "";
|
|
955
|
-
const version = await
|
|
704
|
+
const version = await v3MigrationUtils_1.getProjectVersionFromPath(projectPath);
|
|
956
705
|
if (version.source === versionMetadata_1.VersionSource.teamsapp) {
|
|
957
|
-
return
|
|
706
|
+
return teamsfx_api_1.err(new upgrade_1.NoNeedUpgradeError());
|
|
958
707
|
}
|
|
959
708
|
else if (version.source === versionMetadata_1.VersionSource.projectSettings) {
|
|
960
|
-
const isValid = await
|
|
709
|
+
const isValid = await projectMigratorV3_1.checkActiveResourcePlugins(projectPath);
|
|
961
710
|
if (!isValid) {
|
|
962
|
-
return
|
|
711
|
+
return teamsfx_api_1.err(new common_2.InvalidProjectError());
|
|
963
712
|
}
|
|
964
713
|
}
|
|
965
714
|
if (version.source === versionMetadata_1.VersionSource.unknown) {
|
|
966
|
-
return
|
|
715
|
+
return teamsfx_api_1.err(new common_2.InvalidProjectError());
|
|
967
716
|
}
|
|
968
717
|
return this.innerMigrationV3(inputs);
|
|
969
718
|
}
|
|
970
719
|
innerMigrationV3(inputs) {
|
|
971
|
-
return
|
|
720
|
+
return teamsfx_api_1.ok(undefined);
|
|
972
721
|
}
|
|
973
722
|
// a project version check
|
|
974
723
|
async projectVersionCheck(inputs) {
|
|
975
724
|
const projectPath = inputs.projectPath || "";
|
|
976
|
-
if (
|
|
977
|
-
const versionInfo = await
|
|
725
|
+
if (projectSettingsHelper_1.isValidProjectV3(projectPath) || projectSettingsHelper_1.isValidProjectV2(projectPath)) {
|
|
726
|
+
const versionInfo = await v3MigrationUtils_1.getProjectVersionFromPath(projectPath);
|
|
978
727
|
if (!versionInfo.version) {
|
|
979
|
-
return
|
|
728
|
+
return teamsfx_api_1.err(new common_2.InvalidProjectError());
|
|
980
729
|
}
|
|
981
|
-
const trackingId = await
|
|
982
|
-
const isSupport =
|
|
730
|
+
const trackingId = await v3MigrationUtils_1.getTrackingIdFromPath(projectPath);
|
|
731
|
+
const isSupport = v3MigrationUtils_1.getVersionState(versionInfo);
|
|
983
732
|
// if the project is upgradeable, check whether the project is valid and invalid project should not show upgrade option.
|
|
984
733
|
if (isSupport === versionMetadata_1.VersionState.upgradeable) {
|
|
985
|
-
if (!(await
|
|
986
|
-
return
|
|
734
|
+
if (!(await projectMigratorV3_1.checkActiveResourcePlugins(projectPath))) {
|
|
735
|
+
return teamsfx_api_1.err(new common_2.InvalidProjectError());
|
|
987
736
|
}
|
|
988
737
|
}
|
|
989
|
-
return
|
|
738
|
+
return teamsfx_api_1.ok({
|
|
990
739
|
currentVersion: versionInfo.version,
|
|
991
740
|
trackingId,
|
|
992
741
|
isSupport,
|
|
@@ -994,28 +743,28 @@ class FxCore {
|
|
|
994
743
|
});
|
|
995
744
|
}
|
|
996
745
|
else {
|
|
997
|
-
return
|
|
746
|
+
return teamsfx_api_1.err(new common_2.InvalidProjectError());
|
|
998
747
|
}
|
|
999
748
|
}
|
|
1000
749
|
// apply the given yaml template to current project.
|
|
1001
750
|
async apply(inputs, templatePath, lifecycleName) {
|
|
1002
751
|
if (!inputs.projectPath) {
|
|
1003
|
-
return
|
|
752
|
+
return teamsfx_api_1.err(error_1.InvalidInputError("invalid projectPath", inputs));
|
|
1004
753
|
}
|
|
1005
754
|
const projectPath = inputs.projectPath;
|
|
1006
755
|
if (!inputs.env) {
|
|
1007
|
-
return
|
|
756
|
+
return teamsfx_api_1.err(error_1.InvalidInputError("invalid env", inputs));
|
|
1008
757
|
}
|
|
1009
758
|
const env = inputs.env;
|
|
1010
759
|
const lifecycleName_ = lifecycleName;
|
|
1011
760
|
const result = await envUtil_1.envUtil.readEnv(projectPath, env);
|
|
1012
761
|
if (result.isErr()) {
|
|
1013
|
-
return
|
|
762
|
+
return teamsfx_api_1.err(result.error);
|
|
1014
763
|
}
|
|
1015
764
|
const parser = new parser_1.YamlParser();
|
|
1016
765
|
const maybeProjectModel = await parser.parse(templatePath);
|
|
1017
766
|
if (maybeProjectModel.isErr()) {
|
|
1018
|
-
return
|
|
767
|
+
return teamsfx_api_1.err(maybeProjectModel.error);
|
|
1019
768
|
}
|
|
1020
769
|
const projectModel = maybeProjectModel.value;
|
|
1021
770
|
const driverContext = {
|
|
@@ -1034,7 +783,7 @@ class FxCore {
|
|
|
1034
783
|
}
|
|
1035
784
|
else {
|
|
1036
785
|
driverContext.logProvider.warning(`No definition found for ${lifecycleName}`);
|
|
1037
|
-
return
|
|
786
|
+
return teamsfx_api_1.ok(undefined);
|
|
1038
787
|
}
|
|
1039
788
|
}
|
|
1040
789
|
async runLifecycle(lifecycle, driverContext, env) {
|
|
@@ -1049,7 +798,7 @@ class FxCore {
|
|
|
1049
798
|
const error = runResult.error;
|
|
1050
799
|
if (error.kind === "Failure") {
|
|
1051
800
|
driverContext.logProvider.error(`Failed to run ${lifecycle.name} due to ${error.error.name}: ${error.error.message}`);
|
|
1052
|
-
return
|
|
801
|
+
return teamsfx_api_1.err(error.error);
|
|
1053
802
|
}
|
|
1054
803
|
else {
|
|
1055
804
|
try {
|
|
@@ -1057,11 +806,11 @@ class FxCore {
|
|
|
1057
806
|
if (error.reason.kind === "UnresolvedPlaceholders") {
|
|
1058
807
|
const unresolved = error.reason.unresolvedPlaceHolders;
|
|
1059
808
|
driverContext.logProvider.warning(`Unresolved placeholders: ${unresolved.join(",")} for driver ${failedDriver.uses}`);
|
|
1060
|
-
return
|
|
809
|
+
return teamsfx_api_1.ok(undefined);
|
|
1061
810
|
}
|
|
1062
811
|
else {
|
|
1063
812
|
driverContext.logProvider.error(`Failed to run ${lifecycle.name} due to ${error.reason.error.name}: ${error.reason.error.message}. Failed driver: ${failedDriver.uses}`);
|
|
1064
|
-
return
|
|
813
|
+
return teamsfx_api_1.err(error.reason.error);
|
|
1065
814
|
}
|
|
1066
815
|
}
|
|
1067
816
|
finally {
|
|
@@ -1071,61 +820,67 @@ class FxCore {
|
|
|
1071
820
|
}
|
|
1072
821
|
}
|
|
1073
822
|
async preProvisionForVS(inputs) {
|
|
1074
|
-
const context =
|
|
823
|
+
const context = utils_2.createDriverContext(inputs);
|
|
1075
824
|
return coordinator_1.coordinator.preProvisionForVS(context, inputs);
|
|
1076
825
|
}
|
|
1077
826
|
async preCheckYmlAndEnvForVS(inputs) {
|
|
1078
|
-
const context =
|
|
827
|
+
const context = utils_2.createDriverContext(inputs);
|
|
1079
828
|
const result = await coordinator_1.coordinator.preCheckYmlAndEnvForVS(context, inputs);
|
|
1080
829
|
return result;
|
|
1081
830
|
}
|
|
1082
831
|
async publishInDeveloperPortal(inputs) {
|
|
1083
832
|
inputs.stage = teamsfx_api_1.Stage.publishInDeveloperPortal;
|
|
1084
|
-
const context =
|
|
833
|
+
const context = utils_2.createContextV3();
|
|
1085
834
|
return await coordinator_1.coordinator.publishInDeveloperPortal(context, inputs);
|
|
1086
835
|
}
|
|
1087
836
|
async copilotPluginAddAPI(inputs) {
|
|
1088
|
-
|
|
1089
|
-
const
|
|
1090
|
-
const
|
|
1091
|
-
const
|
|
1092
|
-
const
|
|
837
|
+
var _a, _b;
|
|
838
|
+
const newOperations = inputs[questionNames_1.QuestionNames.ApiOperation];
|
|
839
|
+
const url = (_a = inputs[questionNames_1.QuestionNames.ApiSpecLocation]) !== null && _a !== void 0 ? _a : (_b = inputs.openAIPluginManifest) === null || _b === void 0 ? void 0 : _b.api.url;
|
|
840
|
+
const manifestPath = inputs[questionNames_1.QuestionNames.ManifestPath];
|
|
841
|
+
const isPlugin = inputs[questionNames_1.QuestionNames.Capabilities] === constants_3.copilotPluginApiSpecOptionId;
|
|
842
|
+
const context = utils_2.createContextV3();
|
|
1093
843
|
// Get API spec file path from manifest
|
|
1094
844
|
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
|
|
1095
845
|
if (manifestRes.isErr()) {
|
|
1096
|
-
return
|
|
846
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
1097
847
|
}
|
|
1098
|
-
const confirmRes = await context.userInteraction.showMessage("warn",
|
|
848
|
+
const confirmRes = await context.userInteraction.showMessage("warn", localizeUtils_1.getLocalizedString("core.addApi.confirm", teamsfx_api_1.AppPackageFolderName), true, localizeUtils_1.getLocalizedString("core.addApi.continue"));
|
|
1099
849
|
if (confirmRes.isErr()) {
|
|
1100
|
-
return
|
|
850
|
+
return teamsfx_api_1.err(confirmRes.error);
|
|
1101
851
|
}
|
|
1102
|
-
else if (confirmRes.value !==
|
|
1103
|
-
return
|
|
852
|
+
else if (confirmRes.value !== localizeUtils_1.getLocalizedString("core.addApi.continue")) {
|
|
853
|
+
return teamsfx_api_1.err(new common_2.UserCancelError());
|
|
1104
854
|
}
|
|
1105
855
|
// Merge existing operations in manifest.json
|
|
1106
|
-
const specParser = new m365_spec_parser_1.SpecParser(url,
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
else {
|
|
1120
|
-
const existingOperationIds = ManifestUtils_1.manifestUtils.getOperationIds(manifestRes.value);
|
|
1121
|
-
existingOperations = apiResultList
|
|
1122
|
-
.filter((operation) => existingOperationIds.includes(operation.operationId))
|
|
1123
|
-
.map((operation) => operation.api);
|
|
1124
|
-
const apiSpecificationFile = manifestRes.value.composeExtensions[0].apiSpecificationFile;
|
|
1125
|
-
outputApiSpecPath = path.join(path.dirname(manifestPath), apiSpecificationFile);
|
|
856
|
+
const specParser = new m365_spec_parser_1.SpecParser(url, isPlugin
|
|
857
|
+
? helper_1.copilotPluginParserOptions
|
|
858
|
+
: {
|
|
859
|
+
allowBearerTokenAuth: true,
|
|
860
|
+
allowMultipleParameters: true,
|
|
861
|
+
});
|
|
862
|
+
const listResult = await specParser.list();
|
|
863
|
+
const apiResultList = listResult.APIs.filter((value) => value.isValid);
|
|
864
|
+
let existingOperations;
|
|
865
|
+
let outputApiSpecPath;
|
|
866
|
+
if (isPlugin) {
|
|
867
|
+
if (!inputs[questionNames_1.QuestionNames.DestinationApiSpecFilePath]) {
|
|
868
|
+
return teamsfx_api_1.err(new common_2.MissingRequiredInputError(questionNames_1.QuestionNames.DestinationApiSpecFilePath));
|
|
1126
869
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
870
|
+
outputApiSpecPath = inputs[questionNames_1.QuestionNames.DestinationApiSpecFilePath];
|
|
871
|
+
existingOperations = await helper_1.listPluginExistingOperations(manifestRes.value, manifestPath, inputs[questionNames_1.QuestionNames.DestinationApiSpecFilePath]);
|
|
872
|
+
}
|
|
873
|
+
else {
|
|
874
|
+
const existingOperationIds = ManifestUtils_1.manifestUtils.getOperationIds(manifestRes.value);
|
|
875
|
+
existingOperations = apiResultList
|
|
876
|
+
.filter((operation) => existingOperationIds.includes(operation.operationId))
|
|
877
|
+
.map((operation) => operation.api);
|
|
878
|
+
const apiSpecificationFile = manifestRes.value.composeExtensions[0].apiSpecificationFile;
|
|
879
|
+
outputApiSpecPath = path.join(path.dirname(manifestPath), apiSpecificationFile);
|
|
880
|
+
}
|
|
881
|
+
const operations = [...existingOperations, ...newOperations];
|
|
882
|
+
const adaptiveCardFolder = path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ResponseTemplatesFolderName);
|
|
883
|
+
try {
|
|
1129
884
|
const authNames = new Set();
|
|
1130
885
|
const serverUrls = new Set();
|
|
1131
886
|
let authScheme = undefined;
|
|
@@ -1164,72 +919,81 @@ class FxCore {
|
|
|
1164
919
|
}
|
|
1165
920
|
}
|
|
1166
921
|
}
|
|
1167
|
-
let
|
|
1168
|
-
if (isPlugin) {
|
|
922
|
+
let generateResult;
|
|
923
|
+
if (!isPlugin) {
|
|
924
|
+
generateResult = await specParser.generate(manifestPath, operations, outputApiSpecPath, adaptiveCardFolder);
|
|
925
|
+
}
|
|
926
|
+
else {
|
|
1169
927
|
const pluginPathRes = await ManifestUtils_1.manifestUtils.getPluginFilePath(manifestRes.value, manifestPath);
|
|
1170
928
|
if (pluginPathRes.isErr()) {
|
|
1171
|
-
return
|
|
929
|
+
return teamsfx_api_1.err(pluginPathRes.error);
|
|
1172
930
|
}
|
|
1173
|
-
|
|
931
|
+
generateResult = await specParser.generateForCopilot(manifestPath, operations, outputApiSpecPath, pluginPathRes.value);
|
|
1174
932
|
}
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
933
|
+
// Send SpecParser.generate() warnings
|
|
934
|
+
context.telemetryReporter.sendTelemetryEvent(helper_1.specParserGenerateResultTelemetryEvent, {
|
|
935
|
+
[helper_1.specParserGenerateResultAllSuccessTelemetryProperty]: generateResult.allSuccess.toString(),
|
|
936
|
+
[helper_1.specParserGenerateResultWarningsTelemetryProperty]: generateResult.warnings
|
|
937
|
+
.map((w) => w.type.toString() + ": " + w.content)
|
|
938
|
+
.join(";"),
|
|
939
|
+
[telemetry_2.CoreTelemetryProperty.Component]: telemetry_2.CoreTelemetryComponentName,
|
|
1179
940
|
});
|
|
1180
|
-
if (generateResult.
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
if (generateResult.value.warnings && generateResult.value.warnings.length > 0) {
|
|
1184
|
-
const warnSummary = await (0, helper_1.generateScaffoldingSummary)(generateResult.value.warnings, manifestRes.value, path.relative(inputs.projectPath, outputApiSpecPath), pluginPath === undefined ? undefined : path.relative(inputs.projectPath, pluginPath), inputs.projectPath);
|
|
1185
|
-
if (warnSummary) {
|
|
1186
|
-
context.logProvider.info(warnSummary);
|
|
1187
|
-
}
|
|
941
|
+
if (generateResult.warnings && generateResult.warnings.length > 0) {
|
|
942
|
+
const warnSummary = helper_1.generateScaffoldingSummary(generateResult.warnings, manifestRes.value, path.relative(inputs.projectPath, outputApiSpecPath));
|
|
943
|
+
context.logProvider.info(warnSummary);
|
|
1188
944
|
}
|
|
1189
945
|
}
|
|
1190
946
|
catch (e) {
|
|
1191
947
|
let error;
|
|
1192
948
|
if (e instanceof m365_spec_parser_1.SpecParserError) {
|
|
1193
|
-
error =
|
|
949
|
+
error = helper_1.convertSpecParserErrorToFxError(e);
|
|
1194
950
|
}
|
|
1195
951
|
else {
|
|
1196
|
-
error =
|
|
952
|
+
error = common_2.assembleError(e);
|
|
1197
953
|
}
|
|
1198
|
-
return
|
|
954
|
+
return teamsfx_api_1.err(error);
|
|
1199
955
|
}
|
|
1200
|
-
const message =
|
|
956
|
+
const message = localizeUtils_1.getLocalizedString("core.copilot.addAPI.success", newOperations, inputs.projectPath);
|
|
1201
957
|
if (inputs.platform !== teamsfx_api_1.Platform.VS) {
|
|
1202
958
|
void context.userInteraction.showMessage("info", message, false);
|
|
1203
959
|
}
|
|
1204
|
-
return
|
|
960
|
+
return teamsfx_api_1.ok(message);
|
|
1205
961
|
}
|
|
1206
962
|
async listPluginApiSpecs(inputs) {
|
|
1207
963
|
try {
|
|
1208
|
-
const manifestPath = inputs[
|
|
964
|
+
const manifestPath = inputs[questionNames_1.QuestionNames.ManifestPath];
|
|
1209
965
|
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
|
|
1210
966
|
if (manifestRes.isErr()) {
|
|
1211
|
-
return
|
|
967
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
1212
968
|
}
|
|
1213
969
|
const res = await PluginManifestUtils_1.pluginManifestUtils.getApiSpecFilePathFromTeamsManifest(manifestRes.value, manifestPath);
|
|
1214
970
|
if (res.isOk()) {
|
|
1215
|
-
return
|
|
971
|
+
return teamsfx_api_1.ok(res.value);
|
|
1216
972
|
}
|
|
1217
973
|
else {
|
|
1218
|
-
return
|
|
974
|
+
return teamsfx_api_1.err(res.error);
|
|
1219
975
|
}
|
|
1220
976
|
}
|
|
1221
977
|
catch (error) {
|
|
1222
|
-
return
|
|
978
|
+
return teamsfx_api_1.err(error);
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
async copilotPluginLoadOpenAIManifest(inputs) {
|
|
982
|
+
try {
|
|
983
|
+
return teamsfx_api_1.ok(await helper_1.OpenAIPluginManifestHelper.loadOpenAIPluginManifest(inputs.domain));
|
|
984
|
+
}
|
|
985
|
+
catch (error) {
|
|
986
|
+
return teamsfx_api_1.err(error);
|
|
1223
987
|
}
|
|
1224
988
|
}
|
|
1225
989
|
async copilotPluginListOperations(inputs) {
|
|
1226
|
-
const res = await
|
|
990
|
+
const res = await helper_1.listOperations(utils_2.createContextV3(), inputs.manifest, inputs.apiSpecUrl, inputs, inputs.includeExistingAPIs, inputs.shouldLogWarning);
|
|
1227
991
|
if (res.isErr()) {
|
|
1228
992
|
const msg = res.error.map((e) => e.content).join("\n");
|
|
1229
|
-
return
|
|
993
|
+
return teamsfx_api_1.err(new teamsfx_api_1.UserError("FxCore", "ListOpenAPISpecOperationsError", msg, msg));
|
|
1230
994
|
}
|
|
1231
995
|
else {
|
|
1232
|
-
return
|
|
996
|
+
return teamsfx_api_1.ok(res.value);
|
|
1233
997
|
}
|
|
1234
998
|
}
|
|
1235
999
|
/**
|
|
@@ -1239,126 +1003,160 @@ class FxCore {
|
|
|
1239
1003
|
var _a;
|
|
1240
1004
|
const projectTypeRes = await projectTypeChecker_1.projectTypeChecker.checkProjectType(projectPath);
|
|
1241
1005
|
const props = {};
|
|
1242
|
-
telemetry_1.
|
|
1006
|
+
telemetry_1.fillinProjectTypeProperties(props, projectTypeRes);
|
|
1243
1007
|
(_a = globalVars_1.TOOLS.telemetryReporter) === null || _a === void 0 ? void 0 : _a.sendTelemetryEvent(telemetry_1.TelemetryEvent.ProjectType, props);
|
|
1244
|
-
return
|
|
1008
|
+
return teamsfx_api_1.ok(projectTypeRes);
|
|
1245
1009
|
}
|
|
1246
1010
|
/**
|
|
1247
1011
|
* Add plugin
|
|
1248
1012
|
*/
|
|
1249
1013
|
async addPlugin(inputs) {
|
|
1250
|
-
var _a, _b, _c;
|
|
1014
|
+
var _a, _b, _c, _d;
|
|
1251
1015
|
if (!inputs.projectPath) {
|
|
1252
1016
|
throw new Error("projectPath is undefined"); // should never happen
|
|
1253
1017
|
}
|
|
1254
|
-
const
|
|
1255
|
-
const
|
|
1256
|
-
const
|
|
1257
|
-
const
|
|
1018
|
+
const operations = inputs[questionNames_1.QuestionNames.ApiOperation];
|
|
1019
|
+
const url = inputs[questionNames_1.QuestionNames.ApiSpecLocation];
|
|
1020
|
+
const manifestPath = inputs[questionNames_1.QuestionNames.ManifestPath];
|
|
1021
|
+
const appPackageFolder = path.dirname(manifestPath);
|
|
1022
|
+
const apiSpecFolder = path.join(appPackageFolder, helper_1.defaultApiSpecFolderName);
|
|
1023
|
+
const needAddAction = inputs[questionNames_1.QuestionNames.PluginAvailability] === other_1.PluginAvailabilityOptions.action().id ||
|
|
1024
|
+
inputs[questionNames_1.QuestionNames.PluginAvailability] ===
|
|
1025
|
+
other_1.PluginAvailabilityOptions.copilotPluginAndAction().id;
|
|
1026
|
+
const needAddCopilotPlugin = inputs[questionNames_1.QuestionNames.PluginAvailability] === other_1.PluginAvailabilityOptions.copilotPlugin().id ||
|
|
1027
|
+
inputs[questionNames_1.QuestionNames.PluginAvailability] ===
|
|
1028
|
+
other_1.PluginAvailabilityOptions.copilotPluginAndAction().id;
|
|
1258
1029
|
// validate the project is valid for adding plugin
|
|
1259
|
-
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(
|
|
1030
|
+
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
|
|
1260
1031
|
if (manifestRes.isErr()) {
|
|
1261
|
-
return
|
|
1032
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
1262
1033
|
}
|
|
1263
1034
|
const teamsManifest = manifestRes.value;
|
|
1264
1035
|
const declarativeGpt = (_b = (_a = teamsManifest.copilotExtensions) === null || _a === void 0 ? void 0 : _a.declarativeCopilots) === null || _b === void 0 ? void 0 : _b[0];
|
|
1265
1036
|
if (!(declarativeGpt === null || declarativeGpt === void 0 ? void 0 : declarativeGpt.file)) {
|
|
1266
|
-
return
|
|
1267
|
-
}
|
|
1268
|
-
const gptManifestFilePathRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.getManifestPath(teamsManifestPath);
|
|
1269
|
-
if (gptManifestFilePathRes.isErr()) {
|
|
1270
|
-
return (0, teamsfx_api_1.err)(gptManifestFilePathRes.error);
|
|
1037
|
+
return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("declarativeCopilots", manifestPath)));
|
|
1271
1038
|
}
|
|
1272
|
-
const
|
|
1273
|
-
const
|
|
1274
|
-
if (
|
|
1275
|
-
return
|
|
1039
|
+
const gptManifestFilePath = path.join(appPackageFolder, declarativeGpt.file);
|
|
1040
|
+
const gptManifestRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.readCopilotGptManifestFile(gptManifestFilePath);
|
|
1041
|
+
if (gptManifestRes.isErr()) {
|
|
1042
|
+
return teamsfx_api_1.err(gptManifestRes.error);
|
|
1276
1043
|
}
|
|
1277
|
-
const
|
|
1044
|
+
const gptManifest = gptManifestRes.value;
|
|
1045
|
+
const context = utils_2.createContextV3();
|
|
1278
1046
|
// confirm
|
|
1279
|
-
const confirmRes = await context.userInteraction.showMessage("warn",
|
|
1047
|
+
const confirmRes = await context.userInteraction.showMessage("warn", localizeUtils_1.getLocalizedString("core.addApi.confirm", path.relative(inputs.projectPath, appPackageFolder)), true, localizeUtils_1.getLocalizedString("core.addApi.continue"));
|
|
1280
1048
|
if (confirmRes.isErr()) {
|
|
1281
|
-
return
|
|
1049
|
+
return teamsfx_api_1.err(confirmRes.error);
|
|
1282
1050
|
}
|
|
1283
|
-
else if (confirmRes.value !==
|
|
1284
|
-
return
|
|
1051
|
+
else if (confirmRes.value !== localizeUtils_1.getLocalizedString("core.addApi.continue")) {
|
|
1052
|
+
return teamsfx_api_1.err(new common_2.UserCancelError());
|
|
1285
1053
|
}
|
|
1286
|
-
//
|
|
1287
|
-
let
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
const existingActionIds = (_c = declarativeCopilotManifest.actions) === null || _c === void 0 ? void 0 : _c.map((action) => action.id);
|
|
1291
|
-
while (existingActionIds === null || existingActionIds === void 0 ? void 0 : existingActionIds.includes(actionId)) {
|
|
1292
|
-
suffix += 1;
|
|
1293
|
-
actionId = `action_${suffix}`;
|
|
1054
|
+
// generate file path
|
|
1055
|
+
let isYaml;
|
|
1056
|
+
try {
|
|
1057
|
+
isYaml = await helper_1.isYamlSpecFile(url);
|
|
1294
1058
|
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1059
|
+
catch (e) {
|
|
1060
|
+
isYaml = false;
|
|
1061
|
+
}
|
|
1062
|
+
await fs_extra_1.default.ensureDir(apiSpecFolder);
|
|
1063
|
+
let openApiSpecFileName = isYaml ? helper_1.defaultApiSpecYamlFileName : helper_1.defaultApiSpecJsonFileName;
|
|
1064
|
+
const openApiSpecFileNamePrefix = openApiSpecFileName.split(".")[0];
|
|
1065
|
+
const openApiSpecFileType = openApiSpecFileName.split(".")[1];
|
|
1066
|
+
let apiSpecFileNameSuffix = 1;
|
|
1067
|
+
while (await fs_extra_1.default.pathExists(path.join(apiSpecFolder, openApiSpecFileName))) {
|
|
1068
|
+
openApiSpecFileName = `${openApiSpecFileNamePrefix}_${apiSpecFileNameSuffix++}.${openApiSpecFileType}`;
|
|
1069
|
+
}
|
|
1070
|
+
const openApiSpecFilePath = path.join(apiSpecFolder, openApiSpecFileName);
|
|
1071
|
+
let pluginManifestName = helper_1.defaultPluginManifestFileName;
|
|
1072
|
+
const pluginManifestNamePrefix = helper_1.defaultPluginManifestFileName.split(".")[0];
|
|
1073
|
+
let pluginFileNameSuffix = 1;
|
|
1074
|
+
while (await fs_extra_1.default.pathExists(path.join(appPackageFolder, pluginManifestName))) {
|
|
1075
|
+
pluginManifestName = `${pluginManifestNamePrefix}_${pluginFileNameSuffix++}.json`;
|
|
1076
|
+
}
|
|
1077
|
+
const pluginManifestFilePath = path.join(appPackageFolder, pluginManifestName);
|
|
1078
|
+
// generate plugin related files
|
|
1079
|
+
const specParser = new m365_spec_parser_1.SpecParser(url, Object.assign(Object.assign({}, helper_1.copilotPluginParserOptions), { isGptPlugin: true }));
|
|
1080
|
+
try {
|
|
1081
|
+
const generateResult = await specParser.generateForCopilot(manifestPath, operations, openApiSpecFilePath, pluginManifestFilePath);
|
|
1082
|
+
// Send SpecParser.generate() warnings
|
|
1083
|
+
context.telemetryReporter.sendTelemetryEvent(helper_1.specParserGenerateResultTelemetryEvent, {
|
|
1084
|
+
[helper_1.specParserGenerateResultAllSuccessTelemetryProperty]: generateResult.allSuccess.toString(),
|
|
1085
|
+
[helper_1.specParserGenerateResultWarningsTelemetryProperty]: generateResult.warnings
|
|
1086
|
+
.map((w) => w.type.toString() + ": " + w.content)
|
|
1087
|
+
.join(";"),
|
|
1088
|
+
[telemetry_2.CoreTelemetryProperty.Component]: telemetry_2.CoreTelemetryComponentName,
|
|
1306
1089
|
});
|
|
1307
|
-
if (
|
|
1308
|
-
|
|
1090
|
+
if (generateResult.warnings && generateResult.warnings.length > 0) {
|
|
1091
|
+
const warnSummary = helper_1.generateScaffoldingSummary(generateResult.warnings, manifestRes.value, path.relative(inputs.projectPath, openApiSpecFilePath));
|
|
1092
|
+
context.logProvider.info(warnSummary);
|
|
1309
1093
|
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1094
|
+
}
|
|
1095
|
+
catch (e) {
|
|
1096
|
+
let error;
|
|
1097
|
+
if (e instanceof m365_spec_parser_1.SpecParserError) {
|
|
1098
|
+
error = helper_1.convertSpecParserErrorToFxError(e);
|
|
1314
1099
|
}
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1100
|
+
else {
|
|
1101
|
+
error = common_2.assembleError(e);
|
|
1102
|
+
}
|
|
1103
|
+
return teamsfx_api_1.err(error);
|
|
1104
|
+
}
|
|
1105
|
+
// update Teams manifest
|
|
1106
|
+
if (needAddCopilotPlugin) {
|
|
1107
|
+
const plugins = ((_c = teamsManifest.copilotExtensions) === null || _c === void 0 ? void 0 : _c.plugins) || [];
|
|
1108
|
+
plugins.push({
|
|
1109
|
+
id: "plugin_1",
|
|
1110
|
+
file: pluginManifestName,
|
|
1111
|
+
});
|
|
1112
|
+
teamsManifest.copilotExtensions = Object.assign(Object.assign({}, teamsManifest.copilotExtensions), { plugins });
|
|
1113
|
+
const updateManifestRes = await ManifestUtils_1.manifestUtils._writeAppManifest(teamsManifest, manifestPath);
|
|
1114
|
+
if (updateManifestRes.isErr()) {
|
|
1115
|
+
return teamsfx_api_1.err(updateManifestRes.error);
|
|
1318
1116
|
}
|
|
1319
1117
|
}
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1118
|
+
// update GPT manifest
|
|
1119
|
+
let actionId = "";
|
|
1120
|
+
if (needAddAction) {
|
|
1121
|
+
let suffix = 1;
|
|
1122
|
+
actionId = `action_${suffix}`;
|
|
1123
|
+
const existingActionIds = (_d = gptManifest.actions) === null || _d === void 0 ? void 0 : _d.map((action) => action.id);
|
|
1124
|
+
while (existingActionIds === null || existingActionIds === void 0 ? void 0 : existingActionIds.includes(actionId)) {
|
|
1125
|
+
suffix += 1;
|
|
1126
|
+
actionId = `action_${suffix}`;
|
|
1127
|
+
}
|
|
1128
|
+
const addActionRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addAction(gptManifestFilePath, actionId, pluginManifestName);
|
|
1129
|
+
if (addActionRes.isErr()) {
|
|
1130
|
+
return teamsfx_api_1.err(addActionRes.error);
|
|
1324
1131
|
}
|
|
1325
|
-
destinationPluginManifestPath = addPluginRes.value.destinationPluginManifestPath;
|
|
1326
|
-
const warningMessage = (0, common_1.outputScaffoldingWarningMessage)(addPluginRes.value.warnings);
|
|
1327
|
-
context.logProvider.info(warningMessage);
|
|
1328
|
-
}
|
|
1329
|
-
if (inputs.platform === teamsfx_api_1.Platform.VSCode) {
|
|
1330
|
-
const successMessage = (0, localizeUtils_1.getLocalizedString)("core.addPlugin.success.vsc", actionId);
|
|
1331
|
-
const viewPluginManifest = (0, localizeUtils_1.getLocalizedString)("core.addPlugin.success.viewPluginManifest");
|
|
1332
|
-
void context.userInteraction
|
|
1333
|
-
.showMessage("info", successMessage, false, viewPluginManifest)
|
|
1334
|
-
.then((userRes) => {
|
|
1335
|
-
var _a, _b;
|
|
1336
|
-
if (userRes.isOk() && userRes.value === viewPluginManifest) {
|
|
1337
|
-
context.telemetryReporter.sendTelemetryEvent(telemetry_1.TelemetryEvent.ViewPluginManifestAfterAdded);
|
|
1338
|
-
void ((_b = (_a = globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui) === null || _a === void 0 ? void 0 : _a.openFile) === null || _b === void 0 ? void 0 : _b.call(_a, destinationPluginManifestPath));
|
|
1339
|
-
}
|
|
1340
|
-
});
|
|
1341
1132
|
}
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1133
|
+
let successMessage = "";
|
|
1134
|
+
if (needAddAction && needAddCopilotPlugin) {
|
|
1135
|
+
successMessage = localizeUtils_1.getLocalizedString("core.addActionAndPlugin.success", actionId, "plugin_1");
|
|
1136
|
+
}
|
|
1137
|
+
else if (needAddAction) {
|
|
1138
|
+
successMessage = localizeUtils_1.getLocalizedString("core.addAction.success", actionId);
|
|
1345
1139
|
}
|
|
1346
|
-
|
|
1140
|
+
else if (needAddCopilotPlugin) {
|
|
1141
|
+
successMessage = localizeUtils_1.getLocalizedString("core.addPlugin.success", "plugin_1");
|
|
1142
|
+
}
|
|
1143
|
+
void context.userInteraction.showMessage("info", successMessage, false);
|
|
1144
|
+
return teamsfx_api_1.ok(undefined);
|
|
1347
1145
|
}
|
|
1348
1146
|
}
|
|
1349
1147
|
tslib_1.__decorate([
|
|
1350
|
-
|
|
1351
|
-
|
|
1148
|
+
hooks_1.hooks([
|
|
1149
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createProject", reset: true }),
|
|
1352
1150
|
errorHandler_1.ErrorHandlerMW,
|
|
1353
|
-
|
|
1151
|
+
questionMW_1.QuestionMW("createProject"),
|
|
1354
1152
|
]),
|
|
1355
1153
|
tslib_1.__metadata("design:type", Function),
|
|
1356
1154
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1357
1155
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1358
1156
|
], FxCore.prototype, "createProject", null);
|
|
1359
1157
|
tslib_1.__decorate([
|
|
1360
|
-
|
|
1361
|
-
|
|
1158
|
+
hooks_1.hooks([
|
|
1159
|
+
globalVars_1.ErrorContextMW({
|
|
1362
1160
|
component: "FxCore",
|
|
1363
1161
|
stage: "createProjectByCustomizedGenerator",
|
|
1364
1162
|
reset: true,
|
|
@@ -1370,21 +1168,21 @@ tslib_1.__decorate([
|
|
|
1370
1168
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1371
1169
|
], FxCore.prototype, "createProjectByCustomizedGenerator", null);
|
|
1372
1170
|
tslib_1.__decorate([
|
|
1373
|
-
|
|
1374
|
-
|
|
1171
|
+
hooks_1.hooks([
|
|
1172
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createSampleProject", reset: true }),
|
|
1375
1173
|
errorHandler_1.ErrorHandlerMW,
|
|
1376
|
-
|
|
1174
|
+
questionMW_1.QuestionMW("createSampleProject"),
|
|
1377
1175
|
]),
|
|
1378
1176
|
tslib_1.__metadata("design:type", Function),
|
|
1379
1177
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1380
1178
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1381
1179
|
], FxCore.prototype, "createSampleProject", null);
|
|
1382
1180
|
tslib_1.__decorate([
|
|
1383
|
-
|
|
1384
|
-
|
|
1181
|
+
hooks_1.hooks([
|
|
1182
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "provision", reset: true }),
|
|
1385
1183
|
errorHandler_1.ErrorHandlerMW,
|
|
1386
1184
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1387
|
-
|
|
1185
|
+
envMW_1.EnvLoaderMW(false),
|
|
1388
1186
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1389
1187
|
contextInjector_1.ContextInjectorMW,
|
|
1390
1188
|
envMW_1.EnvWriterMW,
|
|
@@ -1394,80 +1192,11 @@ tslib_1.__decorate([
|
|
|
1394
1192
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1395
1193
|
], FxCore.prototype, "provisionResources", null);
|
|
1396
1194
|
tslib_1.__decorate([
|
|
1397
|
-
|
|
1398
|
-
|
|
1195
|
+
hooks_1.hooks([
|
|
1196
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "deploy", reset: true }),
|
|
1399
1197
|
errorHandler_1.ErrorHandlerMW,
|
|
1400
1198
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1401
|
-
|
|
1402
|
-
]),
|
|
1403
|
-
tslib_1.__metadata("design:type", Function),
|
|
1404
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1405
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1406
|
-
], FxCore.prototype, "uninstall", null);
|
|
1407
|
-
tslib_1.__decorate([
|
|
1408
|
-
(0, hooks_1.hooks)([
|
|
1409
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstallByManifestId", reset: true }),
|
|
1410
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1411
|
-
]),
|
|
1412
|
-
tslib_1.__metadata("design:type", Function),
|
|
1413
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1414
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1415
|
-
], FxCore.prototype, "uninstallByManifestId", null);
|
|
1416
|
-
tslib_1.__decorate([
|
|
1417
|
-
(0, hooks_1.hooks)([
|
|
1418
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstallByEnv", reset: true }),
|
|
1419
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1420
|
-
(0, envMW_1.EnvLoaderMW)(true, true),
|
|
1421
|
-
concurrentLocker_1.ConcurrentLockerMW,
|
|
1422
|
-
contextInjector_1.ContextInjectorMW,
|
|
1423
|
-
envMW_1.EnvWriterMW,
|
|
1424
|
-
]),
|
|
1425
|
-
tslib_1.__metadata("design:type", Function),
|
|
1426
|
-
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
1427
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1428
|
-
], FxCore.prototype, "uninstallByEnv", null);
|
|
1429
|
-
tslib_1.__decorate([
|
|
1430
|
-
(0, hooks_1.hooks)([
|
|
1431
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstallByTitleId", reset: true }),
|
|
1432
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1433
|
-
]),
|
|
1434
|
-
tslib_1.__metadata("design:type", Function),
|
|
1435
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1436
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1437
|
-
], FxCore.prototype, "uninstallByTitleId", null);
|
|
1438
|
-
tslib_1.__decorate([
|
|
1439
|
-
(0, hooks_1.hooks)([
|
|
1440
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstallM365App", reset: true }),
|
|
1441
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1442
|
-
]),
|
|
1443
|
-
tslib_1.__metadata("design:type", Function),
|
|
1444
|
-
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
1445
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1446
|
-
], FxCore.prototype, "uninstallM365App", null);
|
|
1447
|
-
tslib_1.__decorate([
|
|
1448
|
-
(0, hooks_1.hooks)([
|
|
1449
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstallAppRegistration", reset: true }),
|
|
1450
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1451
|
-
]),
|
|
1452
|
-
tslib_1.__metadata("design:type", Function),
|
|
1453
|
-
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1454
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1455
|
-
], FxCore.prototype, "uninstallAppRegistration", null);
|
|
1456
|
-
tslib_1.__decorate([
|
|
1457
|
-
(0, hooks_1.hooks)([
|
|
1458
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "uninstallBotFrameworRegistration", reset: true }),
|
|
1459
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1460
|
-
]),
|
|
1461
|
-
tslib_1.__metadata("design:type", Function),
|
|
1462
|
-
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
1463
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1464
|
-
], FxCore.prototype, "uninstallBotFrameworRegistration", null);
|
|
1465
|
-
tslib_1.__decorate([
|
|
1466
|
-
(0, hooks_1.hooks)([
|
|
1467
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "deploy", reset: true }),
|
|
1468
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1469
|
-
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1470
|
-
(0, envMW_1.EnvLoaderMW)(false),
|
|
1199
|
+
envMW_1.EnvLoaderMW(false),
|
|
1471
1200
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1472
1201
|
contextInjector_1.ContextInjectorMW,
|
|
1473
1202
|
envMW_1.EnvWriterMW,
|
|
@@ -1477,18 +1206,18 @@ tslib_1.__decorate([
|
|
|
1477
1206
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1478
1207
|
], FxCore.prototype, "deployArtifacts", null);
|
|
1479
1208
|
tslib_1.__decorate([
|
|
1480
|
-
|
|
1209
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "localDebug", reset: true })]),
|
|
1481
1210
|
tslib_1.__metadata("design:type", Function),
|
|
1482
1211
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1483
1212
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1484
1213
|
], FxCore.prototype, "localDebug", null);
|
|
1485
1214
|
tslib_1.__decorate([
|
|
1486
|
-
|
|
1487
|
-
|
|
1215
|
+
hooks_1.hooks([
|
|
1216
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "deployAadManifest", reset: true }),
|
|
1488
1217
|
errorHandler_1.ErrorHandlerMW,
|
|
1489
1218
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1490
|
-
|
|
1491
|
-
|
|
1219
|
+
questionMW_1.QuestionMW("deployAadManifest"),
|
|
1220
|
+
envMW_1.EnvLoaderMW(true, true),
|
|
1492
1221
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1493
1222
|
contextInjector_1.ContextInjectorMW,
|
|
1494
1223
|
]),
|
|
@@ -1497,10 +1226,10 @@ tslib_1.__decorate([
|
|
|
1497
1226
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1498
1227
|
], FxCore.prototype, "deployAadManifest", null);
|
|
1499
1228
|
tslib_1.__decorate([
|
|
1500
|
-
|
|
1501
|
-
|
|
1229
|
+
hooks_1.hooks([
|
|
1230
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "addWebpart", reset: true }),
|
|
1502
1231
|
errorHandler_1.ErrorHandlerMW,
|
|
1503
|
-
|
|
1232
|
+
questionMW_1.QuestionMW("addWebpart"),
|
|
1504
1233
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1505
1234
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1506
1235
|
]),
|
|
@@ -1509,11 +1238,11 @@ tslib_1.__decorate([
|
|
|
1509
1238
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1510
1239
|
], FxCore.prototype, "addWebpart", null);
|
|
1511
1240
|
tslib_1.__decorate([
|
|
1512
|
-
|
|
1513
|
-
|
|
1241
|
+
hooks_1.hooks([
|
|
1242
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "publish", reset: true }),
|
|
1514
1243
|
errorHandler_1.ErrorHandlerMW,
|
|
1515
1244
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1516
|
-
|
|
1245
|
+
envMW_1.EnvLoaderMW(false),
|
|
1517
1246
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1518
1247
|
contextInjector_1.ContextInjectorMW,
|
|
1519
1248
|
envMW_1.EnvWriterMW,
|
|
@@ -1523,11 +1252,11 @@ tslib_1.__decorate([
|
|
|
1523
1252
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1524
1253
|
], FxCore.prototype, "publishApplication", null);
|
|
1525
1254
|
tslib_1.__decorate([
|
|
1526
|
-
|
|
1527
|
-
|
|
1255
|
+
hooks_1.hooks([
|
|
1256
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "executeUserTask", reset: true }),
|
|
1528
1257
|
errorHandler_1.ErrorHandlerMW,
|
|
1529
1258
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1530
|
-
|
|
1259
|
+
envMW_1.EnvLoaderMW(false),
|
|
1531
1260
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1532
1261
|
]),
|
|
1533
1262
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1535,11 +1264,11 @@ tslib_1.__decorate([
|
|
|
1535
1264
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1536
1265
|
], FxCore.prototype, "executeUserTask", null);
|
|
1537
1266
|
tslib_1.__decorate([
|
|
1538
|
-
|
|
1539
|
-
|
|
1267
|
+
hooks_1.hooks([
|
|
1268
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "buildAadManifest", reset: true }),
|
|
1540
1269
|
errorHandler_1.ErrorHandlerMW,
|
|
1541
1270
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1542
|
-
|
|
1271
|
+
envMW_1.EnvLoaderMW(false),
|
|
1543
1272
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1544
1273
|
]),
|
|
1545
1274
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1547,12 +1276,12 @@ tslib_1.__decorate([
|
|
|
1547
1276
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1548
1277
|
], FxCore.prototype, "buildAadManifest", null);
|
|
1549
1278
|
tslib_1.__decorate([
|
|
1550
|
-
|
|
1551
|
-
|
|
1279
|
+
hooks_1.hooks([
|
|
1280
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "deployTeamsManifest", reset: true }),
|
|
1552
1281
|
errorHandler_1.ErrorHandlerMW,
|
|
1553
1282
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1554
|
-
|
|
1555
|
-
|
|
1283
|
+
questionMW_1.QuestionMW("selectTeamsAppManifest"),
|
|
1284
|
+
envMW_1.EnvLoaderMW(true),
|
|
1556
1285
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1557
1286
|
contextInjector_1.ContextInjectorMW,
|
|
1558
1287
|
envMW_1.EnvWriterMW,
|
|
@@ -1562,8 +1291,8 @@ tslib_1.__decorate([
|
|
|
1562
1291
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1563
1292
|
], FxCore.prototype, "deployTeamsManifest", null);
|
|
1564
1293
|
tslib_1.__decorate([
|
|
1565
|
-
|
|
1566
|
-
|
|
1294
|
+
hooks_1.hooks([
|
|
1295
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "updateTeamsAppCLIV3", reset: true }),
|
|
1567
1296
|
errorHandler_1.ErrorHandlerMW,
|
|
1568
1297
|
]),
|
|
1569
1298
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1571,8 +1300,8 @@ tslib_1.__decorate([
|
|
|
1571
1300
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1572
1301
|
], FxCore.prototype, "updateTeamsAppCLIV3", null);
|
|
1573
1302
|
tslib_1.__decorate([
|
|
1574
|
-
|
|
1575
|
-
|
|
1303
|
+
hooks_1.hooks([
|
|
1304
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateTeamsAppCLIV3", reset: true }),
|
|
1576
1305
|
errorHandler_1.ErrorHandlerMW,
|
|
1577
1306
|
]),
|
|
1578
1307
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1580,8 +1309,8 @@ tslib_1.__decorate([
|
|
|
1580
1309
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1581
1310
|
], FxCore.prototype, "validateTeamsAppCLIV3", null);
|
|
1582
1311
|
tslib_1.__decorate([
|
|
1583
|
-
|
|
1584
|
-
|
|
1312
|
+
hooks_1.hooks([
|
|
1313
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "packageTeamsAppCLIV3", reset: true }),
|
|
1585
1314
|
errorHandler_1.ErrorHandlerMW,
|
|
1586
1315
|
]),
|
|
1587
1316
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1589,8 +1318,8 @@ tslib_1.__decorate([
|
|
|
1589
1318
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1590
1319
|
], FxCore.prototype, "packageTeamsAppCLIV3", null);
|
|
1591
1320
|
tslib_1.__decorate([
|
|
1592
|
-
|
|
1593
|
-
|
|
1321
|
+
hooks_1.hooks([
|
|
1322
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "publishTeamsAppCLIV3", reset: true }),
|
|
1594
1323
|
errorHandler_1.ErrorHandlerMW,
|
|
1595
1324
|
]),
|
|
1596
1325
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1598,19 +1327,19 @@ tslib_1.__decorate([
|
|
|
1598
1327
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1599
1328
|
], FxCore.prototype, "publishTeamsAppCLIV3", null);
|
|
1600
1329
|
tslib_1.__decorate([
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1330
|
+
hooks_1.hooks([
|
|
1331
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateApplication", reset: true }),
|
|
1332
|
+
questionMW_1.QuestionMW("validateTeamsApp"),
|
|
1604
1333
|
]),
|
|
1605
1334
|
tslib_1.__metadata("design:type", Function),
|
|
1606
1335
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1607
1336
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1608
1337
|
], FxCore.prototype, "validateApplication", null);
|
|
1609
1338
|
tslib_1.__decorate([
|
|
1610
|
-
|
|
1611
|
-
|
|
1339
|
+
hooks_1.hooks([
|
|
1340
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateManifest", reset: true }),
|
|
1612
1341
|
errorHandler_1.ErrorHandlerMW,
|
|
1613
|
-
|
|
1342
|
+
envMW_1.EnvLoaderMW(true),
|
|
1614
1343
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1615
1344
|
]),
|
|
1616
1345
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1618,8 +1347,8 @@ tslib_1.__decorate([
|
|
|
1618
1347
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1619
1348
|
], FxCore.prototype, "validateManifest", null);
|
|
1620
1349
|
tslib_1.__decorate([
|
|
1621
|
-
|
|
1622
|
-
|
|
1350
|
+
hooks_1.hooks([
|
|
1351
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateAppPackage", reset: true }),
|
|
1623
1352
|
errorHandler_1.ErrorHandlerMW,
|
|
1624
1353
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1625
1354
|
]),
|
|
@@ -1628,8 +1357,8 @@ tslib_1.__decorate([
|
|
|
1628
1357
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1629
1358
|
], FxCore.prototype, "validateAppPackage", null);
|
|
1630
1359
|
tslib_1.__decorate([
|
|
1631
|
-
|
|
1632
|
-
|
|
1360
|
+
hooks_1.hooks([
|
|
1361
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "validateWithTestCases", reset: true }),
|
|
1633
1362
|
errorHandler_1.ErrorHandlerMW,
|
|
1634
1363
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1635
1364
|
]),
|
|
@@ -1638,22 +1367,11 @@ tslib_1.__decorate([
|
|
|
1638
1367
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1639
1368
|
], FxCore.prototype, "validateWithTestCases", null);
|
|
1640
1369
|
tslib_1.__decorate([
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
errorHandler_1.ErrorHandlerMW,
|
|
1644
|
-
(0, questionMW_1.QuestionMW)("syncManifest"),
|
|
1645
|
-
concurrentLocker_1.ConcurrentLockerMW,
|
|
1646
|
-
]),
|
|
1647
|
-
tslib_1.__metadata("design:type", Function),
|
|
1648
|
-
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1649
|
-
tslib_1.__metadata("design:returntype", Promise)
|
|
1650
|
-
], FxCore.prototype, "syncManifest", null);
|
|
1651
|
-
tslib_1.__decorate([
|
|
1652
|
-
(0, hooks_1.hooks)([
|
|
1653
|
-
(0, globalVars_1.ErrorContextMW)({ component: "FxCore", stage: "createAppPackage", reset: true }),
|
|
1370
|
+
hooks_1.hooks([
|
|
1371
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createAppPackage", reset: true }),
|
|
1654
1372
|
errorHandler_1.ErrorHandlerMW,
|
|
1655
|
-
|
|
1656
|
-
|
|
1373
|
+
questionMW_1.QuestionMW("selectTeamsAppManifest"),
|
|
1374
|
+
envMW_1.EnvLoaderMW(true),
|
|
1657
1375
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1658
1376
|
]),
|
|
1659
1377
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1661,11 +1379,11 @@ tslib_1.__decorate([
|
|
|
1661
1379
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1662
1380
|
], FxCore.prototype, "createAppPackage", null);
|
|
1663
1381
|
tslib_1.__decorate([
|
|
1664
|
-
|
|
1665
|
-
|
|
1382
|
+
hooks_1.hooks([
|
|
1383
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "preview", reset: true }),
|
|
1666
1384
|
errorHandler_1.ErrorHandlerMW,
|
|
1667
|
-
|
|
1668
|
-
|
|
1385
|
+
questionMW_1.QuestionMW("previewWithTeamsAppManifest"),
|
|
1386
|
+
envMW_1.EnvLoaderMW(false),
|
|
1669
1387
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1670
1388
|
]),
|
|
1671
1389
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1673,8 +1391,8 @@ tslib_1.__decorate([
|
|
|
1673
1391
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1674
1392
|
], FxCore.prototype, "previewWithManifest", null);
|
|
1675
1393
|
tslib_1.__decorate([
|
|
1676
|
-
|
|
1677
|
-
|
|
1394
|
+
hooks_1.hooks([
|
|
1395
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getDotEnvs", reset: true }),
|
|
1678
1396
|
errorHandler_1.ErrorHandlerMW,
|
|
1679
1397
|
]),
|
|
1680
1398
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1682,42 +1400,42 @@ tslib_1.__decorate([
|
|
|
1682
1400
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1683
1401
|
], FxCore.prototype, "getDotEnvs", null);
|
|
1684
1402
|
tslib_1.__decorate([
|
|
1685
|
-
|
|
1403
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "isEnvFile", reset: true })]),
|
|
1686
1404
|
tslib_1.__metadata("design:type", Function),
|
|
1687
1405
|
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
1688
1406
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1689
1407
|
], FxCore.prototype, "isEnvFile", null);
|
|
1690
1408
|
tslib_1.__decorate([
|
|
1691
|
-
|
|
1409
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getProjectId", reset: true })]),
|
|
1692
1410
|
tslib_1.__metadata("design:type", Function),
|
|
1693
1411
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1694
1412
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1695
1413
|
], FxCore.prototype, "getProjectId", null);
|
|
1696
1414
|
tslib_1.__decorate([
|
|
1697
|
-
|
|
1415
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getProjectMetadata", reset: true })]),
|
|
1698
1416
|
tslib_1.__metadata("design:type", Function),
|
|
1699
1417
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1700
1418
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1701
1419
|
], FxCore.prototype, "getProjectMetadata", null);
|
|
1702
1420
|
tslib_1.__decorate([
|
|
1703
|
-
|
|
1421
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getTeamsAppName", reset: true })]),
|
|
1704
1422
|
tslib_1.__metadata("design:type", Function),
|
|
1705
1423
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1706
1424
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1707
1425
|
], FxCore.prototype, "getTeamsAppName", null);
|
|
1708
1426
|
tslib_1.__decorate([
|
|
1709
|
-
|
|
1427
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getProjectInfo", reset: true })]),
|
|
1710
1428
|
tslib_1.__metadata("design:type", Function),
|
|
1711
1429
|
tslib_1.__metadata("design:paramtypes", [String, String]),
|
|
1712
1430
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1713
1431
|
], FxCore.prototype, "getProjectInfo", null);
|
|
1714
1432
|
tslib_1.__decorate([
|
|
1715
|
-
|
|
1716
|
-
|
|
1433
|
+
hooks_1.hooks([
|
|
1434
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "grantPermission", reset: true }),
|
|
1717
1435
|
errorHandler_1.ErrorHandlerMW,
|
|
1718
1436
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1719
|
-
|
|
1720
|
-
|
|
1437
|
+
questionMW_1.QuestionMW("grantPermission"),
|
|
1438
|
+
envMW_1.EnvLoaderMW(false, true),
|
|
1721
1439
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1722
1440
|
envMW_1.EnvWriterMW,
|
|
1723
1441
|
]),
|
|
@@ -1726,12 +1444,12 @@ tslib_1.__decorate([
|
|
|
1726
1444
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1727
1445
|
], FxCore.prototype, "grantPermission", null);
|
|
1728
1446
|
tslib_1.__decorate([
|
|
1729
|
-
|
|
1730
|
-
|
|
1447
|
+
hooks_1.hooks([
|
|
1448
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "checkPermission", reset: true }),
|
|
1731
1449
|
errorHandler_1.ErrorHandlerMW,
|
|
1732
1450
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1733
|
-
|
|
1734
|
-
|
|
1451
|
+
questionMW_1.QuestionMW("listCollaborator"),
|
|
1452
|
+
envMW_1.EnvLoaderMW(false, true),
|
|
1735
1453
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1736
1454
|
envMW_1.EnvWriterMW,
|
|
1737
1455
|
]),
|
|
@@ -1740,12 +1458,12 @@ tslib_1.__decorate([
|
|
|
1740
1458
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1741
1459
|
], FxCore.prototype, "checkPermission", null);
|
|
1742
1460
|
tslib_1.__decorate([
|
|
1743
|
-
|
|
1744
|
-
|
|
1461
|
+
hooks_1.hooks([
|
|
1462
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "listCollaborator", reset: true }),
|
|
1745
1463
|
errorHandler_1.ErrorHandlerMW,
|
|
1746
1464
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1747
|
-
|
|
1748
|
-
|
|
1465
|
+
questionMW_1.QuestionMW("listCollaborator"),
|
|
1466
|
+
envMW_1.EnvLoaderMW(false, true),
|
|
1749
1467
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1750
1468
|
envMW_1.EnvWriterMW,
|
|
1751
1469
|
]),
|
|
@@ -1754,38 +1472,38 @@ tslib_1.__decorate([
|
|
|
1754
1472
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1755
1473
|
], FxCore.prototype, "listCollaborator", null);
|
|
1756
1474
|
tslib_1.__decorate([
|
|
1757
|
-
|
|
1758
|
-
|
|
1475
|
+
hooks_1.hooks([
|
|
1476
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "getSelectedEnv", reset: true }),
|
|
1759
1477
|
errorHandler_1.ErrorHandlerMW,
|
|
1760
|
-
|
|
1478
|
+
envMW_1.EnvLoaderMW(false),
|
|
1761
1479
|
]),
|
|
1762
1480
|
tslib_1.__metadata("design:type", Function),
|
|
1763
1481
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1764
1482
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1765
1483
|
], FxCore.prototype, "getSelectedEnv", null);
|
|
1766
1484
|
tslib_1.__decorate([
|
|
1767
|
-
|
|
1485
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createLocalCrypto" })]),
|
|
1768
1486
|
tslib_1.__metadata("design:type", Function),
|
|
1769
1487
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1770
1488
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1771
1489
|
], FxCore.prototype, "createLocalCrypto", null);
|
|
1772
1490
|
tslib_1.__decorate([
|
|
1773
|
-
|
|
1491
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "encrypt", reset: true }), errorHandler_1.ErrorHandlerMW]),
|
|
1774
1492
|
tslib_1.__metadata("design:type", Function),
|
|
1775
1493
|
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
1776
1494
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1777
1495
|
], FxCore.prototype, "encrypt", null);
|
|
1778
1496
|
tslib_1.__decorate([
|
|
1779
|
-
|
|
1497
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "decrypt", reset: true }), errorHandler_1.ErrorHandlerMW]),
|
|
1780
1498
|
tslib_1.__metadata("design:type", Function),
|
|
1781
1499
|
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
1782
1500
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1783
1501
|
], FxCore.prototype, "decrypt", null);
|
|
1784
1502
|
tslib_1.__decorate([
|
|
1785
|
-
|
|
1786
|
-
|
|
1503
|
+
hooks_1.hooks([
|
|
1504
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createEnv", reset: true }),
|
|
1787
1505
|
errorHandler_1.ErrorHandlerMW,
|
|
1788
|
-
|
|
1506
|
+
questionMW_1.QuestionMW("createNewEnv"),
|
|
1789
1507
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1790
1508
|
]),
|
|
1791
1509
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1793,20 +1511,20 @@ tslib_1.__decorate([
|
|
|
1793
1511
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1794
1512
|
], FxCore.prototype, "createEnv", null);
|
|
1795
1513
|
tslib_1.__decorate([
|
|
1796
|
-
|
|
1514
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "phantomMigrationV3", reset: true })]),
|
|
1797
1515
|
tslib_1.__metadata("design:type", Function),
|
|
1798
1516
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1799
1517
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1800
1518
|
], FxCore.prototype, "phantomMigrationV3", null);
|
|
1801
1519
|
tslib_1.__decorate([
|
|
1802
|
-
|
|
1520
|
+
hooks_1.hooks([errorHandler_1.ErrorHandlerMW, projectMigratorV3_1.ProjectMigratorMWV3]),
|
|
1803
1521
|
tslib_1.__metadata("design:type", Function),
|
|
1804
1522
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1805
1523
|
tslib_1.__metadata("design:returntype", Object)
|
|
1806
1524
|
], FxCore.prototype, "innerMigrationV3", null);
|
|
1807
1525
|
tslib_1.__decorate([
|
|
1808
|
-
|
|
1809
|
-
|
|
1526
|
+
hooks_1.hooks([
|
|
1527
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "projectVersionCheck", reset: true }),
|
|
1810
1528
|
errorHandler_1.ErrorHandlerMW,
|
|
1811
1529
|
]),
|
|
1812
1530
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1814,11 +1532,11 @@ tslib_1.__decorate([
|
|
|
1814
1532
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1815
1533
|
], FxCore.prototype, "projectVersionCheck", null);
|
|
1816
1534
|
tslib_1.__decorate([
|
|
1817
|
-
|
|
1818
|
-
|
|
1535
|
+
hooks_1.hooks([
|
|
1536
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "preProvisionForVS" }),
|
|
1819
1537
|
errorHandler_1.ErrorHandlerMW,
|
|
1820
1538
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1821
|
-
|
|
1539
|
+
envMW_1.EnvLoaderMW(false),
|
|
1822
1540
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1823
1541
|
contextInjector_1.ContextInjectorMW,
|
|
1824
1542
|
]),
|
|
@@ -1827,11 +1545,11 @@ tslib_1.__decorate([
|
|
|
1827
1545
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1828
1546
|
], FxCore.prototype, "preProvisionForVS", null);
|
|
1829
1547
|
tslib_1.__decorate([
|
|
1830
|
-
|
|
1831
|
-
|
|
1548
|
+
hooks_1.hooks([
|
|
1549
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "preCheckYmlAndEnvForVS" }),
|
|
1832
1550
|
errorHandler_1.ErrorHandlerMW,
|
|
1833
1551
|
projectMigratorV3_1.ProjectMigratorMWV3,
|
|
1834
|
-
|
|
1552
|
+
envMW_1.EnvLoaderMW(false),
|
|
1835
1553
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1836
1554
|
contextInjector_1.ContextInjectorMW,
|
|
1837
1555
|
]),
|
|
@@ -1840,8 +1558,8 @@ tslib_1.__decorate([
|
|
|
1840
1558
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1841
1559
|
], FxCore.prototype, "preCheckYmlAndEnvForVS", null);
|
|
1842
1560
|
tslib_1.__decorate([
|
|
1843
|
-
|
|
1844
|
-
|
|
1561
|
+
hooks_1.hooks([
|
|
1562
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "publishInDeveloperPortal" }),
|
|
1845
1563
|
errorHandler_1.ErrorHandlerMW,
|
|
1846
1564
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1847
1565
|
contextInjector_1.ContextInjectorMW,
|
|
@@ -1851,10 +1569,10 @@ tslib_1.__decorate([
|
|
|
1851
1569
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1852
1570
|
], FxCore.prototype, "publishInDeveloperPortal", null);
|
|
1853
1571
|
tslib_1.__decorate([
|
|
1854
|
-
|
|
1855
|
-
|
|
1572
|
+
hooks_1.hooks([
|
|
1573
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "copilotPluginAddAPI" }),
|
|
1856
1574
|
errorHandler_1.ErrorHandlerMW,
|
|
1857
|
-
|
|
1575
|
+
questionMW_1.QuestionMW("copilotPluginAddAPI"),
|
|
1858
1576
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1859
1577
|
]),
|
|
1860
1578
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1862,8 +1580,8 @@ tslib_1.__decorate([
|
|
|
1862
1580
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1863
1581
|
], FxCore.prototype, "copilotPluginAddAPI", null);
|
|
1864
1582
|
tslib_1.__decorate([
|
|
1865
|
-
|
|
1866
|
-
|
|
1583
|
+
hooks_1.hooks([
|
|
1584
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "copilotPluginListApiSpecs" }),
|
|
1867
1585
|
errorHandler_1.ErrorHandlerMW,
|
|
1868
1586
|
]),
|
|
1869
1587
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1871,8 +1589,17 @@ tslib_1.__decorate([
|
|
|
1871
1589
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1872
1590
|
], FxCore.prototype, "listPluginApiSpecs", null);
|
|
1873
1591
|
tslib_1.__decorate([
|
|
1874
|
-
|
|
1875
|
-
|
|
1592
|
+
hooks_1.hooks([
|
|
1593
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "copilotPluginLoadOpenAIManifest" }),
|
|
1594
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1595
|
+
]),
|
|
1596
|
+
tslib_1.__metadata("design:type", Function),
|
|
1597
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1598
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1599
|
+
], FxCore.prototype, "copilotPluginLoadOpenAIManifest", null);
|
|
1600
|
+
tslib_1.__decorate([
|
|
1601
|
+
hooks_1.hooks([
|
|
1602
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "copilotPluginListOperations" }),
|
|
1876
1603
|
errorHandler_1.ErrorHandlerMW,
|
|
1877
1604
|
]),
|
|
1878
1605
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -1880,16 +1607,16 @@ tslib_1.__decorate([
|
|
|
1880
1607
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1881
1608
|
], FxCore.prototype, "copilotPluginListOperations", null);
|
|
1882
1609
|
tslib_1.__decorate([
|
|
1883
|
-
|
|
1610
|
+
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "FxCore", stage: "checkProjectType" }), errorHandler_1.ErrorHandlerMW]),
|
|
1884
1611
|
tslib_1.__metadata("design:type", Function),
|
|
1885
1612
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1886
1613
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1887
1614
|
], FxCore.prototype, "checkProjectType", null);
|
|
1888
1615
|
tslib_1.__decorate([
|
|
1889
|
-
|
|
1890
|
-
|
|
1616
|
+
hooks_1.hooks([
|
|
1617
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "addPlugin" }),
|
|
1891
1618
|
errorHandler_1.ErrorHandlerMW,
|
|
1892
|
-
|
|
1619
|
+
questionMW_1.QuestionMW("addPlugin"),
|
|
1893
1620
|
concurrentLocker_1.ConcurrentLockerMW,
|
|
1894
1621
|
]),
|
|
1895
1622
|
tslib_1.__metadata("design:type", Function),
|