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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@unimart/firebase-config

v0.2.0

Published

Shared TypeScript definitions and validators for Unimart Firebase Remote Config values.

Readme

Firebase Remote Config Tracker

This repository serves as a centralized source of truth for Firebase Remote Config values used across our applications. It provides version control, change history, and documentation for all remote configuration parameters.

Purpose

Firebase Remote Config is a powerful tool for dynamically updating application behavior without requiring app updates. However, its built-in version tracking has limitations. This repository addresses those limitations by:

  1. Version Control: Tracking all config changes with proper Git history
  2. Documentation: Providing context and documentation for each parameter
  3. Cross-Platform Consistency: Ensuring consistent configuration across mobile, web, and other platforms
  4. Change Review: Enabling proper review of configuration changes through pull requests
  5. Rollback Capability: Making it easy to revert to previous configurations

Repository Structure

├── remote_config/
│   ├── unimartAppSettings/
│   ├── unimartAppModals/
│   ├── storefrontGlobalSettings/
│   ├── deliveryAppSettings/
│   └── appMinimumVersion/
├── src/
│   ├── types/ # Source of truth for published TypeScript definitions
│   ├── validators.ts # Runtime validation helpers
│   └── generated/schemas/ # Generated JSON Schemas
├── scripts/
└── README.md

Configuration Groups

Each folder represents a logical grouping of configuration parameters, for example:

  • unimartAppSettings: Contains settings for the Unimart applications across different markets
    • default.json: Costa Rica (CR) market configuration
    • HydrogenGT.json: Guatemala (GT) market configuration
  • unimartAppModals: Payment, shipping, and installment modal/banner content
  • storefrontGlobalSettings: Storefront-wide product spec settings
  • deliveryAppSettings: Settings consumed by the delivery app

Workflow

  1. Exporting: When changes are made in Firebase Console, manually copy the updated JSON to this repository
  2. Changing: Make changes to the JSON files in this repository
  3. Validating: Run pnpm test to verify JSON values still match the TypeScript definitions
  4. Reviewing: Create pull requests for changes to be reviewed
  5. Importing: After approval, manually update Firebase Remote Config with the approved changes

Validation

Install dependencies once:

pnpm install

Validate all JSON-backed Remote Config groups:

pnpm test

This runs:

  1. pnpm run generate:schemas to generate JSON Schemas from the TypeScript definitions in src/types.
  2. node scripts/validate-remote-config.mjs to validate every remote_config/<group>/*.json file against the matching schema.
  3. node scripts/check-negative-validation.mjs to confirm a known bad fixture is rejected.

If a config shape changes intentionally, update the TypeScript definition and the JSON value in the same pull request. Validation fails on missing required fields, wrong value types, invalid string unions, and unexpected properties.

Shared Package

This repo publishes shared definitions and runtime validators as:

@unimart/firebase-config

Build the package locally:

pnpm run build

Consume it from another app:

import {
  type UnimartAppSettings,
  validateUnimartAppSettings
} from '@unimart/firebase-config';

const result = validateUnimartAppSettings(JSON.parse(remoteConfigValue));

if (!result.valid) {
  console.error(result.errors);
}

For dynamic config keys, use the generic validator:

import { validateRemoteConfigValue } from '@unimart/firebase-config';

const result = validateRemoteConfigValue('unimartAppSettings', value);

Runtime validators are exported for consumers that need to validate parsed Remote Config values. The generated schemas are packaged as internal validator assets, but they are not part of the public export map.

Releasing

Versioning is manual semver, starting at 0.1.0.

  • Patch: documentation, schema comments, or backwards-compatible validator/package fixes
  • Minor: new config groups, new optional fields, or backwards-compatible type additions
  • Major: required field changes, removed fields, renamed config keys, or stricter validation that can break consumers

Publishing is guarded by the prepublishOnly branch check and the GitHub release workflow. Releases should be created from main, matching the workflow used by the existing @unimart/unimart-locations-react package.

This package is public to avoid private npm package billing. Published output is intentionally minimal: only build artifacts are packed, emitted comments are stripped, and raw JSON Schemas are not exposed as public package exports. Type names and config field names remain visible because consumers need them for TypeScript type safety.

Best Practices

  • Document the purpose of each parameter in comments or documentation files
  • Use semantic versioning for major configuration changes
  • Include testing instructions for significant changes
  • Tag important releases for easy reference
  • Keep configuration structure consistent across different environments