Shared types, utilities, and GraphQL schema for the Regolith Co. mining companion app for Star Citizen.
npm install @regolithco/common
# or
yarn add @regolithco/commonThis 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
This module ships both CommonJS and ESM builds:
dist/— CommonJS (for Node.js / server-side)dist_esnext/— ESM (for Vite / browser)
- Node.js 22+ (see
.nvmrc) - Yarn 3.6.1 (via Corepack)
corepack enable
yarn install| 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 |
See CONTRIBUTING.md for guidelines.