New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fusebit/add-on-sdk

Package Overview
Dependencies
Maintainers
3
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fusebit/add-on-sdk - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

30

lib/index.js

@@ -285,12 +285,17 @@ const Superagent = require('superagent');

exports.deleteStorage = async (ctx) => {
exports.deleteStorage = async (functionCtx, ctx) => {
debug('DELETE STORAGE');
const issuerId = ctx.configuration.fusebit_storage_issuer_id;
const subject = ctx.configuration.fusebit_storage_subject;
const accountId = ctx.configuration.fusebit_storage_account_id;
const issuerId = functionCtx.configuration.fusebit_storage_issuer_id;
const subject = functionCtx.configuration.fusebit_storage_subject;
const accountId = functionCtx.configuration.fusebit_storage_account_id;
if (!issuerId || !subject || !accountId) {
debug('Storage not configured for this function');
return;
}
// Delete the storage
debug('Deleting storage');
await Superagent.delete(generateStorageUrl(ctx))
await Superagent.delete(generateStorageUrl(functionCtx))
.set('Authorization', ctx.headers['authorization']) // pass-through authorization

@@ -402,2 +407,4 @@ .ok((r) => r.status < 300 || r.status === 404);

exports.deleteFunction = async (ctx, boundaryId, functionId) => {
let functionCtx = await exports.getFunctionDefinition(ctx, boundaryId, functionId);
await Superagent.delete(

@@ -408,4 +415,17 @@ `${ctx.body.baseUrl}/v1/account/${ctx.body.accountId}/subscription/${ctx.body.subscriptionId}/boundary/${

).set('Authorization', ctx.headers['authorization']); // pass-through authorization
// Try to delete the storage, this will do nothing if storage wasn't configured
await exports.deleteStorage(functionCtx, ctx);
};
exports.getFunctionDefinition = async (ctx, boundaryId, functionId) => {
let response = await Superagent.get(
`${ctx.body.baseUrl}/v1/account/${ctx.body.accountId}/subscription/${ctx.body.subscriptionId}/boundary/${
boundaryId || ctx.body.boundaryId
}/function/${functionId || ctx.body.functionId}`
).set('Authorization', ctx.headers['authorization']); // pass-through authorization
return response.body;
};
exports.getFunctionUrl = async (ctx, boundaryId, functionId) => {

@@ -412,0 +432,0 @@ let response = await Superagent.get(

2

package.json
{
"name": "@fusebit/add-on-sdk",
"version": "1.3.0",
"version": "1.3.1",
"description": "SDK for implementing Fusebit Add-Ons",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc