@power-maverick/tool-erd-generator 0.0.7 → 0.0.9
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 +118 -359
- package/index.html +18 -1
- package/package.json +13 -27
- package/tsconfig.json +20 -15
- package/{webview/vite.config.ts → vite.config.ts} +1 -1
- package/CONVERSION_SUMMARY.md +0 -288
- package/REFACTORING_COMPLETE.md +0 -352
- package/TYPESCRIPT_NOTES.md +0 -57
- package/dist/src/components/ERDGenerator.d.ts +0 -44
- package/dist/src/components/ERDGenerator.d.ts.map +0 -1
- package/dist/src/components/ERDGenerator.js +0 -232
- package/dist/src/components/ERDGenerator.js.map +0 -1
- package/dist/src/dvdtIntegration/integration.d.ts +0 -47
- package/dist/src/dvdtIntegration/integration.d.ts.map +0 -1
- package/dist/src/dvdtIntegration/integration.js +0 -223
- package/dist/src/dvdtIntegration/integration.js.map +0 -1
- package/dist/src/index.d.ts +0 -6
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/index.js +0 -26
- package/dist/src/index.js.map +0 -1
- package/dist/src/models/interfaces.d.ts +0 -84
- package/dist/src/models/interfaces.d.ts.map +0 -1
- package/dist/src/models/interfaces.js +0 -3
- package/dist/src/models/interfaces.js.map +0 -1
- package/dist/src/models/platformApi.d.ts +0 -92
- package/dist/src/models/platformApi.d.ts.map +0 -1
- package/dist/src/models/platformApi.js +0 -213
- package/dist/src/models/platformApi.js.map +0 -1
- package/dist/src/utils/Constants.d.ts +0 -3
- package/dist/src/utils/Constants.d.ts.map +0 -1
- package/dist/src/utils/Constants.js +0 -6
- package/dist/src/utils/Constants.js.map +0 -1
- package/dist/src/utils/DataverseClient.d.ts +0 -53
- package/dist/src/utils/DataverseClient.d.ts.map +0 -1
- package/dist/src/utils/DataverseClient.js +0 -236
- package/dist/src/utils/DataverseClient.js.map +0 -1
- package/dist/webview/index.css +0 -1
- package/dist/webview/index.html +0 -13
- package/dist/webview/index.js +0 -49
- package/tsconfig.webview.json +0 -24
- package/ui/test.html +0 -326
- package/webview/App.tsx +0 -412
- package/webview/index.html +0 -12
- package/webview/main.tsx +0 -10
- package/webview/styles.css +0 -288
- package/webview/tsconfig.json +0 -35
- /package/{webview/tsconfig.node.json → tsconfig.node.json} +0 -0
package/ui/test.html
DELETED
|
@@ -1,326 +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>ERD Generator - Standalone Test</title>
|
|
7
|
-
<!-- Mermaid.js for diagram rendering -->
|
|
8
|
-
<script src="https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js"></script>
|
|
9
|
-
<script>
|
|
10
|
-
// Initialize Mermaid
|
|
11
|
-
if (typeof mermaid !== 'undefined') {
|
|
12
|
-
mermaid.initialize({
|
|
13
|
-
startOnLoad: false,
|
|
14
|
-
theme: 'default',
|
|
15
|
-
themeVariables: {
|
|
16
|
-
primaryColor: '#0e639c',
|
|
17
|
-
primaryTextColor: '#fff',
|
|
18
|
-
primaryBorderColor: '#007acc',
|
|
19
|
-
lineColor: '#007acc',
|
|
20
|
-
secondaryColor: '#e3e3e3',
|
|
21
|
-
tertiaryColor: '#f9f9f9'
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
</script>
|
|
26
|
-
<style>
|
|
27
|
-
* {
|
|
28
|
-
margin: 0;
|
|
29
|
-
padding: 0;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
body {
|
|
34
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
35
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
36
|
-
min-height: 100vh;
|
|
37
|
-
padding: 20px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.container {
|
|
41
|
-
max-width: 1400px;
|
|
42
|
-
margin: 0 auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.header {
|
|
46
|
-
text-align: center;
|
|
47
|
-
color: white;
|
|
48
|
-
margin-bottom: 30px;
|
|
49
|
-
padding-bottom: 20px;
|
|
50
|
-
border-bottom: 2px solid rgba(255, 255, 255, 0.2);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.header h1 {
|
|
54
|
-
font-size: 2.5em;
|
|
55
|
-
margin-bottom: 10px;
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
gap: 15px;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.header p {
|
|
63
|
-
font-size: 1.2em;
|
|
64
|
-
opacity: 0.9;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.test-info {
|
|
68
|
-
background: rgba(255, 255, 255, 0.95);
|
|
69
|
-
border-radius: 12px;
|
|
70
|
-
padding: 20px;
|
|
71
|
-
margin-bottom: 20px;
|
|
72
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.test-info h2 {
|
|
76
|
-
color: #667eea;
|
|
77
|
-
margin-bottom: 15px;
|
|
78
|
-
font-size: 1.5em;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.test-info p {
|
|
82
|
-
color: #666;
|
|
83
|
-
margin-bottom: 10px;
|
|
84
|
-
line-height: 1.6;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.credentials-form {
|
|
88
|
-
background: rgba(255, 255, 255, 0.95);
|
|
89
|
-
border-radius: 12px;
|
|
90
|
-
padding: 25px;
|
|
91
|
-
margin-bottom: 20px;
|
|
92
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.form-group {
|
|
96
|
-
margin-bottom: 20px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.form-group label {
|
|
100
|
-
display: block;
|
|
101
|
-
margin-bottom: 8px;
|
|
102
|
-
font-weight: 600;
|
|
103
|
-
color: #333;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.form-group input {
|
|
107
|
-
width: 100%;
|
|
108
|
-
padding: 12px 15px;
|
|
109
|
-
border: 2px solid #e1e4e8;
|
|
110
|
-
border-radius: 6px;
|
|
111
|
-
font-size: 14px;
|
|
112
|
-
transition: border-color 0.2s;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.form-group input:focus {
|
|
116
|
-
outline: none;
|
|
117
|
-
border-color: #667eea;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.form-group small {
|
|
121
|
-
display: block;
|
|
122
|
-
margin-top: 5px;
|
|
123
|
-
color: #666;
|
|
124
|
-
font-size: 0.9em;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.btn {
|
|
128
|
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
129
|
-
color: white;
|
|
130
|
-
border: none;
|
|
131
|
-
padding: 12px 30px;
|
|
132
|
-
border-radius: 6px;
|
|
133
|
-
font-size: 16px;
|
|
134
|
-
font-weight: 600;
|
|
135
|
-
cursor: pointer;
|
|
136
|
-
transition: transform 0.2s, box-shadow 0.2s;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.btn:hover {
|
|
140
|
-
transform: translateY(-2px);
|
|
141
|
-
box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.btn:active {
|
|
145
|
-
transform: translateY(0);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
#webview-container {
|
|
149
|
-
background: white;
|
|
150
|
-
border-radius: 12px;
|
|
151
|
-
padding: 20px;
|
|
152
|
-
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
153
|
-
min-height: 600px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.hidden {
|
|
157
|
-
display: none;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.alert {
|
|
161
|
-
padding: 15px;
|
|
162
|
-
border-radius: 6px;
|
|
163
|
-
margin-bottom: 20px;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.alert-info {
|
|
167
|
-
background: #d1ecf1;
|
|
168
|
-
color: #0c5460;
|
|
169
|
-
border: 1px solid #bee5eb;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.alert-success {
|
|
173
|
-
background: #d4edda;
|
|
174
|
-
color: #155724;
|
|
175
|
-
border: 1px solid #c3e6cb;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.alert-error {
|
|
179
|
-
background: #f8d7da;
|
|
180
|
-
color: #721c24;
|
|
181
|
-
border: 1px solid #f5c6cb;
|
|
182
|
-
}
|
|
183
|
-
</style>
|
|
184
|
-
</head>
|
|
185
|
-
<body>
|
|
186
|
-
<div class="container">
|
|
187
|
-
<div class="header">
|
|
188
|
-
<h1>
|
|
189
|
-
<span>🗺️</span>
|
|
190
|
-
Dataverse ERD Generator - Standalone Test
|
|
191
|
-
</h1>
|
|
192
|
-
<p>Test the ERD Generator without VS Code integration</p>
|
|
193
|
-
</div>
|
|
194
|
-
|
|
195
|
-
<div class="test-info">
|
|
196
|
-
<h2>ℹ️ Test Page Information</h2>
|
|
197
|
-
<p><strong>Purpose:</strong> This standalone test page allows you to test the ERD Generator without integrating it into DVDT.</p>
|
|
198
|
-
<p><strong>How it works:</strong> Enter your Dataverse environment URL and access token below. The tool will load in an iframe and communicate via postMessage.</p>
|
|
199
|
-
<p><strong>Note:</strong> Make sure you have built the project (<code>npm run build</code>) before using this test page.</p>
|
|
200
|
-
</div>
|
|
201
|
-
|
|
202
|
-
<div class="credentials-form">
|
|
203
|
-
<h2 style="margin-bottom: 20px; color: #667eea;">🔐 Dataverse Credentials</h2>
|
|
204
|
-
|
|
205
|
-
<div class="form-group">
|
|
206
|
-
<label for="environmentUrl">Environment URL</label>
|
|
207
|
-
<input
|
|
208
|
-
type="text"
|
|
209
|
-
id="environmentUrl"
|
|
210
|
-
placeholder="https://your-org.crm.dynamics.com"
|
|
211
|
-
value="">
|
|
212
|
-
<small>Your Dataverse environment URL (e.g., https://contoso.crm.dynamics.com)</small>
|
|
213
|
-
</div>
|
|
214
|
-
|
|
215
|
-
<div class="form-group">
|
|
216
|
-
<label for="accessToken">Access Token</label>
|
|
217
|
-
<input
|
|
218
|
-
type="password"
|
|
219
|
-
id="accessToken"
|
|
220
|
-
placeholder="Enter your Dataverse access token">
|
|
221
|
-
<small>Your Dataverse access token from Azure AD authentication</small>
|
|
222
|
-
</div>
|
|
223
|
-
|
|
224
|
-
<button class="btn" onclick="loadWebview()">Load ERD Generator</button>
|
|
225
|
-
</div>
|
|
226
|
-
|
|
227
|
-
<div id="status-message" class="hidden"></div>
|
|
228
|
-
|
|
229
|
-
<div id="webview-container" class="hidden">
|
|
230
|
-
<iframe
|
|
231
|
-
id="webview-frame"
|
|
232
|
-
src="webview.html"
|
|
233
|
-
style="width: 100%; height: 800px; border: none; border-radius: 8px;">
|
|
234
|
-
</iframe>
|
|
235
|
-
</div>
|
|
236
|
-
</div>
|
|
237
|
-
|
|
238
|
-
<script>
|
|
239
|
-
let webviewFrame = null;
|
|
240
|
-
|
|
241
|
-
function loadWebview() {
|
|
242
|
-
const environmentUrl = document.getElementById('environmentUrl').value.trim();
|
|
243
|
-
const accessToken = document.getElementById('accessToken').value.trim();
|
|
244
|
-
|
|
245
|
-
// Validate inputs
|
|
246
|
-
if (!environmentUrl || !accessToken) {
|
|
247
|
-
showStatus('Please enter both Environment URL and Access Token', 'error');
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
if (!environmentUrl.startsWith('https://')) {
|
|
252
|
-
showStatus('Environment URL must start with https://', 'error');
|
|
253
|
-
return;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
// Show the webview container
|
|
257
|
-
document.getElementById('webview-container').classList.remove('hidden');
|
|
258
|
-
webviewFrame = document.getElementById('webview-frame');
|
|
259
|
-
|
|
260
|
-
showStatus('Loading ERD Generator...', 'info');
|
|
261
|
-
|
|
262
|
-
// Wait for iframe to load, then send credentials
|
|
263
|
-
webviewFrame.onload = function() {
|
|
264
|
-
setTimeout(() => {
|
|
265
|
-
sendCredentials(environmentUrl, accessToken);
|
|
266
|
-
showStatus('ERD Generator loaded successfully! Credentials sent.', 'success');
|
|
267
|
-
}, 200);
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
// Reload iframe to ensure fresh start
|
|
271
|
-
webviewFrame.src = webviewFrame.src;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
function sendCredentials(environmentUrl, accessToken) {
|
|
275
|
-
if (webviewFrame && webviewFrame.contentWindow) {
|
|
276
|
-
const message = {
|
|
277
|
-
type: 'setCredentials',
|
|
278
|
-
environmentUrl: environmentUrl,
|
|
279
|
-
accessToken: accessToken
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
console.log('Sending credentials to webview:', { environmentUrl, tokenLength: accessToken.length });
|
|
283
|
-
webviewFrame.contentWindow.postMessage(message, '*');
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
function showStatus(message, type) {
|
|
288
|
-
const statusDiv = document.getElementById('status-message');
|
|
289
|
-
statusDiv.className = 'alert alert-' + type;
|
|
290
|
-
statusDiv.textContent = message;
|
|
291
|
-
statusDiv.classList.remove('hidden');
|
|
292
|
-
|
|
293
|
-
// Auto-hide success messages after 5 seconds
|
|
294
|
-
if (type === 'success') {
|
|
295
|
-
setTimeout(() => {
|
|
296
|
-
statusDiv.classList.add('hidden');
|
|
297
|
-
}, 5000);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
// Listen for messages from the webview
|
|
302
|
-
window.addEventListener('message', (event) => {
|
|
303
|
-
console.log('Received message from webview:', event.data);
|
|
304
|
-
|
|
305
|
-
if (event.data.type === 'saveFile') {
|
|
306
|
-
// Handle file save request
|
|
307
|
-
const blob = new Blob([event.data.content], { type: 'text/plain' });
|
|
308
|
-
const url = URL.createObjectURL(blob);
|
|
309
|
-
const a = document.createElement('a');
|
|
310
|
-
a.href = url;
|
|
311
|
-
a.download = event.data.filename;
|
|
312
|
-
a.click();
|
|
313
|
-
URL.revokeObjectURL(url);
|
|
314
|
-
showStatus('File downloaded: ' + event.data.filename, 'success');
|
|
315
|
-
} else if (event.data.type === 'copyToClipboard') {
|
|
316
|
-
// Handle clipboard request
|
|
317
|
-
navigator.clipboard.writeText(event.data.content).then(() => {
|
|
318
|
-
showStatus('ERD copied to clipboard!', 'success');
|
|
319
|
-
}).catch((err) => {
|
|
320
|
-
showStatus('Failed to copy to clipboard: ' + err.message, 'error');
|
|
321
|
-
});
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
</script>
|
|
325
|
-
</body>
|
|
326
|
-
</html>
|