open-index/open-npm huggingface dataset:
npm package: @ohcnetwork/leaderboard-api
Description: Unified API package with database utilities and plugin types for the leaderboard system
Author: Open Healthcare Network
Latest version: 0.2.0

# @ohcnetwork/leaderboard-api

Unified API package combining database utilities, schema definitions, query helpers, and plugin type definitions for the leaderboard system.

## Installation

```bash
npm install @ohcnetwork/leaderboard-api
```

## Usage

### Plugin Development

```typescript
import type { Plugin, PluginContext } from "@ohcnetwork/leaderboard-api";

const myPlugin: Plugin = {
  name: "my-plugin",
  version: "1.0.0",

  async setup(ctx: PluginContext) {
    // Initialize activity definitions
    await ctx.db.execute(
      `
      INSERT OR IGNORE INTO activity_definition (slug, name, description, points)
      VALUES (?, ?, ?, ?)
    `,
      ["my_activity", "My Activity", "Description", 10],
    );
  },

  async scrape(ctx: PluginContext) {
    // Fetch and store activities
    const data = await fetchData(ctx.config);
    // Insert activities into database
  },

  async aggregate(ctx: PluginContext) {
    // Optional: Compute plugin-specific aggregates
    // Runs after main leaderboard aggregation
  },
};

export default myPlugin;
```

### Database Usage

```typescript
import { createDatabase, initializeSchema } from "@ohcnetwork/leaderboard-api";

const db = createDatabase("file:./leaderboard.db");
await initializeSchema(db);
```

### Query Helpers

```typescript
import {
  contributorQueries,
  activityQueries,
} from "@ohcnetwork/leaderboard-api";

// Get all contributors
const contributors = await contributorQueries.getAll(db);

// Get leaderboard
const leaderboard = await activityQueries.getLeaderboard(db, 10);
```

### Generate Seed Data

```bash
pnpm seed --output=./test-data
```

## Type Definitions

This package exports all core types used throughout the leaderboard system:

- `Database` - Database interface abstraction
- `Plugin` - Plugin interface
- `PluginContext` - Context passed to plugin methods
- `Contributor` - Contributor data structure
- `Activity` - Activity data structure
- `ActivityDefinition` - Activity definition data structure
- And more...

## License

MIT
npm package: @ohd-tools/ohd-config
Description: An RCON Interface for Operation: Harsh Doorstop
Author: bombitmanbomb
Latest version: 0.11.2
Deprecated: Moved to @ohd-tools/utils

<p align="center">
  <img src="https://github.com/afocommunity/OHD-RCON/raw/main/.github/assets/logo.png" />
</p>

# Operation: Harsh Doorstop RCON Interface

![npm](https://img.shields.io/npm/dw/@afocommunity/ohd-rcon) ![GitHub Sponsors](https://img.shields.io/github/sponsors/bombitmanbomb) [![GitHub issues](https://img.shields.io/github/issues/afocommunity/ohd-rcon)](https://github.com/afocommunity/OHD-RCON/issues) ![GitHub](https://img.shields.io/badge/license-MIT-brightgreen) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@afocommunity/ohd-rcon) [![Codacy grade](https://img.shields.io/codacy/grade/bc777618c71e42fb87caae1c0c970327?logo=codacy)](https://www.codacy.com/gh/afocommunity/OHD-RCON/dashboard?utm_source=github.com&utm_medium=referral&utm_content=afocommunity/OHD-RCON&utm_campaign=Badge_Grade) ![GitHub](https://img.shields.io/badge/node->=16.0.0-brightgreen) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/afocommunity/ohd-rcon)

![GitHub package.json version](https://img.shields.io/github/package-json/v/afocommunity/ohd-rcon) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/afocommunity/ohd-rcon)

# Installation

NPM

```bash
npm install @afocommunity/ohd-rcon
```

YARN

```bash
yarn add @afocommunity/ohd-rcon
```

# Documentation

Documentation can be found [HERE](https://ohd-tools.github.io/OHD-RCON/)

![Docs](https://img.shields.io/website?down_color=red&down_message=offline&up_color=brightgreen&up_message=online&url=https%3A%2F%2Fafocommunity.github.io%2FOHD-RCON%2Fmodules.html)

# Usage

```ts
// Example Usage that bans all players with a given word or phrase in their name.
import { OHD } from '@afocommunity/ohd-rcon';

const myServer = new OHD('127.0.0.1', 8000, 'mypassword');

myServer.on('PLAYER_JOINED', (player) => {
  if (!player.isBot && player.name.includes('Naughty Word')) {
    player.ban(0, 'Bad Words in Name');
  }
});

myServer.on('READY', () => {
  myServer.variables.HD.Game.DisableKitRestrictionsOverride.write('1');
  myServer.variables.HD.Game.MinRespawnDelayOverride.write('0.00');
});
// Alternatively
myServer.onReady.then(() => {
  let restrictions =
    myServer.variables.HD.Game.DisableKitRestrictionsOverride.read();

  let respawnDelayInfo =
    myServer.variables.HD.Game.MinRespawnDelayOverride.readDetailed();
});
```

# Development

To run tests locally, place a copy of [steamcmd.exe](https://developer.valvesoftware.com/wiki/SteamCMD#Windows) in the `steamcmd` folder.
This is used to download OHD and boot a local server for testing purposes. You **MUST** port forward `7777, 7778, 7779, 27005` (Default)
npm package: @ohd-tools/ohd-rcon
Description: An RCON Interface for Operation: Harsh Doorstop
Author: bombitmanbomb
Latest version: 0.11.3
Deprecated: Moved to @ohd-tools/rcon

<p align="center">
  <img src="https://github.com/afocommunity/OHD-RCON/raw/main/.github/assets/logo.png" />
</p>

# Operation: Harsh Doorstop RCON Interface

![npm](https://img.shields.io/npm/dw/@ohd-tools/ohd-rcon) ![GitHub Sponsors](https://img.shields.io/github/sponsors/bombitmanbomb) [![GitHub issues](https://img.shields.io/github/issues/afocommunity/ohd-rcon)](https://github.com/afocommunity/OHD-RCON/issues) ![GitHub](https://img.shields.io/badge/license-MIT-brightgreen) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@ohd-tools/ohd-rcon) [![Codacy grade](https://img.shields.io/codacy/grade/bc777618c71e42fb87caae1c0c970327?logo=codacy)](https://www.codacy.com/gh/afocommunity/OHD-RCON/dashboard?utm_source=github.com&utm_medium=referral&utm_content=afocommunity/OHD-RCON&utm_campaign=Badge_Grade) ![GitHub](https://img.shields.io/badge/node->=16.0.0-brightgreen) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/afocommunity/ohd-rcon)

![GitHub package.json version](https://img.shields.io/github/package-json/v/afocommunity/ohd-rcon) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/afocommunity/ohd-rcon)

# Installation

NPM

```bash
npm install @ohd-tools/ohd-rcon
```

YARN

```bash
yarn add @ohd-tools/ohd-rcon
```

# Documentation

Documentation can be found [HERE](https://ohd-tools.github.io/OHD-RCON/)

![Docs](https://img.shields.io/website?down_color=red&down_message=offline&up_color=brightgreen&up_message=online&url=https%3A%2F%2Fafocommunity.github.io%2FOHD-RCON%2Fmodules.html)

# Usage

```ts
// Example Usage that bans all players with a given word or phrase in their name.
import { OHD } from '@ohd-tools/ohd-rcon';

const myServer = new OHD('127.0.0.1', 8000, 'mypassword');

myServer.on('PLAYER_JOINED', (player) => {
  if (!player.isBot && player.name.includes('Naughty Word')) {
    player.ban(0, 'Bad Words in Name');
  }
});

myServer.on('READY', async () => {
  await myServer.variables.HD.Game.DisableKitRestrictionsOverride.write('1');
  await myServer.variables.HD.Game.MinRespawnDelayOverride.write('0.00');
  const restrictions =
    await myServer.variables.HD.Game.DisableKitRestrictionsOverride.read();
  const respawnDelayInfo =
    await myServer.variables.HD.Game.MinRespawnDelayOverride.readDetailed();
});
```

# Development

To run tests locally, place a copy of [steamcmd.exe](https://developer.valvesoftware.com/wiki/SteamCMD#Windows) in the `steamcmd` folder.
This is used to download OHD and boot a local server for testing purposes. You **MUST** port forward `7777, 7778, 7779, 27005` (Default)
npm package: @ohd-tools/rcon
Description: An RCON Interface for Operation: Harsh Doorstop
Author: bombitmanbomb
Latest version: 0.13.3

<p align="center">
  <img src="https://github.com/afocommunity/OHD-RCON/raw/main/.github/assets/logo.png" />
</p>

# Operation: Harsh Doorstop RCON Interface

![npm](https://img.shields.io/npm/dw/@ohd-tools/ohd-rcon) ![GitHub Sponsors](https://img.shields.io/github/sponsors/bombitmanbomb) [![GitHub issues](https://img.shields.io/github/issues/afocommunity/ohd-rcon)](https://github.com/afocommunity/OHD-RCON/issues) ![GitHub](https://img.shields.io/badge/license-MIT-brightgreen) ![npm bundle size (scoped)](https://img.shields.io/bundlephobia/minzip/@ohd-tools/ohd-rcon) [![Codacy grade](https://img.shields.io/codacy/grade/bc777618c71e42fb87caae1c0c970327?logo=codacy)](https://www.codacy.com/gh/afocommunity/OHD-RCON/dashboard?utm_source=github.com&utm_medium=referral&utm_content=afocommunity/OHD-RCON&utm_campaign=Badge_Grade) ![GitHub](https://img.shields.io/badge/node->=16.0.0-brightgreen) ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/afocommunity/ohd-rcon)

![GitHub package.json version](https://img.shields.io/github/package-json/v/afocommunity/ohd-rcon) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/afocommunity/ohd-rcon)

# Installation

NPM

```bash
npm install @ohd-tools/rcon
```

YARN

```bash
yarn add @ohd-tools/rcon
```

# Documentation

Documentation can be found [HERE](https://ohd-tools.github.io/OHD-RCON/)

![Docs](https://img.shields.io/website?down_color=red&down_message=offline&up_color=brightgreen&up_message=online&url=https%3A%2F%2Fafocommunity.github.io%2FOHD-RCON%2Fmodules.html)

# Usage

```ts
// Example Usage that bans all players with a given word or phrase in their name.
import { OHD } from '@ohd-tools/rcon';

const myServer = new OHD('127.0.0.1', 8000, 'mypassword');

myServer.on('PLAYER_JOINED', (player) => {
  if (!player.isBot && player.name.includes('Naughty Word')) {
    player.ban(0, 'Bad Words in Name');
  }
});

myServer.on('READY', async () => {
  await myServer.variables.HD.Game.DisableKitRestrictionsOverride.write('1');
  await myServer.variables.HD.Game.MinRespawnDelayOverride.write('0.00');
  const restrictions =
    await myServer.variables.HD.Game.DisableKitRestrictionsOverride.read();
  const respawnDelayInfo =
    await myServer.variables.HD.Game.MinRespawnDelayOverride.readDetailed();
});
```

# Development

To run tests locally, place a copy of [steamcmd.exe](https://developer.valvesoftware.com/wiki/SteamCMD#Windows) in the `steamcmd` folder.
This is used to download OHD and boot a local server for testing purposes. You **MUST** port forward `7777, 7778, 7779, 27005` (Default)
npm package: @ohd-tools/utils
Description: Utilities for OHD-RCON
Author: bombitmanbomb
Latest version: 0.13.3

<p align="center">
  <img src="https://github.com/afocommunity/OHD-RCON/raw/main/.github/assets/logo.png" />
</p>

# Utils

# Log Readers

Using the Log Readers will require some Additional Dependencies to be present. These are not shipped with the package to cut down on package size by 273.5kb for a relatively niche feature.

## Tail Reader (Local)

This will require you install the package `tail@^2.2.6`

## FTP Reader (Remote)

This will require you install the package `basic-ftp@^5.0.5`

## SFTP Reader (Remote Secure)

This will require you install the package `ssh2-sftp-client@^10.0.3`

This is HEAVILY adapted from Thomas-Smyth's work on [ftp-tail](https://github.com/Thomas-Smyth/ftp-tail)