open-index/open-npm huggingface dataset:
npm package: @nrf-guide/proto
Description: Documents the communication protocol between the nRF Guide backend and the web application
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 4.2.0

# nRF Guide Protocols [![npm version](https://img.shields.io/npm/v/@nrf-guide/proto.svg)](https://www.npmjs.com/package/@nrf-guide/proto)

[![GitHub Actions](https://github.com/bifravst/nRF-Guide-proto/actions/workflows/build-and-publish.yaml/badge.svg)](https://github.com/bifravst/nRF-Guide-proto/actions/workflows/build-and-publish.yaml)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier/)
[![ESLint: TypeScript](https://img.shields.io/badge/ESLint-TypeScript-blue.svg)](https://github.com/typescript-eslint/typescript-eslint)

Documents the communication protocol between the nRF Guide backend and the web
application.

## Usage

```bash
npm i --save-exact @nrf-guide/proto
```

[Example](./example.ts)

## Setup

Fetch the submodules

```bash
git submodule init
git submodule update --remote
```

Install the dependencies:

```bash
npm ci
```

## Run tests

```bash
npm test
```

## Update generated code

```bash
npx tsx generate/types/schema-to-type.ts
npx tsx generate/schema/NRFCloudMessage.schema.ts
npx prettier --write .
```
npm package: @nrfcloud/api
Description: Provides the API documentation for the nRFCloud.com REST API.
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 1.0.0

# nRF Cloud API [![API v1.0.0-preview.1](https://img.shields.io/badge/API-v1.0.0--preview.1-blue.svg)](https://raw.githubusercontent.com/nRFCloud/api/master/docs/api.yaml) [![Swagger UI](https://img.shields.io/badge/Swagger-UI-orange.svg)](http://petstore.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FnRFCloud%2Fapi%2Fmaster%2Fdocs%2Fapi.yaml%3Fv1.0.0-preview.1)

[![Build Status](https://travis-ci.org/nRFCloud/api.svg?branch=master)](https://travis-ci.org/nRFCloud/api)
[![npm preview version](https://img.shields.io/npm/v/@nrfcloud/api/preview.svg)](https://www.npmjs.com/package/@nrfcloud/api)  
[![Greenkeeper badge](https://badges.greenkeeper.io/nrfcloud/api.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

Provides the API documentation for the [nRFCloud.com](https://nrfcloud.com/) REST API.

> :warning: **This is a preview release and might be changed without notice.**

## API Documentation

The documentation in OpenAPI 3.0.0 format can be found [here](https://raw.githubusercontent.com/nRFCloud/api/master/docs/api.yaml). You can open it in the [Swagger API viewer](http://petstore.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FnRFCloud%2Fapi%2Fmaster%2Fdocs%2Fapi.yaml%3Fv1.0.0-preview.1) to execute requests agains the API right in your browser.

## JSON schema files

The response and request schemas from the API documentation are exported as JSON schema files in [`./schemas`](./schemas) can be included in JavaScript like this:

    npm i @nrfcloud/api@preview
   
```javascript
const {schemas} = require('@nrfcloud/api')
```
npm package: @nrfcloud/api-gateway-authorizer
Description: Custom authorizer for API Gateway
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 1.2.4

# Custom API Gateway Authorizer

[![npm version](https://img.shields.io/npm/v/@nrfcloud/api-gateway-authorizer.svg)](https://www.npmjs.com/package/@nrfcloud/api-gateway-authorizer)
[![Build Status](https://travis-ci.org/nRFCloud/api-gateway-authorizer.svg?branch=master)](https://travis-ci.org/nRFCloud/api-gateway-authorizer)
[![Test Coverage](https://api.codeclimate.com/v1/badges/e94dc6b5b7c7a13829e8/test_coverage)](https://codeclimate.com/github/nRFCloud/api-gateway-authorizer/test_coverage)  
[![Greenkeeper badge](https://badges.greenkeeper.io/nrfcloud/api-gateway-authorizer.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)  
[![DeepScan Grade](https://deepscan.io/api/projects/1770/branches/7588/badge/grade.svg)](https://deepscan.io/dashboard/#view=project&pid=1770&bid=7588)
[![Known Vulnerabilities](https://snyk.io/test/github/nrfcloud/api-gateway-authorizer/badge.svg?targetFile=package.json)](https://snyk.io/test/github/nrfcloud/api-gateway-authorizer?targetFile=package.json)
[![Maintainability](https://api.codeclimate.com/v1/badges/e94dc6b5b7c7a13829e8/maintainability)](https://codeclimate.com/github/nRFCloud/api-gateway-authorizer/maintainability)

Authorizes requests to the nRF Cloud API with Cognito Tokens.

It fetches the Cognito Identity ID for the user pool token.
The user information will be on `event.requestContext.authorizer`:

```json
{
    cognitoIdentityId: 'us-east-1:...', 
    'cognito:username': 'alex.doe@example.com',
    email: 'alex.doe@example.com'
}
```

## Tests

Set these environment variables:

    user_pool_url=https://cognito-idp.us-east-1.amazonaws.com/us-east-1_fdiBa7JSO
    identity_pool_id=us-east-1:c00e1327-dfc2-4aa7-a484-8ca366d11a68
    username=user@example.com
    password=changeme
    client_id=bmoej5j8t187jmnumu00jrt2v
    AWS_ACCESS_KEY_ID=changeme
    AWS_SECRET_ACCESS_KEY=changeme
npm package: @nrfcloud/aws-cf-stack-output
Description: Echos the value of an AWS CloudFormation stack output
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 1.1.3

# aws-cf-stack-output [![npm version](https://img.shields.io/npm/v/@nrfcloud/aws-cf-stack-output.svg)](https://www.npmjs.com/package/@nrfcloud/aws-cf-stack-output)  

[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Echos the value of an AWS CloudFormation stack output

Usage: 

    npx @nrfcloud/aws-cf-stack-output <stackName> <outputName>

## Setup
To run the script, you need to configure access to your AWS account. 
The recommended way is to [set up a shared credentials file 
`.aws\credentials`](https://docs.aws.amazon.com/de_de/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html) 
and [set the environment variable 
`AWS_REGION`](https://docs.aws.amazon.com/de_de/sdk-for-javascript/v2/developer-guide/setting-region.html#setting-region-environment-variable) 
to the value `us-east-1`.
npm package: @nrfcloud/aws-lambda-logging
Description: AWS lambda logging helper
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 1.1.0

# AWS lambda logging helper

[![Greenkeeper badge](https://badges.greenkeeper.io/nRFCloud/aws-lambda-logging.svg)](https://greenkeeper.io/)

![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiVWxqd3dGL2ZWSkNPbFdlZHp4VzIxbGxua0k4QkM1TVhaWlZnanpMS2lMYm85RUY5ZVBKWVdKUk5SS3QydHRMZmxjMStvUjlqRm5qSGY0TXQ0dzhwRzNzPSIsIml2UGFyYW1ldGVyU3BlYyI6IkkwVVE5dkx5U0RJUVh3QU0iLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=saga)
npm package: @nrfcloud/bdd-feature-runner-aws
Description: BDD Test Runner for cloud native applications made with AWS.
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 2.7.6

# BDD Feature Runner for [nRF Connect for Cloud](https://nrfcloud.com/)

[![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiQ1JxbThvZUc2d05KUDZTdkx3QmdCMEJhYndaWmVjeWViZ0JIUHRta3lGS3JQMGRpbVBOV2VZRlBNS3hFZEY5bGFTZk1TVGxiL0Fad0RmYm5wVUpSM3BZPSIsIml2UGFyYW1ldGVyU3BlYyI6IlJJd0Q4Y1JxSVlqdk5qclkiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=saga)](https://console.aws.amazon.com/codesuite/codebuild/projects/bdd-feature-runner-aws/history?region=us-east-1)

An implementation of a [Gherkin](https://docs.cucumber.io/gherkin/) feature runner to run our end-to-end tests.
npm package: @nrfcloud/fota-device-simulator
Description: AWS IoT Thing simulator for nRF91 FOTA
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 3.0.0

## FOTA Device Simulator [![npm version](https://img.shields.io/npm/v/@nrfcloud/fota-device-simulator.svg)](https://www.npmjs.com/package/@nrfcloud/fota-device-simulator)

[![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoia2tva3Q2eCtYWjVlVXhqcjdqZ3JtdWVNMFlqdGRRNE9hbVcwSTd4WDAwbHpFM3ZJbkl3cXFpK0tQRGNFd01pWTFkODBFeG9FRVZkVWtaK1pDTllyS2FNPSIsIml2UGFyYW1ldGVyU3BlYyI6IklYOE4xTGVmS21qWXo3Q1giLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=saga)](https://console.aws.amazon.com/codesuite/codebuild/projects/fota-device-simulator/history?region=us-east-1)  
[![Greenkeeper badge](https://badges.greenkeeper.io/nRFCloud/fota-device-simulator.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

AWS IoT Thing simulator for nRF91 FOTA.
npm package: @nrfcloud/package-lambda
Description: Package a lambda function and upload it to S3
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 3.3.1

# package-lambda [![npm version](https://img.shields.io/npm/v/@nrfcloud/package-lambda.svg)](https://www.npmjs.com/package/@nrfcloud/package-lambda)

[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

Package a lambda function and upload it to S3

## NPM

Usage: 

    npx @nrfcloud/package-lambda npm <S3 Bucket> <NPM Package>

Example:

```bash
% npx @nrfcloud/package-lambda npm cf-lambda-sourcecode @nrfcloud/api-persistence-event-reducer-lambda
npx: installed 129 in 7.202s
Temp dir: /tmp/tmp-6832cnu8vLNSuGuu
running: rm -r /tmp/tmp-6832cnu8vLNSuGuu/@nrfcloud ...
@nrfcloud/api-persistence-event-reducer-lambda 1.0.2
running: npm ci --ignore-scripts --only=prod ...
added 28 packages in 0.605s
running: zip -r -q /tmp/tmp-6832cnu8vLNSuGuu/api-persistence-event-reducer-lambda-1.0.2.zip ./ ...
running: aws s3 cp /tmp/tmp-6832cnu8vLNSuGuu/api-persistence-event-reducer-lambda-1.0.2.zip s3://cf-lambda-sourcecode/api-persistence-event-reducer-lambda-1.0.2.zip ...
upload: ../../../../../tmp/tmp-6832cnu8vLNSuGuu/api-persistence-event-reducer-lambda-1.0.2.zip to s3://cf-lambda-sourcecode/api-persistence-event-reducer-lambda-1.0.2.zip
```

## Local

You can also publish from a local folder.

This command expects:

 - `package.json`
 - `package-lock.json`
 - `dist/`
 
in the local folder.

Usage: 

    npx @nrfcloud/package-lambda local <S3 Bucket>

Example:

```
% npx @nrfcloud/package-lambda local cf-lambda-sourcecode
Temp dir: /tmp/tmp-206396JvbFs6flXBz
running: rm -r /tmp/tmp-206396JvbFs6flXBz/@nrfcloud ...
@nrfcloud/api-persistence-event-reducer-lambda 1.1.2
running: npm ci --ignore-scripts --only=prod ...
added 28 packages in 0.734s
running: zip -r -q /tmp/tmp-206396JvbFs6flXBz/api-persistence-event-reducer-lambda-1.1.2.zip ./ ...
running: aws s3 cp /tmp/tmp-206396JvbFs6flXBz/api-persistence-event-reducer-lambda-1.1.2.zip s3://cf-lambda-sourcecode/api-persistence-event-reducer-lambda-1.1.2.zip ...
upload: ../../../../../tmp/tmp-206396JvbFs6flXBz/api-persistence-event-reducer-lambda-1.1.2.zip to s3://cf-lambda-sourcecode/api-persistence-event-reducer-lambda-1.1.2.zip
```
npm package: @nrfcloud/package-layered-lambdas
Description: Packages lambda functions and layers for AWS lambda
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 1.2.4

# Package Layered Lambdas [![npm version](https://img.shields.io/npm/v/@nrfcloud/package-layered-lambdas.svg)](https://www.npmjs.com/package/@nrfcloud/package-layered-lambdas)

[![Build Status](https://codebuild.us-east-1.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoidDJRd29PcytxMjJSRzlPSXdYTTlyYmphZjhEWFFwRndaaWxBNldVZXdEREJZZVhobmN5aWNqRVNLeFpOck5DZjVKZURnSm03cHVnZFJIN2tDQm9FZVR3PSIsIml2UGFyYW1ldGVyU3BlYyI6IjdkaTZ6dkZWdXg4WDQ3WXYiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=saga)](https://console.aws.amazon.com/codesuite/codebuild/projects/package-layered-lambdas/history?region=us-east-1)  
[![Greenkeeper badge](https://badges.greenkeeper.io/nRFCloud/package-layered-lambdas.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)

Packages lambdas with intra-project dependencies using Webpack and a base layer with the dependencies defined in `package.json`.

Checksums are created for dependencies per lambda so that rebuild only happens when files are changed.

Packaged lambdas are published to S3 so they can be picked up and deployed by CloudFormation. 
It's also a convenient cache for other developers.

More background information on this project and usage instructions can be found in [this blog post](https://coderbyheart.com/how-i-package-typescript-lambdas-for-aws/).
npm package: @nrfcloud/register-gateway
Description: Registers a new Gateway and returns the certificate
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 1.0.0

# Register Gateway

[![npm dev version](https://img.shields.io/npm/v/@nrfcloud/register-gateway/dev.svg)](https://www.npmjs.com/package/@nrfcloud/register-gateway)
[![Build Status](https://travis-ci.org/nRFCloud/register-gateway.svg?branch=master)](https://travis-ci.org/nRFCloud/register-gateway)  
[![Greenkeeper badge](https://badges.greenkeeper.io/nrfcloud/register-gateway.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)  

API endpoint which registers a new Gateway and returns the certificate.

*This repo only contains the [IRIS API](https://github.com/nrfcloud/api) documentation for this endpoint.*
npm package: @nrfcloud/tslint-config
Description: tslint configuration for our projects
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 3.11.1

# @nrfcloud/tslint-config

[![npm](https://img.shields.io/npm/v/@nrfcloud/tslint-config.svg)](https://www.npmjs.com/package/@nrfcloud/tslint-config)
[![Build Status](https://travis-ci.org/nRFCloud/tslint-config.svg?branch=master)](https://travis-ci.org/nRFCloud/tslint-config)  
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)  
[![Greenkeeper badge](https://badges.greenkeeper.io/nrfcloud/tslint-config.svg)](https://greenkeeper.io/)
[![DeepScan Grade](https://deepscan.io/api/projects/836/branches/1776/badge/grade.svg)](https://deepscan.io/dashboard/#view=project&pid=836&bid=1776)
[![Known Vulnerabilities](https://snyk.io/test/github/nrfcloud/tslint-config/badge.svg)](https://snyk.io/test/github/nrfcloud/tslint-config)

tslint configuration for our projects

## Usage

    npm i --save-dev @nrfcloud/tslint-config
    echo '{"extends": "@nrfcloud/tslint-config"}' > tslint.json
npm package: @nrfcloud/update-lambda-environment
Description: Helper for updating the environment variables of a lambda
Author: Nordic Semiconductor ASA | nordicsemi.no
Latest version: 1.0.3

# @nRFCloud/update-lambda-environment

[![npm](https://img.shields.io/npm/v/@nrfcloud/update-lambda-environment.svg)](https://www.npmjs.com/package/@nrfcloud/update-lambda-environment)
[![Build Status](https://travis-ci.org/nRFCloud/update-lambda-environment.svg?branch=master)](https://travis-ci.org/nRFCloud/update-lambda-environment)
[![Greenkeeper badge](https://badges.greenkeeper.io/coderbyheart/update-lambda-environment.svg)](https://greenkeeper.io/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Known Vulnerabilities](https://snyk.io/test/github/nrfcloud/update-lambda-environment/badge.svg)](https://snyk.io/test/github/nrfcloud/update-lambda-environment)
[![DeepScan Grade](https://deepscan.io/api/projects/835/branches/1775/badge/grade.svg)](https://deepscan.io/dashboard/#view=project&pid=835&bid=1775)

Helper for updating the environment variables of a lambda.

Reads the configuration from the provided package.json, and updates the
lambdas `description` and `version` environment variable. 

Usage (with [npx](https://www.npmjs.com/package/npx)):

    npx @nRFCloud/update-lambda-environment <functionName> </path/to/package.json>