Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 1.08 KB

File metadata and controls

76 lines (53 loc) · 1.08 KB

@simplens/mock

A mock provider plugin for SimpleNS designed for testing and development purposes.

Installation

npm install @simplens/mock

Usage

Configuration

Add the mock provider to your simplens.config.yaml:

providers:
  - name: mock
    package: '@simplens/mock'
    options:
      rateLimit:
        maxTokens: 100
        refillRate: 10

Notification Schema

The mock provider accepts notifications with the following structure:

{
  channel: 'mock',
  recipient: {
    user_id: string
  },
  content: {
    message: string
  }
}

Configuration Options

Option Type Default Description
rateLimit.maxTokens number 100 Maximum number of tokens in the rate limit bucket
rateLimit.refillRate number 10 Number of tokens refilled per second

Development

Build

npm run build

Test

npm test

Watch Mode

npm run test:watch

License

MIT

Author

SimpleNS Team