@mcp-consultant-tools/powerplatform-core 26.0.0-beta.8 → 26.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.
- package/build/auth/index.d.ts +8 -2
- package/build/auth/index.d.ts.map +1 -1
- package/build/auth/index.js +8 -2
- package/build/auth/index.js.map +1 -1
- package/build/auth/interactive-auth.d.ts +3 -0
- package/build/auth/interactive-auth.d.ts.map +1 -1
- package/build/auth/interactive-auth.js +4 -0
- package/build/auth/interactive-auth.js.map +1 -1
- package/build/auth/service-principal-auth.d.ts +5 -5
- package/build/auth/service-principal-auth.d.ts.map +1 -1
- package/build/auth/service-principal-auth.js +24 -27
- package/build/auth/service-principal-auth.js.map +1 -1
- package/build/client/PowerPlatformClient.d.ts +7 -1
- package/build/client/PowerPlatformClient.d.ts.map +1 -1
- package/build/client/PowerPlatformClient.js +9 -1
- package/build/client/PowerPlatformClient.js.map +1 -1
- package/build/index.d.ts +3 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/services/FlowService.d.ts +9 -3
- package/build/services/FlowService.d.ts.map +1 -1
- package/build/services/FlowService.js +104 -60
- package/build/services/FlowService.js.map +1 -1
- package/build/services/IntegrationAuditService.d.ts +160 -0
- package/build/services/IntegrationAuditService.d.ts.map +1 -0
- package/build/services/IntegrationAuditService.js +537 -0
- package/build/services/IntegrationAuditService.js.map +1 -0
- package/build/services/PluginDeploymentService.d.ts +32 -0
- package/build/services/PluginDeploymentService.d.ts.map +1 -1
- package/build/services/PluginDeploymentService.js +126 -0
- package/build/services/PluginDeploymentService.js.map +1 -1
- package/build/services/SolutionService.d.ts +16 -1
- package/build/services/SolutionService.d.ts.map +1 -1
- package/build/services/SolutionService.js +36 -3
- package/build/services/SolutionService.js.map +1 -1
- package/build/services/index.d.ts +3 -1
- package/build/services/index.d.ts.map +1 -1
- package/build/services/index.js +2 -0
- package/build/services/index.js.map +1 -1
- package/build/utils/complexity-calculator.d.ts +58 -0
- package/build/utils/complexity-calculator.d.ts.map +1 -0
- package/build/utils/complexity-calculator.js +267 -0
- package/build/utils/complexity-calculator.js.map +1 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.d.ts.map +1 -1
- package/build/utils/index.js +2 -0
- package/build/utils/index.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flow Complexity Calculator
|
|
3
|
+
*
|
|
4
|
+
* Calculates complexity scores for Power Automate flows based on:
|
|
5
|
+
* - Action count (base complexity)
|
|
6
|
+
* - Unique connectors (integration surface)
|
|
7
|
+
* - HTTP/REST connectors (external dependency risk)
|
|
8
|
+
* - Premium connectors (licensing/cost concern)
|
|
9
|
+
* - Conditions and switches (logic complexity)
|
|
10
|
+
* - Loops (iteration complexity)
|
|
11
|
+
* - Parallel branches (execution complexity)
|
|
12
|
+
* - Error handling scopes (sophistication indicator)
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Premium connector identifiers (partial list - common ones)
|
|
16
|
+
*/
|
|
17
|
+
const PREMIUM_CONNECTORS = new Set([
|
|
18
|
+
'sql',
|
|
19
|
+
'azuresql',
|
|
20
|
+
'oracle',
|
|
21
|
+
'salesforce',
|
|
22
|
+
'servicenow',
|
|
23
|
+
'sap',
|
|
24
|
+
'dynamics365',
|
|
25
|
+
'dynamics365bc',
|
|
26
|
+
'commondataserviceforapps',
|
|
27
|
+
'dataverse',
|
|
28
|
+
'azureblob',
|
|
29
|
+
'azuretables',
|
|
30
|
+
'azurequeues',
|
|
31
|
+
'azuread',
|
|
32
|
+
'azureautomation',
|
|
33
|
+
'azureeventgrid',
|
|
34
|
+
'azuremaps',
|
|
35
|
+
'cognitiveservices',
|
|
36
|
+
'powerappsforadmins',
|
|
37
|
+
'powerplatformforadmins',
|
|
38
|
+
'http',
|
|
39
|
+
'httpwebhook',
|
|
40
|
+
]);
|
|
41
|
+
/**
|
|
42
|
+
* HTTP/REST connector identifiers
|
|
43
|
+
*/
|
|
44
|
+
const HTTP_CONNECTORS = new Set([
|
|
45
|
+
'http',
|
|
46
|
+
'httpwebhook',
|
|
47
|
+
'httprequest',
|
|
48
|
+
'custom',
|
|
49
|
+
]);
|
|
50
|
+
/**
|
|
51
|
+
* External trigger types that indicate inbound integrations
|
|
52
|
+
*/
|
|
53
|
+
const EXTERNAL_TRIGGER_TYPES = new Set([
|
|
54
|
+
'Request',
|
|
55
|
+
'HttpTrigger',
|
|
56
|
+
'OpenApiConnectionWebhook',
|
|
57
|
+
'ApiConnectionWebhook',
|
|
58
|
+
'Webhook',
|
|
59
|
+
]);
|
|
60
|
+
/**
|
|
61
|
+
* Complexity scoring weights
|
|
62
|
+
*/
|
|
63
|
+
const WEIGHTS = {
|
|
64
|
+
actionBase: 1,
|
|
65
|
+
uniqueConnector: 2,
|
|
66
|
+
httpConnector: 5,
|
|
67
|
+
premiumConnector: 3,
|
|
68
|
+
condition: 2,
|
|
69
|
+
loop: 3,
|
|
70
|
+
parallelBranch: 3,
|
|
71
|
+
errorScope: 1,
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Risk level thresholds
|
|
75
|
+
*/
|
|
76
|
+
const RISK_THRESHOLDS = {
|
|
77
|
+
low: 20,
|
|
78
|
+
medium: 50,
|
|
79
|
+
high: 100,
|
|
80
|
+
// Anything above 100 is Critical
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Calculate risk level from complexity score
|
|
84
|
+
*/
|
|
85
|
+
export function getRiskLevel(score) {
|
|
86
|
+
if (score <= RISK_THRESHOLDS.low)
|
|
87
|
+
return 'Low';
|
|
88
|
+
if (score <= RISK_THRESHOLDS.medium)
|
|
89
|
+
return 'Medium';
|
|
90
|
+
if (score <= RISK_THRESHOLDS.high)
|
|
91
|
+
return 'High';
|
|
92
|
+
return 'Critical';
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Extract complexity factors from a parsed flow definition
|
|
96
|
+
*/
|
|
97
|
+
export function extractComplexityFactors(flowDefinition) {
|
|
98
|
+
const breakdown = {
|
|
99
|
+
actionCount: 0,
|
|
100
|
+
uniqueConnectors: 0,
|
|
101
|
+
httpConnectors: 0,
|
|
102
|
+
premiumConnectors: 0,
|
|
103
|
+
conditions: 0,
|
|
104
|
+
loops: 0,
|
|
105
|
+
parallelBranches: 0,
|
|
106
|
+
errorScopes: 0,
|
|
107
|
+
};
|
|
108
|
+
const connectors = new Set();
|
|
109
|
+
const httpConnectorsFound = new Set();
|
|
110
|
+
const premiumConnectorsFound = new Set();
|
|
111
|
+
try {
|
|
112
|
+
const properties = flowDefinition.properties;
|
|
113
|
+
const definition = properties?.definition;
|
|
114
|
+
if (!definition?.actions) {
|
|
115
|
+
return breakdown;
|
|
116
|
+
}
|
|
117
|
+
// Recursive function to process actions
|
|
118
|
+
const processActions = (actions, inParallel = false) => {
|
|
119
|
+
const actionKeys = Object.keys(actions);
|
|
120
|
+
// Check for parallel branches (multiple actions without runAfter dependencies)
|
|
121
|
+
const topLevelActions = actionKeys.filter((key) => {
|
|
122
|
+
const action = actions[key];
|
|
123
|
+
const runAfter = action.runAfter;
|
|
124
|
+
return !runAfter || Object.keys(runAfter).length === 0;
|
|
125
|
+
});
|
|
126
|
+
if (topLevelActions.length > 1) {
|
|
127
|
+
breakdown.parallelBranches += topLevelActions.length - 1;
|
|
128
|
+
}
|
|
129
|
+
for (const actionName of actionKeys) {
|
|
130
|
+
const action = actions[actionName];
|
|
131
|
+
const actionType = (action.type || '').toLowerCase();
|
|
132
|
+
breakdown.actionCount++;
|
|
133
|
+
// Check for conditions
|
|
134
|
+
if (actionType === 'if' || actionType === 'switch') {
|
|
135
|
+
breakdown.conditions++;
|
|
136
|
+
}
|
|
137
|
+
// Check for loops
|
|
138
|
+
if (actionType === 'foreach' || actionType === 'until') {
|
|
139
|
+
breakdown.loops++;
|
|
140
|
+
}
|
|
141
|
+
// Check for error handling scopes
|
|
142
|
+
const runAfter = action.runAfter;
|
|
143
|
+
if (actionType === 'scope' &&
|
|
144
|
+
runAfter &&
|
|
145
|
+
Object.values(runAfter).some((r) => r.includes('Failed'))) {
|
|
146
|
+
breakdown.errorScopes++;
|
|
147
|
+
}
|
|
148
|
+
// Extract connector information
|
|
149
|
+
if (action.type === 'OpenApiConnection' ||
|
|
150
|
+
action.type === 'ApiConnection' ||
|
|
151
|
+
action.type === 'Http') {
|
|
152
|
+
const inputs = action.inputs;
|
|
153
|
+
const host = inputs?.host;
|
|
154
|
+
const connectorId = host?.connectionName ||
|
|
155
|
+
host?.apiId ||
|
|
156
|
+
action.metadata
|
|
157
|
+
?.operationMetadataId;
|
|
158
|
+
if (connectorId) {
|
|
159
|
+
const connectorName = connectorId.split('/').pop()?.toLowerCase() || connectorId.toLowerCase();
|
|
160
|
+
connectors.add(connectorName);
|
|
161
|
+
if (HTTP_CONNECTORS.has(connectorName)) {
|
|
162
|
+
httpConnectorsFound.add(connectorName);
|
|
163
|
+
}
|
|
164
|
+
if (PREMIUM_CONNECTORS.has(connectorName)) {
|
|
165
|
+
premiumConnectorsFound.add(connectorName);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
// Handle HTTP action type directly
|
|
170
|
+
if (actionType === 'http') {
|
|
171
|
+
httpConnectorsFound.add('http');
|
|
172
|
+
connectors.add('http');
|
|
173
|
+
}
|
|
174
|
+
// Recurse into nested actions
|
|
175
|
+
if (action.actions) {
|
|
176
|
+
processActions(action.actions);
|
|
177
|
+
}
|
|
178
|
+
if (action.then) {
|
|
179
|
+
processActions(action.then);
|
|
180
|
+
}
|
|
181
|
+
if (action.else) {
|
|
182
|
+
processActions(action.else);
|
|
183
|
+
}
|
|
184
|
+
if (action.cases) {
|
|
185
|
+
for (const [, caseActions] of Object.entries(action.cases)) {
|
|
186
|
+
const caseData = caseActions;
|
|
187
|
+
if (caseData.actions) {
|
|
188
|
+
processActions(caseData.actions);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
if (action.default) {
|
|
193
|
+
const defaultData = action.default;
|
|
194
|
+
if (defaultData.actions) {
|
|
195
|
+
processActions(defaultData.actions);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
processActions(definition.actions);
|
|
201
|
+
breakdown.uniqueConnectors = connectors.size;
|
|
202
|
+
breakdown.httpConnectors = httpConnectorsFound.size;
|
|
203
|
+
breakdown.premiumConnectors = premiumConnectorsFound.size;
|
|
204
|
+
}
|
|
205
|
+
catch {
|
|
206
|
+
// Return partial breakdown on parse errors
|
|
207
|
+
}
|
|
208
|
+
return breakdown;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Extract complexity flags from a parsed flow definition
|
|
212
|
+
*/
|
|
213
|
+
export function extractComplexityFlags(flowDefinition, breakdown) {
|
|
214
|
+
const flags = {
|
|
215
|
+
usesHttp: breakdown.httpConnectors > 0,
|
|
216
|
+
usesPremium: breakdown.premiumConnectors > 0,
|
|
217
|
+
hasErrorHandling: breakdown.errorScopes > 0,
|
|
218
|
+
hasExternalTrigger: false,
|
|
219
|
+
hasParallelExecution: breakdown.parallelBranches > 0,
|
|
220
|
+
};
|
|
221
|
+
try {
|
|
222
|
+
const properties = flowDefinition.properties;
|
|
223
|
+
const definition = properties?.definition;
|
|
224
|
+
if (definition?.triggers) {
|
|
225
|
+
const triggers = definition.triggers;
|
|
226
|
+
const triggerNames = Object.keys(triggers);
|
|
227
|
+
if (triggerNames.length > 0) {
|
|
228
|
+
const trigger = triggers[triggerNames[0]];
|
|
229
|
+
const triggerType = trigger.type || '';
|
|
230
|
+
flags.hasExternalTrigger = EXTERNAL_TRIGGER_TYPES.has(triggerType);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
// Return partial flags on parse errors
|
|
236
|
+
}
|
|
237
|
+
return flags;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Calculate complexity score from breakdown
|
|
241
|
+
*/
|
|
242
|
+
export function calculateComplexityScore(breakdown) {
|
|
243
|
+
return (breakdown.actionCount * WEIGHTS.actionBase +
|
|
244
|
+
breakdown.uniqueConnectors * WEIGHTS.uniqueConnector +
|
|
245
|
+
breakdown.httpConnectors * WEIGHTS.httpConnector +
|
|
246
|
+
breakdown.premiumConnectors * WEIGHTS.premiumConnector +
|
|
247
|
+
breakdown.conditions * WEIGHTS.condition +
|
|
248
|
+
breakdown.loops * WEIGHTS.loop +
|
|
249
|
+
breakdown.parallelBranches * WEIGHTS.parallelBranch +
|
|
250
|
+
breakdown.errorScopes * WEIGHTS.errorScope);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Calculate full flow complexity from a parsed flow definition
|
|
254
|
+
*/
|
|
255
|
+
export function calculateFlowComplexity(flowDefinition) {
|
|
256
|
+
const breakdown = extractComplexityFactors(flowDefinition);
|
|
257
|
+
const score = calculateComplexityScore(breakdown);
|
|
258
|
+
const riskLevel = getRiskLevel(score);
|
|
259
|
+
const flags = extractComplexityFlags(flowDefinition, breakdown);
|
|
260
|
+
return {
|
|
261
|
+
score,
|
|
262
|
+
riskLevel,
|
|
263
|
+
breakdown,
|
|
264
|
+
flags,
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
//# sourceMappingURL=complexity-calculator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complexity-calculator.js","sourceRoot":"","sources":["../../src/utils/complexity-calculator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA8BH;;GAEG;AACH,MAAM,kBAAkB,GAAG,IAAI,GAAG,CAAC;IACjC,KAAK;IACL,UAAU;IACV,QAAQ;IACR,YAAY;IACZ,YAAY;IACZ,KAAK;IACL,aAAa;IACb,eAAe;IACf,0BAA0B;IAC1B,WAAW;IACX,WAAW;IACX,aAAa;IACb,aAAa;IACb,SAAS;IACT,iBAA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,kBAAkB,GAAG,sBAAsB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACrE,CAAC;QACH,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,uCAAuC;IACzC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,SAAkC;IAElC,OAAO,CACL,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU;QAC1C,SAAS,CAAC,gBAAgB,GAAG,OAAO,CAAC,eAAe;QACpD,SAAS,CAAC,cAAc,GAAG,OAAO,CAAC,aAAa;QAChD,SAAS,CAAC,iBAAiB,GAAG,OAAO,CAAC,gBAAgB;QACtD,SAAS,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS;QACxC,SAAS,CAAC,KAAK,GAAG,OAAO,CAAC,IAAI;QAC9B,SAAS,CAAC,gBAAgB,GAAG,OAAO,CAAC,cAAc;QACnD,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAC3C,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,cAAuC;IAEvC,MAAM,SAAS,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAC;IAC3D,MAAM,KAAK,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACtC,MAAM,KAAK,GAAG,sBAAsB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IAEhE,OAAO;QACL,KAAK;QACL,SAAS;QACT,SAAS;QACT,KAAK;KACN,CAAC;AACJ,CAAC"}
|
package/build/utils/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export { IconManager, iconManager, type IconSuggestion, type IconUploadResult, }
|
|
|
8
8
|
export { batchExecute, RateLimiter, rateLimiter, type RateLimiterOptions, type RequestQueueItem, withRateLimit, } from './rate-limiter.js';
|
|
9
9
|
export { ATTRIBUTE_DETAILS, ENTITY_OVERVIEW, QUERY_TEMPLATE, RELATIONSHIP_MAP, } from './prompt-templates.js';
|
|
10
10
|
export { getPublisherPrefix, initializePublisherPrefix, isPublisherPrefixConfigured, normalizePrefix, resetPublisherPrefix, } from './publisherConfig.js';
|
|
11
|
+
export { calculateFlowComplexity, calculateComplexityScore, extractComplexityFactors, extractComplexityFlags, getRiskLevel, type FlowComplexityBreakdown, type FlowComplexityFlags, type FlowComplexityResult, type RiskLevel, } from './complexity-calculator.js';
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AAGxC,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,aAAa,GACd,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,YAAY,EACZ,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,SAAS,GACf,MAAM,4BAA4B,CAAC"}
|
package/build/utils/index.js
CHANGED
|
@@ -15,4 +15,6 @@ export { batchExecute, RateLimiter, rateLimiter, withRateLimit, } from './rate-l
|
|
|
15
15
|
export { ATTRIBUTE_DETAILS, ENTITY_OVERVIEW, QUERY_TEMPLATE, RELATIONSHIP_MAP, } from './prompt-templates.js';
|
|
16
16
|
// Publisher configuration
|
|
17
17
|
export { getPublisherPrefix, initializePublisherPrefix, isPublisherPrefixConfigured, normalizePrefix, resetPublisherPrefix, } from './publisherConfig.js';
|
|
18
|
+
// Flow complexity calculator
|
|
19
|
+
export { calculateFlowComplexity, calculateComplexityScore, extractComplexityFactors, extractComplexityFlags, getRiskLevel, } from './complexity-calculator.js';
|
|
18
20
|
//# sourceMappingURL=index.js.map
|
package/build/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,gBAAgB;AAChB,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,kBAAkB,CAAC;AAE1B,4BAA4B;AAC5B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GAGvB,MAAM,oBAAoB,CAAC;AAE5B,4BAA4B;AAC5B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AAExC,kBAAkB;AAClB,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,kBAAkB,CAAC;AAE1B,gBAAgB;AAChB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EAGX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,mBAAmB;AACnB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,0BAA0B;AAC1B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACrB,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,gBAAgB;AAChB,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,kBAAkB,CAAC;AAE1B,4BAA4B;AAC5B,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,sBAAsB,GAGvB,MAAM,oBAAoB,CAAC;AAE5B,4BAA4B;AAC5B,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,gCAAgC,CAAC;AAExC,kBAAkB;AAClB,OAAO,EACL,WAAW,EACX,WAAW,GAGZ,MAAM,kBAAkB,CAAC;AAE1B,gBAAgB;AAChB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EAGX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,mBAAmB;AACnB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAE/B,0BAA0B;AAC1B,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC3B,eAAe,EACf,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,6BAA6B;AAC7B,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,YAAY,GAKb,MAAM,4BAA4B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-consultant-tools/powerplatform-core",
|
|
3
|
-
"version": "26.0.0
|
|
3
|
+
"version": "26.0.0",
|
|
4
4
|
"description": "Shared core infrastructure for PowerPlatform MCP packages - authentication, HTTP client, and modular services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"node": ">=16.0.0"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
+
"@azure/identity": "^4.13.0",
|
|
56
57
|
"@azure/msal-node": "^3.3.0",
|
|
57
58
|
"@mcp-consultant-tools/core": "^22.0.0",
|
|
58
59
|
"axios": "^1.8.3",
|