@mcp-consultant-tools/powerplatform-core 30.0.0-beta.1 → 30.0.0-beta.3
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.
|
@@ -9,7 +9,8 @@ export declare class DependencyService {
|
|
|
9
9
|
private client;
|
|
10
10
|
constructor(client: PowerPlatformClient);
|
|
11
11
|
/**
|
|
12
|
-
* Check component dependencies
|
|
12
|
+
* Check component dependencies using RetrieveDependenciesForDelete function.
|
|
13
|
+
* This is a Dataverse function (GET), not an action (POST).
|
|
13
14
|
*/
|
|
14
15
|
checkDependencies(componentId: string, componentType: number): Promise<unknown>;
|
|
15
16
|
/**
|
|
@@ -18,6 +19,7 @@ export declare class DependencyService {
|
|
|
18
19
|
checkDeleteEligibility(componentId: string, componentType: number): Promise<{
|
|
19
20
|
canDelete: boolean;
|
|
20
21
|
dependencies: unknown[];
|
|
22
|
+
error?: string;
|
|
21
23
|
}>;
|
|
22
24
|
/**
|
|
23
25
|
* Check dependencies for a specific component (alias for checkDependencies)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyService.d.ts","sourceRoot":"","sources":["../../src/services/DependencyService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,qBAAa,iBAAiB;IAChB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,mBAAmB;IAE/C
|
|
1
|
+
{"version":3,"file":"DependencyService.d.ts","sourceRoot":"","sources":["../../src/services/DependencyService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,qBAAa,iBAAiB;IAChB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,mBAAmB;IAE/C;;;OAGG;IACG,iBAAiB,CACrB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC;IAOnB;;OAEG;IACG,sBAAsB,CAC1B,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,YAAY,EAAE,OAAO,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAsB3E;;OAEG;IACG,0BAA0B,CAC9B,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,OAAO,CAAC;CAGpB"}
|
|
@@ -10,13 +10,13 @@ export class DependencyService {
|
|
|
10
10
|
this.client = client;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Check component dependencies
|
|
13
|
+
* Check component dependencies using RetrieveDependenciesForDelete function.
|
|
14
|
+
* This is a Dataverse function (GET), not an action (POST).
|
|
14
15
|
*/
|
|
15
16
|
async checkDependencies(componentId, componentType) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
17
|
+
const endpoint = `api/data/v9.2/RetrieveDependenciesForDelete(ObjectId=@oid,ComponentType=@ct)` +
|
|
18
|
+
`?@oid=${encodeURIComponent(componentId)}&@ct=${componentType}`;
|
|
19
|
+
return this.client.makeRequest(endpoint, 'GET');
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Check if component can be deleted
|
|
@@ -24,16 +24,18 @@ export class DependencyService {
|
|
|
24
24
|
async checkDeleteEligibility(componentId, componentType) {
|
|
25
25
|
try {
|
|
26
26
|
const result = (await this.checkDependencies(componentId, componentType));
|
|
27
|
-
|
|
27
|
+
// Web API returns { value: [...] }; Organization Service returns { EntityCollection: { Entities: [...] } }
|
|
28
|
+
const dependencies = result.value || result.EntityCollection?.Entities || [];
|
|
28
29
|
return {
|
|
29
30
|
canDelete: dependencies.length === 0,
|
|
30
31
|
dependencies: dependencies,
|
|
31
32
|
};
|
|
32
33
|
}
|
|
33
|
-
catch {
|
|
34
|
+
catch (err) {
|
|
34
35
|
return {
|
|
35
36
|
canDelete: false,
|
|
36
37
|
dependencies: [],
|
|
38
|
+
error: err.message || 'Failed to retrieve dependencies',
|
|
37
39
|
};
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DependencyService.js","sourceRoot":"","sources":["../../src/services/DependencyService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,OAAO,iBAAiB;IACR;IAApB,YAAoB,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;IAAG,CAAC;IAEnD
|
|
1
|
+
{"version":3,"file":"DependencyService.js","sourceRoot":"","sources":["../../src/services/DependencyService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,OAAO,iBAAiB;IACR;IAApB,YAAoB,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;IAAG,CAAC;IAEnD;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CACrB,WAAmB,EACnB,aAAqB;QAErB,MAAM,QAAQ,GACZ,8EAA8E;YAC9E,SAAS,kBAAkB,CAAC,WAAW,CAAC,QAAQ,aAAa,EAAE,CAAC;QAClE,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,sBAAsB,CAC1B,WAAmB,EACnB,aAAqB;QAErB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAC1C,WAAW,EACX,aAAa,CACd,CAAuE,CAAC;YACzE,2GAA2G;YAC3G,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,gBAAgB,EAAE,QAAQ,IAAI,EAAE,CAAC;YAE7E,OAAO;gBACL,SAAS,EAAE,YAAY,CAAC,MAAM,KAAK,CAAC;gBACpC,YAAY,EAAE,YAAY;aAC3B,CAAC;QACJ,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,OAAO;gBACL,SAAS,EAAE,KAAK;gBAChB,YAAY,EAAE,EAAE;gBAChB,KAAK,EAAE,GAAG,CAAC,OAAO,IAAI,iCAAiC;aACxD,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,0BAA0B,CAC9B,WAAmB,EACnB,aAAqB;QAErB,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAC5D,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-consultant-tools/powerplatform-core",
|
|
3
|
-
"version": "30.0.0-beta.
|
|
3
|
+
"version": "30.0.0-beta.3",
|
|
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",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@azure/identity": "^4.13.0",
|
|
57
57
|
"@azure/msal-node": "^3.3.0",
|
|
58
|
-
"@mcp-consultant-tools/core": "
|
|
58
|
+
"@mcp-consultant-tools/core": "30.0.0-beta.1",
|
|
59
59
|
"axios": "^1.8.3",
|
|
60
60
|
"open": "^10.1.0"
|
|
61
61
|
},
|