@browserbasehq/stagehand 4.0.1 → 4.0.2
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.
|
Binary file
|
|
@@ -53446,7 +53446,7 @@ var WebTracerProvider = class extends BasicTracerProvider {
|
|
|
53446
53446
|
};
|
|
53447
53447
|
var package_default = {
|
|
53448
53448
|
name: "@browserbasehq/stagehand-extension",
|
|
53449
|
-
version: "1.0.
|
|
53449
|
+
version: "1.0.1",
|
|
53450
53450
|
"private": true,
|
|
53451
53451
|
type: "module",
|
|
53452
53452
|
scripts: {
|
|
@@ -56935,7 +56935,8 @@ var StagehandRuntime = class {
|
|
|
56935
56935
|
}
|
|
56936
56936
|
}
|
|
56937
56937
|
async initialize(params, logger = this.logger) {
|
|
56938
|
-
|
|
56938
|
+
const state = this.state.getState();
|
|
56939
|
+
if (state.status === "closed") throw new Error("Stagehand has been closed and cannot be initialized again");
|
|
56939
56940
|
if (this.initializationInProgress) throw new Error("Stagehand initialization is already in progress");
|
|
56940
56941
|
this.initializationInProgress = true;
|
|
56941
56942
|
try {
|
|
@@ -56945,7 +56946,7 @@ var StagehandRuntime = class {
|
|
|
56945
56946
|
await this.replaceBrowserConnection({ cdpUrl: params.browserCdpUrl }, logger);
|
|
56946
56947
|
}
|
|
56947
56948
|
const pages = await this.runWithTelemetryContext(Symbol("stagehand.init"), logger, async () => {
|
|
56948
|
-
await this.browserSession?.prepareForInitialization?.();
|
|
56949
|
+
if (state.status === "created") await this.browserSession?.prepareForInitialization?.();
|
|
56949
56950
|
return await this.contextPages();
|
|
56950
56951
|
});
|
|
56951
56952
|
this.tracing.configure(params.telemetry, params.clientInfo);
|
package/dist/index.mjs
CHANGED
|
@@ -4248,7 +4248,7 @@ const StagehandCreateOptionsSchema = StagehandClientCreateConfigSchema.extend({
|
|
|
4248
4248
|
const STAGEHAND_SDK_IDENTITY = {
|
|
4249
4249
|
name: "stagehand-sdk-ts",
|
|
4250
4250
|
language: "typescript",
|
|
4251
|
-
version: "4.0.
|
|
4251
|
+
version: "4.0.2"
|
|
4252
4252
|
};
|
|
4253
4253
|
const STAGEHAND_SDK_CLIENT_INFO = {
|
|
4254
4254
|
name: STAGEHAND_SDK_IDENTITY.name,
|