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

@janhq/monitoring-plugin

v1.0.9

Published

Utilizing systeminformation, it provides essential System and OS information retrieval

Downloads

267

Readme

Jan Monitoring plugin

Created using Jan app example

Create a Jan Plugin using Typescript

Use this template to bootstrap the creation of a TypeScript Jan plugin. 🚀

Create Your Own Plugin

To create your own plugin, you can use this repository as a template! Just follow the below instructions:

  1. Click the Use this template button at the top of the repository
  2. Select Create a new repository
  3. Select an owner and name for your new repository
  4. Click Create repository
  5. Clone your new repository

Initial Setup

After you've cloned the repository to your local machine or codespace, you'll need to perform some initial setup steps before you can develop your plugin.

[!NOTE]

You'll need to have a reasonably modern version of Node.js handy. If you are using a version manager like nodenv or nvm, you can run nodenv install in the root of your repository to install the version specified in package.json. Otherwise, 20.x or later should work!

  1. :hammer_and_wrench: Install the dependencies

    npm install
  2. :building_construction: Package the TypeScript for distribution

    npm run bundle
  3. :white_check_mark: Check your artifact

    There will be a tgz file in your plugin directory now

Update the Plugin Metadata

The package.json file defines metadata about your plugin, such as plugin name, main entry, description and version.

When you copy this repository, update package.json with the name, description for your plugin.

Update the Plugin Code

The src/ directory is the heart of your plugin! This contains the source code that will be run when your plugin extension functions are invoked. You can replace the contents of this directory with your own code.

There are a few things to keep in mind when writing your plugin code:

  • Most Jan Plugin Extension functions are processed asynchronously. In index.ts, you will see that the extension function will return a Promise<any>.

    import { core } from "@janhq/core";
    
    function onStart(): Promise<any> {
      return core.invokePluginFunc(MODULE_PATH, "run", 0);
    }

    For more information about the Jan Plugin Core module, see the documentation.

So, what are you waiting for? Go ahead and start customizing your plugin!