Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evervault/sdk

Package Overview
Dependencies
Maintainers
5
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evervault/sdk - npm Package Compare versions

Comparing version 3.12.2 to 3.12.3

66

lib/index.js

@@ -9,5 +9,3 @@ const crypto = require('crypto');

errors,
sourceParser,
cageLock,
deploy,
environment,

@@ -307,66 +305,2 @@ validationHelper,

/**
* @param {String} cageName
* @param {Function} func
* @returns {Function}
*/
cagify(cageName, func) {
console.warn(
'\x1b[43m\x1b[30mWARN\x1b[0m The `cagify` method is deprecated and slated for removal.'
);
if (!Datatypes.isFunction(func)) {
throw new errors.EvervaultError(
'Cagify must be provided with a function to run'
);
}
if (!Datatypes.isString(cageName) || cageName.length === 0) {
throw new errors.EvervaultError(
'Cagify must be provided with a cage name to run'
);
}
const { cageHash, functionRequires, functionParameters } =
sourceParser.parseSource(func);
if (cageLock.deployCheck(cageName, cageHash)) {
const { deployedBy, deployedTeam, deployedVersion } =
deploy.runDeployment(
cageName,
func,
functionParameters,
functionRequires
);
cageLock.addCageToLockfile(
cageName,
cageHash,
deployedBy,
deployedTeam,
deployedVersion
);
}
const cageVersion = cageLock.getLatestVersion(cageName);
return async (...parameters) => {
const data = {};
parameters.forEach((param, index) => {
data[functionParameters[index]] = param;
});
const runtimeObject = {
environment: await this.encrypt(environment.getEnvironment(func)),
data,
};
const result = await this.run(cageName, runtimeObject, {
'x-cage-version': cageVersion,
});
if (result.statusCode === 404 || result.statusCode === 401)
throw new errors.EvervaultError(
"API key mismatch: please ensure you have switched to your app's team in the CLI"
);
return result.result;
};
}
/**
* @param {String} functionName

@@ -373,0 +307,0 @@ * @param {Object} data

2

lib/utils/index.js
module.exports = {
Datatypes: require('./datatypes'),
errors: require('./errors'),
sourceParser: require('./source'),
cageLock: require('./cagelock'),
environment: require('./environment'),
deploy: require('./deploy'),
certHelper: require('./certHelper'),

@@ -9,0 +7,0 @@ validationHelper: require('./validationHelper'),

{
"name": "@evervault/sdk",
"version": "3.12.2",
"version": "3.12.3",
"description": "Node.js SDK for Evervault",

@@ -36,7 +36,2 @@ "main": "lib/index.js",

"crc-32": "^1.2.2",
"escodegen": "^1.14.3",
"esprima": "^4.0.1",
"haikunator": "^2.1.2",
"konan": "^2.1.1",
"lodash": "^4.17.21",
"phin": "^3.5.0",

@@ -43,0 +38,0 @@ "uasn1": "^0.7.1",

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