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

@viechoice/scrape-service-lib

v1.1.21

Published

Generated TypeScript client wrapping the marketing scrape service API.

Downloads

103

Readme

scrape-service-lib

Generated TypeScript client wrapping the marketing scrape service API.

Project structure

  • api/: OpenAPI definitions (api.cleaned.yaml drives the generator).
  • scripts/: helper scripts for the generator (custom request + wrapper CLI).
  • src/: TypeScript source generated from the OpenAPI spec plus lightweight wrappers.
  • dist/: compiled output produced by pnpm run build.

Key scripts

  • pnpm run generate: regenerates the TypeScript client from the OpenAPI spec.
  • pnpm run build: compiles the client into dist/.
  • pnpm run prepare: convenience script that runs both commands; executed automatically before publishing.

Publishing to npm

  1. Store the npm automation token as the NPM_TOKEN secret in the GitHub repository (Settings → Secrets and variables → Actions).
  2. Push changes to main or production. The Publish library to npm workflow builds the client and runs npm publish --access public.
  3. Ensure package.json#version is bumped before pushing, otherwise the publish step will fail because npm rejects duplicate versions.

The package is published under the scoped name @viechoice/scrape-service-lib with public access. Install directly via:

pnpm add @viechoice/scrape-service-lib

How to consume the client

  1. Install normally in your application:

    pnpm add @viechoice/scrape-service-lib
  2. Instantiate the generated client (simplified example). If you pass a TOKEN (or per-request headers.Authorization), the client skips the browser localStorage refresh logic automatically:

    import { AppClient, DefaultService } from '@viechoice/scrape-service-lib';
    
    const client = new AppClient({
      BASE: 'https://your-api-host',
      TOKEN: process.env.SCRAPE_SERVICE_TOKEN,
      HEADERS: {
        'x-api-key-service': process.env.SCRAPE_SERVICE_API_KEY ?? '',
      },
    });
    
    const data = await DefaultService.scrapeControllerScrape({
      body: {
        socialNetwork: 'FACEBOOK',
        contentType: 'POST',
        url: 'https://facebook.com/some-post',
      },
    });
    
    console.log(data);
  3. For CI, you only need npm auth if the registry requires it globally (public packages do not). Keep NPM_TOKEN handy for publishing workflows.