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

fbp-manifest

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fbp-manifest - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

spec/fixtures/noflo-basic/spec/ExampleSubgraph.yaml

12

package.json
{
"name": "fbp-manifest",
"version": "0.2.4",
"version": "0.2.5",
"description": "Flow-Based Programming Manifest tools",

@@ -28,12 +28,12 @@ "main": "index.js",

"coveralls": "^3.0.0",
"eslint": "^6.8.0",
"eslint": "^7.9.0",
"eslint-config-airbnb-base": "^14.1.0",
"eslint-plugin-import": "^2.14.0",
"grunt": "^1.0.1",
"grunt-eslint": "^21.0.0",
"grunt-eslint": "^23.0.0",
"grunt-mocha-test": "^0.13.2",
"grunt-yaml": "^0.4.2",
"grunt-yamllint": "^0.3.0",
"mocha": "^5.0.0",
"nyc": "^14.0.0"
"mocha": "^8.1.3",
"nyc": "^15.1.0"
},

@@ -43,3 +43,3 @@ "dependencies": {

"clone": "^2.0.0",
"commander": "^5.1.0",
"commander": "^6.1.0",
"fbp": "^1.5.0",

@@ -46,0 +46,0 @@ "tv4": "^1.2.7"

@@ -1,2 +0,2 @@

Flow-Based Programming Manifest Tools [![Build Status](https://travis-ci.org/flowbased/fbp-manifest.svg?branch=master)](https://travis-ci.org/flowbased/fbp-manifest) [![Coverage Status](https://coveralls.io/repos/github/flowbased/fbp-manifest/badge.svg?branch=master)](https://coveralls.io/github/flowbased/fbp-manifest?branch=master)
Flow-Based Programming Manifest Tools
=====================================

@@ -53,3 +53,4 @@

* `elementary`: boolean on whether the component is elementary (code) or not (graph)
* `source`: (optional) path to the source code of the component
* `source`: (optional) path to the source code of the component, in case it differs from the component path
* `tests`: (optional) path to the test suite of the component, typically pointing to a [fbp-spec](https://github.com/flowbased/fbp-spec) file
* `inports`: (optional) array of inport definitions for the component

@@ -86,2 +87,4 @@ * `outports`: (optional) array of outport definitions for the component

* 0.2.5 (2020-09-23)
- Added support for populating `tests` for each module
* 0.2.4 (2020-09-17)

@@ -88,0 +91,0 @@ - Fixed a minor bug with collecting NoFlo graphs

@@ -38,2 +38,4 @@ /* eslint-disable

chai.expect(nodejs.components[2].elementary).to.equal(false);
chai.expect(nodejs.components[2].tests).to.include('spec');
chai.expect(nodejs.components[2].tests).to.include('ExampleSubgraph.yaml');
chai.expect(nodejs.components[3].name).to.equal('Hello');

@@ -40,0 +42,0 @@ chai.expect(nodejs.components[3].elementary).to.equal(false);

@@ -142,2 +142,43 @@ const path = require('path');

function listSpecs(specDir, module, options, callback) {
readdir(specDir)
.then((entries) => {
const potentialSpecs = entries.filter((c) => [
'.coffee',
'.ts',
'.js',
'.yaml',
'.yml',
].includes(path.extname(c)));
const specs = {};
return Promise.filter(potentialSpecs, (p) => {
const specPath = path.resolve(specDir, p);
return stat(specPath)
.then((stats) => stats.isFile());
}).then((potential) => Promise.all(potential.map((p) => {
const specPath = path.resolve(specDir, p);
return readfile(specPath, 'utf-8')
.then((source) => {
const specName = utils.parseId(source, specPath);
specs[specName] = specPath;
});
}))
.then(() => Promise.map(module.components, (c) => {
if (!specs[c.name]) {
return c;
}
return {
...c,
tests: path.relative(options.root, specs[c.name]),
};
})));
})
.nodeify((err, components) => {
if (err && (err.code === 'ENOENT')) { return callback(null, module.components); }
if (err) { return callback(err); }
return callback(null, components);
});
return null;
}
function getModuleInfo(baseDir, options, callback) {

@@ -187,2 +228,3 @@ const packageFile = path.resolve(baseDir, 'package.json');

const listG = Promise.promisify(listGraphs);
const listS = Promise.promisify(listSpecs);
const getModule = Promise.promisify(getModuleInfo);

@@ -196,3 +238,5 @@ return Promise.all([

const [module, components, graphs] = Array.from(args[0]);
if (!module) { return Promise.resolve([]); }
if (!module) {
return Promise.resolve([]);
}
const runtimes = {};

@@ -227,4 +271,4 @@ components.forEach((c) => {

if ((graphs.length === 0)
&& (components.length === 0)
&& (module.noflo != null ? module.noflo.loader : undefined)) {
&& (components.length === 0)
&& (module.noflo != null ? module.noflo.loader : undefined)) {
// Component that only provides a custom loader, register for "noflo"

@@ -243,3 +287,9 @@ modules.push({

return Promise.resolve(modules);
}).nodeify(callback);
})
.then((modules) => Promise.map(modules, (m) => listS(path.resolve(baseDir, 'spec/'), m, options)
.then((components) => ({
...m,
components,
}))))
.nodeify(callback);
};

@@ -246,0 +296,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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