# @coveops/enhanced-pipeline-context

> Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.

Latest version **1.2.0** (published 2021-05-12) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @coveops/enhanced-pipeline-context
pnpm add @coveops/enhanced-pipeline-context
yarn add @coveops/enhanced-pipeline-context
bun add @coveops/enhanced-pipeline-context
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2021-05-12 |
| First published | 2020-11-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 31.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | nzeng, cricha, jpdery26, lpblais-coveo, coveoit, gfoumbi, rvundavalli, jwolfe-coveo, sfecteau, mthusscoveo, jfleurent, eqcoveo, jmdro, davebouffard, jfallaire, achouan, hsinghcoveo, wnijmeijer, lgcarrierbedard, elafleur_coveo, plavigueur, eaubin |

## Links

- npm: https://www.npmjs.com/package/@coveops/enhanced-pipeline-context
- npm.io page: https://npm.io/package/@coveops/enhanced-pipeline-context

## Dependencies (3)

- [coveo-search-ui](https://npm.io/package/coveo-search-ui.md) ^2.10081.5
- [@coveops/turbo-core](https://npm.io/package/@coveops/turbo-core.md) ^1.1.1
- [@coveops/localization-manager](https://npm.io/package/@coveops/localization-manager.md) ^1.0.0

## Recent versions

- 1.2.0 (latest) — 2021-05-12
- 1.1.1 — 2021-02-16
- 1.1.0 — 2021-02-16
- 1.0.0 — 2020-11-12

## README

# EnhancedPipelineContext

Disclaimer: This component was built by the community at large and is not an official Coveo JSUI Component. Use this component at your own risk.

This component is used to pass values inside the Coveo QueryBuilder's context. It accepts a context value in a dictionary format, for example, passing:
```
context: { 
  data: 12345
}
```

Will allow you to access context.data from the Coveo Cloud Platform.

## Getting Started

1. Install the component into your project.

```
npm i @coveops/enhanced-pipeline-context
```

2. Use the Component or extend it

Typescript:

```javascript
import { EnhancedPipelineContext, IEnhancedPipelineContextOptions } from '@coveops/enhanced-pipeline-context';
```

Javascript

```javascript
const EnhancedPipelineContext = require('@coveops/enhanced-pipeline-context').EnhancedPipelineContext;
```

3. You can also expose the component alongside other components being built in your project.

```javascript
export * from '@coveops/enhanced-pipeline-context'
```

4. Or for quick testing, you can add the script from unpkg

```html
<script src="https://unpkg.com/@coveops/enhanced-pipeline-context@latest/dist/index.min.js"></script>
```

> Disclaimer: Unpkg should be used for testing but not for production.

5. Include the component in your template as follows:

Place the component in your markup:

```html
<div class="CoveoEnhancedPipelineContext"></div>
```

## Extending

Extending the component can be done as follows:

```javascript
import { EnhancedPipelineContext, IEnhancedPipelineContextOptions } from "@coveops/enhanced-pipeline-context";

export interface IExtendedEnhancedPipelineContextOptions extends IEnhancedPipelineContextOptions {}

export class ExtendedEnhancedPipelineContext extends EnhancedPipelineContext {}
```

## Contribute

1. Clone the project
2. Copy `.env.dist` to `.env` and update the COVEO_ORG_ID and COVEO_TOKEN fields in the `.env` file to use your Coveo credentials and SERVER_PORT to configure the port of the sandbox - it will use 8080 by default.
3. Build the code base: `npm run build`
4. Serve the sandbox for live development `npm run serve`

---
_Source: https://npm.io/package/@coveops/enhanced-pipeline-context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
