Skip to content

RegolithCo/RegolithCo-Common

Repository files navigation

@regolithco/common

Shared types, utilities, and GraphQL schema for the Regolith Co. mining companion app for Star Citizen.

npm version License: MIT

Installation

npm install @regolithco/common
# or
yarn add @regolithco/common

Overview

This package contains:

  • GraphQL schema — The complete schema used by the Regolith Co. API
  • TypeScript types — Generated types from the GraphQL schema
  • Utility functions — Calculations for crew shares, mining yields, loadouts, and more
  • Constants & lookups — Ore densities, refinery methods, gravity wells, and other game data

Dual Build

This module ships both CommonJS and ESM builds:

  • dist/ — CommonJS (for Node.js / server-side)
  • dist_esnext/ — ESM (for Vite / browser)

Development

Prerequisites

  • Node.js 22+ (see .nvmrc)
  • Yarn 3.6.1 (via Corepack)

Setup

corepack enable
yarn install

Scripts

Command Description
yarn build Build GraphQL types + both CJS and ESM outputs
yarn build:gql Regenerate GraphQL types only
yarn test Run tests
yarn lint Type-check and lint
yarn watch Watch mode for both builds

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT

About

This is the public, common code that Regolith uses

Resources

License

Code of conduct

Contributing

Stars

11 stars

Watchers

2 watching

Forks

Contributors

Languages