@sap-cloud-sdk/connectivity 4.2.1-20251203103450.0 → 4.2.1-20251204014407.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.
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
4
|
};
|
|
@@ -41,7 +8,6 @@ exports.urlAndAgent = urlAndAgent;
|
|
|
41
8
|
const promises_1 = require("fs/promises");
|
|
42
9
|
const http_1 = __importDefault(require("http"));
|
|
43
10
|
const https_1 = __importDefault(require("https"));
|
|
44
|
-
const jks = __importStar(require("jks-js"));
|
|
45
11
|
const util_1 = require("@sap-cloud-sdk/util");
|
|
46
12
|
/* Careful the proxy imports cause circular dependencies if imported from scp directly */
|
|
47
13
|
// eslint-disable-next-line import/no-internal-modules
|
|
@@ -124,28 +90,6 @@ function getKeyStoreOptions(destination) {
|
|
|
124
90
|
logger.debug(`Destination '${destination.name}' does not have a keystore password.`);
|
|
125
91
|
}
|
|
126
92
|
const certBuffer = Buffer.from(certificate.content, 'base64');
|
|
127
|
-
if (getFormat(certificate) === 'jks') {
|
|
128
|
-
if (!destination.keyStorePassword) {
|
|
129
|
-
throw Error('Keystore password is required for JKS format');
|
|
130
|
-
}
|
|
131
|
-
const pemKeystore = jks.toPem(certBuffer, destination.keyStorePassword);
|
|
132
|
-
const aliases = Object.keys(pemKeystore);
|
|
133
|
-
if (aliases.length === 0) {
|
|
134
|
-
throw Error('No entries found in JKS keystore');
|
|
135
|
-
}
|
|
136
|
-
if (aliases.length > 1) {
|
|
137
|
-
throw Error('Multiple entries found in JKS keystore; only a single entry is supported');
|
|
138
|
-
}
|
|
139
|
-
const alias = aliases[0]; // Use first alias
|
|
140
|
-
const entry = pemKeystore[alias];
|
|
141
|
-
if (!entry.cert || !entry.key) {
|
|
142
|
-
throw Error('Invalid JKS entry: missing cert or key');
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
cert: Buffer.from(entry.cert, 'utf8'),
|
|
146
|
-
key: Buffer.from(entry.key, 'utf8')
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
93
|
// if the format is pem, the key and certificate needs to be passed separately
|
|
150
94
|
// it could be required to separate the string into two parts, but this seems to work as well
|
|
151
95
|
if (getFormat(certificate) === 'pem') {
|
|
@@ -193,7 +137,7 @@ function mtlsIsEnabled(destination) {
|
|
|
193
137
|
/*
|
|
194
138
|
The node client supports only these store formats https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions.
|
|
195
139
|
*/
|
|
196
|
-
const supportedCertificateFormats = ['p12', 'pfx', 'pem'
|
|
140
|
+
const supportedCertificateFormats = ['p12', 'pfx', 'pem'];
|
|
197
141
|
function isSupportedFormat(format) {
|
|
198
142
|
return !!format && supportedCertificateFormats.includes(format);
|
|
199
143
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-agent.js","sourceRoot":"","sources":["../../src/http-agent/http-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"http-agent.js","sourceRoot":"","sources":["../../src/http-agent/http-agent.ts"],"names":[],"mappings":";;;;;AAmCA,wCASC;AAkOD,kCAeC;AA7RD,0CAAuC;AACvC,gDAAwB;AACxB,kDAA0B;AAC1B,8CAAyD;AACzD,yFAAyF;AACzF,sDAAsD;AACtD,yDAA8D;AAC9D,2EAK+C;AAC/C,sDAAsD;AACtD,iGAA4F;AAS5F,MAAM,MAAM,GAAG,IAAA,mBAAY,EAAC;IAC1B,OAAO,EAAE,cAAc;IACvB,cAAc,EAAE,YAAY;CAC7B,CAAC,CAAC;AAEH;;;;;;GAMG;AACI,KAAK,UAAU,cAAc,CAClC,WAA4B;IAE5B,MAAM,kBAAkB,GAAG;QACzB,GAAG,oBAAoB,CAAC,WAAW,CAAC;QACpC,GAAG,kBAAkB,CAAC,WAAW,CAAC;QAClC,GAAG,CAAC,MAAM,cAAc,CAAC,WAAW,CAAC,CAAC;KACvC,CAAC;IACF,OAAO,WAAW,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;AACtD,CAAC;AAED;;;;;;GAMG;AACH,SAAS,oBAAoB,C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
1
1
|
{
|
|
2
2
|
"name": "@sap-cloud-sdk/connectivity",
|
|
3
|
-
"version": "4.2.1-
|
|
3
|
+
"version": "4.2.1-20251204014407.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",
|
|
@@ -40,13 +40,12 @@
|
|
|
40
40
|
"readme": "ts-node ../../scripts/replace-common-readme.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@sap-cloud-sdk/resilience": "^4.2.1-
|
|
44
|
-
"@sap-cloud-sdk/util": "^4.2.1-
|
|
43
|
+
"@sap-cloud-sdk/resilience": "^4.2.1-20251204014407.0",
|
|
44
|
+
"@sap-cloud-sdk/util": "^4.2.1-20251204014407.0",
|
|
45
45
|
"@sap/xsenv": "^6.0.0",
|
|
46
46
|
"@sap/xssec": "^4.11.2",
|
|
47
47
|
"async-retry": "^1.3.3",
|
|
48
48
|
"axios": "^1.13.2",
|
|
49
|
-
"jks-js": "^1.1.4",
|
|
50
49
|
"jsonwebtoken": "^9.0.2"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|