
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
fist-fistlabs_unit_asker
Advanced tools
Fist plugin which provides the unit to create http requests with asker
Unit _fistlabs_unit_asker
inherits from _fistlabs_unit_serial
, expresses any http request in 5 steps:
options
- creating request optionsprepare
- prepare request optionsrequest
- do requestcompile
- parse responseresolve
- check, validate response, then return result#Usage:
$ npm i fist-fistlabs_unit_asker
app.install('fist-fislabs_unit_asker');
app.unit({
base: '_fistlabs_unit_asker',
name: 'news.posts',
options: function (track, context) {
return {
// any options supported by asker
host: 'backend.example.com',
port: 3000,
path: '/get-news/'
};
},
resolve: function (track, context) {
var newsList = this.__base(track, context);
return newsList.filter(function (item) {
return item.hidden !== true;
});
}
});
#Tips and tricks:
By default prepare
step supports path factories as paths.
app.unit({
base: '_fistlabs_unit_asker',
name: 'news.post',
options: function (track, context) {
return {
host: 'backend.example.com',
port: 3000,
path: {
build: function (vars) {
return util.format('/news/post/%s/', vars.postId)
}
},
vars: {
postId: context.p('postId')
}
};
}
});
So you can use finger routes to create paths easier:
var Rule = require('finger/core/rule');
var postPath = new Rule('/news/post/<postId>/');
app.unit({
base: '_fistlabs_unit_asker',
name: 'news.post',
options: function (track, context) {
return {
host: 'backend.example.com',
port: 3000,
path: postPath,
vars: {
postId: context.p('postId')
}
};
}
});
LICENSE MIT
FAQs
Fist plugin providing asker unit
We found that fist-fistlabs_unit_asker 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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.