@microsoft/teamsfx-core 2.0.7 → 2.0.8-alpha.2a327dc81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/common/constants.d.ts +7 -1
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +7 -1
- package/build/common/constants.js.map +1 -1
- package/build/common/featureFlags.d.ts +6 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +28 -2
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/m365/packageService.d.ts +1 -0
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +15 -2
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectSettingsHelper.d.ts +3 -0
- package/build/common/projectSettingsHelper.d.ts.map +1 -1
- package/build/common/projectSettingsHelper.js +29 -1
- package/build/common/projectSettingsHelper.js.map +1 -1
- package/build/common/projectTypeChecker.d.ts.map +1 -1
- package/build/common/projectTypeChecker.js +1 -2
- package/build/common/projectTypeChecker.js.map +1 -1
- package/build/common/samples.d.ts +3 -2
- package/build/common/samples.d.ts.map +1 -1
- package/build/common/samples.js +84 -40
- package/build/common/samples.js.map +1 -1
- package/build/common/telemetry.d.ts +3 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +2 -0
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +3 -2
- package/build/common/wrappedAxiosClient.d.ts +59 -0
- package/build/common/wrappedAxiosClient.d.ts.map +1 -0
- package/build/common/wrappedAxiosClient.js +247 -0
- package/build/common/wrappedAxiosClient.js.map +1 -0
- package/build/component/constant/commonConstant.d.ts +5 -0
- package/build/component/constant/commonConstant.d.ts.map +1 -1
- package/build/component/constant/commonConstant.js +7 -1
- package/build/component/constant/commonConstant.js.map +1 -1
- package/build/component/coordinator/index.d.ts +10 -1
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +77 -10
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/developerPortalScaffoldUtils.d.ts.map +1 -1
- package/build/component/developerPortalScaffoldUtils.js +0 -2
- package/build/component/developerPortalScaffoldUtils.js.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.d.ts +1 -0
- package/build/component/driver/aad/utility/aadAppClient.d.ts.map +1 -1
- package/build/component/driver/aad/utility/aadAppClient.js +9 -0
- package/build/component/driver/aad/utility/aadAppClient.js.map +1 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js +2 -1
- package/build/component/driver/aad/utility/aadManifestHelper.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js +5 -7
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.d.ts.map +1 -1
- package/build/component/driver/botFramework/createOrUpdateBot.js +0 -2
- package/build/component/driver/botFramework/createOrUpdateBot.js.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.d.ts.map +1 -1
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js +5 -5
- package/build/component/driver/deploy/azure/impl/AzureZipDeployImpl.js.map +1 -1
- package/build/component/driver/deploy/spfx/utility/spoClient.d.ts.map +1 -1
- package/build/component/driver/deploy/spfx/utility/spoClient.js +3 -1
- package/build/component/driver/deploy/spfx/utility/spoClient.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/teamsApp/appStudio.d.ts.map +1 -1
- package/build/component/driver/teamsApp/appStudio.js +0 -2
- package/build/component/driver/teamsApp/appStudio.js.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +31 -9
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +86 -111
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/authSvcClient.js +3 -24
- package/build/component/driver/teamsApp/clients/authSvcClient.js.map +1 -1
- package/build/component/driver/teamsApp/configure.d.ts.map +1 -1
- package/build/component/driver/teamsApp/configure.js +0 -2
- package/build/component/driver/teamsApp/configure.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +4 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +6 -1
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/create.d.ts.map +1 -1
- package/build/component/driver/teamsApp/create.js +0 -2
- package/build/component/driver/teamsApp/create.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +3 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +61 -14
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/errors.d.ts +4 -0
- package/build/component/driver/teamsApp/errors.d.ts.map +1 -1
- package/build/component/driver/teamsApp/errors.js +7 -0
- package/build/component/driver/teamsApp/errors.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts +21 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js +5 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationDetailsResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts +17 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js +16 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts +41 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js +5 -0
- package/build/component/driver/teamsApp/interfaces/AsyncAppValidationResultsResponse.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts +17 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js +5 -0
- package/build/component/driver/teamsApp/interfaces/ValidateWithTestCasesArgs.js.map +1 -0
- package/build/component/driver/teamsApp/publishAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/publishAppPackage.js +3 -5
- package/build/component/driver/teamsApp/publishAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts +1 -0
- package/build/component/driver/teamsApp/utils/ManifestUtils.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/ManifestUtils.js +17 -0
- package/build/component/driver/teamsApp/utils/ManifestUtils.js.map +1 -1
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts +8 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.d.ts.map +1 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js +63 -0
- package/build/component/driver/teamsApp/utils/PluginManifestUtils.js.map +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +0 -31
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +1 -53
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/driver/teamsApp/validate.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validate.js +0 -1
- package/build/component/driver/teamsApp/validate.js.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/validateAppPackage.js +0 -1
- package/build/component/driver/teamsApp/validateAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/validateTestCases.d.ts +22 -0
- package/build/component/driver/teamsApp/validateTestCases.d.ts.map +1 -0
- package/build/component/driver/teamsApp/validateTestCases.js +156 -0
- package/build/component/driver/teamsApp/validateTestCases.js.map +1 -0
- package/build/component/feature/collaboration.d.ts +1 -1
- package/build/component/feature/collaboration.d.ts.map +1 -1
- package/build/component/feature/collaboration.js +2 -4
- package/build/component/feature/collaboration.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts +5 -2
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +101 -26
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +8 -3
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +274 -29
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- 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 +4 -4
- package/build/component/generator/error.js.map +1 -1
- package/build/component/generator/generator.d.ts +6 -1
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +32 -26
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorAction.d.ts +5 -16
- package/build/component/generator/generatorAction.d.ts.map +1 -1
- package/build/component/generator/generatorAction.js +46 -87
- package/build/component/generator/generatorAction.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts +32 -1
- package/build/component/generator/officeAddin/config/projectProperties.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectProperties.js +33 -2
- package/build/component/generator/officeAddin/config/projectProperties.js.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts +7 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.d.ts.map +1 -1
- package/build/component/generator/officeAddin/config/projectsJsonData.js +54 -4
- package/build/component/generator/officeAddin/config/projectsJsonData.js.map +1 -1
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +31 -10
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +2 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +21 -10
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/officeXMLAddin/generator.d.ts +9 -0
- package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -0
- package/build/component/generator/officeXMLAddin/generator.js +90 -0
- package/build/component/generator/officeXMLAddin/generator.js.map +1 -0
- package/build/component/generator/officeXMLAddin/projectConfig.d.ts +36 -0
- package/build/component/generator/officeXMLAddin/projectConfig.d.ts.map +1 -0
- package/build/component/generator/officeXMLAddin/projectConfig.js +127 -0
- package/build/component/generator/officeXMLAddin/projectConfig.js.map +1 -0
- package/build/component/generator/utils.d.ts +2 -1
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +35 -16
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/middleware/envMW.d.ts.map +1 -1
- package/build/component/middleware/envMW.js +1 -0
- package/build/component/middleware/envMW.js.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.d.ts.map +1 -1
- package/build/component/resource/botService/appStudio/appStudioClient.js +11 -39
- package/build/component/resource/botService/appStudio/appStudioClient.js.map +1 -1
- package/build/component/utils/envUtil.d.ts +2 -0
- package/build/component/utils/envUtil.d.ts.map +1 -1
- package/build/component/utils/envUtil.js +23 -0
- package/build/component/utils/envUtil.js.map +1 -1
- package/build/component/utils/pathUtils.d.ts.map +1 -1
- package/build/component/utils/pathUtils.js +2 -0
- package/build/component/utils/pathUtils.js.map +1 -1
- package/build/core/FxCore.d.ts +2 -0
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +91 -17
- package/build/core/FxCore.js.map +1 -1
- package/build/core/collaborator.js +3 -3
- package/build/core/collaborator.js.map +1 -1
- package/build/core/middleware/projectMigratorV3.d.ts.map +1 -1
- package/build/core/middleware/projectMigratorV3.js +6 -1
- package/build/core/middleware/projectMigratorV3.js.map +1 -1
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +1 -1
- package/build/error/common.js.map +1 -1
- package/build/error/deploy.d.ts.map +1 -1
- package/build/error/deploy.js +17 -6
- package/build/error/deploy.js.map +1 -1
- package/build/index.d.ts +0 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -3
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts +1 -0
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +2 -1
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +35 -2
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +578 -79
- package/build/question/create.js.map +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts +22 -8
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +58 -12
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/other.d.ts +1 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +17 -1
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +10 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +9 -0
- package/build/question/questionNames.js.map +1 -1
- package/package.json +4 -4
- package/resource/package.nls.json +208 -116
- 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/Enable SSO.txt +1 -1
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts +0 -7
- package/build/common/spec-parser/adaptiveCardGenerator.d.ts.map +0 -1
- package/build/common/spec-parser/adaptiveCardGenerator.js +0 -168
- package/build/common/spec-parser/adaptiveCardGenerator.js.map +0 -1
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts +0 -15
- package/build/common/spec-parser/adaptiveCardWrapper.d.ts.map +0 -1
- package/build/common/spec-parser/adaptiveCardWrapper.js +0 -98
- package/build/common/spec-parser/adaptiveCardWrapper.js.map +0 -1
- package/build/common/spec-parser/constants.d.ts +0 -41
- package/build/common/spec-parser/constants.d.ts.map +0 -1
- package/build/common/spec-parser/constants.js +0 -95
- package/build/common/spec-parser/constants.js.map +0 -1
- package/build/common/spec-parser/index.browser.d.ts +0 -6
- package/build/common/spec-parser/index.browser.d.ts.map +0 -1
- package/build/common/spec-parser/index.browser.js +0 -16
- package/build/common/spec-parser/index.browser.js.map +0 -1
- package/build/common/spec-parser/index.d.ts +0 -5
- package/build/common/spec-parser/index.d.ts.map +0 -1
- package/build/common/spec-parser/index.js +0 -16
- package/build/common/spec-parser/index.js.map +0 -1
- package/build/common/spec-parser/interfaces.d.ts +0 -180
- package/build/common/spec-parser/interfaces.d.ts.map +0 -1
- package/build/common/spec-parser/interfaces.js +0 -51
- package/build/common/spec-parser/interfaces.js.map +0 -1
- package/build/common/spec-parser/manifestUpdater.d.ts +0 -7
- package/build/common/spec-parser/manifestUpdater.d.ts.map +0 -1
- package/build/common/spec-parser/manifestUpdater.js +0 -98
- package/build/common/spec-parser/manifestUpdater.js.map +0 -1
- package/build/common/spec-parser/specFilter.d.ts +0 -3
- package/build/common/spec-parser/specFilter.d.ts.map +0 -1
- package/build/common/spec-parser/specFilter.js +0 -40
- package/build/common/spec-parser/specFilter.js.map +0 -1
- package/build/common/spec-parser/specParser.browser.d.ts +0 -46
- package/build/common/spec-parser/specParser.browser.d.ts.map +0 -1
- package/build/common/spec-parser/specParser.browser.js +0 -139
- package/build/common/spec-parser/specParser.browser.js.map +0 -1
- package/build/common/spec-parser/specParser.d.ts +0 -46
- package/build/common/spec-parser/specParser.d.ts.map +0 -1
- package/build/common/spec-parser/specParser.js +0 -244
- package/build/common/spec-parser/specParser.js.map +0 -1
- package/build/common/spec-parser/specParserError.d.ts +0 -6
- package/build/common/spec-parser/specParserError.d.ts.map +0 -1
- package/build/common/spec-parser/specParserError.js +0 -13
- package/build/common/spec-parser/specParserError.js.map +0 -1
- package/build/common/spec-parser/utils.d.ts +0 -43
- package/build/common/spec-parser/utils.d.ts.map +0 -1
- package/build/common/spec-parser/utils.js +0 -595
- package/build/common/spec-parser/utils.js.map +0 -1
package/build/common/samples.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright (c) Microsoft Corporation.
|
|
3
3
|
// Licensed under the MIT license.
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.sampleProvider = exports.SampleConfigBranchForPrerelease = exports.
|
|
5
|
+
exports.sampleProvider = exports.SampleConfigBranchForPrerelease = exports.OfficeSampleConfigTag = exports.TeamsSampleConfigTag = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
8
8
|
const hooks_1 = require("@feathersjs/hooks");
|
|
@@ -12,9 +12,12 @@ const common_1 = require("../error/common");
|
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
13
|
const packageJson = require("../../package.json");
|
|
14
14
|
const SampleConfigOwner = "OfficeDev";
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
15
|
+
const TeamsSampleConfigRepo = "TeamsFx-Samples";
|
|
16
|
+
const TeamsSampleConfigFile = ".config/samples-config-v3.json";
|
|
17
|
+
const OfficeSampleConfigRepo = "Office-Samples";
|
|
18
|
+
const OfficeSampleConfigFile = ".config/samples-config-v1.json";
|
|
19
|
+
exports.TeamsSampleConfigTag = "v2.4.0";
|
|
20
|
+
exports.OfficeSampleConfigTag = "v0.0.1";
|
|
18
21
|
// prerelease tag is always using a branch.
|
|
19
22
|
exports.SampleConfigBranchForPrerelease = "main";
|
|
20
23
|
class SampleProvider {
|
|
@@ -25,78 +28,119 @@ class SampleProvider {
|
|
|
25
28
|
return Promise.resolve(this.sampleCollection);
|
|
26
29
|
}
|
|
27
30
|
async refreshSampleConfig() {
|
|
28
|
-
const
|
|
29
|
-
|
|
31
|
+
const teamsRet = await this.fetchOnlineSampleConfig(TeamsSampleConfigRepo, TeamsSampleConfigFile);
|
|
32
|
+
const teamsSampleCollection = await this.parseOnlineSampleConfig(SampleConfigOwner, TeamsSampleConfigRepo, teamsRet.samplesConfig, teamsRet.ref);
|
|
33
|
+
const officeRet = await this.fetchOnlineSampleConfig(OfficeSampleConfigRepo, OfficeSampleConfigFile);
|
|
34
|
+
const officeSampleCollection = await this.parseOnlineSampleConfig(SampleConfigOwner, OfficeSampleConfigRepo, officeRet.samplesConfig, officeRet.ref);
|
|
35
|
+
// merge samples from TeamsFx-Samples and Office-Samples
|
|
36
|
+
// use Set to remove duplicates
|
|
37
|
+
this.sampleCollection = {
|
|
38
|
+
samples: [...teamsSampleCollection.samples, ...officeSampleCollection.samples],
|
|
39
|
+
filterOptions: {
|
|
40
|
+
capabilities: Array.from(new Set([
|
|
41
|
+
...teamsSampleCollection.filterOptions.capabilities,
|
|
42
|
+
...officeSampleCollection.filterOptions.capabilities,
|
|
43
|
+
])),
|
|
44
|
+
languages: Array.from(new Set([
|
|
45
|
+
...teamsSampleCollection.filterOptions.languages,
|
|
46
|
+
...officeSampleCollection.filterOptions.languages,
|
|
47
|
+
])),
|
|
48
|
+
technologies: Array.from(new Set([
|
|
49
|
+
...teamsSampleCollection.filterOptions.technologies,
|
|
50
|
+
...officeSampleCollection.filterOptions.technologies,
|
|
51
|
+
])),
|
|
52
|
+
},
|
|
53
|
+
};
|
|
30
54
|
return this.sampleCollection;
|
|
31
55
|
}
|
|
32
|
-
async fetchOnlineSampleConfig() {
|
|
56
|
+
async fetchOnlineSampleConfig(configRepo, configFile) {
|
|
57
|
+
const getRef = (configRepo, version) => {
|
|
58
|
+
if (configRepo === TeamsSampleConfigRepo) {
|
|
59
|
+
// Set default value for branchOrTag
|
|
60
|
+
if (version.includes("alpha")) {
|
|
61
|
+
// daily build version always use 'dev' branch
|
|
62
|
+
return "dev";
|
|
63
|
+
}
|
|
64
|
+
else if (version.includes("beta")) {
|
|
65
|
+
// prerelease build version always use branch head for prerelease.
|
|
66
|
+
return exports.SampleConfigBranchForPrerelease;
|
|
67
|
+
}
|
|
68
|
+
else if (version.includes("rc")) {
|
|
69
|
+
// if there is a breaking change, the tag is not used by any stable version.
|
|
70
|
+
return exports.TeamsSampleConfigTag;
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
// stable version uses the head of branch defined by feature flag when available
|
|
74
|
+
return exports.TeamsSampleConfigTag;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// Office Samples
|
|
79
|
+
if (version.includes("alpha")) {
|
|
80
|
+
return "dev";
|
|
81
|
+
}
|
|
82
|
+
else if (version.includes("beta")) {
|
|
83
|
+
return exports.SampleConfigBranchForPrerelease;
|
|
84
|
+
}
|
|
85
|
+
else if (version.includes("rc")) {
|
|
86
|
+
return exports.OfficeSampleConfigTag;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return exports.OfficeSampleConfigTag;
|
|
90
|
+
}
|
|
91
|
+
// return "dev";
|
|
92
|
+
}
|
|
93
|
+
};
|
|
33
94
|
const version = packageJson.version;
|
|
34
|
-
const configBranchInEnv = process.env[
|
|
95
|
+
const configBranchInEnv = process.env[configRepo === TeamsSampleConfigRepo
|
|
96
|
+
? constants_1.FeatureFlagName.TeamsSampleConfigBranch
|
|
97
|
+
: constants_1.FeatureFlagName.OfficeSampleConfigBranch];
|
|
35
98
|
let samplesConfig;
|
|
36
|
-
let ref =
|
|
37
|
-
// Set default value for branchOrTag
|
|
38
|
-
if (version.includes("alpha")) {
|
|
39
|
-
// daily build version always use 'dev' branch
|
|
40
|
-
ref = "dev";
|
|
41
|
-
}
|
|
42
|
-
else if (version.includes("beta")) {
|
|
43
|
-
// prerelease build version always use branch head for prerelease.
|
|
44
|
-
ref = exports.SampleConfigBranchForPrerelease;
|
|
45
|
-
}
|
|
46
|
-
else if (version.includes("rc")) {
|
|
47
|
-
// if there is a breaking change, the tag is not used by any stable version.
|
|
48
|
-
ref = exports.SampleConfigTag;
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
// stable version uses the head of branch defined by feature flag when available
|
|
52
|
-
ref = exports.SampleConfigTag;
|
|
53
|
-
}
|
|
99
|
+
let ref = getRef(configRepo, version);
|
|
54
100
|
// Set branchOrTag value if branch in env is valid
|
|
55
101
|
if (configBranchInEnv) {
|
|
56
102
|
try {
|
|
57
|
-
const data = await this.fetchRawFileContent(configBranchInEnv);
|
|
103
|
+
const data = await this.fetchRawFileContent(SampleConfigOwner, configRepo, configBranchInEnv, configFile);
|
|
58
104
|
ref = configBranchInEnv;
|
|
59
105
|
samplesConfig = data;
|
|
60
106
|
}
|
|
61
107
|
catch (e) { }
|
|
62
108
|
}
|
|
63
109
|
if (samplesConfig === undefined) {
|
|
64
|
-
samplesConfig = (await this.fetchRawFileContent(ref));
|
|
110
|
+
samplesConfig = (await this.fetchRawFileContent(SampleConfigOwner, configRepo, ref, configFile));
|
|
65
111
|
}
|
|
66
112
|
return { samplesConfig, ref };
|
|
67
113
|
}
|
|
68
|
-
parseOnlineSampleConfig(samplesConfig, ref) {
|
|
114
|
+
parseOnlineSampleConfig(samplesOnwer, samplesRepo, samplesConfig, ref) {
|
|
69
115
|
const samples = (samplesConfig === null || samplesConfig === void 0 ? void 0 : samplesConfig.samples.map((sample) => {
|
|
70
116
|
const isExternal = sample["downloadUrlInfo"] ? true : false;
|
|
71
117
|
let gifUrl = sample["gifPath"] !== undefined
|
|
72
|
-
? `https://raw.githubusercontent.com/${
|
|
118
|
+
? `https://raw.githubusercontent.com/${samplesOnwer}/${samplesRepo}/${ref}/${sample["id"]}/${sample["gifPath"]}`
|
|
73
119
|
: undefined;
|
|
74
|
-
let thumbnailUrl = `https://raw.githubusercontent.com/${SampleConfigOwner}/${SampleConfigRepo}/${ref}/${sample["id"]}/${sample["thumbnailPath"]}`;
|
|
75
120
|
if (isExternal) {
|
|
76
121
|
const info = sample["downloadUrlInfo"];
|
|
77
122
|
gifUrl =
|
|
78
123
|
sample["gifPath"] !== undefined
|
|
79
124
|
? `https://raw.githubusercontent.com/${info.owner}/${info.repository}/${info.ref}/${info.dir}/${sample["gifPath"]}`
|
|
80
125
|
: undefined;
|
|
81
|
-
thumbnailUrl = `https://raw.githubusercontent.com/${info.owner}/${info.repository}/${info.ref}/${info.dir}/${sample["thumbnailPath"]}`;
|
|
82
126
|
}
|
|
83
127
|
return Object.assign(Object.assign({}, sample), { onboardDate: new Date(sample["onboardDate"]), downloadUrlInfo: isExternal
|
|
84
128
|
? sample["downloadUrlInfo"]
|
|
85
129
|
: {
|
|
86
130
|
owner: SampleConfigOwner,
|
|
87
|
-
repository:
|
|
131
|
+
repository: samplesRepo,
|
|
88
132
|
ref: ref,
|
|
89
133
|
dir: sample["id"],
|
|
90
|
-
}, gifUrl: gifUrl
|
|
134
|
+
}, gifUrl: gifUrl });
|
|
91
135
|
})) || [];
|
|
92
|
-
return {
|
|
136
|
+
return Promise.resolve({
|
|
93
137
|
samples,
|
|
94
138
|
filterOptions: {
|
|
95
139
|
capabilities: (samplesConfig === null || samplesConfig === void 0 ? void 0 : samplesConfig.filterOptions["capabilities"]) || [],
|
|
96
140
|
languages: (samplesConfig === null || samplesConfig === void 0 ? void 0 : samplesConfig.filterOptions["languages"]) || [],
|
|
97
141
|
technologies: (samplesConfig === null || samplesConfig === void 0 ? void 0 : samplesConfig.filterOptions["technologies"]) || [],
|
|
98
142
|
},
|
|
99
|
-
};
|
|
143
|
+
});
|
|
100
144
|
}
|
|
101
145
|
async getSampleReadmeHtml(sample) {
|
|
102
146
|
const urlInfo = sample.downloadUrlInfo;
|
|
@@ -121,8 +165,8 @@ class SampleProvider {
|
|
|
121
165
|
throw new common_1.AccessGithubError(url, "SampleProvider", e);
|
|
122
166
|
}
|
|
123
167
|
}
|
|
124
|
-
async fetchRawFileContent(branchOrTag) {
|
|
125
|
-
const url = `https://raw.githubusercontent.com/${
|
|
168
|
+
async fetchRawFileContent(configOwner, configRepo, branchOrTag, configFile) {
|
|
169
|
+
const url = `https://raw.githubusercontent.com/${configOwner}/${configRepo}/${branchOrTag}/${configFile}`;
|
|
126
170
|
try {
|
|
127
171
|
const fileResponse = await utils_1.sendRequestWithTimeout(async () => {
|
|
128
172
|
return await axios_1.default.get(url, { responseType: "json" });
|
|
@@ -139,8 +183,8 @@ class SampleProvider {
|
|
|
139
183
|
tslib_1.__decorate([
|
|
140
184
|
hooks_1.hooks([globalVars_1.ErrorContextMW({ component: "SampleProvider" })]),
|
|
141
185
|
tslib_1.__metadata("design:type", Function),
|
|
142
|
-
tslib_1.__metadata("design:paramtypes", [Object, String]),
|
|
143
|
-
tslib_1.__metadata("design:returntype",
|
|
186
|
+
tslib_1.__metadata("design:paramtypes", [String, String, Object, String]),
|
|
187
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
144
188
|
], SampleProvider.prototype, "parseOnlineSampleConfig", null);
|
|
145
189
|
exports.sampleProvider = new SampleProvider();
|
|
146
190
|
//# sourceMappingURL=samples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"samples.js","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,0DAA0B;AAE1B,6CAA0C;AAE1C,wDAAqF;AACrF,mDAAoD;AACpD,4CAAoD;AACpD,2CAA8C;AAE9C,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAElD,MAAM,iBAAiB,GAAG,WAAW,CAAC;AACtC,MAAM,
|
|
1
|
+
{"version":3,"file":"samples.js","sourceRoot":"","sources":["../../src/common/samples.ts"],"names":[],"mapp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WAAW,IAAI,UAAU,IAAI,WAAW,IAAI,UAAU,EAAE,CAAC;QAC1G,IAAI;YACF,MAAM,YAAY,GAAG,MAAM,8BAAsB,CAC/C,KAAK,IAAI,EAAE;gBACT,OAAO,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;YACxD,CAAC,EACD,IAAI,EACJ,CAAC,CACF,CAAC;YAEF,IAAI,YAAY,IAAI,YAAY,CAAC,IAAI,EAAE;gBACrC,OAAO,YAAY,CAAC,IAAI,CAAC;aAC1B;SACF;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,IAAI,0BAAiB,CAAC,GAAG,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;SACvD;IACH,CAAC;CACF;AAnGC;IADC,aAAK,CAAC,CAAC,2BAAc,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;;;;6DAgDxD;AAsDU,QAAA,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -115,7 +115,9 @@ export declare enum TelemetryEvent {
|
|
|
115
115
|
SkipDeploy = "skip-deploy",
|
|
116
116
|
PublishInDeveloperPortal = "publish-in-developer-portal",
|
|
117
117
|
MetaData = "metadata",
|
|
118
|
-
ProjectType = "project-type"
|
|
118
|
+
ProjectType = "project-type",
|
|
119
|
+
DependencyApi = "dependency-api",
|
|
120
|
+
AppStudioApi = "app-studio-api"
|
|
119
121
|
}
|
|
120
122
|
export declare enum ProjectTypeProps {
|
|
121
123
|
IsTeamsFx = "is-teamsfx",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../../src/common/telemetry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAe,MAAM,wBAAwB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,oBAAY,iBAAiB;IAC3B,W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AAM,EACjB,UAAU,CAAC,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACpC,YAAY,CAAC,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GACrC,IAAI,CAMN;AAED,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,OAAO,EAChB,UAAU,CAAC,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GACnC,IAAI,CASN;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,KAAK,EAAE,OAAO,GACb,IAAI,CAoCN;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,cAAc,EAAE,iBAAiB,QAiBlC"}
|
|
@@ -125,6 +125,8 @@ var TelemetryEvent;
|
|
|
125
125
|
TelemetryEvent["PublishInDeveloperPortal"] = "publish-in-developer-portal";
|
|
126
126
|
TelemetryEvent["MetaData"] = "metadata";
|
|
127
127
|
TelemetryEvent["ProjectType"] = "project-type";
|
|
128
|
+
TelemetryEvent["DependencyApi"] = "dependency-api";
|
|
129
|
+
TelemetryEvent["AppStudioApi"] = "app-studio-api";
|
|
128
130
|
})(TelemetryEvent = exports.TelemetryEvent || (exports.TelemetryEvent = {}));
|
|
129
131
|
var ProjectTypeProps;
|
|
130
132
|
(function (ProjectTypeProps) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/common/telemetry.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wDAA8D;AAC9D,sDAA4D;AAC5D,mDAAuD;AAEvD,mCAAgC;AAEhC,IAAY,iBAkDX;AAlDD,WAAY,iBAAiB;IAC3B,iDAA4B,CAAA;IAC5B,4CAAuB,CAAA;IACvB,8CAAyB,CAAA;IACzB,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,oCAAe,CAAA;IACf,oCAAe,CAAA;IACf,wCAAmB,CAAA;IACnB,6CAAwB,CAAA;IACxB,6CAAwB,CAAA;IACxB,mDAA8B,CAAA;IAC9B,sDAAiC,CAAA;IACjC,6CAAwB,CAAA;IACxB,oDAA+B,CAAA;IAC/B,qDAAgC,CAAA;IAChC,gCAAW,CAAA;IACX,iFAA4D,CAAA;IAC5D,6CAAwB,CAAA;IACxB,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,uDAAkC,CAAA;IAClC,kDAA6B,CAAA;IAC7B,qDAAgC,CAAA;IAChC,4DAAuC,CAAA;IACvC,oEAA+C,CAAA;IAC/C,yEAAoD,CAAA;IACpD,+DAA0C,CAAA;IAC1C,+DAA0C,CAAA;IAC1C,sDAAiC,CAAA;IACjC,gDAA2B,CAAA;IAC3B,qDAAgC,CAAA;IAChC,2DAAsC,CAAA;IACtC,2DAAsC,CAAA;IACtC,2DAAsC,CAAA;IACtC,mDAA8B,CAAA;IAC9B,0EAAqD,CAAA;IACrD,0CAAqB,CAAA;IACrB,0EAAqD,CAAA;IACrD,gEAA2C,CAAA;IAC3C,8EAAyD,CAAA;IACzD,2DAAsC,CAAA;IACtC,uDAAkC,CAAA;IAClC,yCAAoB,CAAA;IACpB,4DAAuC,CAAA;IACvC,yDAAoC,CAAA;IACpC,yEAAoD,CAAA;IACpD,sFAAiE,CAAA;IACjE,sEAAiD,CAAA;IACjD,iDAA4B,CAAA;AAC9B,CAAC,EAlDW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAkD5B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../../src/common/telemetry.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,wDAA8D;AAC9D,sDAA4D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oBAAoB,CAAC,EAAE,cAAc,CAAC,oBAAoB,IAAI,EAAE;QAClF,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,cAAc,CAAC,mBAAmB,IAAI,EAAE;QAChF,CAAC,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;QAC9E,CAAC,gBAAgB,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO;QACpF,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,EAAE,cAAc,CAAC,eAAe,IAAI,EAAE;QAC7E,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,EAAE,cAAc,CAAC,aAAa,IAAI,EAAE;QACzE,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,EAAE,cAAc,CAAC,gBAAgB,IAAI,EAAE;QAC1E,CAAC,gBAAgB,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC;QAChE,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,EAC1C,CAAA,MAAA,cAAc,CAAC,oBAAoB,0CAAE,IAAI,CAAC,GAAG,CAAC,KAAI,EAAE;KACvD,CAAC;IACF,eAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;AAC1B,CAAC;AAnBD,kEAmBC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "~4.
|
|
2
|
+
"version": "~4.1",
|
|
3
|
+
"localVersion": "4.2.1-alpha.2a327dc81.0",
|
|
3
4
|
"tagPrefix": "templates@",
|
|
4
5
|
"tagListURL": "https://github.com/OfficeDev/TeamsFx/releases/download/template-tag-list/template-tags.txt",
|
|
5
6
|
"templateDownloadBaseURL": "https://github.com/OfficeDev/TeamsFx/releases/download",
|
|
6
7
|
"templateReleaseURL": "https://github.com/OfficeDev/TeamsFx/releases/expanded_assets",
|
|
7
8
|
"templateDownloadBasePath": "/OfficeDev/TeamsFx/releases/download",
|
|
8
9
|
"templateExt": ".zip",
|
|
9
|
-
"useLocalTemplate":
|
|
10
|
+
"useLocalTemplate": true
|
|
10
11
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosError, CreateAxiosDefaults, AxiosResponse, InternalAxiosRequestConfig } from "axios";
|
|
2
|
+
/**
|
|
3
|
+
* This client will send telemetries to record API request trace
|
|
4
|
+
*/
|
|
5
|
+
export declare class WrappedAxiosClient {
|
|
6
|
+
static create(config?: CreateAxiosDefaults): AxiosInstance;
|
|
7
|
+
/**
|
|
8
|
+
* Send API start telemetry
|
|
9
|
+
* @param request
|
|
10
|
+
*/
|
|
11
|
+
static onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig<any>;
|
|
12
|
+
/**
|
|
13
|
+
* Send API success telemetry
|
|
14
|
+
* @param response
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
static onResponse(response: AxiosResponse): AxiosResponse<any, any>;
|
|
18
|
+
/**
|
|
19
|
+
* Send API failure telemetry
|
|
20
|
+
* @param error
|
|
21
|
+
* @returns
|
|
22
|
+
*/
|
|
23
|
+
static onRejected(error: AxiosError): Promise<never>;
|
|
24
|
+
/**
|
|
25
|
+
* Convert request URL to API name, otherwise it will be redacted in telemetry
|
|
26
|
+
* This function should be extended when new API is added
|
|
27
|
+
* @param baseUrl
|
|
28
|
+
* @param path
|
|
29
|
+
* @param method
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
static convertUrlToApiName(fullPath: string, method: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Generate extra properties for specific requirements
|
|
35
|
+
* @param baseUrl
|
|
36
|
+
* @param path
|
|
37
|
+
* @param method
|
|
38
|
+
*/
|
|
39
|
+
private static generateExtraProperties;
|
|
40
|
+
/**
|
|
41
|
+
* Extract region from baseUrl, E.g. https://dev.teams.microsoft.com/amer => amer
|
|
42
|
+
* @param url
|
|
43
|
+
* @returns
|
|
44
|
+
*/
|
|
45
|
+
private static extractRegion;
|
|
46
|
+
/**
|
|
47
|
+
* Check if it's TDP Api
|
|
48
|
+
* @param baseUrl
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
private static isTDPApi;
|
|
52
|
+
/**
|
|
53
|
+
* Flattern query parameters to string, e.g. {a: 1, b: 2} => a:1;b:2
|
|
54
|
+
* @param params
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
private static generateParameters;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=wrappedAxiosClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrappedAxiosClient.d.ts","sourceRoot":"","sources":["../../src/common/wrappedAxiosClient.ts"],"names":[],"mappings":"AAEA,OAAc,EACZ,aAAa,EACb,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,0BAA0B,EAC3B,MAAM,OAAO,CAAC;AAWf;;GAEG;AACH,qBAAa,kBAAkB;WACf,MAAM,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,aAAa;IAWjE;;;OAGG;WACW,SAAS,CAAC,OAAO,EAAE,0BAA0B;IAuB3D;;;;OAIG;WACW,UAAU,CAAC,QAAQ,EAAE,aAAa;IA0BhD;;;;OAIG;WACW,UAAU,CAAC,KAAK,EAAE,UAAU;IAiD1C;;;;;;;OAOG;WACW,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAyF3E;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAoBtC;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,aAAa;IAU5B;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ;IAMvB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAUlC"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WrappedAxiosClient = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
// Copyright (c) Microsoft Corporation.
|
|
6
|
+
// Licensed under the MIT license.
|
|
7
|
+
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
8
|
+
const globalVars_1 = require("../core/globalVars");
|
|
9
|
+
const constants_1 = require("../component/driver/teamsApp/constants");
|
|
10
|
+
const telemetry_1 = require("../component/driver/teamsApp/utils/telemetry");
|
|
11
|
+
const telemetry_2 = require("./telemetry");
|
|
12
|
+
const teamsApp_1 = require("../error/teamsApp");
|
|
13
|
+
const commonConstant_1 = require("../component/constant/commonConstant");
|
|
14
|
+
/**
|
|
15
|
+
* This client will send telemetries to record API request trace
|
|
16
|
+
*/
|
|
17
|
+
class WrappedAxiosClient {
|
|
18
|
+
static create(config) {
|
|
19
|
+
const instance = axios_1.default.create(config);
|
|
20
|
+
instance.interceptors.request.use((request) => this.onRequest(request));
|
|
21
|
+
// eslint-disable-next-line prettier/prettier
|
|
22
|
+
instance.interceptors.response.use((response) => this.onResponse(response), (error) => this.onRejected(error));
|
|
23
|
+
return instance;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Send API start telemetry
|
|
27
|
+
* @param request
|
|
28
|
+
*/
|
|
29
|
+
static onRequest(request) {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
const method = request.method;
|
|
32
|
+
const fullPath = `${(_a = request.baseURL) !== null && _a !== void 0 ? _a : ""}${(_b = request.url) !== null && _b !== void 0 ? _b : ""}`;
|
|
33
|
+
const apiName = this.convertUrlToApiName(fullPath, method);
|
|
34
|
+
const properties = Object.assign({ url: `<${apiName}-url>`, method: method, params: this.generateParameters(request.params) }, this.generateExtraProperties(fullPath, request.data));
|
|
35
|
+
let eventName;
|
|
36
|
+
if (this.isTDPApi(fullPath)) {
|
|
37
|
+
eventName = telemetry_2.TelemetryEvent.AppStudioApi;
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
eventName = telemetry_2.TelemetryEvent.DependencyApi;
|
|
41
|
+
}
|
|
42
|
+
(_c = globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.telemetryReporter) === null || _c === void 0 ? void 0 : _c.sendTelemetryEvent(`${eventName}-start`, properties);
|
|
43
|
+
return request;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Send API success telemetry
|
|
47
|
+
* @param response
|
|
48
|
+
* @returns
|
|
49
|
+
*/
|
|
50
|
+
static onResponse(response) {
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
const method = response.request.method;
|
|
53
|
+
const fullPath = `${(_a = response.request.host) !== null && _a !== void 0 ? _a : ""}${(_b = response.request.path) !== null && _b !== void 0 ? _b : ""}`;
|
|
54
|
+
const apiName = this.convertUrlToApiName(fullPath, method);
|
|
55
|
+
const properties = Object.assign({ url: `<${apiName}-url>`, method: method, params: this.generateParameters(response.config.params), [telemetry_1.TelemetryPropertyKey.success]: telemetry_1.TelemetryPropertyValue.success, "status-code": response.status.toString() }, this.generateExtraProperties(fullPath, response.data));
|
|
56
|
+
let eventName;
|
|
57
|
+
if (this.isTDPApi(fullPath)) {
|
|
58
|
+
eventName = telemetry_2.TelemetryEvent.AppStudioApi;
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
eventName = telemetry_2.TelemetryEvent.DependencyApi;
|
|
62
|
+
}
|
|
63
|
+
(_c = globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.telemetryReporter) === null || _c === void 0 ? void 0 : _c.sendTelemetryEvent(eventName, properties);
|
|
64
|
+
return response;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Send API failure telemetry
|
|
68
|
+
* @param error
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
static onRejected(error) {
|
|
72
|
+
var _a, _b, _c, _d, _e, _f;
|
|
73
|
+
const method = error.request.method;
|
|
74
|
+
const fullPath = `${(_a = error.request.host) !== null && _a !== void 0 ? _a : ""}${(_b = error.request.path) !== null && _b !== void 0 ? _b : ""}`;
|
|
75
|
+
const apiName = this.convertUrlToApiName(fullPath, method);
|
|
76
|
+
let requestData;
|
|
77
|
+
if (((_c = error.config) === null || _c === void 0 ? void 0 : _c.data) && typeof error.config.data === "string") {
|
|
78
|
+
try {
|
|
79
|
+
requestData = JSON.parse(error.config.data);
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
requestData = undefined;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const properties = Object.assign({ url: `<${apiName}-url>`, method: method, params: this.generateParameters(error.config.params), [telemetry_1.TelemetryPropertyKey.success]: telemetry_1.TelemetryPropertyValue.failure, [telemetry_1.TelemetryPropertyKey.errorMessage]: JSON.stringify(error.response.data), "status-code": (_d = error.response.status.toString()) !== null && _d !== void 0 ? _d : "undefined" }, this.generateExtraProperties(fullPath, requestData));
|
|
86
|
+
let eventName;
|
|
87
|
+
if (this.isTDPApi(fullPath)) {
|
|
88
|
+
const correlationId = error.response.headers[constants_1.Constants.CORRELATION_ID];
|
|
89
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
90
|
+
const extraData = ((_e = error.response) === null || _e === void 0 ? void 0 : _e.data) ? `data: ${JSON.stringify(error.response.data)}` : "";
|
|
91
|
+
const TDPApiFailedError = new teamsApp_1.DeveloperPortalAPIFailedError(error, correlationId, apiName, extraData);
|
|
92
|
+
properties[telemetry_1.TelemetryPropertyKey.errorCode] = `${TDPApiFailedError.source}.${TDPApiFailedError.name}`;
|
|
93
|
+
properties[telemetry_1.TelemetryPropertyKey.errorMessage] = TDPApiFailedError.message;
|
|
94
|
+
eventName = telemetry_2.TelemetryEvent.AppStudioApi;
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
eventName = telemetry_2.TelemetryEvent.DependencyApi;
|
|
98
|
+
}
|
|
99
|
+
(_f = globalVars_1.TOOLS === null || globalVars_1.TOOLS === void 0 ? void 0 : globalVars_1.TOOLS.telemetryReporter) === null || _f === void 0 ? void 0 : _f.sendTelemetryErrorEvent(eventName, properties);
|
|
100
|
+
return Promise.reject(error);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Convert request URL to API name, otherwise it will be redacted in telemetry
|
|
104
|
+
* This function should be extended when new API is added
|
|
105
|
+
* @param baseUrl
|
|
106
|
+
* @param path
|
|
107
|
+
* @param method
|
|
108
|
+
* @returns
|
|
109
|
+
*/
|
|
110
|
+
static convertUrlToApiName(fullPath, method) {
|
|
111
|
+
if (this.isTDPApi(fullPath)) {
|
|
112
|
+
if (fullPath.match(new RegExp("/api/appdefinitions/partnerCenterAppPackageValidation"))) {
|
|
113
|
+
return constants_1.APP_STUDIO_API_NAMES.VALIDATE_APP_PACKAGE;
|
|
114
|
+
}
|
|
115
|
+
if (fullPath.match(new RegExp("/api/appdefinitions/v2/import"))) {
|
|
116
|
+
return constants_1.APP_STUDIO_API_NAMES.CREATE_APP;
|
|
117
|
+
}
|
|
118
|
+
if (fullPath.match(new RegExp("/api/appdefinitions/manifest"))) {
|
|
119
|
+
return constants_1.APP_STUDIO_API_NAMES.EXISTS_IN_TENANTS;
|
|
120
|
+
}
|
|
121
|
+
if (fullPath.match(new RegExp("/api/appdefinitions/.*/manifest"))) {
|
|
122
|
+
return constants_1.APP_STUDIO_API_NAMES.GET_APP_PACKAGE;
|
|
123
|
+
}
|
|
124
|
+
if (fullPath.match(new RegExp("/api/appdefinitions/.*/owner"))) {
|
|
125
|
+
return constants_1.APP_STUDIO_API_NAMES.UPDATE_OWNER;
|
|
126
|
+
}
|
|
127
|
+
if (fullPath.match(new RegExp(/\/api\/appdefinitions\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/))) {
|
|
128
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.GET) {
|
|
129
|
+
return constants_1.APP_STUDIO_API_NAMES.GET_APP;
|
|
130
|
+
}
|
|
131
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.DELETE) {
|
|
132
|
+
return constants_1.APP_STUDIO_API_NAMES.DELETE_APP;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (fullPath.match(new RegExp("/api/appdefinitions"))) {
|
|
136
|
+
return constants_1.APP_STUDIO_API_NAMES.LIST_APPS;
|
|
137
|
+
}
|
|
138
|
+
if (fullPath.match(new RegExp("/api/publishing/.*/appdefinitions"))) {
|
|
139
|
+
return constants_1.APP_STUDIO_API_NAMES.UPDATE_PUBLISHED_APP;
|
|
140
|
+
}
|
|
141
|
+
if (fullPath.match(new RegExp("/api/publishing/.*"))) {
|
|
142
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.GET) {
|
|
143
|
+
return constants_1.APP_STUDIO_API_NAMES.GET_PUBLISHED_APP;
|
|
144
|
+
}
|
|
145
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.POST) {
|
|
146
|
+
return constants_1.APP_STUDIO_API_NAMES.PUBLISH_APP;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (fullPath.match(new RegExp("/api/v1.0/apiSecretRegistrations/.*"))) {
|
|
150
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.GET) {
|
|
151
|
+
return constants_1.APP_STUDIO_API_NAMES.GET_API_KEY;
|
|
152
|
+
}
|
|
153
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.POST) {
|
|
154
|
+
return constants_1.APP_STUDIO_API_NAMES.CREATE_API_KEY;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (fullPath.match(new RegExp(/\/api\/botframework\/[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}/))) {
|
|
158
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.GET) {
|
|
159
|
+
return constants_1.APP_STUDIO_API_NAMES.GET_BOT;
|
|
160
|
+
}
|
|
161
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.POST) {
|
|
162
|
+
return constants_1.APP_STUDIO_API_NAMES.UPDATE_BOT;
|
|
163
|
+
}
|
|
164
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.DELETE) {
|
|
165
|
+
return constants_1.APP_STUDIO_API_NAMES.DELETE_BOT;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
if (fullPath.match(new RegExp("/api/botframework"))) {
|
|
169
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.GET) {
|
|
170
|
+
return constants_1.APP_STUDIO_API_NAMES.LIST_BOT;
|
|
171
|
+
}
|
|
172
|
+
if (method.toUpperCase() === commonConstant_1.HttpMethod.POST) {
|
|
173
|
+
return constants_1.APP_STUDIO_API_NAMES.CREATE_BOT;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (fullPath.match(new RegExp(/(^https:\/\/)?authsvc\.teams\.microsoft\.com\/v1\.0\/users\/region/))) {
|
|
178
|
+
return "get-region";
|
|
179
|
+
}
|
|
180
|
+
return fullPath.replace(/\//g, `-`);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Generate extra properties for specific requirements
|
|
184
|
+
* @param baseUrl
|
|
185
|
+
* @param path
|
|
186
|
+
* @param method
|
|
187
|
+
*/
|
|
188
|
+
static generateExtraProperties(fullPath, data) {
|
|
189
|
+
const properties = {};
|
|
190
|
+
if (this.isTDPApi(fullPath)) {
|
|
191
|
+
// Add region property
|
|
192
|
+
properties[telemetry_1.TelemetryPropertyKey.region] = String(this.extractRegion(fullPath));
|
|
193
|
+
// Add bot id property
|
|
194
|
+
if (fullPath.match(new RegExp("/api/botframework"))) {
|
|
195
|
+
const regex = new RegExp(/\/api\/botframework\/([0-9a-fA-F-]+)/);
|
|
196
|
+
const matches = regex.exec(fullPath);
|
|
197
|
+
if (matches != null && matches.length > 1) {
|
|
198
|
+
properties[telemetry_2.TelemetryProperty.BotId] = matches[1];
|
|
199
|
+
}
|
|
200
|
+
else if (data === null || data === void 0 ? void 0 : data.botId) {
|
|
201
|
+
properties[telemetry_2.TelemetryProperty.BotId] = data.botId;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
return properties;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Extract region from baseUrl, E.g. https://dev.teams.microsoft.com/amer => amer
|
|
209
|
+
* @param url
|
|
210
|
+
* @returns
|
|
211
|
+
*/
|
|
212
|
+
static extractRegion(fullPath) {
|
|
213
|
+
const regex = /dev(-int)?\.teams\.microsoft\.com\/([a-zA-Z-_]+)\/api/;
|
|
214
|
+
const matches = regex.exec(fullPath);
|
|
215
|
+
if (matches != null && matches.length > 1) {
|
|
216
|
+
return matches[2];
|
|
217
|
+
}
|
|
218
|
+
return telemetry_1.TelemetryPropertyValue.Global;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Check if it's TDP Api
|
|
222
|
+
* @param baseUrl
|
|
223
|
+
* @returns
|
|
224
|
+
*/
|
|
225
|
+
static isTDPApi(baseUrl) {
|
|
226
|
+
const regex = /(^https:\/\/)?dev(-int)?\.teams\.microsoft\.com/;
|
|
227
|
+
const matches = regex.exec(baseUrl);
|
|
228
|
+
return matches != null && matches.length > 0;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Flattern query parameters to string, e.g. {a: 1, b: 2} => a:1;b:2
|
|
232
|
+
* @param params
|
|
233
|
+
* @returns
|
|
234
|
+
*/
|
|
235
|
+
static generateParameters(params) {
|
|
236
|
+
if (!params) {
|
|
237
|
+
return "";
|
|
238
|
+
}
|
|
239
|
+
const parameters = [];
|
|
240
|
+
for (const [key, value] of Object.entries(params)) {
|
|
241
|
+
parameters.push(`${key}:${value}`);
|
|
242
|
+
}
|
|
243
|
+
return parameters.join(";");
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
exports.WrappedAxiosClient = WrappedAxiosClient;
|
|
247
|
+
//# sourceMappingURL=wrappedAxiosClient.js.map
|