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

@holochain/holochain-nodejs-bleeding

v0.3.1

Published

Nodejs Holochain Container primarily for test execution

Downloads

2

Readme

holochain-nodejs

Nodejs Holochain Container primarily for the execution of tests

Installation

The recommended way to install is via npm https://www.npmjs.com/package/@holochain/holochain-nodejs.

To build from source clone the repo and run

node ./publish.js

from the project root.

Usage

After installing via npm the module can be used in a node script as follows:

const Container = require('@holochain/holochain-nodejs');
const app = Container.loadAndInstantiate("path/to/happ.hcpkg");
app.start();

// make calls to the app instance
// zome functions can be called using
// app.call(zome, capability, function, params);

app.stop();

Note about usage: prior to version 0.1.22, you would need to use JSON.stringify on the input parameters, and JSON.parse on the result.

const rawResult = app.call(zome, capability, function, JSON.stringify({ key: "value" }));
const result = JSON.parse(rawResult);

Now in version 0.1.22, you must still pass in an object (just like before), but it should be the plain object, and the result does not need to be parsed. You can use it more simply, like this:

const result = app.call(zome, capability, function, { key: "value" });

Deployment

Recommended pattern for deployment:

In your CLI, navigate to the directory containing these files.

Use npm version [patch, minor, major] (depending on the type of update) This will update the package.json.

Commit this.

Push it to github.

Create a tag on github of the format holochain-nodejs-vY.Y.Y where Y.Y.Y is the version number of the tag. This is really important, as only a tag with this format will trigger release builds to happen. This is configured in the .travis.yml file.

This will cause the CI to build for all platforms, and upload the binaries to github releases.

If are added as a team member on the holochain team on npm, and have previously run npm adduser, skip this step. If you haven't, run npm adduser. Use the details of your npm user to login.

Once travis has finished with the binary uploads to releases (progress can be seen at https://travis-ci.org/holochain/holochain-rust) run the following from your computer, from the nodejs_holochain directory node ./publish.js --publish

Until windows for travis can utilize secure environment variables without breaking (its not available as a feature yet), we cannot re-enable the automated npm publish step. When the time comes, the configuration is already in the travis file, commented out.

Authors

Acknowledgments

  • Thanks to IronCoreLabs for the example of deploying neon modules via npm (https://github.com/IronCoreLabs/recrypt-node-binding)