@ama-sdk/client-fetch 12.3.0-prerelease.8 → 12.3.0-rc.0
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/api-fetch-client.js +18 -22
- package/cjs/plugins/abort/abort.spec.js +83 -81
- package/cjs/plugins/concurrent/concurrent.fetch.js +12 -20
- package/cjs/plugins/concurrent/concurrent.spec.js +99 -99
- package/cjs/plugins/keepalive/keepalive.request.js +7 -12
- package/cjs/plugins/keepalive/keepalive.spec.js +32 -34
- package/cjs/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
- package/cjs/plugins/mock-intercept/mock-intercept.spec.js +247 -239
- package/cjs/plugins/perf-metric/perf-metric.fetch.js +11 -18
- package/cjs/plugins/retry/retry.fetch.js +18 -27
- package/cjs/plugins/retry/retry.spec.js +233 -225
- package/cjs/plugins/timeout/timeout.fetch.js +13 -19
- package/cjs/plugins/timeout/timeout.spec.js +211 -205
- package/cjs/plugins/wait-for/wait-for.fetch.js +19 -29
- package/cjs/plugins/wait-for/wait-for.spec.js +211 -203
- package/esm2015/api-fetch-client.js +18 -22
- package/esm2015/plugins/abort/abort.spec.js +83 -81
- package/esm2015/plugins/concurrent/concurrent.fetch.js +12 -20
- package/esm2015/plugins/concurrent/concurrent.spec.js +99 -99
- package/esm2015/plugins/keepalive/keepalive.request.js +7 -12
- package/esm2015/plugins/keepalive/keepalive.spec.js +32 -34
- package/esm2015/plugins/mock-intercept/mock-intercept.fetch.js +15 -22
- package/esm2015/plugins/mock-intercept/mock-intercept.spec.js +247 -239
- package/esm2015/plugins/perf-metric/perf-metric.fetch.js +11 -18
- package/esm2015/plugins/retry/retry.fetch.js +18 -27
- package/esm2015/plugins/retry/retry.spec.js +233 -225
- package/esm2015/plugins/timeout/timeout.fetch.js +13 -19
- package/esm2015/plugins/timeout/timeout.spec.js +211 -205
- package/esm2015/plugins/wait-for/wait-for.fetch.js +19 -29
- package/esm2015/plugins/wait-for/wait-for.spec.js +211 -203
- package/package.json +15 -15
- package/schematics/ng-add/index.d.ts.map +1 -1
- package/schematics/ng-add/index.js +11 -21
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/migration/import-map.js.map +1 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/src/api-fetch-client.d.ts +1 -1
- package/src/api-fetch-client.d.ts.map +1 -1
- package/src/api-fetch-client.js +2 -1
- package/src/api-fetch-client.js.map +1 -1
|
@@ -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,
|
|
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,
|
|
@@ -247,23 +243,23 @@ function _ts_generator(thisArg, body) {
|
|
|
247
243
|
{
|
|
248
244
|
key: "load",
|
|
249
245
|
value: /** @inheritDoc */ function load(context) {
|
|
250
|
-
var data;
|
|
251
246
|
var _this = this;
|
|
247
|
+
var data;
|
|
252
248
|
return {
|
|
253
249
|
// eslint-disable-next-line no-async-promise-executor -- all await are handled with a try-catch block
|
|
254
250
|
canStart: function() {
|
|
255
|
-
return new Promise(
|
|
256
|
-
|
|
251
|
+
return new Promise(function(resolve) {
|
|
252
|
+
return _async_to_generator(function() {
|
|
257
253
|
var didTimeOut, timer, canStartCondition, canStart, e;
|
|
258
254
|
return _ts_generator(this, function(_state) {
|
|
259
255
|
switch(_state.label){
|
|
260
256
|
case 0:
|
|
261
257
|
didTimeOut = false;
|
|
262
|
-
if (
|
|
258
|
+
if (this.timeout) {
|
|
263
259
|
timer = setTimeout(function() {
|
|
264
260
|
didTimeOut = true;
|
|
265
261
|
resolve(false);
|
|
266
|
-
},
|
|
262
|
+
}, this.timeout);
|
|
267
263
|
}
|
|
268
264
|
_state.label = 1;
|
|
269
265
|
case 1:
|
|
@@ -275,7 +271,7 @@ function _ts_generator(thisArg, body) {
|
|
|
275
271
|
]);
|
|
276
272
|
return [
|
|
277
273
|
4,
|
|
278
|
-
|
|
274
|
+
this.canStartCondition(context)
|
|
279
275
|
];
|
|
280
276
|
case 2:
|
|
281
277
|
canStartCondition = _state.sent();
|
|
@@ -315,19 +311,16 @@ function _ts_generator(thisArg, body) {
|
|
|
315
311
|
];
|
|
316
312
|
}
|
|
317
313
|
});
|
|
318
|
-
});
|
|
319
|
-
|
|
320
|
-
return _ref.apply(this, arguments);
|
|
321
|
-
};
|
|
322
|
-
}());
|
|
314
|
+
}).call(_this);
|
|
315
|
+
});
|
|
323
316
|
},
|
|
324
|
-
transform:
|
|
325
|
-
|
|
317
|
+
transform: function(fetchCall) {
|
|
318
|
+
return _async_to_generator(function() {
|
|
326
319
|
var response, e;
|
|
327
320
|
return _ts_generator(this, function(_state) {
|
|
328
321
|
switch(_state.label){
|
|
329
322
|
case 0:
|
|
330
|
-
if (!
|
|
323
|
+
if (!this.callback) {
|
|
331
324
|
return [
|
|
332
325
|
2,
|
|
333
326
|
fetchCall
|
|
@@ -347,7 +340,7 @@ function _ts_generator(thisArg, body) {
|
|
|
347
340
|
];
|
|
348
341
|
case 2:
|
|
349
342
|
response = _state.sent();
|
|
350
|
-
|
|
343
|
+
this.callback(_object_spread_props(_object_spread({}, context), {
|
|
351
344
|
data: data
|
|
352
345
|
}), fetchCall, response);
|
|
353
346
|
return [
|
|
@@ -356,7 +349,7 @@ function _ts_generator(thisArg, body) {
|
|
|
356
349
|
];
|
|
357
350
|
case 3:
|
|
358
351
|
e = _state.sent();
|
|
359
|
-
|
|
352
|
+
this.callback(_object_spread_props(_object_spread({}, context), {
|
|
360
353
|
data: data
|
|
361
354
|
}), fetchCall, response);
|
|
362
355
|
throw e;
|
|
@@ -366,11 +359,8 @@ function _ts_generator(thisArg, body) {
|
|
|
366
359
|
];
|
|
367
360
|
}
|
|
368
361
|
});
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
return _ref.apply(this, arguments);
|
|
372
|
-
};
|
|
373
|
-
}()
|
|
362
|
+
}).call(_this);
|
|
363
|
+
}
|
|
374
364
|
};
|
|
375
365
|
}
|
|
376
366
|
}
|
|
@@ -80,7 +80,7 @@ function _object_spread_props(target, source) {
|
|
|
80
80
|
return target;
|
|
81
81
|
}
|
|
82
82
|
function _ts_generator(thisArg, body) {
|
|
83
|
-
var f, y, t,
|
|
83
|
+
var f, y, t, _ = {
|
|
84
84
|
label: 0,
|
|
85
85
|
sent: function() {
|
|
86
86
|
if (t[0] & 1) throw t[1];
|
|
@@ -88,12 +88,8 @@ function _ts_generator(thisArg, body) {
|
|
|
88
88
|
},
|
|
89
89
|
trys: [],
|
|
90
90
|
ops: []
|
|
91
|
-
};
|
|
92
|
-
return g = {
|
|
93
|
-
next: verb(0),
|
|
94
|
-
"throw": verb(1),
|
|
95
|
-
"return": verb(2)
|
|
96
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
91
|
+
}, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
92
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
97
93
|
return this;
|
|
98
94
|
}), g;
|
|
99
95
|
function verb(n) {
|
|
@@ -106,7 +102,7 @@ function _ts_generator(thisArg, body) {
|
|
|
106
102
|
}
|
|
107
103
|
function step(op) {
|
|
108
104
|
if (f) throw new TypeError("Generator is already executing.");
|
|
109
|
-
while(_)try {
|
|
105
|
+
while(g && (g = 0, op[0] && (_ = 0)), _)try {
|
|
110
106
|
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;
|
|
111
107
|
if (y = 0, t) op = [
|
|
112
108
|
op[0] & 2,
|
|
@@ -177,203 +173,215 @@ function _ts_generator(thisArg, body) {
|
|
|
177
173
|
import { WaitForFetch } from './wait-for.fetch';
|
|
178
174
|
describe('Wait For Fetch Plugin', function() {
|
|
179
175
|
var defaultContext = {};
|
|
180
|
-
it('should not start if timeout',
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
runner.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
176
|
+
it('should not start if timeout', function() {
|
|
177
|
+
return _async_to_generator(function() {
|
|
178
|
+
var plugin, runner, canStart;
|
|
179
|
+
return _ts_generator(this, function(_state) {
|
|
180
|
+
switch(_state.label){
|
|
181
|
+
case 0:
|
|
182
|
+
plugin = new WaitForFetch(function() {
|
|
183
|
+
return {
|
|
184
|
+
result: new Promise(function(resolve) {
|
|
185
|
+
return setTimeout(function() {
|
|
186
|
+
return resolve(true);
|
|
187
|
+
}, 2000);
|
|
188
|
+
})
|
|
189
|
+
};
|
|
190
|
+
}, 100);
|
|
191
|
+
runner = plugin.load(defaultContext);
|
|
192
|
+
canStart = runner.canStart();
|
|
193
|
+
return [
|
|
194
|
+
4,
|
|
195
|
+
jest.runAllTimersAsync()
|
|
196
|
+
];
|
|
197
|
+
case 1:
|
|
198
|
+
_state.sent();
|
|
199
|
+
return [
|
|
200
|
+
4,
|
|
201
|
+
canStart
|
|
202
|
+
];
|
|
203
|
+
case 2:
|
|
204
|
+
expect.apply(void 0, [
|
|
205
|
+
_state.sent()
|
|
206
|
+
]).toBe(false);
|
|
207
|
+
return [
|
|
208
|
+
2
|
|
209
|
+
];
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
})();
|
|
213
|
+
});
|
|
214
|
+
it('should start if promise condition passed', function() {
|
|
215
|
+
return _async_to_generator(function() {
|
|
216
|
+
var plugin, runner, canStart;
|
|
217
|
+
return _ts_generator(this, function(_state) {
|
|
218
|
+
switch(_state.label){
|
|
219
|
+
case 0:
|
|
220
|
+
plugin = new WaitForFetch(function() {
|
|
221
|
+
return {
|
|
222
|
+
result: Promise.resolve(true)
|
|
223
|
+
};
|
|
224
|
+
}, 100);
|
|
225
|
+
runner = plugin.load(defaultContext);
|
|
226
|
+
return [
|
|
227
|
+
4,
|
|
228
|
+
runner.canStart()
|
|
229
|
+
];
|
|
230
|
+
case 1:
|
|
231
|
+
canStart = _state.sent();
|
|
232
|
+
expect(canStart).toBe(true);
|
|
233
|
+
return [
|
|
234
|
+
2
|
|
235
|
+
];
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
})();
|
|
239
|
+
});
|
|
240
|
+
it('should start if condition passed', function() {
|
|
241
|
+
return _async_to_generator(function() {
|
|
242
|
+
var plugin, runner, canStart;
|
|
243
|
+
return _ts_generator(this, function(_state) {
|
|
244
|
+
switch(_state.label){
|
|
245
|
+
case 0:
|
|
246
|
+
plugin = new WaitForFetch(function() {
|
|
247
|
+
return {
|
|
248
|
+
result: true
|
|
249
|
+
};
|
|
250
|
+
}, 100);
|
|
251
|
+
runner = plugin.load(defaultContext);
|
|
252
|
+
return [
|
|
253
|
+
4,
|
|
254
|
+
runner.canStart()
|
|
255
|
+
];
|
|
256
|
+
case 1:
|
|
257
|
+
canStart = _state.sent();
|
|
258
|
+
expect(canStart).toBe(true);
|
|
259
|
+
return [
|
|
260
|
+
2
|
|
261
|
+
];
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
})();
|
|
265
|
+
});
|
|
266
|
+
it('should call the callback function on success', function() {
|
|
267
|
+
return _async_to_generator(function() {
|
|
268
|
+
var callback, plugin, runner, response, fetchCall;
|
|
269
|
+
return _ts_generator(this, function(_state) {
|
|
270
|
+
switch(_state.label){
|
|
271
|
+
case 0:
|
|
272
|
+
callback = jest.fn();
|
|
273
|
+
plugin = new WaitForFetch(function() {
|
|
274
|
+
return {
|
|
275
|
+
result: true
|
|
276
|
+
};
|
|
277
|
+
}, 100, callback);
|
|
278
|
+
runner = plugin.load(defaultContext);
|
|
279
|
+
response = {
|
|
280
|
+
test: true
|
|
248
281
|
};
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
})
|
|
264
|
-
it('should call the callback function
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
282
|
+
fetchCall = Promise.resolve(response);
|
|
283
|
+
return [
|
|
284
|
+
4,
|
|
285
|
+
runner.transform(fetchCall)
|
|
286
|
+
];
|
|
287
|
+
case 1:
|
|
288
|
+
_state.sent();
|
|
289
|
+
expect(callback).toHaveBeenCalledWith(expect.objectContaining(defaultContext), fetchCall, response);
|
|
290
|
+
return [
|
|
291
|
+
2
|
|
292
|
+
];
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
})();
|
|
296
|
+
});
|
|
297
|
+
it('should call the callback function with the correct data', function() {
|
|
298
|
+
return _async_to_generator(function() {
|
|
299
|
+
var callback, plugin, runner, response, fetchCall;
|
|
300
|
+
return _ts_generator(this, function(_state) {
|
|
301
|
+
switch(_state.label){
|
|
302
|
+
case 0:
|
|
303
|
+
callback = jest.fn();
|
|
304
|
+
plugin = new WaitForFetch(function() {
|
|
305
|
+
return {
|
|
306
|
+
result: true,
|
|
307
|
+
data: 'test'
|
|
308
|
+
};
|
|
309
|
+
}, 100, callback);
|
|
310
|
+
runner = plugin.load(defaultContext);
|
|
311
|
+
response = {
|
|
312
|
+
test: true
|
|
273
313
|
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
2
|
|
289
|
-
];
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
}));
|
|
293
|
-
it('should call the callback function with the correct data', /*#__PURE__*/ _async_to_generator(function() {
|
|
294
|
-
var callback, plugin, runner, response, fetchCall;
|
|
295
|
-
return _ts_generator(this, function(_state) {
|
|
296
|
-
switch(_state.label){
|
|
297
|
-
case 0:
|
|
298
|
-
callback = jest.fn();
|
|
299
|
-
plugin = new WaitForFetch(function() {
|
|
300
|
-
return {
|
|
301
|
-
result: true,
|
|
314
|
+
fetchCall = Promise.resolve(response);
|
|
315
|
+
return [
|
|
316
|
+
4,
|
|
317
|
+
runner.canStart()
|
|
318
|
+
];
|
|
319
|
+
case 1:
|
|
320
|
+
_state.sent();
|
|
321
|
+
return [
|
|
322
|
+
4,
|
|
323
|
+
runner.transform(fetchCall)
|
|
324
|
+
];
|
|
325
|
+
case 2:
|
|
326
|
+
_state.sent();
|
|
327
|
+
expect(callback).toHaveBeenCalledWith(expect.objectContaining(_object_spread_props(_object_spread({}, defaultContext), {
|
|
302
328
|
data: 'test'
|
|
329
|
+
})), fetchCall, response);
|
|
330
|
+
return [
|
|
331
|
+
2
|
|
332
|
+
];
|
|
333
|
+
}
|
|
334
|
+
});
|
|
335
|
+
})();
|
|
336
|
+
});
|
|
337
|
+
it('should call the callback function on failure', function() {
|
|
338
|
+
return _async_to_generator(function() {
|
|
339
|
+
var callback, plugin, runner, response, fetchCall, e;
|
|
340
|
+
return _ts_generator(this, function(_state) {
|
|
341
|
+
switch(_state.label){
|
|
342
|
+
case 0:
|
|
343
|
+
callback = jest.fn();
|
|
344
|
+
plugin = new WaitForFetch(function() {
|
|
345
|
+
return {
|
|
346
|
+
result: true
|
|
347
|
+
};
|
|
348
|
+
}, 100, callback);
|
|
349
|
+
runner = plugin.load(defaultContext);
|
|
350
|
+
response = {
|
|
351
|
+
test: true
|
|
303
352
|
};
|
|
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
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
return {
|
|
339
|
-
result: true
|
|
340
|
-
};
|
|
341
|
-
}, 100, callback);
|
|
342
|
-
runner = plugin.load(defaultContext);
|
|
343
|
-
response = {
|
|
344
|
-
test: true
|
|
345
|
-
};
|
|
346
|
-
fetchCall = Promise.reject(new Error(JSON.stringify(response)));
|
|
347
|
-
_state.label = 1;
|
|
348
|
-
case 1:
|
|
349
|
-
_state.trys.push([
|
|
350
|
-
1,
|
|
351
|
-
3,
|
|
352
|
-
,
|
|
353
|
-
4
|
|
354
|
-
]);
|
|
355
|
-
return [
|
|
356
|
-
4,
|
|
357
|
-
runner.transform(fetchCall)
|
|
358
|
-
];
|
|
359
|
-
case 2:
|
|
360
|
-
_state.sent();
|
|
361
|
-
return [
|
|
362
|
-
3,
|
|
363
|
-
4
|
|
364
|
-
];
|
|
365
|
-
case 3:
|
|
366
|
-
e = _state.sent();
|
|
367
|
-
return [
|
|
368
|
-
3,
|
|
369
|
-
4
|
|
370
|
-
];
|
|
371
|
-
case 4:
|
|
372
|
-
expect(callback).toHaveBeenCalledWith(expect.objectContaining(defaultContext), fetchCall, undefined);
|
|
373
|
-
return [
|
|
374
|
-
2
|
|
375
|
-
];
|
|
376
|
-
}
|
|
377
|
-
});
|
|
378
|
-
}));
|
|
353
|
+
fetchCall = Promise.reject(new Error(JSON.stringify(response)));
|
|
354
|
+
_state.label = 1;
|
|
355
|
+
case 1:
|
|
356
|
+
_state.trys.push([
|
|
357
|
+
1,
|
|
358
|
+
3,
|
|
359
|
+
,
|
|
360
|
+
4
|
|
361
|
+
]);
|
|
362
|
+
return [
|
|
363
|
+
4,
|
|
364
|
+
runner.transform(fetchCall)
|
|
365
|
+
];
|
|
366
|
+
case 2:
|
|
367
|
+
_state.sent();
|
|
368
|
+
return [
|
|
369
|
+
3,
|
|
370
|
+
4
|
|
371
|
+
];
|
|
372
|
+
case 3:
|
|
373
|
+
e = _state.sent();
|
|
374
|
+
return [
|
|
375
|
+
3,
|
|
376
|
+
4
|
|
377
|
+
];
|
|
378
|
+
case 4:
|
|
379
|
+
expect(callback).toHaveBeenCalledWith(expect.objectContaining(defaultContext), fetchCall, undefined);
|
|
380
|
+
return [
|
|
381
|
+
2
|
|
382
|
+
];
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
})();
|
|
386
|
+
});
|
|
379
387
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ama-sdk/client-fetch",
|
|
3
|
-
"version": "12.3.0-
|
|
3
|
+
"version": "12.3.0-rc.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,17 +38,18 @@
|
|
|
38
38
|
"build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@o3r/schematics": "^12.3.0-rc.0",
|
|
41
42
|
"@swc/helpers": "~0.5.0",
|
|
42
43
|
"ts-node": "~10.9.2",
|
|
43
44
|
"tslib": "^2.6.2",
|
|
44
45
|
"uuid": "^11.0.5"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
|
-
"@ama-sdk/core": "^12.3.0-
|
|
48
|
+
"@ama-sdk/core": "^12.3.0-rc.0",
|
|
48
49
|
"@angular-devkit/schematics": "^19.0.0",
|
|
49
50
|
"@angular/cli": "^19.0.0",
|
|
50
51
|
"@angular/common": "^19.0.0",
|
|
51
|
-
"@o3r/schematics": "^12.3.0-
|
|
52
|
+
"@o3r/schematics": "^12.3.0-rc.0",
|
|
52
53
|
"@schematics/angular": "^19.0.0",
|
|
53
54
|
"isomorphic-fetch": "^3.0.0",
|
|
54
55
|
"typescript": "^5.5.4"
|
|
@@ -77,30 +78,29 @@
|
|
|
77
78
|
}
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
|
-
"@ama-sdk/core": "^12.3.0-
|
|
81
|
+
"@ama-sdk/core": "^12.3.0-rc.0",
|
|
81
82
|
"@angular-devkit/core": "~19.2.0",
|
|
82
83
|
"@angular-devkit/schematics": "~19.2.0",
|
|
83
84
|
"@angular/common": "~19.2.0",
|
|
84
85
|
"@angular/core": "~19.2.0",
|
|
85
86
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
86
|
-
"@nx/eslint-plugin": "~20.
|
|
87
|
-
"@nx/jest": "~20.
|
|
88
|
-
"@o3r/build-helpers": "^12.3.0-
|
|
89
|
-
"@o3r/eslint-plugin": "^12.3.0-
|
|
90
|
-
"@o3r/
|
|
91
|
-
"@o3r/test-helpers": "^12.3.0-prerelease.8",
|
|
87
|
+
"@nx/eslint-plugin": "~20.8.0",
|
|
88
|
+
"@nx/jest": "~20.8.0",
|
|
89
|
+
"@o3r/build-helpers": "^12.3.0-rc.0",
|
|
90
|
+
"@o3r/eslint-plugin": "^12.3.0-rc.0",
|
|
91
|
+
"@o3r/test-helpers": "^12.3.0-rc.0",
|
|
92
92
|
"@schematics/angular": "~19.2.0",
|
|
93
93
|
"@stylistic/eslint-plugin": "~3.1.0",
|
|
94
94
|
"@stylistic/eslint-plugin-ts": "~3.1.0",
|
|
95
|
-
"@swc/cli": "~0.
|
|
95
|
+
"@swc/cli": "~0.7.7",
|
|
96
96
|
"@swc/core": "~1.11.0",
|
|
97
97
|
"@types/jest": "~29.5.2",
|
|
98
98
|
"@types/node": "^20.0.0",
|
|
99
99
|
"@types/uuid": "^10.0.0",
|
|
100
|
-
"@typescript-eslint/parser": "~8.
|
|
101
|
-
"angular-eslint": "~19.
|
|
100
|
+
"@typescript-eslint/parser": "~8.32.0",
|
|
101
|
+
"angular-eslint": "~19.4.0",
|
|
102
102
|
"cpy-cli": "^5.0.0",
|
|
103
|
-
"eslint": "~9.
|
|
103
|
+
"eslint": "~9.26.0",
|
|
104
104
|
"eslint-import-resolver-node": "~0.3.9",
|
|
105
105
|
"eslint-import-resolver-typescript": "~3.10.0",
|
|
106
106
|
"eslint-plugin-import": "~2.31.0",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"ts-node": "~10.9.2",
|
|
124
124
|
"type-fest": "^4.30.1",
|
|
125
125
|
"typescript": "~5.8.2",
|
|
126
|
-
"typescript-eslint": "~8.
|
|
126
|
+
"typescript-eslint": "~8.32.0",
|
|
127
127
|
"zone.js": "~0.15.0"
|
|
128
128
|
},
|
|
129
129
|
"engines": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-add/index.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,IAAI,EACL,MAAM,4BAA4B,CAAC;AAkBpC,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAmDlB;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,qBAAqB,SAA2C,CAAC"}
|