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

@forest-fire/fire-layer

v0.59.0

Published

An AWS layer which includes a strong baseline of requirements for users who use Firemodel and Universal-Fire

Downloads

7

Readme

Fire Layer

This repo produces a AWS Layer which includes the baseline of requirements that'll need in AWS to use apps leveraging Firemodel. The top level dependencies which this layer will provide includes:

  • Firemodel
  • Universal Fire
  • firebase-admin (from google)
  • Firemock
  • Faker

Your Lambda functions which include this layer will find these top level dependencies along with their dependency graphs are what you will find in this layer in the /opt/node_modules filesystem. In order for your functions import statements to properly resolve this path you will need to ensure that the NODE_PATH ENV variable is set to include the mount directory above.

Versions mapping

The following table would describes the package version that each version of fire-layer released contains:

|AWS layer version | fire-layer | firemodel | universal-fire | firemock | | :--------------: |:----------:|:---------:|:--------------:|:--------:| | 1 | 0.58.0 | 0.58.0 | 0.58.0 | 0.58.0 | | 2 | 0.58.1 | 0.58.0 | 0.58.0 | 0.58.0 | | 3 | 0.59.0 | 0.59.0 | 0.59.0 | 0.59.0 |

Serverless Framework

If you are using the serverless framework, you'd simply add something like the following to your serverless.yaml file:

functions:
    MyFunction:
        layers:
            - 'arn-path-to-this-layer'
        environment:
            NODE_PATH: "./node_modules:/opt/node_modules"

alternatively if you're using this layer in many places, or have other layers which drop NPM deps into opt/node_modules then you can just add it to your global environment:

provider:
    name: aws
    runtime: nodejs14.x
    environment:
        NODE_PATH: "./node_modules:/opt/node_modules"

You're actual config will clearly vary based on your needs but a common strategy is to have a env.yaml where you'll put all your non-secret ENV variables and then refer to this file in your master serverless.yaml like so:

provider:
    environment: '${file(serverless-config/env.yml):${self:custom.stage}}'

This then allows you configure your env.yml with per-stage as well as global ENV variables and tends to work much better than trying to fit it all into the serverless.yml. Here's an example of what it might look like:

global: &all_stages
    MY_SILLY_API: "xxyyzz234324"

dev:
    <<: *all_stages
    FIREBASE_DATABASE_URL: "https://test.firebase.com"

prod:
    <<: *all_stages
    FIREBASE_DATABASE_URL: "https://prod.firebase.com"

Deployment

You can either reference the ARN of this layer's formal deployment or just deploy it locally into your own account. To deploy it to your own account:

# install local dev-deps
yarn
# builds layer and deploys using serverless framework
yarn deploy

Otherwise you can just refer to the following ARNs:

  • 0.58
    • description: the latest versions of Firemodel and Universal Fire on the 0.58.x versions; this includes the latest firebase-admin (9.5.x)
    • ARN: