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

flamestore

v1.0.87

Published

firestore trigger generator

Downloads

84

Readme

flamestore

Firebase Utility Wrapper & File Generators

Getting Started

npx flamestore

Flamestore JSON Schema

  • $schema : Json schema for flamestore.json. Set it to https://raw.githubusercontent.com/aabccd021/flamestore/master/flamestore-schema/v1.json
  • flutterOutputPath : Relative path where flutter file generated
  • region : Firebase region code
  • project : Firebase project configuration. You can set multiple projects in key-value pairs with project ID as key.
  • collections: Firestore collections definitions in key-value pairs with collection name as key.

Collection

  • rule:{get|list|create|update|delete}`: Granular update rules for the collection. Avaliable options:
    • all: Allow any requests
    • authenticated: Allow authenticated user
    • owner: Allow owner of the document
    • none: Disallow any requests
  • ownerField: Name of field defines owner
  • fields: Fields definition as key-value pair with field name as key.

Field Properties

  • property: Field can have properties, which can be assigned as string or array. Available options:
    • isUnique: Field value is unique across documents in the same collections
    • isOptional: The field is optional
    • isNotUpdatable: The field is not updatable

Field Types

Path Field path

Firestore Document Reference (Path) Field

  • collection: Name of referenced document's collection
  • syncFields: Array or name of field synced from reference document

Example:

{
  "owner": {
    "type": "path",
    "collection": "users",
    "syncField": "userName"
  }
}

String Field string

  • minLength: Minimum length of the string
  • maxLength: Maximum length of the string

Example:

{
  "tweetText": {
    "type": "string",
    "minLength": 1,
    "maxLength": 280
  }
}

Integer Field int

  • min: Minimum value of the integer
  • max: Maximum length of the integer
  • deleteDocWhen: The document will be deleted if the integer equals to this value

Example:

{
  "likeValue": {
    "type": "int",
    "max": 5,
    "min": 0,
    "deleteDocWhen": 0
  }
}

Float Field float

  • min: Minimum value of the integer
  • max: Maximum length of the integer
  • deleteDocWhen: The document will be deleted if the integer equals to this value

Example:

{
  "likeValue": {
    "type": "float",
    "max": 5,
    "min": 0,
    "deleteDocWhen": 0
  }
}

Image Field image

  • metadata: Array of values of image metadata name
    • height: Height of image
    • width: Width of image
    • size: Size of image in bytes

Example:

{
  "image": {
    "type": "image",
    "metadata": [
      "height",
      "width"
    ]
  }
}

Dynamic Link Field dynamicLink

  • title: String of field used as dynamic link data
    • field: Use value of the field as dynamic link data
  • description: String of field used as dynamic link data
    • field: Use value of the field as dynamic link data
  • imageURL: String of field used as dynamic link data
    • field: Use value of the field as dynamic link data
  • isSuffixShort: Use short suffix for dynamic Link

Example:

{
  "dynamicLink": {
    "type": "dynamicLink",
    "isSuffixShort": true,
    "title": {
      "field": "tweetText"
    },
    "description": "tweet description"
  }
}

Count Field count

Count certain field in documents with same reference.

  • collection: Name of document's collection to be counted
  • reference: Name of reference field which points to counting document

Example:

{
  "tweetsCount": {
    "type": "count",
    "collection": "tweets",
    "reference": "owner"
  }
}

Sum Field sum

Sums certain field in documents with same reference.

  • collection: Name of document's collection to be summed
  • reference: Name of reference field which points to summing document
  • field: Name of field to be summed

Example:

{
  "likesSum": {
    "type": "sum",
    "collection": "likes",
    "field": "likeValue",
    "reference": "tweet"
  }
}

Computed Field compute

Computes field using custom function on firebase trigger.

  • compute: Type of field to be computed. Available options are int , float , string , timestamp .

Example:

{
  "hotness": {
    "compute": "float"
  },
}

Server Timestamp Field serverTimestamp

Records time when document created

Example:

{
  "creationTime": "serverTimestamp",
}