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

@render-lab/tasks-gdrive

v0.3.0

Published

Durable Google Drive tasks for Render Workflows: gdrive.upload/search/export.

Readme

@render-lab/tasks-gdrive

⚠️ Experimental: proof of concept. This package is part of the Render Tasks POC and is published for testing only. It is not fully tested or production ready. Task names, inputs, outputs, and behavior can change or break in any release. Pin exact versions and expect breaking changes.

Durable Google Drive tasks for Render Workflows.

import { upload, search, exportFile } from "@render-lab/tasks-gdrive";

| Task | Input | Output | | --------------------- | ----------------------------------------- | ---------------- | | gdrive.upload | { name, content, mimeType?, parentId? } | UploadResult | | gdrive.search | { query, limit? } | DriveFile[] | | gdrive.export | { fileId, mimeType } | ExportResult | | gdrive.getFile | { fileId } | DriveFile | | gdrive.download | { fileId } | DownloadResult | | gdrive.share | { fileId, role, type, emailAddress? } | ShareResult | | gdrive.createFolder | { name, parentId? } | DriveFile | | gdrive.move | { fileId, addParents?, removeParents? } | DriveFile | | gdrive.copy | { fileId, name? } | DriveFile | | gdrive.delete | { fileId } | DeleteResult |

All tasks return JSON-serializable DTOs (DriveFile, UploadResult, ExportResult, DownloadResult, ShareResult, DeleteResult) — never raw Google Drive API responses. The default port is fetch-backed against the Drive REST API at https://www.googleapis.com/drive/v3 (uploads go to https://www.googleapis.com/upload/drive/v3/files), authenticated with Authorization: Bearer $GOOGLE_ACCESS_TOKEN.

gdrive.upload defaults mimeType to text/plain and creates a file via a uploadType=multipart request. gdrive.export downloads a Doc/Sheet/Slide converted to the requested text MIME type (e.g. text/markdown, text/plain), whereas gdrive.download fetches a file's raw bytes (alt=media) as text. gdrive.share grants a permission (role + type, plus emailAddress for user/group grants) — the hand-off primitive. gdrive.getFile, gdrive.createFolder, gdrive.move (via addParents/removeParents), and gdrive.copy all return a DriveFile; gdrive.delete permanently removes a file and returns { id, deleted: true }.

Install

pnpm add @render-lab/tasks-gdrive @renderinc/sdk

@renderinc/sdk is a peer dependency. The package has no vendor dependency — it uses the global fetch.

Environment contract

Credentials are read lazily at the first API call, never at import (ADR-0007), so importing the package for one task never requires another's secret.

| Variable | Required | Purpose | | --------------------- | -------- | ----------------------------------------------------------------------- | | GOOGLE_ACCESS_TOKEN | yes | Google OAuth access token, sent as Authorization: Bearer …. |

OAuth is out of POC scope. These tasks take a pre-issued Google OAuth access token via GOOGLE_ACCESS_TOKEN (with the https://www.googleapis.com/auth/drive scope). Acquiring and refreshing that token — the OAuth consent + refresh flow — is the caller's responsibility and is not implemented here.

Extending & testing

Every operation exports the wrapped task and its raw *Impl. The impls depend on a small DrivePort interface, so they unit-test without touching the network:

import { uploadImpl, type DrivePort } from "@render-lab/tasks-gdrive";

const drive: Partial<DrivePort> = {
  upload: async () => ({
    id: "file-1",
    webViewLink: "https://drive.google.com/file/d/file-1/view",
  }),
};
await uploadImpl(
  { name: "brief.txt", content: "hello world" },
  { drive } as any,
);

Run the tests with pnpm -C packages/tasks-gdrive test.