@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.
- package/cjs/clients/api-angular-client.js +13 -18
- package/cjs/clients/api-fetch-client.js +16 -21
- package/cjs/fwk/api.helpers.js +11 -11
- package/cjs/fwk/date.js +5 -5
- package/cjs/fwk/errors.js +7 -7
- package/cjs/fwk/mocks/alf-mock-adapter.js +58 -60
- package/cjs/fwk/mocks/base-mock-adapter.js +15 -19
- package/cjs/fwk/mocks/helpers.js +3 -3
- package/cjs/fwk/param-serialization.js +6 -6
- package/cjs/fwk/reviver.js +4 -4
- package/cjs/plugins/abort/abort.spec.js +83 -81
- package/cjs/plugins/additional-params/additional-params.request.js +18 -25
- package/cjs/plugins/additional-params/additional-params.spec.js +194 -186
- package/cjs/plugins/api-configuration-override/api-configuration-override.request.js +10 -17
- package/cjs/plugins/api-configuration-override/api-configuration-override.spec.js +83 -81
- package/cjs/plugins/api-key/api-key.request.js +12 -19
- package/cjs/plugins/api-key/api-key.spec.js +50 -50
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +25 -36
- package/cjs/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +343 -327
- package/cjs/plugins/client-facts/client-facts.request.js +18 -25
- package/cjs/plugins/client-facts/client-facts.spec.js +218 -208
- package/cjs/plugins/concurrent/concurrent.fetch.js +12 -20
- package/cjs/plugins/concurrent/concurrent.spec.js +99 -99
- package/cjs/plugins/custom-info/custom-info.spec.js +90 -90
- package/cjs/plugins/fetch-cache/fetch-cache.spec.js +100 -98
- package/cjs/plugins/fetch-credentials/fetch-credentials.spec.js +60 -60
- package/cjs/plugins/json-token/json-token.spec.js +109 -107
- package/cjs/plugins/keepalive/keepalive.request.js +7 -12
- package/cjs/plugins/keepalive/keepalive.spec.js +32 -34
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +11 -23
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +18 -28
- package/cjs/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +212 -204
- package/cjs/plugins/mock-intercept/mock-intercept.angular.js +94 -100
- package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
- package/cjs/plugins/mock-intercept/mock-intercept.interface.js +3 -3
- package/cjs/plugins/mock-intercept/mock-intercept.request.js +12 -19
- package/cjs/plugins/mock-intercept/mock-intercept.spec.js +245 -237
- package/cjs/plugins/perf-metric/perf-metric.fetch.js +11 -18
- package/cjs/plugins/pii-tokenizer/pii-tokenizer.request.js +19 -27
- package/cjs/plugins/pii-tokenizer/pii-tokenizer.spec.js +404 -386
- package/cjs/plugins/raw-response-info/raw-response-info.spec.js +67 -67
- package/cjs/plugins/retry/retry.fetch.js +18 -27
- package/cjs/plugins/retry/retry.spec.js +233 -225
- package/cjs/plugins/reviver/reviver.spec.js +88 -86
- package/cjs/plugins/session-id/session-id.spec.js +98 -94
- package/cjs/plugins/si-token/si-token.spec.js +27 -29
- package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +17 -24
- package/cjs/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +199 -191
- package/cjs/plugins/timeout/timeout.fetch.js +16 -22
- package/cjs/plugins/timeout/timeout.spec.js +211 -205
- package/cjs/plugins/url-rewrite/url-rewrite.request.js +9 -16
- package/cjs/plugins/url-rewrite/url-rewrite.spec.js +48 -48
- package/cjs/plugins/wait-for/wait-for.fetch.js +19 -29
- package/cjs/plugins/wait-for/wait-for.spec.js +211 -203
- package/cjs/utils/crypto.js +15 -27
- package/cjs/utils/generic-api.js +9 -14
- package/cjs/utils/json-token.js +19 -26
- package/cjs/utils/json-token.spec.js +495 -497
- package/cjs/utils/mime-types.js +3 -3
- package/esm2015/clients/api-angular-client.js +13 -18
- package/esm2015/clients/api-fetch-client.js +16 -21
- package/esm2015/fwk/mocks/alf-mock-adapter.js +58 -60
- package/esm2015/fwk/mocks/base-mock-adapter.js +15 -19
- package/esm2015/plugins/abort/abort.spec.js +83 -81
- package/esm2015/plugins/additional-params/additional-params.request.js +15 -22
- package/esm2015/plugins/additional-params/additional-params.spec.js +194 -186
- package/esm2015/plugins/api-configuration-override/api-configuration-override.request.js +10 -17
- package/esm2015/plugins/api-configuration-override/api-configuration-override.spec.js +83 -81
- package/esm2015/plugins/api-key/api-key.request.js +12 -19
- package/esm2015/plugins/api-key/api-key.spec.js +50 -50
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.request.js +21 -32
- package/esm2015/plugins/bot-protection-fingerprint/bot-protection-fingerprint.spec.js +343 -327
- package/esm2015/plugins/client-facts/client-facts.request.js +15 -22
- package/esm2015/plugins/client-facts/client-facts.spec.js +218 -208
- package/esm2015/plugins/concurrent/concurrent.fetch.js +12 -20
- package/esm2015/plugins/concurrent/concurrent.spec.js +99 -99
- package/esm2015/plugins/custom-info/custom-info.spec.js +90 -90
- package/esm2015/plugins/fetch-cache/fetch-cache.spec.js +100 -98
- package/esm2015/plugins/fetch-credentials/fetch-credentials.spec.js +60 -60
- package/esm2015/plugins/json-token/json-token.spec.js +109 -107
- package/esm2015/plugins/keepalive/keepalive.request.js +7 -12
- package/esm2015/plugins/keepalive/keepalive.spec.js +32 -34
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.helpers.js +8 -20
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.request.js +18 -28
- package/esm2015/plugins/mgw-mdw-auth/mgw-mdw-auth.spec.js +212 -204
- package/esm2015/plugins/mock-intercept/mock-intercept.angular.js +94 -100
- package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
- package/esm2015/plugins/mock-intercept/mock-intercept.request.js +12 -19
- package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +245 -237
- package/esm2015/plugins/perf-metric/perf-metric.fetch.js +11 -18
- package/esm2015/plugins/pii-tokenizer/pii-tokenizer.request.js +15 -23
- package/esm2015/plugins/pii-tokenizer/pii-tokenizer.spec.js +404 -386
- package/esm2015/plugins/raw-response-info/raw-response-info.spec.js +67 -67
- package/esm2015/plugins/retry/retry.fetch.js +18 -27
- package/esm2015/plugins/retry/retry.spec.js +233 -225
- package/esm2015/plugins/reviver/reviver.spec.js +88 -86
- package/esm2015/plugins/session-id/session-id.spec.js +98 -94
- package/esm2015/plugins/si-token/si-token.spec.js +27 -29
- package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.request.js +17 -24
- package/esm2015/plugins/simple-api-key-authentication/simple-api-key-authentication.spec.js +199 -191
- package/esm2015/plugins/timeout/timeout.fetch.js +13 -19
- package/esm2015/plugins/timeout/timeout.spec.js +211 -205
- package/esm2015/plugins/url-rewrite/url-rewrite.request.js +9 -16
- package/esm2015/plugins/url-rewrite/url-rewrite.spec.js +48 -48
- package/esm2015/plugins/wait-for/wait-for.fetch.js +19 -29
- package/esm2015/plugins/wait-for/wait-for.spec.js +211 -203
- package/esm2015/utils/crypto.js +8 -20
- package/esm2015/utils/generic-api.js +9 -14
- package/esm2015/utils/json-token.js +10 -17
- package/esm2015/utils/json-token.spec.js +495 -497
- package/package.json +6 -6
|
@@ -34,7 +34,7 @@ function _async_to_generator(fn) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function _ts_generator(thisArg, body) {
|
|
37
|
-
var f, y, t,
|
|
37
|
+
var f, y, t, _ = {
|
|
38
38
|
label: 0,
|
|
39
39
|
sent: function() {
|
|
40
40
|
if (t[0] & 1) throw t[1];
|
|
@@ -42,12 +42,8 @@ function _ts_generator(thisArg, body) {
|
|
|
42
42
|
},
|
|
43
43
|
trys: [],
|
|
44
44
|
ops: []
|
|
45
|
-
};
|
|
46
|
-
return g = {
|
|
47
|
-
next: verb(0),
|
|
48
|
-
"throw": verb(1),
|
|
49
|
-
"return": verb(2)
|
|
50
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
45
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
46
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
51
47
|
return this;
|
|
52
48
|
}), g;
|
|
53
49
|
function verb(n) {
|
|
@@ -60,7 +56,7 @@ function _ts_generator(thisArg, body) {
|
|
|
60
56
|
}
|
|
61
57
|
function step(op) {
|
|
62
58
|
if (f) throw new TypeError("Generator is already executing.");
|
|
63
|
-
while(_)try {
|
|
59
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
64
60
|
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;
|
|
65
61
|
if (y = 0, t) op = [
|
|
66
62
|
op[0] & 2,
|
|
@@ -147,187 +143,199 @@ describe('Additional Params Request Plugin', function() {
|
|
|
147
143
|
basePath: 'http://test.com/truc'
|
|
148
144
|
};
|
|
149
145
|
});
|
|
150
|
-
it('should add a specified query param',
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
prop1: 'value1',
|
|
201
|
-
prop2: 'value2'
|
|
146
|
+
it('should add a specified query param', function() {
|
|
147
|
+
return _async_to_generator(function() {
|
|
148
|
+
var plugin, runner, result;
|
|
149
|
+
return _ts_generator(this, function(_state) {
|
|
150
|
+
switch(_state.label){
|
|
151
|
+
case 0:
|
|
152
|
+
plugin = new _additionalparamsrequest.AdditionalParamsRequest({
|
|
153
|
+
queryParams: {
|
|
154
|
+
test: 'ok'
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
runner = plugin.load();
|
|
158
|
+
return [
|
|
159
|
+
4,
|
|
160
|
+
runner.transform(options)
|
|
161
|
+
];
|
|
162
|
+
case 1:
|
|
163
|
+
result = _state.sent();
|
|
164
|
+
expect(result.queryParams.test).toBe('ok');
|
|
165
|
+
return [
|
|
166
|
+
2
|
|
167
|
+
];
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
})();
|
|
171
|
+
});
|
|
172
|
+
it('should add serialized query params', function() {
|
|
173
|
+
return _async_to_generator(function() {
|
|
174
|
+
var plugin, runner, result;
|
|
175
|
+
return _ts_generator(this, function(_state) {
|
|
176
|
+
switch(_state.label){
|
|
177
|
+
case 0:
|
|
178
|
+
options.paramSerializationOptions = {
|
|
179
|
+
enableParameterSerialization: true
|
|
180
|
+
};
|
|
181
|
+
plugin = new _additionalparamsrequest.AdditionalParamsRequest({
|
|
182
|
+
queryParams: {
|
|
183
|
+
primParam: {
|
|
184
|
+
value: 'ok',
|
|
185
|
+
explode: false,
|
|
186
|
+
style: 'form'
|
|
187
|
+
},
|
|
188
|
+
arrParam: {
|
|
189
|
+
value: [
|
|
190
|
+
'a',
|
|
191
|
+
'b',
|
|
192
|
+
'c'
|
|
193
|
+
],
|
|
194
|
+
explode: false,
|
|
195
|
+
style: 'spaceDelimited'
|
|
202
196
|
},
|
|
203
|
-
|
|
204
|
-
|
|
197
|
+
objParam: {
|
|
198
|
+
value: {
|
|
199
|
+
prop1: 'value1',
|
|
200
|
+
prop2: 'value2'
|
|
201
|
+
},
|
|
202
|
+
explode: true,
|
|
203
|
+
style: 'deepObject'
|
|
204
|
+
}
|
|
205
205
|
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
})
|
|
227
|
-
it('should not serialize additional query params if param serialization is not enabled',
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
206
|
+
});
|
|
207
|
+
runner = plugin.load();
|
|
208
|
+
return [
|
|
209
|
+
4,
|
|
210
|
+
runner.transform(options)
|
|
211
|
+
];
|
|
212
|
+
case 1:
|
|
213
|
+
result = _state.sent();
|
|
214
|
+
expect(result.queryParams).toStrictEqual({
|
|
215
|
+
defaultTest: 'ok',
|
|
216
|
+
primParam: 'primParam=ok',
|
|
217
|
+
arrParam: 'arrParam=a%20b%20c',
|
|
218
|
+
objParam: 'objParam%5Bprop1%5D=value1&objParam%5Bprop2%5D=value2'
|
|
219
|
+
});
|
|
220
|
+
return [
|
|
221
|
+
2
|
|
222
|
+
];
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
})();
|
|
226
|
+
});
|
|
227
|
+
it('should not serialize additional query params if param serialization is not enabled', function() {
|
|
228
|
+
return _async_to_generator(function() {
|
|
229
|
+
var plugin, runner, result;
|
|
230
|
+
return _ts_generator(this, function(_state) {
|
|
231
|
+
switch(_state.label){
|
|
232
|
+
case 0:
|
|
233
|
+
jest.spyOn(console, 'log');
|
|
234
|
+
plugin = new _additionalparamsrequest.AdditionalParamsRequest({
|
|
235
|
+
queryParams: {
|
|
236
|
+
test: {
|
|
237
|
+
value: 'ok',
|
|
238
|
+
explode: false,
|
|
239
|
+
style: 'form'
|
|
240
|
+
}
|
|
239
241
|
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
})
|
|
257
|
-
it('should not add a specified query param of type string if param serialization is enabled',
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
runner.
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
242
|
+
});
|
|
243
|
+
runner = plugin.load();
|
|
244
|
+
return [
|
|
245
|
+
4,
|
|
246
|
+
runner.transform(options)
|
|
247
|
+
];
|
|
248
|
+
case 1:
|
|
249
|
+
result = _state.sent();
|
|
250
|
+
expect(result.queryParams.test).toBe('ok');
|
|
251
|
+
expect(console.log).toHaveBeenCalled();
|
|
252
|
+
return [
|
|
253
|
+
2
|
|
254
|
+
];
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
})();
|
|
258
|
+
});
|
|
259
|
+
it('should not add a specified query param of type string if param serialization is enabled', function() {
|
|
260
|
+
return _async_to_generator(function() {
|
|
261
|
+
var plugin, runner;
|
|
262
|
+
return _ts_generator(this, function(_state) {
|
|
263
|
+
switch(_state.label){
|
|
264
|
+
case 0:
|
|
265
|
+
options.paramSerializationOptions = {
|
|
266
|
+
enableParameterSerialization: true
|
|
267
|
+
};
|
|
268
|
+
plugin = new _additionalparamsrequest.AdditionalParamsRequest({
|
|
269
|
+
queryParams: {
|
|
270
|
+
test: 'ok'
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
runner = plugin.load();
|
|
274
|
+
return [
|
|
275
|
+
4,
|
|
276
|
+
expect(runner.transform(options)).rejects.toThrow('It is not possible to serialize additional query parameters without their serialization properties `value`, `explode`, and `style`.')
|
|
277
|
+
];
|
|
278
|
+
case 1:
|
|
279
|
+
_state.sent();
|
|
280
|
+
return [
|
|
281
|
+
2
|
|
282
|
+
];
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
})();
|
|
286
|
+
});
|
|
287
|
+
it('should add the query params returned by a function', function() {
|
|
288
|
+
return _async_to_generator(function() {
|
|
289
|
+
var plugin, runner, result;
|
|
290
|
+
return _ts_generator(this, function(_state) {
|
|
291
|
+
switch(_state.label){
|
|
292
|
+
case 0:
|
|
293
|
+
plugin = new _additionalparamsrequest.AdditionalParamsRequest({
|
|
294
|
+
queryParams: additionalGetParams
|
|
295
|
+
});
|
|
296
|
+
runner = plugin.load();
|
|
297
|
+
return [
|
|
298
|
+
4,
|
|
299
|
+
runner.transform(options)
|
|
300
|
+
];
|
|
301
|
+
case 1:
|
|
302
|
+
result = _state.sent();
|
|
303
|
+
expect(additionalGetParams).toHaveBeenCalledWith(defaultGetParams);
|
|
304
|
+
expect(result.queryParams.test).toBe('ok');
|
|
305
|
+
return [
|
|
306
|
+
2
|
|
307
|
+
];
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
})();
|
|
311
|
+
});
|
|
312
|
+
it('should modify body', function() {
|
|
313
|
+
return _async_to_generator(function() {
|
|
314
|
+
var plugin, runner, result;
|
|
315
|
+
return _ts_generator(this, function(_state) {
|
|
316
|
+
switch(_state.label){
|
|
317
|
+
case 0:
|
|
318
|
+
plugin = new _additionalparamsrequest.AdditionalParamsRequest({
|
|
319
|
+
body: additionalBody
|
|
320
|
+
});
|
|
321
|
+
runner = plugin.load();
|
|
322
|
+
return [
|
|
323
|
+
4,
|
|
324
|
+
runner.transform(options)
|
|
325
|
+
];
|
|
326
|
+
case 1:
|
|
327
|
+
result = _state.sent();
|
|
328
|
+
expect(result.queryParams.test).toBeUndefined();
|
|
329
|
+
expect(result.queryParams.defaultTest).toBe('ok');
|
|
330
|
+
expect(additionalBody).toHaveBeenCalledWith(defaultBody);
|
|
331
|
+
expect(result.body).toBe('newBody');
|
|
332
|
+
return [
|
|
333
|
+
2
|
|
334
|
+
];
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
})();
|
|
338
|
+
});
|
|
331
339
|
});
|
|
332
340
|
describe('Additional Params Request Sync Plugin', function() {
|
|
333
341
|
var additionalGetParams = jest.fn().mockReturnValue({
|
|
@@ -70,7 +70,7 @@ function _define_property(obj, key, value) {
|
|
|
70
70
|
return obj;
|
|
71
71
|
}
|
|
72
72
|
function _ts_generator(thisArg, body) {
|
|
73
|
-
var f, y, t,
|
|
73
|
+
var f, y, t, _ = {
|
|
74
74
|
label: 0,
|
|
75
75
|
sent: function() {
|
|
76
76
|
if (t[0] & 1) throw t[1];
|
|
@@ -78,12 +78,8 @@ function _ts_generator(thisArg, body) {
|
|
|
78
78
|
},
|
|
79
79
|
trys: [],
|
|
80
80
|
ops: []
|
|
81
|
-
};
|
|
82
|
-
return g = {
|
|
83
|
-
next: verb(0),
|
|
84
|
-
"throw": verb(1),
|
|
85
|
-
"return": verb(2)
|
|
86
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
81
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
82
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
87
83
|
return this;
|
|
88
84
|
}), g;
|
|
89
85
|
function verb(n) {
|
|
@@ -96,7 +92,7 @@ function _ts_generator(thisArg, body) {
|
|
|
96
92
|
}
|
|
97
93
|
function step(op) {
|
|
98
94
|
if (f) throw new TypeError("Generator is already executing.");
|
|
99
|
-
while(_)try {
|
|
95
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
100
96
|
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;
|
|
101
97
|
if (y = 0, t) op = [
|
|
102
98
|
op[0] & 2,
|
|
@@ -180,20 +176,20 @@ var ApiConfigurationOverride = /*#__PURE__*/ function() {
|
|
|
180
176
|
value: function load() {
|
|
181
177
|
var _this = this;
|
|
182
178
|
return {
|
|
183
|
-
transform:
|
|
184
|
-
|
|
179
|
+
transform: function(data) {
|
|
180
|
+
return _async_to_generator(function() {
|
|
185
181
|
var jws;
|
|
186
182
|
return _ts_generator(this, function(_state) {
|
|
187
183
|
switch(_state.label){
|
|
188
184
|
case 0:
|
|
189
185
|
return [
|
|
190
186
|
4,
|
|
191
|
-
typeof
|
|
187
|
+
typeof this.jws === 'function' ? this.jws() : this.jws
|
|
192
188
|
];
|
|
193
189
|
case 1:
|
|
194
190
|
jws = _state.sent();
|
|
195
191
|
if (jws) {
|
|
196
|
-
data.headers.append(
|
|
192
|
+
data.headers.append(this.headerName, jws);
|
|
197
193
|
}
|
|
198
194
|
return [
|
|
199
195
|
2,
|
|
@@ -201,11 +197,8 @@ var ApiConfigurationOverride = /*#__PURE__*/ function() {
|
|
|
201
197
|
];
|
|
202
198
|
}
|
|
203
199
|
});
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
return _ref.apply(this, arguments);
|
|
207
|
-
};
|
|
208
|
-
}()
|
|
200
|
+
}).call(_this);
|
|
201
|
+
}
|
|
209
202
|
};
|
|
210
203
|
}
|
|
211
204
|
}
|