webspresso 0.0.8 → 0.0.10
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/README.md +23 -1
- package/bin/webspresso.js +125 -15
- package/package.json +3 -2
- package/plugins/analytics.js +270 -0
- package/plugins/dashboard/app.js +267 -0
- package/plugins/dashboard/index.js +142 -0
- package/plugins/dashboard/styles.js +384 -0
- package/plugins/index.js +17 -0
- package/plugins/schema-explorer.js +398 -0
- package/plugins/sitemap.js +221 -0
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dashboard CSS Styles
|
|
3
|
+
* Dark theme inspired by GitHub
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
module.exports = `
|
|
7
|
+
:root {
|
|
8
|
+
--bg-primary: #0d1117;
|
|
9
|
+
--bg-secondary: #161b22;
|
|
10
|
+
--bg-tertiary: #21262d;
|
|
11
|
+
--border: #30363d;
|
|
12
|
+
--text-primary: #e6edf3;
|
|
13
|
+
--text-secondary: #8b949e;
|
|
14
|
+
--text-muted: #6e7681;
|
|
15
|
+
--accent: #58a6ff;
|
|
16
|
+
--accent-hover: #79c0ff;
|
|
17
|
+
--green: #3fb950;
|
|
18
|
+
--red: #f85149;
|
|
19
|
+
--orange: #d29922;
|
|
20
|
+
--purple: #a371f7;
|
|
21
|
+
--pink: #db61a2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
* {
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
body {
|
|
31
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
32
|
+
background: var(--bg-primary);
|
|
33
|
+
color: var(--text-primary);
|
|
34
|
+
line-height: 1.5;
|
|
35
|
+
min-height: 100vh;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.dashboard {
|
|
39
|
+
max-width: 1400px;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
padding: 24px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Header */
|
|
45
|
+
.header {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
margin-bottom: 24px;
|
|
50
|
+
padding-bottom: 16px;
|
|
51
|
+
border-bottom: 1px solid var(--border);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.header h1 {
|
|
55
|
+
font-size: 24px;
|
|
56
|
+
font-weight: 600;
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
gap: 12px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.header h1 svg {
|
|
63
|
+
width: 32px;
|
|
64
|
+
height: 32px;
|
|
65
|
+
color: var(--green);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.dev-badge {
|
|
69
|
+
background: var(--green);
|
|
70
|
+
color: var(--bg-primary);
|
|
71
|
+
padding: 4px 10px;
|
|
72
|
+
border-radius: 12px;
|
|
73
|
+
font-size: 12px;
|
|
74
|
+
font-weight: 600;
|
|
75
|
+
text-transform: uppercase;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Tabs */
|
|
79
|
+
.tabs {
|
|
80
|
+
display: flex;
|
|
81
|
+
gap: 4px;
|
|
82
|
+
margin-bottom: 24px;
|
|
83
|
+
background: var(--bg-secondary);
|
|
84
|
+
padding: 4px;
|
|
85
|
+
border-radius: 8px;
|
|
86
|
+
width: fit-content;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.tab {
|
|
90
|
+
padding: 8px 16px;
|
|
91
|
+
border-radius: 6px;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
font-size: 14px;
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
color: var(--text-secondary);
|
|
96
|
+
background: transparent;
|
|
97
|
+
border: none;
|
|
98
|
+
transition: all 0.15s ease;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.tab:hover {
|
|
102
|
+
color: var(--text-primary);
|
|
103
|
+
background: var(--bg-tertiary);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.tab.active {
|
|
107
|
+
color: var(--text-primary);
|
|
108
|
+
background: var(--bg-tertiary);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Filter bar */
|
|
112
|
+
.filter-bar {
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
gap: 16px;
|
|
116
|
+
margin-bottom: 16px;
|
|
117
|
+
flex-wrap: wrap;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.filter-group {
|
|
121
|
+
display: flex;
|
|
122
|
+
gap: 4px;
|
|
123
|
+
background: var(--bg-secondary);
|
|
124
|
+
padding: 4px;
|
|
125
|
+
border-radius: 6px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.filter-btn {
|
|
129
|
+
padding: 6px 12px;
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
font-size: 13px;
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
color: var(--text-secondary);
|
|
135
|
+
background: transparent;
|
|
136
|
+
border: none;
|
|
137
|
+
transition: all 0.15s ease;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.filter-btn:hover {
|
|
141
|
+
color: var(--text-primary);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.filter-btn.active {
|
|
145
|
+
color: var(--text-primary);
|
|
146
|
+
background: var(--bg-tertiary);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.search-input {
|
|
150
|
+
padding: 8px 12px;
|
|
151
|
+
border-radius: 6px;
|
|
152
|
+
border: 1px solid var(--border);
|
|
153
|
+
background: var(--bg-secondary);
|
|
154
|
+
color: var(--text-primary);
|
|
155
|
+
font-size: 14px;
|
|
156
|
+
width: 240px;
|
|
157
|
+
outline: none;
|
|
158
|
+
transition: border-color 0.15s ease;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.search-input:focus {
|
|
162
|
+
border-color: var(--accent);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.search-input::placeholder {
|
|
166
|
+
color: var(--text-muted);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Table */
|
|
170
|
+
.table-container {
|
|
171
|
+
background: var(--bg-secondary);
|
|
172
|
+
border-radius: 8px;
|
|
173
|
+
border: 1px solid var(--border);
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
table {
|
|
178
|
+
width: 100%;
|
|
179
|
+
border-collapse: collapse;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
th {
|
|
183
|
+
text-align: left;
|
|
184
|
+
padding: 12px 16px;
|
|
185
|
+
font-size: 12px;
|
|
186
|
+
font-weight: 600;
|
|
187
|
+
text-transform: uppercase;
|
|
188
|
+
color: var(--text-secondary);
|
|
189
|
+
background: var(--bg-tertiary);
|
|
190
|
+
border-bottom: 1px solid var(--border);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
td {
|
|
194
|
+
padding: 12px 16px;
|
|
195
|
+
font-size: 14px;
|
|
196
|
+
border-bottom: 1px solid var(--border);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
tr:last-child td {
|
|
200
|
+
border-bottom: none;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
tr:hover td {
|
|
204
|
+
background: var(--bg-tertiary);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* Method badges */
|
|
208
|
+
.method-badge {
|
|
209
|
+
padding: 3px 8px;
|
|
210
|
+
border-radius: 4px;
|
|
211
|
+
font-size: 11px;
|
|
212
|
+
font-weight: 600;
|
|
213
|
+
text-transform: uppercase;
|
|
214
|
+
font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.method-get { background: rgba(63, 185, 80, 0.2); color: var(--green); }
|
|
218
|
+
.method-post { background: rgba(88, 166, 255, 0.2); color: var(--accent); }
|
|
219
|
+
.method-put { background: rgba(210, 153, 34, 0.2); color: var(--orange); }
|
|
220
|
+
.method-patch { background: rgba(163, 113, 247, 0.2); color: var(--purple); }
|
|
221
|
+
.method-delete { background: rgba(248, 81, 73, 0.2); color: var(--red); }
|
|
222
|
+
|
|
223
|
+
/* Type badges */
|
|
224
|
+
.type-badge {
|
|
225
|
+
padding: 3px 8px;
|
|
226
|
+
border-radius: 4px;
|
|
227
|
+
font-size: 11px;
|
|
228
|
+
font-weight: 500;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.type-ssr { background: rgba(163, 113, 247, 0.2); color: var(--purple); }
|
|
232
|
+
.type-api { background: rgba(219, 97, 162, 0.2); color: var(--pink); }
|
|
233
|
+
|
|
234
|
+
/* Code text */
|
|
235
|
+
.code {
|
|
236
|
+
font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
|
|
237
|
+
font-size: 13px;
|
|
238
|
+
color: var(--accent);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.file-path {
|
|
242
|
+
color: var(--text-secondary);
|
|
243
|
+
font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
|
|
244
|
+
font-size: 13px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/* Dynamic indicator */
|
|
248
|
+
.dynamic-indicator {
|
|
249
|
+
color: var(--orange);
|
|
250
|
+
font-size: 12px;
|
|
251
|
+
margin-left: 8px;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* Cards */
|
|
255
|
+
.card {
|
|
256
|
+
background: var(--bg-secondary);
|
|
257
|
+
border-radius: 8px;
|
|
258
|
+
border: 1px solid var(--border);
|
|
259
|
+
padding: 20px;
|
|
260
|
+
margin-bottom: 16px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.card-title {
|
|
264
|
+
font-size: 14px;
|
|
265
|
+
font-weight: 600;
|
|
266
|
+
color: var(--text-secondary);
|
|
267
|
+
margin-bottom: 12px;
|
|
268
|
+
text-transform: uppercase;
|
|
269
|
+
letter-spacing: 0.5px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.card-value {
|
|
273
|
+
font-size: 32px;
|
|
274
|
+
font-weight: 600;
|
|
275
|
+
color: var(--text-primary);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.stats-grid {
|
|
279
|
+
display: grid;
|
|
280
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
281
|
+
gap: 16px;
|
|
282
|
+
margin-bottom: 24px;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* Plugin list */
|
|
286
|
+
.plugin-item {
|
|
287
|
+
display: flex;
|
|
288
|
+
align-items: center;
|
|
289
|
+
justify-content: space-between;
|
|
290
|
+
padding: 16px;
|
|
291
|
+
border-bottom: 1px solid var(--border);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.plugin-item:last-child {
|
|
295
|
+
border-bottom: none;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.plugin-name {
|
|
299
|
+
font-weight: 600;
|
|
300
|
+
font-size: 15px;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.plugin-version {
|
|
304
|
+
color: var(--text-muted);
|
|
305
|
+
font-size: 13px;
|
|
306
|
+
font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/* Config section */
|
|
310
|
+
.config-section {
|
|
311
|
+
margin-bottom: 24px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.config-section h3 {
|
|
315
|
+
font-size: 16px;
|
|
316
|
+
font-weight: 600;
|
|
317
|
+
margin-bottom: 12px;
|
|
318
|
+
color: var(--text-primary);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.config-item {
|
|
322
|
+
display: flex;
|
|
323
|
+
padding: 10px 16px;
|
|
324
|
+
border-bottom: 1px solid var(--border);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.config-item:last-child {
|
|
328
|
+
border-bottom: none;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.config-key {
|
|
332
|
+
font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
|
|
333
|
+
font-size: 13px;
|
|
334
|
+
color: var(--accent);
|
|
335
|
+
min-width: 200px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.config-value {
|
|
339
|
+
font-family: 'SF Mono', SFMono-Regular, ui-monospace, monospace;
|
|
340
|
+
font-size: 13px;
|
|
341
|
+
color: var(--text-secondary);
|
|
342
|
+
word-break: break-all;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* Empty state */
|
|
346
|
+
.empty-state {
|
|
347
|
+
text-align: center;
|
|
348
|
+
padding: 48px;
|
|
349
|
+
color: var(--text-muted);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.empty-state svg {
|
|
353
|
+
width: 48px;
|
|
354
|
+
height: 48px;
|
|
355
|
+
margin-bottom: 16px;
|
|
356
|
+
opacity: 0.5;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/* Loading */
|
|
360
|
+
.loading {
|
|
361
|
+
display: flex;
|
|
362
|
+
align-items: center;
|
|
363
|
+
justify-content: center;
|
|
364
|
+
padding: 48px;
|
|
365
|
+
color: var(--text-muted);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
@keyframes spin {
|
|
369
|
+
to { transform: rotate(360deg); }
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.spinner {
|
|
373
|
+
width: 24px;
|
|
374
|
+
height: 24px;
|
|
375
|
+
border: 2px solid var(--border);
|
|
376
|
+
border-top-color: var(--accent);
|
|
377
|
+
border-radius: 50%;
|
|
378
|
+
animation: spin 0.8s linear infinite;
|
|
379
|
+
margin-right: 12px;
|
|
380
|
+
}
|
|
381
|
+
`;
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
package/plugins/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Webspresso Core Plugins
|
|
3
|
+
* Export all built-in plugins
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const sitemapPlugin = require('./sitemap');
|
|
7
|
+
const analyticsPlugin = require('./analytics');
|
|
8
|
+
const dashboardPlugin = require('./dashboard/index');
|
|
9
|
+
const schemaExplorerPlugin = require('./schema-explorer');
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
sitemapPlugin,
|
|
13
|
+
analyticsPlugin,
|
|
14
|
+
dashboardPlugin,
|
|
15
|
+
schemaExplorerPlugin,
|
|
16
|
+
};
|
|
17
|
+
|