Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A module which allows Node.js to interface with PathfinderPC Server (www.pathfinderpc.com)
PathfinderPC Interface for Node.js
This package allows you to interact with PathfinderPC Server.
It keeps an in-memory database (nedb) to keep track of the state - so don't feel bad about querying it lots, it won't hit Pathfinder.
Do this to get it into your node project:
npm install pfint --save
Require it, create a new one.
var PFInterface = require('pfint')
var pfint = new PFInterface();
pfint.sync({
'user' : "Pathfinder_User",
'password' : "Pathfinder_Password",
'host' : "localhost",
'port' : 9500
})
PFInt gives off lots of events and things. It can also be queried.
There are a coupe of methods you can use
This is the method which starts up the connection.
{
'user' : "Pathfinder_User",
'password' : "Pathfinder_Password",
'host' : "localhost",
'port' : 9500
}
This is basically a passthrough for nedb.find.
cb(err, item)
There are various itemTypes that can be queried for.
A bit like this:
pfint.find({'itemType' : 'protocoltranslator'}, function(err, pts)
{
response.end(JSON.stringify(pts))
})
The same as the above, except only one result gets returned.
You can connect to events in the normal way:
pfint.on('debug', function (message) {
console.log(message)
})
Debugging notes come out at various useful points.
Is raised when we are connected to PathfinderPC
Is raised when a memory slot is updated
Is raised when a route is created
Raised when an error occurs (no, really?)
Raised when a GPI state changes
Copyright (c) 2015 Chris Roberts
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
A module which allows Node.js to interface with PathfinderPC Server (www.pathfinderpc.com)
We found that pfint demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.