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

@aeppic/install-build-server

v2.44.0

Published

Install a server to build complete packages with optional `@microsoft/rush` support

Downloads

193

Readme

Install

npx @aeppic/install-build-server installs or updates the a build server to version, build, and package builds.

If a secret is wanted and this is the first time running the install script you can use the parameter --gitlab-secrets-initial=XYZ to set the initial secrets that will be configured. The parameter will also overwrite any existing configuration if provided.

It automatically registers (installs) the service as a SystemD service under /etc/systemd/system but does not enable or start it yet.

The builds can be triggered via a webhook or a simple post call

Purpose

Allow gitlab pipelines to trigger executing scripts on a build server which can clone a project similar to Gitlab CI but also easily commit and push back more complicated configurations such as with @microsoft/rush

Security

Triggering can be secured with a X-Gitlab-Token which can be set in the trigger pipeline of Gitlab.

Note; The build website is publicly accessible and unsecured. Make sure there are no secrets in the build log !

Git clone. The server can only git clone projects the service account can clone via HTTP.

For now this means using git config --global credential.helper store and clone a project once manually at least.

Server prepare

The server needs to be configured with appropriate npm and git settings to read, commit and publish if the scripts to that.

Note: When run as root. Do not forget to npm config set unsafe-perm true Article

Note: Ensure these settings are reachable from the user executing the service in a NON-interactive shell. E.g. .bashrc will not be loaded when a service executes

API

Launch example server

  • PORT=8080
  • GITLAB_SECRETS=/opt/tokens.json

/opt/tokens.json contains ["MY_SECRET_TOKEN"]

node server.js

Trigger a build

Using a gitlab token as should be configured in the GitLab webhooks

curl -XPOST -H "Content-Type: application/json" -H "X-Gitlab-Token: MY_SECRET_TOKEN" --data @examples/pipeline-event.json http://localhost:8080/gitlab

See builds

curl http://localhost:8080/log to get a json array of recent jobs curl http://localhost:8080/retry/:id to re-run a build based on the id

http://localhost:8080 to see the UI curl http://localhost:8080/log/:id to get the build log as html curl http://localhost:8080/log/:id?wrapped to get the build log with some html wrapper

Notes

When running on Windows paths can be too long. Run git config --system core.longpaths true to ensure they work.