@sap-ux/odata-service-inquirer 0.6.13 → 0.7.2
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/i18n.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.defaultProjectNumber = void 0;
|
|
|
7
7
|
exports.initI18nOdataServiceInquirer = initI18nOdataServiceInquirer;
|
|
8
8
|
exports.t = t;
|
|
9
9
|
const inquirer_common_1 = require("@sap-ux/inquirer-common");
|
|
10
|
+
const project_input_validator_1 = require("@sap-ux/project-input-validator");
|
|
10
11
|
const i18next_1 = __importDefault(require("i18next"));
|
|
11
12
|
const odata_service_inquirer_i18n_json_1 = __importDefault(require("./translations/odata-service-inquirer.i18n.json"));
|
|
12
13
|
const odataServiceInquirerNamespace = 'odata-service-inquirer';
|
|
@@ -34,8 +35,9 @@ async function initI18nOdataServiceInquirer() {
|
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
i18next_1.default.addResourceBundle('en', odataServiceInquirerNamespace, odata_service_inquirer_i18n_json_1.default);
|
|
37
|
-
// add
|
|
38
|
+
// add other bundles that are used in consumed modules
|
|
38
39
|
(0, inquirer_common_1.addi18nResourceBundle)();
|
|
40
|
+
(0, project_input_validator_1.addi18nResourceBundle)();
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
43
|
* Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used.
|
|
@@ -215,7 +215,7 @@ class ConnectionValidator {
|
|
|
215
215
|
return 200;
|
|
216
216
|
}
|
|
217
217
|
catch (e) {
|
|
218
|
-
logger_helper_1.default.logger.debug(`ConnectionValidator.
|
|
218
|
+
logger_helper_1.default.logger.debug(`ConnectionValidator.checkUrl() - error: ${e.message}`);
|
|
219
219
|
if (e?.isAxiosError) {
|
|
220
220
|
// Error handling for BAS specific 500 errors
|
|
221
221
|
if (e?.response?.status.toString().match(/5\d\d/) && isBAS) {
|
|
@@ -491,7 +491,7 @@ class ConnectionValidator {
|
|
|
491
491
|
odataVersion: requiredOdataVersion
|
|
492
492
|
});
|
|
493
493
|
const validationResult = this.getValidationResultFromStatusCode(status);
|
|
494
|
-
if (this.validity.reachable
|
|
494
|
+
if (this.validity.reachable) {
|
|
495
495
|
this._validatedUrl = destUrl;
|
|
496
496
|
}
|
|
497
497
|
if (!this.validity.reachable) {
|
|
@@ -504,7 +504,9 @@ class ConnectionValidator {
|
|
|
504
504
|
}
|
|
505
505
|
if (this.validity.authRequired) {
|
|
506
506
|
return {
|
|
507
|
-
valResult: inquirer_common_1.ErrorHandler.getErrorMsgFromType(inquirer_common_1.ERROR_TYPE.AUTH
|
|
507
|
+
valResult: inquirer_common_1.ErrorHandler.getErrorMsgFromType(inquirer_common_1.ERROR_TYPE.AUTH, destination.Authentication !== btp_utils_1.Authentication.NO_AUTHENTICATION
|
|
508
|
+
? (0, i18n_1.t)('texts.checkDestinationAuthConfig')
|
|
509
|
+
: undefined),
|
|
508
510
|
errorType: inquirer_common_1.ERROR_TYPE.AUTH
|
|
509
511
|
};
|
|
510
512
|
}
|
|
@@ -560,7 +562,7 @@ class ConnectionValidator {
|
|
|
560
562
|
isSystem,
|
|
561
563
|
odataVersion
|
|
562
564
|
});
|
|
563
|
-
logger_helper_1.default.logger.debug(`ConnectionValidator.
|
|
565
|
+
logger_helper_1.default.logger.debug(`ConnectionValidator.validateUrl() - status: ${status}; url: ${serviceUrl}`);
|
|
564
566
|
this.validity.urlFormat = true;
|
|
565
567
|
this._validatedUrl = serviceUrl;
|
|
566
568
|
return this.getValidationResultFromStatusCode(status);
|
|
@@ -718,7 +720,7 @@ class ConnectionValidator {
|
|
|
718
720
|
isSystem,
|
|
719
721
|
odataVersion
|
|
720
722
|
});
|
|
721
|
-
logger_helper_1.default.logger.debug(`ConnectionValidator.
|
|
723
|
+
logger_helper_1.default.logger.debug(`ConnectionValidator.validateAuth() - status: ${status}; url: ${url}`);
|
|
722
724
|
// Since an exception was not thrown, this is a valid url
|
|
723
725
|
this.validity.urlFormat = true;
|
|
724
726
|
this._validatedUrl = url;
|
|
@@ -56,7 +56,9 @@ function getSystemServiceQuestion(connectValidator, promptNamespace, promptOptio
|
|
|
56
56
|
(0, service_helper_1.sendDestinationServiceSuccessTelemetryEvent)(answers?.[`${types_1.promptNames.systemSelection}`]?.system);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
else if (connectValidator.odataService &&
|
|
59
|
+
else if (connectValidator.odataService &&
|
|
60
|
+
connectValidator.validatedUrl &&
|
|
61
|
+
!(await connectValidator.isAuthRequired())) {
|
|
60
62
|
// We have connected to a service endpoint, use this service as the only choice
|
|
61
63
|
const serviceUrl = new URL(connectValidator.destinationUrl ?? connectValidator.validatedUrl);
|
|
62
64
|
serviceChoices = [
|
|
@@ -161,6 +161,7 @@
|
|
|
161
161
|
"forUserName": "(for user [{{username}}])",
|
|
162
162
|
"systemTypeBTP": "BTP",
|
|
163
163
|
"systemTypeS4HC": "S4HC",
|
|
164
|
-
"httpStatus": "http status {{httpStatus}}"
|
|
164
|
+
"httpStatus": "http status {{httpStatus}}",
|
|
165
|
+
"checkDestinationAuthConfig": "Please check the SAP BTP destination authentication configuration."
|
|
165
166
|
}
|
|
166
167
|
}
|
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.
|
|
4
|
+
"version": "0.7.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"!dist/**/*.map"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@sap/cf-tools": "3.2.
|
|
22
|
+
"@sap/cf-tools": "3.2.2",
|
|
23
23
|
"axios": "1.7.4",
|
|
24
24
|
"axios-logger": "2.8.0",
|
|
25
25
|
"fast-xml-parser": "4.4.1",
|
|
26
26
|
"i18next": "23.5.1",
|
|
27
27
|
"inquirer-autocomplete-prompt": "2.0.1",
|
|
28
28
|
"os-name": "4.0.1",
|
|
29
|
-
"@sap-ux/axios-extension": "1.17.
|
|
30
|
-
"@sap-ux/btp-utils": "0.17.
|
|
31
|
-
"@sap-ux/fiori-generator-shared": "0.7.
|
|
29
|
+
"@sap-ux/axios-extension": "1.17.6",
|
|
30
|
+
"@sap-ux/btp-utils": "0.17.1",
|
|
31
|
+
"@sap-ux/fiori-generator-shared": "0.7.12",
|
|
32
32
|
"@sap-ux/guided-answers-helper": "0.1.0",
|
|
33
|
-
"@sap-ux/telemetry": "0.5.
|
|
34
|
-
"@sap-ux/inquirer-common": "0.5.
|
|
33
|
+
"@sap-ux/telemetry": "0.5.46",
|
|
34
|
+
"@sap-ux/inquirer-common": "0.5.7",
|
|
35
35
|
"@sap-ux/logger": "0.6.0",
|
|
36
36
|
"@sap-ux/project-access": "1.28.8",
|
|
37
37
|
"@sap-ux/project-input-validator": "0.3.4",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"@types/inquirer": "8.2.6",
|
|
44
44
|
"@types/lodash": "4.14.202",
|
|
45
45
|
"jest-extended": "3.2.4",
|
|
46
|
-
"@sap-ux/fiori-generator-shared": "0.7.
|
|
47
|
-
"@sap-ux/feature-toggle": "0.2.
|
|
46
|
+
"@sap-ux/fiori-generator-shared": "0.7.12",
|
|
47
|
+
"@sap-ux/feature-toggle": "0.2.3",
|
|
48
48
|
"@sap-ux/odata-service-writer": "0.24.0"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|