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

@koraykoska/dappnodesdk

v0.3.14

Published

dappnodesdk is a tool to make the creation of new dappnode packages as simple as possible. It helps to initialize and publish in ethereum blockchain

Downloads

675

Readme

DAppNodeSDK

The DappnodeSDK dappnodesdk is a tool that makes creating and publishing new Dappnode packages as simple as possible. It helps to initialize, build, test, and publish the new package/repo to an APM tracked on the Ethereum Mainnet.

We have deployed a public APM (Aragon Package Manager) registry in which anyone can create their own APM repository: public.dappnode.eth

Install

$ npm install -g @dappnode/dappnodesdk

DEMO

Initialization

This command runs you through a setup wizard to begin creating the basic files for a new Dappnode Package Repo.

$ dappnodesdk init

Build

Only generates the IPFS Hash to be able to install it without needing to create the APM Repo

$ dappnodesdk build

Publish

It does the build of the image and shows the necessary transaction to be able to publish the package. The first time will create the repository but the rest will be updates of it.

To be able to update a repository you must be the authorized dev.

The script increases the current version of the repository based on the specified type (patch, minor, major), unless a version hasn't yet been published

For more information about versioning check semver

$ dappnodesdk publish < patch | minor | major >

Please take in account that the package version is not the internal version of the package you want to upload. We use Aragon package manager, and it only allows starting with version 1 and incrementing it one by one. Valid initial versions are 1.0.0, 0.1.0 or 0.0.1.

Troubleshooting

If your system does not find the binary dappnodesdk when running the command, please try the following alternative methods

  • Run with npx which may handle better global NPM packages
npx @dappnode/dappnodesdk <command>
  • Prefix the binary with the location of your global NPM package installation, for example:
~/.npm-packages/bin/dappnodesdk <command>

Github Actions

bump-upstream action

This Github Action automatically creates pull requests bumping the version to the latest released upstream version on DAppNode Packages. It then tests building the new bumped upstream version and automatically posts an IPFS hash if the build was successful so that the new version can be tested further with other Github Actions and by human testers.

Note: This action also requires a Pinata account with an API Access Token and a Github Personal Access Token stored in the repo's, individual's, or organization's secrets in order to work properly.

Sample Usage

.github/workflows/auto_check.yml

name: Bump upstream version

on:
  schedule:
    - cron: "00 */4 * * *"
  push:
    branches:
      - "master"

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - run: npx @dappnode/dappnodesdk github-action bump-upstream
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
          PINATA_SECRET_API_KEY: ${{ secrets.PINATA_SECRET_API_KEY }}

You must specify in the package manifest what upstream Github repo the package is tracking. Also indicate what build variable in the docker-compose file should be updated.

dappnode_package.json

{
  "name": "prysm.dnp.dappnode.eth",
  "upstreamVersion": "v1.0.0",
  "upstreamRepo": "prysmaticlabs/prysm",
  "upstreamArg": "UPSTREAM_VERSION"
}

docker-compose.yml

version: "3.4"
services:
  beacon-chain:
    build:
      args:
        UPSTREAM_VERSION: v1.0.0

Internal dependencies

The dappnode SDK ueses the following internal dependencies to avoid code duplication across the dappnodeSDK, DNP_DAPPMANAGER and sdk-publish modules:

  • @dappnode/types
  • @dappnode/toolkit
  • @dappnode/schemas

In order to have a better developing experience these modules lives inside the DNP_DAPPMANAGER repository

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details