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

hadouken-js-adapter

v17.54.32

Published

Allows the use of the Hadouken API from node.js.

Downloads

6,673

Readme

Hadouken Node.js adapter Build Status

Allows the use of the Hadouken API from node.js.

Requirements

  • Node.js LTS ^6.9

Install as dependency

$ npm install -S hadouken-js-adapter

Usage

Connecting to an already running runtime

const { connect, Identity } = require("hadouken-js-adapter");

async function launchApp() {
    const fin  = await connect({
        address: "ws://localhost:9696",
        uuid: "my-uuid-123"
    });

    const version = await fin.System.getVersion();
    console.log("Connected to Hadouken version", version);

    await fin.Application.start({
        name: "adapter-test-app",
        url: 'http://hadouken.io/',
        uuid: "adapter-test-app",
        autoShow: true,
        nonPersistent : true
    });
}

launchApp().then(() => {
    console.log("success");
}).catch((err) => {
    console.log("Error trying to connect,", err.message);
    console.log(err.stack);
});

Launching a runtime and connecting

const { connect, Identity } = require("hadouken-js-adapter");

async function launchApp() {
    const fin  = await connect({
        uuid: "my-uuid-123",
        runtime: {
            version: 'stable'
        }
    });

    const version = await fin.System.getVersion();
    console.log("Connected to Hadouken version", version);

    await fin.Application.start({
        name: "adapter-test-app",
        url: 'http://hadouken.io/',
        uuid: "adapter-test-app",
        autoShow: true,
        nonPersistent : true
    });
}

launchApp().then(() => {
    console.log("success");
}).catch((err) => {
    console.log("Error trying to connect,", err.message);
    console.log(err.stack);
});

Note that either an address or a runtime object with version are required to connect

Mac and Linux Environment settings

In order to configure system policies, the js adapter respects the following group policy settings when set as environment variables on Mac and Linux:

  • assetsUrl
  • runtimeArgs
  • runtimeDirectory

Local build

npm run build

Test

npm test -- --ver=alpha

Only executing tests that pattern match "Application"

npm test -- --ver=alpha --grep="Application"

Executing tests that do not pattern match "System"

npm test -- --ver=alpha --invert --grep="System"

Test with core

npm test -- --ver=alpha --build-core --core=~/core

or without specifying the core path (core will be cloned from GH into core directory):

npm test -- --ver=alpha --build-core

Repl

To start the read-eval-print loop:

npm run repl -- --ver=alpha

Generated documentation

We use JSDoc for documentation and generating the documentation will require our custom JSDoc template. Use the following commands to execute the docs task:

git submodule init
git submodule update
npm run doc

Contributing

  1. Fork it (https://github.com/HadoukenIO/js-adapter/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Read our contribution guidelines and Community Code of Conduct
  4. Commit your changes (git commit -am 'Add some fooBar')
  5. Push to the branch (git push origin feature/fooBar)
  6. Create a new Pull Request

NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.

Need an ICLA? Unsure if you are covered under an existing CCLA? Email [email protected]

License

The code in this repository is distributed under the Apache License, Version 2.0

However, if you run this code, it may call on the OpenFin RVM or OpenFin Runtime, which are covered by OpenFin's Developer, Community, and Enterprise licenses. You can learn more about OpenFin licensing at the links listed below or just email us at [email protected] with questions.

Copyright 2018-2019 OpenFin

https://openfin.co/developer-agreement/

https://openfin.co/licensing/