@itentialopensource/adapter-utils 4.45.4 → 4.45.5

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.45.5 [05-14-2022]
3
+
4
+ * handle missing token data in mockdata
5
+
6
+ Closes ADAPT-2048
7
+
8
+ See merge request itentialopensource/adapter-utils!231
9
+
10
+ ---
11
+
2
12
  ## 4.45.4 [05-01-2022]
3
13
 
4
14
  * fix xml mockdata
@@ -1135,6 +1135,14 @@ function getToken(reqPath, options, tokenSchema, bodyString, callProperties, cal
1135
1135
  translated = tokenResp.response;
1136
1136
  }
1137
1137
 
1138
+ // since this is a stub, make sure we have what we need
1139
+ if (!translated.token) {
1140
+ translated.token = 'garbagetoken';
1141
+ }
1142
+ if (!translated.tokenp2) {
1143
+ translated.tokenp2 = 'garbagetoken';
1144
+ }
1145
+
1138
1146
  // if what we got back is an array, just return the first element
1139
1147
  // should only have one token!!!
1140
1148
  if (translated && Array.isArray(translated)) {
@@ -1153,7 +1161,7 @@ function getToken(reqPath, options, tokenSchema, bodyString, callProperties, cal
1153
1161
  // do not make the call to return a token if the request is actually
1154
1162
  // to get a token. Getting a token to get a token -- that should go
1155
1163
  // direct to make request
1156
- return callback({ token: 'faketoken' });
1164
+ return callback({ token: 'faketoken', tokenp2: 'faketoken' });
1157
1165
  }
1158
1166
 
1159
1167
  log.debug(`${origin}: OPTIONS: ${JSON.stringify(options)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "4.45.4",
3
+ "version": "4.45.5",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "encode_queryvars": {
55
55
  "type": "boolean",
56
- "description": "When true the query variables are encoded in the url",
56
+ "description": "When true the query parameters are encoded in the url",
57
57
  "default": true
58
58
  },
59
59
  "save_metric": {