core-utils

core-utils

Clipboard Health logo.

Clipboard Health's core libraries and utilities. See individual package READMEs for specific library details.

  • config: Type-safe static configuration management: a pure function to resolve, validate against a Zod schema, and freeze configuration values.
  • contract-core: Shared Zod schemas for Clipboard Health's contracts.
  • eslint-config: Our ESLint configuration.
  • example-nestjs: A NestJS application using our libraries, primarily for end-to-end testing.
  • execution-context: A lightweight Node.js utility for managing execution contexts and metadata aggregation using AsyncLocalStorage.
  • json-api: TypeScript-friendly utilities for adhering to the JSON:API specification.
  • json-api-nestjs: TypeScript-friendly utilities for adhering to the JSON:API specification with NestJS.
  • nx-plugin: An Nx plugin with generators to manage libraries and applications.
  • rules-engine: A pure functional rules engine to keep logic-dense code simple, reliable, understandable, and explainable.
  • testing-core: TypeScript-friendly testing utilities.
  • util-ts: TypeScript utilities.

See package.json scripts for a complete list of commands.

See Nx CLI Commands for options or npx nx --help.

# Install dependencies
npm install

# Build, lint, and test only changed files from `main`, helpful prior to opening PRs
npm run affected

# For the paranoid: build, lint, and test everything
npm run all

# Install a dependency in a specific package
npm install --workspace packages/[PROJECT_NAME] [DEPENDENCY]

# Run specific commands against a specific packages
npx nx run [PROJECT_NAME]:[COMMAND]

# Upgrade Nx
npx nx migrate latest && \
npm install && \
npm_config_legacy_peer_deps=false npx nx migrate --run-migrations --if-exists

See our Nx generator plugin.

See CONTRIBUTING.md.