open-index/open-npm huggingface dataset:
npm package: @nattogo/ksqldb
Description: KsqlDB Client module for Nest framework (node.js)
Author: The
Latest version: 0.0.1

# KsqlDB Client for Nestjs ![logo](https://docs.ksqldb.io/en/latest/img/logo.png)

## Install

```
# npm
npm install @nattogo/ksqldb
# yarn
yarn add @nattogo/ksqldb
```

## Usage
```ts
// app.module.ts
import { KsqlDBModule } from '@nattogo/ksqldb';

@Module({
  imports: [
    KsqlDBModule.register({
      url: 'http://localhost:8088',
      timeout: 3000,
    }),
  ],
})
export class AppModule {}
```

```ts
//app.service.ts
import { KsqldbService } from '@nattogo/ksqldb';
import { Injectable } from '@nestjs/common';

@Injectable()
export class AppService {
  constructor(private readonly ksqldbService: KsqldbService) {
  }

   pushQuery() {
    this.ksqldbService.pushQuery('SELECT * FROM STREAM EMIT CHANGES;').subscribe({
      next: (data) => console.log(data),
    });
  }
}

```
npm package: @nattogo/nest-qualifier
Description: ### How it works Add alias metadata to the class and use it as token injection.
Author: The Van
Latest version: 0.0.13

# Nest Qualifier

### How it works
Add alias metadata to the class and use it as token injection.

### How to install
```shell
# npm
npm i --save @nattogo/nest-qualifier

#yarn
yarn add @nattogo/nest-qualifier
```
### How to use
####
IRepository.ts
```ts
export interface IRepository {
    findOne: (id: string) => Promise<any>;
}
```

MongoRepository.ts
```ts

import {Injectable} from "@nattogo/nest-qualifier";

@Injectable({
    alias: 'MongoRepository'
})
export class MongoRepositoryImlp implements IRepository {
    findOne(id: string): Promise<{ id: string }> {
        return Promise.resolve({
            id
        });
    }

}
```

MySQLRepository.ts
```ts

import {Injectable} from "@nattogo/nest-qualifier";

@Injectable({
    alias: 'MySQLRepository'
})
export class MySQLRepositoryImpl implements IRepository {
    findOne(id: string): Promise<{ id: string }> {
        return Promise.resolve({
            id
        });
    }

}
```
ProductService.ts
```ts
import {Injectable} from "@nestjs/common";
import {Qualifier} from "@nattogo/nest-qualifier";

@Injectable()
export class ProductService {
    public constructor(
        @Qualifier('MongoRepository') mongoRepository: IRepository,
        @Qualifier('MySQLRepository') mysqlRepository: IRepository
    ) {}
}
```

ProductModule.ts
```ts
import {Module} from "@nattogo/nest-qualifier";

@Module({
    providers: [
        MongoRepository,
        MySQLRepository,
    ],
})
export class ProductModule {
}
```

### License
MIT License
npm package: @nattojs/eval
Description: > **work in progress! everything will change!**
Latest version: 0.0.1-alpha.2

> **work in progress! everything will change!**

# @nattojs/eval

```js
import { NattoEvaluator } from "@nattojs/eval";

const canvas = { panes: [...] };
const evaluator = new NattoEvaluator(canvas.panes);
const paneValue = await evaluator.getPaneValue(paneId);
```

## API

```ts
type PaneOutput =
  | [type: "value", value: any]
  | [type: "error", error: any]
  | [type: "waiting", id?: string]
  | [type: "running"];

type EvaluatorOptions = {
  globals: Record<string, any>;
};

class NattoEvaluator {
  constructor(panes: Pane[], options?: EvaluatorOptions);
  getPaneOutput(paneId: string, outputIndex?: number = 0): PaneOutput;
  getPaneValue(paneId: string, outputIndex?: number = 0): Promise<any>;
  subscribeToPaneOutput(paneId: string, outputIndex: number, callback: (output: PaneOutput) => void): () => void;
  setPaneValue(paneId: string, outputIndex: number, value: any): void;
  destroy(): void;
}
```

## Notes

- Note the difference between "output" and "value". A pane's output has type `PaneOutput` and may not always contain a value (eg `["waiting"]`).
- `setPaneValue` may be removed. Its behavior is undefined if the pane you set has inputs.
- `getPaneOutput` will always return immediately with the current output, which could be `["waiting"]`.
- `getPaneValue` will resolve immediately if the pane has a value. Otherwise, it will resolve with the next value (when its output is `["value", value]`).
- All panes have one output (`outputIndex = 0`) except state panes, which have two outputs.
- A state pane's second output (`outputIndex = 1`) is the state setter function.
- `evaluator.subscribeToPaneOutput` and `evaluator.setPaneValue` refer to pane's first output.
- `evaluator.subscribeToPaneOutput` returns an unsubscribe function.
- Errors currently cause undefined behavior (todo).
- Template panes, global panes, and import panes with global names are not yet supported.

## Example React usage

```js
import React from "react";

const evaluator = new NattoEvaluator(
  [
    {
      id: paneId,
      type: 0,
      expression: "<div>hi!</div>",
      babelPlugins: ["transform-react-jsx"],
      ...
    },
  ],
  { globals: { React } }
);
const reactElement = await evaluator.getPaneValue(paneId);
```
npm package: @nattui/prettier-config
Description: A shareable Prettier configuration with opinionated defaults and useful plugins
Author: Natt Nguyen
Latest version: 0.0.8

# @nattui/prettier-config

A shareable [Prettier](https://prettier.io) configuration with opinionated defaults and useful plugins.

## Features

- **No semicolons** - Cleaner code without unnecessary punctuation
- **Automatic CSS property ordering** - Alphabetical sorting for consistent stylesheets
- **Package.json formatting** - Keeps your package.json files clean and organized
- **JSON sorting** - Recursive sorting of JSON files for better diffs and consistency

## Installation

Install the config as a development dependency:

```bash
# npm
npm install --save-dev @nattui/prettier-config

# yarn
yarn add --dev @nattui/prettier-config

# pnpm
pnpm add --save-dev @nattui/prettier-config

# bun
bun add --dev @nattui/prettier-config
```

## Usage

### Option 1: package.json (Recommended)

Add the following to your `package.json`:

```json
{
  "prettier": "@nattui/prettier-config"
}
```

### Option 2: Configuration file

Create a `.prettierrc` file in your project root:

```json
"@nattui/prettier-config"
```

### Option 3: Extending the configuration

If you need to override some settings, create a `.prettierrc.mjs` file:

```js
import prettierConfig from "@nattui/prettier-config"

/**
 * @type {import("prettier").Config}
 */
const config = {
  ...prettierConfig,
  // Override any settings here
  semi: true, // Enable semicolons if you prefer
  singleQuote: true, // Use single quotes
}

export default config
```

## Configuration Details

This configuration includes the following settings:

- `semi: false` - No semicolons
- `cssDeclarationSorterOrder: "alphabetical"` - Alphabetical CSS property ordering
- `jsonRecursiveSort: true` - Recursive JSON sorting

### Included Plugins

- [`prettier-plugin-css-order`](https://github.com/Siilwyn/prettier-plugin-css-order) - Sorts CSS declarations
- [`prettier-plugin-packagejson`](https://github.com/matzkoh/prettier-plugin-packagejson) - Formats package.json files
- [`prettier-plugin-sort-json`](https://github.com/Gudahtt/prettier-plugin-sort-json) - Sorts JSON files recursively

## Related

- [Prettier Documentation](https://prettier.io/docs/)
- [Sharing Prettier Configurations](https://prettier.io/docs/sharing-configurations)