@mcp-consultant-tools/powerplatform 32.0.0 → 33.0.0

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.
Files changed (110) hide show
  1. package/build/cli/commands/metadata-commands.js +2 -2
  2. package/build/cli/commands/metadata-commands.js.map +1 -1
  3. package/build/cli.js +0 -0
  4. package/build/http-server.js +0 -0
  5. package/build/index.js +0 -0
  6. package/package.json +3 -3
  7. package/build/PowerPlatformService.d.ts +0 -201
  8. package/build/PowerPlatformService.js +0 -305
  9. package/build/PowerPlatformService.js.map +0 -1
  10. package/build/auth/index.d.ts +0 -64
  11. package/build/auth/index.d.ts.map +0 -1
  12. package/build/auth/index.js +0 -39
  13. package/build/auth/index.js.map +0 -1
  14. package/build/auth/interactive-auth.d.ts +0 -60
  15. package/build/auth/interactive-auth.d.ts.map +0 -1
  16. package/build/auth/interactive-auth.js +0 -429
  17. package/build/auth/interactive-auth.js.map +0 -1
  18. package/build/auth/service-principal-auth.d.ts +0 -26
  19. package/build/auth/service-principal-auth.d.ts.map +0 -1
  20. package/build/auth/service-principal-auth.js +0 -60
  21. package/build/auth/service-principal-auth.js.map +0 -1
  22. package/build/auth/token-cache.d.ts +0 -40
  23. package/build/auth/token-cache.d.ts.map +0 -1
  24. package/build/auth/token-cache.js +0 -108
  25. package/build/auth/token-cache.js.map +0 -1
  26. package/build/cli/commands/app-commands.d.ts +0 -7
  27. package/build/cli/commands/field-security-commands.d.ts +0 -8
  28. package/build/cli/commands/flow-commands.d.ts +0 -7
  29. package/build/cli/commands/form-commands.d.ts +0 -7
  30. package/build/cli/commands/index.d.ts +0 -16
  31. package/build/cli/commands/index.js +0 -33
  32. package/build/cli/commands/index.js.map +0 -1
  33. package/build/cli/commands/integration-commands.d.ts +0 -7
  34. package/build/cli/commands/metadata-commands.d.ts +0 -7
  35. package/build/cli/commands/plugin-commands.d.ts +0 -7
  36. package/build/cli/commands/security-commands.d.ts +0 -7
  37. package/build/cli/commands/solution-commands.d.ts +0 -7
  38. package/build/cli/output.d.ts +0 -11
  39. package/build/cli.d.ts +0 -9
  40. package/build/context-factory.d.ts +0 -11
  41. package/build/context-factory.js +0 -39
  42. package/build/context-factory.js.map +0 -1
  43. package/build/http-server.d.ts +0 -3
  44. package/build/index.d.ts +0 -18
  45. package/build/prompts/analysis-prompts.d.ts +0 -3
  46. package/build/prompts/analysis-prompts.js +0 -286
  47. package/build/prompts/analysis-prompts.js.map +0 -1
  48. package/build/prompts/entity-prompts.d.ts +0 -3
  49. package/build/prompts/entity-prompts.js +0 -304
  50. package/build/prompts/entity-prompts.js.map +0 -1
  51. package/build/prompts/index.d.ts +0 -8
  52. package/build/prompts/index.js +0 -11
  53. package/build/prompts/index.js.map +0 -1
  54. package/build/services/index.d.ts +0 -5
  55. package/build/services/index.js +0 -5
  56. package/build/services/index.js.map +0 -1
  57. package/build/tool-examples.d.ts +0 -48
  58. package/build/tools/app-tools.d.ts +0 -3
  59. package/build/tools/app-tools.js +0 -127
  60. package/build/tools/app-tools.js.map +0 -1
  61. package/build/tools/field-security-tools.d.ts +0 -3
  62. package/build/tools/field-security-tools.js +0 -84
  63. package/build/tools/field-security-tools.js.map +0 -1
  64. package/build/tools/flow-tools.d.ts +0 -3
  65. package/build/tools/flow-tools.js +0 -374
  66. package/build/tools/flow-tools.js.map +0 -1
  67. package/build/tools/form-view-tools.d.ts +0 -3
  68. package/build/tools/form-view-tools.js +0 -162
  69. package/build/tools/form-view-tools.js.map +0 -1
  70. package/build/tools/index.d.ts +0 -14
  71. package/build/tools/index.js +0 -31
  72. package/build/tools/index.js.map +0 -1
  73. package/build/tools/integration-tools.d.ts +0 -3
  74. package/build/tools/integration-tools.js +0 -325
  75. package/build/tools/integration-tools.js.map +0 -1
  76. package/build/tools/metadata-tools.d.ts +0 -3
  77. package/build/tools/metadata-tools.js +0 -166
  78. package/build/tools/metadata-tools.js.map +0 -1
  79. package/build/tools/plugin-tools.d.ts +0 -3
  80. package/build/tools/plugin-tools.js +0 -138
  81. package/build/tools/plugin-tools.js.map +0 -1
  82. package/build/tools/security-tools.d.ts +0 -3
  83. package/build/tools/security-tools.js +0 -188
  84. package/build/tools/security-tools.js.map +0 -1
  85. package/build/tools/solution-tools.d.ts +0 -3
  86. package/build/tools/solution-tools.js +0 -318
  87. package/build/tools/solution-tools.js.map +0 -1
  88. package/build/types.d.ts +0 -9
  89. package/build/types.js +0 -2
  90. package/build/types.js.map +0 -1
  91. package/build/utils/best-practices-formatters.d.ts +0 -26
  92. package/build/utils/best-practices-formatters.d.ts.map +0 -1
  93. package/build/utils/best-practices-formatters.js +0 -238
  94. package/build/utils/best-practices-formatters.js.map +0 -1
  95. package/build/utils/bestPractices.d.ts +0 -152
  96. package/build/utils/bestPractices.d.ts.map +0 -1
  97. package/build/utils/bestPractices.js +0 -338
  98. package/build/utils/bestPractices.js.map +0 -1
  99. package/build/utils/iconManager.d.ts +0 -84
  100. package/build/utils/iconManager.d.ts.map +0 -1
  101. package/build/utils/iconManager.js +0 -342
  102. package/build/utils/iconManager.js.map +0 -1
  103. package/build/utils/prompt-templates.d.ts +0 -9
  104. package/build/utils/prompt-templates.d.ts.map +0 -1
  105. package/build/utils/prompt-templates.js +0 -31
  106. package/build/utils/prompt-templates.js.map +0 -1
  107. package/build/utils/rate-limiter.d.ts +0 -108
  108. package/build/utils/rate-limiter.d.ts.map +0 -1
  109. package/build/utils/rate-limiter.js +0 -241
  110. package/build/utils/rate-limiter.js.map +0 -1
@@ -1,318 +0,0 @@
1
- /**
2
- * Solution Tools - 8 tools for solution management and validation
3
- */
4
- import { z } from 'zod';
5
- import { descWithExamples, SOLUTION_NAME_EXAMPLES, ENTITY_NAME_EXAMPLES, COMPONENT_TYPE_EXAMPLES } from '../tool-examples.js';
6
- export function registerSolutionTools(server, ctx) {
7
- server.tool("get-publishers", "Get all solution publishers (excluding system publishers)", {}, async () => {
8
- try {
9
- const service = ctx.pp;
10
- const result = await service.getPublishers();
11
- const publishers = result.value || [];
12
- return {
13
- content: [
14
- {
15
- type: "text",
16
- text: `Found ${publishers.length} publisher(s):\n\n` +
17
- publishers.map((p) => `- ${p.friendlyname} (${p.uniquename})\n Prefix: ${p.customizationprefix}\n ID: ${p.publisherid}`).join('\n')
18
- }
19
- ]
20
- };
21
- }
22
- catch (error) {
23
- console.error("Error getting publishers:", error);
24
- return {
25
- content: [{ type: "text", text: `Failed to get publishers: ${error.message}` }],
26
- isError: true
27
- };
28
- }
29
- });
30
- server.tool("get-solutions", "Get all visible solutions in the environment", {}, async () => {
31
- try {
32
- const service = ctx.pp;
33
- const result = await service.getSolutions();
34
- const solutions = result.value || [];
35
- return {
36
- content: [
37
- {
38
- type: "text",
39
- text: `Found ${solutions.length} solution(s):\n\n` +
40
- solutions.map((s) => `- ${s.friendlyname} (${s.uniquename})\n Version: ${s.version}\n ID: ${s.solutionid}`).join('\n')
41
- }
42
- ]
43
- };
44
- }
45
- catch (error) {
46
- console.error("Error getting solutions:", error);
47
- return {
48
- content: [{ type: "text", text: `Failed to get solutions: ${error.message}` }],
49
- isError: true
50
- };
51
- }
52
- });
53
- server.tool("get-solution-components", "List all components in a solution, grouped by component type. Returns component IDs, types, and behavior settings.", {
54
- solutionUniqueName: z.string().describe(descWithExamples("The unique name of the solution to list components for", SOLUTION_NAME_EXAMPLES)),
55
- }, async ({ solutionUniqueName }) => {
56
- try {
57
- const service = ctx.pp;
58
- const result = await service.getSolutionComponents(solutionUniqueName);
59
- const components = result.value || [];
60
- const componentTypeNames = {
61
- 1: 'Entity', 2: 'Attribute', 3: 'Relationship', 9: 'OptionSet',
62
- 10: 'EntityRelationship', 13: 'ManagedProperty', 20: 'Policy',
63
- 24: 'Privilege', 25: 'PrivilegeObjectTypeCode', 26: 'Role',
64
- 29: 'Workflow', 31: 'Report', 36: 'Template', 37: 'Contract Template',
65
- 38: 'Article Template', 39: 'Mail Merge Template', 44: 'Duplicate Rule',
66
- 46: 'Duplicate Rule Condition', 48: 'Entity Map', 49: 'Attribute Map',
67
- 59: 'SavedQuery', 60: 'Form', 61: 'WebResource', 62: 'SiteMap',
68
- 63: 'Connection Role', 65: 'Hierarchy Rule', 66: 'Custom Control',
69
- 70: 'FieldSecurityProfile', 71: 'FieldPermission', 80: 'AppModule',
70
- 91: 'PluginAssembly', 92: 'PluginType', 93: 'SDKMessageProcessingStep',
71
- 95: 'ServiceEndpoint', 150: 'RoutingRule', 152: 'SLA',
72
- 154: 'ConvertRule', 300: 'Canvas App', 371: 'Connector',
73
- 372: 'EnvironmentVariableDefinition', 373: 'EnvironmentVariableValue',
74
- 380: 'AIModel', 381: 'AIConfiguration',
75
- };
76
- const grouped = {};
77
- for (const c of components) {
78
- const type = c.componenttype;
79
- if (!grouped[type])
80
- grouped[type] = [];
81
- grouped[type].push(c);
82
- }
83
- const lines = [`Found ${components.length} component(s) in solution '${solutionUniqueName}':\n`];
84
- for (const [type, items] of Object.entries(grouped)) {
85
- const typeName = componentTypeNames[Number(type)] || `Type ${type}`;
86
- lines.push(`\n${typeName} (${items.length}):`);
87
- for (const item of items) {
88
- lines.push(` - ${item.objectid} (behavior: ${item.rootcomponentbehavior ?? 'include subcomponents'})`);
89
- }
90
- }
91
- return {
92
- content: [{ type: "text", text: lines.join('\n') }]
93
- };
94
- }
95
- catch (error) {
96
- console.error("Error getting solution components:", error);
97
- return {
98
- content: [{ type: "text", text: `Failed to get solution components: ${error.message}` }],
99
- isError: true
100
- };
101
- }
102
- });
103
- server.tool("check-dependencies", "Check dependencies before deleting a component", {
104
- componentId: z.string().describe("Component ID (GUID or MetadataId)"),
105
- componentType: z.number().describe(descWithExamples("Component type code", COMPONENT_TYPE_EXAMPLES))
106
- }, async ({ componentId, componentType }) => {
107
- try {
108
- const service = ctx.pp;
109
- const result = await service.checkDependencies(componentId, componentType);
110
- // Web API returns { value: [...] }; Organization Service returns { EntityCollection: { Entities: [...] } }
111
- const dependencies = result.value || result.EntityCollection?.Entities || [];
112
- const componentTypeNames = {
113
- 1: 'Entity', 2: 'Attribute', 3: 'Relationship', 9: 'OptionSet',
114
- 20: 'Policy', 26: 'Role', 29: 'Workflow', 59: 'SavedQuery',
115
- 60: 'Form', 61: 'WebResource', 62: 'SiteMap', 66: 'CustomControl',
116
- 80: 'AppModule', 91: 'PluginAssembly', 92: 'PluginType',
117
- 93: 'SDKMessageProcessingStep', 300: 'Canvas App',
118
- 372: 'EnvironmentVariableDefinition',
119
- };
120
- return {
121
- content: [
122
- {
123
- type: "text",
124
- text: `Found ${dependencies.length} dependenc${dependencies.length === 1 ? 'y' : 'ies'} for component '${componentId}':\n\n` +
125
- (dependencies.length > 0
126
- ? dependencies.map((d) => {
127
- // Web API uses lowercase property names directly
128
- const depId = d.dependentcomponentobjectid || d.Attributes?.dependentcomponentobjectid || 'Unknown';
129
- const depType = d.dependentcomponenttype || d.Attributes?.dependentcomponenttype;
130
- const depTypeName = depType != null ? (componentTypeNames[depType] || `Type ${depType}`) : 'Unknown';
131
- const reqId = d.requiredcomponentobjectid || d.Attributes?.requiredcomponentobjectid || '';
132
- return `- Dependent: ${depId} (${depTypeName})` +
133
- (reqId ? `\n Required: ${reqId}` : '');
134
- }).join('\n')
135
- : 'No dependencies found - component can be safely deleted')
136
- }
137
- ]
138
- };
139
- }
140
- catch (error) {
141
- console.error("Error checking dependencies:", error);
142
- return {
143
- content: [{ type: "text", text: `Failed to check dependencies: ${error.message}` }],
144
- isError: true
145
- };
146
- }
147
- });
148
- server.tool("validate-schema-name", "Validate a schema name against PowerPlatform naming rules", {
149
- schemaName: z.string().describe("Schema name to validate"),
150
- prefix: z.string().describe("Required customization prefix")
151
- }, async ({ schemaName, prefix }) => {
152
- try {
153
- const service = ctx.pp;
154
- const result = service.validateSchemaName(schemaName, prefix);
155
- return {
156
- content: [
157
- {
158
- type: "text",
159
- text: `Schema Name Validation for '${schemaName}':\n\n` +
160
- `Valid: ${result.valid ? '✅' : '❌'}\n\n` +
161
- (result.errors.length > 0
162
- ? `Errors:\n${result.errors.map(e => `- ${e}`).join('\n')}`
163
- : 'No validation errors')
164
- }
165
- ]
166
- };
167
- }
168
- catch (error) {
169
- console.error("Error validating schema name:", error);
170
- return {
171
- content: [{ type: "text", text: `Failed to validate schema name: ${error.message}` }],
172
- isError: true
173
- };
174
- }
175
- });
176
- server.tool("check-delete-eligibility", "Check if a component can be safely deleted by verifying it has no blocking dependencies.", {
177
- componentId: z.string().describe("Component ID (GUID or MetadataId)"),
178
- componentType: z.number().describe(descWithExamples("Component type code", COMPONENT_TYPE_EXAMPLES))
179
- }, async ({ componentId, componentType }) => {
180
- try {
181
- const service = ctx.pp;
182
- const result = await service.checkDeleteEligibility(componentId, componentType);
183
- if (result.error) {
184
- return {
185
- content: [{
186
- type: "text",
187
- text: `Delete Eligibility for component '${componentId}':\n\n` +
188
- `Can Delete: ❌ No (dependency check failed)\n` +
189
- `Error: ${result.error}\n\n` +
190
- `The dependency check could not be completed. ` +
191
- `Try using check-dependencies directly for more details.`
192
- }],
193
- isError: true
194
- };
195
- }
196
- return {
197
- content: [
198
- {
199
- type: "text",
200
- text: `Delete Eligibility for component '${componentId}':\n\n` +
201
- `Can Delete: ${result.canDelete ? '✅ Yes' : '❌ No'}\n` +
202
- `Dependencies: ${result.dependencies.length}\n\n` +
203
- (result.dependencies.length > 0
204
- ? `Blocking Dependencies:\n${result.dependencies.map((d) => {
205
- const depId = d.dependentcomponentobjectid || d.Attributes?.dependentcomponentobjectid || 'Unknown';
206
- const depType = d.dependentcomponenttype || d.Attributes?.dependentcomponenttype || 'Unknown';
207
- return `- ${depId} (type: ${depType})`;
208
- }).join('\n')}`
209
- : 'No blocking dependencies - component can be safely deleted')
210
- }
211
- ]
212
- };
213
- }
214
- catch (error) {
215
- console.error("Error checking delete eligibility:", error);
216
- return {
217
- content: [{ type: "text", text: `Failed to check delete eligibility: ${error.message}` }],
218
- isError: true
219
- };
220
- }
221
- });
222
- server.tool("validate-dataverse", "Validate Dataverse entities against internal best practices for column naming, prefixes, configuration, and entity icons. Checks schema name casing, lookup naming conventions, option set scope (all must be global), required columns, publisher prefix compliance, and entity icon assignment. Supports solution-based validation or explicit entity list with configurable time range filtering.", {
223
- solutionUniqueName: z.string().optional().describe(descWithExamples("Solution unique name to validate. Mutually exclusive with entityLogicalNames", SOLUTION_NAME_EXAMPLES)),
224
- entityLogicalNames: z.array(z.string()).optional().describe(descWithExamples("Explicit list of entity logical names to validate. Mutually exclusive with solutionUniqueName", ENTITY_NAME_EXAMPLES)),
225
- publisherPrefix: z.string().describe("Publisher prefix to validate against (e.g., 'sic_'). Required."),
226
- recentDays: z.number().optional().describe("Only validate columns created in the last N days. Set to 0 to validate all columns regardless of age. Default: 30."),
227
- includeRefDataTables: z.boolean().optional().describe("Include RefData tables (schema starts with prefix + 'ref_') in validation. Default: true."),
228
- rules: z.array(z.string()).optional().describe("Specific rules to validate: 'prefix', 'lowercase', 'lookup', 'optionset', 'required-column', 'entity-icon'. Default: all rules."),
229
- maxEntities: z.number().optional().describe("Maximum number of entities to validate (safety limit). Default: 0 (unlimited)."),
230
- requiredColumns: z.array(z.string()).optional().describe("List of required column schema names to check for (without prefix). Use '{prefix}' placeholder which will be replaced with publisherPrefix at runtime. Default: ['{prefix}updatedbyprocess']. Example: ['{prefix}sqlcreatedon', '{prefix}sqlmodifiedon'] for SQL timestamp columns.")
231
- }, async ({ solutionUniqueName, entityLogicalNames, publisherPrefix, recentDays, includeRefDataTables, rules, maxEntities, requiredColumns }) => {
232
- try {
233
- if (!solutionUniqueName && !entityLogicalNames) {
234
- return {
235
- content: [{ type: "text", text: "Error: Either solutionUniqueName or entityLogicalNames must be provided" }],
236
- isError: true
237
- };
238
- }
239
- if (solutionUniqueName && entityLogicalNames) {
240
- return {
241
- content: [{ type: "text", text: "Error: solutionUniqueName and entityLogicalNames are mutually exclusive" }],
242
- isError: true
243
- };
244
- }
245
- const service = ctx.pp;
246
- const result = await service.validateBestPractices(solutionUniqueName, entityLogicalNames, publisherPrefix, recentDays ?? 30, includeRefDataTables ?? true, rules ?? ['prefix', 'lowercase', 'lookup', 'optionset', 'required-column', 'entity-icon'], maxEntities ?? 0, requiredColumns ?? ['{prefix}updatedbyprocess']);
247
- return {
248
- content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
249
- };
250
- }
251
- catch (error) {
252
- console.error("Error validating best practices:", error);
253
- return {
254
- content: [{ type: "text", text: `Failed to validate best practices: ${error.message}` }],
255
- isError: true
256
- };
257
- }
258
- });
259
- server.tool("generate-dbml-schema", `Generates DBML (Database Markup Language) schema from Dataverse entities.
260
-
261
- Accepts solution names, explicit entity lists, or both. Returns DBML text
262
- and a clickable dbdiagram.io URL for visualization.
263
-
264
- DBML output includes:
265
- - Table definitions with columns and types
266
- - Primary key markers [pk]
267
- - Foreign key relationships (Ref: statements) for all lookups
268
-
269
- Example output:
270
- \`\`\`dbml
271
- Table si_directdebit {
272
- si_directdebitid uniqueidentifier [pk]
273
- si_name nvarchar
274
- si_accountid lookup
275
- }
276
- Ref: si_directdebit.si_accountid > account.accountid
277
- \`\`\``, {
278
- solutions: z.array(z.string()).optional()
279
- .describe('One or more solution unique names to extract entities from'),
280
- entities: z.array(z.string()).optional()
281
- .describe('Explicit list of entity logical names to include'),
282
- includeSystemColumns: z.boolean().optional()
283
- .describe('Include system columns like createdon, modifiedon (default: false)'),
284
- includeStateStatus: z.boolean().optional()
285
- .describe('Include statecode/statuscode columns (default: false)'),
286
- prefix: z.string().optional()
287
- .describe('Only include columns matching this prefix (e.g., "si_")'),
288
- depth: z.number().optional()
289
- .describe('Relationship traversal depth for discovering related entities (default: 0)'),
290
- includePolymorphicLookups: z.boolean().optional()
291
- .describe('Include Customer/Owner/PartyList lookups (default: true)'),
292
- }, async (params) => {
293
- try {
294
- const service = ctx.pp;
295
- const result = await service.generateDbmlSchema(params);
296
- return {
297
- content: [
298
- {
299
- type: "text",
300
- text: JSON.stringify(result, null, 2),
301
- },
302
- ],
303
- };
304
- }
305
- catch (error) {
306
- console.error("Error generating DBML schema:", error);
307
- return {
308
- content: [
309
- {
310
- type: "text",
311
- text: `Failed to generate DBML schema: ${error.message}`,
312
- },
313
- ],
314
- };
315
- }
316
- });
317
- }
318
- //# sourceMappingURL=solution-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"solution-tools.js","sourceRoot":"","sources":["../../src/tools/solution-tools.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAE9H,MAAM,UAAU,qBAAqB,CAAC,MAAW,EAAE,GAAmB;IACpE,MAAM,CAAC,IAAI,CACT,gBAAgB,EAChB,2DAA2D,EAC3D,EAAE,EACF,KAAK,IAAI,EAAE;QACT,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,aAAa,EAAS,CAAC;YAEpD,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC;YAEtC,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,SAAS,UAAU,CAAC,MAAM,oBAAoB;4BAC9C,UAAU,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CACxB,KAAK,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,UAAU,gBAAgB,CAAC,CAAC,mBAAmB,WAAW,CAAC,CAAC,WAAW,EAAE,CACpG,CAAC,IAAI,CAAC,IAAI,CAAC;qBACnB;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;YAClD,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,KAAK,CAAC,OAAO,EAAE,EAAE,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AC;QACzF,yBAAyB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;aAC9C,QAAQ,CAAC,0DAA0D,CAAC;KACxE,EACD,KAAK,EAAE,MAAW,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;YACxD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;qBACtC;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;YACtD,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,mCAAmC,KAAK,CAAC,OAAO,EAAE;qBACzD;iBACF;aACF,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
package/build/types.d.ts DELETED
@@ -1,9 +0,0 @@
1
- /**
2
- * Service context shared between MCP server and tool/prompt registrations.
3
- * Uses a lazy getter to initialize the PowerPlatformService on-demand.
4
- */
5
- import type { PowerPlatformService } from './PowerPlatformService.js';
6
- export interface ServiceContext {
7
- readonly pp: PowerPlatformService;
8
- }
9
- //# sourceMappingURL=types.d.ts.map
package/build/types.js DELETED
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1,26 +0,0 @@
1
- /**
2
- * Formatting utilities for best practices validation reports
3
- * Transforms validation results into human-readable markdown reports
4
- */
5
- import type { BestPracticesValidationResult, EntityValidationResult, Violation } from '../PowerPlatformService.js';
6
- /**
7
- * Format complete best practices validation report as markdown
8
- */
9
- export declare function formatBestPracticesReport(result: BestPracticesValidationResult): string;
10
- /**
11
- * Format violations grouped by severity
12
- */
13
- export declare function formatViolationsBySeverity(violations: Violation[]): string;
14
- /**
15
- * Format compliant entities list
16
- */
17
- export declare function formatCompliantEntities(entities: EntityValidationResult[]): string;
18
- /**
19
- * Format execution statistics
20
- */
21
- export declare function formatExecutionStats(result: BestPracticesValidationResult): string;
22
- /**
23
- * Generate quick summary for CLI output
24
- */
25
- export declare function formatQuickSummary(result: BestPracticesValidationResult): string;
26
- //# sourceMappingURL=best-practices-formatters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"best-practices-formatters.d.ts","sourceRoot":"","sources":["../../src/utils/best-practices-formatters.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,6BAA6B,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEnH;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,6BAA6B,GAAG,MAAM,CA4KvF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,MAAM,CA4B1E;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,sBAAsB,EAAE,GAAG,MAAM,CAsBlF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,6BAA6B,GAAG,MAAM,CA0BlF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,6BAA6B,GAAG,MAAM,CAShF"}
@@ -1,238 +0,0 @@
1
- /**
2
- * Formatting utilities for best practices validation reports
3
- * Transforms validation results into human-readable markdown reports
4
- */
5
- /**
6
- * Format complete best practices validation report as markdown
7
- */
8
- export function formatBestPracticesReport(result) {
9
- const sections = [];
10
- // Header
11
- sections.push('# Dataverse Best Practice Validation Report\n');
12
- if (result.metadata.solutionName) {
13
- sections.push(`**Solution**: ${result.metadata.solutionName} (\`${result.metadata.solutionUniqueName}\`)`);
14
- }
15
- else {
16
- sections.push(`**Entities**: Custom entity validation`);
17
- }
18
- sections.push(`**Generated**: ${new Date(result.metadata.generatedAt).toLocaleString()}`);
19
- sections.push(`**Publisher Prefix**: \`${result.metadata.publisherPrefix}\``);
20
- sections.push(`**Time Filter**: Columns created in last ${result.metadata.recentDays} days`);
21
- sections.push('');
22
- sections.push('---\n');
23
- // Summary
24
- sections.push('## Summary\n');
25
- sections.push('| Metric | Count |');
26
- sections.push('|--------|-------|');
27
- sections.push(`| Entities Checked | ${result.summary.entitiesChecked} |`);
28
- sections.push(`| Attributes Checked | ${result.summary.attributesChecked} |`);
29
- sections.push(`| **Total Violations** | **${result.summary.totalViolations}** |`);
30
- sections.push(`| Critical (MUST) | ${result.summary.criticalViolations} |`);
31
- sections.push(`| Warnings (SHOULD) | ${result.summary.warnings} |`);
32
- sections.push(`| Compliant Entities | ${result.summary.compliantEntities} |`);
33
- sections.push('');
34
- if (result.summary.totalViolations > 0) {
35
- sections.push('**Overall Status**: ⚠️ Issues Found\n');
36
- }
37
- else {
38
- sections.push('**Overall Status**: ✅ All Compliant\n');
39
- }
40
- sections.push('---\n');
41
- // Violations Summary - Complete Lists of Affected Items
42
- if (result.summary.totalViolations > 0) {
43
- sections.push('## 📋 Violations Summary (Complete Lists)\n');
44
- sections.push('_This section provides complete lists of ALL affected tables and columns grouped by violation type._\n');
45
- // Use pre-computed violations summary from the result
46
- for (const ruleSummary of result.violationsSummary) {
47
- const severityIcon = ruleSummary.severity === 'MUST' ? '🔴' : '⚠️';
48
- sections.push(`### ${severityIcon} ${ruleSummary.rule} (${ruleSummary.severity})\n`);
49
- sections.push(`**Affected Items**: ${ruleSummary.totalCount}\n`);
50
- // Show affected tables (entity-level violations)
51
- if (ruleSummary.affectedEntities.length > 0) {
52
- sections.push(`**Affected Tables**:`);
53
- const tableList = ruleSummary.affectedEntities.map(e => `\`${e}\``).join(', ');
54
- sections.push(tableList);
55
- sections.push('');
56
- }
57
- // Show affected columns (column-level violations)
58
- if (ruleSummary.affectedColumns.length > 0) {
59
- sections.push(`**Affected Columns**:`);
60
- const columnList = ruleSummary.affectedColumns.map(c => `\`${c}\``).join(', ');
61
- sections.push(columnList);
62
- sections.push('');
63
- }
64
- // Add recommended action and recommendation
65
- sections.push(`**Recommended Action**: ${ruleSummary.action}`);
66
- if (ruleSummary.recommendation) {
67
- sections.push(`**Why**: ${ruleSummary.recommendation}`);
68
- }
69
- sections.push('');
70
- }
71
- sections.push('---\n');
72
- }
73
- // Critical Violations (MUST Fix)
74
- if (result.summary.criticalViolations > 0) {
75
- sections.push('## 🔴 Critical Violations (MUST Fix)\n');
76
- for (const entity of result.entities) {
77
- const criticalViolations = entity.violations.filter(v => v.severity === 'MUST');
78
- if (criticalViolations.length > 0) {
79
- sections.push(`### Entity: ${entity.displayName} (\`${entity.logicalName}\`)\n`);
80
- for (const violation of criticalViolations) {
81
- if (violation.attributeLogicalName) {
82
- sections.push(`#### Column: ${violation.attributeLogicalName}${violation.createdOn ? ` (Created: ${new Date(violation.createdOn).toLocaleDateString()})` : ''}\n`);
83
- }
84
- else {
85
- sections.push(`#### Entity-Level Issue\n`);
86
- }
87
- sections.push(`- **Rule**: ${violation.rule}`);
88
- sections.push(`- **Issue**: ${violation.message}`);
89
- sections.push(`- **Current**: \`${violation.currentValue}\``);
90
- sections.push(`- **Expected**: \`${violation.expectedValue}\``);
91
- sections.push(`- **Action**: ${violation.action}`);
92
- if (violation.recommendation) {
93
- sections.push(`- **Recommendation**: ${violation.recommendation}`);
94
- }
95
- sections.push('');
96
- }
97
- }
98
- }
99
- sections.push('---\n');
100
- }
101
- // Warnings (SHOULD Fix)
102
- if (result.summary.warnings > 0) {
103
- sections.push('## ⚠️ Warnings (SHOULD Fix)\n');
104
- for (const entity of result.entities) {
105
- const warnings = entity.violations.filter(v => v.severity === 'SHOULD');
106
- if (warnings.length > 0) {
107
- sections.push(`### Entity: ${entity.displayName} (\`${entity.logicalName}\`)\n`);
108
- for (const violation of warnings) {
109
- if (violation.attributeLogicalName) {
110
- sections.push(`#### Column: ${violation.attributeLogicalName}${violation.createdOn ? ` (Created: ${new Date(violation.createdOn).toLocaleDateString()})` : ''}\n`);
111
- }
112
- else {
113
- sections.push(`#### Entity-Level Issue\n`);
114
- }
115
- sections.push(`- **Rule**: ${violation.rule}`);
116
- sections.push(`- **Issue**: ${violation.message}`);
117
- sections.push(`- **Current**: \`${violation.currentValue}\``);
118
- sections.push(`- **Expected**: \`${violation.expectedValue}\``);
119
- sections.push(`- **Recommendation**: ${violation.recommendation || violation.action}`);
120
- sections.push('');
121
- }
122
- }
123
- }
124
- sections.push('---\n');
125
- }
126
- // Compliant Entities
127
- sections.push('## ✅ Compliant Entities\n');
128
- const compliantEntities = result.entities.filter(e => e.isCompliant);
129
- if (compliantEntities.length > 0) {
130
- sections.push('The following entities have no violations:\n');
131
- for (const entity of compliantEntities) {
132
- sections.push(`- **${entity.displayName}** (\`${entity.logicalName}\`) - ${entity.attributesChecked} columns checked${entity.isRefData ? ' (RefData table)' : ''}`);
133
- }
134
- sections.push('');
135
- }
136
- else {
137
- sections.push('No fully compliant entities found.\n');
138
- }
139
- sections.push('---\n');
140
- // Exclusions and Statistics
141
- sections.push('## Exclusions\n');
142
- sections.push(`- System columns excluded: ${result.statistics.systemColumnsExcluded}`);
143
- sections.push(`- Columns older than ${result.metadata.recentDays} days: ${result.statistics.oldColumnsExcluded}`);
144
- sections.push(`- RefData tables (updatedbyprocess check skipped): ${result.statistics.refDataTablesSkipped}`);
145
- sections.push('');
146
- sections.push('---\n');
147
- // Footer
148
- sections.push(`**Execution Time**: ${result.metadata.executionTimeMs}ms`);
149
- return sections.join('\n');
150
- }
151
- /**
152
- * Format violations grouped by severity
153
- */
154
- export function formatViolationsBySeverity(violations) {
155
- const sections = [];
156
- const critical = violations.filter(v => v.severity === 'MUST');
157
- const warnings = violations.filter(v => v.severity === 'SHOULD');
158
- sections.push(`### Violations by Severity\n`);
159
- sections.push(`- **Critical (MUST)**: ${critical.length}`);
160
- sections.push(`- **Warnings (SHOULD)**: ${warnings.length}`);
161
- sections.push(`- **Total**: ${violations.length}\n`);
162
- if (critical.length > 0) {
163
- sections.push('#### Critical Issues\n');
164
- for (const violation of critical) {
165
- sections.push(`- ${violation.rule}: ${violation.message}`);
166
- }
167
- sections.push('');
168
- }
169
- if (warnings.length > 0) {
170
- sections.push('#### Warnings\n');
171
- for (const violation of warnings) {
172
- sections.push(`- ${violation.rule}: ${violation.message}`);
173
- }
174
- sections.push('');
175
- }
176
- return sections.join('\n');
177
- }
178
- /**
179
- * Format compliant entities list
180
- */
181
- export function formatCompliantEntities(entities) {
182
- const sections = [];
183
- const compliant = entities.filter(e => e.isCompliant);
184
- sections.push('### Compliant Entities\n');
185
- if (compliant.length > 0) {
186
- for (const entity of compliant) {
187
- sections.push(`- **${entity.displayName}** (\`${entity.logicalName}\`)`);
188
- sections.push(` - Attributes checked: ${entity.attributesChecked}`);
189
- sections.push(` - Status: ✅ No violations`);
190
- if (entity.isRefData) {
191
- sections.push(` - Type: RefData table`);
192
- }
193
- sections.push('');
194
- }
195
- }
196
- else {
197
- sections.push('No compliant entities found.');
198
- }
199
- return sections.join('\n');
200
- }
201
- /**
202
- * Format execution statistics
203
- */
204
- export function formatExecutionStats(result) {
205
- const sections = [];
206
- sections.push('### Execution Statistics\n');
207
- sections.push('| Metric | Value |');
208
- sections.push('|--------|-------|');
209
- sections.push(`| Execution Time | ${result.metadata.executionTimeMs}ms |`);
210
- sections.push(`| Entities Processed | ${result.summary.entitiesChecked} |`);
211
- sections.push(`| Attributes Analyzed | ${result.summary.attributesChecked} |`);
212
- sections.push(`| System Columns Excluded | ${result.statistics.systemColumnsExcluded} |`);
213
- sections.push(`| Old Columns Excluded | ${result.statistics.oldColumnsExcluded} |`);
214
- sections.push(`| RefData Tables | ${result.statistics.refDataTablesSkipped} |`);
215
- sections.push('');
216
- // Performance metrics
217
- if (result.summary.entitiesChecked > 0) {
218
- const avgTimePerEntity = Math.round(result.metadata.executionTimeMs / result.summary.entitiesChecked);
219
- sections.push(`**Average time per entity**: ${avgTimePerEntity}ms`);
220
- }
221
- if (result.summary.attributesChecked > 0) {
222
- const avgTimePerAttribute = Math.round(result.metadata.executionTimeMs / result.summary.attributesChecked);
223
- sections.push(`**Average time per attribute**: ${avgTimePerAttribute}ms`);
224
- }
225
- return sections.join('\n');
226
- }
227
- /**
228
- * Generate quick summary for CLI output
229
- */
230
- export function formatQuickSummary(result) {
231
- const lines = [];
232
- lines.push(`Validation Complete: ${result.summary.entitiesChecked} entities checked`);
233
- lines.push(`Total Violations: ${result.summary.totalViolations} (${result.summary.criticalViolations} critical, ${result.summary.warnings} warnings)`);
234
- lines.push(`Compliant Entities: ${result.summary.compliantEntities}/${result.summary.entitiesChecked}`);
235
- lines.push(`Execution Time: ${result.metadata.executionTimeMs}ms`);
236
- return lines.join('\n');
237
- }
238
- //# sourceMappingURL=best-practices-formatters.js.map