@itentialopensource/adapter-utils 4.48.3 → 4.48.4

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 CHANGED
@@ -1,4 +1,14 @@
1
1
 
2
+ ## 4.48.4 [10-25-2022]
3
+
4
+ * Clean xml string sent into the adapter task and troubleshoot openstack_nova adapter
5
+
6
+ Closes ADAPT-2382
7
+
8
+ See merge request itentialopensource/adapter-utils!241
9
+
10
+ ---
11
+
2
12
  ## 4.48.3 [10-17-2022]
3
13
 
4
14
  * Changes to have token data passed in url instead of body
@@ -2213,10 +2213,12 @@ function getTokenItem(pathForToken, user, reqBody, invalidToken, callProperties,
2213
2213
  // No valid token found, Need to get a new token and add it to the token list
2214
2214
  buildTokenRequest(pathForToken, reqBody, callProperties, (dyntoken, berror) => {
2215
2215
  if (berror) {
2216
- done(null, berror);
2216
+ // done(null, berror);
2217
+ return done(berror);
2217
2218
  }
2218
2219
  if (!dyntoken) {
2219
- done(null, 'No Token returned');
2220
+ // done(null, 'No Token returned');
2221
+ return done(new Error('No Token returned'));
2220
2222
  }
2221
2223
 
2222
2224
  let timeout = tokenTimeout;
@@ -906,6 +906,8 @@ function buildPayload(entity, action, entitySchema, payload) {
906
906
  thisBdata = '';
907
907
  }
908
908
  if (typeof thisBdata !== 'object') {
909
+ thisBdata = thisBdata.replace(/(\r\n|\n|\r)/gm, '');
910
+ thisBdata = thisBdata.replace(/>\s+?</g, '><');
909
911
  return thisBdata;
910
912
  }
911
913
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "4.48.3",
3
+ "version": "4.48.4",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",