open-index/open-npm huggingface dataset:
npm package: @rhc-shared-components/vulnerability-summary
Description: project description
Author: eyevana
Latest version: 2.0.0

# @rhc-shared-components/vulnerability-summary

> The vulnerability summary component takes two props, a list of vulnerabilities and an image grade. If the image grade is `A`, a empty state would display, otherwise a summary of vulnerabilities will render in a bar chart form.

[![NPM](https://img.shields.io/npm/v/@rhc-shared-components/vulnerability-summary.svg)](https://www.npmjs.com/package/@rhc-shared-components/vulnerability-summary) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save @rhc-shared-components/vulnerability-summary
```

## Usage

```tsx
import React from 'react';
import { VulnerabilitySummary } from '@rhc-shared-components/vulnerability-summary';

const vulnerabilities = [
  {
    "_id": "61de52def5a0de0193eff061",
    "_links": {},
    "advisory_id": "2022:0064",
    "advisory_type": "RHSA",
    "creation_date": "2022-01-12T04:02:38.666000+00:00",
    "cve_id": "CVE-2021-3712",
    "last_update_date": "2022-01-12T04:02:38.666000+00:00",
    "object_type": "containerImageVulnerability",
    "packages": [
      {
        "rpm_nvra": [
          "openssl-libs-1.0.2k-22.el7_9.ppc64le"
        ],
        "srpm_nevra": "openssl-1:1.0.2k-23.el7_9.src"
      }
    ],
    "public_date": "2022-01-11T00:00:00Z",
    "severity": "Moderate"
  }
];

const App = () => {
  return ( <VulnerabilitySummary vulnerabilities={vulnerabilities} imageGrade="C"/> )
}

```

## License

MIT © [eyevana](https://github.com/eyevana)
npm package: @rhc/form
Description: react hook component for form
Author: glud0309@gmail.com
Latest version: 0.0.5

# @rhc/form

简单、易用、可扩展的表单组件。

[![Build And Deploy](https://github.com/glud123/rhc/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/glud123/rhc/actions/workflows/main.yml)
[![codecov](https://codecov.io/gh/glud123/rhc/branch/main/graph/badge.svg?token=DBDT3Q70YP)](https://codecov.io/gh/glud123/rhc)
[![npm version](https://badge.fury.io/js/@rhc%2Fform.svg)](https://badge.fury.io/js/@rhc%2Fform)
![npm](https://img.shields.io/npm/dw/@rhc/form)
### 简介

基于 React Hooks 的表单组件。 [了解更多](https://glud123.github.io/rhc/)

[Github](https://github.com/glud123/rhc/tree/main/components/form)

### 能力

- 结构化（视图即数据结构，满足复杂数据结构，支持表单项嵌套）
- 插件化（支持自定义表单项渲染容器和表单项校验渲染容器）
- 状态灵活（支持跨层级、跨组件、跨表单取值设值）
- 数据驱动（支持跨层级、跨组件监听表单某项变化，并触发当前组件渲染）
- 最小粒度渲染（提高在复杂表单场景下表单页面性能）
- 简单易用（提供简洁实用的 API，如：取值（`get`）、设值（`set`）、移除（`remove`）、重置表单（`reset`）、表单校验（`validate`） API 等）

### 安装

```shell
npm install @rhc/form
```

### 示例

```js
// example.tsx
import React from "react";
import Form, { useForm } from "@rhc/form";

const Example = () => {
  const form = useForm("live-demo");
  const handleSubmit = () => {
    form
      .validate()
      .then((value) => {
        let formValue = form.getValues();
        console.log("formValue", formValue);
      })
      .catch((err) => {
        console.log("formErr", err);
      });
  };
  return (
    <Form form={form}>
      <Form.Item
        name="name"
        label="姓名"
        required
        rules={(value) => {
          if (value) {
            return Promise.resolve();
          } else {
            return Promise.reject(new Error("请输入姓名"));
          }
        }}
      >
        <Input placeholder="请输入姓名" />
      </Form.Item>
      <Form.Item name="age" label="年龄">
        <Input type="number" placeholder="请输入年龄" />
      </Form.Item>
      <button type="button" onClick={handleSubmit}>
        submit
      </button>
    </Form>
  );
};

export default Example;

interface InputProps {
  value?: string;
  onChange?: (v: string) => void;
  type?: "text" | "number";
  placeholder?: string;
  disabled?: boolean;
}
// Input 组件
const Input: FC<InputProps> = (props) => {
  const { value = "", onChange, type = "text", placeholder, disabled } = props;

  const handleChange = (e: { target: { value: string } }) => {
    onChange && onChange(e.target.value);
  };

  return (
    <input
      disabled={disabled}
      type={type}
      value={value}
      onChange={handleChange}
      placeholder={placeholder}
    />
  );
};
```
npm package: @rhcp/arc_replace_wasm
Description: A WebAssembly build of the Mimir arc_replace transform, suitable for use in Nodejs and browsers.
Latest version: 0.1.2

# WebAssembly build of the `arc_replace` transform

This is a [WebAssembly](https://webassembly.org/) build of the [`arc_replace`](../arc_replace/) transform, suitable for use in Nodejs and browsers.

## Initial setup

Install wasm-pack.

The [wasm-pack](https://rustwasm.github.io/wasm-pack/) site recommends curling into your shell to install, but I prefer using cargo:

```
cargo install wasm-pack
```

Once wasm-pack is installed, you can build, test, and publish this package.js

### 🛠️ Build with `wasm-pack build`

```
wasm-pack build --scope rhcp --out-name arc_replace --target nodejs
```

Default is a release build with optimizations and no debug info.  Add `--dev` for a debug build.

[wasm-pack build docs](https://rustwasm.github.io/docs/wasm-pack/commands/build.html)

### 🔬 Test in Headless Browsers with `wasm-pack test`

```
wasm-pack test --headless --firefox
```

[wasm-pack test docs](https://rustwasm.github.io/docs/wasm-pack/commands/test.html)

### 🎁 Publish to NPM with `wasm-pack publish`

```
wasm-pack publish -a public --tag latest
```

[wasm-pack publish docs](https://rustwasm.github.io/docs/wasm-pack/commands/pack-and-publish.html)
npm package: @rhcp/cli
Description: A command line interface for SPAship!
Author: mclayton@redhat.com
Latest version: 0.3.2
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @spaship/cli

A command line interface for SPAship.

[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
[![Version](https://img.shields.io/npm/v/@spaship/cli.svg)](https://npmjs.org/package/@spaship/cli)
[![Downloads/week](https://img.shields.io/npm/dw/@spaship/cli.svg)](https://npmjs.org/package/@spaship/cli)
[![License](https://img.shields.io/npm/l/@spaship/cli.svg)](https://github.com/spaship/cli/blob/master/package.json)

<!-- toc -->
* [@spaship/cli](#spashipcli)
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->

# Usage

<!-- usage -->
```sh-session
$ npm install -g @rhcp/cli
$ spaship COMMAND
running command...
$ spaship (-v|--version|version)
@rhcp/cli/0.3.2 linux-x64 node-v11.14.0
$ spaship --help [COMMAND]
USAGE
  $ spaship COMMAND
...
```
<!-- usagestop -->

# Commands

<!-- commands -->
* [`spaship deploy ARCHIVE`](#spaship-deploy-archive)
* [`spaship help [COMMAND]`](#spaship-help-command)
* [`spaship init`](#spaship-init)

## `spaship deploy ARCHIVE`

deploy to a SPAship host

```
USAGE
  $ spaship deploy ARCHIVE

ARGUMENTS
  ARCHIVE  SPA archive file

OPTIONS
  -r, --ref=ref  [default: undefined] a version tag, commit hash, or branch to identify this release

DESCRIPTION
  Send an archive containing a SPA to a SPAship host for deployment.  Supports .tar.gz/.tgz, .zip, and .tar.bz2.
```

_See code: [src/commands/deploy.js](https://github.com/spaship/cli/blob/v0.3.2/src/commands/deploy.js)_

## `spaship help [COMMAND]`

display help for spaship

```
USAGE
  $ spaship help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.1/src/commands/help.ts)_

## `spaship init`

Initialize a SPAship config file for your app.

```
USAGE
  $ spaship init

OPTIONS
  -n, --name=name    (required) a human-friendly title for your app
  -p, --path=path    (required) the URL path for your app under the SPAship domain. ex: /my/app
  -s, --[no-]single  route all non-asset requests to index.html
  --overwrite        overwrite existing spaship.yaml

DESCRIPTION
  Without arguments, init will ask you a few questions and generate a spaship.yaml config file.  The answers can also be 
  passed in as CLI options.
```

_See code: [src/commands/init.js](https://github.com/spaship/cli/blob/v0.3.2/src/commands/init.js)_
<!-- commandsstop -->
npm package: @rhcp/common
Description: A set of common utilities used by other SPAship components.
Author: mclayton@redhat.com
Latest version: 0.3.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @spaship/common

A set of common utilities used by other SPAship components.

[![Version](https://img.shields.io/npm/v/@spaship/common.svg)](https://npmjs.org/package/@spaship/common)
[![Downloads/week](https://img.shields.io/npm/dw/@spaship/common.svg)](https://npmjs.org/package/@spaship/common)
[![License](https://img.shields.io/npm/l/@spaship/common.svg)](https://github.com/spaship/common/blob/master/package.json)
npm package: @rhcp/esbuild-jest
Description: Jest plugin to use esbuild for transformation
Author: Arjay Elbore
Latest version: 0.5.3
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# esbuild-jest

### A Jest transformer using esbuild
With this transformer you can use and transform (ts, js, tsx and jsx) files

[![npm](https://img.shields.io/npm/v/esbuild-jest.svg)](https://www.npmjs.com/package/esbuild-jest)
![build status](https://github.com/aelbore/esbuild-jest/actions/workflows/ci.yml/badge.svg)

## Install

```bash
npm install --save-dev esbuild-jest esbuild
```

#### Setting up Jest config file

esbuild-jest transformer should be used in your Jest config file like this:

```js
{
  "transform": {
    "^.+\\.tsx?$": "esbuild-jest"
  }
}
```

#### Setting up Jest config file with transformOptions
```typescript
export interface Options {
  jsxFactory?: string
  jsxFragment?: string
  sourcemap?: boolean | 'inline' | 'external'
  loaders?: {
    [ext: string]: Loader
  },
  target?: string
  format?: string
  define?: { [key: string]: string }
}
```

```js
{
  "transform": {
    "^.+\\.tsx?$": [ 
      "esbuild-jest", 
      { 
        sourcemap: true,
        loaders: {
          '.spec.ts': 'tsx'
        }
      } 
    ]
  }
}
```

> Note: if you are using tsconfig.json and jsconfig.json with "paths", Please look `alias-hq` and there documentation https://github.com/davestewart/alias-hq/blob/master/docs/integrations.md
npm package: @rhcp/heading_hash_wasm
Description: A WebAssembly build of the Mimir heading_hash transform, suitable for use in Nodejs and browsers.
Latest version: 0.1.2

# WebAssembly build of the `heading_hash` transform

This is a [WebAssembly](https://webassembly.org/) build of the [`heading_hash`](../heading_hash/) transform, suitable for use in Nodejs and browsers.

## Initial setup

Install wasm-pack.

The [wasm-pack](https://rustwasm.github.io/wasm-pack/) site recommends curling into your shell to install, but I prefer using cargo:

```
cargo install wasm-pack
```

Once wasm-pack is installed, you can build, test, and publish this package.js

### 🛠️ Build with

Build for nodejs:
```
make build_node
```

Build for web:
```
make build_web
```

Default is a release build with optimizations and no debug info.  Add `--dev` for a debug build.

[wasm-pack build docs](https://rustwasm.github.io/docs/wasm-pack/commands/build.html)

### Using the nodejs package

Add the dependency:

```
npm i @rhcp/heading_hash_wasm
```

Import & use it:

```
import * as headingHash from "@rhcp/heading_hash_wasm";

console.log(headingHash.transform(#hello"));
```

### Using the web package

```
npm i @rhcp/heading_hash_wasm_web
```

Import the package, initialize it, and log a transformed string.

```
import { default as init, transform } from "@rhcp/heading_hash_wasm_web";
await init();
console.log(transform("#hello"))
```

Please note that this example assumes you have a bundler which will resolve the name `@rhcp/heading_hash_wasm_web`.

### 🔬 Test in Headless Browsers with `wasm-pack test`

```
wasm-pack test --headless --firefox
```

[wasm-pack test docs](https://rustwasm.github.io/docs/wasm-pack/commands/test.html)
npm package: @rhcp/heading_hash_wasm_web
Description: A WebAssembly build of the Mimir heading_hash transform, suitable for use in Nodejs and browsers.
Latest version: 0.1.2

# WebAssembly build of the `heading_hash` transform

This is a [WebAssembly](https://webassembly.org/) build of the [`heading_hash`](../heading_hash/) transform, suitable for use in Nodejs and browsers.

## Initial setup

Install wasm-pack.

The [wasm-pack](https://rustwasm.github.io/wasm-pack/) site recommends curling into your shell to install, but I prefer using cargo:

```
cargo install wasm-pack
```

Once wasm-pack is installed, you can build, test, and publish this package.js

### 🛠️ Build with

Build for nodejs:
```
make build_node
```

Build for web:
```
make build_web
```

Default is a release build with optimizations and no debug info.  Add `--dev` for a debug build.

[wasm-pack build docs](https://rustwasm.github.io/docs/wasm-pack/commands/build.html)

### Using the nodejs package

Add the dependency:

```
npm i @rhcp/heading_hash_wasm
```

Import & use it:

```
import * as headingHash from "@rhcp/heading_hash_wasm";

console.log(headingHash.transform(#hello"));
```

### Using the web package

```
npm i @rhcp/heading_hash_wasm_web
```

Import the package, initialize it, and log a transformed string.

```
import { default as init, transform } from "@rhcp/heading_hash_wasm_web";
await init();
console.log(transform("#hello"))
```

Please note that this example assumes you have a bundler which will resolve the name `@rhcp/heading_hash_wasm_web`.

### 🔬 Test in Headless Browsers with `wasm-pack test`

```
wasm-pack test --headless --firefox
```

[wasm-pack test docs](https://rustwasm.github.io/docs/wasm-pack/commands/test.html)
npm package: @rhcp/rh-edmund-abbott
Description: Edmund element for PatternFly Elements
Author: Michael Clayton
Latest version: 1.0.0-prerelease.14

# PatternFly Element | Edmund Element

## Dependencies

Make sure you have [Polyserve][polyserve] and [Web Component Tester][web-component-tester] installed.

    npm install -g polyserve web-component-tester

## Dev

    npm start

## Test

    npm run test

## Build

    npm run build

## Demo

Run `npm start` and Polyserve will start a server and open your default browser to the demo page of the element.

## Code style

Edmund (and all PatternFly Elements) use [Prettier][prettier] to auto-format JS and JSON.  The style rules get applied when you commit a change.  If you choose to, you can [integrate your editor][prettier-ed] with Prettier to have the style rules applied on every save.

[prettier]: https://github.com/prettier/prettier/
[prettier-ed]: https://github.com/prettier/prettier/#editor-integration
[polyserve]: https://github.com/Polymer/polyserve
[web-component-tester]: https://github.com/Polymer/web-component-tester
npm package: @rhcp/sso-node-client
Description: Simple sso client with oidc connect
Author: Jared Sprague
Latest version: 0.1.3

# Red Hat SSO NodeJS Client

Simple client for getting SSO access token to use with API's such as GraphQL

## Getting started

```
import SSOClient from "@rhcp/sso-node-client";

const client = new SSOClient({
    url: process.env.URL,
    realm: process.env.REALM,
    scopes: [process.env.SCOPE],
    clientId: process.env.CLIENT_ID,
    clientSecret: process.env.CLIENT_SECRET,
  });

const token = await client.refreshToken();

// Use token to in Authorization header to GraphQL

```
npm package: @rhdj/save-csv
Description: saves a csv file
Author: rob johnston
Latest version: 0.0.3

# save-csv

saves a csv file

## Install

```bash
npm install save-csv
npx cap sync
```

## API

<docgen-index>

* [`writeCSVToStorage(...)`](#writecsvtostorage)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### writeCSVToStorage(...)

```typescript
writeCSVToStorage(options: { value: string; }) => Promise<{ value: string; }>
```

| Param         | Type                            |
| ------------- | ------------------------------- |
| **`options`** | <code>{ value: string; }</code> |

**Returns:** <code>Promise&lt;{ value: string; }&gt;</code>

--------------------

</docgen-api>
npm package: @rhds/elements
Description: Red Hat Design System Elements
Latest version: 4.1.0

# Red Hat Design System

[Documentation][docs], [design tokens][tokens], and [Web Components][elements] for building uniform experiences with the Red Hat brand.

## 🎨 For Designers

RHDS provides Figma libraries and subsystems to aid in your design work.

## 💻 For Developers

RHDS provides a collection of ready-made, framework-agnostic Web Components with Red Hat branding, user experience, accessibility, and style guidelines built in.

```html
<rh-card>
  <h2 slot="heading">Red Hat Branded Web Components</h2>
  <p>So you can focus more on your content or app, and less on implementation details.</p>
  <rh-cta slot="footer">
    <a href="https://ux.redhat.com">Read the Docs</a>
  </rh-cta>
</rh-card>
```

## Contributions are Welcome

Would you like to contribute to the **documentation** or **design specs**? Read [the site contributing guide][contributing].  
Would you like to contribute to **component development**? Read [the developer contributing guide][development].

[docs]: https://ux.redhat.com
[tokens]: https://red-hat-design-tokens.netlify.app
[elements]: https://ux.redhat.com/elements/
[contributing]: https://github.com/RedHat-UX/red-hat-design-system/tree/main/CONTRIBUTING_DESIGN.md
[development]: https://github.com/RedHat-UX/red-hat-design-system/tree/main/CONTRIBUTING_DEV.md
npm package: @rhds/icons
Description: Red Hat Icons
Author: Red Had Icons Authors
Latest version: 2.1.0

# Red Hat Icons

Official Red Hat Brand Icons

## Demo

1. Visit the [Demo](https://red-hat-icons.netlify.app/)
2. Copy the `rh-icon` html markup for the desired icon
3. Paste that icon as well as the dependencies needed from the [rh-icon](https://ux.redhat.com/elements/icon/) documentation


## Quickstart

```bash
npm install @rhds/icons
```

## Contributing

Please read the [contributing guide](./CONTRIBUTING.md) for more information.


## Licensing

The software and icons contained and produced by build are covered by two separate licenses. A [MIT license](./LICENSE) covers the JS modules, build scripts and configuration, and the [Creative Commons 4.0 License](#creative-commons-40) covers the icons.
npm package: @rhdx/elements
Description: Red Hat Extra
Latest version: 0.0.1

# Red Hat Extensions

Experimental extension elements based off of Red Hat Design System principles and tooling.

## Contributing to RHx

## Prerequisites

To develop components or Red Hat Extension documentation, you must first install
some required software, namely node.js. We use [nvm](https://github.com/nvm-sh/nvm)
to ensure a uniform development environment.

### Install Node
Fedora/RHEL users should install `nvm` for bash directly from GitHub

```bash
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
```

Mac users should [Install homebrew](https://brew.sh/), then use that to install `nvm`:

```bash
brew install nvm
```

### Clone the Repository

Then change directory to it:

```bash
git clone git@github.com:redhat-ux/red-hat-design-system
cd red-hat-design-system
```

### Install Dependencies
Install the right node version using `nvm`, then install the `node_modules` dependencies:

```bash
nvm use
npm ci
```

## Generate an Element

RHx uses tools and libraries from  [`@patternfly/patternfly-elements`](https://github.com/patternfly/patternfly-elements).
Use the PatternFly Elements generator to scaffold an element:

```bash
npm run new
```

## Run the Dev Server
Run the dev server to develop components. Your changes will automatically refresh the browser
window:

```bash
npm start
```

This starts a local dev server at http://localhost:8000 and the 11ty dev server for the docs site at http://localhost:8080

To run *only* the components dev server, first run the build, then run the dev 
server:
```bash
npm run dev
```

To run *only* the docs dev server, first run the build, then 11ty
```bash
npm run serve
```
npm package: @rheactorjs/aws-lambda
Description: Core components for RESTful AWS lambda endpoints
Author: Resourceful Humans GmbH
Latest version: 1.1.4

# aws-lambda

[![npm version](https://img.shields.io/npm/v/@rheactorjs/aws-lambda.svg)](https://www.npmjs.com/package/@rheactorjs/aws-lambda)
[![Build Status](https://travis-ci.org/RHeactorJS/aws-lambda.svg?branch=master)](https://travis-ci.org/RHeactorJS/aws-lambda)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/aws-lambda.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/aws-lambda/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/aws-lambda/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/aws-lambda/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/aws-lambda)

Core components for RESTful AWS lambda endpoints.

See [`image-service`](https://github.com/RHeactorJS/image-service/blob/master/package.json) for a concrete usage example.

## API Gateway

APIs built with `aws-lambda` require additional setup on API Gateway.

After creating an API Gateway API for the lambda by configure it as [proxy resource](https://docs.aws.amazon.com/console/apigateway/proxy-resource)
the CORS configuration needs to be customized:

Select the `/{proxy+}` resource and from the *Actions* drop-down select *Enable CORS*.  
Add `Content-Length` to the `Access-Control-Allow-Headers` list.
Put `'Content-Type'` in the `Access-Control-Expose-Headers` list under *Advanced*.  
Click *Enable CORS and replace existing CORS headers*.

Don't forget to deploy the API afterwards.
npm package: @rheactorjs/bdd-contexts
Description: Yadda BDD contexts for RHeactorJS applications.
Author: Resourceful Humans GmbH
Latest version: 2.0.1

# bdd-contexts

[![npm version](https://img.shields.io/npm/v/@rheactorjs/bdd-contexts.svg)](https://www.npmjs.com/package/@rheactorjs/bdd-contexts)
[![Build Status](https://travis-ci.org/RHeactorJS/bdd-contexts.svg?branch=master)](https://travis-ci.org/RHeactorJS/bdd-contexts)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/bdd-contexts.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/bdd-contexts/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/bdd-contexts)

[Yadda](https://github.com/acuminous/yadda) BDD contexts for [RHeactorJS applications](https://github.com/RHeactorJS).
npm package: @rheactorjs/build-views
Description: An utility to build HTML views
Author: Resourceful Humans GmbH
Latest version: 1.0.3

# build-views

[![npm version](https://img.shields.io/npm/v/@rheactorjs/build-views.svg)](https://www.npmjs.com/package/@rheactorjs/build-views)
[![Build Status](https://travis-ci.org/RHeactorJS/build-views.svg?branch=master)](https://travis-ci.org/RHeactorJS/build-views)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/build-views.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/build-views/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/build-views)

An utility to build static HTML views.

Uses [lodash template](https://lodash.com/docs/4.17.2#template) to compile a base template into a static, deployable file. See [`ResourcefulHumans/www`](https://github.com/ResourcefulHumans/www/blob/master/Makefile) for a concrete usage example.

## Features

- It reads *includes* from a directory and injects their source into the output. This allows to separate the building blocks of a website into smaller files
- It reads SVG files and injects them into the output.
- It has the ability to add variable names to the output.
npm package: @rheactorjs/errors
Description: A collection of errors
Author: Resourceful Humans GmbH
Latest version: 1.0.2

# errors

[![npm version](https://img.shields.io/npm/v/@rheactorjs/errors.svg)](https://www.npmjs.com/package/@rheactorjs/errors)
[![Build Status](https://travis-ci.org/RHeactorJS/errors.svg?branch=master)](https://travis-ci.org/RHeactorJS/errors)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/errors.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/errors/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/errors/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/errors/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/errors)

A collection of errors

Note that Babel [does not support extending builtin classes](https://github.com/babel/babel/commit/3878bd812c73bdd18b1011be59515dad985940fd), so we use [this way](http://stackoverflow.com/a/35858868) to create the error objects:
  
```javascript
class MyError {
  constructor(message) {
    this.name = MyError.name
    this.message = message
    this.stack = (new Error(message)).stack
  }
}
MyError.prototype = Object.create(Error.prototype)
```
npm package: @rheactorjs/event-store
Description: Implementation of an event store based on redis
Author: Resourceful Humans GmbH
Latest version: 3.0.3

# event-store

[![npm version](https://img.shields.io/npm/v/@rheactorjs/event-store.svg)](https://www.npmjs.com/package/@rheactorjs/event-store)
[![Build Status](https://travis-ci.org/RHeactorJS/event-store.svg?branch=master)](https://travis-ci.org/RHeactorJS/event-store)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/event-store.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/event-store/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/event-store/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/event-store/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/event-store)

Implementation of an event store based on [redis](https://redis.io/).

Contains [helper methods to manage secondary indices](https://github.com/RHeactorJS/event-store/blob/master/src/aggregate-index.js).

## Versioning

Storing events per aggregate is done in a list per individual aggregate, the order of the insertion is guaranteed by using [Redis lists](https://redis.io/topics/data-types#lists). This gives use an version number per event for free.

Lets assume we want to create a user `17`, we store a `UserCreatedEvent` for this aggregate id:

```javascript
eventStore.persist(new ModelEvent('UserCreatedEvent', '17', {name: 'John'}))
```

If we add another event later:

```javascript
eventStore.persist(new ModelEvent('UserNameUpdatedEvent', '17', {name: 'Mike'}))
```

this event will be appended to the list.

When aggregating the events, we can increase the version of the aggregate per event.

## Mutable Aggregates have been deprecated

The initial implementation of the event store modified models in place. More recently we decied to use immutable models instead. 

The [`ImmutableAggregateRepository`](https://github.com/RHeactorJS/event-store/blob/master/src/immutable-aggregate-repository.js) changes how Models are instantiated. It moves the responsibility of creating the model instance to the repository, where the `applyEvent()` method is invoked as a reducer. The method will return an instance of [`ImmutableAggregateRoot`](https://github.com/RHeactorJS/event-store/blob/master/src/immutable-aggregate-root.js) which can no longer be manipulated directly.

This also changes how meta information is stored in the Aggregates, it is now encapsuled in a separate object called [`AggregateMeta`](https://github.com/RHeactorJS/event-store/blob/master/src/aggregate-meta.js).

See the [tests](https://github.com/RHeactorJS/event-store/blob/master/test/immutable-aggregate-repository.spec.js) for details.
npm package: @rheactorjs/event-store-dynamodb
Description: Implementation of an event store using DynamoDB
Author: Resourceful Humans GmbH
Latest version: 2.4.2

# event-store-dynamodb

[![npm version](https://img.shields.io/npm/v/@rheactorjs/event-store-dynamodb.svg)](https://www.npmjs.com/package/@rheactorjs/event-store-dynamodb)
[![Build Status](https://travis-ci.org/RHeactorJS/event-store-dynamodb.svg?branch=master)](https://travis-ci.org/RHeactorJS/event-store-dynamodb)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/event-store-dynamodb.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/event-store-dynamodb/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/event-store-dynamodb/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/event-store-dynamodb/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/event-store-dynamodb)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Implementation of an event store using DynamoDB.

Contains [helper methods to manage secondary indices](https://github.com/RHeactorJS/event-store-dynamodb/blob/master/src/aggregate-index.js).

## Versioning

Storing events per aggregateName is done in a list per individual aggregateName, the order of the insertion is guaranteed by using the version as the range key.
npm package: @rheactorjs/models
Description: A collection of models
Author: Resourceful Humans GmbH
Latest version: 4.0.1

# models

[![npm version](https://img.shields.io/npm/v/@rheactorjs/models.svg)](https://www.npmjs.com/package/@rheactorjs/models)
[![Build Status](https://travis-ci.org/RHeactorJS/models.svg?branch=master)](https://travis-ci.org/RHeactorJS/models)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/models.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/models/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/models/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/models/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/models)

A collection of models.

## JSON-LD

> :information_source: See also: [RESTful API in `server`](https://github.com/RHeactorJS/server/blob/master/README.md#restful-api)

### `$context`

When creating an object instance from a JSON representation, the `fromJSON()` method expects the presence of the correct `$context` value. When serializing and unserializing using these models, this is done automatically.

This makes it impossible to use the data for one entity as another.

### `$contextVersion`

The `$contextVersion` was added to enable clients that cache entities, e.g. in localStorage, to check if their application code is compatibel with the cached data.
npm package: @rheactorjs/template-mailer-client
Description: A client library for interacting with template-mailer-aws-lambda
Author: Resourceful Humans GmbH
Latest version: 1.0.1

# template-mailer-client

[![npm version](https://img.shields.io/npm/v/@rheactorjs/template-mailer-client.svg)](https://www.npmjs.com/package/@rheactorjs/template-mailer-client)
[![Build Status](https://travis-ci.org/RHeactorJS/template-mailer-client.svg?branch=master)](https://travis-ci.org/RHeactorJS/template-mailer-client)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/template-mailer-client.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/template-mailer-client/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/template-mailer-client/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/template-mailer-client/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/template-mailer-client)

A javascript client library for interacting with [template-mailer-aws-lambda](https://github.com/RHeactorJS/template-mailer-aws-lambda).
npm package: @rheactorjs/update-lambda-environment-config
Description: A helper script to update lambda environment variables with the current version and deploy time
Author: Resourceful Humans GmbH
Latest version: 1.0.0

# update-lambda-environment-config

[![npm version](https://img.shields.io/npm/v/@rheactorjs/update-lambda-environment-config.svg)](https://www.npmjs.com/package/@rheactorjs/update-lambda-environment-config)
[![Build Status](https://travis-ci.org/RHeactorJS/update-lambda-environment-config.svg?branch=master)](https://travis-ci.org/RHeactorJS/update-lambda-environment-config)
[![monitored by greenkeeper.io](https://img.shields.io/badge/greenkeeper.io-monitored-brightgreen.svg)](http://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)

This script takes the output of `aws lambda get-function-configuration` and returns an updated environment configuration string with added version, deployTime and node environment from environment variables.

## Example

Given this is the configuration for your lambda:
    
    { 
       "FunctionName": "myLambdaFunction", 
       … 
       "Environment": { 
           "Variables": { 
               "FOO": "BAR" 
           } 
        } 
    } 
    
If called like this:

    $ VERSION=1.2.3
    $ DEPLOY_TIME=1234567890
    $ NODE_ENV=production
    $ VARS=`aws lambda get-function-configuration \
    --function-name myLambdaFunction \
    | ./node_modules/.bin/update-lambda-environment-config`
    
it sets `$VARS` to this
    
    FOO="BAR",VERSION="1.2.3",DEPLOY_TIME="1234567890",NODE_ENV="production"

which can be used for updating it via `aws lambda update-function-configuration`:

    aws lambda update-function-configuration \
    --function-name "myLambdaFunction" \
    --environment "Variables={$(VARS)}"

See it in action [here](https://github.com/RHeactorJS/image-service/blob/master/Makefile).
npm package: @rheactorjs/value-objects
Description: A collection of value objects
Author: Resourceful Humans GmbH
Latest version: 10.1.0

# value-objects

[![npm version](https://img.shields.io/npm/v/@rheactorjs/value-objects.svg)](https://www.npmjs.com/package/@rheactorjs/value-objects)
[![Build Status](https://travis-ci.org/RHeactorJS/value-objects.svg?branch=master)](https://travis-ci.org/RHeactorJS/value-objects)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/value-objects.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/value-objects/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/value-objects/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/value-objects/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/value-objects)

A collection of value objects

## Common API

### ValueType()

This method exposes a [tcomb](https://github.com/gcanti/tcomb) type validation base on `instanceof` or the **name of the type** and it's properties.

Note that instanceof can't be used always because having this check will return false, because the application using
the value-objects package will create an instance that Node.js thinks to be from a different location that the
one referenced in this package's `uri.js`

    # app.js
    const URIValue = require('value-objects/uri')
    let u = new URIValue(…)
    URIValue.Type(u) // will fail
    
    # uri.js
    URIValue.Type = t.irreducible('URIValue', (x) => x instanceof URIValue)
  
## .equals()

You can compare two value objects with the `.equals()` method:

```javascript
const ex = new URIValue('https://example.com') 
ex.equals(new URIValue('https://example.com')) // -> true
ex.equals(new URIValue('https://acme.com'))    // -> false
```
## .is()

You can check if a given value *is* of this value object:

```javascript
const ex = new URIValue('https://example.com') 
URIValue.is(ex)    // -> true
DomainValue.is(ex) // -> false
```
npm package: @rheactorjs/web-app
Description: Contains the building blocks for a web application
Author: Resourceful Humans GmbH
Latest version: 1.0.0

# web-app

[![npm version](https://img.shields.io/npm/v/@rheactorjs/web-app.svg)](https://www.npmjs.com/package/@rheactorjs/web-app)
[![Build Status](https://travis-ci.org/RHeactorJS/web-app.svg?branch=master)](https://travis-ci.org/RHeactorJS/web-app)
[![monitored by greenkeeper.io](https://img.shields.io/badge/greenkeeper.io-monitored-brightgreen.svg)](http://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Test Coverage](https://codeclimate.com/github/RHeactorJS/web-app/badges/coverage.svg)](https://codeclimate.com/github/RHeactorJS/web-app/coverage)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/web-app/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/web-app)

This library contains the typical building blocks for a Angular 1 web application in the Resourceful Humans Bootstrap 4 design.

HTML views for

 - Registration
 - Activation
 - Lost Password
 - Login
 - Profile settings (Name, Email)
 - Avatar
 - Admin area for managing users
 - and other parts like
  - webfonts
  - Google Analytics
  - Favicon
  - Update warning
  - error tracking
 - *[see all views](https://github.com/RHeactorJS/web-app/tree/master/includes)*
 
[Styles](https://github.com/RHeactorJS/web-app/tree/master/scss) adapting Bootstrap 4 to RH design principles.

Controllers for

 - above views
 - [managing errors](https://github.com/RHeactorJS/web-app/blob/master/js/controller/bluebird.js)
 - *[see all controllers](https://github.com/RHeactorJS/web-app/tree/master/js/controller)* 

Directives for

 - [managing Bootstrap error states on input elements](https://github.com/RHeactorJS/web-app/blob/master/js/directives/bootstrap-error-states.js)
 - *[see all directives](https://github.com/RHeactorJS/web-app/blob/master/js/directives/)*
 
Services

 - a [Generic Service](https://github.com/RHeactorJS/web-app/blob/master/js/services/generic.js) for accessing the RESTful, [JSON-LD](http://json-ld.org/) inspired API of [RHeactorJS applications](https://github.com/RHeactorJS).
 - *[see all services](https://github.com/RHeactorJS/web-app/blob/master/js/services/)*
 
Utilities
 
 - that [handle live-updates](https://github.com/RHeactorJS/web-app/blob/master/js/util/live-collection.js) via [EventSource connections](https://github.com/RHeactorJS/web-app/blob/master/js/util/event-source-connection.js)
 - that can [wait for](https://github.com/RHeactorJS/web-app/blob/master/js/util/wait-for.js) dependencies to *appear* on the parent scope
 - *[see all utilities](https://github.com/RHeactorJS/web-app/tree/master/js/util)*
npm package: @rheactorjs/yadda-feature-runner
Description: A feature runner for yadda
Author: Resourceful Humans GmbH
Latest version: 3.0.2

# yadda-feature-runner

[![npm version](https://img.shields.io/npm/v/@rheactorjs/yadda-feature-runner.svg)](https://www.npmjs.com/package/@rheactorjs/yadda-feature-runner)
[![Build Status](https://travis-ci.org/RHeactorJS/yadda-feature-runner.svg?branch=master)](https://travis-ci.org/RHeactorJS/yadda-feature-runner)
[![Greenkeeper badge](https://badges.greenkeeper.io/RHeactorJS/yadda-feature-runner.svg)](https://greenkeeper.io/) 
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![semantic-release](https://img.shields.io/badge/semver-semantic%20release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Code Climate](https://codeclimate.com/github/RHeactorJS/yadda-feature-runner/badges/gpa.svg)](https://codeclimate.com/github/RHeactorJS/yadda-feature-runner)

A feature runner for [yadda](https://github.com/acuminous/yadda)

## Annotations

The following annotations are implemented:

 - `@after`: marks a feature to be run *after* another feature. Features are sorted to ensure that they run in the proper order. 
 - `@pending`: marks a feature or scenario as skipped
 - `@thisonly`: tells the runner to only run this feature. All depending features are run before.
npm package: @rheajt/gatsby-source-rss
Description: Fork of Johnathan Dublin's RSS source plugin for GatsbyJS to include custom fields
Author: jordan rhea
Latest version: 1.0.0

# gatsby-source-rss

Fork of the `gatsby-source-rss` plugin to allow for custom RSS fields.

## Usage

Add the following to your `gatsby-config.js`

```js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-source-rss',
      options: {
        rssURL: 'https://blog.jordanrhea.com/rss.xml',
        customFields: {
          item: ['tags'],
        },
      },
    },
  ],
};
```

Then, grab the data in graphql:

```js
allRssFeedItem {
  edges {
    node {
      id
      youtube
      tags
      title
      content
      link
    }
  }
}
```
npm package: @rheasmith/react-google-one-tap-login
Description: React wrapper for google one tap authentication
Author: Rhea
Latest version: 0.1.3

# React - Google One Tap Login

React wrapper for google one tap authentication

## Install

```
npm install @rheasmith/react-google-one-tap-login
```

OR

```
yarn add @rheasmith/react-google-one-tap-login
```

## How to use

## As a Hook

```js
import { useGoogleOneTapLogin } from '@rheasmith/react-google-one-tap-login';

useGoogleOneTapLogin({
    onError: error => console.log(error),
    onSuccess: response => console.log(response),
    googleAccountConfigs: {
      client_id: // Your google client id here !!!
    },
  });
```

## As a Component

```js
import React from 'react';
import ReactDOM from 'react-dom';
import GoogleOneTapLogin from '@rheasmith/react-google-one-tap-login';

ReactDOM.render(
  <GoogleOneTapLogin onError={(error) => console.log(error} onSuccess={(response) => console.log(response} googleAccountConfigs={{ client_id: // Your google client id here !!! }} />,
  document.getElementById('root')
);
```

## Add Login Button use id="googlButton"

```js
import React from 'react';
import ReactDOM from 'react-dom';
import GoogleOneTapLogin from '@rheasmith/react-google-one-tap-login';

ReactDOM.render(
  <><div id="googleButton"></div></>,
  document.getElementById('root')
);
```


## Props

| Name                   | Type     | Required |                                                         Description                                                          |
| ---------------------- | -------- | :------: | :--------------------------------------------------------------------------------------------------------------------------: |
| disabled               | boolean  |  false   |                                                   Disable the login prompt                                                   |
| onError                | callback |  false   |                                                       onError : Error                                                        | null |
| onSuccess              | callback |  false   |                                        onSuccess : GoogleEndpointResponse (See below)                                        |
| disableCancelOnUnmount | boolean  |  false   |                                       Disable cancelation of one tap login on unmount                                        |
| googleAccountConfigs   | object   |   true   | [Google One Tap JS API Reference](https://developers.google.com/identity/one-tap/web/reference/js-reference#IdConfiguration) |

#### \*client_id is required in googleAccountConfigs

## Google EndPoint Response

[More details](https://developers.google.com/identity/sign-in/web/backend-auth#calling-the-tokeninfo-endpoint)
| Name | Type |
|----------------|--------|
| iss | string |
| sup | string |
| azp | string |
| aud | string |
| iat | string |
| exp | string |
| name | string |
| email | string |
| local | string |
| picture | string |
| given_name | string |
| family_name | string |
| email_verified | string |