@crawlee/stagehand 4.0.0-beta.86 → 4.0.0-beta.87

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.
@@ -54,7 +54,7 @@ export interface StagehandLaunchContext extends BrowserLaunchContext<LaunchOptio
54
54
  * @ignore
55
55
  */
56
56
  export declare class StagehandLauncher extends BrowserLauncher<StagehandPlugin> {
57
- readonly config: Configuration;
57
+ readonly configuration: Configuration;
58
58
  protected static optionsShape: {
59
59
  // @ts-ignore optional peer dependency or compatibility with es2022
60
60
  launcher: import("ow", { with: { "resolution-mode": "import" } }).ObjectPredicate<object> & import("ow", { with: { "resolution-mode": "import" } }).BasePredicate<object | undefined>;
@@ -83,7 +83,7 @@ export declare class StagehandLauncher extends BrowserLauncher<StagehandPlugin>
83
83
  /**
84
84
  * All StagehandLauncher parameters are passed via the launchContext object.
85
85
  */
86
- constructor(launchContext?: StagehandLaunchContext, config?: Configuration);
86
+ constructor(launchContext?: StagehandLaunchContext, configuration?: Configuration);
87
87
  /**
88
88
  * Creates a new StagehandPlugin instance with resolved options.
89
89
  */
@@ -12,7 +12,7 @@ const stagehand_plugin_1 = require("./stagehand-plugin");
12
12
  * @ignore
13
13
  */
14
14
  class StagehandLauncher extends browser_1.BrowserLauncher {
15
- config;
15
+ configuration;
16
16
  static optionsShape = {
17
17
  ...browser_1.BrowserLauncher.optionsShape,
18
18
  launcher: ow_1.default.optional.object,
@@ -23,7 +23,7 @@ class StagehandLauncher extends browser_1.BrowserLauncher {
23
23
  /**
24
24
  * All StagehandLauncher parameters are passed via the launchContext object.
25
25
  */
26
- constructor(launchContext = {}, config = browser_1.Configuration.getGlobalConfig()) {
26
+ constructor(launchContext = {}, configuration = browser_1.Configuration.getGlobalConfiguration()) {
27
27
  (0, ow_1.default)(launchContext, 'StagehandLaunchContext', ow_1.default.object.exactShape(StagehandLauncher.optionsShape));
28
28
  const { launcher = browser_1.BrowserLauncher.requireLauncherOrThrow('playwright', 'apify/actor-node-playwright-*').chromium, stagehandOptions = {}, } = launchContext;
29
29
  const { launchOptions = {}, ...rest } = launchContext;
@@ -32,11 +32,11 @@ class StagehandLauncher extends browser_1.BrowserLauncher {
32
32
  ...rest,
33
33
  launchOptions: {
34
34
  ...launchOptions,
35
- executablePath: getDefaultExecutablePath(launchContext, config),
35
+ executablePath: getDefaultExecutablePath(launchContext, configuration),
36
36
  },
37
37
  launcher,
38
- }, config);
39
- this.config = config;
38
+ }, configuration);
39
+ this.configuration = configuration;
40
40
  this.stagehandOptions = {
41
41
  env: 'LOCAL',
42
42
  model: 'openai/gpt-4.1-mini',
@@ -61,8 +61,8 @@ exports.StagehandLauncher = StagehandLauncher;
61
61
  * Gets the default executable path for the browser.
62
62
  * @ignore
63
63
  */
64
- function getDefaultExecutablePath(launchContext, config) {
65
- const pathFromPlaywrightImage = config.defaultBrowserPath;
64
+ function getDefaultExecutablePath(launchContext, configuration) {
65
+ const pathFromPlaywrightImage = configuration.defaultBrowserPath;
66
66
  const { launchOptions = {} } = launchContext;
67
67
  if (launchOptions.executablePath) {
68
68
  return launchOptions.executablePath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crawlee/stagehand",
3
- "version": "4.0.0-beta.86",
3
+ "version": "4.0.0-beta.87",
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.0.0"
@@ -57,11 +57,11 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@apify/timeout": "^0.3.2",
60
- "@crawlee/browser": "4.0.0-beta.86",
61
- "@crawlee/browser-pool": "4.0.0-beta.86",
62
- "@crawlee/core": "4.0.0-beta.86",
63
- "@crawlee/types": "4.0.0-beta.86",
64
- "@crawlee/utils": "4.0.0-beta.86",
60
+ "@crawlee/browser": "4.0.0-beta.87",
61
+ "@crawlee/browser-pool": "4.0.0-beta.87",
62
+ "@crawlee/core": "4.0.0-beta.87",
63
+ "@crawlee/types": "4.0.0-beta.87",
64
+ "@crawlee/utils": "4.0.0-beta.87",
65
65
  "ow": "^2.0.0",
66
66
  "tslib": "^2.8.1"
67
67
  },
@@ -93,5 +93,5 @@
93
93
  }
94
94
  }
95
95
  },
96
- "gitHead": "c2f251426f3ccfcc6efc920e6d492be57beac43b"
96
+ "gitHead": "1b7604cd77b694460aac4448b4555444fa1b2bdb"
97
97
  }