open-index/open-npm huggingface dataset:
npm package: @roq/cli
Description: ## Overview
Latest version: 0.0.17

# Roq CLI Tool

## Overview

`@roq/cli` is a command-line interface (CLI) tool that facilitates the generation of a frontend SDK in your project. It provides a convenient way to streamline the process of creating a software development kit (SDK) tailored for frontend development.

## Commands

### `generate`

The `generate` command is used to generate the frontend SDK. It supports the following options:

- `-y, --yes`: Skip the confirmation prompt.
- `-c, --cwd <cwd>`: Specify the working directory. Defaults to the current directory.

### General Usage

```bash
@roq/cli generate [options]
```


### Installation

```bash
npm install -g @roq/cli

# or

yarn global add @roq/cli

```


``
npm package: @roq/nestjs-dataloader
Description: A NestJS decorator for dataloader
Author: Kris Lefeber
Latest version: 0.0.3

# NestJS Dataloader

![Node.js CI](https://github.com/krislefeber/nestjs-dataloader/workflows/Node.js%20CI/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/krislefeber/nestjs-dataloader/badge.svg?branch=master)](https://coveralls.io/github/krislefeber/nestjs-dataloader?branch=master)

NestJS dataloader simplifies adding [graphql/dataloader](https://github.com/graphql/dataloader) to your NestJS project. DataLoader aims to solve the common N+1 loading problem.

## Installation

Install with yarn

```bash
yarn add nestjs-dataloader
```

Install with npm

```bash
npm install --save nestjs-dataloader
```

## Usage

### NestDataLoader Creation

We start by implementing the `NestDataLoader` interface. This tells `DataLoader` how to load our objects.

```typescript
import * as DataLoader from 'dataloader';
import { Injectable } from '@nestjs/common';
import { NestDataLoader } from 'nestjs-dataloader';
...

@Injectable()
export class AccountLoader implements NestDataLoader<string, Account> {
  constructor(private readonly accountService: AccountService) { }

  generateDataLoader(): DataLoader<string, Account> {
    return new DataLoader<string, Account>(keys => this.accountService.findByIds(keys));
  }
}
```

The first generic of the interface is the type of ID the datastore uses. The second generic is the type of object that will be returned. In the above instance, we want `DataLoader` to return instances of the `Account` class.

### Providing the NestDataLoader

For each NestDataLoader we create, we need to provide it to our module.

```typescript
import { Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import {DataLoaderInterceptor} from 'nestjs-dataloader'
...

@Module({
  providers: [
    AccountResolver,
    AccountLoader,
    {
      provide: APP_INTERCEPTOR,
      useClass: DataLoaderInterceptor,
    },
  ],

})
export class ResolversModule { }
```

### Using the NestDataLoader

Now that we have a dataloader and our module is aware of it, we need to pass it as a parameter to an endpoint in our graphQL resolver.

```typescript
import * as DataLoader from 'dataloader';
import { Loader } from 'nestjs-dataloader';
...

@Resolver(Account)
export class AccountResolver {

    @Query(() => [Account])
    public getAccounts(
        @Args({ name: 'ids', type: () => [String] }) ids: string[],
        @Loader(AccountLoader.name) accountLoader: DataLoader<Account['id'], Account>): Promise<Account[]> {
        return accountLoader.loadMany(ids);
    }
}
```

The important thing to note is that the parameter of the `@Loader` decorator is the name of the `NestDataLoader` class we want to be injected to the method. The DataLoader library will handle bulk retrieval and caching of our requests. Note that the caching is stored on a per-request basis.

## Contributing

Pull requests are always welcome. For major changes, please open an issue first to discuss what you would like to change.
npm package: @roqajs/vite-plugin
Description: Vite plugin for the Roqa UI framework
Author: Hawk Ticehurst
Latest version: 0.0.7

# Roqa Vite Plugin

Vite plugin that powers the [Roqa UI framework](https://roqa.dev).

## Usage

Add the following to a `vite.config.js` file:

```js
import { defineConfig } from "vite";
import roqa from "@roqajs/vite-plugin";

export default defineConfig({
	plugins: [roqa()]
});
```
npm package: @roqua/quby-frontend
Description: Important to give a unique key for each response if there is a chance the component will be reused, as it's an uncontrolled component.
Latest version: 0.11.2

# usage

Important to give a unique key for each response if there is a chance the component will be reused, as it's an uncontrolled component.

```tsx
<Quby
  key=`quby_${questionnaire.key}_${response.id}`
  questionnaireJson={questionnaire}
  responseJson={response}
  displayMode={"paged"}
  onSave={(response: Response) => ()}
  unsavedResponseWarning="Unsaved changes, are you sure you want to leave the page?" />
```

# assumptions

* All questions are always validated (on load and on every change), errors are just ignored when an answer has not been touched or is hidden.
* Response values are treated as immutable (setValue is always passed a new object)

# pnpm build

Generates the new compiled JS files.

# pnpm test

This runs the unit tests via Jest.

# pnpm storybook

Storybooks are the primary way to try out the interface in a browser.

# pnpm publish --access public --no-git-checks

This bumps the version number and uploads a new release to NPM. Make sure to run `rm -rf dist; pnpm build` first.
npm package: @roqueando/nous
Description: Un orquestre parmi nous
Author: Vitor Roque
Latest version: 0.11.1

<div align="center">
  <img alt="Version" src="logo.svg" alt="nous logo" width="20%">
</div>
<h1 align="center">
  bienvenue 👋
</h1>
<p>
  <a href="https://www.npmjs.com/package/@roqueando/nous" target="_blank">
    <img alt="Version" src="https://img.shields.io/npm/v/@roqueando/nous.svg">
  </a>
  <a href="#" target="_blank">
    <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
  </a>
  <a href="https://twitter.com/rockroqueando" target="_blank">
    <img alt="Twitter: rockroqueando" src="https://img.shields.io/twitter/follow/rockroqueando.svg?style=social" />
  </a>
</p>


> Un orchestre parmi nous. beta.

## Install

```sh
yarn install
npm install
```

## Usage

```javascript
const {Manager} = require('@roqueando/nous');
const fs = require('fs');

const manager = new Manager(8080);
manager.run(); // a new server is running in port 8080 waiting for services and messages
console.log('Manager running on 8080');

// for multiple services
const files = fs.readdirSync('./services'); // assuming if services folder is in root path
files.forEach((file) => {
    const service = require(`./services/${file}`);
    const newService = new service();
    newService.setName('nameForService');
    newService.run(); // this will register on Manager and be ready for receive messages.
    console.log(`Running ${newService.name} at ${newService.port}`);
});

// for one service
const service = require('./services/service.js');
const newService = new service();
service.setName('aServiceName');
service.run();
```




## Run tests

```sh
yarn test
```



## API

### Manager

`new Manager` a new instance to manager server, which one can receive messages, actions and distribute to all other services

### Service

`new Service` anything that is extended as Service, will be a server with your business logic in TCP or HTTP connection.

Services can communicate with Manager and other services via TCP, and can be HTTP or TCP node.

### Router

`new Router` a router its only for HTTP services, that can up routes and handlers for service like a "express" app.

### Client

`new Client` a client to connect to manager and send actions and receive data. Can be used in front too.

### Token

`new Token` a JWT Token generator.

## Authors

👤 **roqueando**

* Twitter: [@rockroqueando](https://twitter.com/rockroqueando)
* Github: [@roqueando](https://github.com/roqueando)

👤 **christopy**

* Github: [@christopy](https://github.com/christopy)

## 

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/roqueando/nous/issues). 

## Show your support

Give a ⭐️ if this project helped you!

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_
npm package: @roqueform/annotations-plugin
Description: Manages Roqueform field annotations.
Author: Savva Mikhalevski
Latest version: 1.1.0

# Annotations plugin for Roqueform

Manages [Roqueform](https://github.com/smikhalevski/roqueform#readme) field annotations.

```sh
npm install --save-prod @roqueform/annotations-plugin
```

# Overview

🔎 [API documentation is available here.](https://smikhalevski.github.io/roqueform/modules/annotations_plugin.html)

Annotations allow to associate arbitrary data with fields.

```ts
import { createField } from 'roqueform';
import { annotationsPlugin } from '@roqueform/annotations-plugin';

const planetField = createField(
  { name: 'Pluto' },
  annotationsPlugin({ isDisabled: false })
);

planetField.at('name').annotations.isDisabled // ⮕ false
```

Update annotations for a single field:

```ts
planetField.annotate({ isDisabled: true });

planetField.annotations.isDisabled // ⮕ true

planetField.at('name').annotations.isDisabled // ⮕ false
```

Annotate field and all of its children recursively:

```ts
planetField.annotate({ isDisabled: true }, { recursive: true });

planetField.annotations.isDisabled // ⮕ true

// 🌕 The child field was annotated along with its parent
planetField.at('name').annotations.isDisabled // ⮕ true
```

Annotations can be updated using a callback. This is especially useful in conjunction with recursive flag:

```ts
planetField.annotate(
  field => {
    // Toggle disabled flag for the field and its children
    return { isDisabled: !field.annotations.isDisabled };
  },
  { recursive: true }
);
```

Subscribe to annotation changes:

```ts
planetField.subscribe('change:annotations', event => {
  event.target.annotations;
  // ⮕ { isDisabled: boolean }
});
```
npm package: @roqueform/constraint-validation-plugin
Description: Integrates Roqueform fields with the Constraint validation API.
Author: Savva Mikhalevski
Latest version: 2.1.0

# Constraint validation API plugin for Roqueform

Integrates [Roqueform](https://github.com/smikhalevski/roqueform#readme) fields with the
[Constraint validation API](https://developer.mozilla.org/en-US/docs/Web/API/Constraint_validation).

```sh
npm install --save-prod @roqueform/constraint-validation-plugin
```

# Overview

🔎 [API documentation is available here.](https://smikhalevski.github.io/roqueform/modules/constraint_validation_plugin.html)

This plugin doesn't require any rendering framework. It subscribes to events that are dispatched by a DOM element passed
to the [`ref`](https://smikhalevski.github.io/roqueform/interfaces/constraint_validation_plugin.ConstraintValidationPlugin.html#ref)
method. To simplify the usage example, we're going to use [the React integration](../react#readme).

```tsx
import { FieldRenderer, useField } from '@roqueform/react';
import { constraintValidationPlugin } from '@roqueform/constraint-validation-plugin';

export const App = () => {
  const planetField = useField(
    { name: 'Mars' },
    constraintValidationPlugin()
  );

  return (
    <FieldRenderer field={planetField.at('name')}>
      {nameField => (
        <>
          <input
            type="text"
            pattern="Venus"
            // 🟡 Note that the input element ref is populated.
            ref={nameField.ref}
            value={nameField.value}
            onChange={event => {
              nameField.setValue(event.target.value);
            }}
            aria-invalid={nameField.isInvalid}
          />
          {nameField.validatedElement?.validationMessage}
        </>
      )}
    </FieldRenderer>
  );
};
```

Get the array of all invalid fields:

```ts
planetField.getInvalidFields();
// ⮕ [planetField.at('name')]
```

Show an error message balloon for the first invalid element that is associated with this field or any of its child
fields:

```ts
planetField.reportValidity();
```

Subscribe to the field validity changes:

```ts
planetField.on('change:validity', event => {
  event.target.validity;
  // ⮕ ValidityState
});
```
npm package: @roqueform/doubter-plugin
Description: Validates Roqueform fields with Doubter shapes.
Author: Savva Mikhalevski
Latest version: 4.0.0

# Doubter plugin for Roqueform

Validates [Roqueform](https://github.com/smikhalevski/roqueform#readme) fields with
[Doubter](https://github.com/smikhalevski/doubter#readme) shapes.

```sh
npm install --save-prod @roqueform/doubter-plugin
```

# Overview

Create a shape that would parse the field value:

```ts
import * as d from 'doubter';

const fieldShape = d.object({
  hello: d.string().max(5)
});

```

[`doubterPlugin`](https://smikhalevski.github.io/roqueform/modules/_roqueform_doubter-plugin.html) works best in
conjunction with [`errorsPlugin`](https://github.com/smikhalevski/roqueform?#errors-plugin):

```ts
import { createField } from 'roqueform';
import errorsPlugin from 'roqueform/plugin/errors';
import doubterPlugin, { concatDoubterIssues } from '@roqueform/doubter';

const field = createField({ hello: 'world' }, [
  errorsPlugin(concatDoubterIssues),
  doubterPlugin(fieldShape)
]);
```

The type of the field value is inferred from the provided shape, so the field value is statically checked.

When you call the `validate` method, it triggers validation of the field and all of its child fields. So if you call
`validate` on the child field, it won't validate the parent field:

```ts
// 🟡 Set an invalid value to the field
field.at('hello').setValue('universe');

field.at('hello').validate();
// ⮕ false

field.at('hello').errors // ⮕ [{ message: 'Must have the maximum length of 5', … }]
```

In this example, `field.value` _is not_ validated, and `field.at('hello').value` _is_ validated.

> [!NOTE]\
> It's safe to trigger validation of a single text field on every keystroke, since validation doesn't have to process
> the state of the whole form.

To detect whether the field, or any of its child fields contain a validation error:

```ts
field.at('hello').isInvalid;
// ⮕ true
```

# Custom error messages

You can customize messages for errors raised by Doubter:

```ts
import { createField } from 'roqueform';
import errorsPlugin from 'roqueform/plugin/errors';
import doubterPlugin, { concatDoubterIssues } from '@roqueform/doubter';

const fieldShape = d.array(d.string(), 'Expected an array').min(3, 'Not enough elements');

const field = createField(['hello', 'world'], [
  errorsPlugin(concatDoubterIssues),
  doubterPlugin(fieldShape)
]);

field.validate();
// ⮕ false

field.errors // ⮕ [{ message: 'Not enough elements', … }]
```

Read more about [error message localization](https://github.com/smikhalevski/doubter?tab=readme-ov-file#localization)
with Doubter.
npm package: @roqueform/ref-plugin
Description: Associates Roqueform fields with DOM elements.
Author: Savva Mikhalevski
Latest version: 5.0.0

# DOM reference plugin for Roqueform

Associates [Roqueform](https://github.com/smikhalevski/roqueform#readme) fields with DOM elements.

```sh
npm install --save-prod @roqueform/ref-plugin
```

# Overview

🔎 [API documentation is available here.](https://smikhalevski.github.io/roqueform/modules/_roqueform_ref_plugin.html)

This plugin doesn't require any rendering framework. To simplify the usage example, we're going to use
[the React integration](../react#readme).

```tsx
import { FieldRenderer, useField } from '@roqueform/react';
import { refPlugin } from '@roqueform/ref-plugin';

export const App = () => {
  const planetField = useField({ name: 'Venus' }, refPlugin());

  return (
    <FieldRenderer field={planetField.at('name')}>
      {nameField => (
        <input
          ref={nameField.ref}
          value={nameField.value}
          onChange={event => {
            nameField.setValue(event.target.value);
          }}
        />
      )}
    </FieldRenderer>
  );
};
```

Access an element referenced by a field:

```ts
planetField.at('name').element // ⮕ HTMLInputElement
```

Focus and blur an element referenced by a field. If a field doesn't have an associated element this is a no-op.

```ts
planetField.at('name').focus();

planetField.at('name').isFocused // ⮕ true
```

Scroll to an element:

```ts
planetField.at('name').scrollIntoView({ behavior: 'smooth' });
```
npm package: @roqueform/reset-plugin
Description: Manages Roqueform field initial value and dirty status.
Author: Savva Mikhalevski
Latest version: 4.1.0

# Reset plugin for Roqueform

Manages [Roqueform](https://github.com/smikhalevski/roqueform#readme) field initial value and dirty status.

```sh
npm install --save-prod @roqueform/reset-plugin
```

# Overview

🔎 [API documentation is available here.](https://smikhalevski.github.io/roqueform/modules/reset_plugin.html)

Update the initial value of a field:

```ts
import { createField } from 'roqueform';
import { resetPlugin } from '@roqueform/reset-plugin';

const planetField = createField({ name: 'Pluto' }, resetPlugin());

planetField.setInitialValue({ name: 'Mars' });

planetField.at('name').initialValue;
// ⮕ 'Mars'
```

The field is considered dirty when its value differs from the initial value. Values are compared using an equality
checker function passed to the `resetPlugin`. By default, values are compared using
[fast-deep-equal](https://github.com/epoberezkin/fast-deep-equal).

```ts
planetField.at('name').isDirty // ⮕ true
```

Get the array of all dirty fields:

```ts
planetField.getDirtyFields();
// ⮕ [planetField.at('name')]
```
npm package: @roqueform/scroll-to-error-plugin
Description: Roqueform plugin that enables scrolling to a field that has an associated validation error.
Author: Savva Mikhalevski
Latest version: 3.1.0

# Scroll to an error plugin for Roqueform

[Roqueform](https://github.com/smikhalevski/roqueform#readme) plugin that enables scrolling to a field that has an
associated validation error.

```sh
npm install --save-prod @roqueform/scroll-to-error-plugin
```

# Overview

🔎 [API documentation is available here.](https://smikhalevski.github.io/roqueform/modules/scroll_to_error_plugin.html)

This plugin works best in conjunction with the [`errorsPlugin`](../../#validation-scaffolding) or any of the
[validation plugins](../../#plugins-and-integrations). If an element associated with the field via
[`ref`](https://smikhalevski.github.io/roqueform/interfaces/scroll_to_error_plugin.ScrollToErrorPlugin.html#ref) is
displayed and an the field is invalid than `scrollToError()` would scroll the viewport, so the element is reveled on the
screen.

This plugin doesn't require any rendering framework. To simplify the usage example, we're going to use
[the React integration](../react#readme).

```tsx
import { SyntheticEvent, useEffect } from 'react';
import { composePlugins, errorsPlugin } from 'roqueform';
import { FieldRenderer, useField } from '@roqueform/react';
import { scrollToErrorPlugin } from '@roqueform/scroll-to-error-plugin';

export const App = () => {
  const planetField = useField(
    { name: 'Mars' },
    composePlugins(
      errorsPlugin(),
      scrollToErrorPlugin()
    )
  );

  const handleSubmit = (event: SyntheticEvent) => {
    event.preventDefault();

    if (planetField.getInvalidFields().length === 0) {
      // Submit the valid form value.
      doSubmit(planetField.value);
    } else {
      // Scroll to the invalid field that is closest to the top left conrner of the document.
      planetField.scrollToError(0, { behavior: 'smooth' });
    }
  };

  useEffect(() => {
    // Mark field as invalid.
    planetField.at('name').addError('Too far away');
  }, []);
  
  return (
    <form onSubmit={handleSubmit}>

      <FieldRenderer field={planetField.at('name')}>
        {nameField => (
          <>
            <input
              // 🟡 Note that the input element ref is populated.
              ref={nameField.ref}
              value={nameField.value}
              onChange={event => {
                nameField.setValue(event.target.value);
              }}
            />
            {nameField.errors}
          </>
        )}
      </FieldRenderer>

      <button type="submit">
        {'Submit'}
      </button>

    </form>
  );
};
```
npm package: @roqueform/zod-plugin
Description: Validates Roqueform fields with Zod schemas.
Author: Savva Mikhalevski
Latest version: 3.0.0

# Zod plugin for Roqueform

Validates [Roqueform](https://github.com/smikhalevski/roqueform#readme) fields with [Zod](https://zod.dev/) schemas.

```sh
npm install --save-prod @roqueform/zod-plugin
```

# Overview

Create a schema that would parse the field value:

```ts
import { z } from 'zod';

const fieldSchema = z.object({
  hello: z.string().max(5)
});
```

[`zodPlugin`](https://smikhalevski.github.io/roqueform/modules/_roqueform_zod-plugin.html) works best in
conjunction with [`errorsPlugin`](https://github.com/smikhalevski/roqueform?#errors-plugin):

```ts
import { createField } from 'roqueform';
import errorsPlugin from 'roqueform/plugin/errors';
import zodPlugin, { concatZodIssues } from '@roqueform/zod';

const field = createField({ hello: 'world' }, [
  errorsPlugin(concatZodIssues),
  zodPlugin(fieldSchema)
]);
```

The type of the field value is inferred from the provided schema, so the field value is statically checked.

When you call the `validate` method, it triggers validation of the field and all of its child fields. So if you call
`validate` on the child field, it won't validate the parent field:

```ts
// 🟡 Set an invalid value to the field
field.at('hello').setValue('universe');

field.at('hello').validate();
// ⮕ false

field.at('hello').errors // ⮕ [{ code: 'too_small', … }]
```

In this example, `field.value` _is not_ validated, and `field.at('hello').value` _is_ validated.

To detect whether the field, or any of its child fields contain a validation error:

```ts
field.at('hello').isInvalid;
// ⮕ true
```
npm package: @rori4/uniswap-sdk-core
Description: ⚒️ An SDK for building applications on top of Uniswap V3
Latest version: 3.0.1

# Uniswap SDK Core

[![Unit Tests](https://github.com/Uniswap/uniswap-sdk-core/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-sdk-core/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-sdk-core/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-sdk-core/actions?query=workflow%3ALint)
[![npm version](https://img.shields.io/npm/v/@uniswap/sdk-core/latest.svg)](https://www.npmjs.com/package/@uniswap/sdk-core/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/sdk-core/latest.svg)](https://bundlephobia.com/result?p=@uniswap/sdk-core@latest)

This code is shared across Uniswap TypeScript SDKs.
npm package: @rori4/uniswap-v2-sdk
Description: 🛠 An SDK for building applications on top of Uniswap V2
Latest version: 3.0.9

# Uniswap V2 SDK

[![Unit Tests](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Unit%20Tests/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3A%22Unit+Tests%22)
[![Lint](https://github.com/Uniswap/uniswap-v2-sdk/workflows/Lint/badge.svg)](https://github.com/Uniswap/uniswap-v2-sdk/actions?query=workflow%3ALint)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![npm version](https://img.shields.io/npm/v/@uniswap/v2-sdk/latest.svg)](https://www.npmjs.com/package/@uniswap/v2-sdk/v/latest)
[![npm bundle size (scoped version)](https://img.shields.io/bundlephobia/minzip/@uniswap/v2-sdk/latest.svg)](https://bundlephobia.com/result?p=@uniswap/v2-sdk@latest)

In-depth documentation on this SDK is available at [uniswap.org](https://uniswap.org/docs/v2/SDK/getting-started/).