@mcp-consultant-tools/powerplatform-data 27.0.0 → 28.0.0-beta.11
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/PowerPlatformService.d.ts +2 -0
- package/build/PowerPlatformService.d.ts.map +1 -1
- package/build/PowerPlatformService.js +6 -0
- package/build/PowerPlatformService.js.map +1 -1
- package/build/cli/commands/data-commands.d.ts +7 -0
- package/build/cli/commands/data-commands.d.ts.map +1 -0
- package/build/cli/commands/data-commands.js +185 -0
- package/build/cli/commands/data-commands.js.map +1 -0
- package/build/cli/commands/flow-commands.d.ts +7 -0
- package/build/cli/commands/flow-commands.d.ts.map +1 -0
- package/build/cli/commands/flow-commands.js +67 -0
- package/build/cli/commands/flow-commands.js.map +1 -0
- package/build/cli/commands/index.d.ts +10 -0
- package/build/cli/commands/index.d.ts.map +1 -0
- package/build/cli/commands/index.js +15 -0
- package/build/cli/commands/index.js.map +1 -0
- package/build/cli/commands/metadata-commands.d.ts +7 -0
- package/build/cli/commands/metadata-commands.d.ts.map +1 -0
- package/build/cli/commands/metadata-commands.js +94 -0
- package/build/cli/commands/metadata-commands.js.map +1 -0
- package/build/cli/output.d.ts +11 -0
- package/build/cli/output.d.ts.map +1 -0
- package/build/cli/output.js +10 -0
- package/build/cli/output.js.map +1 -0
- package/build/cli.d.ts +9 -0
- package/build/cli.d.ts.map +1 -0
- package/build/cli.js +27 -0
- package/build/cli.js.map +1 -0
- package/build/context-factory.d.ts +8 -0
- package/build/context-factory.d.ts.map +1 -0
- package/build/context-factory.js +52 -0
- package/build/context-factory.js.map +1 -0
- package/build/index.d.ts +11 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +45 -557
- package/build/index.js.map +1 -1
- package/build/services/index.d.ts +5 -0
- package/build/services/index.d.ts.map +1 -0
- package/build/services/index.js +5 -0
- package/build/services/index.js.map +1 -0
- package/build/tool-examples.d.ts +34 -0
- package/build/tool-examples.d.ts.map +1 -0
- package/build/tool-examples.js +41 -0
- package/build/tool-examples.js.map +1 -0
- package/build/tools/index.d.ts +8 -0
- package/build/tools/index.d.ts.map +1 -0
- package/build/tools/index.js +11 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/read-tools.d.ts +3 -0
- package/build/tools/read-tools.d.ts.map +1 -0
- package/build/tools/read-tools.js +342 -0
- package/build/tools/read-tools.js.map +1 -0
- package/build/tools/write-tools.d.ts +3 -0
- package/build/tools/write-tools.d.ts.map +1 -0
- package/build/tools/write-tools.js +298 -0
- package/build/tools/write-tools.js.map +1 -0
- package/build/types.d.ts +13 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/package.json +6 -4
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared service context factory - used by both MCP server and CLI.
|
|
3
|
+
*/
|
|
4
|
+
import { PowerPlatformService } from './PowerPlatformService.js';
|
|
5
|
+
export function createServiceContext(service) {
|
|
6
|
+
let ppService = service || null;
|
|
7
|
+
function getPowerPlatformService() {
|
|
8
|
+
if (!ppService) {
|
|
9
|
+
const requiredVars = [
|
|
10
|
+
'POWERPLATFORM_URL',
|
|
11
|
+
'POWERPLATFORM_CLIENT_ID',
|
|
12
|
+
'POWERPLATFORM_TENANT_ID'
|
|
13
|
+
];
|
|
14
|
+
const missing = requiredVars.filter(v => !process.env[v]);
|
|
15
|
+
if (missing.length > 0) {
|
|
16
|
+
throw new Error(`Missing required PowerPlatform configuration: ${missing.join(', ')}`);
|
|
17
|
+
}
|
|
18
|
+
const config = {
|
|
19
|
+
organizationUrl: process.env.POWERPLATFORM_URL,
|
|
20
|
+
clientId: process.env.POWERPLATFORM_CLIENT_ID,
|
|
21
|
+
clientSecret: process.env.POWERPLATFORM_CLIENT_SECRET,
|
|
22
|
+
tenantId: process.env.POWERPLATFORM_TENANT_ID,
|
|
23
|
+
};
|
|
24
|
+
ppService = new PowerPlatformService(config);
|
|
25
|
+
}
|
|
26
|
+
return ppService;
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
get pp() { return getPowerPlatformService(); },
|
|
30
|
+
checkCreateEnabled() {
|
|
31
|
+
if (process.env.POWERPLATFORM_ENABLE_CREATE !== 'true') {
|
|
32
|
+
throw new Error('Create operations are disabled. Set POWERPLATFORM_ENABLE_CREATE=true to enable.');
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
checkUpdateEnabled() {
|
|
36
|
+
if (process.env.POWERPLATFORM_ENABLE_UPDATE !== 'true') {
|
|
37
|
+
throw new Error('Update operations are disabled. Set POWERPLATFORM_ENABLE_UPDATE=true to enable.');
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
checkDeleteEnabled() {
|
|
41
|
+
if (process.env.POWERPLATFORM_ENABLE_DELETE !== 'true') {
|
|
42
|
+
throw new Error('Delete operations are disabled. Set POWERPLATFORM_ENABLE_DELETE=true to enable.');
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
checkActionsEnabled() {
|
|
46
|
+
if (process.env.POWERPLATFORM_ENABLE_ACTIONS !== 'true') {
|
|
47
|
+
throw new Error('Action execution is disabled. Set POWERPLATFORM_ENABLE_ACTIONS=true to enable.');
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=context-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-factory.js","sourceRoot":"","sources":["../src/context-factory.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAuB,MAAM,2BAA2B,CAAC;AAKtF,MAAM,UAAU,oBAAoB,CAAC,OAA8B;IACjE,IAAI,SAAS,GAAgC,OAAO,IAAI,IAAI,CAAC;IAE7D,SAAS,uBAAuB;QAC9B,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,YAAY,GAAG;gBACnB,mBAAmB;gBACnB,yBAAyB;gBACzB,yBAA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CAAC,GAAG,CAAC,4BAA4B,KAAK,MAAM,EAAE,CAAC;gBACxD,MAAM,IAAI,KAAK,CAAC,gFAAgF,CAAC,CAAC;YACpG,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/build/index.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @mcp-consultant-tools/powerplatform-data
|
|
4
|
+
*
|
|
5
|
+
* MCP server for PowerPlatform/Dataverse data CRUD operations.
|
|
6
|
+
* Entry point: MCP server startup + backward-compatible registerPowerplatformDataTools().
|
|
7
|
+
*/
|
|
2
8
|
import { PowerPlatformService } from './PowerPlatformService.js';
|
|
3
9
|
/**
|
|
4
|
-
* Register powerplatform-data tools with an MCP server
|
|
10
|
+
* Register powerplatform-data tools with an MCP server.
|
|
11
|
+
* Backward-compatible API for the meta package.
|
|
5
12
|
* @param server - MCP server instance
|
|
6
13
|
* @param service - Optional pre-initialized PowerPlatformService (for testing)
|
|
7
14
|
*/
|
|
8
15
|
export declare function registerPowerplatformDataTools(server: any, service?: PowerPlatformService): void;
|
|
16
|
+
export { PowerPlatformService } from './PowerPlatformService.js';
|
|
17
|
+
export type { PowerPlatformConfig } from './PowerPlatformService.js';
|
|
18
|
+
export type { ServiceContext } from './types.js';
|
|
9
19
|
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAMH,OAAO,EAAE,oBAAoB,EAAuB,MAAM,2BAA2B,CAAC;AA6DtF;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAGhG;AAGD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACrE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|