@iflyrpa/playwright 1.1.2-beta.2 → 1.1.2-beta.3
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.cjs +371 -43922
- package/dist/index.d.ts +93 -9
- package/dist/index.js +21 -43298
- package/package.json +5 -8
- package/dist/511.cjs +0 -99
- package/dist/511.js +0 -98
- package/dist/electron/install.d.ts +0 -12
- package/dist/electron/launch.d.ts +0 -2
- package/dist/index.cjs.LICENSE.txt +0 -33
- package/dist/index.js.LICENSE.txt +0 -33
- package/dist/logger.d.ts +0 -12
- package/dist/packageManager.d.ts +0 -10
- package/dist/sentry.d.ts +0 -7
- package/dist/task.d.ts +0 -53
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,93 @@
|
|
|
1
|
-
import { Action } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export
|
|
1
|
+
import { Action } from '@iflyrpa/actions';
|
|
2
|
+
import { ActionMethodParams } from '@iflyrpa/actions';
|
|
3
|
+
import type { AutomateTask } from '@iflyrpa/share';
|
|
4
|
+
import type { ElectronApplication } from '@iflyrpa/share';
|
|
5
|
+
import { LoggerImplement } from '@iflyrpa/share';
|
|
6
|
+
import { Page } from 'playwright-core';
|
|
7
|
+
import type { PageParams } from '@iflyrpa/share';
|
|
8
|
+
|
|
9
|
+
export { ActionMethodParams }
|
|
10
|
+
|
|
11
|
+
declare class Logger implements LoggerImplement {
|
|
12
|
+
static instance: Logger | null;
|
|
13
|
+
private stream;
|
|
14
|
+
constructor(cachePath: string);
|
|
15
|
+
static getInstance(cachePath: string): Logger;
|
|
16
|
+
debug(...msg: any[]): void;
|
|
17
|
+
info(...msg: any[]): void;
|
|
18
|
+
warn(...msg: any[]): void;
|
|
19
|
+
error(prefix: string, err?: unknown): void;
|
|
20
|
+
close(): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare class PackageManager {
|
|
24
|
+
private task;
|
|
25
|
+
constructor(task: Task);
|
|
26
|
+
private getManifest;
|
|
27
|
+
private extract;
|
|
28
|
+
require(module: string): any;
|
|
29
|
+
install(name: string, version: string): Promise<void>;
|
|
30
|
+
update(name: string): Promise<string>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export declare class RpaTask extends Task {
|
|
34
|
+
actions: Action;
|
|
35
|
+
constructor(params: TaskParams);
|
|
36
|
+
private update;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class Task implements AutomateTask {
|
|
40
|
+
logger: Logger;
|
|
41
|
+
cachePath: string;
|
|
42
|
+
debug: boolean;
|
|
43
|
+
packagesDir: string;
|
|
44
|
+
packageManager: PackageManager;
|
|
45
|
+
private playwrightPackage;
|
|
46
|
+
private electronPackage;
|
|
47
|
+
private _electronApp;
|
|
48
|
+
/**
|
|
49
|
+
* 应用是否已关闭
|
|
50
|
+
*/
|
|
51
|
+
isClosed: boolean;
|
|
52
|
+
constructor({ cachePath, debug }: TaskParams);
|
|
53
|
+
/**
|
|
54
|
+
* 安装 playwright
|
|
55
|
+
* @returns
|
|
56
|
+
*/
|
|
57
|
+
private installPlaywright;
|
|
58
|
+
/**
|
|
59
|
+
* 安装 electron
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
private installElectron;
|
|
63
|
+
/**
|
|
64
|
+
* 启动 Electron
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
launchApp(): Promise<ElectronApplication>;
|
|
68
|
+
/**
|
|
69
|
+
* 临时文件目录
|
|
70
|
+
* @returns
|
|
71
|
+
*/
|
|
72
|
+
getTmpPath(): string;
|
|
73
|
+
/**
|
|
74
|
+
* 清空临时文件
|
|
75
|
+
*/
|
|
76
|
+
private clearTmpPath;
|
|
77
|
+
/**
|
|
78
|
+
* 关闭 playwright 启动的 electron 客户端
|
|
79
|
+
* @returns
|
|
80
|
+
*/
|
|
81
|
+
close(): Promise<void>;
|
|
82
|
+
createPage(pageParams: PageParams): Promise<Page>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
declare interface TaskParams {
|
|
86
|
+
debug?: boolean;
|
|
87
|
+
cachePath: string;
|
|
88
|
+
forceUpdate?: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export declare const version: string;
|
|
92
|
+
|
|
93
|
+
export { }
|