0.1.6 • Published 11 years ago
service-probe v0.1.6
service-probe
The 'service-probe' returns information (such as dependecies) about the first parent module in the path hierarchy.
Take a look to the TODO if you want to help towards the next steps.
Installation
Node Dependencies
Add following line to your project dependencies
"service-probe": "0.1.x",then hit
npm installRequire module
var probe = require('service-probe');Usage
property means the property is only set it a value was found
Probe Object
The Probe is an extention of the Root Object provided by the root-finder package
service-probe adds following properties to the Root Object:
status: 'OK' if the probe was processed without problems, 'ERROR' otherwisetimestamp: the time at which the probe was generatedhostname: the name of the hostpid: the process idip: the ip address from the network adapterversion: the version of the package[version_hash]: the parsed content of .git/HEADdependencies: the parent module's dependencies as array of objects formated as follows
Dependecy Object
type: string - specifies it is a Node ('node') or Bower ('bower') dependencyproduction: boolean - specifies it is a production dependencypath: string - path to the dependencyname: string - the name dependency moduleversion: string - the dependency module's version[description]: string - the dependency module's description[keywords]: array of strings - the dependency module's keywords[homepage]: string - the dependency module's homepage[repository_url]: string - the dependency module's repository_url[engines_node]: string - the dependency module's supported version of node
Access Values
Access the values with the point notation:
var probe = require('service-probe');
// get parent module's name
probe.name
// get root path
probe.path
// get list of dependencies
probe.dependencies