# Installation

Using npm:

```bash
npm install @usssa/core
```

Using yarn:

```bash
yarn add @usssa/core
```

# Usage

Import the functions you need from the package.

```ts
import { LoggingAdapter } from '@usssa/core'

const $log = LoggingAdapter.getInstance()
$log.error({
  message: `[${global.requestId}] Rosters - get - Error: ${err}`,
}))
```

# Local Development

Perform code changes in the `src` directory. Make sure there are corresponding tests in the `__tests__` directories of each module.

- src/adapters/azure/`__tests__`
- src/adapters/gcp/`__tests`

To verify your changes make sure to run a build and run the tests.

```bash
npm run build
npm run test:ci
```

Once verified, commit your changes. Then run `npm version <patch|minor|major>` to update the package version. This will also push the changes to the remote repository and create a new git tag.

In GitHub, find the new tag and publish it as a release. This will trigger GitHub Actions to build the package and publish it to NPM.

# Testing Core-Client in Project

- Run yarn link in core
- Run yarn link @usssa/core in API microservice project, i.e. taco-api-ms or rulesengine-api-ms


[See Confluence Page](https://usssa.atlassian.net/wiki/spaces/GTP/pages/99713360/core)
