open-index/open-npm huggingface dataset:
npm package: @prefabs.tech/react-i18n
Description: React I18n Plugin
Latest version: 0.72.1

# Prefabs React I18n

Adds internationalization to a react app.

## Requirements

* `@prefabs.tech/react-config: 0.1.0`

## Installation

```bash
pnpm install @prefabs.tech/react-config @prefabs.tech/react-i18n
```

## Usage

### Setup i18n

In `src/main.tsx`:

```ts
import i18n from "@prefabs.tech/react-i18n";
import i18n from "@prefabs.tech/react-i18n";
import React from "react";
import ReactDOM from "react-dom/client";

import App from "./App";
import config from "./config";


i18n(config.i18n);

...
```

### Resources

Create your resources under `src/locales/{locale}`.

For each locale, your resource should look like this:

```
{
  "locales": {
    "en": "English",
    "fr": "Français",
    "th": "ไทย"
  }
}
```

### Configuration

The package supports the same configuration options as the `react-i18next` package.

The configuration options must be defined under the `i18n` attribute of your app config (`AppConfig`).

```
# src/config.ts

const config: AppConfig = {
  ...
  i18n: {
    fallbackLng: "en",
    resources: {
      ...
    },
  },
  ...
};
```
npm package: @prefabs.tech/saas-vue
Description: Saas plugin for vue
Latest version: 0.29.0

# @prefabs.tech/saas-vue

This package provides essential tools and components to support SaaS functionality in Vue applications. It simplifies account management, routing, and configuration for multi-tenant SaaS platforms.

## Installation

Install with npm:

```bash
npm install @prefabs.tech/saas-vue
```

Install with pnpm:

```bash
pnpm add --filter "@scope/project" @prefabs.tech/saas-vue
```
npm package: @prefabs.tech/stateful-fastify
Description: A fastify plugin for the stateful library
Author: Prefabs Tech
Latest version: 0.5.0

# @prefabs.tech/stateful-fastify

A fastify plugin for implementing a state machine.

## Requirements

A [fastify](https://fastify.dev) server.

## Installation

Install with npm:

```bash
npm install @prefabs.tech/stateful-fastify
```

Install with pnpm:

```bash
pnpm add --filter "@scope/project" @prefabs.tech/stateful-fastify
```

## Usage

### Register the stateful plugin in your fastify server instace

Register the plugin with your fastify instance:

```typescript
import plugin from "@prefabs.tech/stateful-fastify";
import Fastify from "fastify";

const start = async () => {
  const fastify = await Fastify();

  // Register state-machine-fastify plugin
  await fastify.register(plugin, { ... });

  try {
    await fastify.listen({
      port: 3000,
      host: "0.0.0.0",
    });
  } catch (error) {
    fastify.log.error(error);
  }
};

start();
```

## Register the stateful plugin in your entity controller

```
# ThingController.ts
import statefulPlugin from "@prefabs.tech/stateful-fastify";
...

const plugin = async (
  fastify: FastifyInstance,
  options: Records<string, any>
) => {
  ...

  fastify.get("/things, {
    ...
  });

  fastify.post("/things/:id", {
    ...
  });

  // Register stateful plugin
  await fastify.register(
    StatefulPlugin,
    {
      prefix: ...,
      entity: {
        dropTables: true,
        field: "status",
        name: "thing",
        table: "things",
        users: "users",
      },
    }
  );
}
```

## Options

The Stateful plugin suports the standard [Fastify plugin](https://fastify.dev/docs/latest/Reference/Plugins/) options:

  * `logLevel`
  * `logSerializers`
  * `prefix`

An additional `entity: StatefulPluginOptions` option is requred: 


| Option     | Type    | Required | Default  | Description |
|------------|---------|----------|----------|-------------|
| dropTables | boolean | no       | false    | Whether to drop all generated tables before running migrations. |
| field      | string  | yes      | `status` | The name of the attribute representing the state in the entity concerned. |
| name       | string  | yes      |          | The name of the entity for which to create a state machine. Will be used as the prefix of all generated tables. |
| table      | string  | yes      |          | The name of the table for the  entities in question. |
| users      | string  | no       | `users`  | The name of the table containing user records. |