# cuor-order-patch-materializer

> Kafka consumer for processing order creates and updates from USXPRESS

Latest version **1.5.2** (published 2022-01-14) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install cuor-order-patch-materializer
pnpm add cuor-order-patch-materializer
yarn add cuor-order-patch-materializer
bun add cuor-order-patch-materializer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.5.2 |
| Published | 2022-01-14 |
| First published | 2021-09-29 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Unpacked size | 261.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Calvin Glenn |
| Maintainers | haulynx-deployments |
| Keywords | order, kafka, consumer |

## Links

- npm: https://www.npmjs.com/package/cuor-order-patch-materializer
- Repository: https://github.com/xpress-technologies/cuor-order-patch-materializer
- Issues: https://github.com/xpress-technologies/cuor-order-patch-materializer/issues
- npm.io page: https://npm.io/package/cuor-order-patch-materializer

## Dependencies (18)

- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [ramda](https://npm.io/package/ramda.md) ^0.27.1
- [tslib](https://npm.io/package/tslib.md) ^2.3.1
- [envalid](https://npm.io/package/envalid.md) ^6.0.2
- [kafkajs](https://npm.io/package/kafkajs.md) ^1.15.0
- [prettier](https://npm.io/package/prettier.md) ^2.2.1
- [form-data](https://npm.io/package/form-data.md) 3.0.0
- [tz-lookup](https://npm.io/package/tz-lookup.md) ^6.1.25
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [@types/uuid](https://npm.io/package/@types/uuid.md) ^8.3.0
- [@types/ramda](https://npm.io/package/@types/ramda.md) ^0.27.60
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^8.5.1
- [@haulynx/logger](https://npm.io/package/@haulynx/logger.md) ^2.0.3
- [abort-controller](https://npm.io/package/abort-controller.md) ^3.0.0
- [elastic-apm-node](https://npm.io/package/elastic-apm-node.md) ^3.26.0
- [reflect-metadata](https://npm.io/package/reflect-metadata.md) ^0.1.13
- [@haulynx/cli-tools](https://npm.io/package/@haulynx/cli-tools.md) ^1.2.29
- [@haulynx/domain-entities](https://npm.io/package/@haulynx/domain-entities.md) ^1.3.21

## Recent versions

- 1.5.2 (latest) — 2022-01-14
- 1.5.1 — 2022-01-11
- 1.5.0 — 2022-01-05
- 1.4.12 — 2021-12-14
- 1.4.11 — 2021-11-11
- 1.4.10 — 2021-11-11
- 1.4.9 — 2021-11-02
- 1.4.8 — 2021-10-28
- 1.4.7 — 2021-10-28
- 1.4.6 — 2021-10-28
- 1.4.5 — 2021-10-28
- 1.4.4 — 2021-10-28
- 1.4.3 — 2021-10-27
- 1.4.2 — 2021-10-27
- 1.4.1 — 2021-10-27
- … 8 more at https://npm.io/package/cuor-order-patch-materializer/versions

## README

# order-patch-materializer
Kafka consumer to process order creates and updates

## Domain
`cuor`

## Setting up
- Ensure docker desktop is installed locally
- Ensure node v12 and npm are installed locally
- Run `npm i`

## Docker
This consumer can be tested locally without creating a topic to consume from, using the `localTesting` folder.
The `testCreate` and `testUpdate` files test creating and updating respectively, pulling the data from
the `orderCreatePayload.json` and `orderUpdatePayload.json`

## To Run
- Run `docker-compose up -d`
    - This will begin a confluent kafka cluster. Go to `http://localhost:9021`, select the cluster that was created,
      and create the `local_ihtl_load_upsert_json` topic.
- Run `npm run create` in order to test order creating
- Run `npm run update` in order to test order updating
- Note: the `orderCreatePayload.json` file will have to be updated with new order numbers as you create each order

## Deploy
To deploy this consumer, bump the package version inside `package.json`. Each of this fields needs to have the version number updated:
- version
- docker:tag
- docker:publish
Once the version numbers have been updated, run `npm run docker:deploy`. This will build, tag, and push the new image with the new version number to ECR: https://console.aws.amazon.com/ecr/repositories/private/147925332649/cuor-order-patch-materializer?region=us-east-1

Once the new image is pushed to ECR, update the dev and prod config yamls to point at the new image:
- dev: https://github.com/xpress-technologies/cuor-order-patch-materializer-config/blob/main/dev/default/helm/values.yaml
- prod: https://github.com/xpress-technologies/cuor-order-patch-materializer-config/blob/main/prod/default/helm/values.yaml

Once the config repo is updated to point to the new version, sync the application in Argo to deploy:
- dev: https://argocd-shared01-ue1-dev.haulynx.io/applications/dev-cuor-order-patch-materializer
- prod: https://argocd-shared01-ue1-prod.haulynx.io/applications/prod-cuor-order-patch-materializer

---
_Source: https://npm.io/package/cuor-order-patch-materializer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
