Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function applyOutstandingChanges(){
// If any thing is open, pack it in now
Postal.publish({
channel: 'editor',
topic: 'apply-changes',
data: {}
});
}
function publishEngineMessage(topic, data){
Postal.publish({
channel: 'engine',
topic: topic,
data: data
});
}
function publishResults(){
for (var id in AllSpecData.results){
var completed = AllSpecData.results[id];
Postal.publish({
channel: 'engine',
topic: completed.type,
data: completed
});
}
}
function changeLifecyleFilter(value){
Postal.publish({
channel: 'explorer',
topic: 'lifecycle-filter-changed',
data: {lifecycle: value}
});
}
onNewProjectComments(){
postal.publish({
channel: "topMenu",
topic: "NewProjectComments"
});
};
"federation.pong": function( data ) {
data.source.handshakeComplete = true;
data.source.setInstanceId( data.packingSlip.instanceId );
if ( data.source.pings[data.packingSlip.pingData.ticket] ) {
data.source.pings[data.packingSlip.pingData.ticket].callback( {
ticket: data.packingSlip.pingData.ticket,
instanceId: data.packingSlip.instanceId,
source: data.source
} );
data.source.pings[data.packingSlip.pingData.ticket] = undefined;
}
if ( !_.contains( state._clients, data.packingSlip.instanceId ) ) {
state._clients.push( data.packingSlip.instanceId );
}
postal.publish( {
channel: "postal.federation",
topic: "client.federated",
data: {
remoteId: data.source.instanceId,
localId: postal.instanceId(),
transport: data.transport
}
} );
},
"federation.disconnect": function( data ) {
applyChange(data){
this.spec.apply(data);
this.refreshEditor();
Postal.publish({
channel: 'editor',
topic: 'spec-edited',
data: {}
});
}
obj.sendMsg = (function (name, argument) {
postal.publish({
channel: "ui",
topic: "msg",
data: {
name: name,
argument: argument
}
});
}).bind(obj);
onFederatedMsg: function(payload) {
postal.publish(payload.envelope);
},