# @hashicorp/integrations-hcl

> This contains reused HCL validation logic for `integrations` and `integration-release-action`

Latest version **0.6.0** (published 2023-05-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install @hashicorp/integrations-hcl
pnpm add @hashicorp/integrations-hcl
yarn add @hashicorp/integrations-hcl
bun add @hashicorp/integrations-hcl
```

## Health

**Score 35/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2023-05-10 |
| First published | 2022-12-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 287.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Maintainers | alexju, consul-ui-services, wenincode-hashicorp, hashicb, britt.lindgren, paulhcp, nandereck, tstormk, hashibot-hds, lackeyjb1, alexcarpenter, youriwims, jpogran, ashleemboyer, _natmegs, thrashr888, amyrlam, melsumner, mwickett, didoo, zchsh, brandonromano, hcitsec, gregone, meirish, enmod, kylemac, kaxcode, anubhavmishra-hashicorp, hashibot-web, cstitt-hashi, bkalow, kstraut, mocohen, dhaulagiri |

## Links

- npm: https://www.npmjs.com/package/@hashicorp/integrations-hcl
- Repository: https://github.com/hashicorp/web-platform-packages
- Homepage: https://github.com/hashicorp/web-platform-packages#readme
- Issues: https://github.com/hashicorp/web-platform-packages/issues
- npm.io page: https://npm.io/package/@hashicorp/integrations-hcl

## Dependencies (5)

- [zod](https://npm.io/package/zod.md) ^3.19.1
- [glob](https://npm.io/package/glob.md) ^10.2.1
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.7
- [hcl2-parser](https://npm.io/package/hcl2-parser.md) ^1.0.3
- [@vercel/fetch](https://npm.io/package/@vercel/fetch.md) ^6.2.0

## Recent versions

- 0.6.0 (latest) — 2023-05-10
- 0.5.0-canary-202348164142 (canary) — 2023-05-08
- 0.5.0 — 2023-05-08
- 0.5.0-canary-202344175142 — 2023-05-04
- 0.4.0 — 2023-05-01
- 0.4.0-canary-2023327173753 — 2023-04-27
- 0.4.0-canary-2023327153940 — 2023-04-27
- 0.3.1 — 2023-04-26
- 0.3.1-canary-2023326151829 — 2023-04-26
- 0.3.1-canary-202332023921 — 2023-04-20
- 0.3.0 — 2023-03-14
- 0.3.0-canary-202327195930 — 2023-03-07
- 0.3.0-canary-202327191659 — 2023-03-07
- 0.2.0 — 2023-02-01
- 0.2.0-canary-202311204427 — 2023-02-01
- … 17 more at https://npm.io/package/@hashicorp/integrations-hcl/versions

## README

# `@hashicorp/integrations-hcl`

This contains reused HCL validation logic for `integrations` and `integration-release-action`

## Generating the API Client

An `IntegrationsAPI` TypeScript Client can be generated from our
OpenAPI spec.

- This uses the https://github.com/ferdikoomen/openapi-typescript-codegen project

Example:

```bash
# From the web-platform-packages monorepo root
npx -p openapi-typescript-codegen openapi \
  --input ../integrations-api/src/spec/api-docs.json \
  --output ./packages/integrations-hcl/lib/generated \
  --client node \
  --name IntegrationsAPI \
  --request ./packages/integrations-hcl/lib/generated/request.ts.template

# Ensure generated files match out prettier config
npx prettier --write ./packages/integrations-hcl/lib/generated
```

Usage:

```typescript
import { IntegrationsAPI } from './lib/generated'

const client = new IntegrationsAPI({
  BASE: process.env.INPUT_INTEGRATIONS_API_BASE_URL,
})

// response is fully typed
// {
//     meta: Meta200;
//     result: EnrichedIntegration;
// }
const response = await client.integrations.getProductsIntegrations1(
  productSlug,
  integrationSlug
)
```

---
_Source: https://npm.io/package/@hashicorp/integrations-hcl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
