@sap-ux/odata-service-inquirer 2.4.9 → 2.4.10
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { InputQuestion, PasswordQuestion } from '@sap-ux/inquirer-common';
|
|
2
|
+
import type { Answers } from 'inquirer';
|
|
2
3
|
import type { ConnectionValidator } from '../../../connectionValidator';
|
|
3
4
|
export declare enum BasicCredentialsPromptNames {
|
|
4
5
|
systemUsername = "systemUsername",
|
|
@@ -17,5 +18,5 @@ export declare enum BasicCredentialsPromptNames {
|
|
|
17
18
|
export declare function getCredentialsPrompts<T extends Answers>(connectionValidator: ConnectionValidator, promptNamespace?: string, sapClient?: {
|
|
18
19
|
sapClient: string | undefined;
|
|
19
20
|
isValid: boolean;
|
|
20
|
-
}):
|
|
21
|
+
}): (InputQuestion<T> | PasswordQuestion<T>)[];
|
|
21
22
|
//# sourceMappingURL=questions.d.ts.map
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BasicCredentialsPromptNames = void 0;
|
|
4
4
|
exports.getCredentialsPrompts = getCredentialsPrompts;
|
|
5
|
+
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
5
6
|
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
6
7
|
const i18n_1 = require("../../../../i18n");
|
|
7
8
|
const types_1 = require("../../../../types");
|
|
@@ -42,7 +43,7 @@ function getCredentialsPrompts(connectionValidator, promptNamespace, sapClient)
|
|
|
42
43
|
validate: (user) => user?.length > 0
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
|
-
when: () => connectionValidator.systemAuthType === 'basic' && authRequired,
|
|
46
|
+
when: () => !!(connectionValidator.systemAuthType === 'basic' && authRequired),
|
|
46
47
|
type: 'password',
|
|
47
48
|
guiOptions: {
|
|
48
49
|
mandatory: true,
|
|
@@ -86,6 +87,19 @@ function getCredentialsPrompts(connectionValidator, promptNamespace, sapClient)
|
|
|
86
87
|
return true;
|
|
87
88
|
}
|
|
88
89
|
return valResult;
|
|
90
|
+
},
|
|
91
|
+
additionalMessages: (password, answers) => {
|
|
92
|
+
// Since the odata service URL prompt has its own credentials prompts its safe to assume
|
|
93
|
+
// that `ignoreCertError` when true means that the user has set the node setting to ignore cert errors and
|
|
94
|
+
// not that the user has chosen to ignore the cert error for this specific connection (this is only supported by the odata service URL prompts).
|
|
95
|
+
if (connectionValidator.ignoreCertError &&
|
|
96
|
+
// This condition prevents showing the message twice as it will already be shown under the new system URL prompt.
|
|
97
|
+
answers?.newSystemType !== 'abapOnPrem') {
|
|
98
|
+
return {
|
|
99
|
+
message: (0, i18n_1.t)('warnings.certErrorIgnoredByNodeSetting'),
|
|
100
|
+
severity: yeoman_ui_types_1.Severity.warning
|
|
101
|
+
};
|
|
102
|
+
}
|
|
89
103
|
}
|
|
90
104
|
}
|
|
91
105
|
];
|
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.
|
|
4
|
+
"version": "2.4.10",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@sap-ux/fiori-generator-shared": "0.12.4",
|
|
34
34
|
"@sap-ux/guided-answers-helper": "0.3.0",
|
|
35
35
|
"@sap-ux/telemetry": "0.6.3",
|
|
36
|
-
"@sap-ux/logger": "0.7.0",
|
|
37
36
|
"@sap-ux/inquirer-common": "0.7.5",
|
|
37
|
+
"@sap-ux/logger": "0.7.0",
|
|
38
38
|
"@sap-ux/project-access": "1.30.2",
|
|
39
39
|
"@sap-ux/project-input-validator": "0.6.2",
|
|
40
40
|
"@sap-ux/store": "1.1.0"
|