@@ -7,18 +7,18 @@ const agentPool = new Map();
77(function(root, factory) {
88 if (typeof define === ' function' && define.amd) {
99 // AMD. Register as an anonymous module.
10- define([' axios' , ' axios-cookiejar-support' , ' https-proxy-agent' , ' https' , ' querystring' , ' agentkeepalive' , ' Authentication/MerchantConfig' , ' Authentication/Logger' , ' Authentication/Constants' , ' Authentication/Authorization' , ' Authentication/PayloadDigest' ], factory);
10+ define([' axios' , ' axios-cookiejar-support' , ' https-proxy-agent' , ' https' , ' querystring' , ' agentkeepalive' , ' crypto ' , ' Authentication/MerchantConfig' , ' Authentication/Logger' , ' Authentication/Constants' , ' Authentication/Authorization' , ' Authentication/PayloadDigest' ], factory);
1111 } else if (typeof module === 'object' && module.exports) {
1212 // CommonJS-like environments that support module.exports, like Node.
13- module.exports = factory(require(' axios' ), require(' axios-cookiejar-support' ), require(' https-proxy-agent' ), require(' https' ), require(' querystring' ), require(' agentkeepalive' ), require(' ./authentication/core/MerchantConfig' ), require(' ./authentication/logging/Logger' ), require(' ./authentication/util/Constants' ), require(' ./authentication/core/Authorization' ), require(' ./authentication/payloadDigest/DigestGenerator' ));
13+ module.exports = factory(require(' axios' ), require(' axios-cookiejar-support' ), require(' https-proxy-agent' ), require(' https' ), require(' querystring' ), require(' agentkeepalive' ), require(' crypto ' ), require( ' ./authentication/core/MerchantConfig' ), require(' ./authentication/logging/Logger' ), require(' ./authentication/util/Constants' ), require(' ./authentication/core/Authorization' ), require(' ./authentication/payloadDigest/DigestGenerator' ));
1414 } else {
1515 // Browser globals (root is window)
1616 if (! root.{{moduleName} }) {
1717 root.{{moduleName} } = { } ;
1818 }
19- root.{ {moduleName} }.ApiClient = factory(root.axios, root.axiosCookieJar, root.httpsProxyAgent, root.https, root.querystring, root.AgentKeepAlive, root.Authentication.MerchantConfig, root.Authentication.Logger, root.Authentication.Constants, root.Authentication.Authorization, root.Authentication.PayloadDigest);
19+ root.{ {moduleName} }.ApiClient = factory(root.axios, root.axiosCookieJar, root.httpsProxyAgent, root.https, root.querystring, root.AgentKeepAlive, root.crypto, root. Authentication.MerchantConfig, root.Authentication.Logger, root.Authentication.Constants, root.Authentication.Authorization, root.Authentication.PayloadDigest);
2020 }
21- }(this, function(axios, axiosCookieJar, HttpsProxyAgent, https, querystring, AgentKeepAlive, MerchantConfig, Logger, Constants, Authorization, PayloadDigest) {
21+ }(this, function(axios, axiosCookieJar, HttpsProxyAgent, https, querystring, AgentKeepAlive, crypto, MerchantConfig, Logger, Constants, Authorization, PayloadDigest) {
2222{{#emitJSDoc} } /**
2323 * @module { {#invokerPackage} }{ {invokerPackage} }/{ {/invokerPackage} }ApiClient
2424 * @version { {projectVersion} }
@@ -461,7 +461,8 @@ const agentPool = new Map();
461461 if (config.maxIdleSockets !== undefined) hashParts.push(`maxIdleSockets:${ config.maxIdleSockets} `);
462462 if (config.freeSocketTimeout !== undefined) hashParts.push(`freeSocketTimeout:${ config.freeSocketTimeout} `);
463463
464- return hashParts.join('|');
464+ const concatenated = hashParts.join('|');
465+ return crypto.createHash('sha256').update(concatenated).digest('hex');
465466 }
466467
467468 /**
0 commit comments