Releases: SAP/cloud-sdk-js
Releases · SAP/cloud-sdk-js
v3.2.0
New Functionalities
- [connectivity] Enable the use of mTLS certificates for registered destinations on CloudFoundry. (616d77b)
Improvements
- [connectivity] Set the default validity time of the client credentials token cache to 5 minutes instead of never expiring. (782b9e3)
Fixed Issues
- [connectivity, http-client] Forward the user JWT irrespective of the destination authentication type when
forwardAuthToken
is set to true on a destination (56c3f70) - [http-client] Improve CSRF token fetching for large requests. (73ff0ab)
- [odata-common] Remove encoding of keys in the
getEntityKeys()
as it should only happen once ingetResourcePathForKeys()
.Fixes the errorvalue.format is not a function
when executing requests for entities withEdm.Date
type key property. (aa1a4bd) - [resilience] Fix parsing error when the last response in a chain of retries returned undefined.
- @sap-cloud-sdk/[email protected] (234675f)
v3.1.1
Fixed Issues
- [resilience] Fix transpilation on OData generation, where types for 'opossum' could not be found.
- @sap-cloud-sdk/[email protected] (166a16d)
v3.1.0
Compatibility Notes
- [connectivity] The combination of
iss
andjwt
is now supported when fetching destinations. When both properties are set, theiss
property is no longer ignored. (28b7af8)
New Functionalities
- [connectivity] Add support for authentication type
NoAuthentication
on-premise destinations. (039412e) - [connectivity] Allow combination of
iss
anjwt
when fetching a destination. In this case theiss
URL will be used to fetch the destination service token andjwt
will be used for thex-user-token
header of user based authentication types. (28b7af8)
Fixed Issues
- [odata-common] Adjust
FromJsonType
to stricter typings in TypeScript 5. (cc8425a)
v3.0.2
Compatibility Notes
- [odata-common, odata-v2, odata-v4] The
ActionFunctionImportRequestBuilderBase
has an additional mandatory type parameter to pass the according (de-)serializer type. This was missing previously due to a bug. (2fa8c36)
Fixed Issues
- [connectivity] Fix the
The proxy configuration is undefined
error for OnPremMAIL
destinations by removing theisHttpDestination
check when adding proxyConfiguration to the destination object.- @sap-cloud-sdk/[email protected]
- @sap-cloud-sdk/[email protected] (47fc727)
- [mail-client] Fix error
Greeting never received
when sending emails to On-Premise mail servers. The_readableListening
property of socket is set totrue
to allow nodemailer to receive SMTP greeting messages. (47fc727) - [mail-client] Fix
Invalid greeting
error from nodemailer by removing thetransport.verify
function call. (be04daf) - [odata-common, odata-v2, odata-v4] Fix batch requests to accept only functions or actions. (2fa8c36)
v3.0.1
Compatibility Notes
- [resilience] Deprecate erroneously exposed
circuitBreakerHttp()
function in favor ofcircuitBreaker()
.- @sap-cloud-sdk/[email protected] (fcab06c)
Improvements
- [generator-common] Improve logs when generating OData clients without package.json
- @sap-cloud-sdk/[email protected] (c78c16d)
v3.0.0
Compatibility Notes
- [connectivity] The generic types of
JwtKeyMapping
is simplified so the second type argumentJwtKeysT
are always strings. (fde964e) - [connectivity] The
Protocol
enum was replaced with a string literal union type. Now, instead of passingProtocol.HTTPS
pass 'https'. (fde964e) - [connectivity, http-client, openapi, odata-common, odata-v2, resilience] Remove the options
timeout
andenableCircuitBreaker
from all BTP service interactions i.e. destination and token fetching. (fde964e) - [connectivity, http-client, mail-client, openapi, odata-common, odata-v2, odata-v4, eslint-config, generator, test-util, util, openapi-generator, generator-common, temporal-de-serializers, resilience] Switch the compilerOptions.module to
Node16
instead ofCommonJS
for better interoperability with ES modules. See the TypeScript handbook for technical details if needed. (fde964e) - [connectivity] The enum
IsolationStrategy
was replaced with a string literal union type of the same name. Use 'tenant' and 'tenant-user' instead ofIsolationStrategy.Tenant
andIsolationStrategy.Tenant_User
. (fde964e) - [connectivity, http-client, odata-common] ] The
url
property inDestination
is now optional as destinations of typeMAIL
do not have a URL. (fde964e) - [http-client, openapi, odata-common] Remove
timeout()
method from the request builders and thetimeout
options from theexecuteHttpRequest()
function.
Visit the documentation portal to see how to add a timeout using middlewares. (fde964e) - [http-client] Removed overload of executeHttpRequest
The overload, that acceptedHttpRequestConfigWithOrigin
as a parameter, is removed and replaced by the functionexecuteHttpRequestWithOrigin
. (fde964e) - [odata-common, generator, util] By default, generation of OData clients fails if a service path cannot be determined. Either provide
servicePath
value in theoptions-per-service.json
or setskipValidation
to true, in which case,/
will be used. (fde964e) - [odata-common] The constructor of
ODataRequestConfig
was changed so that the third parameter cannot be astring
anymore.
Passing in a string which was then interpreted as the value for theContent-Type
HTTP header was deprecated.
The type of the parameter is nowRecord<string, any>
, and if only want to set theContent-Type
HTTP header you can do so by passing{'content-type': 'some-value'}
to the constructor. (fde964e) - [odata-common] The constructor of the entity API is private to avoid accidental usage. Use the service object to get a API instance. (fde964e)
- [odata-common, generator, openapi-generator] The
serviceMapping
option of the OData generator has been renamed tooptionsPerService
. The mapping file,service-mapping.json
has also been renamed tooptions-per-service.json
. By default, an options file will not be generated. (fde964e) - [odata-common] Setting custom fields in
fromJson
through the_customFields
property has been removed.
Add custom properties to your JSON object instead. (fde964e) - [generator] The options per service behavior is now the same as for the OpenApi generator.
For details on how to migrate and what has change look at the migration guide. (fde964e) - [generator] The deprecated
forceOverwrite
option of the generator is removed. Use theoverwrite
option instead.
[Compatibility Note] The deprecatedgeneratePackageJson
option of the generator is removed. Use thepackageJson
option instead.
[Compatibility Note] The deprecatedwriteReadme
option of the generator is removed. Use thereadme
option instead.
[Compatibility Note] The deprecatedprocessesJsGeneration
option of the generator is removed. Use thetranspilationProcesses
option instead.
[Compatibility Note] The internal optionssdkAfterVersionScript
,s4HanaCloud
andpackageVersion
of the generator are removed.
These were hidden options never meant for external usage and there is no replacement.
[Compatibility Note] The deprecatedgenerateNpmrc
option of the generator is removed. Use theinclude
option to add a.npmrc
to the generated code if needed. (fde964e) - [generator] Add
verbose
generator option. By default, only error and warning logs will be displayed. Ifverbose
is set totrue
, all logs will be displayed. (fde964e) - [generator] The
generateJs
option has been replaced with thetranspile
option. Transpilation is not enabled by default. (fde964e) - [generator] The command line argument
inputDir
of the OData generator is renamed toinput
.
The newinput
options accepts now also file paths and glob patterns. (fde964e) - [generator] The OData generator won't automatically rename identifiers to avoid name conflicts.
The generation process will fail if identifiers have conflicting names.
Switch on theskipValidation
flag if you want to generate despite name conflicts and are okay with changed identifier names to avoid conflicts. (fde964e) - [generator, openapi-generator, generator-common] Removed the option
versionInPackageJson
from the OData and OpenAPI generator.
If the optionpackageJson
is enabled now apackage.json
with a default version1.0.0
is created.
If necessary use theinclude
option to add apackage.json
with a custom value.
[Compatibility Note] Removed the optionlicenseInPackageJson
from the OData and OpenAPI generator.
If the optionpackageJson
is enabled now apackage.json
with a default licenseUNLICENSED
is created.
If necessary use theinclude
option to add apackage.json
with a custom value. (fde964e) - [generator, openapi-generator] Rename servicePath to basePath. (fde964e)
- [generator] The option
generateCSN
is removed. There is no replacement. (fde964e) - [generator] The type for paths in the
GeneratorOptions
is changed fromfs.PathLike
tostring
.
In case you passed a buffer object please resolve it to a string before passing it to the SAP Cloud SDK. (fde964e) - [generator, openapi-generator, generator-common] The two generators use the same CLI parsing code now, aligning the way paths are resolved.
In case you experience problems with the new logic, enable theverbose
flag to investigate the new paths. (fde964e) - [util] The function
variadicArgumentToArray
is replaced by the functiontransformVariadicArgumentToArray
. (fde964e) - [util] The field
logger
on the interfaceLoggerOptions
was not used and is removed from the interface. (fde964e) - [openapi-generator] The internal option
packageVersion
of the OpenAPI generator is removed. (fde964e) - [openapi-generator]
tsConfig
option has been renamed totsconfig
. (fde964e) - [generator-common] The generator does not create
d.ts.map
files per default anymore. If you need them include a customtsconfig.json
.
[Compatibility Note] All SAP Cloud SDK packages ship withoutd.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. (fde964e)
New Functionalities
- [connectivity] Support
OAuth2RefreshToken
authentication type (fde964e) - [connectivity] Add a
retry
option in theDestinationFetchOption
.
Enable this options if the token exchange done by the destination service is unstable. (fde964e) - [connectivity, resilience] Add
ResilienceOptions
andresilience()
function. The function returns an array of middlewares based on the provided options. (fde964e) - [http-client, resilience] The request configuration used in the final request is now part of the middleware context.
User can implement middlewares to change request properties likeheaders
using this reference in the middleware context.
The request configuration contains theurl
,headers
and all other properties of the HTTP request. (fde964e) - [http-client, openapi, odata-common] Introduce the middleware on the request builders and http-client.
Visit the documentation portal to see how to use middlewares. (fde964e) - [generator, generator-common] Introduced options
transpile
andtsconfig
to configure transpilation for generated OData clients. (fde964e)
Improvements
- [connectivity] Replace
Protocol
enum with a string literal union type. (fde964e) - [connectivity] Replace
IsolationStrategy
enum with union type. (fde964e) - [generator] Align naming rules for operations and properties in OData clients by removing
_
prefix (fde964e)
Fixed Issues
- [connectivity] Fix the combination of providing the
iss
together withOnPremise
basic destinations. (fde964e) - [odata-v2] Allow to update OData v2 entities to
null
. Fixes 3204. (fde964e) - [generator] Allow OData service to contain an entity name 'Service'. (fde964e)
- [generator] Now links to the correct generator binary. (fde964e)
v2.15.0
Compatibility Notes
- [connectivity] When making a request to a destination that has a certificate in its defintion, the certificate is only added, if it is needed for the according authentication type. That way,
ClientCertificateAuthentication
will have a certificate in the request, whileOAuth2SAMLBearerAssertion
does not. Previously, the certificate would be added regardless. (5bad86c)
Fixed Issues
- [connectivity] Stop adding certificates when sending requests to a destination, if the authentication type does not require a certificate. (5bad86c)
v2.14.0
v2.13.0
Compatibility Notes
- [generator] The SAP Cloud SDK does not differentiate between function imports and action imports anymore. Therefore the
actionImports
andfunctionImports
exposed in generated services are now deprecated and replaced byoptions
. (aa0cf48) - [openapi-generator] The options
licenseInPackageJson
andversionInPackageJson
are deprecated. If you want to set the license or version in your generatedpackage.json
file, use theinclude
option to add a custompackage.json
instead. (aa0cf48)
Fixed Issues
- [odata-v2] Allow to update OData v2 entities to
null
. Fixes 3204.- @sap-cloud-sdk/[email protected]
- @sap-cloud-sdk/[email protected]
- @sap-cloud-sdk/[email protected]
- @sap-cloud-sdk/[email protected] (83eee1a)
v2.12.1
Improvements
-
[connectivity] Update
jsonwebtoken
to 9.0.0 due to several security vulnerabilities: