@skrillex1224/playwright-toolkit 2.1.86 → 2.1.88
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/browser.js +54 -18
- package/dist/browser.js.map +3 -3
- package/dist/index.cjs +54 -18
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +54 -18
- package/dist/index.js.map +3 -3
- package/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29,43 +29,79 @@ var Status = {
|
|
|
29
29
|
Failed: "FAILED"
|
|
30
30
|
};
|
|
31
31
|
var PresetOfLiveViewKey = "LIVE_VIEW_SCREENSHOT";
|
|
32
|
+
var createActorInfo = (info) => {
|
|
33
|
+
const normalizeDomain = (value) => {
|
|
34
|
+
if (!value) return "";
|
|
35
|
+
return String(value).trim().replace(/^https?:\/\//, "").replace(/\/.*$/, "");
|
|
36
|
+
};
|
|
37
|
+
const normalizePath = (value) => {
|
|
38
|
+
if (!value) return "/";
|
|
39
|
+
const raw = String(value).trim();
|
|
40
|
+
if (!raw) return "/";
|
|
41
|
+
return raw.startsWith("/") ? raw : `/${raw}`;
|
|
42
|
+
};
|
|
43
|
+
const buildLandingUrl = ({ protocol: protocol2, domain: domain2, path: path2 }) => {
|
|
44
|
+
const safeProtocol = String(protocol2).trim();
|
|
45
|
+
const safeDomain = normalizeDomain(domain2);
|
|
46
|
+
const safePath = normalizePath(path2);
|
|
47
|
+
return `${safeProtocol}://${safeDomain}${safePath}`;
|
|
48
|
+
};
|
|
49
|
+
const protocol = info.protocol || "https";
|
|
50
|
+
const domain = normalizeDomain(info.domain);
|
|
51
|
+
const path = normalizePath(info.path);
|
|
52
|
+
return {
|
|
53
|
+
...info,
|
|
54
|
+
protocol,
|
|
55
|
+
domain,
|
|
56
|
+
path,
|
|
57
|
+
get landingUrl() {
|
|
58
|
+
return buildLandingUrl(this);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
};
|
|
32
62
|
var ActorInfo = {
|
|
33
|
-
doubao: {
|
|
63
|
+
doubao: createActorInfo({
|
|
34
64
|
key: "doubao",
|
|
35
65
|
name: "\u8C46\u5305",
|
|
36
66
|
icon: "https://heartbitai.com/geo-front/20251128/platform/icon_doubao.svg",
|
|
37
|
-
domain: "doubao.com"
|
|
38
|
-
|
|
39
|
-
|
|
67
|
+
domain: "www.doubao.com",
|
|
68
|
+
path: "/"
|
|
69
|
+
}),
|
|
70
|
+
deepseek: createActorInfo({
|
|
40
71
|
key: "deepseek",
|
|
41
72
|
name: "DeepSeek",
|
|
42
73
|
icon: "https://heartbitai.com/geo-front/20251128/platform/icon_deepseek.svg",
|
|
43
|
-
domain: "deepseek.com"
|
|
44
|
-
|
|
45
|
-
|
|
74
|
+
domain: "chat.deepseek.com",
|
|
75
|
+
path: "/"
|
|
76
|
+
}),
|
|
77
|
+
erine: createActorInfo({
|
|
46
78
|
key: "erine",
|
|
47
79
|
name: "\u6587\u5FC3\u4E00\u8A00",
|
|
48
80
|
icon: "https://heartbitai.com/geo-front/20251128/platform/icon_wenxin.png",
|
|
49
|
-
domain: "yiyan.baidu.com"
|
|
50
|
-
|
|
51
|
-
|
|
81
|
+
domain: "yiyan.baidu.com",
|
|
82
|
+
path: "/"
|
|
83
|
+
}),
|
|
84
|
+
yuanbao: createActorInfo({
|
|
52
85
|
key: "yuanbao",
|
|
53
86
|
name: "\u5143\u5B9D",
|
|
54
87
|
icon: "https://heartbitai.com/geo-front/20251128/platform/icon_yuanbao.svg",
|
|
55
|
-
domain: "yuanbao.tencent.com"
|
|
56
|
-
|
|
57
|
-
|
|
88
|
+
domain: "yuanbao.tencent.com",
|
|
89
|
+
path: "/chat/"
|
|
90
|
+
}),
|
|
91
|
+
kimi: createActorInfo({
|
|
58
92
|
key: "kimi",
|
|
59
93
|
name: "Kimi",
|
|
60
94
|
icon: "https://heartbitai.com/geo-front/20251128/platform/icon_kimi.svg",
|
|
61
|
-
domain: "kimi.com"
|
|
62
|
-
|
|
63
|
-
|
|
95
|
+
domain: "www.kimi.com",
|
|
96
|
+
path: "/"
|
|
97
|
+
}),
|
|
98
|
+
qwen: createActorInfo({
|
|
64
99
|
key: "qwen",
|
|
65
100
|
name: "\u901A\u4E49\u5343\u95EE",
|
|
66
101
|
icon: "https://heartbitai.com/geo-front/20251128/platform/icon_qwen.png",
|
|
67
|
-
domain: "qianwen.com"
|
|
68
|
-
|
|
102
|
+
domain: "www.qianwen.com",
|
|
103
|
+
path: "/chat"
|
|
104
|
+
})
|
|
69
105
|
};
|
|
70
106
|
|
|
71
107
|
// src/internals/logger.js
|