Skip to content

SimpleNotificationSystem/plugin-mock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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

About

Official Mock Plugin for SimpleNS used for testing purposes

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published