
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
This is the client library and CLI for users of PolyAPI to help create and manage your Poly definitions.
Make sure you have set your npm registry in .npmrc file.
Install the package with npm install polyapi.
Run npx poly setup to set up your Poly connection (only for the first time) and generate Poly functions.
Whenever you update your Poly functions, run npx poly generate to update your local functions.
You will need an API Key to to access Poly. Please head to https://polyapi.io to request an API key!
After you have run npx poly generate you can use your Poly client in your code:
import poly from 'polyapi';
const location = 'Eiffel Tower, Paris';
poly.maps.google.getXY(location)
.then(res => console.log(res))
.catch(err => console.error(err));
Poly functions can throw errors. You can catch them with try/catch or you can register an error handler for function path:
import poly, {errorHandler} from 'polyapi';
errorHandler.on('myContext.myFunction', (error) => {
// handle error
});
Or you can register an error handler for all functions in context:
errorHandler.on('myContext', (error) => {
// handle error
});
To remove error handler for function path:
errorHandler.off('myContext.myFunction');
Similar to error handlers, you can register handlers for Webhooks:
import poly from 'polyapi';
poly.myWebhookContext.paymentReceieved(event => {
// handle event
});
Webhook handlers have their context and function name. To remove a handler call the returned function:
const unregister = poly.myWebhookContext.paymentReceieved(event => {
// handle event
});
...
unregister();
Happy hacking!
FAQs
Poly is a CLI tool to help create and manage your Poly definitions.
The npm package polyapi receives a total of 172 weekly downloads. As such, polyapi popularity was classified as not popular.
We found that polyapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.