@wdio/browserstack-service 9.31.0 → 9.32.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.
package/build/types.d.ts CHANGED
@@ -129,6 +129,17 @@ export interface BrowserstackConfig {
129
129
  * @default undefined
130
130
  */
131
131
  app?: string | AppConfig;
132
+ /**
133
+ * Treat this session as App Automate without the SDK managing the app.
134
+ * When `true`, the SDK classifies the run as App Automate, does NOT upload
135
+ * an app, and does NOT inject an `appium:app` capability — you supply the
136
+ * app reference yourself via the `appium:app` driver capability.
137
+ * When explicitly `false` and no `app` is provided, the SDK throws a
138
+ * config error before the run starts. Leaving it unset preserves existing
139
+ * behaviour.
140
+ * @default undefined
141
+ */
142
+ skipAppOverride?: boolean;
132
143
  /**
133
144
  * Enable routing connections from BrowserStack cloud through your computer.
134
145
  * You will also need to set `browserstack.local` to true in browser capabilities.
package/build/util.d.ts CHANGED
@@ -161,6 +161,24 @@ export declare function getBrowserStackKey(config: Options.Testrunner): string |
161
161
  export declare function isUndefined(value: unknown): boolean;
162
162
  export declare function isTrue(value?: unknown): boolean;
163
163
  export declare function isFalse(value?: unknown): boolean;
164
+ /**
165
+ * skipAppOverride validation chokepoint — ported from the Node SDK's
166
+ * validateSkipAppOverride (helper.js) / Java BrowserStackJavaAgent.processAppOptions.
167
+ * Called ONCE from the launcher (main process, pre-session). Emits the fixed warning,
168
+ * handles the three edge cases, and clears the app on conflict so it is neither uploaded
169
+ * nor injected. There is NO Tier-2 branch: every WebdriverIO test framework
170
+ * (mocha/jasmine/cucumber) supports App Automate.
171
+ *
172
+ * The standard warning and the edge-2 error are verbatim with the other BrowserStack SDKs
173
+ * (BrowserStackJavaAgent#processAppOptions). The edge-1 conflict warning is INTENTIONALLY adapted for
174
+ * WebdriverIO — it says "browserstack service options" (where WDIO reads `app`), not "browserstack.yml" —
175
+ * so please do NOT "fix" it back to the yml wording to match the other SDKs.
176
+ * Graceful: never throws except the deliberate edge-2 config error (explicit false + no app),
177
+ * which fires pre-session so the run aborts cleanly.
178
+ *
179
+ * Mutates `options.app` (edge-1). 3-state via isTrue/isFalse — never `!options.skipAppOverride`.
180
+ */
181
+ export declare function validateSkipAppOverride(options?: BrowserstackConfig & BrowserstackOptions): void;
164
182
  export declare function frameworkSupportsHook(hook: string, framework?: string): boolean;
165
183
  export declare const patchConsoleLogs: (...args: unknown[]) => any;
166
184
  export declare function getFailureObject(error: string | Error): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdio/browserstack-service",
3
- "version": "9.31.0",
3
+ "version": "9.32.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",