open-index/open-npm huggingface dataset:
npm package: @joai/warps
Description: Core Warps SDK package providing the foundation for building and executing Warps across multiple blockchain networks.
Latest version: 4.17.0

# @joai/warps

Core Warps SDK package providing the foundation for building and executing Warps across multiple blockchain networks.

## Installation

```bash
npm install @joai/warps
```

## Overview

The core package provides:

- **WarpClient** - Main client for interacting with Warps
- **WarpExecutor** - Executes Warp actions and transactions
- **WarpFactory** - Creates executable Warps from definitions
- **WarpBuilder** - Programmatic Warp creation
- **WarpSerializer** - Serializes/deserializes Warp data
- **Type definitions** - Complete TypeScript types for Warps

## Usage

```typescript
import { WarpClient } from '@joai/warps'
import { getAllEvmAdapters } from '@joai/warps-adapter-evm'
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'

const config = {
  env: 'mainnet',
  user: {
    wallets: {
      ethereum: {
        provider: 'privatekey',
        privateKey: '0x...',
      },
    },
  },
}

const client = new WarpClient(config, {
  chains: getAllEvmAdapters(MultiversxAdapter),
})

// Execute a Warp
const result = await client.execute(warp, inputs)
```

## Key Features

- Multi-chain support via adapters
- Type-safe Warp definitions
- Transaction execution and signing
- Output transformation and evaluation
- Caching and performance optimization
- Link detection and parsing

## Documentation

For detailed API documentation, visit [docs.vleap.ai](https://docs.vleap.ai).
npm package: @joai/warps-adapter-evm
Description: EVM adapter for Warps SDK
Latest version: 1.4.1

# @joai/warps-adapter-evm

EVM-compatible blockchain adapter for the Warps SDK. Supports Ethereum, Base, Polygon, Arbitrum, Optimism, and other EVM chains.

## Installation

```bash
npm install @joai/warps-adapter-evm
```

## Usage

```typescript
import { WarpClient } from '@joai/warps'
import { getAllEvmAdapters } from '@joai/warps-adapter-evm'
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'

// Use all EVM chains (requires a fallback adapter)
const client = new WarpClient(config, {
  chains: getAllEvmAdapters(MultiversxAdapter),
})
```

## Individual Chain Adapters

You can also import individual chain adapters:

```typescript
import { EthereumAdapter, BaseAdapter, PolygonAdapter } from '@joai/warps-adapter-evm'
import { withAdapterFallback } from '@joai/warps'
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'

const client = new WarpClient(config, {
  chains: [
    withAdapterFallback(EthereumAdapter, MultiversxAdapter),
    withAdapterFallback(BaseAdapter, MultiversxAdapter),
  ],
})
```

## Supported Chains

- **Ethereum** (mainnet, sepolia)
- **Base** (mainnet, sepolia)
- **Polygon** (mainnet, amoy)
- **Arbitrum** (mainnet, sepolia)
- **Optimism** (mainnet, sepolia)
- And other EVM-compatible networks

## Features

- Transaction creation and execution
- Smart contract interaction
- Token transfers
- Query contract state
- Transaction signing and broadcasting
- Explorer integration

## Wallet Providers

Supports multiple wallet providers:
- Private key
- Mnemonic
- Read-only (for queries)
npm package: @joai/warps-adapter-fastset
Description: Fastset adapter for Warps SDK
Latest version: 1.1.2

# @joai/warps-adapter-fastset

Fastset blockchain adapter for the Warps SDK. Enables Warp execution on the Fastset network.

## Installation

```bash
npm install @joai/warps-adapter-fastset
```

## Usage

```typescript
import { WarpClient, withAdapterFallback } from '@joai/warps'
import { FastsetAdapter } from '@joai/warps-adapter-fastset'
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'

// Fastset adapter requires a fallback adapter
const client = new WarpClient(config, {
  chains: [withAdapterFallback(FastsetAdapter, MultiversxAdapter)],
})
```

## Features

- Transaction creation and execution
- Smart contract interaction
- Token transfers
- Query contract state
- Transaction signing and broadcasting
- Explorer integration

## Wallet Providers

Supports multiple wallet providers:
- Private key
- Mnemonic
- Read-only (for queries)
npm package: @joai/warps-adapter-multiversx
Description: MultiversX (formerly Elrond) blockchain adapter for the Warps SDK. Enables Warp execution on MultiversX mainnet and testnet.
Latest version: 1.6.0

# @joai/warps-adapter-multiversx

MultiversX (formerly Elrond) blockchain adapter for the Warps SDK. Enables Warp execution on MultiversX mainnet and testnet.

## Installation

```bash
npm install @joai/warps-adapter-multiversx
```

## Usage

```typescript
import { WarpClient } from '@joai/warps'
import { getAllMultiversxAdapters } from '@joai/warps-adapter-multiversx'

// Use all MultiversX networks (includes MultiversX and Claws)
const client = new WarpClient(config, {
  chains: getAllMultiversxAdapters(),
})
```

## Individual Chain Adapters

You can also import individual chain adapters:

```typescript
import { MultiversxAdapter, ClawsAdapter } from '@joai/warps-adapter-multiversx'

const client = new WarpClient(config, {
  chains: [MultiversxAdapter],
})
```

## Supported Networks

- **MultiversX Mainnet**
- **MultiversX Testnet**

## Features

- Transaction creation and execution
- Smart contract interaction
- EGLD and ESDT token transfers
- Query contract state
- Transaction signing and broadcasting
- Explorer integration
- ABI and brand builders

## Wallet Providers

Supports multiple wallet providers:
- Private key
- Mnemonic
- Read-only (for queries)
npm package: @joai/warps-adapter-near
Description: NEAR adapter for Warps SDK
Latest version: 1.2.2

# @joai/warps-adapter-near

NEAR Protocol adapter for the Warps SDK. Enables Warp execution on NEAR mainnet and testnet.

## Installation

```bash
npm install @joai/warps-adapter-near
```

## Usage

```typescript
import { WarpClient, withAdapterFallback } from '@joai/warps'
import { NearAdapter } from '@joai/warps-adapter-near'
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'

// NEAR adapter requires a fallback adapter
const client = new WarpClient(config, {
  chains: [withAdapterFallback(NearAdapter, MultiversxAdapter)],
})
```

## Supported Networks

- **NEAR Mainnet**
- **NEAR Testnet**

## Features

- Transaction creation and execution
- Smart contract interaction
- Token transfers
- Query contract state
- Transaction signing and broadcasting
- Explorer integration

## Wallet Providers

Supports multiple wallet providers:
- Private key
- Mnemonic
- Read-only (for queries)
npm package: @joai/warps-adapter-solana
Description: Solana adapter for Warps SDK
Latest version: 1.2.3

# @joai/warps-adapter-solana

Solana blockchain adapter for the Warps SDK. Enables Warp execution on Solana mainnet, testnet, and devnet.

## Installation

```bash
npm install @joai/warps-adapter-solana
```

## Usage

```typescript
import { WarpClient, withAdapterFallback } from '@joai/warps'
import { SolanaAdapter } from '@joai/warps-adapter-solana'
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'

// Solana adapter requires a fallback adapter
const client = new WarpClient(config, {
  chains: [withAdapterFallback(SolanaAdapter, MultiversxAdapter)],
})
```

## Supported Networks

- **Solana Mainnet**
- **Solana Testnet**
- **Solana Devnet**

## Features

- Transaction creation and execution
- Program (smart contract) interaction
- Token transfers (SPL tokens)
- Query program state
- Transaction signing and sending
- Explorer integration

## Wallet Providers

Supports multiple wallet providers:
- Private key
- Mnemonic
- Read-only (for queries)
npm package: @joai/warps-adapter-sui
Description: Sui blockchain adapter for the Warps SDK. Enables Warp execution on the Sui network.
Latest version: 1.3.3

# @joai/warps-adapter-sui

Sui blockchain adapter for the Warps SDK. Enables Warp execution on the Sui network.

## Installation

```bash
npm install @joai/warps-adapter-sui
```

## Usage

```typescript
import { WarpClient, withAdapterFallback } from '@joai/warps'
import { SuiAdapter } from '@joai/warps-adapter-sui'
import { MultiversxAdapter } from '@joai/warps-adapter-multiversx'

// Sui adapter requires a fallback adapter
const client = new WarpClient(config, {
  chains: [withAdapterFallback(SuiAdapter, MultiversxAdapter)],
})
```

## Features

- Transaction creation and execution
- Move package interaction
- Token transfers
- Query object state
- Transaction signing and execution
- Explorer integration
- ABI and brand builders

## Wallet Providers

Supports multiple wallet providers:
- Private key
- Mnemonic
- Read-only (for queries)
npm package: @joai/warps-mcp
Description: MCP adapter for Warps SDK
Latest version: 12.1.0

# @joai/warps-mcp

Model Context Protocol (MCP) integration for the Warps SDK. Enables fetching and converting MCP tools into Warps.

## Installation

```bash
npm install @joai/warps-mcp
```

## Prerequisites

- `@joai/warps` core package
- `@modelcontextprotocol/sdk` (peer dependency)

## Usage

```typescript
import { WarpMcp } from '@joai/warps-mcp'
import { WarpClient } from '@joai/warps'

const config = {
  env: 'mainnet',
  // ... your config
}

const mcp = new WarpMcp(config)

// Fetch Warps from an MCP server
const warps = await mcp.getWarpsFromTools('https://mcp-server.example.com', {
  Authorization: 'Bearer token',
})

// Use the Warps with WarpClient
const client = new WarpClient(config, { chains: [...] })
for (const warp of warps) {
  await client.execute(warp, inputs)
}
```

## Features

- Connect to MCP servers
- List available tools
- Convert MCP tools to Warps
- Execute Warps from MCP sources

## MCP Actions

Warps support `mcp` action types that can execute MCP tools directly:

```typescript
{
  type: 'mcp',
  destination: {
    url: 'https://mcp-server.example.com',
    tool: 'tool-name',
    headers: { Authorization: 'Bearer token' }
  }
}
```
npm package: @joai/warps-react
Description: React integration for the Warps SDK. Provides React hooks and components for building Warp-enabled applications.
Latest version: 1.0.48

# @joai/warps-react

React integration for the Warps SDK. Provides React hooks and components for building Warp-enabled applications.

## Installation

```bash
npm install @joai/warps-react
```

## Prerequisites

- React 18.0.0 or higher
- `@joai/warps` core package

## Status

⚠️ **Note**: This package is currently under development. The React integration API is being finalized.

## Features

- React hooks for Warp execution
- Component integration
- TypeScript support
- Seamless integration with Warps SDK

## Documentation

For detailed React integration examples, visit [docs.vleap.ai](https://docs.vleap.ai).
npm package: @joai/warps-vm-browser
Description: Browser VM runtime for Warps SDK output transformations. Safely executes transformation code in a Web Worker sandbox.
Latest version: 1.0.3

# @joai/warps-vm-browser

Browser VM runtime for Warps SDK output transformations. Safely executes transformation code in a Web Worker sandbox.

## Installation

```bash
npm install @joai/warps-vm-browser
```

## Usage

```typescript
import { createBrowserTransformRunner } from '@joai/warps-vm-browser'
import { WarpClient } from '@joai/warps'

const config = {
  env: 'mainnet',
  transform: {
    runner: createBrowserTransformRunner(),
  },
  // ... rest of config
}

const client = new WarpClient(config, { chains: [...] })
```

## Features

- Safe code execution in Web Workers
- Sandboxed environment
- Supports arrow functions, regular functions, and expressions
- Error handling and isolation

## How It Works

The browser VM uses Web Workers to execute transformation code in isolation, preventing access to the main thread's context and ensuring security.

## Example Transformation

```typescript
// Warp output transformation
const transform = (results) => {
  return {
    value: results.amount * 2,
    formatted: `$${results.amount.toFixed(2)}`
  }
}
```
npm package: @joai/warps-vm-node
Description: Node.js VM runtime for Warps SDK output transformations. Safely executes transformation code using vm2 in a sandboxed environment.
Latest version: 1.0.3

# @joai/warps-vm-node

Node.js VM runtime for Warps SDK output transformations. Safely executes transformation code using vm2 in a sandboxed environment.

## Installation

```bash
npm install @joai/warps-vm-node
```

**Note:** This package requires `vm2` as an optional dependency. Install it separately:

```bash
npm install vm2
```

## Usage

```typescript
import { createNodeTransformRunner } from '@joai/warps-vm-node'
import { WarpClient } from '@joai/warps'

const config = {
  env: 'mainnet',
  transform: {
    runner: createNodeTransformRunner(),
  },
  // ... rest of config
}

const client = new WarpClient(config, { chains: [...] })
```

## Features

- Safe code execution using vm2
- Sandboxed environment
- Supports arrow functions, regular functions, and expressions
- Error handling and timeout protection

## How It Works

The Node.js VM uses vm2 to execute transformation code in an isolated sandbox, preventing access to Node.js globals and ensuring security.

## Example Transformation

```typescript
// Warp output transformation
const transform = (results) => {
  return {
    value: results.amount * 2,
    formatted: `$${results.amount.toFixed(2)}`
  }
}
```

## Security

The vm2 sandbox provides isolation from the Node.js runtime, preventing unauthorized access to system resources.
npm package: @joai/warps-wallet-gaupa
Description: Gaupa wallet provider for multiple chains
Latest version: 1.1.0

# @joai/warps-wallet-gaupa

Gaupa wallet provider for Warps SDK. This package enables you to use Gaupa agentic wallets with the Warps SDK.

## Installation

```bash
npm install @joai/warps-wallet-gaupa
```

## Prerequisites

- `@joai/warps` core package installed
- Appropriate chain adapter package(s) for your target blockchain(s)
- Gaupa API credentials (API key and public key)

## Usage

```typescript
import { createGaupaWalletProvider } from '@joai/warps-wallet-gaupa'
import { WarpClient } from '@joai/warps'
import { getAllChainAdapters } from '@joai/warps-adapter-<chain>'

const config = {
  env: 'devnet', // or 'mainnet'
  walletProviders: {
    <chain>: {
      gaupa: createGaupaWalletProvider({
        apiKey: 'your-api-key',
        publicKey: 'your-public-key',
      }),
    },
  },
}

const client = new WarpClient(config, {
  chains: getAllChainAdapters(),
})
```

## API

### `GaupaWalletProvider`

Implements the `WalletProvider` interface from `@joai/warps`.

**Methods:**

- `getAddress(): Promise<string | null>` - Get the wallet address from configuration
- `getPublicKey(): Promise<string | null>` - Derive public key from the wallet address
- `signTransaction(tx: Transaction): Promise<Transaction>` - Sign a transaction using the Gaupa API's `sign-agentic-message` endpoint. The transaction is serialized as JSON and signed as a message.
- `signMessage(message: string): Promise<string>` - Sign a message using the Gaupa API
- `generate(): Promise<WarpWalletDetails>` - Create a new agentic wallet via the Gaupa API

**Unsupported Methods:**

- `importFromMnemonic()` - Not supported. Use `generate()` to create wallets via Gaupa API.
- `importFromPrivateKey()` - Not supported. Use `generate()` to create wallets via Gaupa API.
- `export()` - Not supported. Private keys are managed by Gaupa and cannot be exported.

## How It Works

1. **API Configuration**: The API URL is automatically configured based on the environment:
   - `devnet`: `https://devnet-login.gaupa.xyz/api`
   - `mainnet` or other: `https://login.gaupa.xyz/api`

2. **Wallet Creation**: Use `generate()` to create a new agentic wallet via the Gaupa API. The wallet address is stored in your Warps configuration.

3. **Transaction Signing**: When signing a transaction, the provider:
   - Serializes the transaction data as JSON
   - Calls the Gaupa API's `sign-agentic-message` endpoint with the serialized transaction
   - Converts the returned hex signature to a `Uint8Array` and applies it to the transaction

4. **Message Signing**: Messages are signed directly via the `sign-agentic-message` endpoint.

## Configuration

The wallet configuration is stored in your Warps config under `user.wallets.<chain>`:

```json
{
  "provider": "gaupa",
  "address": "erd1..."
}
```

The address is set automatically when you call `generate()` or can be configured manually.
npm package: @joai/warps-wallet-remote
Description: Generic remote wallet provider for signer services
Latest version: 1.2.0

# @joai/warps-wallet-remote

Generic remote wallet provider package for Warps SDK.

This package is intentionally backend-agnostic. It supports any remote signer service by configuration.

## Installation

```bash
npm install @joai/warps-wallet-remote
```

## Usage

```ts
import { WarpClient, WarpChainName } from '@joai/warps'
import { createRemoteWalletProvider } from '@joai/warps-wallet-remote'

const providerKey = 'myRemoteSigner'

const client = new WarpClient({
  env: 'devnet',
  user: {
    id: 'agent-1',
    wallets: {
      [WarpChainName.Ethereum]: {
        provider: providerKey,
        address: '0x...',
        externalId: 'wallet-1',
      },
    },
  },
  walletProviders: {
    [WarpChainName.Ethereum]: {
      [providerKey]: createRemoteWalletProvider(
        {
          baseUrl: 'https://signer.example',
          providerName: providerKey,
          serviceToken: process.env.SIGNER_SERVICE_TOKEN,
          getAccessToken: async ({ walletId, chain, nonce }) => {
            return await issueSignerToken({ walletId, chain, nonce })
          },
        },
        providerKey
      ),
    },
  },
})
```

Register the provider under the same key you store on the wallet config.
If you use a custom provider key, pass it as `providerName` or the helper fallback so generated/imported wallets persist the correct provider.

## Default Endpoints

- `POST /v1/wallets/generate`
- `POST /v1/wallets/import`
- `POST /v1/wallets/export`
- `POST /v1/wallets/delete`
- `POST /v1/sign/transaction`
- `POST /v1/sign/message`

Override with `endpoints` when your signer API differs.

## Advanced Customization

- `headers`: static request headers
- `getHeaders(context)`: per-operation dynamic headers
- `transformPayload(context, payload)`: mutate payloads before sending

These hooks allow integrating heterogeneous signer APIs without modifying SDK internals.

## Security Defaults

- HTTPS required by default (`allowInsecureHttp` only for explicit local/dev use)
- Relative endpoint paths only (prevents endpoint host override/SSRF)
- Strict token validation (non-empty service/access token)
- Request timeout (default `15000ms`)
npm package: @joakimbeng/es6x
Description: Implementation of jsx features in pure javascript
Author: Vasiliy Lector
Latest version: 2.1.0

# @joakimbeng/es6x

**NOTE:** This is a fork of [vasiliy-lector/es6x](https://github.com/vasiliy-lector/es6x) with these differences:

- `"..."` is needed to mimic object spread of attributes, i.e. `` jsx`<div ...${attrs}></div>` `` instead of `` jsx`<div ${attrs}></div>` ``
- this package supports dashes, underscores and \$ in both tag names and attributes

Implementation of jsx features in pure javascript without the need to transpile.

## Why do you need it?

The specification es2015 introduces a new feature called [tagged template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals).
Support of this feature now [close to 100%](https://kangax.github.io/compat-table/es6/#test-template_literals).
This standard allow for javascript expressions to be embedded within literal strings. This conception is very close to philosophy of jsx.
And you can write code for react and other virtual dom frameworks using template literals instead of jsx.
This library is very useful if you are not transpiling code in development environment.
Excluding transpilation can speed up development and simplify debugging without dealing with source maps.
The library is very tiny. Only 2kB minified and gzipped. The library support caching on the first execution.
More information you can find in [introduction article](https://medium.com/@vasiliy_lector/is-there-an-alternative-to-jsx-31a1fae6e08a).

## Install and usage

```bash
npm install es6x
```

Create file:

```javascript
// file jsx.js
import jsx from 'es6x';
import React from 'react';
jsx.setOutputMethod(React.createElement);
export default jsx;
```

Inside any other file:

```javascript
// file FormController.js
import {Component} from 'react';
import jsx from '../../jsx';
import Input from '../../input/Input';
import Form from '../../form/Form';

const value = 'some';
const props = {
  id: 'id1',
  style: {
    paddingLeft: 10
  }
};

export default class FormController extends Component {
  handleSubmit = () => {};

  render() {
    return jsx`<${Form} onSubmit=${this.handleSubmit}>
            <${Input}
                checked
                className='input'
                value=${value}
                ...${props}
            />
        </${Form}>`;
  }
}
```

The render method body is equal to this jsx code:

```javascript
return (
  <Form onSubmit={this.handleSubmit}>
    <Input checked className="input" value={value} {...props} />
  </Form>
);
```

If you use hyperscript or any other virtual dom library:

```javascript
// file jsx.js
import jsx from 'es6x';
import h from 'virtual-dom/h';
jsx.setOutputMethod(h);
export default jsx;
```
npm package: @joakimbeng/rss-feed-emitter
Description: Super RSS News Feed aggregator written in Node.js and ES6
Author: Filipe Deschamps
Latest version: 1.0.4

<p align="center">
  <img src="https://raw.githubusercontent.com/filipedeschamps/rss-feed-emitter/master/content/logo.gif">
</p>

<h1 align="center">RSS Feed Emitter</h1>

<p align="center">
  <a href="https://travis-ci.org/filipedeschamps/rss-feed-emitter">
    <img src="https://travis-ci.org/filipedeschamps/rss-feed-emitter.svg?branch=master">
  </a>
  <a href="https://codeclimate.com/github/filipedeschamps/rss-feed-emitter/coverage">
    <img src="https://codeclimate.com/github/filipedeschamps/rss-feed-emitter/badges/coverage.svg">
  </a>
  <a href="https://www.npmjs.com/package/rss-feed-emitter">
    <img src="https://badge.fury.io/js/rss-feed-emitter.svg">
  </a>
</p>

<p align="center">
  Track tons of feeds and receive events for every new item published with this super RSS News Feed aggregator.
</p>


## Tutorial

This is a fully functional module, but its source code and repository are also a **super complete tutorial**, covering:

 1. What to do first when creating a module from scratch
 2. How to manage your module in Github and npm
 3. How to transpile your ES6 code into ES5
 4. How to create automated unit and integration tests
 5. How to integrate them with Travis CI and make the build break if tests didn't pass
 6. How to automatically test your module against various versions of Node.js
 7. How to setup a code coverage tool and keep 100% coverage
 8. How to integrate the coverage results with Code Climate
 9. How to configure linting tools to make your code base consistent
 10. How to deploy to Github and npm with tags and releases

If you're afraid to read the source code of the modules you use or to create your first module, this is the best chance you have to break this barrier :)

**[Start here](https://github.com/filipedeschamps/rss-feed-emitter/issues/119)**


## Features

 * Supports Node.js `0.10.x`, `0.12.x`, `4.x`, `5.x`, and `@stable`
 * 100% code coverage with unit and integration tests
 * Simple interface
 * Automatically manages feed history memory
 * Written in ES6


## Usage


### Install

```
$ npm install rss-feed-emitter
```


### Creating an instance

``` js
let RssFeedEmitter = require('rss-feed-emitter');
let feeder = new RssFeedEmitter();
```

#### Changing the user agent for requests

``` js
let feeder = new RssFeedEmitter({ userAgent: 'Your UA string' });
```
> The default user agent is this package's repository url

### Adding feeds

``` js
feeder.add({
  url: 'http://www.nintendolife.com/feeds/news',
  refresh: 2000
});
```

> Default refresh value is 60 seconds


### Listening to new items

``` js
feeder.on('new-item', function(item) {
  console.log(item);
})
```


### Listing all feeds in the instance
``` js
feeder.list();
```


### Removing a single feed

``` js
feeder.remove('http://www.nintendolife.com/feeds/news');
```


### Destroying feed instance

``` js
feeder.destroy();
```
> This will remove all feeds from the instance
npm package: @joakimbugge/mikroorm-seeder
Description: Decorator-based seeder library for MikroORM
Latest version: 0.4.0

# mikroorm-seeder

Decorator-based entity seeding for MikroORM. Annotate your entity properties with `@Seed()`, then create or persist fully populated entity graphs with a single function call — including relations, embedded types, and circular guards.

[![CI](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml/badge.svg)](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/joakimbugge/seeders/branch/main/graph/badge.svg)](https://codecov.io/gh/joakimbugge/seeders)

Coded by AI. Reviewed by humans.

📖 **[Full documentation](https://joakimbugge.github.io/seeders/mikroorm/)** · [API reference](https://joakimbugge.github.io/seeders/api/mikroorm-seeder/)

---

## Installation

`@mikro-orm/core` and `reflect-metadata` are peer dependencies.

```bash
# npm
npm install @joakimbugge/mikroorm-seeder @mikro-orm/core reflect-metadata

# yarn
yarn add @joakimbugge/mikroorm-seeder @mikro-orm/core reflect-metadata

# pnpm
pnpm add @joakimbugge/mikroorm-seeder @mikro-orm/core reflect-metadata
```

Enable legacy decorators in your `tsconfig.json`:

```json
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}
```

> **Note:** Only legacy decorators are supported. ES decorators (TC39) are not currently supported.

## Quick example

Annotate entity properties with `@Seed()`, organize seeders into `@Seeder` classes, and run them with `runSeeders`:

```ts
import { Entity, PrimaryKey, Property, OneToMany } from '@mikro-orm/decorators/legacy'
import { faker } from '@faker-js/faker'
import { Seed, Seeder, runSeeders, seed } from '@joakimbugge/mikroorm-seeder'
import type { SeederInterface, SeedContext } from '@joakimbugge/mikroorm-seeder'

@Entity()
class Author {
  @PrimaryKey()
  id!: number

  @Seed(() => faker.person.fullName())
  @Property()
  name!: string

  @Seed({ count: 3 })
  @OneToMany(() => Book, (b) => b.author)
  books!: Book[]
}

@Seeder()
class AuthorSeeder implements SeederInterface {
  async run(ctx: SeedContext) {
    await seed(Author).saveMany(10, ctx)
  }
}

await runSeeders([AuthorSeeder], { em })
```

## License

MIT
npm package: @joakimbugge/nest-mikroorm-seeder
Description: NestJS module for @joakimbugge/mikroorm-seeder
Latest version: 0.2.0

# nest-mikroorm-seeder

NestJS module for [mikroorm-seeder](../mikroorm-seeder). Runs your `@Seeder` classes automatically on application bootstrap — once per seeder by default, tracked in a database table so watch-mode restarts do not re-seed.

[![CI](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml/badge.svg)](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/joakimbugge/seeders/branch/main/graph/badge.svg)](https://codecov.io/gh/joakimbugge/seeders)

Coded by AI. Reviewed by humans.

📖 **[Full documentation](https://joakimbugge.github.io/seeders/nest-mikroorm/)** · [API reference](https://joakimbugge.github.io/seeders/api/nest-mikroorm-seeder/)

---

## Installation

```bash
# npm
npm install @joakimbugge/nest-mikroorm-seeder @joakimbugge/mikroorm-seeder

# yarn
yarn add @joakimbugge/nest-mikroorm-seeder @joakimbugge/mikroorm-seeder

# pnpm
pnpm add @joakimbugge/nest-mikroorm-seeder @joakimbugge/mikroorm-seeder
```

The peer dependencies (`@nestjs/common`, `@nestjs/core`, `@mikro-orm/core`, `@mikro-orm/nestjs`, `reflect-metadata`) are required, but if you are adding this to an existing NestJS + MikroORM project they are already present.

## Quick example

Import `SeederModule` in your root module. It auto-detects the `MikroORM` instance registered by `MikroOrmModule`:

```ts
import { Module } from '@nestjs/common'
import { MikroOrmModule } from '@mikro-orm/nestjs'
import { SeederModule } from '@joakimbugge/nest-mikroorm-seeder'
import { UserSeeder } from './seeders/UserSeeder.js'

@Module({
  imports: [
    MikroOrmModule.forRoot({ ... }),
    SeederModule.forRoot({ seeders: [UserSeeder] }),
  ],
})
export class AppModule {}
```

## License

MIT
npm package: @joakimbugge/nest-typeorm-seeder
Description: NestJS module for @joakimbugge/typeorm-seeder
Latest version: 0.8.0

# nest-typeorm-seeder

NestJS module for [typeorm-seeder](../typeorm-seeder). Runs your `@Seeder` classes automatically on application bootstrap — once per seeder by default, tracked in a database table so watch-mode restarts do not re-seed.

[![CI](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml/badge.svg)](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/joakimbugge/seeders/branch/main/graph/badge.svg)](https://codecov.io/gh/joakimbugge/seeders)

Coded by AI. Reviewed by humans.

📖 **[Full documentation](https://joakimbugge.github.io/seeders/nest/)** · [API reference](https://joakimbugge.github.io/seeders/api/nest-typeorm-seeder/)

---

## Installation

```bash
# npm
npm install @joakimbugge/nest-typeorm-seeder @joakimbugge/typeorm-seeder

# yarn
yarn add @joakimbugge/nest-typeorm-seeder @joakimbugge/typeorm-seeder

# pnpm
pnpm add @joakimbugge/nest-typeorm-seeder @joakimbugge/typeorm-seeder
```

The peer dependencies (`@nestjs/common`, `@nestjs/core`, `typeorm`, `reflect-metadata`) are required, but if you are adding this to an existing NestJS + TypeORM project they are already present.

## Quick example

Import `SeederModule` in your root module. It auto-detects the `DataSource` registered by `TypeOrmModule`:

```ts
import { Module } from '@nestjs/common'
import { TypeOrmModule } from '@nestjs/typeorm'
import { SeederModule } from '@joakimbugge/nest-typeorm-seeder'
import { UserSeeder } from './seeders/UserSeeder.js'

@Module({
  imports: [
    TypeOrmModule.forRoot({ ... }),
    SeederModule.forRoot({ seeders: [UserSeeder] }),
  ],
})
export class AppModule {}
```

## License

MIT
npm package: @joakimbugge/seeder
Description: ORM-agnostic decorator-based entity seeding
Latest version: 0.2.0

# seeder

ORM-agnostic foundation for decorator-based entity seeding. This is the core package that `typeorm-seeder` and `mikroorm-seeder` are built on.

**If you are using TypeORM or MikroORM, install the ORM-specific package instead** — you do not need this package directly.

📖 **[Full documentation](https://joakimbugge.github.io/seeders/seeder/)** · [API reference](https://joakimbugge.github.io/seeders/api/seeder/)

---

## When to use this package

Install `@joakimbugge/seeder` directly when you want to build seeder support for a data layer that is not TypeORM or MikroORM. It provides the `@Seed` decorator, the full creation and persistence pipeline, and two adapter interfaces for plugging in your ORM.

## Installation

```bash
# npm
npm install @joakimbugge/seeder

# yarn
yarn add @joakimbugge/seeder

# pnpm
pnpm add @joakimbugge/seeder
```

## Quick example

Implement `MetadataAdapter` and `PersistenceAdapter`, then wire them into a `seed()` function:

```ts
import {
  makeSeedBuilder,
  Seed,
} from '@joakimbugge/seeder'
import type {
  MetadataAdapter,
  PersistenceAdapter,
  EntityConstructor,
  EntityInstance,
  SeedContext,
} from '@joakimbugge/seeder'

const metadataAdapter: MetadataAdapter = {
  getEmbeddeds: () => [],
  getRelations: () => [],
}

interface MyContext extends SeedContext {
  db: MyDatabaseConnection
}

const persistenceAdapter: PersistenceAdapter<MyContext> = {
  async save(_EntityClass, entities, { db }) {
    return db.insertAll(entities)
  },
}

export function seed<T extends EntityInstance>(EntityClass: EntityConstructor<T>) {
  return makeSeedBuilder(EntityClass, metadataAdapter, persistenceAdapter)
}
```

Then annotate entities and seed as usual:

```ts
import { faker } from '@faker-js/faker'

class User {
  @Seed(() => faker.person.fullName())
  name!: string
}

const user = await seed(User).create()
// user.name → seeded full name

await seed(User).save({ db })
// persisted via your adapter
```

## License

MIT
npm package: @joakimbugge/typeorm-seeder
Description: Decorator-based seeder library for TypeORM
Latest version: 0.10.0

# typeorm-seeder

Decorator-based entity seeding for TypeORM. Annotate your entity properties with `@Seed()`, then create or persist fully populated entity graphs with a single function call — including relations, embedded types, and circular guards.

[![CI](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml/badge.svg)](https://github.com/joakimbugge/seeders/actions/workflows/ci.yml)
[![Coverage](https://codecov.io/gh/joakimbugge/seeders/branch/main/graph/badge.svg)](https://codecov.io/gh/joakimbugge/seeders)

Coded by AI. Reviewed by humans.

📖 **[Full documentation](https://joakimbugge.github.io/seeders/)** · [API reference](https://joakimbugge.github.io/seeders/api/typeorm-seeder/)

---

## Installation

`typeorm` and `reflect-metadata` are peer dependencies.

```bash
# npm
npm install @joakimbugge/typeorm-seeder typeorm reflect-metadata

# yarn
yarn add @joakimbugge/typeorm-seeder typeorm reflect-metadata

# pnpm
pnpm add @joakimbugge/typeorm-seeder typeorm reflect-metadata
```

Verify these are enabled in your `tsconfig.json`:

```json
{
  "compilerOptions": {
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true
  }
}
```

## Quick example

Annotate entity properties with `@Seed()`, organize seeders into `@Seeder` classes, and run them with `runSeeders`:

```ts
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm'
import { faker } from '@faker-js/faker'
import { Seed, Seeder, runSeeders, seed } from '@joakimbugge/typeorm-seeder'
import type { SeederInterface, SeedContext } from '@joakimbugge/typeorm-seeder'

@Entity()
class Author {
  @PrimaryGeneratedColumn()
  id!: number

  @Seed(() => faker.person.fullName())
  @Column()
  name!: string

  @Seed({ count: 3 })
  @OneToMany(() => Book, (b) => b.author)
  books!: Book[]
}

@Seeder()
class AuthorSeeder implements SeederInterface {
  async run(ctx: SeedContext) {
    await seed(Author).saveMany(10, ctx)
  }
}

await runSeeders([AuthorSeeder], { dataSource })
```

## License

MIT
npm package: @joakimstai/dataflow
Description: A tiny reactive dataflow library for scheduling a DAG of async functions.
Author: Joakim Stai
Latest version: 0.1.0

# Dataflow

Based on [tiny-reactive-dataflow](https://github.com/lukehutch/tiny-reactive-dataflow), which was inspired by [topologica](https://github.com/datavis-tech/topologica). For now, see [tiny-reactive-dataflow](https://github.com/lukehutch/tiny-reactive-dataflow) for a thorough explanation on how it works.

This is a work in progress. Roadmap:

- [ ] Tests
- [ ] Benchmarks
- [ ] Documentation file
- [ ] Support redefinition of functions?


## Examples

### Create dataflow

```ts
const dataflow = new Dataflow({ out: (x, y) => x + y })
```

```ts
const dataflow = new Dataflow()
dataflow.define({ out: (x, y) => x + y })
```

`define` is the same as `register` in [tiny-reactive-dataflow](https://github.com/lukehutch/tiny-reactive-dataflow).

### Set values

```ts
await dataflow.set({ x: 1, y: 2 });
```

### Get values

```ts
await dataflow.get('out') // 3
```

To access all resulting values:

```ts
dataflow.values // { x: 1, y: 2, out: 3 }
```
npm package: @joakimunge/array-nth-last
Description: Tiny library to get last, or nth last entry in array
Author: Joakim Unge
Latest version: 0.2.0
Deprecated: duplicate package

# array-last

Tiny function to get _n_ last entry from array

## Install

```
$ yarn add array-last
```

## Usage

```javascript
const last = require('array-nth-last');

const arr = [1, 2, 3, 4, 5];

last(arr); // => 5
last(arr, 3); // => 2
```

## API

---

### last(array, n?)

Returns the _nth_ last entry from the array

#### array

Type: `Array`

The array from which to get the _nth_ entry

#### n? _optional_

Type: `number`

The desired entry of the array to return