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

le-injectore

v1.1.1

Published

Local Escape Injector, a webserver handler.

Downloads

1

Readme

Local Escape Injector

A webserver handler for porting your local servers.

Completely free, client-to-client request handler.

How does that work you ask? Like this.

// CONTROL-SIDE. THIS IS THE PART THAT SENDS THE REQUESTS TO THE SERVER.

import injectore from "le-injectore";

const controller_id = 123456789; // Can be any number. Choose wisely, make it unique.
const client_id = 987654321; // client id. Must be the same as the client connecting to the server for the client to be redirected to the correct stream.

injectore.Control.CreateStream({
    auth_at: controller_id, // The controller. This ID allows the controller to manage the stream.
    remote_at: client_id, // The client. This ID is the ID of the client that is searching for a strema, as defined above.
    remote: {
        PORT: 5555, // Port of the server in the client. This value is parsed when a request is recieved, allowing the client to check this port in its computer.
        INTENTS: ["*"] // intents are parsed to the client when a request is recieved. This does not determine if a command goes through, but the client can access these values and can reject if it wishes to.
    },
    authkey: 'helloworld' // key of the stream.
}).then(response => {
    // The stream was successfully created.
    console.log(response.id); // ID of the stream. 
    injectore.Control.SendCommand(response.id, 'helloworld', 'anything here. can be a json object, number, null, undefined, you name it.').then(response => {
        // Response recieved. A response must be sent by the client within 20 seconds. Otherwise the Control will be errored and the stream will be deleted after 60 seconds due to inactivity.
        console.log(response); // response will be the object that was sent by the client. 
    });
}).catch((error) => {
    // An error occured. 
    console.error(error);
});
// CLIENT-SIDE. THIS IS THE PART WHERE  HAS THE WEBSERVER IS SET UP.

import injectore from 'le-injectore';

injectore.Client.SearchStream(987654321).then(async streamdata => {
    console.log(streamdata.id); // stream id. Successful find.
    const connection = await injectore.Client.EstablishConnection(987654321, streamdata.id); // connect to the stream.
    console.log(connection.stream); // stream info. remote, remote id, authkey, auth id and all other info is in this object.
    
    // LISTENERS
    connection.onCommand(async function handlecommand(cmd) {
        let stream = cmd.stream;
        let command = cmd.command; // this object is the object that is sent by the Control. Has type "any", but can be changed in TypeScript with: let command = injectore.ParseCommand<TYPE_HERE>(cmd);
    
    });
}).catch(error => {
    // error occured.
    console.error(error);
}); // set up for searching. THIS MUST BE EXECUTED BEFORE THE CONTROL CREATES THE SERVER!
do not question the last 'e' character in the name 'le-injectore', you will live to regret it.