@sap-ux/system-access
Advanced tools
@@ -45,6 +45,13 @@ "use strict"; | ||
| const systemService = await (0, store_1.getService)({ entityName: 'system' }); | ||
| let system = await systemService.read(new store_1.BackendSystemKey({ url: target.url, client: target.client })); | ||
| let url = target.url; | ||
| if (target.connectPath) { | ||
| const normalizedPath = target.connectPath.startsWith('/') | ||
| ? target.connectPath | ||
| : `/${target.connectPath}`; | ||
| url = new URL(normalizedPath, target.url).href; | ||
| } | ||
| let system = await systemService.read(new store_1.BackendSystemKey({ url, client: target.client })); | ||
| // check if there are credentials for the default client | ||
| if (!system && target.client) { | ||
| system = await systemService.read(new store_1.BackendSystemKey({ url: target.url })); | ||
| system = await systemService.read(new store_1.BackendSystemKey({ url })); | ||
| } | ||
@@ -51,0 +58,0 @@ return system; |
+1
-0
@@ -5,2 +5,3 @@ import type { AxiosRequestConfig, ServiceInfo } from '@sap-ux/axios-extension'; | ||
| url: string; | ||
| connectPath?: string; | ||
| client?: string; | ||
@@ -7,0 +8,0 @@ scp?: boolean; |
+2
-2
@@ -12,3 +12,3 @@ { | ||
| }, | ||
| "version": "0.6.66", | ||
| "version": "0.7.0", | ||
| "license": "Apache-2.0", | ||
@@ -36,3 +36,3 @@ "author": "@SAP/ux-tools-team", | ||
| "rimraf": "6.1.3", | ||
| "@sap-ux/project-access": "1.35.13" | ||
| "@sap-ux/project-access": "1.35.14" | ||
| }, | ||
@@ -39,0 +39,0 @@ "engines": { |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
34292
0.92%539
1.51%