open-index/open-npm huggingface dataset:
npm package: @mereb/shared-packages
Description: Shared backend package consumed by `svc-*` services. It centralizes common auth, config, logging, telemetry, Kafka, Redis, event envelope, and media helper utilities.
Latest version: 0.0.44

# @mereb/shared-packages

Shared backend package consumed by `svc-*` services. It centralizes common auth, config, logging, telemetry, Kafka, Redis, event envelope, and media helper utilities.

## What this package exports

Primary root exports from `src/index.ts`:

- `auth/jwks`: JWT verification helpers (`verifyJwt`, header parsing helpers)
- `config/env`: env loading and typed env access (`loadEnv`, `getEnv`, `loadThenGetEnvs`, ...)
- `logger`: pino logger setup + Fastify logger options
- `observability/otel`: OpenTelemetry bootstrap helpers
- `messaging/kafka`: Kafka client/config helpers
- `cache/redis`: Redis client helpers
- `events/envelope` and `events/publisher`: integration event envelopes + publish helpers
- `media/s3`: media URL and upload-key helpers

Extra testing exports:

- `@mereb/shared-packages/testing/db`
- `@mereb/shared-packages/testing/kafka`
- `@mereb/shared-packages/testing/oidc`

## Local development

```bash
pnpm --filter @mereb/shared-packages lint
pnpm --filter @mereb/shared-packages typecheck
pnpm --filter @mereb/shared-packages test
pnpm --filter @mereb/shared-packages build
```

Build output is written to `dist/`.

## Versioning and publishing

Version is controlled in `package.json` and published as `@mereb/shared-packages`.

Bump version:

```bash
pnpm --filter @mereb/shared-packages version:bump
```

Optional bump type:

```bash
pnpm --filter @mereb/shared-packages version:bump minor
pnpm --filter @mereb/shared-packages version:bump major
```

The repository includes Jenkins + `.ci/ci.mjc` automation for tag/release/publish flow.

## Manual publish fallback

```bash
cd services/shared
pnpm install
pnpm lint
pnpm typecheck
pnpm build
NPM_TOKEN=... pnpm publish --registry https://registry.npmjs.org --no-git-checks
```