wechat-mp-controller 0.1.2 → 0.1.4
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.ts +3 -4
- package/dist/index.js +2 -3
- package/dist/type.d.ts +17 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import { LaunchOptions } from 'puppeteer-core';
|
|
2
|
+
export type WeChatMpControllerOptions = Pick<LaunchOptions, 'headless' | 'userDataDir'>;
|
|
4
3
|
export declare class WeChatMpController {
|
|
5
4
|
static create(options?: WeChatMpControllerOptions): Promise<Controller>;
|
|
6
5
|
}
|
|
@@ -40,7 +39,7 @@ export declare class Controller {
|
|
|
40
39
|
message: string;
|
|
41
40
|
uploader: {
|
|
42
41
|
name: string;
|
|
43
|
-
|
|
42
|
+
openId: string;
|
|
44
43
|
};
|
|
45
44
|
}): Promise<void>;
|
|
46
45
|
}
|
package/dist/index.js
CHANGED
|
@@ -15,8 +15,7 @@ export class Controller {
|
|
|
15
15
|
defaultViewport: null,
|
|
16
16
|
args: ['--start-maximized'],
|
|
17
17
|
channel: 'chrome',
|
|
18
|
-
|
|
19
|
-
userDataDir: './.wmpc-cache'
|
|
18
|
+
...options
|
|
20
19
|
});
|
|
21
20
|
this.page = await this.browser.newPage();
|
|
22
21
|
await this.page.goto(`https://mp.weixin.qq.com/`);
|
|
@@ -119,7 +118,7 @@ export class Controller {
|
|
|
119
118
|
action: 'get_class',
|
|
120
119
|
token: urlToken,
|
|
121
120
|
lang: 'zh-CN',
|
|
122
|
-
openid: options.uploader.
|
|
121
|
+
openid: options.uploader.openId,
|
|
123
122
|
user_name: encodeURIComponent(options.uploader.name)
|
|
124
123
|
});
|
|
125
124
|
await this.page.goto(`https://mp.weixin.qq.com/wxamp/wadevelopcode/get_class?${searchParams.toString()}`);
|
package/dist/type.d.ts
CHANGED
|
@@ -21,6 +21,23 @@ export type OriginVersionInfo = {
|
|
|
21
21
|
inner_version: number;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
+
experience_info: {
|
|
25
|
+
basic_info: {
|
|
26
|
+
open_id: string;
|
|
27
|
+
version: string;
|
|
28
|
+
nick_name: string;
|
|
29
|
+
time: number;
|
|
30
|
+
describe: string;
|
|
31
|
+
status: number;
|
|
32
|
+
warning_api_list: string[];
|
|
33
|
+
avatar: string;
|
|
34
|
+
fail_reason: string;
|
|
35
|
+
is_speedup: number;
|
|
36
|
+
audit_status: number;
|
|
37
|
+
audit_id: number;
|
|
38
|
+
};
|
|
39
|
+
qr_path: string;
|
|
40
|
+
};
|
|
24
41
|
develop_info: {
|
|
25
42
|
info_list: Array<{
|
|
26
43
|
basic_info: {
|