sqlite-hub 0.2.0 → 0.3.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/.github/funding.yml +2 -0
- package/LICENSE +21 -0
- package/README.md +53 -27
- package/assets/mockups/graph_visualize.png +0 -0
- package/changelog.md +7 -1
- package/index.html +3 -0
- package/js/api.js +14 -0
- package/js/app.js +42 -1
- package/js/components/queryEditor.js +8 -0
- package/js/components/structureGraph.js +925 -0
- package/js/lib/cytoscapeRuntime.js +16 -0
- package/js/store.js +55 -0
- package/js/views/connections.js +18 -3
- package/js/views/data.js +13 -0
- package/js/views/editor.js +1 -0
- package/js/views/structure.js +239 -117
- package/package.json +4 -1
- package/publish_brew.sh +22 -0
- package/server/routes/connections.js +15 -1
- package/server/routes/export.js +26 -6
- package/server/server.js +16 -0
- package/server/services/sqlite/backupService.js +112 -0
- package/server/services/sqlite/connectionManager.js +15 -0
- package/server/services/sqlite/exportService.js +46 -1
- package/server/services/sqlite/structureService.js +26 -0
- package/server/services/storage/appStateStore.js +7 -2
- package/styles/structure-graph.css +414 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
.structure-graph {
|
|
2
|
+
background: var(--color-surface-container);
|
|
3
|
+
border: 1px solid rgba(138, 123, 52, 0.26);
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
min-height: 760px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.structure-graph__toolbar {
|
|
11
|
+
align-items: center;
|
|
12
|
+
background: linear-gradient(
|
|
13
|
+
to bottom,
|
|
14
|
+
rgba(45, 43, 37, 0.97),
|
|
15
|
+
rgba(23, 23, 20, 0.96)
|
|
16
|
+
);
|
|
17
|
+
border-bottom: 1px solid rgba(138, 123, 52, 0.24);
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
gap: 1rem;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
padding: 1rem 1.25rem;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.structure-graph__toolbar-main {
|
|
26
|
+
align-items: center;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex: 1 1 20rem;
|
|
29
|
+
flex-wrap: wrap;
|
|
30
|
+
gap: 0.875rem;
|
|
31
|
+
min-width: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.structure-graph__toolbar-actions {
|
|
35
|
+
align-items: center;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex: 0 0 auto;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
gap: 0.625rem;
|
|
40
|
+
justify-content: flex-end;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.structure-graph__search {
|
|
44
|
+
align-items: center;
|
|
45
|
+
background: rgba(12, 12, 10, 0.98);
|
|
46
|
+
border: 1px solid rgba(138, 123, 52, 0.34);
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
gap: 0.625rem;
|
|
49
|
+
height: 2.75rem;
|
|
50
|
+
min-width: min(100%, 22rem);
|
|
51
|
+
padding: 0 0.875rem;
|
|
52
|
+
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.structure-graph__search:focus-within {
|
|
56
|
+
border-color: rgba(252, 227, 0, 0.56);
|
|
57
|
+
box-shadow: 0 0 0 1px rgba(252, 227, 0, 0.18);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.structure-graph__search.is-miss {
|
|
61
|
+
border-color: rgba(255, 180, 171, 0.3);
|
|
62
|
+
box-shadow: 0 0 0 1px rgba(255, 180, 171, 0.1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.structure-graph__search-icon {
|
|
66
|
+
color: rgba(244, 239, 232, 0.56);
|
|
67
|
+
font-size: 1rem;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.structure-graph__search-input {
|
|
71
|
+
-webkit-appearance: none;
|
|
72
|
+
appearance: none;
|
|
73
|
+
background: transparent;
|
|
74
|
+
background-color: transparent !important;
|
|
75
|
+
background-image: none !important;
|
|
76
|
+
border: 0;
|
|
77
|
+
border-color: transparent;
|
|
78
|
+
border-radius: 0;
|
|
79
|
+
box-shadow: none !important;
|
|
80
|
+
color: var(--color-on-surface);
|
|
81
|
+
flex: 1;
|
|
82
|
+
font-family: var(--font-family-mono);
|
|
83
|
+
font-size: 0.75rem;
|
|
84
|
+
letter-spacing: 0.12em;
|
|
85
|
+
min-width: 0;
|
|
86
|
+
outline: 0;
|
|
87
|
+
padding: 0;
|
|
88
|
+
text-transform: uppercase;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.structure-graph__search-input::placeholder {
|
|
92
|
+
color: rgba(231, 223, 189, 0.38);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.structure-graph__search-input::-webkit-search-decoration,
|
|
96
|
+
.structure-graph__search-input::-webkit-search-cancel-button,
|
|
97
|
+
.structure-graph__search-input::-webkit-search-results-button,
|
|
98
|
+
.structure-graph__search-input::-webkit-search-results-decoration {
|
|
99
|
+
-webkit-appearance: none;
|
|
100
|
+
appearance: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.structure-graph__toolbar-meta {
|
|
104
|
+
color: rgba(231, 223, 189, 0.64);
|
|
105
|
+
font-family: var(--font-family-mono);
|
|
106
|
+
font-size: 0.625rem;
|
|
107
|
+
letter-spacing: 0.18em;
|
|
108
|
+
text-transform: uppercase;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.structure-graph__button {
|
|
112
|
+
align-items: center;
|
|
113
|
+
background: rgba(17, 17, 15, 0.94);
|
|
114
|
+
border: 1px solid rgba(138, 123, 52, 0.24);
|
|
115
|
+
color: rgba(244, 239, 232, 0.9);
|
|
116
|
+
display: inline-flex;
|
|
117
|
+
gap: 0.5rem;
|
|
118
|
+
height: 2.75rem;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
padding: 0 0.875rem;
|
|
121
|
+
text-transform: uppercase;
|
|
122
|
+
transition: background-color var(--transition-fast), color var(--transition-fast),
|
|
123
|
+
border-color var(--transition-fast);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.structure-graph__button:hover {
|
|
127
|
+
background: rgba(44, 42, 35, 0.96);
|
|
128
|
+
border-color: rgba(252, 227, 0, 0.34);
|
|
129
|
+
color: #fff6ae;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.structure-graph__button.is-active {
|
|
133
|
+
background: rgba(252, 227, 0, 0.16);
|
|
134
|
+
border-color: rgba(252, 227, 0, 0.4);
|
|
135
|
+
color: #fff6ae;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.structure-graph__button.is-disabled,
|
|
139
|
+
.structure-graph__button:disabled {
|
|
140
|
+
border-color: rgba(138, 123, 52, 0.16);
|
|
141
|
+
color: rgba(231, 223, 189, 0.34);
|
|
142
|
+
cursor: default;
|
|
143
|
+
opacity: 0.72;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.structure-graph__workspace {
|
|
147
|
+
display: grid;
|
|
148
|
+
flex: 1;
|
|
149
|
+
grid-template-columns: minmax(0, 1fr) 26rem;
|
|
150
|
+
min-height: 0;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.structure-graph.is-inspector-hidden .structure-graph__workspace {
|
|
154
|
+
grid-template-columns: minmax(0, 1fr);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.structure-graph__canvas-shell {
|
|
158
|
+
background:
|
|
159
|
+
linear-gradient(rgba(138, 123, 52, 0.09) 1px, transparent 1px),
|
|
160
|
+
linear-gradient(90deg, rgba(138, 123, 52, 0.08) 1px, transparent 1px),
|
|
161
|
+
radial-gradient(circle at top left, rgba(252, 227, 0, 0.14), transparent 30%),
|
|
162
|
+
radial-gradient(circle at bottom right, rgba(45, 250, 255, 0.1), transparent 24%),
|
|
163
|
+
linear-gradient(to bottom, rgba(27, 27, 24, 0.99), rgba(9, 10, 11, 0.99));
|
|
164
|
+
background-size: 28px 28px, 28px 28px, auto, auto, auto;
|
|
165
|
+
min-height: 0;
|
|
166
|
+
overflow: hidden;
|
|
167
|
+
position: relative;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.structure-graph__canvas {
|
|
171
|
+
inset: 0;
|
|
172
|
+
position: absolute;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.structure-graph__empty {
|
|
176
|
+
align-items: center;
|
|
177
|
+
color: rgba(231, 223, 189, 0.58);
|
|
178
|
+
display: flex;
|
|
179
|
+
flex-direction: column;
|
|
180
|
+
gap: 0.625rem;
|
|
181
|
+
inset: 0;
|
|
182
|
+
justify-content: center;
|
|
183
|
+
padding: 2rem;
|
|
184
|
+
position: absolute;
|
|
185
|
+
text-align: center;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.structure-graph__empty-icon {
|
|
189
|
+
color: rgba(252, 227, 0, 0.42);
|
|
190
|
+
font-size: 2.25rem;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.structure-graph__inspector {
|
|
194
|
+
background: linear-gradient(to bottom, rgba(26, 25, 23, 0.98), rgba(11, 11, 10, 0.99));
|
|
195
|
+
border-left: 1px solid rgba(138, 123, 52, 0.24);
|
|
196
|
+
min-height: 0;
|
|
197
|
+
overflow: auto;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.structure-graph.is-inspector-hidden .structure-graph__inspector {
|
|
201
|
+
display: none;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.structure-graph__panel {
|
|
205
|
+
display: flex;
|
|
206
|
+
flex-direction: column;
|
|
207
|
+
gap: 1.25rem;
|
|
208
|
+
min-height: 100%;
|
|
209
|
+
padding: 1.25rem;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.structure-graph__panel.is-empty {
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
text-align: center;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.structure-graph__eyebrow {
|
|
219
|
+
color: rgba(231, 223, 189, 0.62);
|
|
220
|
+
font-family: var(--font-family-mono);
|
|
221
|
+
font-size: 0.625rem;
|
|
222
|
+
letter-spacing: 0.2em;
|
|
223
|
+
text-transform: uppercase;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.structure-graph__title {
|
|
227
|
+
color: var(--color-primary-container);
|
|
228
|
+
font-family: var(--font-family-headline);
|
|
229
|
+
font-size: 2rem;
|
|
230
|
+
font-weight: 900;
|
|
231
|
+
letter-spacing: -0.04em;
|
|
232
|
+
line-height: 1;
|
|
233
|
+
text-transform: uppercase;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.structure-graph__subtitle {
|
|
237
|
+
color: rgba(231, 223, 189, 0.62);
|
|
238
|
+
font-family: var(--font-family-mono);
|
|
239
|
+
font-size: 0.625rem;
|
|
240
|
+
letter-spacing: 0.18em;
|
|
241
|
+
text-transform: uppercase;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.structure-graph__summary {
|
|
245
|
+
display: grid;
|
|
246
|
+
gap: 0.75rem;
|
|
247
|
+
grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.structure-graph__summary-card {
|
|
251
|
+
background: rgba(15, 15, 13, 0.94);
|
|
252
|
+
border: 1px solid rgba(138, 123, 52, 0.26);
|
|
253
|
+
display: flex;
|
|
254
|
+
align-items: center;
|
|
255
|
+
justify-content: space-between;
|
|
256
|
+
gap: 0.75rem;
|
|
257
|
+
min-height: 0;
|
|
258
|
+
padding: 0.625rem 0.75rem;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.structure-graph__summary-label {
|
|
262
|
+
color: rgba(231, 223, 189, 0.52);
|
|
263
|
+
flex: 1;
|
|
264
|
+
font-family: var(--font-family-mono);
|
|
265
|
+
font-size: 0.5625rem;
|
|
266
|
+
letter-spacing: 0.18em;
|
|
267
|
+
text-transform: uppercase;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.structure-graph__summary-value {
|
|
271
|
+
color: var(--color-primary-container);
|
|
272
|
+
flex: 0 0 auto;
|
|
273
|
+
font-family: var(--font-family-mono);
|
|
274
|
+
font-size: 0.6875rem;
|
|
275
|
+
font-weight: 700;
|
|
276
|
+
letter-spacing: 0.14em;
|
|
277
|
+
text-transform: uppercase;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.structure-graph__section {
|
|
281
|
+
background: rgba(15, 15, 13, 0.84);
|
|
282
|
+
border: 1px solid rgba(138, 123, 52, 0.22);
|
|
283
|
+
display: flex;
|
|
284
|
+
flex-direction: column;
|
|
285
|
+
gap: 0.875rem;
|
|
286
|
+
padding: 1rem;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.structure-graph__section-title {
|
|
290
|
+
color: var(--color-primary-container);
|
|
291
|
+
font-family: var(--font-family-mono);
|
|
292
|
+
font-size: 0.625rem;
|
|
293
|
+
font-weight: 700;
|
|
294
|
+
letter-spacing: 0.18em;
|
|
295
|
+
text-transform: uppercase;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.structure-graph__column-list {
|
|
299
|
+
display: flex;
|
|
300
|
+
flex-direction: column;
|
|
301
|
+
gap: 0.625rem;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.structure-graph__column-row {
|
|
305
|
+
align-items: flex-start;
|
|
306
|
+
display: grid;
|
|
307
|
+
gap: 0.75rem;
|
|
308
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.structure-graph__column-name {
|
|
312
|
+
color: var(--color-on-surface);
|
|
313
|
+
font-family: var(--font-family-mono);
|
|
314
|
+
font-size: 0.75rem;
|
|
315
|
+
min-width: 0;
|
|
316
|
+
overflow-wrap: anywhere;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.structure-graph__column-type {
|
|
320
|
+
color: rgba(231, 223, 189, 0.58);
|
|
321
|
+
font-family: var(--font-family-mono);
|
|
322
|
+
font-size: 0.625rem;
|
|
323
|
+
letter-spacing: 0.14em;
|
|
324
|
+
text-transform: uppercase;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.structure-graph__column-flags {
|
|
328
|
+
display: flex;
|
|
329
|
+
flex-wrap: wrap;
|
|
330
|
+
gap: 0.375rem;
|
|
331
|
+
justify-content: flex-end;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.structure-graph__flag {
|
|
335
|
+
background: rgba(39, 38, 34, 0.94);
|
|
336
|
+
border: 1px solid rgba(138, 123, 52, 0.24);
|
|
337
|
+
color: rgba(244, 239, 232, 0.82);
|
|
338
|
+
font-family: var(--font-family-mono);
|
|
339
|
+
font-size: 0.5625rem;
|
|
340
|
+
letter-spacing: 0.14em;
|
|
341
|
+
padding: 0.125rem 0.375rem;
|
|
342
|
+
text-transform: uppercase;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.structure-graph__flag.is-key {
|
|
346
|
+
background: rgba(252, 227, 0, 0.18);
|
|
347
|
+
border-color: rgba(252, 227, 0, 0.34);
|
|
348
|
+
color: #fff6ae;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.structure-graph__flag.is-link {
|
|
352
|
+
background: rgba(45, 250, 255, 0.14);
|
|
353
|
+
border-color: rgba(45, 250, 255, 0.28);
|
|
354
|
+
color: #9ffcff;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.structure-graph__flag.is-nullable {
|
|
358
|
+
color: rgba(231, 223, 189, 0.58);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.structure-graph__list {
|
|
362
|
+
display: flex;
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
gap: 0.5rem;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.structure-graph__list-item {
|
|
368
|
+
align-items: center;
|
|
369
|
+
color: rgba(229, 226, 225, 0.82);
|
|
370
|
+
display: flex;
|
|
371
|
+
justify-content: space-between;
|
|
372
|
+
gap: 0.75rem;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.structure-graph__list-item-label {
|
|
376
|
+
color: rgba(231, 223, 189, 0.62);
|
|
377
|
+
font-family: var(--font-family-mono);
|
|
378
|
+
font-size: 0.625rem;
|
|
379
|
+
letter-spacing: 0.14em;
|
|
380
|
+
text-transform: uppercase;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.structure-graph__ddl {
|
|
384
|
+
color: rgba(244, 239, 232, 0.78);
|
|
385
|
+
font-family: var(--font-family-mono);
|
|
386
|
+
font-size: 0.6875rem;
|
|
387
|
+
line-height: 1.65;
|
|
388
|
+
margin: 0;
|
|
389
|
+
max-height: 18rem;
|
|
390
|
+
overflow: auto;
|
|
391
|
+
white-space: pre-wrap;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.structure-entry--graph-active {
|
|
395
|
+
border-color: rgba(252, 227, 0, 0.44);
|
|
396
|
+
box-shadow: inset 0 0 0 1px rgba(252, 227, 0, 0.18);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.structure-entry--graph-related {
|
|
400
|
+
border-color: rgba(45, 250, 255, 0.34);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@media (max-width: 1279px) {
|
|
404
|
+
.structure-graph__workspace {
|
|
405
|
+
grid-template-columns: minmax(0, 1fr);
|
|
406
|
+
grid-template-rows: minmax(28rem, 1fr) auto;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.structure-graph__inspector {
|
|
410
|
+
border-left: 0;
|
|
411
|
+
border-top: 1px solid rgba(75, 71, 50, 0.18);
|
|
412
|
+
max-height: 28rem;
|
|
413
|
+
}
|
|
414
|
+
}
|