open-index/open-npm huggingface dataset:
npm package: @mx7/otp
Description: A simple OTP generator!
Author: Mahabub
Latest version: 1.2.1

# OTP generator for NodeJS runtime apps (JavaScript or TypeScript)

> Welcome! This node package is built for generating OTP per necessary requirements. It can generate both numeric or alpha-numeric. Hope you will enjoy it!

**It can be used with NodeJS runtime and Deno/Bun too! (I guess)**

## Getting started

**Install this package**

```bash
npm i @mx7/otp # using NPM
# or
yarn add @mx7/top # using yarn
# or
pnpm add @mx7/otp # using pnpm
# or
bun add otp  # using bun
```

## How to use

**ESM imports**

```js
import { generateOtp } from '@mx7/otp'
// or async way
import { generateOtpAsync } from '@mx7/otp'
```

**CommonJS**

```js
const { generateOtp } = require('@mx7/otp')
// or async way
const { generateOtpAsync } = require('@mx7/otp')
```

## Requirements

```yaml
Node: v14.x or later
Environments: ['^ Node14', 'ES5 or later']
Types: ['ESM', 'CJS']
```

## Available APIs

**Types**

```ts
// how the function will operates
function generateOtp(args?: GenerateOtpArgs): string

// arguments with types
type GenerateOtpArgs = {
  digits?: number // optional
  alpha?: boolean // optional
  capitalize?: boolean // optional, but only if alpha is set TRUE!
}
```

**Some examples**

```ts
import { generateOtp } from '@mx7/otp'

// default => length 6
const otp1 = generateOtp()
console.log(otp1) // returns: '012345'

// default with Async. way => length 6
const otpAsync = await generateOtpAsync() // Promise<string>
console.log(otpAsync) // returns: '012345'

// custom length => i.e. 4
const otp2 = generateOtp({
  digits: 4,
})
console.log(otp2) // returns: '0123'

// mix alpha => mixed [a-z]
const otp3 = generateOtp({
  alpha: true,
})
console.log(otp3) // returns: '0x27j4'

// mix alpha & uppercase => mixed [A-Z]
const otp4 = generateOtp({
  alpha: true,
  capitalize: true,
})
console.log(otp4) // returns: '0X27J4'
```

## Author

[@mahabubx7](https://github.com/mahabubx7)

## Changelogs

### [1.2.1] 2024-02-02

#### Fixes

- Fixed async OTP generator function
- Added one more test with async fn

### [1.2.0] - 2024-01-25

#### Feature

- Added `Asynchronous` function for generating OTP
- Added Module path aliases
- Added changelogs
- Updated documentation in README file

#### Fixed

- Fixed some typos
- Fixed npm files selection
npm package: @mxcins/library
Description: library
Latest version: 0.8.0

# LIB

[![996.icu](https://img.shields.io/badge/link-996.icu-red.svg)](https://996.icu)

玩具

* 2021-03-16 15:36:34 取消babel-preset-mxcins的依赖， 在mxcins项目中 使用 @mxcins/library 依赖于 项目中的babel-preset-mxcins在使用 yarnworkspace 时会有问题， 暂时不知道问题出现在哪里
npm package: @mxcins/request
Description: request
Latest version: 3.4.0

# Usage

### rest
* request('//mxcins.com/api/users.json') -> get users;
* request.get('//mxcins.com/api/users.json') -> get users;
* request.post('//mxcins.com/api/users.json', { data: {} }) -> create user;

### graphql
* request.query('//mxcins.com/api/graphql', `query { ... }`, variables) -> graphql query;


### build

### graphl client request errors
npm package: @mxenabled/mx-icons
Description: Library containing material symbol icons for MX
Author: MX
Latest version: 2.2.0

# MX Icon Component Library (based on material symbols)
#### @mxenabled/mx-icons

### Description

This library provides React components for a subset of material symbol icons. That subset of icons is defined in the 
`config.json` configuration file. Additional icons can be added by appended to the `material_icons` list and then
running a script that will build new React components for the added icons.

### Config file

```json
{
  "weight": 400,
  "size": 24,
  "material_icon_type": "materialsymbolsrounded",
  "material_icons": [
    "account_balance",
    "add",
    "add_box",
    "wall_art",
    "wallet"
  ]
}
```
- `weight` - The line thickness to use for the material symbols `[100-700]`
- `size` - The optical DPS size `[20, 24, 40, 48]`
- `material_icon_type` - The type of icons `[materialsymbolsoutlined, materialsymbolsrounded, materialsymbolssharp]`
- `material_icons` - A list of material icon names to include in the library

### Adding Icons
- Edit `config.json` file and add new material symbol icon name in pascal_case (keep list in alphabetical order)
  - See https://fonts.google.com/icons?icon.style=Rounded for full list of material symbol icons
- Run `buildIcons.py` to generate new components and add them to the `IconList`
  - Install requests python package: ```pip3 install requests```
  - Run script: ```./buildIcons.py```
- Create MR
- Publish package after MR has been merged (will be automated in the future)

### Using Icons
There are 2 ways to utilize the icons from this library. There is a backwards compatible `<Icon />` component or
directly using the named icon component `<AccountBalance />`

- Dependencies
  - React 18
  - MUI 5
- Installing MX Icon library
  - npm `npm install @mxenabled/mx-icons`
  - yarn `yarn add @mxenabled/mx-icons`
#### Usage

##### Icon component
  ```tsx
  import { Icon } from "@mxenabled/mx-icons";
  
  <Icon name="account_balance" />
  ```

###### Props
- color (optional) - MUI Theme color (primary, secondary, success, error, etc)
- fill (optional) - `True` or `False` (Defaults to `False`)
- name (required) - material symbol name in pascal_case
- size (optional) - The font size of the icon (Defaults to `20`)
- sx (optional) - MUI SX Prop
- weight (optional) - DEPRECATED - Weight is hardcoded in config (Defaults to `400`)

##### Named icon component
  ```tsx
  import { AccountBalance } from "@mxenabled/mx-icons";
  
  <AccountBalance />
  ```
###### Props
- color - MUI Theme color (primary, secondary, success, error, etc)
- filled (optional) - `True` or `False` (Defaults to `False`)
- size (optional) - The font size of the icon (Defaults to `20`)
- sx (optional) - MUI SX Prop
npm package: @mxenabled/react-native-connect-widget-sdk
Description: MX React Native Connect Widget SDK
Latest version: 1.0.0

# MX React Native Widget SDK

## Purpose

The purpose of this project is to be able to easily integrate the MX connect widget into a react native app.

## Implementation guide

The implementation guide lives in the MX docs [here](Add something here when it exists).

## How it works

This package renders a [React Native Webview](https://www.npmjs.com/package/react-native-webview) using the provided url as the source uri. It also attaches a request interceptor to the webview using `onShouldStartLoadWithRequest`. This interceptor listens for requests with the `mx:` protocol that come from the MX connect widget. When an mx protocol request comes through it calls the onEvent callback provided to the `<ConnectWidget />`. When a request is received from the webviewed connect widget to open an OAuth flow it is opened within the app using an `ASWebAuthenticationSession` for iOS and an `Auth Tab` for Android.

## API Documentation

The api documentation is [here](./API.md)

## Contributing

Read the [contributing guide](./CONTRIBUTING.md) to learn about the development process.

## License

This project is lincensed under the terms of the [MIT license](LICENSE).
npm package: @mxenabled/react-native-widget-sdk
Description: MX React Native Widget SDK
Latest version: 3.0.0

# MX React Native Widget SDK

The purpose of this project is to help simplify your integration experience.
Giving you as few steps as possible to get up and running with an MX React
Native widget. Please refer to our [React Native Widget SDK
documentation][sdk_docs] to get started.

[sdk_docs]: https://docs.mx.com/connect/guides/widget-sdks/react-native/ "React Native Widget SDK"

[Contributiong](./CONTRIBUTING.md)

[Development](./DEVELOPMENT.md)

[E2E Testing](./E2E_TESTING.md)
npm package: @mxenabled/rules-engine
Description: UI for MX's rules engine Dwight
Author: MX
Latest version: 1.0.4

# Rules Engine

A React UI component library for MX's rules engine Dwight, built with TypeScript and Material-UI.

## Scripts

Get up and running
- **`yarn storybook`** - Starts the Storybook development server on port 6006 for component documentation and testing

- ** Shareable Storybook url ** - is located in the output of the pages step when you create an MR

Test your code
- **`yarn test`** - Runs the test suite using Vitest

Test publish your package
- **`yarn publish:alpha`** - Publishes the package to npm with the "alpha" tag for pre-release testing (ie 1.0.0-alpha.JB1)

Publish the real deal
- **`yarn publish:latest`** - Publishes the package to npm as the latest stable release

- **`yarn build`** - Compiles the TypeScript source code into distributable JavaScript using Rollup
- **`yarn build:watch`** - Runs the build process in watch mode, automatically rebuilding when files change
- **`yarn build:analyze`** - Builds the project with bundle analysis enabled to visualize the output size and dependencies
- **`yarn prepublishOnly`** - Automatically runs the build process before publishing to npm
- **`yarn publish:beta`** - Publishes the package to npm with the "beta" tag for beta releases
- **`yarn build-storybook`** - Builds a static version of Storybook to the compiled_docs directory
- **`yarn test:watch`** - Runs tests in watch mode, automatically re-running when files change
- **`yarn citest`** - Runs tests with coverage reporting for continuous integration environments
- **`yarn lint`** - Checks TypeScript and TSX files for code quality issues using ESLint
- **`yarn type-check`** - Validates TypeScript types without generating output files
npm package: @mxenabled/sso-api-proxy
Description: Proxy Widget SSO URL requests to our Platform API.
Latest version: 1.3.4

# Widget SSO API Proxy

This is a proxy server used to get Widget SSO URLs from our Platform API. Any
configuration that you could normally pass to the Platform API via the request
body or a header can be passed in this server as well.

## Getting started

To get started, simply run `node start` and follow the prompts to enter your
client's client's API information (API key and client ID).

## Configuration

When the server starts, the following environment variables will be used if found:

- `MX_CLIENT_ID`
- `MX_API_KEY`
- `MX_API_HOST`
- `MX_DEFAULT_USER_GUID`

Alternatively, a configuration file named `.mx-sso-proxy-rc.yaml` will be
searched for, and, if located, used as well. The configuration file should look
like this:

```yaml
apiKey: "[api key]"
apiHost: "https://int-api.mx.com"
clientId: "[client id]"
defaultUserGuid: "[default user guid]"
```

If a required configuration is missing, you will be prompted to enter it in
before the server starts.

## Making requests

The server has the following endpoints:

- `GET /user/widget_urls`
- `POST /user/widget_urls`
- `GET /users/{user_guid}/widget_urls`
- `POST /users/{user_guid}/widget_urls`


The `/users/{user_guid}/widget_urls` endpoints use the user guid provided in
the URL, whereas the `/user/widget_urls` endpoints use the user guid in the
configuration.

The `GET` endpoint accepts the widget configuration via the URL query
parameters. For example:

```bash
curl "http://localhost:8089/users/USR-081ff65e-3087-4cc2-a2c4-365354e1e6cb/widget_urls?widget_type=connect_widget&mode=verification"
```

The `POST` endpoint accepts the widget configuration via the request body. For
example:

```bash
curl "http://localhost:8089/users/USR-081ff65e-3087-4cc2-a2c4-365354e1e6cb/widget_urls" \
  -H "Content-Type: application/json" \
  --data '{"widget_url": {"widget_type": "connect_widget"}}'
```

## Using the proxy with the Widget SDKs

If you're running the example application in the React Native Widget SDK, add
this to your `config.json` file (just replace `{user guid}` with your user's
guid):

```json
{
    "proxy": "http://localhost:8089/users/{user guid}/widget_urls"
}
```
npm package: @mxenabled/web-connect-widget-sdk
Description: MX Connect Web Widget SDK
Latest version: 1.0.1

# MX Web Connect Widget SDK

## Purpose

The purpose of this project is to be able to easily integrate the MX connect widget into a web app.

## Implementation guide

The implementation guide lives in the MX docs [here](Add something here when it exists).

## How it works

This package mounts an connect widget iframe to the DOM, listens for post messages, and provides callbacks for handling MX events.

## API Documentation

The api documentation is [here](./API.md)

## Contributing

Read the [contributing guide](./CONTRIBUTING.md) to learn about the development process.

## License

This project is lincensed under the terms of the [MIT license](LICENSE).
npm package: @mxenabled/web-widget-sdk
Description: MX Web Widget SDK
Latest version: 0.0.15

# MX Web Widget SDK

The purpose of this project is to help simplify your integration experience.
Giving you as few steps as possible to get up and running with an MX web
widget. Please refer to our [Web Widget SDK documentation][sdk_docs] to get
started.

[sdk_docs]: https://docs.mx.com/connect/guides/web-app-guide/web/ 'Web Widget SDK'
npm package: @mxenabled/widget-post-message-definitions
Description: Widget Post Message Definitions for use in SDKs
Latest version: 1.4.0

# Widget Post Message Definitions for TypeScript

## Overview

This project defines and implements all Post Message parsing and dispatching in
TypeScript. This is for use in Widget SDKs. The majority of this package was
auto generated by the [Widget Post Message
Definitions](https://github.com/mxenabled/widget-post-message-definitions)
project, and any modifications to a Post Message definition or handling should
be done there.


## Getting started

You can install this package via npm:

```
npm install --save @mxenabled/widget-post-message-definitions
```

```js
import { dispatchConnectLocationChangeEvent } from "@mxenabled/widget-post-message-definitions"

dispatchConnectLocationChangeEvent("mx://connect/memberDeleted?metadata=...", {
  onMemberDeleted: (payload) => {
    console.log(`${payload.member_guid} has been deleted`)
  }
})
```

## Dependencies

This package does not have any dependencies with the exception of the `url`
package, which you may need if you're parsing post message events from URL
change events.

The React Native SDK needs this package and has it as a dependency, but the Web
SDK won't and we shouldn't install or import it. This allows us to keep both
SDKs happy.

To install `url` in your project so you can parse post messages in location
change events:

```text
npm install --save url
```