test-wuying-agentbay-sdk 0.13.0-beta.20251212140302 → 0.13.0-beta.20251212160413

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/dist/index.cjs CHANGED
@@ -10584,8 +10584,12 @@ var _BrowserOptionClass = class _BrowserOptionClass {
10584
10584
  optionMap["fingerprint"] = fp;
10585
10585
  }
10586
10586
  if (this.fingerprintFormat !== void 0) {
10587
- const jsonStr = this.fingerprintFormat.toJson();
10588
- optionMap["fingerprintRawData"] = Buffer.from(jsonStr, "utf-8").toString("base64");
10587
+ try {
10588
+ const jsonStr = this.fingerprintFormat.toJson();
10589
+ optionMap["fingerprintRawData"] = Buffer.from(jsonStr, "utf-8").toString("base64");
10590
+ } catch (error) {
10591
+ logError("Failed to serialize fingerprint format:", error);
10592
+ }
10589
10593
  }
10590
10594
  if (this.fingerprintPersistent) {
10591
10595
  this.fingerprintPersistPath = `${BROWSER_FINGERPRINT_PERSIST_PATH}/fingerprint.json`;
@@ -16983,7 +16987,7 @@ var _AgentBay = class _AgentBay {
16983
16987
  *
16984
16988
  * @see {@link get}, {@link list}, {@link Session.delete}
16985
16989
  */
16986
- async create(params = {}) {
16990
+ async create(params) {
16987
16991
  try {
16988
16992
  logDebug(`default context syncs length: ${_optionalChain([params, 'access', _192 => _192.contextSync, 'optionalAccess', _193 => _193.length])}`);
16989
16993
  if (_optionalChain([params, 'access', _194 => _194.extraConfigs, 'optionalAccess', _195 => _195.mobile, 'optionalAccess', _196 => _196.simulateConfig])) {
@@ -18819,6 +18823,13 @@ var _CreateSessionParams = class _CreateSessionParams {
18819
18823
  this.extraConfigs = extraConfigs;
18820
18824
  return this;
18821
18825
  }
18826
+ /**
18827
+ * WithFramework sets the framework name for the session parameters and returns the updated parameters.
18828
+ */
18829
+ withFramework(framework) {
18830
+ this.framework = framework;
18831
+ return this;
18832
+ }
18822
18833
  /**
18823
18834
  * GetLabelsJSON returns the labels as a JSON string.
18824
18835
  * Returns an object with success status and result/error message to match Go version behavior.