open-index/open-npm huggingface dataset:
npm package: @saga-bus/test
Description: Testing utilities for saga-bus applications
Latest version: 0.2.2

# @saga-bus/test

Testing utilities for saga-bus applications.

## Installation

```bash
pnpm add -D @saga-bus/test
```

## Usage

```typescript
import { TestHarness } from "@saga-bus/test";
import { orderSaga } from "./sagas/OrderSaga";

describe("OrderSaga", () => {
  let harness: TestHarness;

  beforeEach(async () => {
    harness = await TestHarness.create({
      sagas: [orderSaga],
    });
  });

  afterEach(async () => {
    await harness.stop();
  });

  it("should process order", async () => {
    // Publish a message
    await harness.publish({
      type: "OrderSubmitted",
      orderId: "123",
    });

    // Wait for processing
    await harness.waitForIdle();

    // Check saga state
    const state = await harness.getSagaState("OrderSaga", "123");
    expect(state.status).toBe("pending");

    // Check published messages
    const messages = harness.getPublishedMessages();
    expect(messages).toContainEqual(
      expect.objectContaining({ type: "PaymentRequested" })
    );
  });
});
```

## API

### `TestHarness.create(options)`

Create a test harness with given sagas.

### `harness.publish(message)`

Publish a message to the bus.

### `harness.waitForIdle()`

Wait for all messages to be processed.

### `harness.getSagaState(sagaName, correlationId)`

Get the current state of a saga instance.

### `harness.getPublishedMessages()`

Get all messages published by handlers.

### `harness.stop()`

Clean up resources.

## License

MIT
npm package: @saga-bus/transport-inmemory
Description: In-memory transport for saga-bus testing and development
Latest version: 0.2.2

# @saga-bus/transport-inmemory

In-memory transport implementation for testing and development.

## Installation

```bash
pnpm add @saga-bus/transport-inmemory
```

## Usage

```typescript
import { InMemoryTransport } from "@saga-bus/transport-inmemory";
import { createBus } from "@saga-bus/core";

const transport = new InMemoryTransport({
  defaultConcurrency: 10,
});

const bus = createBus({
  transport,
  sagas: [...],
});
```

## Features

- Zero external dependencies
- Configurable concurrency via semaphore
- Synchronous message delivery (great for tests)
- No network overhead

## Configuration

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `defaultConcurrency` | `number` | `10` | Max concurrent handlers |

## When to Use

**Use for:**
- Unit and integration tests
- Local development
- Prototyping and demos

**Do not use for:**
- Production deployments
- Distributed systems
- Multi-process applications

## Testing Tips

The in-memory transport processes messages synchronously within the same process, making it ideal for testing:

```typescript
import { TestHarness } from "@saga-bus/test";
import { InMemoryTransport } from "@saga-bus/transport-inmemory";

// TestHarness uses InMemoryTransport internally
const harness = await TestHarness.create({
  sagas: [{ definition: mySaga, store }],
});

// Messages are processed immediately
await harness.publish({ type: "OrderSubmitted", orderId: "123" });
await harness.waitForIdle();

// State is immediately available
const state = await harness.getSagaState("OrderSaga", "123");
```

## Limitations

- **Single process only**: Messages are not shared between processes
- **No persistence**: Messages are lost if not consumed
- **No ordering guarantees**: Unlike production transports with FIFO support

For production, use [@saga-bus/transport-rabbitmq](../transport-rabbitmq), [@saga-bus/transport-sqs](../transport-sqs), or [@saga-bus/transport-kafka](../transport-kafka).

## License

MIT
npm package: @saga-bus/transport-kafka
Description: Kafka transport for saga-bus
Latest version: 0.2.2

# @saga-bus/transport-kafka

Apache Kafka transport for saga-bus using KafkaJS.

## Installation

```bash
pnpm add @saga-bus/transport-kafka kafkajs
```

## Usage

```typescript
import { Kafka } from "kafkajs";
import { KafkaTransport } from "@saga-bus/transport-kafka";
import { createBus } from "@saga-bus/core";

const kafka = new Kafka({
  clientId: "my-app",
  brokers: ["localhost:9092"],
});

const transport = new KafkaTransport({
  kafka,
  groupId: "my-consumer-group",
  defaultTopic: "saga-events",
});

const bus = createBus({
  transport,
  sagas: [...],
});

await bus.start();
```

## Features

- Topic-based message routing
- Consumer group coordination
- Automatic topic creation (optional)
- Configurable partitions and replication
- Message key routing via correlation ID
- Offset management

## Message Format

Messages are published with:

| Field | Value |
|-------|-------|
| `key` | Correlation ID (for partition affinity) |
| `value` | JSON-serialized message envelope |
| `headers.type` | Message type |
| `headers.correlationId` | Correlation ID |
| `headers.messageId` | Unique message ID |

## Configuration

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `kafka` | `Kafka` | required | KafkaJS instance |
| `defaultTopic` | `string` | - | Default topic |
| `groupId` | `string` | - | Consumer group ID |
| `createTopics` | `boolean` | `false` | Auto-create topics |
| `numPartitions` | `number` | `3` | Partitions for new topics |
| `replicationFactor` | `number` | `1` | Replication factor |
| `fromBeginning` | `boolean` | `false` | Start from earliest |
| `sessionTimeout` | `number` | `30000` | Session timeout (ms) |
| `heartbeatInterval` | `number` | `3000` | Heartbeat interval (ms) |

## Topic Routing

Override the default topic per-publish:

```typescript
await bus.publish(
  { type: "OrderCreated", payload: { orderId: "123" } },
  { endpoint: "orders-topic" }
);
```

## Partition Affinity

Messages with the same correlation ID are routed to the same partition, ensuring ordered processing per saga instance.

## License

MIT
npm package: @saga-bus/transport-rabbitmq
Description: RabbitMQ transport for saga-bus production deployments
Latest version: 0.2.2

# @saga-bus/transport-rabbitmq

RabbitMQ transport for production saga-bus deployments.

## Installation

```bash
pnpm add @saga-bus/transport-rabbitmq amqplib
```

## Usage

```typescript
import { RabbitMqTransport } from "@saga-bus/transport-rabbitmq";
import { createBus } from "@saga-bus/core";

const transport = new RabbitMqTransport({
  uri: "amqp://guest:guest@localhost:5672",
  exchange: "saga-bus",
  exchangeType: "topic",
  durable: true,
});

const bus = createBus({
  transport,
  sagas: [...],
});

await bus.start();
```

## Features

- Automatic reconnection with exponential backoff
- Topic exchange routing
- Prefetch-based concurrency control
- Durable queues and messages by default
- Queue prefix for multi-tenant setups

## Configuration

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `uri` | `string` | required | AMQP connection URL |
| `exchange` | `string` | required | Exchange name |
| `exchangeType` | `string` | `"topic"` | Exchange type |
| `durable` | `boolean` | `true` | Durable exchanges/queues |
| `queuePrefix` | `string` | `""` | Queue name prefix |
| `reconnect.maxAttempts` | `number` | `10` | Max reconnect attempts |
| `reconnect.initialDelayMs` | `number` | `1000` | Initial retry delay |
| `reconnect.maxDelayMs` | `number` | `30000` | Max retry delay |

## License

MIT
npm package: @saga-bus/transport-sqs
Description: AWS SQS transport for saga-bus
Latest version: 0.2.2

# @saga-bus/transport-sqs

AWS SQS FIFO transport for saga-bus.

## Installation

```bash
pnpm add @saga-bus/transport-sqs @aws-sdk/client-sqs
```

## Usage

```typescript
import { SQSClient } from "@aws-sdk/client-sqs";
import { SqsTransport } from "@saga-bus/transport-sqs";
import { createBus } from "@saga-bus/core";

const sqsClient = new SQSClient({ region: "us-east-1" });

const transport = new SqsTransport({
  client: sqsClient,
  queueUrl: "https://sqs.us-east-1.amazonaws.com/123456789/my-queue.fifo",
});

const bus = createBus({
  transport,
  sagas: [...],
});

await bus.start();
```

## Features

- FIFO queue support for ordered message processing
- Message deduplication via MessageDeduplicationId
- Message grouping via MessageGroupId (uses correlation ID)
- Long polling for efficient message retrieval
- Configurable visibility timeout
- Concurrent poll loops

## FIFO Queue Requirements

This transport requires a FIFO queue (queue URL must end with `.fifo`):

```bash
aws sqs create-queue \
  --queue-name my-queue.fifo \
  --attributes FifoQueue=true,ContentBasedDeduplication=false
```

## Message Attributes

Messages are published with:

| Attribute | Value |
|-----------|-------|
| `MessageGroupId` | Correlation ID or message ID |
| `MessageDeduplicationId` | Message ID |
| `MessageAttributes.type` | Message type |
| `MessageAttributes.correlationId` | Correlation ID |

## Configuration

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `client` | `SQSClient` | required | AWS SQS client |
| `queueUrl` | `string` | required | FIFO queue URL |
| `maxMessages` | `number` | `10` | Messages per poll |
| `waitTimeSeconds` | `number` | `20` | Long poll wait time |
| `visibilityTimeout` | `number` | `30` | Visibility timeout (seconds) |
| `concurrency` | `number` | `1` | Concurrent poll loops |

## Error Handling

Failed messages remain in the queue after visibility timeout expires. Configure a dead-letter queue (DLQ) for messages that repeatedly fail:

```bash
aws sqs set-queue-attributes \
  --queue-url https://sqs.../my-queue.fifo \
  --attributes RedrivePolicy='{"deadLetterTargetArn":"arn:aws:sqs:...:dlq.fifo","maxReceiveCount":"3"}'
```

## License

MIT
npm package: @sagacious/template-vue
Description: ![logo](https://sagacious-1300640815.cos.ap-beijing.myqcloud.com/Donkey_128px_1082061_easyicon.net.ico)
Author: SagaciousLittle
Latest version: 0.1.3

# @sagacious/template-vue

![logo](https://sagacious-1300640815.cos.ap-beijing.myqcloud.com/Donkey_128px_1082061_easyicon.net.ico)

**🐴 a universal customized vue project template.**

## Features

### The following environments are pre-integrated

- axios
- more...

### Eslint fix is enabled by default

### Reset style with normalize.css

## Related

- [@sagacious/cli](https://www.npmjs.com/package/@sagacious/cli) 🐎 a universal template management tool
- [eslint-config-sagas](https://www.npmjs.com/package/eslint-config-sagas) a public eslint configuration that fits most project styles
- more...
npm package: @sagalbot/vueable
Description: > A featherweight (~1.5kb raw) set of Vue components for triggering    Dropdowns, modals, or any other toggleable content.
Latest version: 0.0.3

# Vueable

> A featherweight (~1.5kb raw) set of Vue components for triggering 
  Dropdowns, modals, or any other toggleable content. 



# Install

#### Yarn

```bash
yarn add @sagalbot/vueable
```

#### NPM

```bash
npm install --save @sagalbot/vueable
```
npm package: @sagar.pawar/countdown-clock
Description: Display a Countdown timer by Providing Date and Time 
Latest version: 2.0.0

### `@sagar.pawar/countdown-clock`

![npm (scoped)](https://img.shields.io/npm/v/@sagar.pawar/countdown-clock.svg) ![npm bundle size (minified)](https://img.shields.io/bundlephobia/min/countdown-clock.svg)

Coundown-Timer using date and time 

### `Using npm:`
 
 ```javascript
 $ npm install @sagar.pawar/countdown-clock --save
 ```
### `Usage`
In some frameworks you have to import countdown-clock like this:
 ```javascript
 import Countdown from '@sagar.pawar/countdown-clock'
 ```

Then you're ready to start Using your Countdown-timer:
  ```javascript
   <Countdown date="apr 20, 2019 21:00:00"/>
 ```

**Note : Necessary to define date property using above format.** 


### `Licence (MIT)`
Copyright (c) 2019 sagar ganesh pawar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.