@skrillex1224/playwright-toolkit 2.1.39 → 2.1.40
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 +758 -0
- package/dist/browser.js.map +7 -0
- package/dist/index.cjs +635 -86
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +629 -82
- package/dist/index.js.map +4 -4
- package/index.d.ts +38 -2
- package/package.json +2 -1
package/index.d.ts
CHANGED
|
@@ -54,7 +54,12 @@ export interface ErrorsModule {
|
|
|
54
54
|
// Logger
|
|
55
55
|
// =============================================================================
|
|
56
56
|
export interface LoggerTemplate {
|
|
57
|
-
step(
|
|
57
|
+
step(
|
|
58
|
+
step: string,
|
|
59
|
+
status?: string,
|
|
60
|
+
details?: string[],
|
|
61
|
+
level?: 'info' | 'warn' | 'warning' | 'error' | 'success' | 'start'
|
|
62
|
+
): void;
|
|
58
63
|
taskStart(url?: string): void;
|
|
59
64
|
taskSuccess(): void;
|
|
60
65
|
taskFail(url?: string, err?: unknown): void;
|
|
@@ -101,21 +106,52 @@ export interface LoggerTemplate {
|
|
|
101
106
|
info(message: string): void;
|
|
102
107
|
success(message: string): void;
|
|
103
108
|
warning(message: string): void;
|
|
109
|
+
warn(message: string): void;
|
|
104
110
|
error(message: string): void;
|
|
105
111
|
debug(message: string): void;
|
|
106
112
|
start(message: string): void;
|
|
107
113
|
}
|
|
108
114
|
|
|
115
|
+
export interface LoggerAdapter {
|
|
116
|
+
info(message: string): void;
|
|
117
|
+
warning?(message: string): void;
|
|
118
|
+
warn?(message: string): void;
|
|
119
|
+
error(message: string): void;
|
|
120
|
+
debug?(message: string): void;
|
|
121
|
+
}
|
|
122
|
+
|
|
109
123
|
export interface LoggerModule {
|
|
110
124
|
info(message: string): void;
|
|
111
125
|
success(message: string): void;
|
|
112
126
|
warning(message: string): void;
|
|
127
|
+
warn(message: string): void;
|
|
113
128
|
error(message: string): void;
|
|
114
129
|
debug(message: string): void;
|
|
115
130
|
start(message: string): void;
|
|
116
|
-
|
|
131
|
+
setLogger(logger: LoggerAdapter | null): void;
|
|
132
|
+
useTemplate(logger?: LoggerAdapter | null): LoggerTemplate;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface LogTemplate {
|
|
136
|
+
key: string;
|
|
137
|
+
label: string;
|
|
138
|
+
group: string;
|
|
139
|
+
attention: 'low' | 'medium' | 'high' | 'critical';
|
|
140
|
+
patterns: RegExp[];
|
|
141
|
+
defaultSelected?: boolean;
|
|
117
142
|
}
|
|
118
143
|
|
|
144
|
+
export const Logger: LoggerModule;
|
|
145
|
+
export const LOG_TEMPLATES: LogTemplate[];
|
|
146
|
+
export function stripAnsi(input: string): string;
|
|
147
|
+
export interface BrowserModule {
|
|
148
|
+
Logger: LoggerModule;
|
|
149
|
+
LOG_TEMPLATES: LogTemplate[];
|
|
150
|
+
stripAnsi(input: string): string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export const browser: BrowserModule;
|
|
154
|
+
|
|
119
155
|
// =============================================================================
|
|
120
156
|
// ApifyKit
|
|
121
157
|
// =============================================================================
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skrillex1224/playwright-toolkit",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.40",
|
|
4
4
|
"description": "一个在 Apify/Crawlee Actor 中启用实时截图视图的实用工具库。",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./index.d.ts",
|
|
12
|
+
"browser": "./dist/browser.js",
|
|
12
13
|
"import": "./dist/index.js",
|
|
13
14
|
"require": "./dist/index.cjs"
|
|
14
15
|
}
|