@weapp-vite/miniprogram-automator 1.2.15 → 1.2.16
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.d.mts +1 -1
- package/dist/index.mjs +3 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -269,7 +269,7 @@ declare class Page {
|
|
|
269
269
|
$(selector: string, options?: PageQueryOptions): Promise<Element | null>;
|
|
270
270
|
$$(selector: string, options?: PageQueryOptions): Promise<any>;
|
|
271
271
|
getElementByXpath(selector: string, options?: PageQueryOptions): Promise<Element | null>;
|
|
272
|
-
getElementsByXpath(selector: string, options?: PageQueryOptions): Promise<
|
|
272
|
+
getElementsByXpath(selector: string, options?: PageQueryOptions): Promise<Element[]>;
|
|
273
273
|
xpath(selector: string): Promise<Element | null>;
|
|
274
274
|
wxml(): Promise<any>;
|
|
275
275
|
renderedNodes(selector: string, options?: PageQueryOptions): Promise<RenderedNodeSnapshot[]>;
|
package/dist/index.mjs
CHANGED
|
@@ -1097,7 +1097,7 @@ function resolveWechatDevtoolsBootstrapArgs(args) {
|
|
|
1097
1097
|
}
|
|
1098
1098
|
//#endregion
|
|
1099
1099
|
//#region package.json
|
|
1100
|
-
var version = "1.2.
|
|
1100
|
+
var version = "1.2.16";
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region src/Native.ts
|
|
1103
1103
|
/** Native 的实现。 */
|
|
@@ -1452,7 +1452,8 @@ var Page = class Page {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
1454
|
async getElementsByXpath(selector, options = {}) {
|
|
1455
|
-
const
|
|
1455
|
+
const elements = (await this.send("Page.getElementsByXpath", { selector }, { timeout: options.timeout ?? PAGE_QUERY_TIMEOUT }))?.elements;
|
|
1456
|
+
if (!Array.isArray(elements)) throw new TypeError("DevTools Page.getElementsByXpath 返回了无效响应:缺少 elements 数组。");
|
|
1456
1457
|
return elements.map((element) => {
|
|
1457
1458
|
return Element.create(this.connection, {
|
|
1458
1459
|
...element,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-vite/miniprogram-automator",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.16",
|
|
5
5
|
"description": "完全兼容微信 miniprogram-automator 的现代化替代实现",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"obug": "^2.1.4",
|
|
45
45
|
"ws": "^8.21.3",
|
|
46
|
-
"@weapp-vite/qr": "1.1.
|
|
46
|
+
"@weapp-vite/qr": "1.1.2"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/ws": "^8.18.1",
|
|
54
|
-
"sharp": "^0.35.
|
|
54
|
+
"sharp": "^0.35.4"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"dev": "tsdown -w --sourcemap",
|