open-index/open-npm huggingface dataset:
npm package: @knawat/advanced-client-module
Description: This is a Client Proxy providing module.
Author: Mehrdad Mirsamie
Latest version: 1.0.5

# Advanced NestJS Client Proxy Module

## Sample usages

First import the package:

```typescript
import { AdvancedClientModule } from "@knawat/advanced-client-module";
```

### Registration:

```typescript
    AdvancedClientModule.register({
        transport: 'TCP',
        options: {
          url: 'http://localhost:8080',
        },
    }),
```

Replace all `MessagePattern` with `MessagePatternExtended` and `EventPattern` with `EventPatternExtended` decorators to add **NAMESPACE** in calls.

Now for replacing the new `Extended` decorators with valid replacement and because we can not alter **Reflect.metaData** over the Controller class from the npm package we have to do it manually.


First you need to create a `service` to process decorators like this:
```typescript
import { Injectable } from '@nestjs/common';
import { EventPattern, MessagePattern } from '@nestjs/microservices';
import {
  EVENT_PATTERN_EXTENDED,
  MESSAGE_PATTERN_EXTENDED,
} from '@knawat/advanced-client-module';

@Injectable()
export class AdvancedClientDecoratorProcessorService {
  processCustomDecorators(namespace: string, types: any[]) {
    for (const type of types) {
      const propNames = Object.getOwnPropertyNames(type.prototype);
      for (const prop of propNames) {
        const propValue = Reflect.getMetadata(
          MESSAGE_PATTERN_EXTENDED,
          Reflect.get(type.prototype, prop),
        );
        if (propValue) {
          propValue.cmd = `${namespace}-${propValue.cmd}`;
          propValue.role = `${namespace}-${propValue.role}`;
          Reflect.decorate(
            [MessagePattern(propValue)],
            type.prototype,
            prop,
            Reflect.getOwnPropertyDescriptor(type.prototype, prop),
          );
        }
        let eventValue = Reflect.getMetadata(
          EVENT_PATTERN_EXTENDED,
          Reflect.get(type.prototype, prop),
        );
        if (eventValue) {
          eventValue = `${namespace}-${eventValue}`;
          Reflect.decorate(
            [EventPattern(eventValue)],
            type.prototype,
            prop,
            Reflect.getOwnPropertyDescriptor(type.prototype, prop),
          );
        }
      }
    }
  }
}
```

Now add the processor to the `main.ts` as below:

````typescript
  app
    .get(AdvancedClientDecoratorProcessorService)
    .processCustomDecorators(process.env.NAMESPACE, [...CONTROLLERS-WITH-EXTENDED-DECORATORS]);
````

In order to use microservice client you need to inject the `SERVICE_CLIENT` class:
```typescript
  constructor(
    @Inject(SERVICE_CLIENT)
    private readonly client: ClientProxy,
  ) {}
```
npm package: @knax/koa-morgan
Description: HTTP request logger middleware for koa
Author: Fangdun Cai
Latest version: 1.0.2

# koa-morgan

> HTTP request logger middleware for koa.  
> [morgan] wrapper for koa's middleware.

[![NPM version][npm-img]][npm-url]
[![NPM Downloads][downloads-image]][npm-url]
[![Build status][travis-img]][travis-url]
[![Test coverage][coveralls-img]][coveralls-url]
[![Dependency status][david-img]][david-url]
[![License][license-img]][license-url]

## Install

```sh
$ npm install --save koa-morgan
```

## Usage

### **=1.x**, 100%, working with **morgan** and **koa-v2**

```js
const fs = require('fs')
const Koa = require('koa')
const morgan = require('koa-morgan')

// create a write stream (in append mode)
const accessLogStream = fs.createWriteStream(__dirname + '/access.log',
                                             { flags: 'a' })
const app = new Koa()

// setup the logger
app.use(morgan('combined', { stream: accessLogStream }))

app.use((ctx) => {
  ctx.body = 'hello, world!'
})

app.listen(2333)
```

### **=0.x**, working with **koa-v1**

```js
var koa = require('koa');
var morgan = require('koa-morgan');
var app = koa();

app.use(morgan.middleware(format, options));

```

[npm-img]: https://img.shields.io/npm/v/koa-morgan.svg?style=flat-square
[npm-url]: https://npmjs.org/package/koa-morgan
[travis-img]: https://img.shields.io/travis/koa-modules/morgan.svg?style=flat-square
[travis-url]: https://travis-ci.org/koa-modules/morgan
[coveralls-img]: https://img.shields.io/coveralls/koa-modules/morgan.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/koa-modules/morgan?branch=master
[license-img]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square
[license-url]: LICENSE
[david-img]: https://img.shields.io/david/koa-modules/morgan.svg?style=flat-square
[david-url]: https://david-dm.org/koa-modules/morgan
[downloads-image]: https://img.shields.io/npm/dm/koa-morgan.svg?style=flat-square
[morgan]: https://github.com/expressjs/morgan
npm package: @knax/react-native-dash
Description: A <Dash /> component for react-native to draw dashed or dotted lines
Author: Pawan Kumar
Latest version: 0.0.9

# react-native-dash
[![NPM version](https://badge.fury.io/js/react-native-dash.svg)](http://badge.fury.io/js/react-native-dash)

A super simple `<Dash />` component for react-native to draw customisable dashed lines

## Installation
```sh
npm i --save react-native-dash
```

## Props
| name | desc | type | default
| --- | --- | --- | --- |
| `style` | Dash container style  | [View.PropTypes.Style](https://facebook.github.io/react-native/docs/view.html#style) | `{flexDirection = 'row'}`
| `dashGap` | Gap between two dashes | number | `2`
| `dashLength` | Length of each dash | number | `4`
| `dashThickness` | Thickness of each dash | number | `2`
| `dashColor` | Color of each dash | string | `black`
| `dashStyle` | Dashes style | [View.PropTypes.Style](https://facebook.github.io/react-native/docs/view.html#style) | {}

 - **ProTip 1**: Use `flexDirection` in style to get horizontal or vertical dashes. By default, it's `row`
 - **ProTip 2**: Use `{borderRadius: 100, overflow: 'hidden'}` in dashStyle to get rounded dotes instead of straight line dashes. 

## Usage
```javascript
import Dash from 'react-native-dash';

//draws a horizontal dashed line with defaults. Also works with flex
render() {
    return <Dash style={{width:100, height:1}}/>
}

//draws a vertical dashed line with defaults.
render() {
    return <Dash style={{width:1, height:100, flexDirection:'column'}}/>
}
```

### Dependenies
 [react-native-measureme](https://github.com/obipawan/react-native-measureme)
### Development

PRs highly appreciated

License
----
MIT License
npm package: @knax/react-native-midtrans
Description: Connect React Native to Midtrans Payment Gateway
Author: Hasta Ragil Saputra
Latest version: 2.0.0

# @knax/react-native-midtrans

Connect React Native to Midtrans Payment Gateway
Currently only support Android platform, iOS support will come in few hours

## Installation

```sh
npm install @knax/react-native-midtrans
```

You need to add Midtrans SDK inside your module level build.gradle

```groovy
allprojects {
    repositories {
        ...
        maven { url "http://dl.bintray.com/pt-midtrans/maven" }
    }
}
```

You need to disable usesCleartextTraffic on android/app/src/debug/AndroidManifest.xml
But if you do that, you can't access bundle file using http, so you need to add networkSecurityConfig for your machine IP address
Check the example on example folder

Debug AndroidManifest.xml
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>

    <application tools:targetApi="28"
      tools:ignore="GoogleAppIndexingWarning"
      android:networkSecurityConfig="@xml/network_security_config"/>
</manifest>
```

xml/network_security_config.xml (change your ip here)
```xml
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
  <domain-config cleartextTrafficPermitted="true">
    <domain includeSubdomains="true">10.0.2.2</domain>
    <domain includeSubdomains="true">10.0.2.2:8081</domain>
  </domain-config>
</network-security-config>
```

## Usage

```js
import ReactNativeMidtrans from "@knax/react-native-midtrans";

// ...
ReactNativeMidtrans.checkout({
    order_id: Math.random().toString(),
    client_key: '', // from midtrans client
    merchant_base_url: '', // your backend url for handling charge IP
    items: [
      {
        id: Math.random().toString(),
        price: 100000,
        quantity: 2,
        name: 'Items',
      },
    ],
}).then((result) => {
    console.log('result', result);
}).catch(err => {
    console.log('err', err);
});
```

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT
npm package: @knax/react-native-zendesk-chat
Description: React Native Wrapper around Zopim Zendesk Chat
Author: jrichardlai
Latest version: 0.3.2

# react-native-zendesk-chat

Simple module that allows displaying Zopim Chat from Zendesk for React Native.

## VERSIONS

For RN version higher than 0.30 use version >= 0.1.x

For RN version lower than 0.30 use version 0.0.2.

Since version 0.2.0 `department` is set to `ZDCPreChatDataRequiredEditable`.

## Known issues

I could not find how to make the import for iOS work properly since I'm using Cocoapods for Zendesk, if you have a suggestion that would be great.

## Getting started

Follow the instructions to install the SDK for [iOS](https://developer.zendesk.com/embeddables/docs/ios-chat-sdk/introduction) and [Android](https://developer.zendesk.com/embeddables/docs/android-chat-sdk/introduction).

### Manual install
#### iOS
1. `npm install react-native-zendesk-chat --save`
2. In Xcode, drag and drop `node_modules/react-native-zendesk-chat/RNZendeskChat.m` and `node_modules/react-native-zendesk-chat/RNZendeskChat.h` into your project.
3. Configure `ZDCChat` in `AppDelegate.m`:

```
#import <ZDCChat/ZDCChat.h>

[ZDCChat initializeWithAccountKey:@"YOUR_ZENDESK_ACCOUNT_KEY"];
```

#### Android
1. `npm install react-native-zendesk-chat --save`
2. Open up `android/app/main/java/[...]/MainActivity.java`
  - Add `import com.taskrabbit.zendesk.*;` to the imports at the top of the file
  - Add `new RNZendeskChatPackage(this)` to the list returned by the `getPackages()` method

3. Append the following lines to `android/settings.gradle`:

```
include ':react-native-zendesk-chat'
project(':react-native-zendesk-chat').projectDir = new File(rootProject.projectDir,	'../node_modules/react-native-zendesk-chat/android')
```

4. Insert the following lines inside the dependencies block in `android/app/build.gradle`:

```
compile project(':react-native-zendesk-chat')
```

5. Configure `ZopimChat` in `android/app/main/java/[...]/MainActivity.java`

```
ZopimChat.init("YOUR_ZENDESK_ACCOUNT_KEY");
```

## Usage

In your code add `import ZendeskChat from 'react-native-zendesk-chat';`.

```
ZendeskChat.startChat({
  name: user.full_name,
  email: user.email,
  phone: user.mobile_phone,
  tags: ['tag1', 'tag2'],
  department: "Your department"
});
```

## TODO

* Allow setting form configuration from JS
* Add examples
npm package: @knazarov2/hardhat
Description: Hardhat is an extensible developer tool that helps smart contract developers increase productivity by reliably bringing together the tools they want.
Author: Nomic Labs LLC
Latest version: 2.22.4

![](https://user-images.githubusercontent.com/176499/96893278-ebc67580-1460-11eb-9530-d5df3a3d65d0.png) [![NPM Package](https://img.shields.io/npm/v/hardhat.svg?style=flat-square)](https://www.npmjs.org/package/hardhat) [![GitPOAP Badge](https://public-api.gitpoap.io/v1/repo/NomicFoundation/hardhat/badge)](https://www.gitpoap.io/gh/NomicFoundation/hardhat)

---

Hardhat is an Ethereum development environment for professionals. It facilitates performing frequent tasks, such as running tests, automatically checking code for mistakes or interacting with a smart contract. Check out the [plugin list](https://hardhat.org/plugins/) to use it with your existing tools.

Built by the [Nomic Foundation](https://nomic.foundation/) for the Ethereum community.

Join our [Hardhat Support Discord server](https://hardhat.org/discord) to stay up to date on new releases, plugins and tutorials.

---

> 💡 **The Nomic Foundation is hiring! Check [our open positions](https://www.nomic.foundation/jobs?utm_source=myALpQnzlM).**

---

## Installation

To install Hardhat, go to an empty folder, initialize an `npm` project (i.e. `npm init`), and run

```
npm install --save-dev hardhat
```

Once it's installed, just run this command and follow its instructions:

```
npx hardhat init
```

## Documentation

On [Hardhat's website](https://hardhat.org) you will find:

- [Guides to get started](https://hardhat.org/getting-started/)
- [Hardhat Network](https://hardhat.org/hardhat-network/)
- [Plugin list](https://hardhat.org/plugins/)

## Contributing

Contributions are always welcome! Feel free to open any issue or send a pull request.

Go to [CONTRIBUTING.md](./CONTRIBUTING.md) to learn about how to set up Hardhat's development environment.

## Feedback, help and news

[Hardhat Support Discord server](https://hardhat.org/discord): for questions and feedback.

[Follow Hardhat on Twitter.](https://twitter.com/HardhatHQ)

## Happy building!

👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️👷‍♀️👷‍♂️