Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.toProperty();
const s_appLogs = Application.get(api, appData.app_id)
.flatMapLatest((app) => {
Logger.debug('Fetch application logs…');
if (deploymentId != null) {
return getAppLogs(app.id, null, null, new Date(), null, deploymentId);
}
return s_deploymentStart.flatMapLatest((deploymentStartEvent) => {
const deploymentId = deploymentStartEvent.data.uuid;
return getAppLogs(app.id, null, null, new Date(), null, deploymentId);
});
});
// TODO, could be done without a Bus (with merged streams)
const s_allLogs = new Bacon.Bus();
s_deploymentStart.onValue(() => {
s_allLogs.push(colors.bold.blue('Deployment started'));
});
s_deploymentEnd.onValue((e) => {
if (e.data.state === 'OK') {
s_allLogs.push(colors.bold.green('Deployment successful'));
}
else {
s_allLogs.error('Deployment failed. Please check the logs');
}
s_allLogs.end();
});
if (!quiet) {
beforeEach(function () {
this.filesBus = new Bacon.Bus()
this.initialPathScanDoneBus = new Bacon.Bus()
const filesProp = this.filesBus.toProperty()
const initialPathScanDoneProp = this.initialPathScanDoneBus.map(true).toProperty(false)
this.prevCallsLength = this.consoleSpy.log.calls.length // to compensate for console logs done previously
this.logger.logPathScan({filesProp: filesProp, initialPathScanDoneProp: initialPathScanDoneProp})
R.times((i) => { this.filesBus.push(R.repeat(`file ${i}`, i)) }, 5)
})
describe("SynthStream", function() {
const stream = new Bus();
const properties = {
stream,
};
const ss = new SynthStream(properties);
it("should construct", function() {
expect(ss).toBeTruthy();
});
describe("commandsForEvent", function() {
it("has 1 message with no event.id supplied", function() {
const event = {
type: "noteOn",
defName: "sin",
args: {},
};
function renderApp(p_route, favBus, volBus) {
var $main = document.createElement("main");
document.body.appendChild($main);
favBus = favBus || new Bacon.Bus();
volBus = volBus || new Bacon.Bus();
React.render(
,
$main
);
}
var verify = require('../../verify.js');
var Bacon = require('baconjs');
var _ = require('lodash');
var zrrkShip = {type: "zrrk"};
var purpleShip = {type: "purple"};
var earthianShip = {type: "earthian"};
var martianShip = {type: "martian"};
var threats = ['low', 'low', 'medium', 'high', 'extreme', 'extreme'];
var shipSensor1 = new Bacon.Bus();
var shipSensor2 = new Bacon.Bus();
var shipSensor3 = new Bacon.Bus();
var destroyerDistanceStream1 = new Bacon.Bus();
var destroyerDistanceStream2 = new Bacon.Bus();
var destroyerDistance;
var shipSensorR = new Bacon.Bus();
var destroyerDistanceStreamR = new Bacon.Bus();
var run = {
input: [shipSensorR, destroyerDistanceStreamR.toProperty(8)],
expect: function (streams, ex, assert)Â {
var a = streams.ships
.fold(0, function (acc, v) { return acc + v; });
var b = streams.threat.changes()
.fold([], '.concat');
var c = streams.postArrivalShips
function StreamBundle(selfId) {
this.selfContext = 'vessels.' + selfId
this.buses = {}
this.allPathsBus = new Bacon.Bus()
this.selfBuses = {}
this.selfAllPathsBus = new Bacon.Bus()
this.selfStreams = {}
this.selfAllPathsStream = new Bacon.Bus()
this.keys = new Bacon.Bus()
this.availableSelfPaths = []
}
.when('makes another bus', [], ['anotherBus'], function(producer) {
producer.value('anotherBus', new Bacon.Bus());
return producer.done();
})
.render(['theBus'], function (writer, input) {
'use strict'
var Bacon = require('baconjs')
module.exports = {
station: new Bacon.Bus(),
trainListDidMount: new Bacon.Bus()
}
beforeEach(function () {
spyOn(Date, 'now').andReturn(0)
buses = {
abortEditCellS: new Bacon.Bus(),
activePathS: new Bacon.Bus(),
clickedCellS: new Bacon.Bus(),
dblClickedCell: new Bacon.Bus(),
editCellS: new Bacon.Bus(),
initialScanDoneP: new Bacon.Bus(),
keyDownS: new Bacon.Bus(),
keyEnterS: new Bacon.Bus(),
keyEscS: new Bacon.Bus(),
keyUpS: new Bacon.Bus(),
listHeightS: new Bacon.Bus(),
newFilenameS: new Bacon.Bus(),
rowHeightS: new Bacon.Bus(),
saveEditedCellContentS: new Bacon.Bus(),
scrollTopS: new Bacon.Bus(),
sessionStartS: new Bacon.Bus(),
sifterP: new Bacon.Bus(),
sortDirectionS: new Bacon.Bus(),
sortFieldS: new Bacon.Bus(),
textInputS: new Bacon.Bus()
}
const viewCtrl = {
abortEditCellS: buses.abortEditCellS,
activePathS: buses.activePathS,
clickedCellS: buses.clickedCellS,
dblClickedCellS: buses.dblClickedCell,
keyDownS: buses.keyDownS,
constructor(log) {
this.synthStream = new Bacon.Bus();
this.masterControlStream = new Bacon.Bus();
this.loopModeEventStream = new Bacon.Bus();
this.playing = false;
this.log = log;
this.watchingDirectory = undefined;
this.masterArgs = {
amp: 0.3
};
}