npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@opendeveloper/plugin-sdk

v1.0.0

Published

WebDevserver Plugin SDK - Core interfaces and utilities for plugin development

Readme

@opendeveloper/plugin-sdk

The official WebDevserver Plugin SDK for developing plugins using TypeScript and NPM.

Installation

npm install @opendeveloper/plugin-sdk

Quick Start

Creating a Panel Plugin

import { PanelPluginBase, PanelRenderResult, createPluginFactory } from '@opendeveloper/plugin-sdk';

class MyPanelPlugin extends PanelPluginBase {
  async renderPanel(props?: Record<string, any>): Promise<PanelRenderResult> {
    return {
      html: '<div>Hello from my plugin!</div>',
      css: '.my-plugin { color: blue; }',
      js: 'console.log("Plugin loaded");'
    };
  }

  async handlePanelAction(action: string, data: any): Promise<any> {
    switch (action) {
      case 'refresh':
        return { success: true, message: 'Refreshed' };
      default:
        throw new Error(`Unknown action: ${action}`);
    }
  }
}

export default createPluginFactory(MyPanelPlugin);

Creating a Terminal Plugin

import { TerminalPluginBase, TerminalCommandContext, TerminalCommandResult, createPluginFactory } from '@opendeveloper/plugin-sdk';

class MyTerminalPlugin extends TerminalPluginBase {
  getSupportedCommands(): string[] {
    return ['hello', 'greet'];
  }

  async handleCommand(context: TerminalCommandContext): Promise<TerminalCommandResult> {
    const { command, args } = context;
    
    switch (command) {
      case 'hello':
        return {
          success: true,
          output: 'Hello from my plugin!',
          handled: true
        };
      
      case 'greet':
        const name = args[0] || 'World';
        return {
          success: true,
          output: `Hello, ${name}!`,
          handled: true
        };
      
      default:
        return {
          success: false,
          error: `Unknown command: ${command}`,
          handled: false
        };
    }
  }
}

export default createPluginFactory(MyTerminalPlugin);

Creating an Action Plugin

import { ActionPluginBase, ActionDefinition, ActionExecutionContext, ActionExecutionResult, createPluginFactory } from '@opendeveloper/plugin-sdk';

class MyActionPlugin extends ActionPluginBase {
  getAvailableActions(): ActionDefinition[] {
    return [
      {
        name: 'notify',
        description: 'Send a notification',
        parameters: [
          {
            name: 'message',
            type: 'string',
            required: true,
            description: 'The notification message'
          },
          {
            name: 'type',
            type: 'string',
            required: false,
            defaultValue: 'info',
            validation: {
              enum: ['info', 'warning', 'error', 'success']
            }
          }
        ]
      }
    ];
  }

  async executeAction(context: ActionExecutionContext): Promise<ActionExecutionResult> {
    const { actionName, parameters } = context;
    
    switch (actionName) {
      case 'notify':
        // Send notification logic here
        await this.api.events.emit('notification', {
          message: parameters.message,
          type: parameters.type || 'info'
        });
        
        return {
          success: true,
          result: { notified: true },
          duration: 0
        };
      
      default:
        throw new Error(`Unknown action: ${actionName}`);
    }
  }
}

export default createPluginFactory(MyActionPlugin);

Package.json Configuration

Add WebDevserver-specific configuration to your package.json:

{
  "name": "@opendeveloper/plugin-my-awesome-plugin",
  "version": "1.0.0",
  "description": "My awesome WebDevserver plugin",
  "main": "dist/index.js",
  "types": "dist/index.d.ts",
  "keywords": ["webdevserver", "webdevserver-plugin"],
  "peerDependencies": {
    "@opendeveloper/plugin-sdk": "^1.0.0"
  },
  "webdevserver": {
    "type": "panel",
    "apiVersion": "1.0",
    "permissions": {
      "network": true,
      "github": true
    },
    "frontend": {
      "entry": "dist/frontend.js",
      "component": "MyPluginComponent"
    },
    "resources": {
      "limits": {
        "memory": 128,
        "cpu": 10,
        "storage": 50,
        "apiCalls": 1000
      }
    }
  }
}

Plugin Types

Panel Plugins

  • Render UI content in the WebDevserver interface
  • Handle user interactions
  • Support HTML, CSS, and JavaScript output

Terminal Plugins

  • Add custom terminal commands
  • Process command-line interactions
  • Integrate with the WebDevserver terminal

Action Plugins

  • Provide automated actions
  • Support parameter validation
  • Enable workflow automation

Hybrid Plugins

  • Combine multiple plugin types
  • Support complex functionality
  • Maximum flexibility

API Reference

Plugin API

The plugin API provides access to:

  • Storage: Persistent data storage for plugins
  • Events: Inter-plugin communication and system events
  • Permissions: Security and access control
  • Utils: Logging and utility functions
  • HTTP: Network requests (if permitted)
  • FS: File system access (if permitted)

Base Classes

  • PluginModuleBase: Base class for all plugins
  • PanelPluginBase: Specialized for UI panels
  • TerminalPluginBase: Specialized for terminal commands
  • ActionPluginBase: Specialized for automated actions
  • HybridPluginBase: Support for multiple capabilities

Development Workflow

  1. Create Plugin: Use the plugin templates or start from scratch
  2. Local Development: Use npm link for local testing
  3. Build: Compile TypeScript and bundle assets
  4. Test: Validate plugin functionality
  5. Publish: Publish to NPM registry

Best Practices

  • Always declare required permissions
  • Implement proper error handling
  • Use TypeScript for type safety
  • Follow semantic versioning
  • Include comprehensive documentation
  • Validate user input
  • Respect resource limits

License

MIT