crushdataai 1.2.7 → 1.2.8
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/assets/antigravity/data-analyst.md +8 -4
- package/assets/claude/SKILL.md +7 -2
- package/assets/copilot/data-analyst.prompt.md +8 -4
- package/assets/cursor/data-analyst.md +8 -4
- package/assets/kiro/data-analyst.md +8 -4
- package/assets/windsurf/data-analyst.md +8 -4
- package/dist/commands/schema.d.ts +1 -0
- package/dist/commands/schema.js +54 -0
- package/dist/connections.d.ts +3 -1
- package/dist/connections.js +125 -0
- package/dist/connectors/additional/index.d.ts +42 -0
- package/dist/connectors/additional/index.js +268 -0
- package/dist/connectors/cloud/index.d.ts +8 -3
- package/dist/connectors/cloud/index.js +321 -10
- package/dist/connectors/csv/index.d.ts +1 -0
- package/dist/connectors/csv/index.js +27 -7
- package/dist/connectors/custom/index.d.ts +10 -0
- package/dist/connectors/custom/index.js +61 -0
- package/dist/connectors/index.d.ts +6 -0
- package/dist/connectors/mysql/index.d.ts +1 -0
- package/dist/connectors/mysql/index.js +162 -9
- package/dist/connectors/postgresql/index.d.ts +2 -0
- package/dist/connectors/postgresql/index.js +140 -8
- package/dist/connectors/shopify/index.d.ts +1 -0
- package/dist/connectors/shopify/index.js +44 -5
- package/dist/index.js +7 -0
- package/dist/routes/connections.js +2 -0
- package/dist/server.js +8 -0
- package/package.json +9 -4
- package/ui/assets/index-Ba1mRihD.js +40 -0
- package/ui/assets/index-rlcHFDJB.css +1 -0
- package/ui/favicon.svg +4 -18
- package/ui/index.html +7 -324
- package/ui/favicon-32x32.png +0 -0
- package/ui/main.js +0 -541
- package/ui/styles.css +0 -718
package/ui/index.html
CHANGED
|
@@ -2,333 +2,16 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
|
|
4
4
|
<head>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
<link
|
|
11
|
-
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
12
|
-
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
13
|
-
<link rel="stylesheet" href="styles.css">
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
+
<title>CrushData AI - Connection Manager</title>
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-Ba1mRihD.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-rlcHFDJB.css">
|
|
14
11
|
</head>
|
|
15
12
|
|
|
16
13
|
<body>
|
|
17
|
-
|
|
18
|
-
<aside class="sidebar">
|
|
19
|
-
<div class="sidebar-header">
|
|
20
|
-
<div class="logo">
|
|
21
|
-
<div class="logo-icon">
|
|
22
|
-
<svg viewBox="0 0 24 24" fill="white">
|
|
23
|
-
<rect x="4" y="14" width="4" height="6" rx="1" />
|
|
24
|
-
<rect x="10" y="10" width="4" height="10" rx="1" />
|
|
25
|
-
<rect x="16" y="6" width="4" height="14" rx="1" />
|
|
26
|
-
</svg>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="logo-text"><span>Crushdataai</span></div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div class="sidebar-section">
|
|
33
|
-
<div class="sidebar-title">Data Sources</div>
|
|
34
|
-
<ul class="connection-list" id="connection-list">
|
|
35
|
-
<!-- Connections will be loaded here -->
|
|
36
|
-
</ul>
|
|
37
|
-
<button class="add-connection-btn" id="add-connection-btn">
|
|
38
|
-
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
39
|
-
<line x1="12" y1="5" x2="12" y2="19" />
|
|
40
|
-
<line x1="5" y1="12" x2="19" y2="12" />
|
|
41
|
-
</svg>
|
|
42
|
-
Add Connection
|
|
43
|
-
</button>
|
|
44
|
-
</div>
|
|
45
|
-
</aside>
|
|
46
|
-
|
|
47
|
-
<!-- Main Content -->
|
|
48
|
-
<main class="main">
|
|
49
|
-
<!-- No Connection Selected State -->
|
|
50
|
-
<div id="no-selection" class="empty-state">
|
|
51
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
52
|
-
<path
|
|
53
|
-
d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4" />
|
|
54
|
-
</svg>
|
|
55
|
-
<h3>No data source selected</h3>
|
|
56
|
-
<p>Select a connection from the sidebar or add a new one</p>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
<!-- Connection Details (shown when selected) -->
|
|
60
|
-
<div id="connection-details" class="hidden">
|
|
61
|
-
<div class="main-header">
|
|
62
|
-
<div>
|
|
63
|
-
<h1 class="main-title" id="selected-name">Production MySQL</h1>
|
|
64
|
-
<p class="main-subtitle" id="selected-info">mysql • localhost:3306</p>
|
|
65
|
-
</div>
|
|
66
|
-
<div style="display: flex; gap: 0.5rem;">
|
|
67
|
-
<button class="btn btn-secondary btn-sm" id="refresh-btn">
|
|
68
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
69
|
-
<polyline points="23 4 23 10 17 10" />
|
|
70
|
-
<path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10" />
|
|
71
|
-
</svg>
|
|
72
|
-
Refresh
|
|
73
|
-
</button>
|
|
74
|
-
<button class="btn btn-secondary btn-sm" id="delete-btn" style="color: var(--error);">
|
|
75
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
76
|
-
<polyline points="3 6 5 6 21 6" />
|
|
77
|
-
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" />
|
|
78
|
-
</svg>
|
|
79
|
-
Delete
|
|
80
|
-
</button>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<!-- Tables List Panel -->
|
|
85
|
-
<div class="panel" id="tables-panel">
|
|
86
|
-
<div class="panel-header">
|
|
87
|
-
<h3 class="panel-title">
|
|
88
|
-
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
89
|
-
<rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
|
|
90
|
-
<line x1="3" y1="9" x2="21" y2="9" />
|
|
91
|
-
<line x1="9" y1="21" x2="9" y2="9" />
|
|
92
|
-
</svg>
|
|
93
|
-
Available Tables
|
|
94
|
-
</h3>
|
|
95
|
-
<span class="panel-count" id="table-count">0 tables</span>
|
|
96
|
-
</div>
|
|
97
|
-
<div class="panel-body">
|
|
98
|
-
<div class="tables-grid" id="tables-grid">
|
|
99
|
-
<!-- Tables will be loaded here -->
|
|
100
|
-
</div>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
|
|
104
|
-
<!-- Inline Table Data Panel (shown when table clicked) -->
|
|
105
|
-
<div class="panel hidden" id="table-data-panel">
|
|
106
|
-
<div class="panel-header" style="flex-wrap: wrap; gap: 0.75rem;">
|
|
107
|
-
<div style="display: flex; align-items: center; gap: 0.75rem;">
|
|
108
|
-
<button class="btn btn-secondary btn-sm" id="back-to-tables">
|
|
109
|
-
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
110
|
-
<polyline points="15 18 9 12 15 6" />
|
|
111
|
-
</svg>
|
|
112
|
-
Back
|
|
113
|
-
</button>
|
|
114
|
-
<h3 class="panel-title" id="viewing-table-name">users</h3>
|
|
115
|
-
<span class="table-badge" id="viewing-table-rows">0 rows</span>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
<div class="panel-body" style="padding: 0; overflow-x: auto;">
|
|
119
|
-
<table class="preview-table" id="inline-table">
|
|
120
|
-
<!-- Table data will be inserted here -->
|
|
121
|
-
</table>
|
|
122
|
-
</div>
|
|
123
|
-
<div class="panel-footer" id="pagination-controls">
|
|
124
|
-
<!-- Pagination will be inserted here -->
|
|
125
|
-
</div>
|
|
126
|
-
</div>
|
|
127
|
-
|
|
128
|
-
<div class="panel" id="connection-panel">
|
|
129
|
-
<div class="panel-header">
|
|
130
|
-
<h3 class="panel-title">
|
|
131
|
-
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
132
|
-
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
|
|
133
|
-
<polyline points="14 2 14 8 20 8" />
|
|
134
|
-
<line x1="16" y1="13" x2="8" y2="13" />
|
|
135
|
-
<line x1="16" y1="17" x2="8" y2="17" />
|
|
136
|
-
</svg>
|
|
137
|
-
Connection Details
|
|
138
|
-
</h3>
|
|
139
|
-
</div>
|
|
140
|
-
<div class="panel-body" id="connection-info-panel">
|
|
141
|
-
<!-- Connection info will be shown here -->
|
|
142
|
-
</div>
|
|
143
|
-
</div>
|
|
144
|
-
</div>
|
|
145
|
-
</main>
|
|
146
|
-
|
|
147
|
-
<!-- New Connection Modal -->
|
|
148
|
-
<div class="modal-overlay" id="modal-overlay">
|
|
149
|
-
<div class="modal">
|
|
150
|
-
<div class="modal-header">
|
|
151
|
-
<h2 class="modal-title">New Data Connection</h2>
|
|
152
|
-
<button class="modal-close" id="modal-close">
|
|
153
|
-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
154
|
-
<line x1="18" y1="6" x2="6" y2="18" />
|
|
155
|
-
<line x1="6" y1="6" x2="18" y2="18" />
|
|
156
|
-
</svg>
|
|
157
|
-
</button>
|
|
158
|
-
</div>
|
|
159
|
-
<div class="modal-body">
|
|
160
|
-
<div class="source-grid">
|
|
161
|
-
<div class="source-btn-wrapper">
|
|
162
|
-
<button class="source-btn" data-type="mysql">
|
|
163
|
-
<div class="icon">🐬</div>
|
|
164
|
-
<div class="name">MySQL</div>
|
|
165
|
-
</button>
|
|
166
|
-
<button class="help-btn" data-type="mysql">?</button>
|
|
167
|
-
</div>
|
|
168
|
-
<div class="source-btn-wrapper">
|
|
169
|
-
<button class="source-btn" data-type="postgresql">
|
|
170
|
-
<div class="icon">🐘</div>
|
|
171
|
-
<div class="name">PostgreSQL</div>
|
|
172
|
-
</button>
|
|
173
|
-
<button class="help-btn" data-type="postgresql">?</button>
|
|
174
|
-
</div>
|
|
175
|
-
<div class="source-btn-wrapper">
|
|
176
|
-
<button class="source-btn" data-type="bigquery">
|
|
177
|
-
<div class="icon">📊</div>
|
|
178
|
-
<div class="name">BigQuery</div>
|
|
179
|
-
</button>
|
|
180
|
-
<button class="help-btn" data-type="bigquery">?</button>
|
|
181
|
-
</div>
|
|
182
|
-
<div class="source-btn-wrapper">
|
|
183
|
-
<button class="source-btn" data-type="snowflake">
|
|
184
|
-
<div class="icon">❄️</div>
|
|
185
|
-
<div class="name">Snowflake</div>
|
|
186
|
-
</button>
|
|
187
|
-
<button class="help-btn" data-type="snowflake">?</button>
|
|
188
|
-
</div>
|
|
189
|
-
<div class="source-btn-wrapper">
|
|
190
|
-
<button class="source-btn" data-type="shopify">
|
|
191
|
-
<div class="icon">🛒</div>
|
|
192
|
-
<div class="name">Shopify</div>
|
|
193
|
-
</button>
|
|
194
|
-
<button class="help-btn" data-type="shopify">?</button>
|
|
195
|
-
</div>
|
|
196
|
-
<div class="source-btn-wrapper">
|
|
197
|
-
<button class="source-btn" data-type="csv">
|
|
198
|
-
<div class="icon">📄</div>
|
|
199
|
-
<div class="name">CSV File</div>
|
|
200
|
-
</button>
|
|
201
|
-
<button class="help-btn" data-type="csv">?</button>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
|
|
205
|
-
<form id="connection-form">
|
|
206
|
-
<div id="form-fields" class="hidden">
|
|
207
|
-
<div class="form-group">
|
|
208
|
-
<label>Connection Name</label>
|
|
209
|
-
<input type="text" id="conn-name" placeholder="e.g. Production DB" required>
|
|
210
|
-
</div>
|
|
211
|
-
|
|
212
|
-
<!-- Database Fields -->
|
|
213
|
-
<div id="db-fields" class="hidden">
|
|
214
|
-
<div class="form-row">
|
|
215
|
-
<div class="form-group">
|
|
216
|
-
<label>Host</label>
|
|
217
|
-
<input type="text" id="conn-host" placeholder="localhost">
|
|
218
|
-
</div>
|
|
219
|
-
<div class="form-group">
|
|
220
|
-
<label>Port</label>
|
|
221
|
-
<input type="number" id="conn-port" placeholder="3306">
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
<div class="form-row">
|
|
225
|
-
<div class="form-group">
|
|
226
|
-
<label>Username</label>
|
|
227
|
-
<input type="text" id="conn-user" placeholder="root">
|
|
228
|
-
</div>
|
|
229
|
-
<div class="form-group">
|
|
230
|
-
<label>Password</label>
|
|
231
|
-
<input type="password" id="conn-password" placeholder="••••••••">
|
|
232
|
-
</div>
|
|
233
|
-
</div>
|
|
234
|
-
<div class="form-group">
|
|
235
|
-
<label>Database</label>
|
|
236
|
-
<input type="text" id="conn-database" placeholder="my_database">
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
|
-
|
|
240
|
-
<!-- Shopify Fields -->
|
|
241
|
-
<div id="shopify-fields" class="hidden">
|
|
242
|
-
<div class="form-group">
|
|
243
|
-
<label>Store URL</label>
|
|
244
|
-
<input type="text" id="conn-store" placeholder="my-shop.myshopify.com">
|
|
245
|
-
</div>
|
|
246
|
-
<div class="form-group">
|
|
247
|
-
<label>Admin API Access Token</label>
|
|
248
|
-
<input type="password" id="conn-apikey" placeholder="shpat_...">
|
|
249
|
-
</div>
|
|
250
|
-
<div class="form-group">
|
|
251
|
-
<label>API Secret Key</label>
|
|
252
|
-
<input type="password" id="conn-apisecret" placeholder="shpss_...">
|
|
253
|
-
</div>
|
|
254
|
-
</div>
|
|
255
|
-
|
|
256
|
-
<!-- BigQuery Fields -->
|
|
257
|
-
<div id="bigquery-fields" class="hidden">
|
|
258
|
-
<div class="form-group">
|
|
259
|
-
<label>Project ID</label>
|
|
260
|
-
<input type="text" id="conn-project" placeholder="my-gcp-project">
|
|
261
|
-
</div>
|
|
262
|
-
<div class="form-group">
|
|
263
|
-
<label>Key File Path</label>
|
|
264
|
-
<input type="text" id="conn-keyfile" placeholder="/path/to/service-account.json">
|
|
265
|
-
</div>
|
|
266
|
-
</div>
|
|
267
|
-
|
|
268
|
-
<!-- Snowflake Fields -->
|
|
269
|
-
<div id="snowflake-fields" class="hidden">
|
|
270
|
-
<div class="form-group">
|
|
271
|
-
<label>Account Identifier</label>
|
|
272
|
-
<input type="text" id="conn-account" placeholder="xy12345.us-east-1">
|
|
273
|
-
</div>
|
|
274
|
-
<div class="form-row">
|
|
275
|
-
<div class="form-group">
|
|
276
|
-
<label>Username</label>
|
|
277
|
-
<input type="text" id="conn-sf-user">
|
|
278
|
-
</div>
|
|
279
|
-
<div class="form-group">
|
|
280
|
-
<label>Password</label>
|
|
281
|
-
<input type="password" id="conn-sf-password">
|
|
282
|
-
</div>
|
|
283
|
-
</div>
|
|
284
|
-
<div class="form-row">
|
|
285
|
-
<div class="form-group">
|
|
286
|
-
<label>Warehouse</label>
|
|
287
|
-
<input type="text" id="conn-warehouse" placeholder="COMPUTE_WH">
|
|
288
|
-
</div>
|
|
289
|
-
</div>
|
|
290
|
-
</div>
|
|
291
|
-
|
|
292
|
-
<!-- CSV Fields -->
|
|
293
|
-
<div id="csv-fields" class="hidden">
|
|
294
|
-
<div class="form-group">
|
|
295
|
-
<label>File Path</label>
|
|
296
|
-
<input type="text" id="conn-filepath" placeholder="/path/to/data.csv">
|
|
297
|
-
</div>
|
|
298
|
-
</div>
|
|
299
|
-
|
|
300
|
-
<div id="message" class="message" style="display: none;"></div>
|
|
301
|
-
</div>
|
|
302
|
-
|
|
303
|
-
<div class="modal-footer">
|
|
304
|
-
<button type="button" class="btn btn-secondary" onclick="closeModal()">Cancel</button>
|
|
305
|
-
<button type="button" class="btn btn-secondary" id="test-btn">Test Connection</button>
|
|
306
|
-
<button type="submit" class="btn">Save Connection</button>
|
|
307
|
-
</div>
|
|
308
|
-
</form>
|
|
309
|
-
</div>
|
|
310
|
-
</div>
|
|
311
|
-
</div>
|
|
312
|
-
|
|
313
|
-
<!-- Help Modal -->
|
|
314
|
-
<div class="modal-overlay" id="help-modal-overlay">
|
|
315
|
-
<div class="modal" style="max-width: 400px;">
|
|
316
|
-
<div class="modal-header">
|
|
317
|
-
<h2 class="modal-title" id="help-title">Help</h2>
|
|
318
|
-
<button class="modal-close" id="help-modal-close">
|
|
319
|
-
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
320
|
-
<line x1="18" y1="6" x2="6" y2="18" />
|
|
321
|
-
<line x1="6" y1="6" x2="18" y2="18" />
|
|
322
|
-
</svg>
|
|
323
|
-
</button>
|
|
324
|
-
</div>
|
|
325
|
-
<div class="modal-body" id="help-content">
|
|
326
|
-
<!-- Content injected via JS -->
|
|
327
|
-
</div>
|
|
328
|
-
</div>
|
|
329
|
-
</div>
|
|
330
|
-
|
|
331
|
-
<script src="main.js"></script>
|
|
14
|
+
<div id="root"></div>
|
|
332
15
|
</body>
|
|
333
16
|
|
|
334
17
|
</html>
|
package/ui/favicon-32x32.png
DELETED
|
Binary file
|