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

@accessors-hosts/node

v0.1.2

Published

A @accessors-hosts/node for Accessors (actor-oriented proxies for IoT)

Downloads

4

Readme

$Id: README.txt 1887 2017-06-20 21:54:51Z cxh $

This directory contains an implementation of a Node.js swarmlet host.

To start the interactive version of the Node.js host, invoke:

node nodeHostShell.js

which should display:

Welcome to the Node swarmlet host (nsh). Type exit to exit, help for help. nsh>

At the prompt (nsh>), you can enter JavaScript statements or expressions.

To instantiate and run a test accessor, do this:

nsh> var a = instantiate('myAccessorName', 'test/TestAccessor');

Below is an example of a complete session, to give you an idea of what can be done:

---------------------start

node nodeHostShell.js Welcome to the Node swarmlet host (nsh). Type exit to exit, help for help.

nsh> var a = instantiate('myAccessorName', 'test/TestAccessor'); Reading accessor at: /ptII/org/terraswarm/accessor/accessors/web/test/TestAccessor.js Instantiated accessor myAccessorName with class test/TestAccessor undefined

nsh> a.initialize(); undefined

nsh> a.inputList [ 'untyped', 'numeric', 'boolean' ]

nsh> a.provideInput('untyped', 'hello world'); undefined

nsh> a.react(); TestAccessor.fire() invoked.

nsh> a.outputList [ 'typeOfUntyped', 'jsonOfUntyped', 'numericPlusP', 'negation' ]

nsh> a.latestOutput('typeOfUntyped'); string

nsh> a.latestOutput('jsonOfUntyped'); JSON for untyped input: "hello world"

nsh> quit exit -----------------------end

To run a simple test, assuming you are in this test directory:

node ../nodeHost.js < testNodeHost.js

The testNodeHost.js file just contains the above commands collected into a file. You will see the following output:

Welcome to the Node swarmlet host (nsh). Type exit to exit, help for help. nsh> // This is just a simple smoke test for the Node.js host. undefined nsh> // To use it, run the node host and copy and paste the following into it. undefined nsh> var a = instantiate('TestComposite', 'test/TestComposite'); Reading accessor at: /ptII/org/terraswarm/accessor/accessors/web/test/TestComposite.js Reading accessor at: /ptII/org/terraswarm/accessor/accessors/web/test/TestGain.js Reading accessor at: /ptII/org/terraswarm/accessor/accessors/web/test/TestAdder.js Instantiated accessor TestComposite with class test/TestComposite undefined nsh> a.initialize(); undefined nsh> a.provideInput('input', 10); undefined nsh> a.react(); undefined nsh> a.latestOutput('output'); // Should return 50 50 nsh> a.wrapup(); undefined nsh> quit; exit

Install the npm @accessors-hosts/node package on the npm server.

(This is for the use of maintainers of this node module.)

We are using an account named 'terraswarm' on the npmjs repository to manage the @accessors-hosts/node package.

To update the @accessors-hosts/node package on npmjs:

  1. Update the patch number in package.json

  2. Login to npm npm login

    Username: terraswarm
    Password: See ~terra/.npmpass on terra
    Email: [email protected] 
  3. Publish: npm publish --access public