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 🙏

© 2024 – Pkg Stats / Ryan Hefner

pubeler

v1.0.22

Published

A console application that can call Rest APIs with data from flat files.

Downloads

2

Readme

pubeler

pronounced pyüb-lər

A utility to automate the publishing of data contained in flat files to resful APIs. At this time this is setup to use device OAuth workflow.

installation

npm install --global pubeler

or

npm i -g pubeler

running it

pubeler --configFile <config-file --required> --dataFile <data-file --required>

Note: This application uses the device workflow, so you will need to complete the authentication process with your identity provider.

getting help

pubeler --help

If this doesn't provide what you need, feel free to submit a new issue ticket here.

enabling OAuth debugging (--oauthDebug)

pubeler --configFile <config-file --required> --dataFile <data-file --required> --oauthDebug

This will write out the aquired jwt from the oauth provider to the console.

config file

This is a JSON file that will inform Pubeler on how to authenticate with your identity provider and communicate with your APIs.

Here's a sample:

{
  "textDelimeter": "\t",
  "postDestinationUrl": "https://my-post-url.com/api/myrecords.json",
  "oauth_client_id": "my-client-id",
  "oauth_device_code_url": "https://{tenant-name}.auth0.com/oauth/token",
  "oauth_token_url": "https://{tenant-name}.auth0.com/oauth/token",
  "oauth_audience": "{your-audience}",
  "oauth_scope": "openid",
  // This is an optional setting, only to be used when absolutely necessary
  "skip_ssl_validation": false,
}

Note: Your identity provider has to support the device workflow. I recommend using Auth0 as they have an easy to use implementation of this workflow.

error handling

If a post related error occurs, a new txt file will be created containing the records that caused an error response (HTTP 400-500 response codes.) This file will allow you to easily retry failed records in a subsequent run. The generated text file name will be named: {url pathinfo}.{timestamp (yyMMddHHmmss)}.failures.txt. An example of this would be: myrecords.json.221208011433.failures.txt.

The server response which typically indicates why the post request failed will be logged to the console. Additionally, authentication/OAuth related errors will be logged to the console as well.