open-index/open-npm huggingface dataset:
npm package: @nuskin/health-status-utils
Description: Allow SREs to monitor K8s containerized app's health
Author: Brady Groharing
Latest version: 1.1.0

# Health Status Library

## Purpose
This package provides a series of options for the SREs to monitor the health of our K8s apps:
# Install
```sh
yarn add @nuskin/health-status-utils
```

# Pre-requisites
- Install [Node.js](https://nodejs.org/en/) version 14.0.0

# Install

```
yarn add @nuskin/health-status-utils
```

## Project Structure
The folder structure of this app is explained below:

| Name | Description
| --- | ---
| **\_\_mocks\_\_**        | Contains jest mocks
| **\_\_tests\_\_**        | Contains jest tests
| **src**                  | Contains source code
| .gitignore               | List of files and directories for Git to ignore
| jest.config.js            | Configuration options for Jest
| jest.util.js             | Configuration options for Jest
| .eslintrc                | Configuration options for ES Lint
| .prettierrc              | Configuration options for prettier
| package.json             | Contains npm dependencies as well as build scripts
| .prettierignore          | List of files and directories for prettier to ignore
| cx.config                 | File needed for common pipeline to pass
| yarn.lock                | Yarn state snapshot
| .gitlab-ci.yml           | CI pipeline configuration
| application.yaml    | Configuration file

### Running tests using yarn Scripts
```
yarn test
```

# ESLint
ESLint is a code linter that helps catch minor code quality and style issues.

## ESLint rules
All rules are configured through `.eslintrc`.

## Running ESLint
To run ESLint you can call the ESLint task.
```
yarn lint  // runs only ES lint
```

## Usage

### General
When deployed via a Kubernetes (k8s) container your app will also includes k8s probes for liveness and readiness.
If you initiate the healthchecks then once your container has spun up it'll automatically start performing liveness checks.
Once your app is up and running it is #YOUR JOB# to let the health check know that you are ready using `reportReadiness(true)`
**Example 1:**

```javascript
    initHealthCheckSystems(healthCheckOnSig, healthCheckOnShutdown, readinessCallback, livenessCallback)

    reportReadiness(true)
    reportReadiness(false, ['mockErrorReason'])
```
npm package: @nuskin/login-helper
Description: This library is used to assist the login
Author: Mr. Roboto
Latest version: 1.2.0

# @nuskin/login-helper

This sdk is helping the NuSkin login.

## Installing

Usng npm:

```bash
npm add @nuskin/login-helper
```

Usng yarn:

```bash
yarn add @nuskin/login-helper
```

## Example usage for oktaLogin

```js
const {
    oktaLogin
} = require('@nuskin/login-helper');

const data = {'accessToken': 'xxxxx', 'idToken': 'xxxxx'};
const username = '';

try {
    const result = await oktaLogin(data, username);
    console.log('result is:', result);
} catch (e) {
    console.log('Error: ', e);
}

```

## Example usage for logout

```js
const {
    logout
} = require('@nuskin/login-helper');

logout();


```

## Resources

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @nuskin/mexico-state-lookup
Description: Module that provides mexico state lookups
Author: Ian Harisay
Latest version: 2.1.0

# @nuskin/mexico-state-lookup

## This module provides you with search capabilities for finding Mexico state information.

The state information provided by this module is taken from the wikipedia page found 
[here](https://en.wikipedia.org/wiki/Template:Mexico_State-Abbreviation_Codes).

## State object information
```js
{ 
    name: 'Michoacán',
    abbreviation: ['Mich.'],
    internal: 'MIC',
    iso2: 'MI',
    iso3: 'MIC'
}
```

## Installing

Usng npm:

```bash
npm add @nuskin/mexico-state-lookup
```

Usng yarn:

```bash
yarn add @nuskin/mexico-state-lookup
```

## Example usage

```js
const msc = require('@nuskin/mexico-state-lookup')

console.log(msc.byAll('Nuevo León'))
// prints - { name: 'Nuevo León', abbreviation: ['N.L.'], iso2: 'NL', iso3: 'NLE', internal: 'NL' }

console.log(msc.byName('Nuevo León'))
// prints - { name: 'Nuevo León', abbreviation: ['N.L.'], iso2: 'NL', iso3: 'NLE', internal: 'NL' }

console.log(msc.byIso('NLE').iso2)
// prints - NL

console.log(msc.byAbbr('NL').name)
// prints - Nuevo León

```

## Resources
- [SDK Documentation](https://www.nuskin.com/static/dev-portal-content/domains/utility/sdk/mexico-state-lookup/index.html)
- Changelog could go here

## License

[MIT](https://opensource.org/licenses/MIT)
npm package: @nuskin/minty
Description: This provides a jwt minter
Author: Ian Harisay
Latest version: 2.7.2

# Minty

This project provides two scripts:
- [mint-jwt](./docs/mint-jwt.md)
- [mint-okta-token](./docs/mint-okta-token.md)

### Prerequisites
- Node 14 or greater
- Access to the nse-web-development (nse-wde) - readonly role is fine
- Configured AWS SSO for cli use. Instructions can be found [here](https://nuskin.atlassian.net/wiki/spaces/CLPDOC/pages/1206386988/AWS+SSO)

### Install
```bash
npm i -g @nuskin/minty
```

#### Example Usage
```bash
mint-jwt -h

mint-okta-token -h
```

## Resources

[Using mint-jwt](./docs/mint-jwt.md)  
[Using mint-okta-token](./docs/mint-okta-token.md)