@sap-ux/system-access 0.3.33 → 0.4.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/base/connect.js +6 -3
- package/package.json +3 -3
package/dist/base/connect.js
CHANGED
|
@@ -84,6 +84,7 @@ function createAbapCloudServiceProvider(options, target, prompt, logger) {
|
|
|
84
84
|
* @returns an ABAPServiceProvider instance
|
|
85
85
|
*/
|
|
86
86
|
function createAbapOnPremServiceProvider(options, target, prompt, logger) {
|
|
87
|
+
var _a;
|
|
87
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
89
|
if (!options.auth) {
|
|
89
90
|
const storedOpts = yield (0, credentials_1.getCredentialsFromStore)(target, logger);
|
|
@@ -97,11 +98,11 @@ function createAbapOnPremServiceProvider(options, target, prompt, logger) {
|
|
|
97
98
|
if ((0, credentials_1.isServiceAuth)(storedOpts)) {
|
|
98
99
|
throw new Error('This is an ABAP Cloud system, please correct your configuration.');
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
+
(_a = options.auth) !== null && _a !== void 0 ? _a : (options.auth = (0, credentials_1.getCredentialsFromEnvVariables)());
|
|
102
|
+
if (!options.auth && prompt) {
|
|
101
103
|
const { authType } = yield (0, prompts_2.default)([prompts_1.questions.authType]);
|
|
102
104
|
if (authType === store_1.AuthenticationType.ReentranceTicket) {
|
|
103
105
|
target.authenticationType = store_1.AuthenticationType.ReentranceTicket;
|
|
104
|
-
return (0, axios_extension_1.createForAbapOnCloud)(Object.assign(Object.assign(Object.assign({}, options), target), { environment: axios_extension_1.AbapCloudEnvironment.EmbeddedSteampunk }));
|
|
105
106
|
}
|
|
106
107
|
else {
|
|
107
108
|
const credentials = yield (0, credentials_1.getCredentialsWithPrompts)(storedOpts === null || storedOpts === void 0 ? void 0 : storedOpts.username);
|
|
@@ -112,7 +113,9 @@ function createAbapOnPremServiceProvider(options, target, prompt, logger) {
|
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
|
-
return
|
|
116
|
+
return target.authenticationType === store_1.AuthenticationType.ReentranceTicket
|
|
117
|
+
? (0, axios_extension_1.createForAbapOnCloud)(Object.assign(Object.assign(Object.assign({}, options), target), { environment: axios_extension_1.AbapCloudEnvironment.EmbeddedSteampunk }))
|
|
118
|
+
: (0, axios_extension_1.createForAbap)(options);
|
|
116
119
|
});
|
|
117
120
|
}
|
|
118
121
|
/**
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Asystem-access"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.4.0",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"prompts": "2.4.2",
|
|
26
|
-
"@sap-ux/axios-extension": "1.13.
|
|
26
|
+
"@sap-ux/axios-extension": "1.13.1",
|
|
27
27
|
"@sap-ux/btp-utils": "0.14.4",
|
|
28
28
|
"@sap-ux/logger": "0.5.1",
|
|
29
29
|
"@sap-ux/store": "0.5.0"
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/prompts": "2.4.4",
|
|
33
33
|
"nock": "13.4.0",
|
|
34
34
|
"rimraf": "5.0.5",
|
|
35
|
-
"@sap-ux/project-access": "1.
|
|
35
|
+
"@sap-ux/project-access": "1.22.0"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
38
|
"node": ">=18.x"
|