Commands
January 9, 2024 ยท View on GitHub
Make commands
make typegen- generates event types (src/types) based ontypegen.jsonmake codegen- generates TypeORM models based on the input schemamake dbgen- generates theData-{timestamp}.jsdatabase migration indb/migrations(PostgreSQL service must be running) based on the difference between current database schema and the TypeORM models insidesrc/modelsmake migrate- runs database migrations fromdb/migrations(PostgreSQL service must be running)make build- builds the codemake build-docker- builds thejoystream/oriondocker imagemake prepare- runsnpm install + codegen + buildmake process- executesmake migrateand runs the processor locally (ie. not as a docker service)make serve- runs the GraphQL server locally (not as a docker service)make serve-auth-api- runs theauth-apiservice locally (not as a docker service)make up-squid- runs dockerizedorion_db,orion_processor,orion_graphql-serverandorion_auth-apiservices (docker-compose up -d)make up-archive- runs dockerizedarchive_db,subsquid-gateway,archive-ingestandarchive-explorerservices (docker-compose -f archive/docker-compose.yml up -d)make up- runsup-squid+up-archivemake down-squid- removes docker services and volumes created byup-squidmake down-archive- removes docker services and volumes created byup-archivemake down- runsdown-squid+down-archive
NPM commands
npm run generate:schema- converts schema files fromsrc/schemainto a singleschema.graphqlfile (for Squid Aquarium compatibility)npm run generate:types:auth-api- generates types for theauth-apiservice based on the OpenAPI schema (see: Authentication API)npm run generate:docs:auth-api- generates markdown documentation for theauth-apiservice based on the OpenAPI schema (see: Authentication API)npm run build- builds the codenpm run lint- runs the linter (ESLint), see: Code stylenpm run format- runs the code formatter (Prettier), see: Code stylenpm run checks- runs basic checks (linting, formatting, type checking), see: Code stylenpm run db:migrate- runs database migrations, same asmake migratenpm run processor-start- similar tomake process, but doesn't run migrationsnpm run graphql-server-start- similar tomake servenpm run auth-server-start- same asmake serve-auth-apinpm run tests:auth-api- runs unit tests for theauth-apiservice (see: Authentication API).npm run offchain-state:export- performs the offchain state export, see: Preserving offchain state