@mcp-consultant-tools/sharepoint 27.0.0-beta.1 → 28.0.0-beta.10
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/cli/commands/index.d.ts +8 -0
- package/build/cli/commands/index.d.ts.map +1 -0
- package/build/cli/commands/index.js +9 -0
- package/build/cli/commands/index.js.map +1 -0
- package/build/cli/commands/read-commands.d.ts +9 -0
- package/build/cli/commands/read-commands.d.ts.map +1 -0
- package/build/cli/commands/read-commands.js +347 -0
- package/build/cli/commands/read-commands.js.map +1 -0
- package/build/cli/output.d.ts +23 -0
- package/build/cli/output.d.ts.map +1 -0
- package/build/cli/output.js +31 -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 +4 -0
- package/build/context-factory.d.ts.map +1 -0
- package/build/context-factory.js +89 -0
- package/build/context-factory.js.map +1 -0
- package/build/index.d.ts +13 -5
- package/build/index.d.ts.map +1 -1
- package/build/index.js +49 -23
- package/build/index.js.map +1 -1
- package/build/prompts/index.d.ts +7 -0
- package/build/prompts/index.d.ts.map +1 -0
- package/build/prompts/index.js +6 -0
- package/build/prompts/index.js.map +1 -0
- package/build/prompts/templates.d.ts +11 -0
- package/build/prompts/templates.d.ts.map +1 -0
- package/build/prompts/templates.js +462 -0
- package/build/prompts/templates.js.map +1 -0
- package/build/services/file-operations-service.d.ts +52 -0
- package/build/services/file-operations-service.d.ts.map +1 -0
- package/build/services/file-operations-service.js +441 -0
- package/build/services/file-operations-service.js.map +1 -0
- package/build/services/index.d.ts +6 -0
- package/build/services/index.d.ts.map +1 -0
- package/build/services/index.js +4 -0
- package/build/services/index.js.map +1 -0
- package/build/services/list-service.d.ts +25 -0
- package/build/services/list-service.d.ts.map +1 -0
- package/build/services/list-service.js +558 -0
- package/build/services/list-service.js.map +1 -0
- package/build/services/sharepoint-service.d.ts +59 -0
- package/build/services/sharepoint-service.d.ts.map +1 -0
- package/build/services/sharepoint-service.js +465 -0
- package/build/services/sharepoint-service.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 +9 -0
- package/build/tools/index.js.map +1 -0
- package/build/tools/read-tools.d.ts +3 -5
- package/build/tools/read-tools.d.ts.map +1 -1
- package/build/tools/read-tools.js +22 -39
- package/build/tools/read-tools.js.map +1 -1
- package/build/tools/write-tools.d.ts +2 -3
- package/build/tools/write-tools.d.ts.map +1 -1
- package/build/tools/write-tools.js +13 -19
- package/build/tools/write-tools.js.map +1 -1
- package/build/types.d.ts +16 -0
- package/build/types.d.ts.map +1 -0
- package/build/types.js +2 -0
- package/build/types.js.map +1 -0
- package/build/utils/tool-examples.d.ts +1 -10
- package/build/utils/tool-examples.d.ts.map +1 -1
- package/build/utils/tool-examples.js +1 -14
- package/build/utils/tool-examples.js.map +1 -1
- package/package.json +5 -3
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Commands barrel export + combined registration
|
|
3
|
+
*/
|
|
4
|
+
import type { Command } from 'commander';
|
|
5
|
+
import type { ServiceContext } from '../../context-factory.js';
|
|
6
|
+
export declare function registerAllCommands(program: Command, ctx: ServiceContext): void;
|
|
7
|
+
export { registerReadCommands } from './read-commands.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAE/E;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Commands barrel export + combined registration
|
|
3
|
+
*/
|
|
4
|
+
import { registerReadCommands } from './read-commands.js';
|
|
5
|
+
export function registerAllCommands(program, ctx) {
|
|
6
|
+
registerReadCommands(program, ctx);
|
|
7
|
+
}
|
|
8
|
+
export { registerReadCommands } from './read-commands.js';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAE,GAAmB;IACvE,oBAAoB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACrC,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharePoint Read CLI Commands
|
|
3
|
+
*
|
|
4
|
+
* Maps all 16 read-only MCP tools to Commander CLI commands.
|
|
5
|
+
*/
|
|
6
|
+
import type { Command } from 'commander';
|
|
7
|
+
import type { ServiceContext } from '../../context-factory.js';
|
|
8
|
+
export declare function registerReadCommands(program: Command, ctx: ServiceContext): void;
|
|
9
|
+
//# sourceMappingURL=read-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/read-commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAuVhF"}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SharePoint Read CLI Commands
|
|
3
|
+
*
|
|
4
|
+
* Maps all 16 read-only MCP tools to Commander CLI commands.
|
|
5
|
+
*/
|
|
6
|
+
import { outputResult, handleCliError } from '../output.js';
|
|
7
|
+
export function registerReadCommands(program, ctx) {
|
|
8
|
+
// spo-list-sites
|
|
9
|
+
program
|
|
10
|
+
.command('list-sites')
|
|
11
|
+
.description('List all configured SharePoint sites (active and inactive)')
|
|
12
|
+
.action(async () => {
|
|
13
|
+
try {
|
|
14
|
+
const sites = ctx.sharepoint.getAllSites();
|
|
15
|
+
outputResult({
|
|
16
|
+
fileName: 'list-sites',
|
|
17
|
+
data: sites,
|
|
18
|
+
summary: `Found ${sites.length} configured site(s):\n` +
|
|
19
|
+
sites.map((s) => ` - ${s.id}: ${s.name} (${s.active ? 'active' : 'inactive'})`).join('\n'),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
handleCliError(error);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
// spo-get-site-info
|
|
27
|
+
program
|
|
28
|
+
.command('get-site-info')
|
|
29
|
+
.description('Get detailed site information including metadata')
|
|
30
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
31
|
+
.action(async (opts) => {
|
|
32
|
+
try {
|
|
33
|
+
const siteInfo = await ctx.sharepoint.getSiteInfo(opts.siteId);
|
|
34
|
+
outputResult({
|
|
35
|
+
fileName: `site-info-${opts.siteId}`,
|
|
36
|
+
data: siteInfo,
|
|
37
|
+
summary: `Site: ${siteInfo.displayName || opts.siteId}\nURL: ${siteInfo.webUrl || 'N/A'}`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
handleCliError(error);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
// spo-test-connection
|
|
45
|
+
program
|
|
46
|
+
.command('test-connection')
|
|
47
|
+
.description('Test connectivity to a SharePoint site and verify permissions')
|
|
48
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
49
|
+
.action(async (opts) => {
|
|
50
|
+
try {
|
|
51
|
+
const result = await ctx.sharepoint.testConnection(opts.siteId);
|
|
52
|
+
outputResult({
|
|
53
|
+
fileName: `test-connection-${opts.siteId}`,
|
|
54
|
+
data: result,
|
|
55
|
+
summary: `Connection test: ${result.success ? 'SUCCESS' : 'FAILED'}`,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
handleCliError(error);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
// spo-list-drives
|
|
63
|
+
program
|
|
64
|
+
.command('list-drives')
|
|
65
|
+
.description('List all document libraries (drives) in a SharePoint site')
|
|
66
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
67
|
+
.action(async (opts) => {
|
|
68
|
+
try {
|
|
69
|
+
const drives = await ctx.sharepoint.listDrives(opts.siteId);
|
|
70
|
+
outputResult({
|
|
71
|
+
fileName: `drives-${opts.siteId}`,
|
|
72
|
+
data: drives,
|
|
73
|
+
summary: `Found ${drives.length} document library/libraries:\n` +
|
|
74
|
+
drives.map((d) => ` - ${d.name} (${d.id})`).join('\n'),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
handleCliError(error);
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
// spo-get-drive-info
|
|
82
|
+
program
|
|
83
|
+
.command('get-drive-info')
|
|
84
|
+
.description('Get detailed document library information')
|
|
85
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
86
|
+
.requiredOption('--drive-id <driveId>', 'Drive ID')
|
|
87
|
+
.action(async (opts) => {
|
|
88
|
+
try {
|
|
89
|
+
const driveInfo = await ctx.sharepoint.getDriveInfo(opts.siteId, opts.driveId);
|
|
90
|
+
outputResult({
|
|
91
|
+
fileName: `drive-info-${opts.driveId}`,
|
|
92
|
+
data: driveInfo,
|
|
93
|
+
summary: `Drive: ${driveInfo.name || opts.driveId}\nType: ${driveInfo.driveType || 'N/A'}`,
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
handleCliError(error);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
// spo-clear-cache
|
|
101
|
+
program
|
|
102
|
+
.command('clear-cache')
|
|
103
|
+
.description('Clear cached SharePoint responses')
|
|
104
|
+
.option('--site-id <siteId>', 'Clear cache for specific site only')
|
|
105
|
+
.option('--pattern <pattern>', 'Clear only entries matching this pattern')
|
|
106
|
+
.action(async (opts) => {
|
|
107
|
+
try {
|
|
108
|
+
const clearedCount = ctx.sharepoint.clearCache(opts.pattern, opts.siteId);
|
|
109
|
+
outputResult({
|
|
110
|
+
fileName: 'clear-cache',
|
|
111
|
+
data: { clearedCount },
|
|
112
|
+
summary: `Cleared ${clearedCount} cache entries`,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
handleCliError(error);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
// spo-list-items
|
|
120
|
+
program
|
|
121
|
+
.command('list-items')
|
|
122
|
+
.description('List all files and folders in a document library or folder')
|
|
123
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
124
|
+
.requiredOption('--drive-id <driveId>', 'Drive ID')
|
|
125
|
+
.option('--folder-id <folderId>', 'Folder ID (defaults to root)')
|
|
126
|
+
.action(async (opts) => {
|
|
127
|
+
try {
|
|
128
|
+
const items = await ctx.lists.listItems(opts.siteId, opts.driveId, opts.folderId);
|
|
129
|
+
outputResult({
|
|
130
|
+
fileName: `items-${opts.driveId}`,
|
|
131
|
+
data: items,
|
|
132
|
+
summary: `Found ${items.length} item(s):\n` +
|
|
133
|
+
items.slice(0, 20).map((i) => ` - ${i.folder ? '[folder]' : '[file]'} ${i.name}`).join('\n') +
|
|
134
|
+
(items.length > 20 ? `\n ... and ${items.length - 20} more` : ''),
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
handleCliError(error);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
// spo-get-item
|
|
142
|
+
program
|
|
143
|
+
.command('get-item')
|
|
144
|
+
.description('Get detailed file or folder metadata by ID')
|
|
145
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
146
|
+
.requiredOption('--drive-id <driveId>', 'Drive ID')
|
|
147
|
+
.requiredOption('--item-id <itemId>', 'Item ID')
|
|
148
|
+
.action(async (opts) => {
|
|
149
|
+
try {
|
|
150
|
+
const item = await ctx.lists.getItem(opts.siteId, opts.driveId, opts.itemId);
|
|
151
|
+
outputResult({
|
|
152
|
+
fileName: `item-${opts.itemId}`,
|
|
153
|
+
data: item,
|
|
154
|
+
summary: `Item: ${item.name || opts.itemId}\nType: ${item.folder ? 'Folder' : 'File'}`,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
handleCliError(error);
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
// spo-get-item-by-path
|
|
162
|
+
program
|
|
163
|
+
.command('get-item-by-path')
|
|
164
|
+
.description('Get file or folder metadata by path (relative to drive root)')
|
|
165
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
166
|
+
.requiredOption('--drive-id <driveId>', 'Drive ID')
|
|
167
|
+
.requiredOption('--path <path>', 'Item path relative to drive root')
|
|
168
|
+
.action(async (opts) => {
|
|
169
|
+
try {
|
|
170
|
+
const item = await ctx.lists.getItemByPath(opts.siteId, opts.driveId, opts.path);
|
|
171
|
+
outputResult({
|
|
172
|
+
fileName: `item-by-path`,
|
|
173
|
+
data: item,
|
|
174
|
+
summary: `Item: ${item.name || opts.path}\nType: ${item.folder ? 'Folder' : 'File'}`,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
handleCliError(error);
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
// spo-search-items
|
|
182
|
+
program
|
|
183
|
+
.command('search-items')
|
|
184
|
+
.description('Search for files by filename or metadata')
|
|
185
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
186
|
+
.requiredOption('--query <query>', 'Search query')
|
|
187
|
+
.option('--drive-id <driveId>', 'Limit search to specific drive')
|
|
188
|
+
.option('--limit <limit>', 'Maximum results', parseInt)
|
|
189
|
+
.action(async (opts) => {
|
|
190
|
+
try {
|
|
191
|
+
const result = await ctx.lists.searchItems(opts.siteId, opts.query, opts.driveId, opts.limit);
|
|
192
|
+
const items = result.items || [];
|
|
193
|
+
outputResult({
|
|
194
|
+
fileName: `search-${opts.query.replace(/[^a-zA-Z0-9]/g, '_')}`,
|
|
195
|
+
data: result,
|
|
196
|
+
summary: `Search "${opts.query}": ${items.length} result(s)\n` +
|
|
197
|
+
items.slice(0, 10).map((i) => ` - ${i.name}`).join('\n') +
|
|
198
|
+
(items.length > 10 ? `\n ... and ${items.length - 10} more` : ''),
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
handleCliError(error);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
// spo-get-recent-items
|
|
206
|
+
program
|
|
207
|
+
.command('get-recent-items')
|
|
208
|
+
.description('Get recently modified items in a document library')
|
|
209
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
210
|
+
.requiredOption('--drive-id <driveId>', 'Drive ID')
|
|
211
|
+
.option('--limit <limit>', 'Maximum results (default: 20)', parseInt)
|
|
212
|
+
.option('--days <days>', 'Days back to search (default: 30)', parseInt)
|
|
213
|
+
.action(async (opts) => {
|
|
214
|
+
try {
|
|
215
|
+
const items = await ctx.lists.getRecentItems(opts.siteId, opts.driveId, opts.limit, opts.days);
|
|
216
|
+
outputResult({
|
|
217
|
+
fileName: `recent-items-${opts.driveId}`,
|
|
218
|
+
data: items,
|
|
219
|
+
summary: `Found ${items.length} recently modified item(s):\n` +
|
|
220
|
+
items.slice(0, 10).map((i) => ` - ${i.name} (${i.lastModifiedDateTime})`).join('\n') +
|
|
221
|
+
(items.length > 10 ? `\n ... and ${items.length - 10} more` : ''),
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
handleCliError(error);
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
// spo-get-folder-structure
|
|
229
|
+
program
|
|
230
|
+
.command('get-folder-structure')
|
|
231
|
+
.description('Get recursive folder tree structure')
|
|
232
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
233
|
+
.requiredOption('--drive-id <driveId>', 'Drive ID')
|
|
234
|
+
.option('--folder-id <folderId>', 'Root folder ID (defaults to drive root)')
|
|
235
|
+
.option('--depth <depth>', 'Recursion depth (default: 3, max: 10)', parseInt)
|
|
236
|
+
.action(async (opts) => {
|
|
237
|
+
try {
|
|
238
|
+
const tree = await ctx.lists.getFolderStructure(opts.siteId, opts.driveId, opts.folderId, opts.depth);
|
|
239
|
+
outputResult({
|
|
240
|
+
fileName: `folder-structure-${opts.driveId}`,
|
|
241
|
+
data: tree,
|
|
242
|
+
summary: `Folder structure retrieved for drive ${opts.driveId} (depth: ${opts.depth || 3})`,
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
catch (error) {
|
|
246
|
+
handleCliError(error);
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
// spo-get-crm-doc-locs
|
|
250
|
+
program
|
|
251
|
+
.command('get-crm-doc-locs')
|
|
252
|
+
.description('Get SharePoint document locations configured in PowerPlatform Dataverse')
|
|
253
|
+
.option('--entity-name <entityName>', 'Filter by entity logical name')
|
|
254
|
+
.option('--record-id <recordId>', 'Filter by specific record ID (GUID)')
|
|
255
|
+
.action(async (opts) => {
|
|
256
|
+
try {
|
|
257
|
+
const ppService = ctx.getPowerPlatformService();
|
|
258
|
+
const locations = await ctx.lists.getCrmDocumentLocations(ppService, opts.entityName, opts.recordId);
|
|
259
|
+
outputResult({
|
|
260
|
+
fileName: 'crm-doc-locs',
|
|
261
|
+
data: locations,
|
|
262
|
+
summary: `Found ${locations.length} CRM document location(s)`,
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
catch (error) {
|
|
266
|
+
handleCliError(error);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
// spo-validate-doc-loc
|
|
270
|
+
program
|
|
271
|
+
.command('validate-doc-loc')
|
|
272
|
+
.description('Validate a PowerPlatform document location configuration')
|
|
273
|
+
.requiredOption('--document-location-id <id>', 'GUID of the sharepointdocumentlocation record')
|
|
274
|
+
.action(async (opts) => {
|
|
275
|
+
try {
|
|
276
|
+
const ppService = ctx.getPowerPlatformService();
|
|
277
|
+
const result = await ctx.lists.validateDocumentLocation(ppService, opts.documentLocationId);
|
|
278
|
+
outputResult({
|
|
279
|
+
fileName: `validate-doc-loc-${opts.documentLocationId}`,
|
|
280
|
+
data: result,
|
|
281
|
+
summary: `Validation status: ${result.status?.toUpperCase() || 'UNKNOWN'}`,
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
catch (error) {
|
|
285
|
+
handleCliError(error);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
// spo-verify-doc-mig
|
|
289
|
+
program
|
|
290
|
+
.command('verify-doc-mig')
|
|
291
|
+
.description('Verify that documents were successfully migrated between SharePoint folders')
|
|
292
|
+
.requiredOption('--source-site-id <sourceSiteId>', 'Source SharePoint site ID')
|
|
293
|
+
.requiredOption('--source-path <sourcePath>', 'Source folder path')
|
|
294
|
+
.requiredOption('--target-site-id <targetSiteId>', 'Target SharePoint site ID')
|
|
295
|
+
.requiredOption('--target-path <targetPath>', 'Target folder path')
|
|
296
|
+
.action(async (opts) => {
|
|
297
|
+
try {
|
|
298
|
+
const ppService = ctx.getPowerPlatformService();
|
|
299
|
+
const result = await ctx.lists.verifyDocumentMigration(ppService, opts.sourceSiteId, opts.sourcePath, opts.targetSiteId, opts.targetPath);
|
|
300
|
+
outputResult({
|
|
301
|
+
fileName: 'verify-doc-mig',
|
|
302
|
+
data: result,
|
|
303
|
+
summary: `Migration verification: ${result.status?.toUpperCase() || 'UNKNOWN'}\n` +
|
|
304
|
+
`Success rate: ${result.successRate || 0}%`,
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
handleCliError(error);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
// spo-download-file
|
|
312
|
+
program
|
|
313
|
+
.command('download-file')
|
|
314
|
+
.description('Download file content from SharePoint')
|
|
315
|
+
.requiredOption('--site-id <siteId>', 'Site ID from configuration')
|
|
316
|
+
.requiredOption('--drive-id <driveId>', 'Drive ID')
|
|
317
|
+
.option('--item-id <itemId>', 'Item ID (use this OR --path)')
|
|
318
|
+
.option('--path <path>', 'File path relative to drive root (use this OR --item-id)')
|
|
319
|
+
.action(async (opts) => {
|
|
320
|
+
try {
|
|
321
|
+
if (!opts.itemId && !opts.path) {
|
|
322
|
+
handleCliError(new Error("Provide either --item-id or --path to identify the file."));
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
const byPath = !opts.itemId;
|
|
326
|
+
const identifier = opts.itemId || opts.path;
|
|
327
|
+
const result = await ctx.files.downloadFile(opts.siteId, opts.driveId, identifier, byPath);
|
|
328
|
+
outputResult({
|
|
329
|
+
fileName: `download-${result.fileName || 'file'}`,
|
|
330
|
+
data: {
|
|
331
|
+
fileName: result.fileName,
|
|
332
|
+
mimeType: result.mimeType,
|
|
333
|
+
encoding: result.encoding,
|
|
334
|
+
size: result.size,
|
|
335
|
+
itemId: result.itemId,
|
|
336
|
+
webUrl: result.webUrl,
|
|
337
|
+
content: result.content,
|
|
338
|
+
},
|
|
339
|
+
summary: `Downloaded: ${result.fileName}\nSize: ${result.size} bytes\nEncoding: ${result.encoding}`,
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
catch (error) {
|
|
343
|
+
handleCliError(error);
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
//# sourceMappingURL=read-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-commands.js","sourceRoot":"","sources":["../../../src/cli/commands/read-commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,UAAU,oBAAoB,CAAC,OAAgB,EAAE,GAAmB;IAExE,iBAAiB;IACjB,OAAO;SACJ,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,4DAA4D,CAAC;SACzE,MAAM,CAAC,KAAK,IAAI,EAAE;QACjB,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,GAAG,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC;YAC3C,YAAY,CAAC;gBACX,QAAQ,EAAE,YAAY;gBACtB,IAAI,EAAE,KAAK;gBACX,OAAO,EAAE,SAAS,KAAK,CAAC,MAAM,wBAAwB;oBACpD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;aACnG,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,cAAc,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,CAAC,CAAC;IAEL,oBAAoB;IACpB,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,kDAAkD,CAAC;SAC/D,cAAc,CAAC,oBAAoB,EAAE,4BAA4B,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AAC,QAAQ;oBAClC,QAAQ,EAAG,MAAc,CAAC,QAAQ;oBAClC,IAAI,EAAG,MAAc,CAAC,IAAI;oBAC1B,MAAM,EAAG,MAAc,CAAC,MAAM;oBAC9B,MAAM,EAAG,MAAc,CAAC,MAAM;oBAC9B,OAAO,EAAG,MAAc,CAAC,OAAO;iBACjC;gBACD,OAAO,EAAE,eAAgB,MAAc,CAAC,QAAQ,WAAY,MAAc,CAAC,IAAI,qBAAsB,MAAc,CAAC,QAAQ,EAAE;aAC/H,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,cAAc,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Output Helper
|
|
3
|
+
*
|
|
4
|
+
* Saves full JSON responses to `.mcp-spo-cache/` and prints
|
|
5
|
+
* a concise summary to stdout.
|
|
6
|
+
*/
|
|
7
|
+
export interface OutputOptions {
|
|
8
|
+
/** Base filename (without extension) for the cached JSON file */
|
|
9
|
+
fileName: string;
|
|
10
|
+
/** Full data object to persist */
|
|
11
|
+
data: unknown;
|
|
12
|
+
/** Human-readable summary printed to stdout */
|
|
13
|
+
summary: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Write full JSON to cache directory and print summary to stdout.
|
|
17
|
+
*/
|
|
18
|
+
export declare function outputResult({ fileName, data, summary }: OutputOptions): void;
|
|
19
|
+
/**
|
|
20
|
+
* Print an error message to stderr and exit with code 1.
|
|
21
|
+
*/
|
|
22
|
+
export declare function handleCliError(error: unknown): void;
|
|
23
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,kCAAkC;IAClC,IAAI,EAAE,OAAO,CAAC;IACd,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,aAAa,GAAG,IAAI,CAW7E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAInD"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Output Helper
|
|
3
|
+
*
|
|
4
|
+
* Saves full JSON responses to `.mcp-spo-cache/` and prints
|
|
5
|
+
* a concise summary to stdout.
|
|
6
|
+
*/
|
|
7
|
+
import { writeFileSync, mkdirSync, existsSync } from 'node:fs';
|
|
8
|
+
import { join } from 'node:path';
|
|
9
|
+
const CACHE_DIR = '.mcp-spo-cache';
|
|
10
|
+
/**
|
|
11
|
+
* Write full JSON to cache directory and print summary to stdout.
|
|
12
|
+
*/
|
|
13
|
+
export function outputResult({ fileName, data, summary }) {
|
|
14
|
+
// Ensure cache directory exists
|
|
15
|
+
if (!existsSync(CACHE_DIR)) {
|
|
16
|
+
mkdirSync(CACHE_DIR, { recursive: true });
|
|
17
|
+
}
|
|
18
|
+
const filePath = join(CACHE_DIR, `${fileName}.json`);
|
|
19
|
+
writeFileSync(filePath, JSON.stringify(data, null, 2), 'utf-8');
|
|
20
|
+
console.log(summary);
|
|
21
|
+
console.log(`\nFull output: ${filePath}`);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Print an error message to stderr and exit with code 1.
|
|
25
|
+
*/
|
|
26
|
+
export function handleCliError(error) {
|
|
27
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
28
|
+
console.error(`Error: ${message}`);
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,SAAS,GAAG,gBAAgB,CAAC;AAWnC;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAiB;IACrE,gCAAgC;IAChC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC3B,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,OAAO,CAAC,CAAC;IACrD,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAEhE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,OAAO,CAAC,GAAG,CAAC,kBAAkB,QAAQ,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,UAAU,OAAO,EAAE,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
|
package/build/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;GAKG"}
|
package/build/cli.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @mcp-consultant-tools/sharepoint CLI
|
|
4
|
+
*
|
|
5
|
+
* Command-line interface for SharePoint Online operations.
|
|
6
|
+
* Reuses the same ServiceContext and services as the MCP server.
|
|
7
|
+
*/
|
|
8
|
+
import { createCliProgram, loadEnvForCli } from '@mcp-consultant-tools/core';
|
|
9
|
+
import { createServiceContext } from './context-factory.js';
|
|
10
|
+
import { registerAllCommands } from './cli/commands/index.js';
|
|
11
|
+
const program = createCliProgram({
|
|
12
|
+
name: 'mcp-spo-cli',
|
|
13
|
+
description: 'SharePoint Online CLI - site management, document libraries, and file access',
|
|
14
|
+
version: '27.0.0',
|
|
15
|
+
});
|
|
16
|
+
// Load env before parsing (--env-file handled by commander hook)
|
|
17
|
+
program.hook('preAction', (thisCommand) => {
|
|
18
|
+
const opts = thisCommand.opts();
|
|
19
|
+
loadEnvForCli(opts.envFile);
|
|
20
|
+
});
|
|
21
|
+
const ctx = createServiceContext();
|
|
22
|
+
registerAllCommands(program, ctx);
|
|
23
|
+
program.parseAsync(process.argv).catch((error) => {
|
|
24
|
+
console.error('CLI error:', error.message);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
});
|
|
27
|
+
//# sourceMappingURL=cli.js.map
|
package/build/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AAEH,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,MAAM,OAAO,GAAG,gBAAgB,CAAC;IAC/B,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8EAA8E;IAC3F,OAAO,EAAE,QAAQ;CAClB,CAAC,CAAC;AAEH,iEAAiE;AACjE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,WAAgB,EAAE,EAAE;IAC7C,MAAM,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IAChC,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,MAAM,GAAG,GAAG,oBAAoB,EAAE,CAAC;AACnC,mBAAmB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAElC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAU,EAAE,EAAE;IACpD,OAAO,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-factory.d.ts","sourceRoot":"","sources":["../src/context-factory.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,wBAAgB,oBAAoB,IAAI,cAAc,CAsFrD"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared service context factory - used by both MCP server and CLI.
|
|
3
|
+
*/
|
|
4
|
+
import { SharePointService } from './services/sharepoint-service.js';
|
|
5
|
+
import { ListService } from './services/list-service.js';
|
|
6
|
+
import { FileOperationsService } from './services/file-operations-service.js';
|
|
7
|
+
export function createServiceContext() {
|
|
8
|
+
let service = null;
|
|
9
|
+
let listService = null;
|
|
10
|
+
let fileOps = null;
|
|
11
|
+
function getSharePointService() {
|
|
12
|
+
if (!service) {
|
|
13
|
+
const missingConfig = [];
|
|
14
|
+
let resources = [];
|
|
15
|
+
if (process.env.SHAREPOINT_SITES) {
|
|
16
|
+
try {
|
|
17
|
+
resources = JSON.parse(process.env.SHAREPOINT_SITES);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
throw new Error('Failed to parse SHAREPOINT_SITES JSON');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
else if (process.env.SHAREPOINT_SITE_URL) {
|
|
24
|
+
resources = [{
|
|
25
|
+
id: 'default',
|
|
26
|
+
name: 'Default SharePoint Site',
|
|
27
|
+
siteUrl: process.env.SHAREPOINT_SITE_URL,
|
|
28
|
+
active: true,
|
|
29
|
+
}];
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
missingConfig.push('SHAREPOINT_SITES or SHAREPOINT_SITE_URL');
|
|
33
|
+
}
|
|
34
|
+
if (!process.env.SHAREPOINT_TENANT_ID)
|
|
35
|
+
missingConfig.push('SHAREPOINT_TENANT_ID');
|
|
36
|
+
if (!process.env.SHAREPOINT_CLIENT_ID)
|
|
37
|
+
missingConfig.push('SHAREPOINT_CLIENT_ID');
|
|
38
|
+
if (!process.env.SHAREPOINT_CLIENT_SECRET)
|
|
39
|
+
missingConfig.push('SHAREPOINT_CLIENT_SECRET');
|
|
40
|
+
if (missingConfig.length > 0) {
|
|
41
|
+
throw new Error(`Missing SharePoint configuration: ${missingConfig.join(', ')}`);
|
|
42
|
+
}
|
|
43
|
+
const config = {
|
|
44
|
+
sites: resources,
|
|
45
|
+
authMethod: 'entra-id',
|
|
46
|
+
tenantId: process.env.SHAREPOINT_TENANT_ID,
|
|
47
|
+
clientId: process.env.SHAREPOINT_CLIENT_ID,
|
|
48
|
+
clientSecret: process.env.SHAREPOINT_CLIENT_SECRET,
|
|
49
|
+
};
|
|
50
|
+
service = new SharePointService(config);
|
|
51
|
+
console.error('SharePoint service initialized');
|
|
52
|
+
}
|
|
53
|
+
return service;
|
|
54
|
+
}
|
|
55
|
+
function getListService() {
|
|
56
|
+
if (!listService) {
|
|
57
|
+
listService = new ListService(getSharePointService());
|
|
58
|
+
}
|
|
59
|
+
return listService;
|
|
60
|
+
}
|
|
61
|
+
function getFileOperationsService() {
|
|
62
|
+
if (!fileOps) {
|
|
63
|
+
fileOps = new FileOperationsService(getSharePointService(), {
|
|
64
|
+
maxDownloadSizeMB: parseInt(process.env.SHAREPOINT_MAX_DOWNLOAD_SIZE_MB || '50', 10),
|
|
65
|
+
maxUploadSizeMB: parseInt(process.env.SHAREPOINT_MAX_UPLOAD_SIZE_MB || '100', 10),
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
return fileOps;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
get sharepoint() { return getSharePointService(); },
|
|
72
|
+
get lists() { return getListService(); },
|
|
73
|
+
get files() { return getFileOperationsService(); },
|
|
74
|
+
getPowerPlatformService() {
|
|
75
|
+
throw new Error('PowerPlatform integration not available in standalone SharePoint package.');
|
|
76
|
+
},
|
|
77
|
+
checkWriteEnabled() {
|
|
78
|
+
if (process.env.SHAREPOINT_ENABLE_WRITE !== 'true') {
|
|
79
|
+
throw new Error('Write operations are disabled. Set SHAREPOINT_ENABLE_WRITE=true to enable.');
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
checkDeleteEnabled() {
|
|
83
|
+
if (process.env.SHAREPOINT_ENABLE_DELETE !== 'true') {
|
|
84
|
+
throw new Error('Delete operations are disabled. Set SHAREPOINT_ENABLE_DELETE=true to enable.');
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//# 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,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE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