@ama-sdk/core 12.1.10 → 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
@@ -46,7 +46,7 @@ function _define_property(obj, key, value) {
46
46
  return obj;
47
47
  }
48
48
  function _ts_generator(thisArg, body) {
49
- var f, y, t, g, _ = {
49
+ var f, y, t, _ = {
50
50
  label: 0,
51
51
  sent: function() {
52
52
  if (t[0] & 1) throw t[1];
@@ -54,12 +54,8 @@ function _ts_generator(thisArg, body) {
54
54
  },
55
55
  trys: [],
56
56
  ops: []
57
- };
58
- return g = {
59
- next: verb(0),
60
- "throw": verb(1),
61
- "return": verb(2)
62
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
57
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
58
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
63
59
  return this;
64
60
  }), g;
65
61
  function verb(n) {
@@ -72,7 +68,7 @@ function _ts_generator(thisArg, body) {
72
68
  }
73
69
  function step(op) {
74
70
  if (f) throw new TypeError("Generator is already executing.");
75
- while(_)try {
71
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
76
72
  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;
77
73
  if (y = 0, t) op = [
78
74
  op[0] & 2,
@@ -165,77 +161,83 @@ describe('ApiConfigurationOverride Plugin', function() {
165
161
  basePath: 'http://test.com/api'
166
162
  };
167
163
  });
168
- it('should add a specified string JWS', /*#__PURE__*/ _async_to_generator(function() {
169
- var plugin, runner, result;
170
- return _ts_generator(this, function(_state) {
171
- switch(_state.label){
172
- case 0:
173
- plugin = new ApiConfigurationOverride('fakeJWS');
174
- runner = plugin.load();
175
- return [
176
- 4,
177
- runner.transform(options)
178
- ];
179
- case 1:
180
- result = _state.sent();
181
- expect(result.headers.get('ama-client-facts')).toBe('fakeJWS');
182
- return [
183
- 2
184
- ];
185
- }
186
- });
187
- }));
188
- it('should add a specified string JWS with a custom header name', /*#__PURE__*/ _async_to_generator(function() {
189
- var plugin, runner, result;
190
- return _ts_generator(this, function(_state) {
191
- switch(_state.label){
192
- case 0:
193
- plugin = new ApiConfigurationOverride('fakeJWS', 'my-header');
194
- runner = plugin.load();
195
- return [
196
- 4,
197
- runner.transform(options)
198
- ];
199
- case 1:
200
- result = _state.sent();
201
- expect(result.headers.get('my-header')).toBe('fakeJWS');
202
- return [
203
- 2
204
- ];
205
- }
206
- });
207
- }));
208
- it('should add a specified dynamic JWS', /*#__PURE__*/ _async_to_generator(function() {
209
- var counter, dynamicJws, plugin, runner, result;
210
- return _ts_generator(this, function(_state) {
211
- switch(_state.label){
212
- case 0:
213
- counter = 0;
214
- dynamicJws = function() {
215
- return Promise.resolve('dynamicJWS' + counter.toString());
216
- };
217
- plugin = new ApiConfigurationOverride(dynamicJws);
218
- runner = plugin.load();
219
- return [
220
- 4,
221
- runner.transform(options)
222
- ];
223
- case 1:
224
- result = _state.sent();
225
- expect(result.headers.get('ama-client-facts')).toBe('dynamicJWS0');
226
- counter++;
227
- runner = plugin.load();
228
- return [
229
- 4,
230
- runner.transform(options)
231
- ];
232
- case 2:
233
- result = _state.sent();
234
- expect(result.headers.get('ama-client-facts')).toContain('dynamicJWS1');
235
- return [
236
- 2
237
- ];
238
- }
239
- });
240
- }));
164
+ it('should add a specified string JWS', function() {
165
+ return _async_to_generator(function() {
166
+ var plugin, runner, result;
167
+ return _ts_generator(this, function(_state) {
168
+ switch(_state.label){
169
+ case 0:
170
+ plugin = new ApiConfigurationOverride('fakeJWS');
171
+ runner = plugin.load();
172
+ return [
173
+ 4,
174
+ runner.transform(options)
175
+ ];
176
+ case 1:
177
+ result = _state.sent();
178
+ expect(result.headers.get('ama-client-facts')).toBe('fakeJWS');
179
+ return [
180
+ 2
181
+ ];
182
+ }
183
+ });
184
+ })();
185
+ });
186
+ it('should add a specified string JWS with a custom header name', function() {
187
+ return _async_to_generator(function() {
188
+ var plugin, runner, result;
189
+ return _ts_generator(this, function(_state) {
190
+ switch(_state.label){
191
+ case 0:
192
+ plugin = new ApiConfigurationOverride('fakeJWS', 'my-header');
193
+ runner = plugin.load();
194
+ return [
195
+ 4,
196
+ runner.transform(options)
197
+ ];
198
+ case 1:
199
+ result = _state.sent();
200
+ expect(result.headers.get('my-header')).toBe('fakeJWS');
201
+ return [
202
+ 2
203
+ ];
204
+ }
205
+ });
206
+ })();
207
+ });
208
+ it('should add a specified dynamic JWS', function() {
209
+ return _async_to_generator(function() {
210
+ var counter, dynamicJws, plugin, runner, result;
211
+ return _ts_generator(this, function(_state) {
212
+ switch(_state.label){
213
+ case 0:
214
+ counter = 0;
215
+ dynamicJws = function() {
216
+ return Promise.resolve('dynamicJWS' + counter.toString());
217
+ };
218
+ plugin = new ApiConfigurationOverride(dynamicJws);
219
+ runner = plugin.load();
220
+ return [
221
+ 4,
222
+ runner.transform(options)
223
+ ];
224
+ case 1:
225
+ result = _state.sent();
226
+ expect(result.headers.get('ama-client-facts')).toBe('dynamicJWS0');
227
+ counter++;
228
+ runner = plugin.load();
229
+ return [
230
+ 4,
231
+ runner.transform(options)
232
+ ];
233
+ case 2:
234
+ result = _state.sent();
235
+ expect(result.headers.get('ama-client-facts')).toContain('dynamicJWS1');
236
+ return [
237
+ 2
238
+ ];
239
+ }
240
+ });
241
+ })();
242
+ });
241
243
  });
@@ -60,7 +60,7 @@ function _define_property(obj, key, value) {
60
60
  return obj;
61
61
  }
62
62
  function _ts_generator(thisArg, body) {
63
- var f, y, t, g, _ = {
63
+ var f, y, t, _ = {
64
64
  label: 0,
65
65
  sent: function() {
66
66
  if (t[0] & 1) throw t[1];
@@ -68,12 +68,8 @@ function _ts_generator(thisArg, body) {
68
68
  },
69
69
  trys: [],
70
70
  ops: []
71
- };
72
- return g = {
73
- next: verb(0),
74
- "throw": verb(1),
75
- "return": verb(2)
76
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
71
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
72
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
77
73
  return this;
78
74
  }), g;
79
75
  function verb(n) {
@@ -86,7 +82,7 @@ function _ts_generator(thisArg, body) {
86
82
  }
87
83
  function step(op) {
88
84
  if (f) throw new TypeError("Generator is already executing.");
89
- while(_)try {
85
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
90
86
  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;
91
87
  if (y = 0, t) op = [
92
88
  op[0] & 2,
@@ -172,17 +168,17 @@ function _ts_generator(thisArg, body) {
172
168
  value: function load() {
173
169
  var _this = this;
174
170
  return {
175
- transform: /*#__PURE__*/ function() {
176
- var _ref = _async_to_generator(function(data) {
171
+ transform: function(data) {
172
+ return _async_to_generator(function() {
177
173
  var apiKey, _tmp;
178
174
  return _ts_generator(this, function(_state) {
179
175
  switch(_state.label){
180
176
  case 0:
181
- if (!(typeof _this.apiKey === 'string')) return [
177
+ if (!(typeof this.apiKey === 'string')) return [
182
178
  3,
183
179
  1
184
180
  ];
185
- _tmp = _this.apiKey;
181
+ _tmp = this.apiKey;
186
182
  return [
187
183
  3,
188
184
  3
@@ -190,25 +186,22 @@ function _ts_generator(thisArg, body) {
190
186
  case 1:
191
187
  return [
192
188
  4,
193
- _this.apiKey()
189
+ this.apiKey()
194
190
  ];
195
191
  case 2:
196
192
  _tmp = _state.sent();
197
193
  _state.label = 3;
198
194
  case 3:
199
195
  apiKey = _tmp;
200
- data.headers.append(_this.apiKeyHeader, apiKey);
196
+ data.headers.append(this.apiKeyHeader, apiKey);
201
197
  return [
202
198
  2,
203
199
  data
204
200
  ];
205
201
  }
206
202
  });
207
- });
208
- return function(data) {
209
- return _ref.apply(this, arguments);
210
- };
211
- }()
203
+ }).call(_this);
204
+ }
212
205
  };
213
206
  }
214
207
  }
@@ -28,7 +28,7 @@ function _async_to_generator(fn) {
28
28
  };
29
29
  }
30
30
  function _ts_generator(thisArg, body) {
31
- var f, y, t, g, _ = {
31
+ var f, y, t, _ = {
32
32
  label: 0,
33
33
  sent: function() {
34
34
  if (t[0] & 1) throw t[1];
@@ -36,12 +36,8 @@ function _ts_generator(thisArg, body) {
36
36
  },
37
37
  trys: [],
38
38
  ops: []
39
- };
40
- return g = {
41
- next: verb(0),
42
- "throw": verb(1),
43
- "return": verb(2)
44
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
39
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
40
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
45
41
  return this;
46
42
  }), g;
47
43
  function verb(n) {
@@ -54,7 +50,7 @@ function _ts_generator(thisArg, body) {
54
50
  }
55
51
  function step(op) {
56
52
  if (f) throw new TypeError("Generator is already executing.");
57
- while(_)try {
53
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
58
54
  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;
59
55
  if (y = 0, t) op = [
60
56
  op[0] & 2,
@@ -134,46 +130,50 @@ describe('Api Key Request Plugin', function() {
134
130
  method: 'get'
135
131
  };
136
132
  });
137
- it('should add the API Key to the headers', /*#__PURE__*/ _async_to_generator(function() {
138
- var plugin, runner;
139
- return _ts_generator(this, function(_state) {
140
- switch(_state.label){
141
- case 0:
142
- plugin = new ApiKeyRequest('test', 'testKey');
143
- runner = plugin.load();
144
- return [
145
- 4,
146
- runner.transform(options)
147
- ];
148
- case 1:
149
- _state.sent();
150
- expect(options.headers.append).toHaveBeenCalledWith('testKey', 'test');
151
- return [
152
- 2
153
- ];
154
- }
155
- });
156
- }));
157
- it('should execute the function to add the API Key to the headers', /*#__PURE__*/ _async_to_generator(function() {
158
- var plugin, runner;
159
- return _ts_generator(this, function(_state) {
160
- switch(_state.label){
161
- case 0:
162
- plugin = new ApiKeyRequest(function() {
163
- return Promise.resolve('test');
164
- }, 'testKey');
165
- runner = plugin.load();
166
- return [
167
- 4,
168
- runner.transform(options)
169
- ];
170
- case 1:
171
- _state.sent();
172
- expect(options.headers.append).toHaveBeenCalledWith('testKey', 'test');
173
- return [
174
- 2
175
- ];
176
- }
177
- });
178
- }));
133
+ it('should add the API Key to the headers', function() {
134
+ return _async_to_generator(function() {
135
+ var plugin, runner;
136
+ return _ts_generator(this, function(_state) {
137
+ switch(_state.label){
138
+ case 0:
139
+ plugin = new ApiKeyRequest('test', 'testKey');
140
+ runner = plugin.load();
141
+ return [
142
+ 4,
143
+ runner.transform(options)
144
+ ];
145
+ case 1:
146
+ _state.sent();
147
+ expect(options.headers.append).toHaveBeenCalledWith('testKey', 'test');
148
+ return [
149
+ 2
150
+ ];
151
+ }
152
+ });
153
+ })();
154
+ });
155
+ it('should execute the function to add the API Key to the headers', function() {
156
+ return _async_to_generator(function() {
157
+ var plugin, runner;
158
+ return _ts_generator(this, function(_state) {
159
+ switch(_state.label){
160
+ case 0:
161
+ plugin = new ApiKeyRequest(function() {
162
+ return Promise.resolve('test');
163
+ }, 'testKey');
164
+ runner = plugin.load();
165
+ return [
166
+ 4,
167
+ runner.transform(options)
168
+ ];
169
+ case 1:
170
+ _state.sent();
171
+ expect(options.headers.append).toHaveBeenCalledWith('testKey', 'test');
172
+ return [
173
+ 2
174
+ ];
175
+ }
176
+ });
177
+ })();
178
+ });
179
179
  });
@@ -60,7 +60,7 @@ function _define_property(obj, key, value) {
60
60
  return obj;
61
61
  }
62
62
  function _ts_generator(thisArg, body) {
63
- var f, y, t, g, _ = {
63
+ var f, y, t, _ = {
64
64
  label: 0,
65
65
  sent: function() {
66
66
  if (t[0] & 1) throw t[1];
@@ -68,12 +68,8 @@ function _ts_generator(thisArg, body) {
68
68
  },
69
69
  trys: [],
70
70
  ops: []
71
- };
72
- return g = {
73
- next: verb(0),
74
- "throw": verb(1),
75
- "return": verb(2)
76
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
71
+ }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
72
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
77
73
  return this;
78
74
  }), g;
79
75
  function verb(n) {
@@ -86,7 +82,7 @@ function _ts_generator(thisArg, body) {
86
82
  }
87
83
  function step(op) {
88
84
  if (f) throw new TypeError("Generator is already executing.");
89
- while(_)try {
85
+ while(g && (g = 0, op[0] && (_ = 0)), _)try {
90
86
  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;
91
87
  if (y = 0, t) op = [
92
88
  op[0] & 2,
@@ -177,8 +173,8 @@ function _ts_generator(thisArg, body) {
177
173
  };
178
174
  });
179
175
  };
180
- return /*#__PURE__*/ function() {
181
- var _ref = _async_to_generator(function(logger) {
176
+ return function(logger) {
177
+ return _async_to_generator(function() {
182
178
  var e, e1;
183
179
  return _ts_generator(this, function(_state) {
184
180
  switch(_state.label){
@@ -239,11 +235,8 @@ function _ts_generator(thisArg, body) {
239
235
  ];
240
236
  }
241
237
  });
242
- });
243
- return function(logger) {
244
- return _ref.apply(this, arguments);
245
- };
246
- }();
238
+ })();
239
+ };
247
240
  }
248
241
  /**
249
242
  * Implementation of a retriever for Akamai based on bmak object from window or as parameter.
@@ -342,17 +335,16 @@ function _ts_generator(thisArg, body) {
342
335
  * If pollOnlyOnce is set to true, the poller won't be executed again after it has been fully executed once.
343
336
  * @param logger
344
337
  */ function waitForFingerprint(logger) {
345
- var _this = this;
346
338
  return _async_to_generator(function() {
347
339
  var pollerOptions, i, fingerprint;
348
340
  return _ts_generator(this, function(_state) {
349
341
  switch(_state.label){
350
342
  case 0:
351
- pollerOptions = _this.options.pollerOptions;
352
- if (pollerOptions === undefined || _this.options.pollOnlyOnce !== false && _this.hasPolled) {
343
+ pollerOptions = this.options.pollerOptions;
344
+ if (pollerOptions === undefined || this.options.pollOnlyOnce !== false && this.hasPolled) {
353
345
  return [
354
346
  2,
355
- _this.options.fingerprintRetriever(logger)
347
+ this.options.fingerprintRetriever(logger)
356
348
  ];
357
349
  }
358
350
  i = pollerOptions.maximumTries - 1;
@@ -364,12 +356,12 @@ function _ts_generator(thisArg, body) {
364
356
  ];
365
357
  return [
366
358
  4,
367
- _this.options.fingerprintRetriever(logger)
359
+ this.options.fingerprintRetriever(logger)
368
360
  ];
369
361
  case 2:
370
362
  fingerprint = _state.sent();
371
363
  if (fingerprint) {
372
- _this.hasPolled = true;
364
+ this.hasPolled = true;
373
365
  return [
374
366
  2,
375
367
  fingerprint
@@ -395,13 +387,13 @@ function _ts_generator(thisArg, body) {
395
387
  1
396
388
  ];
397
389
  case 5:
398
- _this.hasPolled = true;
390
+ this.hasPolled = true;
399
391
  return [
400
392
  2
401
393
  ];
402
394
  }
403
395
  });
404
- })();
396
+ }).call(this);
405
397
  }
406
398
  },
407
399
  {
@@ -409,20 +401,20 @@ function _ts_generator(thisArg, body) {
409
401
  value: /** @inheritdoc */ function load(context) {
410
402
  var _this = this;
411
403
  return {
412
- transform: /*#__PURE__*/ function() {
413
- var _ref = _async_to_generator(function(requestOptions) {
404
+ transform: function(requestOptions) {
405
+ return _async_to_generator(function() {
414
406
  var fingerprint;
415
407
  return _ts_generator(this, function(_state) {
416
408
  switch(_state.label){
417
409
  case 0:
418
410
  return [
419
411
  4,
420
- _this.waitForFingerprint(context === null || context === void 0 ? void 0 : context.logger)
412
+ this.waitForFingerprint(context === null || context === void 0 ? void 0 : context.logger)
421
413
  ];
422
414
  case 1:
423
415
  fingerprint = _state.sent();
424
416
  if (fingerprint) {
425
- requestOptions.headers.set(_this.options.destinationHeaderName, fingerprint);
417
+ requestOptions.headers.set(this.options.destinationHeaderName, fingerprint);
426
418
  }
427
419
  return [
428
420
  2,
@@ -430,11 +422,8 @@ function _ts_generator(thisArg, body) {
430
422
  ];
431
423
  }
432
424
  });
433
- });
434
- return function(requestOptions) {
435
- return _ref.apply(this, arguments);
436
- };
437
- }()
425
+ }).call(_this);
426
+ }
438
427
  };
439
428
  }
440
429
  }