@wdio/firefox-profile-service 10.0.0-alpha.18 → 10.0.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/AGENTS.md +16 -0
- package/README.md +12 -15
- package/build/index.js +7 -11
- package/build/launcher.d.ts.map +1 -1
- package/build/types.d.ts +0 -6
- package/build/types.d.ts.map +1 -1
- package/package.json +6 -6
package/AGENTS.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# @wdio/firefox-profile-service
|
|
2
|
+
|
|
3
|
+
`FirefoxProfileLauncher#onPrepare` encodes a Firefox profile and writes it to
|
|
4
|
+
`moz:firefoxOptions.profile`. Tests live in `tests/launcher.test.ts`.
|
|
5
|
+
|
|
6
|
+
- Drive the service through `onPrepare`. Empty options must use a Firefox
|
|
7
|
+
capability. A non-Firefox capability stays unchanged even if that early
|
|
8
|
+
return is removed, so it does not prove the return.
|
|
9
|
+
- `profileDirectory` is not a Firefox preference. Assert that `setPreference`
|
|
10
|
+
is not called for it. `FirefoxProfile.copy` is the proof this option uses
|
|
11
|
+
the async copy API: the shared mock encodes every profile as `foobar`, so
|
|
12
|
+
the capability string cannot tell copy from `new Profile()`.
|
|
13
|
+
- Do not call `_setPreferences` or `_buildExtension` just to hit a missing
|
|
14
|
+
profile. `firefox-profile` `copy` resolves to a profile or rejects.
|
|
15
|
+
`onPrepare` narrows the optional callback result once; the helpers assume
|
|
16
|
+
that already happened.
|
package/README.md
CHANGED
|
@@ -30,8 +30,7 @@ export const config = {
|
|
|
30
30
|
'/path/to/extensionB' // or path to unpacked Firefox extension
|
|
31
31
|
],
|
|
32
32
|
'xpinstall.signatures.required': false,
|
|
33
|
-
'browser.startup.homepage': 'https://webdriver.io'
|
|
34
|
-
legacy: true // only use for firefox <= 55
|
|
33
|
+
'browser.startup.homepage': 'https://webdriver.io'
|
|
35
34
|
}]
|
|
36
35
|
],
|
|
37
36
|
// ...
|
|
@@ -48,20 +47,24 @@ Contains all settings as key-value pair. You can find all available settings on
|
|
|
48
47
|
|
|
49
48
|
### extensions
|
|
50
49
|
|
|
50
|
+
<Option type="String[]" default="[]">
|
|
51
|
+
|
|
51
52
|
Add one or multiple extensions to the browser session. All entries can be either an absolute path to the `.xpi` file or the path to an unpacked Firefox extension directory.
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
Default: `[]`
|
|
54
|
+
</Option>
|
|
55
55
|
|
|
56
56
|
### profileDirectory
|
|
57
57
|
|
|
58
|
+
<Option type="String" default="null">
|
|
59
|
+
|
|
58
60
|
Create Firefox profile based on an existing one by setting an absolute path to that profile.
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
Default: `null`
|
|
62
|
+
</Option>
|
|
62
63
|
|
|
63
64
|
### proxy
|
|
64
65
|
|
|
66
|
+
<Option type="Object" default="null">
|
|
67
|
+
|
|
65
68
|
Set network proxy settings. The parameter `proxy` is a hash whose structure depends on the value of the mandatory `proxyType` key, which takes one of the following string values:
|
|
66
69
|
|
|
67
70
|
* `direct` - direct connection (no proxy)
|
|
@@ -69,8 +72,7 @@ Set network proxy settings. The parameter `proxy` is a hash whose structure depe
|
|
|
69
72
|
* `pac` - use an automatic proxy configuration set based on the value of `autoconfigUrl` key
|
|
70
73
|
* `manual` - manual proxy settings defined separately for different protocols using values from the following keys: `ftpProxy`, `httpProxy`, `sslProxy`, `socksProxy`
|
|
71
74
|
|
|
72
|
-
|
|
73
|
-
Default: `null`<br />
|
|
75
|
+
</Option>
|
|
74
76
|
Example:
|
|
75
77
|
|
|
76
78
|
- Automatic Proxy:
|
|
@@ -125,13 +127,8 @@ Example:
|
|
|
125
127
|
};
|
|
126
128
|
```
|
|
127
129
|
|
|
128
|
-
### legacy
|
|
129
|
-
|
|
130
|
-
Please set this flag to `true` if you use Firefox v55 or lower.
|
|
131
|
-
|
|
132
|
-
Type: `Boolean`<br />
|
|
133
|
-
Default: `false`
|
|
134
|
-
|
|
135
130
|
----
|
|
136
131
|
|
|
137
132
|
For more information on WebdriverIO see the [homepage](https://webdriver.io).
|
|
133
|
+
|
|
134
|
+
|
package/build/index.js
CHANGED
|
@@ -26,25 +26,21 @@ var FirefoxProfileLauncher = class {
|
|
|
26
26
|
* Sets any preferences and proxy
|
|
27
27
|
*/
|
|
28
28
|
_setPreferences() {
|
|
29
|
-
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
29
|
+
const profile = this._profile;
|
|
32
30
|
for (const [preference, value] of Object.entries(this._options)) {
|
|
33
|
-
if (["extensions", "proxy", "
|
|
31
|
+
if (["extensions", "proxy", "profileDirectory"].includes(preference)) {
|
|
34
32
|
continue;
|
|
35
33
|
}
|
|
36
|
-
|
|
34
|
+
profile.setPreference(preference, value);
|
|
37
35
|
}
|
|
38
36
|
if (this._options.proxy) {
|
|
39
|
-
|
|
37
|
+
profile.setProxy(this._options.proxy);
|
|
40
38
|
}
|
|
41
|
-
|
|
39
|
+
profile.updatePreferences();
|
|
42
40
|
}
|
|
43
41
|
async _buildExtension(capabilities) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
const zippedProfile = await promisify(this._profile.encoded.bind(this._profile))();
|
|
42
|
+
const profile = this._profile;
|
|
43
|
+
const zippedProfile = await promisify(profile.encoded.bind(profile))();
|
|
48
44
|
if (Array.isArray(capabilities)) {
|
|
49
45
|
capabilities.flatMap((c) => {
|
|
50
46
|
if (Object.values(c).length > 0 && Object.values(c).every((c2) => typeof c2 === "object" && c2.capabilities)) {
|
package/build/launcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEvD,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAE3B,OAAO,CAAC,QAAQ;IAD5B,OAAO,CAAC,QAAQ,CAAC,CAAS;gBACN,QAAQ,EAAE,qBAAqB;IAE7C,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,sBAAsB;IA4BhF;;OAEG;IACH,eAAe;
|
|
1
|
+
{"version":3,"file":"launcher.d.ts","sourceRoot":"","sources":["../src/launcher.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAEvD,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAE3B,OAAO,CAAC,QAAQ;IAD5B,OAAO,CAAC,QAAQ,CAAC,CAAS;gBACN,QAAQ,EAAE,qBAAqB;IAE7C,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,sBAAsB;IA4BhF;;OAEG;IACH,eAAe;IAkBT,eAAe,CAAC,YAAY,EAAE,YAAY,CAAC,sBAAsB;IA+BvE,WAAW,CAAC,UAAU,EAAE,YAAY,CAAC,+BAA+B,EAAE,aAAa,EAAE,MAAM;CAM9F"}
|
package/build/types.d.ts
CHANGED
|
@@ -91,12 +91,6 @@ export interface FirefoxProfileOptions extends FirefoxSettings {
|
|
|
91
91
|
* ```
|
|
92
92
|
*/
|
|
93
93
|
proxy?: ProxySettings;
|
|
94
|
-
/**
|
|
95
|
-
* Please set this flag to `true` if you use Firefox v55 or lower.
|
|
96
|
-
*
|
|
97
|
-
* @default false
|
|
98
|
-
*/
|
|
99
|
-
legacy?: boolean;
|
|
100
94
|
}
|
|
101
95
|
export {};
|
|
102
96
|
//# sourceMappingURL=types.d.ts.map
|
package/build/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,KAAK,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OA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CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,KAAK,aAAa,GAAG,eAAe,GAAG,mBAAmB,GAAG,sBAAsB,GAAG,mBAAmB,CAAA;AAEzG,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC1D;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuDG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/firefox-profile-service",
|
|
3
|
-
"version": "10.0.0
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "WebdriverIO service that lets you define your Firefox profile in your wdio.conf.js",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-firefox-profile-service",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"engines": {
|
|
9
|
-
"node": ">=
|
|
9
|
+
"node": ">=22.19.0"
|
|
10
10
|
},
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"types": "./build/index.d.ts"
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
"typeScriptVersion": "
|
|
39
|
+
"typeScriptVersion": "6.0.3",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@wdio/types": "10.0.0
|
|
42
|
-
"firefox-profile": "^4.
|
|
41
|
+
"@wdio/types": "10.0.0",
|
|
42
|
+
"firefox-profile": "^4.7.1"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "38bd5ff4dccfaadccce4bd678286f00594623da2"
|
|
48
48
|
}
|