@sap-cloud-sdk/connectivity 2.7.2-20220826064801.0 → 2.7.2-20220830092011.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.
- package/CHANGELOG.md +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/scp-cf/destination/destination-from-vcap.d.ts +3 -26
- package/dist/scp-cf/destination/destination-from-vcap.d.ts.map +1 -1
- package/dist/scp-cf/destination/destination-from-vcap.js +8 -46
- package/dist/scp-cf/destination/destination-from-vcap.js.map +1 -1
- package/dist/scp-cf/destination/service-binding-to-destination.d.ts.map +1 -1
- package/dist/scp-cf/destination/service-binding-to-destination.js +24 -52
- package/dist/scp-cf/destination/service-binding-to-destination.js.map +1 -1
- package/dist/scp-cf/environment-accessor.d.ts +5 -15
- package/dist/scp-cf/environment-accessor.d.ts.map +1 -1
- package/dist/scp-cf/environment-accessor.js +16 -41
- package/dist/scp-cf/environment-accessor.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @sap-cloud-sdk/connectivity
|
|
2
2
|
|
|
3
|
-
## 2.7.2-
|
|
3
|
+
## 2.7.2-20220830092011.0
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Canary release
|
|
8
8
|
- Updated dependencies
|
|
9
|
-
- @sap-cloud-sdk/util@2.7.2-
|
|
9
|
+
- @sap-cloud-sdk/util@2.7.2-20220830092011.0
|
|
10
10
|
|
|
11
11
|
## 2.7.1
|
|
12
12
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @packageDocumentation
|
|
4
4
|
* @module @sap-cloud-sdk/connectivity
|
|
5
5
|
*/
|
|
6
|
-
export { parseDestination, toDestinationNameUrl, sanitizeDestination, DestinationCacheInterface, CacheEntry, CachingOptions, getDestination, useOrFetchDestination, getDestinationFromDestinationService, alwaysProvider, alwaysSubscriber, subscriberFirst, parseProxyEnv, Protocol, IsolationStrategy, decodeJwt, retrieveJwt, jwtBearerToken, serviceToken, Destination, DestinationFetchOptions, ServiceBindingTransformFunction, DestinationAccessorOptions, DestinationSelectionStrategies, JwtPayload, ProxyConfiguration, ProxyConfigurationHeaders, ResilienceOptions, Service, VerifyJwtOptions, buildHeadersForDestination, getClientCredentialsToken, getUserToken, registerDestination, setDestinationCache, DestinationAuthToken, DestinationCertificate, ClientCredentialsResponse, AllDestinations, DestinationConfiguration, DestinationJson, DestinationsByType,
|
|
6
|
+
export { parseDestination, toDestinationNameUrl, sanitizeDestination, DestinationCacheInterface, CacheEntry, CachingOptions, getDestination, useOrFetchDestination, getDestinationFromDestinationService, alwaysProvider, alwaysSubscriber, subscriberFirst, parseProxyEnv, Protocol, IsolationStrategy, decodeJwt, retrieveJwt, jwtBearerToken, serviceToken, Destination, DestinationFetchOptions, ServiceBindingTransformFunction, DestinationAccessorOptions, DestinationSelectionStrategies, JwtPayload, ProxyConfiguration, ProxyConfigurationHeaders, ResilienceOptions, Service, VerifyJwtOptions, buildHeadersForDestination, getClientCredentialsToken, getUserToken, registerDestination, setDestinationCache, DestinationAuthToken, DestinationCertificate, ClientCredentialsResponse, AllDestinations, DestinationConfiguration, DestinationJson, DestinationsByType, DestinationForServiceBindingOptions, destinationForServiceBinding, PartialDestinationFetchOptions } from './scp-cf';
|
|
7
7
|
export type { DestinationRetrievalOptions, DestinationSelectionStrategy, DestinationOrFetchOptions, DestinationOptions, ServiceCredentials, XsuaaServiceCredentials, DestinationProxyType, AuthenticationType, DestinationWithName, RegisterDestinationOptions } from './scp-cf';
|
|
8
8
|
export { getAgentConfig, HttpAgentConfig, HttpsAgentConfig } from './http-agent';
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,UAAU,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,oCAAoC,EACpC,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,UAAU,EACV,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,OAAO,EACP,gBAAgB,EAChB,0BAA0B,EAC1B,yBAAyB,EACzB,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,yBAAyB,EACzB,UAAU,EACV,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,oCAAoC,EACpC,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,uBAAuB,EACvB,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,UAAU,EACV,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,OAAO,EACP,gBAAgB,EAChB,0BAA0B,EAC1B,yBAAyB,EACzB,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,kBAAkB,EAClB,mCAAmC,EACnC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,UAAU,CAAC;AAElB,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,0BAA0B,EAC3B,MAAM,UAAU,CAAC;AAElB,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,EACjB,MAAM,cAAc,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,mCA8CkB;AA7ChB,0GAAA,gBAAgB,OAAA;AAChB,8GAAA,oBAAoB,OAAA;AACpB,6GAAA,mBAAmB,OAAA;AAInB,wGAAA,cAAc,OAAA;AACd,+GAAA,qBAAqB,OAAA;AACrB,8HAAA,oCAAoC,OAAA;AACpC,wGAAA,cAAc,OAAA;AACd,0GAAA,gBAAgB,OAAA;AAChB,yGAAA,eAAe,OAAA;AACf,uGAAA,aAAa,OAAA;AACb,kGAAA,QAAQ,OAAA;AACR,2GAAA,iBAAiB,OAAA;AACjB,mGAAA,SAAS,OAAA;AACT,qGAAA,WAAW,OAAA;AACX,wGAAA,cAAc,OAAA;AACd,sGAAA,YAAY,OAAA;AAKZ,wHAAA,8BAA8B,OAAA;AAO9B,oHAAA,0BAA0B,OAAA;AAC1B,mHAAA,yBAAyB,OAAA;AACzB,sGAAA,YAAY,OAAA;AACZ,6GAAA,mBAAmB,OAAA;AACnB,6GAAA,mBAAmB,OAAA;AASnB,sHAAA,4BAA4B,OAAA;AAiB9B,2CAIsB;AAHpB,4GAAA,cAAc,OAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JwtPayload } from '../jsonwebtoken-type';
|
|
2
|
+
import { Service } from '../environment-accessor-types';
|
|
2
3
|
import { Destination } from './destination-service-types';
|
|
3
4
|
import type { DestinationFetchOptions } from './destination-accessor-types';
|
|
4
5
|
/**
|
|
@@ -22,38 +23,14 @@ export declare function destinationForServiceBinding(serviceInstanceName: string
|
|
|
22
23
|
*/
|
|
23
24
|
export interface DestinationForServiceBindingOptions {
|
|
24
25
|
/**
|
|
25
|
-
* Custom transformation function to control how a {@link Destination} is built from the given {@link
|
|
26
|
+
* Custom transformation function to control how a {@link Destination} is built from the given {@link Service}.
|
|
26
27
|
*/
|
|
27
28
|
serviceBindingTransformFn?: ServiceBindingTransformFunction;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* Type of the function to transform the service binding.
|
|
31
32
|
*/
|
|
32
|
-
export declare type ServiceBindingTransformFunction = (
|
|
33
|
-
/**
|
|
34
|
-
* Represents the JSON object for a given service binding as obtained from the VCAP_SERVICE environment variable.
|
|
35
|
-
* To see service bindings, run `cf env <app-name>` in the terminal. This will produce output like this:
|
|
36
|
-
* ```
|
|
37
|
-
* {
|
|
38
|
-
* ...
|
|
39
|
-
* "VCAP_SERVICES": {
|
|
40
|
-
* "s4-hana-cloud": [
|
|
41
|
-
* {
|
|
42
|
-
* "name": "...",
|
|
43
|
-
* "type": "...".
|
|
44
|
-
* ...
|
|
45
|
-
* }
|
|
46
|
-
* ]
|
|
47
|
-
* }
|
|
48
|
-
* }
|
|
49
|
-
* ```
|
|
50
|
-
* In this example, the key "s4-hana-cloud" refers to an array of service bindings.
|
|
51
|
-
*/
|
|
52
|
-
export interface ServiceBinding {
|
|
53
|
-
[key: string]: any;
|
|
54
|
-
name: string;
|
|
55
|
-
type: string;
|
|
56
|
-
}
|
|
33
|
+
export declare type ServiceBindingTransformFunction = (service: Service, options?: PartialDestinationFetchOptions) => Promise<Destination>;
|
|
57
34
|
/**
|
|
58
35
|
* @internal
|
|
59
36
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destination-from-vcap.d.ts","sourceRoot":"","sources":["../../../src/scp-cf/destination/destination-from-vcap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"destination-from-vcap.d.ts","sourceRoot":"","sources":["../../../src/scp-cf/destination/destination-from-vcap.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAOxD,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAU5E;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,UAAU,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAsB,4BAA4B,CAChD,mBAAmB,EAAE,MAAM,EAC3B,OAAO,GAAE,mCAAmC,GAC1C,8BAAmC,GACpC,OAAO,CAAC,WAAW,CAAC,CAkCtB;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD;;OAEG;IACH,yBAAyB,CAAC,EAAE,+BAA+B,CAAC;CAC7D;AAED;;GAEG;AACH,oBAAY,+BAA+B,GAAG,CAC5C,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,8BAA8B,KACrC,OAAO,CAAC,WAAW,CAAC,CAAC;AAkB1B;;GAEG;AACH,wBAAsB,kCAAkC,CAAC,EACvD,GAAG,EACH,GAAG,EACH,yBAAyB,EACzB,eAAe,EACf,QAAQ,EACT,EAAE,uBAAuB,GACxB,mCAAmC,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAmBlE"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.searchServiceBindingForDestination = exports.destinationForServiceBinding = void 0;
|
|
4
4
|
const util_1 = require("@sap-cloud-sdk/util");
|
|
5
|
-
const environment_accessor_1 = require("../environment-accessor");
|
|
6
5
|
const jwt_1 = require("../jwt");
|
|
6
|
+
const environment_accessor_1 = require("../environment-accessor");
|
|
7
7
|
const http_proxy_util_1 = require("./http-proxy-util");
|
|
8
8
|
const destination_cache_1 = require("./destination-cache");
|
|
9
9
|
const destination_from_registration_1 = require("./destination-from-registration");
|
|
@@ -27,8 +27,7 @@ async function destinationForServiceBinding(serviceInstanceName, options = {}) {
|
|
|
27
27
|
return fromCache;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
const
|
|
31
|
-
const selected = findServiceByName(serviceBindings, serviceInstanceName);
|
|
30
|
+
const selected = (0, environment_accessor_1.getServiceByInstanceName)(serviceInstanceName);
|
|
32
31
|
const destination = options.serviceBindingTransformFn
|
|
33
32
|
? await options.serviceBindingTransformFn(selected, options)
|
|
34
33
|
: await transform(selected, options);
|
|
@@ -44,53 +43,16 @@ async function destinationForServiceBinding(serviceInstanceName, options = {}) {
|
|
|
44
43
|
return destWithProxy;
|
|
45
44
|
}
|
|
46
45
|
exports.destinationForServiceBinding = destinationForServiceBinding;
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
throw noVcapServicesError();
|
|
51
|
-
}
|
|
52
|
-
return transformServiceBindings(vcapServices);
|
|
53
|
-
}
|
|
54
|
-
const transformServiceBindings = (vcapService) => {
|
|
55
|
-
const serviceTypes = inlineServiceTypes(vcapService);
|
|
56
|
-
const flattened = flattenServiceBindings(serviceTypes);
|
|
57
|
-
return flattened;
|
|
58
|
-
};
|
|
59
|
-
function flattenServiceBindings(vcapServices) {
|
|
60
|
-
return (0, util_1.flatten)(Object.values(vcapServices));
|
|
61
|
-
}
|
|
62
|
-
function inlineServiceTypes(vcapServices) {
|
|
63
|
-
return Object.entries(vcapServices).reduce((vcap, [serviceType, bindings]) => ({
|
|
64
|
-
...vcap,
|
|
65
|
-
[serviceType]: bindings.map(b => ({ ...b, type: serviceType }))
|
|
66
|
-
}), {});
|
|
67
|
-
}
|
|
68
|
-
function findServiceByName(serviceBindings, serviceInstanceName) {
|
|
69
|
-
const found = serviceBindings.find(s => s.name === serviceInstanceName);
|
|
70
|
-
if (!found) {
|
|
71
|
-
throw noServiceBindingFoundError(serviceBindings, serviceInstanceName);
|
|
72
|
-
}
|
|
73
|
-
return found;
|
|
74
|
-
}
|
|
75
|
-
async function transform(serviceBinding, options) {
|
|
76
|
-
if (!service_binding_to_destination_1.serviceToDestinationTransformers[serviceBinding.type]) {
|
|
77
|
-
throw serviceTypeNotSupportedError(serviceBinding.type);
|
|
46
|
+
async function transform(service, options) {
|
|
47
|
+
if (!service_binding_to_destination_1.serviceToDestinationTransformers[service.label]) {
|
|
48
|
+
throw serviceTypeNotSupportedError(service);
|
|
78
49
|
}
|
|
79
|
-
return service_binding_to_destination_1.serviceToDestinationTransformers[
|
|
50
|
+
return service_binding_to_destination_1.serviceToDestinationTransformers[service.label](service, options);
|
|
80
51
|
}
|
|
81
|
-
function
|
|
82
|
-
return Error(
|
|
83
|
-
}
|
|
84
|
-
function serviceTypeNotSupportedError(serviceType) {
|
|
85
|
-
return Error(`Service of type ${serviceType} is not supported! Consider providing your own transformation function when calling destinationForServiceBinding, like this:
|
|
52
|
+
function serviceTypeNotSupportedError(service) {
|
|
53
|
+
return Error(`The service "${service.name}" is of type "${service.label}" which is not supported! Consider providing your own transformation function when calling destinationForServiceBinding, like this:
|
|
86
54
|
destinationServiceForBinding(yourServiceName, { serviceBindingToDestination: yourTransformationFunction });`);
|
|
87
55
|
}
|
|
88
|
-
function noServiceBindingFoundError(serviceBindings, serviceInstanceName) {
|
|
89
|
-
return Error(`Unable to find a service binding for given name "${serviceInstanceName}"! Found the following bindings: ${serviceBindings
|
|
90
|
-
.map(s => s.name)
|
|
91
|
-
.join(', ')}.
|
|
92
|
-
`);
|
|
93
|
-
}
|
|
94
56
|
/**
|
|
95
57
|
* @internal
|
|
96
58
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destination-from-vcap.js","sourceRoot":"","sources":["../../../src/scp-cf/destination/destination-from-vcap.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"destination-from-vcap.js","sourceRoot":"","sources":["../../../src/scp-cf/destination/destination-from-vcap.ts"],"names":[],"mappings":";;;AAAA,8CAAmD;AAEnD,gCAAmC;AAEnC,kEAAmE;AACnE,uDAI2B;AAG3B,2DAA0E;AAC1E,mFAAkE;AAClE,qFAAoF;AAEpF,MAAM,MAAM,GAAG,IAAA,mBAAY,EAAC;IAC1B,OAAO,EAAE,cAAc;IACvB,cAAc,EAAE,2BAA2B;CAC5C,CAAC,CAAC;AAUH;;;;;;;GAOG;AACI,KAAK,UAAU,4BAA4B,CAChD,mBAA2B,EAC3B,UACmC,EAAE;IAErC,IAAI,OAAO,CAAC,QAAQ,EAAE;QACpB,MAAM,SAAS,GAAG,MAAM,oCAAgB,CAAC,4BAA4B,CACnE,OAAO,CAAC,GAAG,IAAI,IAAA,+CAAe,GAAE,CAAC,YAAY,EAC7C,mBAAmB,EACnB,qCAAiB,CAAC,MAAM,CACzB,CAAC;QACF,IAAI,SAAS,EAAE;YACb,OAAO,SAAS,CAAC;SAClB;KACF;IAED,MAAM,QAAQ,GAAG,IAAA,+CAAwB,EAAC,mBAAmB,CAAE,CAAC;IAChE,MAAM,WAAW,GAAG,OAAO,CAAC,yBAAyB;QACnD,CAAC,CAAC,MAAM,OAAO,CAAC,yBAAyB,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC5D,CAAC,CAAC,MAAM,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAEvC,MAAM,aAAa,GACjB,WAAW;QACX,CAAC,IAAA,+BAAa,EAAC,WAAW,CAAC,KAAK,+BAAa,CAAC,cAAc;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,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,MAAM,WAAW,GAAG,MAAM,4BAA4B,CAAC,eAAe,EAAE;YACtE,yBAAyB;YACzB,GAAG,EAAE,cAAc;YACnB,GAAG,yBAAyB;SAC7B,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;QACxE,OAAO,WAAW,CAAC;KACpB;IAAC,OAAO,KAAK,EAAE;QACd,MAAM,CAAC,KAAK,CACV,oJAAoJ,KAAK,CAAC,OAAO,EAAE,CACpK,CAAC;KACH;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AA1BD,gFA0BC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-binding-to-destination.d.ts","sourceRoot":"","sources":["../../../src/scp-cf/destination/service-binding-to-destination.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"service-binding-to-destination.d.ts","sourceRoot":"","sources":["../../../src/scp-cf/destination/service-binding-to-destination.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,+BAA+B,EAChC,MAAM,yBAAyB,CAAC;AAGjC;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,MAAM,CACnD,MAAM,EACN,+BAA+B,CAShC,CAAC"}
|
|
@@ -15,72 +15,44 @@ exports.serviceToDestinationTransformers = {
|
|
|
15
15
|
'service-manager': serviceManagerBindingToDestination,
|
|
16
16
|
xsuaa: xsuaaToDestination
|
|
17
17
|
};
|
|
18
|
-
async function xsuaaToDestination(
|
|
19
|
-
const service = {
|
|
20
|
-
...serviceBinding,
|
|
21
|
-
tags: serviceBinding.tags,
|
|
22
|
-
label: 'xsuaa',
|
|
23
|
-
credentials: { ...serviceBinding.credentials }
|
|
24
|
-
};
|
|
18
|
+
async function xsuaaToDestination(service, options) {
|
|
25
19
|
const token = await (0, token_accessor_1.serviceToken)(service, options);
|
|
26
|
-
return buildClientCredentialsDestination(token,
|
|
20
|
+
return buildClientCredentialsDestination(token, service.credentials.apiurl, service.name);
|
|
27
21
|
}
|
|
28
|
-
async function serviceManagerBindingToDestination(
|
|
29
|
-
const service = {
|
|
30
|
-
...serviceBinding,
|
|
31
|
-
tags: serviceBinding.tags,
|
|
32
|
-
label: 'service-manager',
|
|
33
|
-
credentials: { ...serviceBinding.credentials }
|
|
34
|
-
};
|
|
22
|
+
async function serviceManagerBindingToDestination(service, options) {
|
|
35
23
|
const token = await (0, token_accessor_1.serviceToken)(service, options);
|
|
36
|
-
return buildClientCredentialsDestination(token,
|
|
24
|
+
return buildClientCredentialsDestination(token, service.credentials.sm_url, service.name);
|
|
37
25
|
}
|
|
38
|
-
async function destinationBindingToDestination(
|
|
39
|
-
const service = {
|
|
40
|
-
...serviceBinding,
|
|
41
|
-
tags: serviceBinding.tags,
|
|
42
|
-
label: 'destination',
|
|
43
|
-
credentials: { ...serviceBinding.credentials }
|
|
44
|
-
};
|
|
26
|
+
async function destinationBindingToDestination(service, options) {
|
|
45
27
|
const token = await (0, token_accessor_1.serviceToken)(service, options);
|
|
46
|
-
return buildClientCredentialsDestination(token,
|
|
28
|
+
return buildClientCredentialsDestination(token, service.credentials.uri, service.name);
|
|
47
29
|
}
|
|
48
|
-
async function saasRegistryBindingToDestination(
|
|
49
|
-
const service = {
|
|
50
|
-
...serviceBinding,
|
|
51
|
-
tags: serviceBinding.tags,
|
|
52
|
-
label: 'saas-registry',
|
|
53
|
-
credentials: { ...serviceBinding.credentials }
|
|
54
|
-
};
|
|
30
|
+
async function saasRegistryBindingToDestination(service, options) {
|
|
55
31
|
const token = await (0, token_accessor_1.serviceToken)(service, options);
|
|
56
|
-
return buildClientCredentialsDestination(token,
|
|
32
|
+
return buildClientCredentialsDestination(token, service.credentials['saas_registry_url'], service.name);
|
|
57
33
|
}
|
|
58
|
-
async function businessLoggingBindingToDestination(
|
|
59
|
-
const
|
|
60
|
-
...
|
|
61
|
-
|
|
62
|
-
label: 'business-logging',
|
|
63
|
-
credentials: { ...serviceBinding.credentials.uaa }
|
|
34
|
+
async function businessLoggingBindingToDestination(service, options) {
|
|
35
|
+
const transformedService = {
|
|
36
|
+
...service,
|
|
37
|
+
credentials: { ...service.credentials.uaa }
|
|
64
38
|
};
|
|
65
|
-
const token = await (0, token_accessor_1.serviceToken)(
|
|
66
|
-
return buildClientCredentialsDestination(token,
|
|
39
|
+
const token = await (0, token_accessor_1.serviceToken)(transformedService, options);
|
|
40
|
+
return buildClientCredentialsDestination(token, service.credentials.writeUrl, service.name);
|
|
67
41
|
}
|
|
68
|
-
async function workflowBindingToDestination(
|
|
69
|
-
const
|
|
70
|
-
...
|
|
71
|
-
|
|
72
|
-
label: 'workflow',
|
|
73
|
-
credentials: { ...serviceBinding.credentials.uaa }
|
|
42
|
+
async function workflowBindingToDestination(service, options) {
|
|
43
|
+
const transformedService = {
|
|
44
|
+
...service,
|
|
45
|
+
credentials: { ...service.credentials.uaa }
|
|
74
46
|
};
|
|
75
|
-
const token = await (0, token_accessor_1.serviceToken)(
|
|
76
|
-
return buildClientCredentialsDestination(token,
|
|
47
|
+
const token = await (0, token_accessor_1.serviceToken)(transformedService, options);
|
|
48
|
+
return buildClientCredentialsDestination(token, service.credentials.endpoints.workflow_odata_url, service.name);
|
|
77
49
|
}
|
|
78
|
-
async function xfS4hanaCloudBindingToDestination(
|
|
50
|
+
async function xfS4hanaCloudBindingToDestination(service) {
|
|
79
51
|
return {
|
|
80
|
-
url:
|
|
52
|
+
url: service.credentials.URL,
|
|
81
53
|
authentication: 'BasicAuthentication',
|
|
82
|
-
username:
|
|
83
|
-
password:
|
|
54
|
+
username: service.credentials.User,
|
|
55
|
+
password: service.credentials.Password
|
|
84
56
|
};
|
|
85
57
|
}
|
|
86
58
|
function buildClientCredentialsDestination(token, url, name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-binding-to-destination.js","sourceRoot":"","sources":["../../../src/scp-cf/destination/service-binding-to-destination.ts"],"names":[],"mappings":";;;AACA,sDAAiD;AACjD,gCAAmC;
|
|
1
|
+
{"version":3,"file":"service-binding-to-destination.js","sourceRoot":"","sources":["../../../src/scp-cf/destination/service-binding-to-destination.ts"],"names":[],"mappings":";;;AACA,sDAAiD;AACjD,gCAAmC;AAOnC;;GAEG;AACU,QAAA,gCAAgC,GAGzC;IACF,kBAAkB,EAAE,mCAAmC;IACvD,eAAe,EAAE,iCAAiC;IAClD,WAAW,EAAE,+BAA+B;IAC5C,eAAe,EAAE,gCAAgC;IACjD,QAAQ,EAAE,4BAA4B;IACtC,iBAAiB,EAAE,kCAAkC;IACrD,KAAK,EAAE,kBAAkB;CAC1B,CAAC;AAEF,KAAK,UAAU,kBAAkB,CAC/B,OAAgB,EAChB,OAAuC;IAEvC,MAAM,KAAK,GAAG,MAAM,IAAA,6BAAY,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,iCAAiC,CACtC,KAAK,EACL,OAAO,CAAC,WAAW,CAAC,MAAM,EAC1B,OAAO,CAAC,IAAI,CACb,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,kCAAkC,CAC/C,OAAgB,EAChB,OAAuC;IAEvC,MAAM,KAAK,GAAG,MAAM,IAAA,6BAAY,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,iCAAiC,CACtC,KAAK,EACL,OAAO,CAAC,WAAW,CAAC,MAAM,EAC1B,OAAO,CAAC,IAAI,CACb,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,+BAA+B,CAC5C,OAAgB,EAChB,OAAuC;IAEvC,MAAM,KAAK,GAAG,MAAM,IAAA,6BAAY,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACnD,OAAO,iCAAiC,CACtC,KAAK,EACL,OAAO,CAAC,WAAW,CAAC,GAAG,EACvB,OAAO,CAAC,IAAI,CACb,CAAC;AACJ,CAAC;AAED,KAAK,UAAU,gCAAgC,CAC7C,OAAgB,EAChB,OAAuC;IAEvC,MAAM,KAAK,GAAG,MA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X,IAAI;IAEJ,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAC1B,CAAC,IAAA,eAAS,EAAC,KAAK,CAAC,CAAC,GAAI,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CACnD,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACf,OAAO;QACL,GAAG;QACH,IAAI;QACJ,cAAc,EAAE,yBAAyB;QACzC,UAAU,EAAE;YACV;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,QAAQ;gBACd,SAAS;gBACT,WAAW,EAAE,EAAE,GAAG,EAAE,eAAe,EAAE,KAAK,EAAE,UAAU,KAAK,EAAE,EAAE;gBAC/D,KAAK,EAAE,IAAI;aACZ;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -42,6 +42,11 @@ export declare function getServiceList(service: string): Service[];
|
|
|
42
42
|
* @internal
|
|
43
43
|
*/
|
|
44
44
|
export declare function getService(service: string): Service | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Filters services based on service instance name. Throws an error if no or multiple services exist.
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
export declare function getServiceByInstanceName(serviceInstanceName: string): Service | undefined;
|
|
45
50
|
/**
|
|
46
51
|
* Get destination service if one is present.
|
|
47
52
|
*
|
|
@@ -50,21 +55,6 @@ export declare function getService(service: string): Service | undefined;
|
|
|
50
55
|
* @internal
|
|
51
56
|
*/
|
|
52
57
|
export declare function getDestinationService(): Service;
|
|
53
|
-
/**
|
|
54
|
-
* 'VCAP_SERVICES' Getter from environment variables.
|
|
55
|
-
* This function returns the VCAP_SERVICES as object or `null`, if it is not defined (i.e. no services are bound to the application).
|
|
56
|
-
*
|
|
57
|
-
* @returns 'VCAP_SERVICES' found in environment variables or `null`, if not defined. The key denotes the name ov the service and the value is the definition.
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
export declare function getVcapService(): Record<string, any> | null;
|
|
61
|
-
/**
|
|
62
|
-
* Environment variables accessor.
|
|
63
|
-
* @param name - Environment variable name.
|
|
64
|
-
* @returns Env variable value if defined or `null`, if not defined.
|
|
65
|
-
* @internal
|
|
66
|
-
*/
|
|
67
|
-
export declare function getEnvironmentVariable(name: string): string | undefined | null;
|
|
68
58
|
/**
|
|
69
59
|
* Destination URI getter
|
|
70
60
|
* NOTICE: If there exist more than one destination/uri, the function
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-accessor.d.ts","sourceRoot":"","sources":["../../src/scp-cf/environment-accessor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"environment-accessor.d.ts","sourceRoot":"","sources":["../../src/scp-cf/environment-accessor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EACL,6BAA6B,EAC7B,OAAO,EACP,uBAAuB,EACxB,MAAM,8BAA8B,CAAC;AAOtC;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,gBAAgB,CAWjE;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,GAAG,CAEtD;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,IAAI,6BAA6B,EAAE,CAItF;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG,EAAE,CAahE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,CAEzD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAmB/D;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,mBAAmB,EAAE,MAAM,GAC1B,OAAO,GAAG,SAAS,CAarB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAO/C;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,GAAG,IAAI,CAaxD;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,GAC1B,uBAAuB,CAIzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAajE;AA4HD,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.resolveService = exports.getXsuaaServiceCredentials = exports.getDestinationServiceUri = exports.
|
|
26
|
+
exports.resolveService = exports.getXsuaaServiceCredentials = exports.getDestinationServiceUri = exports.getDestinationService = exports.getServiceByInstanceName = exports.getService = exports.getServiceList = exports.getServiceCredentialsList = exports.getDestinationServiceCredentialsList = exports.getDestinationServiceCredentials = exports.getDestinationBasicCredentials = void 0;
|
|
27
27
|
const util_1 = require("@sap-cloud-sdk/util");
|
|
28
28
|
const xsenv = __importStar(require("@sap/xsenv"));
|
|
29
29
|
const jwt_1 = require("./jwt");
|
|
@@ -119,6 +119,21 @@ function getService(service) {
|
|
|
119
119
|
return services[0];
|
|
120
120
|
}
|
|
121
121
|
exports.getService = getService;
|
|
122
|
+
/**
|
|
123
|
+
* Filters services based on service instance name. Throws an error if no or multiple services exist.
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
function getServiceByInstanceName(serviceInstanceName) {
|
|
127
|
+
const service = xsenv.filterServices(serviceInstanceName);
|
|
128
|
+
if (service.length > 1) {
|
|
129
|
+
throw Error(`Multiple services with this name: "${serviceInstanceName}" were found.`);
|
|
130
|
+
}
|
|
131
|
+
else if (!service.length) {
|
|
132
|
+
throw Error(`No service with the name: "${serviceInstanceName}" was found.`);
|
|
133
|
+
}
|
|
134
|
+
return service[0];
|
|
135
|
+
}
|
|
136
|
+
exports.getServiceByInstanceName = getServiceByInstanceName;
|
|
122
137
|
/**
|
|
123
138
|
* Get destination service if one is present.
|
|
124
139
|
*
|
|
@@ -134,46 +149,6 @@ function getDestinationService() {
|
|
|
134
149
|
return destinationService;
|
|
135
150
|
}
|
|
136
151
|
exports.getDestinationService = getDestinationService;
|
|
137
|
-
/**
|
|
138
|
-
* 'VCAP_SERVICES' Getter from environment variables.
|
|
139
|
-
* This function returns the VCAP_SERVICES as object or `null`, if it is not defined (i.e. no services are bound to the application).
|
|
140
|
-
*
|
|
141
|
-
* @returns 'VCAP_SERVICES' found in environment variables or `null`, if not defined. The key denotes the name ov the service and the value is the definition.
|
|
142
|
-
* @internal
|
|
143
|
-
*/
|
|
144
|
-
function getVcapService() {
|
|
145
|
-
const env = getEnvironmentVariable('VCAP_SERVICES');
|
|
146
|
-
let vcapServices;
|
|
147
|
-
if (!env) {
|
|
148
|
-
logger.warn("Environment variable 'VCAP_SERVICES' is not defined.");
|
|
149
|
-
return null;
|
|
150
|
-
}
|
|
151
|
-
try {
|
|
152
|
-
vcapServices = JSON.parse(env);
|
|
153
|
-
}
|
|
154
|
-
catch (error) {
|
|
155
|
-
throw new util_1.ErrorWithCause("Failed to parse environment variable 'VCAP_SERVICES'.", error);
|
|
156
|
-
}
|
|
157
|
-
if (!Object.keys(vcapServices).length) {
|
|
158
|
-
throw new Error("Environment variable 'VCAP_SERVICES' is defined but empty. This should not happen.");
|
|
159
|
-
}
|
|
160
|
-
return vcapServices;
|
|
161
|
-
}
|
|
162
|
-
exports.getVcapService = getVcapService;
|
|
163
|
-
/**
|
|
164
|
-
* Environment variables accessor.
|
|
165
|
-
* @param name - Environment variable name.
|
|
166
|
-
* @returns Env variable value if defined or `null`, if not defined.
|
|
167
|
-
* @internal
|
|
168
|
-
*/
|
|
169
|
-
function getEnvironmentVariable(name) {
|
|
170
|
-
if (process.env[name]) {
|
|
171
|
-
return process.env[name];
|
|
172
|
-
}
|
|
173
|
-
logger.debug(`The environment variable "${name}" is not defined.`);
|
|
174
|
-
return null;
|
|
175
|
-
}
|
|
176
|
-
exports.getEnvironmentVariable = getEnvironmentVariable;
|
|
177
152
|
/**
|
|
178
153
|
* Destination URI getter
|
|
179
154
|
* NOTICE: If there exist more than one destination/uri, the function
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-accessor.js","sourceRoot":"","sources":["../../src/scp-cf/environment-accessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"environment-accessor.js","sourceRoot":"","sources":["../../src/scp-cf/environment-accessor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAkE;AAClE,kDAAoC;AAEpC,+BAA6C;AAO7C,MAAM,MAAM,GAAG,IAAA,mBAAY,EAAC;IAC1B,OAAO,EAAE,cAAc;IACvB,cAAc,EAAE,sBAAsB;CACvC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,SAAgB,8BAA8B;IAC5C,MAAM,sBAAsB,GAAG,gCAAgC,EAAE,CAAC;IAClE,MAAM,gBAAgB,GAAqB;QACzC,QAAQ,EAAE,sBAAsB,CAAC,QAAQ;YACvC,CAAC,CAAC,sBAAsB,CAAC,QAAQ;YACjC,CAAC,CAAC,IAAI;QACR,YAAY,EAAE,sBAAsB,CAAC,YAAY;YAC/C,CAAC,CAAC,sBAAsB,CAAC,YAAY;YACrC,CAAC,CAAC,IAAI;KACT,CAAC;IACF,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAXD,wEAWC;AAED;;;;;GAKG;AACH,SAAgB,gCAAgC;IAC9C,OAAO,IAAA,YAAK,EAAC,oCAAoC,EAAE,CAAC,CAAC;AACvD,CAAC;AAFD,4EAEC;AAED;;;;;GAKG;AACH,SAAgB,oCAAoC;IAClD,OAAO,cAAc,CAAC,aAAa,CAAC,CA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CAAC,CAAC;KAC1B;IAED,IAAI,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,EAAE;QAChD,MAAM,CAAC,IAAI,CACT,mCAAmC,gBAAgB,CAAC,GAAG,CACrD,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,SAAS,EAAE,CAC5B;6EACsE,iBAAiB,CACtF,gBAAgB,CACjB,EAAE,CACJ,CAAC;QACF,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;KAC5B;IACD,OAAO,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,iBAAiB,CACxB,gBAA2C;IAE3C,OAAO,uCACL,IAAA,YAAK,EAAC,gBAAgB,CAAE,CAAC,SAC3B,KAAK,CAAC;AACR,CAAC;AAED,SAAS,gBAAgB,CACvB,gBAA2C,EAC3C,KAAiB;IAEjB,OAAO,gBAAgB,CAAC,MAAM,CAC5B,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,KAAK,KAAK,CAAC,SAAS,CACxD,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CACvB,gBAA2C,EAC3C,KAAiB;IAEjB,OAAO,gBAAgB,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAC3C,IAAA,eAAS,EAAC,KAAK,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,SAAS,CAAC,CAC5C,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-cloud-sdk/connectivity",
|
|
3
|
-
"version": "2.7.2-
|
|
3
|
+
"version": "2.7.2-20220830092011.0",
|
|
4
4
|
"description": "SAP Cloud SDK for JavaScript connectivity",
|
|
5
5
|
"homepage": "https://sap.github.io/cloud-sdk/docs/js/overview-cloud-sdk-for-javascript",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"readme": "ts-node ../../scripts/replace-common-readme.ts"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@sap-cloud-sdk/util": "^2.7.2-
|
|
40
|
+
"@sap-cloud-sdk/util": "^2.7.2-20220830092011.0",
|
|
41
41
|
"@sap/xsenv": "^3.3.2",
|
|
42
42
|
"@sap/xssec": "^3.2.7",
|
|
43
43
|
"axios": "^0.27.1",
|