@isdk/web-fetcher 0.2.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.
Files changed (66) hide show
  1. package/README.action.cn.md +469 -0
  2. package/README.action.md +452 -0
  3. package/README.cn.md +147 -0
  4. package/README.engine.cn.md +262 -0
  5. package/README.engine.md +262 -0
  6. package/README.md +147 -0
  7. package/dist/index.d.mts +1603 -0
  8. package/dist/index.d.ts +1603 -0
  9. package/dist/index.js +1 -0
  10. package/dist/index.mjs +1 -0
  11. package/docs/README.md +151 -0
  12. package/docs/_media/LICENSE-MIT +22 -0
  13. package/docs/_media/README.action.md +452 -0
  14. package/docs/_media/README.cn.md +147 -0
  15. package/docs/_media/README.engine.md +262 -0
  16. package/docs/classes/CheerioFetchEngine.md +1447 -0
  17. package/docs/classes/ClickAction.md +533 -0
  18. package/docs/classes/ExtractAction.md +533 -0
  19. package/docs/classes/FetchAction.md +444 -0
  20. package/docs/classes/FetchEngine.md +1230 -0
  21. package/docs/classes/FetchSession.md +111 -0
  22. package/docs/classes/FillAction.md +533 -0
  23. package/docs/classes/GetContentAction.md +533 -0
  24. package/docs/classes/GotoAction.md +537 -0
  25. package/docs/classes/PauseAction.md +533 -0
  26. package/docs/classes/PlaywrightFetchEngine.md +1437 -0
  27. package/docs/classes/SubmitAction.md +533 -0
  28. package/docs/classes/WaitForAction.md +533 -0
  29. package/docs/classes/WebFetcher.md +85 -0
  30. package/docs/enumerations/FetchActionResultStatus.md +40 -0
  31. package/docs/functions/fetchWeb.md +43 -0
  32. package/docs/globals.md +72 -0
  33. package/docs/interfaces/BaseFetchActionProperties.md +83 -0
  34. package/docs/interfaces/BaseFetchCollectorActionProperties.md +145 -0
  35. package/docs/interfaces/BaseFetcherProperties.md +206 -0
  36. package/docs/interfaces/Cookie.md +142 -0
  37. package/docs/interfaces/DispatchedEngineAction.md +60 -0
  38. package/docs/interfaces/ExtractActionProperties.md +113 -0
  39. package/docs/interfaces/FetchActionInContext.md +149 -0
  40. package/docs/interfaces/FetchActionProperties.md +125 -0
  41. package/docs/interfaces/FetchActionResult.md +55 -0
  42. package/docs/interfaces/FetchContext.md +424 -0
  43. package/docs/interfaces/FetchEngineContext.md +328 -0
  44. package/docs/interfaces/FetchMetadata.md +73 -0
  45. package/docs/interfaces/FetchResponse.md +105 -0
  46. package/docs/interfaces/FetchReturnTypeRegistry.md +57 -0
  47. package/docs/interfaces/FetchSite.md +320 -0
  48. package/docs/interfaces/FetcherOptions.md +300 -0
  49. package/docs/interfaces/GotoActionOptions.md +66 -0
  50. package/docs/interfaces/PendingEngineRequest.md +51 -0
  51. package/docs/interfaces/SubmitActionOptions.md +23 -0
  52. package/docs/interfaces/WaitForActionOptions.md +39 -0
  53. package/docs/type-aliases/BaseFetchActionOptions.md +11 -0
  54. package/docs/type-aliases/BaseFetchCollectorOptions.md +11 -0
  55. package/docs/type-aliases/BrowserEngine.md +11 -0
  56. package/docs/type-aliases/FetchActionCapabilities.md +11 -0
  57. package/docs/type-aliases/FetchActionCapabilityMode.md +11 -0
  58. package/docs/type-aliases/FetchActionOptions.md +11 -0
  59. package/docs/type-aliases/FetchEngineAction.md +18 -0
  60. package/docs/type-aliases/FetchEngineType.md +11 -0
  61. package/docs/type-aliases/FetchReturnType.md +11 -0
  62. package/docs/type-aliases/FetchReturnTypeFor.md +17 -0
  63. package/docs/type-aliases/OnFetchPauseCallback.md +23 -0
  64. package/docs/type-aliases/ResourceType.md +11 -0
  65. package/docs/variables/DefaultFetcherProperties.md +11 -0
  66. package/package.json +90 -0
@@ -0,0 +1,533 @@
1
+ [**@isdk/web-fetcher**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/web-fetcher](../globals.md) / WaitForAction
6
+
7
+ # Class: WaitForAction
8
+
9
+ Defined in: [packages/web-fetcher/src/action/definitions/wait-for.ts:4](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/definitions/wait-for.ts#L4)
10
+
11
+ ## Extends
12
+
13
+ - [`FetchAction`](FetchAction.md)
14
+
15
+ ## Constructors
16
+
17
+ ### Constructor
18
+
19
+ > **new WaitForAction**(): `WaitForAction`
20
+
21
+ #### Returns
22
+
23
+ `WaitForAction`
24
+
25
+ #### Inherited from
26
+
27
+ [`FetchAction`](FetchAction.md).[`constructor`](FetchAction.md#constructor)
28
+
29
+ ## Properties
30
+
31
+ ### capabilities
32
+
33
+ > `static` **capabilities**: `object`
34
+
35
+ Defined in: [packages/web-fetcher/src/action/definitions/wait-for.ts:7](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/definitions/wait-for.ts#L7)
36
+
37
+ #### browser
38
+
39
+ > **browser**: `"native"`
40
+
41
+ #### http
42
+
43
+ > **http**: `"native"`
44
+
45
+ #### Overrides
46
+
47
+ [`FetchAction`](FetchAction.md).[`capabilities`](FetchAction.md#capabilities)
48
+
49
+ ***
50
+
51
+ ### id
52
+
53
+ > `static` **id**: `string` = `'waitFor'`
54
+
55
+ Defined in: [packages/web-fetcher/src/action/definitions/wait-for.ts:5](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/definitions/wait-for.ts#L5)
56
+
57
+ #### Overrides
58
+
59
+ [`FetchAction`](FetchAction.md).[`id`](FetchAction.md#id)
60
+
61
+ ***
62
+
63
+ ### returnType
64
+
65
+ > `static` **returnType**: `"none"`
66
+
67
+ Defined in: [packages/web-fetcher/src/action/definitions/wait-for.ts:6](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/definitions/wait-for.ts#L6)
68
+
69
+ #### Overrides
70
+
71
+ [`FetchAction`](FetchAction.md).[`returnType`](FetchAction.md#returntype)
72
+
73
+ ## Accessors
74
+
75
+ ### capabilities
76
+
77
+ #### Get Signature
78
+
79
+ > **get** **capabilities**(): [`FetchActionCapabilities`](../type-aliases/FetchActionCapabilities.md)
80
+
81
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:137](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L137)
82
+
83
+ ##### Returns
84
+
85
+ [`FetchActionCapabilities`](../type-aliases/FetchActionCapabilities.md)
86
+
87
+ #### Inherited from
88
+
89
+ [`FetchAction`](FetchAction.md).[`capabilities`](FetchAction.md#capabilities-1)
90
+
91
+ ***
92
+
93
+ ### id
94
+
95
+ #### Get Signature
96
+
97
+ > **get** **id**(): `string`
98
+
99
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:129](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L129)
100
+
101
+ ##### Returns
102
+
103
+ `string`
104
+
105
+ #### Inherited from
106
+
107
+ [`FetchAction`](FetchAction.md).[`id`](FetchAction.md#id-1)
108
+
109
+ ***
110
+
111
+ ### returnType
112
+
113
+ #### Get Signature
114
+
115
+ > **get** **returnType**(): [`FetchReturnType`](../type-aliases/FetchReturnType.md)
116
+
117
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:133](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L133)
118
+
119
+ ##### Returns
120
+
121
+ [`FetchReturnType`](../type-aliases/FetchReturnType.md)
122
+
123
+ #### Inherited from
124
+
125
+ [`FetchAction`](FetchAction.md).[`returnType`](FetchAction.md#returntype-1)
126
+
127
+ ## Methods
128
+
129
+ ### afterExec()
130
+
131
+ > **afterExec**(`context`, `options?`, `result?`, `scope?`): `Promise`\<`void`\>
132
+
133
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:311](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L311)
134
+
135
+ Action 结束生命周期
136
+ 负责:调用钩子、赋值lastResult, 触发事件、清理 stack、恢复 currentAction
137
+
138
+ #### Parameters
139
+
140
+ ##### context
141
+
142
+ [`FetchContext`](../interfaces/FetchContext.md)
143
+
144
+ ##### options?
145
+
146
+ [`BaseFetchCollectorActionProperties`](../interfaces/BaseFetchCollectorActionProperties.md)
147
+
148
+ ##### result?
149
+
150
+ [`FetchActionResult`](../interfaces/FetchActionResult.md)\<[`FetchReturnType`](../type-aliases/FetchReturnType.md)\>
151
+
152
+ ##### scope?
153
+
154
+ ###### collectors?
155
+
156
+ `CollectorsRuntime`
157
+
158
+ ###### entry
159
+
160
+ [`FetchActionInContext`](../interfaces/FetchActionInContext.md)
161
+
162
+ #### Returns
163
+
164
+ `Promise`\<`void`\>
165
+
166
+ #### Inherited from
167
+
168
+ [`FetchAction`](FetchAction.md).[`afterExec`](FetchAction.md#afterexec)
169
+
170
+ ***
171
+
172
+ ### beforeExec()
173
+
174
+ > **beforeExec**(`context`, `options?`): `Promise`\<\{ `collectors`: `undefined` \| `CollectorsRuntime`; `entry`: [`FetchActionInContext`](../interfaces/FetchActionInContext.md); \}\>
175
+
176
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:265](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L265)
177
+
178
+ Action 开始生命周期
179
+ 负责:初始化 stack、设置 currentAction、触发事件、调用钩子
180
+
181
+ #### Parameters
182
+
183
+ ##### context
184
+
185
+ [`FetchContext`](../interfaces/FetchContext.md)
186
+
187
+ ##### options?
188
+
189
+ [`FetchActionProperties`](../interfaces/FetchActionProperties.md)
190
+
191
+ #### Returns
192
+
193
+ `Promise`\<\{ `collectors`: `undefined` \| `CollectorsRuntime`; `entry`: [`FetchActionInContext`](../interfaces/FetchActionInContext.md); \}\>
194
+
195
+ #### Inherited from
196
+
197
+ [`FetchAction`](FetchAction.md).[`beforeExec`](FetchAction.md#beforeexec)
198
+
199
+ ***
200
+
201
+ ### delegateToEngine()
202
+
203
+ > `protected` **delegateToEngine**(`context`, `method`, ...`args`): `Promise`\<`any`\>
204
+
205
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:148](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L148)
206
+
207
+ #### Parameters
208
+
209
+ ##### context
210
+
211
+ [`FetchContext`](../interfaces/FetchContext.md)
212
+
213
+ ##### method
214
+
215
+ keyof [`FetchEngine`](FetchEngine.md)\<`any`, `any`, `any`\>
216
+
217
+ ##### args
218
+
219
+ ...`any`[]
220
+
221
+ #### Returns
222
+
223
+ `Promise`\<`any`\>
224
+
225
+ #### Inherited from
226
+
227
+ [`FetchAction`](FetchAction.md).[`delegateToEngine`](FetchAction.md#delegatetoengine)
228
+
229
+ ***
230
+
231
+ ### execute()
232
+
233
+ > **execute**\<`R`\>(`context`, `options?`): `Promise`\<[`FetchActionResult`](../interfaces/FetchActionResult.md)\<`R`\>\>
234
+
235
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:363](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L363)
236
+
237
+ #### Type Parameters
238
+
239
+ ##### R
240
+
241
+ `R` *extends* [`FetchReturnType`](../type-aliases/FetchReturnType.md) = `"any"`
242
+
243
+ #### Parameters
244
+
245
+ ##### context
246
+
247
+ [`FetchContext`](../interfaces/FetchContext.md)
248
+
249
+ ##### options?
250
+
251
+ [`FetchActionProperties`](../interfaces/FetchActionProperties.md)
252
+
253
+ #### Returns
254
+
255
+ `Promise`\<[`FetchActionResult`](../interfaces/FetchActionResult.md)\<`R`\>\>
256
+
257
+ #### Inherited from
258
+
259
+ [`FetchAction`](FetchAction.md).[`execute`](FetchAction.md#execute)
260
+
261
+ ***
262
+
263
+ ### getCapability()
264
+
265
+ > **getCapability**(`mode?`): [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
266
+
267
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:124](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L124)
268
+
269
+ #### Parameters
270
+
271
+ ##### mode?
272
+
273
+ [`FetchEngineType`](../type-aliases/FetchEngineType.md)
274
+
275
+ #### Returns
276
+
277
+ [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
278
+
279
+ #### Inherited from
280
+
281
+ [`FetchAction`](FetchAction.md).[`getCapability`](FetchAction.md#getcapability)
282
+
283
+ ***
284
+
285
+ ### installCollectors()
286
+
287
+ > `protected` **installCollectors**(`context`, `options?`): `undefined` \| `CollectorsRuntime`
288
+
289
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:165](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L165)
290
+
291
+ #### Parameters
292
+
293
+ ##### context
294
+
295
+ [`FetchContext`](../interfaces/FetchContext.md)
296
+
297
+ ##### options?
298
+
299
+ [`FetchActionProperties`](../interfaces/FetchActionProperties.md)
300
+
301
+ #### Returns
302
+
303
+ `undefined` \| `CollectorsRuntime`
304
+
305
+ #### Inherited from
306
+
307
+ [`FetchAction`](FetchAction.md).[`installCollectors`](FetchAction.md#installcollectors)
308
+
309
+ ***
310
+
311
+ ### onAfterExec()?
312
+
313
+ > `protected` `optional` **onAfterExec**(`context`, `options?`): `void` \| `Promise`\<`void`\>
314
+
315
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:143](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L143)
316
+
317
+ #### Parameters
318
+
319
+ ##### context
320
+
321
+ [`FetchContext`](../interfaces/FetchContext.md)
322
+
323
+ ##### options?
324
+
325
+ [`FetchActionProperties`](../interfaces/FetchActionProperties.md)
326
+
327
+ #### Returns
328
+
329
+ `void` \| `Promise`\<`void`\>
330
+
331
+ #### Inherited from
332
+
333
+ [`FetchAction`](FetchAction.md).[`onAfterExec`](FetchAction.md#onafterexec)
334
+
335
+ ***
336
+
337
+ ### onBeforeExec()?
338
+
339
+ > `protected` `optional` **onBeforeExec**(`context`, `options?`): `void` \| `Promise`\<`void`\>
340
+
341
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:142](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L142)
342
+
343
+ #### Parameters
344
+
345
+ ##### context
346
+
347
+ [`FetchContext`](../interfaces/FetchContext.md)
348
+
349
+ ##### options?
350
+
351
+ [`FetchActionProperties`](../interfaces/FetchActionProperties.md)
352
+
353
+ #### Returns
354
+
355
+ `void` \| `Promise`\<`void`\>
356
+
357
+ #### Inherited from
358
+
359
+ [`FetchAction`](FetchAction.md).[`onBeforeExec`](FetchAction.md#onbeforeexec)
360
+
361
+ ***
362
+
363
+ ### onExecute()
364
+
365
+ > **onExecute**(`context`, `options?`): `Promise`\<`void`\>
366
+
367
+ Defined in: [packages/web-fetcher/src/action/definitions/wait-for.ts:9](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/definitions/wait-for.ts#L9)
368
+
369
+ #### Parameters
370
+
371
+ ##### context
372
+
373
+ [`FetchContext`](../interfaces/FetchContext.md)
374
+
375
+ ##### options?
376
+
377
+ [`BaseFetchActionProperties`](../interfaces/BaseFetchActionProperties.md)
378
+
379
+ #### Returns
380
+
381
+ `Promise`\<`void`\>
382
+
383
+ #### Overrides
384
+
385
+ [`FetchAction`](FetchAction.md).[`onExecute`](FetchAction.md#onexecute)
386
+
387
+ ***
388
+
389
+ ### create()
390
+
391
+ #### Call Signature
392
+
393
+ > `static` **create**(`id`): `undefined` \| [`FetchAction`](FetchAction.md)
394
+
395
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:98](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L98)
396
+
397
+ ##### Parameters
398
+
399
+ ###### id
400
+
401
+ `_RequireAtLeastOne`
402
+
403
+ ##### Returns
404
+
405
+ `undefined` \| [`FetchAction`](FetchAction.md)
406
+
407
+ ##### Inherited from
408
+
409
+ [`FetchAction`](FetchAction.md).[`create`](FetchAction.md#create)
410
+
411
+ #### Call Signature
412
+
413
+ > `static` **create**(`id`): `undefined` \| [`FetchAction`](FetchAction.md)
414
+
415
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:99](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L99)
416
+
417
+ ##### Parameters
418
+
419
+ ###### id
420
+
421
+ `string`
422
+
423
+ ##### Returns
424
+
425
+ `undefined` \| [`FetchAction`](FetchAction.md)
426
+
427
+ ##### Inherited from
428
+
429
+ [`FetchAction`](FetchAction.md).[`create`](FetchAction.md#create)
430
+
431
+ ***
432
+
433
+ ### get()
434
+
435
+ > `static` **get**(`id`): `undefined` \| *typeof* [`FetchAction`](FetchAction.md)
436
+
437
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:94](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L94)
438
+
439
+ #### Parameters
440
+
441
+ ##### id
442
+
443
+ `string`
444
+
445
+ #### Returns
446
+
447
+ `undefined` \| *typeof* [`FetchAction`](FetchAction.md)
448
+
449
+ #### Inherited from
450
+
451
+ [`FetchAction`](FetchAction.md).[`get`](FetchAction.md#get)
452
+
453
+ ***
454
+
455
+ ### getCapability()
456
+
457
+ > `static` **getCapability**(`mode?`): [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
458
+
459
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:120](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L120)
460
+
461
+ #### Parameters
462
+
463
+ ##### mode?
464
+
465
+ [`FetchEngineType`](../type-aliases/FetchEngineType.md)
466
+
467
+ #### Returns
468
+
469
+ [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
470
+
471
+ #### Inherited from
472
+
473
+ [`FetchAction`](FetchAction.md).[`getCapability`](FetchAction.md#getcapability-2)
474
+
475
+ ***
476
+
477
+ ### has()
478
+
479
+ > `static` **has**(`name`): `boolean`
480
+
481
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:107](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L107)
482
+
483
+ #### Parameters
484
+
485
+ ##### name
486
+
487
+ `string`
488
+
489
+ #### Returns
490
+
491
+ `boolean`
492
+
493
+ #### Inherited from
494
+
495
+ [`FetchAction`](FetchAction.md).[`has`](FetchAction.md#has)
496
+
497
+ ***
498
+
499
+ ### list()
500
+
501
+ > `static` **list**(): `string`[]
502
+
503
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:111](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L111)
504
+
505
+ #### Returns
506
+
507
+ `string`[]
508
+
509
+ #### Inherited from
510
+
511
+ [`FetchAction`](FetchAction.md).[`list`](FetchAction.md#list)
512
+
513
+ ***
514
+
515
+ ### register()
516
+
517
+ > `static` **register**(`actionClass`): `void`
518
+
519
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:88](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L88)
520
+
521
+ #### Parameters
522
+
523
+ ##### actionClass
524
+
525
+ *typeof* [`FetchAction`](FetchAction.md)
526
+
527
+ #### Returns
528
+
529
+ `void`
530
+
531
+ #### Inherited from
532
+
533
+ [`FetchAction`](FetchAction.md).[`register`](FetchAction.md#register)
@@ -0,0 +1,85 @@
1
+ [**@isdk/web-fetcher**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/web-fetcher](../globals.md) / WebFetcher
6
+
7
+ # Class: WebFetcher
8
+
9
+ Defined in: [packages/web-fetcher/src/core/web-fetcher.ts:4](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/core/web-fetcher.ts#L4)
10
+
11
+ ## Constructors
12
+
13
+ ### Constructor
14
+
15
+ > **new WebFetcher**(`defaults`): `WebFetcher`
16
+
17
+ Defined in: [packages/web-fetcher/src/core/web-fetcher.ts:5](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/core/web-fetcher.ts#L5)
18
+
19
+ #### Parameters
20
+
21
+ ##### defaults
22
+
23
+ [`FetcherOptions`](../interfaces/FetcherOptions.md) = `{}`
24
+
25
+ #### Returns
26
+
27
+ `WebFetcher`
28
+
29
+ ## Methods
30
+
31
+ ### createSession()
32
+
33
+ > **createSession**(`options?`): `Promise`\<[`FetchSession`](FetchSession.md)\>
34
+
35
+ Defined in: [packages/web-fetcher/src/core/web-fetcher.ts:7](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/core/web-fetcher.ts#L7)
36
+
37
+ #### Parameters
38
+
39
+ ##### options?
40
+
41
+ [`FetcherOptions`](../interfaces/FetcherOptions.md)
42
+
43
+ #### Returns
44
+
45
+ `Promise`\<[`FetchSession`](FetchSession.md)\>
46
+
47
+ ***
48
+
49
+ ### fetch()
50
+
51
+ #### Call Signature
52
+
53
+ > **fetch**(`url`, `options?`): `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>
54
+
55
+ Defined in: [packages/web-fetcher/src/core/web-fetcher.ts:12](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/core/web-fetcher.ts#L12)
56
+
57
+ ##### Parameters
58
+
59
+ ###### url
60
+
61
+ `string`
62
+
63
+ ###### options?
64
+
65
+ [`FetcherOptions`](../interfaces/FetcherOptions.md)
66
+
67
+ ##### Returns
68
+
69
+ `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>
70
+
71
+ #### Call Signature
72
+
73
+ > **fetch**(`options`): `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>
74
+
75
+ Defined in: [packages/web-fetcher/src/core/web-fetcher.ts:13](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/core/web-fetcher.ts#L13)
76
+
77
+ ##### Parameters
78
+
79
+ ###### options
80
+
81
+ [`FetcherOptions`](../interfaces/FetcherOptions.md)
82
+
83
+ ##### Returns
84
+
85
+ `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>
@@ -0,0 +1,40 @@
1
+ [**@isdk/web-fetcher**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/web-fetcher](../globals.md) / FetchActionResultStatus
6
+
7
+ # Enumeration: FetchActionResultStatus
8
+
9
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:7](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L7)
10
+
11
+ ## Enumeration Members
12
+
13
+ ### Failed
14
+
15
+ > **Failed**: `0`
16
+
17
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:11](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L11)
18
+
19
+ 动作执行失败但未抛出(通常因 failOnError=false);错误信息在 error 字段
20
+
21
+ ***
22
+
23
+ ### Skipped
24
+
25
+ > **Skipped**: `2`
26
+
27
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:20](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L20)
28
+
29
+ 动作被判定为不执行/降级为 noop(比如引擎不支持且 degradeTo='noop')
30
+ 能力不支持且 degradeTo='noop' 时:status='skipped',warnings 增加 { code:'capability-not-supported' }
31
+
32
+ ***
33
+
34
+ ### Success
35
+
36
+ > **Success**: `1`
37
+
38
+ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:15](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/action/fetch-action.ts#L15)
39
+
40
+ 动作按预期完成(即便产生 warnings)
@@ -0,0 +1,43 @@
1
+ [**@isdk/web-fetcher**](../README.md)
2
+
3
+ ***
4
+
5
+ [@isdk/web-fetcher](../globals.md) / fetchWeb
6
+
7
+ # Function: fetchWeb()
8
+
9
+ ## Call Signature
10
+
11
+ > **fetchWeb**(`options`): `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>
12
+
13
+ Defined in: [packages/web-fetcher/src/fetch-web.ts:4](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/fetch-web.ts#L4)
14
+
15
+ ### Parameters
16
+
17
+ #### options
18
+
19
+ [`FetcherOptions`](../interfaces/FetcherOptions.md)
20
+
21
+ ### Returns
22
+
23
+ `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>
24
+
25
+ ## Call Signature
26
+
27
+ > **fetchWeb**(`url`, `options?`): `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>
28
+
29
+ Defined in: [packages/web-fetcher/src/fetch-web.ts:5](https://github.com/isdk/web-fetcher.js/blob/ef3a4e527bf3ca75213d55b02c017b9a30a036fd/src/fetch-web.ts#L5)
30
+
31
+ ### Parameters
32
+
33
+ #### url
34
+
35
+ `string`
36
+
37
+ #### options?
38
+
39
+ [`FetcherOptions`](../interfaces/FetcherOptions.md)
40
+
41
+ ### Returns
42
+
43
+ `Promise`\<\{ `outputs`: `Record`\<`string`, `any`\>; `result`: `undefined` \| [`FetchResponse`](../interfaces/FetchResponse.md); \}\>