Skip to content

Package repo for sharing functionality between projects

License

Notifications You must be signed in to change notification settings

seb-oss/Spark-packages

Repository files navigation

SEB Spark

Public packages published under the @sebspark organisation on NPM.

Packages

A pubsub subscriber helper.

A wrapper around Google PubSub adding support for typing, serialization/deserialization, naming of subscriptions for specific topics, push routes and some more.

An Express router wrapped with additional TypeScript typings and defintions for our purposes.

Default TypeScript configuration

ISO-10383 Market Identification Codes (MIC).

ISO-4217 currency codes.

Generates Typescript from avro files

A stripped down version of avsc which works in node, browser and react-native

Generates types and a routerdefinition from OpenAPI specs

A typed router for express based on type definitions from openapi-typegen

Base types for OpenAPI/Typescript

A typed REST client for the definitions from openapi-typegen

End to end tests for openapi generator, express and client

A helper for retrying any promise call (ex an http request) with error rules and backoff

A wrapper for OpenSearch Client to assist with typed queries, indices etc

A simple caching wrapper for promises.

Find trading hours of a market, when it's closed for holidays, or when it's only open for part of the day.

Use Opentelemetry for collecting traces and exporting to Cloud Trace

Contributing

Get started

Install dependencies with yarn.

yarn

Run TypeScript for all packages in watch mode using yarn dev or a specific package using the filter flag, e.g., yarn dev --filter logging. Additional scripts for testing, linting, and building can be found in package.json.

Adding a new package

We use Turborepo's code generation to create new packages. Run the following command, provide it with information, and it will create a package with some default scripts and TypeScript configured.

yarn generate:package

Install dependencies to package

We use Yarn workspaces. To install a dependency to a specific workspace (package) use, for instance, yarn workspace @sebspark/logging add @types/jest. Note that the workspace name is the name defined in package.json, not the folder name.