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

@stackaid/stackaid-json-generator

v1.9.4

Published

Generate a stackaid.json file based on your repository's dependency graph

Downloads

17

Readme

build-test

generate-stackaid-json

A GitHub action to generate a stackaid.json file based on your repository's dependency graph

This action is primarily intended to support funding your dependencies on StackAid for ecosystems that are not yet natively supported (eg: Go, PHP, Python, etc.).

By using the GitHub dependency graph API this action is able to discover your direct and indirect dependencies and generate a stackaid.json file which can then be discovered and used by StackAid to fund your dependencies.

Here's an example workflow to add to your repository:

name: 'fund-on-stackaid'
on:
  push:
    branches:
      - main
jobs:
  stackaid-json:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-go@v3 # Only required for Go based repos
      - uses: stackaid/[email protected]

This will commit a stackaid.json file in your repository which will then automatically show up for funding in the StackAid dashboard.

The action also supports a few useful inputs and outputs so you can publish to a different repository or skip publishing all together and consume the generated stackaid.json in another action.

Inputs

  • token: An access token which has repo permissions. By default the action uses ${{ github.token }} automatically provided by the action runner.
  • publish_repo: The full name of the repository, (eg: username/repo-name) to publish the generated stackaid.json file. Defaults to the current repository.
  • publish_path: The path to publish to. By default the stackaid.json file is published to the root of the repository.
  • skip_publish: Set to true if you do not want to publish the generated file.
  • include_package_json: Only relavant when publish_repo is specified. Set to true if you want to copy package.json files to a non-sensitive repo. See the section below. Defaults to true.

Note: If you publish to a separate repo you will need to provide a personal access token with the appropriate repo permissions.

Outputs

  • stackaid_json: The generated stackaid.json file as a string.

Funding dependencies in sensitive repositories.

While this action is primarily designed to support languages StackAid does not natively support, it can also be used to allow you to fund dependencies in repositories without giving StackAid access to your source code.

Here's a simple guide:

  1. Create a new empty repository and grant acess to our GitHub app. This repository will just store the dependecy files you want to fund.

  2. Create a personal access token with full repo access and set the expriation to "No Expiration"

  3. Add the token as a secret to your github action workflow: https://docs.github.com/en/actions/security-guides/encrypted-secrets

  4. Configure this GitHub action to publish to your new repository.

token: ${{ secrets.STACKAID_ACCESS_TOKEN }}
publish_repo: 'owner/name' # of new repository
publish_path: ${{ github.repository }} # Publishes dependecy files under the current repo name. Avoids name conflicts when using this action on multiple repositories.