Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/btp-utils

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/btp-utils - npm Package Compare versions

Comparing version 0.16.0 to 0.17.0

5

dist/app-studio.d.ts
import type { Logger } from '@sap-ux/logger';
import type { Destination } from './destination';
import { type Destination, type ListDestinationOpts } from './destination';
/**

@@ -46,5 +46,6 @@ * HTTP header that is to be used for encoded credentials when communicating with a destination service instance.

*
* @param options - options for the destinations
* @returns the list of destinations
*/
export declare function listDestinations(): Promise<Destinations>;
export declare function listDestinations(options?: ListDestinationOpts): Promise<Destinations>;
/**

@@ -51,0 +52,0 @@ * Exposes port in SAP Business Application Studio.

17

dist/app-studio.js

@@ -17,2 +17,3 @@ "use strict";

const app_studio_env_1 = require("./app-studio.env");
const destination_1 = require("./destination");
/**

@@ -82,7 +83,18 @@ * HTTP header that is to be used for encoded credentials when communicating with a destination service instance.

/**
* Helper function to strip `-api` from the host name.
*
* @param host -
* @returns
*/
function stripS4HCApiHost(host) {
const [first, ...rest] = host.split('.');
return [first.replace(/-api$/, ''), ...rest].join('.');
}
/**
* Get a list of available destinations in SAP Business Application Studio.
*
* @param options - options for the destinations
* @returns the list of destinations
*/
async function listDestinations() {
async function listDestinations(options) {
const destinations = {};

@@ -93,2 +105,5 @@ await axios_1.default.get('/reload', { baseURL: process.env[app_studio_env_1.ENV.PROXY_URL] });

list.forEach((destination) => {
if (options?.stripS4HCApiHosts && (0, destination_1.isS4HC)(destination)) {
destination.Host = stripS4HCApiHost(destination.Host);
}
if (destination.WebIDEEnabled) {

@@ -95,0 +110,0 @@ destinations[destination.Name] = destination;

@@ -70,2 +70,5 @@ /**

}
export interface ListDestinationOpts {
stripS4HCApiHosts?: boolean;
}
/**

@@ -72,0 +75,0 @@ * Checks whether the provided destination is configured to point to an ABAP system (both cloud and on-premise).

{
"name": "@sap-ux/btp-utils",
"version": "0.16.0",
"version": "0.17.0",
"description": "Library to simplify working with SAP BTP specific features especially in SAP Business Application",

@@ -5,0 +5,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc