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

hubot-at-events

v0.1.9

Published

A hubot plugin to perform events emission at given time.

Downloads

3

Readme

Hubot At Events Plugin

Version Downloads Build Status Dependency Status Coverage Status NPM

This plugin is the brother of hubot-cron-events but specialised in one-time events triggered at a given time.

Work in progress - this plugin is ready for use but still very experimental.

Installation

In your hubot directory:

npm install hubot-at-events --save

Then add hubot-at-events to external-scripts.json

Configuration

If you use hubot-auth, the plugin configuration commands will be restricted to user with the admin role.

If hubot-auth is not loaded, all users can access those commands. You can use those variables to tune things up a bit.

  • HUBOT_AT_NOAUTH - if defined, it will bypass the need to be admin to use the .at commands
  • HUBOT_AT_AUTH_GROUP - if defined it will permit group specified to use the .at commands

It's also advised to use a brain persistence plugin, whatever it is, to persist the cron jobs between restarts.

Commands

Note: until version 1.0.0, this readme is a roadmap, not a real documentation. This is a Readme-driven development approach.

Commands prefixed by .at or .in are here taking in account we use the . as hubot prefix, just replace it with your prefix if it is different. Uncommented commands are just not yet implemented.

.at version
    gives the version of the hubot-at-events package loaded

.at <date> [in <tz>] [run <name>] do <event> [with param1=value1]
    schedules triggering of <event> at given <date>
    - <date> has to be in the future
    - params can be provided to be transmitted to the <event>
    - if you don't provide a <name> for the action (using 'run <name>')
      then a random name will be attributed to it,
      as it's needed for later cancellation or modification
    - if no <tz> is provided, the server tz will be applied

.at <date> [in <tz>] [run <name>] say [in #<room>] <message>
    same as above, except that the event will be 'at.message'
    - if the <room> is omitted, it will be set to the room 
      where the command is done
    - the action will be given a random name.

.at <date> [in <tz>] [run <name>] say [to <username>] <message>
    same as above, except that the message will be said to the <username> in private

.in <number> <unit> [run <name>] do <event> [with param1=value1]
    same as with .at command, but using time relative to now
    acceptable units are
    - s, sec, second, seconds
    - m, min, minute, minutes
    - h, hour, hours
    - d, day, days
    - w, week, weeks
    - month, months
    - y, year, years
    For the rest, it behaves exactly like the .at command

.in <number> <unit> [run <name>] say [in #<room>] <message>
    same as above, except that the message will be said to the <username> in private

.in <number> <unit> [run <name>] say [to <username>] <message>

.at enable <name>
    activate an action that was previously disabled

.at disable <name>
    disable an action but without deleting it, so it can be re-enabled later

.at list [<term>]
    will list all actions matching <term>
    if no <term> is provided, it will just list all actions

.at cancel <name>
    removes the action, all data about it will be lost

.at <name> with <key> = <value>

.at <name> drop <key>

Some events receivers are also provided for testing purposes:

at.message
    requires data:
    - room
    - message
    it will just say the message in the given room

Testing

npm install

# will run make test and coffeelint
npm test 

# or
make test

# or, for watch-mode
make test-w

# or for more documentation-style output
make test-spec

# and to generate coverage
make test-cov

# and to run the lint
make lint

# run the lint and the coverage
make

Changelog

All changes are listed in the CHANGELOG

Contribute

Feel free to open a PR if you find any bug, typo, want to improve documentation, or think about a new feature.

Gandi loves Free and Open Source Software. This project is used internally at Gandi but external contributions are very welcome.

Authors

  • @mose - author and maintainer

License

This source code is available under MIT license.

Copyright

Copyright (c) 2016 - Gandi - https://gandi.net