open-index/open-npm huggingface dataset:
npm package: @gwesseling/graphql-codegen
Description: graphql-codegen - a JSON based graphql codegen
Author: gwesseling
Latest version: 0.0.7

# GraphQL Codegen

GraphQL Codegen is a powerful tool that helps you create GraphQL schemas using JSON. With an input schema based on the GraphQL type API, it should feel familiar to most users.

![image](https://github.com/user-attachments/assets/cac88db4-f5ff-40e8-9e9e-e6507ba95b73)

## Installation

You can install `graphql-codegen` by running one of the commands below:

```bash
# npm
npm install @gwesseling/graphql-codegen

# yarn
yarn add @gwesseling/graphql-codegen

# pnpm
pnpm install @gwesseling/graphql-codegen
```

## Usage

The usage of this package is straightforward.

```javascript
import {codegen} from "@gwesseling/graphql-codegen";

// Using the default config
codegen()
    .then((result) => console.log(result))
    .catch((err) => console.log(err));
```

or

```javascript
import {codegen} from "@gwesseling/graphql-codegen";

// Using a custom config
codegen({
    inputFile: "input.json",
    outputFile: "schema.ts",
})
    .then((result) => console.log(result))
    .catch((err) => console.log(err));
```

For a complete input examples, please refer to the [examples](https://github.com/gwesseling/graphql-json/tree/main/examples) folder. This folder contains a comprehensive JSON input, as well as the resulting output generated by the tool.

## Options

GraphQL-Codegen accepts the following options:

| Option     | Description                                                                                                                  | Type     | Default     |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------- | -------- | ----------- |
| inputFile  | Path to a file containing a [JSON schema](https://github.com/gwesseling/graphql-json/tree/main/packages/graphql-json#schema) | `string` | schema.json |
| outputFile | Output file for the schema                                                                                                   | `string` | schema.js   |
npm package: @gwgs/lcq
Description: A lightweight async task queue for JavaScript/TypeScript that limits the number of promises running concurrently.
Author: Chris Waters
Latest version: 0.2.3

# lcq — Limited Concurrency Queue

A lightweight async task queue for JavaScript/TypeScript that limits the number of promises running concurrently.

## Motivation

JavaScript is single-threaded, but async operations can pile up quickly. When firing off many concurrent async tasks — such as batch HTTP requests — you risk overwhelming the target or exhausting system resources. `lcq` lets you cap how many tasks run at the same time.

**Example use case:** Send 1,000 HTTP requests to an API without DoS-ing the server by processing them 10 at a time.

## Installation

```ts
import { lcq, Queue } from '@gwgs/lcq';
```

## Usage

### `lcq(config?)` — factory function

The easiest way to create a queue:

```ts
import { lcq } from '@gwgs/lcq';

const queue = lcq({ maxConcurrency: 5 });

queue.add(
  () => fetch('/api/item/1').then(() => {}),
  () => fetch('/api/item/2').then(() => {}),
  () => fetch('/api/item/3').then(() => {})
);

await queue.start();
```

### `Queue` — class

Use directly if you prefer instantiation:

```ts
import { Queue } from '@gwgs/lcq';

const queue = new Queue({ maxConcurrency: 5, threshold: 10_000 });

queue.add(() => someAsyncTask());
await queue.start();
```

## API

### `lcq(config?): Queue`

Factory function. Returns a new `Queue` instance.

### `new Queue(config?)`

| Option           | Type     | Default    | Description                                                  |
| ---------------- | -------- | ---------- | ------------------------------------------------------------ |
| `maxConcurrency` | `number` | `10`       | Maximum number of tasks running concurrently.                |
| `threshold`      | `number` | `Infinity` | Maximum run duration in milliseconds before the queue stops. |

### Instance methods

| Method          | Description                                                                |
| --------------- | -------------------------------------------------------------------------- |
| `add(...items)` | Appends one or more tasks to the queue.                                    |
| `start()`       | Begins processing. Resolves when all tasks finish or the queue is stopped. |
| `stop()`        | Signals the queue to stop after the current task completes.                |
| `clear()`       | Removes all pending tasks from the queue.                                  |
npm package: @gwigz/slua-create
Description: Scaffold new TSTL-powered SLua projects
Latest version: 0.1.1

# `@gwigz/slua-create`

Scaffold new TSTL-powered SLua projects.

<p align="center">
  <img src="../../.github/assets/create.webp" alt="create" width="75%" />
</p>

## Usage

```bash
npx @gwigz/slua-create
# or
pnpm dlx @gwigz/slua-create
# or
bunx @gwigz/slua-create
```

You can also pass a directory as the first argument:

```bash
npx @gwigz/slua-create my-project
# or
pnpm dlx @gwigz/slua-create my-project
# or
bunx @gwigz/slua-create my-project
```

## Templates

- **Single script** provides one `main.ts`, that outputs a single script
- **Multi-script** provides a custom `build.ts` that can build mutiple scripts

## Extras

| Extra             | Description                                                                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| JSX templates     | [@gwigz/jsx-inline](https://github.com/gwigz/jsx-inline)                                                                                         |
| Config module     | [@gwigz/slua-modules/config](https://github.com/gwigz/slua/tree/main/packages/modules)                                                           |
| Yield module      | [@gwigz/slua-modules/yield](https://github.com/gwigz/slua/tree/main/packages/modules)                                                            |
| StyLua formatting | Lua output formatting via [StyLua](https://github.com/JohnnyMorganz/StyLua)                                                                      |
| Linting           | TypeScript linting via [oxlint](https://oxc.rs) with [@gwigz/slua-oxlint-config](https://github.com/gwigz/slua/tree/main/packages/oxlint-config) |
| Formatting        | TypeScript formatting via [oxfmt](https://oxc.rs)                                                                                                |

## Documentation

Full API reference and usage examples are available at [slua.gwigz.link/docs/create](https://slua.gwigz.link/docs/create).
npm package: @gwigz/slua-modules
Description: Shared runtime modules for SLua projects
Latest version: 0.4.0

# `@gwigz/slua-modules`

Shared runtime modules for [TSTL-SLua](https://github.com/gwigz/slua) projects.

## Installation

```sh
npm install @gwigz/slua-modules
# or
pnpm add @gwigz/slua-modules
# or
bun add @gwigz/slua-modules
```

## Modules

| Module                        | Description                                                        |
| ----------------------------- | ------------------------------------------------------------------ |
| `@gwigz/slua-modules/config`  | Typed notecard config with YAML and lljson parsers                 |
| `@gwigz/slua-modules/yield`   | Coroutine wrappers that flatten callback APIs into sequential code |
| `@gwigz/slua-modules/testing` | Mock utilities for unit testing SLua modules                       |

## Documentation

Full API reference and usage examples are available at [slua.gwigz.link/docs/modules](https://slua.gwigz.link/docs/modules).
npm package: @gwigz/slua-oxlint-config
Description: Oxlint config for SLua (TypeScript-to-Lua) projects
Latest version: 0.1.1

# `@gwigz/slua-oxlint-config`

Shared [oxlint](https://oxc.rs/docs/guide/usage/linter) config for [TSTL-SLua](https://github.com/gwigz/slua) projects. Catches TypeScript patterns that don't work in SLua or pull in large TSTL runtime helpers.

## Installation

```sh
npm install -D @gwigz/slua-oxlint-config oxlint
# or
bun add -D @gwigz/slua-oxlint-config oxlint
```

## Usage

Extend the config in your `.oxlintrc.json`:

```json
{
  "extends": ["./node_modules/@gwigz/slua-oxlint-config/.oxlintrc.json"]
}
```

## What's Enforced

### Banned Globals

`Map`, `Set`, `WeakMap`, `WeakSet`, `Promise`, `fetch`, `document`, `window`, `XMLHttpRequest`, `setTimeout`, `setInterval`, `clearTimeout`, `clearInterval`, `require`, `process`, `Buffer`, `__dirname`, `__filename`

### Banned Syntax

| Pattern               | Reason                                  |
| --------------------- | --------------------------------------- |
| `async` / `await`     | Not supported in SLua                   |
| `delete obj.key`      | Pulls in ~150 lines of TSTL runtime     |
| `.splice()`           | Pulls in ~75 lines of runtime           |
| `Object.entries()`    | Use `for...in` or `Object.keys()`       |
| `.length = 0`         | Reassign to a new array instead         |
| `function*` / `yield` | Generators not supported in SLua        |
| `new Promise()`       | Use `@gwigz/slua-modules/yield` instead |
npm package: @gwigz/slua-types
Description: TypeScript type definitions for Second Life's SLua runtime
Latest version: 1.4.0

# `@gwigz/slua-types`

Auto-generated TypeScript declarations for SLua and LSL APIs.

Provides full type coverage for:

- **Base types** - `Vector`, `Quaternion`, `UUID`, `DetectedEvent` with operator overloads
- **Constructors** - `new Vector(x, y, z)` compiles to `vector.create(x, y, z)`
- **Modules** - `vector`, `quaternion`, `math`, `string`, `table`, `bit32`, `buffer`, `coroutine`, `uuid`
- **LSL functions** - 750+ `ll.*` functions with full parameter and return types
- **LSL constants** - `AGENT`, `ACTIVE`, `PI`, etc.
- **Events** - `LLEvents.on("touch_start", ...)` with typed event name unions
- **Globals** - `print`, `tostring`, `tonumber`, `assert`, `touuid`, `tovector`, etc.

## Usage

Reference directly in your TypeScript file:

```typescript
/// <reference path="path/to/index.d.ts" />
```

Or include via `tsconfig.json`:

```json
{
  "include": ["node_modules/@gwigz/slua-types/index.d.ts"]
}
```

## Regenerating

Types are generated from `refs/lsl-definitions/*.yaml` by the `gen-types` tool:

```bash
bun run generate
```

## Documentation

Full API reference and usage examples are available at [slua.gwigz.link/docs/slua](https://slua.gwigz.link/docs/slua).
npm package: @gwigz/tstl-bundle-flatten
Description: TSTL plugin that flattens luaBundle output, eliminating the module system
Latest version: 1.0.1

# `@gwigz/tstl-bundle-flatten`

A [TypeScriptToLua](https://github.com/TypeScriptToLua/TypeScriptToLua) plugin that flattens `luaBundle` output, eliminating the module system entirely.

TSTL's bundler wraps each module in a closure with a `require()` runtime. This plugin rewrites the bundle to emit all module code in dependency order as top-level locals, removing the `____modules` table, `____moduleCache`, `require()` function, module closures, and import/export boilerplate.

## When is this useful?

Some Lua runtimes don't support or benefit from a module system, or are have tight limitations. If you're targeting an environment like this and using `luaBundle`, the generated runtime adds unnecessary overhead. This plugin strips it out and gives you clean, top-level code.

## Install

```sh
bun add -D @gwigz/tstl-bundle-flatten
# or
npm install -D @gwigz/tstl-bundle-flatten
```

## Setup

Add the plugin to your `tsconfig.json`:

```diff
{
  "tstl": {
    "luaBundle": "bundle.lua",
    "luaBundleEntry": "src/index.ts",
    "luaPlugins": [
+     { "name": "@gwigz/tstl-bundle-flatten" }
    ]
  }
}
```

## Options

Options are passed inline in the plugin entry:

```jsonc
{
  "name": "@gwigz/tstl-bundle-flatten",
  // Modules to exclude from flattening (kept in the bundle runtime)
  "skipModules": ["constants"],
  // Insert blank lines at code boundaries for readability (default: true)
  "format": true,
}
```

| Option        | Type       | Default | Description                                              |
| ------------- | ---------- | ------- | -------------------------------------------------------- |
| `skipModules` | `string[]` | `[]`    | Module names to leave untouched by the flattener         |
| `format`      | `boolean`  | `true`  | Add whitespace between logical code blocks in the output |

## Example

Given a bundle with two modules:

```
src/
├── greet.ts → export function greet(name: string) { ... }
└── index.ts → import { greet } from "./greet"
```

TSTL's default `luaBundle` output wraps everything in a module runtime. After `tstl-bundle-flatten`, you get:

```lua
local function greet(name)
  print("Hello, " .. name)
end

greet("world")
```

No `____modules`, no `require`, no closures, just flat Lua.
npm package: @gwinkamp/cryptopro-cades
Description: fork проекта `@astral/cryptopro-cades`   https://github.com/kaluga-astral/services
Author: gwinkamp
Latest version: 1.2.1

# @gwinkamp/cryptopro-cades

fork проекта `@astral/cryptopro-cades`  
https://github.com/kaluga-astral/services

Библиотека для взаимодействия с [КриптоПро ЭЦП Browser plug-in](https://www.cryptopro.ru/products/cades/plugin)

## Установка

```bash
npm install @gwinkamp/cryptopro-cades
```

## API surface

- `sign` - подпись контента файла (CMS, прикрепленный или открепленный).
- `signHash` - подпись хэша файла (CMS detached). Хэш должен быть вычислен по Gost3411_2012 ГОСТу (256 или 512 в зависимости от алгоритма сертификата).
- `signXml` - подпись файла (XmlDSig). Параметром управляется тип Enveloped, Enveloping, Template.
- `decrypt` - расшифровка файла (CMS).
- `encrypt` - шифрование файла (CMS).
- `findCertificateBySkid` - поиск по значению из расширения сертификата SubjectKeyId (oid '2.5.29.14').
- `findCertificateByThumprint` - поиск сертификата по отпечатку (хэш sha-1).
- `createCertRequest` - генерация контейнера закрытого ключа и создание запроса на выпуск сертификата.
- `installCertificate` - установка сертификата в хранилище.
- `getCertificates` - получение списка сертификатов, с возможностью указать тип хранилища для поиска (токены, реестры или всё и сразу).
  - сертификаты имеют в составе базовую информацию:
    - certificateBase64Data
    - issuer
      - inn
      - innLe
      - commonName
    - subject
      - commonName
      - surname
      - name
      - country
      - region
      - locality
      - street
      - organization
      - department
      - post
      - ogrnip
      - ogrn
      - snils
      - innLe
      - inn
      - email
    - subjectName
    - thumbprint
    - subjectKeyId
    - name
    - providerName, providerType
    - hasPrivateKey
    - isGost
    - notBefore, notAfter
    - algorithm

- `checkPlugin` - проверка доступности КриптоПРО Браузер плагина.
- `checkIsValidSystemSetup` - проверка корректности рабочего места - наличие криптопровайдера, плагина, и минимальных версий.
- `getCryptoProviders` - получение списка криптопровайдеров установленных на компьютере пользователя. Название, тип, версия.
- `getSystemInfo` - получение информации о системе пользователя - версия КриптоПро ЭЦП Browser plug-in, версия CSP (VipNet или CryptoPro)
- `pluginConfig` - возможность включить вывод отладочной информации, подписываться на все создаваемые исключения, отключать проверку корректности системы, ограничивать тип криптопровайдера которым можно пользоваться, его версии.
npm package: @gwinkamp/faker
Description: Библиотека для генерации фековых тетовых данных
Author: gwinkamp
Latest version: 1.0.0

# @gwinkamp/faker

Библиотека для генерации фековых тетовых данных

## Установка

```shell
npm install @gwinkamp/faker
```

## API

#### ФИО

```javascript
import faker from "@gwinkamp/faker";

// Генерация случайного имени. Строка
faker.person.firstName();

// Генерация случайной фамилии. Строка
faker.person.lastName();

// Генерация случайного отчества. Строка
faker.person.middleName();

// Генерация случайного ФИО. Объект:
// {
//   firstName: "строка",
//   lastName: "строка",
//   middleName: "строка"
// }
faker.person.fullName();

// Генерация случайного ФИО. Строка в формате "Фамилия Имя Отчество"
faker.person.fullNameString();
```

При желании в каждый метод можно передать пол человека:

```javascript
import faker from "@gwinkamp/faker";
import { Gender } from "@gwinkamp/faker/types";

// Сгенерировать ФИО мужчины
faker.person.fullNameString(Gender.Male);

// Сгенерировать ФИО женщины
faker.person.fullNameString(Gender.Female);
```

#### Реквизиты

```javascript
import faker from "@gwinkamp/faker";

// Сгенерировать ИНН ЮЛ
faker.requisites.innUl();

// Сгенерировать ИНН ФЛ
faker.requisites.innFl();

// Сгенерировать ОГРН ЮЛ
faker.requisites.ogrnUl();

// Сгенерировать ОГРН ИП
faker.requisites.ogrnIp();

// Сгенерировать ОКПО ЮЛ
faker.requisites.okpoUl();

// Сгенерировать ОКПО ИП
faker.requisites.okpoIp();

// Сгенерировать СНИЛС
faker.requisites.snils();

// Сгенерировать СНИЛС в формате "ХХХ-ХХХ-ХХХ ХХ"
faker.requisites.formattedSnils();
```
npm package: @gwinkamp/k6-tools
Description: Tools for [k6](https://k6.io/) scripts.
Latest version: 1.2.1

# k6-tools

Tools for [k6](https://k6.io/) scripts.

## Install

```shell
npm i @gwinkamp/k6-tools
```

## Usage

### Request headrs builder

designed for easy assembly of HTTP request headers.

```javascript
import { Headers } from "@gwinkamp/k6-tools";
import http from "k6/http";

export default function() {
  const headers = new Headers();

  // add custom header
  headers.add("X-CustomHeader", "Value");

  // set Authorization header
  headers.setAuth("my-secret-token");

  // set Content-Type header
  headers.setContentType("plain/text");

  // set Content-Type header with "application/json" value
  headers.setJsonContentType();

  // set multipart/form-data Content-Type header with boundary
  headers.setFormDataContentType("test-boundary");

  const response = http.get("http://localhost:8080/get", {
    headers: headers.build()  // build headers
  });
}
```

### Multipart form-data builder

designed for assembling multipart form-data payload of request body.

```javascript
import { FormData, Headers } from "@gwinkamp/k6-tools";
import http from "k6/http";

const file = open("test.txt", "b");

export default function() {
  const headers = new Headers();
  const form = new FormData();

  // add string field to form
  form.append("param", "value");

  // add file field to form
  form.append("file", http.file(file, "test.txt"));

  // set multipart/form-data Content-Type header with boundary
  headers.setFormDataContentType(form.boundary);

  const response = http.post(
    "http://localhost:8080/post",
    form.body(),
    {
      headers: headers.build(),
    }
  );
}
```

### URL

designed for assembling URL with query params.

```javascript
import { URL } from "@gwinkamp/k6-tools";
import http from "k6/http";

export default function() {
  const url = new URL("http://localhost:8080");

  url.addParam("key1", "value1");
  url.addParam("key2", 123);
  url.addParam("key3", ["value2", "value3"]);

  // URL to be http://localhost:8080?key1=value1&key2=123&key3[]=value2&key3[]=value3
  const response = http.get(url.toString());
}
```

### k6 utils

All methods from the [k6-util](https://grafana.com/docs/k6/latest/javascript-api/jslib/utils/) library are also available. For example:

* `randomIntBetween(min, max)` - Random integer in a given range
* `randomItem(array)` - Random item from a given array
* `randomString(length, [charset])` - Random string of a given length, optionally selected from a custom character set
* `uuidv4()` - Random UUID v4 in a string representation
* `findBetween(content, left, right, [repeat])` - Extract a string between two surrounding strings

```javascript
import { randomString } from "@gwinkamp/k6-tools"

export default function() {
  console.log(randomString(10));
}
```

## Contribution

Freely. I am always glad to have suggestions
npm package: @gwinkamp/types-xk6-filestorage
Description: Type definitions for [xk6-filestorage extension](https://github.com/Gwinkamp/types-xk6-filestorage)
Author: Gwinkamp
Latest version: 1.0.0

# Types for xk6-filestorage

Type definitions for [xk6-filestorage extension](https://github.com/Gwinkamp/types-xk6-filestorage)

## Install

```shell
npm i @gwinkamp/types-xk6-filestorage
```

## Usage

Add the following property to your `tsconfig.json`:

```json
{
  "compilerOptions": {
    ...
    "typeRoots": [
      "node_modules/@gwinkamp/types-xk6-filestorage",
      "node_modules/@types"
    ],
    ...
  }
}
```
npm package: @gwinkamp/types-xk6-formdata
Description: Type definitions for [xk6-formdata extension](https://github.com/Gwinkamp/types-xk6-formdata)
Author: Gwinkamp
Latest version: 1.0.2

# Types for xk6-formdata

Type definitions for [xk6-formdata extension](https://github.com/Gwinkamp/types-xk6-formdata)

## Install

```shell
npm i @gwinkamp/types-xk6-formdata
```

## Usage

Add the following property to your `tsconfig.json`:

```json
{
  "compilerOptions": {
    ...
    "typeRoots": [
      "node_modules/@gwinkamp/types-xk6-formdata",
      "node_modules/@types"
    ],
    ...
  }
}
```
npm package: @gwinkamp/types-xk6-slog
Description: Type definitions for [xk6-slog extension](https://github.com/Gwinkamp/xk6-slog)
Author: Gwinkamp
Latest version: 1.0.1

# Types for xk6-slog

Type definitions for [xk6-slog extension](https://github.com/Gwinkamp/xk6-slog)

## Install

```shell
npm i @gwinkamp/types-xk6-slog
```

## Usage

Add the following property to your `tsconfig.json`:

```json
{
  "compilerOptions": {
    ...
    "typeRoots": [
      "node_modules/@gwinkamp/types-xk6-slog",
      "node_modules/@types"
    ],
    ...
  }
}
```
npm package: @gwinkamp/types-xk6-yaml
Description: Type definitions for [xk6-yaml extension](https://github.com/szkiba/xk6-yaml)
Author: Gwinkamp
Latest version: 1.0.0

# Types for xk6-yaml

Type definitions for [xk6-yaml extension](https://github.com/szkiba/xk6-yaml)

## Install

```shell
npm i @gwinkamp/types-xk6-yaml
```

## Usage

Add the following property to your `tsconfig.json`:

```json
{
  "compilerOptions": {
    ...
    "typeRoots": [
      "node_modules/@gwinkamp/types-xk6-yaml",
      "node_modules/@types"
    ],
    ...
  }
}
```