@sap-ux/odata-service-inquirer 2.11.22 → 2.13.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/dist/prompts/datasources/sap-system/abap-on-prem/questions.js +2 -1
- package/dist/prompts/datasources/sap-system/external-services/value-help-download.d.ts +16 -0
- package/dist/prompts/datasources/sap-system/external-services/value-help-download.js +112 -0
- package/dist/prompts/datasources/sap-system/service-selection/questions.d.ts +5 -4
- package/dist/prompts/datasources/sap-system/service-selection/questions.js +26 -10
- package/dist/prompts/datasources/sap-system/system-selection/questions.js +2 -1
- package/dist/translations/odata-service-inquirer.i18n.json +6 -1
- package/dist/types.d.ts +16 -3
- package/dist/types.js +4 -0
- package/package.json +8 -8
|
@@ -30,7 +30,8 @@ function getAbapOnPremQuestions(promptOptions) {
|
|
|
30
30
|
// Prompt options
|
|
31
31
|
const requiredOdataVersion = promptOptions?.serviceSelection?.requiredOdataVersion;
|
|
32
32
|
const questions = getAbapOnPremSystemQuestions(promptOptions?.userSystemName, connectValidator, requiredOdataVersion);
|
|
33
|
-
questions.push(...(0, service_selection_1.getSystemServiceQuestion)(connectValidator, abapOnPremPromptNamespace, promptOptions?.serviceSelection
|
|
33
|
+
questions.push(...(0, service_selection_1.getSystemServiceQuestion)(connectValidator, abapOnPremPromptNamespace, promptOptions?.serviceSelection, false // Hide value help download prompt
|
|
34
|
+
));
|
|
34
35
|
return questions;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ConfirmQuestion } from '@sap-ux/inquirer-common';
|
|
2
|
+
import type { ConnectionValidator } from '../../../connectionValidator';
|
|
3
|
+
import type { ConvertedMetadata } from '@sap-ux/vocabularies-types';
|
|
4
|
+
/**
|
|
5
|
+
* Get the value help download confirmation prompt.
|
|
6
|
+
*
|
|
7
|
+
* @param connectionValidator - connection validator instance
|
|
8
|
+
* @param promptNamespace - prompt namespace
|
|
9
|
+
* @param convertedMetadataRef - converted metadata reference
|
|
10
|
+
* @param convertedMetadataRef.convertedMetadata - converted metadata
|
|
11
|
+
* @returns value help download prompt
|
|
12
|
+
*/
|
|
13
|
+
export declare function getValueHelpDownloadPrompt(connectionValidator: ConnectionValidator, promptNamespace?: string, convertedMetadataRef?: {
|
|
14
|
+
convertedMetadata: ConvertedMetadata | undefined;
|
|
15
|
+
}): ConfirmQuestion;
|
|
16
|
+
//# sourceMappingURL=value-help-download.d.ts.map
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getValueHelpDownloadPrompt = getValueHelpDownloadPrompt;
|
|
7
|
+
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
8
|
+
const types_1 = require("../../../../types");
|
|
9
|
+
const axios_extension_1 = require("@sap-ux/axios-extension");
|
|
10
|
+
const odata_service_writer_1 = require("@sap-ux/odata-service-writer");
|
|
11
|
+
const logger_helper_1 = __importDefault(require("../../../logger-helper"));
|
|
12
|
+
const i18n_1 = require("../../../../i18n");
|
|
13
|
+
const utils_1 = require("../../../../utils");
|
|
14
|
+
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
15
|
+
const telemetry_1 = require("@sap-ux/telemetry");
|
|
16
|
+
// Telemetry event names
|
|
17
|
+
const telemEventValueHelpDownloadPrompted = 'VALUE_HELP_DOWNLOAD_PROMPTED';
|
|
18
|
+
const telemEventValueHelpDownloadSuccess = 'VALUE_HELP_DOWNLOAD_SUCCESS';
|
|
19
|
+
const telemEventValueHelpDownloadFailed = 'VALUE_HELP_DOWNLOAD_FAILED';
|
|
20
|
+
/**
|
|
21
|
+
* Send telemetry event with optional measurements support.
|
|
22
|
+
*
|
|
23
|
+
* @param eventName - telemetry event name
|
|
24
|
+
* @param properties - telemetry properties (dimensions)
|
|
25
|
+
* @param measurements - optional telemetry measurements (numeric metrics)
|
|
26
|
+
*/
|
|
27
|
+
async function sendValueHelpTelemetry(eventName, properties, measurements) {
|
|
28
|
+
// Use TelemetryHelper to add standard properties (Platform, OperatingSystem, etc.)
|
|
29
|
+
const enrichedProperties = fiori_generator_shared_1.TelemetryHelper.createTelemetryData(properties) ?? {};
|
|
30
|
+
if (measurements && Object.keys(measurements).length > 0) {
|
|
31
|
+
// Use reportEvent for events with measurements
|
|
32
|
+
const telemetryClient = (0, inquirer_common_1.getTelemetryClient)();
|
|
33
|
+
if (telemetryClient) {
|
|
34
|
+
await telemetryClient.reportEvent({
|
|
35
|
+
eventName,
|
|
36
|
+
properties: enrichedProperties,
|
|
37
|
+
measurements
|
|
38
|
+
}, telemetry_1.SampleRate.NoSampling);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
// Use sendTelemetryEvent for simple events without measurements
|
|
43
|
+
(0, inquirer_common_1.sendTelemetryEvent)(eventName, enrichedProperties);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Get the value help download confirmation prompt.
|
|
48
|
+
*
|
|
49
|
+
* @param connectionValidator - connection validator instance
|
|
50
|
+
* @param promptNamespace - prompt namespace
|
|
51
|
+
* @param convertedMetadataRef - converted metadata reference
|
|
52
|
+
* @param convertedMetadataRef.convertedMetadata - converted metadata
|
|
53
|
+
* @returns value help download prompt
|
|
54
|
+
*/
|
|
55
|
+
function getValueHelpDownloadPrompt(connectionValidator, promptNamespace, convertedMetadataRef) {
|
|
56
|
+
const promptNamespacePart = `${promptNamespace ? promptNamespace + ':' : ''}`;
|
|
57
|
+
const promptName = `${promptNamespacePart}${types_1.promptNames.valueHelpDownload}`;
|
|
58
|
+
const servicePromptName = `${promptNamespacePart}${types_1.promptNames.serviceSelection}`;
|
|
59
|
+
let externalServiceRefs;
|
|
60
|
+
let externalServiceMetadata;
|
|
61
|
+
const question = {
|
|
62
|
+
when: (answers) => {
|
|
63
|
+
const service = answers?.[servicePromptName];
|
|
64
|
+
const servicePath = service?.servicePath;
|
|
65
|
+
if (servicePath && convertedMetadataRef?.convertedMetadata) {
|
|
66
|
+
externalServiceRefs = (0, odata_service_writer_1.getExternalServiceReferences)(servicePath, convertedMetadataRef?.convertedMetadata);
|
|
67
|
+
return externalServiceRefs.length > 0;
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
},
|
|
71
|
+
name: promptName,
|
|
72
|
+
type: 'confirm',
|
|
73
|
+
message: (0, i18n_1.t)('prompts.valueHelpDownload.message'),
|
|
74
|
+
validate: async (downloadMetadata) => {
|
|
75
|
+
delete utils_1.PromptState.odataService.valueListMetadata;
|
|
76
|
+
// Send telemetry when prompt is answered
|
|
77
|
+
await sendValueHelpTelemetry(telemEventValueHelpDownloadPrompted, {
|
|
78
|
+
userChoseToDownload: downloadMetadata
|
|
79
|
+
});
|
|
80
|
+
if (downloadMetadata && connectionValidator.serviceProvider instanceof axios_extension_1.AbapServiceProvider) {
|
|
81
|
+
const startTime = Date.now();
|
|
82
|
+
try {
|
|
83
|
+
externalServiceMetadata = await connectionValidator.serviceProvider.fetchExternalServices(externalServiceRefs);
|
|
84
|
+
const downloadTimeMs = Date.now() - startTime;
|
|
85
|
+
if (externalServiceMetadata.length > 0) {
|
|
86
|
+
utils_1.PromptState.odataService.valueListMetadata = externalServiceMetadata;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
logger_helper_1.default.logger.info((0, i18n_1.t)('warnings.noExternalServiceMetdataFetched'));
|
|
90
|
+
}
|
|
91
|
+
// Send success telemetry with measurements
|
|
92
|
+
await sendValueHelpTelemetry(telemEventValueHelpDownloadSuccess, {
|
|
93
|
+
userChoseToDownload: true,
|
|
94
|
+
valueHelpCount: externalServiceMetadata.length
|
|
95
|
+
}, { downloadTimeMs });
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
const downloadTimeMs = Date.now() - startTime;
|
|
99
|
+
logger_helper_1.default.logger.error(`Failed to fetch external service metadata: ${error}`);
|
|
100
|
+
// Send failure telemetry with measurements
|
|
101
|
+
await sendValueHelpTelemetry(telemEventValueHelpDownloadFailed, {
|
|
102
|
+
userChoseToDownload: true,
|
|
103
|
+
error: error instanceof Error ? error.message : 'Unknown error'
|
|
104
|
+
}, { downloadTimeMs });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
return question;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=value-help-download.js.map
|
|
@@ -5,11 +5,12 @@ import { type ServiceAnswer } from './types';
|
|
|
5
5
|
/**
|
|
6
6
|
* 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.
|
|
7
7
|
*
|
|
8
|
-
* @param connectValidator A reference to the active connection validator, used to validate the service selection and retrieve service details.
|
|
9
|
-
* @param promptNamespace The namespace for the prompt, used to identify the prompt instance and namespaced answers.
|
|
8
|
+
* @param connectValidator - A reference to the active connection validator, used to validate the service selection and retrieve service details.
|
|
9
|
+
* @param promptNamespace - The namespace for the prompt, used to identify the prompt instance and namespaced answers.
|
|
10
10
|
* This is used to avoid conflicts with other prompts of the same types.
|
|
11
|
-
* @param promptOptions Options for the service selection prompt see {@link OdataServicePromptOptions}
|
|
11
|
+
* @param promptOptions - Options for the service selection prompt see {@link OdataServicePromptOptions}
|
|
12
|
+
* @param showValueHelpDownloadPrompt - If true the value help download confirm prompt will be included
|
|
12
13
|
* @returns the service selection prompt
|
|
13
14
|
*/
|
|
14
|
-
export declare function getSystemServiceQuestion(connectValidator: ConnectionValidator, promptNamespace: string, promptOptions?: ServiceSelectionPromptOptions): Question<ServiceAnswer>[];
|
|
15
|
+
export declare function getSystemServiceQuestion(connectValidator: ConnectionValidator, promptNamespace: string, promptOptions?: ServiceSelectionPromptOptions, showValueHelpDownloadPrompt?: boolean): Question<ServiceAnswer>[];
|
|
15
16
|
//# sourceMappingURL=questions.d.ts.map
|
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getSystemServiceQuestion = getSystemServiceQuestion;
|
|
7
|
+
const axios_extension_1 = require("@sap-ux/axios-extension");
|
|
7
8
|
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
8
9
|
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
9
10
|
const odata_service_writer_1 = require("@sap-ux/odata-service-writer");
|
|
@@ -13,17 +14,19 @@ const utils_1 = require("../../../../utils");
|
|
|
13
14
|
const logger_helper_1 = __importDefault(require("../../../logger-helper"));
|
|
14
15
|
const prompt_helpers_1 = require("../../../prompt-helpers");
|
|
15
16
|
const service_helper_1 = require("../service-selection/service-helper");
|
|
17
|
+
const value_help_download_1 = require("../external-services/value-help-download");
|
|
16
18
|
const cliServicePromptName = 'cliServiceSelection';
|
|
17
19
|
/**
|
|
18
20
|
* 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.
|
|
19
21
|
*
|
|
20
|
-
* @param connectValidator A reference to the active connection validator, used to validate the service selection and retrieve service details.
|
|
21
|
-
* @param promptNamespace The namespace for the prompt, used to identify the prompt instance and namespaced answers.
|
|
22
|
+
* @param connectValidator - A reference to the active connection validator, used to validate the service selection and retrieve service details.
|
|
23
|
+
* @param promptNamespace - The namespace for the prompt, used to identify the prompt instance and namespaced answers.
|
|
22
24
|
* This is used to avoid conflicts with other prompts of the same types.
|
|
23
|
-
* @param promptOptions Options for the service selection prompt see {@link OdataServicePromptOptions}
|
|
25
|
+
* @param promptOptions - Options for the service selection prompt see {@link OdataServicePromptOptions}
|
|
26
|
+
* @param showValueHelpDownloadPrompt - If true the value help download confirm prompt will be included
|
|
24
27
|
* @returns the service selection prompt
|
|
25
28
|
*/
|
|
26
|
-
function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptions) {
|
|
29
|
+
function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptions, showValueHelpDownloadPrompt = false) {
|
|
27
30
|
let serviceChoices = [];
|
|
28
31
|
// Prevent re-requesting services repeatedly by only requesting them once and when the system or client is changed
|
|
29
32
|
let previousSystemUrl;
|
|
@@ -31,7 +34,10 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
31
34
|
let previousService;
|
|
32
35
|
// State shared across validate and additionalMessages functions
|
|
33
36
|
let hasBackendAnnotations;
|
|
34
|
-
|
|
37
|
+
// Wrap to allow pass by ref to nested prompts
|
|
38
|
+
const convertedMetadataRef = {
|
|
39
|
+
convertedMetadata: undefined
|
|
40
|
+
};
|
|
35
41
|
const requiredOdataVersion = promptOptions?.requiredOdataVersion;
|
|
36
42
|
const serviceSelectionPromptName = `${promptNamespace}:${types_1.promptNames.serviceSelection}`;
|
|
37
43
|
let systemServiceQuestion = {
|
|
@@ -87,10 +93,10 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
87
93
|
additionalMessages: (selectedService) => (0, service_helper_1.getSelectedServiceMessage)(serviceChoices, selectedService, connectValidator, {
|
|
88
94
|
requiredOdataVersion,
|
|
89
95
|
hasAnnotations: hasBackendAnnotations,
|
|
90
|
-
showCollabDraftWarnOptions: convertedMetadata
|
|
96
|
+
showCollabDraftWarnOptions: convertedMetadataRef.convertedMetadata
|
|
91
97
|
? {
|
|
92
98
|
showCollabDraftWarning: !!promptOptions?.showCollaborativeDraftWarning,
|
|
93
|
-
edmx: convertedMetadata
|
|
99
|
+
edmx: convertedMetadataRef.convertedMetadata
|
|
94
100
|
}
|
|
95
101
|
: undefined
|
|
96
102
|
}),
|
|
@@ -112,11 +118,11 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
112
118
|
// Dont re-request the same service details
|
|
113
119
|
if (serviceAnswer && previousService?.servicePath !== serviceAnswer.servicePath) {
|
|
114
120
|
hasBackendAnnotations = undefined;
|
|
115
|
-
convertedMetadata = undefined;
|
|
121
|
+
convertedMetadataRef.convertedMetadata = undefined;
|
|
116
122
|
previousService = serviceAnswer;
|
|
117
123
|
const validationResult = await (0, service_helper_1.validateService)(serviceAnswer, connectValidator, requiredOdataVersion);
|
|
118
124
|
hasBackendAnnotations = validationResult.hasAnnotations;
|
|
119
|
-
convertedMetadata = validationResult.convertedMetadata;
|
|
125
|
+
convertedMetadataRef.convertedMetadata = validationResult.convertedMetadata;
|
|
120
126
|
return validationResult.validationResult;
|
|
121
127
|
}
|
|
122
128
|
return true;
|
|
@@ -136,11 +142,13 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
136
142
|
when: async (answers) => {
|
|
137
143
|
const selectedService = answers?.[`${promptNamespace}:${types_1.promptNames.serviceSelection}`];
|
|
138
144
|
if (selectedService && connectValidator.validatedUrl) {
|
|
139
|
-
const { validationResult } = await (0, service_helper_1.validateService)(selectedService, connectValidator);
|
|
145
|
+
const { validationResult, hasAnnotations, convertedMetadata } = await (0, service_helper_1.validateService)(selectedService, connectValidator);
|
|
140
146
|
if (typeof validationResult === 'string') {
|
|
141
147
|
logger_helper_1.default.logger.error(validationResult);
|
|
142
148
|
throw new Error(validationResult);
|
|
143
149
|
}
|
|
150
|
+
hasBackendAnnotations = hasAnnotations;
|
|
151
|
+
convertedMetadataRef.convertedMetadata = convertedMetadata;
|
|
144
152
|
}
|
|
145
153
|
if (serviceChoices.length === 0 && prompt_helpers_1.errorHandler.hasError()) {
|
|
146
154
|
const noServicesError = inquirer_common_1.ErrorHandler.getHelpForError(inquirer_common_1.ERROR_TYPE.SERVICES_UNAVAILABLE).toString();
|
|
@@ -151,6 +159,14 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
151
159
|
name: `${promptNamespace}:${cliServicePromptName}`
|
|
152
160
|
});
|
|
153
161
|
}
|
|
162
|
+
if (showValueHelpDownloadPrompt) {
|
|
163
|
+
/**
|
|
164
|
+
* Only show the value help download prompt when a service has been validated (convertedMetadata is set), is odata version v4 and is an abap connection
|
|
165
|
+
*/
|
|
166
|
+
questions.push(...(0, inquirer_common_1.withCondition)([(0, value_help_download_1.getValueHelpDownloadPrompt)(connectValidator, promptNamespace, convertedMetadataRef)], (answers) => !!(connectValidator.serviceProvider instanceof axios_extension_1.AbapServiceProvider) &&
|
|
167
|
+
!!convertedMetadataRef.convertedMetadata &&
|
|
168
|
+
answers?.[serviceSelectionPromptName]?.serviceODataVersion === axios_extension_1.ODataVersion.v4));
|
|
169
|
+
}
|
|
154
170
|
return questions;
|
|
155
171
|
}
|
|
156
172
|
/**
|
|
@@ -74,7 +74,8 @@ async function getSystemSelectionQuestions(promptOptions, connectedSystem) {
|
|
|
74
74
|
const questions = await getSystemConnectionQuestions(connectValidator, promptOptions, connectedSystem);
|
|
75
75
|
// Existing system (BackendSystem or Destination) selected,
|
|
76
76
|
if (!promptOptions?.serviceSelection?.hide) {
|
|
77
|
-
questions.push(...(0, inquirer_common_1.withCondition)((0, questions_4.getSystemServiceQuestion)(connectValidator, systemSelectionPromptNamespace, promptOptions?.serviceSelection
|
|
77
|
+
questions.push(...(0, inquirer_common_1.withCondition)((0, questions_4.getSystemServiceQuestion)(connectValidator, systemSelectionPromptNamespace, promptOptions?.serviceSelection, false // Hide value help download prompt
|
|
78
|
+
), (answers) => answers.systemSelection?.type !== 'newSystemChoice'));
|
|
78
79
|
}
|
|
79
80
|
// Create new system connection for storage only supported on non-App Studio environments
|
|
80
81
|
if (!(0, btp_utils_1.isAppStudio)()) {
|
|
@@ -206,6 +206,10 @@
|
|
|
206
206
|
"smartVariantManagement": {
|
|
207
207
|
"message": "Enable Smart Variant Management",
|
|
208
208
|
"hint": "Enables page level variant."
|
|
209
|
+
},
|
|
210
|
+
"valueHelpDownload": {
|
|
211
|
+
"message": "The service contains references to value help services. Do you want to download the associated metadata during generation? This may increase generation time.",
|
|
212
|
+
"hint": "Download metadata for value help to improve the user experience with dropdowns and search."
|
|
209
213
|
}
|
|
210
214
|
},
|
|
211
215
|
"errors": {
|
|
@@ -256,7 +260,8 @@
|
|
|
256
260
|
"collaborativeDraftMessage": "The selected service is draft enabled but does not support collaborative draft.",
|
|
257
261
|
"certificateErrors": "A certificate error occurred when connecting to the host: {{-url}}. Certificate error: {{error}}.",
|
|
258
262
|
"allowingUnauthorizedCertsNode": "Setting the `NODE_TLS_REJECT_UNAUTHORIZED` environment variable to `0` makes TLS connections and HTTPS requests insecure by disabling certificate verification. It is important to understand the security risks when using this setting.",
|
|
259
|
-
"certErrorIgnoredByNodeSetting": "An SSL certificate error is being ignored by the 'NODE_TLS_REJECT_UNAUTHORIZED=0' Node.js setting. This makes TLS connections and HTTPS requests insecure by disabling certificate verification. For details of the certification error, see the logs."
|
|
263
|
+
"certErrorIgnoredByNodeSetting": "An SSL certificate error is being ignored by the 'NODE_TLS_REJECT_UNAUTHORIZED=0' Node.js setting. This makes TLS connections and HTTPS requests insecure by disabling certificate verification. For details of the certification error, see the logs.",
|
|
264
|
+
"noExternalServiceMetdataFetched": "No external service metadata were fetched. $t(texts.seeLogForDetails)."
|
|
260
265
|
},
|
|
261
266
|
"texts": {
|
|
262
267
|
"suggestedSystemNameClient": ", client {{client}}",
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Annotations, ServiceProvider } from '@sap-ux/axios-extension';
|
|
1
|
+
import type { Annotations, ServiceProvider, ExternalService } from '@sap-ux/axios-extension';
|
|
2
2
|
import type { Destination } from '@sap-ux/btp-utils';
|
|
3
3
|
import type { CommonPromptOptions, YUIQuestion } from '@sap-ux/inquirer-common';
|
|
4
4
|
import type { OdataVersion } from '@sap-ux/odata-service-writer';
|
|
@@ -84,6 +84,10 @@ export interface OdataServiceAnswers {
|
|
|
84
84
|
* If the user chose to ignore the certificate error when connecting to the service the value will be true.
|
|
85
85
|
*/
|
|
86
86
|
[serviceUrlInternalPromptNames.ignoreCertError]?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Value list metdata related to the main odata service
|
|
89
|
+
*/
|
|
90
|
+
valueListMetadata?: ExternalService[];
|
|
87
91
|
}
|
|
88
92
|
export interface ConnectedSystem {
|
|
89
93
|
/**
|
|
@@ -141,7 +145,11 @@ export declare enum promptNames {
|
|
|
141
145
|
/**
|
|
142
146
|
* System selection
|
|
143
147
|
*/
|
|
144
|
-
systemSelection = "systemSelection"
|
|
148
|
+
systemSelection = "systemSelection",
|
|
149
|
+
/**
|
|
150
|
+
* Value Help download confirm prompt
|
|
151
|
+
*/
|
|
152
|
+
valueHelpDownload = "valueHelpDownload"
|
|
145
153
|
}
|
|
146
154
|
/**
|
|
147
155
|
* Prompt names for entity related prompts. These indirectly define the properties of the answers object returned by the entity related prompts.
|
|
@@ -335,7 +343,7 @@ export type OdataServiceUrlPromptOptions = {
|
|
|
335
343
|
/**
|
|
336
344
|
* Provide the correct type checking for prompt options
|
|
337
345
|
*/
|
|
338
|
-
type odataServiceInquirerPromptOptions = Record<promptNames.datasourceType, DatasourceTypePromptOptions> & Record<promptNames.metadataFilePath, MetadataPromptOptions> & Record<promptNames.capProject, CapProjectPromptOptions> & Record<promptNames.capService, CapServicePromptOptions> & Record<promptNames.serviceUrl, OdataServiceUrlPromptOptions> & Record<promptNames.serviceSelection, ServiceSelectionPromptOptions> & Record<promptNames.userSystemName, SystemNamePromptOptions> & Record<promptNames.systemSelection, SystemSelectionPromptOptions>;
|
|
346
|
+
type odataServiceInquirerPromptOptions = Record<promptNames.datasourceType, DatasourceTypePromptOptions> & Record<promptNames.metadataFilePath, MetadataPromptOptions> & Record<promptNames.capProject, CapProjectPromptOptions> & Record<promptNames.capService, CapServicePromptOptions> & Record<promptNames.serviceUrl, OdataServiceUrlPromptOptions> & Record<promptNames.serviceSelection, ServiceSelectionPromptOptions> & Record<promptNames.userSystemName, SystemNamePromptOptions> & Record<promptNames.systemSelection, SystemSelectionPromptOptions> & Record<promptNames.valueHelpDownload, ValueHelpDownloadPromptOptions>;
|
|
339
347
|
export type OdataServiceQuestion = YUIQuestion<OdataServiceAnswers>;
|
|
340
348
|
export type OdataServicePromptOptions = Partial<odataServiceInquirerPromptOptions>;
|
|
341
349
|
/**
|
|
@@ -360,5 +368,10 @@ export type EntityPromptOptions = {
|
|
|
360
368
|
*/
|
|
361
369
|
displayPageBuildingBlockPrompt?: boolean;
|
|
362
370
|
};
|
|
371
|
+
/**
|
|
372
|
+
* Support hiding of the value help download prompt, default is true - hidden.
|
|
373
|
+
* Note that this prompt is dependant on service metdata being provided, usually by the service selection prompt.
|
|
374
|
+
*/
|
|
375
|
+
export type ValueHelpDownloadPromptOptions = Pick<CommonPromptOptions, 'hide'>;
|
|
363
376
|
export {};
|
|
364
377
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.js
CHANGED
|
@@ -66,6 +66,10 @@ var promptNames;
|
|
|
66
66
|
* System selection
|
|
67
67
|
*/
|
|
68
68
|
promptNames["systemSelection"] = "systemSelection";
|
|
69
|
+
/**
|
|
70
|
+
* Value Help download confirm prompt
|
|
71
|
+
*/
|
|
72
|
+
promptNames["valueHelpDownload"] = "valueHelpDownload";
|
|
69
73
|
})(promptNames || (exports.promptNames = promptNames = {}));
|
|
70
74
|
/**
|
|
71
75
|
* Prompt names for entity related prompts. These indirectly define the properties of the answers object returned by the entity related prompts.
|
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.
|
|
4
|
+
"version": "2.13.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@sap/cf-tools": "3.2.2",
|
|
23
|
-
"@sap-ux/annotation-converter": "0.10.
|
|
23
|
+
"@sap-ux/annotation-converter": "0.10.9",
|
|
24
24
|
"@sap-ux/edmx-parser": "0.9.1",
|
|
25
25
|
"axios": "1.12.2",
|
|
26
26
|
"axios-logger": "2.8.0",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
"i18next": "25.3.0",
|
|
30
30
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
31
31
|
"os-name": "4.0.1",
|
|
32
|
-
"@sap-ux/axios-extension": "1.
|
|
32
|
+
"@sap-ux/axios-extension": "1.25.0",
|
|
33
33
|
"@sap-ux/btp-utils": "1.1.6",
|
|
34
34
|
"@sap-ux/fiori-generator-shared": "0.13.44",
|
|
35
35
|
"@sap-ux/guided-answers-helper": "0.4.2",
|
|
36
36
|
"@sap-ux/telemetry": "0.6.48",
|
|
37
|
-
"@sap-ux/inquirer-common": "0.
|
|
37
|
+
"@sap-ux/inquirer-common": "0.10.1",
|
|
38
38
|
"@sap-ux/logger": "0.7.2",
|
|
39
39
|
"@sap-ux/nodejs-utils": "0.2.10",
|
|
40
40
|
"@sap-ux/project-access": "1.32.16",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
"@sap-ux/store": "1.4.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@sap-ux/vocabularies-types": "0.13.
|
|
45
|
+
"@sap-ux/vocabularies-types": "0.13.2",
|
|
46
46
|
"@sap-devx/yeoman-ui-types": "1.14.4",
|
|
47
47
|
"@types/inquirer-autocomplete-prompt": "2.0.2",
|
|
48
48
|
"@types/inquirer": "8.2.6",
|
|
49
49
|
"@types/lodash": "4.14.202",
|
|
50
50
|
"jest-extended": "6.0.0",
|
|
51
51
|
"@sap-ux/fiori-generator-shared": "0.13.44",
|
|
52
|
-
"@sap-ux/fiori-elements-writer": "2.8.
|
|
53
|
-
"@sap-ux/fiori-freestyle-writer": "2.5.
|
|
52
|
+
"@sap-ux/fiori-elements-writer": "2.8.24",
|
|
53
|
+
"@sap-ux/fiori-freestyle-writer": "2.5.16",
|
|
54
54
|
"@sap-ux/feature-toggle": "0.3.5",
|
|
55
|
-
"@sap-ux/odata-service-writer": "0.
|
|
55
|
+
"@sap-ux/odata-service-writer": "0.29.0",
|
|
56
56
|
"@sap-ux/cap-config-writer": "0.12.35"
|
|
57
57
|
},
|
|
58
58
|
"engines": {
|