open-index/open-npm huggingface dataset:
npm package: @jerni/core
Description: Event sourcing library for JavaScript/TypeScript applications.
Latest version: 1.0.0

# Jerni

Event sourcing library for JavaScript/TypeScript applications.

## Installation

```bash
# From JSR (recommended)
bunx jsr add @jerni/jerni-3

# From npm
npm install @jerni/jerni-3
```

## Usage

```typescript
import { createJourney } from '@jerni/jerni-3';

// Create a journey with MongoDB store
const journey = createJourney({
  // Configuration options...
});

// Start the journey
await journey.start();

// Subscribe to events
journey.subscribe(async (event) => {
  // Handle events
});

// Clean up
await journey.stop();
```

## CLI Usage

The package includes a CLI tool for running jerni:

```bash
# If installed from npm
npx jerni <journey-file>

# If installed from JSR, use the binary download flow
bunx jsr-exec @jerni/jerni-3 start-jerni <journey-file>
```

## PUBLISHING

1. First, create a new local branch prefixed with `release/` followed by the version you want to publish. E.g. `release/v0.10.4` to publish v0.10.4.
2. Secondly, you need to bump the version in both `jsr.json` and `package.json`. There are scripts to help with this:

   - `bun run bump-patch`: run this to bump the patch version.
   - `bun run bump-minor`: run this to bump the minor version.
   - `bun run bump-major`: run this to bump the major version.

3. Once the version is bumped, create a PR and get it merged. CI/CD will automatically build the package and publish it to both JSR and npm.

## License

MIT
npm package: @jerni/jerni-3
Description: Event sourcing library for JavaScript/TypeScript applications.
Latest version: 1.0.2

# Jerni

Event sourcing library for JavaScript/TypeScript applications.

## Installation

```bash
# From JSR (recommended)
bunx jsr add @jerni/jerni-3

# From npm
npm install @jerni/jerni-3
```

## Usage

```typescript
import { createJourney } from '@jerni/jerni-3';

// Create a journey with MongoDB store
const journey = createJourney({
  // Configuration options...
});

// Start the journey
await journey.start();

// Subscribe to events
journey.subscribe(async (event) => {
  // Handle events
});

// Clean up
await journey.stop();
```

## CLI Usage

The package includes a CLI tool for running jerni:

```bash
# If installed from npm
npx jerni <journey-file>

# If installed from JSR, use the binary download flow
bunx jsr-exec @jerni/jerni-3 start-jerni <journey-file>
```

## PUBLISHING

1. First, create a new local branch prefixed with `release/` followed by the version you want to publish. E.g. `release/v0.10.4` to publish v0.10.4.
2. Secondly, you need to bump the version in both `jsr.json` and `package.json`. There are scripts to help with this:

   - `bun run bump-patch`: run this to bump the patch version.
   - `bun run bump-minor`: run this to bump the minor version.
   - `bun run bump-major`: run this to bump the major version.

3. Once the version is bumped, create a PR and get it merged. CI/CD will automatically build the package and publish it to both JSR and npm.

## License

MIT
npm package: @jerni/next-dev
Description: A Webpack plugin for Next.js projects to enable Jerni development mode.
Latest version: 1.0.1

# jerni-next-dev-plugin

A Webpack plugin for Next.js projects to enable Jerni development mode.

This plugin swaps [jerni-3](https://github.com/tungv/jerni-3) in dev mode with a bundled version for faster development.

## Installation

// TODO

## Usage

1. Create a `next.config.mjs` file in your project root (if you don't already have one).

2. Import the `withJerniNextDev` function from `jerni-next-dev-plugin` and wrap your Next.js config with it:

```js
// next.config.mjs
import withJerniNextDev from "jerni-next-dev-plugin";
const nextConfig = {
  // Your existing Next.js config...
};
export default withJerniNextDev(nextConfig, {
  initializerPath: "./path/to/your/jerni/initializer",
  eventsFile: "./path/to/your/events.yaml",
});
```

3. The plugin will automatically enable Jerni development mode in your Next.js development server.

## Configuration

The `withJerniNextDev` function accepts two arguments:

- `nextConfig`: Your existing Next.js configuration object.
- `options`: An object with the following properties:
  - `initializerPath`: The path to your Jerni initializer file.
  - `eventsFile`: The path to your Jerni events markdown file.

## How It Works

The `jerni-next-dev-plugin` does the following:

- Aliases the `@jerni/jerni-3` package to use the development version bundled with this plugin.
- Defines global variables for the paths to your Jerni events file and SQLite database.
- Applies a custom webpack plugin to enable hot reloading of Jerni when the initializer or events file changes.
- Automatically cleans and restarts Jerni when necessary to keep it in sync with your code changes.