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

greenlock-store-fs

v3.2.2

Published

A file-based certificate store for greenlock that supports wildcards.

Downloads

46,328

Readme

greenlock-store-fs | A Root project

A keypair and certificate storage strategy for Greenlock v2.7+ (and v3). The (much simpler) successor to le-store-certbot.

Works with all ACME (Let's Encrypt) SSL certificate sytles:

  • [x] single domains
  • [x] multiple domains (SANs, AltNames)
  • [x] wildcards
  • [x] private / localhost domains

Usage

Global config:

greenlock.manager.defaults({
    store: {
        module: "greenlock-store-fs",
        basePath: "~/.config/greenlock"
    }
});

Per-site config:

greenlock.add({
    subject: "example.com",
    altnames: ["example.com", "www.example.com"],
    store: {
        module: "greenlock-store-fs",
        basePath: "~/.config/greenlock"
    }
});

File System

The default file system layout mirrors that of certbot (python Let's Encrypt implementation) and the prior le-store-certbot in order to make transitioning effortless.

The default structure looks like this:

.config
└── greenlock
    ├── accounts
    │   └── acme-staging-v02.api.letsencrypt.org
    │       └── directory
    │           └── [email protected]
    ├── staging
    │   └── (same as live)
    └── live
        ├── example.com
        │   ├── bundle.pem
        │   ├── cert.pem
        │   ├── chain.pem
        │   ├── fullchain.pem
        │   └── privkey.pem
        └── www.example.com
            ├── bundle.pem
            ├── cert.pem
            ├── chain.pem
            ├── fullchain.pem
            └── privkey.pem

Internal Implementation Details

You DO NOT NEED TO KNOW these details.

They're provided for the sake of understanding what happens "under the hood" to help you make better choices "in the seat".

Parameters

| parameters | example | notes | | ----------------- | -------------------------------------------------------- | ---------------- | | env | staging or live | - | | directoryUrl | https://acme-staging-v02.api.letsencrypt.org/directory | - | | keypair | { privateKeyPem, privateKeyJwk } | | | account | { id: "an-arbitrary-id" } | account only | | subscriberEmail | [email protected] | account only | | certificate | { id: "an-arbitrary-id" } | certificate only | | subject | example.com | certificate only | | pems | { privkey, cert, chain, issuedAt, expiresAt } | certificate only |

Account Keypair

accounts.setKeypair = async function({
    env,
    basePath,
    directoryUrl,
    email,
    account
}) {
    var id = account.id || email;
    var serverDir = directoryUrl.replace("https://", "");
};
accounts.checkKeypair = async function({
    env,
    basePath,
    directoryUrl,
    email,
    account
}) {
    var id = account.id || email;
    var serverDir = directoryUrl.replace("https://", "");

    return {
        privateKeyPem,
        privateKeyJwk
    };
};

Certificate Keypair

certificate.setKeypair = async function({
    env,
    basePath,
    directoryUrl,
    subject,
    certificate
}) {
    var id = account.id || email;
    env = env || directoryUrl.replace("https://", "");
};
certificate.checkKeypair = async function({
    env,
    basePath,
    directoryUrl,
    subject,
    certificate
}) {
    var id = account.id || email;
    env = env || directoryUrl.replace("https://", "");

    return {
        privateKeyPem,
        privateKeyJwk
    };
};

Certificate PEMs

certificate.set = async function({
    env,
    basePath,
    directoryUrl,
    subject,
    certificate,
    pems
}) {
    var id = account.id || email;
    env = env || directoryUrl.replace("https://", "");
};
certificate.check = async function({
    env,
    basePath,
    directoryUrl,
    subject,
    certificate
}) {
    var id = account.id || email;
    env = env || directoryUrl.replace("https://", "");

    return {
        privkey,
        cert,
        chain,
        issuedAt,
        expiresAt
    };
};