Skip to content

Add SharePoint transport#11

Merged
llbbl merged 1 commit into
mainfrom
issue-4-sharepoint-transport
Jul 25, 2026
Merged

Add SharePoint transport#11
llbbl merged 1 commit into
mainfrom
issue-4-sharepoint-transport

Conversation

@llbbl

@llbbl llbbl commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Closes #4

Summary

  • Add a SharePoint transport with app-only MSAL client-credential auth using the Microsoft Graph .default scope.
  • Upload and replace DOCX files through the Graph simple-upload endpoint while returning stable drive item metadata.
  • Document SharePoint-specific path rules, permissions, and testing coverage for the TeamWiki-style consumer flow.

Changes

Features

  • src/sharepoint.ts: Add SharePoint transport, token-provider helpers, upload flow, path validation, and sanitized typed errors.
  • src/index.ts: Export the new SharePoint transport surface.
  • src/transport.ts: Add SharePoint transport error codes.

Tests

  • tests/index.test.ts: Add mocked Graph coverage for auth, upload, overwrite/version-history behavior, path validation, and acceptance-style flows.

Documentation

  • README.md: Document SharePoint transport setup, .default auth, Sites.Selected plus site-specific write grants, and behavior limits.
  • package.json: Add the MSAL dependency.
  • pnpm-lock.yaml: Lock the MSAL dependency graph.
  • .gitignore: Ignore additional local context artifacts.

Test plan

  • pnpm install --frozen-lockfile
  • pnpm check (116 passed, 2 skipped)
  • Forced real-Pandoc Vitest run (117 passed, 1 platform skip)
  • Node 20, 22, and 24 matrix checks
  • actionlint
  • Package contents check
  • Independent JS/TS review PASS
  • Live Microsoft tenant integration test (not run by design)

Notes

  • App-only auth uses the Graph .default scope; Sites.Selected remains the application permission plus site-specific grant, not an OAuth scope.
  • Uploads use Graph simple PUT, so upload sessions for files larger than 250 MB are not included in this change.

@llbbl
llbbl merged commit 8ab6bd8 into main Jul 25, 2026
4 checks passed
@llbbl
llbbl deleted the issue-4-sharepoint-transport branch July 25, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SharePointTransport (NEW — Microsoft Graph)

1 participant