@crawlee/stagehand 4.0.0-beta.318 → 4.0.0-beta.319
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.
|
@@ -190,7 +190,7 @@ export type StagehandHook<UserData extends Dictionary = any> = BrowserHook<Stage
|
|
|
190
190
|
/**
|
|
191
191
|
* Options for StagehandCrawler.
|
|
192
192
|
*/
|
|
193
|
-
export interface StagehandCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends StagehandCrawlingContext = StagehandCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<StagehandCrawlingContext['request']>>, StatisticStateExtension extends object = {}> extends BrowserCrawlerOptions<StagehandPage, Response, StagehandCrawlingContext, ContextExtension, ExtendedContext, Routes, StatisticStateExtension> {
|
|
193
|
+
export interface StagehandCrawlerOptions<ContextExtension = Dictionary<never>, ExtendedContext extends StagehandCrawlingContext = StagehandCrawlingContext & ContextExtension, Routes extends Record<keyof Routes, Dictionary> = Record<string, GetUserDataFromRequest<StagehandCrawlingContext['request']>>, StatisticStateExtension extends object = {}> extends Omit<BrowserCrawlerOptions<StagehandPage, Response, StagehandCrawlingContext, ContextExtension, ExtendedContext, Routes, StatisticStateExtension>, 'ignoreShadowRoots' | 'ignoreIframes'> {
|
|
194
194
|
/**
|
|
195
195
|
* Stagehand-specific configuration options.
|
|
196
196
|
* These options configure the AI behavior and Browserbase integration.
|
|
@@ -68,13 +68,18 @@ class StagehandCrawler extends browser_1.BrowserCrawler {
|
|
|
68
68
|
};
|
|
69
69
|
/** @internal */
|
|
70
70
|
static optionsSchema = zod_1.z.strictObject(StagehandCrawler.optionsShape);
|
|
71
|
+
/** Only `parseWithCheerio` reads the omitted options, and the Stagehand context has no such helper. */
|
|
72
|
+
static #constructorOptionsSchema = StagehandCrawler.optionsSchema.omit({
|
|
73
|
+
ignoreShadowRoots: true,
|
|
74
|
+
ignoreIframes: true,
|
|
75
|
+
});
|
|
71
76
|
/**
|
|
72
77
|
* Creates a new instance of StagehandCrawler.
|
|
73
78
|
*
|
|
74
79
|
* @param options - Crawler configuration options
|
|
75
80
|
*/
|
|
76
81
|
constructor(options = {}) {
|
|
77
|
-
const parsedOptions = (0, internal_1.parseArgument)(options, StagehandCrawler
|
|
82
|
+
const parsedOptions = (0, internal_1.parseArgument)(options, StagehandCrawler.#constructorOptionsSchema, 'StagehandCrawlerOptions');
|
|
78
83
|
const { stagehandOptions, launchContext, headless, configuration, ...browserCrawlerOptions } = parsedOptions;
|
|
79
84
|
if (options.browserPool) {
|
|
80
85
|
// The raw options, not the parsed ones: `launchContext` has a default, so by now it is always set.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/stagehand",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.319",
|
|
4
4
|
"description": "AI-powered web crawling with Stagehand integration for Crawlee - enables natural language browser automation with act(), extract(), and observe() methods.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.13.0"
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"access": "public"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@crawlee/browser": "4.0.0-beta.
|
|
60
|
-
"@crawlee/browser-pool": "4.0.0-beta.
|
|
61
|
-
"@crawlee/core": "4.0.0-beta.
|
|
62
|
-
"@crawlee/types": "4.0.0-beta.
|
|
63
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
59
|
+
"@crawlee/browser": "4.0.0-beta.319",
|
|
60
|
+
"@crawlee/browser-pool": "4.0.0-beta.319",
|
|
61
|
+
"@crawlee/core": "4.0.0-beta.319",
|
|
62
|
+
"@crawlee/types": "4.0.0-beta.319",
|
|
63
|
+
"@crawlee/utils": "4.0.0-beta.319",
|
|
64
64
|
"tslib": "^2.9.1",
|
|
65
65
|
"zod": "^4.6.7"
|
|
66
66
|
},
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "061bf22bce93a302e65eae1d9fc24a91d8d21e54"
|
|
91
91
|
}
|