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 🙏

© 2024 – Pkg Stats / Ryan Hefner

strider-simple-runner

v2.0.0

Published

Simple in-process worker implementation for Strider

Downloads

57

Readme

strider-simple-runner

Worker Picture

Easy-to-configure in-process runner implementation for Strider Continous Deployment. This runner comes bundled with Strider.

Build Status

Spec

require('strider-simple-runner').create(emitter, config, done)

Config

All options are optional.

pty(false):              use 'pty' for running commands. Currently disabled
logger(console):         .log, .warn, .error
io(new EventEmitter):    the channel of internal communication with the job worker
processJob(core.process):function to run a job. (task, config, ondone)
pluginDirs:              the directories in which to look for plugins
dataDir($HOME/.strider): the directory in which to clone/test/etc
concurrentJobs(1):       maximum number of jobs to execute at once

Events

Expected to consume

  • 'job.new'
{
  id: Oid,
  type: 'TEST_ONLY' | 'TEST_AND_DEPLOY',
  user_id: Oid,
  trigger: {
  },
  ref: {
    branch: String,
    id: String // commit id
  },
  // this stuff is not part of the "job" document in mongo, but is added
  project: {
    // project config straight from db, includes plugin config and
    // project level provider config
  },
  userProvider: { // user-level config for the provider. Things like a github
  }               // OAuth token. Retrieved from user.providers.[providerid]
}

Ex: github provider config

{
  id: 'github',
  user: {
    token: '1234',
    username: 'hacker'
  },
  project: {
    url: 'example.com/repo.git',
    display_url: 'http://example.com/repo',
    auth: {
      method: 'https',
      username: null, // use user's gh auth
      password: null // use user's gh token
    }
  }
}

Ex: git provider config

{
  id: 'git',
  user: {},
  project: {
    url: 'example.com/repo.git',
    method: 'ssh',
    privkey: null, // use repo-level ssh keys
    pubkey: null
  }
}

Project config looks like:

{
  name: 'owner/name',
  public: false,
  active: true,
  deploy_on_green: true,
  secret: // what's this for?
  runner: {
    id: 'simple', // or docker, etc.
    pty: false
    // other config for the runner
  },
  privkey: '',
  pubkey: '',
  provider: {}, // provider config
  // owner is implicit, as it's embedded ...
  collaborators: [],
  plugins: [{
    id: 'heroku',
    // plugin config
  }, ...]
}

Plugins needed:

  • heroku
  • webhooks

Providers:

  • git
  • github

Tests

Strider-simple-runner comes with tests. To run, simply execute npm test.

License

Strider-simple-runner is released under a BSD license.

Credits

Picture of worker ant CC-BY myprofe from http://www.flickr.com/photos/myprofe/5883651745/sizes/m/in/photostream/