@isdk/web-fetcher 0.2.12 → 0.3.1
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/README.action.cn.md +197 -155
- package/README.action.extract.cn.md +263 -0
- package/README.action.extract.md +263 -0
- package/README.action.md +202 -147
- package/README.cn.md +25 -15
- package/README.engine.cn.md +118 -14
- package/README.engine.md +115 -14
- package/README.md +19 -10
- package/dist/index.d.mts +667 -50
- package/dist/index.d.ts +667 -50
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/README.md +19 -10
- package/docs/_media/README.action.md +202 -147
- package/docs/_media/README.cn.md +25 -15
- package/docs/_media/README.engine.md +115 -14
- package/docs/classes/CheerioFetchEngine.md +805 -135
- package/docs/classes/ClickAction.md +33 -33
- package/docs/classes/EvaluateAction.md +559 -0
- package/docs/classes/ExtractAction.md +33 -33
- package/docs/classes/FetchAction.md +39 -33
- package/docs/classes/FetchEngine.md +660 -122
- package/docs/classes/FetchSession.md +38 -16
- package/docs/classes/FillAction.md +33 -33
- package/docs/classes/GetContentAction.md +33 -33
- package/docs/classes/GotoAction.md +33 -33
- package/docs/classes/KeyboardPressAction.md +533 -0
- package/docs/classes/KeyboardTypeAction.md +533 -0
- package/docs/classes/MouseClickAction.md +533 -0
- package/docs/classes/MouseMoveAction.md +533 -0
- package/docs/classes/PauseAction.md +33 -33
- package/docs/classes/PlaywrightFetchEngine.md +820 -122
- package/docs/classes/SubmitAction.md +33 -33
- package/docs/classes/TrimAction.md +533 -0
- package/docs/classes/WaitForAction.md +33 -33
- package/docs/classes/WebFetcher.md +9 -9
- package/docs/enumerations/FetchActionResultStatus.md +4 -4
- package/docs/functions/fetchWeb.md +6 -6
- package/docs/globals.md +14 -0
- package/docs/interfaces/BaseFetchActionProperties.md +12 -12
- package/docs/interfaces/BaseFetchCollectorActionProperties.md +16 -16
- package/docs/interfaces/BaseFetcherProperties.md +32 -28
- package/docs/interfaces/Cookie.md +14 -14
- package/docs/interfaces/DispatchedEngineAction.md +4 -4
- package/docs/interfaces/EvaluateActionOptions.md +81 -0
- package/docs/interfaces/ExtractActionProperties.md +12 -12
- package/docs/interfaces/FetchActionInContext.md +15 -15
- package/docs/interfaces/FetchActionProperties.md +13 -13
- package/docs/interfaces/FetchActionResult.md +6 -6
- package/docs/interfaces/FetchContext.md +42 -38
- package/docs/interfaces/FetchEngineContext.md +37 -33
- package/docs/interfaces/FetchMetadata.md +5 -5
- package/docs/interfaces/FetchResponse.md +14 -14
- package/docs/interfaces/FetchReturnTypeRegistry.md +8 -8
- package/docs/interfaces/FetchSite.md +35 -31
- package/docs/interfaces/FetcherOptions.md +34 -30
- package/docs/interfaces/GotoActionOptions.md +14 -6
- package/docs/interfaces/KeyboardPressParams.md +25 -0
- package/docs/interfaces/KeyboardTypeParams.md +25 -0
- package/docs/interfaces/MouseClickParams.md +49 -0
- package/docs/interfaces/MouseMoveParams.md +41 -0
- package/docs/interfaces/PendingEngineRequest.md +3 -3
- package/docs/interfaces/StorageOptions.md +5 -5
- package/docs/interfaces/SubmitActionOptions.md +2 -2
- package/docs/interfaces/TrimActionOptions.md +27 -0
- package/docs/interfaces/WaitForActionOptions.md +5 -5
- package/docs/type-aliases/BaseFetchActionOptions.md +1 -1
- package/docs/type-aliases/BaseFetchCollectorOptions.md +1 -1
- package/docs/type-aliases/BrowserEngine.md +1 -1
- package/docs/type-aliases/FetchActionCapabilities.md +1 -1
- package/docs/type-aliases/FetchActionCapabilityMode.md +1 -1
- package/docs/type-aliases/FetchActionOptions.md +1 -1
- package/docs/type-aliases/FetchEngineAction.md +2 -2
- package/docs/type-aliases/FetchEngineType.md +1 -1
- package/docs/type-aliases/FetchReturnType.md +1 -1
- package/docs/type-aliases/FetchReturnTypeFor.md +1 -1
- package/docs/type-aliases/OnFetchPauseCallback.md +1 -1
- package/docs/type-aliases/ResourceType.md +1 -1
- package/docs/type-aliases/TrimPreset.md +13 -0
- package/docs/variables/DefaultFetcherProperties.md +1 -1
- package/docs/variables/FetcherOptionKeys.md +1 -1
- package/docs/variables/TRIM_PRESETS.md +11 -0
- package/package.json +11 -11
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Class: ExtractAction
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:9](https://github.com/isdk/web-fetcher.js/blob/
|
|
9
|
+
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:9](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/definitions/extract.ts#L9)
|
|
10
10
|
|
|
11
11
|
## Extends
|
|
12
12
|
|
|
@@ -32,7 +32,7 @@ Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:9](https://g
|
|
|
32
32
|
|
|
33
33
|
> `static` **capabilities**: `object`
|
|
34
34
|
|
|
35
|
-
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:12](https://github.com/isdk/web-fetcher.js/blob/
|
|
35
|
+
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:12](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/definitions/extract.ts#L12)
|
|
36
36
|
|
|
37
37
|
#### browser
|
|
38
38
|
|
|
@@ -52,7 +52,7 @@ Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:12](https://
|
|
|
52
52
|
|
|
53
53
|
> `static` **id**: `string` = `'extract'`
|
|
54
54
|
|
|
55
|
-
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:10](https://github.com/isdk/web-fetcher.js/blob/
|
|
55
|
+
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:10](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/definitions/extract.ts#L10)
|
|
56
56
|
|
|
57
57
|
#### Overrides
|
|
58
58
|
|
|
@@ -64,7 +64,7 @@ Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:10](https://
|
|
|
64
64
|
|
|
65
65
|
> `static` **returnType**: `"any"`
|
|
66
66
|
|
|
67
|
-
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:11](https://github.com/isdk/web-fetcher.js/blob/
|
|
67
|
+
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:11](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/definitions/extract.ts#L11)
|
|
68
68
|
|
|
69
69
|
#### Overrides
|
|
70
70
|
|
|
@@ -78,7 +78,7 @@ Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:11](https://
|
|
|
78
78
|
|
|
79
79
|
> **get** **capabilities**(): [`FetchActionCapabilities`](../type-aliases/FetchActionCapabilities.md)
|
|
80
80
|
|
|
81
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:163](https://github.com/isdk/web-fetcher.js/blob/
|
|
81
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:163](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L163)
|
|
82
82
|
|
|
83
83
|
##### Returns
|
|
84
84
|
|
|
@@ -96,7 +96,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:163](https://github
|
|
|
96
96
|
|
|
97
97
|
> **get** **id**(): `string`
|
|
98
98
|
|
|
99
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:155](https://github.com/isdk/web-fetcher.js/blob/
|
|
99
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:155](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L155)
|
|
100
100
|
|
|
101
101
|
##### Returns
|
|
102
102
|
|
|
@@ -114,7 +114,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:155](https://github
|
|
|
114
114
|
|
|
115
115
|
> **get** **returnType**(): [`FetchReturnType`](../type-aliases/FetchReturnType.md)
|
|
116
116
|
|
|
117
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:159](https://github.com/isdk/web-fetcher.js/blob/
|
|
117
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:159](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L159)
|
|
118
118
|
|
|
119
119
|
##### Returns
|
|
120
120
|
|
|
@@ -130,7 +130,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:159](https://github
|
|
|
130
130
|
|
|
131
131
|
> **afterExec**(`context`, `options?`, `result?`, `scope?`): `Promise`\<`void`\>
|
|
132
132
|
|
|
133
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:391](https://github.com/isdk/web-fetcher.js/blob/
|
|
133
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:391](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L391)
|
|
134
134
|
|
|
135
135
|
Action 结束生命周期
|
|
136
136
|
负责:调用钩子、赋值lastResult, 触发事件、清理 stack、恢复 currentAction
|
|
@@ -171,9 +171,9 @@ Action 结束生命周期
|
|
|
171
171
|
|
|
172
172
|
### beforeExec()
|
|
173
173
|
|
|
174
|
-
> **beforeExec**(`context`, `options?`): `Promise`\<\{ `collectors`: `
|
|
174
|
+
> **beforeExec**(`context`, `options?`): `Promise`\<\{ `collectors`: `CollectorsRuntime` \| `undefined`; `entry`: [`FetchActionInContext`](../interfaces/FetchActionInContext.md); \}\>
|
|
175
175
|
|
|
176
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:347](https://github.com/isdk/web-fetcher.js/blob/
|
|
176
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:347](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L347)
|
|
177
177
|
|
|
178
178
|
Action 开始生命周期
|
|
179
179
|
负责:初始化 stack、设置 currentAction、触发事件、调用钩子
|
|
@@ -190,7 +190,7 @@ Action 开始生命周期
|
|
|
190
190
|
|
|
191
191
|
#### Returns
|
|
192
192
|
|
|
193
|
-
`Promise`\<\{ `collectors`: `
|
|
193
|
+
`Promise`\<\{ `collectors`: `CollectorsRuntime` \| `undefined`; `entry`: [`FetchActionInContext`](../interfaces/FetchActionInContext.md); \}\>
|
|
194
194
|
|
|
195
195
|
#### Inherited from
|
|
196
196
|
|
|
@@ -202,7 +202,7 @@ Action 开始生命周期
|
|
|
202
202
|
|
|
203
203
|
> `protected` **delegateToEngine**(`context`, `method`, ...`args`): `Promise`\<`any`\>
|
|
204
204
|
|
|
205
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:184](https://github.com/isdk/web-fetcher.js/blob/
|
|
205
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:184](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L184)
|
|
206
206
|
|
|
207
207
|
#### Parameters
|
|
208
208
|
|
|
@@ -232,7 +232,7 @@ keyof [`FetchEngine`](FetchEngine.md)\<`any`, `any`, `any`\>
|
|
|
232
232
|
|
|
233
233
|
> **execute**\<`R`\>(`context`, `options?`): `Promise`\<[`FetchActionResult`](../interfaces/FetchActionResult.md)\<`R`\>\>
|
|
234
234
|
|
|
235
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:
|
|
235
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:461](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L461)
|
|
236
236
|
|
|
237
237
|
#### Type Parameters
|
|
238
238
|
|
|
@@ -264,7 +264,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:448](https://github
|
|
|
264
264
|
|
|
265
265
|
> **getCapability**(`mode?`): [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
|
|
266
266
|
|
|
267
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:150](https://github.com/isdk/web-fetcher.js/blob/
|
|
267
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:150](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L150)
|
|
268
268
|
|
|
269
269
|
#### Parameters
|
|
270
270
|
|
|
@@ -284,9 +284,9 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:150](https://github
|
|
|
284
284
|
|
|
285
285
|
### installCollectors()
|
|
286
286
|
|
|
287
|
-
> `protected` **installCollectors**(`context`, `options?`): `
|
|
287
|
+
> `protected` **installCollectors**(`context`, `options?`): `CollectorsRuntime` \| `undefined`
|
|
288
288
|
|
|
289
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github.com/isdk/web-fetcher.js/blob/
|
|
289
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L201)
|
|
290
290
|
|
|
291
291
|
#### Parameters
|
|
292
292
|
|
|
@@ -300,7 +300,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github
|
|
|
300
300
|
|
|
301
301
|
#### Returns
|
|
302
302
|
|
|
303
|
-
`
|
|
303
|
+
`CollectorsRuntime` \| `undefined`
|
|
304
304
|
|
|
305
305
|
#### Inherited from
|
|
306
306
|
|
|
@@ -312,7 +312,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github
|
|
|
312
312
|
|
|
313
313
|
> `protected` `optional` **onAfterExec**(`context`, `options?`): `void` \| `Promise`\<`void`\>
|
|
314
314
|
|
|
315
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:172](https://github.com/isdk/web-fetcher.js/blob/
|
|
315
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:172](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L172)
|
|
316
316
|
|
|
317
317
|
#### Parameters
|
|
318
318
|
|
|
@@ -338,7 +338,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:172](https://github
|
|
|
338
338
|
|
|
339
339
|
> `protected` `optional` **onBeforeExec**(`context`, `options?`): `void` \| `Promise`\<`void`\>
|
|
340
340
|
|
|
341
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:168](https://github.com/isdk/web-fetcher.js/blob/
|
|
341
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:168](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L168)
|
|
342
342
|
|
|
343
343
|
#### Parameters
|
|
344
344
|
|
|
@@ -364,7 +364,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:168](https://github
|
|
|
364
364
|
|
|
365
365
|
> **onExecute**(`context`, `options?`): `Promise`\<`any`\>
|
|
366
366
|
|
|
367
|
-
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:17](https://github.com/isdk/web-fetcher.js/blob/
|
|
367
|
+
Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:17](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/definitions/extract.ts#L17)
|
|
368
368
|
|
|
369
369
|
#### Parameters
|
|
370
370
|
|
|
@@ -390,9 +390,9 @@ Defined in: [packages/web-fetcher/src/action/definitions/extract.ts:17](https://
|
|
|
390
390
|
|
|
391
391
|
#### Call Signature
|
|
392
392
|
|
|
393
|
-
> `static` **create**(`id`):
|
|
393
|
+
> `static` **create**(`id`): [`FetchAction`](FetchAction.md) \| `undefined`
|
|
394
394
|
|
|
395
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:113](https://github.com/isdk/web-fetcher.js/blob/
|
|
395
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:113](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L113)
|
|
396
396
|
|
|
397
397
|
##### Parameters
|
|
398
398
|
|
|
@@ -402,7 +402,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:113](https://github
|
|
|
402
402
|
|
|
403
403
|
##### Returns
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
[`FetchAction`](FetchAction.md) \| `undefined`
|
|
406
406
|
|
|
407
407
|
##### Inherited from
|
|
408
408
|
|
|
@@ -410,9 +410,9 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:113](https://github
|
|
|
410
410
|
|
|
411
411
|
#### Call Signature
|
|
412
412
|
|
|
413
|
-
> `static` **create**(`id`):
|
|
413
|
+
> `static` **create**(`id`): [`FetchAction`](FetchAction.md) \| `undefined`
|
|
414
414
|
|
|
415
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:114](https://github.com/isdk/web-fetcher.js/blob/
|
|
415
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:114](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L114)
|
|
416
416
|
|
|
417
417
|
##### Parameters
|
|
418
418
|
|
|
@@ -422,7 +422,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:114](https://github
|
|
|
422
422
|
|
|
423
423
|
##### Returns
|
|
424
424
|
|
|
425
|
-
|
|
425
|
+
[`FetchAction`](FetchAction.md) \| `undefined`
|
|
426
426
|
|
|
427
427
|
##### Inherited from
|
|
428
428
|
|
|
@@ -432,9 +432,9 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:114](https://github
|
|
|
432
432
|
|
|
433
433
|
### get()
|
|
434
434
|
|
|
435
|
-
> `static` **get**(`id`):
|
|
435
|
+
> `static` **get**(`id`): *typeof* [`FetchAction`](FetchAction.md) \| `undefined`
|
|
436
436
|
|
|
437
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github.com/isdk/web-fetcher.js/blob/
|
|
437
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L109)
|
|
438
438
|
|
|
439
439
|
#### Parameters
|
|
440
440
|
|
|
@@ -444,7 +444,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github
|
|
|
444
444
|
|
|
445
445
|
#### Returns
|
|
446
446
|
|
|
447
|
-
|
|
447
|
+
*typeof* [`FetchAction`](FetchAction.md) \| `undefined`
|
|
448
448
|
|
|
449
449
|
#### Inherited from
|
|
450
450
|
|
|
@@ -456,7 +456,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github
|
|
|
456
456
|
|
|
457
457
|
> `static` **getCapability**(`mode?`): [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
|
|
458
458
|
|
|
459
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:146](https://github.com/isdk/web-fetcher.js/blob/
|
|
459
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:146](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L146)
|
|
460
460
|
|
|
461
461
|
#### Parameters
|
|
462
462
|
|
|
@@ -478,7 +478,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:146](https://github
|
|
|
478
478
|
|
|
479
479
|
> `static` **has**(`name`): `boolean`
|
|
480
480
|
|
|
481
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:130](https://github.com/isdk/web-fetcher.js/blob/
|
|
481
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:130](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L130)
|
|
482
482
|
|
|
483
483
|
#### Parameters
|
|
484
484
|
|
|
@@ -500,7 +500,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:130](https://github
|
|
|
500
500
|
|
|
501
501
|
> `static` **list**(): `string`[]
|
|
502
502
|
|
|
503
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:134](https://github.com/isdk/web-fetcher.js/blob/
|
|
503
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:134](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L134)
|
|
504
504
|
|
|
505
505
|
#### Returns
|
|
506
506
|
|
|
@@ -516,7 +516,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:134](https://github
|
|
|
516
516
|
|
|
517
517
|
> `static` **register**(`actionClass`): `void`
|
|
518
518
|
|
|
519
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:103](https://github.com/isdk/web-fetcher.js/blob/
|
|
519
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:103](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L103)
|
|
520
520
|
|
|
521
521
|
#### Parameters
|
|
522
522
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# Abstract Class: FetchAction
|
|
8
8
|
|
|
9
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:99](https://github.com/isdk/web-fetcher.js/blob/
|
|
9
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:99](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L99)
|
|
10
10
|
|
|
11
11
|
## Extended by
|
|
12
12
|
|
|
@@ -18,6 +18,12 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:99](https://github.
|
|
|
18
18
|
- [`WaitForAction`](WaitForAction.md)
|
|
19
19
|
- [`ExtractAction`](ExtractAction.md)
|
|
20
20
|
- [`PauseAction`](PauseAction.md)
|
|
21
|
+
- [`TrimAction`](TrimAction.md)
|
|
22
|
+
- [`EvaluateAction`](EvaluateAction.md)
|
|
23
|
+
- [`MouseMoveAction`](MouseMoveAction.md)
|
|
24
|
+
- [`MouseClickAction`](MouseClickAction.md)
|
|
25
|
+
- [`KeyboardTypeAction`](KeyboardTypeAction.md)
|
|
26
|
+
- [`KeyboardPressAction`](KeyboardPressAction.md)
|
|
21
27
|
|
|
22
28
|
## Constructors
|
|
23
29
|
|
|
@@ -35,7 +41,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:99](https://github.
|
|
|
35
41
|
|
|
36
42
|
> `static` **capabilities**: [`FetchActionCapabilities`](../type-aliases/FetchActionCapabilities.md)
|
|
37
43
|
|
|
38
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:141](https://github.com/isdk/web-fetcher.js/blob/
|
|
44
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:141](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L141)
|
|
39
45
|
|
|
40
46
|
***
|
|
41
47
|
|
|
@@ -43,7 +49,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:141](https://github
|
|
|
43
49
|
|
|
44
50
|
> `static` **id**: `string`
|
|
45
51
|
|
|
46
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:139](https://github.com/isdk/web-fetcher.js/blob/
|
|
52
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:139](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L139)
|
|
47
53
|
|
|
48
54
|
***
|
|
49
55
|
|
|
@@ -51,7 +57,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:139](https://github
|
|
|
51
57
|
|
|
52
58
|
> `static` **returnType**: [`FetchReturnType`](../type-aliases/FetchReturnType.md) = `'any'`
|
|
53
59
|
|
|
54
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:140](https://github.com/isdk/web-fetcher.js/blob/
|
|
60
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:140](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L140)
|
|
55
61
|
|
|
56
62
|
## Accessors
|
|
57
63
|
|
|
@@ -61,7 +67,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:140](https://github
|
|
|
61
67
|
|
|
62
68
|
> **get** **capabilities**(): [`FetchActionCapabilities`](../type-aliases/FetchActionCapabilities.md)
|
|
63
69
|
|
|
64
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:163](https://github.com/isdk/web-fetcher.js/blob/
|
|
70
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:163](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L163)
|
|
65
71
|
|
|
66
72
|
##### Returns
|
|
67
73
|
|
|
@@ -75,7 +81,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:163](https://github
|
|
|
75
81
|
|
|
76
82
|
> **get** **id**(): `string`
|
|
77
83
|
|
|
78
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:155](https://github.com/isdk/web-fetcher.js/blob/
|
|
84
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:155](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L155)
|
|
79
85
|
|
|
80
86
|
##### Returns
|
|
81
87
|
|
|
@@ -89,7 +95,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:155](https://github
|
|
|
89
95
|
|
|
90
96
|
> **get** **returnType**(): [`FetchReturnType`](../type-aliases/FetchReturnType.md)
|
|
91
97
|
|
|
92
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:159](https://github.com/isdk/web-fetcher.js/blob/
|
|
98
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:159](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L159)
|
|
93
99
|
|
|
94
100
|
##### Returns
|
|
95
101
|
|
|
@@ -101,7 +107,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:159](https://github
|
|
|
101
107
|
|
|
102
108
|
> **afterExec**(`context`, `options?`, `result?`, `scope?`): `Promise`\<`void`\>
|
|
103
109
|
|
|
104
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:391](https://github.com/isdk/web-fetcher.js/blob/
|
|
110
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:391](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L391)
|
|
105
111
|
|
|
106
112
|
Action 结束生命周期
|
|
107
113
|
负责:调用钩子、赋值lastResult, 触发事件、清理 stack、恢复 currentAction
|
|
@@ -138,9 +144,9 @@ Action 结束生命周期
|
|
|
138
144
|
|
|
139
145
|
### beforeExec()
|
|
140
146
|
|
|
141
|
-
> **beforeExec**(`context`, `options?`): `Promise`\<\{ `collectors`: `
|
|
147
|
+
> **beforeExec**(`context`, `options?`): `Promise`\<\{ `collectors`: `CollectorsRuntime` \| `undefined`; `entry`: [`FetchActionInContext`](../interfaces/FetchActionInContext.md); \}\>
|
|
142
148
|
|
|
143
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:347](https://github.com/isdk/web-fetcher.js/blob/
|
|
149
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:347](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L347)
|
|
144
150
|
|
|
145
151
|
Action 开始生命周期
|
|
146
152
|
负责:初始化 stack、设置 currentAction、触发事件、调用钩子
|
|
@@ -157,7 +163,7 @@ Action 开始生命周期
|
|
|
157
163
|
|
|
158
164
|
#### Returns
|
|
159
165
|
|
|
160
|
-
`Promise`\<\{ `collectors`: `
|
|
166
|
+
`Promise`\<\{ `collectors`: `CollectorsRuntime` \| `undefined`; `entry`: [`FetchActionInContext`](../interfaces/FetchActionInContext.md); \}\>
|
|
161
167
|
|
|
162
168
|
***
|
|
163
169
|
|
|
@@ -165,7 +171,7 @@ Action 开始生命周期
|
|
|
165
171
|
|
|
166
172
|
> `protected` **delegateToEngine**(`context`, `method`, ...`args`): `Promise`\<`any`\>
|
|
167
173
|
|
|
168
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:184](https://github.com/isdk/web-fetcher.js/blob/
|
|
174
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:184](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L184)
|
|
169
175
|
|
|
170
176
|
#### Parameters
|
|
171
177
|
|
|
@@ -191,7 +197,7 @@ keyof [`FetchEngine`](FetchEngine.md)\<`any`, `any`, `any`\>
|
|
|
191
197
|
|
|
192
198
|
> **execute**\<`R`\>(`context`, `options?`): `Promise`\<[`FetchActionResult`](../interfaces/FetchActionResult.md)\<`R`\>\>
|
|
193
199
|
|
|
194
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:
|
|
200
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:461](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L461)
|
|
195
201
|
|
|
196
202
|
#### Type Parameters
|
|
197
203
|
|
|
@@ -219,7 +225,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:448](https://github
|
|
|
219
225
|
|
|
220
226
|
> **getCapability**(`mode?`): [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
|
|
221
227
|
|
|
222
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:150](https://github.com/isdk/web-fetcher.js/blob/
|
|
228
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:150](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L150)
|
|
223
229
|
|
|
224
230
|
#### Parameters
|
|
225
231
|
|
|
@@ -235,9 +241,9 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:150](https://github
|
|
|
235
241
|
|
|
236
242
|
### installCollectors()
|
|
237
243
|
|
|
238
|
-
> `protected` **installCollectors**(`context`, `options?`): `
|
|
244
|
+
> `protected` **installCollectors**(`context`, `options?`): `CollectorsRuntime` \| `undefined`
|
|
239
245
|
|
|
240
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github.com/isdk/web-fetcher.js/blob/
|
|
246
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L201)
|
|
241
247
|
|
|
242
248
|
#### Parameters
|
|
243
249
|
|
|
@@ -251,7 +257,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github
|
|
|
251
257
|
|
|
252
258
|
#### Returns
|
|
253
259
|
|
|
254
|
-
`
|
|
260
|
+
`CollectorsRuntime` \| `undefined`
|
|
255
261
|
|
|
256
262
|
***
|
|
257
263
|
|
|
@@ -259,7 +265,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:201](https://github
|
|
|
259
265
|
|
|
260
266
|
> `protected` `optional` **onAfterExec**(`context`, `options?`): `void` \| `Promise`\<`void`\>
|
|
261
267
|
|
|
262
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:172](https://github.com/isdk/web-fetcher.js/blob/
|
|
268
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:172](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L172)
|
|
263
269
|
|
|
264
270
|
#### Parameters
|
|
265
271
|
|
|
@@ -281,7 +287,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:172](https://github
|
|
|
281
287
|
|
|
282
288
|
> `protected` `optional` **onBeforeExec**(`context`, `options?`): `void` \| `Promise`\<`void`\>
|
|
283
289
|
|
|
284
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:168](https://github.com/isdk/web-fetcher.js/blob/
|
|
290
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:168](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L168)
|
|
285
291
|
|
|
286
292
|
#### Parameters
|
|
287
293
|
|
|
@@ -303,7 +309,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:168](https://github
|
|
|
303
309
|
|
|
304
310
|
> `abstract` **onExecute**(`context`, `options?`, `eventPayload?`): `any`
|
|
305
311
|
|
|
306
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:178](https://github.com/isdk/web-fetcher.js/blob/
|
|
312
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:178](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L178)
|
|
307
313
|
|
|
308
314
|
#### Parameters
|
|
309
315
|
|
|
@@ -329,9 +335,9 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:178](https://github
|
|
|
329
335
|
|
|
330
336
|
#### Call Signature
|
|
331
337
|
|
|
332
|
-
> `static` **create**(`id`): `
|
|
338
|
+
> `static` **create**(`id`): `FetchAction` \| `undefined`
|
|
333
339
|
|
|
334
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:113](https://github.com/isdk/web-fetcher.js/blob/
|
|
340
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:113](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L113)
|
|
335
341
|
|
|
336
342
|
##### Parameters
|
|
337
343
|
|
|
@@ -341,13 +347,13 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:113](https://github
|
|
|
341
347
|
|
|
342
348
|
##### Returns
|
|
343
349
|
|
|
344
|
-
`
|
|
350
|
+
`FetchAction` \| `undefined`
|
|
345
351
|
|
|
346
352
|
#### Call Signature
|
|
347
353
|
|
|
348
|
-
> `static` **create**(`id`): `
|
|
354
|
+
> `static` **create**(`id`): `FetchAction` \| `undefined`
|
|
349
355
|
|
|
350
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:114](https://github.com/isdk/web-fetcher.js/blob/
|
|
356
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:114](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L114)
|
|
351
357
|
|
|
352
358
|
##### Parameters
|
|
353
359
|
|
|
@@ -357,15 +363,15 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:114](https://github
|
|
|
357
363
|
|
|
358
364
|
##### Returns
|
|
359
365
|
|
|
360
|
-
`
|
|
366
|
+
`FetchAction` \| `undefined`
|
|
361
367
|
|
|
362
368
|
***
|
|
363
369
|
|
|
364
370
|
### get()
|
|
365
371
|
|
|
366
|
-
> `static` **get**(`id`):
|
|
372
|
+
> `static` **get**(`id`): *typeof* `FetchAction` \| `undefined`
|
|
367
373
|
|
|
368
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github.com/isdk/web-fetcher.js/blob/
|
|
374
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L109)
|
|
369
375
|
|
|
370
376
|
#### Parameters
|
|
371
377
|
|
|
@@ -375,7 +381,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github
|
|
|
375
381
|
|
|
376
382
|
#### Returns
|
|
377
383
|
|
|
378
|
-
|
|
384
|
+
*typeof* `FetchAction` \| `undefined`
|
|
379
385
|
|
|
380
386
|
***
|
|
381
387
|
|
|
@@ -383,7 +389,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:109](https://github
|
|
|
383
389
|
|
|
384
390
|
> `static` **getCapability**(`mode?`): [`FetchActionCapabilityMode`](../type-aliases/FetchActionCapabilityMode.md)
|
|
385
391
|
|
|
386
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:146](https://github.com/isdk/web-fetcher.js/blob/
|
|
392
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:146](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L146)
|
|
387
393
|
|
|
388
394
|
#### Parameters
|
|
389
395
|
|
|
@@ -401,7 +407,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:146](https://github
|
|
|
401
407
|
|
|
402
408
|
> `static` **has**(`name`): `boolean`
|
|
403
409
|
|
|
404
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:130](https://github.com/isdk/web-fetcher.js/blob/
|
|
410
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:130](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L130)
|
|
405
411
|
|
|
406
412
|
#### Parameters
|
|
407
413
|
|
|
@@ -419,7 +425,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:130](https://github
|
|
|
419
425
|
|
|
420
426
|
> `static` **list**(): `string`[]
|
|
421
427
|
|
|
422
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:134](https://github.com/isdk/web-fetcher.js/blob/
|
|
428
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:134](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L134)
|
|
423
429
|
|
|
424
430
|
#### Returns
|
|
425
431
|
|
|
@@ -431,7 +437,7 @@ Defined in: [packages/web-fetcher/src/action/fetch-action.ts:134](https://github
|
|
|
431
437
|
|
|
432
438
|
> `static` **register**(`actionClass`): `void`
|
|
433
439
|
|
|
434
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:103](https://github.com/isdk/web-fetcher.js/blob/
|
|
440
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:103](https://github.com/isdk/web-fetcher.js/blob/e691a2370f59d15979b47994c8ca14d7b7d2edd3/src/action/fetch-action.ts#L103)
|
|
435
441
|
|
|
436
442
|
#### Parameters
|
|
437
443
|
|