@isdk/web-fetcher 0.2.7 → 0.2.9
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 +9 -2
- package/README.action.md +9 -2
- package/README.cn.md +5 -1
- package/README.engine.cn.md +6 -2
- package/README.engine.md +6 -2
- package/README.md +5 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/docs/README.md +5 -1
- package/docs/_media/README.action.md +9 -2
- package/docs/_media/README.cn.md +5 -1
- package/docs/_media/README.engine.md +6 -2
- package/docs/classes/CheerioFetchEngine.md +71 -59
- package/docs/classes/ClickAction.md +23 -23
- package/docs/classes/ExtractAction.md +23 -23
- package/docs/classes/FetchAction.md +23 -23
- package/docs/classes/FetchEngine.md +67 -59
- package/docs/classes/FetchSession.md +10 -10
- package/docs/classes/FillAction.md +23 -23
- package/docs/classes/GetContentAction.md +23 -23
- package/docs/classes/GotoAction.md +23 -23
- package/docs/classes/PauseAction.md +23 -23
- package/docs/classes/PlaywrightFetchEngine.md +71 -59
- package/docs/classes/SubmitAction.md +23 -23
- package/docs/classes/WaitForAction.md +23 -23
- package/docs/classes/WebFetcher.md +5 -5
- package/docs/enumerations/FetchActionResultStatus.md +4 -4
- package/docs/functions/fetchWeb.md +2 -2
- package/docs/interfaces/BaseFetchActionProperties.md +11 -11
- package/docs/interfaces/BaseFetchCollectorActionProperties.md +15 -15
- package/docs/interfaces/BaseFetcherProperties.md +32 -24
- package/docs/interfaces/DispatchedEngineAction.md +4 -4
- package/docs/interfaces/ExtractActionProperties.md +11 -11
- package/docs/interfaces/FetchActionInContext.md +15 -15
- package/docs/interfaces/FetchActionProperties.md +12 -12
- package/docs/interfaces/FetchActionResult.md +6 -6
- package/docs/interfaces/FetchContext.md +46 -34
- package/docs/interfaces/FetchEngineContext.md +41 -29
- package/docs/interfaces/FetchMetadata.md +5 -5
- package/docs/interfaces/FetchResponse.md +21 -13
- package/docs/interfaces/FetchReturnTypeRegistry.md +7 -7
- package/docs/interfaces/FetchSite.md +39 -27
- package/docs/interfaces/FetcherOptions.md +38 -26
- package/docs/interfaces/GotoActionOptions.md +6 -6
- package/docs/interfaces/PendingEngineRequest.md +3 -3
- package/docs/interfaces/SubmitActionOptions.md +2 -2
- 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 +1 -1
- 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/variables/DefaultFetcherProperties.md +1 -1
- package/docs/variables/FetcherOptionKeys.md +1 -1
- package/package.json +3 -2
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **BaseFetchActionOptions** = `RequireAtLeastOne`\<[`BaseFetchActionProperties`](../interfaces/BaseFetchActionProperties.md), `"id"` \| `"name"` \| `"action"`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:61](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:61](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/action/fetch-action.ts#L61)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **BaseFetchCollectorOptions** = `RequireAtLeastOne`\<[`BaseFetchCollectorActionProperties`](../interfaces/BaseFetchCollectorActionProperties.md), `"id"` \| `"name"` \| `"action"`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:74](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:74](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/action/fetch-action.ts#L74)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **BrowserEngine** = `"playwright"` \| `"puppeteer"`
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/types.ts:21](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/types.ts:21](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/types.ts#L21)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **FetchActionCapabilities** = `{ [mode in FetchEngineType]?: FetchActionCapabilityMode }`
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:82](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:82](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/action/fetch-action.ts#L82)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **FetchActionCapabilityMode** = `"native"` \| `"simulate"` \| `"noop"`
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:23](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:23](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/action/fetch-action.ts#L23)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **FetchActionOptions** = `RequireAtLeastOne`\<[`FetchActionProperties`](../interfaces/FetchActionProperties.md), `"id"` \| `"name"` \| `"action"`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:80](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/action/fetch-action.ts:80](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/action/fetch-action.ts#L80)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **FetchEngineAction** = \{ `selector`: `string`; `type`: `"click"`; \} \| \{ `selector`: `string`; `type`: `"fill"`; `value`: `string`; \} \| \{ `options?`: [`WaitForActionOptions`](../interfaces/WaitForActionOptions.md); `type`: `"waitFor"`; \} \| \{ `options?`: [`SubmitActionOptions`](../interfaces/SubmitActionOptions.md); `selector?`: `any`; `type`: `"submit"`; \} \| \{ `type`: `"getContent"`; \} \| \{ `opts?`: [`GotoActionOptions`](../interfaces/GotoActionOptions.md); `type`: `"navigate"`; `url`: `string`; \} \| \{ `schema`: `ExtractSchema`; `type`: `"extract"`; \} \| \{ `message?`: `string`; `type`: `"pause"`; \} \| \{ `type`: `"dispose"`; \}
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/engine/base.ts:82](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/engine/base.ts:82](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/engine/base.ts#L82)
|
|
12
12
|
|
|
13
13
|
Union type representing all possible engine actions that can be dispatched.
|
|
14
14
|
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **FetchEngineType** = `"http"` \| `"browser"`
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/types.ts:20](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/types.ts:20](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/types.ts#L20)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **FetchReturnType** = `"response"` \| `"context"` \| `"outputs"` \| `"any"` \| `"none"`
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/fetch-return-type.ts:5](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/fetch-return-type.ts:5](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/fetch-return-type.ts#L5)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **FetchReturnTypeFor**\<`R`\> = `R` *extends* keyof [`FetchReturnTypeRegistry`](../interfaces/FetchReturnTypeRegistry.md) ? [`FetchReturnTypeRegistry`](../interfaces/FetchReturnTypeRegistry.md)\[`R`\] : `never`
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/fetch-return-type.ts:22](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/fetch-return-type.ts:22](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/fetch-return-type.ts#L22)
|
|
12
12
|
|
|
13
13
|
## Type Parameters
|
|
14
14
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
> **OnFetchPauseCallback** = (`options`) => `Promise`\<`void`\>
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/types.ts:
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/types.ts:94](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/types.ts#L94)
|
|
12
12
|
|
|
13
13
|
## Parameters
|
|
14
14
|
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> **ResourceType** = `"image"` \| `"stylesheet"` \| `"font"` \| `"script"` \| `"media"` \| `string`
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/types.ts:24](https://github.com/isdk/web-fetcher.js/blob/
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/types.ts:24](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/types.ts#L24)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> `const` **DefaultFetcherProperties**: [`BaseFetcherProperties`](../interfaces/BaseFetcherProperties.md)
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/types.ts:
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/types.ts:136](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/types.ts#L136)
|
|
@@ -8,4 +8,4 @@
|
|
|
8
8
|
|
|
9
9
|
> `const` **FetcherOptionKeys**: `string`[]
|
|
10
10
|
|
|
11
|
-
Defined in: [packages/web-fetcher/src/core/types.ts:
|
|
11
|
+
Defined in: [packages/web-fetcher/src/core/types.ts:165](https://github.com/isdk/web-fetcher.js/blob/3d2bbdd587d2e2a817155af67327a042c516fd6f/src/core/types.ts#L165)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isdk/web-fetcher",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Riceball LEE <snowyu.lee@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/isdk/web-fetcher.js",
|
|
@@ -25,12 +25,13 @@
|
|
|
25
25
|
"events-ex": "^2.1.1",
|
|
26
26
|
"jsdom": "^27.0.0",
|
|
27
27
|
"lodash-es": "^4.17.21",
|
|
28
|
-
"playwright": "^1.56.0",
|
|
29
28
|
"nanoid": "^5.1.6",
|
|
29
|
+
"playwright": "^1.56.0",
|
|
30
30
|
"util-ex": "^2.4.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@antfu/eslint-config": "^4.10.1",
|
|
34
|
+
"@fastify/cookie": "^11.0.2",
|
|
34
35
|
"@fastify/formbody": "^8.0.2",
|
|
35
36
|
"@types/jest": "^29.5.14",
|
|
36
37
|
"@types/jsdom": "^27.0.0",
|