@ama-sdk/core 12.1.8 → 12.1.11

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.
Files changed (111) hide show
  1. package/cjs/clients/api-angular-client.js +13 -18
  2. package/cjs/clients/api-fetch-client.js +16 -21
  3. package/cjs/fwk/api.helpers.js +11 -11
  4. package/cjs/fwk/date.js +5 -5
  5. package/cjs/fwk/errors.js +7 -7
  6. package/cjs/fwk/mocks/alf-mock-adapter.js +58 -60
  7. package/cjs/fwk/mocks/base-mock-adapter.js +15 -19
  8. package/cjs/fwk/mocks/helpers.js +3 -3
  9. package/cjs/fwk/param-serialization.js +6 -6
  10. package/cjs/fwk/reviver.js +4 -4
  11. package/cjs/plugins/abort/abort.spec.js +83 -81
  12. package/cjs/plugins/additional-params/additional-params.request.js +18 -25
  13. package/cjs/plugins/additional-params/additional-params.spec.js +194 -186
  14. package/cjs/plugins/api-configuration-override/api-configuration-override.request.js +10 -17
  15. package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +83 -81
  16. package/cjs/plugins/api-key/api-key.request.js +12 -19
  17. package/cjs/plugins/api-key/api-key.spec.js +50 -50
  18. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +25 -36
  19. package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +343 -327
  20. package/cjs/plugins/client-facts/client-facts.request.js +18 -25
  21. package/cjs/plugins/client-facts/client-facts.spec.js +218 -208
  22. package/cjs/plugins/concurrent/concurrent.fetch.js +12 -20
  23. package/cjs/plugins/concurrent/concurrent.spec.js +99 -99
  24. package/cjs/plugins/custom-info/custom-info.spec.js +90 -90
  25. package/cjs/plugins/fetch-cache/fetch-cache.spec.js +100 -98
  26. package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +60 -60
  27. package/cjs/plugins/json-token/json-token.spec.js +109 -107
  28. package/cjs/plugins/keepalive/keepalive.request.js +7 -12
  29. package/cjs/plugins/keepalive/keepalive.spec.js +32 -34
  30. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +11 -23
  31. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +18 -28
  32. package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +212 -204
  33. package/cjs/plugins/mock-intercept/mock-intercept.angular.js +94 -100
  34. package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
  35. package/cjs/plugins/mock-intercept/mock-intercept.interface.js +3 -3
  36. package/cjs/plugins/mock-intercept/mock-intercept.request.js +12 -19
  37. package/cjs/plugins/mock-intercept/mock-intercept.spec.js +245 -237
  38. package/cjs/plugins/perf-metric/perf-metric.fetch.js +11 -18
  39. package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +19 -27
  40. package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +404 -386
  41. package/cjs/plugins/raw-response-info/raw-response-info.spec.js +67 -67
  42. package/cjs/plugins/retry/retry.fetch.js +18 -27
  43. package/cjs/plugins/retry/retry.spec.js +233 -225
  44. package/cjs/plugins/reviver/reviver.spec.js +88 -86
  45. package/cjs/plugins/session-id/session-id.spec.js +98 -94
  46. package/cjs/plugins/si-token/si-token.spec.js +27 -29
  47. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +17 -24
  48. package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +199 -191
  49. package/cjs/plugins/timeout/timeout.fetch.js +16 -22
  50. package/cjs/plugins/timeout/timeout.spec.js +211 -205
  51. package/cjs/plugins/url-rewrite/url-rewrite.request.js +9 -16
  52. package/cjs/plugins/url-rewrite/url-rewrite.spec.js +48 -48
  53. package/cjs/plugins/wait-for/wait-for.fetch.js +19 -29
  54. package/cjs/plugins/wait-for/wait-for.spec.js +211 -203
  55. package/cjs/utils/crypto.js +15 -27
  56. package/cjs/utils/generic-api.js +9 -14
  57. package/cjs/utils/json-token.js +19 -26
  58. package/cjs/utils/json-token.spec.js +495 -497
  59. package/cjs/utils/mime-types.js +3 -3
  60. package/esm2015/clients/api-angular-client.js +13 -18
  61. package/esm2015/clients/api-fetch-client.js +16 -21
  62. package/esm2015/fwk/mocks/alf-mock-adapter.js +58 -60
  63. package/esm2015/fwk/mocks/base-mock-adapter.js +15 -19
  64. package/esm2015/plugins/abort/abort.spec.js +83 -81
  65. package/esm2015/plugins/additional-params/additional-params.request.js +15 -22
  66. package/esm2015/plugins/additional-params/additional-params.spec.js +194 -186
  67. package/esm2015/plugins/api-configuration-override/api-configuration-override.request.js +10 -17
  68. package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +83 -81
  69. package/esm2015/plugins/api-key/api-key.request.js +12 -19
  70. package/esm2015/plugins/api-key/api-key.spec.js +50 -50
  71. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +21 -32
  72. package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +343 -327
  73. package/esm2015/plugins/client-facts/client-facts.request.js +15 -22
  74. package/esm2015/plugins/client-facts/client-facts.spec.js +218 -208
  75. package/esm2015/plugins/concurrent/concurrent.fetch.js +12 -20
  76. package/esm2015/plugins/concurrent/concurrent.spec.js +99 -99
  77. package/esm2015/plugins/custom-info/custom-info.spec.js +90 -90
  78. package/esm2015/plugins/fetch-cache/fetch-cache.spec.js +100 -98
  79. package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +60 -60
  80. package/esm2015/plugins/json-token/json-token.spec.js +109 -107
  81. package/esm2015/plugins/keepalive/keepalive.request.js +7 -12
  82. package/esm2015/plugins/keepalive/keepalive.spec.js +32 -34
  83. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +8 -20
  84. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +18 -28
  85. package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +212 -204
  86. package/esm2015/plugins/mock-intercept/mock-intercept.angular.js +94 -100
  87. package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
  88. package/esm2015/plugins/mock-intercept/mock-intercept.request.js +12 -19
  89. package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +245 -237
  90. package/esm2015/plugins/perf-metric/perf-metric.fetch.js +11 -18
  91. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +15 -23
  92. package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +404 -386
  93. package/esm2015/plugins/raw-response-info/raw-response-info.spec.js +67 -67
  94. package/esm2015/plugins/retry/retry.fetch.js +18 -27
  95. package/esm2015/plugins/retry/retry.spec.js +233 -225
  96. package/esm2015/plugins/reviver/reviver.spec.js +88 -86
  97. package/esm2015/plugins/session-id/session-id.spec.js +98 -94
  98. package/esm2015/plugins/si-token/si-token.spec.js +27 -29
  99. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +17 -24
  100. package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +199 -191
  101. package/esm2015/plugins/timeout/timeout.fetch.js +13 -19
  102. package/esm2015/plugins/timeout/timeout.spec.js +211 -205
  103. package/esm2015/plugins/url-rewrite/url-rewrite.request.js +9 -16
  104. package/esm2015/plugins/url-rewrite/url-rewrite.spec.js +48 -48
  105. package/esm2015/plugins/wait-for/wait-for.fetch.js +19 -29
  106. package/esm2015/plugins/wait-for/wait-for.spec.js +211 -203
  107. package/esm2015/utils/crypto.js +8 -20
  108. package/esm2015/utils/generic-api.js +9 -14
  109. package/esm2015/utils/json-token.js +10 -17
  110. package/esm2015/utils/json-token.spec.js +495 -497
  111. package/package.json +6 -6
@@ -106,7 +106,7 @@ function _object_spread_props(target, source) {
106
106
  return target;
107
107
  }
108
108
  function _ts_generator(thisArg, body) {
109
- var f, y, t, g, _ = {
109
+ var f, y, t, _ = {
110
110
  label: 0,
111
111
  sent: function() {
112
112
  if (t[0] & 1) throw t[1];
@@ -114,12 +114,8 @@ function _ts_generator(thisArg, body) {
114
114
  },
115
115
  trys: [],
116
116
  ops: []
117
- };
118
- return g = {
119
- next: verb(0),
120
- "throw": verb(1),
121
- "return": verb(2)
122
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
117
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
118
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
123
119
  return this;
124
120
  }), g;
125
121
  function verb(n) {
@@ -132,7 +128,7 @@ function _ts_generator(thisArg, body) {
132
128
  }
133
129
  function step(op) {
134
130
  if (f) throw new TypeError("Generator is already executing.");
135
- while(_)try {
131
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
136
132
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
137
133
  if (y = 0, t) op = [
138
134
  op[0] & 2,
@@ -229,109 +225,107 @@ import { MockInterceptRequest } from './mock-intercept.request';
229
225
  }
230
226
  return {
231
227
  transform: function(call) {
232
- var _this1 = _this;
233
- return from(_async_to_generator(function() {
234
- var originalCall, delayTime, _tmp, operationId, mock, response;
235
- return _ts_generator(this, function(_state) {
236
- switch(_state.label){
237
- case 0:
238
- return [
239
- 4,
240
- _this1.options.adapter.initialize()
241
- ];
242
- case 1:
243
- _state.sent();
244
- originalCall = call;
245
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- type of options is explicitly `any`
246
- if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(CUSTOM_MOCK_OPERATION_ID_HEADER)) {
228
+ return from(function() {
229
+ return _async_to_generator(function() {
230
+ var originalCall, delayTime, _tmp, operationId, mock, response;
231
+ return _ts_generator(this, function(_state) {
232
+ switch(_state.label){
233
+ case 0:
247
234
  return [
248
- 2,
249
- originalCall
235
+ 4,
236
+ this.options.adapter.initialize()
250
237
  ];
251
- }
252
- if (!(typeof _this1.options.delayTiming !== 'undefined')) return [
253
- 3,
254
- 5
255
- ];
256
- if (!(typeof _this1.options.delayTiming === 'number')) return [
257
- 3,
258
- 2
259
- ];
260
- _tmp = _this1.options.delayTiming;
261
- return [
262
- 3,
263
- 4
264
- ];
265
- case 2:
266
- return [
267
- 4,
268
- _this1.options.delayTiming(_object_spread_props(_object_spread({}, context), {
269
- fetchPlugins: [],
270
- options: context.requestOptions
271
- }))
272
- ];
273
- case 3:
274
- _tmp = _state.sent();
275
- _state.label = 4;
276
- case 4:
277
- delayTime = _tmp;
278
- originalCall = originalCall.pipe(delay(delayTime));
279
- _state.label = 5;
280
- case 5:
281
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- type of options is explicitly `any`
282
- operationId = context.options.headers.get(CUSTOM_MOCK_OPERATION_ID_HEADER);
283
- try {
284
- mock = _this1.options.adapter.getLatestMock(operationId);
285
- if (!mock.getResponse) {
238
+ case 1:
239
+ _state.sent();
240
+ originalCall = call;
241
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- type of options is explicitly `any`
242
+ if (!context.options.headers || !_instanceof(context.options.headers, Headers) || !context.options.headers.has(CUSTOM_MOCK_OPERATION_ID_HEADER)) {
286
243
  return [
287
244
  2,
288
245
  originalCall
289
246
  ];
290
247
  }
291
- response = mock.getResponse();
248
+ if (!(typeof this.options.delayTiming !== 'undefined')) return [
249
+ 3,
250
+ 5
251
+ ];
252
+ if (!(typeof this.options.delayTiming === 'number')) return [
253
+ 3,
254
+ 2
255
+ ];
256
+ _tmp = this.options.delayTiming;
292
257
  return [
293
- 2,
294
- originalCall.pipe(mergeMap(/*#__PURE__*/ function() {
295
- var _ref = _async_to_generator(function(res) {
296
- var body, responseCloned;
297
- return _ts_generator(this, function(_state) {
298
- switch(_state.label){
299
- case 0:
300
- return [
301
- 4,
302
- response.json()
303
- ];
304
- case 1:
305
- body = _state.sent();
306
- responseCloned = res.clone();
307
- return [
308
- 2,
309
- new HttpResponse(_object_spread_props(_object_spread({}, responseCloned), {
310
- body: body,
311
- url: responseCloned.url || undefined
312
- }))
313
- ];
314
- }
315
- });
316
- /* eslint-enable-next-line @typescript-eslint/no-unsafe-assignment */ });
317
- return function(res) {
318
- return _ref.apply(this, arguments);
319
- };
320
- }()))
258
+ 3,
259
+ 4
321
260
  ];
322
- } catch (e) {
323
- (context.logger || console).error("Failed to retrieve the latest mock for Operation ID ".concat(operationId, ", fallback to default mock"));
261
+ case 2:
262
+ return [
263
+ 4,
264
+ this.options.delayTiming(_object_spread_props(_object_spread({}, context), {
265
+ fetchPlugins: [],
266
+ options: context.requestOptions
267
+ }))
268
+ ];
269
+ case 3:
270
+ _tmp = _state.sent();
271
+ _state.label = 4;
272
+ case 4:
273
+ delayTime = _tmp;
274
+ originalCall = originalCall.pipe(delay(delayTime));
275
+ _state.label = 5;
276
+ case 5:
277
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- type of options is explicitly `any`
278
+ operationId = context.options.headers.get(CUSTOM_MOCK_OPERATION_ID_HEADER);
279
+ try {
280
+ mock = this.options.adapter.getLatestMock(operationId);
281
+ if (!mock.getResponse) {
282
+ return [
283
+ 2,
284
+ originalCall
285
+ ];
286
+ }
287
+ response = mock.getResponse();
288
+ return [
289
+ 2,
290
+ originalCall.pipe(mergeMap(function(res) {
291
+ return _async_to_generator(function() {
292
+ var body, responseCloned;
293
+ return _ts_generator(this, function(_state) {
294
+ switch(_state.label){
295
+ case 0:
296
+ return [
297
+ 4,
298
+ response.json()
299
+ ];
300
+ case 1:
301
+ body = _state.sent();
302
+ responseCloned = res.clone();
303
+ return [
304
+ 2,
305
+ new HttpResponse(_object_spread_props(_object_spread({}, responseCloned), {
306
+ body: body,
307
+ url: responseCloned.url || undefined
308
+ }))
309
+ ];
310
+ }
311
+ });
312
+ /* eslint-enable-next-line @typescript-eslint/no-unsafe-assignment */ })();
313
+ }))
314
+ ];
315
+ } catch (e) {
316
+ (context.logger || console).error("Failed to retrieve the latest mock for Operation ID ".concat(operationId, ", fallback to default mock"));
317
+ return [
318
+ 2,
319
+ originalCall
320
+ ];
321
+ }
324
322
  return [
325
- 2,
326
- originalCall
323
+ 2
327
324
  ];
328
- }
329
- return [
330
- 2
331
- ];
332
- }
333
- });
334
- })()).pipe(mergeMap(function(res) {
325
+ }
326
+ });
327
+ }).call(_this);
328
+ }()).pipe(mergeMap(function(res) {
335
329
  return res;
336
330
  }));
337
331
  }
@@ -67,7 +67,7 @@ function _instanceof(left, right) {
67
67
  }
68
68
  }
69
69
  function _ts_generator(thisArg, body) {
70
- var f, y, t, g, _ = {
70
+ var f, y, t, _ = {
71
71
  label: 0,
72
72
  sent: function() {
73
73
  if (t[0] & 1) throw t[1];
@@ -75,12 +75,8 @@ function _ts_generator(thisArg, body) {
75
75
  },
76
76
  trys: [],
77
77
  ops: []
78
- };
79
- return g = {
80
- next: verb(0),
81
- "throw": verb(1),
82
- "return": verb(2)
83
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
78
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
79
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
84
80
  return this;
85
81
  }), g;
86
82
  function verb(n) {
@@ -93,7 +89,7 @@ function _ts_generator(thisArg, body) {
93
89
  }
94
90
  function step(op) {
95
91
  if (f) throw new TypeError("Generator is already executing.");
96
- while(_)try {
92
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
97
93
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
98
94
  if (y = 0, t) op = [
99
95
  op[0] & 2,
@@ -180,22 +176,22 @@ import { MockInterceptRequest } from './mock-intercept.request';
180
176
  {
181
177
  key: "load",
182
178
  value: function load(context) {
179
+ var _this = this;
183
180
  if (!context.apiClient.options.requestPlugins.some(function(plugin) {
184
181
  return _instanceof(plugin, MockInterceptRequest);
185
182
  })) {
186
183
  throw new Error('MockInterceptFetch plugin should be used only with the MockInterceptRequest plugin');
187
184
  }
188
- var _this = this;
189
185
  return {
190
- transform: /*#__PURE__*/ function() {
191
- var _ref = _async_to_generator(function(fetchCall) {
186
+ transform: function(fetchCall) {
187
+ return _async_to_generator(function() {
192
188
  var responsePromise, delay, _tmp, resp, operationId, mock, response;
193
189
  return _ts_generator(this, function(_state) {
194
190
  switch(_state.label){
195
191
  case 0:
196
192
  return [
197
193
  4,
198
- _this.options.adapter.initialize()
194
+ this.options.adapter.initialize()
199
195
  ];
200
196
  case 1:
201
197
  _state.sent();
@@ -206,15 +202,15 @@ import { MockInterceptRequest } from './mock-intercept.request';
206
202
  responsePromise
207
203
  ];
208
204
  }
209
- if (!(typeof _this.options.delayTiming !== 'undefined')) return [
205
+ if (!(typeof this.options.delayTiming !== 'undefined')) return [
210
206
  3,
211
207
  6
212
208
  ];
213
- if (!(typeof _this.options.delayTiming === 'number')) return [
209
+ if (!(typeof this.options.delayTiming === 'number')) return [
214
210
  3,
215
211
  2
216
212
  ];
217
- _tmp = _this.options.delayTiming;
213
+ _tmp = this.options.delayTiming;
218
214
  return [
219
215
  3,
220
216
  4
@@ -222,7 +218,7 @@ import { MockInterceptRequest } from './mock-intercept.request';
222
218
  case 2:
223
219
  return [
224
220
  4,
225
- _this.options.delayTiming(context)
221
+ this.options.delayTiming(context)
226
222
  ];
227
223
  case 3:
228
224
  _tmp = _state.sent();
@@ -244,7 +240,7 @@ import { MockInterceptRequest } from './mock-intercept.request';
244
240
  case 6:
245
241
  operationId = context.options.headers.get(CUSTOM_MOCK_OPERATION_ID_HEADER);
246
242
  try {
247
- mock = _this.options.adapter.getLatestMock(operationId);
243
+ mock = this.options.adapter.getLatestMock(operationId);
248
244
  if (!mock.getResponse) {
249
245
  return [
250
246
  2,
@@ -270,11 +266,8 @@ import { MockInterceptRequest } from './mock-intercept.request';
270
266
  ];
271
267
  }
272
268
  });
273
- });
274
- return function(fetchCall) {
275
- return _ref.apply(this, arguments);
276
- };
277
- }()
269
+ }).call(_this);
270
+ }
278
271
  };
279
272
  }
280
273
  }
@@ -99,7 +99,7 @@ function _object_spread_props(target, source) {
99
99
  return target;
100
100
  }
101
101
  function _ts_generator(thisArg, body) {
102
- var f, y, t, g, _ = {
102
+ var f, y, t, _ = {
103
103
  label: 0,
104
104
  sent: function() {
105
105
  if (t[0] & 1) throw t[1];
@@ -107,12 +107,8 @@ function _ts_generator(thisArg, body) {
107
107
  },
108
108
  trys: [],
109
109
  ops: []
110
- };
111
- return g = {
112
- next: verb(0),
113
- "throw": verb(1),
114
- "return": verb(2)
115
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
110
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
111
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
116
112
  return this;
117
113
  }), g;
118
114
  function verb(n) {
@@ -125,7 +121,7 @@ function _ts_generator(thisArg, body) {
125
121
  }
126
122
  function step(op) {
127
123
  if (f) throw new TypeError("Generator is already executing.");
128
- while(_)try {
124
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
129
125
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
130
126
  if (y = 0, t) op = [
131
127
  op[0] & 2,
@@ -214,19 +210,19 @@ import { CUSTOM_MOCK_OPERATION_ID_HEADER, CUSTOM_MOCK_REQUEST_HEADER } from './m
214
210
  value: /** @inheritdoc */ function load() {
215
211
  var _this = this;
216
212
  return {
217
- transform: /*#__PURE__*/ function() {
218
- var _ref = _async_to_generator(function(data) {
213
+ transform: function(data) {
214
+ return _async_to_generator(function() {
219
215
  var requestOption, operationId, mock, text, blob, basePath, headers;
220
216
  return _ts_generator(this, function(_state) {
221
217
  switch(_state.label){
222
218
  case 0:
223
219
  return [
224
220
  4,
225
- _this.options.adapter.initialize()
221
+ this.options.adapter.initialize()
226
222
  ];
227
223
  case 1:
228
224
  _state.sent();
229
- if (_this.options.disabled || _this.options.filter && !_this.options.filter(data)) {
225
+ if (this.options.disabled || this.options.filter && !this.options.filter(data)) {
230
226
  return [
231
227
  2,
232
228
  data
@@ -238,11 +234,11 @@ import { CUSTOM_MOCK_OPERATION_ID_HEADER, CUSTOM_MOCK_REQUEST_HEADER } from './m
238
234
  delete requestOption.api;
239
235
  return [
240
236
  4,
241
- _this.options.adapter.retrieveOperationId(requestOption)
237
+ this.options.adapter.retrieveOperationId(requestOption)
242
238
  ];
243
239
  case 2:
244
240
  operationId = _state.sent();
245
- mock = _this.options.adapter.getMock(operationId);
241
+ mock = this.options.adapter.getMock(operationId);
246
242
  text = JSON.stringify(mock.mockData);
247
243
  blob = new Blob([
248
244
  text
@@ -263,11 +259,8 @@ import { CUSTOM_MOCK_OPERATION_ID_HEADER, CUSTOM_MOCK_REQUEST_HEADER } from './m
263
259
  ];
264
260
  }
265
261
  });
266
- });
267
- return function(data) {
268
- return _ref.apply(this, arguments);
269
- };
270
- }()
262
+ }).call(_this);
263
+ }
271
264
  };
272
265
  }
273
266
  }