@microsoft/teamsfx-core 2.0.8-alpha.4e708f092.0 → 2.0.8-alpha.50de7b0d4.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 +4 -17
- package/build/common/constants.d.ts.map +1 -1
- package/build/common/constants.js +4 -18
- package/build/common/constants.js.map +1 -1
- package/build/common/featureFlags.d.ts +68 -5
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +63 -92
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/m365/launchHelper.d.ts +1 -1
- package/build/common/m365/launchHelper.d.ts.map +1 -1
- package/build/common/m365/launchHelper.js +3 -6
- package/build/common/m365/launchHelper.js.map +1 -1
- package/build/common/m365/packageService.d.ts +1 -1
- package/build/common/m365/packageService.d.ts.map +1 -1
- package/build/common/m365/packageService.js +18 -39
- package/build/common/m365/packageService.js.map +1 -1
- package/build/common/projectTypeChecker.d.ts.map +1 -1
- package/build/common/projectTypeChecker.js +3 -0
- package/build/common/projectTypeChecker.js.map +1 -1
- package/build/common/samples.d.ts +1 -1
- package/build/common/samples.js +1 -1
- package/build/common/stringUtils.js +3 -3
- package/build/common/stringUtils.js.map +1 -1
- package/build/common/telemetry.d.ts +14 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +15 -1
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +1 -1
- package/build/component/configManager/actionInjector.d.ts +8 -0
- package/build/component/configManager/actionInjector.d.ts.map +1 -0
- package/build/component/configManager/actionInjector.js +102 -0
- package/build/component/configManager/actionInjector.js.map +1 -0
- package/build/component/coordinator/index.d.ts +0 -40
- package/build/component/coordinator/index.d.ts.map +1 -1
- package/build/component/coordinator/index.js +130 -179
- package/build/component/coordinator/index.js.map +1 -1
- package/build/component/driver/apiKey/create.d.ts.map +1 -1
- package/build/component/driver/apiKey/create.js.map +1 -1
- package/build/component/driver/apiKey/update.js +1 -1
- package/build/component/driver/apiKey/update.js.map +1 -1
- package/build/component/driver/apiKey/utility/utility.d.ts.map +1 -1
- package/build/component/driver/apiKey/utility/utility.js +2 -3
- package/build/component/driver/apiKey/utility/utility.js.map +1 -1
- package/build/component/driver/index.d.ts +2 -0
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +2 -0
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/oauth/create.d.ts +12 -0
- package/build/component/driver/oauth/create.d.ts.map +1 -0
- package/build/component/driver/oauth/create.js +193 -0
- package/build/component/driver/oauth/create.js.map +1 -0
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js +21 -0
- package/build/component/driver/oauth/error/oauthAuthInfoInvalid.js.map +1 -0
- package/build/component/driver/oauth/error/oauthDomainInvalid.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthDomainInvalid.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthDomainInvalid.js +22 -0
- package/build/component/driver/oauth/error/oauthDomainInvalid.js.map +1 -0
- package/build/component/driver/oauth/error/oauthFailedToGetDomain.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthFailedToGetDomain.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthFailedToGetDomain.js +21 -0
- package/build/component/driver/oauth/error/oauthFailedToGetDomain.js.map +1 -0
- package/build/component/driver/oauth/error/oauthNameTooLong.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthNameTooLong.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthNameTooLong.js +21 -0
- package/build/component/driver/oauth/error/oauthNameTooLong.js.map +1 -0
- package/build/component/driver/oauth/interface/createOauthArgs.d.ts +12 -0
- package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -0
- package/build/component/driver/oauth/interface/createOauthArgs.js +5 -0
- package/build/component/driver/oauth/interface/createOauthArgs.js.map +1 -0
- package/build/component/driver/oauth/interface/createOauthOutputs.d.ts +7 -0
- package/build/component/driver/oauth/interface/createOauthOutputs.d.ts.map +1 -0
- package/build/component/driver/oauth/interface/createOauthOutputs.js +10 -0
- package/build/component/driver/oauth/interface/createOauthOutputs.js.map +1 -0
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +9 -0
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -0
- package/build/component/driver/oauth/interface/updateOauthArgs.js +5 -0
- package/build/component/driver/oauth/interface/updateOauthArgs.js.map +1 -0
- package/build/component/driver/oauth/update.d.ts +13 -0
- package/build/component/driver/oauth/update.d.ts.map +1 -0
- package/build/component/driver/oauth/update.js +181 -0
- package/build/component/driver/oauth/update.js.map +1 -0
- package/build/component/driver/oauth/utility/constants.d.ts +13 -0
- package/build/component/driver/oauth/utility/constants.d.ts.map +1 -0
- package/build/component/driver/oauth/utility/constants.js +18 -0
- package/build/component/driver/oauth/utility/constants.js.map +1 -0
- package/build/component/driver/oauth/utility/utility.d.ts +12 -0
- package/build/component/driver/oauth/utility/utility.d.ts.map +1 -0
- package/build/component/driver/oauth/utility/utility.js +90 -0
- package/build/component/driver/oauth/utility/utility.js.map +1 -0
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts +5 -0
- package/build/component/driver/teamsApp/clients/appStudioClient.d.ts.map +1 -1
- package/build/component/driver/teamsApp/clients/appStudioClient.js +36 -0
- package/build/component/driver/teamsApp/clients/appStudioClient.js.map +1 -1
- package/build/component/driver/teamsApp/constants.d.ts +3 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +3 -0
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.d.ts +17 -0
- package/build/component/driver/teamsApp/createAppPackage.d.ts.map +1 -1
- package/build/component/driver/teamsApp/createAppPackage.js +62 -6
- package/build/component/driver/teamsApp/createAppPackage.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.d.ts +7 -0
- package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.js +5 -0
- package/build/component/driver/teamsApp/interfaces/OauthConfigurationId.js.map +1 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +44 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js +21 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -0
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts +8 -0
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.d.ts.map +1 -0
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js +65 -0
- package/build/component/driver/teamsApp/utils/CopilotGptManifestUtils.js.map +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.d.ts.map +1 -1
- package/build/component/driver/teamsApp/utils/telemetry.js +1 -0
- package/build/component/driver/teamsApp/utils/telemetry.js.map +1 -1
- package/build/component/generator/copilotPlugin/generator.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/generator.js +20 -26
- package/build/component/generator/copilotPlugin/generator.js.map +1 -1
- package/build/component/generator/copilotPlugin/helper.d.ts +6 -1
- package/build/component/generator/copilotPlugin/helper.d.ts.map +1 -1
- package/build/component/generator/copilotPlugin/helper.js +52 -26
- package/build/component/generator/copilotPlugin/helper.js.map +1 -1
- package/build/component/generator/generator.d.ts +3 -2
- package/build/component/generator/generator.d.ts.map +1 -1
- package/build/component/generator/generator.js +6 -4
- package/build/component/generator/generator.js.map +1 -1
- package/build/component/generator/generatorProvider.d.ts +3 -0
- package/build/component/generator/generatorProvider.d.ts.map +1 -0
- package/build/component/generator/generatorProvider.js +18 -0
- package/build/component/generator/generatorProvider.js.map +1 -0
- package/build/component/generator/officeAddin/generator.d.ts +9 -0
- package/build/component/generator/officeAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeAddin/generator.js +33 -2
- package/build/component/generator/officeAddin/generator.js.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.d.ts +0 -3
- package/build/component/generator/officeAddin/helperMethods.d.ts.map +1 -1
- package/build/component/generator/officeAddin/helperMethods.js +1 -67
- package/build/component/generator/officeAddin/helperMethods.js.map +1 -1
- package/build/component/generator/officeXMLAddin/generator.d.ts.map +1 -1
- package/build/component/generator/officeXMLAddin/generator.js +5 -2
- package/build/component/generator/officeXMLAddin/generator.js.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts +18 -5
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +1 -1
- package/build/component/generator/spfx/spfxGenerator.js +123 -20
- package/build/component/generator/spfx/spfxGenerator.js.map +1 -1
- package/build/component/generator/templates/ssrTabGenerator.d.ts +12 -0
- package/build/component/generator/templates/ssrTabGenerator.d.ts.map +1 -0
- package/build/component/generator/templates/ssrTabGenerator.js +36 -0
- package/build/component/generator/templates/ssrTabGenerator.js.map +1 -0
- package/build/component/generator/templates/templateGenerator.d.ts +12 -0
- package/build/component/generator/templates/templateGenerator.d.ts.map +1 -0
- package/build/component/generator/templates/templateGenerator.js +99 -0
- package/build/component/generator/templates/templateGenerator.js.map +1 -0
- package/build/component/generator/templates/templateInfo.d.ts +10 -0
- package/build/component/generator/templates/templateInfo.d.ts.map +1 -0
- package/build/component/generator/templates/templateInfo.js +3 -0
- package/build/component/generator/templates/templateInfo.js.map +1 -0
- package/build/component/generator/templates/templateNames.d.ts +52 -0
- package/build/component/generator/templates/templateNames.d.ts.map +1 -0
- package/build/component/generator/templates/templateNames.js +304 -0
- package/build/component/generator/templates/templateNames.js.map +1 -0
- package/build/component/generator/templates/templateReplaceMap.d.ts +5 -0
- package/build/component/generator/templates/templateReplaceMap.d.ts.map +1 -0
- package/build/component/generator/templates/templateReplaceMap.js +39 -0
- package/build/component/generator/templates/templateReplaceMap.js.map +1 -0
- package/build/component/generator/utils.d.ts +1 -0
- package/build/component/generator/utils.d.ts.map +1 -1
- package/build/component/generator/utils.js +2 -1
- package/build/component/generator/utils.js.map +1 -1
- package/build/component/middleware/actionExecutionMW.d.ts.map +1 -1
- package/build/component/middleware/actionExecutionMW.js +5 -4
- package/build/component/middleware/actionExecutionMW.js.map +1 -1
- package/build/component/middleware/questionMW.d.ts.map +1 -1
- package/build/component/middleware/questionMW.js +9 -1
- package/build/component/middleware/questionMW.js.map +1 -1
- package/build/component/utils/metadataRscPermission.d.ts +1 -0
- package/build/component/utils/metadataRscPermission.d.ts.map +1 -1
- package/build/component/utils/metadataRscPermission.js +15 -3
- package/build/component/utils/metadataRscPermission.js.map +1 -1
- package/build/component/utils.d.ts +2 -1
- package/build/component/utils.d.ts.map +1 -1
- package/build/component/utils.js +43 -1
- package/build/component/utils.js.map +1 -1
- package/build/core/FxCore.d.ts +7 -3
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +246 -80
- package/build/core/FxCore.js.map +1 -1
- package/build/error/common.d.ts +3 -0
- package/build/error/common.d.ts.map +1 -1
- package/build/error/common.js +12 -1
- package/build/error/common.js.map +1 -1
- package/build/error/index.d.ts +1 -0
- package/build/error/index.d.ts.map +1 -1
- package/build/error/index.js +1 -0
- package/build/error/index.js.map +1 -1
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +5 -1
- package/build/index.js.map +1 -1
- package/build/question/constants.d.ts.map +1 -1
- package/build/question/constants.js +6 -1
- package/build/question/constants.js.map +1 -1
- package/build/question/create.d.ts +7 -1
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +101 -18
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +2 -0
- 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 +6 -0
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/AddPluginInputs.d.ts +18 -0
- package/build/question/inputs/AddPluginInputs.d.ts.map +1 -0
- package/build/question/inputs/AddPluginInputs.js +5 -0
- package/build/question/inputs/AddPluginInputs.js.map +1 -0
- package/build/question/inputs/CreateProjectInputs.d.ts +1 -1
- package/build/question/inputs/CreateProjectInputs.d.ts.map +1 -1
- package/build/question/inputs/PermissionGrantInputs.d.ts +1 -1
- package/build/question/inputs/PermissionListInputs.d.ts +1 -1
- package/build/question/inputs/PreviewTeamsAppInputs.d.ts +1 -1
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts +1 -1
- package/build/question/inputs/SelectTeamsManifestInputs.d.ts +1 -1
- package/build/question/inputs/ValidateTeamsAppInputs.d.ts +2 -2
- package/build/question/inputs/index.d.ts +1 -0
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +1 -0
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/AddPluginOptions.d.ts +10 -0
- package/build/question/options/AddPluginOptions.d.ts.map +1 -0
- package/build/question/options/AddPluginOptions.js +39 -0
- package/build/question/options/AddPluginOptions.js.map +1 -0
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +3 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/PermissionGrantOptions.js +1 -1
- package/build/question/options/PermissionGrantOptions.js.map +1 -1
- package/build/question/options/PermissionListOptions.js +1 -1
- package/build/question/options/PermissionListOptions.js.map +1 -1
- package/build/question/options/PreviewTeamsAppOptions.js +1 -1
- package/build/question/options/PreviewTeamsAppOptions.js.map +1 -1
- package/build/question/options/SPFxAddWebpartOptions.js +1 -1
- package/build/question/options/SPFxAddWebpartOptions.js.map +1 -1
- package/build/question/options/SelectTeamsManifestOptions.js +1 -1
- package/build/question/options/SelectTeamsManifestOptions.js.map +1 -1
- package/build/question/options/ValidateTeamsAppOptions.js +1 -1
- package/build/question/options/ValidateTeamsAppOptions.js.map +1 -1
- package/build/question/options/index.d.ts +1 -0
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +1 -0
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +9 -0
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +169 -8
- package/build/question/other.js.map +1 -1
- package/build/question/questionNames.d.ts +5 -1
- package/build/question/questionNames.d.ts.map +1 -1
- package/build/question/questionNames.js +4 -0
- package/build/question/questionNames.js.map +1 -1
- package/package.json +11 -9
- package/resource/package.nls.json +64 -42
- package/resource/yaml-schema/v1.5/yaml.schema.json +122 -1
- package/resource/yaml-schema/yaml.schema.json +122 -1
- 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/core/FxCore.js
CHANGED
|
@@ -5,8 +5,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.FxCore = void 0;
|
|
6
6
|
const tslib_1 = require("tslib");
|
|
7
7
|
const hooks_1 = require("@feathersjs/hooks");
|
|
8
|
+
const m365_spec_parser_1 = require("@microsoft/m365-spec-parser");
|
|
8
9
|
const teamsfx_api_1 = require("@microsoft/teamsfx-api");
|
|
9
10
|
const fs_extra_1 = tslib_1.__importDefault(require("fs-extra"));
|
|
11
|
+
const jsonschema = tslib_1.__importStar(require("jsonschema"));
|
|
10
12
|
const os = tslib_1.__importStar(require("os"));
|
|
11
13
|
const path = tslib_1.__importStar(require("path"));
|
|
12
14
|
require("reflect-metadata");
|
|
@@ -14,12 +16,10 @@ const typedi_1 = require("typedi");
|
|
|
14
16
|
const url_1 = require("url");
|
|
15
17
|
const yaml_1 = require("yaml");
|
|
16
18
|
const constants_1 = require("../common/constants");
|
|
17
|
-
const featureFlags_1 = require("../common/featureFlags");
|
|
18
19
|
const localizeUtils_1 = require("../common/localizeUtils");
|
|
19
20
|
const launchHelper_1 = require("../common/m365/launchHelper");
|
|
20
21
|
const projectSettingsHelper_1 = require("../common/projectSettingsHelper");
|
|
21
22
|
const projectTypeChecker_1 = require("../common/projectTypeChecker");
|
|
22
|
-
const m365_spec_parser_1 = require("@microsoft/m365-spec-parser");
|
|
23
23
|
const telemetry_1 = require("../common/telemetry");
|
|
24
24
|
const versionMetadata_1 = require("../common/versionMetadata");
|
|
25
25
|
const parser_1 = require("../component/configManager/parser");
|
|
@@ -31,7 +31,9 @@ require("../component/driver/script/scriptDriver");
|
|
|
31
31
|
const appStudio_1 = require("../component/driver/teamsApp/appStudio");
|
|
32
32
|
const teamsappMgr_1 = require("../component/driver/teamsApp/teamsappMgr");
|
|
33
33
|
const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
|
|
34
|
+
const PluginManifestUtils_1 = require("../component/driver/teamsApp/utils/PluginManifestUtils");
|
|
34
35
|
const utils_1 = require("../component/driver/teamsApp/utils/utils");
|
|
36
|
+
require("../component/feature/sso");
|
|
35
37
|
const helper_1 = require("../component/generator/copilotPlugin/helper");
|
|
36
38
|
const envMW_1 = require("../component/middleware/envMW");
|
|
37
39
|
const questionMW_1 = require("../component/middleware/questionMW");
|
|
@@ -44,10 +46,11 @@ const settingsUtil_1 = require("../component/utils/settingsUtil");
|
|
|
44
46
|
const common_2 = require("../error/common");
|
|
45
47
|
const upgrade_1 = require("../error/upgrade");
|
|
46
48
|
const yml_1 = require("../error/yml");
|
|
49
|
+
const question_1 = require("../question");
|
|
50
|
+
const constants_3 = require("../question/constants");
|
|
47
51
|
const create_1 = require("../question/create");
|
|
48
52
|
const other_1 = require("../question/other");
|
|
49
53
|
const questionNames_1 = require("../question/questionNames");
|
|
50
|
-
const constants_3 = require("../question/constants");
|
|
51
54
|
const callback_1 = require("./callback");
|
|
52
55
|
const collaborator_1 = require("./collaborator");
|
|
53
56
|
const crypto_1 = require("./crypto");
|
|
@@ -60,8 +63,10 @@ const errorHandler_1 = require("./middleware/errorHandler");
|
|
|
60
63
|
const projectMigratorV3_1 = require("./middleware/projectMigratorV3");
|
|
61
64
|
const v3MigrationUtils_1 = require("./middleware/utils/v3MigrationUtils");
|
|
62
65
|
const telemetry_2 = require("./telemetry");
|
|
63
|
-
require("../component/
|
|
64
|
-
const
|
|
66
|
+
const results_1 = require("../component/driver/teamsApp/results");
|
|
67
|
+
const errors_1 = require("../component/driver/teamsApp/errors");
|
|
68
|
+
const CopilotGptManifestUtils_1 = require("../component/driver/teamsApp/utils/CopilotGptManifestUtils");
|
|
69
|
+
const actionInjector_1 = require("../component/configManager/actionInjector");
|
|
65
70
|
class FxCore {
|
|
66
71
|
constructor(tools) {
|
|
67
72
|
globalVars_1.setTools(tools);
|
|
@@ -75,6 +80,9 @@ class FxCore {
|
|
|
75
80
|
}
|
|
76
81
|
async createProject(inputs) {
|
|
77
82
|
const context = utils_2.createContextV3();
|
|
83
|
+
if (inputs[questionNames_1.QuestionNames.ProjectType] === question_1.ProjectTypeOptions.startWithGithubCopilot().id) {
|
|
84
|
+
return teamsfx_api_1.ok({ projectPath: "", shouldInvokeTeamsAgent: true });
|
|
85
|
+
}
|
|
78
86
|
inputs[questionNames_1.QuestionNames.Scratch] = create_1.ScratchOptions.yes().id;
|
|
79
87
|
if (inputs.teamsAppFromTdp) {
|
|
80
88
|
// should never happen as we do same check on Developer Portal.
|
|
@@ -92,6 +100,39 @@ class FxCore {
|
|
|
92
100
|
inputs.projectPath = context.projectPath;
|
|
93
101
|
return res;
|
|
94
102
|
}
|
|
103
|
+
async createProjectByCustomizedGenerator(inputs, generator) {
|
|
104
|
+
//1. input validation
|
|
105
|
+
let folder = inputs["folder"];
|
|
106
|
+
if (!folder) {
|
|
107
|
+
return teamsfx_api_1.err(new common_2.MissingRequiredInputError("folder"));
|
|
108
|
+
}
|
|
109
|
+
folder = path.resolve(folder);
|
|
110
|
+
const appName = inputs["app-name"];
|
|
111
|
+
if (undefined === appName)
|
|
112
|
+
return teamsfx_api_1.err(new common_2.MissingRequiredInputError(questionNames_1.QuestionNames.AppName));
|
|
113
|
+
const validateResult = jsonschema.validate(appName, {
|
|
114
|
+
pattern: question_1.AppNamePattern,
|
|
115
|
+
});
|
|
116
|
+
if (validateResult.errors && validateResult.errors.length > 0) {
|
|
117
|
+
return teamsfx_api_1.err(new common_2.InputValidationError(questionNames_1.QuestionNames.AppName, validateResult.errors[0].message));
|
|
118
|
+
}
|
|
119
|
+
const projectPath = path.join(folder, appName);
|
|
120
|
+
//2. run generator
|
|
121
|
+
const context = utils_2.createContextV3();
|
|
122
|
+
const genRes = await generator.run(context, inputs, projectPath);
|
|
123
|
+
if (genRes.isErr())
|
|
124
|
+
return teamsfx_api_1.err(genRes.error);
|
|
125
|
+
//3. ensure unique projectId in teamsapp.yaml (optional)
|
|
126
|
+
const ymlPath = path.join(projectPath, versionMetadata_1.MetadataV3.configFile);
|
|
127
|
+
const result = { projectPath: projectPath };
|
|
128
|
+
if (await fs_extra_1.default.pathExists(ymlPath)) {
|
|
129
|
+
const ensureRes = await coordinator_1.coordinator.ensureTrackingId(projectPath, inputs.projectId);
|
|
130
|
+
if (ensureRes.isErr())
|
|
131
|
+
return teamsfx_api_1.err(ensureRes.error);
|
|
132
|
+
result.projectId = ensureRes.value;
|
|
133
|
+
}
|
|
134
|
+
return teamsfx_api_1.ok(result);
|
|
135
|
+
}
|
|
95
136
|
/**
|
|
96
137
|
* lifecycle command: create new sample project
|
|
97
138
|
*/
|
|
@@ -415,7 +456,7 @@ class FxCore {
|
|
|
415
456
|
const teamsAppId = manifestRes.value.id;
|
|
416
457
|
const properties = teamsfx_api_1.ManifestUtil.parseCommonProperties(manifestRes.value);
|
|
417
458
|
const launchHelper = new launchHelper_1.LaunchHelper(globalVars_1.TOOLS.tokenProvider.m365TokenProvider, globalVars_1.TOOLS.logProvider);
|
|
418
|
-
const result = await launchHelper.getLaunchUrl(hub, teamsAppId, properties.capabilities, true
|
|
459
|
+
const result = await launchHelper.getLaunchUrl(hub, teamsAppId, properties.capabilities, true);
|
|
419
460
|
return result;
|
|
420
461
|
}
|
|
421
462
|
/**
|
|
@@ -792,47 +833,6 @@ class FxCore {
|
|
|
792
833
|
const context = utils_2.createContextV3();
|
|
793
834
|
return await coordinator_1.coordinator.publishInDeveloperPortal(context, inputs);
|
|
794
835
|
}
|
|
795
|
-
async injectCreateAPIKeyAction(ymlPath, authName, specRelativePath) {
|
|
796
|
-
var _a;
|
|
797
|
-
const ymlContent = await fs_extra_1.default.readFile(ymlPath, "utf-8");
|
|
798
|
-
const document = yaml_1.parseDocument(ymlContent);
|
|
799
|
-
const provisionNode = document.get("provision");
|
|
800
|
-
if (provisionNode) {
|
|
801
|
-
const hasApiKeyAction = provisionNode.items.some((item) => { var _a; return item.get("uses") === "apiKey/register" && ((_a = item.get("with")) === null || _a === void 0 ? void 0 : _a.get("name")) === authName; });
|
|
802
|
-
if (!hasApiKeyAction) {
|
|
803
|
-
provisionNode.items = provisionNode.items.filter((item) => item.get("uses") !== "apiKey/register");
|
|
804
|
-
let added = false;
|
|
805
|
-
for (let i = 0; i < provisionNode.items.length; i++) {
|
|
806
|
-
const item = provisionNode.items[i];
|
|
807
|
-
if (item.get("uses") === "teamsApp/create") {
|
|
808
|
-
const teamsAppId = (_a = item.get("writeToEnvironmentFile")) === null || _a === void 0 ? void 0 : _a.get("teamsAppId");
|
|
809
|
-
if (teamsAppId) {
|
|
810
|
-
provisionNode.items.splice(i + 1, 0, {
|
|
811
|
-
uses: "apiKey/register",
|
|
812
|
-
with: {
|
|
813
|
-
name: `${authName}`,
|
|
814
|
-
appId: `\${{${teamsAppId}}}`,
|
|
815
|
-
apiSpecPath: specRelativePath,
|
|
816
|
-
},
|
|
817
|
-
writeToEnvironmentFile: {
|
|
818
|
-
registrationId: `${authName.toUpperCase()}_REGISTRATION_ID`,
|
|
819
|
-
},
|
|
820
|
-
});
|
|
821
|
-
added = true;
|
|
822
|
-
break;
|
|
823
|
-
}
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
if (!added) {
|
|
827
|
-
throw new common_2.InjectAPIKeyActionFailedError();
|
|
828
|
-
}
|
|
829
|
-
await fs_extra_1.default.writeFile(ymlPath, document.toString(), "utf8");
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
else {
|
|
833
|
-
throw new common_2.InjectAPIKeyActionFailedError();
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
836
|
async copilotPluginAddAPI(inputs) {
|
|
837
837
|
var _a, _b;
|
|
838
838
|
const newOperations = inputs[questionNames_1.QuestionNames.ApiOperation];
|
|
@@ -856,18 +856,18 @@ class FxCore {
|
|
|
856
856
|
const specParser = new m365_spec_parser_1.SpecParser(url, isPlugin
|
|
857
857
|
? helper_1.copilotPluginParserOptions
|
|
858
858
|
: {
|
|
859
|
-
allowBearerTokenAuth:
|
|
860
|
-
allowMultipleParameters:
|
|
859
|
+
allowBearerTokenAuth: true,
|
|
860
|
+
allowMultipleParameters: true,
|
|
861
861
|
});
|
|
862
862
|
const listResult = await specParser.list();
|
|
863
863
|
const apiResultList = listResult.APIs.filter((value) => value.isValid);
|
|
864
864
|
let existingOperations;
|
|
865
|
-
let
|
|
865
|
+
let outputApiSpecPath;
|
|
866
866
|
if (isPlugin) {
|
|
867
867
|
if (!inputs[questionNames_1.QuestionNames.DestinationApiSpecFilePath]) {
|
|
868
868
|
return teamsfx_api_1.err(new common_2.MissingRequiredInputError(questionNames_1.QuestionNames.DestinationApiSpecFilePath));
|
|
869
869
|
}
|
|
870
|
-
|
|
870
|
+
outputApiSpecPath = inputs[questionNames_1.QuestionNames.DestinationApiSpecFilePath];
|
|
871
871
|
existingOperations = await helper_1.listPluginExistingOperations(manifestRes.value, manifestPath, inputs[questionNames_1.QuestionNames.DestinationApiSpecFilePath]);
|
|
872
872
|
}
|
|
873
873
|
else {
|
|
@@ -876,52 +876,59 @@ class FxCore {
|
|
|
876
876
|
.filter((operation) => existingOperationIds.includes(operation.operationId))
|
|
877
877
|
.map((operation) => operation.api);
|
|
878
878
|
const apiSpecificationFile = manifestRes.value.composeExtensions[0].apiSpecificationFile;
|
|
879
|
-
|
|
879
|
+
outputApiSpecPath = path.join(path.dirname(manifestPath), apiSpecificationFile);
|
|
880
880
|
}
|
|
881
881
|
const operations = [...existingOperations, ...newOperations];
|
|
882
882
|
const adaptiveCardFolder = path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, teamsfx_api_1.ResponseTemplatesFolderName);
|
|
883
883
|
try {
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
if (authNames.size > 1) {
|
|
899
|
-
throw new common_2.MultipleAuthError(authNames);
|
|
884
|
+
const authNames = new Set();
|
|
885
|
+
const serverUrls = new Set();
|
|
886
|
+
let authScheme = undefined;
|
|
887
|
+
for (const api of operations) {
|
|
888
|
+
const operation = apiResultList.find((op) => op.api === api);
|
|
889
|
+
if (operation &&
|
|
890
|
+
operation.auth &&
|
|
891
|
+
(m365_spec_parser_1.Utils.isBearerTokenAuth(operation.auth.authScheme) ||
|
|
892
|
+
m365_spec_parser_1.Utils.isOAuthWithAuthCodeFlow(operation.auth.authScheme))) {
|
|
893
|
+
authNames.add(operation.auth.name);
|
|
894
|
+
serverUrls.add(operation.server);
|
|
895
|
+
authScheme = operation.auth.authScheme;
|
|
900
896
|
}
|
|
901
|
-
|
|
902
|
-
|
|
897
|
+
}
|
|
898
|
+
if (authNames.size > 1) {
|
|
899
|
+
throw new common_2.MultipleAuthError(authNames);
|
|
900
|
+
}
|
|
901
|
+
if (serverUrls.size > 1) {
|
|
902
|
+
throw new common_2.MultipleServerError(serverUrls);
|
|
903
|
+
}
|
|
904
|
+
if (authNames.size === 1 && authScheme) {
|
|
905
|
+
const ymlPath = path.join(inputs.projectPath, versionMetadata_1.MetadataV3.configFile);
|
|
906
|
+
const localYamlPath = path.join(inputs.projectPath, versionMetadata_1.MetadataV3.localConfigFile);
|
|
907
|
+
const authName = [...authNames][0];
|
|
908
|
+
const relativeSpecPath = "./" + path.relative(inputs.projectPath, outputApiSpecPath).replace(/\\/g, "/");
|
|
909
|
+
if (m365_spec_parser_1.Utils.isBearerTokenAuth(authScheme)) {
|
|
910
|
+
await actionInjector_1.ActionInjector.injectCreateAPIKeyAction(ymlPath, authName, relativeSpecPath);
|
|
911
|
+
if (await fs_extra_1.default.pathExists(localYamlPath)) {
|
|
912
|
+
await actionInjector_1.ActionInjector.injectCreateAPIKeyAction(localYamlPath, authName, relativeSpecPath);
|
|
913
|
+
}
|
|
903
914
|
}
|
|
904
|
-
if (
|
|
905
|
-
|
|
906
|
-
const localYamlPath = path.join(inputs.projectPath, versionMetadata_1.MetadataV3.localConfigFile);
|
|
907
|
-
const authName = [...authNames][0];
|
|
908
|
-
const relativeSpecPath = "./" + path.relative(inputs.projectPath, outputAPISpecPath).replace(/\\/g, "/");
|
|
909
|
-
await this.injectCreateAPIKeyAction(ymlPath, authName, relativeSpecPath);
|
|
915
|
+
else if (m365_spec_parser_1.Utils.isOAuthWithAuthCodeFlow(authScheme)) {
|
|
916
|
+
await actionInjector_1.ActionInjector.injectCreateOAuthAction(ymlPath, authName, relativeSpecPath);
|
|
910
917
|
if (await fs_extra_1.default.pathExists(localYamlPath)) {
|
|
911
|
-
await
|
|
918
|
+
await actionInjector_1.ActionInjector.injectCreateOAuthAction(localYamlPath, authName, relativeSpecPath);
|
|
912
919
|
}
|
|
913
920
|
}
|
|
914
921
|
}
|
|
915
922
|
let generateResult;
|
|
916
923
|
if (!isPlugin) {
|
|
917
|
-
generateResult = await specParser.generate(manifestPath, operations,
|
|
924
|
+
generateResult = await specParser.generate(manifestPath, operations, outputApiSpecPath, adaptiveCardFolder);
|
|
918
925
|
}
|
|
919
926
|
else {
|
|
920
927
|
const pluginPathRes = await ManifestUtils_1.manifestUtils.getPluginFilePath(manifestRes.value, manifestPath);
|
|
921
928
|
if (pluginPathRes.isErr()) {
|
|
922
929
|
return teamsfx_api_1.err(pluginPathRes.error);
|
|
923
930
|
}
|
|
924
|
-
generateResult = await specParser.generateForCopilot(manifestPath, operations,
|
|
931
|
+
generateResult = await specParser.generateForCopilot(manifestPath, operations, outputApiSpecPath, pluginPathRes.value);
|
|
925
932
|
}
|
|
926
933
|
// Send SpecParser.generate() warnings
|
|
927
934
|
context.telemetryReporter.sendTelemetryEvent(helper_1.specParserGenerateResultTelemetryEvent, {
|
|
@@ -932,7 +939,7 @@ class FxCore {
|
|
|
932
939
|
[telemetry_2.CoreTelemetryProperty.Component]: telemetry_2.CoreTelemetryComponentName,
|
|
933
940
|
});
|
|
934
941
|
if (generateResult.warnings && generateResult.warnings.length > 0) {
|
|
935
|
-
const warnSummary = helper_1.generateScaffoldingSummary(generateResult.warnings, manifestRes.value, inputs.projectPath);
|
|
942
|
+
const warnSummary = helper_1.generateScaffoldingSummary(generateResult.warnings, manifestRes.value, path.relative(inputs.projectPath, outputApiSpecPath));
|
|
936
943
|
context.logProvider.info(warnSummary);
|
|
937
944
|
}
|
|
938
945
|
}
|
|
@@ -1000,6 +1007,141 @@ class FxCore {
|
|
|
1000
1007
|
(_a = globalVars_1.TOOLS.telemetryReporter) === null || _a === void 0 ? void 0 : _a.sendTelemetryEvent(telemetry_1.TelemetryEvent.ProjectType, props);
|
|
1001
1008
|
return teamsfx_api_1.ok(projectTypeRes);
|
|
1002
1009
|
}
|
|
1010
|
+
/**
|
|
1011
|
+
* Add plugin
|
|
1012
|
+
*/
|
|
1013
|
+
async addPlugin(inputs) {
|
|
1014
|
+
var _a, _b;
|
|
1015
|
+
if (!inputs.projectPath) {
|
|
1016
|
+
throw new Error("projectPath is undefined"); // should never happen
|
|
1017
|
+
}
|
|
1018
|
+
const operations = inputs[questionNames_1.QuestionNames.ApiOperation];
|
|
1019
|
+
const url = inputs[questionNames_1.QuestionNames.ApiSpecLocation];
|
|
1020
|
+
const manifestPath = inputs[questionNames_1.QuestionNames.ManifestPath];
|
|
1021
|
+
const appPackageFolder = path.dirname(manifestPath);
|
|
1022
|
+
const apiSpecFolder = path.join(appPackageFolder, helper_1.defaultApiSpecFolderName);
|
|
1023
|
+
const needAddAction = inputs[questionNames_1.QuestionNames.PluginAvailability] === other_1.PluginAvailabilityOptions.action().id ||
|
|
1024
|
+
inputs[questionNames_1.QuestionNames.PluginAvailability] ===
|
|
1025
|
+
other_1.PluginAvailabilityOptions.copilotPluginAndAction().id;
|
|
1026
|
+
const needAddCopilotPlugin = inputs[questionNames_1.QuestionNames.PluginAvailability] === other_1.PluginAvailabilityOptions.copilotPlugin().id ||
|
|
1027
|
+
inputs[questionNames_1.QuestionNames.PluginAvailability] ===
|
|
1028
|
+
other_1.PluginAvailabilityOptions.copilotPluginAndAction().id;
|
|
1029
|
+
// validate the project is valid for adding plugin
|
|
1030
|
+
const manifestRes = await ManifestUtils_1.manifestUtils._readAppManifest(manifestPath);
|
|
1031
|
+
if (manifestRes.isErr()) {
|
|
1032
|
+
return teamsfx_api_1.err(manifestRes.error);
|
|
1033
|
+
}
|
|
1034
|
+
const teamsManifest = manifestRes.value;
|
|
1035
|
+
if (!((_a = teamsManifest.copilotGpts) === null || _a === void 0 ? void 0 : _a[0].file)) {
|
|
1036
|
+
return teamsfx_api_1.err(results_1.AppStudioResultFactory.UserError(errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.name, errors_1.AppStudioError.TeamsAppRequiredPropertyMissingError.message("copilotGpts", manifestPath)));
|
|
1037
|
+
}
|
|
1038
|
+
const gptManifestFilePath = path.join(appPackageFolder, teamsManifest.copilotGpts[0].file);
|
|
1039
|
+
const gptManifestRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.readCopilotGptManifestFile(gptManifestFilePath);
|
|
1040
|
+
if (gptManifestRes.isErr()) {
|
|
1041
|
+
return teamsfx_api_1.err(gptManifestRes.error);
|
|
1042
|
+
}
|
|
1043
|
+
const gptManifest = gptManifestRes.value;
|
|
1044
|
+
const context = utils_2.createContextV3();
|
|
1045
|
+
// confirm
|
|
1046
|
+
const confirmRes = await context.userInteraction.showMessage("warn", localizeUtils_1.getLocalizedString("core.addApi.confirm", path.relative(inputs.projectPath, appPackageFolder)), true, localizeUtils_1.getLocalizedString("core.addApi.continue"));
|
|
1047
|
+
if (confirmRes.isErr()) {
|
|
1048
|
+
return teamsfx_api_1.err(confirmRes.error);
|
|
1049
|
+
}
|
|
1050
|
+
else if (confirmRes.value !== localizeUtils_1.getLocalizedString("core.addApi.continue")) {
|
|
1051
|
+
return teamsfx_api_1.err(new common_2.UserCancelError());
|
|
1052
|
+
}
|
|
1053
|
+
// generate file path
|
|
1054
|
+
let isYaml;
|
|
1055
|
+
try {
|
|
1056
|
+
isYaml = await helper_1.isYamlSpecFile(url);
|
|
1057
|
+
}
|
|
1058
|
+
catch (e) {
|
|
1059
|
+
isYaml = false;
|
|
1060
|
+
}
|
|
1061
|
+
await fs_extra_1.default.ensureDir(apiSpecFolder);
|
|
1062
|
+
let openApiSpecFileName = isYaml ? helper_1.defaultApiSpecYamlFileName : helper_1.defaultApiSpecJsonFileName;
|
|
1063
|
+
const openApiSpecFileNamePrefix = openApiSpecFileName.split(".")[0];
|
|
1064
|
+
const openApiSpecFileType = openApiSpecFileName.split(".")[1];
|
|
1065
|
+
let apiSpecFileNameSuffix = 1;
|
|
1066
|
+
while (await fs_extra_1.default.pathExists(path.join(apiSpecFolder, openApiSpecFileName))) {
|
|
1067
|
+
openApiSpecFileName = `${openApiSpecFileNamePrefix}_${apiSpecFileNameSuffix++}.${openApiSpecFileType}`;
|
|
1068
|
+
}
|
|
1069
|
+
const openApiSpecFilePath = path.join(apiSpecFolder, openApiSpecFileName);
|
|
1070
|
+
let pluginManifestName = helper_1.defaultPluginManifestFileName;
|
|
1071
|
+
const pluginManifestNamePrefix = helper_1.defaultPluginManifestFileName.split(".")[0];
|
|
1072
|
+
let pluginFileNameSuffix = 1;
|
|
1073
|
+
while (await fs_extra_1.default.pathExists(path.join(appPackageFolder, pluginManifestName))) {
|
|
1074
|
+
pluginManifestName = `${pluginManifestNamePrefix}_${pluginFileNameSuffix++}.json`;
|
|
1075
|
+
}
|
|
1076
|
+
const pluginManifestFilePath = path.join(appPackageFolder, pluginManifestName);
|
|
1077
|
+
// generate plugin related files
|
|
1078
|
+
const specParser = new m365_spec_parser_1.SpecParser(url, Object.assign(Object.assign({}, helper_1.copilotPluginParserOptions), { isGptPlugin: true }));
|
|
1079
|
+
try {
|
|
1080
|
+
const generateResult = await specParser.generateForCopilot(manifestPath, operations, openApiSpecFilePath, pluginManifestFilePath);
|
|
1081
|
+
// Send SpecParser.generate() warnings
|
|
1082
|
+
context.telemetryReporter.sendTelemetryEvent(helper_1.specParserGenerateResultTelemetryEvent, {
|
|
1083
|
+
[helper_1.specParserGenerateResultAllSuccessTelemetryProperty]: generateResult.allSuccess.toString(),
|
|
1084
|
+
[helper_1.specParserGenerateResultWarningsTelemetryProperty]: generateResult.warnings
|
|
1085
|
+
.map((w) => w.type.toString() + ": " + w.content)
|
|
1086
|
+
.join(";"),
|
|
1087
|
+
[telemetry_2.CoreTelemetryProperty.Component]: telemetry_2.CoreTelemetryComponentName,
|
|
1088
|
+
});
|
|
1089
|
+
if (generateResult.warnings && generateResult.warnings.length > 0) {
|
|
1090
|
+
const warnSummary = helper_1.generateScaffoldingSummary(generateResult.warnings, manifestRes.value, path.relative(inputs.projectPath, openApiSpecFilePath));
|
|
1091
|
+
context.logProvider.info(warnSummary);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
catch (e) {
|
|
1095
|
+
let error;
|
|
1096
|
+
if (e instanceof m365_spec_parser_1.SpecParserError) {
|
|
1097
|
+
error = helper_1.convertSpecParserErrorToFxError(e);
|
|
1098
|
+
}
|
|
1099
|
+
else {
|
|
1100
|
+
error = common_2.assembleError(e);
|
|
1101
|
+
}
|
|
1102
|
+
return teamsfx_api_1.err(error);
|
|
1103
|
+
}
|
|
1104
|
+
// update Teams manifest
|
|
1105
|
+
if (needAddCopilotPlugin) {
|
|
1106
|
+
teamsManifest.plugins = teamsManifest.plugins || [];
|
|
1107
|
+
teamsManifest.plugins.push({
|
|
1108
|
+
id: "plugin_1",
|
|
1109
|
+
file: pluginManifestName,
|
|
1110
|
+
});
|
|
1111
|
+
const updateManifestRes = await ManifestUtils_1.manifestUtils._writeAppManifest(teamsManifest, manifestPath);
|
|
1112
|
+
if (updateManifestRes.isErr()) {
|
|
1113
|
+
return teamsfx_api_1.err(updateManifestRes.error);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
// update GPT manifest
|
|
1117
|
+
let actionId = "";
|
|
1118
|
+
if (needAddAction) {
|
|
1119
|
+
let suffix = 1;
|
|
1120
|
+
actionId = `action_${suffix}`;
|
|
1121
|
+
const existingActionIds = (_b = gptManifest.actions) === null || _b === void 0 ? void 0 : _b.map((action) => action.id);
|
|
1122
|
+
while (existingActionIds === null || existingActionIds === void 0 ? void 0 : existingActionIds.includes(actionId)) {
|
|
1123
|
+
suffix += 1;
|
|
1124
|
+
actionId = `action_${suffix}`;
|
|
1125
|
+
}
|
|
1126
|
+
const addActionRes = await CopilotGptManifestUtils_1.copilotGptManifestUtils.addAction(gptManifestFilePath, actionId, pluginManifestName);
|
|
1127
|
+
if (addActionRes.isErr()) {
|
|
1128
|
+
return teamsfx_api_1.err(addActionRes.error);
|
|
1129
|
+
}
|
|
1130
|
+
}
|
|
1131
|
+
// TODO: localize string below.
|
|
1132
|
+
let successMessage = "";
|
|
1133
|
+
if (needAddAction && needAddCopilotPlugin) {
|
|
1134
|
+
successMessage = `Action \"${actionId}\" and plugin "plugin_1" have been successfully added to the project.`;
|
|
1135
|
+
}
|
|
1136
|
+
else if (needAddAction) {
|
|
1137
|
+
successMessage = `Action \"${actionId}\" has been successfully added to the project.`;
|
|
1138
|
+
}
|
|
1139
|
+
else if (needAddCopilotPlugin) {
|
|
1140
|
+
successMessage = `Plugin \"plugin_1\" has been successfully added to the project.`;
|
|
1141
|
+
}
|
|
1142
|
+
void context.userInteraction.showMessage("info", successMessage, false);
|
|
1143
|
+
return teamsfx_api_1.ok(undefined);
|
|
1144
|
+
}
|
|
1003
1145
|
}
|
|
1004
1146
|
tslib_1.__decorate([
|
|
1005
1147
|
hooks_1.hooks([
|
|
@@ -1011,6 +1153,19 @@ tslib_1.__decorate([
|
|
|
1011
1153
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1012
1154
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1013
1155
|
], FxCore.prototype, "createProject", null);
|
|
1156
|
+
tslib_1.__decorate([
|
|
1157
|
+
hooks_1.hooks([
|
|
1158
|
+
globalVars_1.ErrorContextMW({
|
|
1159
|
+
component: "FxCore",
|
|
1160
|
+
stage: "createProjectByCustomizedGenerator",
|
|
1161
|
+
reset: true,
|
|
1162
|
+
}),
|
|
1163
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1164
|
+
]),
|
|
1165
|
+
tslib_1.__metadata("design:type", Function),
|
|
1166
|
+
tslib_1.__metadata("design:paramtypes", [Object, Object]),
|
|
1167
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1168
|
+
], FxCore.prototype, "createProjectByCustomizedGenerator", null);
|
|
1014
1169
|
tslib_1.__decorate([
|
|
1015
1170
|
hooks_1.hooks([
|
|
1016
1171
|
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "createSampleProject", reset: true }),
|
|
@@ -1456,5 +1611,16 @@ tslib_1.__decorate([
|
|
|
1456
1611
|
tslib_1.__metadata("design:paramtypes", [String]),
|
|
1457
1612
|
tslib_1.__metadata("design:returntype", Promise)
|
|
1458
1613
|
], FxCore.prototype, "checkProjectType", null);
|
|
1614
|
+
tslib_1.__decorate([
|
|
1615
|
+
hooks_1.hooks([
|
|
1616
|
+
globalVars_1.ErrorContextMW({ component: "FxCore", stage: "addPlugin" }),
|
|
1617
|
+
errorHandler_1.ErrorHandlerMW,
|
|
1618
|
+
questionMW_1.QuestionMW("addPlugin"),
|
|
1619
|
+
concurrentLocker_1.ConcurrentLockerMW,
|
|
1620
|
+
]),
|
|
1621
|
+
tslib_1.__metadata("design:type", Function),
|
|
1622
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
|
1623
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
1624
|
+
], FxCore.prototype, "addPlugin", null);
|
|
1459
1625
|
exports.FxCore = FxCore;
|
|
1460
1626
|
//# sourceMappingURL=FxCore.js.map
|