@power-maverick/tool-erd-generator 0.0.7
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/CONVERSION_SUMMARY.md +288 -0
- package/README.md +463 -0
- package/REFACTORING_COMPLETE.md +352 -0
- package/TYPESCRIPT_NOTES.md +57 -0
- package/dist/src/components/ERDGenerator.d.ts +44 -0
- package/dist/src/components/ERDGenerator.d.ts.map +1 -0
- package/dist/src/components/ERDGenerator.js +232 -0
- package/dist/src/components/ERDGenerator.js.map +1 -0
- package/dist/src/dvdtIntegration/integration.d.ts +47 -0
- package/dist/src/dvdtIntegration/integration.d.ts.map +1 -0
- package/dist/src/dvdtIntegration/integration.js +223 -0
- package/dist/src/dvdtIntegration/integration.js.map +1 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +26 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/models/interfaces.d.ts +84 -0
- package/dist/src/models/interfaces.d.ts.map +1 -0
- package/dist/src/models/interfaces.js +3 -0
- package/dist/src/models/interfaces.js.map +1 -0
- package/dist/src/models/platformApi.d.ts +92 -0
- package/dist/src/models/platformApi.d.ts.map +1 -0
- package/dist/src/models/platformApi.js +213 -0
- package/dist/src/models/platformApi.js.map +1 -0
- package/dist/src/utils/Constants.d.ts +3 -0
- package/dist/src/utils/Constants.d.ts.map +1 -0
- package/dist/src/utils/Constants.js +6 -0
- package/dist/src/utils/Constants.js.map +1 -0
- package/dist/src/utils/DataverseClient.d.ts +53 -0
- package/dist/src/utils/DataverseClient.d.ts.map +1 -0
- package/dist/src/utils/DataverseClient.js +236 -0
- package/dist/src/utils/DataverseClient.js.map +1 -0
- package/dist/webview/index.css +1 -0
- package/dist/webview/index.html +13 -0
- package/dist/webview/index.js +49 -0
- package/index.html +12 -0
- package/package.json +50 -0
- package/tsconfig.json +20 -0
- package/tsconfig.webview.json +24 -0
- package/ui/test.html +326 -0
- package/webview/App.tsx +412 -0
- package/webview/index.html +12 -0
- package/webview/main.tsx +10 -0
- package/webview/styles.css +288 -0
- package/webview/tsconfig.json +35 -0
- package/webview/tsconfig.node.json +10 -0
- package/webview/vite.config.ts +17 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ERDGenerator.js","sourceRoot":"","sources":["../../../src/components/ERDGenerator.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAa,YAAY;IAGvB,YAAY,SAA6B,EAAE;QACzC,IAAI,CAAC,MAAM,GAAG;YACZ,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,SAAS;YAClC,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI;YAC3F,oBAAoB,EAAE,MAAM,CAAC,oBAAoB,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI;YACpG,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,IAAI,EAAE;SAC1D,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACI,QAAQ,CAAC,QAA2B;QACzC,QAAQ,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;YAC3B,KAAK,SAAS;gBACZ,OAAO,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;YACxC,KAAK,UAAU;gBACb,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACzC,KAAK,UAAU;gBACb,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;YACzC;gBACE,MAAM,IAAI,KAAK,CAAC,uBAAuB,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,QAA2B;QACjD,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,C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gBACE,OAAO,QAAQ,CAAC;QACpB,CAAC;IACH,CAAC;CACF;AA9PD,oCA8PC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as vscode from 'vscode';
|
|
2
|
+
/**
|
|
3
|
+
* ERD Tool WebView Panel for Dataverse DevTools Integration
|
|
4
|
+
*
|
|
5
|
+
* This class provides a minimal integration point for DVDT.
|
|
6
|
+
* The webview handles all Dataverse API calls directly using the bundled JavaScript.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ERDToolPanel {
|
|
9
|
+
private environmentUrl;
|
|
10
|
+
private accessToken;
|
|
11
|
+
static currentPanel: ERDToolPanel | undefined;
|
|
12
|
+
private static readonly viewType;
|
|
13
|
+
private readonly _panel;
|
|
14
|
+
private readonly _extensionUri;
|
|
15
|
+
private _disposables;
|
|
16
|
+
/**
|
|
17
|
+
* Create or show the ERD tool panel
|
|
18
|
+
*
|
|
19
|
+
* @param extensionUri - The extension URI from DVDT's context
|
|
20
|
+
* @param environmentUrl - Dataverse environment URL
|
|
21
|
+
* @param accessToken - Dataverse access token
|
|
22
|
+
*/
|
|
23
|
+
static createOrShow(extensionUri: vscode.Uri, environmentUrl: string, accessToken: string): void;
|
|
24
|
+
private constructor();
|
|
25
|
+
private setCredentials;
|
|
26
|
+
private handleSaveFile;
|
|
27
|
+
private _update;
|
|
28
|
+
private _getHtmlForWebview;
|
|
29
|
+
dispose(): void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Public function to show the ERD panel
|
|
33
|
+
* DVDT calls this function directly to open the ERD Generator.
|
|
34
|
+
*
|
|
35
|
+
* DVDT Integration Example:
|
|
36
|
+
*
|
|
37
|
+
* import { showERDPanel } from '@dvdt-tools/erd-generator';
|
|
38
|
+
*
|
|
39
|
+
* // In your DVDT code, call this when user wants to generate ERD
|
|
40
|
+
* showERDPanel(context.extensionUri, environmentUrl, accessToken);
|
|
41
|
+
*
|
|
42
|
+
* @param extensionUri - The extension URI from DVDT's context
|
|
43
|
+
* @param environmentUrl - Dataverse environment URL
|
|
44
|
+
* @param accessToken - Dataverse access token
|
|
45
|
+
*/
|
|
46
|
+
export declare function showERDPanel(extensionUri: vscode.Uri, environmentUrl: string, accessToken: string): void;
|
|
47
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/dvdtIntegration/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAGjC;;;;;GAKG;AACH,qBAAa,YAAY;IAqDjB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,WAAW;IArDvB,OAAc,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACrD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAElD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAa;IAC3C,OAAO,CAAC,YAAY,CAA2B;IAE/C;;;;;;OAMG;WACW,YAAY,CACtB,YAAY,EAAE,MAAM,CAAC,GAAG,EACxB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM;IAgCvB,OAAO;IAwCP,OAAO,CAAC,cAAc;YAWR,cAAc;IAiB5B,OAAO,CAAC,OAAO;IAKf,OAAO,CAAC,kBAAkB;IAqDnB,OAAO;CAYjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CACxB,YAAY,EAAE,MAAM,CAAC,GAAG,EACxB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,QAYtB"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.ERDToolPanel = void 0;
|
|
46
|
+
exports.showERDPanel = showERDPanel;
|
|
47
|
+
const vscode = __importStar(require("vscode"));
|
|
48
|
+
const Constants_1 = require("../utils/Constants");
|
|
49
|
+
/**
|
|
50
|
+
* ERD Tool WebView Panel for Dataverse DevTools Integration
|
|
51
|
+
*
|
|
52
|
+
* This class provides a minimal integration point for DVDT.
|
|
53
|
+
* The webview handles all Dataverse API calls directly using the bundled JavaScript.
|
|
54
|
+
*/
|
|
55
|
+
class ERDToolPanel {
|
|
56
|
+
/**
|
|
57
|
+
* Create or show the ERD tool panel
|
|
58
|
+
*
|
|
59
|
+
* @param extensionUri - The extension URI from DVDT's context
|
|
60
|
+
* @param environmentUrl - Dataverse environment URL
|
|
61
|
+
* @param accessToken - Dataverse access token
|
|
62
|
+
*/
|
|
63
|
+
static createOrShow(extensionUri, environmentUrl, accessToken) {
|
|
64
|
+
const column = vscode.window.activeTextEditor
|
|
65
|
+
? vscode.window.activeTextEditor.viewColumn
|
|
66
|
+
: undefined;
|
|
67
|
+
// If we already have a panel, show it
|
|
68
|
+
if (ERDToolPanel.currentPanel) {
|
|
69
|
+
ERDToolPanel.currentPanel._panel.reveal(column);
|
|
70
|
+
// Update credentials
|
|
71
|
+
ERDToolPanel.currentPanel.setCredentials(environmentUrl, accessToken);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
// Create new panel
|
|
75
|
+
const panel = vscode.window.createWebviewPanel(ERDToolPanel.viewType, 'ERD Generator', column || vscode.ViewColumn.One, {
|
|
76
|
+
enableScripts: true,
|
|
77
|
+
retainContextWhenHidden: true,
|
|
78
|
+
localResourceRoots: [
|
|
79
|
+
vscode.Uri.joinPath(extensionUri, ...Constants_1.pathWebview),
|
|
80
|
+
vscode.Uri.joinPath(extensionUri, ...Constants_1.pathUi)
|
|
81
|
+
]
|
|
82
|
+
});
|
|
83
|
+
ERDToolPanel.currentPanel = new ERDToolPanel(panel, extensionUri, environmentUrl, accessToken);
|
|
84
|
+
}
|
|
85
|
+
constructor(panel, extensionUri, environmentUrl, accessToken) {
|
|
86
|
+
this.environmentUrl = environmentUrl;
|
|
87
|
+
this.accessToken = accessToken;
|
|
88
|
+
this._disposables = [];
|
|
89
|
+
this._panel = panel;
|
|
90
|
+
this._extensionUri = extensionUri;
|
|
91
|
+
// Set the webview's initial html content
|
|
92
|
+
this._update();
|
|
93
|
+
// Listen for when the panel is disposed
|
|
94
|
+
this._panel.onDidDispose(() => this.dispose(), null, this._disposables);
|
|
95
|
+
// Handle messages from the webview (only for file operations and clipboard)
|
|
96
|
+
this._panel.webview.onDidReceiveMessage((message) => __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
switch (message.command) {
|
|
98
|
+
case 'saveFile':
|
|
99
|
+
yield this.handleSaveFile(message.content, message.fileName);
|
|
100
|
+
break;
|
|
101
|
+
case 'copyToClipboard':
|
|
102
|
+
yield vscode.env.clipboard.writeText(message.content);
|
|
103
|
+
vscode.window.showInformationMessage('ERD copied to clipboard');
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}), null, this._disposables);
|
|
107
|
+
// Send credentials to webview after it loads
|
|
108
|
+
// Small delay to ensure webview is ready
|
|
109
|
+
setTimeout(() => {
|
|
110
|
+
this.setCredentials(this.environmentUrl, this.accessToken);
|
|
111
|
+
}, 100);
|
|
112
|
+
}
|
|
113
|
+
setCredentials(environmentUrl, accessToken) {
|
|
114
|
+
this.environmentUrl = environmentUrl;
|
|
115
|
+
this.accessToken = accessToken;
|
|
116
|
+
this._panel.webview.postMessage({
|
|
117
|
+
command: 'setCredentials',
|
|
118
|
+
environmentUrl: environmentUrl,
|
|
119
|
+
accessToken: accessToken
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
handleSaveFile(content, fileName) {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
+
const uri = yield vscode.window.showSaveDialog({
|
|
125
|
+
defaultUri: vscode.Uri.file(fileName),
|
|
126
|
+
filters: {
|
|
127
|
+
'Mermaid': ['mmd'],
|
|
128
|
+
'PlantUML': ['puml'],
|
|
129
|
+
'Graphviz': ['dot'],
|
|
130
|
+
'All Files': ['*']
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
if (uri) {
|
|
134
|
+
yield vscode.workspace.fs.writeFile(uri, Buffer.from(content));
|
|
135
|
+
vscode.window.showInformationMessage(`ERD saved to ${uri.fsPath}`);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
_update() {
|
|
140
|
+
const webview = this._panel.webview;
|
|
141
|
+
this._panel.webview.html = this._getHtmlForWebview(webview);
|
|
142
|
+
}
|
|
143
|
+
_getHtmlForWebview(webview) {
|
|
144
|
+
// Get URIs for the bundled React files
|
|
145
|
+
const indexJsUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, ...Constants_1.pathWebview, 'index.js'));
|
|
146
|
+
const indexCssUri = webview.asWebviewUri(vscode.Uri.joinPath(this._extensionUri, ...Constants_1.pathWebview, 'index.css'));
|
|
147
|
+
// Load Mermaid from CDN for visualization
|
|
148
|
+
const mermaidScript = 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.min.js';
|
|
149
|
+
// Create HTML content
|
|
150
|
+
const html = `<!DOCTYPE html>
|
|
151
|
+
<html lang="en">
|
|
152
|
+
<head>
|
|
153
|
+
<meta charset="UTF-8">
|
|
154
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
155
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; connect-src https:; style-src ${webview.cspSource} 'unsafe-inline'; script-src ${webview.cspSource} https://cdn.jsdelivr.net 'unsafe-eval'; img-src https: data:;">
|
|
156
|
+
<title>Dataverse ERD Generator</title>
|
|
157
|
+
<link rel="stylesheet" href="${indexCssUri}">
|
|
158
|
+
<script src="${mermaidScript}"></script>
|
|
159
|
+
<script>
|
|
160
|
+
if (typeof mermaid !== 'undefined') {
|
|
161
|
+
mermaid.initialize({
|
|
162
|
+
startOnLoad: false,
|
|
163
|
+
theme: 'dark',
|
|
164
|
+
themeVariables: {
|
|
165
|
+
primaryColor: '#0e639c',
|
|
166
|
+
primaryTextColor: '#fff',
|
|
167
|
+
primaryBorderColor: '#007acc',
|
|
168
|
+
lineColor: '#007acc',
|
|
169
|
+
secondaryColor: '#3a3d41',
|
|
170
|
+
tertiaryColor: '#1e1e1e'
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
</script>
|
|
175
|
+
</head>
|
|
176
|
+
<body>
|
|
177
|
+
<div id="root"></div>
|
|
178
|
+
<script src="${indexJsUri}"></script>
|
|
179
|
+
</body>
|
|
180
|
+
</html>`;
|
|
181
|
+
return html;
|
|
182
|
+
}
|
|
183
|
+
dispose() {
|
|
184
|
+
ERDToolPanel.currentPanel = undefined;
|
|
185
|
+
this._panel.dispose();
|
|
186
|
+
while (this._disposables.length) {
|
|
187
|
+
const x = this._disposables.pop();
|
|
188
|
+
if (x) {
|
|
189
|
+
x.dispose();
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
exports.ERDToolPanel = ERDToolPanel;
|
|
195
|
+
ERDToolPanel.viewType = 'erdGenerator';
|
|
196
|
+
/**
|
|
197
|
+
* Public function to show the ERD panel
|
|
198
|
+
* DVDT calls this function directly to open the ERD Generator.
|
|
199
|
+
*
|
|
200
|
+
* DVDT Integration Example:
|
|
201
|
+
*
|
|
202
|
+
* import { showERDPanel } from '@dvdt-tools/erd-generator';
|
|
203
|
+
*
|
|
204
|
+
* // In your DVDT code, call this when user wants to generate ERD
|
|
205
|
+
* showERDPanel(context.extensionUri, environmentUrl, accessToken);
|
|
206
|
+
*
|
|
207
|
+
* @param extensionUri - The extension URI from DVDT's context
|
|
208
|
+
* @param environmentUrl - Dataverse environment URL
|
|
209
|
+
* @param accessToken - Dataverse access token
|
|
210
|
+
*/
|
|
211
|
+
function showERDPanel(extensionUri, environmentUrl, accessToken) {
|
|
212
|
+
if (!environmentUrl || !accessToken) {
|
|
213
|
+
vscode.window.showErrorMessage('Please connect to a Dataverse environment first');
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
try {
|
|
217
|
+
ERDToolPanel.createOrShow(extensionUri, environmentUrl, accessToken);
|
|
218
|
+
}
|
|
219
|
+
catch (error) {
|
|
220
|
+
vscode.window.showErrorMessage(`Failed to open ERD Generator: ${error.message}`);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../../../src/dvdtIntegration/integration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsNA,oCAeC;AArOD,+CAAiC;AACjC,kDAAyD;AAEzD;;;;;GAKG;AACH,MAAa,YAAY;IAQrB;;;;;;OAMG;IACI,MAAM,CAAC,YAAY,CACtB,YAAwB,EACxB,cAAsB,EACtB,WAAmB;QAEnB,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB;YACzC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,UAAU;YAC3C,CAAC,CAAC,SAAS,CAAC;QAEhB,sCAAsC;QACtC,IAAI,YAAY,CAAC,YAAY,EAAE,CAAC;YAC5B,YAAY,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAChD,qBAAqB;YACrB,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;YACtE,OAAO;QACX,CAAC;QAED,mBAAmB;QACnB,MAAM,KAAK,GAAG,MAA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AA3LL,oCA4LC;AA1L2B,qBAAQ,GAAG,cAAc,AAAjB,CAAkB;AA4LtD;;;;;;;;;;;;;;GAcG;AACH,SAAgB,YAAY,CACxB,YAAwB,EACxB,cAAsB,EACtB,WAAmB;IAEnB,IAAI,CAAC,cAAc,IAAI,CAAC,WAAW,EAAE,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,iDAAiD,CAAC,CAAC;QAClF,OAAO;IACX,CAAC;IAED,IAAI,CAAC;QACD,YAAY,CAAC,YAAY,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;IACzE,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAClB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,iCAAiC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ERDGenerator } from './components/ERDGenerator';
|
|
2
|
+
export * from './models/interfaces';
|
|
3
|
+
export { DataverseClient } from './utils/DataverseClient';
|
|
4
|
+
export type { DataverseConfig } from './utils/DataverseClient';
|
|
5
|
+
export { showERDPanel } from './dvdtIntegration/integration';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.showERDPanel = exports.DataverseClient = exports.ERDGenerator = void 0;
|
|
18
|
+
var ERDGenerator_1 = require("./components/ERDGenerator");
|
|
19
|
+
Object.defineProperty(exports, "ERDGenerator", { enumerable: true, get: function () { return ERDGenerator_1.ERDGenerator; } });
|
|
20
|
+
__exportStar(require("./models/interfaces"), exports);
|
|
21
|
+
var DataverseClient_1 = require("./utils/DataverseClient");
|
|
22
|
+
Object.defineProperty(exports, "DataverseClient", { enumerable: true, get: function () { return DataverseClient_1.DataverseClient; } });
|
|
23
|
+
// VS Code integration (optional import)
|
|
24
|
+
var integration_1 = require("./dvdtIntegration/integration");
|
|
25
|
+
Object.defineProperty(exports, "showERDPanel", { enumerable: true, get: function () { return integration_1.showERDPanel; } });
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0DAAyD;AAAhD,4GAAA,YAAY,OAAA;AACrB,sDAAoC;AACpC,2DAA0D;AAAjD,kHAAA,eAAe,OAAA;AAGxB,wCAAwC;AACxC,6DAA6D;AAApD,2GAAA,YAAY,OAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a Dataverse table (entity) in the solution
|
|
3
|
+
*/
|
|
4
|
+
export interface DataverseTable {
|
|
5
|
+
/** Logical name of the table */
|
|
6
|
+
logicalName: string;
|
|
7
|
+
/** Display name of the table */
|
|
8
|
+
displayName: string;
|
|
9
|
+
/** Schema name of the table */
|
|
10
|
+
schemaName: string;
|
|
11
|
+
/** Primary ID attribute name */
|
|
12
|
+
primaryIdAttribute: string;
|
|
13
|
+
/** Primary name attribute */
|
|
14
|
+
primaryNameAttribute: string;
|
|
15
|
+
/** Table type (Standard, Activity, Virtual, etc.) */
|
|
16
|
+
tableType: string;
|
|
17
|
+
/** Whether the table is an intersect table */
|
|
18
|
+
isIntersect: boolean;
|
|
19
|
+
/** Attributes (columns) in the table */
|
|
20
|
+
attributes: DataverseAttribute[];
|
|
21
|
+
/** Relationships from this table */
|
|
22
|
+
relationships: DataverseRelationship[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Represents an attribute (column) in a Dataverse table
|
|
26
|
+
*/
|
|
27
|
+
export interface DataverseAttribute {
|
|
28
|
+
/** Logical name of the attribute */
|
|
29
|
+
logicalName: string;
|
|
30
|
+
/** Display name of the attribute */
|
|
31
|
+
displayName: string;
|
|
32
|
+
/** Data type of the attribute */
|
|
33
|
+
type: string;
|
|
34
|
+
/** Whether this is a primary key */
|
|
35
|
+
isPrimaryId: boolean;
|
|
36
|
+
/** Whether this is the primary name field */
|
|
37
|
+
isPrimaryName: boolean;
|
|
38
|
+
/** Whether this field is required */
|
|
39
|
+
isRequired: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Represents a relationship between Dataverse tables
|
|
43
|
+
*/
|
|
44
|
+
export interface DataverseRelationship {
|
|
45
|
+
/** Schema name of the relationship */
|
|
46
|
+
schemaName: string;
|
|
47
|
+
/** Type of relationship (OneToMany, ManyToOne, ManyToMany) */
|
|
48
|
+
type: 'OneToMany' | 'ManyToOne' | 'ManyToMany';
|
|
49
|
+
/** Related table logical name */
|
|
50
|
+
relatedTable: string;
|
|
51
|
+
/** Lookup attribute name (for OneToMany/ManyToOne) */
|
|
52
|
+
lookupAttribute?: string;
|
|
53
|
+
/** Intersect table name (for ManyToMany) */
|
|
54
|
+
intersectTable?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Represents a Dataverse solution
|
|
58
|
+
*/
|
|
59
|
+
export interface DataverseSolution {
|
|
60
|
+
/** Unique name of the solution */
|
|
61
|
+
uniqueName: string;
|
|
62
|
+
/** Display name of the solution */
|
|
63
|
+
displayName: string;
|
|
64
|
+
/** Version of the solution */
|
|
65
|
+
version: string;
|
|
66
|
+
/** Publisher prefix */
|
|
67
|
+
publisherPrefix: string;
|
|
68
|
+
/** Tables included in the solution */
|
|
69
|
+
tables: DataverseTable[];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Configuration for ERD generation
|
|
73
|
+
*/
|
|
74
|
+
export interface ERDConfig {
|
|
75
|
+
/** Format of the output (mermaid, plantuml, graphviz) */
|
|
76
|
+
format: 'mermaid' | 'plantuml' | 'graphviz';
|
|
77
|
+
/** Whether to include attributes in the diagram */
|
|
78
|
+
includeAttributes: boolean;
|
|
79
|
+
/** Whether to include relationships */
|
|
80
|
+
includeRelationships: boolean;
|
|
81
|
+
/** Maximum number of attributes to show per table (0 = all) */
|
|
82
|
+
maxAttributesPerTable: number;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/models/interfaces.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,WAAW,EAAE,MAAM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AC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,yDAAyD;IACzD,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;IAC5C,mDAAmD;IACnD,iBAAiB,EAAE,OAAO,CAAC;IAC3B,uCAAuC;IACvC,oBAAoB,EAAE,OAAO,CAAC;IAC9B,+DAA+D;IAC/D,qBAAqB,EAAE,MAAM,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/models/interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-agnostic API interface
|
|
3
|
+
* Works with both PPTB (PowerPlatform ToolBox) and DVDT (Dataverse DevTools)
|
|
4
|
+
*/
|
|
5
|
+
export interface ToolContext {
|
|
6
|
+
toolId?: string | null;
|
|
7
|
+
connectionUrl?: string | null;
|
|
8
|
+
accessToken?: string | null;
|
|
9
|
+
}
|
|
10
|
+
export interface NotificationOptions {
|
|
11
|
+
title: string;
|
|
12
|
+
body: string;
|
|
13
|
+
type: 'info' | 'success' | 'warning' | 'error';
|
|
14
|
+
duration?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Unified platform API interface
|
|
18
|
+
* Abstracts PPTB and DVDT differences
|
|
19
|
+
*/
|
|
20
|
+
export interface IPlatformAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Get current tool context (connection URL and access token)
|
|
23
|
+
*/
|
|
24
|
+
getToolContext(): Promise<ToolContext>;
|
|
25
|
+
/**
|
|
26
|
+
* Show notification to user
|
|
27
|
+
*/
|
|
28
|
+
showNotification(options: NotificationOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Copy text to clipboard
|
|
31
|
+
*/
|
|
32
|
+
copyToClipboard(text: string): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Save content to file
|
|
35
|
+
*/
|
|
36
|
+
saveFile(defaultPath: string, content: string): Promise<string | null>;
|
|
37
|
+
/**
|
|
38
|
+
* Subscribe to platform events
|
|
39
|
+
*/
|
|
40
|
+
onPlatformEvent?(callback: (event: string, data: any) => void): void;
|
|
41
|
+
/**
|
|
42
|
+
* Get platform name for debugging
|
|
43
|
+
*/
|
|
44
|
+
getPlatformName(): string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* PPTB Platform Implementation
|
|
48
|
+
* Uses window.toolboxAPI provided by PowerPlatform ToolBox
|
|
49
|
+
*/
|
|
50
|
+
export declare class PPTBPlatformAPI implements IPlatformAPI {
|
|
51
|
+
private api;
|
|
52
|
+
constructor();
|
|
53
|
+
getToolContext(): Promise<ToolContext>;
|
|
54
|
+
showNotification(options: NotificationOptions): Promise<void>;
|
|
55
|
+
copyToClipboard(text: string): Promise<void>;
|
|
56
|
+
saveFile(defaultPath: string, content: string): Promise<string | null>;
|
|
57
|
+
onPlatformEvent(callback: (event: string, data: any) => void): void;
|
|
58
|
+
getPlatformName(): string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* DVDT Platform Implementation
|
|
62
|
+
* Uses VS Code WebView message passing and direct context injection
|
|
63
|
+
*/
|
|
64
|
+
export declare class DVDTPlatformAPI implements IPlatformAPI {
|
|
65
|
+
private context;
|
|
66
|
+
private vscode;
|
|
67
|
+
constructor(context: ToolContext);
|
|
68
|
+
getToolContext(): Promise<ToolContext>;
|
|
69
|
+
showNotification(options: NotificationOptions): Promise<void>;
|
|
70
|
+
copyToClipboard(text: string): Promise<void>;
|
|
71
|
+
saveFile(defaultPath: string, content: string): Promise<string | null>;
|
|
72
|
+
onPlatformEvent(callback: (event: string, data: any) => void): void;
|
|
73
|
+
getPlatformName(): string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Platform Detection and Factory
|
|
77
|
+
*/
|
|
78
|
+
export declare class PlatformAPIFactory {
|
|
79
|
+
/**
|
|
80
|
+
* Detect which platform we're running on and return appropriate API
|
|
81
|
+
*/
|
|
82
|
+
static create(dvdtContext?: ToolContext): IPlatformAPI;
|
|
83
|
+
/**
|
|
84
|
+
* Check if running in PPTB
|
|
85
|
+
*/
|
|
86
|
+
static isPPTB(): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Check if running in DVDT
|
|
89
|
+
*/
|
|
90
|
+
static isDVDT(): boolean;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=platformApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platformApi.d.ts","sourceRoot":"","sources":["../../../src/models/platformApi.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,MAAM,WAAW,WAAW;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;IAEvC;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAEvE;;OAEG;IACH,eAAe,CAAC,CAAC,QAAQ,EA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