@sap-ux/odata-service-inquirer 2.14.10 → 2.14.11
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.
|
@@ -15,6 +15,8 @@ const logger_helper_1 = __importDefault(require("../../../logger-helper"));
|
|
|
15
15
|
const prompt_helpers_1 = require("../../../prompt-helpers");
|
|
16
16
|
const service_helper_1 = require("../service-selection/service-helper");
|
|
17
17
|
const value_help_download_1 = require("../external-services/value-help-download");
|
|
18
|
+
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
19
|
+
const sortBy_1 = __importDefault(require("lodash/sortBy"));
|
|
18
20
|
const cliServicePromptName = 'cliServiceSelection';
|
|
19
21
|
/**
|
|
20
22
|
* Get the service selection prompt for an Abap system connection (on-prem or on-btp). The service selection prompt is used to select a service from the system catalog.
|
|
@@ -32,6 +34,7 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
32
34
|
let previousSystemUrl;
|
|
33
35
|
let previousClient;
|
|
34
36
|
let previousService;
|
|
37
|
+
let previousServiceFilter;
|
|
35
38
|
// State shared across validate and additionalMessages functions
|
|
36
39
|
let hasBackendAnnotations;
|
|
37
40
|
// Wrap to allow pass by ref to nested prompts
|
|
@@ -55,12 +58,14 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
55
58
|
choices: async (answers) => {
|
|
56
59
|
if (serviceChoices.length === 0 ||
|
|
57
60
|
previousSystemUrl !== connectValidator.validatedUrl ||
|
|
58
|
-
previousClient !== connectValidator.validatedClient
|
|
61
|
+
previousClient !== connectValidator.validatedClient ||
|
|
62
|
+
!(0, isEqual_1.default)((0, sortBy_1.default)(previousServiceFilter), (0, sortBy_1.default)(promptOptions?.serviceFilter))) {
|
|
59
63
|
// if we have a catalog, use it to list services
|
|
60
64
|
if (connectValidator.catalogs[odata_service_writer_1.OdataVersion.v2] || connectValidator.catalogs[odata_service_writer_1.OdataVersion.v4]) {
|
|
61
65
|
serviceChoices = await createServiceChoicesFromCatalog(connectValidator.catalogs, requiredOdataVersion, promptOptions?.serviceFilter);
|
|
62
66
|
previousSystemUrl = connectValidator.validatedUrl;
|
|
63
67
|
previousClient = connectValidator.validatedClient;
|
|
68
|
+
previousServiceFilter = promptOptions?.serviceFilter ? [...promptOptions.serviceFilter] : undefined;
|
|
64
69
|
// Telemetry event for successful service listing using a destination
|
|
65
70
|
if (answers?.[`${types_1.promptNames.systemSelection}`]?.type === 'destination') {
|
|
66
71
|
(0, service_helper_1.sendDestinationServiceSuccessTelemetryEvent)(answers?.[`${types_1.promptNames.systemSelection}`]?.system);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/odata-service-inquirer",
|
|
3
3
|
"description": "Prompts module that can prompt users for inputs required for odata service writing",
|
|
4
|
-
"version": "2.14.
|
|
4
|
+
"version": "2.14.11",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
"fast-xml-parser": "4.4.1",
|
|
29
29
|
"i18next": "25.3.0",
|
|
30
30
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
31
|
+
"lodash": "4.17.21",
|
|
31
32
|
"os-name": "4.0.1",
|
|
32
33
|
"@sap-ux/axios-extension": "1.25.6",
|
|
33
|
-
"@sap-ux/btp-utils": "1.1.6",
|
|
34
|
-
"@sap-ux/fiori-generator-shared": "0.13.54",
|
|
35
34
|
"@sap-ux/guided-answers-helper": "0.4.2",
|
|
36
35
|
"@sap-ux/telemetry": "0.6.56",
|
|
36
|
+
"@sap-ux/fiori-generator-shared": "0.13.54",
|
|
37
|
+
"@sap-ux/btp-utils": "1.1.6",
|
|
37
38
|
"@sap-ux/inquirer-common": "0.10.14",
|
|
38
39
|
"@sap-ux/logger": "0.8.0",
|
|
39
40
|
"@sap-ux/nodejs-utils": "0.2.11",
|
|
@@ -48,9 +49,9 @@
|
|
|
48
49
|
"@types/inquirer": "8.2.6",
|
|
49
50
|
"@types/lodash": "4.14.202",
|
|
50
51
|
"jest-extended": "6.0.0",
|
|
51
|
-
"@sap-ux/fiori-generator-shared": "0.13.54",
|
|
52
52
|
"@sap-ux/fiori-elements-writer": "2.8.42",
|
|
53
53
|
"@sap-ux/fiori-freestyle-writer": "2.5.29",
|
|
54
|
+
"@sap-ux/fiori-generator-shared": "0.13.54",
|
|
54
55
|
"@sap-ux/feature-toggle": "0.3.5",
|
|
55
56
|
"@sap-ux/odata-service-writer": "0.29.8",
|
|
56
57
|
"@sap-ux/cap-config-writer": "0.12.45"
|