🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@sidequest/backend

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sidequest/backend

@sidequest/backend is the backend package of SideQuest, a distributed job queue for Node.js and TypeScript.

latest
Source
npmnpm
Version
1.12.0
Version published
Maintainers
2
Created
Source

@sidequest/backend

The core backend interfaces and abstract implementations for the Sidequest job processing system.

Overview

This package provides the foundational types, interfaces, and abstract base classes that define how Sidequest interacts with different database backends. It serves as the contract that all backend implementations must follow, ensuring consistency across different database providers.

What's Included

Core Interface

  • Backend - The main interface that defines all operations a backend must implement, including job management, queue operations, migrations, and statistics.

Abstract Base Class

  • SQLBackend - An abstract base class for SQL-based backends that provides common functionality using Knex.js, including database migrations, job claiming logic, and query utilities.

Type Definitions

  • Job Types - NewJobData, UpdateJobData, JobCounts for job operations
  • Queue Types - NewQueueData, UpdateQueueData for queue management
  • Configuration - BackendConfig for backend driver configuration

Factory Function

  • createBackendFromDriver() - Dynamically loads and instantiates backend implementations from driver names

Usage

This package is typically not used directly by end users. Instead, it's consumed by:

  • Concrete backend implementations (e.g., @sidequest/postgres, @sidequest/sqlite, @sidequest/mysql)
  • The core Sidequest engine for type safety and consistent interfaces
  • Backend developers who want to create custom backend implementations

Example Backend Implementation

import { SQLBackend } from "@sidequest/backend";
import knex from "knex";

export default class MyCustomBackend extends SQLBackend {
  constructor(config: any) {
    super(knex(config));
  }

  // Implement any custom methods or override existing ones
}

License

LGPL-3.0-or-later

Keywords

nodejs

FAQs

Package last updated on 28 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts