conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
commands[uproxy_core_api.Command.CHECK_REPROXY] = core.checkReproxy;
=======
commands[uproxy_core_api.Command.UPDATE_GLOBAL_SETTING] = core.updateGlobalSetting;
>>>>>>>
commands[uproxy_core_api.Command.UPDATE_GLOBAL_SETTING] = core.updateGlobalSetting;
commands[uproxy_core_api.Command.CHECK_REPROXY] = core.checkReproxy; |
<<<<<<<
// Payload for SIGNAL_FROM_CLIENT_PEER and SIGNAL_FROM_SERVER_PEER messages.
// Other payload types exist, e.g. bridging peerconnection signals.
export interface SignallingMetadata {
// Random ID associated with this proxying attempt.
// Used for logging purposes and implicitly delimits proxying attempts.
proxyingId ?:string;
}
/**
*
*/
export interface LocalUserInstance extends BaseInstance {
userId :string;
name :string;
}
=======
>>>>>>> |
<<<<<<<
private portControl_?:freedom.PortControl.PortControl,
private preferredObfuscatorConfig_?:ObfuscatorConfig) {
this.peerName = peerName || 'churn-connection-' +
(++Connection.internalConnectionId_);
=======
private portControl_?:freedom.PortControl.PortControl) {
Connection.id_++;
>>>>>>>
private portControl_?:freedom.PortControl.PortControl,
private preferredObfuscatorConfig_?:ObfuscatorConfig) {
Connection.id_++;
<<<<<<<
this.onceHaveObfuscatorConfig_.then((config:ObfuscatorConfig) => {
log.info('%1: obfuscator config: %2', this.peerName, config);
=======
this.onceHaveCaesarKey_.then((key: number) => {
log.info('%1: caesar key is %2', this.name_, key);
>>>>>>>
this.onceHaveObfuscatorConfig_.then((config:ObfuscatorConfig) => {
log.info('%1: obfuscator config: %2', this.name_, config);
<<<<<<<
private configurePipe_ = (obfuscatorConfig:ObfuscatorConfig) : void => {
this.pipe_ = freedom['churnPipe'](this.peerName);
=======
private configurePipe_ = (key:number) : void => {
this.pipe_ = freedom['churnPipe'](this.name_);
>>>>>>>
private configurePipe_ = (obfuscatorConfig:ObfuscatorConfig) : void => {
this.pipe_ = freedom['churnPipe'](this.name_); |
<<<<<<<
public shouldContainStringAndDoesNotThrows(actualValue: string, expectedContent: string) {
let expect = Expect(actualValue);
=======
public shouldContainAndDoesNotThrows(actualValue: any, expectedContent: any) {
const expect = Expect(actualValue);
>>>>>>>
public shouldContainStringAndDoesNotThrow(actualValue: string, expectedContent: string) {
const expect = Expect(actualValue);
<<<<<<<
public shouldContainStringAndDoesDoesNotThrow(actualValue: string, expectedContent: string) {
let expect = Expect(actualValue);
=======
public shouldContainAndDoesDoesNotThrow(actualValue: any, expectedContent: any) {
const expect = Expect(actualValue);
>>>>>>>
public shouldContainStringAndDoesDoesNotThrow(actualValue: string, expectedContent: string) {
const expect = Expect(actualValue);
<<<<<<<
public shouldNotContainStringAndDoesNotDoesNotThrow(actualValue: string, expectedContent: string) {
let expect = Expect(actualValue);
=======
public shouldNotContainAndDoesNotDoesNotThrow(actualValue: any, expectedContent: any) {
const expect = Expect(actualValue);
>>>>>>>
public shouldNotContainStringAndDoesNotDoesNotThrow(actualValue: string, expectedContent: string) {
const expect = Expect(actualValue);
<<<<<<<
public shouldNotContainStringAndDoesThrows(actualValue: string, expectedContent: string) {
let expect = Expect(actualValue);
=======
public shouldNotContainAndDoesThrows(actualValue: any, expectedContent: any) {
const expect = Expect(actualValue);
>>>>>>>
public shouldNotContainStringAndDoesThrow(actualValue: string, expectedContent: string) {
const expect = Expect(actualValue); |
<<<<<<<
spyOn(ui, 'showNotification');
=======
spyOn(network, 'notifyUI');
spyOn(network, 'sendInstanceHandshake');
expect(network.isLoginPending()).toEqual(false);
>>>>>>>
spyOn(ui, 'showNotification');
spyOn(network, 'sendInstanceHandshake');
<<<<<<<
=======
expect(network.isOnline()).toEqual(true);
expect(network.isLoginPending()).toEqual(false);
expect(network.notifyUI).toHaveBeenCalled();
var freedomClient :freedom_Social.ClientState = {
userId: 'fakeuser',
clientId: 'fakeclient',
status: 'ONLINE',
timestamp: 12345
};
// Add user to the roster;
network.handleClientState(freedomClient);
expect(Object.keys(network.roster).length).toEqual(1);
var friend = network.getUser('fakeuser');
spyOn(friend, 'monitor');
expect(friend.isOnline()).toEqual(true);
// Wait for 5 seconds and make sure monitoring was called.
jasmine.clock().tick(5000);
expect(friend.monitor).toHaveBeenCalled();
>>>>>>>
var freedomClient :freedom_Social.ClientState = {
userId: 'fakeuser',
clientId: 'fakeclient',
status: 'ONLINE',
timestamp: 12345
};
// Add user to the roster;
console.log('add user to the roster');
network.handleClientState(freedomClient);
console.log('handle client');
expect(Object.keys(network.roster).length).toEqual(1);
var friend = network.getUser('fakeuser');
console.log('spy on monitor');
spyOn(friend, 'monitor');
expect(friend.isOnline()).toEqual(true);
// Wait for 5 seconds and make sure monitoring was called.
jasmine.clock().tick(5000);
console.log('tick 5000');
expect(friend.monitor).toHaveBeenCalled();
<<<<<<<
=======
expect(network.notifyUI).not.toHaveBeenCalled();
}).then(done);
});
it('can log out', (done) => {
network['onceLoggedIn_'] = loginPromise;
// Pretend the social API's logout succeeded.
spyOn(network['freedomApi_'], 'logout').and.returnValue(Promise.resolve());
spyOn(network, 'notifyUI');
var friend = network.getUser('fakeuser');
spyOn(friend, 'monitor');
// Monitoring is still running.
jasmine.clock().tick(5000);
expect(friend.monitor).toHaveBeenCalled();
network.logout().then(() => {
expect(network.isOnline()).toEqual(false);
expect(network.isLoginPending()).toEqual(false);
expect(network.notifyUI).toHaveBeenCalled();
(<any>friend.monitor).calls.reset();
jasmine.clock().tick(5000);
expect(friend.monitor).not.toHaveBeenCalled();
jasmine.clock().uninstall();
}).then(done);
});
it('does nothing to logout if already logged out', (done) => {
network['onceLoggedIn_'] = null;
spyOn(network, 'notifyUI');
network.logout().then(() => {
expect(network.isOnline()).toEqual(false);
expect(network.notifyUI).not.toHaveBeenCalled();
expect(console.warn).toHaveBeenCalledWith('Already logged out of mock');
>>>>>>>
}).then(done);
});
it('can log out', (done) => {
network['onceLoggedIn_'] = loginPromise;
// Pretend the social API's logout succeeded.
spyOn(network['freedomApi_'], 'logout').and.returnValue(Promise.resolve());
var friend = network.getUser('fakeuser');
spyOn(friend, 'monitor');
// Monitoring is still running.
jasmine.clock().tick(5000);
expect(friend.monitor).toHaveBeenCalled();
network.logout().then(() => {
(<any>friend.monitor).calls.reset();
jasmine.clock().tick(5000);
expect(friend.monitor).not.toHaveBeenCalled();
jasmine.clock().uninstall(); |
<<<<<<<
=======
toggleAdvancedSettings: function() {
this.displayAdvancedSettings = !this.displayAdvancedSettings;
if (!this.displayAdvancedSettings) {
// Hiding the advanced settings will also hide the confirmation
// messages.
this.$.confirmNewServer.hidden = true;
this.$.confirmResetServers.hidden = true;
}
},
setStunServer: function() {
model.globalSettings.stunServers = [{urls: [this.stunServer]}];
this.saveGlobalSettings();
if(!this.$.confirmResetServers.hidden) {
this.$.confirmResetServers.hidden = true;
}
this.$.confirmNewServer.hidden = false;
},
resetStunServers: function() {
model.globalSettings.stunServers = [];
core.updateGlobalSettings(model.globalSettings);
if(!this.$.confirmNewServer.hidden) {
this.$.confirmNewServer.hidden = true;
}
this.$.confirmResetServers.hidden = false;
},
>>>>>>>
<<<<<<<
openAdvancedSettingsForm: function() {
this.fire('core-signal', {name: 'open-advanced-settings'});
},
=======
saveGlobalSettings: function() {
core.updateGlobalSettings(model.globalSettings);
},
observe: {
'model.globalSettings.statsReportingEnabled' : 'saveGlobalSettings'
},
>>>>>>>
openAdvancedSettingsForm: function() {
this.fire('core-signal', {name: 'open-advanced-settings'});
},
observe: {
'model.globalSettings.statsReportingEnabled' : 'saveGlobalSettings'
}, |
<<<<<<<
=======
* Check local storage for saved state about this FreedomNetwork. If there
* exists actual state, load everything into memory. Otherwise, initialize
* to sane defaults.
*/
private syncFromStorage_ = () : Promise<void> => {
var preparedMyself = this.prepareLocalInstance_();
var preparedRoster = storage.load<NetworkState>(this.getStorePath())
.then((state) => {
this.log('loading previous state.');
this.restoreState(state);
}).catch((e) => {
this.log('freshly initialized.');
});
return Promise.all([preparedMyself, preparedRoster]);
}
/**
* Returns the local instance. If it doesn't exist, load local instance
* from storage, or create a new one if this is the first time this uProxy
* installation has interacted with this network.
*/
private prepareLocalInstance_ = () : Promise<void> => {
if (this.myInstance) {
return Promise.resolve();
}
var key = this.getStorePath() + this.SaveKeys.ME;
return storage.load<Instance>(key).then((result :Instance) => {
console.log(JSON.stringify(result));
this.myInstance = new Core.LocalInstance(this, result);
this.log('loaded local instance from storage: ' +
this.myInstance.instanceId);
return this.myInstance;
}, (e) => {
this.myInstance = new Core.LocalInstance(this);
this.log('generating new local instance: ' +
this.myInstance.instanceId);
return this.myInstance.prepare().then(() => {
return storage.save<Instance>(key, this.myInstance.currentState());
}).then((prev) => {
this.log('saved new local instance to storage');
return this.myInstance;
});
});
}
/**
>>>>>>>
<<<<<<<
public send = (recipientClientId :string,
message :uProxy.Message) : Promise<void> => {
var messageString = JSON.stringify(message);
this.log('sending ------> ' + messageString);
return this.freedomApi_.sendMessage(recipientClientId, messageString);
=======
/**
* Sends our instance handshake to a list of clients, returning a promise
* that all handshake messages have been sent.
*/
private sendInstanceHandshakes_ = (clientIds:string[]) : Promise<void> => {
var handshakes :Promise<void>[] = [];
var handshake = this.getInstanceHandshake_();
var cnt = clientIds.length;
if (!handshake) {
throw Error('Not ready to send handshake');
}
clientIds.forEach((clientId:string) => {
handshakes.push(this.send(clientId, handshake));
})
return Promise.all(handshakes).then(() => {
this.log('sent ' + cnt + ' instance handshake(s): ' +
clientIds.join(', '));
});
}
/**
* Generates my instance message, to send to other uProxy installations to
* inform them that we're also a uProxy installation to interact with.
*/
private getInstanceHandshake_ = () : uProxy.Message => {
if (!this.myInstance) {
throw Error('No local instance available!');
}
// TODO: Should we memoize the instance handshake, or calculate it fresh
// each time?
return {
type: uProxy.MessageType.INSTANCE,
data: this.myInstance.getInstanceHandshake()
}
}
/**
* Promise the sending of |msg| to a client with id |clientId|.
*/
public send = (clientId:string, msg:uProxy.Message) : Promise<void> => {
var msgString = JSON.stringify(msg);
this.log('sending ------> ' + msgString);
return this.freedomApi_.sendMessage(clientId, msgString);
}
private log = (msg:string) : void => {
console.log('[' + this.name + '] ' + msg);
}
private error = (msg:string) : void => {
console.error('!!! [' + this.name + '] ' + msg);
>>>>>>>
/**
* Promise the sending of |msg| to a client with id |clientId|.
*/
public send = (recipientClientId :string,
message :uProxy.Message) : Promise<void> => {
var messageString = JSON.stringify(message);
this.log('sending ------> ' + messageString);
return this.freedomApi_.sendMessage(recipientClientId, messageString); |
<<<<<<<
conduits: Array<Conduit>, //TODO: Verify this is the structure in the combatlog
error?: any, //TODO: Verify, is this a bool? string?
=======
conduits: Conduit[], //TODO: Verify this is the structure in the combatlog
>>>>>>>
conduits: Conduit[], //TODO: Verify this is the structure in the combatlog
error?: any, //TODO: Verify, is this a bool? string? |
<<<<<<<
public startCopyPasteShare = () : void => {
this.copyPasteSharingMessages_ = [];
=======
public startCopyPasteShare = () => {
this.resetBatcher_();
>>>>>>>
public startCopyPasteShare = () => {
this.resetBatcher_();
<<<<<<<
public sendCopyPasteSignal = (signal :social.PeerMessage) :void => {
copyPasteConnection.handleSignal(signal);
=======
public sendCopyPasteSignal = (signal:string) => {
var decodedSignals = <social.PeerMessage[]>onetime.decode(signal);
decodedSignals.forEach(copyPasteConnection.handleSignal);
}
public addUser = (inviteUrl: string): Promise<void> => {
try {
// inviteUrl may be a URL with a token, or just the token. Remove the
// prefixed URL if it is set.
var token = inviteUrl.lastIndexOf('/') >= 0 ?
inviteUrl.substr(inviteUrl.lastIndexOf('/') + 1) : inviteUrl;
var tokenObj = JSON.parse(atob(token));
var networkName = tokenObj.networkName;
var networkData = tokenObj.networkData;
if (!social_network.networks[networkName]) {
return Promise.reject('invite URL had invalid social network');
}
} catch (e) {
return Promise.reject('Error parsing invite URL');
}
// This code assumes the user is only signed in once to any given network.
for (var userId in social_network.networks[networkName]) {
return social_network.networks[networkName][userId]
.addUserRequest(networkData);
}
}
public getInviteUrl = (networkInfo: social.SocialNetworkInfo): Promise<string> => {
var network = social_network.networks[networkInfo.name][networkInfo.userId];
return network.getInviteUrl();
}
public sendEmail = (data :uproxy_core_api.EmailData) : void => {
var networkInfo = data.networkInfo;
var network = social_network.networks[networkInfo.name][networkInfo.userId];
network.sendEmail(data.to, data.subject, data.body);
>>>>>>>
public sendCopyPasteSignal = (signal:string) => {
var decodedSignals = <social.PeerMessage[]>onetime.decode(signal);
decodedSignals.forEach(copyPasteConnection.handleSignal); |
<<<<<<<
INVITE_GITHUB_USER = 1028
=======
SEND_INVITATION = 1028,
CLOUD_UPDATE = 1029,
UPDATE_ORG_POLICY = 1030,
REMOVE_CONTACT = 1031
>>>>>>>
INVITE_GITHUB_USER = 1028,
CLOUD_UPDATE = 1029,
UPDATE_ORG_POLICY = 1030,
REMOVE_CONTACT = 1031
<<<<<<<
getInviteUrl(data :CreateInviteArgs): Promise<string>;
inviteGitHubUser(data :CreateInviteArgs) : Promise<void>;
}
=======
// Installs or destroys uProxy on a server. Generally a long-running operation, so
// callers should expose CLOUD_INSTALL_STATUS updates to the user.
// This may also invoke an OAuth flow, in order to perform operations
// with the cloud computing provider on the user's behalf.
cloudUpdate(args :CloudOperationArgs): Promise<void>;
// Removes contact from roster, storage, and friend list
removeContact(args :RemoveContactArgs) : Promise<void>;
}
>>>>>>>
getInviteUrl(data :CreateInviteArgs): Promise<string>;
// Installs or destroys uProxy on a server. Generally a long-running operation, so
// callers should expose CLOUD_INSTALL_STATUS updates to the user.
// This may also invoke an OAuth flow, in order to perform operations
// with the cloud computing provider on the user's behalf.
cloudUpdate(args :CloudOperationArgs): Promise<void>;
// Removes contact from roster, storage, and friend list
removeContact(args :RemoveContactArgs) : Promise<void>;
inviteGitHubUser(data :CreateInviteArgs) : Promise<void>;
} |
<<<<<<<
var uProxyAppChannel;
var Chrome_oauth;
var connector :ChromeUIConnector;
=======
var uProxyAppChannel : OnAndEmit<any,any>;
>>>>>>>
var connector :ChromeUIConnector;
var uProxyAppChannel : OnAndEmit<any,any>;
<<<<<<<
}).then(function(UProxy:any) {
uProxyAppChannel = new UProxy();
=======
}).then(function(interface : () => OnAndEmit<any,any>) {
uProxyAppChannel = interface();
>>>>>>>
}).then(function(UProxy : () => void) {
uProxyAppChannel = new UProxy(); |
<<<<<<<
model: model,
onlineTrustedUproxyContacts: model.contacts.onlineTrustedUproxy,
offlineTrustedUproxyContacts: model.contacts.offlineTrustedUproxy,
onlineUntrustedUproxyContacts: model.contacts.onlineUntrustedUproxy,
offlineUntrustedUproxyContacts: model.contacts.offlineUntrustedUproxy,
onlineNonUproxyContacts: model.contacts.onlineNonUproxy,
offlineNonUproxyContacts: model.contacts.offlineNonUproxy,
toggleSharing: function() {
core.updateGlobalSettings({newSettings:model.globalSettings,
path:this.path});
},
=======
>>>>>>>
toggleSharing: function() {
core.updateGlobalSettings({newSettings:model.globalSettings,
path:this.path});
},
<<<<<<<
},
=======
this.ui = ui;
this.UI = UI;
// Initialize roster here.
// this.contacts contains either all the contact groups for the get tab
// or all the contact groups for the share tab.
this.onlinePending = this.contacts.onlinePending;
this.offlinePending = this.contacts.offlinePending;
this.onlineTrustedUproxyContacts = this.contacts.onlineTrustedUproxy;
this.offlineTrustedUproxyContacts = this.contacts.offlineTrustedUproxy;
this.onlineUntrustedUproxyContacts = this.contacts.onlineUntrustedUproxy;
this.offlineUntrustedUproxyContacts = this.contacts.offlineUntrustedUproxy;
this.onlineNonUproxyContacts = this.contacts.onlineNonUproxy;
this.offlineNonUproxyContacts = this.contacts.offlineNonUproxy;
},
>>>>>>>
this.ui = ui;
this.UI = UI;
// Initialize roster here.
// this.contacts contains either all the contact groups for the get tab
// or all the contact groups for the share tab.
this.onlinePending = this.contacts.onlinePending;
this.offlinePending = this.contacts.offlinePending;
this.onlineTrustedUproxyContacts = this.contacts.onlineTrustedUproxy;
this.offlineTrustedUproxyContacts = this.contacts.offlineTrustedUproxy;
this.onlineUntrustedUproxyContacts = this.contacts.onlineUntrustedUproxy;
this.offlineUntrustedUproxyContacts = this.contacts.offlineUntrustedUproxy;
this.onlineNonUproxyContacts = this.contacts.onlineNonUproxy;
this.offlineNonUproxyContacts = this.contacts.offlineNonUproxy;
}, |
<<<<<<<
enableStats: function() {
model.globalSettings.statsReportingEnabled = true;
=======
loginToQuiver: function() {
model.globalSettings.quiverUserName = this.userName;
core.updateGlobalSettings(model.globalSettings);
this.login('Quiver', this.userName);
},
loginTapped: function(event: Event, detail: Object, target: HTMLElement) {
var networkName = target.getAttribute('data-network');
this.login(networkName);
},
login: function(networkName :string, userName ?:string) {
ui.login(networkName, userName).then(() => {
// syncNetwork will update the view to the ROSTER.
ui.bringUproxyToFront();
}).catch((e: Error) => {
console.warn('Did not log in ', e);
});
},
getNetworkDisplayName: function(name :string) {
return ui.getNetworkDisplayName(name);
},
isExperimentalNetwork: function(name :string) {
return ui.isExperimentalNetwork(name);
},
updateNetworkButtonNames: function() {
this.networkButtonNames = _.filter(model.networkNames, (name) => {
// we do not want a button for Quiver
return name !== 'Quiver';
});
this.supportsQuiver = model.hasQuiverSupport();
},
updateSeenMetrics: function(val :Boolean) {
model.globalSettings.hasSeenMetrics = true;
model.globalSettings.statsReportingEnabled = val;
>>>>>>>
updateSeenMetrics: function(val :Boolean) {
model.globalSettings.hasSeenMetrics = true;
model.globalSettings.statsReportingEnabled = val; |
<<<<<<<
/// <reference path='../../third_party/typings/es6-promise/es6-promise.d.ts' />
=======
/// <reference path='../handler/queue.d.ts' />
/// <reference path="../third_party/typings/es6-promise/es6-promise.d.ts" />
/// <reference path='../freedom/typings/rtcdatachannel.d.ts' />
>>>>>>>
/// <reference path='../../third_party/typings/es6-promise/es6-promise.d.ts' />
<<<<<<<
import DataChannelClass = require('./datachannel');
import Enums = require('./webrtc.enums');
import State = Enums.State;
import SignalType = Enums.SignalType;
=======
export enum SignalType {
OFFER, ANSWER, CANDIDATE, NO_MORE_CANDIDATES
}
>>>>>>>
import DataChannelClass = require('./datachannel');
import Enums = require('./webrtc.enums');
import State = Enums.State;
import SignalType = Enums.SignalType;
<<<<<<<
// The RTCPeerConnection signalingState has changed. This state change is
// the result of either setLocalDescription() or setRemoteDescription()
// being invoked. Or it can happen when the peer connection gets
// unexpectedly closed down.
private onSignallingStateChange_ = () : void => {
this.pc_.getSignalingState().then((state) => {
if (state === 'closed') {
this.close();
return;
=======
private closeWithError_ = (s:string) : void => {
log.error(this.peerName_ + ': ' + s);
if (this.pcState === State.CONNECTING) {
this.rejectConnected_(new Error(s));
>>>>>>>
// The RTCPeerConnection signalingState has changed. This state change is
// the result of either setLocalDescription() or setRemoteDescription()
// being invoked. Or it can happen when the peer connection gets
// unexpectedly closed down.
private onSignallingStateChange_ = () : void => {
this.pc_.getSignalingState().then((state) => {
if (state === 'closed') {
this.close();
return;
<<<<<<<
// The RTCPeerConnection iceConnectionState has changed. This state change
// is a result of the browser's ICE operations. The state changes to
// 'connected' when the peer is able to ping the other side and receive a
// response, and goes to 'disconnected' or 'failed' if pings consistently
// fail.
private onIceConnectionStateChange_ = () : void => {
var state = this.pc_.getIceConnectionState().then((state:string) => {
// No action is needed when the state reaches 'connected', because
// |this.completeConnection_| is called by the datachannel's |onopen|.
if ((state === 'disconnected' || state === 'failed') &&
this.pcState != State.DISCONNECTED) {
this.closeWithError_('Connection lost: ' + state);
}
});
}
=======
// Non-close signalling state changes should only be happening when state
// is |CONNECTING|, otherwise this is an error.
// Right now in chrome in state CONNECTED, re-negotiation can happen and
// it will trigger non-close signalling state change. Till this behavior
// changes, include CONNECTED state as well.
if (this.pcState !== State.CONNECTING &&
this.pcState !== State.CONNECTED) {
// Something unexpected happened, better close down properly.
this.closeWithError_(this.peerName_ + ': ' +
'Unexpected onSignallingStateChange in state: ' +
State[this.pcState]);
return;
}
});
}
>>>>>>>
// The RTCPeerConnection iceConnectionState has changed. This state change
// is a result of the browser's ICE operations. The state changes to
// 'connected' when the peer is able to ping the other side and receive a
// response, and goes to 'disconnected' or 'failed' if pings consistently
// fail.
private onIceConnectionStateChange_ = () : void => {
var state = this.pc_.getIceConnectionState().then((state:string) => {
// No action is needed when the state reaches 'connected', because
// |this.completeConnection_| is called by the datachannel's |onopen|.
if ((state === 'disconnected' || state === 'failed') &&
this.pcState != State.DISCONNECTED) {
this.closeWithError_('Connection lost: ' + state);
}
});
}
<<<<<<<
=======
});
}
// Handle a signalling message from the remote peer.
public handleSignalMessage = (signal :SignallingMessage) : void => {
log.debug(this.peerName_ + ': ' + 'handleSignalMessage: \n' +
JSON.stringify(signal));
// If we are offering and they are also offerring at the same time, pick
// the one who has the lower hash value for their description: this is
// equivalent to having a special random id, but voids the need for an
// extra random number. TODO: instead of hash, we could use the IP/port
// candidate list which is guarenteed to be unique for 2 peers.
switch(signal.type) {
//
case SignalType.OFFER:
this.breakOfferTie_(signal.description).then(() => {
this.pcState = State.CONNECTING;
this.fulfillConnecting_();
this.pc_.setRemoteDescription(signal.description) // initial offer from peer
.then(this.pc_.createAnswer)
.then((d:freedom_RTCPeerConnection.RTCSessionDescription) => {
// As with the offer, we must emit the signal before
// setting the local description to ensure that we send the
// ANSWER before any ICE candidates.
this.signalForPeerQueue.handle(
{type: SignalType.ANSWER,
description: {type: d.type, sdp: d.sdp} });
this.pc_.setLocalDescription(d);
})
.then(() => {
this.fromPeerCandidateQueue.setHandler(this.pc_.addIceCandidate);
})
.catch((e) => {
this.closeWithError_('Failed to connect to offer:' +
e.toString());
});
})
.catch(this.closeWithError_);
break;
// Answer to an offer we sent
case SignalType.ANSWER:
this.pc_.setRemoteDescription(signal.description)
.then(() => {
this.fromPeerCandidateQueue.setHandler(this.pc_.addIceCandidate);
})
.catch((e) => {
this.closeWithError_('Failed to set remote description: ' +
': ' + JSON.stringify(signal.description) + ' (' +
typeof(signal.description) + '); Error: ' + e.toString());
});
break;
// Add remote ice candidate.
case SignalType.CANDIDATE:
// CONSIDER: Should we be passing/getting the SDP line index?
// e.g. https://code.google.com/p/webrtc/source/browse/stable/samples/js/apprtc/js/main.js#331
try {
this.fromPeerCandidateQueue.handle(signal.candidate);
} catch(e) {
log.error(this.peerName_ + ': ' + 'addIceCandidate: ' +
JSON.stringify(signal.candidate) + ' (' +
typeof(signal.candidate) + '); Error: ' + e.toString());
}
break;
case SignalType.NO_MORE_CANDIDATES:
log.debug(this.peerName_ + ': handleSignalMessage: noMoreCandidates');
break;
default:
log.error(this.peerName_ + ': ' +
'handleSignalMessage got unexpected message: ' +
JSON.stringify(signal) + ' (' + typeof(signal) + ')');
>>>>>>>
<<<<<<<
default:
log.error(this.peerName + ': ' +
'handleSignalMessage got unexpected message: ' +
JSON.stringify(signal) + ' (' + typeof(signal) + ')');
break;
} // switch
}
=======
// Open a new data channel with the peer.
public openDataChannel = (channelLabel:string,
options?:freedom_RTCPeerConnection.RTCDataChannelInit)
: Promise<DataChannel> => {
log.debug(this.peerName_ + ': ' + 'openDataChannel: ' + channelLabel +
'; options=' + JSON.stringify(options));
>>>>>>>
default:
log.error(this.peerName_ + ': ' +
'handleSignalMessage got unexpected message: ' +
JSON.stringify(signal) + ' (' + typeof(signal) + ')');
break;
} // switch
}
<<<<<<<
return this.pc_.createDataChannel(channelLabel, options)
.then(this.addRtcDataChannel_);
}
=======
// When a peer creates a data channel, this function is called with the
// |RTCDataChannelEvent|. We then create the data channel wrapper and add
// the new |DataChannel| to the |this.peerOpenedChannelQueue| to be
// handled.
private onPeerStartedDataChannel_ =
(channelInfo:{channel:string}) : void => {
log.debug(this.peerName_ + ': onPeerStartedDataChannel');
this.addRtcDataChannel_(channelInfo.channel).then((dc:DataChannel) => {
var label :string = dc.getLabel();
if (label === PeerConnection.CONTROL_CHANNEL_LABEL) {
// If the peer has started the control channel, register it
// as this user's control channel as well.
this.registerControlChannel_(dc);
} else {
// Aside from the control channel, all other channels should be
// added to the queue of peer opened channels.
this.peerOpenedChannelQueue.handle(dc);
}
});
}
>>>>>>>
return this.pc_.createDataChannel(channelLabel, options)
.then(this.addRtcDataChannel_);
}
<<<<<<<
// Saves the given data channel as the control channel for this peer
// connection. The appropriate callbacks for opening/closing
// this channel are registered here.
private registerControlChannel_ = (controlChannel:DataChannel)
: Promise<void> => {
this.controlDataChannel = controlChannel;
this.controlDataChannel.onceClosed.then(this.close);
return this.controlDataChannel.onceOpened.then(this.completeConnection_);
}
// For debugging: prints the state of the peer connection including all
// associated data channels.
public toString = () : string => {
var s :string = this.peerName + ': { \n';
var channelLabel :string;
for (channelLabel in this.dataChannels) {
s += ' ' + channelLabel + ': ' +
this.dataChannels[channelLabel].toString() + '\n';
=======
// For debugging: prints the state of the peer connection including all
// associated data channels.
public toString = () : string => {
var s :string = this.peerName_ + ': { \n';
var channelLabel :string;
for (channelLabel in this.dataChannels) {
s += ' ' + channelLabel + ': ' +
this.dataChannels[channelLabel].toString() + '\n';
}
s += '}';
return s;
>>>>>>>
// Saves the given data channel as the control channel for this peer
// connection. The appropriate callbacks for opening/closing
// this channel are registered here.
private registerControlChannel_ = (controlChannel:DataChannel)
: Promise<void> => {
this.controlDataChannel_ = controlChannel;
this.controlDataChannel_.onceClosed.then(this.close);
return this.controlDataChannel_.onceOpened.then(this.completeConnection_);
}
// For debugging: prints the state of the peer connection including all
// associated data channels.
public toString = () : string => {
var s :string = this.peerName_ + ': { \n';
var channelLabel :string;
for (channelLabel in this.dataChannels) {
s += ' ' + channelLabel + ': ' +
this.dataChannels[channelLabel].toString() + '\n'; |
<<<<<<<
export var onceReady :Promise<freedom_types.OnAndEmit<any,any>> =
loadModule().then((copypaste:freedom_types.OnAndEmit<any,any>) => {
copypaste.on('signalForPeer', (message:string) => {
=======
export var onceReady :Promise<freedom.OnAndEmit<any,any>> =
loadModule().then((copypaste:freedom.OnAndEmit<any,any>) => {
copypaste.on('signalForPeer', (message:signals.Message) => {
>>>>>>>
export var onceReady :Promise<freedom.OnAndEmit<any,any>> =
loadModule().then((copypaste:freedom.OnAndEmit<any,any>) => {
copypaste.on('signalForPeer', (message:string) => { |
<<<<<<<
new Notification('uProxy', { body: notificationText,
icon: 'icons/' + UI.DEFAULT_ICON});
=======
var notification =
new Notification('uProxy', { body: notificationText,
icon: 'icons/uproxy-128.png'});
setTimeout(function() {
notification.close();
}, 5000);
>>>>>>>
var notification =
new Notification('uProxy', { body: notificationText,
icon: 'icons/' + UI.DEFAULT_ICON});
setTimeout(function() {
notification.close();
}, 5000); |
<<<<<<<
import { AsyncTest, Expect, METADATA_KEYS, SpyOn, Timeout } from "../../../../core/alsatian-core";
import { MatchError } from "../../../../core/errors";
=======
import { AsyncTest, Expect } from "../../../../core/alsatian-core";
>>>>>>>
import { AsyncTest, Expect, METADATA_KEYS, SpyOn, Timeout } from "../../../../core/alsatian-core";
import { MatchError } from "../../../../core/errors";
<<<<<<<
import { Promise } from "../../../../promise/promise";
=======
>>>>>>>
<<<<<<<
import { TestSetBuilder } from "../../../builders/test-set-builder";
=======
import { MatchError } from "../../../../core/errors";
>>>>>>>
import { TestSetBuilder } from "../../../builders/test-set-builder"; |
<<<<<<<
network['login'] = (reconnect :boolean) => { return Promise.resolve<void>() };
=======
network['login'] = (remember:boolean) => { return Promise.resolve<void>() };
network['myInstance'] =
new local_instance.LocalInstance(network, 'localUserId');
>>>>>>>
network['login'] = (reconnect :boolean) => { return Promise.resolve<void>() };
network['myInstance'] =
new local_instance.LocalInstance(network, 'localUserId'); |
<<<<<<<
=======
import { ITestCompleteEvent, IOnTestCompleteCBFunction } from "../events";
import "reflect-metadata";
>>>>>>>
<<<<<<<
await this._runTests(testSetRunInfo, testSetResults);
=======
await this._runTests(testSetRunInfo, testSetResults);
>>>>>>>
await this._runTests(testSetRunInfo, testSetResults); |
<<<<<<<
this.imageData = profile.imageData || Constants.DEFAULT_USER_IMG;
=======
this.imageData = profile.imageData || UI.DEFAULT_USER_IMG;
this.offeringInstances = payload.offeringInstances;
this.allInstanceIds = payload.allInstanceIds;
this.updateInstanceDescriptions();
this.consent_ = payload.consent;
this.isOnline_ = payload.isOnline;
// Update gettingConsentState, used to display correct getting buttons.
if (this.offeringInstances.length > 0) {
if (this.consent_.localRequestsAccessFromRemote) {
this.gettingConsentState =
GettingConsentState.LOCAL_REQUESTED_REMOTE_GRANTED;
} else if (this.consent_.ignoringRemoteUserOffer) {
this.gettingConsentState =
GettingConsentState.REMOTE_OFFERED_LOCAL_IGNORED;
} else {
this.gettingConsentState =
GettingConsentState.REMOTE_OFFERED_LOCAL_NO_ACTION;
}
} else {
if (this.consent_.localRequestsAccessFromRemote) {
this.gettingConsentState =
GettingConsentState.LOCAL_REQUESTED_REMOTE_NO_ACTION;
} else {
this.gettingConsentState = GettingConsentState.NO_OFFER_OR_REQUEST;
}
}
// Update sharingConsentState, used to display correct sharing buttons.
if (this.consent_.remoteRequestsAccessFromLocal) {
if (this.consent_.localGrantsAccessToRemote) {
this.sharingConsentState =
SharingConsentState.LOCAL_OFFERED_REMOTE_ACCEPTED;
} else if (this.consent_.ignoringRemoteUserRequest) {
this.sharingConsentState =
SharingConsentState.REMOTE_REQUESTED_LOCAL_IGNORED;
} else {
this.sharingConsentState =
SharingConsentState.REMOTE_REQUESTED_LOCAL_NO_ACTION;
}
} else {
if (this.consent_.localGrantsAccessToRemote) {
this.sharingConsentState =
SharingConsentState.LOCAL_OFFERED_REMOTE_NO_ACTION;
} else {
this.sharingConsentState = SharingConsentState.NO_OFFER_OR_REQUEST;
}
}
>>>>>>>
this.imageData = profile.imageData || Constants.DEFAULT_USER_IMG;
this.offeringInstances = payload.offeringInstances;
this.allInstanceIds = payload.allInstanceIds;
this.updateInstanceDescriptions();
this.consent_ = payload.consent;
this.isOnline_ = payload.isOnline;
// Update gettingConsentState, used to display correct getting buttons.
if (this.offeringInstances.length > 0) {
if (this.consent_.localRequestsAccessFromRemote) {
this.gettingConsentState =
GettingConsentState.LOCAL_REQUESTED_REMOTE_GRANTED;
} else if (this.consent_.ignoringRemoteUserOffer) {
this.gettingConsentState =
GettingConsentState.REMOTE_OFFERED_LOCAL_IGNORED;
} else {
this.gettingConsentState =
GettingConsentState.REMOTE_OFFERED_LOCAL_NO_ACTION;
}
} else {
if (this.consent_.localRequestsAccessFromRemote) {
this.gettingConsentState =
GettingConsentState.LOCAL_REQUESTED_REMOTE_NO_ACTION;
} else {
this.gettingConsentState = GettingConsentState.NO_OFFER_OR_REQUEST;
}
}
// Update sharingConsentState, used to display correct sharing buttons.
if (this.consent_.remoteRequestsAccessFromLocal) {
if (this.consent_.localGrantsAccessToRemote) {
this.sharingConsentState =
SharingConsentState.LOCAL_OFFERED_REMOTE_ACCEPTED;
} else if (this.consent_.ignoringRemoteUserRequest) {
this.sharingConsentState =
SharingConsentState.REMOTE_REQUESTED_LOCAL_IGNORED;
} else {
this.sharingConsentState =
SharingConsentState.REMOTE_REQUESTED_LOCAL_NO_ACTION;
}
} else {
if (this.consent_.localGrantsAccessToRemote) {
this.sharingConsentState =
SharingConsentState.LOCAL_OFFERED_REMOTE_NO_ACTION;
} else {
this.sharingConsentState = SharingConsentState.NO_OFFER_OR_REQUEST;
}
} |
<<<<<<<
// Accepted in serialised form by configure().
export interface EncryptionConfig {
key:string
}
// Creates a sample (non-random) config, suitable for testing.
export var sampleConfig = () : EncryptionConfig => {
var bytes = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
var hex = arraybuffers.arrayBufferToHexString(bytes.buffer);
return {
key: hex
};
}
=======
export const CHUNK_SIZE :number = 16;
export const IV_SIZE :number = 16;
export interface EncryptionConfig {key:string}
>>>>>>>
export const CHUNK_SIZE :number = 16;
export const IV_SIZE :number = 16;
// Accepted in serialised form by configure().
export interface EncryptionConfig {
key:string
}
// Creates a sample (non-random) config, suitable for testing.
export var sampleConfig = () : EncryptionConfig => {
var bytes = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
var hex = arraybuffers.arrayBufferToHexString(bytes.buffer);
return {
key: hex
};
} |
<<<<<<<
=======
import { TestLoader } from "../../../../core/test-loader";
import { FileRequirer } from "../../../../core/file-requirer";
import { Expect, Test, TestCase, SpyOn, METADATA_KEYS } from "../../../../core/alsatian-core";
>>>>>>>
import { TestLoader } from "../../../../core/test-loader";
import { FileRequirer } from "../../../../core/file-requirer";
import { Expect, Test, TestCase, SpyOn, METADATA_KEYS } from "../../../../core/alsatian-core"; |
<<<<<<<
export var MESSAGE_VERSION = 4;
=======
// 4: holographic ICE
export var MESSAGE_VERSION = 4;
>>>>>>>
// 4: holographic ICE
export var MESSAGE_VERSION = 4;
<<<<<<<
export var metrics = new metrics_module.Metrics(storage);
export var pgp :PgpProvider = freedom['pgp']();
pgp.setup('', '<uproxy>');
export var publicKey :string;
pgp.exportKey().then((key :PublicKey) => {
publicKey = key.key;
})
=======
// Client version to run as, which is globals.MESSAGE_VERSION unless
// overridden in advanced settings.
export var effectiveMessageVersion = () : number => {
return settings.force_message_version || MESSAGE_VERSION;
}
export var metrics = new metrics_module.Metrics(storage);
>>>>>>>
// Client version to run as, which is globals.MESSAGE_VERSION unless
// overridden in advanced settings.
export var effectiveMessageVersion = () : number => {
return settings.force_message_version || MESSAGE_VERSION;
}
export var metrics = new metrics_module.Metrics(storage);
export var pgp :PgpProvider = freedom['pgp']();
pgp.setup('', '<uproxy>');
export var publicKey :string;
pgp.exportKey().then((key :PublicKey) => {
publicKey = key.key;
}) |
<<<<<<<
this.instances_[instanceId] =
new Core.RemoteInstance(this, instance.instanceId, instance);
this.saveToStorage();
=======
existingInstance = new Core.RemoteInstance(this, instance);
this.instances_[instanceId] = existingInstance;
}
if (data.consent) {
existingInstance.updateConsent(data.consent);
>>>>>>>
existingInstance =
new Core.RemoteInstance(this, instance.instanceId, instance);
this.instances_[instanceId] = existingInstance;
this.saveToStorage();
}
if (data.consent) {
existingInstance.updateConsent(data.consent); |
<<<<<<<
public shouldMatchAndDoesNotThrows(actualValue: string, expectedRegex: RegExp) {
let expect = Expect(actualValue);
=======
public shouldMatchAndDoesNotThrows(actualValue: any, expectedRegex: RegExp) {
const expect = Expect(actualValue);
>>>>>>>
public shouldMatchAndDoesNotThrow(actualValue: string, expectedRegex: RegExp) {
const expect = Expect(actualValue);
<<<<<<<
public shouldMatchAndDoesDoesNotThrow(actualValue: string, expectedRegex: RegExp) {
let expect = Expect(actualValue);
=======
public shouldMatchAndDoesDoesNotThrow(actualValue: any, expectedRegex: RegExp) {
const expect = Expect(actualValue);
>>>>>>>
public shouldMatchAndDoesDoesNotThrow(actualValue: string, expectedRegex: RegExp) {
const expect = Expect(actualValue);
<<<<<<<
public shouldNotMatchAndDoesNotDoesNotThrow(actualValue: string, expectedRegex: RegExp) {
let expect = Expect(actualValue);
=======
public shouldNotMatchAndDoesNotDoesNotThrow(actualValue: any, expectedRegex: RegExp) {
const expect = Expect(actualValue);
>>>>>>>
public shouldNotMatchAndDoesNotDoesNotThrow(actualValue: string, expectedRegex: RegExp) {
const expect = Expect(actualValue);
<<<<<<<
public shouldNotMatchAndDoesThrows(actualValue: string, expectedRegex: RegExp) {
let expect = Expect(actualValue);
=======
public shouldNotMatchAndDoesThrows(actualValue: any, expectedRegex: RegExp) {
const expect = Expect(actualValue);
>>>>>>>
public shouldNotMatchAndDoesThrow(actualValue: string, expectedRegex: RegExp) {
const expect = Expect(actualValue); |
<<<<<<<
import { Lifecycle, Lifecycles } from './types'
export function warn(trigger: string): void
export function warn(trigger: boolean, msg?: string): void
export function warn(trigger: any, msg?: any) {
=======
export function warn(trigger: boolean | string, msg?: string) {
>>>>>>>
import { Lifecycle, Lifecycles } from './types'
export function warn(trigger: string): void
export function warn(trigger: boolean, msg?: string): void
export function warn(trigger: any, msg?: any) {
export function warn(trigger: boolean | string, msg?: string) {
<<<<<<<
export function error(trigger: string): void
export function error(trigger: boolean, msg?: string): void
export function error(trigger: any, msg?: any) {
=======
export function error(trigger: boolean | string, msg?: string) {
>>>>>>>
export function error(trigger: string): void
export function error(trigger: boolean, msg?: string): void
export function error(trigger: any, msg?: any) {
export function error(trigger: boolean | string, msg?: string) {
<<<<<<<
}
export function defineProperty(
target: any,
key: PropertyKey,
descriptor: PropertyDescriptor
) {
Object.defineProperty(target, key, descriptor)
}
export function lifecycleCheck(lifecycle: Lifecycle | Lifecycles) {
const definedLifecycles = new Map<any, boolean>()
for (const item in lifecycle) {
definedLifecycles.set(item, true)
}
if (!definedLifecycles.has('bootstrap')) {
error(
__DEV__,
`It looks like that you didn't export the lifecycle hook [bootstrap], which would cause a mistake.`
)
}
if (!definedLifecycles.has('mount')) {
error(
__DEV__,
`It looks like that you didn't export the lifecycle hook [mount], which would cause a big mistake.`
)
}
if (!definedLifecycles.has('unmount')) {
error(
__DEV__,
`It looks like that you didn't export the lifecycle hook [unmount], which would cause a mistake.`
)
}
=======
>>>>>>>
}
export function defineProperty(
target: any,
key: PropertyKey,
descriptor: PropertyDescriptor
) {
Object.defineProperty(target, key, descriptor)
}
export function lifecycleCheck(lifecycle: Lifecycle | Lifecycles) {
const definedLifecycles = new Map<any, boolean>()
for (const item in lifecycle) {
definedLifecycles.set(item, true)
}
if (!definedLifecycles.has('bootstrap')) {
error(
__DEV__,
`It looks like that you didn't export the lifecycle hook [bootstrap], which would cause a mistake.`
)
}
if (!definedLifecycles.has('mount')) {
error(
__DEV__,
`It looks like that you didn't export the lifecycle hook [mount], which would cause a big mistake.`
)
}
if (!definedLifecycles.has('unmount')) {
error(
__DEV__,
`It looks like that you didn't export the lifecycle hook [unmount], which would cause a mistake.`
)
} |
<<<<<<<
import { Layer, Marker, PathOptions, point, SVG } from 'leaflet';
=======
import { Feature as GeoJSONFeature, FeatureCollection as GeoJSONFeatureCollection } from 'geojson';
import {Layer, Marker, PathOptions, point, SVG} from 'leaflet';
>>>>>>>
import { Feature as GeoJSONFeature, FeatureCollection as GeoJSONFeatureCollection } from 'geojson';
import { Layer, Marker, PathOptions, point, SVG } from 'leaflet'; |
<<<<<<<
import { IGenericGeoJSONFeature } from './d.ts/generic-geojson';
import { expect } from 'chai';
=======
import { GenericGeoJSONFeature } from '@yaga/generic-geojson';
>>>>>>>
import { expect } from 'chai';
import { GenericGeoJSONFeature } from '@yaga/generic-geojson';
<<<<<<<
const TEST_VALUE: IGenericGeoJSONFeature<GeoJSON.Point, any> = {
=======
var map: MapComponent,
layer: CircleDirective<any>;
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.Point, any> = {
>>>>>>>
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.Point, any> = {
<<<<<<<
layer.geoJSONChange.subscribe((eventVal: IGenericGeoJSONFeature<GeoJSON.Point, any>) => {
expect(eventVal).to.deep.equal(TEST_VALUE);
=======
layer.geoJSONChange.subscribe((eventVal: GenericGeoJSONFeature<GeoJSON.Point, any>) => {
/* istanbul ignore if */
if (eventVal.geometry.coordinates[0] !== TEST_VALUE.geometry.coordinates[0] ||
eventVal.geometry.coordinates[1] !== TEST_VALUE.geometry.coordinates[1]) {
return done(new Error('Received wrong value'));
}
>>>>>>>
layer.geoJSONChange.subscribe((eventVal: GenericGeoJSONFeature<GeoJSON.Point, any>) => {
expect(eventVal).to.deep.equal(TEST_VALUE);
<<<<<<<
layer.geoJSONChange.subscribe((eventVal: IGenericGeoJSONFeature<GeoJSON.Point, any>) => {
expect(eventVal.geometry.coordinates[0]).to.equal(TEST_POINT[1]);
expect(eventVal.geometry.coordinates[1]).to.equal(TEST_POINT[0]);
=======
layer.geoJSONChange.subscribe((eventVal: GenericGeoJSONFeature<GeoJSON.Point, any>) => {
const values: [number, number] = (<any>eventVal.geometry.coordinates);
/* istanbul ignore if */
if (values[0] !== TEST_POINT[1] ||
values[1] !== TEST_POINT[0]) {
return done(new Error('Received wrong value'));
}
>>>>>>>
layer.geoJSONChange.subscribe((eventVal: GenericGeoJSONFeature<GeoJSON.Point, any>) => {
expect(eventVal.geometry.coordinates[0]).to.equal(TEST_POINT[1]);
expect(eventVal.geometry.coordinates[1]).to.equal(TEST_POINT[0]);
<<<<<<<
layer.geoJSONChange.subscribe((eventVal: IGenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => {
expect(eventVal.properties).to.equal(TEST_OBJECT);
=======
layer.geoJSONChange.subscribe((val: GenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => {
/* istanbul ignore if */
if (val.properties !== TEST_OBJECT) {
return done(new Error('Wrong value received'));
}
>>>>>>>
layer.geoJSONChange.subscribe((eventVal: GenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => {
expect(eventVal.properties).to.equal(TEST_OBJECT); |
<<<<<<<
const TEST_VALUE: IGenericGeoJSONFeature<GeoJSON.Polygon, any> = {
=======
var map: MapComponent,
layer: RectangleDirective<any>;
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.Polygon, any> = {
>>>>>>>
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.Polygon, any> = {
<<<<<<<
const TEST_VALUE: IGenericGeoJSONFeature<GeoJSON.MultiPolygon, any> = {
=======
var map: MapComponent,
layer: RectangleDirective<any>;
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.MultiPolygon, any> = {
>>>>>>>
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.MultiPolygon, any> = {
<<<<<<<
layerWithProperties.geoJSONChange.subscribe((val: IGenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => {
=======
layer.geoJSONChange.subscribe((val: GenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => {
>>>>>>>
layerWithProperties.geoJSONChange.subscribe((val: GenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => { |
<<<<<<<
import { IGenericGeoJSONFeature } from './d.ts/generic-geojson';
import { expect } from 'chai';
=======
import { GenericGeoJSONFeature } from '@yaga/generic-geojson';
>>>>>>>
import { expect } from 'chai';
import { GenericGeoJSONFeature } from '@yaga/generic-geojson';
<<<<<<<
const TEST_VALUE: IGenericGeoJSONFeature<GeoJSON.LineString, any> = {
=======
var map: MapComponent,
layer: PolylineDirective<any>;
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.LineString, any> = {
>>>>>>>
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.LineString, any> = {
<<<<<<<
const TEST_VALUE: IGenericGeoJSONFeature<GeoJSON.MultiLineString, any> = {
=======
var map: MapComponent,
layer: PolylineDirective<any>;
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.MultiLineString, any> = {
>>>>>>>
const TEST_VALUE: GenericGeoJSONFeature<GeoJSON.MultiLineString, any> = {
<<<<<<<
layerWithPropertiesInterface.geoJSONChange.subscribe((val: IGenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => {
=======
layer.geoJSONChange.subscribe((val: GenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => {
>>>>>>>
layerWithPropertiesInterface.geoJSONChange.subscribe((val: GenericGeoJSONFeature<GeoJSON.GeometryObject, ITestProperties>) => { |
<<<<<<<
export * from './wms-layer.directive';
=======
export * from './icon.directive';
export * from './div-icon.directive';
export * from './tooltip.directive';
>>>>>>>
export * from './wms-layer.directive';
export * from './icon.directive';
export * from './div-icon.directive';
export * from './tooltip.directive';
<<<<<<<
Point,
WMSParams } from 'leaflet';
=======
LatLng,
Direction,
Point } from 'leaflet';
>>>>>>>
LatLng,
Direction,
Point,
WMSParams } from 'leaflet'; |
<<<<<<<
export * from './icon.directive';
export * from './div-icon.directive';
export * from './tooltip.directive';
=======
export * from './icon.directive';
export * from './div-icon.directive';
>>>>>>>
export * from './icon.directive';
export * from './div-icon.directive';
export * from './tooltip.directive';
<<<<<<<
TooltipOptions,
ImageOverlayOptions,
IconOptions,
=======
ImageOverlayOptions,
IconOptions,
>>>>>>>
TooltipOptions,
ImageOverlayOptions,
ImageOverlayOptions,
IconOptions,
<<<<<<<
LatLng,
Direction,
Point } from 'leaflet';
=======
Point } from 'leaflet';
>>>>>>>
LatLng,
Direction,
Point } from 'leaflet'; |
<<<<<<<
@Input() set tileSize(val: Point) {
(<TileLayerOptions>(<any>this).options).tileSize = val;
=======
set tileSize(val: Point) {
this.options.tileSize = val;
>>>>>>>
@Input() set tileSize(val: Point) {
(<TileLayerOptions>(<any>this).options).tileSize = val;
this.options.tileSize = val;
<<<<<<<
@Input() set updateWhenIdle(val: boolean) {
(<TileLayerOptions>(<any>this).options).updateWhenIdle = val;
=======
set updateWhenIdle(val: boolean) {
this.options.updateWhenIdle = val;
>>>>>>>
@Input() set updateWhenIdle(val: boolean) {
(<TileLayerOptions>(<any>this).options).updateWhenIdle = val;
this.options.updateWhenIdle = val;
<<<<<<<
@Input() set updateWhenZooming(val: boolean) {
(<TileLayerOptions>(<any>this).options).updateWhenZooming = val;
=======
set updateWhenZooming(val: boolean) {
this.options.updateWhenZooming = val;
>>>>>>>
@Input() set updateWhenZooming(val: boolean) {
this.options.updateWhenZooming = val;
<<<<<<<
@Input() set updateInterval(val: number) {
(<TileLayerOptions>(<any>this).options).updateInterval = val;
=======
set updateInterval(val: number) {
this.options.updateInterval = val;
>>>>>>>
@Input() set updateInterval(val: number) {
this.options.updateInterval = val;
<<<<<<<
@Input() set bounds(val: LatLngBoundsExpression) {
(<TileLayerOptions>(<any>this).options).bounds = val;
=======
set bounds(val: LatLngBoundsExpression) {
this.options.bounds = val;
>>>>>>>
@Input() set bounds(val: LatLngBoundsExpression) {
this.options.bounds = val;
<<<<<<<
@Input() set noWrap(val: boolean) {
(<TileLayerOptions>(<any>this).options).noWrap = val;
=======
set noWrap(val: boolean) {
this.options.noWrap = val;
>>>>>>>
@Input() set noWrap(val: boolean) {
this.options.noWrap = val;
<<<<<<<
@Input() set className(val: string) {
(<TileLayerOptions>(<any>this).options).className = val;
=======
set className(val: string) {
this.options.className = val;
>>>>>>>
@Input() set className(val: string) {
this.options.className = val;
<<<<<<<
@Input() set keepBuffer(val: number) {
(<TileLayerOptions>(<any>this).options).keepBuffer = val;
=======
set keepBuffer(val: number) {
this.options.keepBuffer = val;
>>>>>>>
@Input() set keepBuffer(val: number) {
this.options.keepBuffer = val;
<<<<<<<
@Input() set maxNativeZoom(val: number) {
(<TileLayerOptions>(<any>this).options).maxNativeZoom = val;
=======
set maxNativeZoom(val: number) {
this.options.maxNativeZoom = val;
>>>>>>>
@Input() set maxNativeZoom(val: number) {
this.options.maxNativeZoom = val;
<<<<<<<
@Input() set subdomains(val: string[]) {
(<TileLayerOptions>(<any>this).options).subdomains = val;
=======
set subdomains(val: string[]) {
this.options.subdomains = val;
>>>>>>>
@Input() set subdomains(val: string[]) {
this.options.subdomains = val;
<<<<<<<
@Input() set errorTileUrl(val: string) {
(<TileLayerOptions>(<any>this).options).errorTileUrl = val;
=======
set errorTileUrl(val: string) {
this.options.errorTileUrl = val;
>>>>>>>
@Input() set errorTileUrl(val: string) {
this.options.errorTileUrl = val;
<<<<<<<
@Input() set zoomOffset(val: number) {
(<TileLayerOptions>(<any>this).options).zoomOffset = val;
=======
set zoomOffset(val: number) {
this.options.zoomOffset = val;
>>>>>>>
@Input() set zoomOffset(val: number) {
this.options.zoomOffset = val;
<<<<<<<
@Input() set tms(val: boolean) {
(<TileLayerOptions>(<any>this).options).tms = val;
=======
set tms(val: boolean) {
this.options.tms = val;
>>>>>>>
@Input() set tms(val: boolean) {
this.options.tms = val;
<<<<<<<
@Input() set zoomReverse(val: boolean) {
(<TileLayerOptions>(<any>this).options).zoomReverse = val;
=======
set zoomReverse(val: boolean) {
this.options.zoomReverse = val;
>>>>>>>
@Input() set zoomReverse(val: boolean) {
this.options.zoomReverse = val;
<<<<<<<
@Input() set detectRetina(val: boolean) {
(<TileLayerOptions>(<any>this).options).detectRetina = val;
=======
set detectRetina(val: boolean) {
this.options.detectRetina = val;
>>>>>>>
@Input() set detectRetina(val: boolean) {
this.options.detectRetina = val;
<<<<<<<
@Input() set crossOrigin(val: boolean) {
(<TileLayerOptions>(<any>this).options).crossOrigin = val;
=======
set crossOrigin(val: boolean) {
this.options.crossOrigin = val;
>>>>>>>
@Input() set crossOrigin(val: boolean) {
this.options.crossOrigin = val; |
<<<<<<<
import { AttributionControlDirective } from './attribution-control.directive';
=======
import { ScaleControlDirective } from './scale-control.directive';
>>>>>>>
import { AttributionControlDirective } from './attribution-control.directive';
import { ScaleControlDirective } from './scale-control.directive';
<<<<<<<
CircleMarkerDirective,
AttributionControlDirective
=======
CircleMarkerDirective,
ScaleControlDirective
>>>>>>>
CircleMarkerDirective,
AttributionControlDirective
ScaleControlDirective
<<<<<<<
CircleMarkerDirective,
AttributionControlDirective
=======
CircleMarkerDirective,
ScaleControlDirective
>>>>>>>
CircleMarkerDirective,
AttributionControlDirective
ScaleControlDirective |
<<<<<<<
private _tap: boolean = false;
public get tap(): boolean {
return this._tap;
}
=======
private _versionRequested: boolean = false;
public get versionRequested(): boolean {
return this._versionRequested;
}
>>>>>>>
private _tap: boolean = false;
public get tap(): boolean {
return this._tap;
}
private _versionRequested: boolean = false;
public get versionRequested(): boolean {
return this._versionRequested;
}
<<<<<<<
args = this._extractTap(args);
=======
args = this._extractVersionRequested(args);
>>>>>>>
args = this._extractTap(args);
args = this._extractVersionRequested(args);
<<<<<<<
private _extractTap(args: Array<string>): Array<string> {
const argumentIndex = this._getArgumentIndexFromArgumentList(args, "tap", "T");
// if we found the tap argument, we want to enable tap output
this._tap = (argumentIndex !== -1);
// filter out the tap argument and return the other args
return args.filter((value, index) => {
return index !== argumentIndex;
});
}
=======
private _extractVersionRequested(args: Array<string>) {
let versionRequesteIndex = this._getArgumentIndexFromArgumentList(args, "version", "v");
if (versionRequesteIndex > -1) {
this._versionRequested = true;
return args.filter((value, index) => {
return index !== versionRequesteIndex;
});
}
return args;
}
>>>>>>>
private _extractTap(args: Array<string>): Array<string> {
const argumentIndex = this._getArgumentIndexFromArgumentList(args, "tap", "T");
// if we found the tap argument, we want to enable tap output
this._tap = (argumentIndex !== -1);
// filter out the tap argument and return the other args
return args.filter((value, index) => {
return index !== argumentIndex;
});
}
private _extractVersionRequested(args: Array<string>) {
let versionRequesteIndex = this._getArgumentIndexFromArgumentList(args, "version", "v");
if (versionRequesteIndex > -1) {
this._versionRequested = true;
return args.filter((value, index) => {
return index !== versionRequesteIndex;
});
}
return args;
} |
<<<<<<<
if (
!_.isEmpty(options.consumerVersionTag) ||
!_.isEmpty(options.providerVersionTag)
) {
logger.warn(
"'consumerVersionTag' and 'providerVersionTag' have been deprecated, please use 'consumerVersionTags' or 'providerVersionTags' instead",
);
}
=======
if (options.includeWipPactsSince !== undefined) {
checkTypes.assert.nonEmptyString(options.includeWipPactsSince);
}
>>>>>>>
if (
!_.isEmpty(options.consumerVersionTag) ||
!_.isEmpty(options.providerVersionTag)
) {
logger.warn(
"'consumerVersionTag' and 'providerVersionTag' have been deprecated, please use 'consumerVersionTags' or 'providerVersionTags' instead",
);
if (options.includeWipPactsSince !== undefined) {
checkTypes.assert.nonEmptyString(options.includeWipPactsSince);
} |
<<<<<<<
BatchedNetworkPeer.prototype.sendPacket = procHacker.js('BatchedNetworkPeer::sendPacket', RawTypeId.Void, {this:BatchedNetworkPeer}, CxxStringStructure, RawTypeId.Int32, RawTypeId.Int32, RawTypeId.Int32, RawTypeId.Int32);
=======
BatchedNetworkPeer.prototype.sendPacket = makefunc.js(proc['BatchedNetworkPeer::sendPacket'], RawTypeId.Void, {this:BatchedNetworkPeer}, CxxStringWrapper, RawTypeId.Int32, RawTypeId.Int32, RawTypeId.Int32, RawTypeId.Int32);
>>>>>>>
BatchedNetworkPeer.prototype.sendPacket = procHacker.js('BatchedNetworkPeer::sendPacket', RawTypeId.Void, {this:BatchedNetworkPeer}, CxxStringWrapper, RawTypeId.Int32, RawTypeId.Int32, RawTypeId.Int32, RawTypeId.Int32);
<<<<<<<
const getXuid = procHacker.js("ExtendedCertificate::getXuid", CxxStringPointer, {structureReturn: true}, Certificate);
const getIdentityName = procHacker.js("ExtendedCertificate::getIdentityName", CxxStringPointer, {structureReturn: true}, Certificate);
const getTitleId = procHacker.js("ExtendedCertificate::getTitleID", RawTypeId.Int32, {}, Certificate);
const getIdentity = procHacker.js("ExtendedCertificate::getIdentity", mce.UUIDPointer, {structureReturn: true}, Certificate);
ConnectionReqeust.abstract({
=======
const getXuid = makefunc.js(proc["ExtendedCertificate::getXuid"], CxxStringWrapper, {structureReturn: true}, Certificate);
const getIdentityName = makefunc.js(proc["ExtendedCertificate::getIdentityName"], CxxStringWrapper, {structureReturn: true}, Certificate);
const getTitleId = makefunc.js(proc["ExtendedCertificate::getTitleID"], RawTypeId.Int32, null, Certificate);
const getIdentity = makefunc.js(proc["ExtendedCertificate::getIdentity"], mce.UUIDWrapper, {structureReturn: true}, Certificate);
ConnectionRequest.abstract({
>>>>>>>
const getXuid = procHacker.js("ExtendedCertificate::getXuid", CxxStringWrapper, {structureReturn: true}, Certificate);
const getIdentityName = procHacker.js("ExtendedCertificate::getIdentityName", CxxStringWrapper, {structureReturn: true}, Certificate);
const getTitleId = procHacker.js("ExtendedCertificate::getTitleID", RawTypeId.Int32, null, Certificate);
const getIdentity = procHacker.js("ExtendedCertificate::getIdentity", mce.UUIDWrapper, {structureReturn: true}, Certificate);
ConnectionRequest.abstract({ |
<<<<<<<
export import VoidPointer = core.VoidPointer;
export import StaticPointer = core.StaticPointer;
export import NativePointer = core.NativePointer;
export import ipfilter = core.ipfilter;
export import jshook = core.jshook;
export import createPacket = nethook.createPacket;
export import sendPacket = nethook.sendPacket;
export import PacketId = MinecraftPacketIds;
=======
import VoidPointer = core.VoidPointer;
import StaticPointer = core.StaticPointer;
import NativePointer = core.NativePointer;
import ipfilter = core.ipfilter;
import jshook = core.jshook;
import createPacket = nethook.createPacket;
import sendPacket = nethook.sendPacket;
/** @deprecated use MinecraftPacketIds, matching to the original name */
import PacketId = MinecraftPacketIds;
>>>>>>>
export import VoidPointer = core.VoidPointer;
export import StaticPointer = core.StaticPointer;
export import NativePointer = core.NativePointer;
export import ipfilter = core.ipfilter;
export import jshook = core.jshook;
export import createPacket = nethook.createPacket;
export import sendPacket = nethook.sendPacket;
/** @deprecated use MinecraftPacketIds, matching to the original name */
export import PacketId = MinecraftPacketIds; |
<<<<<<<
type: uint8_t,
name: CxxString,
message: CxxString,
needsTranslation: [uint8_t, 0x90],
=======
type: [uint8_t, 0x28],
needsTranslation: [bool_t, 0x29],
name: [CxxString, 0x30],
message: [CxxString, 0x50],
>>>>>>>
type: uint8_t,
name: CxxString,
message: CxxString,
needsTranslation: [bool_t, 0x90],
<<<<<<<
value: uint8_t
=======
health: [uint8_t, 0x28]
>>>>>>>
health: uint8_t
<<<<<<<
unknown:bin64_t;
unknown2:bin64_t;
uniqueId:bin64_t;
eventType:uint32_t;
Name:CxxString;
hp:float32_t;
=======
entityUniqueId:bin64_t;
type:uint32_t;
title:CxxString;
healthPercent:float32_t;
>>>>>>>
unknown:bin64_t;
entityUniqueId:bin64_t;
unknown2:bin64_t;
type:uint32_t;
title:CxxString;
healthPercent:float32_t;
<<<<<<<
unknown:bin64_t,
uniqueId:bin64_t,
unknown2:bin64_t,
eventType:uint32_t,
Name:CxxString,
hp:float32_t,
=======
entityUniqueId:[bin64_t, 0x30],
type:[uint32_t, 0x40],
title:[CxxString, 0x48],
healthPercent:[float32_t, 0x68],
>>>>>>>
unknown:bin64_t,
entityUniqueId:bin64_t,
unknown2:bin64_t,
type:uint32_t,
title:CxxString,
healthPercent:float32_t, |
<<<<<<<
FunctionSpy,
RestorableFunctionSpy,
=======
>>>>>>>
FunctionSpy,
RestorableFunctionSpy, |
<<<<<<<
export * from './models/FileInfoCard';
export * from './models/AdaptiveCard';
export * from './models/TaskModuleAction';
export * from './models/TaskModuleResponse';
=======
export * from './models/FileInfoCard';
export * from './models/ListCard';
>>>>>>>
export * from './models/FileInfoCard';
export * from './models/AdaptiveCard';
export * from './models/TaskModuleAction';
export * from './models/TaskModuleResponse';
export * from './models/ListCard'; |
<<<<<<<
* Return a list of members in a conversation or channel
=======
* @deprecated Since version 0.1.2 Will be deleted in version 0.1.5. Use fetchMembers(serverUrl, conversationId, callback).
* Return a list of members in a team or channel
>>>>>>>
* @deprecated Since version 0.1.2 Will be deleted in version 0.1.5. Use fetchMembers(serverUrl, conversationId, callback).
* Return a list of members in a conversation or channel |
<<<<<<<
import { InMemorySigner } from "@taquito/signer";
=======
import { storageContract } from "./data/storage-contract";
>>>>>>>
import { InMemorySigner } from "@taquito/signer";
import { storageContract } from "./data/storage-contract"; |
<<<<<<<
knownBigMapContract: string,
protocol: Protocols
=======
protocol: Protocols,
signerConfig: EphemeralConfig | FaucetConfig
}
/**
* SignerType specifies the different signer options used in the integration test suite. EPHEMERAL_KEY relies on a the [tezos-key-get-api](https://github.com/ecadlabs/tezos-key-gen-api)
*/
enum SignerType {
FAUCET,
EPHEMERAL_KEY
>>>>>>>
knownBigMapContract: string,
protocol: Protocols,
signerConfig: EphemeralConfig | FaucetConfig
}
/**
* SignerType specifies the different signer options used in the integration test suite. EPHEMERAL_KEY relies on a the [tezos-key-get-api](https://github.com/ecadlabs/tezos-key-gen-api)
*/
enum SignerType {
FAUCET,
EPHEMERAL_KEY
<<<<<<<
const configs = providers.map(({ rpc, knownBaker, knownContract, knownBigMapContract, protocol }) => {
=======
const configs = providers.map(({ rpc, knownBaker, knownContract, protocol, signerConfig }) => {
>>>>>>>
const configs = providers.map(({ rpc, knownBaker, knownContract, protocol, knownBigMapContract, signerConfig }) => {
<<<<<<<
rpc, knownBaker, knownContract, knownBigMapContract, protocol, lib: Tezos, setup: async () => {
let faucetKey = {
email: "[email protected]",
password: "y4BX7qS1UE", mnemonic: [
"skate",
"damp",
"faculty",
"morning",
"bring",
"ridge",
"traffic",
"initial",
"piece",
"annual",
"give",
"say",
"wrestle",
"rare",
"ability"
],
secret: "7d4c8c3796fdbf4869edb5703758f0e5831f5081"
}
if (faucetKeyFile) {
faucetKey = JSON.parse(fs.readFileSync(faucetKeyFile).toString())
}
=======
rpc,
knownBaker,
knownContract,
protocol,
lib: Tezos,
signerConfig,
setup: async () => {
if (signerConfig.type === SignerType.FAUCET) {
const faucetKey: any = faucetKeyFile || signerConfig.faucetKey
await importKey(Tezos, faucetKey.email, faucetKey.password, faucetKey.mnemonic.join(" "), faucetKey.secret)
} else if(signerConfig.type === SignerType.EPHEMERAL_KEY) {
>>>>>>>
rpc,
knownBaker,
knownContract,
knownBigMapContract,
protocol,
lib: Tezos,
signerConfig,
setup: async () => {
if (signerConfig.type === SignerType.FAUCET) {
const faucetKey: any = faucetKeyFile || signerConfig.faucetKey
await importKey(Tezos, faucetKey.email, faucetKey.password, faucetKey.mnemonic.join(" "), faucetKey.secret)
} else if (signerConfig.type === SignerType.EPHEMERAL_KEY) { |
<<<<<<<
BakingRightsQueryArguments,
BakingRightsResponse,
=======
BallotListResponse,
BallotsResponse,
PeriodKindResponse,
CurrentProposalResponse,
CurrentQuorumResponse,
VotesListingsResponse,
ProposalsResponse,
>>>>>>>
BakingRightsQueryArguments,
BakingRightsResponse,
BallotListResponse,
BallotsResponse,
PeriodKindResponse,
CurrentProposalResponse,
CurrentQuorumResponse,
VotesListingsResponse,
ProposalsResponse,
<<<<<<<
* @param args contains optional query arguments
* @param options contains generic configuration for rpc calls
*
* @description Retrieves the list of delegates allowed to bake a block.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-helpers-baking-rights
*/
async getBakingRights(
args: BakingRightsQueryArguments = {},
{ block }: RPCOptions = defaultRPCOptions
): Promise<BakingRightsResponse> {
const response = await this.httpBackend.createRequest<BakingRightsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/helpers/baking_rights`,
method: 'GET',
query: args,
});
const convResponse: any = camelCaseProps(response);
return {
...convResponse,
};
}
/**
*
=======
* @param options contains generic configuration for rpc calls
*
* @description Ballots casted so far during a voting period
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-ballot-list
*/
async getBallotList({ block }: RPCOptions = defaultRPCOptions): Promise<BallotListResponse> {
const response = await this.httpBackend.createRequest<BallotListResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/ballot_list`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Sum of ballots casted so far during a voting period.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-ballots
*/
async getBallots({ block }: RPCOptions = defaultRPCOptions): Promise<BallotsResponse> {
const response = await this.httpBackend.createRequest<BallotsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/ballots`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Current period kind.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-current-period-kind
*/
async getCurrentPeriodKind({ block }: RPCOptions = defaultRPCOptions): Promise<
PeriodKindResponse
> {
const response = await this.httpBackend.createRequest<PeriodKindResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/current_period_kind`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Current proposal under evaluation.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-current-proposal
*/
async getCurrentProposal({ block }: RPCOptions = defaultRPCOptions): Promise<
CurrentProposalResponse
> {
const response = await this.httpBackend.createRequest<CurrentProposalResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/current_proposal`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Current expected quorum.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-current-quorum
*/
async getCurrentQuorum({ block }: RPCOptions = defaultRPCOptions): Promise<
CurrentQuorumResponse
> {
const response = await this.httpBackend.createRequest<CurrentQuorumResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/current_quorum`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description List of delegates with their voting weight, in number of rolls.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-listings
*/
async getVotesListings({ block }: RPCOptions = defaultRPCOptions): Promise<
VotesListingsResponse
> {
const response = await this.httpBackend.createRequest<VotesListingsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/listings`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description List of proposals with number of supporters.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-proposals
*/
async getProposals({ block }: RPCOptions = defaultRPCOptions): Promise<ProposalsResponse> {
const response = await this.httpBackend.createRequest<ProposalsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/proposals`,
method: 'GET',
});
return response;
}
/**
*
>>>>>>>
* @param args contains optional query arguments
* @param options contains generic configuration for rpc calls
*
* @description Retrieves the list of delegates allowed to bake a block.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-helpers-baking-rights
*/
async getBakingRights(
args: BakingRightsQueryArguments = {},
{ block }: RPCOptions = defaultRPCOptions
): Promise<BakingRightsResponse> {
const response = await this.httpBackend.createRequest<BakingRightsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/helpers/baking_rights`,
method: 'GET',
query: args,
});
const convResponse: any = camelCaseProps(response);
return {
...convResponse,
};
}
/**
* @param options contains generic configuration for rpc calls
*
* @description Ballots casted so far during a voting period
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-ballot-list
*/
async getBallotList({ block }: RPCOptions = defaultRPCOptions): Promise<BallotListResponse> {
const response = await this.httpBackend.createRequest<BallotListResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/ballot_list`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Sum of ballots casted so far during a voting period.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-ballots
*/
async getBallots({ block }: RPCOptions = defaultRPCOptions): Promise<BallotsResponse> {
const response = await this.httpBackend.createRequest<BallotsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/ballots`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Current period kind.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-current-period-kind
*/
async getCurrentPeriodKind({ block }: RPCOptions = defaultRPCOptions): Promise<
PeriodKindResponse
> {
const response = await this.httpBackend.createRequest<PeriodKindResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/current_period_kind`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Current proposal under evaluation.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-current-proposal
*/
async getCurrentProposal({ block }: RPCOptions = defaultRPCOptions): Promise<
CurrentProposalResponse
> {
const response = await this.httpBackend.createRequest<CurrentProposalResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/current_proposal`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description Current expected quorum.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-current-quorum
*/
async getCurrentQuorum({ block }: RPCOptions = defaultRPCOptions): Promise<
CurrentQuorumResponse
> {
const response = await this.httpBackend.createRequest<CurrentQuorumResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/current_quorum`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description List of delegates with their voting weight, in number of rolls.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-listings
*/
async getVotesListings({ block }: RPCOptions = defaultRPCOptions): Promise<
VotesListingsResponse
> {
const response = await this.httpBackend.createRequest<VotesListingsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/listings`,
method: 'GET',
});
return response;
}
/**
*
* @param options contains generic configuration for rpc calls
*
* @description List of proposals with number of supporters.
*
* @see https://tezos.gitlab.io/mainnet/api/rpc.html#get-block-id-votes-proposals
*/
async getProposals({ block }: RPCOptions = defaultRPCOptions): Promise<ProposalsResponse> {
const response = await this.httpBackend.createRequest<ProposalsResponse>({
url: `${this.url}/chains/${this.chain}/blocks/${block}/votes/proposals`,
method: 'GET',
});
return response;
}
/**
* |
<<<<<<<
PackDataParams,
PackDataResponse,
=======
BigMapResponse,
>>>>>>>
PackDataParams,
PackDataResponse,
BigMapResponse, |
<<<<<<<
import { Promise } from "../../../../promise/promise";
import { TestBuilder } from "../../../builders/test-builder";
import { TestFixtureBuilder } from "../../../builders/test-fixture-builder";
import { TestSetBuilder } from "../../../builders/test-set-builder";
=======
import "reflect-metadata";
>>>>>>>
import { TestBuilder } from "../../../builders/test-builder";
import { TestFixtureBuilder } from "../../../builders/test-fixture-builder";
import { TestSetBuilder } from "../../../builders/test-set-builder"; |
<<<<<<<
export async function changeColorSetting(
backgroundHex: string,
foregroundHex: string
) {
=======
export async function changeColorSetting(colorCustomizations: {}) {
return await workspace
.getConfiguration()
.update(
'workbench.colorCustomizations',
colorCustomizations,
vscode.ConfigurationTarget.Workspace
);
}
function prepareColors(backgroundHex: string, foregroundHex: string) {
>>>>>>>
export async function changeColorSetting(
backgroundHex: string,
foregroundHex: string
) {
return await workspace
.getConfiguration()
.update(
'workbench.colorCustomizations',
colorCustomizations,
vscode.ConfigurationTarget.Workspace
);
}
function prepareColors(backgroundHex: string, foregroundHex: string) {
<<<<<<<
let settingsToReset = [];
=======
>>>>>>>
let settingsToReset = [];
<<<<<<<
Object.values(settingsToReset).forEach(setting => {
delete newColorCustomizations[setting];
});
return await workspace
.getConfiguration()
.update('workbench.colorCustomizations', newColorCustomizations, false);
=======
return newColorCustomizations;
>>>>>>>
Object.values(settingsToReset).forEach(setting => {
delete newColorCustomizations[setting];
});
return newColorCustomizations;
}
export async function promptForColor() {
const options: vscode.InputBoxOptions = {
ignoreFocusOut: true,
placeHolder: BuiltInColors.Vue,
prompt:
'Enter a background color for the title bar in RGB hex format or a valid HTML color name',
value: BuiltInColors.Vue
};
const inputColor = await vscode.window.showInputBox(options);
return inputColor || '';
}
export function invertColor(hex: string) {
// credit: https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color
if (hex.indexOf('#') === 0) {
hex = hex.slice(1);
}
// convert 3-digit hex to 6-digits.
if (hex.length === 3) {
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
if (hex.length !== 6) {
throw new Error(`Invalid HEX color ${hex}`);
}
const r = parseInt(hex.slice(0, 2), 16);
const g = parseInt(hex.slice(2, 4), 16);
const b = parseInt(hex.slice(4, 6), 16);
const useDark = r * 0.299 + g * 0.587 + b * 0.114 > 186;
let foreground = useDark ? getDarkForeground() : getLightForeground();
// credit: http://stackoverflow.com/a/3943023/112731
return foreground;
}
function getDarkForeground() {
const foregroundOverride = readConfiguration<string>(Settings.darkForeground);
return foregroundOverride || ForegroundColors.DarkForeground;
}
function getLightForeground() {
const foregroundOverride = readConfiguration<string>(
Settings.lightForeground
);
return foregroundOverride || ForegroundColors.LightForeground;
}
export function formatHex(input: string = '') {
return input.substr(0, 1) === '#' ? input : `#${input}`;
}
export function generateRandomHexColor() {
// credit: https://www.paulirish.com/2009/random-hex-color-code-snippets/
const hex = (
'000000' + Math.floor(Math.random() * 16777215).toString(16)
).slice(-6);
return '#' + hex;
}
export function isSelected(setting: string) {
const affectedElements = readConfiguration<string[]>(
Settings.affectedElements,
[]
);
// check if they requested a setting
const itExists: boolean = !!(
affectedElements && affectedElements.includes(setting)
);
return itExists;
}
export function readWorkspaceConfiguration<T>(
colorSettings: ColorSettings,
defaultValue?: T | undefined
) {
const value: T | undefined = workspace
.getConfiguration(Sections.workspacePeacockSection)
.get<T | undefined>(colorSettings, defaultValue);
return value as T;
}
export function readConfiguration<T>(
setting: Settings,
defaultValue?: T | undefined
) {
const value: T | undefined = workspace
.getConfiguration(Sections.userPeacockSection)
.get<T | undefined>(setting, defaultValue);
return value as T;
}
export function convertNameToHex(name: string) {
return namedColors[name]; |
<<<<<<<
=======
export enum VimSpecialCommands {
Nothing,
ShowCommandLine,
Dot
}
export class ViewChange {
public command: string;
public args: any;
}
>>>>>>>
export class ViewChange {
public command: string;
public args: any;
}
<<<<<<<
public isMultiCursor = false;
=======
public static lastRepeatableMovement : BaseMovement | undefined = undefined;
>>>>>>>
/**
* Are multiple cursors currently present?
*/
public isMultiCursor = false;
public static lastRepeatableMovement : BaseMovement | undefined = undefined;
<<<<<<<
if (ModeHandler.IsTesting) {
return;
}
=======
if (e.textEditor.document.fileName !== this.fileName) {
return;
}
>>>>>>>
if (ModeHandler.IsTesting) {
return;
}
<<<<<<<
// If arrow keys or mouse was used prior to entering characters while in insert mode, create an undo point
// this needs to happen before any changes are made
/*
TODO
=======
// If arrow keys or mouse were in insert mode, create an undo point.
// This needs to happen before any changes are made
>>>>>>>
// If arrow keys or mouse was used prior to entering characters while in insert mode, create an undo point
// this needs to happen before any changes are made
/*
TODO
// If arrow keys or mouse were in insert mode, create an undo point.
// This needs to happen before any changes are made
<<<<<<<
=======
// console.log(vimState.historyTracker.toString());
>>>>>>> |
<<<<<<<
newTest({
title: "Changes on a firstline selection will not delete first character",
start: ["test|jojo", "haha"],
keysPressed: "vj0c",
end: ["test|haha"],
endMode: ModeName.Insert
});
=======
suite("D command will remove all selected lines", () => {
newTest({
title: "D deletes all selected lines",
start: ["first line", "test| line1", "test line2", "second line"],
keysPressed: "vjD",
end: ["first line", "|second line"],
endMode: ModeName.Normal
});
newTest({
title: "D deletes the current line",
start: ["first line", "test| line1", "second line"],
keysPressed: "vlllD",
end: ["first line", "|second line"],
endMode: ModeName.Normal
});
});
>>>>>>>
newTest({
title: "Changes on a firstline selection will not delete first character",
start: ["test|jojo", "haha"],
keysPressed: "vj0c",
end: ["test|haha"],
endMode: ModeName.Insert
});
suite("D command will remove all selected lines", () => {
newTest({
title: "D deletes all selected lines",
start: ["first line", "test| line1", "test line2", "second line"],
keysPressed: "vjD",
end: ["first line", "|second line"],
endMode: ModeName.Normal
});
newTest({
title: "D deletes the current line",
start: ["first line", "test| line1", "second line"],
keysPressed: "vlllD",
end: ["first line", "|second line"],
endMode: ModeName.Normal
});
}); |
<<<<<<<
if (this._vimState.lastCursorTypeSet !== options.cursorStyle) {
if (options.cursorStyle === vscode.TextEditorCursorStyle.Block) {
this._vimState.editor.options.cursorStyle = vscode.TextEditorCursorStyle.Line;
this._vimState.editor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
} else if (options.cursorStyle === vscode.TextEditorCursorStyle.Line) {
this._vimState.editor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
this._vimState.editor.options.cursorStyle = vscode.TextEditorCursorStyle.Line;
}
this._vimState.lastCursorTypeSet = options.cursorStyle;
=======
switch (options.cursorStyle) {
case vscode.TextEditorCursorStyle.Block:
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Line;
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
break;
case vscode.TextEditorCursorStyle.Line:
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Line;
break;
case vscode.TextEditorCursorStyle.Underline:
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Underline;
break;
>>>>>>>
if (this._vimState.lastCursorTypeSet !== options.cursorStyle) {
switch (options.cursorStyle) {
case vscode.TextEditorCursorStyle.Block:
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Line;
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
break;
case vscode.TextEditorCursorStyle.Line:
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Line;
break;
case vscode.TextEditorCursorStyle.Underline:
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Block;
vscode.window.activeTextEditor.options.cursorStyle = vscode.TextEditorCursorStyle.Underline;
break;
}
this._vimState.lastCursorTypeSet = options.cursorStyle; |
<<<<<<<
createFiles({
scopeToKeys,
=======
createTranslationFiles({
keys,
scopes: config.scopes,
>>>>>>>
createTranslationFiles({
scopeToKeys,
scopes: config.scopes, |
<<<<<<<
import { generateVueComponentJS, generateNodeSyntax, extractStateObject } from './utils'
=======
import { generateVueComponentJS, generateVueNodesTree, extractStateObject } from './utils'
import { ComponentPluginFactory, ComponentPlugin } from '../../typings/generators'
>>>>>>>
import { generateVueComponentJS, generateNodeSyntax, extractStateObject } from './utils'
import { ComponentPluginFactory, ComponentPlugin } from '../../typings/generators' |
<<<<<<<
import * as types from '@babel/types'
import { createDefaultExport } from '@teleporthq/teleport-shared/lib/builders/ast-builders'
import { makePureComponent, generateNodeSyntax, createStateIdentifiers } from './utils'
import { ComponentPluginFactory, ComponentPlugin } from '@teleporthq/teleport-types'
=======
import { makeDefaultExport } from '@teleporthq/teleport-shared/lib/utils/ast-js-utils'
import { createPureComponent } from './utils'
import { generateNodeSyntax } from './node-handlers'
>>>>>>>
import { createDefaultExport } from '@teleporthq/teleport-shared/lib/builders/ast-builders'
import { createPureComponent } from './utils'
import { generateNodeSyntax } from './node-handlers' |
<<<<<<<
import { extractRoutes } from '../../shared/utils/uidl-utils'
=======
import { Validator } from '../../core'
>>>>>>>
import { extractRoutes } from '../../shared/utils/uidl-utils'
import { Validator } from '../../core'
<<<<<<<
const routes = extractRoutes(root)
// Step 1: The first level conditional nodes are taken as project pages
const pagePromises = routes.map((routeNode) => {
const { value, node } = routeNode.content
const pageName = value.toString()
=======
const { states = [] } = root.content
const stateDefinitions = root.stateDefinitions || {}
const routerDefinitions = stateDefinitions.router || null
// Step 2: The first level stateBranches (the pages) transformation in react components is started
const pagePromises = states.map((stateBranch: StateBranch) => {
if (
typeof stateBranch.value !== 'string' ||
typeof stateBranch.content === 'string' ||
!routerDefinitions
) {
return { files: [], dependencies: {} }
}
>>>>>>>
const routes = extractRoutes(root)
// Step 1: The first level conditional nodes are taken as project pages
const pagePromises = routes.map((routeNode) => {
const { value, node } = routeNode.content
const pageName = value.toString() |
<<<<<<<
import { makePureComponent, generateNodeSyntax, createStateIdentifiers } from './utils'
import * as types from '@babel/types'
=======
import { makePureComponent, generateTreeStructure, createStateIdentifiers } from './utils'
import { ComponentPluginFactory, ComponentPlugin } from '../../typings/generators'
>>>>>>>
import { makePureComponent, generateNodeSyntax, createStateIdentifiers } from './utils'
import { ComponentPluginFactory, ComponentPlugin } from '../../typings/generators' |
<<<<<<<
import { extractRoutes } from '../../shared/utils/uidl-utils'
=======
>>>>>>>
import { extractRoutes } from '../../shared/utils/uidl-utils'
<<<<<<<
const routeNodes = extractRoutes(root)
// Step 1: The first level conditionals become the pages
const pagePromises = routeNodes.map((routeNode) => {
const { value, node } = routeNode.content
const pageName = value.toString()
=======
const { states = [] } = root.content
const stateDefinitions = root.stateDefinitions || {}
const routerDefinitions = stateDefinitions.router || null
// Step 2: The first level stateBranches (the pages) transformation in react components is started
const pagePromises = states.map((stateBranch) => {
if (
typeof stateBranch.value !== 'string' ||
typeof stateBranch.content === 'string' ||
!routerDefinitions
) {
return { files: [], dependencies: {} }
}
>>>>>>>
const routeNodes = extractRoutes(root)
// Step 1: The first level conditionals become the pages
const pagePromises = routeNodes.map((routeNode) => {
const { value, node } = routeNode.content
const pageName = value.toString() |
<<<<<<<
import { extractRoutes } from '../../shared/utils/uidl-utils'
=======
import { Validator } from '../../core'
>>>>>>>
import { extractRoutes } from '../../shared/utils/uidl-utils'
import { Validator } from '../../core'
<<<<<<<
// Step 1: The first level stateBranches (the pages) transformation in react components is started
const pagePromises = routes.map((routeNode) => {
const { value: pageName, node } = routeNode.content
=======
// Step 2: The first level stateBranches (the pages) transformation in react components is started
const pagePromises = states.map((stateBranch) => {
if (
typeof stateBranch.value !== 'string' ||
typeof stateBranch.content === 'string' ||
!routerDefinitions
) {
return { files: [], dependencies: {} }
}
>>>>>>>
// Step 1: The first level stateBranches (the pages) transformation in react components is started
const pagePromises = routes.map((routeNode) => {
const { value: pageName, node } = routeNode.content |
<<<<<<<
import * as types from '@babel/types'
=======
// @ts-ignore
>>>>>>>
import * as types from '@babel/types'
// @ts-ignore |
<<<<<<<
import { extractPageMetadata, extractRoutes } from '../../shared/utils/uidl-utils'
=======
import { extractPageMetadata } from '../../shared/utils/uidl-utils'
import { ComponentPluginFactory, ComponentPlugin } from '../../typings/generators'
>>>>>>>
import { extractPageMetadata, extractRoutes } from '../../shared/utils/uidl-utils'
import { ComponentPluginFactory, ComponentPlugin } from '../../typings/generators' |
<<<<<<<
import { colors, ensureDir, ensureFile, fromStreamReader, gzipDecode, path, Untar } from '../deps.ts'
import log from '../log.ts'
=======
import { gzipDecode } from 'https://deno.land/x/[email protected]/mod.ts'
import { ensureDir, ensureFile, fromStreamReader, path, Untar } from '../std.ts'
>>>>>>>
import { gzipDecode } from 'https://deno.land/x/[email protected]/mod.ts'
import log from '../log.ts'
import { colors, ensureDir, ensureFile, fromStreamReader, path, Untar } from '../std.ts' |
<<<<<<<
/**
* These actions are dispatched immediatly after adding the module in the store
*/
initialActions?: AnyAction[];
=======
/**
* Middlewares to add to the store
*/
middlewares?: Middleware[];
/**
* These sagas are executed immediately after adding the module to the store (before dispatching initial actions)
*/
sagas?: ISagaRegistration<any>[];
>>>>>>>
/**
* Middlewares to add to the store
*/
middlewares?: Middleware[];
<<<<<<<
export interface IPlugin {
middleware?: any[];
onModuleManagerCreated?: (moduleManager: IModuleManager) => void;
onModuleAdded?: (module: IModule<any>) => void;
onModuleRemoved?: (module: IModule<any>) => void;
=======
export interface ISagaWithArguments<T> {
saga: (argument?: T) => Iterator<any>;
argument?: T;
>>>>>>>
export interface IPlugin {
middleware?: any[];
onModuleManagerCreated?: (moduleManager: IModuleManager) => void;
onModuleAdded?: (module: IModule<any>) => void;
onModuleRemoved?: (module: IModule<any>) => void;
<<<<<<<
/**
* Add the given module to the store
*/
addModule: (module: IModule<any>) => IDynamicallyAddedModule
addModules: (modules: IModule<any>[]) => IDynamicallyAddedModule;
=======
/**
* Add the given module to the store
*/
addModule: (...modules: IModule<any>[]) => IDynamicallyAddedModule
>>>>>>>
/**
* Add the given module to the store
*/
addModule: (module: IModule<any>) => IDynamicallyAddedModule
addModules: (modules: IModule<any>[]) => IDynamicallyAddedModule; |
<<<<<<<
var sandbox;
beforeEach(() => {
sandbox = sinon.sandbox.create();
});
afterEach(() => {
// Dispose the default app insights client and auto collectors so that they can be reconfigured
// cleanly for each test
AppInsights.dispose();
sandbox.restore();
});
=======
before(() => {
var originalHttpRequest = http.request;
this.request = sinon.stub(http, "request", (options: any, callback: any) => {
if(options.headers) {
options.headers["Connection"] = "close";
} else {
options.headers = {
"Connection": "close"
}
}
console.log(JSON.stringify(options));
return originalHttpRequest(options, callback);
});
});
after(() => {
this.request.restore();
});
>>>>>>>
var sandbox;
before(() => {
var originalHttpRequest = http.request;
this.request = sinon.stub(http, "request", (options: any, callback: any) => {
if(options.headers) {
options.headers["Connection"] = "close";
} else {
options.headers = {
"Connection": "close"
}
}
console.log(JSON.stringify(options));
return originalHttpRequest(options, callback);
});
});
beforeEach(() => {
sandbox = sinon.sandbox.create();
});
afterEach(() => {
// Dispose the default app insights client and auto collectors so that they can be reconfigured
// cleanly for each test
AppInsights.dispose();
sandbox.restore();
});
after(() => {
this.request.restore();
}); |
<<<<<<<
{
basePath: 'mariadb/resource-manager',
namespace: 'Microsoft.DBforMariaDB',
},
=======
{
basePath: 'mysql/resource-manager',
namespace: 'Microsoft.DBforMySQL',
},
>>>>>>>
{
basePath: 'mariadb/resource-manager',
namespace: 'Microsoft.DBforMariaDB',
},
{
basePath: 'mysql/resource-manager',
namespace: 'Microsoft.DBforMySQL',
}, |
<<<<<<<
import { SchemaConfiguration, generateSchemas, clearAutogeneratedSchemaRefs, saveAutogeneratedSchemaRefs } from '../generate';
import { whitelist } from '../whitelist';
=======
import { generateSchemas, clearAutogeneratedSchemaRefs, saveAutogeneratedSchemaRefs } from '../generate';
import { getWhitelist } from '../whitelist';
>>>>>>>
import { SchemaConfiguration, generateSchemas, clearAutogeneratedSchemaRefs, saveAutogeneratedSchemaRefs } from '../generate';
import { getWhitelist } from '../whitelist'; |
<<<<<<<
=======
import { AlsatianCliOptions } from "./alsatian-cli-options";
import { TestRunner, TestSet, TestOutputStream } from "../core/alsatian-core";
>>>>>>>
import { AlsatianCliOptions } from "./alsatian-cli-options";
import { TestRunner, TestSet, TestOutputStream } from "../core/alsatian-core";
<<<<<<<
public constructor(private _testRunner: TestRunner) {
if (!_testRunner) {
throw new TypeError("_testRunner must not be null or undefined.");
}
}
public run(userArguments: AlsatianCliOptions) {
=======
public async run(userArguments: AlsatianCliOptions) {
>>>>>>>
public constructor(private _testRunner: TestRunner) {
if (!_testRunner) {
throw new TypeError("_testRunner must not be null or undefined.");
}
}
public async run(userArguments: AlsatianCliOptions) { |
<<<<<<<
{
basePath: 'batchai/resource-manager',
namespace: 'Microsoft.BatchAI',
},
{
=======
{
basePath: 'alertsmanagement/resource-manager',
namespace: 'Microsoft.AlertsManagement',
},
{
basePath: 'attestation/resource-manager',
namespace: 'Microsoft.Attestation',
},
{
basePath: 'azuredata/resource-manager',
namespace: 'Microsoft.AzureData',
},
{
>>>>>>>
{
basePath: 'alertsmanagement/resource-manager',
namespace: 'Microsoft.AlertsManagement',
},
{
basePath: 'attestation/resource-manager',
namespace: 'Microsoft.Attestation',
},
{
basePath: 'azuredata/resource-manager',
namespace: 'Microsoft.AzureData',
},
{
basePath: 'batchai/resource-manager',
namespace: 'Microsoft.BatchAI',
},
{ |
<<<<<<<
basePath: 'managementpartner/resource-manager',
namespace: 'Microsoft.ManagementPartner',
},
{
=======
basePath: 'maps/resource-manager',
namespace: 'Microsoft.Maps',
},
{
>>>>>>>
basePath: 'managementpartner/resource-manager',
namespace: 'Microsoft.ManagementPartner',
},
{
basePath: 'maps/resource-manager',
namespace: 'Microsoft.Maps',
},
{ |
<<<<<<<
basePath: 'managementgroups/resource-manager',
namespace: 'Microsoft.Management',
},
{
=======
basePath: 'managementpartner/resource-manager',
namespace: 'Microsoft.ManagementPartner',
},
{
basePath: 'maps/resource-manager',
namespace: 'Microsoft.Maps',
},
{
>>>>>>>
basePath: 'managementgroups/resource-manager',
namespace: 'Microsoft.Management',
},
{
basePath: 'managementpartner/resource-manager',
namespace: 'Microsoft.ManagementPartner',
},
{
basePath: 'maps/resource-manager',
namespace: 'Microsoft.Maps',
},
{ |
<<<<<<<
{
basePath: 'deviceprovisioningservices/resource-manager',
namespace: 'Microsoft.Devices',
suffix: 'Provisioning',
},
{
=======
{
>>>>>>>
{
<<<<<<<
basePath: 'iothub/resource-manager',
namespace: 'Microsoft.Devices',
},
{
=======
basePath: 'hybriddatamanager/resource-manager',
namespace: 'Microsoft.HybridData',
},
{
>>>>>>>
basePath: 'hybriddatamanager/resource-manager',
namespace: 'Microsoft.HybridData',
},
{
basePath: 'iothub/resource-manager',
namespace: 'Microsoft.Devices',
},
{ |
<<<<<<<
{
basePath: 'vmwarecloudsimple/resource-manager',
namespace: 'Microsoft.VMwareCloudSimple',
},
=======
{
"basePath": "windowsiot/resource-manager",
"namespace": "Microsoft.WindowsIoT"
}
>>>>>>>
{
basePath: 'vmwarecloudsimple/resource-manager',
namespace: 'Microsoft.VMwareCloudSimple',
},
{
"basePath": "windowsiot/resource-manager",
"namespace": "Microsoft.WindowsIoT"
} |
<<<<<<<
// import Link from './Link/Link';
=======
>>>>>>>
// import Link from './Link/Link';
<<<<<<<
},
// {
// name: 'Link',
// component: Link,
// icon: 'link',
// }
];
// icons:
// code-block
// media
=======
}
];
>>>>>>>
}
]; |
<<<<<<<
}
export function modifyPropertyAtPath(obj: any, fn: (value: any) => any, path: (string|number)[]): any {
if (!path.length) {
return fn(obj);
}
const [segment, ...rest] = path;
// keep arrays if possible
if (typeof segment == 'number' && segment >= 0) {
if (obj == undefined) {
obj = [];
}
if (isArray(obj)) {
const oldItem = obj[segment];
const newItem = modifyPropertyAtPath(oldItem, fn, rest);
return replaceArrayItem(obj, segment, newItem);
}
if (typeof obj != 'object') {
throw new TypeError(`Expected array, but got ${typeof obj} while trying to replace property path ${path}`);
}
}
if (obj == undefined) {
obj = {};
}
if (typeof obj != 'object') {
throw new TypeError(`Expected object, but got ${typeof obj} while trying to replace property path ${path}`);
}
const val = obj[segment];
return {
...obj,
[segment]: modifyPropertyAtPath(val, fn, rest)
};
}
export function replaceArrayItem(array: any[], index: number, newValue: any) {
const before = array.slice(0, index /* exclusive */);
const after = array.slice(index + 1);
const beforeFill = repeat(undefined, index - before.length); // make sure
return [
...before,
...beforeFill,
newValue,
...after
];
}
export function repeat(value: any, count: number) {
if (count <= 0) {
return [];
}
const arr = new Array(count);
for (let i = 0; i < count; i++) {
arr[i] = value;
}
return arr;
=======
}
export function getOrSetFromMap<K, V>(map: Map<K, V>, key: K, defaultFn: () => V): V {
if (map.has(key)) {
return map.get(key)!;
}
const value = defaultFn();
map.set(key, value);
return value;
>>>>>>>
}
export function modifyPropertyAtPath(obj: any, fn: (value: any) => any, path: (string|number)[]): any {
if (!path.length) {
return fn(obj);
}
const [segment, ...rest] = path;
// keep arrays if possible
if (typeof segment == 'number' && segment >= 0) {
if (obj == undefined) {
obj = [];
}
if (isArray(obj)) {
const oldItem = obj[segment];
const newItem = modifyPropertyAtPath(oldItem, fn, rest);
return replaceArrayItem(obj, segment, newItem);
}
if (typeof obj != 'object') {
throw new TypeError(`Expected array, but got ${typeof obj} while trying to replace property path ${path}`);
}
}
if (obj == undefined) {
obj = {};
}
if (typeof obj != 'object') {
throw new TypeError(`Expected object, but got ${typeof obj} while trying to replace property path ${path}`);
}
const val = obj[segment];
return {
...obj,
[segment]: modifyPropertyAtPath(val, fn, rest)
};
}
export function replaceArrayItem(array: any[], index: number, newValue: any) {
const before = array.slice(0, index /* exclusive */);
const after = array.slice(index + 1);
const beforeFill = repeat(undefined, index - before.length); // make sure
return [
...before,
...beforeFill,
newValue,
...after
];
}
export function repeat(value: any, count: number) {
if (count <= 0) {
return [];
}
const arr = new Array(count);
for (let i = 0; i < count; i++) {
arr[i] = value;
}
return arr;
}
export function getOrSetFromMap<K, V>(map: Map<K, V>, key: K, defaultFn: () => V): V {
if (map.has(key)) {
return map.get(key)!;
}
const value = defaultFn();
map.set(key, value);
return value; |
<<<<<<<
=======
@Input()
type: CalendarType = 'single';
>>>>>>>
<<<<<<<
@Input()
type: CalendarType = 'single';
@Input()
disableFunction = function(d): boolean {
return false;
};
@Input()
blockFunction = function(d): boolean {
return false;
};
=======
@Input()
selectedDay: CalendarDay = {
date: null
};
@Output()
selectedDayChange = new EventEmitter();
@Input()
selectedRangeFirst: CalendarDay = {
date: null
};
@Output()
selectedRangeFirstChange = new EventEmitter();
@Input()
selectedRangeLast: CalendarDay = {
date: null
};
@Output()
selectedRangeLastChange = new EventEmitter();
>>>>>>>
@Input()
type: CalendarType = 'single';
@Input()
disableFunction = function(d): boolean {
return false;
};
@Input()
blockFunction = function(d): boolean {
return false;
};
@Input()
selectedDay: CalendarDay = {
date: null
};
@Output()
selectedDayChange = new EventEmitter();
@Input()
selectedRangeFirst: CalendarDay = {
date: null
};
@Output()
selectedRangeFirstChange = new EventEmitter();
@Input()
selectedRangeLast: CalendarDay = {
date: null
};
@Output()
selectedRangeLastChange = new EventEmitter(); |
<<<<<<<
import { FormDocsComponent } from './containers/form/form-docs.component';
=======
import { SideNavigationDocsComponent } from './containers/side-navigation/side-navigation-docs.component';
>>>>>>>
import { FormDocsComponent } from './containers/form/form-docs.component';
import { SideNavigationDocsComponent } from './containers/side-navigation/side-navigation-docs.component';
<<<<<<<
=======
{ path: 'sideNavigation', component: SideNavigationDocsComponent },
{ path: 'tabs', component: TabsDocsComponent },
>>>>>>>
{ path: 'sideNavigation', component: SideNavigationDocsComponent },
<<<<<<<
=======
SideNavigationDocsComponent,
MegaMenuDocsComponent,
TileDocsComponent,
>>>>>>>
SideNavigationDocsComponent,
MegaMenuDocsComponent,
TileDocsComponent, |
<<<<<<<
declare module 'webfontloader'
=======
declare module 'react-breakpoints'
>>>>>>>
declare module 'webfontloader'
declare module 'react-breakpoints' |
<<<<<<<
// Redundant, because add does this, but called explicitly for thoroughness
await updateCommand(await makeConfig(appDir), 'ios', false);
=======
>>>>>>> |
<<<<<<<
// ctx.fillStyle = "black";
// ctx.fillRect(0, 0, textureSize, textureSize);
=======
ctx.save();
ctx.fillStyle = "black";
ctx.fillRect(0, 0, textureSize, textureSize);
>>>>>>>
ctx.save(); |
<<<<<<<
const regEx = /(.*);\sMax-Age=(.*)/;
const matches = xsrfToken.match(regEx);
if (matches.length !== 3) {
throw Error('xsrfToken does not look like as expected:' + xsrfToken);
=======
const regEx = /(.*);\sMax-Age=(.*)/;
const matches = xsrfToken.match(regEx);
if (matches.length !== 3) {
throw new Error('xsrfToken does not look like as expected:' + xsrfToken);
>>>>>>>
const regEx = /(.*);\sMax-Age=(.*)/;
const matches = xsrfToken.match(regEx);
if (matches.length !== 3) {
throw new Error('xsrfToken does not look like as expected:' + xsrfToken);
<<<<<<<
this.setMaxAge(parseInt(matches[2], 0));
=======
this.setMaxAge(parseInt(matches[2], 10));
>>>>>>>
this.setMaxAge(parseInt(matches[2], 10));
<<<<<<<
console.log('set max age ' + maxAge + ' till ' + Consts.toLocaleString(new Date(timestamp)));
=======
console.log('set max age ' + maxAge + ' till ' + new Date(timestamp).toLocaleString());
>>>>>>>
console.log('set max age ' + maxAge + ' till ' + Consts.toLocaleString(new Date(timestamp)));
<<<<<<<
const date = new Date(parseInt(validUntilTimestamp, 0));
if (Consts.toLocaleString(date) === 'Invalid Date') {
console.log('HELLO VALENTYN, THIS IS WEIRED: ' + validUntilTimestamp + ' results in Invalid Date');
=======
const date = new Date(parseInt(validUntilTimestamp, 10));
if (date.toLocaleString() === 'Invalid Date') {
>>>>>>>
const date = new Date(parseInt(validUntilTimestamp, 0));
if (Consts.toLocaleString(date) === 'Invalid Date') {
console.log('HELLO VALENTYN, THIS IS WEIRED: ' + validUntilTimestamp + ' results in Invalid Date');
<<<<<<<
return parseInt(active,0) === 1;
=======
return parseInt(active, 10) === 1;
>>>>>>>
return parseInt(active,0) === 1;
<<<<<<<
=======
let retries = 100;
while (retries > 0 && this.documentCookieService.exists(Session.COOKIE_NAME_SESSION)) {
console.log('retry to delete');
this.documentCookieService.delete(Session.COOKIE_NAME_SESSION);
retries--;
}
>>>>>>>
let retries = 100;
while (retries > 0 && this.documentCookieService.exists(Session.COOKIE_NAME_SESSION)) {
console.log('retry to delete');
this.documentCookieService.delete(Session.COOKIE_NAME_SESSION);
retries--;
} |
<<<<<<<
import {Router} from '@angular/router';
import {FinTechAuthorizationService} from '../../api';
import {StorageService} from '../../services/storage.service';
import {TestBed} from '@angular/core/testing';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {ConsentAuthorizationService} from './consent-authorization.service';
import {RouterTestingModule} from '@angular/router/testing';
import {Consent, LoARetrievalInformation, Payment} from '../../models/consts';
=======
import { Router } from '@angular/router';
import { FinTechAuthorizationService } from '../../api';
import { StorageService } from '../../services/storage.service';
import { TestBed } from '@angular/core/testing';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { ConsentAuthorizationService } from './consent-authorization.service';
import { RouterTestingModule } from '@angular/router/testing';
import { Consent, LoARetrievalInformation, Payment } from '../../models/consts';
>>>>>>>
import {Router} from '@angular/router';
import {FinTechAuthorizationService} from '../../api';
import {StorageService} from '../../services/storage.service';
import {TestBed} from '@angular/core/testing';
import {HttpClientTestingModule} from '@angular/common/http/testing';
import {ConsentAuthorizationService} from './consent-authorization.service';
import {RouterTestingModule} from '@angular/router/testing';
import {Consent, Payment} from '../../models/consts'; |
<<<<<<<
r.mathInline,
=======
r.math,
r.spin,
>>>>>>>
r.mathInline,
r.spin,
<<<<<<<
r.mathInline,
=======
r.flip,
r.math,
>>>>>>>
r.flip,
r.mathInline, |
<<<<<<<
import { Attributes } from '../../src/dynamo-easy'
=======
import { Attributes } from '../../src/mapper/type/attribute.type'
import { Organization } from '../models'
>>>>>>>
import { Attributes } from '../../src/dynamo-easy'
import { Organization } from '../models' |
<<<<<<<
const expression = Reflect.get(params, expressionType)
if (isString(expression)) {
switch (expressionType) {
case 'UpdateExpression':
if (expression !== '') {
throw new Error(
'params.UpdateExpression is not empty, please use the UpdateRequest.operations() method to define all the update operations',
)
}
break
default:
;(<any>params)[expressionType] = `${expression} AND ${condition.statement}`
=======
const expression = Reflect.get(params, expressionType)
if (isString(expression)) {
switch (expressionType) {
case 'UpdateExpression':
if (expression !== '') {
throw new Error(
'params.UpdateExpression is not empty, please use the UpdateRequest.operations() method to define all the update operations'
)
}
break
default:
;(<any>params)[expressionType] = `${expression} AND ${nameSafeCondition.statement}`
}
} else {
;(<any>params)[expressionType] = nameSafeCondition.statement
>>>>>>>
const expression = Reflect.get(params, expressionType)
if (isString(expression)) {
switch (expressionType) {
case 'UpdateExpression':
if (expression !== '') {
throw new Error(
'params.UpdateExpression is not empty, please use the UpdateRequest.operations() method to define all the update operations',
)
}
break
default:
;(<any>params)[expressionType] = `${expression} AND ${nameSafeCondition.statement}` |
<<<<<<<
if (typeof modelValue !== 'number') {
throw new Error('this mapper only support values of type number')
=======
if (!isNumber(modelValue)) {
throw new Error(`this mapper only support values of type number, value given: ${JSON.stringify(modelValue)}`)
>>>>>>>
if (typeof modelValue !== 'number') {
throw new Error(`this mapper only support values of type number, value given: ${JSON.stringify(modelValue)}`) |
<<<<<<<
if (isCollection(value)) {
return detectCollectionTypeFromValue(value)
} else if (typeof value === 'string') {
=======
if (isString(value)) {
>>>>>>>
if (typeof value === 'string') {
<<<<<<<
} else if (typeof value === 'number') {
=======
} else if (isNumber(value)) {
// TODO LOW: we should probably use _.isFinite --> otherwise Infinity & NaN are numbers as well
>>>>>>>
} else if (typeof value === 'number') { |
<<<<<<<
}
export async function getUserByEmail(email: string) {
if (!config.FIREBASE_ADMIN_SDK_CONFIG) {
return;
}
return await admin.auth().getUserByEmail(email);
=======
}
export async function getUserEmail(uid: string) {
if (!config.FIREBASE_ADMIN_SDK_CONFIG) {
return undefined;
}
const user = await admin.auth().getUser(uid);
return user.email;
>>>>>>>
}
export async function getUserByEmail(email: string) {
if (!config.FIREBASE_ADMIN_SDK_CONFIG) {
return;
}
return await admin.auth().getUserByEmail(email);
}
export async function getUserEmail(uid: string) {
if (!config.FIREBASE_ADMIN_SDK_CONFIG) {
return undefined;
}
const user = await admin.auth().getUser(uid);
return user.email; |
<<<<<<<
=======
* If the "(p)npm-local" symlink hasn't been set up yet, this creates it, installing the
* specified (P)npm version in the user's home directory if needed.
*/
public ensureLocalPackageManager(): Promise<void> {
// Example: "C:\Users\YourName\.rush"
const rushUserFolder: string = this._rushGlobalFolder.nodeSpecificPath;
if (!FileSystem.exists(rushUserFolder)) {
console.log('Creating ' + rushUserFolder);
FileSystem.ensureFolder(rushUserFolder);
}
const packageManager: PackageManagerName = this._rushConfiguration.packageManager;
const packageManagerVersion: string = this._rushConfiguration.packageManagerToolVersion;
const packageManagerAndVersion: string = `${packageManager}-${packageManagerVersion}`;
// Example: "C:\Users\YourName\.rush\pnpm-1.2.3"
const packageManagerToolFolder: string = path.join(rushUserFolder, packageManagerAndVersion);
const packageManagerMarker: LastInstallFlag = new LastInstallFlag(packageManagerToolFolder, {
node: process.versions.node
});
console.log(`Trying to acquire lock for ${packageManagerAndVersion}`);
return LockFile.acquire(rushUserFolder, packageManagerAndVersion).then((lock: LockFile) => {
console.log(`Acquired lock for ${packageManagerAndVersion}`);
if (!packageManagerMarker.isValid() || lock.dirtyWhenAcquired) {
console.log(colors.bold(`Installing ${packageManager} version ${packageManagerVersion}${os.EOL}`));
// note that this will remove the last-install flag from the directory
Utilities.installPackageInDirectory({
directory: packageManagerToolFolder,
packageName: packageManager,
version: this._rushConfiguration.packageManagerToolVersion,
tempPackageTitle: `${packageManager}-local-install`,
maxInstallAttempts: this._options.maxInstallAttempts,
// This is using a local configuration to install a package in a shared global location.
// Generally that's a bad practice, but in this case if we can successfully install
// the package at all, we can reasonably assume it's good for all the repositories.
// In particular, we'll assume that two different NPM registries cannot have two
// different implementations of the same version of the same package.
// This was needed for: https://github.com/microsoft/rushstack/issues/691
commonRushConfigFolder: this._rushConfiguration.commonRushConfigFolder
});
console.log(`Successfully installed ${packageManager} version ${packageManagerVersion}`);
} else {
console.log(
`Found ${packageManager} version ${packageManagerVersion} in ${packageManagerToolFolder}`
);
}
packageManagerMarker.create();
// Example: "C:\MyRepo\common\temp"
FileSystem.ensureFolder(this._rushConfiguration.commonTempFolder);
// Example: "C:\MyRepo\common\temp\pnpm-local"
const localPackageManagerToolFolder: string = path.join(
this._rushConfiguration.commonTempFolder,
`${packageManager}-local`
);
console.log(os.EOL + 'Symlinking "' + localPackageManagerToolFolder + '"');
console.log(' --> "' + packageManagerToolFolder + '"');
// We cannot use FileSystem.exists() to test the existence of a symlink, because it will
// return false for broken symlinks. There is no way to test without catching an exception.
try {
FileSystem.deleteFolder(localPackageManagerToolFolder);
} catch (error) {
if (error.code !== 'ENOENT') {
throw error;
}
}
FileSystem.createSymbolicLinkJunction({
linkTargetPath: packageManagerToolFolder,
newLinkPath: localPackageManagerToolFolder
});
lock.release();
});
}
/**
>>>>>>> |
<<<<<<<
private _cleanParameter: CommandLineFlagParameter;
=======
private _noLinkParameter: CommandLineFlagParameter;
>>>>>>>
private _cleanParameter: CommandLineFlagParameter
private _noLinkParameter: CommandLineFlagParameter;
<<<<<<<
this._cleanParameter = this.defineFlagParameter({
parameterLongName: '--clean',
parameterShortName: '-c',
description: 'Force cleaning of the node_modules folder before running "npm install".'
+ 'This is slower, but more correct.'
});
=======
this._noLinkParameter = this.defineFlagParameter({
parameterLongName: '--no-link',
description: 'Do not automatically run the Link action after completing Generate action'
});
>>>>>>>
this._cleanParameter = this.defineFlagParameter({
parameterLongName: '--clean',
parameterShortName: '-c',
description: 'Force cleaning of the node_modules folder before running "npm install".'
+ 'This is slower, but more correct.'
});
this._noLinkParameter = this.defineFlagParameter({
parameterLongName: '--no-link',
description: 'Do not automatically run the Link action after completing Generate action'
}); |
<<<<<<<
import { FileSystem, Import } from '@rushstack/node-core-library';
=======
import { FileSystem, AlreadyReportedError } from '@rushstack/node-core-library';
>>>>>>>
import { FileSystem, AlreadyReportedError, Import } from '@rushstack/node-core-library';
<<<<<<<
import { AlreadyReportedError } from '../../utilities/AlreadyReportedError';
import { PNPM_SHRINKWRAP_YAML_FORMAT } from './PnpmYamlCommon';
=======
>>>>>>>
import { PNPM_SHRINKWRAP_YAML_FORMAT } from './PnpmYamlCommon'; |
<<<<<<<
import { SassTypingsPlugin } from '../plugins/SassTypingsPlugin/SassTypingsPlugin';
import { HeftConfigFiles } from '../utilities/HeftConfigFiles';
=======
import { ProjectValidatorPlugin } from '../plugins/ProjectValidatorPlugin';
>>>>>>>
import {
CoreConfigFiles,
IHeftConfigurationJson,
IHeftConfigurationJsonPluginSpecifier
} from '../utilities/CoreConfigFiles';
import { HeftSession } from './HeftSession';
import { IHeftPlugin } from './IHeftPlugin';
import { InternalHeftSession } from './InternalHeftSession';
<<<<<<<
this._applyPlugin(new SassTypingsPlugin());
=======
this._applyPlugin(new ProjectValidatorPlugin());
>>>>>>>
this._applyPlugin(new SassTypingsPlugin());
this._applyPlugin(new ProjectValidatorPlugin()); |
<<<<<<<
=======
import { RigConfig } from '@rushstack/rig-package';
import { ITypeScriptConfigurationJson } from './TypeScriptPlugin/TypeScriptPlugin';
>>>>>>>
import { ITypeScriptConfigurationJson } from './TypeScriptPlugin/TypeScriptPlugin';
<<<<<<<
const copyStaticAssetsConfigurationJson:
| ICopyStaticAssetsConfigurationJson
| undefined = await CoreConfigFiles.copyStaticAssetsConfigurationLoader.tryLoadConfigurationFileForProjectAsync(
=======
const rigConfig: RigConfig = await CoreConfigFiles.getRigConfigAsync(heftConfiguration);
const typescriptConfiguration:
| ITypeScriptConfigurationJson
| undefined = await CoreConfigFiles.typeScriptConfigurationFileLoader.tryLoadConfigurationFileForProjectAsync(
>>>>>>>
const typescriptConfiguration:
| ITypeScriptConfigurationJson
| undefined = await CoreConfigFiles.typeScriptConfigurationFileLoader.tryLoadConfigurationFileForProjectAsync( |
<<<<<<<
import DuskwalkersPatch from './modules/spells/shadowlands/legendaries/DuskwalkersPatch';
=======
import EssenceOfBloodfang from '../shared/shadowlands/legendaries/EssenceOfBloodfang';
>>>>>>>
import DuskwalkersPatch from './modules/spells/shadowlands/legendaries/DuskwalkersPatch';
import EssenceOfBloodfang from '../shared/shadowlands/legendaries/EssenceOfBloodfang';
<<<<<<<
duskwalkersPatch: DuskwalkersPatch,
=======
essenceOfBloodfang: EssenceOfBloodfang,
>>>>>>>
duskwalkersPatch: DuskwalkersPatch,
essenceOfBloodfang: EssenceOfBloodfang, |
<<<<<<<
public taskConfig: IKarmaTaskConfig = {
configPath: './karma.config.js',
testMatch: /.+\.test\.js?$/,
failBuildOnErrors: false
};
=======
constructor() {
super(
'karma',
{
configPath: './karma.config.js',
testMatch: /.+\.test\.js?$/
}
);
}
>>>>>>>
constructor() {
super(
'karma',
{
configPath: './karma.config.js',
testMatch: /.+\.test\.js?$/,
failBuildOnErrors: false
}
);
} |
<<<<<<<
public ensure(versionPolicyName?: string, shouldCommit?: boolean): void {
this._ensure(versionPolicyName, shouldCommit);
}
public bump(versionPolicyName?: string,
bumpType?: BumpType,
identifier?: string,
shouldCommit?: boolean
): void {
// Bump all the lock step version policies.
this._versionPolicyConfiguration.bump(versionPolicyName, bumpType, identifier, shouldCommit);
// Update packages and generate change files due to lock step bump.
this._ensure(versionPolicyName, shouldCommit);
// Refresh rush configuration
this._rushConfiguration = RushConfiguration.loadFromConfigurationFile(this._rushConfiguration.rushJsonFile);
// Update projects based on individual policies
const changeManager: ChangeManager = new ChangeManager(this._rushConfiguration,
this._getLockStepProjects());
const changesPath: string = path.join(this._rushConfiguration.commonFolder, RushConstants.changeFilesFolderName);
changeManager.load(changesPath);
if (changeManager.hasChanges()) {
changeManager.validateChanges(this._versionPolicyConfiguration);
changeManager.apply(shouldCommit).forEach(packageJson => {
this._updatedProjects.set(packageJson.name, packageJson);
});
changeManager.updateChangelog(shouldCommit, this._updatedProjects);
}
}
public get updatedProjects(): Map<string, IPackageJson> {
return this._updatedProjects;
}
public get changeFiles(): Map<string, ChangeFile> {
return this._changeFiles;
}
private _ensure(versionPolicyName?: string, shouldCommit?: boolean): void {
this._updateVersionsByPolicy(versionPolicyName);
// Update all dependencies if needed.
this._updateDependencies();
if (shouldCommit) {
this._updatePackageJsonFiles();
this._changeFiles.forEach((changeFile) => {
changeFile.writeSync();
});
}
}
private _getLockStepProjects(): Set<string> | undefined {
const lockStepVersionPolicyNames: Set<string> = new Set<string>();
this._versionPolicyConfiguration.versionPolicies.forEach((versionPolicy) => {
if (versionPolicy instanceof LockStepVersionPolicy) {
lockStepVersionPolicyNames.add(versionPolicy.policyName);
}
});
const lockStepProjectNames: Set<string> = new Set<string>();
this._rushConfiguration.projects.forEach((rushProject) => {
if (lockStepVersionPolicyNames.has(rushProject.versionPolicyName)) {
lockStepProjectNames.add(rushProject.packageName);
}
});
return lockStepProjectNames;
}
private _updateVersionsByPolicy(versionPolicyName?: string): void {
const versionPolicies: Map<string, VersionPolicy> = this._versionPolicyConfiguration.versionPolicies;
=======
public ensure(versionPolicyName?: string): Map<string, IPackageJson> {
const updatedProjects: Map<string, IPackageJson> = new Map<string, IPackageJson>();
>>>>>>>
public ensure(versionPolicyName?: string, shouldCommit?: boolean): void {
this._ensure(versionPolicyName, shouldCommit);
}
public bump(versionPolicyName?: string,
bumpType?: BumpType,
identifier?: string,
shouldCommit?: boolean
): void {
// Bump all the lock step version policies.
this._versionPolicyConfiguration.bump(versionPolicyName, bumpType, identifier, shouldCommit);
// Update packages and generate change files due to lock step bump.
this._ensure(versionPolicyName, shouldCommit);
// Refresh rush configuration
this._rushConfiguration = RushConfiguration.loadFromConfigurationFile(this._rushConfiguration.rushJsonFile);
// Update projects based on individual policies
const changeManager: ChangeManager = new ChangeManager(this._rushConfiguration,
this._getLockStepProjects());
const changesPath: string = path.join(this._rushConfiguration.commonFolder, RushConstants.changeFilesFolderName);
changeManager.load(changesPath);
if (changeManager.hasChanges()) {
changeManager.validateChanges(this._versionPolicyConfiguration);
changeManager.apply(shouldCommit).forEach(packageJson => {
this._updatedProjects.set(packageJson.name, packageJson);
});
changeManager.updateChangelog(shouldCommit, this._updatedProjects);
}
}
public get updatedProjects(): Map<string, IPackageJson> {
return this._updatedProjects;
}
public get changeFiles(): Map<string, ChangeFile> {
return this._changeFiles;
}
private _ensure(versionPolicyName?: string, shouldCommit?: boolean): void {
this._updateVersionsByPolicy(versionPolicyName);
// Update all dependencies if needed.
this._updateDependencies();
if (shouldCommit) {
this._updatePackageJsonFiles();
this._changeFiles.forEach((changeFile) => {
changeFile.writeSync();
});
}
}
private _getLockStepProjects(): Set<string> | undefined {
const lockStepVersionPolicyNames: Set<string> = new Set<string>();
this._versionPolicyConfiguration.versionPolicies.forEach((versionPolicy) => {
if (versionPolicy instanceof LockStepVersionPolicy) {
lockStepVersionPolicyNames.add(versionPolicy.policyName);
}
});
const lockStepProjectNames: Set<string> = new Set<string>();
this._rushConfiguration.projects.forEach((rushProject) => {
if (lockStepVersionPolicyNames.has(rushProject.versionPolicyName)) {
lockStepProjectNames.add(rushProject.packageName);
}
});
return lockStepProjectNames;
}
private _updateVersionsByPolicy(versionPolicyName?: string): void { |
<<<<<<<
import RushConfiguration from '../../data/RushConfiguration';
import { Git } from './Git';
=======
import { RushConfiguration } from '../../data/RushConfiguration';
>>>>>>>
import { RushConfiguration } from '../../data/RushConfiguration';
import { Git } from './Git'; |
<<<<<<<
export class TypescriptCompiler extends RushStackCompilerBase {
=======
export interface ITypescriptCompilerOptions {
/**
* Option to pass custom arguments to the tsc command.
*/
customArgs?: string[];
}
/**
* @beta
*/
export class TypescriptCompiler extends RushStackCompilerBase<ITypescriptCompilerOptions> {
public typescript: typeof typescript = typescript;
>>>>>>>
export interface ITypescriptCompilerOptions {
/**
* Option to pass custom arguments to the tsc command.
*/
customArgs?: string[];
}
/**
* @beta
*/
export class TypescriptCompiler extends RushStackCompilerBase<ITypescriptCompilerOptions> { |
<<<<<<<
/**
* By default, rush passes --no-prefer-frozen-lockfile to 'pnpm install'.
* Set this option to true to pass '--frozen-lockfile' instead.
*/
usePnpmFrozenLockfileForRushInstall?: boolean;
=======
/**
* If true, the chmod field in temporary project tar headers will not be normalized.
* This normalization can help ensure consistent tarball integrity across platforms.
*/
noChmodFieldInTarHeaderNormalization?: boolean;
>>>>>>>
/**
* By default, rush passes --no-prefer-frozen-lockfile to 'pnpm install'.
* Set this option to true to pass '--frozen-lockfile' instead.
*/
usePnpmFrozenLockfileForRushInstall?: boolean;
/**
* If true, the chmod field in temporary project tar headers will not be normalized.
* This normalization can help ensure consistent tarball integrity across platforms.
*/
noChmodFieldInTarHeaderNormalization?: boolean; |
<<<<<<<
this._versionManager = new VersionManager(
this.rushConfiguration,
userEmail,
this.rushConfiguration.versionPolicyConfiguration
);
=======
this._versionManager = new versionManagerModule.VersionManager(
this.rushConfiguration,
userEmail,
this.rushConfiguration.versionPolicyConfiguration,
this.parser.rushGlobalFolder
);
>>>>>>>
this._versionManager = new versionManagerModule.VersionManager(
this.rushConfiguration,
userEmail,
this.rushConfiguration.versionPolicyConfiguration
); |
<<<<<<<
const cachedDocumentsRequest = new RequestType<void, {timestamp:number, documents:string[]}, void, void>('cachedDocuments');
const documentLanguageRangesRequest = new RequestType<{ textDocument: TextDocumentIdentifier }, LanguageRange[], void, void>('documentLanguageRanges');
=======
const knownDocumentsRequest = new RequestType<void, {timestamp:number, documents:string[]}, void, void>('knownDocuments');
>>>>>>>
const documentLanguageRangesRequest = new RequestType<{ textDocument: TextDocumentIdentifier }, LanguageRange[], void, void>('documentLanguageRanges');
const knownDocumentsRequest = new RequestType<void, {timestamp:number, documents:string[]}, void, void>('knownDocuments');
<<<<<<<
return Intelephense.knownDocuments();
}, debugInfo);
});
connection.onRequest(documentLanguageRangesRequest, (params) => {
let debugInfo = ['onDocumentLanguageRanges'];
return handleRequest(() => {
return Intelephense.documentLanguageRanges(params.textDocument);
=======
return Intelephense.knownDocuments();
>>>>>>>
return Intelephense.knownDocuments();
}, debugInfo);
});
connection.onRequest(documentLanguageRangesRequest, (params) => {
let debugInfo = ['onDocumentLanguageRanges'];
return handleRequest(() => {
return Intelephense.documentLanguageRanges(params.textDocument); |
<<<<<<<
import Ring = require('../ring');
import EffectSource = require('../EffectSource');
import { CardTypes, Locations } from '../Constants.js';
=======
import { CardTypes, EffectNames, Locations } from '../Constants.js';
>>>>>>>
import Ring = require('../ring');
import EffectSource = require('../EffectSource');
import { CardTypes, EffectNames, Locations } from '../Constants.js';
<<<<<<<
canAffect(target: BaseCard | Ring, context: AbilityContext, additionalProperties = {}) {
return super.canAffect(target, context, additionalProperties);
=======
canAffect(card: BaseCard, context: AbilityContext, additionalProperties = {}): boolean {
return super.canAffect(card, context, additionalProperties);
>>>>>>>
canAffect(target: BaseCard | Ring, context: AbilityContext, additionalProperties = {}): boolean {
return super.canAffect(target, context, additionalProperties); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.