npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sharepoint-cave-adapter

v1.0.0

Published

Cave adapter for SharePoint: upload/download via Microsoft Graph, embed URLs for Continuum assets

Downloads

97

Readme

sharepoint-cave-adapter

Cave adapter for SharePoint via Microsoft Graph. Upload and download files (e.g. Continuum assets), and expose stream/embed URLs so assets can be embedded in SharePoint sites.

Env

| Env | Description | |-----|-------------| | SHAREPOINT_CLIENT_ID | Azure AD app (client) ID | | SHAREPOINT_TENANT_ID | Azure AD tenant ID | | SHAREPOINT_CLIENT_SECRET | Azure AD app secret | | SHAREPOINT_SITE_ID | SharePoint site ID (optional if per-tenant provides it) | | SHAREPOINT_DRIVE_ID | SharePoint drive ID (optional; can be resolved from site) |

Routes

When credentials are set, the adapter mounts under a base path (default /api/sharepoint):

  • POST /upload — Upload a file. Body: JSON { "name": "file.pdf", "parentPath": "folder", "content": "<base64>" } or raw body with query name, parentPath. Uses Graph direct upload (< 4 MB) or createUploadSession for larger files.
  • GET /stream/:driveId/:itemId — Stream or redirect to file content. Use as embed src or for download.
  • GET /embed-url/:driveId/:itemId — Returns { streamUrl, embedUrl } for use in SharePoint web parts or iframes.

Per-tenant OAuth2

Pass getTenantCredentials(tenantId) returning { clientId, tenantId, clientSecret, siteId?, driveId? } so each tenant can use a different Azure app and/or site/drive. Use with getTenantFromRequest(req) (e.g. deriveTenantFromRequest from dotcms-login-adapter).

Usage (node-mod-editor)

Mount when SharePoint env (or getTenantCredentials) is configured:

import { createSharePointCaveAdapter } from 'sharepoint-cave-adapter';
import { deriveTenantFromRequest } from 'dotcms-login-adapter';

createSharePointCaveAdapter({
  getTenantFromRequest: (req) => deriveTenantFromRequest(req),
  logger,
}).mount(app, '/api/sharepoint');

Continuum integration

Use Continuum (via continuum-cave-adapter) for search and document metadata; use this adapter to upload the same assets to SharePoint and to serve stream URLs so SharePoint pages can embed them (iframe or video/source pointing at /api/sharepoint/stream/:driveId/:itemId).