@sap-ux/ui5-application-inquirer 0.2.8 → 0.3.1
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/dist/prompts/prompts.js +6 -4
- package/package.json +4 -4
package/dist/prompts/prompts.js
CHANGED
|
@@ -270,7 +270,11 @@ function getAddDeployConfigPrompt(targetDir, addDeployConfigOptions, isCapProjec
|
|
|
270
270
|
* @returns the `ui5Version` prompt
|
|
271
271
|
*/
|
|
272
272
|
function getUI5VersionPrompt(ui5Versions = [], ui5VersionPromptOptions) {
|
|
273
|
-
|
|
273
|
+
// Set the default to be closest to the passed value or the default as defined by ui5 version service
|
|
274
|
+
const defaultChoice = (0, inquirer_common_1.getDefaultUI5VersionChoice)(ui5Versions, ui5VersionPromptOptions === null || ui5VersionPromptOptions === void 0 ? void 0 : ui5VersionPromptOptions.defaultChoice);
|
|
275
|
+
const ui5VersionChoices = (0, inquirer_common_1.ui5VersionsGrouped)(ui5Versions, ui5VersionPromptOptions === null || ui5VersionPromptOptions === void 0 ? void 0 : ui5VersionPromptOptions.includeSeparators
|
|
276
|
+
// defaultChoice - this is added to support systemn versions however currently the middleware preview does not support this
|
|
277
|
+
);
|
|
274
278
|
return {
|
|
275
279
|
when: () => !!ui5VersionChoices,
|
|
276
280
|
type: (ui5VersionPromptOptions === null || ui5VersionPromptOptions === void 0 ? void 0 : ui5VersionPromptOptions.useAutocomplete) ? 'autocomplete' : 'list',
|
|
@@ -283,9 +287,7 @@ function getUI5VersionPrompt(ui5Versions = [], ui5VersionPromptOptions) {
|
|
|
283
287
|
source: (prevAnswers, input) => (0, inquirer_common_1.searchChoices)(input, ui5VersionChoices),
|
|
284
288
|
message: (0, i18n_1.t)('prompts.appUi5VersionMessage'),
|
|
285
289
|
default: () => {
|
|
286
|
-
|
|
287
|
-
// Set the default to be the passed value or the default as defined by ui5 version service
|
|
288
|
-
return ((_b = (_a = ui5VersionPromptOptions === null || ui5VersionPromptOptions === void 0 ? void 0 : ui5VersionPromptOptions.defaultChoice) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : (_c = ui5Versions.find((ui5Ver) => ui5Ver.default && ui5Ver.version)) === null || _c === void 0 ? void 0 : _c.version);
|
|
290
|
+
return defaultChoice === null || defaultChoice === void 0 ? void 0 : defaultChoice.value;
|
|
289
291
|
}
|
|
290
292
|
};
|
|
291
293
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui5-application-inquirer",
|
|
3
3
|
"description": "Prompts module that can prompt users for inputs required for UI5 application writing",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
24
24
|
"lodash": "4.17.21",
|
|
25
25
|
"semver": "7.5.4",
|
|
26
|
-
"@sap-ux/inquirer-common": "0.2.
|
|
27
|
-
"@sap-ux/project-access": "1.19.
|
|
26
|
+
"@sap-ux/inquirer-common": "0.2.3",
|
|
27
|
+
"@sap-ux/project-access": "1.19.3",
|
|
28
28
|
"@sap-ux/project-input-validator": "0.2.3",
|
|
29
29
|
"@sap-ux/ui5-info": "0.3.3"
|
|
30
30
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/lodash": "4.14.202",
|
|
36
36
|
"@types/semver": "7.5.4",
|
|
37
37
|
"inquirer": "8.2.6",
|
|
38
|
-
"@sap-ux/cap-config-writer": "0.2.
|
|
38
|
+
"@sap-ux/cap-config-writer": "0.2.23"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"node": ">=18.x"
|