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

balena-cloud

v1.0.32

Published

Shell scripts package to the containers native interface BalenaOS for the Raspberry Pi.

Downloads

36

Readme

balena-cloud

Balena-Cloud This is a free NodeJS script to package the containers native interface BalenaOS for the Raspberry Pi and similar platforms. The open source Balena-CLI is required, for it stacks image dependencies in the public Docker Hub registry.

Within an open source application, like balena-sound, wifi-repeater, install this module:

#!/usr/bin/env bash
cd application
npm install balena-cloud

Template fields

(BALENA_PROJECTS_FLAGS) take variable names %%templates_var%% that are replaced by ther value in <arch>.env Make changes to the Dockerfile.template files.

Initialize .env and package.json:

post_install

It will scan for any Docker files in the sub-folders and reset package.json, common.env and <arch>.env files.

Configure template environment

Complete common definitions:

BALENA_PROJECTS=(MY/PATH MY/RELATIVE/PATH)
BALENA_PROJECTS_FLAGS=(BALENA_MACHINE_NAME MY_VARIABLE)

Define architectures: An ARM computer units like Raspberry PI use armhf.env (or aarch64.env if it's deployed on a 64 bits platform), desktop units are often x86_64.env:

DKR_ARCH=x86_64
BALENA_MACHINE_NAME=intel-nuc
IMG_TAG=latest
PRIMARY_HUB=docker-hub-balenalib-repo\\/container-servìce-image

Test

Run unit tests on local host or CI

npm test

Build dependencies

Docker Image dependencies are required to validate test units. Theses dependencies include build images needed by Docker based environments:

  • Docker and cloud platform (BalenaOS, etc.)
  • CircleCI, TravisCI, etc.
  • Kubernetes and similar (Openshift, Micro-k8s, etc.)

First login to Docker, if you already have an account or create one.

docker login

The folder deployments contains Dockerfile templates that maybe pulled from Docker.

balena_deploy test/build/

Finally select the corresponding architecture ARM32, ARM64 bits or X86-64 (choose 1, 2 or 3) and choose to build dependencies

It takes a few minutes for the docker machine to pull, update local images and to push them to the repository. They take the name $DOCKER_USER/<image> and get a public URL at https://hub.docker.com/r/$DOCKER_USER/<image>

Deploy

Deploy to Docker or BalenOS, easy, choose targets:

balena_deploy .

You can build locally:

docker_build .

In BASH scripts, use arguments:

balena_deploy . x86_64 --nobuild --exit
balena_deploy . armhf --balena

Updating and managing npm version

Follow general guidelines in the documention about versioning this project on npm