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

rivet-plugin-orama

v1.0.1

Published

<h1 align="center"><img src="https://rivet.ironcladapp.com/img/logo-banner-wide.png" alt="Rivet Logo"></h1>

Downloads

2

Readme

rivet-plugin-orama

A collection of plugins for Rivet to handle "simple" tasks.

Using the plugin

In Rivet

To use this plugin in Rivet:

  1. Open the plugins overlay at the top of the screen.
  2. Search for "rivet-plugin-orama"
  3. Click the "Install" button to install the plugin into your current project.

In Code

Load your plugin and Rivet into your application:

import * as Rivet from "@ironclad/rivet-core";
import oramaPlugin from "rivet-plugin-orama";

Register your plugin with Rivet be using the globalRivetNodeRegistry or creating a new NodeRegistration and registering with that:

Rivet.globalRivetNodeRegistry.registerPlugin(oramaPlugin(Rivet));

Making your own plugin

⚠️ Important Notes ⚠️

  • You must bundle your plugins, or include all code for your plugin in the ESM files. Plugins are loaded using import(pluginUrl) so must follow all rules for ESM modules. This means that you cannot use require or module.exports in your plugin code. If you need to use external libraries, you must bundle them.

  • You also cannot import nor bundle @ironclad/rivet-core in your plugin. The rivet core library is passed into your default export function as an argument. Be careful to only use import type statements for the core library, otherwise your plugin will not bundle successfully.

This repository has examples for both bundling with ESBuild and only importing types from @ironclad/rivet-core.

1. Plugin Definition

Follow the example in src/index.ts to define your plugin. Your plugin must default-export a function that takes in the Rivet Core library as its only argument, and returns a valid RivetPlugin object.

2. Node Definitions

Follow the example in src/nodes/common/GuidPluginNode.ts to define your plugin's nodes. You should follow a simlar syntax of exporting functions that take in the Rivet Core library.

  • Nodes must implement PluginNodeDefinition<T> by calling pluginNodeDefinition(yourPluginImpl, "Node Name").
  • Node implementations must implement PluginNodeImpl<T>.
  • T should be your plugin's type definition.

3. Bundling

See bundle.ts for an example of how to bundle your plugin. You can use any bundler you like, but you must bundle your plugin into a single file. You can use the ESBuild bundler to bundle your plugin into a single file.

It is important that all external libraries are bundled, because browsers cannot load bare imports.

4. NPM

You must finally publish your plugin to NPM so that Rivet users can install it using the UI in Rivet, or using the SDK.

Local Development

  1. Run yarn dev to start the compiler and bundler in watch mode. This will automatically recombine and rebundle your changes into the dist folder. This will also copy the bundled files into the plugin install directory.
  2. After each change, you must restart Rivet to see the changes.