@microsoft/teamsfx-core 3.1.4 → 3.1.5-alpha.3256bba3fe.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/README.md +4 -0
- package/build/common/featureFlags.d.ts +5 -0
- package/build/common/featureFlags.d.ts.map +1 -1
- package/build/common/featureFlags.js +5 -0
- package/build/common/featureFlags.js.map +1 -1
- package/build/common/telemetry.d.ts +2 -1
- package/build/common/telemetry.d.ts.map +1 -1
- package/build/common/telemetry.js +1 -0
- package/build/common/telemetry.js.map +1 -1
- package/build/common/templates-config.json +2 -2
- package/build/common/wrappedAxiosClient.d.ts +5 -0
- package/build/common/wrappedAxiosClient.d.ts.map +1 -1
- package/build/common/wrappedAxiosClient.js +95 -4
- package/build/common/wrappedAxiosClient.js.map +1 -1
- package/build/component/configManager/actionInjector.d.ts +1 -1
- package/build/component/configManager/actionInjector.d.ts.map +1 -1
- package/build/component/configManager/actionInjector.js +2 -2
- package/build/component/configManager/actionInjector.js.map +1 -1
- package/build/component/driver/copilotAgent/publish.d.ts.map +1 -1
- package/build/component/driver/copilotAgent/publish.js +1 -1
- package/build/component/driver/copilotAgent/publish.js.map +1 -1
- package/build/component/driver/dcr/create.d.ts.map +1 -1
- package/build/component/driver/dcr/create.js +47 -14
- package/build/component/driver/dcr/create.js.map +1 -1
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts +4 -1
- package/build/component/driver/dcr/interface/createDcrArgs.d.ts.map +1 -1
- package/build/component/driver/index.d.ts +0 -1
- package/build/component/driver/index.d.ts.map +1 -1
- package/build/component/driver/index.js +0 -1
- package/build/component/driver/index.js.map +1 -1
- package/build/component/driver/m365/acquire.d.ts.map +1 -1
- package/build/component/driver/m365/acquire.js +2 -2
- package/build/component/driver/m365/acquire.js.map +1 -1
- package/build/component/driver/oauth/create.d.ts.map +1 -1
- package/build/component/driver/oauth/create.js +16 -2
- package/build/component/driver/oauth/create.js.map +1 -1
- package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.d.ts +5 -0
- package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.d.ts.map +1 -0
- package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.js +13 -0
- package/build/component/driver/oauth/error/oauthSupportedAccountTypesUnsupportedCloud.js.map +1 -0
- package/build/component/driver/oauth/interface/createOauthArgs.d.ts +1 -0
- package/build/component/driver/oauth/interface/createOauthArgs.d.ts.map +1 -1
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts +1 -0
- package/build/component/driver/oauth/interface/updateOauthArgs.d.ts.map +1 -1
- package/build/component/driver/oauth/update.d.ts.map +1 -1
- package/build/component/driver/oauth/update.js +26 -4
- package/build/component/driver/oauth/update.js.map +1 -1
- package/build/component/driver/oauth/utility/supportedAccountTypes.d.ts +6 -0
- package/build/component/driver/oauth/utility/supportedAccountTypes.d.ts.map +1 -0
- package/build/component/driver/oauth/utility/supportedAccountTypes.js +31 -0
- package/build/component/driver/oauth/utility/supportedAccountTypes.js.map +1 -0
- package/build/component/driver/teamsApp/constants.d.ts +5 -0
- package/build/component/driver/teamsApp/constants.d.ts.map +1 -1
- package/build/component/driver/teamsApp/constants.js +5 -0
- package/build/component/driver/teamsApp/constants.js.map +1 -1
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts +5 -2
- package/build/component/driver/teamsApp/interfaces/DcrRegistration.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts +6 -0
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.d.ts.map +1 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js +5 -1
- package/build/component/driver/teamsApp/interfaces/OauthRegistration.js.map +1 -1
- package/build/component/generator/generatorProvider.d.ts.map +1 -1
- package/build/component/generator/generatorProvider.js +0 -3
- package/build/component/generator/generatorProvider.js.map +1 -1
- package/build/component/generator/templates/templateNames.d.ts +1 -1
- package/build/component/generator/templates/templateNames.d.ts.map +1 -1
- package/build/component/m365/packageService.d.ts +4 -3
- package/build/component/m365/packageService.d.ts.map +1 -1
- package/build/component/m365/packageService.js +34 -30
- package/build/component/m365/packageService.js.map +1 -1
- package/build/component/m365/serviceConstant.d.ts.map +1 -1
- package/build/component/m365/serviceConstant.js +5 -0
- package/build/component/m365/serviceConstant.js.map +1 -1
- package/build/component/m365/skills/graphSkillFileStore.d.ts +14 -0
- package/build/component/m365/skills/graphSkillFileStore.d.ts.map +1 -0
- package/build/component/m365/skills/graphSkillFileStore.js +164 -0
- package/build/component/m365/skills/graphSkillFileStore.js.map +1 -0
- package/build/component/m365/skills/incrementalSkillUpload.d.ts +6 -0
- package/build/component/m365/skills/incrementalSkillUpload.d.ts.map +1 -0
- package/build/component/m365/skills/incrementalSkillUpload.js +70 -0
- package/build/component/m365/skills/incrementalSkillUpload.js.map +1 -0
- package/build/component/m365/skills/skillDirectoryClient.d.ts +12 -0
- package/build/component/m365/skills/skillDirectoryClient.d.ts.map +1 -0
- package/build/component/m365/skills/skillDirectoryClient.js +150 -0
- package/build/component/m365/skills/skillDirectoryClient.js.map +1 -0
- package/build/component/m365/skills/skillFileSync.d.ts +35 -0
- package/build/component/m365/skills/skillFileSync.d.ts.map +1 -0
- package/build/component/m365/skills/skillFileSync.js +256 -0
- package/build/component/m365/skills/skillFileSync.js.map +1 -0
- package/build/component/m365/skills/skillPackage.d.ts +40 -0
- package/build/component/m365/skills/skillPackage.d.ts.map +1 -0
- package/build/component/m365/skills/skillPackage.js +471 -0
- package/build/component/m365/skills/skillPackage.js.map +1 -0
- package/build/component/m365/skills/skillRequest.d.ts +7 -0
- package/build/component/m365/skills/skillRequest.d.ts.map +1 -0
- package/build/component/m365/skills/skillRequest.js +91 -0
- package/build/component/m365/skills/skillRequest.js.map +1 -0
- package/build/component/utils/mcpAuthScaffolder.d.ts +5 -20
- package/build/component/utils/mcpAuthScaffolder.d.ts.map +1 -1
- package/build/component/utils/mcpAuthScaffolder.js +9 -24
- package/build/component/utils/mcpAuthScaffolder.js.map +1 -1
- package/build/core/FxCore.d.ts +2 -4
- package/build/core/FxCore.d.ts.map +1 -1
- package/build/core/FxCore.js +7 -22
- package/build/core/FxCore.js.map +1 -1
- package/build/question/create.d.ts +0 -6
- package/build/question/create.d.ts.map +1 -1
- package/build/question/create.js +119 -281
- package/build/question/create.js.map +1 -1
- package/build/question/generator.js +0 -2
- package/build/question/generator.js.map +1 -1
- package/build/question/index.d.ts +0 -1
- package/build/question/index.d.ts.map +1 -1
- package/build/question/index.js +0 -3
- package/build/question/index.js.map +1 -1
- package/build/question/inputs/index.d.ts +0 -1
- package/build/question/inputs/index.d.ts.map +1 -1
- package/build/question/inputs/index.js +0 -1
- package/build/question/inputs/index.js.map +1 -1
- package/build/question/options/CreateProjectOptions.d.ts.map +1 -1
- package/build/question/options/CreateProjectOptions.js +0 -1
- package/build/question/options/CreateProjectOptions.js.map +1 -1
- package/build/question/options/index.d.ts +0 -1
- package/build/question/options/index.d.ts.map +1 -1
- package/build/question/options/index.js +0 -1
- package/build/question/options/index.js.map +1 -1
- package/build/question/other.d.ts +0 -1
- package/build/question/other.d.ts.map +1 -1
- package/build/question/other.js +158 -214
- package/build/question/other.js.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts +0 -1
- package/build/question/scaffold/vsc/CapabilityOptions.d.ts.map +1 -1
- package/build/question/scaffold/vsc/CapabilityOptions.js +0 -9
- package/build/question/scaffold/vsc/CapabilityOptions.js.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.d.ts.map +1 -1
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js +0 -24
- package/build/question/scaffold/vsc/teamsProjectTypeNode.js.map +1 -1
- package/build/v4/mcp/mcpAuthAction.d.ts +0 -1
- package/build/v4/mcp/mcpAuthAction.d.ts.map +1 -1
- package/build/v4/mcp/mcpAuthAction.js +5 -7
- package/build/v4/mcp/mcpAuthAction.js.map +1 -1
- package/build/v4/mcp/mcpAuthScaffold.d.ts.map +1 -1
- package/build/v4/mcp/mcpAuthScaffold.js +4 -12
- package/build/v4/mcp/mcpAuthScaffold.js.map +1 -1
- package/package.json +11 -8
- package/resource/package.nls.cs.json +72 -68
- package/resource/package.nls.de.json +72 -68
- package/resource/package.nls.es.json +72 -68
- package/resource/package.nls.fr.json +72 -68
- package/resource/package.nls.it.json +72 -68
- package/resource/package.nls.ja.json +72 -68
- package/resource/package.nls.json +15 -58
- package/resource/package.nls.ko.json +72 -68
- package/resource/package.nls.pl.json +72 -68
- package/resource/package.nls.pt-BR.json +72 -68
- package/resource/package.nls.ru.json +72 -68
- package/resource/package.nls.tr.json +72 -68
- package/resource/package.nls.zh-Hans.json +72 -68
- package/resource/package.nls.zh-Hant.json +72 -68
- package/resource/yaml-schema/v1.13/yaml.schema.json +71 -33
- package/resource/yaml-schema/yaml.schema.json +71 -33
- 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/metadata.zip +0 -0
- package/templates/v4/floor.json +1 -1
- package/templates/v4/templates-metadata.zip +0 -0
- package/templates/v4/templates.zip +0 -0
- package/build/common/treatmentVariables.d.ts +0 -5
- package/build/common/treatmentVariables.d.ts.map +0 -1
- package/build/common/treatmentVariables.js +0 -10
- package/build/common/treatmentVariables.js.map +0 -1
- package/build/component/driver/add/addWebPart.d.ts +0 -12
- package/build/component/driver/add/addWebPart.d.ts.map +0 -1
- package/build/component/driver/add/addWebPart.js +0 -109
- package/build/component/driver/add/addWebPart.js.map +0 -1
- package/build/component/driver/add/error/noConfigurationError.d.ts +0 -5
- package/build/component/driver/add/error/noConfigurationError.d.ts.map +0 -1
- package/build/component/driver/add/error/noConfigurationError.js +0 -22
- package/build/component/driver/add/error/noConfigurationError.js.map +0 -1
- package/build/component/driver/add/interface/AddWebPartArgs.d.ts +0 -27
- package/build/component/driver/add/interface/AddWebPartArgs.d.ts.map +0 -1
- package/build/component/driver/add/interface/AddWebPartArgs.js +0 -5
- package/build/component/driver/add/interface/AddWebPartArgs.js.map +0 -1
- package/build/component/driver/add/utility/constants.d.ts +0 -8
- package/build/component/driver/add/utility/constants.d.ts.map +0 -1
- package/build/component/driver/add/utility/constants.js +0 -14
- package/build/component/driver/add/utility/constants.js.map +0 -1
- package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts +0 -4
- package/build/component/generator/spfx/depsChecker/dependencyChecker.d.ts.map +0 -1
- package/build/component/generator/spfx/depsChecker/dependencyChecker.js +0 -5
- package/build/component/generator/spfx/depsChecker/dependencyChecker.js.map +0 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts +0 -20
- package/build/component/generator/spfx/depsChecker/generatorChecker.d.ts.map +0 -1
- package/build/component/generator/spfx/depsChecker/generatorChecker.js +0 -129
- package/build/component/generator/spfx/depsChecker/generatorChecker.js.map +0 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts +0 -20
- package/build/component/generator/spfx/depsChecker/yoChecker.d.ts.map +0 -1
- package/build/component/generator/spfx/depsChecker/yoChecker.js +0 -143
- package/build/component/generator/spfx/depsChecker/yoChecker.js.map +0 -1
- package/build/component/generator/spfx/error.d.ts +0 -15
- package/build/component/generator/spfx/error.d.ts.map +0 -1
- package/build/component/generator/spfx/error.js +0 -124
- package/build/component/generator/spfx/error.js.map +0 -1
- package/build/component/generator/spfx/spfxGenerator.d.ts +0 -30
- package/build/component/generator/spfx/spfxGenerator.d.ts.map +0 -1
- package/build/component/generator/spfx/spfxGenerator.js +0 -684
- package/build/component/generator/spfx/spfxGenerator.js.map +0 -1
- package/build/component/generator/spfx/utils/constants.d.ts +0 -45
- package/build/component/generator/spfx/utils/constants.d.ts.map +0 -1
- package/build/component/generator/spfx/utils/constants.js +0 -56
- package/build/component/generator/spfx/utils/constants.js.map +0 -1
- package/build/component/generator/spfx/utils/progress-helper.d.ts +0 -9
- package/build/component/generator/spfx/utils/progress-helper.d.ts.map +0 -1
- package/build/component/generator/spfx/utils/progress-helper.js +0 -22
- package/build/component/generator/spfx/utils/progress-helper.js.map +0 -1
- package/build/component/generator/spfx/utils/telemetry-helper.d.ts +0 -14
- package/build/component/generator/spfx/utils/telemetry-helper.d.ts.map +0 -1
- package/build/component/generator/spfx/utils/telemetry-helper.js +0 -31
- package/build/component/generator/spfx/utils/telemetry-helper.js.map +0 -1
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts +0 -20
- package/build/component/generator/spfx/utils/telemetryEvents.d.ts.map +0 -1
- package/build/component/generator/spfx/utils/telemetryEvents.js +0 -27
- package/build/component/generator/spfx/utils/telemetryEvents.js.map +0 -1
- package/build/component/generator/spfx/utils/utils.d.ts +0 -19
- package/build/component/generator/spfx/utils/utils.d.ts.map +0 -1
- package/build/component/generator/spfx/utils/utils.js +0 -184
- package/build/component/generator/spfx/utils/utils.js.map +0 -1
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts +0 -20
- package/build/question/inputs/SPFxAddWebpartInputs.d.ts.map +0 -1
- package/build/question/inputs/SPFxAddWebpartInputs.js +0 -5
- package/build/question/inputs/SPFxAddWebpartInputs.js.map +0 -1
- package/build/question/options/SPFxAddWebpartOptions.d.ts +0 -10
- package/build/question/options/SPFxAddWebpartOptions.d.ts.map +0 -1
- package/build/question/options/SPFxAddWebpartOptions.js +0 -50
- package/build/question/options/SPFxAddWebpartOptions.js.map +0 -1
package/build/question/other.js
CHANGED
|
@@ -6,7 +6,6 @@ exports.convertAadToNewSchemaQuestionNode = convertAadToNewSchemaQuestionNode;
|
|
|
6
6
|
exports.deployAadManifestQuestionNode = deployAadManifestQuestionNode;
|
|
7
7
|
exports.validateTeamsAppQuestionNode = validateTeamsAppQuestionNode;
|
|
8
8
|
exports.selectTeamsAppManifestQuestionNode = selectTeamsAppManifestQuestionNode;
|
|
9
|
-
exports.addWebPartQuestionNode = addWebPartQuestionNode;
|
|
10
9
|
exports.selectTeamsAppManifestQuestion = selectTeamsAppManifestQuestion;
|
|
11
10
|
exports.selectLocalTeamsAppManifestQuestion = selectLocalTeamsAppManifestQuestion;
|
|
12
11
|
exports.confirmManifestQuestion = confirmManifestQuestion;
|
|
@@ -64,11 +63,10 @@ const constants_1 = require("../common/constants");
|
|
|
64
63
|
const featureFlags_1 = require("../common/featureFlags");
|
|
65
64
|
const globalVars_1 = require("../common/globalVars");
|
|
66
65
|
const localizeUtils_1 = require("../common/localizeUtils");
|
|
67
|
-
const constants_2 = require("../component/driver/add/utility/constants");
|
|
68
66
|
const ManifestUtils_1 = require("../component/driver/teamsApp/utils/ManifestUtils");
|
|
69
67
|
const envUtil_1 = require("../component/utils/envUtil");
|
|
70
68
|
const environmentName_1 = require("../core/environmentName");
|
|
71
|
-
const
|
|
69
|
+
const constants_2 = require("./constants");
|
|
72
70
|
const create_1 = require("./create");
|
|
73
71
|
const commonNodes_1 = require("./scaffold/commonNodes");
|
|
74
72
|
const teamsProjectTypeNode_1 = require("./scaffold/vsc/teamsProjectTypeNode");
|
|
@@ -78,13 +76,13 @@ function convertAadToNewSchemaQuestionNode() {
|
|
|
78
76
|
children: [
|
|
79
77
|
{
|
|
80
78
|
condition: (inputs) => teamsfx_api_1.DynamicPlatforms.includes(inputs.platform) &&
|
|
81
|
-
!inputs[
|
|
79
|
+
!inputs[constants_2.QuestionNames.AadAppManifestFilePath],
|
|
82
80
|
data: selectAadManifestQuestion(),
|
|
83
81
|
children: [
|
|
84
82
|
{
|
|
85
83
|
condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.VSCode && // confirm question only works for VSC
|
|
86
84
|
inputs.projectPath !== undefined &&
|
|
87
|
-
path.resolve(inputs[
|
|
85
|
+
path.resolve(inputs[constants_2.QuestionNames.AadAppManifestFilePath]) !==
|
|
88
86
|
path.join(inputs.projectPath, "aad.manifest.json"),
|
|
89
87
|
data: confirmManifestQuestion(false, false),
|
|
90
88
|
cliOptionDisabled: "self",
|
|
@@ -106,7 +104,7 @@ function deployAadManifestQuestionNode() {
|
|
|
106
104
|
{
|
|
107
105
|
condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.VSCode && // confirm question only works for VSC
|
|
108
106
|
inputs.projectPath !== undefined &&
|
|
109
|
-
path.resolve(inputs[
|
|
107
|
+
path.resolve(inputs[constants_2.QuestionNames.AadAppManifestFilePath]) !==
|
|
110
108
|
path.join(inputs.projectPath, "aad.manifest.json"),
|
|
111
109
|
data: confirmManifestQuestion(false, false),
|
|
112
110
|
cliOptionDisabled: "self",
|
|
@@ -114,7 +112,7 @@ function deployAadManifestQuestionNode() {
|
|
|
114
112
|
},
|
|
115
113
|
{
|
|
116
114
|
condition: isAadMainifestContainsPlaceholder,
|
|
117
|
-
data: selectTargetEnvQuestion(
|
|
115
|
+
data: selectTargetEnvQuestion(constants_2.QuestionNames.Env, false, false, ""),
|
|
118
116
|
},
|
|
119
117
|
],
|
|
120
118
|
},
|
|
@@ -128,15 +126,15 @@ function validateTeamsAppQuestionNode() {
|
|
|
128
126
|
inputsDisabled: "self",
|
|
129
127
|
children: [
|
|
130
128
|
{
|
|
131
|
-
condition: { equals:
|
|
129
|
+
condition: { equals: constants_2.TeamsAppValidationOptions.schema().id },
|
|
132
130
|
data: selectTeamsAppManifestQuestion(),
|
|
133
131
|
},
|
|
134
132
|
{
|
|
135
|
-
condition: { equals:
|
|
133
|
+
condition: { equals: constants_2.TeamsAppValidationOptions.package().id },
|
|
136
134
|
data: selectTeamsAppPackageQuestion(),
|
|
137
135
|
},
|
|
138
136
|
{
|
|
139
|
-
condition: { equals:
|
|
137
|
+
condition: { equals: constants_2.TeamsAppValidationOptions.testCases().id },
|
|
140
138
|
data: selectTeamsAppPackageQuestion(),
|
|
141
139
|
},
|
|
142
140
|
],
|
|
@@ -158,69 +156,15 @@ function selectTeamsAppManifestQuestionNode() {
|
|
|
158
156
|
function confirmCondition(inputs, isLocal) {
|
|
159
157
|
return (inputs.platform === teamsfx_api_1.Platform.VSCode && // confirm question only works for VSC
|
|
160
158
|
inputs.projectPath &&
|
|
161
|
-
inputs[isLocal ?
|
|
159
|
+
inputs[isLocal ? constants_2.QuestionNames.LocalTeamsAppManifestFilePath : constants_2.QuestionNames.TeamsAppManifestFilePath] &&
|
|
162
160
|
path.resolve(inputs[isLocal
|
|
163
|
-
?
|
|
164
|
-
:
|
|
161
|
+
? constants_2.QuestionNames.LocalTeamsAppManifestFilePath
|
|
162
|
+
: constants_2.QuestionNames.TeamsAppManifestFilePath]) !==
|
|
165
163
|
path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, isLocal ? "manifest.local.json" : "manifest.json"));
|
|
166
164
|
}
|
|
167
|
-
async function spfxFrameworkExist(inputs) {
|
|
168
|
-
if (inputs.platform === teamsfx_api_1.Platform.CLI_HELP) {
|
|
169
|
-
return false;
|
|
170
|
-
}
|
|
171
|
-
const yorcPath = path.join(inputs[constants_3.QuestionNames.SPFxFolder], constants_2.Constants.YO_RC_FILE);
|
|
172
|
-
if (!(await fs_extra_1.default.pathExists(yorcPath))) {
|
|
173
|
-
return false;
|
|
174
|
-
}
|
|
175
|
-
const yorcJson = (await fs_extra_1.default.readJson(yorcPath));
|
|
176
|
-
if (!yorcJson["@microsoft/generator-sharepoint"]) {
|
|
177
|
-
return false;
|
|
178
|
-
}
|
|
179
|
-
return yorcJson["@microsoft/generator-sharepoint"]["template"];
|
|
180
|
-
}
|
|
181
|
-
function addWebPartQuestionNode() {
|
|
182
|
-
return {
|
|
183
|
-
data: (0, create_1.SPFxImportFolderQuestion)(true),
|
|
184
|
-
children: [
|
|
185
|
-
{
|
|
186
|
-
data: (0, create_1.SPFxWebpartNameQuestion)(),
|
|
187
|
-
children: [
|
|
188
|
-
{
|
|
189
|
-
data: (0, create_1.SPFxFrameworkQuestion)(),
|
|
190
|
-
condition: async (inputs) => {
|
|
191
|
-
return !(await spfxFrameworkExist(inputs));
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
data: selectTeamsAppManifestQuestion(),
|
|
196
|
-
children: [
|
|
197
|
-
{
|
|
198
|
-
condition: (inputs) => confirmCondition(inputs, false),
|
|
199
|
-
data: confirmManifestQuestion(true, false),
|
|
200
|
-
cliOptionDisabled: "self",
|
|
201
|
-
inputsDisabled: "self",
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
data: selectLocalTeamsAppManifestQuestion(),
|
|
205
|
-
children: [
|
|
206
|
-
{
|
|
207
|
-
condition: (inputs) => confirmCondition(inputs, true),
|
|
208
|
-
data: confirmManifestQuestion(true, true),
|
|
209
|
-
cliOptionDisabled: "self",
|
|
210
|
-
inputsDisabled: "self",
|
|
211
|
-
},
|
|
212
|
-
],
|
|
213
|
-
},
|
|
214
|
-
],
|
|
215
|
-
},
|
|
216
|
-
],
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
165
|
function selectTeamsAppManifestQuestion() {
|
|
222
166
|
return {
|
|
223
|
-
name:
|
|
167
|
+
name: constants_2.QuestionNames.TeamsAppManifestFilePath,
|
|
224
168
|
cliName: "manifest-file",
|
|
225
169
|
cliShortName: "t",
|
|
226
170
|
cliDescription: "Specifies the app manifest file path.",
|
|
@@ -246,7 +190,7 @@ function selectTeamsAppManifestQuestion() {
|
|
|
246
190
|
}
|
|
247
191
|
function selectLocalTeamsAppManifestQuestion() {
|
|
248
192
|
return {
|
|
249
|
-
name:
|
|
193
|
+
name: constants_2.QuestionNames.LocalTeamsAppManifestFilePath,
|
|
250
194
|
cliName: "local-manifest-file",
|
|
251
195
|
cliShortName: "l",
|
|
252
196
|
cliDescription: "Specifies the app manifest template file path for local environment, it can be either absolute path or relative path to project root folder.",
|
|
@@ -272,10 +216,10 @@ function selectLocalTeamsAppManifestQuestion() {
|
|
|
272
216
|
}
|
|
273
217
|
function confirmManifestQuestion(isTeamsApp = true, isLocal = false) {
|
|
274
218
|
const map = {
|
|
275
|
-
true_true:
|
|
276
|
-
true_false:
|
|
277
|
-
false_true:
|
|
278
|
-
false_false:
|
|
219
|
+
true_true: constants_2.QuestionNames.ConfirmLocalManifest,
|
|
220
|
+
true_false: constants_2.QuestionNames.ConfirmManifest,
|
|
221
|
+
false_true: constants_2.QuestionNames.ConfirmAadManifest,
|
|
222
|
+
false_false: constants_2.QuestionNames.ConfirmAadManifest,
|
|
279
223
|
};
|
|
280
224
|
const name = map[`${isTeamsApp.toString()}_${isLocal.toString()}`];
|
|
281
225
|
return {
|
|
@@ -295,14 +239,14 @@ function confirmManifestQuestion(isTeamsApp = true, isLocal = false) {
|
|
|
295
239
|
id: "manifest",
|
|
296
240
|
label: `$(file) ${path.basename(isTeamsApp
|
|
297
241
|
? inputs[isLocal
|
|
298
|
-
?
|
|
299
|
-
:
|
|
300
|
-
: inputs[
|
|
242
|
+
? constants_2.QuestionNames.LocalTeamsAppManifestFilePath
|
|
243
|
+
: constants_2.QuestionNames.TeamsAppManifestFilePath]
|
|
244
|
+
: inputs[constants_2.QuestionNames.AadAppManifestFilePath])}`,
|
|
301
245
|
description: path.dirname(isTeamsApp
|
|
302
246
|
? inputs[isLocal
|
|
303
|
-
?
|
|
304
|
-
:
|
|
305
|
-
: inputs[
|
|
247
|
+
? constants_2.QuestionNames.LocalTeamsAppManifestFilePath
|
|
248
|
+
: constants_2.QuestionNames.TeamsAppManifestFilePath]
|
|
249
|
+
: inputs[constants_2.QuestionNames.AadAppManifestFilePath]),
|
|
306
250
|
},
|
|
307
251
|
];
|
|
308
252
|
},
|
|
@@ -310,12 +254,12 @@ function confirmManifestQuestion(isTeamsApp = true, isLocal = false) {
|
|
|
310
254
|
}
|
|
311
255
|
function selectTeamsAppValidationMethodQuestion() {
|
|
312
256
|
const options = [
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
257
|
+
constants_2.TeamsAppValidationOptions.schema(),
|
|
258
|
+
constants_2.TeamsAppValidationOptions.package(),
|
|
259
|
+
constants_2.TeamsAppValidationOptions.testCases(),
|
|
316
260
|
];
|
|
317
261
|
return {
|
|
318
|
-
name:
|
|
262
|
+
name: constants_2.QuestionNames.ValidateMethod,
|
|
319
263
|
title: (0, localizeUtils_1.getLocalizedString)("core.selectValidateMethodQuestion.validate.selectTitle"),
|
|
320
264
|
staticOptions: options,
|
|
321
265
|
type: "singleSelect",
|
|
@@ -336,7 +280,7 @@ function openApiApiKeyNode() {
|
|
|
336
280
|
condition: (inputs) => {
|
|
337
281
|
const authRegistrations = inputs.apiAuthData ?? [];
|
|
338
282
|
return (inputs.platform === teamsfx_api_1.Platform.CLI &&
|
|
339
|
-
inputs[
|
|
283
|
+
inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.apiSpec().id &&
|
|
340
284
|
authRegistrations.length === 1 &&
|
|
341
285
|
authRegistrations[0].authType === "apiKey");
|
|
342
286
|
},
|
|
@@ -346,7 +290,7 @@ function openApiApiKeyNode() {
|
|
|
346
290
|
function apiKeyValueQuestion() {
|
|
347
291
|
return {
|
|
348
292
|
type: "text",
|
|
349
|
-
name:
|
|
293
|
+
name: constants_2.QuestionNames.ApiSpecApiKey,
|
|
350
294
|
cliShortName: "k",
|
|
351
295
|
password: true,
|
|
352
296
|
title: (0, localizeUtils_1.getLocalizedString)("core.addOpenApiActionQuestion.ApiKey.title"),
|
|
@@ -368,7 +312,7 @@ function openApiOAuthCredentialNodes() {
|
|
|
368
312
|
const condition = (inputs) => {
|
|
369
313
|
const authRegistrations = inputs.apiAuthData ?? [];
|
|
370
314
|
return (inputs.platform === teamsfx_api_1.Platform.CLI &&
|
|
371
|
-
inputs[
|
|
315
|
+
inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.apiSpec().id &&
|
|
372
316
|
authRegistrations.length === 1 &&
|
|
373
317
|
authRegistrations[0].authType === "oauth2");
|
|
374
318
|
};
|
|
@@ -377,14 +321,14 @@ function openApiOAuthCredentialNodes() {
|
|
|
377
321
|
condition,
|
|
378
322
|
data: {
|
|
379
323
|
type: "singleSelect",
|
|
380
|
-
name:
|
|
324
|
+
name: constants_2.QuestionNames.OpenApiAuthIdentityProvider,
|
|
381
325
|
title: (0, localizeUtils_1.getLocalizedString)("core.addOpenApiActionQuestion.IdentityProvider.title"),
|
|
382
326
|
cliDescription: (0, localizeUtils_1.getLocalizedString)("core.addOpenApiActionQuestion.IdentityProvider.description"),
|
|
383
327
|
staticOptions: [
|
|
384
|
-
|
|
385
|
-
|
|
328
|
+
constants_2.AddAuthActionAuthTypeOptions.oauth(),
|
|
329
|
+
constants_2.AddAuthActionAuthTypeOptions.microsoftEntra(),
|
|
386
330
|
],
|
|
387
|
-
default:
|
|
331
|
+
default: constants_2.AddAuthActionAuthTypeOptions.oauth().id,
|
|
388
332
|
required: false,
|
|
389
333
|
},
|
|
390
334
|
},
|
|
@@ -392,20 +336,20 @@ function openApiOAuthCredentialNodes() {
|
|
|
392
336
|
condition,
|
|
393
337
|
data: {
|
|
394
338
|
type: "text",
|
|
395
|
-
name:
|
|
339
|
+
name: constants_2.QuestionNames.OpenApiAuthClientId,
|
|
396
340
|
title: (0, localizeUtils_1.getLocalizedString)("core.addOpenApiActionQuestion.OAuthClientId.title"),
|
|
397
341
|
required: false,
|
|
398
342
|
},
|
|
399
343
|
},
|
|
400
344
|
{
|
|
401
345
|
condition: (inputs) => condition(inputs) &&
|
|
402
|
-
typeof inputs[
|
|
403
|
-
inputs[
|
|
404
|
-
inputs[
|
|
405
|
-
|
|
346
|
+
typeof inputs[constants_2.QuestionNames.OpenApiAuthClientId] === "string" &&
|
|
347
|
+
inputs[constants_2.QuestionNames.OpenApiAuthClientId].trim().length > 0 &&
|
|
348
|
+
inputs[constants_2.QuestionNames.OpenApiAuthIdentityProvider] !==
|
|
349
|
+
constants_2.AddAuthActionAuthTypeOptions.microsoftEntra().id,
|
|
406
350
|
data: {
|
|
407
351
|
type: "confirm",
|
|
408
|
-
name:
|
|
352
|
+
name: constants_2.QuestionNames.OpenApiAuthPKCE,
|
|
409
353
|
title: (0, localizeUtils_1.getLocalizedString)("core.addOpenApiActionQuestion.OAuthPKCE.title"),
|
|
410
354
|
isBoolean: true,
|
|
411
355
|
required: false,
|
|
@@ -413,14 +357,14 @@ function openApiOAuthCredentialNodes() {
|
|
|
413
357
|
},
|
|
414
358
|
{
|
|
415
359
|
condition: (inputs) => condition(inputs) &&
|
|
416
|
-
typeof inputs[
|
|
417
|
-
inputs[
|
|
418
|
-
inputs[
|
|
419
|
-
|
|
420
|
-
inputs[
|
|
360
|
+
typeof inputs[constants_2.QuestionNames.OpenApiAuthClientId] === "string" &&
|
|
361
|
+
inputs[constants_2.QuestionNames.OpenApiAuthClientId].trim().length > 0 &&
|
|
362
|
+
inputs[constants_2.QuestionNames.OpenApiAuthIdentityProvider] !==
|
|
363
|
+
constants_2.AddAuthActionAuthTypeOptions.microsoftEntra().id &&
|
|
364
|
+
inputs[constants_2.QuestionNames.OpenApiAuthPKCE] !== true,
|
|
421
365
|
data: {
|
|
422
366
|
type: "text",
|
|
423
|
-
name:
|
|
367
|
+
name: constants_2.QuestionNames.OpenApiAuthClientSecret,
|
|
424
368
|
title: (0, localizeUtils_1.getLocalizedString)("core.addOpenApiActionQuestion.OAuthClientSecret.title"),
|
|
425
369
|
password: true,
|
|
426
370
|
forgetLastValue: true,
|
|
@@ -429,13 +373,13 @@ function openApiOAuthCredentialNodes() {
|
|
|
429
373
|
},
|
|
430
374
|
{
|
|
431
375
|
condition: (inputs) => condition(inputs) &&
|
|
432
|
-
typeof inputs[
|
|
433
|
-
inputs[
|
|
434
|
-
inputs[
|
|
435
|
-
|
|
376
|
+
typeof inputs[constants_2.QuestionNames.OpenApiAuthClientId] === "string" &&
|
|
377
|
+
inputs[constants_2.QuestionNames.OpenApiAuthClientId].trim().length > 0 &&
|
|
378
|
+
inputs[constants_2.QuestionNames.OpenApiAuthIdentityProvider] !==
|
|
379
|
+
constants_2.AddAuthActionAuthTypeOptions.microsoftEntra().id,
|
|
436
380
|
data: {
|
|
437
381
|
type: "text",
|
|
438
|
-
name:
|
|
382
|
+
name: constants_2.QuestionNames.OpenApiAuthScopes,
|
|
439
383
|
title: (0, localizeUtils_1.getLocalizedString)("core.addOpenApiActionQuestion.OAuthScopes.title"),
|
|
440
384
|
required: false,
|
|
441
385
|
},
|
|
@@ -445,24 +389,24 @@ function openApiOAuthCredentialNodes() {
|
|
|
445
389
|
function authConfigApiKeyNode() {
|
|
446
390
|
return {
|
|
447
391
|
condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.CLI &&
|
|
448
|
-
(inputs[
|
|
449
|
-
inputs[
|
|
392
|
+
(inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.apiKey().id ||
|
|
393
|
+
inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.bearerToken().id),
|
|
450
394
|
data: apiKeyValueQuestion(),
|
|
451
395
|
};
|
|
452
396
|
}
|
|
453
397
|
function authConfigOAuthCredentialNodes() {
|
|
454
398
|
const clientIdCondition = (inputs) => inputs.platform === teamsfx_api_1.Platform.CLI &&
|
|
455
|
-
(inputs[
|
|
456
|
-
inputs[
|
|
399
|
+
(inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.oauth().id ||
|
|
400
|
+
inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.microsoftEntra().id);
|
|
457
401
|
const clientSecretCondition = (inputs) => clientIdCondition(inputs) &&
|
|
458
|
-
inputs[
|
|
459
|
-
inputs[
|
|
402
|
+
inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.oauth().id &&
|
|
403
|
+
inputs[constants_2.QuestionNames.OauthPKCE] !== "true";
|
|
460
404
|
return [
|
|
461
405
|
{
|
|
462
406
|
condition: clientIdCondition,
|
|
463
407
|
data: {
|
|
464
408
|
type: "text",
|
|
465
|
-
name:
|
|
409
|
+
name: constants_2.QuestionNames.OauthClientId,
|
|
466
410
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientId"),
|
|
467
411
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientId.placeholder"),
|
|
468
412
|
cliDescription: "OAuth client ID for the authentication configuration.",
|
|
@@ -474,7 +418,7 @@ function authConfigOAuthCredentialNodes() {
|
|
|
474
418
|
condition: clientSecretCondition,
|
|
475
419
|
data: {
|
|
476
420
|
type: "text",
|
|
477
|
-
name:
|
|
421
|
+
name: constants_2.QuestionNames.OauthClientSecret,
|
|
478
422
|
password: true,
|
|
479
423
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientSecret"),
|
|
480
424
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientSecret.placeholder"),
|
|
@@ -496,7 +440,7 @@ function authConfigOAuthCredentialNodes() {
|
|
|
496
440
|
}
|
|
497
441
|
function selectTeamsAppPackageQuestion() {
|
|
498
442
|
return {
|
|
499
|
-
name:
|
|
443
|
+
name: constants_2.QuestionNames.TeamsAppPackageFilePath,
|
|
500
444
|
title: (0, localizeUtils_1.getLocalizedString)("core.selectTeamsAppPackageQuestion.title"),
|
|
501
445
|
cliDescription: "Specifies the zipped app package path, it's a relative path to project root folder, defaults to '${folder}/appPackage/build/appPackage.${env}.zip'",
|
|
502
446
|
cliName: "app-package-file",
|
|
@@ -522,13 +466,13 @@ function selectTeamsAppPackageQuestionNode() {
|
|
|
522
466
|
}
|
|
523
467
|
function selectM365HostQuestion() {
|
|
524
468
|
return {
|
|
525
|
-
name:
|
|
469
|
+
name: constants_2.QuestionNames.M365Host,
|
|
526
470
|
cliShortName: "m",
|
|
527
471
|
cliDescription: "Preview the application in Teams, Outlook or the Microsoft 365 app.",
|
|
528
472
|
title: (0, localizeUtils_1.getLocalizedString)("core.M365HostQuestion.title"),
|
|
529
|
-
default:
|
|
473
|
+
default: constants_2.HubOptions.teams().id,
|
|
530
474
|
type: "singleSelect",
|
|
531
|
-
staticOptions:
|
|
475
|
+
staticOptions: constants_2.HubOptions.all(),
|
|
532
476
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.M365HostQuestion.placeholder"),
|
|
533
477
|
};
|
|
534
478
|
}
|
|
@@ -543,7 +487,7 @@ function previewWithTeamsAppManifestQuestionNode() {
|
|
|
543
487
|
],
|
|
544
488
|
};
|
|
545
489
|
}
|
|
546
|
-
function selectTargetEnvQuestion(questionName =
|
|
490
|
+
function selectTargetEnvQuestion(questionName = constants_2.QuestionNames.TargetEnvName, remoteOnly = true, throwErrorIfNoEnv = false, defaultValueIfNoEnv = environmentName_1.environmentNameManager.getDefaultEnvName()) {
|
|
547
491
|
return {
|
|
548
492
|
type: "singleSelect",
|
|
549
493
|
name: questionName,
|
|
@@ -587,7 +531,7 @@ async function getDefaultUserEmail() {
|
|
|
587
531
|
}
|
|
588
532
|
function inputUserEmailQuestion(title, cliDescription, useDefaultUser) {
|
|
589
533
|
return {
|
|
590
|
-
name:
|
|
534
|
+
name: constants_2.QuestionNames.UserEmail,
|
|
591
535
|
type: "text",
|
|
592
536
|
title: title,
|
|
593
537
|
cliDescription: cliDescription,
|
|
@@ -614,7 +558,7 @@ function inputUserEmailQuestion(title, cliDescription, useDefaultUser) {
|
|
|
614
558
|
};
|
|
615
559
|
}
|
|
616
560
|
async function isAadMainifestContainsPlaceholder(inputs) {
|
|
617
|
-
const aadManifestPath = inputs?.[
|
|
561
|
+
const aadManifestPath = inputs?.[constants_2.QuestionNames.AadAppManifestFilePath];
|
|
618
562
|
const placeholderRegex = /\$\{\{ *[a-zA-Z0-9_.-]* *\}\}/g;
|
|
619
563
|
const regexObj = new RegExp(placeholderRegex);
|
|
620
564
|
try {
|
|
@@ -633,7 +577,7 @@ async function isAadMainifestContainsPlaceholder(inputs) {
|
|
|
633
577
|
}
|
|
634
578
|
function selectAadManifestQuestion() {
|
|
635
579
|
return {
|
|
636
|
-
name:
|
|
580
|
+
name: constants_2.QuestionNames.AadAppManifestFilePath,
|
|
637
581
|
cliName: "entra-app-manifest-file",
|
|
638
582
|
cliShortName: "a",
|
|
639
583
|
cliDescription: "Specifies the Microsoft Entra app manifest file path, can be either absolute path or relative path to project root folder.",
|
|
@@ -684,7 +628,7 @@ async function newEnvNameValidation(input, inputs) {
|
|
|
684
628
|
function newTargetEnvQuestion() {
|
|
685
629
|
return {
|
|
686
630
|
type: "text",
|
|
687
|
-
name:
|
|
631
|
+
name: constants_2.QuestionNames.NewTargetEnvName,
|
|
688
632
|
cliName: "name",
|
|
689
633
|
cliDescription: "Specifies the new environment name.",
|
|
690
634
|
cliType: "argument",
|
|
@@ -712,7 +656,7 @@ function newTargetEnvQuestion() {
|
|
|
712
656
|
function selectSourceEnvQuestion() {
|
|
713
657
|
return {
|
|
714
658
|
type: "singleSelect",
|
|
715
|
-
name:
|
|
659
|
+
name: constants_2.QuestionNames.SourceEnvName,
|
|
716
660
|
cliName: "env",
|
|
717
661
|
title: (0, localizeUtils_1.getLocalizedString)("core.QuestionSelectSourceEnvironment.title"),
|
|
718
662
|
cliDescription: "Specifies an existing environment name to copy from.",
|
|
@@ -767,21 +711,21 @@ function addPluginQuestionNode() {
|
|
|
767
711
|
...(0, commonNodes_1.inputOrSearchAPISpecNode)(),
|
|
768
712
|
condition: (inputs) => {
|
|
769
713
|
return (featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaNPMIntegration) &&
|
|
770
|
-
inputs[
|
|
714
|
+
inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.apiSpec().id);
|
|
771
715
|
},
|
|
772
716
|
},
|
|
773
717
|
{
|
|
774
718
|
data: (0, create_1.apiSpecLocationQuestion)(),
|
|
775
719
|
condition: (inputs) => {
|
|
776
720
|
return (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaNPMIntegration) &&
|
|
777
|
-
inputs[
|
|
721
|
+
inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.apiSpec().id);
|
|
778
722
|
},
|
|
779
723
|
},
|
|
780
724
|
{
|
|
781
725
|
data: (0, create_1.apiOperationQuestion)(true, true),
|
|
782
726
|
condition: (inputs) => {
|
|
783
727
|
return (!featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.KiotaNPMIntegration) &&
|
|
784
|
-
inputs[
|
|
728
|
+
inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.apiSpec().id);
|
|
785
729
|
},
|
|
786
730
|
},
|
|
787
731
|
openApiApiKeyNode(),
|
|
@@ -794,10 +738,10 @@ function addPluginQuestionNode() {
|
|
|
794
738
|
// and lets `updateActionWithMCP` collect auth via CodeLens later.
|
|
795
739
|
{
|
|
796
740
|
condition: (inputs) => {
|
|
797
|
-
return inputs[
|
|
741
|
+
return inputs[constants_2.QuestionNames.ActionType] === constants_2.ActionStartOptions.mcp().id;
|
|
798
742
|
},
|
|
799
743
|
data: {
|
|
800
|
-
name:
|
|
744
|
+
name: constants_2.QuestionNames.MCPForDAServerUrl,
|
|
801
745
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.mcpForDa.ServerUrl.title"),
|
|
802
746
|
type: "text",
|
|
803
747
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.mcpForDa.ServerUrl.placeholder"),
|
|
@@ -816,7 +760,7 @@ function addPluginQuestionNode() {
|
|
|
816
760
|
{
|
|
817
761
|
condition: (inputs) => inputs.platform === teamsfx_api_1.Platform.CLI,
|
|
818
762
|
data: {
|
|
819
|
-
name:
|
|
763
|
+
name: constants_2.QuestionNames.MCPToolsFilePath,
|
|
820
764
|
title: (0, localizeUtils_1.getLocalizedString)("core.MCPForDA.toolsFilePath.title"),
|
|
821
765
|
type: "text",
|
|
822
766
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.MCPForDA.toolsFilePath.placeholder"),
|
|
@@ -831,7 +775,7 @@ function addPluginQuestionNode() {
|
|
|
831
775
|
featureFlags_1.featureFlagManager.getBooleanValue(featureFlags_1.FeatureFlags.MCPForDADT),
|
|
832
776
|
data: {
|
|
833
777
|
type: "singleSelect",
|
|
834
|
-
name:
|
|
778
|
+
name: constants_2.QuestionNames.MCPForDAAuthType,
|
|
835
779
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.mcpForDa.AuthType.title"),
|
|
836
780
|
staticOptions: (0, teamsProjectTypeNode_1.MCPForDAAddAuthTypeStaticOptions)(),
|
|
837
781
|
default: "oauth",
|
|
@@ -851,7 +795,7 @@ function addPluginQuestionNode() {
|
|
|
851
795
|
// in `core.addPlugin`, matching the leaner `core.updateActionWithMCP` UX
|
|
852
796
|
// (no manifest picker, no confirmation modal).
|
|
853
797
|
// CLI still asks/requires it via `--manifest-file`.
|
|
854
|
-
return (inputs[
|
|
798
|
+
return (inputs[constants_2.QuestionNames.ActionType] !== constants_2.ActionStartOptions.mcp().id ||
|
|
855
799
|
inputs.platform === teamsfx_api_1.Platform.CLI);
|
|
856
800
|
},
|
|
857
801
|
},
|
|
@@ -867,13 +811,13 @@ function addKnowledgeQuestionNode() {
|
|
|
867
811
|
{
|
|
868
812
|
data: (0, create_1.searchTypeQuestion)(),
|
|
869
813
|
condition: (inputs) => {
|
|
870
|
-
return inputs[
|
|
814
|
+
return inputs[constants_2.QuestionNames.KnowledgeSource] === constants_2.KnowledgeSourceOptions.webSearch().id;
|
|
871
815
|
},
|
|
872
816
|
children: [
|
|
873
817
|
{
|
|
874
818
|
data: (0, create_1.webContentQuestion)(),
|
|
875
819
|
condition: (inputs) => {
|
|
876
|
-
return inputs[
|
|
820
|
+
return inputs[constants_2.QuestionNames.SearchType] === constants_2.KnowledgeSearchTypeOptions.url().id;
|
|
877
821
|
},
|
|
878
822
|
},
|
|
879
823
|
{
|
|
@@ -885,19 +829,19 @@ function addKnowledgeQuestionNode() {
|
|
|
885
829
|
{
|
|
886
830
|
data: (0, create_1.searchTypeQuestion)(),
|
|
887
831
|
condition: (inputs) => {
|
|
888
|
-
return (inputs[
|
|
832
|
+
return (inputs[constants_2.QuestionNames.KnowledgeSource] === constants_2.KnowledgeSourceOptions.oneDriveSharePoint().id);
|
|
889
833
|
},
|
|
890
834
|
children: [
|
|
891
835
|
{
|
|
892
836
|
data: (0, create_1.oneDriveSharePointItemQuestion)(),
|
|
893
837
|
condition: (inputs) => {
|
|
894
|
-
return inputs[
|
|
838
|
+
return inputs[constants_2.QuestionNames.SearchType] === constants_2.KnowledgeSearchTypeOptions.url().id;
|
|
895
839
|
},
|
|
896
840
|
},
|
|
897
841
|
{
|
|
898
842
|
data: (0, create_1.oneDriveSharePointItemConfirmQuestion)(),
|
|
899
843
|
condition: (inputs) => {
|
|
900
|
-
return inputs[
|
|
844
|
+
return inputs[constants_2.QuestionNames.SearchType] === constants_2.KnowledgeSearchTypeOptions.url().id;
|
|
901
845
|
},
|
|
902
846
|
},
|
|
903
847
|
{
|
|
@@ -909,19 +853,19 @@ function addKnowledgeQuestionNode() {
|
|
|
909
853
|
{
|
|
910
854
|
data: (0, create_1.GCItemQuestion)(),
|
|
911
855
|
condition: {
|
|
912
|
-
equals:
|
|
856
|
+
equals: constants_2.KnowledgeSourceOptions.graphConnector().id,
|
|
913
857
|
},
|
|
914
858
|
children: [
|
|
915
859
|
{
|
|
916
860
|
data: (0, create_1.GCListQuestion)(),
|
|
917
861
|
condition: {
|
|
918
|
-
equals:
|
|
862
|
+
equals: constants_2.GCSelectOptions.list().id,
|
|
919
863
|
},
|
|
920
864
|
},
|
|
921
865
|
{
|
|
922
866
|
data: (0, create_1.GCInputQuestion)(),
|
|
923
867
|
condition: {
|
|
924
|
-
equals:
|
|
868
|
+
equals: constants_2.GCSelectOptions.input().id,
|
|
925
869
|
},
|
|
926
870
|
},
|
|
927
871
|
{
|
|
@@ -933,7 +877,7 @@ function addKnowledgeQuestionNode() {
|
|
|
933
877
|
{
|
|
934
878
|
data: selectTeamsAppManifestQuestion(),
|
|
935
879
|
condition: (inputs) => {
|
|
936
|
-
return (inputs[
|
|
880
|
+
return (inputs[constants_2.QuestionNames.KnowledgeSource] === constants_2.KnowledgeSourceOptions.embeddedKnowledge().id);
|
|
937
881
|
},
|
|
938
882
|
children: [
|
|
939
883
|
{
|
|
@@ -946,7 +890,7 @@ function addKnowledgeQuestionNode() {
|
|
|
946
890
|
}
|
|
947
891
|
function addEmbeddedKnowledgeFilesQuestion() {
|
|
948
892
|
return {
|
|
949
|
-
name:
|
|
893
|
+
name: constants_2.QuestionNames.EmbeddedKnowledgeFiles,
|
|
950
894
|
title: (0, localizeUtils_1.getLocalizedString)("core.addEmbeddedKnowledgeFilesQuestion.title"),
|
|
951
895
|
type: "multiFile",
|
|
952
896
|
cliDescription: "Select your embedded knowledge files.",
|
|
@@ -965,7 +909,7 @@ function addAuthActionQuestion() {
|
|
|
965
909
|
{
|
|
966
910
|
data: apiSpecFromPluginManifestQuestion(),
|
|
967
911
|
condition: async (inputs) => {
|
|
968
|
-
const pluginManifestPath = inputs[
|
|
912
|
+
const pluginManifestPath = inputs[constants_2.QuestionNames.PluginManifestFilePath];
|
|
969
913
|
if (!!!pluginManifestPath) {
|
|
970
914
|
return false;
|
|
971
915
|
}
|
|
@@ -975,7 +919,7 @@ function addAuthActionQuestion() {
|
|
|
975
919
|
.map((runtime) => runtime.spec.url);
|
|
976
920
|
const spesDedup = [...new Set(specs)];
|
|
977
921
|
if (spesDedup.length === 1) {
|
|
978
|
-
inputs[
|
|
922
|
+
inputs[constants_2.QuestionNames.ApiSpecLocation] = spesDedup[0];
|
|
979
923
|
return false;
|
|
980
924
|
}
|
|
981
925
|
return true;
|
|
@@ -984,12 +928,12 @@ function addAuthActionQuestion() {
|
|
|
984
928
|
{
|
|
985
929
|
data: apiFromPluginManifestQuestion(),
|
|
986
930
|
condition: async (inputs) => {
|
|
987
|
-
const pluginManifestPath = inputs[
|
|
988
|
-
const apiSpecPath = inputs[
|
|
931
|
+
const pluginManifestPath = inputs[constants_2.QuestionNames.PluginManifestFilePath];
|
|
932
|
+
const apiSpecPath = inputs[constants_2.QuestionNames.ApiSpecLocation];
|
|
989
933
|
if (!!!pluginManifestPath || !!!apiSpecPath) {
|
|
990
934
|
return false;
|
|
991
935
|
}
|
|
992
|
-
if (inputs[
|
|
936
|
+
if (inputs[constants_2.QuestionNames.ApiOperation] !== undefined) {
|
|
993
937
|
return false;
|
|
994
938
|
}
|
|
995
939
|
const pluginManifest = (await fs_extra_1.default.readJson(pluginManifestPath));
|
|
@@ -1001,7 +945,7 @@ function addAuthActionQuestion() {
|
|
|
1001
945
|
});
|
|
1002
946
|
const apisDedup = [...new Set(apis)];
|
|
1003
947
|
if (apisDedup.length === 1) {
|
|
1004
|
-
inputs[
|
|
948
|
+
inputs[constants_2.QuestionNames.ApiOperation] = apisDedup;
|
|
1005
949
|
return false;
|
|
1006
950
|
}
|
|
1007
951
|
return true;
|
|
@@ -1036,19 +980,19 @@ function urlValidation(input, allowEmpty = false) {
|
|
|
1036
980
|
function addAuthActionAuthTypeQuestion() {
|
|
1037
981
|
return {
|
|
1038
982
|
type: "singleSelect",
|
|
1039
|
-
name:
|
|
983
|
+
name: constants_2.QuestionNames.ApiAuth,
|
|
1040
984
|
title: (0, localizeUtils_1.getLocalizedString)("template.createProjectQuestion.apiMessageExtensionAuth.title"),
|
|
1041
985
|
placeholder: (0, localizeUtils_1.getLocalizedString)("template.createProjectQuestion.apiMessageExtensionAuth.placeholder"),
|
|
1042
986
|
cliDescription: "The authentication type for the API.",
|
|
1043
|
-
staticOptions:
|
|
1044
|
-
default:
|
|
987
|
+
staticOptions: constants_2.AddAuthActionAuthTypeOptions.all(),
|
|
988
|
+
default: constants_2.AddAuthActionAuthTypeOptions.bearerToken().id,
|
|
1045
989
|
};
|
|
1046
990
|
}
|
|
1047
991
|
function oauthParametersQuestion() {
|
|
1048
992
|
return {
|
|
1049
993
|
data: oauthAuthorizationUrlQuestion(),
|
|
1050
994
|
condition: (inputs) => {
|
|
1051
|
-
return inputs[
|
|
995
|
+
return inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.oauth().id;
|
|
1052
996
|
},
|
|
1053
997
|
children: [
|
|
1054
998
|
{
|
|
@@ -1068,7 +1012,7 @@ function oauthParametersQuestion() {
|
|
|
1068
1012
|
}
|
|
1069
1013
|
function oauthAuthorizationUrlQuestion() {
|
|
1070
1014
|
return {
|
|
1071
|
-
name:
|
|
1015
|
+
name: constants_2.QuestionNames.OAuthAuthorizationUrl,
|
|
1072
1016
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.OAuthAuthorizationUrl.title"),
|
|
1073
1017
|
type: "text",
|
|
1074
1018
|
cliDescription: "Authorization Url for oauth.",
|
|
@@ -1079,7 +1023,7 @@ function oauthAuthorizationUrlQuestion() {
|
|
|
1079
1023
|
}
|
|
1080
1024
|
function oauthTokenUrlQuestion() {
|
|
1081
1025
|
return {
|
|
1082
|
-
name:
|
|
1026
|
+
name: constants_2.QuestionNames.OAuthTokenUrl,
|
|
1083
1027
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.OAuthTokenUrl.title"),
|
|
1084
1028
|
type: "text",
|
|
1085
1029
|
cliDescription: "Token Url for oauth.",
|
|
@@ -1090,7 +1034,7 @@ function oauthTokenUrlQuestion() {
|
|
|
1090
1034
|
}
|
|
1091
1035
|
function oauthRefreshUrlQuestion() {
|
|
1092
1036
|
return {
|
|
1093
|
-
name:
|
|
1037
|
+
name: constants_2.QuestionNames.OAuthRefreshUrl,
|
|
1094
1038
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.OAuthRefreshUrl.title"),
|
|
1095
1039
|
type: "text",
|
|
1096
1040
|
cliDescription: "Refresh Url for oauth. Leave it emplt if not needed.",
|
|
@@ -1101,7 +1045,7 @@ function oauthRefreshUrlQuestion() {
|
|
|
1101
1045
|
}
|
|
1102
1046
|
function oauthScopeQuestion() {
|
|
1103
1047
|
return {
|
|
1104
|
-
name:
|
|
1048
|
+
name: constants_2.QuestionNames.OAuthScope,
|
|
1105
1049
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.OAuthScope.title"),
|
|
1106
1050
|
type: "text",
|
|
1107
1051
|
cliDescription: "Scope for oauth.",
|
|
@@ -1118,7 +1062,7 @@ function oauthScopeQuestion() {
|
|
|
1118
1062
|
}
|
|
1119
1063
|
function oauthPKCEQuestion() {
|
|
1120
1064
|
return {
|
|
1121
|
-
name:
|
|
1065
|
+
name: constants_2.QuestionNames.OauthPKCE,
|
|
1122
1066
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.OauthPKCE.title"),
|
|
1123
1067
|
type: "singleSelect",
|
|
1124
1068
|
staticOptions: [
|
|
@@ -1138,7 +1082,7 @@ function apiKeyParameterQuestion() {
|
|
|
1138
1082
|
return {
|
|
1139
1083
|
data: apiKeyInQuestion(),
|
|
1140
1084
|
condition: (inputs) => {
|
|
1141
|
-
return inputs[
|
|
1085
|
+
return inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.apiKey().id;
|
|
1142
1086
|
},
|
|
1143
1087
|
children: [
|
|
1144
1088
|
{
|
|
@@ -1149,7 +1093,7 @@ function apiKeyParameterQuestion() {
|
|
|
1149
1093
|
}
|
|
1150
1094
|
function apiKeyInQuestion() {
|
|
1151
1095
|
return {
|
|
1152
|
-
name:
|
|
1096
|
+
name: constants_2.QuestionNames.ApiKeyIn,
|
|
1153
1097
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.ApiKeyIn.title"),
|
|
1154
1098
|
type: "singleSelect",
|
|
1155
1099
|
staticOptions: [
|
|
@@ -1167,7 +1111,7 @@ function apiKeyInQuestion() {
|
|
|
1167
1111
|
}
|
|
1168
1112
|
function apiKeyNameQuestion() {
|
|
1169
1113
|
return {
|
|
1170
|
-
name:
|
|
1114
|
+
name: constants_2.QuestionNames.ApiKeyName,
|
|
1171
1115
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.ApiKeyName.title"),
|
|
1172
1116
|
type: "text",
|
|
1173
1117
|
cliDescription: "Name of the API key.",
|
|
@@ -1177,20 +1121,20 @@ function microsoftEntraParameterQuestion() {
|
|
|
1177
1121
|
return {
|
|
1178
1122
|
data: oauthScopeQuestion(),
|
|
1179
1123
|
condition: (inputs) => {
|
|
1180
|
-
return inputs[
|
|
1124
|
+
return inputs[constants_2.QuestionNames.ApiAuth] === constants_2.AddAuthActionAuthTypeOptions.microsoftEntra().id;
|
|
1181
1125
|
},
|
|
1182
1126
|
};
|
|
1183
1127
|
}
|
|
1184
1128
|
function apiSpecFromPluginManifestQuestion() {
|
|
1185
1129
|
return {
|
|
1186
|
-
name:
|
|
1130
|
+
name: constants_2.QuestionNames.ApiSpecLocation,
|
|
1187
1131
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.ApiSpecLocation.title"),
|
|
1188
1132
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.ApiSpecLocation.placeholder"),
|
|
1189
1133
|
type: "singleSelect",
|
|
1190
1134
|
staticOptions: [],
|
|
1191
1135
|
cliDescription: "OpenAPI specification to add Auth configuration.",
|
|
1192
1136
|
dynamicOptions: async (inputs) => {
|
|
1193
|
-
const pluginManifestPath = inputs[
|
|
1137
|
+
const pluginManifestPath = inputs[constants_2.QuestionNames.PluginManifestFilePath];
|
|
1194
1138
|
const pluginManifest = (await fs_extra_1.default.readJson(pluginManifestPath));
|
|
1195
1139
|
const specs = pluginManifest
|
|
1196
1140
|
.runtimes.filter((runtime) => runtime.type === "OpenApi")
|
|
@@ -1201,15 +1145,15 @@ function apiSpecFromPluginManifestQuestion() {
|
|
|
1201
1145
|
}
|
|
1202
1146
|
function apiFromPluginManifestQuestion() {
|
|
1203
1147
|
return {
|
|
1204
|
-
name:
|
|
1148
|
+
name: constants_2.QuestionNames.ApiOperation,
|
|
1205
1149
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.ApiOperation.title"),
|
|
1206
1150
|
type: "multiSelect",
|
|
1207
1151
|
staticOptions: [],
|
|
1208
1152
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.ApiOperation.placeholder"),
|
|
1209
1153
|
cliDescription: "API to add Auth configuration.",
|
|
1210
1154
|
dynamicOptions: async (inputs) => {
|
|
1211
|
-
const pluginManifestPath = inputs[
|
|
1212
|
-
const apiSpecPath = inputs[
|
|
1155
|
+
const pluginManifestPath = inputs[constants_2.QuestionNames.PluginManifestFilePath];
|
|
1156
|
+
const apiSpecPath = inputs[constants_2.QuestionNames.ApiSpecLocation];
|
|
1213
1157
|
const pluginManifest = (await fs_extra_1.default.readJson(pluginManifestPath));
|
|
1214
1158
|
const apis = [];
|
|
1215
1159
|
pluginManifest
|
|
@@ -1223,7 +1167,7 @@ function apiFromPluginManifestQuestion() {
|
|
|
1223
1167
|
}
|
|
1224
1168
|
function authNameQuestion() {
|
|
1225
1169
|
return {
|
|
1226
|
-
name:
|
|
1170
|
+
name: constants_2.QuestionNames.AuthName,
|
|
1227
1171
|
title: (0, localizeUtils_1.getLocalizedString)("core.addAuthActionQuestion.authName.title"),
|
|
1228
1172
|
type: "text",
|
|
1229
1173
|
cliDescription: "Name of Auth Configuration.",
|
|
@@ -1240,7 +1184,7 @@ function authNameQuestion() {
|
|
|
1240
1184
|
if (!inputs) {
|
|
1241
1185
|
throw new Error("inputs is undefined"); // should never happen
|
|
1242
1186
|
}
|
|
1243
|
-
inputs[
|
|
1187
|
+
inputs[constants_2.QuestionNames.ActionType] = constants_2.ActionStartOptions.newApi().id;
|
|
1244
1188
|
return;
|
|
1245
1189
|
},
|
|
1246
1190
|
},
|
|
@@ -1248,7 +1192,7 @@ function authNameQuestion() {
|
|
|
1248
1192
|
}
|
|
1249
1193
|
function apiSpecApiKeyConfirmQestion() {
|
|
1250
1194
|
return {
|
|
1251
|
-
name:
|
|
1195
|
+
name: constants_2.QuestionNames.ApiSpecApiKeyConfirm,
|
|
1252
1196
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.ApiKeyConfirm"),
|
|
1253
1197
|
type: "confirm",
|
|
1254
1198
|
default: true,
|
|
@@ -1258,7 +1202,7 @@ function apiSpecApiKeyQuestion() {
|
|
|
1258
1202
|
return {
|
|
1259
1203
|
data: {
|
|
1260
1204
|
type: "text",
|
|
1261
|
-
name:
|
|
1205
|
+
name: constants_2.QuestionNames.ApiSpecApiKey,
|
|
1262
1206
|
cliShortName: "k",
|
|
1263
1207
|
password: true,
|
|
1264
1208
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.ApiKey"),
|
|
@@ -1277,7 +1221,7 @@ function apiSpecApiKeyQuestion() {
|
|
|
1277
1221
|
if (!inputs) {
|
|
1278
1222
|
throw new Error("inputs is undefined"); // should never happen
|
|
1279
1223
|
}
|
|
1280
|
-
process.env[
|
|
1224
|
+
process.env[constants_2.QuestionNames.ApiSpecApiKey] = input;
|
|
1281
1225
|
return;
|
|
1282
1226
|
},
|
|
1283
1227
|
},
|
|
@@ -1354,21 +1298,21 @@ function uninstallQuestionNode() {
|
|
|
1354
1298
|
{
|
|
1355
1299
|
data: {
|
|
1356
1300
|
type: "text",
|
|
1357
|
-
name:
|
|
1301
|
+
name: constants_2.QuestionNames.ManifestId,
|
|
1358
1302
|
title: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.manifestId"),
|
|
1359
1303
|
},
|
|
1360
1304
|
condition: (input) => {
|
|
1361
|
-
return input[
|
|
1305
|
+
return input[constants_2.QuestionNames.UninstallMode] === constants_2.QuestionNames.UninstallModeManifestId;
|
|
1362
1306
|
},
|
|
1363
1307
|
},
|
|
1364
1308
|
{
|
|
1365
1309
|
data: {
|
|
1366
1310
|
type: "text",
|
|
1367
|
-
name:
|
|
1311
|
+
name: constants_2.QuestionNames.Env,
|
|
1368
1312
|
title: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.env"),
|
|
1369
1313
|
},
|
|
1370
1314
|
condition: (input) => {
|
|
1371
|
-
return input[
|
|
1315
|
+
return input[constants_2.QuestionNames.UninstallMode] === constants_2.QuestionNames.UninstallModeEnv;
|
|
1372
1316
|
},
|
|
1373
1317
|
children: [
|
|
1374
1318
|
{
|
|
@@ -1382,18 +1326,18 @@ function uninstallQuestionNode() {
|
|
|
1382
1326
|
{
|
|
1383
1327
|
data: uninstallOptionQuestion(),
|
|
1384
1328
|
condition: (input) => {
|
|
1385
|
-
return (input[
|
|
1386
|
-
input[
|
|
1329
|
+
return (input[constants_2.QuestionNames.UninstallMode] === constants_2.QuestionNames.UninstallModeManifestId ||
|
|
1330
|
+
input[constants_2.QuestionNames.UninstallMode] === constants_2.QuestionNames.UninstallModeEnv);
|
|
1387
1331
|
},
|
|
1388
1332
|
},
|
|
1389
1333
|
{
|
|
1390
1334
|
data: {
|
|
1391
1335
|
type: "text",
|
|
1392
|
-
name:
|
|
1336
|
+
name: constants_2.QuestionNames.TitleId,
|
|
1393
1337
|
title: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.titleId"),
|
|
1394
1338
|
},
|
|
1395
1339
|
condition: (input) => {
|
|
1396
|
-
return input[
|
|
1340
|
+
return input[constants_2.QuestionNames.UninstallMode] === constants_2.QuestionNames.UninstallModeTitleId;
|
|
1397
1341
|
},
|
|
1398
1342
|
},
|
|
1399
1343
|
],
|
|
@@ -1403,45 +1347,45 @@ function uninstallQuestionNode() {
|
|
|
1403
1347
|
}
|
|
1404
1348
|
function uninstallModeQuestion() {
|
|
1405
1349
|
return {
|
|
1406
|
-
name:
|
|
1350
|
+
name: constants_2.QuestionNames.UninstallMode,
|
|
1407
1351
|
title: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.chooseMode"),
|
|
1408
1352
|
type: "singleSelect",
|
|
1409
1353
|
staticOptions: [
|
|
1410
1354
|
{
|
|
1411
|
-
id:
|
|
1355
|
+
id: constants_2.QuestionNames.UninstallModeManifestId,
|
|
1412
1356
|
label: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.manifestIdMode"),
|
|
1413
1357
|
detail: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.manifestIdMode.detail"),
|
|
1414
1358
|
},
|
|
1415
1359
|
{
|
|
1416
|
-
id:
|
|
1360
|
+
id: constants_2.QuestionNames.UninstallModeEnv,
|
|
1417
1361
|
label: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.envMode"),
|
|
1418
1362
|
detail: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.envMode.detail"),
|
|
1419
1363
|
},
|
|
1420
1364
|
{
|
|
1421
|
-
id:
|
|
1365
|
+
id: constants_2.QuestionNames.UninstallModeTitleId,
|
|
1422
1366
|
label: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.titleIdMode"),
|
|
1423
1367
|
detail: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.titleIdMode.detail"),
|
|
1424
1368
|
},
|
|
1425
1369
|
],
|
|
1426
|
-
default:
|
|
1370
|
+
default: constants_2.QuestionNames.UninstallModeManifestId,
|
|
1427
1371
|
};
|
|
1428
1372
|
}
|
|
1429
1373
|
function uninstallOptionQuestion() {
|
|
1430
1374
|
return {
|
|
1431
|
-
name:
|
|
1375
|
+
name: constants_2.QuestionNames.UninstallOptions,
|
|
1432
1376
|
title: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.chooseOption"),
|
|
1433
1377
|
type: "multiSelect",
|
|
1434
1378
|
staticOptions: [
|
|
1435
1379
|
{
|
|
1436
|
-
id:
|
|
1380
|
+
id: constants_2.QuestionNames.UninstallOptionM365,
|
|
1437
1381
|
label: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.m365Option"),
|
|
1438
1382
|
},
|
|
1439
1383
|
{
|
|
1440
|
-
id:
|
|
1384
|
+
id: constants_2.QuestionNames.UninstallOptionTDP,
|
|
1441
1385
|
label: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.tdpOption"),
|
|
1442
1386
|
},
|
|
1443
1387
|
{
|
|
1444
|
-
id:
|
|
1388
|
+
id: constants_2.QuestionNames.UninstallOptionBot,
|
|
1445
1389
|
label: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.botOption"),
|
|
1446
1390
|
},
|
|
1447
1391
|
],
|
|
@@ -1450,7 +1394,7 @@ function uninstallOptionQuestion() {
|
|
|
1450
1394
|
function uninstallProjectPathQuestion() {
|
|
1451
1395
|
return {
|
|
1452
1396
|
type: "folder",
|
|
1453
|
-
name:
|
|
1397
|
+
name: constants_2.QuestionNames.ProjectPath,
|
|
1454
1398
|
title: (0, localizeUtils_1.getLocalizedString)("core.uninstallQuestion.projectPath"),
|
|
1455
1399
|
cliDescription: "Project Path for uninstall",
|
|
1456
1400
|
placeholder: "./",
|
|
@@ -1460,7 +1404,7 @@ function uninstallProjectPathQuestion() {
|
|
|
1460
1404
|
function entraClientIdQuestion() {
|
|
1461
1405
|
return {
|
|
1462
1406
|
type: "text",
|
|
1463
|
-
name:
|
|
1407
|
+
name: constants_2.QuestionNames.OauthClientId,
|
|
1464
1408
|
cliShortName: "i",
|
|
1465
1409
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.EntraSSOClientId"),
|
|
1466
1410
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.EntraSSOClientId.placeholder"),
|
|
@@ -1471,7 +1415,7 @@ function entraClientIdQuestion() {
|
|
|
1471
1415
|
if (!inputs) {
|
|
1472
1416
|
throw new Error("inputs is undefined"); // should never happen
|
|
1473
1417
|
}
|
|
1474
|
-
process.env[
|
|
1418
|
+
process.env[constants_2.QuestionNames.OauthClientId] = input;
|
|
1475
1419
|
return;
|
|
1476
1420
|
},
|
|
1477
1421
|
},
|
|
@@ -1480,7 +1424,7 @@ function entraClientIdQuestion() {
|
|
|
1480
1424
|
function oauthClientIdQuestion() {
|
|
1481
1425
|
return {
|
|
1482
1426
|
type: "text",
|
|
1483
|
-
name:
|
|
1427
|
+
name: constants_2.QuestionNames.OauthClientId,
|
|
1484
1428
|
cliShortName: "i",
|
|
1485
1429
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientId"),
|
|
1486
1430
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientId.placeholder"),
|
|
@@ -1491,7 +1435,7 @@ function oauthClientIdQuestion() {
|
|
|
1491
1435
|
if (!inputs) {
|
|
1492
1436
|
throw new Error("inputs is undefined"); // should never happen
|
|
1493
1437
|
}
|
|
1494
|
-
process.env[
|
|
1438
|
+
process.env[constants_2.QuestionNames.OauthClientId] = input;
|
|
1495
1439
|
return;
|
|
1496
1440
|
},
|
|
1497
1441
|
},
|
|
@@ -1499,7 +1443,7 @@ function oauthClientIdQuestion() {
|
|
|
1499
1443
|
}
|
|
1500
1444
|
function oauthConfirmQestion() {
|
|
1501
1445
|
return {
|
|
1502
|
-
name:
|
|
1446
|
+
name: constants_2.QuestionNames.OauthConfirm,
|
|
1503
1447
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientSecretConfirm"),
|
|
1504
1448
|
type: "confirm",
|
|
1505
1449
|
default: true,
|
|
@@ -1508,7 +1452,7 @@ function oauthConfirmQestion() {
|
|
|
1508
1452
|
function oauthClientSecretQuestion() {
|
|
1509
1453
|
return {
|
|
1510
1454
|
type: "text",
|
|
1511
|
-
name:
|
|
1455
|
+
name: constants_2.QuestionNames.OauthClientSecret,
|
|
1512
1456
|
cliShortName: "c",
|
|
1513
1457
|
password: true,
|
|
1514
1458
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthClientSecret"),
|
|
@@ -1528,7 +1472,7 @@ function oauthClientSecretQuestion() {
|
|
|
1528
1472
|
if (!inputs) {
|
|
1529
1473
|
throw new Error("inputs is undefined"); // should never happen
|
|
1530
1474
|
}
|
|
1531
|
-
process.env[
|
|
1475
|
+
process.env[constants_2.QuestionNames.OauthClientSecret] = input;
|
|
1532
1476
|
return;
|
|
1533
1477
|
},
|
|
1534
1478
|
},
|
|
@@ -1536,7 +1480,7 @@ function oauthClientSecretQuestion() {
|
|
|
1536
1480
|
}
|
|
1537
1481
|
function oauthScopeCustomQuestion() {
|
|
1538
1482
|
return {
|
|
1539
|
-
name:
|
|
1483
|
+
name: constants_2.QuestionNames.OAuthScope,
|
|
1540
1484
|
title: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthScope"),
|
|
1541
1485
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.createProjectQuestion.OauthScope.placeholder"),
|
|
1542
1486
|
type: "text",
|
|
@@ -1555,7 +1499,7 @@ function oauthScopeCustomQuestion() {
|
|
|
1555
1499
|
if (!inputs) {
|
|
1556
1500
|
throw new Error("inputs is undefined"); // should never happen
|
|
1557
1501
|
}
|
|
1558
|
-
process.env[
|
|
1502
|
+
process.env[constants_2.QuestionNames.OAuthScope] = input;
|
|
1559
1503
|
return;
|
|
1560
1504
|
},
|
|
1561
1505
|
},
|
|
@@ -1570,7 +1514,7 @@ function syncManifestQuestionNode() {
|
|
|
1570
1514
|
{
|
|
1571
1515
|
data: {
|
|
1572
1516
|
type: "folder",
|
|
1573
|
-
name:
|
|
1517
|
+
name: constants_2.QuestionNames.ProjectPath,
|
|
1574
1518
|
title: (0, localizeUtils_1.getLocalizedString)("core.syncManifest.projectPath"),
|
|
1575
1519
|
cliDescription: "Project Path",
|
|
1576
1520
|
placeholder: "./",
|
|
@@ -1582,7 +1526,7 @@ function syncManifestQuestionNode() {
|
|
|
1582
1526
|
{
|
|
1583
1527
|
data: {
|
|
1584
1528
|
type: "text",
|
|
1585
|
-
name:
|
|
1529
|
+
name: constants_2.QuestionNames.Env,
|
|
1586
1530
|
title: (0, localizeUtils_1.getLocalizedString)("core.syncManifest.env"),
|
|
1587
1531
|
cliDescription: "Target Microsoft 365 Agents Toolkit Environment",
|
|
1588
1532
|
},
|
|
@@ -1590,7 +1534,7 @@ function syncManifestQuestionNode() {
|
|
|
1590
1534
|
{
|
|
1591
1535
|
data: {
|
|
1592
1536
|
type: "text",
|
|
1593
|
-
name:
|
|
1537
|
+
name: constants_2.QuestionNames.TeamsAppId,
|
|
1594
1538
|
title: (0, localizeUtils_1.getLocalizedString)("core.syncManifest.teamsAppId"),
|
|
1595
1539
|
cliDescription: "App ID (optional)",
|
|
1596
1540
|
},
|
|
@@ -1615,7 +1559,7 @@ function setSensitivityLabelNode() {
|
|
|
1615
1559
|
}
|
|
1616
1560
|
function selectDeclarativeAgentManifestQuestion() {
|
|
1617
1561
|
return {
|
|
1618
|
-
name:
|
|
1562
|
+
name: constants_2.QuestionNames.DeclarativeAgentManifestPath,
|
|
1619
1563
|
cliName: "declarative-agent-manifest-file",
|
|
1620
1564
|
cliShortName: "d",
|
|
1621
1565
|
cliDescription: "Specify the path for the Declarative Agent manifest. It can be either absolute path or relative path to the project root folder, with default at './appPackage/declarativeAgent.json'",
|
|
@@ -1658,19 +1602,19 @@ function addSkillQuestionNode() {
|
|
|
1658
1602
|
children: [
|
|
1659
1603
|
{
|
|
1660
1604
|
data: skillSourceTypeQuestion(),
|
|
1661
|
-
condition: (inputs) => !inputs[
|
|
1605
|
+
condition: (inputs) => !inputs[constants_2.QuestionNames.SkillFrom] && inputs.platform !== teamsfx_api_1.Platform.CLI,
|
|
1662
1606
|
},
|
|
1663
1607
|
{
|
|
1664
1608
|
data: skillFromZipFileQuestion(),
|
|
1665
|
-
condition: (inputs) => !inputs[
|
|
1609
|
+
condition: (inputs) => !inputs[constants_2.QuestionNames.SkillFrom] && inputs[constants_2.QuestionNames.SkillSourceType] === "existing",
|
|
1666
1610
|
},
|
|
1667
1611
|
{
|
|
1668
1612
|
data: skillNameQuestion(),
|
|
1669
|
-
condition: (inputs) => !inputs[
|
|
1613
|
+
condition: (inputs) => !inputs[constants_2.QuestionNames.SkillFrom] && inputs[constants_2.QuestionNames.SkillSourceType] !== "existing",
|
|
1670
1614
|
},
|
|
1671
1615
|
{
|
|
1672
1616
|
data: skillDescriptionQuestion(),
|
|
1673
|
-
condition: (inputs) => !inputs[
|
|
1617
|
+
condition: (inputs) => !inputs[constants_2.QuestionNames.SkillFrom] && inputs[constants_2.QuestionNames.SkillSourceType] !== "existing",
|
|
1674
1618
|
},
|
|
1675
1619
|
{
|
|
1676
1620
|
data: exposeToCopilotQuestion(),
|
|
@@ -1684,7 +1628,7 @@ function addSkillQuestionNode() {
|
|
|
1684
1628
|
function skillNameQuestion() {
|
|
1685
1629
|
return {
|
|
1686
1630
|
type: "text",
|
|
1687
|
-
name:
|
|
1631
|
+
name: constants_2.QuestionNames.SkillName,
|
|
1688
1632
|
title: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.name.title"),
|
|
1689
1633
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.name.placeholder"),
|
|
1690
1634
|
validation: {
|
|
@@ -1695,7 +1639,7 @@ function skillNameQuestion() {
|
|
|
1695
1639
|
}
|
|
1696
1640
|
// Check for duplicate skill name
|
|
1697
1641
|
if (inputs?.projectPath) {
|
|
1698
|
-
const manifestPath = inputs[
|
|
1642
|
+
const manifestPath = inputs[constants_2.QuestionNames.ManifestPath] ||
|
|
1699
1643
|
path.join(inputs.projectPath, teamsfx_api_1.AppPackageFolderName, "manifest.json");
|
|
1700
1644
|
const appPackageFolder = path.dirname(manifestPath);
|
|
1701
1645
|
const skillDir = path.join(appPackageFolder, "skills", input);
|
|
@@ -1711,14 +1655,14 @@ function skillNameQuestion() {
|
|
|
1711
1655
|
function skillDescriptionQuestion() {
|
|
1712
1656
|
return {
|
|
1713
1657
|
type: "text",
|
|
1714
|
-
name:
|
|
1658
|
+
name: constants_2.QuestionNames.SkillDescription,
|
|
1715
1659
|
title: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.description.title"),
|
|
1716
1660
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.description.placeholder"),
|
|
1717
1661
|
};
|
|
1718
1662
|
}
|
|
1719
1663
|
function skillSourceTypeQuestion() {
|
|
1720
1664
|
return {
|
|
1721
|
-
name:
|
|
1665
|
+
name: constants_2.QuestionNames.SkillSourceType,
|
|
1722
1666
|
title: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.sourceType.title"),
|
|
1723
1667
|
type: "singleSelect",
|
|
1724
1668
|
staticOptions: [
|
|
@@ -1738,7 +1682,7 @@ function skillSourceTypeQuestion() {
|
|
|
1738
1682
|
}
|
|
1739
1683
|
function skillFromZipFileQuestion() {
|
|
1740
1684
|
return {
|
|
1741
|
-
name:
|
|
1685
|
+
name: constants_2.QuestionNames.SkillFromZipFile,
|
|
1742
1686
|
title: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.zipFile.title"),
|
|
1743
1687
|
placeholder: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.zipFile.placeholder"),
|
|
1744
1688
|
type: "singleFile",
|
|
@@ -1749,7 +1693,7 @@ function skillFromZipFileQuestion() {
|
|
|
1749
1693
|
}
|
|
1750
1694
|
function exposeToCopilotQuestion() {
|
|
1751
1695
|
return {
|
|
1752
|
-
name:
|
|
1696
|
+
name: constants_2.QuestionNames.ExposeToCopilot,
|
|
1753
1697
|
cliName: "expose-to-copilot",
|
|
1754
1698
|
title: (0, localizeUtils_1.getLocalizedString)("core.addSkillQuestion.exposeToCopilot.title"),
|
|
1755
1699
|
type: "singleSelect",
|
|
@@ -1770,7 +1714,7 @@ function exposeToCopilotQuestion() {
|
|
|
1770
1714
|
}
|
|
1771
1715
|
function SelectSensitivityLabelQuestion() {
|
|
1772
1716
|
return {
|
|
1773
|
-
name:
|
|
1717
|
+
name: constants_2.QuestionNames.SensitivityLabel,
|
|
1774
1718
|
cliName: "sensitivity-label",
|
|
1775
1719
|
cliShortName: "s",
|
|
1776
1720
|
cliDescription: "Specify the sensitivity label to be set.",
|