@colisweb/rescript-toolkit 2.38.0 → 2.38.1
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/package.json
CHANGED
|
@@ -2,49 +2,45 @@ open BsSentryReactNative
|
|
|
2
2
|
|
|
3
3
|
@val external isDev: bool = "__DEV__"
|
|
4
4
|
|
|
5
|
-
let debugStyle = "background-color: #208E9C; color: white; padding: 5px; font-size: 10px;"
|
|
6
|
-
let warningStyle = "background-color: #FFAD2D; color: white; padding: 5px; font-size: 10px;"
|
|
7
|
-
let errorStyle = "background-color: #FF4714; color: white; padding: 5px; font-size: 10px;"
|
|
8
|
-
|
|
9
5
|
let debug = str => {
|
|
10
6
|
if isDev {
|
|
11
|
-
Js.Console.
|
|
7
|
+
Js.Console.log2("DEBUG", str)
|
|
12
8
|
}
|
|
13
9
|
}
|
|
14
10
|
|
|
15
11
|
let debug2 = (str, str2) => {
|
|
16
12
|
if isDev {
|
|
17
|
-
Js.Console.
|
|
13
|
+
Js.Console.log3("DEBUG", str, str2)
|
|
18
14
|
}
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
let debugMany = (arr: array<string>) => {
|
|
22
18
|
if isDev {
|
|
23
|
-
Js.Console.logMany(["
|
|
19
|
+
Js.Console.logMany(["DEBUG"]->Array.concat(arr))
|
|
24
20
|
}
|
|
25
21
|
}
|
|
26
22
|
|
|
27
23
|
let warning = str => {
|
|
28
24
|
if isDev {
|
|
29
|
-
Js.Console.
|
|
25
|
+
Js.Console.log2("WARN", str)
|
|
30
26
|
}
|
|
31
27
|
}
|
|
32
28
|
|
|
33
29
|
let warning2 = (str, str2) => {
|
|
34
30
|
if isDev {
|
|
35
|
-
Js.Console.
|
|
31
|
+
Js.Console.log3("WARN", str, str2)
|
|
36
32
|
}
|
|
37
33
|
}
|
|
38
34
|
|
|
39
35
|
let warningMany = (arr: array<string>) => {
|
|
40
36
|
if isDev {
|
|
41
|
-
Js.Console.logMany(["
|
|
37
|
+
Js.Console.logMany(["WARN"]->Array.concat(arr))
|
|
42
38
|
}
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
let error = str => {
|
|
46
42
|
if isDev {
|
|
47
|
-
Js.Console.
|
|
43
|
+
Js.Console.log2("ERROR", str)
|
|
48
44
|
} else {
|
|
49
45
|
open Sentry
|
|
50
46
|
withScope(_scope => {
|
|
@@ -55,7 +51,7 @@ let error = str => {
|
|
|
55
51
|
|
|
56
52
|
let error2 = (str, str2) => {
|
|
57
53
|
if isDev {
|
|
58
|
-
Js.Console.
|
|
54
|
+
Js.Console.log3("ERROR", str, str2)
|
|
59
55
|
} else {
|
|
60
56
|
open Sentry
|
|
61
57
|
withScope(scope => {
|
|
@@ -69,7 +65,7 @@ let errorMany = (arr: array<string>) => {
|
|
|
69
65
|
let message = arr[0]
|
|
70
66
|
let data = arr->Array.length > 1 ? arr->Array.sliceToEnd(1) : []
|
|
71
67
|
if isDev {
|
|
72
|
-
Js.Console.logMany(["
|
|
68
|
+
Js.Console.logMany(["ERROR"]->Array.concat(arr))
|
|
73
69
|
} else {
|
|
74
70
|
open Sentry
|
|
75
71
|
withScope(scope => {
|