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

@ge-fnm/perform-action-module

v1.4.0

Published

This is the Perform Action Module used in the General Electric Field Network Manager

Downloads

32

Readme

perform-action-module

This is the Perform Action Module used in the General Electric Field Network Manager

Coverage Status

This module works directly with the communication-selector-module and the action-object module This module requires a GE radio to work

I would like to use the library in my application

To install this module in your project, use one of the following commands

Install with yarn

yarn add @ge-fnm/perform-action-module

Install with npm

npm install @ge-fnm/perform-action-module

Usage in Node

import { Executer } from './perform-action-module'
// See @gefnm/action-object for more information on below
import {
  v1,
  ActionTypeV1,
  CommunicationMethodV1,
  ProtocolV1
} from '@ge-fnm/action-object'}

const executer = new Executer()
const URL = '0.0.0.0'

// Add client
let init = v1.create({
      version: 1,
      actionType: ActionTypeV1.INIT,
      commData: {
        commMethod: CommunicationMethodV1.HTTP,
        protocol: ProtocolV1.JSONRPC,
        username: 'myusername',
        password: 'mypassword'
      },
      modifyingValue: '',
      path: [],
      response: {
        error: null,
        data: null
      },
      uri: URL
    })
let serilizedClient = action.serialize()

executer.execute(serilizedClient)
.then(response => {
    // Execute command
    let action = v1.create({
      version: 1,
      actionType: ActionTypeV1.GET,
      commData: {
        commMethod: CommunicationMethodV1.HTTP,
        protocol: ProtocolV1.JSONRPC
      },
      modifyingValue: '',
      path: ['/if:interfaces/'],
      response: {
        error: null,
        data: null
      },
      uri: URL
    })
    let serilizedAction = action.serialize()
    executer.execute(serilizedAction)
    .then(response2 => {
        // response2 is an action object with response field filled out
    })
    .catch(error2 => {
        // handle action error
    })
})
.catch(error => {
    // handle unsuccessful client addition
})

Debugging

MacOS/Linux

DEBUG='ge-fnm:perform-action-module:*' yarn #to enable logging for only the perform-action-module
-or-
DEBUG='ge-fnm:perform-action-module:executer' yarn #to enable logging for only the perform-action-module executer
-or-
DEBUG='ge-fnm:perform-action-module:httpclient' yarn #to enable logging for only the perform-action-module httpclient
-or-
DEBUG='ge-fnm:perform-action-module:jsonrpc' yarn #to enable logging for only the perform-action-module jsonrpc protocol
-or-
DEBUG='ge-fnm:* yarn # for all logging related to ge-fnm
-or-
DEBUG=* yarn # enable logging for all installed node_modules that look for the env var DEBUG - please note, this is a lot. You probably dont want this

Powershell (Windows)

$Env:DEBUG='ge-fnm:perform-action-module'; yarn #to enable logging for only the perform-action-module
-or-
$Env:DEBUG='ge-fnm:perform-action-module:executer'; yarn #to enable logging for only the perform-action-module executer
-or-
$Env:DEBUG='ge-fnm:perform-action-module:httpclient'; yarn #to enable logging for only the perform-action-module httpclient
-or-
$Env:DEBUG='ge-fnm:perform-action-module:jsonrpc'; yarn #to enable logging for only the perform-action-module jsonrpc protocol
-or-
$Env:DEBUG='ge-fnm:*'; yarn # for all logging related to ge-fnm
-or-
$Env:DEBUG=*; yarn # enable logging for all installed node_modules that look for the env var DEBUG - please note, this is a lot. You probably dont want this