gpt-driver-node 1.0.8 → 1.0.10

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
@@ -1113,7 +1113,10 @@ class GptDriver {
1113
1113
  device_config: {
1114
1114
  platform: this.appiumSessionConfig?.platform ?? this.gptDriverCloudConfig?.platform,
1115
1115
  device: this.appiumSessionConfig?.deviceName ?? this.gptDriverCloudConfig?.deviceName,
1116
- os: this.appiumSessionConfig?.platformVersion ?? this.gptDriverCloudConfig?.platformVersion
1116
+ os: this.appiumSessionConfig?.platformVersion ?? this.gptDriverCloudConfig?.platformVersion,
1117
+ ...this.appiumSessionConfig?.size && {
1118
+ screenResolution: `${this.appiumSessionConfig.size.width}x${this.appiumSessionConfig.size.height}`
1119
+ }
1117
1120
  },
1118
1121
  use_internal_virtual_device: this.useGptDriverCloud,
1119
1122
  build_id: this.buildId,
@@ -1630,6 +1633,7 @@ ${"=".repeat(50)}`);
1630
1633
  globalLogger.debug(`[Performance] Smart loop completed in ${(smartLoopEndTime - smartLoopStartTime).toFixed(2)}ms`);
1631
1634
  if (!result.success) {
1632
1635
  await this.setSessionFailed();
1636
+ throw new Error(`Smart loop failed: ${result.error}`);
1633
1637
  }
1634
1638
  if (result.cacheHitCount) {
1635
1639
  this._stats_cacheHits += result.cacheHitCount;
package/dist/index.mjs CHANGED
@@ -1111,7 +1111,10 @@ class GptDriver {
1111
1111
  device_config: {
1112
1112
  platform: this.appiumSessionConfig?.platform ?? this.gptDriverCloudConfig?.platform,
1113
1113
  device: this.appiumSessionConfig?.deviceName ?? this.gptDriverCloudConfig?.deviceName,
1114
- os: this.appiumSessionConfig?.platformVersion ?? this.gptDriverCloudConfig?.platformVersion
1114
+ os: this.appiumSessionConfig?.platformVersion ?? this.gptDriverCloudConfig?.platformVersion,
1115
+ ...this.appiumSessionConfig?.size && {
1116
+ screenResolution: `${this.appiumSessionConfig.size.width}x${this.appiumSessionConfig.size.height}`
1117
+ }
1115
1118
  },
1116
1119
  use_internal_virtual_device: this.useGptDriverCloud,
1117
1120
  build_id: this.buildId,
@@ -1628,6 +1631,7 @@ ${"=".repeat(50)}`);
1628
1631
  globalLogger.debug(`[Performance] Smart loop completed in ${(smartLoopEndTime - smartLoopStartTime).toFixed(2)}ms`);
1629
1632
  if (!result.success) {
1630
1633
  await this.setSessionFailed();
1634
+ throw new Error(`Smart loop failed: ${result.error}`);
1631
1635
  }
1632
1636
  if (result.cacheHitCount) {
1633
1637
  this._stats_cacheHits += result.cacheHitCount;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpt-driver-node",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.cts",