@mcp-consultant-tools/sharepoint 28.0.0-beta.10 → 28.0.0-beta.15

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.
@@ -5,4 +5,5 @@ import type { Command } from 'commander';
5
5
  import type { ServiceContext } from '../../context-factory.js';
6
6
  export declare function registerAllCommands(program: Command, ctx: ServiceContext): void;
7
7
  export { registerReadCommands } from './read-commands.js';
8
+ export { registerWriteCommands } from './write-commands.js';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
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;AAI/D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAG/E;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -2,8 +2,11 @@
2
2
  * CLI Commands barrel export + combined registration
3
3
  */
4
4
  import { registerReadCommands } from './read-commands.js';
5
+ import { registerWriteCommands } from './write-commands.js';
5
6
  export function registerAllCommands(program, ctx) {
6
7
  registerReadCommands(program, ctx);
8
+ registerWriteCommands(program, ctx);
7
9
  }
8
10
  export { registerReadCommands } from './read-commands.js';
11
+ export { registerWriteCommands } from './write-commands.js';
9
12
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
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;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,UAAU,mBAAmB,CAAC,OAAgB,EAAE,GAAmB;IACvE,oBAAoB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IACnC,qBAAqB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AACtC,CAAC;AAED,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * SharePoint Write CLI Commands
3
+ *
4
+ * Maps 6 write MCP tools to Commander CLI commands under the `write` subcommand group.
5
+ * Requires SHAREPOINT_ENABLE_WRITE=true for upload/create-folder/move/copy/rename.
6
+ * Requires SHAREPOINT_ENABLE_DELETE=true for delete.
7
+ */
8
+ import type { Command } from 'commander';
9
+ import type { ServiceContext } from '../../context-factory.js';
10
+ export declare function registerWriteCommands(program: Command, ctx: ServiceContext): void;
11
+ //# sourceMappingURL=write-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/write-commands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI,CAoLjF"}
@@ -0,0 +1,153 @@
1
+ /**
2
+ * SharePoint Write CLI Commands
3
+ *
4
+ * Maps 6 write MCP tools to Commander CLI commands under the `write` subcommand group.
5
+ * Requires SHAREPOINT_ENABLE_WRITE=true for upload/create-folder/move/copy/rename.
6
+ * Requires SHAREPOINT_ENABLE_DELETE=true for delete.
7
+ */
8
+ import { outputResult, handleCliError } from '../output.js';
9
+ export function registerWriteCommands(program, ctx) {
10
+ const write = program.command('write').description('Write operations (upload, create folder, move, copy, rename, delete)');
11
+ // spo-upload-file
12
+ write
13
+ .command('upload')
14
+ .description('Upload a file to a SharePoint document library. Requires SHAREPOINT_ENABLE_WRITE=true.')
15
+ .requiredOption('--site-id <siteId>', 'Site ID from configuration')
16
+ .requiredOption('--drive-id <driveId>', 'Drive ID')
17
+ .requiredOption('--path <path>', 'Target file path relative to drive root (including filename)')
18
+ .requiredOption('--content <content>', 'File content (text string or base64-encoded binary)')
19
+ .option('--encoding <encoding>', "Content encoding: 'utf-8' for text (default), 'base64' for binary", 'utf-8')
20
+ .option('--overwrite', 'Overwrite if file exists (default: false)')
21
+ .action(async (opts) => {
22
+ try {
23
+ ctx.checkWriteEnabled();
24
+ const result = await ctx.files.uploadFile(opts.siteId, opts.driveId, opts.path, opts.content, opts.encoding || 'utf-8', opts.overwrite || false);
25
+ outputResult({
26
+ fileName: `upload-${result.name || 'file'}`,
27
+ data: result,
28
+ summary: `Uploaded: ${result.name}\nSize: ${result.size} bytes\nURL: ${result.webUrl || 'N/A'}`,
29
+ });
30
+ }
31
+ catch (error) {
32
+ handleCliError(error);
33
+ }
34
+ });
35
+ // spo-create-folder
36
+ write
37
+ .command('create-folder')
38
+ .description('Create a new folder in a SharePoint document library. Requires SHAREPOINT_ENABLE_WRITE=true.')
39
+ .requiredOption('--site-id <siteId>', 'Site ID from configuration')
40
+ .requiredOption('--drive-id <driveId>', 'Drive ID')
41
+ .requiredOption('--parent-path <parentPath>', "Parent folder path (use '/' for drive root)")
42
+ .requiredOption('--folder-name <folderName>', 'Name for the new folder')
43
+ .action(async (opts) => {
44
+ try {
45
+ ctx.checkWriteEnabled();
46
+ const result = await ctx.files.createFolder(opts.siteId, opts.driveId, opts.parentPath, opts.folderName);
47
+ outputResult({
48
+ fileName: `create-folder-${opts.folderName}`,
49
+ data: result,
50
+ summary: `Folder created: ${result.name}\nURL: ${result.webUrl || 'N/A'}`,
51
+ });
52
+ }
53
+ catch (error) {
54
+ handleCliError(error);
55
+ }
56
+ });
57
+ // spo-move-item
58
+ write
59
+ .command('move')
60
+ .description('Move a file or folder to a new location. Requires SHAREPOINT_ENABLE_WRITE=true.')
61
+ .requiredOption('--site-id <siteId>', 'Site ID from configuration')
62
+ .requiredOption('--drive-id <driveId>', 'Source drive ID')
63
+ .requiredOption('--item-id <itemId>', 'ID of the file or folder to move')
64
+ .requiredOption('--target-drive-id <targetDriveId>', 'Target drive ID (can be same as source)')
65
+ .requiredOption('--target-parent-path <targetParentPath>', 'Target parent folder path in the target drive')
66
+ .action(async (opts) => {
67
+ try {
68
+ ctx.checkWriteEnabled();
69
+ const result = await ctx.files.moveItem(opts.siteId, opts.driveId, opts.itemId, opts.targetDriveId, opts.targetParentPath);
70
+ outputResult({
71
+ fileName: `move-${opts.itemId}`,
72
+ data: result,
73
+ summary: `Moved: ${result.name}\n${result.message || ''}`,
74
+ });
75
+ }
76
+ catch (error) {
77
+ handleCliError(error);
78
+ }
79
+ });
80
+ // spo-copy-item
81
+ write
82
+ .command('copy')
83
+ .description('Copy a file or folder to a new location. Requires SHAREPOINT_ENABLE_WRITE=true.')
84
+ .requiredOption('--site-id <siteId>', 'Site ID from configuration')
85
+ .requiredOption('--drive-id <driveId>', 'Source drive ID')
86
+ .requiredOption('--item-id <itemId>', 'ID of the file or folder to copy')
87
+ .requiredOption('--target-drive-id <targetDriveId>', 'Target drive ID')
88
+ .requiredOption('--target-parent-path <targetParentPath>', 'Target parent folder path in the target drive')
89
+ .option('--new-name <newName>', 'Optional new name for the copy (defaults to original name)')
90
+ .action(async (opts) => {
91
+ try {
92
+ ctx.checkWriteEnabled();
93
+ const result = await ctx.files.copyItem(opts.siteId, opts.driveId, opts.itemId, opts.targetDriveId, opts.targetParentPath, opts.newName);
94
+ outputResult({
95
+ fileName: `copy-${opts.itemId}`,
96
+ data: result,
97
+ summary: `Copy initiated: ${result.name}\n${result.message || ''}`,
98
+ });
99
+ }
100
+ catch (error) {
101
+ handleCliError(error);
102
+ }
103
+ });
104
+ // spo-rename-item
105
+ write
106
+ .command('rename')
107
+ .description('Rename a file or folder in SharePoint. Requires SHAREPOINT_ENABLE_WRITE=true.')
108
+ .requiredOption('--site-id <siteId>', 'Site ID from configuration')
109
+ .requiredOption('--drive-id <driveId>', 'Drive ID')
110
+ .requiredOption('--item-id <itemId>', 'ID of the file or folder to rename')
111
+ .requiredOption('--new-name <newName>', 'New name for the file or folder (include file extension for files)')
112
+ .action(async (opts) => {
113
+ try {
114
+ ctx.checkWriteEnabled();
115
+ const result = await ctx.files.renameItem(opts.siteId, opts.driveId, opts.itemId, opts.newName);
116
+ outputResult({
117
+ fileName: `rename-${opts.itemId}`,
118
+ data: result,
119
+ summary: `Renamed to: ${result.name}\n${result.message || ''}`,
120
+ });
121
+ }
122
+ catch (error) {
123
+ handleCliError(error);
124
+ }
125
+ });
126
+ // spo-delete-item
127
+ write
128
+ .command('delete')
129
+ .description('Delete a file or folder from SharePoint. Requires SHAREPOINT_ENABLE_DELETE=true. Item is moved to recycle bin.')
130
+ .requiredOption('--site-id <siteId>', 'Site ID from configuration')
131
+ .requiredOption('--drive-id <driveId>', 'Drive ID')
132
+ .requiredOption('--item-id <itemId>', 'ID of the file or folder to delete')
133
+ .option('--confirm', 'Confirm deletion (required for safety)')
134
+ .action(async (opts) => {
135
+ try {
136
+ ctx.checkDeleteEnabled();
137
+ if (!opts.confirm) {
138
+ handleCliError(new Error('Deletion requires --confirm flag. This is a safety mechanism to prevent accidental deletions.'));
139
+ return;
140
+ }
141
+ const result = await ctx.files.deleteItem(opts.siteId, opts.driveId, opts.itemId);
142
+ outputResult({
143
+ fileName: `delete-${opts.itemId}`,
144
+ data: result,
145
+ summary: `Deleted: ${result.name}\n${result.message || ''}`,
146
+ });
147
+ }
148
+ catch (error) {
149
+ handleCliError(error);
150
+ }
151
+ });
152
+ }
153
+ //# sourceMappingURL=write-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write-commands.js","sourceRoot":"","sources":["../../../src/cli/commands/write-commands.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5D,MAAM,UAAU,qBAAqB,CAAC,OAAgB,EAAE,GAAmB;IAEzE,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,sEAAsE,CAAC,CAAC;IAE3H,kBAAkB;IAClB,KAAK;SACF,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,wFAAwF,CAAC;SACrG,cAAc,CAAC,oBAAoB,EAAE,4BAA4B,CAAC;SAClE,cAAc,CAAC,sBAAsB,EAAE,UAAU,CAAC;SAClD,cAAc,CAAC,eAAe,EAAE,8DAA8D,CAAC;SAC/F,cAAc,CAAC,qBAAqB,EAAE,qDAAqD,CAAC;SAC5F,MAAM,CAAC,uBAAuB,EAAE,mEAAmE,EAAE,OAAO,CAAC;SAC7G,MA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CAAC,KAAK,CAAC,UAAU,CACvC,IAAI,CAAC,MAAM,EACX,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,MAAM,CACZ,CAAC;YACF,YAAY,CAAC;gBACX,QAAQ,EAAE,UAAU,IAAI,CAAC,MAAM,EAAE;gBACjC,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,YAAa,MAAc,CAAC,IAAI,KAAM,MAAc,CAAC,OAAO,IAAI,EAAE,EAAE;aAC9E,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,cAAc,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * CLI Output Helper
3
3
  *
4
- * Saves full JSON responses to `.mcp-spo-cache/` and prints
4
+ * Saves full JSON responses to `.claude/.context/.mcp-spo-cache/` and prints
5
5
  * a concise summary to stdout.
6
6
  */
7
7
  export interface OutputOptions {
@@ -1 +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"}
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,CAY7E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAInD"}
@@ -1,21 +1,22 @@
1
1
  /**
2
2
  * CLI Output Helper
3
3
  *
4
- * Saves full JSON responses to `.mcp-spo-cache/` and prints
4
+ * Saves full JSON responses to `.claude/.context/.mcp-spo-cache/` and prints
5
5
  * a concise summary to stdout.
6
6
  */
7
7
  import { writeFileSync, mkdirSync, existsSync } from 'node:fs';
8
- import { join } from 'node:path';
8
+ import { join, resolve } from 'node:path';
9
9
  const CACHE_DIR = '.mcp-spo-cache';
10
10
  /**
11
11
  * Write full JSON to cache directory and print summary to stdout.
12
12
  */
13
13
  export function outputResult({ fileName, data, summary }) {
14
- // Ensure cache directory exists
15
- if (!existsSync(CACHE_DIR)) {
16
- mkdirSync(CACHE_DIR, { recursive: true });
14
+ // Resolve cache under .claude/.context/ (always gitignored)
15
+ const cacheBase = resolve(process.cwd(), '.claude', '.context', CACHE_DIR);
16
+ if (!existsSync(cacheBase)) {
17
+ mkdirSync(cacheBase, { recursive: true });
17
18
  }
18
- const filePath = join(CACHE_DIR, `${fileName}.json`);
19
+ const filePath = join(cacheBase, `${fileName}.json`);
19
20
  writeFileSync(filePath, JSON.stringify(data, null, 2), 'utf-8');
20
21
  console.log(summary);
21
22
  console.log(`\nFull output: ${filePath}`);
@@ -1 +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,M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AAE,IAAI,EAAE,OAAO,EAAiB;IACrE,4DAA4D;IAC5D,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IAC3E,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.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-consultant-tools/sharepoint",
3
- "version": "28.0.0-beta.10",
3
+ "version": "28.0.0-beta.15",
4
4
  "description": "MCP server for SharePoint Online - site management, document libraries, and PowerPlatform validation",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -41,7 +41,7 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@azure/msal-node": "^3.3.0",
44
- "@mcp-consultant-tools/core": "28.0.0-beta.10",
44
+ "@mcp-consultant-tools/core": "28.0.0-beta.13",
45
45
  "@microsoft/microsoft-graph-client": "^3.0.7",
46
46
  "@modelcontextprotocol/sdk": "^1.0.4",
47
47
  "axios": "^1.8.3",