open-index/open-npm huggingface dataset:
npm package: @panelist/nest-file-fastify
Description: @fastify/multipart decorators for Nest.js
Latest version: 2.0.1

<div align="left">
  <h1> @fastify/multipart for Nest.js</h1>

[![Github Actions](https://img.shields.io/github/workflow/status/blazity/nest-file-fastify/Build?style=flat-square)](https://github.com/Blazity/nest-file-fastify)
[![NPM](https://img.shields.io/npm/v/@blazity/nest-file-fastify.svg?style=flat-square)](https://www.npmjs.com/package/@blazity/nest-file-fastify)
[![NPM](https://img.shields.io/npm/dm/@blazity/nest-file-fastify?style=flat-square)](https://www.npmjs.com/package/@blazity/nest-file-fastify)

</div>

This library adds decorators for [Nest.js](https://github.com/nestjs/nest) to support [@fastify/multipart](https://github.com/fastify/@fastify/multipart). The API is very similar to the official Nest.js Express file decorators.

## Installation

NPM

```bash
$ npm install @blazity/nest-file-fastify @fastify/multipart
```

Yarn

```bash
$ yarn add @blazity/nest-file-fastify @fastify/multipart
```

## Docs

### Single file

```ts
import { FileInterceptor, UploadedFile, StorageFile } from '@blazity/nest-file-fastify';

@Post('upload')
@UseInterceptors(FileInterceptor('file'))
uploadFile(@UploadedFile() file: StorageFile) {
  console.log(file);
}
```

`FileInterceptor` arguments:

- `fieldname`: string - name of the field that holds a file

- `options`: optional object of type [`UploadOptions`](https://github.com/Blazity/nest-file-fastify/blob/master/src/options.ts#L3)

### Array of files

```ts
import { FilesInterceptor, UploadedFiles, StorageFile } from '@blazity/nest-file-fastify';

@Post('upload')
@UseInterceptors(FilesInterceptor('files'))
uploadFile(@UploadedFiles() files: StorageFile[]) {
  console.log(files);
}
```

`FilesInterceptor` arguments:

- `fieldname`: string - name of the field that holds files

- `maxCount`: optional number - maximum number of files to accept

- `options`: optional object of type [`UploadOptions`](https://github.com/Blazity/nest-file-fastify/blob/master/src/options.ts#L3)

### Multiple files

```ts
import { FileFieldsInterceptor, UploadedFiles, StorageFile } from '@blazity/nest-file-fastify';

@Post('upload')
@UseInterceptors(FileFieldsInterceptor([
  { name: 'avatar', maxCount: 1 },
  { name: 'background', maxCount: 1 },
]))
uploadFile(@UploadedFiles() files: { avatar?: StorageFile[], background?: StorageFile[] }) {
  console.log(files);
}
```

`FileFieldsInterceptor` arguments:

- `uploadFields`: object of type [`UploadField`](https://github.com/Blazity/nest-file-fastify/blob/master/src/interceptors/file-fields-interceptor.ts#L15)

- `options`: optional object of type [`UploadOptions`](https://github.com/Blazity/nest-file-fastify/blob/master/src/options.ts#L3)

### Any files

```ts
import { AnyFilesInterceptor, UploadedFiles, StorageFile } from '@blazity/nest-file-fastify';

@Post('upload')
@UseInterceptors(AnyFilesInterceptor()
uploadFile(@UploadedFiles() files: StorageFile[]) {
  console.log(files);
}
```

`AnyFilesInterceptor` arguments:

- `options`: optional object of type [`UploadOptions`](https://github.com/Blazity/nest-file-fastify/blob/master/src/options.ts#L3)
npm package: @panenco/eslint-config-react
Description: ESlint configuration for @panenco projects
Author: Panenco
Latest version: 1.0.3

# @panenco/eslint-config-react

This package is made for reducing boilerplate in `.eslintrc.json` file and create single source of truth around all repositories.

## Installation

### Prerequisites

You must have an access to Panenco Github Package Registry.

### Configure `.npmrc`

```
registry=https://registry.npmjs.org/
@panenco:registry=https://npm.pkg.github.com
always-auth=true
```

```sh
yarn add -DW eslint @panenco/eslint-config-react
```

## Configuration

In your root `.eslintrc.json` just use

```
{
  "root": true,
  "extends": ["@panenco/eslint-config-react"]
}
```
npm package: @panenco/formik-form-field
Description: Formik field wrapper used in Panenco projects
Author: Panenco
Latest version: 1.0.5

# Formik Form Field

`FormikFormField` is a wrapper that helps you to forget about writing wrappers around your custom inputs.

## Installation

To install follow next steps:

1. `npm install @panenco/formik-field-wrapper`

## Usage

You supposed to use `FormField` instead of `Field` imported from `Formik` as shown:

```javascript
import * as React from 'react';
import { Form } from 'formik';
import { TextInput } from '@panenco/pui';
import Field from '@panenco/formik-form-field';

const countries = [
  { value: 'UA', label: 'Ukraine' },
  { value: 'BE', label: 'Belgium' },
];

const FormComponent = () => {
  return (
    <Form>
      <Field name="firstName" placeholder="Firstname" component={TextInput} />
      <Field name="lastName" placeholder="Lastname" component={TextInput} />
      <Field
        name="birthDate"
        component={DayPicker}
        labelText="Date of birth"
        onChangeAdapter={(v) => v}
        valueAdapter={(v) => v}
      />
      <Field
        name="country"
        component={ReactSelect}
        options={countries}
        label="Country of origin"
        onChangeAdapter={(v) => v.value}
        valueAdapter={(value) => countries.find((country) => value === country.value)}
      />
      <PrimaryButton type="submit">Submit</PrimaryButton>
    </Form>
  );
};
```

## Explanation of `valueAdapter: (...args: any) => any` and `onChangeAdapter: (...args: any) => any`

### `onChangeAdapter`

When you need to use custom components as inputs in your form, most of them won't use default signature as `onChange(e: React.SyntheticEvent) => void` or `onBlur(e: React.SyntheticEvent) => void`. Instead, they might pass you `value` itself or whatever it can be. That's why we are replacing formik default handler to ours that also has middleware `onChangeAdapter`.

On change `value` thrown from your field -> `onChangeAdapter` -> set field in `formik` values.

### `valueAdapter`

Because our fields are controlled, we are obliged to have both `value` and `onChanged` props. Usually we need to keep in sync `value` that is passed by `FormikField` to component and it's presentation before applying `onChangeAdapter`. That's why we are transforming it back.

Formik values -> `valueAdapter` -> field `value` prop

## You are marvelous!
npm package: @panenco/rollup-plugin-svg-sprite
Description: Rollup plugin for creation of SVG spritesheet
Author: Panenco
Latest version: 1.0.3

# `rollup-plugin-svg-sprite`

> TODO: description

## Usage

```
const rollupPluginSvgSprite = require('rollup-plugin-svg-sprite');

// TODO: DEMONSTRATE API
```
npm package: @paneron/libmmel
Description: MMEL library
Author: Ribose Inc.
Latest version: 0.2.1

= libmmel

ifdef::env-github[]

image:https://img.shields.io/github/v/release/paneron/libmmel?display_name=tag&include_prereleases&sort=semver[
  GitHub release (latest SemVer including pre-releases),
  link="https://www.npmjs.com/package/@paneron/libmmel"]
image:https://github.com/paneron/libmmel/actions/workflows/build-and-test.yml/badge.svg[
  alt="Build / Test",
  link="https://github.com/paneron/libmmel/actions/workflows/build-and-test.yml"]
image:https://github.com/paneron/libmmel/actions/workflows/lint.yml/badge.svg[
  alt="Lint",
  link="https://github.com/paneron/libmmel/actions/workflows/lint.yml"]
image:https://github.com/paneron/libmmel/actions/workflows/audit.yml/badge.svg[
  "Audit Status",
  link="https://github.com/paneron/libmmel/actions/workflows/audit.yml"]

endif::[]

== Introduction

This library implements serialization and deserialization of MMEL models,
and provides exported interfaces for relevant data types.

NOTE:  This model does not contain runtime information.
Any such runtime information should be implemented in a separate model.

== Installation

Run:

```console
npm install @paneron/libmmel
```

== Usage Examples

```typescript
import { textToMMEL, MMELToText } from '@paneron/libmmel';
import type { MMELModel } from '@paneron/libmmel';


const text = '... insert MMEL text here ...';
const mmel: MMELModel = textToMMEL(text);
console.log(MMELToText(mmel));

```

== Folder Structure

- `interface/`
  * Contains the data structures of different elements in the model
- `handler/`
  * Contains the codes for parsing MMEL structure to MMEL model
- `util/`
  * Provides other utility functions (Check the comments inside)

== Roadmap

- link:https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c?permalink_comment_id=3850849#gistcomment-3850849[Use pure ESM^].