Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@sap-cloud-sdk/resilience
Advanced tools
This package contains implementations for the resilience middlewares like a timeout or circuit breaker middleware. This concept of middlewares is totally generic, and you can use it for non-resilience use cases.
$ npm install @sap-cloud-sdk/resilience
Add a timeout middleware to a request.
executeHttpRequest(destination, { middleware: [ timeout() ] }, httpRequestOptions);
For more detailed overview visit our resilience documentation.
The recommended way to get in touch with us is to create an issue on GitHub. Select the issue category Bug, Feature, or Question depending on the nature of your request. We try to provide fixes, features and answers as soon as possible.
If you would like to contribute to the SAP Cloud SDK, please make yourself familiar with our contributing guidelines and follow the given instructions.
The SAP Cloud SDK is released under the Apache License Version 2.0.
3.0.0
API Docs: https://sap.github.io/cloud-sdk/api/3.0.0
JwtKeyMapping
is simplified so the second type argument JwtKeysT
are always strings. (fde964e37)Protocol
enum was replaced with a string literal union type. Now, instead of passing Protocol.HTTPS
pass 'https'. (fde964e37)timeout
and enableCircuitBreaker
from all BTP service interactions i.e. destination and token fetching. (fde964e37)Node16
instead of CommonJS
for better interoperability with ES modules. See the TypeScript handbook for technical details if needed. (fde964e37)IsolationStrategy
was replaced with a string literal union type of the same name. Use 'tenant' and 'tenant-user' instead of IsolationStrategy.Tenant
and IsolationStrategy.Tenant_User
. (fde964e37)url
property in Destination
is now optional as destinations of type MAIL
do not have a URL. (fde964e37)timeout()
method from the request builders and the timeout
options from the executeHttpRequest()
function.
Visit the documentation portal to see how to add a timeout using middlewares. (fde964e37)HttpRequestConfigWithOrigin
as a parameter, is removed and replaced by the function executeHttpRequestWithOrigin
. (fde964e37)servicePath
value in the options-per-service.json
or set skipValidation
to true, in which case, /
will be used. (fde964e37)ODataRequestConfig
was changed so that the third parameter cannot be a string
anymore.
Passing in a string which was then interpreted as the value for the Content-Type
HTTP header was deprecated.
The type of the parameter is now Record<string, any>
, and if only want to set the Content-Type
HTTP header you can do so by passing {'content-type': 'some-value'}
to the constructor. (fde964e37)serviceMapping
option of the OData generator has been renamed to optionsPerService
. The mapping file, service-mapping.json
has also been renamed to options-per-service.json
. By default, an options file will not be generated. (fde964e37)fromJson
through the _customFields
property has been removed.
Add custom properties to your JSON object instead. (fde964e37)forceOverwrite
option of the generator is removed. Use the overwrite
option instead.
[Compatibility Note] The deprecated generatePackageJson
option of the generator is removed. Use the packageJson
option instead.
[Compatibility Note] The deprecated writeReadme
option of the generator is removed. Use the readme
option instead.
[Compatibility Note] The deprecated processesJsGeneration
option of the generator is removed. Use the transpilationProcesses
option instead.
[Compatibility Note] The internal options sdkAfterVersionScript
, s4HanaCloud
and packageVersion
of the generator are removed.
These were hidden options never meant for external usage and there is no replacement.
[Compatibility Note] The deprecated generateNpmrc
option of the generator is removed. Use the include
option to add a .npmrc
to the generated code if needed. (fde964e37)verbose
generator option. By default, only error and warning logs will be displayed. If verbose
is set to true
, all logs will be displayed. (fde964e37)generateJs
option has been replaced with the transpile
option. Transpilation is not enabled by default. (fde964e37)inputDir
of the OData generator is renamed to input
.
The new input
options accepts now also file paths and glob patterns. (fde964e37)skipValidation
flag if you want to generate despite name conflicts and are okay with changed identifier names to avoid conflicts. (fde964e37)versionInPackageJson
from the OData and OpenAPI generator.
If the option packageJson
is enabled now a package.json
with a default version 1.0.0
is created.
If necessary use the include
option to add a package.json
with a custom value.
[Compatibility Note] Removed the option licenseInPackageJson
from the OData and OpenAPI generator.
If the option packageJson
is enabled now a package.json
with a default license UNLICENSED
is created.
If necessary use the include
option to add a package.json
with a custom value. (fde964e37)generateCSN
is removed. There is no replacement. (fde964e37)GeneratorOptions
is changed from fs.PathLike
to string
.
In case you passed a buffer object please resolve it to a string before passing it to the SAP Cloud SDK. (fde964e37)verbose
flag to investigate the new paths. (fde964e37)variadicArgumentToArray
is replaced by the function transformVariadicArgumentToArray
. (fde964e37)logger
on the interface LoggerOptions
was not used and is removed from the interface. (fde964e37)packageVersion
of the OpenAPI generator is removed. (fde964e37)tsConfig
option has been renamed to tsconfig
. (fde964e37)d.ts.map
files per default anymore. If you need them include a custom tsconfig.json
.
[Compatibility Note] All SAP Cloud SDK packages ship without d.ts.map
files from now on.
Modern IDEs don't require those files for code navigation, thus they are removed to decrease download size of the SDK. (fde964e37)OAuth2RefreshToken
authentication type (fde964e37)retry
option in the DestinationFetchOption
.
Enable this options if the token exchange done by the destination service is unstable. (fde964e37)ResilienceOptions
and resilience()
function. The function returns an array of middlewares based on the provided options. (fde964e37)headers
using this reference in the middleware context.
The request configuration contains the url
, headers
and all other properties of the HTTP request. (fde964e37)transpile
and tsconfig
to configure transpilation for generated OData clients. (fde964e37)Protocol
enum with a string literal union type. (fde964e37)IsolationStrategy
enum with union type. (fde964e37)_
prefix (fde964e37)iss
together with OnPremise
basic destinations. (fde964e37)null
. Fixes 3204. (fde964e37)FAQs
SAP Cloud SDK for JavaScript resilience
The npm package @sap-cloud-sdk/resilience receives a total of 21,210 weekly downloads. As such, @sap-cloud-sdk/resilience popularity was classified as popular.
We found that @sap-cloud-sdk/resilience demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.