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

machinepack-machines

Package Overview
Dependencies
Maintainers
4
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-machines - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

machines/parse-machinepack-metadata.js

@@ -9,3 +9,3 @@ module.exports = {

typeclass: 'dictionary',
description: 'The package.json string for the NPM package.',
description: 'The package.json object for the NPM package.',
required: true

@@ -12,0 +12,0 @@ }

@@ -8,3 +8,4 @@ module.exports = {

example: '/Users/mikermcneil/machinepack-foo/machines/bar.js',
description: 'The path to the machine file (if path is not absolute, will be resolved from the current working directory)'
description: 'The path to the machine file (if path is not absolute, will be resolved from the current working directory)',
required: true
}

@@ -11,0 +12,0 @@ },

@@ -80,3 +80,19 @@ module.exports = {

return _.reduce(inputs.inputValues, function (memo, configuredInput) {
memo[configuredInput.name] = configuredInput.value;
var inputDef = machineInstance.inputs[configuredInput.name];
// Coerce the configured input value from the provided string to the
// appropriate type using JSON.parse() based on the input's expectations
// (i.e. if example or typeclass is an array or dictionary)
memo[configuredInput.name] = (function(){
if (inputDef.typeclass === 'dictionary' || inputDef.typeclass === 'array' || _.isObject(inputDef.example)) {
try {
return JSON.parse(configuredInput.value);
}
catch (e){}
}
return configuredInput.value;
})();
// console.log('for %s, got: %s, a %s',configuredInput.name, memo[configuredInput.name], typeof memo[configuredInput.name]);
return memo;

@@ -83,0 +99,0 @@ }, {});

{
"name": "machinepack-machines",
"version": "1.1.1",
"version": "1.1.2",
"description": "Work with machines and machinepacks.",

@@ -5,0 +5,0 @@ "scripts": {

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