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

@bernierllc/development-suite

v0.2.0

Published

Unified development tooling system that composes all core, service, and infrastructure packages

Downloads

171

Readme

@bernierllc/development-suite

A unified development tooling system that composes all core, service, and infrastructure packages into a single, cohesive API. This suite provides a high-level interface for all development operations including publishing, validation, checking, licensing, setup, configuration, logging, and Git hooks management.

Features

  • Unified API: Single interface for all development operations
  • Package Composition: Integrates all core, service, and infrastructure packages
  • Operation Orchestration: Coordinates complex workflows across multiple packages
  • Event-Driven Architecture: Real-time events for operation lifecycle
  • Metrics Collection: Built-in performance monitoring and metrics
  • Notification System: Multi-channel notifications for operations
  • Workspace Management: Automatic workspace detection and validation
  • Environment Context: Runtime environment information and validation
  • Extensible Operations: Custom operation registration and execution
  • Configuration Management: Centralized configuration with validation
  • Type Safety: Full TypeScript support with comprehensive type definitions

Installation

npm install @bernierllc/development-suite

Usage

Basic Usage

import { DevelopmentSuite, SuiteOperationMode } from '@bernierllc/development-suite';

// Create development suite with configuration
const suite = new DevelopmentSuite({
  enabled: true,
  workspaceRoot: process.cwd(),
  autoInitialize: true,
  validateOnStart: true,
  defaultMode: SuiteOperationMode.INTERACTIVE,
  enableParallel: true,
  maxConcurrency: 4,
  timeout: 30000,
  retries: 3,
  enableGitHooks: true,
  enableLogging: true,
  enableNotifications: true,
  enableMetrics: true
});

// Initialize the suite
await suite.initialize();

// Execute operations
const publishResult = await suite.publish();
const validateResult = await suite.validate();
const checkResult = await suite.check();

Core Operations

Publishing

// Interactive publishing
const result = await suite.publish({
  mode: SuiteOperationMode.INTERACTIVE
});

// Non-interactive publishing
const result = await suite.publish({
  mode: SuiteOperationMode.NON_INTERACTIVE,
  dryRun: true
});

// Force publishing
const result = await suite.publish({
  mode: SuiteOperationMode.FORCE,
  force: true
});

Validation

// Validate all packages
const result = await suite.validate();

// Validate with custom options
const result = await suite.validate({
  mode: SuiteOperationMode.VERBOSE,
  verbose: true
});

console.log('Validation successful:', result.success);
console.log('Results:', result.results);
console.log('Summary:', result.summary);

Development Checks

// Run all development checks
const result = await suite.check();

// Run checks with specific mode
const result = await suite.check({
  mode: SuiteOperationMode.DRY_RUN,
  dryRun: true
});

// Check results
if (result.success) {
  console.log('All checks passed!');
} else {
  console.log('Some checks failed:', result.summary.failed);
  console.log('Errors:', result.summary.errors);
}

License Management

// Add licenses to all files
const result = await suite.license();

// License operation with custom options
const result = await suite.license({
  mode: SuiteOperationMode.QUIET,
  quiet: true
});

console.log('Files processed:', result.results.length);
console.log('Successful:', result.summary.successful);

Setup

// Setup workspace and git hooks
const result = await suite.setup();

// Setup with custom configuration
const result = await suite.setup({
  mode: SuiteOperationMode.VERBOSE,
  config: {
    enableGitHooks: true,
    enableLogging: true
  }
});

Configuration

// Update configuration
const result = await suite.configure({
  config: {
    timeout: 60000,
    maxConcurrency: 8,
    enableMetrics: true
  }
});

Logging

// Get log information
const result = await suite.log();

// Log operation with custom options
const result = await suite.log({
  mode: SuiteOperationMode.VERBOSE
});

console.log('Log info:', result.results[0].data);

Git Hooks

// Install git hooks
const result = await suite.gitHooks();

// Git hooks with custom options
const result = await suite.gitHooks({
  mode: SuiteOperationMode.FORCE,
  force: true
});

Event Handling

// Listen to operation events
suite.on('operation-start', ({ type, context }) => {
  console.log(`Starting operation: ${type}`);
});

suite.on('operation-complete', ({ type, result, duration }) => {
  console.log(`Operation ${type} completed in ${duration}ms`);
});

suite.on('operation-error', ({ type, error, duration }) => {
  console.error(`Operation ${type} failed after ${duration}ms:`, error);
});

// Listen to lifecycle events
suite.on('initializing', ({ config }) => {
  console.log('Initializing development suite...');
});

suite.on('initialized', ({ config, workspace }) => {
  console.log('Development suite initialized');
  console.log('Workspace packages:', workspace.packages.length);
});

suite.on('destroying', () => {
  console.log('Destroying development suite...');
});

Custom Operations

// Register custom operation
suite.registerOperation({
  type: 'custom-analysis',
  handler: async (context, options) => {
    // Custom operation logic
    const results = [];
    
    // Perform custom analysis
    for (const pkg of context.workspace.packages) {
      const startTime = Date.now();
      try {
        // Custom analysis logic here
        const analysis = await performCustomAnalysis(pkg);
        results.push({
          type: 'custom-analysis',
          success: true,
          data: analysis,
          duration: Date.now() - startTime,
          timestamp: new Date()
        });
      } catch (error) {
        results.push({
          type: 'custom-analysis',
          success: false,
          error: error as Error,
          duration: Date.now() - startTime,
          timestamp: new Date()
        });
      }
    }

    return {
      success: results.every(r => r.success),
      operation: 'custom-analysis',
      mode: context.mode,
      results,
      summary: suite.createOperationSummary(results),
      metadata: context.metadata,
      context
    };
  },
  validate: async (context, options) => {
    // Custom validation logic
    return {
      valid: true,
      errors: [],
      warnings: []
    };
  }
});

// Execute custom operation
const result = await suite.executeOperation('custom-analysis', {
  mode: SuiteOperationMode.INTERACTIVE
});

Workspace Management

// Get workspace information
const workspace = suite.getWorkspace();
console.log('Workspace root:', workspace.root);
console.log('Workspace type:', workspace.workspaceType);
console.log('Packages:', workspace.packages.length);

// Refresh workspace
await suite.refreshWorkspace();

// Validate workspace
const validation = await suite.validateWorkspace();
if (validation.valid) {
  console.log('Workspace is valid');
} else {
  console.log('Workspace validation errors:', validation.errors);
}

Notifications

// Configure notifications
suite.configureNotifications({
  enabled: true,
  channels: [
    {
      type: 'console',
      name: 'console',
      config: {},
      enabled: true
    }
  ],
  events: [
    {
      type: 'operation-complete',
      enabled: true,
      channels: ['console'],
      template: 'operation-complete',
      conditions: []
    }
  ],
  templates: [
    {
      name: 'operation-complete',
      subject: 'Operation {{operation}} completed',
      body: 'Operation {{operation}} completed successfully in {{duration}}ms',
      variables: ['operation', 'duration']
    }
  ]
});

// Send custom notification
await suite.sendNotification('custom-event', {
  operation: 'test',
  duration: 1000,
  success: true
});

Metrics

// Record custom metrics
suite.recordMetric('custom_operation', 100, { type: 'test' });
suite.recordMetric('operation_count', 1, { operation: 'publish' });

// Get metrics
const metrics = suite.getMetrics();
console.log('Current metrics:', metrics);

// Export metrics
const exportedMetrics = await suite.exportMetrics();
console.log('Exported metrics:', exportedMetrics);

Configuration

Development Suite Configuration

interface DevelopmentSuiteConfig {
  // Core settings
  enabled: boolean;                    // Enable/disable suite
  workspaceRoot: string;               // Workspace root directory
  autoInitialize: boolean;             // Auto-initialize on creation
  validateOnStart: boolean;            // Validate configuration on start
  
  // Operation settings
  defaultMode: SuiteOperationMode;     // Default operation mode
  enableParallel: boolean;             // Enable parallel execution
  maxConcurrency: number;              // Maximum concurrent operations
  timeout: number;                     // Operation timeout (ms)
  retries: number;                     // Number of retries
  
  // Integration settings
  enableGitHooks: boolean;             // Enable git hooks
  enableLogging: boolean;              // Enable logging
  enableNotifications: boolean;        // Enable notifications
  enableMetrics: boolean;              // Enable metrics
  
  // External integrations
  externalTools: ExternalToolConfig[]; // External tool configurations
  notifications: NotificationConfig;   // Notification configuration
  metrics: MetricsConfig;              // Metrics configuration
}

Operation Modes

  • INTERACTIVE: Interactive mode with user prompts
  • NON_INTERACTIVE: Non-interactive mode for automation
  • DRY_RUN: Dry run mode without actual changes
  • FORCE: Force mode ignoring warnings
  • VERBOSE: Verbose mode with detailed output
  • QUIET: Quiet mode with minimal output

Operation Types

  • PUBLISH: Package publishing operations
  • VALIDATE: Package validation operations
  • CHECK: Development environment checks
  • LICENSE: License management operations
  • SETUP: Workspace and tool setup
  • CONFIGURE: Configuration management
  • LOG: Logging operations
  • GIT_HOOKS: Git hooks management

Examples

Complete Setup Example

import { DevelopmentSuite, SuiteOperationMode } from '@bernierllc/development-suite';

async function setupDevelopmentEnvironment() {
  // Create development suite
  const suite = new DevelopmentSuite({
    enabled: true,
    workspaceRoot: process.cwd(),
    autoInitialize: true,
    validateOnStart: true,
    defaultMode: SuiteOperationMode.INTERACTIVE,
    enableParallel: true,
    maxConcurrency: 4,
    timeout: 30000,
    retries: 3,
    enableGitHooks: true,
    enableLogging: true,
    enableNotifications: true,
    enableMetrics: true
  });

  // Set up event listeners
  suite.on('initializing', () => console.log('Initializing...'));
  suite.on('initialized', () => console.log('Initialized!'));
  suite.on('operation-start', ({ type }) => console.log(`Starting ${type}...`));
  suite.on('operation-complete', ({ type, success }) => 
    console.log(`${type} ${success ? 'completed' : 'failed'}`)
  );

  // Initialize suite
  await suite.initialize();

  // Run setup operations
  const setupResult = await suite.setup();
  if (!setupResult.success) {
    console.error('Setup failed:', setupResult.summary.errors);
    return;
  }

  // Validate workspace
  const validateResult = await suite.validate();
  if (!validateResult.success) {
    console.error('Validation failed:', validateResult.summary.errors);
    return;
  }

  // Run development checks
  const checkResult = await suite.check();
  if (!checkResult.success) {
    console.error('Checks failed:', checkResult.summary.errors);
    return;
  }

  console.log('Development environment setup complete!');
  return suite;
}

// Usage
setupDevelopmentEnvironment().then(suite => {
  console.log('Development suite ready');
});

CI/CD Integration Example

// CI/CD pipeline integration
async function ciIntegration() {
  const suite = new DevelopmentSuite({
    enabled: true,
    autoInitialize: true,
    defaultMode: SuiteOperationMode.NON_INTERACTIVE,
    enableParallel: true,
    maxConcurrency: 8,
    timeout: 120000,
    enableGitHooks: false, // Don't install hooks in CI
    enableLogging: true,
    enableNotifications: true,
    enableMetrics: true
  });

  await suite.initialize();

  // Validate all packages
  const validateResult = await suite.validate({
    mode: SuiteOperationMode.VERBOSE
  });

  if (!validateResult.success) {
    console.error('Package validation failed');
    process.exit(1);
  }

  // Run all development checks
  const checkResult = await suite.check({
    mode: SuiteOperationMode.NON_INTERACTIVE
  });

  if (!checkResult.success) {
    console.error('Development checks failed');
    process.exit(1);
  }

  // Publish packages (non-interactive)
  const publishResult = await suite.publish({
    mode: SuiteOperationMode.NON_INTERACTIVE,
    dryRun: process.env.DRY_RUN === 'true'
  });

  if (!publishResult.success) {
    console.error('Publishing failed');
    process.exit(1);
  }

  // Export metrics
  const metrics = await suite.exportMetrics();
  console.log('Operation metrics:', metrics);

  await suite.destroy();
}

Custom Workflow Example

// Custom development workflow
async function customWorkflow() {
  const suite = new DevelopmentSuite();

  // Register custom operation
  suite.registerOperation({
    type: 'security-scan',
    handler: async (context) => {
      const results = [];
      
      for (const pkg of context.workspace.packages) {
        const startTime = Date.now();
        try {
          // Perform security scan
          const scanResult = await performSecurityScan(pkg.path);
          results.push({
            type: 'security-scan',
            success: scanResult.vulnerabilities.length === 0,
            data: scanResult,
            duration: Date.now() - startTime,
            timestamp: new Date()
          });
        } catch (error) {
          results.push({
            type: 'security-scan',
            success: false,
            error: error as Error,
            duration: Date.now() - startTime,
            timestamp: new Date()
          });
        }
      }

      return {
        success: results.every(r => r.success),
        operation: 'security-scan',
        mode: context.mode,
        results,
        summary: {
          total: results.length,
          successful: results.filter(r => r.success).length,
          failed: results.filter(r => !r.success).length,
          skipped: 0,
          duration: results.reduce((sum, r) => sum + r.duration, 0),
          errors: results.filter(r => r.error).map(r => r.error!),
          warnings: []
        },
        metadata: context.metadata,
        context
      };
    }
  });

  await suite.initialize();

  // Execute custom workflow
  const workflow = [
    () => suite.validate(),
    () => suite.check(),
    () => suite.executeOperation('security-scan'),
    () => suite.publish({ mode: SuiteOperationMode.INTERACTIVE })
  ];

  for (const step of workflow) {
    const result = await step();
    if (!result.success) {
      console.error('Workflow step failed:', result.summary.errors);
      break;
    }
  }

  await suite.destroy();
}

Testing

npm test
npm run test:watch
npm run test:coverage

License

This package is licensed under the same terms as the parent project.