cyperful 0.1.8 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cyperful/driver.rb +6 -3
- data/lib/cyperful/framework_injections.rb +32 -34
- data/lib/cyperful/railtie.rb +9 -0
- data/lib/cyperful/test_parser.rb +20 -7
- data/lib/cyperful/ui_server.rb +46 -1
- data/lib/cyperful.rb +7 -0
- data/public/assets/index-CrBQcYdq.js +42 -0
- data/public/assets/index-Uj6YFMhM.css +1 -0
- data/public/assets/syntax-highlighter-worker-Cumko8SL.js +2798 -0
- data/public/frame-agent.js +41 -38
- data/public/index.html +4 -4
- metadata +6 -4
- data/public/assets/index-B_-TcqHl.js +0 -54
- data/public/assets/index-CDElGKtz.css +0 -1
data/public/frame-agent.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
(() => {
|
2
|
+
if (window.__cyperfulAgentInitialized)
|
3
|
+
return;
|
4
|
+
window.__cyperfulAgentInitialized = !0;
|
2
5
|
const f = console.log, d = (...t) => f("[Cyperful Agent]", ...t);
|
3
6
|
d("Loading...");
|
4
7
|
const { CYPERFUL_ORIGIN: u } = __CYPERFUL_CONFIG__;
|
@@ -7,28 +10,28 @@
|
|
7
10
|
return;
|
8
11
|
}
|
9
12
|
let y = 0;
|
10
|
-
const
|
11
|
-
let
|
13
|
+
const s = (t, e, n = null) => {
|
14
|
+
let i = null;
|
12
15
|
try {
|
13
16
|
const r = Date.now(), c = `${r}-${y++}`;
|
14
|
-
if ("url" in
|
17
|
+
if ("url" in e && e.url != null)
|
15
18
|
try {
|
16
|
-
const o = new URL(
|
19
|
+
const o = new URL(e.url, window.location.origin);
|
17
20
|
if (o.origin === u)
|
18
21
|
return null;
|
19
|
-
o.origin === window.location.origin && (
|
22
|
+
o.origin === window.location.origin && (e.url = o.pathname + o.search + o.hash);
|
20
23
|
} catch {
|
21
24
|
}
|
22
|
-
|
25
|
+
i = {
|
23
26
|
type: t,
|
24
|
-
data:
|
27
|
+
data: e,
|
25
28
|
id: c,
|
26
29
|
timestamp: r,
|
27
|
-
start_id:
|
28
|
-
}, window.parent.postMessage(
|
30
|
+
start_id: n ? n.id : void 0
|
31
|
+
}, window.parent.postMessage(i, u);
|
29
32
|
} catch {
|
30
33
|
}
|
31
|
-
return
|
34
|
+
return i;
|
32
35
|
};
|
33
36
|
for (const t of [
|
34
37
|
"log",
|
@@ -38,15 +41,15 @@
|
|
38
41
|
"dir",
|
39
42
|
"debug"
|
40
43
|
]) {
|
41
|
-
const
|
42
|
-
|
43
|
-
|
44
|
+
const e = console[t];
|
45
|
+
e && (console[t] = (...n) => {
|
46
|
+
e.apply(console, n), s("log", { level: t, args: n });
|
44
47
|
});
|
45
48
|
}
|
46
49
|
window.addEventListener("error", (t) => {
|
47
|
-
|
50
|
+
s("global_error", { message: t.error.toString() });
|
48
51
|
}), window.addEventListener("unhandledrejection", (t) => {
|
49
|
-
|
52
|
+
s("unhandledrejection", { message: t.reason.toString() });
|
50
53
|
});
|
51
54
|
function w(t) {
|
52
55
|
try {
|
@@ -57,46 +60,46 @@
|
|
57
60
|
}
|
58
61
|
}
|
59
62
|
function g(t) {
|
60
|
-
const
|
61
|
-
for (const [
|
62
|
-
n[e] =
|
63
|
-
return
|
63
|
+
const e = {};
|
64
|
+
for (const [n, i] of t.entries())
|
65
|
+
i instanceof Blob ? e[n] = `[[ Blob: ${i.size} bytes ]]` : e[n] = i.toString();
|
66
|
+
return e;
|
64
67
|
}
|
65
68
|
const _ = window.XMLHttpRequest;
|
66
69
|
function m() {
|
67
|
-
const t = new _(),
|
68
|
-
return t.open = (...
|
69
|
-
const [
|
70
|
-
method:
|
70
|
+
const t = new _(), e = t.open;
|
71
|
+
return t.open = (...n) => {
|
72
|
+
const [i, r, c] = n, o = s("xhr", {
|
73
|
+
method: i,
|
71
74
|
url: r
|
72
75
|
// body,
|
73
76
|
});
|
74
77
|
return t.addEventListener("load", () => {
|
75
|
-
o &&
|
78
|
+
o && s(
|
76
79
|
"xhr:finished",
|
77
80
|
{ status: t.status, response: t.response },
|
78
81
|
o
|
79
82
|
);
|
80
|
-
}),
|
83
|
+
}), e.apply(this, n);
|
81
84
|
}, t;
|
82
85
|
}
|
83
86
|
window.XMLHttpRequest = m;
|
84
87
|
const L = window.fetch;
|
85
88
|
window.fetch = (...t) => {
|
86
|
-
const [
|
87
|
-
method:
|
88
|
-
url:
|
89
|
-
body:
|
89
|
+
const [e, n = {}] = typeof t[0] == "string" || t[0] instanceof URL ? [t[0], t[1]] : [t[0].url, t[0]], i = n.method ?? "GET", r = n.body, c = n.headers || {}, o = c["content-type"] || c["Content-Type"] || void 0, R = r instanceof FormData ? g(r) : o != null && o.includes("application/json") ? w(r) : r, p = s("fetch", {
|
90
|
+
method: i,
|
91
|
+
url: e.toString(),
|
92
|
+
body: R,
|
90
93
|
bodyType: o
|
91
94
|
}), h = L(...t);
|
92
|
-
return h.then(async (
|
93
|
-
const
|
94
|
-
p &&
|
95
|
+
return h.then(async (l) => {
|
96
|
+
const a = l.headers.get("content-type") || "", v = a.includes("application/json") ? await l.clone().json() : a.includes("text/") ? await l.clone().text() : `[[ Unhandled content-type: ${a || "<empty>"} ]]`;
|
97
|
+
p && s(
|
95
98
|
"fetch:finished",
|
96
99
|
{
|
97
|
-
status:
|
98
|
-
responseType:
|
99
|
-
response:
|
100
|
+
status: l.status,
|
101
|
+
responseType: a || void 0,
|
102
|
+
response: v
|
100
103
|
},
|
101
104
|
p
|
102
105
|
);
|
@@ -105,14 +108,14 @@
|
|
105
108
|
};
|
106
109
|
const S = history.pushState;
|
107
110
|
history.pushState = (...t) => {
|
108
|
-
S.apply(history, t),
|
111
|
+
S.apply(history, t), s("client_navigate", {
|
109
112
|
url: location.href,
|
110
113
|
replace: !1
|
111
114
|
});
|
112
115
|
};
|
113
|
-
const
|
116
|
+
const b = history.replaceState;
|
114
117
|
history.replaceState = (...t) => {
|
115
|
-
|
118
|
+
b.apply(history, t), s("client_navigate", {
|
116
119
|
url: location.href,
|
117
120
|
replace: !0
|
118
121
|
});
|
data/public/index.html
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
<!
|
1
|
+
<!doctype html>
|
2
2
|
<html lang="en">
|
3
3
|
<head>
|
4
4
|
<meta charset="UTF-8" />
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
6
|
<link rel="icon" href="/assets/favicon-DMdBZQlK.ico" />
|
7
7
|
<title>Cyperful</title>
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
8
|
+
<script type="module" crossorigin src="/assets/index-CrBQcYdq.js"></script>
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Uj6YFMhM.css">
|
10
10
|
</head>
|
11
|
-
<body>
|
11
|
+
<body class="bg-stone-900 text-slate-100">
|
12
12
|
<div id="root"></div>
|
13
13
|
</body>
|
14
14
|
</html>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyperful
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wyatt Ades
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -62,11 +62,13 @@ files:
|
|
62
62
|
- lib/cyperful/commands.rb
|
63
63
|
- lib/cyperful/driver.rb
|
64
64
|
- lib/cyperful/framework_injections.rb
|
65
|
+
- lib/cyperful/railtie.rb
|
65
66
|
- lib/cyperful/test_parser.rb
|
66
67
|
- lib/cyperful/ui_server.rb
|
67
68
|
- public/assets/favicon-DMdBZQlK.ico
|
68
|
-
- public/assets/index-
|
69
|
-
- public/assets/index-
|
69
|
+
- public/assets/index-CrBQcYdq.js
|
70
|
+
- public/assets/index-Uj6YFMhM.css
|
71
|
+
- public/assets/syntax-highlighter-worker-Cumko8SL.js
|
70
72
|
- public/frame-agent.js
|
71
73
|
- public/index.html
|
72
74
|
homepage: https://github.com/stepful/cyperful
|