@iflyrpa/playwright 1.1.1 → 1.1.2-beta.2
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/511.cjs +99 -0
- package/dist/511.js +98 -0
- package/dist/electron/install.d.ts +12 -0
- package/dist/electron/launch.d.ts +2 -0
- package/dist/index.cjs +43976 -478
- package/dist/index.cjs.LICENSE.txt +33 -0
- package/dist/index.d.ts +5 -82
- package/dist/index.js +43668 -0
- package/dist/index.js.LICENSE.txt +33 -0
- package/dist/logger.d.ts +12 -0
- package/dist/packageManager.d.ts +10 -0
- package/dist/sentry.d.ts +7 -0
- package/dist/task.d.ts +53 -0
- package/package.json +16 -13
- package/dist/index.d.cts +0 -86
- package/dist/index.d.mts +0 -86
- package/dist/index.mjs +0 -486
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* negotiator
|
|
3
|
+
* Copyright(c) 2012 Federico Romero
|
|
4
|
+
* Copyright(c) 2012-2014 Isaac Z. Schlueter
|
|
5
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
6
|
+
* MIT Licensed
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright (c) 2010-2012 Mikeal Rogers
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
* Unless required by applicable law or agreed to in writing,
|
|
17
|
+
* software distributed under the License is distributed on an "AS
|
|
18
|
+
* IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
19
|
+
* express or implied. See the License for the specific language
|
|
20
|
+
* governing permissions and limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @preserve
|
|
25
|
+
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
26
|
+
*
|
|
27
|
+
* @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
|
|
28
|
+
* @see http://github.com/homebrewing/brauhaus-diff
|
|
29
|
+
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
30
|
+
* @see http://github.com/garycourt/murmurhash-js
|
|
31
|
+
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
32
|
+
* @see http://sites.google.com/site/murmurhash/
|
|
33
|
+
*/
|
package/dist/logger.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type LoggerImplement } from "@iflyrpa/share";
|
|
2
|
+
export declare class Logger implements LoggerImplement {
|
|
3
|
+
static instance: Logger | null;
|
|
4
|
+
private stream;
|
|
5
|
+
constructor(cachePath: string);
|
|
6
|
+
static getInstance(cachePath: string): Logger;
|
|
7
|
+
debug(...msg: any[]): void;
|
|
8
|
+
info(...msg: any[]): void;
|
|
9
|
+
warn(...msg: any[]): void;
|
|
10
|
+
error(prefix: string, err?: unknown): void;
|
|
11
|
+
close(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Task } from "./task";
|
|
2
|
+
export declare class PackageManager {
|
|
3
|
+
private task;
|
|
4
|
+
constructor(task: Task);
|
|
5
|
+
private getManifest;
|
|
6
|
+
private extract;
|
|
7
|
+
require(module: string): any;
|
|
8
|
+
install(name: string, version: string): Promise<void>;
|
|
9
|
+
update(name: string): Promise<string>;
|
|
10
|
+
}
|
package/dist/sentry.d.ts
ADDED
package/dist/task.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AutomateTask, ElectronApplication, PageParams } from "@iflyrpa/share";
|
|
2
|
+
import { Logger } from "./logger";
|
|
3
|
+
import { PackageManager } from "./packageManager";
|
|
4
|
+
export interface TaskParams {
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
cachePath: string;
|
|
7
|
+
forceUpdate?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class Task implements AutomateTask {
|
|
10
|
+
logger: Logger;
|
|
11
|
+
cachePath: string;
|
|
12
|
+
debug: boolean;
|
|
13
|
+
packagesDir: string;
|
|
14
|
+
packageManager: PackageManager;
|
|
15
|
+
private playwrightPackage;
|
|
16
|
+
private electronPackage;
|
|
17
|
+
private _electronApp;
|
|
18
|
+
/**
|
|
19
|
+
* 应用是否已关闭
|
|
20
|
+
*/
|
|
21
|
+
isClosed: boolean;
|
|
22
|
+
constructor({ cachePath, debug }: TaskParams);
|
|
23
|
+
/**
|
|
24
|
+
* 安装 playwright
|
|
25
|
+
* @returns
|
|
26
|
+
*/
|
|
27
|
+
private installPlaywright;
|
|
28
|
+
/**
|
|
29
|
+
* 安装 electron
|
|
30
|
+
* @returns
|
|
31
|
+
*/
|
|
32
|
+
private installElectron;
|
|
33
|
+
/**
|
|
34
|
+
* 启动 Electron
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
launchApp(): Promise<ElectronApplication>;
|
|
38
|
+
/**
|
|
39
|
+
* 临时文件目录
|
|
40
|
+
* @returns
|
|
41
|
+
*/
|
|
42
|
+
getTmpPath(): string;
|
|
43
|
+
/**
|
|
44
|
+
* 清空临时文件
|
|
45
|
+
*/
|
|
46
|
+
private clearTmpPath;
|
|
47
|
+
/**
|
|
48
|
+
* 关闭 playwright 启动的 electron 客户端
|
|
49
|
+
* @returns
|
|
50
|
+
*/
|
|
51
|
+
close(): Promise<void>;
|
|
52
|
+
createPage(pageParams: PageParams): Promise<import("playwright-core").Page>;
|
|
53
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iflyrpa/playwright",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.2-beta.2",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"import": "./dist/index.js",
|
|
9
|
+
"require": "./dist/index.cjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
5
12
|
"main": "./dist/index.cjs",
|
|
6
|
-
"module": "./dist/index.
|
|
13
|
+
"module": "./dist/index.js",
|
|
7
14
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"author": "bijinfeng",
|
|
9
|
-
"license": "ISC",
|
|
10
15
|
"files": [
|
|
11
16
|
"dist"
|
|
12
17
|
],
|
|
@@ -14,25 +19,23 @@
|
|
|
14
19
|
"playwright": "^1.46.1"
|
|
15
20
|
},
|
|
16
21
|
"devDependencies": {
|
|
17
|
-
"@
|
|
18
|
-
"
|
|
22
|
+
"@rslib/core": "^0.3.1",
|
|
23
|
+
"@types/node": "^22.8.1",
|
|
19
24
|
"playwright": "^1.46.1",
|
|
20
25
|
"typescript": "^5.5.2",
|
|
21
|
-
"
|
|
22
|
-
"@iflyrpa/
|
|
26
|
+
"@iflyrpa/share": "0.0.2",
|
|
27
|
+
"@iflyrpa/pacote": "1.0.0"
|
|
23
28
|
},
|
|
24
29
|
"dependencies": {
|
|
25
30
|
"@electron/get": "^2.0.0",
|
|
26
31
|
"@sentry/node": "^5.5.0",
|
|
27
32
|
"extract-zip": "^2.0.1",
|
|
28
33
|
"loglevel": "^1.9.2",
|
|
29
|
-
"
|
|
30
|
-
"@iflyrpa/actions": "1.0.1",
|
|
34
|
+
"@iflyrpa/actions": "1.0.2",
|
|
31
35
|
"@iflyrpa/share": "0.0.2"
|
|
32
36
|
},
|
|
33
37
|
"scripts": {
|
|
34
|
-
"build": "
|
|
35
|
-
"dev": "
|
|
36
|
-
"start": "esno src/index.ts"
|
|
38
|
+
"build": "rslib build",
|
|
39
|
+
"dev": "rslib build --watch"
|
|
37
40
|
}
|
|
38
41
|
}
|
package/dist/index.d.cts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Action } from '@iflyrpa/actions';
|
|
2
|
-
export { ActionMethodParams } from '@iflyrpa/actions';
|
|
3
|
-
import * as playwright_core from 'playwright-core';
|
|
4
|
-
import { LoggerImplement, AutomateTask, ElectronApplication, PageParams } from '@iflyrpa/share';
|
|
5
|
-
|
|
6
|
-
declare class Logger implements LoggerImplement {
|
|
7
|
-
static instance: Logger | null;
|
|
8
|
-
private stream;
|
|
9
|
-
constructor(cachePath: string);
|
|
10
|
-
static getInstance(cachePath: string): Logger;
|
|
11
|
-
debug(...msg: any[]): void;
|
|
12
|
-
info(...msg: any[]): void;
|
|
13
|
-
warn(...msg: any[]): void;
|
|
14
|
-
error(prefix: string, err?: unknown): void;
|
|
15
|
-
close(): void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare class PackageManager {
|
|
19
|
-
private task;
|
|
20
|
-
constructor(task: Task);
|
|
21
|
-
private getManifest;
|
|
22
|
-
private extract;
|
|
23
|
-
require(module: string): any;
|
|
24
|
-
install(name: string, version: string): Promise<void>;
|
|
25
|
-
update(name: string): Promise<string>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface TaskParams {
|
|
29
|
-
debug?: boolean;
|
|
30
|
-
cachePath: string;
|
|
31
|
-
forceUpdate?: boolean;
|
|
32
|
-
}
|
|
33
|
-
declare class Task implements AutomateTask {
|
|
34
|
-
logger: Logger;
|
|
35
|
-
cachePath: string;
|
|
36
|
-
debug: boolean;
|
|
37
|
-
packagesDir: string;
|
|
38
|
-
packageManager: PackageManager;
|
|
39
|
-
private playwrightPackage;
|
|
40
|
-
private electronPackage;
|
|
41
|
-
private _electronApp;
|
|
42
|
-
/**
|
|
43
|
-
* 应用是否已关闭
|
|
44
|
-
*/
|
|
45
|
-
isClosed: boolean;
|
|
46
|
-
constructor({ cachePath, debug }: TaskParams);
|
|
47
|
-
/**
|
|
48
|
-
* 安装 playwright
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
private installPlaywright;
|
|
52
|
-
/**
|
|
53
|
-
* 安装 electron
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
private installElectron;
|
|
57
|
-
/**
|
|
58
|
-
* 启动 Electron
|
|
59
|
-
* @returns
|
|
60
|
-
*/
|
|
61
|
-
launchApp(): Promise<ElectronApplication>;
|
|
62
|
-
/**
|
|
63
|
-
* 临时文件目录
|
|
64
|
-
* @returns
|
|
65
|
-
*/
|
|
66
|
-
getTmpPath(): string;
|
|
67
|
-
/**
|
|
68
|
-
* 清空临时文件
|
|
69
|
-
*/
|
|
70
|
-
private clearTmpPath;
|
|
71
|
-
/**
|
|
72
|
-
* 关闭 playwright 启动的 electron 客户端
|
|
73
|
-
* @returns
|
|
74
|
-
*/
|
|
75
|
-
close(): Promise<void>;
|
|
76
|
-
createPage(pageParams: PageParams): Promise<playwright_core.Page>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
declare class RpaTask extends Task {
|
|
80
|
-
actions: Action;
|
|
81
|
-
constructor(params: TaskParams);
|
|
82
|
-
private update;
|
|
83
|
-
}
|
|
84
|
-
declare const version: string;
|
|
85
|
-
|
|
86
|
-
export { RpaTask, version };
|
package/dist/index.d.mts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Action } from '@iflyrpa/actions';
|
|
2
|
-
export { ActionMethodParams } from '@iflyrpa/actions';
|
|
3
|
-
import * as playwright_core from 'playwright-core';
|
|
4
|
-
import { LoggerImplement, AutomateTask, ElectronApplication, PageParams } from '@iflyrpa/share';
|
|
5
|
-
|
|
6
|
-
declare class Logger implements LoggerImplement {
|
|
7
|
-
static instance: Logger | null;
|
|
8
|
-
private stream;
|
|
9
|
-
constructor(cachePath: string);
|
|
10
|
-
static getInstance(cachePath: string): Logger;
|
|
11
|
-
debug(...msg: any[]): void;
|
|
12
|
-
info(...msg: any[]): void;
|
|
13
|
-
warn(...msg: any[]): void;
|
|
14
|
-
error(prefix: string, err?: unknown): void;
|
|
15
|
-
close(): void;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare class PackageManager {
|
|
19
|
-
private task;
|
|
20
|
-
constructor(task: Task);
|
|
21
|
-
private getManifest;
|
|
22
|
-
private extract;
|
|
23
|
-
require(module: string): any;
|
|
24
|
-
install(name: string, version: string): Promise<void>;
|
|
25
|
-
update(name: string): Promise<string>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
interface TaskParams {
|
|
29
|
-
debug?: boolean;
|
|
30
|
-
cachePath: string;
|
|
31
|
-
forceUpdate?: boolean;
|
|
32
|
-
}
|
|
33
|
-
declare class Task implements AutomateTask {
|
|
34
|
-
logger: Logger;
|
|
35
|
-
cachePath: string;
|
|
36
|
-
debug: boolean;
|
|
37
|
-
packagesDir: string;
|
|
38
|
-
packageManager: PackageManager;
|
|
39
|
-
private playwrightPackage;
|
|
40
|
-
private electronPackage;
|
|
41
|
-
private _electronApp;
|
|
42
|
-
/**
|
|
43
|
-
* 应用是否已关闭
|
|
44
|
-
*/
|
|
45
|
-
isClosed: boolean;
|
|
46
|
-
constructor({ cachePath, debug }: TaskParams);
|
|
47
|
-
/**
|
|
48
|
-
* 安装 playwright
|
|
49
|
-
* @returns
|
|
50
|
-
*/
|
|
51
|
-
private installPlaywright;
|
|
52
|
-
/**
|
|
53
|
-
* 安装 electron
|
|
54
|
-
* @returns
|
|
55
|
-
*/
|
|
56
|
-
private installElectron;
|
|
57
|
-
/**
|
|
58
|
-
* 启动 Electron
|
|
59
|
-
* @returns
|
|
60
|
-
*/
|
|
61
|
-
launchApp(): Promise<ElectronApplication>;
|
|
62
|
-
/**
|
|
63
|
-
* 临时文件目录
|
|
64
|
-
* @returns
|
|
65
|
-
*/
|
|
66
|
-
getTmpPath(): string;
|
|
67
|
-
/**
|
|
68
|
-
* 清空临时文件
|
|
69
|
-
*/
|
|
70
|
-
private clearTmpPath;
|
|
71
|
-
/**
|
|
72
|
-
* 关闭 playwright 启动的 electron 客户端
|
|
73
|
-
* @returns
|
|
74
|
-
*/
|
|
75
|
-
close(): Promise<void>;
|
|
76
|
-
createPage(pageParams: PageParams): Promise<playwright_core.Page>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
declare class RpaTask extends Task {
|
|
80
|
-
actions: Action;
|
|
81
|
-
constructor(params: TaskParams);
|
|
82
|
-
private update;
|
|
83
|
-
}
|
|
84
|
-
declare const version: string;
|
|
85
|
-
|
|
86
|
-
export { RpaTask, version };
|