@iflyrpa/playwright 1.2.23 → 1.2.25
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 +22 -5
- package/dist/index.d.ts +4 -1
- package/dist/index.js +22 -5
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -44,7 +44,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
44
44
|
});
|
|
45
45
|
const actions_namespaceObject = require("@iflyrpa/actions");
|
|
46
46
|
var package_namespaceObject = {
|
|
47
|
-
i8: "1.2.
|
|
47
|
+
i8: "1.2.24"
|
|
48
48
|
};
|
|
49
49
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
50
50
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
@@ -200,14 +200,27 @@ class SentryInstance {
|
|
|
200
200
|
updateUser(user) {
|
|
201
201
|
this.user = user;
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
setScope(callback, extras) {
|
|
204
204
|
(0, node_namespaceObject.withScope)((scope)=>{
|
|
205
|
-
|
|
205
|
+
scope.setTransactionName("rpa");
|
|
206
206
|
if (this.coreVersion) scope.setTag("coreVersion", this.coreVersion);
|
|
207
207
|
if (this.user) scope.setUser(this.user);
|
|
208
|
-
|
|
208
|
+
if (extras) scope.setExtras(extras);
|
|
209
|
+
callback(scope);
|
|
209
210
|
});
|
|
210
211
|
}
|
|
212
|
+
captureException(error, extras) {
|
|
213
|
+
this.setScope(()=>{
|
|
214
|
+
var _this_sentry;
|
|
215
|
+
return null === (_this_sentry = this.sentry) || void 0 === _this_sentry ? void 0 : _this_sentry.captureException(error);
|
|
216
|
+
}, extras);
|
|
217
|
+
}
|
|
218
|
+
captureMessage(message, level, extras) {
|
|
219
|
+
this.setScope(()=>{
|
|
220
|
+
var _this_sentry;
|
|
221
|
+
return null === (_this_sentry = this.sentry) || void 0 === _this_sentry ? void 0 : _this_sentry.captureMessage(message, level);
|
|
222
|
+
}, extras);
|
|
223
|
+
}
|
|
211
224
|
constructor(taskParams){
|
|
212
225
|
sentry_define_property(this, "sentry", void 0);
|
|
213
226
|
sentry_define_property(this, "coreVersion", void 0);
|
|
@@ -216,6 +229,7 @@ class SentryInstance {
|
|
|
216
229
|
this.sentry = (0, node_namespaceObject.initWithoutDefaultIntegrations)({
|
|
217
230
|
dsn: DEFAULT_SENTRY_DSN,
|
|
218
231
|
environment: taskParams.enverionment || "development",
|
|
232
|
+
tracesSampleRate: 1.0,
|
|
219
233
|
initialScope: {
|
|
220
234
|
user: taskParams.user,
|
|
221
235
|
tags: {
|
|
@@ -238,16 +252,19 @@ function logger_define_property(obj, key, value) {
|
|
|
238
252
|
class Logger extends SentryInstance {
|
|
239
253
|
debug(...msg) {
|
|
240
254
|
external_loglevel_default().debug(...msg);
|
|
255
|
+
this.captureMessage(msg.toString(), "debug");
|
|
241
256
|
}
|
|
242
257
|
info(...msg) {
|
|
243
258
|
external_loglevel_default().info(...msg);
|
|
259
|
+
this.captureMessage(msg.toString(), "info");
|
|
244
260
|
}
|
|
245
261
|
warn(...msg) {
|
|
246
262
|
external_loglevel_default().warn(...msg);
|
|
263
|
+
this.captureMessage(msg.toString(), "warning");
|
|
247
264
|
}
|
|
248
265
|
error(prefix, error) {
|
|
249
266
|
if (error instanceof Error) error.message = `${prefix}: ${error.message}`;
|
|
250
|
-
else if (error &&
|
|
267
|
+
else if (error && "object" == typeof error) {
|
|
251
268
|
const errorStr = JSON.stringify(error, null, 2);
|
|
252
269
|
error = new Error(`${prefix}: ${errorStr}`);
|
|
253
270
|
} else error = new Error(`${prefix}: ${error}`);
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { LoggerImplement } from '@iflyrpa/share';
|
|
|
5
5
|
import { Page } from 'playwright-core';
|
|
6
6
|
import type { PageParams } from '@iflyrpa/share';
|
|
7
7
|
import * as RpaAction from '@iflyrpa/actions';
|
|
8
|
+
import { SeverityLevel } from '@sentry/node';
|
|
8
9
|
import { User } from '@sentry/node';
|
|
9
10
|
|
|
10
11
|
export { ActionMethodParams }
|
|
@@ -44,7 +45,9 @@ declare class SentryInstance {
|
|
|
44
45
|
constructor(taskParams: TaskParams);
|
|
45
46
|
updateCoreVersion(version: string): void;
|
|
46
47
|
updateUser(user: User): void;
|
|
47
|
-
|
|
48
|
+
private setScope;
|
|
49
|
+
captureException(error: unknown, extras?: Record<string, unknown>): void;
|
|
50
|
+
captureMessage(message: string, level?: SeverityLevel, extras?: Record<string, unknown>): void;
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
declare class Task implements AutomateTask {
|
package/dist/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import * as __WEBPACK_EXTERNAL_MODULE_loglevel__ from "loglevel";
|
|
|
10
10
|
import * as __WEBPACK_EXTERNAL_MODULE__sentry_node_4658624b__ from "@sentry/node";
|
|
11
11
|
import * as __WEBPACK_EXTERNAL_MODULE__iflyrpa_pacote_56da1cff__ from "@iflyrpa/pacote";
|
|
12
12
|
var package_namespaceObject = {
|
|
13
|
-
i8: "1.2.
|
|
13
|
+
i8: "1.2.24"
|
|
14
14
|
};
|
|
15
15
|
function _define_property(obj, key, value) {
|
|
16
16
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
@@ -151,14 +151,27 @@ class SentryInstance {
|
|
|
151
151
|
updateUser(user) {
|
|
152
152
|
this.user = user;
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
setScope(callback, extras) {
|
|
155
155
|
(0, __WEBPACK_EXTERNAL_MODULE__sentry_node_4658624b__.withScope)((scope)=>{
|
|
156
|
-
|
|
156
|
+
scope.setTransactionName("rpa");
|
|
157
157
|
if (this.coreVersion) scope.setTag("coreVersion", this.coreVersion);
|
|
158
158
|
if (this.user) scope.setUser(this.user);
|
|
159
|
-
|
|
159
|
+
if (extras) scope.setExtras(extras);
|
|
160
|
+
callback(scope);
|
|
160
161
|
});
|
|
161
162
|
}
|
|
163
|
+
captureException(error, extras) {
|
|
164
|
+
this.setScope(()=>{
|
|
165
|
+
var _this_sentry;
|
|
166
|
+
return null === (_this_sentry = this.sentry) || void 0 === _this_sentry ? void 0 : _this_sentry.captureException(error);
|
|
167
|
+
}, extras);
|
|
168
|
+
}
|
|
169
|
+
captureMessage(message, level, extras) {
|
|
170
|
+
this.setScope(()=>{
|
|
171
|
+
var _this_sentry;
|
|
172
|
+
return null === (_this_sentry = this.sentry) || void 0 === _this_sentry ? void 0 : _this_sentry.captureMessage(message, level);
|
|
173
|
+
}, extras);
|
|
174
|
+
}
|
|
162
175
|
constructor(taskParams){
|
|
163
176
|
sentry_define_property(this, "sentry", void 0);
|
|
164
177
|
sentry_define_property(this, "coreVersion", void 0);
|
|
@@ -167,6 +180,7 @@ class SentryInstance {
|
|
|
167
180
|
this.sentry = (0, __WEBPACK_EXTERNAL_MODULE__sentry_node_4658624b__.initWithoutDefaultIntegrations)({
|
|
168
181
|
dsn: DEFAULT_SENTRY_DSN,
|
|
169
182
|
environment: taskParams.enverionment || "development",
|
|
183
|
+
tracesSampleRate: 1.0,
|
|
170
184
|
initialScope: {
|
|
171
185
|
user: taskParams.user,
|
|
172
186
|
tags: {
|
|
@@ -189,16 +203,19 @@ function logger_define_property(obj, key, value) {
|
|
|
189
203
|
class Logger extends SentryInstance {
|
|
190
204
|
debug(...msg) {
|
|
191
205
|
__WEBPACK_EXTERNAL_MODULE_loglevel__["default"].debug(...msg);
|
|
206
|
+
this.captureMessage(msg.toString(), "debug");
|
|
192
207
|
}
|
|
193
208
|
info(...msg) {
|
|
194
209
|
__WEBPACK_EXTERNAL_MODULE_loglevel__["default"].info(...msg);
|
|
210
|
+
this.captureMessage(msg.toString(), "info");
|
|
195
211
|
}
|
|
196
212
|
warn(...msg) {
|
|
197
213
|
__WEBPACK_EXTERNAL_MODULE_loglevel__["default"].warn(...msg);
|
|
214
|
+
this.captureMessage(msg.toString(), "warning");
|
|
198
215
|
}
|
|
199
216
|
error(prefix, error) {
|
|
200
217
|
if (error instanceof Error) error.message = `${prefix}: ${error.message}`;
|
|
201
|
-
else if (error &&
|
|
218
|
+
else if (error && "object" == typeof error) {
|
|
202
219
|
const errorStr = JSON.stringify(error, null, 2);
|
|
203
220
|
error = new Error(`${prefix}: ${errorStr}`);
|
|
204
221
|
} else error = new Error(`${prefix}: ${error}`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iflyrpa/playwright",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.25",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@electron/get": "^2.0.0",
|
|
27
|
-
"@sentry/node": "^9.
|
|
27
|
+
"@sentry/node": "^9.11.0",
|
|
28
28
|
"extract-zip": "^2.0.1",
|
|
29
29
|
"loglevel": "^1.9.2",
|
|
30
30
|
"@iflyrpa/pacote": "1.0.0",
|
|
31
|
-
"@iflyrpa/actions": "1.1.
|
|
31
|
+
"@iflyrpa/actions": "1.1.29",
|
|
32
32
|
"@iflyrpa/share": "0.0.6"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|