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

@nx/powerpack-s3-cache

v1.1.1

Published

A Nx Powerpack plugin which provides a Nx cache which can be self hosted on Amazon S3.

Downloads

4,664

Readme

@nx/powerpack-s3-cache

This package is part of the Nx Powerpack extensions for Nx.

This plugin provides a Nx cache which can be self hosted on Amazon S3 or S3 compatible storage providers.

Usage

Use of this package is governed by the following LICENSE. Please be sure to read through the license carefully before using this plugin. This license is also included in the package in a LICENSE file.

Use Cases

This plugin is useful when Nx Cloud is not a viable solution. Nx Cloud is the ideal recommended method of sharing a cache between multiple machines using Nx.

This plugin uploads and downloads artifacts and metadata to and from an S3 bucket of your choice. This allows Nx to run faster in CI environments by reusing computation done in other runs.

Adding this plugin to your Nx workspace

Use nx add @nx/powerpack-s3-cache to install and setup this plugin in your Nx workspace.

Configuration

This cache can be configured in an s3 property in nx.json. The following properties are configurable:

| Property | Description | Default | Required | | ----------------- | ----------------------------------------------------------------------- | ------- | -------- | | bucket | The name of the S3 bucket to use for the cache. | N/a | Yes | | region | The AWS region where the s3 bucket lives. | N/a | Yes | | ssoProfile | The name of the SSO profile to use from your AWS CLI SSO Configuration. | N/a | No | | endpoint | The endpoint where AWS can be reached. | N/a | No | | encryptionKey | The key used to encrypt and decrypt artifacts from the cache. | N/a | No | | accessKeyId | The access key ID for AWS. | N/a | No | | secretAccessKey | The secret access key for AWS. | N/a | No | | forcePathStyle | Use path style URLs for S3 objects | false | No |

S3 Compatible Providers

To use @nx/powerpack-s3-cache with S3 compatible providers (MinIO, LocalStack, DigitalOcean Spaces, Cloudflare, etc..), endpoint will need to be provided. Some providers also need to have forcePathStyle set to true in the configuration.

Below is an example on how to connect to MinIO:

{
  "s3": {
    "region": "us-east-1",
    "bucket": "my-bucket",
    "endpoint": "https://play.min.io",
    "forcePathStyle": true,
    "accessKeyId": "abc1234",
    "secretAccessKey": "4321cba"
  }
}

| Property | Description | | ------------------- | --------------------------------------------------------------------------------------------------------- | | region | The id of the S3 compatible storage region to use | | bucket | The name of the S3 compatible storage bucket to use | | forcePathStyle | Changes the way artifacts are uploaded. Usually used for S3 compatible providers (MinIO, LocalStack, etc) | | endpoint | The custom endpoint to upload artifacts to. If endpoint is not defined, the default AWS endpoint is used | | accessKeyId | AWS Access Key ID (optional if AWS_ACCESS_KEY_ID is set in the environment) | | secretAccessKey | AWS secret access key (optional if AWS_SECRET_ACCESS_KEY is set in the environment) |