@sap-ux/odata-service-inquirer 0.6.7 → 0.6.8
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/cap-project/cap-helpers.js +4 -2
- package/dist/prompts/datasources/sap-system/system-selection/prompt-helpers.js +1 -1
- package/dist/prompts/datasources/sap-system/system-selection/questions.js +1 -0
- package/dist/translations/odata-service-inquirer.i18n.json +6 -5
- package/package.json +2 -2
|
@@ -12,6 +12,7 @@ const path_1 = require("path");
|
|
|
12
12
|
const i18n_1 = require("../../../i18n");
|
|
13
13
|
const logger_helper_1 = __importDefault(require("../../logger-helper"));
|
|
14
14
|
const prompt_helpers_1 = require("../../prompt-helpers");
|
|
15
|
+
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
15
16
|
exports.enterCapPathChoiceValue = 'enterCapPath';
|
|
16
17
|
/**
|
|
17
18
|
* Search for CAP projects in the specified paths.
|
|
@@ -136,8 +137,9 @@ async function getCapServiceChoices(capProjectPaths) {
|
|
|
136
137
|
capCdsVersionInfo = cdsVersionInfo;
|
|
137
138
|
}
|
|
138
139
|
catch (error) {
|
|
139
|
-
|
|
140
|
-
|
|
140
|
+
const capLoadErrorMsg = (0, i18n_1.t)('errors.capModelAndServicesLoadError', { error: error?.message });
|
|
141
|
+
prompt_helpers_1.errorHandler.logErrorMsgs(inquirer_common_1.ERROR_TYPE.UNKNOWN, capLoadErrorMsg);
|
|
142
|
+
logger_helper_1.default.logger.error(capLoadErrorMsg);
|
|
141
143
|
return [];
|
|
142
144
|
}
|
|
143
145
|
// We need the relative service definitions file paths (.cds) for the generated annotation file
|
|
@@ -101,7 +101,7 @@ function getBackendSystemDisplayName(system) {
|
|
|
101
101
|
if (system.authenticationType === 'reentranceTicket') {
|
|
102
102
|
systemTypeName = ` (${(0, i18n_1.t)('texts.systemTypeS4HC')})`;
|
|
103
103
|
}
|
|
104
|
-
if (system.
|
|
104
|
+
if (system.serviceKeys) {
|
|
105
105
|
systemTypeName = ` (${(0, i18n_1.t)('texts.systemTypeBTP')})`;
|
|
106
106
|
}
|
|
107
107
|
return `${system.name}${systemTypeName}${userDisplayName}`;
|
|
@@ -96,6 +96,7 @@ async function getSystemConnectionQuestions(connectionValidator, promptOptions)
|
|
|
96
96
|
type: promptOptions?.systemSelection?.useAutoComplete ? 'autocomplete' : 'list',
|
|
97
97
|
name: types_1.promptNames.systemSelection,
|
|
98
98
|
message: (0, i18n_1.t)('prompts.systemSelection.message'),
|
|
99
|
+
hint: (0, i18n_1.t)('prompts.systemSelection.hint'),
|
|
99
100
|
source: (prevAnswers, input) => (0, inquirer_common_1.searchChoices)(input, systemChoices),
|
|
100
101
|
choices: systemChoices,
|
|
101
102
|
validate: async (selectedSystem) => {
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"message": "Data source",
|
|
5
5
|
"projectSpecificDestName": "Project Specific Destination",
|
|
6
6
|
"businessHubName": "SAP Business Accelerator Hub",
|
|
7
|
-
"sapSystemName": "
|
|
8
|
-
"odataServiceUrlName": "OData Service
|
|
7
|
+
"sapSystemName": "System",
|
|
8
|
+
"odataServiceUrlName": "OData Service",
|
|
9
9
|
"capProjectName": "Local CAP Project",
|
|
10
|
-
"metadataFileName": "Metadata
|
|
10
|
+
"metadataFileName": "Metadata Document",
|
|
11
11
|
"noneName": "None",
|
|
12
12
|
"projectSpecificDestChoiceText": "Connect to a $t(prompts.datasourceType.projectSpecificDestName)",
|
|
13
13
|
"businessHubChoiceText": "Connect to $t(prompts.datasourceType.businessHubName)",
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
},
|
|
102
102
|
"systemSelection": {
|
|
103
103
|
"newSystemChoiceLabel": "New system",
|
|
104
|
-
"
|
|
104
|
+
"hint": "Select a system configuration",
|
|
105
|
+
"message": "System",
|
|
105
106
|
"authenticationFailedUpdateCredentials": "Authentication failed. Please try updating the credentials."
|
|
106
107
|
},
|
|
107
108
|
"abapOnBTPType": {
|
|
@@ -131,7 +132,7 @@
|
|
|
131
132
|
"authError": "The selected system is returning an authentication error. System name: {{systemName}}, error: {{- error}}"
|
|
132
133
|
},
|
|
133
134
|
"cannotReadCapServiceMetadata": "An error occurred reading CAP service metadata: {{serviceName}}. $t(texts.seeLogForDetails)",
|
|
134
|
-
"capModelAndServicesLoadError": "An error occurred loading the CAP model and services
|
|
135
|
+
"capModelAndServicesLoadError": "An error occurred loading the CAP model and services{{- error, addMsgWithColonFormatter}}",
|
|
135
136
|
"capServiceUrlPathNotDefined": "An error occurred reading CAP service metadata: {{serviceName}}. CAP service property `urlPath` is not defined but is required.",
|
|
136
137
|
"unknownError": "An error occurred{{- error, addMsgWithColonFormatter}}",
|
|
137
138
|
"authenticationFailed": "Authentication incorrect. {{error}}",
|
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": "0.6.
|
|
4
|
+
"version": "0.6.8",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@sap-ux/fiori-generator-shared": "0.7.10",
|
|
32
32
|
"@sap-ux/guided-answers-helper": "0.1.0",
|
|
33
33
|
"@sap-ux/telemetry": "0.5.44",
|
|
34
|
-
"@sap-ux/inquirer-common": "0.5.
|
|
34
|
+
"@sap-ux/inquirer-common": "0.5.4",
|
|
35
35
|
"@sap-ux/logger": "0.6.0",
|
|
36
36
|
"@sap-ux/project-access": "1.28.7",
|
|
37
37
|
"@sap-ux/project-input-validator": "0.3.3",
|