open-index/open-npm huggingface dataset:
npm package: @knamp/content-generator
Description: Consume HTML from Kafka messages, transform in any way, produce
Author: Hans Christian Reinl
Latest version: 2.2.0

# Content Generator

Consume HTML from Kafka messages, transform in any way, produce.

## Usage

Install via yarn

    yarn install @knamp/content-generator

Then configure it and use it

```javascript
import ContentGenerator from "@knamp/content-generator";

(async () => {
  const generator = ContentGenerator({
    clientName: "generator-client",
    consumeFrom: "generator-consume",
    groupId: "generator-group",
    produceTo: "produce-topic",
    tranformer: (transformThis: ConsumerContentInterface): Promise<string> => transformThis.content
  });

  generator.on("error", console.log)
  generator.on("info", console.log)

  generator.setup();
  await generator.start();
})();
```

## Uses

* [Sinek](https://github.com/nodefluent/node-sinek), consuming and producing messages to and from Apache Kafka

## License

This project is under [MIT](./LICENSE).
npm package: @knamp/content-provider
Description: Process and store HTML content from Apache Kafka and provide via API.
Author: Christian Fröhlingsdorf
Latest version: 1.5.3

# Content Provider

Process and store HTML content from Apache Kafka and provide via API.

## Usage

Install via yarn

    yarn install @knamp/content-provider

Then configure it and use it

```javascript
import ContentProvider from "@knamp/content-provider";

(async () => {

  const server = ContentProvider({
    clientName: "transmitter-client",
    consumeFrom: "produce-topic",
    database: {
      fromMemory: true,
    },
    groupId: "transmitter-group",
    webserver: {
      port: 8855,
    },
  });

  server.on("served", (data) => {
    console.log("served", data);
  });

  server.on("missed", (data) => {
    console.log("missed", data);
  });

  server.on("stored", (data) => {
    console.log("stored", data);
  });

  server.on("deleted", (data) => {
    console.log("deleted", data);
  });

  server.on("error", (error) => {
    console.error(error);
  });

  await server.start()
})();
```

You can now also get entries from the database by running

```typescript
import { getByPath } from "@knamp/content-provider";

(async () => {
  const path: string = ``;

  const entry = await getByPath(path);

  console.log(entry);
})();
```

## Development

For development you need to create a local config file for the database
`config.local.ts` in `test`.

It could looke like this

```typescript
  export default {
    active: true,
    database: "contentprovider",
    logging: (...params) => {
      // tslint:disable-next-line
      return console.info(...params);
    },
    password: "contentprovider",
    pool: {
      idle: 10000,
      max: 5,
      min: 1,
    },
    port: 5432,
    seederStorage: "sequelize",
    username: "contentprovider",
  };
```

## Uses

* [Sinek](https://github.com/nodefluent/node-sinek), consuming and producing
  messages to and from Apache Kafka

## License

This project is under [MIT](./LICENSE).
npm package: @knapsack-pro/core
Description: Knapsack Pro Core library splits tests across CI nodes and makes sure that tests will run in optimal time on each CI node. This library gives core features like communication with KnapsackPro.com API. This library is a dependency for other projects specif
Author: Knapsack Pro
Latest version: 9.0.1

# @knapsack-pro/core

<p align="center">
  <a href="https://knapsackpro.com?utm_source=github&utm_medium=readme&utm_campaign=knapsack-pro-core&utm_content=hero_logo">
    <img alt="Knapsack Pro" src="./.github/assets/knapsack.png" width="300" height="300" style="max-width: 100%;" />
  </a>
</p>

<h3 align="center">Speed up your tests</h3>
<p align="center">Run your 1-hour test suite in 2 minutes with optimal parallelisation on your existing CI infrastructure</p>

---

<div align="center">
  <a href="https://circleci.com/gh/KnapsackPro/knapsack-pro-js">
    <img alt="Circle CI" src="https://circleci.com/gh/KnapsackPro/knapsack-pro-js.svg?style=svg" />
  </a>
</div>

<br />
<br />

Knapsack Pro wraps your [current test runner(s)](https://docs.knapsackpro.com/) and works with your existing CI infrastructure to parallelize tests optimally:

- Dynamically splits your tests based on up-to-date test execution data
- Is designed from the ground up for CI and supports all of them
- Tracks your CI builds to detect bottlenecks
- Does not have access to your source code and collects minimal test data
- Enables you to export historical metrics about your CI builds
- Replaces local dependencies like Redis with an API and runs your tests regardless of network problems

## Installation

See the [docs](https://docs.knapsackpro.com/) to get started:

<div align="center">
  <a href="https://docs.knapsackpro.com/">
    <img alt="Install button" src="./.github/assets/install-button.png" width="116" height="50" />
  </a>
</div>

## Dependents

- [@knapsack-pro/jest](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/jest)
- [@knapsack-pro/cypress](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/cypress)

## Contributing

Follow the steps in the [root README.md](https://github.com/KnapsackPro/knapsack-pro-js#contributing) to set up the project.

### Publishing

See [Publishing](../../#publishing) in the root README.md.
npm package: @knapsack-pro/cypress
Description: Knapsack Pro Cypress splits Cypress.io tests across CI nodes and makes sure that tests will run in optimal time on each CI node.
Author: Knapsack Sp. z o.o.
Latest version: 9.0.0

# @knapsack-pro/cypress

<p align="center">
  <a href="https://knapsackpro.com?utm_source=github&utm_medium=readme&utm_campaign=knapsack-pro-cypress-example&utm_content=hero_logo">
    <img alt="Knapsack Pro" src="./.github/assets/knapsack.png" width="300" height="300" style="max-width: 100%;" />
  </a>
</p>

<h3 align="center">Speed up your tests</h3>
<p align="center">Run your 1-hour test suite in 2 minutes with optimal parallelisation on your existing CI infrastructure</p>

---

<div align="center">
  <a href="https://circleci.com/gh/KnapsackPro/knapsack-pro-js">
    <img alt="Circle CI" src="https://circleci.com/gh/KnapsackPro/knapsack-pro-js.svg?style=svg" />
  </a>
</div>

<br />
<br />

Knapsack Pro wraps the [Cypress.io](https://www.cypress.io) test runner and works with your existing CI infrastructure to parallelize tests optimally:

- Dynamically splits your tests based on up-to-date test execution data
- Is designed from the ground up for CI and supports all of them
- Tracks your CI builds to detect bottlenecks
- Does not have access to your source code and collects minimal test data
- Enables you to export historical metrics about your CI builds
- Replaces local dependencies like Redis with an API and runs your tests regardless of network problems

## Installation

See the [docs](https://docs.knapsackpro.com/cypress/guide/) to get started:

<div align="center">
  <a href="https://docs.knapsackpro.com/cypress/guide/">
    <img alt="Install button" src="./.github/assets/install-button.png" width="116" height="50" />
  </a>
</div>

## Dependencies

- [@knapsack-pro/core](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/core)

## Contributing

Follow the steps in the [root README.md](https://github.com/KnapsackPro/knapsack-pro-js#contributing) to set up the project.

### Testing

To test `@knapsack-pro/cypress` against a real test suite we use the [cypress-example-test-suite](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/cypress-example-test-suite) project.

### Publishing

See [Publishing](../../#publishing) in the root README.md.
npm package: @knapsack-pro/jest
Description: Knapsack Pro Jest splits Jest tests across CI nodes and makes sure that tests will run in optimal time on each CI node.
Author: Knapsack Pro
Latest version: 9.0.0

# @knapsack-pro/jest

<p align="center">
  <a href="https://knapsackpro.com?utm_source=github&utm_medium=readme&utm_campaign=knapsack-pro-jest&utm_content=hero_logo">
    <img alt="Knapsack Pro" src="./.github/assets/knapsack.png" width="300" height="300" style="max-width: 100%;" />
  </a>
</p>

<h3 align="center">Speed up your tests</h3>
<p align="center">Run your 1-hour test suite in 2 minutes with optimal parallelisation on your existing CI infrastructure</p>

---

<div align="center">
  <a href="https://circleci.com/gh/KnapsackPro/knapsack-pro-js">
    <img alt="Circle CI" src="https://circleci.com/gh/KnapsackPro/knapsack-pro-js.svg?style=svg" />
  </a>
</div>

<br />
<br />

Knapsack Pro wraps [Jest](https://jestjs.io) and works with your existing CI infrastructure to parallelize tests optimally:

- Dynamically splits your tests based on up-to-date test execution data
- Is designed from the ground up for CI and supports all of them
- Tracks your CI builds to detect bottlenecks
- Does not have access to your source code and collects minimal test data
- Enables you to export historical metrics about your CI builds
- Replaces local dependencies like Redis with an API and runs your tests regardless of network problems

## Installation

See the [docs](https://docs.knapsackpro.com/jest/guide/) to get started:

<div align="center">
  <a href="https://docs.knapsackpro.com/jest/guide/">
    <img alt="Install button" src="./.github/assets/install-button.png" width="116" height="50" />
  </a>
</div>

## Dependencies

- [@knapsack-pro/core](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/core)

## Contributing

Follow the steps in the [root README.md](https://github.com/KnapsackPro/knapsack-pro-js#contributing) to set up the project.

### Testing

To test `@knapsack-pro/jest` against a real test suite we use:

- [jest-example-test-suite](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/jest-example-test-suite)
- (deprecated) [react](https://github.com/KnapsackPro/react)

### Publishing

See [Publishing](../../#publishing) in the root README.md.
npm package: @knapsack-pro/playwright
Description: Knapsack Pro Playwright splits Playwright tests across CI nodes and makes sure that tests will run in optimal time on each CI node.
Author: Knapsack Pro
Latest version: 0.1.1

# @knapsack-pro/playwright

<p align="center">
  <a href="https://knapsackpro.com?utm_source=github&utm_medium=readme&utm_campaign=knapsack-pro-playwright&utm_content=hero_logo">
    <img alt="Knapsack Pro" src="./.github/assets/knapsack.png" width="300" height="300" style="max-width: 100%;" />
  </a>
</p>

<h3 align="center">Speed up your tests</h3>
<p align="center">Run your 1-hour test suite in 2 minutes with optimal parallelisation on your existing CI infrastructure</p>

---

<div align="center">
  <a href="https://circleci.com/gh/KnapsackPro/knapsack-pro-js">
    <img alt="Circle CI" src="https://circleci.com/gh/KnapsackPro/knapsack-pro-js.svg?style=svg" />
  </a>
</div>

<br />
<br />

Knapsack Pro wraps [Playwright](https://playwright.dev/) and works with your existing CI infrastructure to parallelize tests optimally:

- Dynamically splits your tests based on up-to-date test execution data
- Is designed from the ground up for CI and supports all of them
- Tracks your CI builds to detect bottlenecks
- Does not have access to your source code and collects minimal test data
- Enables you to export historical metrics about your CI builds
- Replaces local dependencies like Redis with an API and runs your tests regardless of network problems

## Installation

See the [docs](https://docs.knapsackpro.com/playwright/guide/) to get started:

<div align="center">
  <a href="https://docs.knapsackpro.com/playwright/guide/">
    <img alt="Install button" src="./.github/assets/install-button.png" width="116" height="50" />
  </a>
</div>

## Dependencies

- [@knapsack-pro/core](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/core)

## Contributing

Follow the steps in the [root README.md](https://github.com/KnapsackPro/knapsack-pro-js#contributing) to set up the project.

### Testing

To test `@knapsack-pro/playwright` against a real test suite we use:

- [playwright-example-test-suite](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/playwright-example-test-suite)

### Publishing

See [Publishing](../../#publishing) in the root README.md.
npm package: @knapsack-pro/vitest
Description: Knapsack Pro Vitest splits Vitest tests across CI nodes and makes sure that tests will run in optimal time on each CI node.
Author: Knapsack Pro
Latest version: 0.3.0

# @knapsack-pro/vitest

<p align="center">
  <a href="https://knapsackpro.com?utm_source=github&utm_medium=readme&utm_campaign=knapsack-pro-vitest&utm_content=hero_logo">
    <img alt="Knapsack Pro" src="./.github/assets/logo.png" width="100%" style="max-width: 100%;" />
  </a>
</p>

<h3 align="center">Speed up your tests</h3>
<p align="center">Run your 1-hour test suite in 2 minutes with optimal parallelisation on your existing CI infrastructure</p>

---

<div align="center">
  <a href="https://circleci.com/gh/KnapsackPro/knapsack-pro-js">
    <img alt="Circle CI" src="https://circleci.com/gh/KnapsackPro/knapsack-pro-js.svg?style=svg" />
  </a>
</div>

<br />
<br />

Knapsack Pro wraps [Vitest](https://vitest.dev/) and works with your existing CI infrastructure to parallelize tests optimally:

- Dynamically splits your tests based on up-to-date test execution data
- Is designed from the ground up for CI and supports all of them
- Tracks your CI builds to detect bottlenecks
- Does not have access to your source code and collects minimal test data
- Enables you to export historical metrics about your CI builds
- Replaces local dependencies like Redis with an API and runs your tests regardless of network problems

## Installation

See the [docs](https://docs.knapsackpro.com/vitest/guide/) to get started:

<div align="center">
  <a href="https://docs.knapsackpro.com/vitest/guide/">
    <img alt="Install button" src="./.github/assets/install-button.png" width="116" height="50" />
  </a>
</div>

## Dependencies

- [@knapsack-pro/core](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/core)

## Contributing

Follow the steps in the [root README.md](https://github.com/KnapsackPro/knapsack-pro-js#contributing) to set up the project.

### Testing

To test `@knapsack-pro/vitest` against a real test suite we use:

- [vitest-example-test-suite](https://github.com/KnapsackPro/knapsack-pro-js/tree/main/packages/vitest-example-test-suite)

### Publishing

See [Publishing](../../#publishing) in the root README.md.
npm package: @knat_dev/form-fusion
Description: A simple, declarative form library for React with Zod validation and react-hook-form integration.
Author: Knat Dev
Latest version: 0.1.8

# @knat_dev/form-fusion

A simple, declarative form library for React with Zod validation and react-hook-form integration.

## Installation

To install the `@knat_dev/form-fusion` package, run one of the following commands depending on your package manager:

**npm:**

```bash
npm install @knat_dev/form-fusion
```

**yarn:**

```bash
yarn add @knat_dev/form-fusion
```

**pnpm:**

```bash
pnpm add @knat_dev/form-fusion
```

## Usage

To use `@knat_dev/form-fusion`, first import the necessary components:

```tsx
import { FormFactory, useFormFactory } from '@knat_dev/form-fusion';
import { z } from 'zod';
```

### Example

Create a form schema using Zod:

```tsx
const formSchema = z.object({
  name: z.string().min(1, 'Name is required'),
  email: z.string().email('Invalid email address'),
});
```

Define your form fields and components:

```tsx
const fields = [
  {
    name: 'name',
    component: TextField,
    label: 'Name',
  },
  {
    name: 'email',
    component: EmailField,
    label: 'Email',
  },
];
```

Create a form using the `FormFactory` component:

```tsx
function MyForm() {
  const handleFormSubmit = (data) => {
    console.log('Form submitted:', data);
  };

  return (
    <FormFactory
      defaultValues={{ name: '', email: '' }}
      schema={formSchema}
      onSubmit={handleFormSubmit}
      fields={fields}
    >
      <button type="submit">Submit</button>
    </FormFactory>
  );
}
```

For more advanced usage, see the [API documentation](#api-documentation).

## API Documentation

### useFormFactory

The `useFormFactory` hook is the core of the library. It takes care of managing form state, validation, and submission. It returns an object containing the form methods and state that can be used with your custom form components.

### FormFactory

The `FormFactory` component is a declarative way to create forms. It uses the `useFormFactory` hook internally and renders form fields based on the provided `fields` prop.

### FieldProps

`FieldProps` is a TypeScript interface for defining the properties of your custom form field components. It includes properties like `name`, `label`, `required`, `placeholder`, and `error`.

### FormFactoryField

`FormFactoryField` is a TypeScript type for defining the shape of the objects in the `fields` array passed to the `FormFactory` component. It includes properties like `name`, `component`, `label`, and `placeholder`.

## Contributing

Contributions to this library are welcome! If you encounter any issues or would like to suggest improvements, please [open an issue](https://github.com/Knat-Dev/form-fusion/issues) or submit a pull request.

## Disclaimer

Please note that while we strive to make @knat_dev/form-fusion as versatile as possible, it may not work for every form. If you encounter any issues or have any suggestions, we welcome your feedback and contributions to the library.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
npm package: @knaus94/nestjs-schedule-decorators
Description: ```bash npm install @knaus94/nestjs-schedule-decorators @nestjs/schedule ```
Author: knaus94
Latest version: 1.0.62

# @knaus94/nestjs-schedule-decorators

## Installation

```bash
npm install @knaus94/nestjs-schedule-decorators @nestjs/schedule
```

## Usage
```typescript
import { Injectable, Logger } from '@nestjs/common';
import { OnApplicationBootstrap } from '@nestjs/common';
import { SchedulerRegistry, CronExpression } from '@nestjs/schedule';
import { MasterNodeService } from '@master-node/master-node.service';
import { initializeScheduledJobs, cleanupScheduledJobs, ScheduleJob } from '@knaus94/nestjs-schedule-decorators';

@Injectable()
export class YourService implements OnApplicationBootstrap {
   private readonly logger = new Logger(YourService.name);

   constructor(
      private readonly masterNodeService: MasterNodeService,
      private readonly schedulerRegistry: SchedulerRegistry,
   ) {}

   async onApplicationBootstrap() {
      this.masterNodeService.isMaster$
         .pipe(
            tap((isMaster) => {
               if (isMaster) {
                  initializeScheduledJobs(this, this.schedulerRegistry);
               } else {
                  cleanupScheduledJobs(this, this.schedulerRegistry);
               }
            }),
         )
         .subscribe();
   }

   @ScheduleJob('test-func', CronExpression.EVERY_DAY_AT_4AM)
   async test() {
      console.log('running');
   }
}
```