@fias/plugin-dev-harness 1.4.1 → 1.5.0
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/bridge/live-handler.d.ts +5 -1
- package/dist/bridge/live-handler.d.ts.map +1 -1
- package/dist/bridge/live-handler.js +67 -0
- package/dist/bridge/live-handler.js.map +1 -1
- package/dist/bridge/mock-handler.d.ts +2 -1
- package/dist/bridge/mock-handler.d.ts.map +1 -1
- package/dist/bridge/mock-handler.js +23 -0
- package/dist/bridge/mock-handler.js.map +1 -1
- package/dist/bridge/types.d.ts +2 -0
- package/dist/bridge/types.d.ts.map +1 -1
- package/dist/server/harness-server.d.ts.map +1 -1
- package/dist/server/harness-server.js +42 -2
- package/dist/server/harness-server.js.map +1 -1
- package/dist/server/static/harness.css +59 -1
- package/dist/server/static/harness.html +9 -5
- package/dist/server/static/harness.js +195 -39
- package/package.json +1 -1
- package/dist/server/static/static/harness.css +0 -390
- package/dist/server/static/static/harness.html +0 -57
- package/dist/server/static/static/harness.js +0 -603
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
* {
|
|
2
|
-
margin: 0;
|
|
3
|
-
padding: 0;
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
body {
|
|
8
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
9
|
-
background: #0a0a0f;
|
|
10
|
-
color: #e4e4e7;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
height: 100vh;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/* Toolbar */
|
|
17
|
-
.toolbar {
|
|
18
|
-
display: flex;
|
|
19
|
-
justify-content: space-between;
|
|
20
|
-
align-items: center;
|
|
21
|
-
padding: 8px 16px;
|
|
22
|
-
background: #18181b;
|
|
23
|
-
border-bottom: 1px solid #3f3f46;
|
|
24
|
-
flex-shrink: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.toolbar-left,
|
|
28
|
-
.toolbar-right {
|
|
29
|
-
display: flex;
|
|
30
|
-
align-items: center;
|
|
31
|
-
gap: 12px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.logo {
|
|
35
|
-
font-weight: 600;
|
|
36
|
-
font-size: 14px;
|
|
37
|
-
color: #a78bfa;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/* Environment selector */
|
|
41
|
-
.env-selector {
|
|
42
|
-
background: #27272a;
|
|
43
|
-
color: #a1a1aa;
|
|
44
|
-
border: 1px solid #3f3f46;
|
|
45
|
-
border-radius: 4px;
|
|
46
|
-
padding: 3px 8px;
|
|
47
|
-
font-size: 11px;
|
|
48
|
-
font-weight: 600;
|
|
49
|
-
cursor: pointer;
|
|
50
|
-
outline: none;
|
|
51
|
-
text-transform: uppercase;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.env-selector:hover {
|
|
55
|
-
border-color: #52525b;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.env-selector:focus {
|
|
59
|
-
border-color: #a78bfa;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.mode-badge {
|
|
63
|
-
padding: 3px 10px;
|
|
64
|
-
border-radius: 4px;
|
|
65
|
-
font-size: 11px;
|
|
66
|
-
font-weight: 600;
|
|
67
|
-
text-transform: uppercase;
|
|
68
|
-
cursor: pointer;
|
|
69
|
-
transition: background 0.15s, border-color 0.15s;
|
|
70
|
-
user-select: none;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.mode-badge:hover {
|
|
74
|
-
filter: brightness(1.3);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.mode-badge:active {
|
|
78
|
-
filter: brightness(0.9);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.mode-mock {
|
|
82
|
-
background: #166534;
|
|
83
|
-
color: #86efac;
|
|
84
|
-
border: 1px solid #22c55e;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.mode-live {
|
|
88
|
-
background: #854d0e;
|
|
89
|
-
color: #fde047;
|
|
90
|
-
border: 1px solid #eab308;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.theme-badge {
|
|
94
|
-
padding: 2px 8px;
|
|
95
|
-
border-radius: 4px;
|
|
96
|
-
font-size: 11px;
|
|
97
|
-
font-weight: 600;
|
|
98
|
-
text-transform: uppercase;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.theme-dark {
|
|
102
|
-
background: #171717;
|
|
103
|
-
color: #a6a6a6;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.theme-light {
|
|
107
|
-
background: #e5e5e5;
|
|
108
|
-
color: #171717;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.credit-balance {
|
|
112
|
-
font-size: 12px;
|
|
113
|
-
color: #fde047;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.btn-icon {
|
|
117
|
-
background: #27272a;
|
|
118
|
-
border: 1px solid #3f3f46;
|
|
119
|
-
color: #e4e4e7;
|
|
120
|
-
padding: 4px 8px;
|
|
121
|
-
border-radius: 4px;
|
|
122
|
-
cursor: pointer;
|
|
123
|
-
font-size: 14px;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.btn-icon:hover {
|
|
127
|
-
background: #3f3f46;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* Login Modal */
|
|
131
|
-
.modal-overlay {
|
|
132
|
-
position: fixed;
|
|
133
|
-
inset: 0;
|
|
134
|
-
background: rgba(0, 0, 0, 0.7);
|
|
135
|
-
display: flex;
|
|
136
|
-
align-items: center;
|
|
137
|
-
justify-content: center;
|
|
138
|
-
z-index: 1000;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.modal {
|
|
142
|
-
background: #27272a;
|
|
143
|
-
border: 1px solid #3f3f46;
|
|
144
|
-
border-radius: 8px;
|
|
145
|
-
padding: 24px;
|
|
146
|
-
width: 420px;
|
|
147
|
-
max-width: 90vw;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.modal h3 {
|
|
151
|
-
font-size: 16px;
|
|
152
|
-
color: #e4e4e7;
|
|
153
|
-
margin-bottom: 8px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.modal p {
|
|
157
|
-
font-size: 13px;
|
|
158
|
-
color: #a1a1aa;
|
|
159
|
-
line-height: 1.5;
|
|
160
|
-
margin-bottom: 4px;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.modal-hint {
|
|
164
|
-
font-size: 12px !important;
|
|
165
|
-
color: #6b7280 !important;
|
|
166
|
-
margin-bottom: 16px !important;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.modal-input {
|
|
170
|
-
width: 100%;
|
|
171
|
-
padding: 8px 12px;
|
|
172
|
-
background: #18181b;
|
|
173
|
-
border: 1px solid #3f3f46;
|
|
174
|
-
border-radius: 4px;
|
|
175
|
-
color: #e4e4e7;
|
|
176
|
-
font-family: 'SF Mono', 'Fira Code', monospace;
|
|
177
|
-
font-size: 13px;
|
|
178
|
-
margin-bottom: 12px;
|
|
179
|
-
outline: none;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.modal-input:focus {
|
|
183
|
-
border-color: #a78bfa;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.modal-error {
|
|
187
|
-
font-size: 12px;
|
|
188
|
-
color: #fca5a5;
|
|
189
|
-
margin-bottom: 12px;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.modal-actions {
|
|
193
|
-
display: flex;
|
|
194
|
-
justify-content: flex-end;
|
|
195
|
-
gap: 8px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.btn-primary {
|
|
199
|
-
background: #ffffff;
|
|
200
|
-
color: #0a0a0a;
|
|
201
|
-
border: none;
|
|
202
|
-
padding: 6px 16px;
|
|
203
|
-
border-radius: 4px;
|
|
204
|
-
cursor: pointer;
|
|
205
|
-
font-size: 13px;
|
|
206
|
-
font-weight: 500;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.btn-primary:hover {
|
|
210
|
-
background: #e5e5e5;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.btn-primary:disabled {
|
|
214
|
-
opacity: 0.5;
|
|
215
|
-
cursor: not-allowed;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.btn-full {
|
|
219
|
-
width: 100%;
|
|
220
|
-
padding: 10px 16px;
|
|
221
|
-
margin-bottom: 12px;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.btn-secondary {
|
|
225
|
-
background: transparent;
|
|
226
|
-
color: #a1a1aa;
|
|
227
|
-
border: 1px solid #3f3f46;
|
|
228
|
-
padding: 6px 16px;
|
|
229
|
-
border-radius: 4px;
|
|
230
|
-
cursor: pointer;
|
|
231
|
-
font-size: 13px;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.btn-secondary:hover {
|
|
235
|
-
background: #3f3f46;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.btn-link {
|
|
239
|
-
background: none;
|
|
240
|
-
border: none;
|
|
241
|
-
color: #a78bfa;
|
|
242
|
-
cursor: pointer;
|
|
243
|
-
font-size: 12px;
|
|
244
|
-
padding: 0;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.btn-link:hover {
|
|
248
|
-
text-decoration: underline;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.modal-divider {
|
|
252
|
-
display: flex;
|
|
253
|
-
align-items: center;
|
|
254
|
-
gap: 12px;
|
|
255
|
-
margin: 12px 0;
|
|
256
|
-
color: #6b7280;
|
|
257
|
-
font-size: 12px;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.modal-divider::before,
|
|
261
|
-
.modal-divider::after {
|
|
262
|
-
content: '';
|
|
263
|
-
flex: 1;
|
|
264
|
-
height: 1px;
|
|
265
|
-
background: #3f3f46;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/* Plugin status overlay */
|
|
269
|
-
.plugin-status {
|
|
270
|
-
flex: 1;
|
|
271
|
-
display: flex;
|
|
272
|
-
flex-direction: column;
|
|
273
|
-
align-items: center;
|
|
274
|
-
justify-content: center;
|
|
275
|
-
gap: 16px;
|
|
276
|
-
color: #a1a1aa;
|
|
277
|
-
font-size: 14px;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.plugin-status.hidden {
|
|
281
|
-
display: none;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.plugin-status.error {
|
|
285
|
-
color: #fca5a5;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.plugin-status p {
|
|
289
|
-
max-width: 500px;
|
|
290
|
-
text-align: center;
|
|
291
|
-
line-height: 1.6;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.plugin-status code {
|
|
295
|
-
background: #27272a;
|
|
296
|
-
padding: 2px 8px;
|
|
297
|
-
border-radius: 4px;
|
|
298
|
-
font-family: 'SF Mono', 'Fira Code', monospace;
|
|
299
|
-
font-size: 13px;
|
|
300
|
-
color: #e4e4e7;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.status-spinner {
|
|
304
|
-
width: 24px;
|
|
305
|
-
height: 24px;
|
|
306
|
-
border: 3px solid #3f3f46;
|
|
307
|
-
border-top-color: #a78bfa;
|
|
308
|
-
border-radius: 50%;
|
|
309
|
-
animation: spin 0.8s linear infinite;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
@keyframes spin {
|
|
313
|
-
to { transform: rotate(360deg); }
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/* Plugin iframe */
|
|
317
|
-
#plugin-iframe {
|
|
318
|
-
flex: 1;
|
|
319
|
-
border: none;
|
|
320
|
-
width: 100%;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
#plugin-iframe.hidden {
|
|
324
|
-
display: none;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/* Dev Console */
|
|
328
|
-
.console-panel {
|
|
329
|
-
flex-shrink: 0;
|
|
330
|
-
border-top: 1px solid #3f3f46;
|
|
331
|
-
background: #18181b;
|
|
332
|
-
max-height: 250px;
|
|
333
|
-
display: flex;
|
|
334
|
-
flex-direction: column;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.console-header {
|
|
338
|
-
display: flex;
|
|
339
|
-
justify-content: space-between;
|
|
340
|
-
padding: 6px 16px;
|
|
341
|
-
cursor: pointer;
|
|
342
|
-
font-size: 12px;
|
|
343
|
-
color: #a1a1aa;
|
|
344
|
-
border-bottom: 1px solid #27272a;
|
|
345
|
-
user-select: none;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
.console-header:hover {
|
|
349
|
-
background: #1e1e22;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
.console-body {
|
|
353
|
-
overflow-y: auto;
|
|
354
|
-
padding: 8px 16px;
|
|
355
|
-
font-family: 'SF Mono', 'Fira Code', monospace;
|
|
356
|
-
font-size: 11px;
|
|
357
|
-
flex: 1;
|
|
358
|
-
display: none;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
.console-body.open {
|
|
362
|
-
display: block;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
.log-entry {
|
|
366
|
-
padding: 2px 0;
|
|
367
|
-
border-bottom: 1px solid #1e1e22;
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
.log-info {
|
|
371
|
-
color: #93c5fd;
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.log-warn {
|
|
375
|
-
color: #fde047;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
.log-error {
|
|
379
|
-
color: #fca5a5;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
.log-time {
|
|
383
|
-
color: #6b7280;
|
|
384
|
-
margin-right: 8px;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.log-cost {
|
|
388
|
-
color: #fbbf24;
|
|
389
|
-
margin-left: 8px;
|
|
390
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
-
<title>Fias Arche Dev</title>
|
|
7
|
-
<link rel="stylesheet" href="/static/harness.css" />
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div class="toolbar">
|
|
11
|
-
<div class="toolbar-left">
|
|
12
|
-
<span class="logo">Fias Arche Dev</span>
|
|
13
|
-
<select id="env-selector" class="env-selector">
|
|
14
|
-
<option value="staging">STAGING</option>
|
|
15
|
-
<option value="production">PRODUCTION</option>
|
|
16
|
-
</select>
|
|
17
|
-
<button id="mode-badge" class="mode-badge mode-mock" title="Click to switch mode">MOCK ⇆</button>
|
|
18
|
-
</div>
|
|
19
|
-
<div class="toolbar-right">
|
|
20
|
-
<span id="credit-balance" class="credit-balance" style="display: none"></span>
|
|
21
|
-
<span id="theme-badge" class="theme-badge theme-dark">DARK</span>
|
|
22
|
-
<button id="theme-toggle" class="btn-icon" title="Toggle theme">☼/☾</button>
|
|
23
|
-
<button id="reload-btn" class="btn-icon" title="Reload plugin">↻</button>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<!-- Login modal -->
|
|
27
|
-
<div id="login-modal" class="modal-overlay" style="display: none">
|
|
28
|
-
<div class="modal">
|
|
29
|
-
<h3>Sign in to FIAS</h3>
|
|
30
|
-
<p>Signing in to <strong id="login-target"></strong></p>
|
|
31
|
-
<input id="login-email" type="email" class="modal-input" placeholder="Email" autocomplete="email" />
|
|
32
|
-
<input id="login-password" type="password" class="modal-input" placeholder="Password" autocomplete="current-password" />
|
|
33
|
-
<div id="login-error" class="modal-error" style="display: none"></div>
|
|
34
|
-
<div class="modal-actions">
|
|
35
|
-
<button id="login-cancel" class="btn-secondary">Cancel</button>
|
|
36
|
-
<button id="login-submit" class="btn-primary">Sign in</button>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
<div id="plugin-status" class="plugin-status">
|
|
41
|
-
<div class="status-spinner"></div>
|
|
42
|
-
<p>Connecting to plugin server...</p>
|
|
43
|
-
</div>
|
|
44
|
-
<iframe
|
|
45
|
-
id="plugin-iframe"
|
|
46
|
-
sandbox="allow-scripts allow-forms allow-same-origin"
|
|
47
|
-
></iframe>
|
|
48
|
-
<div id="console-panel" class="console-panel">
|
|
49
|
-
<div class="console-header" id="console-toggle">
|
|
50
|
-
<span>Dev Console</span>
|
|
51
|
-
<span id="console-count">0 messages</span>
|
|
52
|
-
</div>
|
|
53
|
-
<div class="console-body" id="console-body"></div>
|
|
54
|
-
</div>
|
|
55
|
-
<script src="/static/harness.js"></script>
|
|
56
|
-
</body>
|
|
57
|
-
</html>
|