@microsoft/teamsfx-core 2.0.10-alpha.fa1ce1fbb.0 → 2.0.10-alpha.fe2e47f9c.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/teamsDevPortalClient.d.ts +4 -5
- package/build/client/teamsDevPortalClient.d.ts.map +1 -1
- package/build/client/teamsDevPortalClient.js +67 -47
- package/build/client/teamsDevPortalClient.js.map +1 -1
- package/build/common/azureUtils.js +4 -4
- package/build/common/azureUtils.js.map +1 -1
- package/build/common/constants.d.ts +1 -19
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +10 -29
- package/build/common/constants.js.map +1 -1
- package/build/common/correlator.d.ts +1 -0
- package/build/common/correlator.d.ts.map +1 -1
- package/build/common/correlator.js +6 -1
- package/build/common/correlator.js.map +1 -1
- package/build/common/featureFlags.d.ts +49 -19
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +82 -62
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/globalState.js +3 -3
- package/build/common/globalState.js.map +1 -1
- package/build/common/globalVars.d.ts +1 -0
- package/build/common/globalVars.d.ts.map +1 -1
- package/build/common/globalVars.js +2 -1
- package/build/common/globalVars.js.map +1 -1
- package/build/common/jsonUtils.js +10 -10
- package/build/common/jsonUtils.js.map +1 -1
- package/build/common/localizeUtils.js +2 -2
- package/build/common/localizeUtils.js.map +1 -1
- package/build/common/projectSettingsHelper.js +1 -1
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/projectTypeChecker.js +3 -3
- package/build/common/projectTypeChecker.js.map +1 -1
- package/build/common/samples.js +5 -5
- package/build/common/samples.js.map +1 -1
- package/build/common/secretmasker/dict.d.ts +22 -0
- package/build/common/secretmasker/dict.d.ts.map +1 -0
- package/build/common/secretmasker/dict.js +83 -0
- package/build/common/secretmasker/dict.js.map +1 -0
- package/build/common/secretmasker/feature.d.ts +19 -0
- package/build/common/secretmasker/feature.d.ts.map +1 -0
- package/build/common/secretmasker/feature.js +389 -0
- package/build/common/secretmasker/feature.js.map +1 -0
- package/build/common/secretmasker/masker.d.ts +12 -0
- package/build/common/secretmasker/masker.d.ts.map +1 -0
- package/build/common/secretmasker/masker.js +54 -0
- package/build/common/secretmasker/masker.js.map +1 -0
- package/build/common/stringUtils.d.ts +3 -5
- package/build/common/stringUtils.d.ts.map +1 -1
- package/build/common/stringUtils.js +13 -105
- package/build/common/stringUtils.js.map +1 -1
- package/build/common/telemetry.d.ts +13 -2
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +21 -3
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +1 -1
- package/build/common/tools.d.ts +1 -6
- package/build/common/tools.d.ts.map +1 -1
- package/build/common/tools.js +15 -28
- package/build/common/tools.js.map +1 -1
- package/build/common/utils.d.ts +4 -0
- package/build/common/utils.d.ts.map +1 -1
- package/build/common/utils.js +38 -1
- package/build/common/utils.js.map +1 -1
- package/build/common/wrappedAxiosClient.d.ts +1 -0
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +58 -29
- 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 +9 -9
- package/build/component/configManager/lifecycle.js.map +1 -1
- package/build/component/configManager/parser.js +20 -20
- 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 +1 -0
- package/build/component/constant/commonConstant.d.ts.map +1 -1
- package/build/component/constant/commonConstant.js +1 -0
- package/build/component/constant/commonConstant.js.map +1 -1
- package/build/component/constants.js +5 -5
- package/build/component/constants.js.map +1 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +95 -212
- 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/deps-checker/constant/helpLink.d.ts +0 -3
- package/build/component/deps-checker/constant/helpLink.d.ts.map +1 -1
- package/build/component/deps-checker/constant/helpLink.js +1 -6
- package/build/component/deps-checker/constant/helpLink.js.map +1 -1
- package/build/component/deps-checker/constant/message.js +24 -24
- package/build/component/deps-checker/constant/message.js.map +1 -1
- package/build/component/deps-checker/internal/dotnetChecker.js +13 -13
- package/build/component/deps-checker/internal/dotnetChecker.js.map +1 -1
- package/build/component/deps-checker/internal/funcToolChecker.js +13 -13
- package/build/component/deps-checker/internal/funcToolChecker.js.map +1 -1
- package/build/component/deps-checker/internal/testToolChecker.js +21 -21
- package/build/component/deps-checker/internal/testToolChecker.js.map +1 -1
- package/build/component/deps-checker/internal/vxTestAppChecker.d.ts.map +1 -1
- package/build/component/deps-checker/internal/vxTestAppChecker.js +14 -8
- package/build/component/deps-checker/internal/vxTestAppChecker.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +15 -15
- 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 +38 -23
- 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/error/missingServiceManagamentReferenceError.d.ts +5 -0
- package/build/component/driver/aad/error/missingServiceManagamentReferenceError.d.ts.map +1 -0
- package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js +23 -0
- package/build/component/driver/aad/error/missingServiceManagamentReferenceError.js.map +1 -0
- 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.js +9 -9
- 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.js +5 -5
- package/build/component/driver/aad/utility/buildAadManifest.js.map +1 -1
- package/build/component/driver/aad/utility/constants.d.ts +2 -0
- package/build/component/driver/aad/utility/constants.d.ts.map +1 -1
- package/build/component/driver/aad/utility/constants.js +2 -0
- package/build/component/driver/aad/utility/constants.js.map +1 -1
- package/build/component/driver/add/addWebPart.js +6 -6
- 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 +23 -20
- 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/apiKeyFromScratchClientSecretInvalid.d.ts +5 -0
- package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.d.ts.map +1 -0
- package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js +21 -0
- package/build/component/driver/apiKey/error/apiKeyFromScratchClientSecretInvalid.js.map +1 -0
- 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.map +1 -1
- package/build/component/driver/apiKey/update.js +20 -20
- 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 +19 -17
- package/build/component/driver/arm/deployImpl.js.map +1 -1
- package/build/component/driver/arm/util/bicepChecker.js +5 -5
- package/build/component/driver/arm/util/bicepChecker.js.map +1 -1
- package/build/component/driver/arm/util/handleError.js +9 -9
- 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 +38 -22
- 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 +1 -0
- package/build/component/driver/botAadApp/utility/constants.d.ts.map +1 -1
- package/build/component/driver/botAadApp/utility/constants.js +1 -0
- 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 +16 -10
- package/build/component/driver/deploy/azure/azureStaticWebAppGetDeploymentTokenDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js +8 -8
- package/build/component/driver/deploy/azure/azureStorageDeployDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js +14 -14
- package/build/component/driver/deploy/azure/azureStorageStaticWebsiteConfigDriver.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +6 -6
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/azureDeployImpl.js +8 -8
- 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.js +15 -15
- 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 +3 -3
- package/build/component/driver/devTool/error/dotnetInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/error/funcInstallationUserError.js +3 -3
- package/build/component/driver/devTool/error/funcInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/error/testToolInstallationUserError.js +3 -3
- package/build/component/driver/devTool/error/testToolInstallationUserError.js.map +1 -1
- package/build/component/driver/devTool/installDriver.js +6 -6
- 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 +1 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +1 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/m365/acquire.js +12 -12
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/middleware/addSWADeployTelemetry.js +2 -2
- package/build/component/driver/middleware/addSWADeployTelemetry.js.map +1 -1
- package/build/component/driver/oauth/create.d.ts.map +1 -1
- package/build/component/driver/oauth/create.js +51 -21
- 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/oauthDisablePKCEError.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthDisablePKCEError.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthDisablePKCEError.js +21 -0
- package/build/component/driver/oauth/error/oauthDisablePKCEError.js.map +1 -0
- 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/oauthIdentityProviderInvalid.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js +21 -0
- package/build/component/driver/oauth/error/oauthIdentityProviderInvalid.js.map +1 -0
- 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 +2 -0
- package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -1
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +1 -0
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -1
- package/build/component/driver/oauth/update.d.ts.map +1 -1
- package/build/component/driver/oauth/update.js +30 -19
- 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 +5 -6
- 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 +2 -0
- package/build/component/driver/script/scriptDriver.d.ts.map +1 -1
- package/build/component/driver/script/scriptDriver.js +28 -29
- package/build/component/driver/script/scriptDriver.js.map +1 -1
- package/build/component/driver/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +43 -54
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +20 -20
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +23 -23
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +15 -1
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +132 -2
- 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.map +1 -1
- package/build/component/driver/teamsApp/create.js +21 -21
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +83 -67
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/errors.d.ts +6 -2
- package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
- package/build/component/driver/teamsApp/errors.js +49 -42
- package/build/component/driver/teamsApp/errors.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts +6 -2
- package/build/component/driver/teamsApp/interfaces/CreateAppPackageArgs.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +2 -0
- 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/SyncManifest.d.ts +20 -0
- package/build/component/driver/teamsApp/interfaces/SyncManifest.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/SyncManifest.js +5 -0
- package/build/component/driver/teamsApp/interfaces/SyncManifest.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts +1 -0
- package/build/component/driver/teamsApp/interfaces/appdefinitions/IValidationResult.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +35 -35
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/syncManifest.d.ts +14 -0
- package/build/component/driver/teamsApp/syncManifest.d.ts.map +1 -0
- package/build/component/driver/teamsApp/syncManifest.js +226 -0
- package/build/component/driver/teamsApp/syncManifest.js.map +1 -0
- package/build/component/driver/teamsApp/teamsappMgr.d.ts.map +1 -1
- package/build/component/driver/teamsApp/teamsappMgr.js +41 -42
- package/build/component/driver/teamsApp/teamsappMgr.js.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +5 -3
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +45 -21
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +3 -2
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +63 -39
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +4 -3
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +36 -18
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.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 +45 -15
- 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 +1 -0
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +52 -38
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.js +36 -36
- package/build/component/driver/teamsApp/validateTestCases.js.map +1 -1
- package/build/component/driver/util/wrapUtil.js +6 -6
- 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 +56 -56
- 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 +4 -4
- package/build/component/feature/sso.js.map +1 -1
- package/build/component/generator/apiSpec/generator.d.ts +15 -0
- package/build/component/generator/apiSpec/generator.d.ts.map +1 -0
- package/build/component/generator/apiSpec/generator.js +260 -0
- package/build/component/generator/apiSpec/generator.js.map +1 -0
- package/build/component/generator/{copilotPlugin → apiSpec}/helper.d.ts +23 -9
- package/build/component/generator/apiSpec/helper.d.ts.map +1 -0
- package/build/component/generator/{copilotPlugin → apiSpec}/helper.js +309 -127
- package/build/component/generator/apiSpec/helper.js.map +1 -0
- package/build/component/generator/constant.d.ts +1 -0
- package/build/component/generator/constant.d.ts.map +1 -1
- package/build/component/generator/constant.js +2 -1
- package/build/component/generator/constant.js.map +1 -1
- package/build/component/generator/{officeXMLAddin → copilotExtension}/generator.d.ts +8 -10
- package/build/component/generator/copilotExtension/generator.d.ts.map +1 -0
- package/build/component/generator/copilotExtension/generator.js +116 -0
- package/build/component/generator/copilotExtension/generator.js.map +1 -0
- package/build/component/generator/copilotExtension/helper.d.ts +8 -0
- package/build/component/generator/copilotExtension/helper.d.ts.map +1 -0
- package/build/component/generator/copilotExtension/helper.js +114 -0
- package/build/component/generator/copilotExtension/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 +25 -19
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.js +7 -7
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/generatorProvider.js +6 -6
- package/build/component/generator/generatorProvider.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts +1 -2
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +39 -41
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +5 -5
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -1
- package/build/component/generator/officeXMLAddin/projectConfig.js +0 -75
- package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.js +4 -4
- package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +1 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.js +4 -4
- package/build/component/generator/spfx/depsChecker/yoChecker.js.map +1 -1
- package/build/component/generator/spfx/error.js +19 -19
- package/build/component/generator/spfx/error.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +76 -76
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/spfx/utils/constants.js +8 -8
- package/build/component/generator/spfx/utils/constants.js.map +1 -1
- package/build/component/generator/spfx/utils/telemetry-helper.js +1 -1
- package/build/component/generator/spfx/utils/telemetry-helper.js.map +1 -1
- package/build/component/generator/spfx/utils/utils.d.ts +1 -0
- package/build/component/generator/spfx/utils/utils.d.ts.map +1 -1
- package/build/component/generator/spfx/utils/utils.js +13 -9
- package/build/component/generator/spfx/utils/utils.js.map +1 -1
- package/build/component/generator/templates/ssrTabGenerator.js +1 -1
- package/build/component/generator/templates/ssrTabGenerator.js.map +1 -1
- package/build/component/generator/templates/templateGenerator.js +13 -13
- package/build/component/generator/templates/templateGenerator.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +1 -0
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/generator/templates/templateNames.js +3 -9
- 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 +29 -9
- package/build/component/generator/templates/templateReplaceMap.js.map +1 -1
- package/build/component/generator/utils.js +6 -6
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/local/constants.d.ts +108 -108
- package/build/component/local/localCertificateManager.d.ts.map +1 -1
- package/build/component/local/localCertificateManager.js +11 -9
- package/build/component/local/localCertificateManager.js.map +1 -1
- package/build/component/local/localEnvManager.js +2 -2
- package/build/component/local/localEnvManager.js.map +1 -1
- package/build/component/local/localTelemetryReporter.js +3 -3
- package/build/component/local/localTelemetryReporter.js.map +1 -1
- package/build/component/local/portChecker.js +4 -4
- package/build/component/local/portChecker.js.map +1 -1
- package/build/component/local/taskDefinition.js +3 -3
- package/build/component/local/taskDefinition.js.map +1 -1
- package/build/component/m365/constants.d.ts +3 -0
- package/build/component/m365/constants.d.ts.map +1 -1
- package/build/component/m365/constants.js +4 -1
- package/build/component/m365/constants.js.map +1 -1
- package/build/component/m365/errors.js +2 -2
- package/build/component/m365/errors.js.map +1 -1
- package/build/component/m365/launchHelper.d.ts +2 -2
- package/build/component/m365/launchHelper.d.ts.map +1 -1
- package/build/component/m365/launchHelper.js +25 -17
- package/build/component/m365/launchHelper.js.map +1 -1
- package/build/component/m365/packageService.js +19 -19
- package/build/component/m365/packageService.js.map +1 -1
- package/build/component/messages.js +7 -7
- package/build/component/messages.js.map +1 -1
- package/build/component/middleware/actionExecutionMW.js +8 -8
- package/build/component/middleware/actionExecutionMW.js.map +1 -1
- package/build/component/middleware/envMW.js +6 -6
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/middleware/questionMW.js +3 -3
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/migrate.js +4 -4
- package/build/component/migrate.js.map +1 -1
- package/build/component/provisionUtils.js +24 -24
- package/build/component/provisionUtils.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +11 -11
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.d.ts.map +1 -1
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.js +7 -7
- package/build/component/resource/botService/botRegistration/botFrameworkRegistration.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/utils/ResourceGroupHelper.js +28 -28
- 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/common.d.ts +4 -3
- package/build/component/utils/common.d.ts.map +1 -1
- package/build/component/utils/common.js +17 -6
- package/build/component/utils/common.js.map +1 -1
- package/build/component/utils/depsChecker/common.js +2 -2
- package/build/component/utils/depsChecker/common.js.map +1 -1
- package/build/component/utils/envFunctionUtils.d.ts +12 -0
- package/build/component/utils/envFunctionUtils.d.ts.map +1 -0
- package/build/component/utils/envFunctionUtils.js +185 -0
- package/build/component/utils/envFunctionUtils.js.map +1 -0
- package/build/component/utils/envUtil.d.ts +1 -0
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +19 -19
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/fileOperation.js +3 -4
- 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 +2 -2
- package/build/component/utils/metadataUtil.js.map +1 -1
- package/build/component/utils/pathUtils.js +5 -5
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/component/utils/settingsUtil.js +7 -7
- package/build/component/utils/settingsUtil.js.map +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.js +1 -1
- package/build/component/utils/teamsFxTelemetryReporter.js.map +1 -1
- package/build/core/FxCore.d.ts +34 -0
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +715 -413
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.js +65 -65
- package/build/core/collaborator.js.map +1 -1
- package/build/core/crypto.js +4 -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 +0 -1
- package/build/core/environmentName.d.ts.map +1 -1
- package/build/core/environmentName.js +0 -2
- package/build/core/environmentName.js.map +1 -1
- package/build/core/middleware/concurrentLocker.js +13 -13
- package/build/core/middleware/concurrentLocker.js.map +1 -1
- package/build/core/middleware/errorHandler.js +4 -4
- package/build/core/middleware/errorHandler.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +78 -78
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/core/middleware/projectSettingsLoader.js +3 -3
- package/build/core/middleware/projectSettingsLoader.js.map +1 -1
- package/build/core/middleware/projectVersionChecker.js +9 -9
- package/build/core/middleware/projectVersionChecker.js.map +1 -1
- package/build/core/middleware/utils/MigrationUtils.js +4 -4
- package/build/core/middleware/utils/MigrationUtils.js.map +1 -1
- package/build/core/middleware/utils/appYmlGenerator.js +4 -4
- 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 +72 -72
- 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 +9 -9
- package/build/core/middleware/utils/v3MigrationUtils.js.map +1 -1
- package/build/core/middleware/videoFilterAppBlocker.js +4 -4
- package/build/core/middleware/videoFilterAppBlocker.js.map +1 -1
- package/build/core/telemetry.js +1 -1
- 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 +4 -1
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +87 -75
- 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 +14 -8
- package/build/error/script.js.map +1 -1
- package/build/error/teamsApp.d.ts.map +1 -1
- package/build/error/teamsApp.js +10 -8
- 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 +12 -12
- package/build/error/yml.js.map +1 -1
- package/build/index.d.ts +11 -7
- package/build/index.d.ts.map +1 -1
- package/build/index.js +19 -16
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +38 -27
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +286 -294
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +5 -3
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +338 -230
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +6 -2
- package/build/question/generator.js.map +1 -1
- package/build/question/index.d.ts +2 -0
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +21 -15
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +8 -4
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +10 -4
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/inputs/SyncManifestInputs.d.ts +16 -0
- package/build/question/inputs/SyncManifestInputs.d.ts.map +1 -0
- package/build/question/inputs/SyncManifestInputs.js +5 -0
- package/build/question/inputs/SyncManifestInputs.js.map +1 -0
- package/build/question/inputs/UninstallInputs.d.ts +22 -0
- package/build/question/inputs/UninstallInputs.d.ts.map +1 -0
- package/build/question/inputs/UninstallInputs.js +5 -0
- package/build/question/inputs/UninstallInputs.js.map +1 -0
- package/build/question/inputs/index.d.ts +2 -0
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +2 -0
- 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 +19 -10
- 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 +27 -24
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/SyncManifestOptions.d.ts +10 -0
- package/build/question/options/SyncManifestOptions.d.ts.map +1 -0
- package/build/question/options/SyncManifestOptions.js +28 -0
- package/build/question/options/SyncManifestOptions.js.map +1 -0
- package/build/question/options/UninstallOptions.d.ts +10 -0
- package/build/question/options/UninstallOptions.d.ts.map +1 -0
- package/build/question/options/UninstallOptions.js +44 -0
- package/build/question/options/UninstallOptions.js.map +1 -0
- package/build/question/options/index.d.ts +2 -0
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +2 -0
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +2 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +228 -81
- package/build/question/other.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -0
- package/build/ui/visitor.d.ts.map +1 -1
- package/build/ui/visitor.js +41 -27
- package/build/ui/visitor.js.map +1 -1
- package/package.json +15 -10
- package/resource/dict.zip +0 -0
- package/resource/package.nls.json +180 -133
- package/resource/yaml-schema/v1.6/yaml.schema.json +13 -0
- package/resource/yaml-schema/v1.7/yaml.schema.json +1842 -0
- package/resource/yaml-schema/yaml.schema.json +13 -0
- package/templates/fallback/common.zip +0 -0
- package/templates/fallback/csharp.zip +0 -0
- package/templates/fallback/js.zip +0 -0
- package/templates/fallback/python.zip +0 -0
- package/templates/fallback/ts.zip +0 -0
- package/build/component/generator/copilotPlugin/generator.d.ts +0 -21
- package/build/component/generator/copilotPlugin/generator.d.ts.map +0 -1
- package/build/component/generator/copilotPlugin/generator.js +0 -399
- package/build/component/generator/copilotPlugin/generator.js.map +0 -1
- package/build/component/generator/copilotPlugin/helper.d.ts.map +0 -1
- package/build/component/generator/copilotPlugin/helper.js.map +0 -1
- package/build/component/generator/officeXMLAddin/generator.d.ts.map +0 -1
- package/build/component/generator/officeXMLAddin/generator.js +0 -173
- package/build/component/generator/officeXMLAddin/generator.js.map +0 -1
|
@@ -21,27 +21,27 @@ let doingTask = undefined;
|
|
|
21
21
|
const ConcurrentLockerMW = async (ctx, next) => {
|
|
22
22
|
var _a;
|
|
23
23
|
const inputs = ctx.arguments[ctx.arguments.length - 1];
|
|
24
|
-
if (projectSettingsLoader_1.shouldIgnored(ctx)) {
|
|
24
|
+
if ((0, projectSettingsLoader_1.shouldIgnored)(ctx)) {
|
|
25
25
|
await next();
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
if (!inputs.projectPath) {
|
|
29
|
-
ctx.result = teamsfx_api_1.err(new common_1.NoProjectOpenedError());
|
|
29
|
+
ctx.result = (0, teamsfx_api_1.err)(new common_1.NoProjectOpenedError());
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
if (!(await fs.pathExists(inputs.projectPath))) {
|
|
33
|
-
ctx.result = teamsfx_api_1.err(new common_1.FileNotFoundError("ConcurrentLockerMW", inputs.projectPath));
|
|
33
|
+
ctx.result = (0, teamsfx_api_1.err)(new common_1.FileNotFoundError("ConcurrentLockerMW", inputs.projectPath));
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
let configFolder = "";
|
|
37
|
-
if (projectSettingsHelper_1.isValidProjectV3(inputs.projectPath)) {
|
|
37
|
+
if ((0, projectSettingsHelper_1.isValidProjectV3)(inputs.projectPath)) {
|
|
38
38
|
configFolder = path.join(inputs.projectPath);
|
|
39
39
|
}
|
|
40
|
-
else if (projectSettingsHelper_1.isValidProjectV2(inputs.projectPath)) {
|
|
40
|
+
else if ((0, projectSettingsHelper_1.isValidProjectV2)(inputs.projectPath)) {
|
|
41
41
|
configFolder = path.join(inputs.projectPath, `.${teamsfx_api_1.ConfigFolderName}`);
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
ctx.result = teamsfx_api_1.err(new common_1.InvalidProjectError());
|
|
44
|
+
ctx.result = (0, teamsfx_api_1.err)(new common_1.InvalidProjectError(inputs.projectPath));
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
47
|
const lockFileDir = getLockFolder(inputs.projectPath);
|
|
@@ -55,7 +55,7 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
55
55
|
let retryNum = 0;
|
|
56
56
|
for (let i = 0; i < 10; ++i) {
|
|
57
57
|
try {
|
|
58
|
-
await proper_lockfile_1.lock(configFolder, { lockfilePath: lockfilePath });
|
|
58
|
+
await (0, proper_lockfile_1.lock)(configFolder, { lockfilePath: lockfilePath });
|
|
59
59
|
acquired = true;
|
|
60
60
|
for (const f of callback_1.CallbackRegistry.get(teamsfx_api_1.CoreCallbackEvent.lock)) {
|
|
61
61
|
await f(taskName);
|
|
@@ -64,14 +64,14 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
64
64
|
doingTask = taskName;
|
|
65
65
|
if (retryNum > 0) {
|
|
66
66
|
// failed for some try and finally success
|
|
67
|
-
telemetry_1.sendTelemetryErrorEvent(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource),
|
|
67
|
+
(0, telemetry_1.sendTelemetryErrorEvent)(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource),
|
|
68
68
|
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
69
69
|
{ retry: retryNum + "", acquired: "true", doing: doingTask, todo: taskName });
|
|
70
70
|
}
|
|
71
71
|
await next();
|
|
72
72
|
}
|
|
73
73
|
finally {
|
|
74
|
-
await proper_lockfile_1.unlock(configFolder, { lockfilePath: lockfilePath });
|
|
74
|
+
await (0, proper_lockfile_1.unlock)(configFolder, { lockfilePath: lockfilePath });
|
|
75
75
|
for (const f of callback_1.CallbackRegistry.get(teamsfx_api_1.CoreCallbackEvent.unlock)) {
|
|
76
76
|
await f(taskName);
|
|
77
77
|
}
|
|
@@ -81,7 +81,7 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
81
81
|
}
|
|
82
82
|
catch (e) {
|
|
83
83
|
if (e["code"] === "ELOCKED") {
|
|
84
|
-
await utils_1.waitSeconds(1);
|
|
84
|
+
await (0, utils_1.waitSeconds)(1);
|
|
85
85
|
++retryNum;
|
|
86
86
|
continue;
|
|
87
87
|
}
|
|
@@ -92,19 +92,19 @@ const ConcurrentLockerMW = async (ctx, next) => {
|
|
|
92
92
|
const log = `Failed to acquire lock for task ${taskName} on: ${configFolder}`;
|
|
93
93
|
(_a = globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.logProvider) === null || _a === void 0 ? void 0 : _a.error(log);
|
|
94
94
|
// failed for 10 times and finally failed
|
|
95
|
-
telemetry_1.sendTelemetryErrorEvent(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource), {
|
|
95
|
+
(0, telemetry_1.sendTelemetryErrorEvent)(common_1.CoreSource, "concurrent-operation", new common_1.ConcurrentError(common_1.CoreSource), {
|
|
96
96
|
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
97
97
|
retry: retryNum + "",
|
|
98
98
|
acquired: "false",
|
|
99
99
|
doing: doingTask || "",
|
|
100
100
|
todo: taskName,
|
|
101
101
|
});
|
|
102
|
-
ctx.result = teamsfx_api_1.err(new common_1.ConcurrentError(common_1.CoreSource));
|
|
102
|
+
ctx.result = (0, teamsfx_api_1.err)(new common_1.ConcurrentError(common_1.CoreSource));
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
exports.ConcurrentLockerMW = ConcurrentLockerMW;
|
|
106
106
|
function getLockFolder(projectPath) {
|
|
107
|
-
return path.join(os.tmpdir(), `${teamsfx_api_1.ProductName}-${crypto_1.default.createHash("
|
|
107
|
+
return path.join(os.tmpdir(), `${teamsfx_api_1.ProductName}-${crypto_1.default.createHash("sha256").update(projectPath).digest("hex")}`);
|
|
108
108
|
}
|
|
109
109
|
exports.getLockFolder = getLockFolder;
|
|
110
110
|
//# sourceMappingURL=concurrentLocker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concurrentLocker.js","sourceRoot":"","sources":["../../../src/core/middleware/concurrentLocker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAGb,wDAOgC;AAChC,4DAA4B;AAC5B,qDAA+B;AAC/B,+CAAyB;AACzB,mDAA6B;AAC7B,qDAA+C;AAC/C,wDAAgD;AAChD,8EAAwF;AACxF,sDAAiE;AACjE,8CAAiD;AACjD,+CAM4B;AAC5B,0CAA+C;AAC/C,mEAAwD;AAExD,IAAI,SAAS,GAAuB,SAAS,CAAC;AACvC,MAAM,kBAAkB,GAAe,KAAK,EAAE,GAAgB,EAAE,IAAkB,EAAE,EAAE;;IAC3F,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAW,CAAC;IACjE,IAAI,qCAAa,
|
|
1
|
+
{"version":3,"file":"concurrentLocker.js","sourceRoot":"","sources":["../../../src/core/middleware/concurrentLocker.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;;AAGb,wDA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sBAqF7B;AAEF,SAAgB,aAAa,CAAC,WAAmB;IAC/C,OAAO,IAAI,CAAC,IAAI,CACd,EAAE,CAAC,MAAM,EAAE,EACX,GAAG,yBAAW,IAAI,gBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAClF,CAAC;AACJ,CAAC;AALD,sCAKC"}
|
|
@@ -14,18 +14,18 @@ const ErrorHandlerMW = async (ctx, next) => {
|
|
|
14
14
|
var _a;
|
|
15
15
|
const inputs = ctx.arguments[ctx.arguments.length - 1];
|
|
16
16
|
if (inputs === null || inputs === void 0 ? void 0 : inputs.locale)
|
|
17
|
-
globalVars_1.setLocale(inputs.locale);
|
|
17
|
+
(0, globalVars_1.setLocale)(inputs.locale);
|
|
18
18
|
try {
|
|
19
19
|
await next();
|
|
20
20
|
}
|
|
21
21
|
catch (e) {
|
|
22
|
-
const fxError = common_1.assembleError(e);
|
|
23
|
-
ctx.result = teamsfx_api_1.err(fxError);
|
|
22
|
+
const fxError = (0, common_1.assembleError)(e);
|
|
23
|
+
ctx.result = (0, teamsfx_api_1.err)(fxError);
|
|
24
24
|
}
|
|
25
25
|
if ((_a = ctx.result) === null || _a === void 0 ? void 0 : _a.isErr()) {
|
|
26
26
|
let fxError = ctx.result.error;
|
|
27
27
|
fxError = convertError(fxError);
|
|
28
|
-
ctx.result = teamsfx_api_1.err(fxError);
|
|
28
|
+
ctx.result = (0, teamsfx_api_1.err)(fxError);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
exports.ErrorHandlerMW = ErrorHandlerMW;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../../src/core/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,YAAY,CAAC;;;AAGb,wDAA6E;AAC7E,wDAAoD;AACpD,+CAAwE;AAExE;;;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CAAC,OAAO,EACV,GAAW,CAAC,cAAc,CAC5B,CAAC;YACF,SAAS,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YAC5B,OAAO,SAAS,CAAC;SAClB;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AApBD,oCAoBC"}
|
|
@@ -68,10 +68,10 @@ exports.errorNames = {
|
|
|
68
68
|
manifestTemplateInvalid: "ManifestTemplateInvalid",
|
|
69
69
|
aadManifestTemplateNotExist: "AadManifestTemplateNotExist",
|
|
70
70
|
};
|
|
71
|
-
const upgradeButton = () => localizeUtils_1.getLocalizedString("core.option.upgrade");
|
|
72
|
-
const moreInfoButton = () => localizeUtils_1.getLocalizedString("core.option.moreInfo");
|
|
71
|
+
const upgradeButton = () => (0, localizeUtils_1.getLocalizedString)("core.option.upgrade");
|
|
72
|
+
const moreInfoButton = () => (0, localizeUtils_1.getLocalizedString)("core.option.moreInfo");
|
|
73
73
|
exports.moreInfoButton = moreInfoButton;
|
|
74
|
-
const migrationMessageButtons = () => [upgradeButton(), exports.moreInfoButton()];
|
|
74
|
+
const migrationMessageButtons = () => [upgradeButton(), (0, exports.moreInfoButton)()];
|
|
75
75
|
const telemetryProperties = {
|
|
76
76
|
[TelemetryPropertyKey.upgradeVersion]: TelemetryPropertyValue.upgradeVersion,
|
|
77
77
|
};
|
|
@@ -93,33 +93,33 @@ const ProjectMigratorMWV3 = async (ctx, next) => {
|
|
|
93
93
|
const versionForMigration = await checkVersionForMigration(ctx);
|
|
94
94
|
// abandoned v3 project which will not be supported. Show user the message to create new project.
|
|
95
95
|
if (versionForMigration.source === versionMetadata_1.VersionSource.settings) {
|
|
96
|
-
await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", localizeUtils_1.getLocalizedString("core.migrationV3.abandonedProject"), true));
|
|
97
|
-
ctx.result = teamsfx_api_1.err(new error_1.AbandonedProjectError());
|
|
96
|
+
await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", (0, localizeUtils_1.getLocalizedString)("core.migrationV3.abandonedProject"), true));
|
|
97
|
+
ctx.result = (0, teamsfx_api_1.err)(new error_1.AbandonedProjectError());
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
const projectPath = v3MigrationUtils_1.getParameterFromCxt(ctx, "projectPath", "");
|
|
100
|
+
const projectPath = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, "projectPath", "");
|
|
101
101
|
const isValid = await checkActiveResourcePlugins(projectPath);
|
|
102
102
|
const isUpgradeable = isValid && versionForMigration.state === versionMetadata_1.VersionState.upgradeable;
|
|
103
103
|
if (isUpgradeable) {
|
|
104
104
|
// in cli non interactive scenario, migration will return an error instead of popup dialog.
|
|
105
|
-
const nonInteractive = v3MigrationUtils_1.getParameterFromCxt(ctx, "nonInteractive");
|
|
105
|
+
const nonInteractive = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, "nonInteractive");
|
|
106
106
|
if (nonInteractive) {
|
|
107
|
-
ctx.result = teamsfx_api_1.err(new error_1.NotAllowedMigrationError());
|
|
107
|
+
ctx.result = (0, teamsfx_api_1.err)(new error_1.NotAllowedMigrationError());
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
const isRunMigration = await showNotification(ctx, versionForMigration);
|
|
111
111
|
if (isRunMigration) {
|
|
112
|
-
const isNonmodalMessage = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.isNonmodalMessage);
|
|
112
|
+
const isNonmodalMessage = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.isNonmodalMessage);
|
|
113
113
|
if (isNonmodalMessage) {
|
|
114
114
|
const versionForMigration = await checkVersionForMigration(ctx);
|
|
115
115
|
if (versionForMigration.state !== versionMetadata_1.VersionState.upgradeable) {
|
|
116
|
-
ctx.result = teamsfx_api_1.ok(undefined);
|
|
116
|
+
ctx.result = (0, teamsfx_api_1.ok)(undefined);
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
const migrationContext = await migrationContext_1.MigrationContext.create(ctx);
|
|
121
121
|
await wrapRunMigration(migrationContext, migrate);
|
|
122
|
-
ctx.result = teamsfx_api_1.ok(undefined);
|
|
122
|
+
ctx.result = (0, teamsfx_api_1.ok)(undefined);
|
|
123
123
|
}
|
|
124
124
|
return;
|
|
125
125
|
}
|
|
@@ -140,7 +140,7 @@ async function wrapRunMigration(context, exec) {
|
|
|
140
140
|
}
|
|
141
141
|
catch (error) {
|
|
142
142
|
const errorMessage = buildErrorMessage(error, context.currentStep);
|
|
143
|
-
const fxError = error_1.assembleError(error, telemetry_1.Component.core);
|
|
143
|
+
const fxError = (0, error_1.assembleError)(error, telemetry_1.Component.core);
|
|
144
144
|
fxError.message = errorMessage;
|
|
145
145
|
sendTelemetryErrorEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorError, fxError, context.telemetryProperties);
|
|
146
146
|
await rollbackMigration(context);
|
|
@@ -170,7 +170,7 @@ exports.rollbackMigration = rollbackMigration;
|
|
|
170
170
|
async function showSummaryReport(context) {
|
|
171
171
|
var _a, _b;
|
|
172
172
|
const summaryPath = path.join(context.backupPath, Constants.reportName);
|
|
173
|
-
const templatePath = path.join(folder_1.getTemplatesFolder(), "core/v3Migration", Constants.reportName);
|
|
173
|
+
const templatePath = path.join((0, folder_1.getTemplatesFolder)(), "core/v3Migration", Constants.reportName);
|
|
174
174
|
const content = await fs.readFile(templatePath);
|
|
175
175
|
await fs.writeFile(summaryPath, content);
|
|
176
176
|
await ((_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, summaryPath));
|
|
@@ -187,9 +187,9 @@ async function preMigration(context) {
|
|
|
187
187
|
}
|
|
188
188
|
exports.preMigration = preMigration;
|
|
189
189
|
async function checkVersionForMigration(ctx) {
|
|
190
|
-
const versionInfo = await v3MigrationUtils_1.getProjectVersion(ctx);
|
|
191
|
-
const versionState = v3MigrationUtils_1.getVersionState(versionInfo);
|
|
192
|
-
const platform = v3MigrationUtils_1.getParameterFromCxt(ctx, "platform", teamsfx_api_1.Platform.VSCode);
|
|
190
|
+
const versionInfo = await (0, v3MigrationUtils_1.getProjectVersion)(ctx);
|
|
191
|
+
const versionState = (0, v3MigrationUtils_1.getVersionState)(versionInfo);
|
|
192
|
+
const platform = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, "platform", teamsfx_api_1.Platform.VSCode);
|
|
193
193
|
return {
|
|
194
194
|
currentVersion: versionInfo.version,
|
|
195
195
|
source: versionInfo.source,
|
|
@@ -200,13 +200,13 @@ async function checkVersionForMigration(ctx) {
|
|
|
200
200
|
exports.checkVersionForMigration = checkVersionForMigration;
|
|
201
201
|
async function generateAppYml(context) {
|
|
202
202
|
var _a;
|
|
203
|
-
const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
|
|
203
|
+
const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
|
|
204
204
|
const oldProjectSettings = await loadProjectSettings(context.projectPath);
|
|
205
205
|
const appYmlGenerator = new appYmlGenerator_1.AppYmlGenerator(oldProjectSettings, bicepContent, context.projectPath);
|
|
206
206
|
const appYmlString = await appYmlGenerator.generateAppYml();
|
|
207
207
|
await context.fsWriteFile(versionMetadata_1.MetadataV3.configFile, appYmlString);
|
|
208
208
|
if (((_a = oldProjectSettings.programmingLanguage) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "csharp") {
|
|
209
|
-
const placeholderMappings = await debugV3MigrationUtils_1.getPlaceholderMappings(context);
|
|
209
|
+
const placeholderMappings = await (0, debugV3MigrationUtils_1.getPlaceholderMappings)(context);
|
|
210
210
|
const appLocalYmlString = await appYmlGenerator.generateAppLocalYml(placeholderMappings);
|
|
211
211
|
await context.fsWriteFile(versionMetadata_1.MetadataV3.localConfigFile, appLocalYmlString);
|
|
212
212
|
}
|
|
@@ -220,17 +220,17 @@ async function updateLaunchJson(context) {
|
|
|
220
220
|
const oldProjectSettings = await loadProjectSettings(context.projectPath);
|
|
221
221
|
if (oldProjectSettings.isM365) {
|
|
222
222
|
const jsonObject = JSON.parse(launchJsonContent);
|
|
223
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.teams, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.teamsRemote, 1));
|
|
224
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.teams, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.teamsRemote, 1));
|
|
223
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.teams, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.teamsRemote, 1));
|
|
224
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.teams, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.teamsRemote, 1));
|
|
225
225
|
if (debugV3MigrationUtils_1.OldProjectSettingsHelper.includeTab(oldProjectSettings)) {
|
|
226
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteTab, 2));
|
|
227
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteTab, 2));
|
|
228
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.office, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.officeRemoteTab, 3));
|
|
229
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.office, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.officeRemoteTab, 3));
|
|
226
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteTab, 2));
|
|
227
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteTab, 2));
|
|
228
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.office, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.officeRemoteTab, 3));
|
|
229
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.office, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.officeRemoteTab, 3));
|
|
230
230
|
}
|
|
231
231
|
else if (debugV3MigrationUtils_1.OldProjectSettingsHelper.includeBot(oldProjectSettings)) {
|
|
232
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteBot, 2));
|
|
233
|
-
jsonObject.configurations.push(debugV3MigrationUtils_1.launchRemote(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteBot, 2));
|
|
232
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.edge, "Edge", constants_2.LaunchUrl.outlookRemoteBot, 2));
|
|
233
|
+
jsonObject.configurations.push((0, debugV3MigrationUtils_1.launchRemote)(constants_2.HubName.outlook, constants_2.LaunchBrowser.chrome, "Chrome", constants_2.LaunchUrl.outlookRemoteBot, 2));
|
|
234
234
|
}
|
|
235
235
|
launchJsonContent = JSON.stringify(jsonObject, null, 4);
|
|
236
236
|
}
|
|
@@ -244,7 +244,7 @@ async function updateLaunchJson(context) {
|
|
|
244
244
|
}
|
|
245
245
|
exports.updateLaunchJson = updateLaunchJson;
|
|
246
246
|
async function loadProjectSettings(projectPath) {
|
|
247
|
-
const oldProjectSettings = await projectSettingsLoader_1.loadProjectSettingsByProjectPathV2(projectPath);
|
|
247
|
+
const oldProjectSettings = await (0, projectSettingsLoader_1.loadProjectSettingsByProjectPathV2)(projectPath);
|
|
248
248
|
if (oldProjectSettings.isOk()) {
|
|
249
249
|
return oldProjectSettings.value;
|
|
250
250
|
}
|
|
@@ -263,26 +263,26 @@ function isSPFxProject(projectSettings) {
|
|
|
263
263
|
exports.isSPFxProject = isSPFxProject;
|
|
264
264
|
async function manifestsMigration(context) {
|
|
265
265
|
// Check manifest existing
|
|
266
|
-
const oldAppPackageFolderPath = path.join(v3MigrationUtils_1.getTemplateFolderPath(context), teamsfx_api_1.AppPackageFolderName);
|
|
266
|
+
const oldAppPackageFolderPath = path.join((0, v3MigrationUtils_1.getTemplateFolderPath)(context), teamsfx_api_1.AppPackageFolderName);
|
|
267
267
|
const oldManifestPath = path.join(oldAppPackageFolderPath, constants_1.MANIFEST_TEMPLATE_CONSOLIDATE);
|
|
268
268
|
const oldManifestAbsolutePath = path.join(context.projectPath, oldManifestPath);
|
|
269
269
|
const oldManifestExists = await fs.pathExists(oldManifestAbsolutePath);
|
|
270
270
|
if (!oldManifestExists) {
|
|
271
271
|
// templates/appPackage/manifest.template.json does not exist
|
|
272
|
-
throw new error_1.MigrationError(new Error(localizeUtils_1.getLocalizedString("core.migrationV3.manifestNotExist")), exports.errorNames.manifestTemplateNotExist, exports.learnMoreLink);
|
|
272
|
+
throw new error_1.MigrationError(new Error((0, localizeUtils_1.getLocalizedString)("core.migrationV3.manifestNotExist")), exports.errorNames.manifestTemplateNotExist, exports.learnMoreLink);
|
|
273
273
|
}
|
|
274
274
|
// Validate manifest template
|
|
275
275
|
{
|
|
276
276
|
const res = await ManifestUtils_1.manifestUtils._readAppManifest(path.join(context.projectPath, oldManifestPath));
|
|
277
277
|
if (res.isErr()) {
|
|
278
|
-
throw new error_1.MigrationError(new Error(localizeUtils_1.getLocalizedString("core.migrationV3.manifestInvalid")), exports.errorNames.manifestTemplateInvalid);
|
|
278
|
+
throw new error_1.MigrationError(new Error((0, localizeUtils_1.getLocalizedString)("core.migrationV3.manifestInvalid")), exports.errorNames.manifestTemplateInvalid);
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
281
|
// Backup templates/appPackage
|
|
282
282
|
await context.backup(oldAppPackageFolderPath);
|
|
283
283
|
// Read Bicep
|
|
284
|
-
const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
|
|
285
|
-
if (v3MigrationUtils_1.isValidDomainForBotOutputKey(bicepContent)) {
|
|
284
|
+
const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
|
|
285
|
+
if ((0, v3MigrationUtils_1.isValidDomainForBotOutputKey)(bicepContent)) {
|
|
286
286
|
context.isBotValidDomain = true;
|
|
287
287
|
}
|
|
288
288
|
// Ensure appPackage
|
|
@@ -296,19 +296,19 @@ async function manifestsMigration(context) {
|
|
|
296
296
|
}
|
|
297
297
|
// Read capability project settings
|
|
298
298
|
const projectSettings = await loadProjectSettings(context.projectPath);
|
|
299
|
-
const capabilities = v3MigrationUtils_1.getCapabilityStatus(projectSettings);
|
|
300
|
-
const appIdUri = v3MigrationUtils_1.generateAppIdUri(capabilities);
|
|
299
|
+
const capabilities = (0, v3MigrationUtils_1.getCapabilityStatus)(projectSettings);
|
|
300
|
+
const appIdUri = (0, v3MigrationUtils_1.generateAppIdUri)(capabilities);
|
|
301
301
|
const isSpfx = isSPFxProject(projectSettings);
|
|
302
302
|
if (!isSpfx) {
|
|
303
|
-
await v3MigrationUtils_1.addMissingValidDomainForManifest(path.join(context.projectPath, oldManifestPath), capabilities.Tab, capabilities.BotSso, context.isBotValidDomain);
|
|
303
|
+
await (0, v3MigrationUtils_1.addMissingValidDomainForManifest)(path.join(context.projectPath, oldManifestPath), capabilities.Tab, capabilities.BotSso, context.isBotValidDomain);
|
|
304
304
|
}
|
|
305
305
|
// Read Teams app manifest and save to templates/appPackage/manifest.json
|
|
306
306
|
const manifestPath = path.join(teamsfx_api_1.AppPackageFolderName, versionMetadata_1.MetadataV3.teamsManifestFileName);
|
|
307
307
|
let oldManifest = await fs.readFile(path.join(context.projectPath, oldManifestPath), "utf8");
|
|
308
|
-
oldManifest = v3MigrationUtils_1.replaceAppIdUri(oldManifest, appIdUri);
|
|
309
|
-
const manifest = MigrationUtils_1.replacePlaceholdersForV3(oldManifest, bicepContent);
|
|
308
|
+
oldManifest = (0, v3MigrationUtils_1.replaceAppIdUri)(oldManifest, appIdUri);
|
|
309
|
+
const manifest = (0, MigrationUtils_1.replacePlaceholdersForV3)(oldManifest, bicepContent);
|
|
310
310
|
if (isSpfx) {
|
|
311
|
-
await v3MigrationUtils_1.updateAndSaveManifestForSpfx(context, manifest);
|
|
311
|
+
await (0, v3MigrationUtils_1.updateAndSaveManifestForSpfx)(context, manifest);
|
|
312
312
|
}
|
|
313
313
|
else {
|
|
314
314
|
await context.fsWriteFile(manifestPath, manifest);
|
|
@@ -325,12 +325,12 @@ async function manifestsMigration(context) {
|
|
|
325
325
|
}) >= 0);
|
|
326
326
|
if (oldAadManifestExists && aadRequired) {
|
|
327
327
|
let oldAadManifest = await fs.readFile(path.join(context.projectPath, oldAadManifestPath), "utf-8");
|
|
328
|
-
oldAadManifest = v3MigrationUtils_1.replaceAppIdUri(oldAadManifest, appIdUri);
|
|
329
|
-
const aadManifest = MigrationUtils_1.replacePlaceholdersForV3(oldAadManifest, bicepContent);
|
|
328
|
+
oldAadManifest = (0, v3MigrationUtils_1.replaceAppIdUri)(oldAadManifest, appIdUri);
|
|
329
|
+
const aadManifest = (0, MigrationUtils_1.replacePlaceholdersForV3)(oldAadManifest, bicepContent);
|
|
330
330
|
await context.fsWriteFile(versionMetadata_1.MetadataV3.aadManifestFileName, aadManifest);
|
|
331
331
|
}
|
|
332
332
|
else if (aadRequired && !oldAadManifestExists) {
|
|
333
|
-
throw new error_1.MigrationError(new Error(localizeUtils_1.getLocalizedString("core.migrationV3.aadManifestNotExist")), exports.errorNames.aadManifestTemplateNotExist, exports.learnMoreLink);
|
|
333
|
+
throw new error_1.MigrationError(new Error((0, localizeUtils_1.getLocalizedString)("core.migrationV3.aadManifestNotExist")), exports.errorNames.aadManifestTemplateNotExist, exports.learnMoreLink);
|
|
334
334
|
}
|
|
335
335
|
await context.fsRemove(oldAppPackageFolderPath);
|
|
336
336
|
}
|
|
@@ -344,9 +344,9 @@ async function azureParameterMigration(context) {
|
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
346
|
// Read Bicep
|
|
347
|
-
const azureFolderPath = path.join(v3MigrationUtils_1.getTemplateFolderPath(context), "azure");
|
|
348
|
-
const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
|
|
349
|
-
const fileNames = v3MigrationUtils_1.fsReadDirSync(context, configFolderPath);
|
|
347
|
+
const azureFolderPath = path.join((0, v3MigrationUtils_1.getTemplateFolderPath)(context), "azure");
|
|
348
|
+
const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
|
|
349
|
+
const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, configFolderPath);
|
|
350
350
|
for (const fileName of fileNames) {
|
|
351
351
|
if (!fileName.startsWith("azure.parameters.")) {
|
|
352
352
|
continue;
|
|
@@ -357,21 +357,21 @@ async function azureParameterMigration(context) {
|
|
|
357
357
|
continue;
|
|
358
358
|
}
|
|
359
359
|
const content = await fs.readFile(parameterPath, "utf-8");
|
|
360
|
-
const newContent = MigrationUtils_1.replacePlaceholdersForV3(content, bicepContent);
|
|
360
|
+
const newContent = (0, MigrationUtils_1.replacePlaceholdersForV3)(content, bicepContent);
|
|
361
361
|
await context.fsWriteFile(path.join(azureFolderPath, fileName), newContent);
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
364
|
exports.azureParameterMigration = azureParameterMigration;
|
|
365
365
|
async function showNotification(ctx, versionForMigration) {
|
|
366
|
-
const isNonmodalMessage = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.isNonmodalMessage);
|
|
366
|
+
const isNonmodalMessage = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.isNonmodalMessage);
|
|
367
367
|
if (isNonmodalMessage) {
|
|
368
368
|
return await showNonmodalNotification(ctx, versionForMigration);
|
|
369
369
|
}
|
|
370
|
-
const confirmOnly = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.confirmOnly);
|
|
370
|
+
const confirmOnly = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.confirmOnly);
|
|
371
371
|
if (confirmOnly) {
|
|
372
372
|
return await showConfirmOnlyNotification(ctx);
|
|
373
373
|
}
|
|
374
|
-
const skipUserConfirm = v3MigrationUtils_1.getParameterFromCxt(ctx, Parameters.skipUserConfirm);
|
|
374
|
+
const skipUserConfirm = (0, v3MigrationUtils_1.getParameterFromCxt)(ctx, Parameters.skipUserConfirm);
|
|
375
375
|
if (skipUserConfirm) {
|
|
376
376
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
|
|
377
377
|
[TelemetryPropertyKey.button]: TelemetryPropertyValue.ok,
|
|
@@ -387,21 +387,21 @@ async function askUserConfirm(ctx, versionForMigration) {
|
|
|
387
387
|
let answer;
|
|
388
388
|
do {
|
|
389
389
|
answer = await popupMessageModal(versionForMigration);
|
|
390
|
-
if (answer === exports.moreInfoButton()) {
|
|
390
|
+
if (answer === (0, exports.moreInfoButton)()) {
|
|
391
391
|
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.openUrl(exports.learnMoreLink);
|
|
392
392
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
|
|
393
393
|
[TelemetryPropertyKey.button]: TelemetryPropertyValue.learnMore,
|
|
394
394
|
[TelemetryPropertyKey.mode]: TelemetryPropertyValue.modal,
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
} while (answer === exports.moreInfoButton());
|
|
397
|
+
} while (answer === (0, exports.moreInfoButton)());
|
|
398
398
|
if (!answer || !migrationMessageButtons().includes(answer)) {
|
|
399
399
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
|
|
400
400
|
[TelemetryPropertyKey.button]: TelemetryPropertyValue.cancel,
|
|
401
401
|
[TelemetryPropertyKey.mode]: TelemetryPropertyValue.modal,
|
|
402
402
|
});
|
|
403
|
-
ctx.result = teamsfx_api_1.err(new error_1.UpgradeV3CanceledError());
|
|
404
|
-
v3MigrationUtils_1.outputCancelMessage(versionForMigration.currentVersion, versionForMigration.platform);
|
|
403
|
+
ctx.result = (0, teamsfx_api_1.err)(new error_1.UpgradeV3CanceledError());
|
|
404
|
+
(0, v3MigrationUtils_1.outputCancelMessage)(versionForMigration.currentVersion, versionForMigration.platform);
|
|
405
405
|
return false;
|
|
406
406
|
}
|
|
407
407
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
|
|
@@ -413,7 +413,7 @@ async function askUserConfirm(ctx, versionForMigration) {
|
|
|
413
413
|
async function showNonmodalNotification(ctx, versionForMigration) {
|
|
414
414
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotificationStart);
|
|
415
415
|
const answer = await popupMessageNonmodal(versionForMigration);
|
|
416
|
-
if (answer === exports.moreInfoButton()) {
|
|
416
|
+
if (answer === (0, exports.moreInfoButton)()) {
|
|
417
417
|
globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.openUrl(exports.learnMoreLink);
|
|
418
418
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
|
|
419
419
|
[TelemetryPropertyKey.button]: TelemetryPropertyValue.learnMore,
|
|
@@ -432,7 +432,7 @@ async function showNonmodalNotification(ctx, versionForMigration) {
|
|
|
432
432
|
}
|
|
433
433
|
async function showConfirmOnlyNotification(ctx) {
|
|
434
434
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotificationStart);
|
|
435
|
-
const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("info", localizeUtils_1.getLocalizedString("core.migrationV3.confirmOnly.Message"), true, "OK"));
|
|
435
|
+
const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("info", (0, localizeUtils_1.getLocalizedString)("core.migrationV3.confirmOnly.Message"), true, "OK"));
|
|
436
436
|
if ((res === null || res === void 0 ? void 0 : res.isOk()) && res.value === "OK") {
|
|
437
437
|
sendTelemetryEventForUpgrade(telemetry_1.Component.core, telemetry_1.TelemetryEvent.ProjectMigratorNotification, {
|
|
438
438
|
[TelemetryPropertyKey.button]: TelemetryPropertyValue.ok,
|
|
@@ -455,13 +455,13 @@ async function popupMessageNonmodal(versionForMigration) {
|
|
|
455
455
|
return await popupMessage(versionForMigration, false);
|
|
456
456
|
}
|
|
457
457
|
async function popupMessage(versionForMigration, isModal) {
|
|
458
|
-
const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", v3MigrationUtils_1.migrationNotificationMessage(versionForMigration), isModal, ...migrationMessageButtons()));
|
|
458
|
+
const res = await (globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.ui.showMessage("warn", (0, v3MigrationUtils_1.migrationNotificationMessage)(versionForMigration), isModal, ...migrationMessageButtons()));
|
|
459
459
|
return (res === null || res === void 0 ? void 0 : res.isOk()) ? res.value : undefined;
|
|
460
460
|
}
|
|
461
461
|
async function setTelemetryProjectId(context) {
|
|
462
|
-
const projectPath = v3MigrationUtils_1.getParameterFromCxt(context, "projectPath", "");
|
|
462
|
+
const projectPath = (0, v3MigrationUtils_1.getParameterFromCxt)(context, "projectPath", "");
|
|
463
463
|
try {
|
|
464
|
-
const projectId = await v3MigrationUtils_1.getTrackingIdFromPath(projectPath);
|
|
464
|
+
const projectId = await (0, v3MigrationUtils_1.getTrackingIdFromPath)(projectPath);
|
|
465
465
|
telemetryProperties[TelemetryPropertyKey.projectId] = projectId;
|
|
466
466
|
}
|
|
467
467
|
catch (error) {
|
|
@@ -472,7 +472,7 @@ async function configsMigration(context) {
|
|
|
472
472
|
// general
|
|
473
473
|
if (await context.fsPathExists(path.join(".fx", "configs"))) {
|
|
474
474
|
// if ./fx/states/ exists
|
|
475
|
-
const fileNames = v3MigrationUtils_1.fsReadDirSync(context, path.join(".fx", "configs")); // search all files, get file names
|
|
475
|
+
const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, path.join(".fx", "configs")); // search all files, get file names
|
|
476
476
|
for (const fileName of fileNames)
|
|
477
477
|
if (fileName.startsWith("config.")) {
|
|
478
478
|
const fileRegex = new RegExp("(config\\.)([a-zA-Z0-9_-]*)(\\.json)$", "g"); // config.*.json
|
|
@@ -488,9 +488,9 @@ async function configsMigration(context) {
|
|
|
488
488
|
// add first line of comment
|
|
489
489
|
await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envName === "local" ? versionMetadata_1.MetadataV3.envFileLocalComment : versionMetadata_1.MetadataV3.envFileDevComment, Constants.envWriteOption);
|
|
490
490
|
}
|
|
491
|
-
const obj = await v3MigrationUtils_1.readJsonFile(context, path.join(".fx", "configs", "config." + envName + ".json"));
|
|
491
|
+
const obj = await (0, v3MigrationUtils_1.readJsonFile)(context, path.join(".fx", "configs", "config." + envName + ".json"));
|
|
492
492
|
if (obj["manifest"]) {
|
|
493
|
-
const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
|
|
493
|
+
const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
|
|
494
494
|
const teamsfx_env = fs
|
|
495
495
|
.readFileSync(path.join(context.projectPath, versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName))
|
|
496
496
|
.toString()
|
|
@@ -499,7 +499,7 @@ async function configsMigration(context) {
|
|
|
499
499
|
: "TEAMSFX_ENV=" + envName + os_1.EOL + "APP_NAME_SUFFIX=" + envName + os_1.EOL;
|
|
500
500
|
// convert every name and add the env name at the first line
|
|
501
501
|
const envData = teamsfx_env +
|
|
502
|
-
v3MigrationUtils_1.jsonObjectNamesConvertV3(obj["manifest"], "manifest.", "", MigrationUtils_1.FileType.CONFIG, bicepContent);
|
|
502
|
+
(0, v3MigrationUtils_1.jsonObjectNamesConvertV3)(obj["manifest"], "manifest.", "", MigrationUtils_1.FileType.CONFIG, bicepContent);
|
|
503
503
|
await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envData, Constants.envWriteOption);
|
|
504
504
|
}
|
|
505
505
|
}
|
|
@@ -511,7 +511,7 @@ async function statesMigration(context) {
|
|
|
511
511
|
// general
|
|
512
512
|
if (await context.fsPathExists(path.join(".fx", "states"))) {
|
|
513
513
|
// if ./fx/states/ exists
|
|
514
|
-
const fileNames = v3MigrationUtils_1.fsReadDirSync(context, path.join(".fx", "states")); // search all files, get file names
|
|
514
|
+
const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, path.join(".fx", "states")); // search all files, get file names
|
|
515
515
|
for (const fileName of fileNames)
|
|
516
516
|
if (fileName.startsWith("state.")) {
|
|
517
517
|
const fileRegex = new RegExp("(state\\.)([a-zA-Z0-9_-]*)(\\.json)$", "g"); // state.*.json
|
|
@@ -527,11 +527,11 @@ async function statesMigration(context) {
|
|
|
527
527
|
// add first line of comment
|
|
528
528
|
await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envName === "local" ? versionMetadata_1.MetadataV3.envFileLocalComment : versionMetadata_1.MetadataV3.envFileDevComment, Constants.envWriteOption);
|
|
529
529
|
}
|
|
530
|
-
const obj = await v3MigrationUtils_1.readJsonFile(context, path.join(".fx", "states", "state." + envName + ".json"));
|
|
530
|
+
const obj = await (0, v3MigrationUtils_1.readJsonFile)(context, path.join(".fx", "states", "state." + envName + ".json"));
|
|
531
531
|
if (obj) {
|
|
532
|
-
const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
|
|
532
|
+
const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
|
|
533
533
|
// convert every name
|
|
534
|
-
const envData = v3MigrationUtils_1.jsonObjectNamesConvertV3(obj, "state.", "", MigrationUtils_1.FileType.STATE, bicepContent);
|
|
534
|
+
const envData = (0, v3MigrationUtils_1.jsonObjectNamesConvertV3)(obj, "state.", "", MigrationUtils_1.FileType.STATE, bicepContent);
|
|
535
535
|
await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, Constants.envFilePrefix + envName), envData, Constants.envWriteOption);
|
|
536
536
|
}
|
|
537
537
|
}
|
|
@@ -545,17 +545,17 @@ async function userdataMigration(context) {
|
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
547
|
await context.fsEnsureDir(versionMetadata_1.MetadataV3.defaultEnvironmentFolder);
|
|
548
|
-
const stateFiles = v3MigrationUtils_1.fsReadDirSync(context, stateFolder); // search all files, get file names
|
|
548
|
+
const stateFiles = (0, v3MigrationUtils_1.fsReadDirSync)(context, stateFolder); // search all files, get file names
|
|
549
549
|
for (const stateFile of stateFiles) {
|
|
550
|
-
const envName = v3MigrationUtils_1.tryExtractEnvFromUserdata(stateFile);
|
|
550
|
+
const envName = (0, v3MigrationUtils_1.tryExtractEnvFromUserdata)(stateFile);
|
|
551
551
|
if (envName) {
|
|
552
552
|
// get envName
|
|
553
|
-
const envFileName = v3MigrationUtils_1.buildEnvUserFileName(envName);
|
|
554
|
-
const bicepContent = await v3MigrationUtils_1.readBicepContent(context);
|
|
553
|
+
const envFileName = (0, v3MigrationUtils_1.buildEnvUserFileName)(envName);
|
|
554
|
+
const bicepContent = await (0, v3MigrationUtils_1.readBicepContent)(context);
|
|
555
555
|
const envData = versionMetadata_1.MetadataV3.secretFileComment +
|
|
556
556
|
os_1.EOL +
|
|
557
557
|
versionMetadata_1.MetadataV3.secretComment +
|
|
558
|
-
(await v3MigrationUtils_1.readAndConvertUserdata(context, path.join(stateFolder, stateFile), bicepContent));
|
|
558
|
+
(await (0, v3MigrationUtils_1.readAndConvertUserdata)(context, path.join(stateFolder, stateFile), bicepContent));
|
|
559
559
|
await context.fsWriteFile(path.join(versionMetadata_1.MetadataV3.defaultEnvironmentFolder, envFileName), envData, Constants.envWriteOption);
|
|
560
560
|
}
|
|
561
561
|
}
|
|
@@ -565,8 +565,8 @@ async function debugMigration(context) {
|
|
|
565
565
|
// Backup vscode/tasks.json
|
|
566
566
|
await context.backup(Constants.tasksJsonPath);
|
|
567
567
|
// Read .vscode/tasks.json
|
|
568
|
-
const tasksJsonContent = await debugV3MigrationUtils_1.readJsonCommentFile(path.join(context.projectPath, Constants.tasksJsonPath));
|
|
569
|
-
if (!debugV3MigrationUtils_1.isCommentObject(tasksJsonContent) || !Array.isArray(tasksJsonContent["tasks"])) {
|
|
568
|
+
const tasksJsonContent = await (0, debugV3MigrationUtils_1.readJsonCommentFile)(path.join(context.projectPath, Constants.tasksJsonPath));
|
|
569
|
+
if (!(0, debugV3MigrationUtils_1.isCommentObject)(tasksJsonContent) || !Array.isArray(tasksJsonContent["tasks"])) {
|
|
570
570
|
// Invalid tasks.json content
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
@@ -594,7 +594,7 @@ async function debugMigration(context) {
|
|
|
594
594
|
taskMigrator_1.migrateGetFuncPathCommand,
|
|
595
595
|
];
|
|
596
596
|
const oldProjectSettings = await loadProjectSettings(context.projectPath);
|
|
597
|
-
const placeholderMappings = await debugV3MigrationUtils_1.getPlaceholderMappings(context);
|
|
597
|
+
const placeholderMappings = await (0, debugV3MigrationUtils_1.getPlaceholderMappings)(context);
|
|
598
598
|
const debugContext = new debugMigrationContext_1.DebugMigrationContext(context, tasksJsonContent["tasks"], oldProjectSettings, placeholderMappings);
|
|
599
599
|
for (const func of migrateTaskFuncs) {
|
|
600
600
|
await func(debugContext);
|
|
@@ -625,7 +625,7 @@ async function generateApimPluginEnvContent(context) {
|
|
|
625
625
|
const projectSettingsContent = fs.readJsonSync(path.join(context.projectPath, ".fx", "configs", "projectSettings.json"));
|
|
626
626
|
// judge if apim plugin exists
|
|
627
627
|
if (checkapimPluginExists(projectSettingsContent)) {
|
|
628
|
-
const fileNames = v3MigrationUtils_1.fsReadDirSync(context, path.join(".fx", "configs"));
|
|
628
|
+
const fileNames = (0, v3MigrationUtils_1.fsReadDirSync)(context, path.join(".fx", "configs"));
|
|
629
629
|
for (const fileName of fileNames)
|
|
630
630
|
if (fileName.startsWith("config.")) {
|
|
631
631
|
const fileRegex = new RegExp("(config.)([a-zA-Z0-9_-]*)(.json)$", "g"); // config.*.json
|
|
@@ -678,8 +678,8 @@ async function updateGitignore(context) {
|
|
|
678
678
|
await context.fsCreateFile(gitignoreFile);
|
|
679
679
|
}
|
|
680
680
|
let ignoreFileContent = await fs.readFile(path.join(context.projectPath, gitignoreFile), "utf8");
|
|
681
|
-
ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${v3MigrationUtils_1.buildEnvUserFileName("*")}`;
|
|
682
|
-
ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${v3MigrationUtils_1.buildEnvFileName("local")}`;
|
|
681
|
+
ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${(0, v3MigrationUtils_1.buildEnvUserFileName)("*")}`;
|
|
682
|
+
ignoreFileContent += os_1.EOL + `${versionMetadata_1.MetadataV3.defaultEnvironmentFolder}/${(0, v3MigrationUtils_1.buildEnvFileName)("local")}`;
|
|
683
683
|
ignoreFileContent += os_1.EOL + `${migrationContext_1.backupFolder}/*`;
|
|
684
684
|
ignoreFileContent += os_1.EOL + debugV3MigrationUtils_1.ignoreDevToolsDir;
|
|
685
685
|
await context.fsWriteFile(gitignoreFile, ignoreFileContent);
|
|
@@ -687,10 +687,10 @@ async function updateGitignore(context) {
|
|
|
687
687
|
exports.updateGitignore = updateGitignore;
|
|
688
688
|
function sendTelemetryEventForUpgrade(component, eventName, properties, measurements) {
|
|
689
689
|
const mergedProperties = Object.assign(Object.assign({}, properties), telemetryProperties);
|
|
690
|
-
telemetry_1.sendTelemetryEvent(component, eventName, mergedProperties, measurements);
|
|
690
|
+
(0, telemetry_1.sendTelemetryEvent)(component, eventName, mergedProperties, measurements);
|
|
691
691
|
}
|
|
692
692
|
function sendTelemetryErrorEventForUpgrade(component, eventName, fxError, properties) {
|
|
693
693
|
const mergedProperties = Object.assign(Object.assign({}, properties), telemetryProperties);
|
|
694
|
-
telemetry_1.sendTelemetryErrorEvent(component, eventName, fxError, mergedProperties);
|
|
694
|
+
(0, telemetry_1.sendTelemetryErrorEvent)(component, eventName, fxError, mergedProperties);
|
|
695
695
|
}
|
|
696
696
|
//# sourceMappingURL=projectMigratorV3.js.map
|