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

glove-env-unlock

v2.0.0

Published

Shared password-based PDF, Office and ZIP unlocking for Glove working-environment adapters.

Readme

glove-env-unlock

Open password-protected files inside a Glove working environment using a known password. No native binaries, Python runtime, network upload or host temporary files are required. Decryption libraries load on first use.

The documents, spreadsheets, slides, archives, render and OCR adapters each export the same unlock(input, output, { password }) operation. The optional standalone unlock() adapter exposes it as env:unlock.

import { unlock, pdf } from 'env:documents';

export default async function main({ password }) {
  const path = await unlock('/inbox/statement.pdf', '/tmp/statement.pdf', { password });
  return pdf.extractText(path);
}

The returned path contains an unencrypted copy, usable by any registered adapter. Keep the input's file extension. The input and existing destination files are preserved. Incorrect passwords, damaged files and unsupported encryption fail without writing a result. Normal VFS zones, capacity limits and cancellation checks govern the output write. ZIP entry count and actual inflation are bounded as well.

| Input | Supported protection | | --- | --- | | PDF | Standard password security: RC4, AES-128, AES-256 | | DOCX, XLSX, PPTX | Office OOXML Standard and Agile encryption | | ZIP | AES and ZipCrypto, including mixed encrypted/plain entries |

Empty PDF passwords are supported. Legacy DOC/XLS/PPT, ODF encryption, certificate/DRM protection, RAR and 7z are outside this API. Unlocking does not convert formats or recover unknown passwords. Editing restrictions on unencrypted Office documents are separate from file encryption.

Host-side passwords

Working-environment script arguments are recorded in run history; saved scripts are also persisted. For sensitive passwords, unlock on the host before giving the agent the working path:

import { createUnlockBinding } from 'glove-env-unlock';

const path = await createUnlockBinding(env.fs)(
  '/inbox/statement.pdf',
  '/tmp/statement.pdf',
  { password: suppliedPassword },
);
// Give the agent `path` to read, render or OCR.

This call does not record the password in working-environment script history. Library errors are replaced with messages that do not include the password. The output is ordinary unencrypted VFS content: snapshots include it, and normal file-history retention applies. Choose persistence accordingly.

The implementation uses Cantoo PDF-lib, officecrypto-tool, and zip.js.