Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@sap-ux/axios-extension
Advanced tools
Extension of the Axios module adding convenience methods to interact with SAP systems especially with OData services.
The @sap-ux/axios-extension
module is an extension of the link:https://github.com/axios/axios[axios] framework adding convenience methods to interact with SAP systems especially with OData services..
The module offers factory functions allowing to generate ServiceProvider
instances.
The base service provider extends the class Axios
abstracting whether it is running in SAP Business Application Studio or locally.
It offers convenience methods to simplify the handling of:
It exposes the service(path)
method that creates a new Axios instance for the requested service. It will reuse authentication details and cookies from the provider.
Another extension of the base provider handling specifics for ABAP based backend systems. It offers simplified access to the catalog services as well as the UI5 ABAP repository service.
The generic OData service simplifies the access to the service metadata as well as the access to response data. It is used as base class for
Simplified consumption of the SAP catalog service useful for fetching annotations.
Allows deployment of applications to the UI5 ABAP Repository as well as checking deployed applications.
A class representing the app index service allowing to search applications deployed on an ABAP system.
Allows deployment of adaptation projects.
Usage:
import { createForAbap } from '@sap-ux/axios-extension';
const provider = createForAbap({
baseURL: 'https://sap.example',
params: { 'sap-client': client }
});
const service = provider.getLayeredRepository();
await service.deploy('./dist/my-variant-webapp.zip', {
namespace: 'apps/my.base.app/appVariants/customer.variant/',
package: 'MY_PACKAGE',
transport: 'ABC123'
});
Services that supports Fiori project deployment configuration. The following example shows the usage
of loading ADT service TransportRequestService
for creating a new transport request number.
Usage:
import { createForAbap } from '@sap-ux/axios-extension';
const provider = createForAbap({
baseURL: 'https://sap.example',
params: { 'sap-client': client }
});
const transportRequestService = provider.getAdtService<TransportRequestService>(TransportRequestService);
const newTrNumber = await transportRequestService.createTransportRequest({
packageName: 'Z_PACKAGE',
ui5AppName: 'zappname',
description: 'A new transport request number for deployment'
});
Supported ADT services are implemented in link:./src/abap/adt-catalog/services[src/abap/adt-catalog/services].
Take link:./src/abap/adt-catalog/services/ato-service.ts[AtoService] as an example to illustrate how to implement an ADT service. A specific ADT service implementation like AtoService is implemented as a subclass of link:./src/abap/adt-catalog/services/adt-service.ts[AdtService].
export class AtoService extends AdtService {
// ...
}
As a subclass of AdtService, AtoService implements the getAdtCatagory()
static method to provide the AdtCatagory properties.
AdtCatagory properties is used as unique ID to
obtain service schema from ADT discovery schema. See link:./src/abap/adt-catalog/adt-catalog-service.ts[AdtCatalogService] and
link:./src/abap/adt-catalog/adt-schema-store.ts[AdtSchemaStore] for details.
Finally, AtoService implements the request for fetching ATO settings and the parsing of response data. See getAtoInfo()
and
parseAtoResponse(xml: string)
in AtoService implementation.
Npm
npm install --save @sap-ux/axios-extension
Yarn
yarn add @sap-ux/axios-extension
Pnpm
pnpm add @sap-ux/axios-extension
import { createForAbap } from '@sap-ux/axios-extension';
const provider = createForAbap({
baseURL: 'https://sap.example',
params: { 'sap-client': client }
});
const service = provider.service('/ns/my_service');
const metadata = await service.metadata();
See more examples in link:./test/factory.test.ts[/test/factory.test.ts]
To enable support for TLS (Transport Layer Security) connections when using HTTPS_PROXY
, update your environment by setting the TOOLSUITE_FEATURES
environment variable with sap.ux.enablePatchProxy
, as shown;
export TOOLSUITE_FEATURES=sap.ux.enablePatchProxy
export HTTPS_PROXY=<YOUR-PROXY:PORT>
Example Scenario
If you're using a proxy server to route your HTTPS traffic, the proxy server will need to create a secure, TLS-encrypted connection to the target server on your behalf. tls.connect()
will be used to establish that encrypted tunnel between your client, the proxy, and the server.
FAQs
Extension of the Axios module adding convenience methods to interact with SAP systems especially with OData services.
The npm package @sap-ux/axios-extension receives a total of 185,798 weekly downloads. As such, @sap-ux/axios-extension popularity was classified as popular.
We found that @sap-ux/axios-extension demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.