@sap-cloud-sdk/connectivity 4.0.3-20250625092620.0 → 4.0.3-20250630081142.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,14 +26,9 @@ function isSubscriberToken(token) {
26
26
  * @internal
27
27
  */
28
28
  async function getSubscriberToken(options) {
29
- const userJwt = await retrieveUserToken(options);
30
- const serviceJwt = await retrieveServiceToken(options, userJwt?.decoded);
31
- return { userJwt, serviceJwt };
32
- }
33
- async function retrieveUserToken(options) {
34
- if (options.jwt) {
35
- return (0, jwt_1.getJwtPair)(options.jwt);
36
- }
29
+ const incomingUserJwtPair = options.jwt ? (0, jwt_1.getJwtPair)(options.jwt) : undefined;
30
+ const serviceJwt = await retrieveServiceToken(options, incomingUserJwtPair?.decoded);
31
+ return { userJwt: incomingUserJwtPair, serviceJwt };
37
32
  }
38
33
  async function retrieveServiceToken(options, decodedUserJwt) {
39
34
  const jwt = getJwtForServiceToken(options.iss, decodedUserJwt);
@@ -1 +1 @@
1
- {"version":3,"file":"get-subscriber-token.js","sourceRoot":"","sources":["../../../src/scp-cf/destination/get-subscriber-token.ts"],"names":[],"mappings":";;AAsCA,8CAEC;AAKD,gDAOC;AAmDD,gEAiBC;AAmBD,8BAEC;AAWD,0CAEC;AAWD,sCAEC;AAvKD,8CAAmD;AACnD,gCAAoC;AACpC,sDAAiD;AACjD,8DAA2D;AAK3D,MAAM,MAAM,GAAG,IAAA,mBAAY,EAAC;IAC1B,OAAO,EAAE,cAAc;IACvB,cAAc,EAAE,8BAA8B;CAC/C,CAAC,CAAC;AAsBH;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,KAAU;IAC1C,OAAO,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC;AAC3C,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,kBAAkB,CACtC,OAA2B;IAE3B,MAAM,OAAO,GAAG,MAAM,iBAAiB,CAAC,OAAO,CAAC,CAAC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EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;QAEtC,MAAM,aAAa,GAAG;YACpB,OAAO,EAAE,OAAO,IAAI,UAAU;YAC9B,UAAU,EAAE,UAAU,IAAI,OAAO;SAClC,CAAC;QAEF,IAAI,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YAC9B,OAAO,aAAa,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;AAC/E,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CACjB,KAAkC;IAElC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,KAAkC;IAC1D,OAAO,CAAC,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC;AACjD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,KAAgC;IAC9D,OAAO,KAAK,CAAC,UAAU,CAAC;AAC1B,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,KAAgC;IAC5D,OAAO,KAAK,CAAC,OAAO,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"get-subscriber-token.js","sourceRoot":"","sources":["../../../src/scp-cf/destination/get-subscriber-token.ts"],"names":[],"mappings":";;AAsCA,8CAEC;AAKD,gDAUC;AA2CD,gEAiBC;AAmBD,8BAEC;AAWD,0CAEC;AAWD,sCAEC;AAlKD,8CAAmD;AACnD,gCAAoC;AACpC,sDAAiD;AACjD,8DAA2D;AAK3D,MAAM,MAAM,GAAG,IAAA,mBAAY,EAAC;IAC1B,OAAO,EAAE,cAAc;IACvB,cAAc,EAAE,8BAA8B;CAC/C,CAAC,CAAC;AAsBH;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,KAAU;IAC1C,OAAO,KAAK,CAAC,OAAO,IAAI,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0BAA0B,CACxC,KAAkC;IAElC,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;QAEtC,MAAM,aAAa,GAAG;YACpB,OAAO,EAAE,OAAO,IAAI,UAAU;YAC9B,UAAU,EAAE,UAAU,IAAI,OAAO;SAClC,CAAC;QAEF,IAAI,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;YAC9B,OAAO,aAAa,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;AAC/E,CAAC;AAED;;;;GAIG;AACH,SAAS,UAAU,CACjB,KAAkC;IAElC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAChD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,SAAS,CAAC,KAAkC;IAC1D,OAAO,CAAC,CAAC,KAAK,EAAE,OAAO,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,CAAC;AACjD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAAC,KAAgC;IAC9D,OAAO,KAAK,CAAC,UAAU,CAAC;AAC1B,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,aAAa,CAAC,KAAgC;IAC5D,OAAO,KAAK,CAAC,OAAO,CAAC;AACvB,CAAC"}
@@ -1,14 +1,4 @@
1
- import type { JwtPayload } from '../jsonwebtoken-type';
2
- import type { ServiceCredentials, XsuaaServiceCredentials } from './environment-accessor-types';
3
- /**
4
- * @internal
5
- * Takes a decoded JWT and uses the client_id and audience claims to determine the XSUAA service instance
6
- * that issued the JWT. Returns the credentials if a match is found, otherwise throws an error.
7
- * If no decoded JWT is specified, then returns the first existing XSUAA credential service plan "application".
8
- * @param token - Either an encoded or decoded JWT.
9
- * @returns The credentials for a match, otherwise `null`.
10
- */
11
- export declare function getXsuaaServiceCredentials(token?: JwtPayload | string): XsuaaServiceCredentials;
1
+ import type { ServiceCredentials } from './environment-accessor-types';
12
2
  /**
13
3
  * @internal
14
4
  * Clears the cache of XSUAA services.
@@ -17,11 +7,8 @@ export declare function getXsuaaServiceCredentials(token?: JwtPayload | string):
17
7
  export declare function clearXsuaaServices(): void;
18
8
  /**
19
9
  * @internal
20
- * @param options.disableCache - Value to enable or disable JWKS cache in xssec library. Defaults to false.
21
- * @param options.credentials - Xsuaa service credentials. Required to create the XSUAA instance.
22
- * @returns An instance of the xsuaa service for the provided credentials.
10
+ * @param credentials - Xsuaa credentials extracted from a re-use service like destination service. Required to create the xssec XSUAA instance.
11
+ * @param disableCache - Value to enable or disable JWKS cache in xssec library. Defaults to false.
12
+ * @returns An instance of {@code @sap/xssec/XsuaaService} for the provided credentials.
23
13
  */
24
- export declare function getXsuaaInstanceFromSuppliedCredentials(options: {
25
- disableCache?: boolean;
26
- credentials: ServiceCredentials;
27
- }): any;
14
+ export declare function getXsuaaInstanceFromServiceCredentials(credentials: ServiceCredentials, disableCache?: boolean): any;
@@ -1,27 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getXsuaaServiceCredentials = getXsuaaServiceCredentials;
4
3
  exports.clearXsuaaServices = clearXsuaaServices;
5
- exports.getXsuaaInstanceFromSuppliedCredentials = getXsuaaInstanceFromSuppliedCredentials;
4
+ exports.getXsuaaInstanceFromServiceCredentials = getXsuaaInstanceFromServiceCredentials;
6
5
  const xssec_1 = require("@sap/xssec");
7
- const service_credentials_1 = require("./service-credentials");
8
- /**
9
- * @internal
10
- * Takes a decoded JWT and uses the client_id and audience claims to determine the XSUAA service instance
11
- * that issued the JWT. Returns the credentials if a match is found, otherwise throws an error.
12
- * If no decoded JWT is specified, then returns the first existing XSUAA credential service plan "application".
13
- * @param token - Either an encoded or decoded JWT.
14
- * @returns The credentials for a match, otherwise `null`.
15
- */
16
- function getXsuaaServiceCredentials(token) {
17
- const credentials = (0, service_credentials_1.getServiceCredentials)('xsuaa', token);
18
- if (!credentials) {
19
- throw new Error(token
20
- ? 'Could not find XSUAA service binding matching the token.'
21
- : 'Could not find XSUAA service binding.');
22
- }
23
- return credentials;
24
- }
25
6
  const xsuaaServices = {};
26
7
  /**
27
8
  * @internal
@@ -33,13 +14,11 @@ function clearXsuaaServices() {
33
14
  }
34
15
  /**
35
16
  * @internal
36
- * @param options.disableCache - Value to enable or disable JWKS cache in xssec library. Defaults to false.
37
- * @param options.credentials - Xsuaa service credentials. Required to create the XSUAA instance.
38
- * @returns An instance of the xsuaa service for the provided credentials.
17
+ * @param credentials - Xsuaa credentials extracted from a re-use service like destination service. Required to create the xssec XSUAA instance.
18
+ * @param disableCache - Value to enable or disable JWKS cache in xssec library. Defaults to false.
19
+ * @returns An instance of {@code @sap/xssec/XsuaaService} for the provided credentials.
39
20
  */
40
- function getXsuaaInstanceFromSuppliedCredentials(options) {
41
- const { credentials } = options;
42
- const disableCache = !!options?.disableCache;
21
+ function getXsuaaInstanceFromServiceCredentials(credentials, disableCache = false) {
43
22
  const serviceConfig = disableCache
44
23
  ? {
45
24
  validation: {
@@ -52,6 +31,8 @@ function getXsuaaInstanceFromSuppliedCredentials(options) {
52
31
  : undefined;
53
32
  const cacheKey = `${credentials.clientid}:${disableCache}`;
54
33
  if (!xsuaaServices[cacheKey]) {
34
+ // XsuaaService is a class that extends Service from @sap/xssec and is a representation of XSUAA credentials
35
+ // extracted from a reuse service like for e.g destination service
55
36
  xsuaaServices[cacheKey] = new xssec_1.XsuaaService(credentials, serviceConfig);
56
37
  }
57
38
  return xsuaaServices[cacheKey];
@@ -1 +1 @@
1
- {"version":3,"file":"xsuaa.js","sourceRoot":"","sources":["../../../src/scp-cf/environment-accessor/xsuaa.ts"],"names":[],"mappings":";;AAgBA,gEAeC;AASD,gDAEC;AAQD,0FA2BC;AA7ED,sCAA0C;AAC1C,+DAA8D;AAO9D;;;;;;;GAOG;AACH,SAAgB,0BAA0B,CACxC,KAA2B;IAE3B,MAAM,WAAW,G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C,EAAE,CAAC;AAEvD;;;;GAIG;AACH,SAAgB,kBAAkB;IAChC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;AACvE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,sCAAsC,CACpD,WAA+B,EAC/B,eAAwB,KAAK;IAE7B,MAAM,aAAa,GAAG,YAAY;QAChC,CAAC,CAAC;YACE,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,cAAc,EAAE,CAAC;oBACjB,aAAa,EAAE,CAAC;iBACjB;aACF;SACF;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,MAAM,QAAQ,GAAG,GAAG,WAAW,CAAC,QAAQ,IAAI,YAAY,EAAE,CAAC;IAE3D,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,4GAA4G;QAC5G,kEAAkE;QAClE,aAAa,CAAC,QAAQ,CAAC,GAAG,IAAI,oBAAY,CACxC,WAAsC,EACtC,aAAoB,CACrB,CAAC;IACJ,CAAC;IACD,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC"}
@@ -1,18 +1,11 @@
1
- import type { JwtPayload } from '../jsonwebtoken-type';
2
- /**
3
- * Verifies the given JWT and returns the decoded payload.
4
- * @param jwt - JWT to be verified
5
- * @param options - Options to control certain aspects of JWT verification behavior.
6
- * @returns A Promise to the decoded and verified JWT.
7
- * @internal
8
- */
9
- export declare function verifyJwt(jwt: string, options?: VerifyJwtOptions): Promise<JwtPayload>;
10
1
  /**
11
2
  * Options to control certain aspects of JWT verification behavior.
3
+ * @deprecated This property is no longer used as the incoming JWT is not verified during destination retrieval.
12
4
  */
13
5
  export interface VerifyJwtOptions {
14
6
  /**
15
7
  * The verification keys are cached if set to true.
8
+ * @deprecated This property is no longer used as the incoming JWT is not verified during destination retrieval.
16
9
  */
17
10
  cacheVerificationKeys?: boolean;
18
11
  }
@@ -1,32 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.verifyJwt = verifyJwt;
4
- const xssec_1 = require("@sap/xssec");
5
- const util_1 = require("@sap-cloud-sdk/util");
6
- const environment_accessor_1 = require("../environment-accessor");
7
- /**
8
- * Verifies the given JWT and returns the decoded payload.
9
- * @param jwt - JWT to be verified
10
- * @param options - Options to control certain aspects of JWT verification behavior.
11
- * @returns A Promise to the decoded and verified JWT.
12
- * @internal
13
- */
14
- async function verifyJwt(jwt, options) {
15
- const disableCache = !{ ...defaultVerifyJwtOptions, ...options }
16
- .cacheVerificationKeys;
17
- const xsuaaServiceCredentials = (0, environment_accessor_1.getXsuaaServiceCredentials)(jwt);
18
- const xsuaaService = (0, environment_accessor_1.getXsuaaInstanceFromSuppliedCredentials)({
19
- disableCache,
20
- credentials: xsuaaServiceCredentials
21
- });
22
- const { token } = await (0, xssec_1.createSecurityContext)(xsuaaService, {
23
- jwt
24
- }).catch(e => {
25
- throw new util_1.ErrorWithCause('Failed to verify JWT.', e);
26
- });
27
- return token.payload;
28
- }
29
- const defaultVerifyJwtOptions = {
30
- cacheVerificationKeys: true
31
- };
32
3
  //# sourceMappingURL=verify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../src/scp-cf/jwt/verify.ts"],"names":[],"mappings":";;AAeA,8BAoBC;AAnCD,sCAAmD;AACnD,8CAAqD;AACrD,kEAGiC;AAGjC;;;;;;GAMG;AACI,KAAK,UAAU,SAAS,CAC7B,GAAW,EACX,OAA0B;IAE1B,MAAM,YAAY,GAAG,CAAC,EAAE,GAAG,uBAAuB,EAAE,GAAG,OAAO,EAAE;SAC7D,qBAAqB,CAAC;IAEzB,MAAM,uBAAuB,GAAG,IAAA,iDAA0B,EAAC,GAAG,CAAC,CAAC;IAChE,MAAM,YAAY,GAAG,IAAA,8DAAuC,EAAC;QAC3D,YAAY;QACZ,WAAW,EAAE,uBAAuB;KACrC,CAAC,CAAC;IAEH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAA,6BAAqB,EAAC,YAAY,EAAE;QAC1D,GAAG;KACJ,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACX,MAAM,IAAI,qBAAc,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,OAAO,CAAC;AACvB,CAAC;AAYD,MAAM,uBAAuB,GAAqB;IAChD,qBAAqB,EAAE,IAAI;CAC5B,CAAC"}
1
+ {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../../src/scp-cf/jwt/verify.ts"],"names":[],"mappings":""}
@@ -2,14 +2,14 @@ import type { JwtPayload } from './jsonwebtoken-type';
2
2
  import type { Service } from './environment-accessor';
3
3
  import type { ClientCredentialsResponse } from './xsuaa-service-types';
4
4
  /**
5
- * Make a client credentials request against the XSUAA service.
5
+ * Make a client credentials request against the XSUAA credentials inside {@param service}.
6
6
  * @param service - Service as it is defined in the environment variable.
7
7
  * @param jwt - User JWT or object containing the `iss` property.
8
8
  * @returns Client credentials token.
9
9
  */
10
10
  export declare function getClientCredentialsToken(service: string | Service, jwt?: string | JwtPayload): Promise<ClientCredentialsResponse>;
11
11
  /**
12
- * Make a user token request against the XSUAA service.
12
+ * Make a user token request against the XSUAA credentials inside {@param service}.
13
13
  * @param service - Service as it is defined in the environment variable.
14
14
  * @param userJwt - User JWT.
15
15
  * @returns User token.
@@ -7,7 +7,7 @@ const resilience_1 = require("@sap-cloud-sdk/resilience");
7
7
  const environment_accessor_1 = require("./environment-accessor");
8
8
  const jwt_1 = require("./jwt");
9
9
  /**
10
- * Make a client credentials request against the XSUAA service.
10
+ * Make a client credentials request against the XSUAA credentials inside {@param service}.
11
11
  * @param service - Service as it is defined in the environment variable.
12
12
  * @param jwt - User JWT or object containing the `iss` property.
13
13
  * @returns Client credentials token.
@@ -20,9 +20,7 @@ async function getClientCredentialsToken(service, jwt) {
20
20
  serviceCredentials: (0, environment_accessor_1.resolveServiceBinding)(service).credentials
21
21
  };
22
22
  const xssecPromise = function (arg) {
23
- const xsuaaService = (0, environment_accessor_1.getXsuaaInstanceFromSuppliedCredentials)({
24
- credentials: arg.serviceCredentials
25
- });
23
+ const xsuaaService = (0, environment_accessor_1.getXsuaaInstanceFromServiceCredentials)(arg.serviceCredentials);
26
24
  return xsuaaService.fetchClientCredentialsToken({
27
25
  // tenant is the subdomain, not tenant ID
28
26
  tenant: arg.zoneId ? undefined : arg.subdomain,
@@ -41,7 +39,7 @@ async function getClientCredentialsToken(service, jwt) {
41
39
  });
42
40
  }
43
41
  /**
44
- * Make a user token request against the XSUAA service.
42
+ * Make a user token request against the XSUAA credentials inside {@param service}.
45
43
  * @param service - Service as it is defined in the environment variable.
46
44
  * @param userJwt - User JWT.
47
45
  * @returns User token.
@@ -55,9 +53,7 @@ function getUserToken(service, userJwt) {
55
53
  userJwt
56
54
  };
57
55
  const xssecPromise = function (arg) {
58
- const xsuaaService = (0, environment_accessor_1.getXsuaaInstanceFromSuppliedCredentials)({
59
- credentials: arg.serviceCredentials
60
- });
56
+ const xsuaaService = (0, environment_accessor_1.getXsuaaInstanceFromServiceCredentials)(arg.serviceCredentials);
61
57
  return xsuaaService
62
58
  .fetchJwtBearerToken(arg.userJwt, {
63
59
  // tenant is the subdomain, not tenant ID
@@ -1 +1 @@
1
- {"version":3,"file":"xsuaa-service.js","sourceRoot":"","sources":["../../src/scp-cf/xsuaa-service.ts"],"names":[],"mappings":";;AAyBA,8DAyCC;AAQD,oCAyCC;AAnHD,iEAA2E;AAC3E,0DAAuD;AACvD,iEAGgC;AAChC,+BAA6D;AAa7D;;;;;GAKG;AACI,KAAK,UAAU,yBAAyB,CAC7C,OAAyB,EACzB,GAAyB;IAEzB,MAAM,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,IAAA,eAAS,EAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,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AAE,IAAA,kBAAY,EAAC,cAAc,CAAC;QACvC,MAAM,EAAE,IAAA,iBAAW,EAAC,cAAc,CAAC;QACnC,kBAAkB,EAAE,OAAO,CAAC,WAAW;QACvC,OAAO;KACR,CAAC;IAEF,MAAM,YAAY,GAAG,UAAU,GAAoB;QACjD,MAAM,YAAY,GAAG,IAAA,6DAAsC,EACzD,GAAG,CAAC,kBAAkB,CACvB,CAAC;QACF,OAAO,YAAY;aAChB,mBAAmB,CAAC,GAAG,CAAC,OAAO,EAAE;YAChC,yCAAyC;YACzC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS;YAC9C,GAAG,EAAE,GAAG,CAAC,MAAM;SAChB,CAAC;aACD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACvC,CAAC,CAAC;IAEF,OAAO,IAAA,gCAAqB,EAI1B,IAAA,uBAAU,GAAE,EAAE;QACd,EAAE,EAAE,YAAY;QAChB,UAAU;QACV,OAAO,EAAE;YACP,GAAG,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG;YAC5B,QAAQ,EAAE,UAAU,CAAC,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,QAAQ;SAC5D;KACF,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QACb,MAAM,IAAI,KAAK,CACb,wDAAwD,OAAO,CAAC,KAAK,KAAK,GAAG,CAAC,OAAO,EAAE,CACxF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-cloud-sdk/connectivity",
3
- "version": "4.0.3-20250625092620.0",
3
+ "version": "4.0.3-20250630081142.0",
4
4
  "description": "SAP Cloud SDK for JavaScript connectivity",
5
5
  "homepage": "https://sap.github.io/cloud-sdk/docs/js/overview",
6
6
  "license": "Apache-2.0",
@@ -36,8 +36,8 @@
36
36
  "readme": "ts-node ../../scripts/replace-common-readme.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@sap-cloud-sdk/resilience": "^4.0.3-20250625092620.0",
40
- "@sap-cloud-sdk/util": "^4.0.3-20250625092620.0",
39
+ "@sap-cloud-sdk/resilience": "^4.0.3-20250630081142.0",
40
+ "@sap-cloud-sdk/util": "^4.0.3-20250630081142.0",
41
41
  "@sap/xsenv": "^5.6.1",
42
42
  "@sap/xssec": "^4.8.0",
43
43
  "async-retry": "^1.3.3",