devanvil 0.0.0-stage → 2.1.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/LICENSE +21 -0
- package/README.ar.md +113 -0
- package/README.md +272 -2
- package/SECURITY.md +49 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +664 -0
- package/dist/core/contract-drift.d.ts +49 -0
- package/dist/core/contract-drift.js +312 -0
- package/dist/core/converters.d.ts +18 -0
- package/dist/core/converters.js +989 -0
- package/dist/core/cron.d.ts +33 -0
- package/dist/core/cron.js +309 -0
- package/dist/core/crypto.d.ts +59 -0
- package/dist/core/crypto.js +260 -0
- package/dist/core/curl.d.ts +17 -0
- package/dist/core/curl.js +174 -0
- package/dist/core/diff.d.ts +36 -0
- package/dist/core/diff.js +148 -0
- package/dist/core/encoding.d.ts +3 -0
- package/dist/core/encoding.js +143 -0
- package/dist/core/importers.d.ts +65 -0
- package/dist/core/importers.js +361 -0
- package/dist/core/jwt.d.ts +39 -0
- package/dist/core/jwt.js +269 -0
- package/dist/core/llm-tokens.d.ts +38 -0
- package/dist/core/llm-tokens.js +125 -0
- package/dist/core/log-analyzer.d.ts +30 -0
- package/dist/core/log-analyzer.js +155 -0
- package/dist/core/network.d.ts +72 -0
- package/dist/core/network.js +185 -0
- package/dist/core/oauth-protobuf.d.ts +74 -0
- package/dist/core/oauth-protobuf.js +396 -0
- package/dist/core/openapi.d.ts +27 -0
- package/dist/core/openapi.js +257 -0
- package/dist/core/pipeline.d.ts +28 -0
- package/dist/core/pipeline.js +154 -0
- package/dist/core/regex.d.ts +50 -0
- package/dist/core/regex.js +360 -0
- package/dist/core/runner.d.ts +53 -0
- package/dist/core/runner.js +250 -0
- package/dist/core/secrets.d.ts +87 -0
- package/dist/core/secrets.js +603 -0
- package/dist/core/security.d.ts +34 -0
- package/dist/core/security.js +301 -0
- package/dist/core/sql-explain.d.ts +50 -0
- package/dist/core/sql-explain.js +259 -0
- package/dist/core/tls.d.ts +44 -0
- package/dist/core/tls.js +169 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +31 -0
- package/dist/server/app.d.ts +31 -0
- package/dist/server/app.js +359 -0
- package/dist/server/http-proxy.d.ts +55 -0
- package/dist/server/http-proxy.js +373 -0
- package/dist/server/http-utils.d.ts +28 -0
- package/dist/server/http-utils.js +118 -0
- package/dist/server/load-tester.d.ts +53 -0
- package/dist/server/load-tester.js +137 -0
- package/dist/server/mcp.d.ts +35 -0
- package/dist/server/mcp.js +470 -0
- package/dist/server/mock-store.d.ts +38 -0
- package/dist/server/mock-store.js +238 -0
- package/dist/server/plugin-loader.d.ts +61 -0
- package/dist/server/plugin-loader.js +305 -0
- package/dist/server/recorder-store.d.ts +35 -0
- package/dist/server/recorder-store.js +147 -0
- package/dist/server/routes/network-routes.d.ts +3 -0
- package/dist/server/routes/network-routes.js +441 -0
- package/dist/server/routes/tools-routes.d.ts +3 -0
- package/dist/server/routes/tools-routes.js +299 -0
- package/dist/server/routes/workspace-routes.d.ts +3 -0
- package/dist/server/routes/workspace-routes.js +262 -0
- package/dist/server/webhook-store.d.ts +29 -0
- package/dist/server/webhook-store.js +100 -0
- package/dist/server/workspace-store.d.ts +91 -0
- package/dist/server/workspace-store.js +448 -0
- package/dist/server/ws-probe.d.ts +34 -0
- package/dist/server/ws-probe.js +291 -0
- package/dist/ui/app.js +290 -0
- package/dist/ui/favicon.svg +14 -0
- package/dist/ui/index.html +83 -0
- package/dist/ui/logo.png +0 -0
- package/dist/ui/styles.css +694 -0
- package/dist/ui/tools-data.js +719 -0
- package/dist/ui/tools-network.js +769 -0
- package/dist/ui/tools-ops.js +299 -0
- package/dist/ui/tools-pro.js +500 -0
- package/dist/ui/tools-security.js +397 -0
- package/dist/ui/tools-v12.js +765 -0
- package/dist/ui/tools-v13.js +321 -0
- package/dist/ui/tools-v20.js +563 -0
- package/dist/ui/tools-v21.js +411 -0
- package/package.json +75 -4
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
const { h, api, toast, copyText, registerTool } = window.DevAnvil;
|
|
4
|
+
|
|
5
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
6
|
+
// 15. TLS / X.509 Inspector, GraphQL Studio & RFC 6455 WebSocket Tester
|
|
7
|
+
// ───────────────────────────────────────────────────────────────────────────
|
|
8
|
+
registerTool({
|
|
9
|
+
id: 'tls-gql-ws',
|
|
10
|
+
group: 'Network & API',
|
|
11
|
+
name: 'TLS, GraphQL & WebSocket',
|
|
12
|
+
icon: '🔐',
|
|
13
|
+
subtitle: 'X.509 SSL/TLS Certificate Inspector (Offline PEM + Live), GraphQL Studio & WebSocket Tester',
|
|
14
|
+
keywords: ['tls', 'ssl', 'x509', 'certificate', 'pem', 'graphql', 'introspect', 'websocket', 'ws', 'wss'],
|
|
15
|
+
render(root) {
|
|
16
|
+
let activeTab = 'tls';
|
|
17
|
+
const tabBar = h('div', { class: 'tabs' });
|
|
18
|
+
const paneTls = h('div', { class: 'stack' });
|
|
19
|
+
const paneGql = h('div', { class: 'stack' });
|
|
20
|
+
const paneWs = h('div', { class: 'stack' });
|
|
21
|
+
|
|
22
|
+
function parseHeaderLines(text) {
|
|
23
|
+
const out = {};
|
|
24
|
+
for (const line of text.split(/\r?\n/)) {
|
|
25
|
+
const idx = line.indexOf(':');
|
|
26
|
+
if (idx > 0) out[line.slice(0, idx).trim()] = line.slice(idx + 1).trim();
|
|
27
|
+
}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// ─── Tab 1: X.509 / TLS Certificate Inspector ─────────────────────────
|
|
32
|
+
const remoteHostIn = h('input', { type: 'text', value: 'example.com', placeholder: 'Domain or HTTPS URL (e.g. github.com)' });
|
|
33
|
+
const remotePortIn = h('input', { type: 'number', value: '443', style: { width: '95px', flexShrink: '0' } });
|
|
34
|
+
const pemArea = h('textarea', {
|
|
35
|
+
rows: 7,
|
|
36
|
+
placeholder: 'Paste one or more -----BEGIN CERTIFICATE----- PEM blocks here for 100% offline inspection…',
|
|
37
|
+
});
|
|
38
|
+
const tlsBadges = h('div', { class: 'row' });
|
|
39
|
+
const tlsOut = h('pre', { class: 'code-box' }, 'Enter a domain for live TLS inspection or paste a PEM certificate for offline X.509 analysis.');
|
|
40
|
+
|
|
41
|
+
function renderCertSummary(cert, extraBadges) {
|
|
42
|
+
tlsBadges.textContent = '';
|
|
43
|
+
for (const [cls, text] of extraBadges) {
|
|
44
|
+
tlsBadges.appendChild(h('span', { class: `badge ${cls}` }, text));
|
|
45
|
+
}
|
|
46
|
+
if (cert.expired) tlsBadges.appendChild(h('span', { class: 'badge badge-err' }, `EXPIRED (${cert.daysRemaining}d)`));
|
|
47
|
+
else if (cert.expiringSoon) tlsBadges.appendChild(h('span', { class: 'badge badge-warn' }, `Expiring soon (${cert.daysRemaining}d)`));
|
|
48
|
+
else tlsBadges.appendChild(h('span', { class: 'badge badge-ok' }, `Valid · ${cert.daysRemaining} days left`));
|
|
49
|
+
if (cert.selfSigned) tlsBadges.appendChild(h('span', { class: 'badge badge-warn' }, 'Self-Signed'));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const inspectRemoteBtn = h(
|
|
53
|
+
'button',
|
|
54
|
+
{
|
|
55
|
+
type: 'button',
|
|
56
|
+
class: 'btn btn-primary btn-sm',
|
|
57
|
+
onClick: async () => {
|
|
58
|
+
inspectRemoteBtn.disabled = true;
|
|
59
|
+
inspectRemoteBtn.textContent = 'Probing…';
|
|
60
|
+
try {
|
|
61
|
+
const res = await api('/api/tls/inspect-remote', {
|
|
62
|
+
body: { target: remoteHostIn.value.trim(), port: Number(remotePortIn.value) || 443 },
|
|
63
|
+
});
|
|
64
|
+
renderCertSummary(res.leaf, [
|
|
65
|
+
['badge-info', `${res.tlsProtocol} · ${res.cipherName}`],
|
|
66
|
+
[res.authorized ? 'badge-ok' : 'badge-warn', res.authorized ? 'Trusted Chain' : `Untrusted: ${res.authorizationError || 'unknown'}`],
|
|
67
|
+
['badge-subtle', `${res.handshakeMs}ms · ${res.chain.length} cert(s)`],
|
|
68
|
+
]);
|
|
69
|
+
tlsOut.textContent = JSON.stringify(res, null, 2);
|
|
70
|
+
toast(`TLS inspected ${res.host}:${res.port} (${res.tlsProtocol})`, 'ok');
|
|
71
|
+
} catch (err) {
|
|
72
|
+
tlsBadges.textContent = '';
|
|
73
|
+
tlsBadges.appendChild(h('span', { class: 'badge badge-err' }, 'TLS Probe Failed'));
|
|
74
|
+
tlsOut.textContent = err.message;
|
|
75
|
+
toast(err.message, 'err');
|
|
76
|
+
} finally {
|
|
77
|
+
inspectRemoteBtn.disabled = false;
|
|
78
|
+
inspectRemoteBtn.textContent = 'Inspect Live TLS';
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
'Inspect Live TLS',
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
paneTls.appendChild(
|
|
86
|
+
h(
|
|
87
|
+
'div',
|
|
88
|
+
{ class: 'grid-2' },
|
|
89
|
+
h(
|
|
90
|
+
'div',
|
|
91
|
+
{ class: 'card' },
|
|
92
|
+
h('h2', { class: 'card-title' }, 'Live Remote TLS Handshake (SSRF-Guarded)'),
|
|
93
|
+
h('div', { class: 'row' }, remoteHostIn, remotePortIn, inspectRemoteBtn),
|
|
94
|
+
h('label', { class: 'field-label' }, 'Or Inspect PEM Certificate Offline (100% Local)'),
|
|
95
|
+
pemArea,
|
|
96
|
+
h(
|
|
97
|
+
'div',
|
|
98
|
+
{ class: 'row' },
|
|
99
|
+
h(
|
|
100
|
+
'button',
|
|
101
|
+
{
|
|
102
|
+
type: 'button',
|
|
103
|
+
class: 'btn btn-sm',
|
|
104
|
+
onClick: async () => {
|
|
105
|
+
try {
|
|
106
|
+
const res = await api('/api/tls/inspect-pem', { body: { pem: pemArea.value } });
|
|
107
|
+
if (res.certificates && res.certificates[0]) {
|
|
108
|
+
renderCertSummary(res.certificates[0], [['badge-info', `Offline PEM · ${res.count} cert(s)`]]);
|
|
109
|
+
}
|
|
110
|
+
tlsOut.textContent = JSON.stringify(res, null, 2);
|
|
111
|
+
toast(`Parsed ${res.count} X.509 certificate(s) offline`, 'ok');
|
|
112
|
+
} catch (err) {
|
|
113
|
+
toast(err.message, 'err');
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
'Inspect PEM Offline',
|
|
118
|
+
),
|
|
119
|
+
),
|
|
120
|
+
),
|
|
121
|
+
h(
|
|
122
|
+
'div',
|
|
123
|
+
{ class: 'card' },
|
|
124
|
+
h(
|
|
125
|
+
'div',
|
|
126
|
+
{ class: 'row-between' },
|
|
127
|
+
h('h2', { class: 'card-title' }, 'Certificate Chain & Security Findings'),
|
|
128
|
+
h('button', { type: 'button', class: 'btn btn-ghost btn-xs', onClick: () => copyText(tlsOut.textContent) }, 'Copy JSON'),
|
|
129
|
+
),
|
|
130
|
+
tlsBadges,
|
|
131
|
+
tlsOut,
|
|
132
|
+
),
|
|
133
|
+
),
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
// ─── Tab 2: GraphQL Studio + Introspection ────────────────────────────
|
|
137
|
+
const gqlUrl = h('input', { type: 'text', value: 'https://countries.trevorblades.com/graphql', placeholder: 'https://api.example.com/graphql or {{BASE_URL}}/graphql' });
|
|
138
|
+
const gqlHeaders = h('textarea', { rows: 2, value: 'Accept: application/json', placeholder: 'Authorization: Bearer {{env.API_TOKEN}}' });
|
|
139
|
+
const gqlQuery = h('textarea', {
|
|
140
|
+
rows: 9,
|
|
141
|
+
value: 'query GetCountry($code: ID!) {\n country(code: $code) {\n name\n capital\n currency\n }\n}',
|
|
142
|
+
});
|
|
143
|
+
const gqlVars = h('textarea', { rows: 3, value: '{\n "code": "EG"\n}' });
|
|
144
|
+
const gqlMeta = h('div', { class: 'row' });
|
|
145
|
+
const gqlOut = h('pre', { class: 'code-box' }, 'Run a GraphQL query or click "Introspect Schema" to inspect available types & fields.');
|
|
146
|
+
|
|
147
|
+
async function runGraphql(introspect) {
|
|
148
|
+
try {
|
|
149
|
+
const res = await api('/api/graphql', {
|
|
150
|
+
body: {
|
|
151
|
+
url: gqlUrl.value.trim(),
|
|
152
|
+
headers: parseHeaderLines(gqlHeaders.value),
|
|
153
|
+
query: gqlQuery.value,
|
|
154
|
+
variables: gqlVars.value,
|
|
155
|
+
introspect,
|
|
156
|
+
useEnvironment: true,
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
gqlMeta.textContent = '';
|
|
160
|
+
gqlMeta.appendChild(h('span', { class: `badge ${res.status < 400 ? 'badge-ok' : 'badge-err'}` }, `HTTP ${res.status}`));
|
|
161
|
+
gqlMeta.appendChild(h('span', { class: 'badge badge-info' }, `${res.timings.totalMs}ms`));
|
|
162
|
+
try {
|
|
163
|
+
gqlOut.textContent = JSON.stringify(JSON.parse(res.body), null, 2);
|
|
164
|
+
} catch {
|
|
165
|
+
gqlOut.textContent = res.body;
|
|
166
|
+
}
|
|
167
|
+
toast(introspect ? 'Schema introspection complete!' : `GraphQL HTTP ${res.status} (${res.timings.totalMs}ms)`, 'ok');
|
|
168
|
+
} catch (err) {
|
|
169
|
+
gqlMeta.textContent = '';
|
|
170
|
+
gqlMeta.appendChild(h('span', { class: 'badge badge-err' }, 'GraphQL Failed'));
|
|
171
|
+
gqlOut.textContent = err.message;
|
|
172
|
+
toast(err.message, 'err');
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
paneGql.appendChild(
|
|
177
|
+
h(
|
|
178
|
+
'div',
|
|
179
|
+
{ class: 'card' },
|
|
180
|
+
h(
|
|
181
|
+
'div',
|
|
182
|
+
{ class: 'row' },
|
|
183
|
+
gqlUrl,
|
|
184
|
+
h('button', { type: 'button', class: 'btn btn-primary btn-sm', onClick: () => runGraphql(false) }, 'Execute Query'),
|
|
185
|
+
h('button', { type: 'button', class: 'btn btn-sm', onClick: () => runGraphql(true) }, 'Introspect Schema'),
|
|
186
|
+
),
|
|
187
|
+
h(
|
|
188
|
+
'div',
|
|
189
|
+
{ class: 'grid-2' },
|
|
190
|
+
h(
|
|
191
|
+
'div',
|
|
192
|
+
{ class: 'stack' },
|
|
193
|
+
h('label', { class: 'field-label' }, 'Query / Mutation'),
|
|
194
|
+
gqlQuery,
|
|
195
|
+
h('label', { class: 'field-label' }, 'Variables (JSON)'),
|
|
196
|
+
gqlVars,
|
|
197
|
+
h('label', { class: 'field-label' }, 'Headers (supports {{VAR}} & {{env.SECRET}})'),
|
|
198
|
+
gqlHeaders,
|
|
199
|
+
),
|
|
200
|
+
h(
|
|
201
|
+
'div',
|
|
202
|
+
{ class: 'stack' },
|
|
203
|
+
h(
|
|
204
|
+
'div',
|
|
205
|
+
{ class: 'row-between' },
|
|
206
|
+
h('label', { class: 'field-label' }, 'GraphQL Response'),
|
|
207
|
+
h('button', { type: 'button', class: 'btn btn-ghost btn-xs', onClick: () => copyText(gqlOut.textContent) }, 'Copy'),
|
|
208
|
+
),
|
|
209
|
+
gqlMeta,
|
|
210
|
+
gqlOut,
|
|
211
|
+
),
|
|
212
|
+
),
|
|
213
|
+
),
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
// ─── Tab 3: RFC 6455 WebSocket Live Tester ────────────────────────────
|
|
217
|
+
const wsUrl = h('input', { type: 'text', value: 'wss://echo.websocket.events', placeholder: 'wss://echo.websocket.events or ws://{{HOST}}/ws' });
|
|
218
|
+
const wsHeaders = h('textarea', { rows: 2, placeholder: 'Authorization: Bearer {{env.WS_TOKEN}}' });
|
|
219
|
+
const wsMsgs = h('textarea', { rows: 5, value: '{"type":"ping","from":"DevAnvil"}\nHello WebSocket!' });
|
|
220
|
+
const wsDuration = h('input', { type: 'number', value: '2500', style: { width: '110px' } });
|
|
221
|
+
const wsMeta = h('div', { class: 'row' });
|
|
222
|
+
const wsOut = h('pre', { class: 'code-box' }, 'Connect to any ws:// or wss:// endpoint, send test frames (1 message per line), and capture responses with millisecond timing.');
|
|
223
|
+
|
|
224
|
+
const wsBtn = h(
|
|
225
|
+
'button',
|
|
226
|
+
{
|
|
227
|
+
type: 'button',
|
|
228
|
+
class: 'btn btn-primary btn-sm',
|
|
229
|
+
onClick: async () => {
|
|
230
|
+
wsBtn.disabled = true;
|
|
231
|
+
wsBtn.textContent = 'Probing…';
|
|
232
|
+
try {
|
|
233
|
+
const messages = wsMsgs.value.split(/\r?\n/).filter((l) => l.length > 0);
|
|
234
|
+
const res = await api('/api/proxy/ws', {
|
|
235
|
+
body: {
|
|
236
|
+
url: wsUrl.value.trim(),
|
|
237
|
+
headers: parseHeaderLines(wsHeaders.value),
|
|
238
|
+
messages,
|
|
239
|
+
maxMessages: 20,
|
|
240
|
+
maxDurationMs: Number(wsDuration.value) || 2500,
|
|
241
|
+
useEnvironment: true,
|
|
242
|
+
},
|
|
243
|
+
});
|
|
244
|
+
wsMeta.textContent = '';
|
|
245
|
+
wsMeta.appendChild(h('span', { class: 'badge badge-ok' }, `Connected in ${res.connectMs}ms`));
|
|
246
|
+
wsMeta.appendChild(h('span', { class: 'badge badge-info' }, `${res.messages.length} frame(s) · ${res.totalMs}ms`));
|
|
247
|
+
wsMeta.appendChild(h('span', { class: 'badge badge-subtle' }, `stop: ${res.stoppedReason}`));
|
|
248
|
+
wsOut.textContent = res.messages.length
|
|
249
|
+
? res.messages.map((m) => `[+${m.deltaMs}ms] ${m.direction === 'sent' ? '-> SENT' : '<- RECV'} (${m.opcode}) ${m.data}`).join('\n')
|
|
250
|
+
: '(connected cleanly, 0 frames received before timeout)';
|
|
251
|
+
toast(`WebSocket probe completed (${res.messages.length} frame(s))`, 'ok');
|
|
252
|
+
} catch (err) {
|
|
253
|
+
wsMeta.textContent = '';
|
|
254
|
+
wsMeta.appendChild(h('span', { class: 'badge badge-err' }, 'WebSocket Failed'));
|
|
255
|
+
wsOut.textContent = err.message;
|
|
256
|
+
toast(err.message, 'err');
|
|
257
|
+
} finally {
|
|
258
|
+
wsBtn.disabled = false;
|
|
259
|
+
wsBtn.textContent = 'Connect & Probe';
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
'Connect & Probe',
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
paneWs.appendChild(
|
|
267
|
+
h(
|
|
268
|
+
'div',
|
|
269
|
+
{ class: 'card' },
|
|
270
|
+
h('div', { class: 'row' }, wsUrl, h('span', { style: { fontSize: '12px', color: 'var(--text-dim)' } }, 'Max ms:'), wsDuration, wsBtn),
|
|
271
|
+
h(
|
|
272
|
+
'div',
|
|
273
|
+
{ class: 'grid-2' },
|
|
274
|
+
h(
|
|
275
|
+
'div',
|
|
276
|
+
{ class: 'stack' },
|
|
277
|
+
h('label', { class: 'field-label' }, 'Outbound Messages (one frame per line)'),
|
|
278
|
+
wsMsgs,
|
|
279
|
+
h('label', { class: 'field-label' }, 'Custom Upgrade Headers'),
|
|
280
|
+
wsHeaders,
|
|
281
|
+
),
|
|
282
|
+
h(
|
|
283
|
+
'div',
|
|
284
|
+
{ class: 'stack' },
|
|
285
|
+
h(
|
|
286
|
+
'div',
|
|
287
|
+
{ class: 'row-between' },
|
|
288
|
+
h('label', { class: 'field-label' }, 'Live Frame Timeline'),
|
|
289
|
+
h('button', { type: 'button', class: 'btn btn-ghost btn-xs', onClick: () => copyText(wsOut.textContent) }, 'Copy'),
|
|
290
|
+
),
|
|
291
|
+
wsMeta,
|
|
292
|
+
wsOut,
|
|
293
|
+
),
|
|
294
|
+
),
|
|
295
|
+
),
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
// Tabs wiring
|
|
299
|
+
function showTab(id) {
|
|
300
|
+
activeTab = id;
|
|
301
|
+
paneTls.style.display = id === 'tls' ? '' : 'none';
|
|
302
|
+
paneGql.style.display = id === 'gql' ? '' : 'none';
|
|
303
|
+
paneWs.style.display = id === 'ws' ? '' : 'none';
|
|
304
|
+
Array.from(tabBar.children).forEach((btn) => btn.classList.toggle('active', btn.dataset.tab === id));
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
[
|
|
308
|
+
['tls', 'TLS / X.509 Inspector'],
|
|
309
|
+
['gql', 'GraphQL Studio'],
|
|
310
|
+
['ws', 'WebSocket Live Tester'],
|
|
311
|
+
].forEach(([id, label]) => {
|
|
312
|
+
tabBar.appendChild(
|
|
313
|
+
h('button', { type: 'button', class: `tab-btn ${activeTab === id ? 'active' : ''}`, 'data-tab': id, onClick: () => showTab(id) }, label),
|
|
314
|
+
);
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
root.appendChild(h('div', { class: 'stack' }, tabBar, paneTls, paneGql, paneWs));
|
|
318
|
+
showTab('tls');
|
|
319
|
+
},
|
|
320
|
+
});
|
|
321
|
+
})();
|