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

probo-asset-receiver

v2.3.0

Published

[![Build Status](https://travis-ci.org/ProboCI/probo-asset-receiver.svg?branch=master)](https://travis-ci.org/ProboCI/probo-asset-receiver) [![Coverage Status](https://coveralls.io/repos/ProboCI/probo-asset-receiver/badge.svg?branch=master&service=github)

Downloads

12

Readme

Probo Asset Receiver

Build Status Coverage Status

Allows the upload of an asset

This project is designed to be used in conjunction with the corresponding CLI client (probo-uploader) to allow you to upload assets for use in probo builds.

Authentication

Token-based authentication can be enabled for all APIs except file upload. To enable it, add at least one token in the config file:

tokens:
  - token1
  - token2

To authenticate API calls use a bearer-token authentication header: Authentication: Bearer token1

curl -H "Authentication: Bearer token1" http://localhost:3000/buckets/foo

Usage

  1. Create a bucket to hold assets.
  2. Create a token that can be used to post assets into that bucket.
  3. Upload an asset into a bucket with the upload token.

1. Create a bucket

The following will create a bucket called foo and store the associated metadata key some with value metadata.

curl -XPOST -H "Content-Type: application/json" -i -d '{"some":"metadata"}' http://localhost:3000/buckets/foo

2. Create a token that can be used to post assets into that bucket

In order to upload assets to a bucket, you'll need an upload token. This is a shared secret (essentially like an API key) that allows you to upload assets to a particular bucket. You can create any number of these tokens per bucket and in

curl -i -XPOST http://localhost:3000/buckets/foo/token/bar

To delete a token:

curl -i -XDELETE http://localhost:3000/buckets/foo/token/bar

3. Use the super secret token to upload a file

The following curl command will upload our database.sql.gz file as raw binary data and name the asset baz for later reference.

curl -i -XPOST --data-binary @database.sql.gz http://localhost:3000/asset/bar/baz

4. Download the file that you uploaded

curl -i http://localhost:3000/asset/bar/baz > baz

5. Using Amazon S3 to storage your assets

You can use Amazon S3 storage to store your assets by using the AwsS3Storage Plugin. There is the example config file AwsS3Storage.config.yaml in this repository. You will need to provide your own access keys and bucket name from your Amazon account. You will want to move your config file outside of your git repo or add it to your .gitignore file. You can then use the config argument -c to tell the Probo Asset Reciever to override the defaults.config.yaml file with your own configuration file. Example:

./bin/probo-asset-receiver -c path/to/config-file/awsS3Storage.config.yaml

6. Pausing and unpausing file uploads

If doing server maintenance, it is often nice to be able to prevent new files from coming in but still allowing existing files to be served. This allows builds to continue to function even though new assets will not be allowed. This is helpful when migrating the files to a new server or system.

curl -X POST -H "Authorization: Bearer" -H content-type:application/json --data-binary '{"uploadsPaused": true}' http://localhost:3000/service/upload-status