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

bakeryjs

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bakeryjs - npm Package Compare versions

Comparing version 0.0.1-beta.4 to 0.0.1-beta.5

build/examples.d.ts

22

build/lib/bakeryjs/builders/DAGBuilder/builder.js

@@ -15,2 +15,3 @@ "use strict";

const assert_1 = require("assert");
const stats_1 = require("../../stats");
const DEFAULT_BATCH_TIMEOUT_SEC = 0.2;

@@ -73,2 +74,22 @@ /**

/**
*
* @param boxNames names of the boxes in the flow
* @param boxBMeta building metainformation collected while building the DAG
* @param schema the definition of the schema, to identify "source" of the event
*/
//TODO: extract into EEmiter of the flow itself
// when emitting from stats EE, we can't distinguish events of various flows
function emitFlowSchema(boxNames, boxBMeta, graph, schema) {
const edges = graph.inEdges();
const boxMetas = boxNames.reduce((metas, name) => {
if (boxBMeta[name].instance) {
const meta = boxBMeta[name].instance.meta;
metas[name] = meta;
}
return metas;
}, {});
stats_1.eventEmitter.emit('flowSchema', schema, boxMetas, edges);
return;
}
/**
* Builder that connects the boxes into directed acyclic graph based on their dependences.

@@ -117,2 +138,3 @@ * TODO: (idea2) use some logical/analytical language (SWI Prolog?), don't even figure the instantiation order of the

if (boxName === '_root_') {
emitFlowSchema(boxBuildOrder, boxMeta, graph, schema);
if (depsQueues.length == 1) {

@@ -119,0 +141,0 @@ return depsQueues[0];

5

build/lib/bakeryjs/Program.js

@@ -95,4 +95,7 @@ "use strict";

runFlow(flow, jobInitialValue) {
const job = new Job_1.Job(jobInitialValue);
console.log('Program run ----->');
flow.process(new Job_1.Job(jobInitialValue));
// TODO: separate this from stats EE -- it is shared accross various flows
stats_1.eventEmitter.emit('run', flow, job);
flow.process(job);
// setTimeout(() => flow.process(new Job()),2000);

@@ -99,0 +102,0 @@ }

@@ -15,2 +15,3 @@ "use strict";

const assert_1 = require("assert");
const stats_1 = require("../../stats");
const DEFAULT_BATCH_TIMEOUT_SEC = 0.2;

@@ -73,2 +74,22 @@ /**

/**
*
* @param boxNames names of the boxes in the flow
* @param boxBMeta building metainformation collected while building the DAG
* @param schema the definition of the schema, to identify "source" of the event
*/
//TODO: extract into EEmiter of the flow itself
// when emitting from stats EE, we can't distinguish events of various flows
function emitFlowSchema(boxNames, boxBMeta, graph, schema) {
const edges = graph.inEdges();
const boxMetas = boxNames.reduce((metas, name) => {
if (boxBMeta[name].instance) {
const meta = boxBMeta[name].instance.meta;
metas[name] = meta;
}
return metas;
}, {});
stats_1.eventEmitter.emit('flowSchema', schema, boxMetas, edges);
return;
}
/**
* Builder that connects the boxes into directed acyclic graph based on their dependences.

@@ -117,2 +138,3 @@ * TODO: (idea2) use some logical/analytical language (SWI Prolog?), don't even figure the instantiation order of the

if (boxName === '_root_') {
emitFlowSchema(boxBuildOrder, boxMeta, graph, schema);
if (depsQueues.length == 1) {

@@ -119,0 +141,0 @@ return depsQueues[0];

@@ -95,4 +95,7 @@ "use strict";

runFlow(flow, jobInitialValue) {
const job = new Job_1.Job(jobInitialValue);
console.log('Program run ----->');
flow.process(new Job_1.Job(jobInitialValue));
// TODO: separate this from stats EE -- it is shared accross various flows
stats_1.eventEmitter.emit('run', flow, job);
flow.process(job);
// setTimeout(() => flow.process(new Job()),2000);

@@ -99,0 +102,0 @@ }

2

package.json
{
"name": "bakeryjs",
"version": "0.0.1-beta.4",
"version": "0.0.1-beta.5",
"description": "FBP-inspired library",

@@ -5,0 +5,0 @@ "main": "build/index",

@@ -65,4 +65,8 @@ # ![BakeryJS](assets/logo.png)

## Resources
- Article [Bake Your Data With BakeryJS](https://medium.com/socialbakers-engineering/bake-your-data-with-bakeryjs-3a7636cfff82)
## License
MIT

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