@wdio/browserstack-service 9.33.2 → 9.34.0

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.
@@ -46,9 +46,10 @@ declare class _InsightsHandler {
46
46
  * test/hook so the backend closes the entity instead of leaving it in_progress and
47
47
  * letting the build watchdog inflate the duration.
48
48
  *
49
- * Scoped to mocha. Cucumber hooks are keyed differently (getCucumberHookUniqueId) and
50
- * their lifecycle differs, so they are intentionally left out here closing them safely
51
- * would need cucumber-specific keying and is a known gap for a follow-up.
49
+ * Covers mocha and cucumber. Cucumber entries are keyed by hook-definition id / scenario
50
+ * unique id rather than title, but both stash kind + identity at start time, so the same
51
+ * kind-tag scan closes them (SDK-7167: an AFTER_EACH hook whose finish was never emitted
52
+ * held the hook open until the backend's 2h hook timeout, inflating the build duration).
52
53
  *
53
54
  * Each entry was tagged with kind at start time so we emit HookRunFinished for hooks and
54
55
  * TestRunFinished for tests without re-deriving the kind from the title. Entries without a
package/build/types.d.ts CHANGED
@@ -91,6 +91,22 @@ export interface BrowserstackConfig {
91
91
  * Currently supports testPlanId.
92
92
  */
93
93
  testManagementOptions?: TestManagementOptions;
94
+ /**
95
+ * By default the service uploads its own debug logs, your `package.json` and a copy of
96
+ * your wdio config file at the end of a run, so BrowserStack support can debug issues
97
+ * without asking you to reproduce them.
98
+ *
99
+ * Values under known credential keys are removed before upload on a best-effort basis:
100
+ * BrowserStack credentials, common third-party secret names (`clientSecret`,
101
+ * `AWS_SECRET_ACCESS_KEY`, …), inline PEM blocks and basic-auth URLs. It is key-name
102
+ * driven, so a secret stored under an unrecognised name can still be included — if your
103
+ * config holds secrets you would rather not send, set this to true.
104
+ *
105
+ * Set this to true to disable that upload entirely.
106
+ * Can also be set with the `BROWSERSTACK_DISABLE_AUTO_CAPTURE_LOGS=true` env var.
107
+ * @default false
108
+ */
109
+ disableAutoCaptureLogs?: boolean;
94
110
  /**
95
111
  * Set this to true to enable BrowserStack Percy which will take screenshots
96
112
  * and snapshots for your tests run on Browserstack
package/build/util.d.ts CHANGED
@@ -99,6 +99,15 @@ export declare const getA11yResults: (...args: (object | boolean | undefined | n
99
99
  export declare const getAppA11yResults: (...args: (object | boolean | undefined | null | string)[]) => any;
100
100
  export declare const getAppA11yResultsSummary: (...args: (object | boolean | undefined | null | string)[]) => any;
101
101
  export declare const getA11yResultsSummary: (...args: (object | boolean | undefined | null | string)[]) => any;
102
+ /**
103
+ * Render an error together with its `cause` chain.
104
+ *
105
+ * Node's native fetch reports every transport failure as the same opaque
106
+ * `TypeError: fetch failed`; the actionable detail (ENOTFOUND, ECONNRESET, a proxy
107
+ * refusal) only lives on `error.cause`, which plain interpolation drops. Without this
108
+ * a failed build-stop is indistinguishable from any other network fault in the logs.
109
+ */
110
+ export declare const describeErrorWithCause: (error: unknown, depth?: number) => string;
102
111
  export declare const stopBuildUpstream: (...args: (object | boolean | undefined | null | string)[]) => any;
103
112
  export declare function getCiInfo(): {
104
113
  name: string;
@@ -191,7 +200,11 @@ export declare function getFailureObject(error: string | Error): {
191
200
  failure_type: string | null;
192
201
  };
193
202
  export declare const sleep: (ms?: number) => Promise<unknown>;
194
- export declare function uploadLogs(user: string | undefined, key: string | undefined, clientBuildUuid: string): Promise<any>;
203
+ export interface UploadLogsOptions {
204
+ disableAutoCaptureLogs?: boolean;
205
+ config?: Options.Testrunner;
206
+ }
207
+ export declare function uploadLogs(user: string | undefined, key: string | undefined, clientBuildUuid: string, options?: UploadLogsOptions): Promise<any>;
195
208
  export declare const isObject: (object: unknown) => boolean;
196
209
  export declare const ObjectsAreEqual: (object1: object, object2: object) => boolean;
197
210
  export declare const getPlatformVersion: (...args: unknown[]) => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browserstack-service",
3
- "version": "9.33.2",
3
+ "version": "9.34.0",
4
4
  "description": "WebdriverIO service for better Browserstack integration",
5
5
  "author": "BrowserStack <support@browserstack.com>",
6
6
  "homepage": "https://github.com/browserstack/wdio-browserstack-service",