
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
digger-contracts
Advanced tools

The contract factory for digger server requests
$ npm install digger-contracts
There are four types of contract that digger can resolve:
Generate a select contract from a container by running the container as a function or running the 'select' method.
You give the selector and context as arguments - the context is piped into the selector.
var container = $digger.connect('/my/location');
var contract = container('folder.red', '#top');
console.log(contract.parse());
/*
{
method:'post',
url:'/select',
headers:{
'x-digger-selector':'folder.red',
'x-digger-context':'#top'
}
body:[
'/my/location'
]
}
*/
Generate an append contract by appending a container to another container:
var container = $digger.connect('/my/location');
var child = $digger.create('folder', {
name:'test'
})
var contract = container.append(child);
console.log(contract.parse());
/*
{
method:'post',
url:'/my/location',
body:[{
name:'test',
_digger:{
tag:'folder',
diggerid:3249394383838,
path:'/my/location',
inode:'df9f83'
}
}]
}
*/
Generate a save contract by calling the save method on a container:
var warehouse = $digger.connect('/my/location');
warehouse('folder.red').ship(function(folder){
var contract = folder.attr('price', 34).save();
console.log(contract.parse());
})
/*
{
method:'put',
url:'/data/my/location/343fc3/33f33f',
body:{
name:'item',
price:34,
_digger:{
path:'/my/location/343fc3/33f33f',
tag:'folder',
class:['red']
}
}
}
*/
Generate a remove contract:
var warehouse = $digger.connect('/my/location');
warehouse('folder.red').ship(function(folder){
var contract = folder.remove();
console.log(contract.parse());
})
/*
{
method:'delete',
url:'/data/my/location/343fc3/33f33f'
}
*/
FAQs
The contract factory for digger server requests
We found that digger-contracts 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.